o-dropdown/components/artdeco-dropdown","artdeco-dropdown/components/artdeco-dropdown-item","text-view-model/components/text-view-model-v2","ember-cli-pemberly-i18n/helpers/t","hue-web-icons/components/icon","@glimmer/tracking","@ember/helper","@ember/object"],(function(e,t,i,n,r,o,a,l,s,c,d,u,p,m,g,h){"use strict" Object.defineProperty(e,"__esModule",{value:!0}) e.default=void 0 var f,b e.default=(0,a.setComponentTemplate)((0,o.createTemplateFactory)({id:"1wkbOEFf",block:'[[[1,"\\n"],[1," "],[8,[32,0],null,[["@isOpen","@onVisibilityChange","@placement","@justification","@useNewFocusModel"],[[30,0,["isDropdownOpen"]],[30,0,["onVisibilityChange"]],"bottom","right",true]],[["default"],[[[[1,"\\n "],[8,[30,1,["dropdown-trigger"]],[[24,0,"artdeco-button artdeco-button--muted artdeco-button--tertiary artdeco-button--circle"],[16,"aria-label",[28,[32,1],["i18n_notification_options","props-shared/components/props-settings-dropdown"],null]]],null,[["default"],[[[[1,"\\n "],[8,[32,2],[[24,0,"props-s-settings-dropdown__trigger-icon"],[16,"aria-hidden",true]],[["@type","@size","@name"],["system","small","overflow-web-ios"]],null],[1,"\\n "]],[]]]]],[1,"\\n\\n "],[8,[30,1,["dropdown-content"]],[[24,0,"props-s-settings-dropdown__content"]],[["@occlusionCulling","@arrowDir"],[false,"right"]],[["default"],[[[[1,"\\n\\n"],[42,[28,[31,1],[[28,[31,1],[[30,0,["settingOptions"]]],null]],null],null,[[[1," "],[8,[32,3],[[24,0,"props-s-settings-dropdown__item pv2 ph4 full-width"]],[["@itemSelected"],[[28,[32,4],[[30,1,["invokeAndClose"]],[28,[32,4],[[30,4],[30,2]],null]],null]]],[["default"],[[[[1,"\\n "],[10,"button"],[14,0,"props-s-settings-dropdown-item__button"],[14,4,"button"],[12],[1,"\\n "],[8,[32,2],[[24,0,"props-s-settings-dropdown-item__icon"]],[["@name","@type","@size"],["visibility-off","system","medium"]],null],[1,"\\n "],[10,0],[14,0,"props-s-settings-dropdown-item__headline"],[12],[1,"\\n "],[8,[32,5],null,[["@tvm"],[[30,2,["muteOption","title"]]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "]],[]]]]],[1,"\\n"]],[2,3]],null],[1," "]],[]]]]],[1,"\\n "]],[1]]]]],[1,"\\n "]],["dropdown","opt","index","@handleSettingClick"],false,["each","-track-array"]]',moduleName:"props-shared/components/props-settings-dropdown.gjs",scope:()=>[s.default,u.default,p.default,c.default,g.fn,d.default],isStrictMode:!0}),(f=class extends l.default{constructor(){super(...arguments);(0,t.default)(this,"isDropdownOpen",b,this)}get settingOptions(){return this.args.settingOptions.option}onVisibilityChange(e){e&&this.args.handleOpenSettingsDropdownTracking() this.isDropdownOpen=e}},b=(0,n.default)(f.prototype,"isDropdownOpen",[m.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),(0,n.default)(f.prototype,"onVisibilityChange",[h.action],Object.getOwnPropertyDescriptor(f.prototype,"onVisibilityChange"),f.prototype),f))})) define("props-shared/services/nurture-tracking",["exports","@babel/runtime/helpers/esm/defineProperty","@ember/service"],(function(e,t,i){"use strict" Object.defineProperty(e,"__esModule",{value:!0}) e.default=void 0 class n extends i.default{constructor(){super(...arguments);(0,t.default)(this,"currentControlName","nav_mynetwork")}setCurrentControlName(e){this.currentControlName=e}resetCurrentControlName(){this.setCurrentControlName("nav_mynetwork")}}e.default=n})) define("props-shared/template-registry",[],(function(){})) define("props-shared/utils/badge",["exports"],(function(e){"use strict" Object.defineProperty(e,"__esModule",{value:!0}) e.getNurtureCounts=function(e){return{nurtureBadgeCount:e.getBadgeCount("nurture"),nurtureBadgeCountToDisplay:0}}})) define("props-shared/utils/cards",["exports"],(function(e){"use strict" Object.defineProperty(e,"__esModule",{value:!0}) e.addCardsAsSectionsToList=function(e,t){let i=e.length?e.pop():[] const n=e t.forEach((e=>{const t=e.propsHomeCard if(t&&t.propsHomeSectionHeader&&i.length){n.push(i) i=[e]}else i.push(e)})) n.push(i) return n} e.addCardsToListWithPastUpdatesSection=function(e,t){var i,n const r=[...e] let o=!e.length||!(null!==(i=e[e.length-1].propsHomeCard)&&void 0!==i&&null!==(n=i.propCard)&&void 0!==n&&n.isSeen) t.forEach((e=>{var t const i=e.propsHomeCard if(i){if(o&&null!==(t=i.propCard)&&void 0!==t&&t.isSeen){r.push({isPastUpdatesHeader:!0,shouldOverrideListItemDivider:!0}) o=!1}r.push(e)}})) return r} e.getGroupedCardsAsNewAndPastSections=function(e){const t=[] let i=0 for(;i4&&void 0!==arguments[4]&&arguments[4] if(!e.length){if(i&&"all"===n&&t.length){e.push({isGameEntryPointsSection:!0,shouldOverrideListItemDivider:!0,gameEntryPoints:t}) return[...e]}return[]}if(e.findIndex((e=>e.isGameEntryPointsSection))>=0)return e let o const a=e.findIndex((e=>e.isPastUpdatesHeader)) if(r){const t=e.length>2?2:e.length o=a<0?t:t+1}else o=a<0?0:a e.splice(o,0,{isGameEntryPointsSection:!0,shouldOverrideListItemDivider:!0,gameEntryPoints:t}) return[...e]}})) define("props-shared/utils/constants",["exports"],(function(e){"use strict" Object.defineProperty(e,"__esModule",{value:!0}) e.SOCIAL_HIRING_MULTI_SEND_URL=e.SHARE_URL=e.PROPS_ORIGINS=e.NURTURE_TAB_ROUTES=e.NURTURE_SESSION_STORAGE_KEY=e.NURTURE_MARK_ITEMS_AS_SEEN=e.NURTURE_JET_TAGS=e.NURTURE_FEED_MODULE_KEY=e.NURTURE_BADGE_COUNT_LIMIT=e.NOTIFY_MESSAGE_SENT_ACTION=e.DEFAULT_CARD_COUNT=e.CONTROL_NAMES=e.AGGREGATED_LANDING_URL=e.ACTION_CATEGORIES=void 0 e.CONTROL_NAMES=Object.freeze({COMMENT:"comment",EMPTY_STATE_CTA_CLICK:"empty_cta_click",MESSAGE:"message",MUTE_SETTING:"mute",NURTURE_CLICK_ON_CARD:"nurture_click_on_card",PROFILE_VIEW:"view_profile",OPEN_SETTINGS:"open_settings",SHARE_JOB:"share_job",VIEW_COMPANY:"view_company",VIEW_GROUPED_CARDS:"view_grouped_cards",VIEW_JOB:"view_job",VIEW_POST:"view_post"}),e.ACTION_CATEGORIES=Object.freeze({MESSAGE:"MESSAGE",MUTE:"MUTE",OPEN_SETTING:"OPEN_SETTING",SHARE:"SHARE",VIEW:"VIEW"}),e.DEFAULT_CARD_COUNT=10,e.PROPS_ORIGINS=Object.freeze({NURTURE:"my_network_nurture",PROPS_HOME:"props_home"}),e.NOTIFY_MESSAGE_SENT_ACTION="/voyager/api/voyagerPropsDashPropsHomeCards?action=notifyMessageSent",e.NURTURE_FEED_MODULE_KEY="nurture:desktop",e.NURTURE_JET_TAGS=Object.freeze({AGGREGATED_SOCIAL_HIRING:"aggregated-social-hiring"}),e.AGGREGATED_LANDING_URL="/mynetwork/catch-up/aggregate-landing",e.SHARE_URL="/share",e.SOCIAL_HIRING_MULTI_SEND_URL="/messaging/multisend",e.NURTURE_TAB_ROUTES=Object.freeze({"catch-up":"mynetwork.nurture.catch-up.index.index",grow:"mynetwork.nurture.grow.index"}),e.NURTURE_SESSION_STORAGE_KEY=Object.freeze({BASE:"nurture-session-key",LAST_SUBTAB_VISITED:"last-subtab-visited"}),e.NURTURE_MARK_ITEMS_AS_SEEN="/voyager/api/voyagerPropsDashPropsHomeCards?action=markAllItemsAsSeenByViewerAndTypes",e.NURTURE_BADGE_COUNT_LIMIT=1})) define("props-shared/utils/pem-tracking",["exports","@linkedin/ember-pem/utils/degradation-tracking-metadata"],(function(e,t){"use strict" Object.defineProperty(e,"__esModule",{value:!0}) e.DEGRADATION_TRACKING_METADATA=void 0 const i="Voyager - Props - Nurture" e.DEGRADATION_TRACKING_METADATA=Object.freeze({NURTURE_CARDS_FETCH_INITIAL:new t.default("nurture-cards","failed-to-fetch-initial-cards",{productName:i}),NURTURE_CARDS_FETCH_MORE:new t.default("nurture-cards","failed-to-fetch-more-cards",{productName:i}),NURTURE_GROUPED_CARDS_FETCH_INITIAL:new t.default("nurture-grouped-cards","failed-to-fetch-initial-cards",{productName:i}),NURTURE_ACTIONS_SEND_MESSAGE:new t.default("nurture-actions","failed-to-send-message",{productName:i}),NURTURE_ACTIONS_MARK_SEEN:new t.default("nurture-actions","failed-to-mark-seen",{productName:i}),NURTURE_SETTINGS_UNFOLLOW:new t.default("nurture-settings","failed-to-unfollow",{productName:i})})})) define("props-shared/utils/props-settings-handler",["exports","@babel/runtime/helpers/esm/classPrivateMethodGet","@ember/debug","props-shared/components/props-card","props-shared/utils/pem-tracking"],(function(e,t,i,n,r){"use strict" Object.defineProperty(e,"__esModule",{value:!0}) e.default=void 0 var o=new WeakSet,a=new WeakSet e.default=class{constructor(e,t,i,n){a.add(this) o.add(this) this.i18n=e this.pemTracking=t this.persistentToastManager=i this.storeShim=n}handleMuteNotification(e){var i const n=null===(i=e.muteOption)||void 0===i?void 0:i.target,c=`/voyager/api/notifications/dash/edgesetting/${n}`,d=this.storeShim.adapterFor("-ember-m3").ajax(c,"POST",{data:JSON.stringify({patch:{$set:{selectedOptionType:"NONE"}}})}) return this.pemTracking.trackFeatureDegradations(c,[n],[r.DEGRADATION_TRACKING_METADATA.NURTURE_SETTINGS_UNFOLLOW],d).then((()=>(0,t.default)(this,o,l).call(this,e))).catch((e=>{(0,t.default)(this,a,s).call(this) throw e}))}} function l(e){var t const i=null===(t=e.muteOption)||void 0===t?void 0:t.successToastText.text this.persistentToastManager.success({message:i})}function s(){const e=this.i18n.lookupTranslation(n.default,"setting_error_message")() this.persistentToastManager.error({message:e})}})) define("props-shared/utils/requests",["exports","restli-utils","props-shared/utils/cards","props-shared/utils/constants","graphql-queries/queries/props-home/multi-setting-prompt-by-setting-entity.graphql","graphql-queries/queries/props-home/props-home-cards.graphql","graphql-queries/queries/props-home/props-home-cards-by-grouped-cards.graphql","@ember/destroyable","@ember/object","play-shared/utils/pem-tracking","play-shared/utils/constants"],(function(e,t,i,n,r,o,a,l,s,c,d){"use strict" Object.defineProperty(e,"__esModule",{value:!0}) e.buildPropsHomeQuery=u e.getInitialPropsModel=function(e,t){let{filterVanityName:r,highlightedPropUrns:a,highlightedUrns:p,origin:m,adapterOptions:g,includePastUpdatesHeader:h=!0,includeGameEntrypoints:f=!1,isUnbundledSettings:b=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{} return e.executeQuery(o.default,u({filterVanityName:r,highlightedPropUrns:a,highlightedUrns:p,origin:m}),{reload:!0,adapterOptions:g}).then((e=>{const t=e.data.propsDashPropsHomeCardsByHome,{metadata:r,elements:o}=t,{emptyStateCard:l,filters:s,nextStart:c,lastFetchedAt:d,legoTrackingToken:u}=r,g=s.find((e=>e.selected)) let f,b if(m===n.PROPS_ORIGINS.NURTURE)b=h?(0,i.addCardsToListWithPastUpdatesSection)([],o):o else{const e=(0,i.addCardsAsSectionsToList)([],o);(a||p)&&e.length>1&&(f=e.shift()) b=e[0]}return{cards:b,currentFilter:g,emptyStateCard:l,filters:s,highlightedPropUrns:a,highlightedUrns:p,highlightedPropCards:f,nextStart:c,lastFetchedAt:d,legoTrackingToken:u}})).then((e=>{f&&m===n.PROPS_ORIGINS.NURTURE&&t.getGameEntryPointsPromise(d.GAME_ENTRY_POINT_TYPES.MY_NETWORK,c.DEGRADATION_METADATA.CATCH_UP_GAMES_ENTRY_POINT_FETCH).then((t=>{var n,r const o=(null==t||null===(n=t.data)||void 0===n||null===(r=n.identityDashGameEntryPointsByTypes)||void 0===r?void 0:r.elements)||[],a=(0,i.insertGameEntryPointSection)(e.cards,o,b,e.currentFilter.vanityName,!0);(0,s.set)(e,"cards",a)})).catch((e=>{if((0,l.isDestroying)(this))throw e throw e})) return e}))} e.getMultiSettingPromptBySettingsEntityUrns=function(e,t){return e.executeQuery(r.default,t,{reload:!0}).then((e=>{var t const i=null==e||null===(t=e.data)||void 0===t?void 0:t.notificationsDashMultiSettingPromptBySettingEntity return i?i.elements[0]:null}))} e.getPropsCardsByGroupedByUrn=function(e,t){let{groupByUrn:n,contentType:r,adapterOptions:o={}}=t return e.executeQuery(a.default,{groupByUrn:n,contentType:r},{reload:!0,adapterOptions:o}).then((e=>{const t=e.data.propsDashPropsHomeCardsByGroupedCards,{metadata:n,elements:r}=t,{emptyStateCard:o,containerCard:a}=n return{cards:(0,i.getGroupedCardsAsNewAndPastSections)(r),emptyStateCard:o,containerCard:a}}))} function u(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{} const{count:i,filterVanityName:r,highlightedPropUrns:o,highlightedUrns:a,start:l,origin:s}=e let c,d o&&(c=t.decoder.decode(o)) a&&(d=t.decoder.decode(a)) return{highlightedPropUrns:c,highlightedUrns:d,start:l||0,typeName:r,count:i||n.DEFAULT_CARD_COUNT,origin:s}}})) define("props-shared/utils/tracking",["exports","props-shared/utils/constants"],(function(e,t){"use strict" Object.defineProperty(e,"__esModule",{value:!0}) e.buildPropItemActionEvent=function(e,t,n,r){var o return{name:"PropItemActionEvent",body:{controlUrn:t,actionCategory:n,activityUrn:(null==e||null===(o=e.secondaryObjectUrns)||void 0===o?void 0:o[0])??void 0,filterName:r??"",isBlueCarpeted:null==e?void 0:e.isBadged,isPastUpdate:null==e?void 0:e.isSeen,networkHighlightTrackingId:(null==e?void 0:e.networkHighlightTrackingId)??void 0,profileUrn:(null==e?void 0:e.profileUrn)??void 0,prop:i(e),scoreTrackingId:(null==e?void 0:e.scoreTrackingId)??void 0,scoreCycleTrackingId:(null==e?void 0:e.scoreCycleTrackingId)??void 0}}} e.buildPropItemImpressionCustomTrackingInfo=function(e,t,n,r){var o const{boundingClientRect:a,duration:l,visibleTime:s}=n,c={height:(null==a?void 0:a.height)||0,width:(null==a?void 0:a.width)||0} return{name:"PropItemImpressionEvent",body:{props:[{prop:i(e),duration:l,listPosition:{index:t},size:c,visibleTime:s??0}],activityUrn:(null==e||null===(o=e.secondaryObjectUrns)||void 0===o?void 0:o[0])??void 0,filterName:r??"",scoreTrackingId:(null==e?void 0:e.scoreTrackingId)??void 0,scoreCycleTrackingId:(null==e?void 0:e.scoreCycleTrackingId)??void 0,isBlueCarpeted:null==e?void 0:e.isBadged,isPastUpdate:null==e?void 0:e.isSeen,profileUrn:(null==e?void 0:e.profileUrn)??void 0,networkHighlightTrackingId:(null==e?void 0:e.networkHighlightTrackingId)??void 0}}} e.fireMyNetworkSubtabBadgeImpressionEvent=function(e,t,i){e.fireTrackingPayload("MyNetworkSubtabBadgeImpressionEvent",{growBadgeCount:t,catchUpBadgeCount:i})} e.getControlNameFromActionTarget=function(e){let i=t.CONTROL_NAMES.NURTURE_CLICK_ON_CARD e.startsWith(t.AGGREGATED_LANDING_URL)?i=t.CONTROL_NAMES.VIEW_GROUPED_CARDS:e.startsWith("/in/")?i=t.CONTROL_NAMES.PROFILE_VIEW:e.startsWith("/share")?i=t.CONTROL_NAMES.SHARE_JOB:e.startsWith("/jobs/")?i=t.CONTROL_NAMES.VIEW_JOB:e.startsWith("/company/")&&(i=t.CONTROL_NAMES.VIEW_COMPANY) return i} function i(e){return{objectUrn:(null==e?void 0:e.objectUrn)??"",trackingId:(null==e?void 0:e.trackingId)??""}}})) define("s-address-book-import/components/abi-form",["exports","@babel/runtime/helpers/esm/initializerDefineProperty","@babel/runtime/helpers/esm/defineProperty","@babel/runtime/helpers/esm/applyDecoratedDescriptor","@babel/runtime/helpers/esm/initializerWarningHelper","@ember/component","@ember/template-factory","rsvp","@ember/debug","@ember/utils","@ember/object","@ember/service","@glimmer/component","@ember/runloop","global-utils/utils/is-browser","ember-cli-pemberly-tracking/utils/tracking","abi-shared/utils/constants-base","ember-lifeline","@glimmer/tracking","tracked-toolbox","@ember/object/internals"],(function(e,t,i,n,r,o,a,l,s,c,d,u,p,m,g,h,f,b,_,y,v){"use strict" Object.defineProperty(e,"__esModule",{value:!0}) e.default=void 0 var T,E,I,O,S,A,k,C,N,w,P,R,M,D,U,x,L,j,G,F,z,V,B,H,q,W,Y,K,$,Q,Z,J,X const ee=(0,a.createTemplateFactory)({id:"ugTsAmKI",block:'[[[11,"section"],[16,0,[29,[[30,1]," ",[30,2]," ",[52,[30,0,["showloader"]],"abi-form--is-busy"]]]],[17,3],[12],[1,"\\n "],[18,4,[[28,[37,2],null,[["error","isIweMode","showLoader","startButton","passwordInput","emailLabel","emailInput"],[[30,0,["error"]],[30,0,["isIweMode"]],[30,0,["showLoader"]],[50,"s-address-book-import@start-button",0,null,[["click","disabled"],[[30,0,["startAbi"]],[30,0,["disableSubmit"]]]]],[50,"s-address-book-import@abi-input",0,null,[["name","type","elementId","value","input","class","isHidden"],["password","password",[30,0,["passInputId"]],[30,0,["password"]],[30,0,["onPasswordChanged"]],[30,0,["passInputClass"]],[52,[30,0,["isPasswordFieldRequired"]],false,true]]]],[50,"s-address-book-import@abi-label",0,null,[["for"],[[30,0,["emailInputId"]]]]],[50,"s-address-book-import@abi-input",0,null,[["name","type","elementId","value","class","isError","autofocus","input"],["email","email",[30,0,["emailInputId"]],[30,0,["email"]],[30,0,["emailInputClass"]],[30,0,["error"]],true,[30,0,["onEmailChanged"]]]]]]]]]],[1,"\\n"],[13]],["@classNames","@class","&attrs","&default"],false,["if","yield","hash","component"]]',moduleName:"s-address-book-import/components/abi-form.hbs",isStrictMode:!1}),te={hotmail:{width:905,height:580},aol:{width:520,height:315},"live.com":{width:905,height:580},"msn.com":{width:905,height:580},default:{width:790,height:650},minimum:{width:150,height:100}},ie="components/s-address-book-import@abi-form" let ne=e.default=(T=(0,u.inject)("abi-shared@abi-tracking"),E=(0,u.inject)("i18n"),I=(0,u.inject)("tracking"),O=(0,u.inject)("global-services@window"),S=(0,u.inject)("date"),A=(0,y.localCopy)("args.isByChiclet",!1),k=(0,y.localCopy)("args.prefillEmail.emailAddress"),C=(0,y.localCopy)("args.inviteList"),N=(0,y.localCopy)("args.transactionId",(0,h.generateTrackingId)()),w=class extends p.default{get showLoader(){return this.isWorking||this.args.disableForm}get disableSubmit(){return!this.isIweMode&&this.showLoader}get emailInputId(){return`s-abi-email-${(0,v.guidFor)(this)}`}get passInputId(){return`s-abi-password-${(0,v.guidFor)(this)}`}get pollerLabel(){return`popup-poller#poller_${this.dateService.now()}`}get abiInstance(){return this.args.abiInstance}get emailProvider(){const e=(0,d.get)(this.args,"prefillEmail.emailProvider.emailProviderType") return f.EMAIL_PROVIDERS[e]?"GOOGLE"===e?"GMAIL":e:"OTHERS"}get errorMsgTitle(){return this.i18n.lookupTranslation(ie,f.ABI_ERRORS_TO_MSGS.ERROR_TITLE)()}get successMsgTitle(){return this.i18n.lookupTranslation(ie,f.ABI_ERRORS_TO_MSGS.SUCCESS_TITLE)()}constructor(){super(...arguments);(0,t.default)(this,"abiTracking",P,this);(0,t.default)(this,"i18n",R,this);(0,t.default)(this,"tracking",M,this);(0,t.default)(this,"windowService",D,this);(0,t.default)(this,"dateService",U,this);(0,t.default)(this,"isImportStarted",x,this);(0,t.default)(this,"isImportInProgress",L,this);(0,t.default)(this,"isContinue",j,this);(0,t.default)(this,"passwordRequired",G,this);(0,t.default)(this,"abiSubmitPressed",F,this);(0,i.default)(this,"emailInputClass","abi-form-email-input");(0,i.default)(this,"passInputClass","abi-form-pass-input");(0,t.default)(this,"isWorking",z,this);(0,t.default)(this,"isResolving",V,this);(0,t.default)(this,"isByChiclet",B,this);(0,t.default)(this,"isPasswordFieldRequired",H,this);(0,t.default)(this,"emailResolved",q,this);(0,t.default)(this,"popUp",W,this);(0,t.default)(this,"popupPoller",Y,this);(0,t.default)(this,"error",K,this);(0,t.default)(this,"password",$,this);(0,t.default)(this,"email",Q,this);(0,t.default)(this,"inviteList",Z,this);(0,t.default)(this,"isIweMode",J,this);(0,t.default)(this,"abookImportTransactionId",X,this) this.abiInstance&&this.initializeAbiJs(this.abiInstance);(0,c.isPresent)(this.email)&&this._resolutionHandler() this.args.emailPassed&&this._startAbi()}onImpression(){const{tracking:e,abookImportTransactionId:t}=this e.fireTrackingPayload(f.METRICS_KEYS.EVENTS.IMPORT_IMPRESSION_EVENT,{source:e.getCurrentPageKey(),abookImportTransactionId:t,autoFilledEmail:this.args.prefillEmail&&"true",autoSelectedEmailProvider:this.emailProvider,orderOfEmailProviderss:[],socialProofCount:this.socialProofCount||0}) const{abiEntryPoint:i}=this.args i&&e.fireTrackingPayload(f.METRICS_KEYS.EVENTS.IMPORT_ENTRY_IMPRESSION_EVENT,{abiEntryPoint:i,abookImportTransactionId:t})}initializeAbiJs(e){const t=(0,d.get)(this,"abiInstance.CONSTANTS"),i=this.i18n e.start() e.on(t.EMAIL_DOMAIN_RESOLVE.EVENT_TYPE.RESOLUTION_COMPLETE,(()=>{this.isResolving&&this._resolutionCompleteHandler()})) e.on(t.POLL_IMPORT_STATUS.EVENT_TYPE.IMPORT_STARTED,(()=>{this.isWorking=!0 this.isImportStarted=!0 this._fireStatusTracking("IN_PROGRESS")})) e.on(t.POLL_IMPORT_STATUS.EVENT_TYPE.IMPORT_IN_PROGRESS,(()=>{this.isWorking=!0 this.isImportStarted=!1 this.isImportInProgress=!0 this._fireStatusTracking("IN_PROGRESS")})) e.on(t.POLL_IMPORT_STATUS.EVENT_TYPE.IMPORT_SUCCESS,(e=>{const t=this._closePopup() this.isWorking=!0 this.isImportStarted=!1 this._fireStatusTracking("SUCCESS") t.then((()=>this.args.onImportSuccess(e,this.abookImportTransactionId)))})) e.on(t.EMAIL_DOMAIN_RESOLVE.EVENT_TYPE.PASSWORD_REQUIRED,(()=>{this._passwordRequiredHandler()})) e.on(t.IMPORT_CONTACTS.EVENT_TYPE.OPEN_POPUP,(()=>this._openPopup())) e.on(t.OAUTH.EVENT_TYPE.UPDATE_POPUP,(e=>this._updatePopup(e.eventData.url,e.eventData.provider))) e.on(t.NETWORK_ERROR,(()=>this._handleServerError("ERROR_OTHER"))) e.on(t.POLL_IMPORT_STATUS.EVENT_TYPE.IMPORT_ERROR_OTHER,(()=>this._handleServerError("ERROR_OTHER"))) e.on(t.POLL_IMPORT_STATUS.EVENT_TYPE.EXCEEDED_MAX_RETRIES,(()=>{this._closePopup() this._disableLoadingModal() const e=i.lookupTranslation(ie,f.ABI_ERRORS_TO_MSGS.TOO_MANY_REQUESTS)() this._showNotificationError(e)})) e.on(t.EMAIL_DOMAIN_RESOLVE.EVENT_TYPE.UNSUPPORTED_DOMAIN,(()=>{this._closePopup() this._disableLoadingModal() const e=i.lookupTranslation(ie,f.ABI_ERRORS_TO_MSGS.UNSUPPORTED_DOMAIN)() this._showNotificationError(e)})) e.on(t.INPUT_EMAIL.EVENT_TYPE.INVALID_EMAIL,(()=>{this._closePopup() this._disableLoadingModal() this.error=i.lookupTranslation(ie,f.ABI_ERRORS_TO_MSGS.INVALID_EMAIL)() this.isResolving=!1 this.emailResolved=!1})) e.on(t.POLL_IMPORT_STATUS.EVENT_TYPE.ZERO_CONTACTS_TO_IMPORT,(()=>{this._closePopup() this._disableLoadingModal() const e=i.lookupTranslation(ie,f.ABI_ERRORS_TO_MSGS.ZERO_CONTACTS_TO_IMPORT)() this._showNotificationError(e) this._fireStatusTracking("ERROR_ZERO_CONTACTS")})) e.on(t.POLL_IMPORT_STATUS.EVENT_TYPE.INVALID_CREDENTIALS,(()=>{this._disableLoadingModal() const e=i.lookupTranslation(ie,f.ABI_ERRORS_TO_MSGS.OAUTH_REQUIRED)() this._showNotificationError(e)})) e.on(t.POLL_IMPORT_STATUS.EVENT_TYPE.IMPORT_ERROR_BAD_LOGIN,(()=>this._fireStatusTracking("ERROR_BAD_LOGIN"))) e.on(t.OAUTH.EVENT_TYPE.CALLBACK,(()=>this._fireOAuthCallbackTracking()))}willDestroy(){super.willDestroy(...arguments) const e=this.abiInstance if(e){e.removeAllListeners() this.popUp&&this._closePopup()}}startAuthFlow(){const e=this.password??"",{isPasswordFieldRequired:t,abookImportTransactionId:i}=this if(!t||t&&""!==e){this.isWorking=!0 this.tracking.fireInteractionEvent(f.METRICS_KEYS.EVENTS.CONTINUE,"SHORT_PRESS") this.abiTracking.fireImportSubmitEvent(i) const n={data:{abookImportTransactionId:i}} t&&(n.data.password=e) this.abiInstance.step("fetchFormSubmit",n)}}clearErrors(){this.error=!1}startAbi(){const{password:e,isPasswordFieldRequired:t}=this if(!t||e){this._openPopup() this.abiSubmitPressed=!this.abiSubmitPressed this._startAbi()}}onPasswordChanged(e){this.password=e}onEmailChanged(e){var t,i this.email=null==e?void 0:e.trim() this.clearErrors() null===(t=(i=this.args).onEmailChanged)||void 0===t||t.call(i,e)}_startAbi(){this.isContinue=!0 this._resolutionHandler()}_disableLoadingModal(){this.isWorking=!1 this.isContinue=!1}_resolutionCompleteHandler(){this.emailResolved=!0 this.isPasswordFieldRequired=!1 this.isResolving=!1;(0,m.schedule)("afterRender",(()=>{if(this.isContinue){this.startAuthFlow() this.isContinue=!1}}))}_passwordRequiredHandler(){if(this.isByChiclet)this.isByChiclet=!this.isByChiclet else{this.isPasswordFieldRequired=!0 this.passwordRequired=!0 this.emailResolved=!0 this.isResolving=!1}}_getPopupSize(e){return te[e]||te.default}_openPopup(){if(g.default&&!this.popUp){const{width:e,height:t}=this._getPopupSize("minimum"),i=this.windowService.open("","oauth-popup",`width=${e},height=${t},toolbar=0,location=0,status=0,scrollbars=no`) if(i){this.popUp=i i.focus() this.popupPoller=!0;(0,b.pollTask)(this,"_poller",this.pollerLabel)}else this._showNotificationError(this.i18n.lookupTranslation(ie,f.ABI_ERRORS_TO_MSGS.POPUP_BLOCKED)())}}_poller(e){if(this.popUp&&this.popUp.closed&&this.popupPoller){this._closePopup() this._disableLoadingModal() this.abiInstance.step("stateReset")}else this.popupPoller&&(0,b.runTask)(this,e,1e3)}_updatePopup(e,t){const i=this.popUp,{abookImportTransactionId:n}=this if(i){i.location=jSecure.sanitizeUrl(e) const{width:r,height:o}=this._getPopupSize(t) i.resizeTo(r,o) this.tracking.fireTrackingPayload(f.METRICS_KEYS.EVENTS.IMPORT_OAUTH_REDIRECT_EVENT,{abookImportTransactionId:n})}else{this.abiInstance.step("stateReset") this._disableLoadingModal()}}_handleServerError(e){this._closePopup() this._disableLoadingModal() this.isResolving=!1 this._showNotificationError() this._fireStatusTracking(e)}_closePopup(){const e=this.popUp if(!g.default||!e)return(0,l.resolve)() e.focus() this.popupPoller=null this.popUp=null if(this.isDestroying){e.close() return(0,l.resolve)()}return new l.Promise((t=>{(0,b.runTask)(this,(()=>{if(e){e.close() t()}}),5)}))}_getDomainFromEmail(e){return e.replace(/.*@/,"")}_handleValidEmail(e){this.abiSubmitPressed&&this._isImportingWithPrefillEmail(e)&&(this.abiSubmitPressed=!this.abiSubmitPressed) this.abiInstance.step("emailInputChange",{data:e})}_isImportingWithPrefillEmail(e){const t=(0,d.get)(this.args,"prefillEmail.emailAddress") return!t||t===e}_resolutionHandler(){this.isResolving=!0 const{email:e}=this if(f.EMAIL_PATTERN.test(e))this._handleValidEmail(e) else{this.isResolving=!1 this.emailResolved=!1 this.error=this.i18n.lookupTranslation(ie,f.ABI_ERRORS_TO_MSGS.INVALID_EMAIL)()}}_resetIweMode(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0] this.isIweMode=!1 this.isPasswordFieldRequired=e;(0,m.schedule)("afterRender",(()=>{this.password&&(this.password="")}))}_showNotificationError(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.i18n.lookupTranslation(ie,f.ABI_ERRORS_TO_MSGS.INTERNAL_SERVER_ERROR)(),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.errorMsgTitle this.args.onError&&(0,b.debounceTask)(this,"_debouncedError",e,t,200)}_debouncedError(e,t){this.args.onError(e,t)}_fireStatusTracking(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ERROR_OTHER" const{abookImportTransactionId:t}=this this.tracking.fireTrackingPayload(f.METRICS_KEYS.EVENTS.IMPORT_TASK_STATUS_EVENT,{abookImportTransactionId:t,status:e})}_fireOAuthCallbackTracking(){const{abookImportTransactionId:e}=this this.tracking.fireTrackingPayload(f.METRICS_KEYS.EVENTS.IMPORT_OAUTH_CALLBACK_EVENT,{abookImportTransactionId:e})}},P=(0,n.default)(w.prototype,"abiTracking",[T],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),R=(0,n.default)(w.prototype,"i18n",[E],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),M=(0,n.default)(w.prototype,"tracking",[I],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),D=(0,n.default)(w.prototype,"windowService",[O],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),U=(0,n.default)(w.prototype,"dateService",[S],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),x=(0,n.default)(w.prototype,"isImportStarted",[_.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),L=(0,n.default)(w.prototype,"isImportInProgress",[_.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),j=(0,n.default)(w.prototype,"isContinue",[_.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),G=(0,n.default)(w.prototype,"passwordRequired",[_.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),F=(0,n.default)(w.prototype,"abiSubmitPressed",[_.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),z=(0,n.default)(w.prototype,"isWorking",[_.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),V=(0,n.default)(w.prototype,"isResolving",[_.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),B=(0,n.default)(w.prototype,"isByChiclet",[A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),H=(0,n.default)(w.prototype,"isPasswordFieldRequired",[_.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),q=(0,n.default)(w.prototype,"emailResolved",[_.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),W=(0,n.default)(w.prototype,"popUp",[_.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Y=(0,n.default)(w.prototype,"popupPoller",[_.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),K=(0,n.default)(w.prototype,"error",[_.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),$=(0,n.default)(w.prototype,"password",[_.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Q=(0,n.default)(w.prototype,"email",[k],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Z=(0,n.default)(w.prototype,"inviteList",[C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),J=(0,n.default)(w.prototype,"isIweMode",[_.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),X=(0,n.default)(w.prototype,"abookImportTransactionId",[N],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),(0,n.default)(w.prototype,"clearErrors",[d.action],Object.getOwnPropertyDescriptor(w.prototype,"clearErrors"),w.prototype),(0,n.default)(w.prototype,"startAbi",[d.action],Object.getOwnPropertyDescriptor(w.prototype,"startAbi"),w.prototype),(0,n.default)(w.prototype,"onPasswordChanged",[d.action],Object.getOwnPropertyDescriptor(w.prototype,"onPasswordChanged"),w.prototype),(0,n.default)(w.prototype,"onEmailChanged",[d.action],Object.getOwnPropertyDescriptor(w.prototype,"onEmailChanged"),w.prototype),w);(0,o.setComponentTemplate)(ee,ne)})) define("s-address-book-import/components/abi-input",["exports","@babel/runtime/helpers/esm/applyDecoratedDescriptor","@ember/component","@ember/template-factory","@glimmer/component","@ember/object","global-utils/utils/keyboard-utils"],(function(e,t,i,n,r,o,a){"use strict" Object.defineProperty(e,"__esModule",{value:!0}) e.default=void 0 var l const s=(0,n.createTemplateFactory)({id:"UKlsnj5E",block:'[[[11,"input"],[16,0,[29,[[30,1],"\\n ",[30,2],[52,[30,3]," hidden"],[52,[30,4]," error"]]]],[16,3,[30,5]],[16,4,[30,6]],[16,1,[30,7]],[16,2,[30,8]],[16,"autofocus",[30,9]],[16,"placeholder",[30,10]],[17,11],[4,[38,1],["keyup",[30,0,["keyUp"]]],null],[4,[38,1],["change",[28,[37,2],["target.value",[30,12]],null]],null],[4,[38,3],null,[["when"],[[30,9]]]],[12],[13]],["@classNames","@class","@isHidden","@isError","@name","@type","@elementId","@value","@autofocus","@placeholder","&attrs","@input"],false,["if","on","global-helpers@pick","global-modifiers@focus"]]',moduleName:"s-address-book-import/components/abi-input.hbs",isStrictMode:!1}) let c=e.default=(l=class extends r.default{keyUp(e){if((0,a.isEnterKey)(e)){var t,i null===(t=(i=this.args).enterKeyPressed)||void 0===t||t.call(i,e)}}},(0,t.default)(l.prototype,"keyUp",[o.action],Object.getOwnPropertyDescriptor(l.prototype,"keyUp"),l.prototype),l);(0,i.setComponentTemplate)(s,c)})) define("s-address-book-import/components/abi-label",["exports","@ember/component","@ember/template-factory","@ember/component/template-only"],(function(e,t,i,n){"use strict" Object.defineProperty(e,"__esModule",{value:!0}) e.default=void 0 const r=(0,i.createTemplateFactory)({id:"jSRZF0rA",block:'[[[11,"label"],[16,0,[29,[[30,1]]]],[16,"for",[30,2]],[17,3],[12],[18,4,null],[13]],["@classNames","@for","&attrs","&default"],false,["yield"]]',moduleName:"s-address-book-import/components/abi-label.hbs",isStrictMode:!1}) e.default=(0,t.setComponentTemplate)(r,(0,n.default)())})) define("s-address-book-import/components/start-button",["exports","@ember/component","@ember/template-factory","@ember/component/template-only"],(function(e,t,i,n){"use strict" Object.defineProperty(e,"__esModule",{value:!0}) e.default=void 0 const r=(0,i.createTemplateFactory)({id:"doHkoJq+",block:'[[[11,"button"],[24,4,"button"],[16,0,[29,["abi-form-start-abi ",[30,1]]]],[16,"disabled",[30,2]],[17,3],[4,[38,0],["click",[30,4]],null],[12],[18,5,null],[13]],["@classNames","@disabled","&attrs","@click","&default"],false,["on","yield"]]',moduleName:"s-address-book-import/components/start-button.hbs",isStrictMode:!1}) e.default=(0,t.setComponentTemplate)(r,(0,n.default)())})) define("se-address-book-import/components/abi-form",["exports","@babel/runtime/helpers/esm/initializerDefineProperty","@babel/runtime/helpers/esm/defineProperty","@babel/runtime/helpers/esm/applyDecoratedDescriptor","@babel/runtime/helpers/esm/initializerWarningHelper","@ember/template-factory","@ember/component","@ember/object","@glimmer/tracking","abi-shared/utils/constants-base","s-address-book-import/components/abi-form","global-utils/utils/is-browser","@ember/runloop","@ember/render-modifiers/modifiers/did-insert","@ember/render-modifiers/modifiers/did-update","global-modifiers/modifiers/focus","@ember/helper","s-address-book-import/components/start-button","abi-shared/components/password-input","s-address-book-import/components/abi-label","s-address-book-import/components/abi-input"],(function(e,t,i,n,r,o,a,l,s,c,d,u,p,m,g,h,f,b,_,y,v){"use strict" Object.defineProperty(e,"__esModule",{value:!0}) e.default=void 0 var T,E const{CHICLET_ATTRS:I,TRACK_OTHER_EMAIL:O}=c.default e.default=(0,a.setComponentTemplate)((0,o.createTemplateFactory)({id:"QT7bepJg",block:'[[[1,"\\n"],[1," "],[11,"section"],[16,0,[29,[[30,1],"\\n ",[30,2],"\\n ",[52,[30,0,["showloader"]],"abi-form--is-busy"]]]],[17,3],[4,[32,0],[[30,0,["initSetShouldSkipImport"]]],null],[4,[32,1],[[30,0,["updateProvider"]]],null],[4,[32,2],null,[["when"],[[30,0,["shouldFocusForm"]]]]],[12],[1,"\\n "],[18,4,[[28,[32,3],null,[["hidePasswordField","isWorking","error","isIweMode","showLoader","onStartABI","startButton","passwordInput","emailLabel","emailInput"],[[52,[30,0,["isPasswordFieldRequired"]],false,true],[30,0,["isWorking"]],[30,0,["error"]],[30,0,["isIweMode"]],[30,0,["showLoader"]],[30,0,["startAbi"]],[50,[32,4],0,null,[["click","disabled"],[[30,0,["startAbi"]],[30,0,["disableSubmit"]]]]],[50,[32,5],0,null,[["name","inputId","value","input","class","onEnterKeypress"],["password",[30,0,["passInputId"]],[30,0,["password"]],[30,0,["onPasswordChanged"]],[30,0,["passInputClass"]],[30,0,["startAbi"]]]]],[50,[32,6],0,null,[["for"],[[30,0,["emailInputId"]]]]],[50,[32,7],0,null,[["name","type","elementId","value","class","isError","autofocus","input","enterKeyPressed"],["email","email",[30,0,["emailInputId"]],[30,0,["email"]],[30,0,["emailInputClass"]],[30,0,["error"]],true,[30,0,["onEmailChanged"]],[30,0,["startAbi"]]]]]]]]]],[1,"\\n "],[13],[1,"\\n "]],["@classNames","@class","&attrs","&default"],false,["if","yield","component"]]',moduleName:"se-address-book-import/components/abi-form.gjs",scope:()=>[m.default,g.default,h.default,f.hash,b.default,_.default,y.default,v.default],isStrictMode:!0}),(T=class extends d.default{constructor(){super(...arguments);(0,t.default)(this,"shouldFocusForm",E,this)}authProvider(e){const t=(0,l.get)(e,"emailOrigin"),i=I[t],n=i&&i.trackingId,r=this.abiInstance if(n&&r){const e=t?`qalinkedindummy@${t.toString().toLowerCase()}.com`:"",{abookImportTransactionId:i}=this this.tracking.fireInteractionEvent(n) this.abiTracking.fireImportSubmitEvent(i) r.step("emailInputChange",{data:{emailAddress:e,isEmailDomainResolve:!1,isNonOAuth:!1}}) r.step("fetchFormSubmit")}}initSetShouldSkipImport(){this.args.isPromo&&(0,p.scheduleOnce)("afterRender",this,"_setShouldSkipImport")}updateProvider(){const{provider:e}=this.args e&&this._onProviderChanged(e)}_setShouldSkipImport(){this.heathrow.organicAbiShouldSkipImport().then((e=>{this.isDestroying||(this.shouldSkipImport=e)})).catch((e=>{this.isDestroying||(this.shouldSkipImport=!1) throw e}))}_onProviderChanged(e){this.send("clearErrors") "string"==typeof e?this._otherProviderSelected(e):this._providerSelected(e)}_setOtherEmailMode(e){this._resetIweMode(e) this.tracking.fireInteractionEvent(O) this.email="";(0,p.schedule)("afterRender",(()=>{if(u.default){const e=document.getElementById(this.emailInputId) e&&e.focus()}}))}_setEmailInviteMode(){this.tracking.fireInteractionEvent("invite_by_email") this.isIweMode=!0 this.isPasswordFieldRequired=!1 this.shouldFocusForm=!0}_providerSelected(e){this.isByChiclet=!this.isByChiclet const t=(0,l.get)(e,"emailProvider.emailProviderType"),i=(0,l.get)(e,"emailOrigin") if("GAAP"!==t)if("UNSUPPORTED"!==t||"QQ"!==i){this._resetIweMode() this.isWorking=!0 this.authProvider(e)}else this.tracking.fireInteractionEvent(I.QQ.trackingId) else this._setOtherEmailMode(!0)}_otherProviderSelected(e){switch(e){case"email":this._setEmailInviteMode() break case"upload":this._resetIweMode() break default:this._setOtherEmailMode()}}_resetIweMode(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0] this.isIweMode=!1 this.isPasswordFieldRequired=e;(0,p.schedule)("afterRender",(()=>{if(u.default){const e=document.querySelector(this.passInputId) e&&(e.value="")}}))}},E=(0,n.default)(T.prototype,"shouldFocusForm",[s.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),(0,n.default)(T.prototype,"initSetShouldSkipImport",[l.action],Object.getOwnPropertyDescriptor(T.prototype,"initSetShouldSkipImport"),T.prototype),(0,n.default)(T.prototype,"updateProvider",[l.action],Object.getOwnPropertyDescriptor(T.prototype,"updateProvider"),T.prototype),T))})) define("se-address-book-import/template-registry",[],(function(){})) !function(e){t=this,i=function(e){"use strict" function t(e,t){(null==t||t>e.length)&&(t=e.length) for(var i=0,n=Array(t);i1?i[1]:null} function h(e){return"undefined"==typeof atob&&"undefined"!=typeof Buffer?Buffer.from(e,"base64").toString("binary"):atob(e)}var f,b,_,y,v,T,E={ADVERTISING:"ADVERTISING",ANALYTICS_AND_RESEARCH:"ANALYTICS_AND_RESEARCH",FUNCTIONAL:"FUNCTIONAL"},I={GUEST:"GUEST",MEMBER:"MEMBER",ENTERPRISE_UNBOUND:"ENTERPRISE_UNBOUND"},O=0,S=1,A=2,k=o(o(o({},I.GUEST,"li_gc"),I.MEMBER,"li_mc"),I.ENTERPRISE_UNBOUND,"li_ec"),C=o(o(o({},I.GUEST,"mypreferences/g/guest-cookies"),I.MEMBER,"settings/member-cookies"),I.ENTERPRISE_UNBOUND,"mypreferences/e/enterprise-cookies"),N=Object.freeze(["dark","light"]),w=r((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null i(this,e) t=t||{} this.consentAvailable=!1 this.issuedAt=n this.userMode=r this.optedInConsentMap={} for(var a in E){t[a]=t[a]||O t[a]!==O&&(this.consentAvailable=!0) this.optedInConsentMap[a]=t[a]===S||t[a]===O&&o===S}})),P=(f=[E.ADVERTISING,E.ANALYTICS_AND_RESEARCH,E.FUNCTIONAL],b=[O,S,A,O],_=function(e){for(var t={},i=0;i>2*i&3] return t},y=function(e){var t=O e>=0&&e<=3&&(t=b[e]) return t},{parseConsentBody:function(e,t){var i=new RegExp(["^(\\d+)","(\\d+)","(\\d+)","((?:.|\\s)+)"].join(";")),n=e.match(i) if(!n)return{error:"Invalid consent body encoding",consent:new w} var r=_(parseInt(n[1],10)),o=new Date(1e3*parseInt(n[2],10)),a=y(parseInt(n[3],10)) return{error:null,consent:new w(r,o,t,a)}},parseConsentBodyEnterpriseUnbound:function(e,t,i){var n=function(e){try{var t=m.urnToObject(e) if(t&&t.enterpriseProfile&&t.enterpriseProfile.length>=2&&t.enterpriseProfile[0].enterpriseAccount)return{enterpriseAccountId:parseInt(t.enterpriseProfile[0].enterpriseAccount,10),enterpriseProfileId:parseInt(t.enterpriseProfile[1],10)}}catch(e){return null}return null}(t) if(!n)return{error:"Invalid enterprise profile urn provided",consent:new w} var r=n.enterpriseAccountId,o=n.enterpriseProfileId,l=new RegExp(["^((?:\\d+,\\d+,\\d+,\\d+,\\d+)(?:\\|(?:\\d+,\\d+,\\d+,\\d+,\\d+))*)","(\\d+)","(\\d+)","(?:(?:.|\\s)+)$"].join(";")),s=e.match(l) if(!s)return{error:"Invalid consent body encoding",consent:new w} var c=s[1].split("|").map((function(e){return e.split(",").map((function(e){return parseInt(e,10)}))})).filter((function(e){var t=a(e,4),n=t[1],l=t[2],s=t[3] return n===r&&l===o&&s===i}))[0] if(!c)return{error:null,consent:new w} var d=_(c[0]),u=new Date(1e3*parseInt(s[2],10)),p=y(parseInt(s[3],10)) return{error:null,consent:new w(d,u,I.ENTERPRISE_UNBOUND,p)}}}),R=new RegExp(["^(\\d+)","((?:.|\\s)+)"].join(";")),M=function(e){var t={} for(var i in E)t[i]=e return{error:null,consent:new w(t,null,null,e)}},D=function(){var e=document.domain.match(/^(?:|.*\.)([^\.]+\.[^\.]+)$/) return e?e[1]:"linkedin-ei.com"},U=function(e,t,i){var n=C[e],r=t.enterpriseProfileHash,o=t.enterpriseAppInstanceId,a=new URLSearchParams if(e===I.ENTERPRISE_UNBOUND){r&&a.append("p",r) o&&a.append("iid",o)}if("string"==typeof i){i=i.toLowerCase() N.includes(i)&&a.append("li_theme",i)}var l=Array.from(a).length?"?"+a.toString():"" return"https://www.".concat(D(),"/").concat(n).concat(l)},x=function(e,t,i,n){e&&e.length>1&&'"'==e.charAt(0)&&'"'==e.charAt(e.length-1)&&(e=e.substring(1,e.length-1)) var r=null try{r=h(e).match(R)}catch(e){}if(!r)return{error:"Invalid consent encoding",consent:new w} var o=parseInt(r[1],10),a=r[2] return 1===o?t===I.ENTERPRISE_UNBOUND?P.parseConsentBodyEnterpriseUnbound(a,i,n):P.parseConsentBody(a,t):{error:"Invalid encoded consent version ".concat(o),consent:new w}},L=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i.enterpriseProfileUrn,r=i.enterpriseAppInstanceId if("string"!=typeof t){if("undefined"==typeof document)return{error:"cookie string must be provided in SSR mode",consent:new w} t=document.cookie}if(n&&!r||!n&&r)return{error:"enterpriseProfileUrn and enterpriseAppInstanceId must both be provided if at least one is provided",consent:new w} if(!(e!==I.ENTERPRISE_UNBOUND||n&&r))return{error:"enterpriseProfileUrn and enterpriseAppInstanceId are required for unbound userMode",consent:new w} if(!e){var o=g(k[I.ENTERPRISE_UNBOUND],t) if(o&&n&&r){var a=x(o,I.ENTERPRISE_UNBOUND,n,r) if(a.consent.userMode===I.ENTERPRISE_UNBOUND||a.error)return a}e=g("liap",t)?g(k[I.MEMBER],t)?I.MEMBER:I.GUEST:g(k[I.GUEST],t)?I.GUEST:I.MEMBER}return function(e,t,i,n){var r=g(k[e],t) return r?x(r,e,i,n):g(k[I.GUEST],t)||g(k[I.MEMBER],t)||g(k[I.ENTERPRISE_UNBOUND],t)?M(A):M(S)}(e,t,n,r)},j={SHARE_DATA_WITH_TRUSTED_PARTNERS:"SHARE_DATA_WITH_TRUSTED_PARTNERS"},G=0,F=1,z=r((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.guestPreferencesData,r=void 0===n?null:n,o=t.issuedAt,a=void 0===o?null:o,l=t.defaultConsent,s=void 0===l?G:l i(this,e) r=r||{} this.issuedAt=a this.guestPreferencesMap={} for(var c in j){"number"!=typeof r[c]&&(r[c]=s) this.guestPreferencesMap[c]=r[c]===F}})),V=(v=[j.SHARE_DATA_WITH_TRUSTED_PARTNERS],T=[G,F],{parseGuestPreferencesBody:function(e){var t=new RegExp(["^(\\d+)","(\\d+)"].join(";")),i=e.match(t) if(!i)return{error:"Invalid guest preferences body encoding",guestPreferences:new z} var n=i[1],r=function(e){for(var t={},i=0;i0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,n=L(e,document.cookie,t),r=n.consent,o=e||r.userMode||I.GUEST return{showBanner:!n.error&&!r.consentAvailable,userMode:o,managePreferenceUrl:U(o,t,i)}} e.getCookieConsent=L e.getPreferenceStatuses=function(e){"string"!=typeof e&&(e=document.cookie) var t=g("li_gp",e) return t?function(e){e&&e.length>1&&'"'==e.charAt(0)&&'"'==e.charAt(e.length-1)&&(e=e.substring(1,e.length-1)) var t=null try{t=h(e).match(B)}catch(e){}if(!t)return{error:"Invalid guest preferences encoding",guestPreferences:new z} var i=parseInt(t[1],10),n=t[2] return 1===i?V.parseGuestPreferencesBody(n):{error:"Invalid encoded guest preferences version ".concat(i),guestPreferences:new z}}(t):{error:null,guestPreferences:new z({defaultConsent:F})}} e.parseEncodedConsent=x e.updateCookieConsent=function(e,t){var i=e.optedInConsentMap,n=e.updateSettings,r=e.userMode,o=e.xLiTrackPayload,a=e.enterpriseContext||{},l=a.enterpriseProfileHash,s=a.enterpriseAppInstanceId t=t||function(e,t){} var c=g(k[I.ENTERPRISE_UNBOUND],document.cookie) i||t("optedInConsentMap is a required option",null) var d=new XMLHttpRequest,u=new URLSearchParams c&&s&&u.append("appInstanceId",s) var p=Array.from(u).length?"?"+u.toString():"" d.open("POST","https://www.".concat(D(),"/cookie-consent/").concat(p)) d.setRequestHeader("Content-Type","application/json") o&&d.setRequestHeader("X-LI-Track",o) c&&l&&d.setRequestHeader("x-li-identity",l) d.withCredentials=!0 d.onload=function(){200!==d.status?t("Request failed with status ".concat(d.status),null):t(null,d)} d.onerror=function(){t("Request failed with an error",d)} var m={UPDATE_SETTINGS:n,USER_MODE:r,CATEGORIES:{}} for(var h in E){var f=void 0 !0===i[h]?f=S:!1===i[h]&&(f=A) m.CATEGORIES[h]=f}d.send(JSON.stringify(m))} Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof e&&e.amd?e(["exports"],i):i((t="undefined"!=typeof globalThis?globalThis:t||self).ConsentCookieParser={}) var t,i}(function(){function e(){var e=Array.prototype.slice.call(arguments) e.unshift("@linkedin/consent-cookie-parser") return define.apply(null,e)}e.amd=!0 return e}()) //# sourceMappingURL=engine-vendor.mapÓ˜