зеркало из
https://github.com/jlind0/multiplex.studio.web.git
synced 2025-10-28 20:54:22 +02:00
1222 строки
304 KiB
Plaintext
1222 строки
304 KiB
Plaintext
define("@glimmer/component/-private/base-component-manager",["exports","@babel/runtime/helpers/esm/defineProperty","@glimmer/component/-private/component"],(function(e,t,n){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=function(e,n,i){return class{static create(e){return new this(n(e))}constructor(n){(0,t.default)(this,"capabilities",i)
|
|
e(this,n)}createComponent(e,t){0
|
|
return new e(n(this),t.named)}getContext(e){return e}}}}))
|
|
define("@glimmer/component/-private/component",["exports","@babel/runtime/helpers/esm/defineProperty","@glimmer/component/-private/owner","@glimmer/component/-private/destroyables"],(function(e,t,n,i){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=e.ARGS_SET=void 0
|
|
e.ARGS_SET=void 0
|
|
0
|
|
e.default=class{constructor(e,i){(0,t.default)(this,"args",void 0)
|
|
0
|
|
this.args=i;(0,n.setOwner)(this,e)}get isDestroying(){return(0,i.isDestroying)(this)}get isDestroyed(){return(0,i.isDestroyed)(this)}willDestroy(){}}}))
|
|
define("@glimmer/component/-private/destroyables",["exports","ember"],(function(e,t){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.isDestroying=e.isDestroyed=void 0
|
|
e.isDestroying=t.default._isDestroying,e.isDestroyed=t.default._isDestroyed}))
|
|
define("@glimmer/component/-private/ember-component-manager",["exports","ember","@ember/object","@ember/application","@ember/component","@ember/runloop","@glimmer/component/-private/base-component-manager","@glimmer/component/-private/destroyables"],(function(e,t,n,i,r,o,a,l){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
const{setDestroyed:s,setDestroying:d}=l,c=(0,r.capabilities)("3.13",{destructor:!0,asyncLifecycleCallbacks:!1,updateHook:!1}),u=t.default.destroy,p=t.default._registerDestructor
|
|
class m extends((0,a.default)(i.setOwner,i.getOwner,c)){createComponent(e,t){const n=super.createComponent(e,t)
|
|
p(n,(()=>{n.willDestroy()}))
|
|
return n}destroyComponent(e){u(e)}}0
|
|
e.default=m}))
|
|
define("@glimmer/component/-private/owner",["exports","@ember/application"],(function(e,t){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
Object.defineProperty(e,"setOwner",{enumerable:!0,get:function(){return t.setOwner}})}))
|
|
define("@glimmer/component/index",["exports","@ember/component","@glimmer/component/-private/ember-component-manager","@glimmer/component/-private/component"],(function(e,t,n,i){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
let r=i.default
|
|
0;(0,t.setComponentManager)((e=>new n.default(e)),r)
|
|
e.default=r}))
|
|
define("designer-detour/components/designer-detour",["exports","@babel/runtime/helpers/esm/initializerDefineProperty","@babel/runtime/helpers/esm/defineProperty","@babel/runtime/helpers/esm/classPrivateMethodGet","@babel/runtime/helpers/esm/applyDecoratedDescriptor","@babel/runtime/helpers/esm/initializerWarningHelper","@ember/template-factory","@ember/helper","@ember/component","designer-detour/utils/design-detour-manager","artdeco-loader/components/artdeco-loader","ember-cli-pemberly-tracking/utils/uuid","vector/utils/constants","global-utils/utils/urn-converter","detour-framework/utils/preview-utils","@ember/destroyable","@glimmer/tracking","@ember/object","@glimmer/component","@ember/debug","@ember/service","ember-cli-pemberly-i18n/helpers/t","embedded-designer/modifiers/embed-designer","tracked-toolbox","ember-test-waiters","ember-async-data"],(function(e,t,n,i,r,o,a,l,s,d,c,u,p,m,h,g,f,b,_,y,v,T,E,S,w,k){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var C,D,O,A,I,P,x,M,R,N,U,L,F,z,j,V,B,H,G,q,K,W,Y,Q,$,X
|
|
const Z="ms-graph-designer-client-id"
|
|
e.default=(0,s.setComponentTemplate)((0,a.createTemplateFactory)({id:"LLoM/eqc",block:'[[[1,"\\n"],[1," "],[10,0],[14,0,"designer-detour-embedded__container"],[12],[1,"\\n"],[41,[30,0,["isLoadingDesigner"]],[[[1," "],[8,[32,0],[[24,0,"designer-detour-embedded__loader"]],null,null],[1,"\\n"]],[]],null],[1,"\\n"],[41,[30,0,["loadingError"]],[[[1," "],[10,2],[14,0,"designer-detour-embedded-container__error-message"],[12],[1,[28,[32,1],["i18n_designer_load_error","designer-detour/components/designer-detour"],null]],[13],[1,"\\n"]],[]],null],[41,[30,0,["designerOptions","isResolved"]],[[[1," "],[11,0],[24,0,"designer-detour-embedded__designer-container"],[4,[32,2],null,[["onDesignerLoad","onDesignerLoadError","onDesignerDone","onDesignerCancel","startingDesignQuery","sessionId","clientId","customUrl","documentData","usePreProd","additionalUserImages"],[[30,0,["designerOptions","value","onDesignerLoad"]],[30,0,["designerOptions","value","onDesignerLoadError"]],[30,0,["designerOptions","value","onDesignerDone"]],[30,0,["designerOptions","value","onDesignerCancel"]],[30,0,["designerOptions","value","startingDesignQuery"]],[30,0,["designerOptions","value","sessionId"]],[30,0,["designerOptions","value","clientId"]],[30,0,["designerOptions","value","customUrl"]],[30,0,["designerOptions","value","documentData"]],[30,0,["designerOptions","value","usePreProd"]],[30,0,["designerOptions","value","additionalUserImages"]]]]],[12],[1,"\\n "],[13],[1,"\\n"]],[]],null],[41,[30,0,["designerOptions","isRejected"]],[[[1," "],[11,0],[24,0,"designer-detour-embedded__designer-container"],[4,[32,2],null,[["onDesignerLoad","onDesignerLoadError","onDesignerDone","onDesignerCancel","startingDesignQuery","sessionId","clientId","customUrl","documentData"],[[30,0,["onDesignerLoad"]],[30,0,["onDesignerLoadError"]],[30,0,["onDesignerDone"]],[30,0,["onDesignerCancel"]],[30,0,["shareboxText"]],[30,0,["sessionId"]],[30,0,["clientId"]],[30,0,["customUrl"]],[30,0,["documentData"]]]]],[12],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1," "],[13],[1,"\\n "]],[],false,["if"]]',moduleName:"designer-detour/components/designer-detour.gjs",scope:()=>[c.default,T.default,E.default],isStrictMode:!0}),(C=(0,v.inject)("i18n"),D=(0,v.inject)("global-services@store-shim"),O=(0,v.inject)("tracking"),A=(0,v.inject)("vector@vector-media-upload"),I=(0,v.inject)("authentication@authenticated-user"),P=(0,v.inject)("embedded-designer@embedded-designer-service"),x=(0,v.inject)("global-services@local-storage"),M=(0,v.inject)("lix"),R=(0,v.inject)("rum"),N=(W=new WeakSet,Y=new WeakSet,Q=new WeakSet,$=new WeakSet,X=new WeakSet,class e extends _.default{get designerDocumentData(){return this.documentData??null}get shouldPassProfilePicture(){return this.lix.getTreatmentIsEnabled("voyager.web.designer-profile-picture")}get isLoadingDesigner(){return!this.designerEmbedded}get useIngester(){return this.lix.getTreatmentIsEnabled("voyager.web.media-ingester-feed")}get designerOptions(){const e={onDesignerLoad:this.onDesignerLoad,onDesignerLoadError:this.onDesignerLoadError,onDesignerDone:this.onDesignerDone,onDesignerCancel:this.onDesignerCancel,startingDesignQuery:this.shareboxText,sessionId:this.sessionId,clientId:this.clientId,documentData:this.designerDocumentData}
|
|
let t=null
|
|
this.profilePictureMeasurement=this.rum.startPerfMeasurement("ms-designer-fetch-profile-picture")
|
|
t=this.authenticatedUser.miniProfile.then((e=>{if((0,g.isDestroying)(this))return
|
|
this.rum.endPerfMeasurement(this.profilePictureMeasurement)
|
|
const{artifacts:t,rootUrl:n}=e.picture
|
|
return`${n}${function(e){e.sort(((e,t)=>e.width>t.width?-1:1))
|
|
return e[0].fileIdentifyingUrlPathSegment}(t)}`}))
|
|
return(0,k.load)(t.then((t=>{if(!(0,g.isDestroying)(this)){t&&(e.additionalUserImages=[{category:"LinkedInProfilePicture",image:t}])
|
|
return e}})))}constructor(){var r,o
|
|
super(...arguments)
|
|
X.add(this)
|
|
$.add(this)
|
|
Q.add(this)
|
|
Y.add(this)
|
|
W.add(this);(0,t.default)(this,"i18n",U,this);(0,t.default)(this,"storeShim",L,this);(0,t.default)(this,"tracking",F,this);(0,t.default)(this,"vectorMediaUpload",z,this);(0,t.default)(this,"authenticatedUser",j,this);(0,t.default)(this,"embeddedDesignerService",V,this);(0,t.default)(this,"localStorage",B,this);(0,t.default)(this,"lix",H,this);(0,t.default)(this,"rum",G,this);(0,t.default)(this,"designerEmbedded",q,this);(0,t.default)(this,"loadingError",K,this);(0,n.default)(this,"shareboxText","");(0,n.default)(this,"mediaUploadType",p.UPLOAD_MEDIA_TYPES.MICROSOFT_DESIGNER_IMAGE_SHARING)
|
|
null===(r=(o=this.args).updateShareboxModalConfig)||void 0===r||r.call(o,{modalHeader:this.i18n.lookupTranslation(e,"i18n_designer_header")(),modalSizeOverride:"x-large",modalHeightFull:!0,hideModalHeader:!0})
|
|
const{detourData:a,shareboxText:l}=this.args
|
|
this.shareboxText=l
|
|
this.clientId=(0,i.default)(this,X,ie).call(this)
|
|
if(a){const{imageComponentModel:e,mediaData:t,sessionId:n,documentData:i}=a
|
|
this.sessionId=n
|
|
this.documentData=i
|
|
this.imageComponentModel=e
|
|
this.mediaData=t
|
|
this.mediaError=null}else this.sessionId=(0,u.default)()
|
|
this.loadMeasurement=this.rum.startPerfMeasurement("ms-designer-loader")}onDesignerDone(e){let{media:t,mimeType:n,document:r}=e;(0,i.default)(this,$,ne).call(this,"designer_done_button")
|
|
const o=this.embeddedDesignerService.getImageFromDesignerBuffer(t,n,"designer-image")
|
|
this.mediaData=o
|
|
this.documentData=r
|
|
const a=(0,i.default)(this,Y,ee).call(this),l=(0,i.default)(this,Q,te).call(this)
|
|
return(0,w.waitForPromise)(Promise.all([a,l]).then((e=>{var t,n
|
|
if(!(0,g.isDestroying)(this)){this.imageComponentModel=e[0]
|
|
this.dashImageComponentModel=e[1]
|
|
return null===(t=(n=this.args).onDetourComplete)||void 0===t?void 0:t.call(n,(0,i.default)(this,W,J).call(this))}})))}onDesignerCancel(){var e,t;(0,i.default)(this,$,ne).call(this,"designer_cancel_button")
|
|
null===(e=(t=this.args).goToCreation)||void 0===e||e.call(t)}onDesignerLoad(){this.designerEmbedded=!0
|
|
this.loadingError=!1
|
|
this.rum.endPerfMeasurement(this.loadMeasurement)}onDesignerLoadError(){this.loadingError=!0}}),U=(0,r.default)(N.prototype,"i18n",[C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),L=(0,r.default)(N.prototype,"storeShim",[D],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),F=(0,r.default)(N.prototype,"tracking",[O],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),z=(0,r.default)(N.prototype,"vectorMediaUpload",[A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),j=(0,r.default)(N.prototype,"authenticatedUser",[I],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),V=(0,r.default)(N.prototype,"embeddedDesignerService",[P],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),B=(0,r.default)(N.prototype,"localStorage",[x],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),H=(0,r.default)(N.prototype,"lix",[M],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),G=(0,r.default)(N.prototype,"rum",[R],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),q=(0,r.default)(N.prototype,"designerEmbedded",[f.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),K=(0,r.default)(N.prototype,"loadingError",[f.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),(0,r.default)(N.prototype,"designerOptions",[S.cached],Object.getOwnPropertyDescriptor(N.prototype,"designerOptions"),N.prototype),(0,r.default)(N.prototype,"onDesignerDone",[b.action],Object.getOwnPropertyDescriptor(N.prototype,"onDesignerDone"),N.prototype),(0,r.default)(N.prototype,"onDesignerCancel",[b.action],Object.getOwnPropertyDescriptor(N.prototype,"onDesignerCancel"),N.prototype),(0,r.default)(N.prototype,"onDesignerLoad",[b.action],Object.getOwnPropertyDescriptor(N.prototype,"onDesignerLoad"),N.prototype),(0,r.default)(N.prototype,"onDesignerLoadError",[b.action],Object.getOwnPropertyDescriptor(N.prototype,"onDesignerLoadError"),N.prototype),N))
|
|
function J(){var e
|
|
const t=new d.default({mediaData:this.mediaData,documentData:this.documentData,mediaUploadType:this.mediaUploadType,previewComponent:this.imageComponentModel,dashPreviewComponent:this.dashImageComponentModel,store:this.storeShim,vectorMediaUpload:this.vectorMediaUpload,tracking:this.tracking,organizationActorUrn:null===(e=this.args.nonMemberActor)||void 0===e?void 0:e.dashUrn,memberUrn:this.authenticatedUser.memberUrn&&(0,m.convertUrnType)("fsd_profile",this.authenticatedUser.memberUrn),sessionId:this.sessionId,useIngester:this.useIngester})
|
|
return t}function ee(){return(0,h.getImageComponentFromImages)(null,[this.mediaData])}function te(){return(0,h.getDashImageComponentFromImages)([this.mediaData])}function ne(e){this.tracking.fireInteractionEvent(e)}function ie(){let e=this.localStorage.getItem(Z)
|
|
if(e)return e
|
|
e=(0,u.default)()
|
|
this.localStorage.setItem(Z,e)
|
|
return e}}))
|
|
define("designer-detour/template-registry",[],(function(){}))
|
|
define("designer-detour/utils/design-detour-manager",["exports","@babel/runtime/helpers/esm/classPrivateMethodGet","detour-framework/utils/detour-manager","detour-framework/utils/detour-constants","@linkedin/ember-m3-pdsc-model-builder","detour-framework/utils/detour-status-data","detour-framework/utils/progress-data","detour-framework/utils/detour-preview-data","detour-framework/utils/dash-detour-preview-data","detour-framework/utils/media-upload","vector/utils/constants"],(function(e,t,n,i,r,o,a,l,s,d,c){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}
|
|
const n=this.vectorMediaUpload
|
|
return n.upload(e,{mediaUploadType:t.mediaUploadType,...t}).then((t=>({...t,imageFile:e})))}var p=new WeakSet,m=new WeakSet
|
|
class h extends n.default{constructor(){let{mediaData:e,mediaUploadType:n,onCancel:r,organizationActorUrn:d,previewComponent:c,dashPreviewComponent:u,store:h,vectorMediaUpload:f,memberUrn:b,sessionId:_,documentData:y,tracking:v,useIngester:T=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
|
const E={documentData:y,mediaData:e,sessionId:_,imageComponentModel:c,dashImageComponentModel:u},S=new a.default({headline:""})
|
|
super({detourStatusData:new o.default({detourState:i.DETOUR_STATES.IN_PROGRESS,detourData:E,progressData:S}),detourPreviewData:new l.default({previewComponent:c,previewState:i.DETOUR_PREVIEW_STATES.SUCCEEDED}),dashDetourPreviewData:new s.default({previewComponent:u,previewState:i.DETOUR_PREVIEW_STATES.SUCCEEDED}),onCancel:r,detourType:i.DETOUR_TYPES.DESIGNER})
|
|
m.add(this)
|
|
p.add(this)
|
|
this.previewComponent=c
|
|
this.dashPreviewComponent=u
|
|
this.vectorMediaUpload=f
|
|
this.tracking=v
|
|
this.mediaData=e
|
|
this.documentData=y
|
|
this.getShareMedia=(0,t.default)(this,p,g).bind(this,{isDashShareMedia:!1})
|
|
this.getDashShareMedia=(0,t.default)(this,p,g).bind(this,{isDashShareMedia:!0})
|
|
this.mediaUploadType=n
|
|
this.organizationActorUrn=d
|
|
this.storeShim=h
|
|
this.memberUrn=b
|
|
this.useIngester=T}}e.default=h
|
|
function g(e){var n,o,a
|
|
let{isDashShareMedia:l}=e
|
|
this.errorMessage=null
|
|
const s=this.mediaData??{},p=new d.default({media:{data:s},mediaUploadType:"MICROSOFT_DESIGNER_IMAGE_SHARING",uploadService:{upload:u.bind(this),ingestImage:e=>this.vectorMediaUpload.ingest(e)},organizationActorUrn:this.organizationActorUrn,isMultiphotosUgcV2Enabled:this.isMultiphotosUgcV2Enabled,memberUrn:this.memberUrn,useIngester:this.useIngester}),h=l?null===(n=this.dashPreviewComponent)||void 0===n||null===(o=n.imageComponent)||void 0===o?void 0:o.images:null===(a=this.previewComponent)||void 0===a?void 0:a.images
|
|
return p.uploadMedia().then((e=>{if(null!=e&&e.multiphotoUrn){const t={category:i.SHARE_MEDIA_CATEGORIES.URN_REFERENCE,mediaUrn:e.multiphotoUrn,tapTargets:[]}
|
|
return l?[t]:[(0,r.buildModel)("com.linkedin.voyager.contentcreation.ShareMedia",t,{validate:!1})]}return e.map(((e,t)=>{const n=function(e,t){const{accessibilityText:n,attributes:{firstObject:{centerXShiftPercentage:r,centerYShiftPercentage:o}}}=e,a=e&&e.attributes[0]&&e.attributes[0].tapTargets,l={category:i.SHARE_MEDIA_CATEGORIES.IMAGE,mediaUrn:t,tapTargets:a}
|
|
n&&(l.altText=n)
|
|
Number.isFinite(r)&&(l.centerXShiftPercentage=r)
|
|
Number.isFinite(o)&&(l.centerYShiftPercentage=o)
|
|
return l}(h&&h[t],e.urn||e.meta.urn)
|
|
return l?n:(0,r.buildModel)("com.linkedin.voyager.contentcreation.ShareMedia",n,{validate:!1})}))})).catch((e=>{var n,i,r,o
|
|
const a=(null==e||null===(n=e.meta)||void 0===n?void 0:n.urn)||(null==e||null===(i=e.assetDetails)||void 0===i||null===(r=i[0])||void 0===r?void 0:r.urn),l=(null==e||null===(o=e.status)||void 0===o?void 0:o.state)||(null==e?void 0:e.state)
|
|
if(a&&[c.UPLOAD_TRACKING_STATES.FAILED,c.INGESTION_STATES.FAILED].includes(l))return(0,t.default)(this,m,f).call(this,a).then((e=>{throw e}))
|
|
const s=new Error
|
|
s.name="imagePostFailed"
|
|
throw s}))}function f(e){return this.storeShim.queryURL(`voyagerVideoDashMediaAssetStatus/${e}`,{reload:!0,params:{mediaStatusType:"IMAGE"}}).then((e=>{const t=new Error
|
|
t.name="imagePostFailed"
|
|
const n=e.errorMessage.text
|
|
n&&(t.message=n)
|
|
return t}))}}))
|
|
define("document-detour/components/document-detour",["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","detour-framework/utils/detour-constants","global-utils/utils/a11y-focus-element","@glimmer/tracking","document-detour/utils/document-detour-manager","document/utils/document-status-poller","document-detour/utils/document-detour-utils","document/utils/document-helpers","document/utils/document-constants","vector/utils/constants","@ember/object","@glimmer/component","@ember/service","document/components/document-title-form","artdeco-button/components/artdeco-button","ember-cli-pemberly-tracking/modifiers/track-interaction","ember-cli-pemberly-i18n/helpers/t","document/helpers/padding-top","document/components/document-container","image-view-model/components/image-view-model","text-view-model/helpers/text-view-model","document/helpers/progress-bar-style","artdeco-completeness-meter-linear/components/artdeco-completeness-meter-linear","artdeco-inline-feedback/components/artdeco-inline-feedback","document/components/local-upload","detour-framework/components/media-error","detour-framework/components/share-box-footer","@ember/helper","@ember/modifier"],(function(e,t,n,i,r,o,a,l,s,d,c,u,p,m,h,g,f,b,_,y,v,T,E,S,w,k,C,D,O,A,I,P,x,M,R){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var N,U,L,F,z,j,V,B,H,G,q,K,W,Y,Q,$,X,Z,J,ee,te,ne,ie,re,oe,ae,le,se,de
|
|
e.default=(0,a.setComponentTemplate)((0,o.createTemplateFactory)({id:"KOxBD0+m",block:'[[[1,"\\n"],[1," "],[10,0],[15,0,[29,["document-detour ",[30,1]]]],[12],[1,"\\n "],[10,0],[14,0,"document-detour__preview-container share-box-modal-content__container"],[14,"tabindex","-1"],[12],[1,"\\n"],[41,[30,0,["hasSelectedFileOnce"]],[[[1," "],[8,[32,0],null,[["@documentTitle","@documentTitleValidationStatus","@onDocumentTitleChange"],[[30,0,["documentTitle"]],[30,0,["documentTitleValidationStatus"]],[30,0,["onDocumentTitleChange"]]]],null],[1,"\\n"]],[]],null],[1,"\\n"],[41,[30,0,["documentMetadata"]],[[[1," "],[10,0],[15,0,[29,["relative mh5 mb4 document-detour__document-preview-container\\n ",[52,[30,0,["documentError","failureType"]],"document-detour__document-preview-container--error"]]]],[12],[1,"\\n "],[8,[32,1],[[24,0,"document-detour__close-preview"],[4,[32,2],["click",[30,0,["onClosePreview"]]],null],[4,[32,3],[[30,0,["controlInteractionEvents","REMOVE_PREVIEW"]]],null]],[["@type","@size","@icon","@color","@circle"],["tertiary",1,"close","muted","true"]],[["default"],[[[[1,"\\n "],[10,1],[14,0,"visually-hidden"],[12],[1,"\\n "],[1,[28,[32,4],["i18n_close_preview_btn","document-detour/components/document-detour"],null]],[1,"\\n "],[13],[1,"\\n "]],[]]]]],[1,"\\n"],[41,[30,0,["documentMetadata","document"]],[[[1," "],[10,0],[14,0,"document-detour__document-preview relative"],[15,5,[28,[32,5],[[30,0,["documentMetadata","document"]]],null]],[12],[1,"\\n "],[8,[32,6],null,[["@model","@isPreview","@hideFocusTrappingDiv"],[[30,0,["documentMetadata","document"]],true,true]],null],[1,"\\n "],[13],[1,"\\n"]],[]],[[[41,[30,0,["documentProcessingPreviewEntityComponent"]],[[[1," "],[10,0],[15,0,[29,["p3 display-flex document-detour__document-processing-preview\\n ",[52,[30,0,["documentError","failureType"]],"document-detour__document-processing-preview--error"]]]],[12],[1,"\\n "],[10,0],[14,0,"mr2"],[12],[1,"\\n "],[8,[32,7],null,[["@images","@entitySize"],[[30,0,["documentProcessingPreviewEntityComponent","image"]],3]],null],[1,"\\n "],[13],[1,"\\n "],[10,0],[12],[1,"\\n"],[41,[30,0,["documentProcessingPreviewEntityComponent","title"]],[[[1," "],[10,"h2"],[14,0,"t-14 t-black t-bold pr4"],[12],[1,"\\n "],[1,[28,[32,8],[[30,0,["documentProcessingPreviewEntityComponent","title"]]],null]],[1,"\\n "],[13],[1,"\\n"]],[]],null],[41,[30,0,["documentProcessingPreviewEntityComponent","subtitle"]],[[[1," "],[10,"h3"],[14,0,"t-12 t-black--light t-normal"],[12],[1,"\\n "],[1,[28,[32,8],[[30,0,["documentProcessingPreviewEntityComponent","subtitle"]]],null]],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1," "],[13],[1,"\\n "],[13],[1,"\\n\\n"],[41,[51,[30,0,["documentError","failureType"]]],[[[41,[30,0,["shouldShowUploadProgress"]],[[[1," "],[10,0],[14,0,"document-detour__document-processing-preview-state--uploading"],[15,5,[28,[32,9],[[30,0,["uploadPercent"]]],null]],[12],[13],[1,"\\n"]],[]],[[[1," "],[8,[32,10],null,[["@size","@indeterminate","@value","@max","@class"],["small","true",100,100,"document-detour__document-processing-preview-state--converting"]],null],[1,"\\n"]],[]]]],[]],null]],[]],null]],[]]],[1," "],[13],[1,"\\n\\n"],[41,[30,0,["hasDocumentUploadFailed"]],[[[1," "],[8,[32,11],null,[["@message","@type","@isHidden","@class"],[[28,[32,4],["i18n_document_error_recoverable","document-detour/components/document-detour"],null],"error",[52,[30,0,["documentError","failureType"]],false,true],"document-detour__document-processing-preview-state-error-text mh5"]],null],[1,"\\n"]],[]],[[[1," "],[8,[32,11],null,[["@message","@type","@isHidden","@class","@linkText","@linkAriaLabel","@onclick"],[[28,[32,4],["i18n_document_error_irrecoverable","document-detour/components/document-detour"],null],"error",[52,[30,0,["documentError","failureType"]],false,true],"document-detour__document-processing-preview-state-error-text mh5",[28,[32,4],["i18n_learn_more","document-detour/components/document-detour"],null],[28,[32,4],["i18n_learn_more_aria_label","document-detour/components/document-detour"],null],[30,0,["onClickError"]]]],null],[1,"\\n"]],[]]]],[]],null],[1,"\\n"],[41,[51,[30,0,["documentMetadata"]]],[[[1," "],[8,[32,12],null,[["@onCancel","@onError","@onSuccess","@selectLocalControlName"],[[30,0,["onCloudFilePickerCancel"]],[30,0,["onCloudFilePickerError"]],[30,0,["onCloudFilePickerSuccess"]],[30,0,["controlInteractionEvents","SELECT_FILE_LOCAL"]]]],null],[1,"\\n"]],[]],null],[1,"\\n"],[41,[30,0,["documentError","errorCode"]],[[[1," "],[8,[32,13],null,[["@mediaError","@class","@fileCountLimit"],[[30,0,["documentError"]],"document-detour__file-validation-error mh2",[30,0,["defaultUploadLimit"]]]],null],[1,"\\n"]],[]],null],[1,"\\n "],[8,[32,11],null,[["@message","@type","@class"],[[28,[32,4],["i18n_new_download_disclaimer","document-detour/components/document-detour"],[["linkInfo"],[[28,[32,14],null,[["target","class","aria-label","href","data-control-name","data-test-document-download-disclaimer"],["_blank","link",[28,[32,4],["i18n_show_text_disclaimer","document-detour/components/document-detour"],null],[30,0,["downloadDisclaimerUrl"]],"i18n_learn_more","true"]]]]]],"note","ph5 pt2 pb5"]],null],[1,"\\n "],[13],[1,"\\n\\n "],[8,[32,15],null,[["@primaryAction","@isPrimaryDisabled","@primaryButtonKey","@primaryControlName","@secondaryAction","@secondaryControlName","@secondaryButtonKey"],[[30,0,["onNext"]],[30,0,["disableNextButton"]],[30,0,["footerPrimaryButtonKeys","DONE"]],[30,0,["controlInteractionEvents","CONFIRM"]],[52,[30,2],[30,0,["onExit"]],[28,[32,16],[[30,0,["onExit"]],false],null]],[30,0,["controlInteractionEvents","CANCEL"]],[52,[30,2],[30,0,["footerSecondaryButtonKeys","BACK"]],[30,0,["footerSecondaryButtonKeys","CANCEL"]]]]],null],[1,"\\n "],[13],[1,"\\n "]],["@class","@shouldShowBackButton"],false,["if","unless"]]',moduleName:"document-detour/components/document-detour.gjs",scope:()=>[y.default,v.default,R.on,T.default,E.default,S.default,w.default,k.default,C.default,D.default,O.default,A.default,I.default,P.default,M.hash,x.default,M.fn],isStrictMode:!0}),(N=(0,_.inject)("i18n"),U=(0,_.inject)("jet"),L=(0,_.inject)("lix"),F=(0,_.inject)("global-services@store-shim"),z=(0,_.inject)("tracking"),j=(0,_.inject)("vector@vector-media-upload"),V=(0,_.inject)("global-services@window"),B=class e extends b.default{get useIngester(){return this.lix.getTreatmentIsEnabled("voyager.web.media-ingester-feed")}get isDashEnabled(){return this.lix.getTreatmentIsEnabled("voyager.web.document-detour-dash-update-model")}get isCloudUpload(){var e
|
|
return!(null!==(e=this.cloudFilePickerFile)&&void 0!==e&&e.isLocalFile)}get hasDocumentChanged(){return this.initialDocumentUrn!==this.documentUrn}get documentUrn(){var e,t
|
|
return null===(e=this.documentUploadResponseData)||void 0===e||null===(t=e.meta)||void 0===t?void 0:t.urn}get documentUploadResponseData(){var e
|
|
return this.documentUploadResponse||(null===(e=this.documentMetadata)||void 0===e?void 0:e.documentUploadResponse)}get disableNextButton(){var e
|
|
return!this.hasSelectedFileOnce||!this.documentUrn||(null===(e=this.documentError)||void 0===e?void 0:e.failureType)}get isEdit(){return!!this.args.detourData}get uploadPercent(){var e
|
|
if(this.useIngester)return this.documentIngestionProgress?100*this.documentIngestionProgress:0
|
|
return(this.documentBytesLoaded??0)/((null===(e=this.documentMetadata)||void 0===e?void 0:e.size)??1)*100}get shouldShowUploadProgress(){return!(this.isCloudUpload||100===this.uploadPercent&&this.documentUploadResponseData)}get hasDocumentUploadFailed(){return this.documentError===p.UPLOAD_FAILURE_ERROR}get hasDocumentConversionFailed(){return this.documentError===p.CONVERSION_FAILURE_ERROR}constructor(){var i,r
|
|
super(...arguments);(0,t.default)(this,"i18n",H,this);(0,t.default)(this,"jet",G,this);(0,t.default)(this,"lix",q,this);(0,t.default)(this,"storeShim",K,this);(0,t.default)(this,"tracking",W,this);(0,t.default)(this,"vectorMediaUpload",Y,this);(0,t.default)(this,"windowService",Q,this);(0,t.default)(this,"documentBytesLoaded",$,this);(0,t.default)(this,"documentIngestionProgress",X,this);(0,t.default)(this,"documentMetadata",Z,this);(0,t.default)(this,"documentUploadResponse",J,this);(0,t.default)(this,"documentProcessingResult",ee,this);(0,t.default)(this,"documentError",te,this);(0,t.default)(this,"documentProcessingPreviewEntityComponent",ne,this);(0,t.default)(this,"documentTitle",ie,this);(0,t.default)(this,"documentTitleValidationStatus",re,this);(0,t.default)(this,"hasSelectedFileOnce",oe,this);(0,t.default)(this,"cloudFilePickerFile",ae,this);(0,t.default)(this,"documentStatusPoller",le,this);(0,t.default)(this,"mediaStatusType",se,this);(0,t.default)(this,"documentMediaUrn",de,this);(0,n.default)(this,"footerPrimaryButtonKeys",l.SHARE_BOX_FOOTER_PRIMARY_KEYS);(0,n.default)(this,"footerSecondaryButtonKeys",l.SHARE_BOX_FOOTER_SECONDARY_KEYS);(0,n.default)(this,"downloadDisclaimerUrl",h.DOCUMENT_FAQ_HELP_PAGE_CENTER_URL);(0,n.default)(this,"defaultUploadLimit",g.DEFAULT_UPLOAD_LIMIT)
|
|
null===(i=(r=this.args).updateShareboxModalConfig)||void 0===i||i.call(r,{modalHeader:this.i18n.lookupTranslation(e,"i18n_detour_header")(),controlName:p.CONTROL_INTERACTION_EVENTS.EXIT,shouldFocusOnHeader:!0})
|
|
this.tracking.firePageViewEvent(p.PAGE_VIEW_EVENT)
|
|
const o=u.default.create()
|
|
this.documentError=p.NO_DOCUMENT_ERROR
|
|
this.documentStatusPoller=o
|
|
this.handleDocumentConversionSuccessCallback=this._handleDocumentConversionSuccess.bind(this)
|
|
this.handleDocumentConversionFailureCallback=this._handleDocumentConversionFailure.bind(this)
|
|
this.handleDocumentUploadFailureCallback=this._handleDocumentUploadFailure.bind(this)
|
|
this.controlInteractionEvents=p.CONTROL_INTERACTION_EVENTS
|
|
o.on("ready",this,"handleDocumentConversionSuccessCallback")
|
|
o.on("failed",this,"handleDocumentConversionFailureCallback")
|
|
o.on("internal-error",this,"handleDocumentUploadFailureCallback")
|
|
if(this.isEdit){const{detourData:e}=this.args
|
|
this._initFromEdit(e)}}willDestroy(){super.willDestroy(...arguments)
|
|
const{documentStatusPoller:e}=this
|
|
e.off("ready",this,"handleDocumentConversionSuccessCallback")
|
|
e.off("failed",this,"handleDocumentConversionFailureCallback")
|
|
e.off("internal-error",this,"handleDocumentUploadFailureCallback")}_initFromEdit(e){e.documentMetadata.documentUploadResponse.meta.urn=e.initialDocumentUrn
|
|
Object.assign(this,e)
|
|
this.cloudFilePickerFile={isLocalFile:!0}
|
|
this.hasSelectedFileOnce=!0
|
|
this.documentProcessingPreviewEntityComponent=this.isDashEnabled?this._createDocumentProcessingDashPreviewFeedComponent():this._createDocumentProcessingPreviewFeedComponent()
|
|
this._getDetourManager()}_uploadDocument(e){var t
|
|
this.hasSelectedFileOnce=!0
|
|
this.documentProcessingPreviewEntityComponent=this.isDashEnabled?this._createDocumentProcessingDashPreviewFeedComponent():this._createDocumentProcessingPreviewFeedComponent()
|
|
const n=null===(t=this.args.nonMemberActor)||void 0===t?void 0:t.dashUrn;(this.isCloudUpload?this._uploadDocumentFromCloud(n,e):this._uploadDocumentFromLocal(n)).then((t=>this._handleUploadedDocument(t,!!e))).catch((e=>{this.isDestroying||this._handleDocumentUploadFailure()
|
|
throw e}))}_handleUploadedDocument(e,t){if(this.isDestroying)return
|
|
this.isCloudUpload&&(e.meta={urn:e.mediaUrn,recipes:e.recipes});(0,f.set)(this.documentMetadata,"documentUploadResponse",e)
|
|
this.documentUploadResponse=e
|
|
const{documentStatusPoller:n}=this
|
|
n.stop()
|
|
Object.assign(n,{documentMediaUrn:this.documentUrn,store:this.storeShim,mediaStatusType:this.isCloudUpload&&!t?h.MEDIA_STATUS_TYPES.PREVIEW_CLOUD:h.MEDIA_STATUS_TYPES.PREVIEW})
|
|
this._getDetourManager()
|
|
n.start()}_getDetourManager(t){this.detourManager=new c.default({documentStatusPoller:this.documentStatusPoller,documentUrn:(null==t?void 0:t.initialDocumentUrn)||this.documentUrn,documentMetadata:(null==t?void 0:t.documentMetadata)||this.documentMetadata,documentProcessingResult:(null==t?void 0:t.documentMetadata)||(0,f.get)(this,"documentMetadata.document"),previewComponent:this._createDocumentProcessingPreviewFeedComponent(),dashPreviewComponent:this._createDocumentProcessingDashPreviewFeedComponent(),ghostUpdateHeadline:this.i18n.lookupTranslation(e,"i18n_processing_text_document")(),storeService:this.storeShim,conversionErrorPreviewStatusData:{message:this.i18n.lookupTranslation(e,"i18n_document_conversion_error_sharebox")(),link:{url:h.DOCUMENT_FAQ_HELP_PAGE_CENTER_URL,text:this.i18n.lookupTranslation(e,"i18n_learn_more")()}}})}_uploadDocumentFromCloud(e,t){const n={mediaUploadType:g.UPLOAD_MEDIA_TYPES.DOCUMENT_CLOUD_SHARING,organizationActorUrn:e}
|
|
return t?this.vectorMediaUpload.uploadFromCloudProviderFile((0,f.get)(this,"documentMetadata.id"),t,Object.assign(n,{mediaUploadType:g.UPLOAD_MEDIA_TYPES.DOCUMENT_SHARING})):this.vectorMediaUpload.uploadFromCloudUrl((0,f.get)(this,"documentMetadata.url"),n)}_uploadDocumentFromLocal(e){const t=this._onUploadDocumentProgress.bind(this),n=this._onDocumentIngestionProgress.bind(this)
|
|
return this.useIngester?this.vectorMediaUpload.ingest([{file:this.documentMetadata,mediaUploadType:g.UPLOAD_MEDIA_TYPES.DOCUMENT_SHARING,uploadParams:{organizationActorUrn:e}}],{progressCallback:e=>n(e)}).then((e=>({meta:{...e[0]}}))):this.vectorMediaUpload.upload(this.documentMetadata,{mediaUploadType:g.UPLOAD_MEDIA_TYPES.DOCUMENT_SHARING,organizationActorUrn:e},(e=>{e.on("progress",(e=>{let{loaded:n}=e
|
|
t(n)}))}))}_onDocumentIngestionProgress(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0
|
|
this.documentIngestionProgress=e}_onUploadDocumentProgress(e){this.documentBytesLoaded=e}_handleDocumentConversionSuccess(e){this.documentProcessingResult=e;(0,f.set)(this,"documentMetadata.document",e)}_handleDocumentUploadFailure(){this.documentError=p.UPLOAD_FAILURE_ERROR}_handleDocumentConversionFailure(){this.documentError=p.CONVERSION_FAILURE_ERROR}_createDocumentProcessingPreviewFeedComponent(){return(0,p.buildEntityFeedComponent)(this.documentMetadata,this.i18n)}_createDocumentProcessingDashPreviewFeedComponent(){return(0,p.buildEntityDashFeedComponent)(this.documentMetadata,this.i18n)}_removePreview(){this.documentMetadata=void 0
|
|
this.documentUploadResponse=void 0
|
|
this.documentProcessingPreviewEntityComponent=void 0
|
|
this.documentBytesLoaded=0
|
|
this.documentIngestionProgress=0
|
|
this.documentError=p.NO_DOCUMENT_ERROR
|
|
this.documentStatusPoller.stop()}_deleteDocumentAsset(e){e&&(0,m.deleteDocumentAsset)({store:this.storeShim,documentMediaUrn:e,retries:h.ASSET_DELETION_RETRIES})}onDocumentTitleChange(e){const t=(0,m.getTitleValidationStatus)(e)
|
|
t!==h.TITLE_VALIDATION_STATUSES.NO_TITLE&&(this.documentTitleValidationStatus=t)
|
|
this.documentTitle=e}onRetryUploadDocument(){this.documentError=p.NO_DOCUMENT_ERROR
|
|
this._uploadDocument()}onClosePreview(){this.isEdit&&!this.hasDocumentChanged||this._deleteDocumentAsset(this.documentUrn)
|
|
this._removePreview()}onClickError(){this.windowService.open(h.DOCUMENT_FAQ_HELP_PAGE_CENTER_URL,"_blank")}onNext(){const{documentTitle:e}=this,t=(0,m.getTitleValidationStatus)(e)
|
|
this.documentTitleValidationStatus=t
|
|
if(t===h.TITLE_VALIDATION_STATUSES.TITLE_VALID){var n,i
|
|
const{detourManager:t}=this
|
|
t.onNext({documentTitle:e})
|
|
if(this.isEdit){var r
|
|
null===(r=(0,f.get)(this,"initialDetourManager.documentStatusPoller"))||void 0===r||r.stop()
|
|
this.hasDocumentChanged&&this._deleteDocumentAsset(this.initialDocumentUrn)}null===(n=(i=this.args).onDetourComplete)||void 0===n||n.call(i,t)}else(0,s.default)(this,".document-title-form__title-input--has-error")}onExit(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0]
|
|
this.isEdit&&!this.hasDocumentChanged||this._deleteDocumentAsset(this.documentUrn)
|
|
this._removePreview()
|
|
if(e){var t,n
|
|
null===(t=(n=this.args).goToCreation)||void 0===t||t.call(n)}else{var i,r
|
|
null===(i=(r=this.args).closeSharebox)||void 0===i||i.call(r)}}onCloudFilePickerSuccess(e,t){const n=e.skipSizeValidation?p.NO_DOCUMENT_ERROR:(0,p.getDocumentFileValidationError)(e.fileAttributes,e.skipSizeValidation)
|
|
this.documentError=n
|
|
if(!n.errorCode){this.cloudFilePickerFile=e
|
|
this.documentMetadata=e.fileAttributes
|
|
const n=this.tracking.generateControlUrn(p.CONTROL_INTERACTION_EVENTS.UPLOAD_BEGIN)
|
|
this.tracking.fireCustomUrnInteractionEvent(n,"SHORT_PRESS")
|
|
this._uploadDocument(t)}}onCloudFilePickerCancel(){}onCloudFilePickerError(e){const t=e instanceof Error?e:new Error("Error occurred in cloud file picker for document creation")
|
|
this.jet.logError(t,h.JET_TAGS.CLOUD.FILE_SELECT,!1)
|
|
this.documentError=p.CONVERSION_FAILURE_ERROR}},H=(0,i.default)(B.prototype,"i18n",[N],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),G=(0,i.default)(B.prototype,"jet",[U],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),q=(0,i.default)(B.prototype,"lix",[L],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),K=(0,i.default)(B.prototype,"storeShim",[F],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),W=(0,i.default)(B.prototype,"tracking",[z],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Y=(0,i.default)(B.prototype,"vectorMediaUpload",[j],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Q=(0,i.default)(B.prototype,"windowService",[V],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),$=(0,i.default)(B.prototype,"documentBytesLoaded",[d.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),X=(0,i.default)(B.prototype,"documentIngestionProgress",[d.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Z=(0,i.default)(B.prototype,"documentMetadata",[d.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){}}),J=(0,i.default)(B.prototype,"documentUploadResponse",[d.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){}}),ee=(0,i.default)(B.prototype,"documentProcessingResult",[d.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){}}),te=(0,i.default)(B.prototype,"documentError",[d.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){}}),ne=(0,i.default)(B.prototype,"documentProcessingPreviewEntityComponent",[d.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){}}),ie=(0,i.default)(B.prototype,"documentTitle",[d.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),re=(0,i.default)(B.prototype,"documentTitleValidationStatus",[d.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){}}),oe=(0,i.default)(B.prototype,"hasSelectedFileOnce",[d.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ae=(0,i.default)(B.prototype,"cloudFilePickerFile",[d.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){}}),le=(0,i.default)(B.prototype,"documentStatusPoller",[d.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){}}),se=(0,i.default)(B.prototype,"mediaStatusType",[d.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){}}),de=(0,i.default)(B.prototype,"documentMediaUrn",[d.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){}}),(0,i.default)(B.prototype,"onDocumentTitleChange",[f.action],Object.getOwnPropertyDescriptor(B.prototype,"onDocumentTitleChange"),B.prototype),(0,i.default)(B.prototype,"onRetryUploadDocument",[f.action],Object.getOwnPropertyDescriptor(B.prototype,"onRetryUploadDocument"),B.prototype),(0,i.default)(B.prototype,"onClosePreview",[f.action],Object.getOwnPropertyDescriptor(B.prototype,"onClosePreview"),B.prototype),(0,i.default)(B.prototype,"onClickError",[f.action],Object.getOwnPropertyDescriptor(B.prototype,"onClickError"),B.prototype),(0,i.default)(B.prototype,"onNext",[f.action],Object.getOwnPropertyDescriptor(B.prototype,"onNext"),B.prototype),(0,i.default)(B.prototype,"onExit",[f.action],Object.getOwnPropertyDescriptor(B.prototype,"onExit"),B.prototype),(0,i.default)(B.prototype,"onCloudFilePickerSuccess",[f.action],Object.getOwnPropertyDescriptor(B.prototype,"onCloudFilePickerSuccess"),B.prototype),(0,i.default)(B.prototype,"onCloudFilePickerCancel",[f.action],Object.getOwnPropertyDescriptor(B.prototype,"onCloudFilePickerCancel"),B.prototype),(0,i.default)(B.prototype,"onCloudFilePickerError",[f.action],Object.getOwnPropertyDescriptor(B.prototype,"onCloudFilePickerError"),B.prototype),B))}))
|
|
define("document-detour/template-registry",[],(function(){}))
|
|
define("document-detour/utils/document-detour-manager",["exports","rsvp","@linkedin/ember-m3-pdsc-model-builder","@ember/object","detour-framework/utils/detour-manager","detour-framework/utils/detour-preview-data","detour-framework/utils/dash-detour-preview-data","detour-framework/utils/detour-status-data","detour-framework/utils/progress-data","detour-framework/utils/detour-constants","document/utils/document-constants","document/utils/document-helpers","document-detour/utils/document-detour-utils"],(function(e,t,n,i,r,o,a,l,s,d,c,u,p){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
class m extends r.default{constructor(){let{documentStatusPoller:e,documentUrn:t,documentMetadata:n,previewComponent:i,dashPreviewComponent:r,ghostUpdateHeadline:c,storeService:u,conversionErrorPreviewStatusData:p}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
|
const m=new s.default({headline:c,thumbnailLiIcon:"document"}),h=new l.default({detourState:d.DETOUR_STATES.SUCCEEDED,progressData:m}),g=new o.default({previewComponent:i,previewState:d.DETOUR_PREVIEW_STATES.IN_PROGRESS})
|
|
super({detourStatusData:h,dashDetourPreviewData:new a.default({previewComponent:r,previewState:d.DETOUR_PREVIEW_STATES.IN_PROGRESS}),detourPreviewData:g,detourType:d.DETOUR_TYPES.DOCUMENT})
|
|
this._detourData={initialDocumentUrn:t,documentMetadata:n,documentBytesLoaded:n.size,initialDetourManager:this}
|
|
this.documentUrn=t
|
|
this.documentMediaRecipes=n.documentUploadResponse.meta.recipes
|
|
this.storeShimService=u
|
|
e.on("ready",this,this._onConversionSuccess)
|
|
e.on("failed",this,this._onConversionError)
|
|
e.on("internal-error",this,this._onPollingFailed)
|
|
this.documentStatusPoller=e
|
|
this.documentProcessingResult=n.document
|
|
this.getShareMedia=this._getShareMedia.bind(this)
|
|
this.getDashShareMedia=this._getDashShareMedia.bind(this)
|
|
this.getShareText=()=>{}
|
|
this.onCancel=this._onCancel.bind(this)
|
|
this._conversionErrorPreviewStatusData=p}_getShareMedia(){return(0,t.resolve)([(0,n.buildModel)("com.linkedin.voyager.contentcreation.ShareMedia",{category:d.SHARE_MEDIA_CATEGORIES.NATIVE_DOCUMENT,mediaUrn:this.documentUrn,title:(0,n.buildModel)("com.linkedin.pemberly.text.AttributedText",{text:this.documentTitle}),recipes:this.documentMediaRecipes})])}_getDashShareMedia(){return(0,t.resolve)([{category:d.SHARE_MEDIA_CATEGORIES.NATIVE_DOCUMENT,mediaUrn:this.documentUrn,title:this.documentTitle,recipes:this.documentMediaRecipes}])}onNext(e){let{documentTitle:t}=e
|
|
this.documentTitle=t
|
|
this._detourStatusData=new l.default({detourState:this._detourStatusData.detourState,progressData:this._detourStatusData.progressData,detourData:Object.assign(this._detourData,{documentTitle:t})})
|
|
this.detourStatus.publishData(this._detourStatusData)
|
|
this.detourComplete=!0
|
|
this.documentProcessingResult&&this._setDocumentPreview()}_onCancel(){this.documentStatusPoller.off("ready",this,this._onConversionSuccess)
|
|
this.documentStatusPoller.off("failed",this,this._onConversionError)
|
|
this.documentStatusPoller.off("internal-error",this,this._onPollingFailed)
|
|
this.documentStatusPoller.stop()
|
|
this.documentUrn&&(0,u.deleteDocumentAsset)({store:this.storeShimService,documentMediaUrn:this.documentUrn,retries:c.ASSET_DELETION_RETRIES})}_setDocumentPreview(){(0,i.set)(this.documentProcessingResult,"title",this.documentTitle)
|
|
this._dashDetourPreviewData=new a.default({previewComponent:(0,p.buildDashDocumentFeedComponentModel)(this.documentProcessingResult),previewState:d.DETOUR_PREVIEW_STATES.SUCCEEDED})
|
|
this.dashDetourPreview.publishData(this._dashDetourPreviewData)
|
|
this._detourPreviewData=new o.default({previewComponent:(0,p.buildDocumentComponentModel)(this.documentProcessingResult),previewState:d.DETOUR_PREVIEW_STATES.SUCCEEDED})
|
|
this.detourPreview.publishData(this._detourPreviewData)
|
|
this._detourStatusData=new l.default({detourState:this._detourStatusData.detourState,progressData:this._detourStatusData.progressData,detourData:Object.assign(this._detourStatusData.detourData,{documentMetadata:Object.assign(this._detourStatusData.detourData.documentMetadata,{document:this.documentProcessingResult}),documentTitle:this.documentProcessingResult.title})})
|
|
this.detourStatus.publishData(this._detourStatusData)}_onConversionSuccess(e){this.documentProcessingResult=e
|
|
this.detourComplete&&this._setDocumentPreview()}_onConversionError(){this.getShareMedia=()=>(0,t.resolve)()
|
|
this._dashDetourPreviewData=new a.default({previewComponent:this._dashDetourPreviewData.previewComponent,previewState:d.DETOUR_PREVIEW_STATES.FAILED,previewStatusData:this._conversionErrorPreviewStatusData})
|
|
this.dashDetourPreview.publishData(this._dashDetourPreviewData)
|
|
this._detourPreviewData=new o.default({previewComponent:this._detourPreviewData.previewComponent,previewState:d.DETOUR_PREVIEW_STATES.FAILED,previewStatusData:this._conversionErrorPreviewStatusData})
|
|
this.detourPreview.publishData(this._detourPreviewData)}_onPollingFailed(){}}e.default=m}))
|
|
define("document-detour/utils/document-detour-utils",["exports","@linkedin/ember-m3-pdsc-model-builder","document/utils/calc-byte-to-string","vector/utils/constants"],(function(e,t,n,i){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.UPLOAD_FAILURE_ERROR=e.PAGE_VIEW_EVENT=e.NO_DOCUMENT_ERROR=e.MODEL_NAMES=e.DASH_MODEL_NAMES=e.CONVERSION_FAILURE_ERROR=e.CONTROL_INTERACTION_EVENTS=e.BAD_TYPE_VALIDATION_ERROR=e.BAD_SIZE_VALIDATION_ERROR=void 0
|
|
e.buildDashDocumentFeedComponentModel=function(e){return(0,t.buildModel)(l.feedComponent,{documentComponent:(0,t.buildModel)(l.documentComponent,{document:e})})}
|
|
e.buildDocumentComponentModel=function(e){return(0,t.buildModel)(s.documentComponent,{document:e,contentType:i.UPLOAD_MEDIA_TYPES.DOCUMENT_SHARING})}
|
|
e.buildEntityDashFeedComponent=function(e,i){return(0,t.buildModel)(l.entityComponent,{image:(0,t.buildModel)(l.imageViewModel,{attributes:[(0,t.buildModel)(l.imageAttribute,{detailDataUnion:(0,t.buildModel)(l.imageAttributeData,{icon:"IMG_STACKED_PAPER_REPORT_56DP"})})]}),title:(0,t.buildModel)(l.textViewModel,{text:(null==e?void 0:e.name)||""}),subtitle:(0,t.buildModel)(l.textViewModel,{text:null!=e&&e.size?(0,n.default)(e.size,i):""})})}
|
|
e.buildEntityFeedComponent=function(e,i){return(0,t.buildModel)(s.entityComponent,{image:(0,t.buildModel)(s.imageViewModel,{attributes:[(0,t.buildModel)(s.imageAttribute,{sourceType:"ART_DECO_ICON",artDecoIcon:"IMG_STACKED_PAPER_REPORT_56DP"})]}),title:(0,t.buildModel)(s.textViewModel,{text:(null==e?void 0:e.name)||""}),subtitle:(0,t.buildModel)(s.textViewModel,{text:null!=e&&e.size?(0,n.default)(e.size,i):""})})}
|
|
e.getDocumentFileValidationError=function(e){const t=e.name,n=e.size
|
|
let l=t.split(".").pop()
|
|
l===t&&(l="")
|
|
if(!i.UPLOAD_VALIDATION_PARAMS.DOCUMENT.ACCEPTED_FILE_EXTENSIONS.includes(l.toLowerCase()))return r
|
|
if(n>i.UPLOAD_VALIDATION_PARAMS.DOCUMENT.MAX_FILE_SIZE_IN_BYTES)return o
|
|
return a}
|
|
const r=e.BAD_TYPE_VALIDATION_ERROR=Object.freeze({errorCode:i.UPLOAD_MEDIA_ERROR_CODES.DOCUMENT_FILETYPE,contentType:i.UPLOAD_MEDIA_TYPES.DOCUMENT_SHARING}),o=e.BAD_SIZE_VALIDATION_ERROR=Object.freeze({errorCode:i.UPLOAD_MEDIA_ERROR_CODES.DOCUMENT_FILESIZE_LIMIT,contentType:i.UPLOAD_MEDIA_TYPES.DOCUMENT_SHARING}),a=(e.UPLOAD_FAILURE_ERROR=Object.freeze({failureType:i.UPLOAD_VALIDATION_PARAMS.DOCUMENT.FAILURE_TYPES.UPLOAD_FAILURE}),e.CONVERSION_FAILURE_ERROR=Object.freeze({failureType:i.UPLOAD_VALIDATION_PARAMS.DOCUMENT.FAILURE_TYPES.CONVERSION_FAILURE}),e.NO_DOCUMENT_ERROR=Object.freeze({failureType:null})),l=(e.PAGE_VIEW_EVENT="flagship3_document_share",e.CONTROL_INTERACTION_EVENTS=Object.freeze({SELECT_FILE_LOCAL:"document_share.select_file_local",SELECT_FILE_DROPBOX:"document_share.select_file_dropbox",SELECT_FILE_ONEDRIVE:"document_share.select_file_onedrive",SELECT_FILE_SLIDESHARE:"document_share.select_file_slideshare",SELECT_FILE_GOOGLE_DRIVE:"document_share.select_file_google_drive",UPLOAD_BEGIN:"document_share.upload_begin",CONFIRM:"document_share.confirm",CANCEL:"document_share.cancel",EXIT:"document_share.exit",DISMISS:"document_share.dismiss",REMOVE_PREVIEW:"document_share.remove_preview",TITLE_LEARN_MORE:"document_share.title_learn_more"}),e.DASH_MODEL_NAMES={entityComponent:"com.linkedin.voyager.dash.feed.component.entity.EntityComponent",imageViewModel:"com.linkedin.voyager.dash.common.image.ImageViewModel",imageAttribute:"com.linkedin.voyager.dash.common.image.ImageAttribute",imageAttributeData:"com.linkedin.voyager.dash.common.image.ImageAttributeData",textViewModel:"com.linkedin.voyager.dash.common.text.TextViewModel",documentComponent:"com.linkedin.voyager.dash.feed.component.document.DocumentComponent",feedComponent:"com.linkedin.voyager.dash.feed.component.FeedComponent"}),s=e.MODEL_NAMES={entityComponent:"com.linkedin.voyager.feed.render.EntityComponent",imageViewModel:"com.linkedin.voyager.common.ImageViewModel",imageAttribute:"com.linkedin.voyager.common.ImageAttribute",textViewModel:"com.linkedin.voyager.common.TextViewModel",documentComponent:"com.linkedin.voyager.feed.render.DocumentComponent"}}))
|
|
define("embedded-designer/modifiers/embed-designer",["exports","@babel/runtime/helpers/esm/initializerDefineProperty","@babel/runtime/helpers/esm/defineProperty","@babel/runtime/helpers/esm/applyDecoratedDescriptor","@babel/runtime/helpers/esm/initializerWarningHelper","ember-modifier","@ember/test-waiters","ember-cli-pemberly-tracking/utils/uuid","@ember/service","designerapp-embedded"],(function(e,t,n,i,r,o,a,l,s,d){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var c,u,p
|
|
e.default=(c=(0,s.inject)("embedded-designer@embedded-designer-service"),u=class extends o.default{constructor(){super(...arguments);(0,t.default)(this,"embeddedDesignerService",p,this)}modify(e,t){let{clientId:n=(0,l.default)(),customUrl:i=null,onDesignerLoad:r,onDesignerLoadError:o,onDesignerDone:s,onDesignerCancel:c,sessionId:u=(0,l.default)(),startingDesignQuery:p="",documentData:m=null,imageDimensions:h=null,customScenario:g=null,enableMotionDesigns:f=!0,usePreProd:b=!1,additionalUserImages:_=null}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}
|
|
const y={baseAppURL:i||(b?"https://designerapp.azurewebsites.net/":"https://designer.microsoft.com"),clientId:n,clientName:"LinkedIn",container:e,correlationId:(0,l.default)(),disableEmbeddedCSPEnforcement:!1,doneMessageOptions:d.DoneMessageOptions.ImageWithDocument,insertMode:!0,sessionId:u,forwardedConfig:m??{documentContent:"{}"},hideProactiveTemplates:!0,suggestionsConfig:{additionalUserImages:_,scenario:g??"Sharebox",enableMotionDesigns:f,startingDesignQuery:p,dimension:h??{width:1080,height:1080},preferredOutputFormatForMotionDesign:"gif"}}
|
|
this.designerInstance=this.embeddedDesignerService.getNewDesignerApp(y);(0,a.waitForPromise)(this.designerInstance.initialize().then(r).catch((function(e){if(o)return o(e)
|
|
throw e})))
|
|
this.designerInstance.on("done",(e=>{const{media:t,mimeType:n,document:i}=e
|
|
s({media:t,mimeType:n,document:i})
|
|
this.designerInstance.destroy()}))
|
|
this.designerInstance.on("cancel",(()=>{c()
|
|
this.designerInstance.destroy()}))}},p=(0,i.default)(u.prototype,"embeddedDesignerService",[c],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),u)}))
|
|
define("embedded-designer/services/embedded-designer-service",["exports","@babel/runtime/helpers/esm/defineProperty","@ember/service","designerapp-embedded"],(function(e,t,n,i){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
class r extends n.default{constructor(){super(...arguments);(0,t.default)(this,"EmbeddedDesignerApp",i.EmbeddedDesignerApp)}get Designer(){return this.EmbeddedDesignerApp}getNewDesignerApp(e){return new this.Designer(e)}getImageFromDesignerBuffer(e,t,n){const i=new Blob([e.buffer],{type:t}),r=new File([i],n,{type:t,lastModified:new Date})
|
|
r.dataUri=URL.createObjectURL(r)
|
|
return r}}e.default=r}))
|
|
define("embedded-designer/template-registry",[],(function(){}))
|
|
define("mini-update/components/actor",["exports","@babel/runtime/helpers/esm/applyDecoratedDescriptor","@ember/template-factory","@ember/helper","@ember/component","@ember/object","@glimmer/component","mini-update/components/helper-component/optional-navigation-context-wrapper","ember-cli-pemberly-tracking/modifiers/track-interaction","artdeco-entity-lockup/components/artdeco-entity-lockup","image-view-model/components/image-view-model","text-view-model/components/text-view-model-v2"],(function(e,t,n,i,r,o,a,l,s,d,c,u){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var p
|
|
e.default=(0,r.setComponentTemplate)((0,n.createTemplateFactory)({id:"A6EXEfnp",block:'[[[1,"\\n "],[8,[32,0],[[4,[32,1],["actor"],[["controlTrackingId"],[[30,2]]]]],[["@navigationContext","@onClick"],[[30,1,["navigationContext"]],[30,0,["handleActorClick"]]]],[["default"],[[[[1,"\\n "],[8,[32,2],[[24,0,"pt3 pb2 ph4"]],[["@size"],[3]],[["default"],[[[[1,"\\n"],[41,[30,1,["image"]],[[[1," "],[8,[30,3,["image"]],[[24,0,"mr1"]],null,[["default"],[[[[1,"\\n "],[8,[32,3],null,[["@entitySize","@images","@isPresenceEnabled"],[3,[30,1,["image"]],true]],null],[1,"\\n "]],[]]]]],[1,"\\n"]],[]],null],[1," "],[8,[30,3,["content"]],[[24,0,"full-width overflow-hidden"]],null,[["default"],[[[[1,"\\n "],[10,0],[14,0,"display-flex"],[12],[1,"\\n "],[8,[30,3,["title"]],[[24,0,"feed-mini-update-actor__name"]],null,[["default"],[[[[1,"\\n "],[8,[32,4],null,[["@tvm"],[[30,1,["name"]]]],null],[1,"\\n "]],[]]]]],[1,"\\n"],[41,[30,1,["supplementaryActorInfo"]],[[[1," "],[10,0],[14,0,"artdeco-entity-lockup__badge ml1"],[12],[1,"\\n "],[10,1],[14,0,"artdeco-entity-lockup__degree feed-mini-update-actor__supplementary-actor-info"],[12],[1,"\\n "],[8,[32,4],null,[["@tvm"],[[30,1,["supplementaryActorInfo"]]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1," "],[13],[1,"\\n"],[41,[30,1,["description"]],[[[1," "],[8,[30,3,["subtitle"]],[[24,0,"feed-mini-update-actor__description"]],null,[["default"],[[[[1,"\\n "],[8,[32,4],null,[["@tvm"],[[30,1,["description"]]]],null],[1,"\\n "]],[]]]]],[1,"\\n"]],[]],null],[1," "]],[]]]]],[1,"\\n "]],[3]]]]],[1,"\\n "]],[]]]]],[1,"\\n "]],["@actor","@trackingId","elements"],false,["if"]]',moduleName:"mini-update/components/actor.gjs",scope:()=>[l.default,s.default,d.default,c.default,u.default],isStrictMode:!0}),(p=class extends a.default{handleActorClick(){const e=(0,o.get)(this.args.actor,"navigationContext.trackingActionType")
|
|
e&&this.args.actionTrackingHandler({actionType:e,actionCategory:"VIEW",controlName:"actor"})}},(0,t.default)(p.prototype,"handleActorClick",[o.action],Object.getOwnPropertyDescriptor(p.prototype,"handleActorClick"),p.prototype),p))}))
|
|
define("mini-update/components/commentary",["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/utils","@ember/service","@ember/object","@glimmer/component","mini-update/components/helper-component/optional-navigation-context-wrapper","ember-cli-pemberly-i18n/helpers/t","@ember/helper","ember-cli-pemberly-tracking/modifiers/track-interaction","hue-web-icons/components/icon","image-view-model/components/image-view-model","text-view-model/components/text-view-model-v2","inline-show-more-text/components/inline-show-more-text"],(function(e,t,n,i,r,o,a,l,s,d,c,u,p,m,h,g,f,b,_){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var y,v,T
|
|
e.default=(0,a.setComponentTemplate)((0,o.createTemplateFactory)({id:"gPVl7t3m",block:'[[[1,"\\n"],[1," "],[10,0],[14,0,"display-flex flex-row"],[12],[1,"\\n"],[41,[30,1,["image"]],[[[1," "],[8,[32,0],[[24,0,"pl4 pv2 pr1"],[4,[32,3],[[52,[30,1,["video"]],"update_video_image","update_image"]],[["controlTrackingId"],[[30,3]]]]],[["@ariaLabelAddition","@navigationContext","@onClick","@disableFocusableNestedLink"],[[28,[32,1],["image","mini-update/components/commentary"],null],[30,1,["navigationContext"]],[28,[32,2],[[30,0,["handleClick"]],[52,[30,1,["video"]],"update_video_image","update_image"]],null],[30,2]]],[["default"],[[[[1,"\\n "],[10,0],[14,0,"relative"],[12],[1,"\\n"],[41,[30,1,["video"]],[[[1," "],[10,1],[14,0,"feed-mini-update-commentary__video-icon"],[12],[1,"\\n "],[8,[32,4],[[24,0,"feed-mini-update-commentary__video-icon-svg"]],[["@type","@size","@name"],["system","small","play"]],null],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1," "],[8,[32,5],null,[["@images","@imgClasses","@imgWidth"],[[30,1,["image"]],"feed-mini-update-commentary__image",64]],null],[1,"\\n "],[13],[1,"\\n "]],[]]]]],[1,"\\n"]],[]],null],[1," "],[8,[32,0],[[16,0,[29,["pr4 pb2 flex-1\\n ",[52,[30,1,["image"]],"pl2","pl4"],"\\n ",[52,[30,0,["needsTopPadding"]],"pt2"]]]],[16,"tabindex",[52,[51,[30,0,["isCommentaryText"]]],"-1"]],[4,[32,3],["commentary_text"],[["controlTrackingId"],[[30,3]]]]],[["@ariaLabelAddition","@navigationContext","@onClick","@disableFocusableNestedLink"],[[30,0,["ariaLabelAddition"]],[30,1,["navigationContext"]],[28,[32,2],[[30,0,["handleClick"]],"commentary_text"],null],[30,2]]],[["default"],[[[[1,"\\n"],[41,[30,1,["commentaryTextContext"]],[[[1," "],[10,1],[14,0,"t-12 t-bold t-black--light block"],[12],[1,"\\n "],[8,[32,6],null,[["@tvm"],[[30,1,["commentaryTextContext"]]]],null],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1," "],[8,[32,7],[[24,0,"m0 break-words t-14 t-black"]],[["@tvm","@lines","@seeMoreText","@seeMoreA11yText","@seeMoreBtnRole","@lightButtonText","@showManualEllipsis","@isDummyButton","@onExpand","@isUserGenerated"],[[30,1,["commentaryText"]],[30,0,["numLines"]],[28,[32,1],["show_more","mini-update/components/commentary"],null],[28,[32,1],["i18n_see_more_a11y_text","mini-update/components/commentary"],null],"link",true,false,true,[30,0,["handleShowMoreTextClick"]],true]],null],[1,"\\n "]],[]]]]],[1,"\\n "],[13],[1,"\\n "]],["@commentary","@disableFocusableNestedLink","@trackingId"],false,["if","unless"]]',moduleName:"mini-update/components/commentary.gjs",scope:()=>[u.default,p.default,m.fn,h.default,g.default,f.default,b.default,_.default],isStrictMode:!0}),(y=(0,s.inject)("tracking"),v=class extends c.default{constructor(){super(...arguments);(0,t.default)(this,"tracking",T,this)}get ariaLabelAddition(){return(0,d.get)(this.args.commentary,"commentaryText.text")||(0,d.get)(this.args.commentary,"commentaryTextContext.text")}get needsTopPadding(){const e=(0,l.isPresent)((0,d.get)(this.args.commentary,"image")),t=(0,l.isPresent)((0,d.get)(this.args.commentary,"commentaryText.text"))
|
|
return e||t}get numLines(){return this.args.nextToContent||(0,l.isPresent)((0,d.get)(this.args.commentary,"commentaryTextContext"))?2:3}get isCommentaryText(){return(0,d.get)(this.args.commentary,"commentaryText.text")||(0,d.get)(this.args.commentary,"commentaryTextContext.text")}handleClick(e){const t=(0,d.get)(this.args.commentary,"navigationContext.trackingActionType")
|
|
t&&this.args.actionTrackingHandler({actionType:t,actionCategory:"VIEW",controlName:e})}handleShowMoreTextClick(){this.tracking.fireInteractionEvent("feed_expand","SHORT_PRESS",this.args.trackingId)}},T=(0,i.default)(v.prototype,"tracking",[y],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),(0,i.default)(v.prototype,"handleClick",[d.action],Object.getOwnPropertyDescriptor(v.prototype,"handleClick"),v.prototype),(0,i.default)(v.prototype,"handleShowMoreTextClick",[d.action],Object.getOwnPropertyDescriptor(v.prototype,"handleShowMoreTextClick"),v.prototype),v))}))
|
|
define("mini-update/components/content",["exports","@babel/runtime/helpers/esm/applyDecoratedDescriptor","@ember/template-factory","@ember/component","@ember/object","@glimmer/component","mini-update/components/helper-component/optional-navigation-context-wrapper","ember-cli-pemberly-i18n/helpers/t","@ember/helper","ember-cli-pemberly-tracking/modifiers/track-interaction","hue-web-icons/components/icon","image-view-model/components/image-view-model","text-view-model/components/text-view-model-v2"],(function(e,t,n,i,r,o,a,l,s,d,c,u,p){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var m
|
|
e.default=(0,i.setComponentTemplate)((0,n.createTemplateFactory)({id:"ssHV0AOR",block:'[[[1,"\\n"],[1," "],[10,0],[15,0,[29,["feed-mini-update-content__card-wrapper\\n ",[52,[30,1,["shouldIndent"]],"feed-mini-update-content--indented"]]]],[12],[1,"\\n"],[41,[30,1,["image"]],[[[1," "],[8,[32,0],[[24,0,"pr3"],[4,[32,3],["update_content_image"],[["controlTrackingId"],[[30,3]]]]],[["@ariaLabelAddition","@navigationContext","@onClick","@disableFocusableNestedLink"],[[28,[32,1],["image","mini-update/components/content"],null],[30,1,["navigationContext"]],[28,[32,2],[[30,0,["handleClick"]],"update_content_image"],null],[30,2]]],[["default"],[[[[1,"\\n "],[10,0],[14,0,"relative"],[12],[1,"\\n"],[41,[30,1,["video"]],[[[1," "],[10,1],[14,0,"feed-mini-update-content__video-icon"],[12],[1,"\\n "],[8,[32,4],[[24,0,"feed-mini-update-content__video-icon-svg"]],[["@type","@size","@name"],["system","small","play"]],null],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1," "],[8,[32,5],null,[["@imgWidth","@images","@imgClasses","@isPresenceEnabled"],[64,[30,1,["image"]],"feed-mini-update-content__image",true]],null],[1,"\\n "],[13],[1,"\\n "]],[]]]]],[1,"\\n"]],[]],null],[1," "],[8,[32,0],[[24,0,"display-flex flex-1 flex-column overflow-hidden"],[4,[32,3],["update_content_text"],[["controlTrackingId"],[[30,3]]]]],[["@ariaLabelAddition","@navigationContext","@onClick","@disableFocusableNestedLink"],[[30,0,["ariaLabelAddition"]],[30,1,["navigationContext"]],[28,[32,2],[[30,0,["handleClick"]],"update_content_text"],null],[30,2]]],[["default"],[[[[1,"\\n"],[41,[30,1,["context"]],[[[1," "],[10,0],[14,0,"display-flex pb1 t-12 t-bold t-black--light"],[12],[1,"\\n "],[10,1],[14,0,"feed-mini-update-content__single-line-text"],[12],[1,"\\n "],[8,[32,6],null,[["@tvm"],[[30,1,["context"]]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n"]],[]],null],[41,[30,1,["title"]],[[[1," "],[10,0],[15,0,[29,["display-flex t-14 t-black t-bold\\n ",[52,[51,[30,1,["context"]]],"pb1"]]]],[12],[1,"\\n "],[10,1],[14,0,"feed-mini-update-content__single-line-text"],[12],[1,"\\n "],[8,[32,6],null,[["@tvm"],[[30,1,["title"]]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n"]],[]],null],[41,[30,1,["subtitle"]],[[[1," "],[10,0],[14,0,"display-flex t-12 t-black--light"],[12],[1,"\\n "],[10,1],[14,0,"feed-mini-update-content__single-line-text"],[12],[1,"\\n "],[8,[32,6],null,[["@tvm"],[[30,1,["subtitle"]]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n"]],[]],null],[41,[30,1,["description"]],[[[1," "],[10,0],[14,0,"display-flex t-12 t-black--light"],[12],[1,"\\n "],[10,1],[14,0,"feed-mini-update-content__single-line-text"],[12],[1,"\\n "],[8,[32,6],null,[["@tvm"],[[30,1,["description"]]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1," "]],[]]]]],[1,"\\n "],[13],[1,"\\n "]],["@content","@disableFocusableNestedLink","@trackingId"],false,["if","unless"]]',moduleName:"mini-update/components/content.gjs",scope:()=>[a.default,l.default,s.fn,d.default,c.default,u.default,p.default],isStrictMode:!0}),(m=class extends o.default{get ariaLabelAddition(){return(0,r.get)(this.args.content,"title.text")}handleClick(e){const t=(0,r.get)(this.args.content,"navigationContext.trackingActionType")
|
|
t&&this.args.actionTrackingHandler({actionType:t,actionCategory:"VIEW",controlName:e})}},(0,t.default)(m.prototype,"handleClick",[r.action],Object.getOwnPropertyDescriptor(m.prototype,"handleClick"),m.prototype),m))}))
|
|
define("mini-update/components/contextual-description",["exports","@babel/runtime/helpers/esm/applyDecoratedDescriptor","@ember/template-factory","@ember/helper","@ember/component","@ember/object","@glimmer/component","mini-update/components/helper-component/optional-navigation-context-wrapper","ember-cli-pemberly-tracking/modifiers/track-interaction","text-view-model/components/text-view-model-v2"],(function(e,t,n,i,r,o,a,l,s,d){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var c
|
|
e.default=(0,r.setComponentTemplate)((0,n.createTemplateFactory)({id:"Ed94DE7b",block:'[[[1,"\\n "],[8,[32,0],[[4,[32,1],["commentary_text"],[["controlTrackingId"],[[30,3]]]]],[["@ariaLabelAddition","@navigationContext","@onClick","@disableFocusableNestedLink"],[[30,0,["ariaLabelAddition"]],[30,1,["navigationContext"]],[30,0,["handleContextualDescriptionClick"]],[30,2]]],[["default"],[[[[1,"\\n "],[10,0],[14,0,"pt1 ph4 t-12 t-black--light"],[12],[1,"\\n "],[10,1],[14,0,"feed-mini-update-contextual-description__text"],[12],[1,"\\n "],[8,[32,2],null,[["@tvm"],[[30,1,["text"]]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "]],[]]]]],[1,"\\n "]],["@contextualDescription","@disableFocusableNestedLink","@trackingId"],false,[]]',moduleName:"mini-update/components/contextual-description.gjs",scope:()=>[l.default,s.default,d.default],isStrictMode:!0}),(c=class extends a.default{get ariaLabelAddition(){return(0,o.get)(this.args.contextualDescription,"text.text")}handleContextualDescriptionClick(){const e=(0,o.get)(this.args.contextualDescription,"navigationContext.trackingActionType")
|
|
e&&this.args.actionTrackingHandler({actionType:e,actionCategory:"VIEW",controlName:"commentary_text"})}},(0,t.default)(c.prototype,"handleContextualDescriptionClick",[o.action],Object.getOwnPropertyDescriptor(c.prototype,"handleContextualDescriptionClick"),c.prototype),c))}))
|
|
define("mini-update/components/helper-component/optional-navigation-context-wrapper",["exports","@ember/template-factory","@ember/helper","@ember/component","@ember/object","@glimmer/component","app-aware-link/components/navigation-context-link","@ember/modifier"],(function(e,t,n,i,r,o,a,l){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
class s extends o.default{get ariaLabel(){let e=(0,r.get)(this.args.navigationContext,"accessibilityText")
|
|
this.args.disableFocusableNestedLink?e=this.args.ariaLabelAddition:this.args.ariaLabelAddition&&(e=`${e}. ${this.args.ariaLabelAddition}`)
|
|
return e}}e.default=s;(0,i.setComponentTemplate)((0,t.createTemplateFactory)({id:"eK4eeogK",block:'[[[1,"\\n"],[41,[30,1],[[[1," "],[8,[32,0],[[17,2],[16,"aria-label",[30,0,["ariaLabel"]]],[24,0,"feed-mini-update-optional-navigation-context-wrapper"],[16,"tabindex",[52,[30,3],"-1","0"]]],[["@href","@invokeAction"],[[30,1,["target"]],[30,4]]],[["default"],[[[[1,"\\n "],[18,5,null],[1,"\\n "]],[]]]]],[1,"\\n"]],[]],[[[1," "],[11,3],[24,0,"feed-mini-update-optional-navigation-context-wrapper"],[24,6,"#"],[16,"tabindex",[52,[30,3],"-1","0"]],[17,2],[4,[32,1],["click",[30,4]],null],[12],[1,"\\n "],[18,5,null],[1,"\\n "],[13],[1,"\\n"]],[]]],[1," "]],["@navigationContext","&attrs","@disableFocusableNestedLink","@onClick","&default"],false,["if","yield"]]',moduleName:"mini-update/components/helper-component/optional-navigation-context-wrapper.gjs",scope:()=>[a.default,l.on],isStrictMode:!0}),s)}))
|
|
define("mini-update/components/interstitial-container",["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/helper","@ember/component","@ember/service","@ember/object","@glimmer/component","ember-cli-pemberly-tracking/modifiers/track-impression","interstitial-view-model/components/click-through-interstitial","interstitial-view-model/components/non-click-through-interstitial"],(function(e,t,n,i,r,o,a,l,s,d,c,u,p,m){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var h,g,f
|
|
e.default=(0,l.setComponentTemplate)((0,o.createTemplateFactory)({id:"VG9dqS98",block:'[[[1,"\\n "],[11,0],[24,0,"feed-mini-update-interstitial-container"],[17,1],[4,[32,0],null,[["registerOnImpression","routeName","currentRoute"],[[30,0,["handleImpressionTracking"]],[28,[32,1],[[53,"outletState"],"render.name"],null],[28,[32,1],[[53,"outletState"],"render"],null]]]],[12],[1,"\\n"],[41,[30,0,["isClickThroughInterstitial"]],[[[1," "],[8,[32,2],[[16,0,[29,[[52,[30,0,["isSmallInterstitial"]],"feed-mini-update-click-through-interstitial-container--small","feed-mini-update-click-through-interstitial-container"]]]]],[["@clickThroughAction","@explanatoryLinkControlName","@model","@showClickThroughOverlay","@isSmallInterstitial","@hideClickThroughButton","@showInlineExplanatoryLink","@styleConfig","@useDash"],[[30,0,["clickThroughAction"]],"trust_sign_post_learn_more",[30,0,["model"]],[30,0,["shouldShowInterstitial"]],true,[30,0,["hideInterstitialClickThroughButton"]],[30,0,["isSmallInterstitial"]],[30,0,["styleConfig"]],true]],[["default"],[[[[1,"\\n "],[18,2,null],[1,"\\n "]],[]]]]],[1,"\\n"]],[]],[[[1," "],[8,[32,3],null,[["@model","@useDash","@styleConfig","@hideExplanatoryLink"],[[30,0,["model"]],true,[30,0,["styleConfig"]],true]],null],[1,"\\n"]],[]]],[1," "],[13],[1,"\\n "]],["&attrs","&default"],false,["-get-dynamic-var","if","yield"]]',moduleName:"mini-update/components/interstitial-container.gjs",scope:()=>[u.default,a.get,p.default,m.default],isStrictMode:!0}),(h=(0,s.inject)("tracking"),g=class extends c.default{constructor(){super(...arguments);(0,t.default)(this,"tracking",f,this)}get isClickThroughInterstitial(){return(0,d.get)(this.model,"shouldBlurContent")}get isSmallInterstitial(){return"SMALL"===this.args.templateType}get hideInterstitialClickThroughButton(){return!(0,d.get)(this.model,"clickThroughActionText")}get model(){return this.args.interstitialViewModel}get shouldShowInterstitial(){return(0,d.get)(this.model,"shouldShowInterstitial")}get styleConfig(){return this.isClickThroughInterstitial&&this.isSmallInterstitial?{icon:"feed-mini-update-click-through-interstitial-container--small-icon",innerContent:"feed-mini-update-click-through-interstitial-container--small-content",explanatoryText:"feed-mini-update-click-through-interstitial-container--small-explanatory-text",ctaSize:"1"}:this.isClickThroughInterstitial?{icon:"feed-mini-update-click-through-interstitial-container--icon",innerContent:"feed-mini-update-click-through-interstitial-container--content"}:this.isClickThroughInterstitial?{}:{explanatoryText:"text-body-small text-align-left ml3",innerContent:"feed-mini-update-non-click-through-interstitial-container--inner-content"}}get trackingId(){return(0,d.get)(this.model,"trackingId")}get trackingControlUrn(){const e=this.isClickThroughInterstitial?"click_through_interstitial":"non_click_through_interstitial"
|
|
return this.tracking.generateControlUrn(e)}get shouldFireImpressionEvent(){return this.shouldShowInterstitial}clickThroughAction(){(0,d.set)(this.model,"shouldShowInterstitial",!1)
|
|
this.args.actionTrackingHandler({actionType:"seeMore",actionCategory:"EXPAND",controlName:"trust_sign_post_see_more",accessoryTrackingId:this.trackingId})}handleImpressionTracking(){var e
|
|
const t=null===(e=this.args.updateTrackingObj)||void 0===e?void 0:e.generateFeedAccessoryImpressionEventBody([{accessoryEntityUrn:this.args.backendUrn,accessoryTrackingId:this.trackingId,controlUrn:this.trackingControlUrn}],this.trackingId)
|
|
return()=>t&&this.shouldFireImpressionEvent?{name:"FeedAccessoryImpressionEvent",body:t}:[]}},f=(0,i.default)(g.prototype,"tracking",[h],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),(0,i.default)(g.prototype,"clickThroughAction",[d.action],Object.getOwnPropertyDescriptor(g.prototype,"clickThroughAction"),g.prototype),(0,i.default)(g.prototype,"handleImpressionTracking",[d.action],Object.getOwnPropertyDescriptor(g.prototype,"handleImpressionTracking"),g.prototype),g))}))
|
|
define("mini-update/components/mini-update-base",["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/helper","@ember/component","@ember/utils","global-utils/utils/tracking-id","feed-tracking/utils/update-tracking-obj","@ember/service","@ember/object","@glimmer/component","mini-update/components/interstitial-container","ember-element-helper/helpers/element","ember-cli-pemberly-tracking/modifiers/track-impression","mini-update/components/actor","mini-update/components/contextual-description","mini-update/components/commentary","mini-update/components/content"],(function(e,t,n,i,r,o,a,l,s,d,c,u,p,m,h,g,f,b,_,y,v){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var T,E,S,w,k,C,D
|
|
e.default=(0,l.setComponentTemplate)((0,o.createTemplateFactory)({id:"RAweVhbD",block:'[[[1,"\\n"],[44,[[52,[30,0,["hasInterstitial"]],[50,[32,0],0,null,[["interstitialViewModel","templateType","backendUrn","actionTrackingHandler","updateTrackingObj"],[[30,1,["interstitial","interstitial"]],[30,1,["interstitial","templateType"]],[30,1,["metadata","backendUrn"]],[30,0,["actionTrackingHandler"]],[30,0,["updateTrackingObj"]]]]],[28,[32,1],[""],null]]],[[[1," "],[11,0],[17,3],[16,0,[29,["display-flex flex-column\\n ",[52,[30,0,["isContentComponentLast"]],"pb4"],[52,[30,0,["isCommentaryComponentLast"]],"pb2"]]]],[4,[32,2],null,[["registerOnImpression","thresholdMillisecondsInViewport","thresholdPercentageInViewport","routeName","currentRoute"],[[30,0,["onTrackImpression"]],0,50,[28,[32,3],[[53,"outletState"],"render.name"],null],[28,[32,3],[[53,"outletState"],"render"],null]]]],[12],[1,"\\n"],[41,[30,0,["showActor"]],[[[1," "],[8,[32,4],null,[["@actor","@actionTrackingHandler","@trackingId"],[[30,1,["actor"]],[30,0,["actionTrackingHandler"]],[30,0,["trackingId"]]]],null],[1,"\\n"]],[]],null],[41,[30,0,["showContextualDescription"]],[[[1," "],[8,[32,5],null,[["@contextualDescription","@actionTrackingHandler","@trackingId"],[[30,1,["contextualDescription"]],[30,0,["actionTrackingHandler"]],[30,0,["trackingId"]]]],null],[1,"\\n"]],[]],null],[1," "],[8,[30,2],null,null,[["default"],[[[[1,"\\n"],[41,[30,0,["showCommentary"]],[[[1," "],[8,[32,6],null,[["@commentary","@nextToContent","@actionTrackingHandler","@trackingId"],[[30,1,["commentary"]],[30,0,["hasContentComponent"]],[30,0,["actionTrackingHandler"]],[30,0,["trackingId"]]]],null],[1,"\\n"]],[]],null],[41,[30,0,["showContent"]],[[[1," "],[8,[32,7],null,[["@content","@actionTrackingHandler","@trackingId"],[[30,1,["content"]],[30,0,["actionTrackingHandler"]],[30,0,["trackingId"]]]],null],[1,"\\n"]],[]],null],[1," "]],[]]]]],[1,"\\n "],[13],[1,"\\n"]],[2]]],[1," "]],["@miniUpdate","MaybeInterstitialWrapper","&attrs"],false,["let","if","component","-get-dynamic-var"]]',moduleName:"mini-update/components/mini-update-base.gjs",scope:()=>[h.default,g.default,f.default,a.get,b.default,_.default,y.default,v.default],isStrictMode:!0}),(T=(0,u.inject)("feed-tracking@feed-action-event"),E=(0,u.inject)("feed-tracking@sponsored-action-tracking"),S=(0,u.inject)("tracking"),w=class extends m.default{constructor(){super(...arguments);(0,t.default)(this,"feedActionEvent",k,this);(0,t.default)(this,"sponsoredActionTracking",C,this);(0,t.default)(this,"tracking",D,this)}get trackingId(){return(0,d.getByteStringAsBase64)((0,p.get)(this.args.miniUpdate,"metadata.trackingId"))}get hasInterstitial(){return(0,s.isPresent)((0,p.get)(this.args.miniUpdate,"interstitial"))}get showActor(){return!this.args.hideActor&&(0,p.get)(this.args.miniUpdate,"actor")}get showContextualDescription(){return!this.args.hideContextualDescription&&(0,p.get)(this.args.miniUpdate,"contextualDescription")}get showCommentary(){return!this.args.hideCommentary&&(0,p.get)(this.args.miniUpdate,"commentary")}get showContent(){return!this.args.hideContent&&(0,p.get)(this.args.miniUpdate,"content")}get showSocialActivityCounts(){const e=(0,p.get)(this.args.miniUpdate,"socialActivityCounts")
|
|
if(this.args.hideSocialActivityCounts||!(0,s.isPresent)(e))return!1
|
|
const t=(0,p.get)(e,"numComments")>0,n=(0,p.get)(e,"numShares")>0,i=(0,p.get)(e,"reactionTypeCounts.length")>0
|
|
return t||n||i}get hasContentComponent(){return!!(0,p.get)(this.args.miniUpdate,"content")}get isCommentaryComponentLast(){return!this.showSocialActivityCounts&&!this.showContent}get isContentComponentLast(){return!this.showSocialActivityCounts&&this.showContent}get updateTrackingObj(){return new c.default({urn:(0,p.get)(this.args.miniUpdate,"metadata.backendUrn"),trackingData:{trackingId:this.trackingId}},this.feedActionEvent,this.sponsoredActionTracking,this.tracking)}get areSocialCountsClickable(){return this.args.areSocialCountsClickable??!0}actionTrackingHandler(e){const t={}
|
|
this.args.customModuleKey&&(t.moduleKey=this.args.customModuleKey)
|
|
this.updateTrackingObj.fireFeedActionEvent(e,t)}onTrackImpression(){const{"miniUpdate.metadata.trackingId":e,"miniUpdate.metadata.backendUrn":t,listPositionIndex:n}=(0,p.getProperties)(this.args,["miniUpdate.metadata.trackingId","miniUpdate.metadata.backendUrn","listPositionIndex"])
|
|
return n?i=>{const r=new Date
|
|
let o
|
|
if(i.boundingClientRect){var a,l
|
|
o={width:null===(a=i.boundingClientRect)||void 0===a?void 0:a.width,height:null===(l=i.boundingClientRect)||void 0===l?void 0:l.height}}return{name:"FeedImpressionEvent",body:{timeZoneOffsetMinutes:-1*r.getTimezoneOffset(),entities:[{urn:t,trackingId:e,size:o,listPosition:{index:n},duration:i.duration,visibleTime:i.visibleTime||0}]}}}:()=>[]}},k=(0,i.default)(w.prototype,"feedActionEvent",[T],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),C=(0,i.default)(w.prototype,"sponsoredActionTracking",[E],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),D=(0,i.default)(w.prototype,"tracking",[S],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),(0,i.default)(w.prototype,"actionTrackingHandler",[p.action],Object.getOwnPropertyDescriptor(w.prototype,"actionTrackingHandler"),w.prototype),(0,i.default)(w.prototype,"onTrackImpression",[p.action],Object.getOwnPropertyDescriptor(w.prototype,"onTrackImpression"),w.prototype),w))}))
|
|
define("mini-update/template-registry",[],(function(){}))
|
|
define("organization-targeting-audience/components/audience-company-size",["exports","@babel/runtime/helpers/esm/defineProperty","@babel/runtime/helpers/esm/applyDecoratedDescriptor","@ember/template-factory","@ember/component","@glimmer/component","@ember/object","ember-cli-pemberly-i18n/helpers/t","@ember/modifier","@ember/helper"],(function(e,t,n,i,r,o,a,l,s,d){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var c
|
|
const u={0:{start:0,end:1,label:"Self-employed"},2:{start:2,end:10,label:"2-10"},11:{start:11,end:50,label:"11-50"},51:{start:51,end:200,label:"51-200"},201:{start:201,end:500,label:"201-500"},501:{start:501,end:1e3,label:"501-1000"},1001:{start:1001,end:5e3,label:"1001-5000"},5001:{start:5001,end:1e4,label:"5001-10000"},10001:{start:10001,label:"10000+"}}
|
|
e.default=(0,r.setComponentTemplate)((0,i.createTemplateFactory)({id:"ICiQjSOT",block:'[[[1,"\\n"],[1,"\\n "],[11,0],[24,0,"audience-company-size"],[17,1],[12],[1,"\\n "],[10,2],[14,0,"t-16 t-black t-bold"],[12],[1,"\\n "],[1,[28,[32,0],["i18n_organization_company_size","organization-targeting-audience/components/audience-company-size"],null]],[1,"\\n "],[13],[1,"\\n\\n "],[10,0],[14,0,"company-size-container"],[12],[1,"\\n"],[42,[28,[31,1],[[28,[31,1],[[30,0,["sizeRanges"]]],null]],null],null,[[[1," "],[10,0],[14,0,"company-size-column"],[12],[1,"\\n"],[42,[28,[31,1],[[28,[31,1],[[30,2]],null]],null],null,[[[1," "],[11,"input"],[16,1,[30,3,["label"]]],[16,"checked",[52,[28,[32,1],[[30,0,["isSelectedRanges"]],[30,3,["label"]]],null],"checked"]],[16,"disabled",[30,5]],[24,4,"checkbox"],[4,[32,2],["change",[28,[32,3],[[30,0,["toggleStaffCountRange"]],[30,3]],null]],null],[12],[13],[1,"\\n "],[10,"label"],[15,"for",[30,3,["label"]]],[12],[1,"\\n"],[41,[30,3,["start"]],[[[41,[30,3,["end"]],[[[1," "],[1,[28,[32,0],["i18n_organization_company_staff_range","organization-targeting-audience/components/audience-company-size"],[["start","end"],[[30,3,["start"]],[30,3,["end"]]]]]],[1,"\\n"]],[]],[[[1," "],[1,[28,[32,0],["i18n_organization_company_staff_range_no_end","organization-targeting-audience/components/audience-company-size"],[["start"],[[30,3,["start"]]]]]],[1,"\\n"]],[]]]],[]],[[[1," "],[1,[28,[32,0],["i18n_organization_company_self_employed","organization-targeting-audience/components/audience-company-size"],null]],[1,"\\n"]],[]]],[1," "],[13],[1,"\\n"]],[3,4]],null],[1," "],[13],[1,"\\n"]],[2]],null],[1," "],[13],[1,"\\n "],[13],[1,"\\n "]],["&attrs","rangeArray","range","index","@isDisabled"],false,["each","-track-array","if"]]',moduleName:"organization-targeting-audience/components/audience-company-size.gjs",scope:()=>[l.default,d.get,s.on,d.fn],isStrictMode:!0}),(c=class extends o.default{constructor(){super(...arguments);(0,t.default)(this,"sizeRanges",function(){const e=Object.keys(u).map((e=>u[e])),t=[]
|
|
for(;e.length;)t.push(e.splice(0,3))
|
|
return t}())}get isSelectedRanges(){return(this.args.staffCountRanges??[]).reduce(((e,t)=>{let{start:n}=t
|
|
if(u[n]){const{label:t}=u[n]
|
|
e[t]=!0}return e}),{})}toggleStaffCountRange(e){if(this.isSelectedRanges[e.label]){const t=this.args.staffCountRanges.find((t=>t.start===e.start))
|
|
this.args.removeStaffCountRange(t)}else this.args.addStaffCountRange(e.start,e.end)}},(0,n.default)(c.prototype,"toggleStaffCountRange",[a.action],Object.getOwnPropertyDescriptor(c.prototype,"toggleStaffCountRange"),c.prototype),c))}))
|
|
define("organization-targeting-audience/components/audience-selection",["exports","@babel/runtime/helpers/esm/initializerDefineProperty","@babel/runtime/helpers/esm/defineProperty","@babel/runtime/helpers/esm/classPrivateMethodGet","@babel/runtime/helpers/esm/applyDecoratedDescriptor","@babel/runtime/helpers/esm/initializerWarningHelper","@ember/template-factory","@ember/component","graphql-queries/queries/search/search-reusable-typeahead-collection-finder-type-query.graphql","graphql-queries/queries/organizations/geo-with-default-localized-name.graphql","data-layer/utils/organization/models/target","@ember/object/internals","@glimmer/tracking","@ember/object","@ember/service","@ember/runloop","data-layer/utils/organization/resource-to-url-map","global-utils/utils/is-browser","@glimmer/component","@ember/destroyable","artdeco-pill/components/artdeco-pill-dismiss","ember-cli-pemberly-i18n/helpers/t","@ember/helper","organization-targeting-audience/components/typeahead-input","text-view-model/components/text-view-model-v2","ember-cli-pemberly-tracking/modifiers/track-interaction","@ember/modifier","hue-web-icons/components/icon"],(function(e,t,n,i,r,o,a,l,s,d,c,u,p,m,h,g,f,b,_,y,v,T,E,S,w,k,C,D){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var O,A,I,P,x,M,R,N,U,L
|
|
const F=["function","language","seniority","staffCountRange"],z=Object.freeze({GEO_REGION:{type:"GEO",geoSearchTypes:["ADMIN_DIVISION_1","COUNTRY_REGION","MARKET_AREA","POPULATED_PLACE"]},countryGroups:{type:"GEO",geoSearchTypes:["CONTINENT","COUNTRY_CLUSTER"]},INDUSTRY:{type:"INDUSTRY"},SCHOOL:{type:"SCHOOL"}})
|
|
e.default=(0,l.setComponentTemplate)((0,a.createTemplateFactory)({id:"L/7+DVq+",block:'[[[1,"\\n"],[1," "],[11,0],[16,1,[30,0,["elId"]]],[24,0,"edit-audience-selection"],[17,1],[12],[1,"\\n "],[10,0],[14,0,"clearfix"],[12],[1,"\\n "],[10,"h4"],[15,0,[29,["fl t-16 t-bold ",[30,2]]]],[12],[1,"\\n "],[1,[30,3]],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[10,"ul"],[14,0,"clearfix"],[12],[1,"\\n"],[41,[30,0,["showSelectedValues"]],[[[42,[28,[31,2],[[28,[31,2],[[30,4]],null]],null],null,[[[1," "],[10,"li"],[14,0,"audience-target-item audience-toggle-pill"],[12],[1,"\\n "],[8,[32,0],null,[["@disabled","@text","@a11yText","@size","@onDismiss"],[[30,7],[30,5,["localizedName"]],[28,[32,1],["i18n_audience_pill_a11y_text","organization-targeting-audience/components/audience-selection"],[["audienceType","localizedName"],[[30,3],[30,5,["localizedName"]]]]],3,[28,[32,2],[[30,0,["removeNewTargetFromPill"]],[30,5]],null]]],null],[1,"\\n "],[13],[1,"\\n"]],[5,6]],null]],[]],null],[1,"\\n"],[41,[30,0,["isAddingNewTarget"]],[[[1," "],[10,"li"],[14,0,"audience-target-item audience-toggle-pill-edit"],[14,"data-artdeco-focus","true"],[12],[1,"\\n "],[8,[32,3],null,[["@shouldAutoFocus","@inputId","@labelText","@placeholderString","@onSelectSuggestion","@onDismissAction","@onFetch","@fetchOnFocus","@loadingIconLabel","@resultItemClasses"],[true,[29,[[30,0,["elId"]]," audience-selection-ta"]],[30,8],[30,8],[30,0,["addNewTargetFromPill"]],[30,0,["removeBlankPill"]],[30,0,["onFetchTypeaheadSuggestions"]],[30,9],[28,[32,1],["i18n_loading_audience_suggestions_a11y","organization-targeting-audience/components/audience-selection"],null],[30,10]]],[["default"],[[[[1,"\\n "],[10,0],[14,0,"EntityLockup-square-4"],[12],[1,"\\n"],[41,[30,11,["suggestion","title"]],[[[1," "],[8,[32,4],null,[["@tvm"],[[30,11,["suggestion","title"]]]],null],[1,"\\n"]],[]],[[[1," "],[1,[30,11,["suggestion","text","text"]]],[1,"\\n"]],[]]],[1," "],[13],[1,"\\n "]],[11]]]]],[1,"\\n "],[13],[1,"\\n"]],[]],[[[1," "],[10,"li"],[14,0,"audience-target-item"],[12],[1,"\\n "],[11,"button"],[16,0,[29,["audience-add-button artdeco-button artdeco-button--tertiary\\n ",[52,[30,12],"artdeco-button--muted"]]]],[16,"disabled",[30,7]],[24,4,"button"],[4,[32,5],[[30,13]],null],[4,[32,6],["click",[30,0,["showBlankPill"]]],null],[12],[1,"\\n "],[8,[32,7],null,[["@type","@name","@size"],["system","add","small"]],null],[1,"\\n "],[1,[30,14]],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n"]],[]]],[1," "],[13],[1,"\\n "],[13],[1,"\\n "]],["&attrs","@labelClassName","@audienceType","@targetAudiences","audience","index","@isDisabled","@typeaheadPlaceholder","@fetchOnFocus","@resultItemClasses","typeahead","@isMuted","@addAudienceButtonControlName","@addAudienceLabel"],false,["if","each","-track-array"]]',moduleName:"organization-targeting-audience/components/audience-selection.gjs",scope:()=>[v.default,T.default,E.fn,S.default,w.default,k.default,C.on,D.default],isStrictMode:!0}),(O=(0,h.inject)("global-services@store-shim"),A=(0,h.inject)("organization-targeting-audience@targeting-facets"),I=(0,h.inject)("@linkedin/ember-restli-graphql@graphql"),P=(L=new WeakSet,class extends _.default{constructor(){super(...arguments)
|
|
L.add(this);(0,t.default)(this,"storeShim",x,this);(0,t.default)(this,"targetingFacets",M,this);(0,t.default)(this,"graphql",R,this);(0,t.default)(this,"lix",N,this);(0,n.default)(this,"elId",void 0);(0,t.default)(this,"isAddingNewTarget",U,this);(0,n.default)(this,"targetAudienceSegments",this.shouldUseDashTargetedContentsResource?c.DASH_TARGET_AUDIENCE_SEGMENTS:c.TARGET_AUDIENCE_SEGMENTS)
|
|
this.elId=(0,u.guidFor)(this)}get shouldUseDashTargetedContentsResource(){return this.lix.getTreatmentIsEnabled("voyager.web.organization-admin-use-dash-targeted-contents")}get showSelectedValues(){return this.args.showSelectedValues??!0}showBlankPill(){this.isAddingNewTarget=!0}removeBlankPill(){this.isAddingNewTarget=!1}addNewTargetFromPill(e){const t=this.args.typeaheadTypes
|
|
if(t===this.targetAudienceSegments.countryGroups){var n,r
|
|
const t=null==e||null===(n=e.target)||void 0===n||null===(r=n.geo)||void 0===r?void 0:r.entityUrn
|
|
this.graphql.executeQuery(d.default,{regionGeoUrn:t}).then((e=>{if((0,y.isDestroying)(this))return
|
|
const{elements:t}=e.data.dashGeoByRegion,n=null==t?void 0:t.length
|
|
t.forEach(((e,t)=>{this.args.addAudienceTarget(e,t+1,n)}))}))}else if(t!==c.TYPEAHEAD_TYPES.school||this.shouldUseDashTargetedContentsResource)this.args.addAudienceTarget(e)
|
|
else{var o,a
|
|
const t=null==e||null===(o=e.target)||void 0===o||null===(a=o.company)||void 0===a?void 0:a.entityUrn,{title:n}=e
|
|
this.storeShim.queryURL(`${f.urlsMap.OrganizationDashCompaniesResource}/${t}`).then((e=>{if((0,y.isDestroying)(this))return
|
|
const{schoolUrn:t}=e,i={title:n,hitInfo:{school:{entityUrn:t}}}
|
|
this.args.addAudienceTarget(i)}))}(0,g.scheduleOnce)("afterRender",this,(0,i.default)(this,L,j))}removeNewTargetFromPill(e){this.args.removeAudienceTarget(e)
|
|
if(b.default&&!this.isDestroying){const e=document.querySelector(`#${this.elId} .audience-add-button`)
|
|
e&&e.focus()}}onFetchTypeaheadSuggestions(e){const t=this.args.typeaheadTypes
|
|
if(F.includes(t))return this.targetingFacets.getTypeaheadHits(t,e,this.args.dashOrganizationUrn).then((e=>e[0]))
|
|
if(z[t]){const{type:n,geoSearchTypes:i}=z[t]
|
|
return this.graphql.executeQuery(s.default,{keywords:0===e.length?"a":e,query:{typeaheadFilterQuery:{...i&&{geoSearchTypes:i}}},type:n}).then((e=>{var t
|
|
return null==e||null===(t=e.data)||void 0===t?void 0:t.searchDashReusableTypeaheadByType}))}return null}}),x=(0,r.default)(P.prototype,"storeShim",[O],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),M=(0,r.default)(P.prototype,"targetingFacets",[A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),R=(0,r.default)(P.prototype,"graphql",[I],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),N=(0,r.default)(P.prototype,"lix",[h.inject],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),U=(0,r.default)(P.prototype,"isAddingNewTarget",[p.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),(0,r.default)(P.prototype,"showBlankPill",[m.action],Object.getOwnPropertyDescriptor(P.prototype,"showBlankPill"),P.prototype),(0,r.default)(P.prototype,"removeBlankPill",[m.action],Object.getOwnPropertyDescriptor(P.prototype,"removeBlankPill"),P.prototype),(0,r.default)(P.prototype,"addNewTargetFromPill",[m.action],Object.getOwnPropertyDescriptor(P.prototype,"addNewTargetFromPill"),P.prototype),(0,r.default)(P.prototype,"removeNewTargetFromPill",[m.action],Object.getOwnPropertyDescriptor(P.prototype,"removeNewTargetFromPill"),P.prototype),(0,r.default)(P.prototype,"onFetchTypeaheadSuggestions",[m.action],Object.getOwnPropertyDescriptor(P.prototype,"onFetchTypeaheadSuggestions"),P.prototype),P))
|
|
function j(){if(b.default&&!this.isDestroying){const e=document.querySelectorAll(`#${this.elId} .audience-toggle-pill`),t=e.length&&e[e.length-1]
|
|
t&&t.focus()}}}))
|
|
define("organization-targeting-audience/components/confirm-targeting-strings",["exports","@ember/template-factory","@ember/component/template-only","@ember/component"],(function(e,t,n,i){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
const r=(0,i.setComponentTemplate)((0,t.createTemplateFactory)({id:"uYr5GKJB",block:'[[[1,"\\n"],[1,"\\n"],[1," "]],[],false,[]]',moduleName:"organization-targeting-audience/components/confirm-targeting-strings.gts",isStrictMode:!0}),(0,n.default)("confirm-targeting-strings","ConfirmTargetingStrings"))
|
|
e.default=r}))
|
|
define("organization-targeting-audience/components/estimated-audience",["exports","@ember/template-factory","@ember/component","@glimmer/component","ember-cli-pemberly-i18n/helpers/t","ember-cli-pemberly-i18n/helpers/format-number"],(function(e,t,n,i,r,o){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
class a extends i.default{get hasError(){return!(!this.args.isTargetedAudienceTooBroad&&!this.args.isTargetedAudienceTooNarrow)}get isDescriptionVisible(){return!this.hasError}}e.default=a;(0,n.setComponentTemplate)((0,t.createTemplateFactory)({id:"T/LzaH9/",block:'[[[1,"\\n"],[1,"\\n "],[11,0],[24,0,"org-estimated-audience"],[17,1],[12],[1,"\\n "],[10,0],[15,0,[29,["org-estimated-audience__estimate-container\\n ",[52,[30,0,["hasError"]],"org-estimated-audience__estimate-container--wide"]]]],[12],[1,"\\n "],[10,"h2"],[14,0,"t-16"],[12],[1,"\\n "],[1,[28,[32,0],["i18n_org_estimated_target_audience","organization-targeting-audience/components/estimated-audience"],null]],[1,"\\n "],[13],[1,"\\n "],[10,0],[12],[1,"\\n"],[41,[30,2],[[[1," "],[10,1],[14,0,"org-estimated-audience__description--error t-14"],[12],[1,"\\n "],[1,[28,[32,0],["i18n_org_targeting_too_broad","organization-targeting-audience/components/estimated-audience"],null]],[1,"\\n "],[13],[1,"\\n "],[10,1],[14,0,"t-14"],[12],[1,"\\n "],[1,[30,3]],[1,"\\n "],[13],[1,"\\n"]],[]],[[[41,[30,4],[[[1," "],[10,1],[14,0,"org-estimated-audience__description--error t-14"],[12],[1,"\\n "],[1,[30,5]],[1,"\\n "],[13],[1,"\\n "],[10,1],[14,0,"t-14"],[12],[1,"\\n "],[1,[30,3]],[1,"\\n "],[13],[1,"\\n"]],[]],[[[41,[30,6],[[[1," "],[10,1],[14,0,"org-estimated-audience__number t-32"],[12],[1,"\\n "],[1,[28,[32,1],[[30,6]],null]],[1,"\\n "],[13],[1,"\\n "]],[]],null]],[]]]],[]]],[1," "],[13],[1,"\\n "],[13],[1,"\\n\\n"],[41,[30,0,["isDescriptionVisible"]],[[[1," "],[10,0],[14,0,"pl6"],[12],[1,"\\n "],[10,2],[14,0,"t-14 t-black--light"],[12],[1,"\\n "],[1,[30,7]],[1,"\\n "],[13],[1,"\\n "],[10,2],[14,0,"t-14"],[12],[1,"\\n "],[1,[30,3]],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1," "],[13],[1,"\\n "]],["&attrs","@isTargetedAudienceTooBroad","@helpMessage","@isTargetedAudienceTooNarrow","@targetingTooNarrowMessage","@numMembersTargeted","@numMembersTargetedDescription"],false,["if"]]',moduleName:"organization-targeting-audience/components/estimated-audience.gts",scope:()=>[r.default,o.default],isStrictMode:!0}),a)}))
|
|
define("organization-targeting-audience/components/estimated-target-audience",["exports","@ember/template-factory","@ember/component/template-only","@ember/component","ember-cli-pemberly-i18n/helpers/t","ember-cli-pemberly-i18n/helpers/format-number","@ember/helper"],(function(e,t,n,i,r,o,a){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
const l=(0,i.setComponentTemplate)((0,t.createTemplateFactory)({id:"LPdWzAq2",block:'[[[1,"\\n"],[1,"\\n "],[10,0],[14,0,"org-estimated-target-audience"],[12],[1,"\\n "],[10,"header"],[14,0,"pt5 pb4"],[12],[1,"\\n "],[10,"h2"],[14,0,"org-estimated-target-audience__title t-16 t-black t-bold"],[12],[1,"\\n "],[1,[28,[32,0],["i18n_org_admin_estimated_target_audience","organization-targeting-audience/components/estimated-target-audience"],null]],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[10,0],[14,0,"mb4"],[12],[1,"\\n"],[41,[30,1],[[[1," "],[10,2],[14,0,"org-estimated-target-audience__too-broad-message t-14 t-black--light t-normal pb4"],[12],[1,"\\n "],[1,[28,[32,0],["i18n_org_admin_targeting_too_broad","organization-targeting-audience/components/estimated-target-audience"],null]],[1,"\\n "],[13],[1,"\\n"]],[]],[[[41,[51,[30,2]],[[[1," "],[10,2],[14,0,"org-estimated-target-audience__number t-40 t-black t-normal"],[12],[1,"\\n "],[1,[28,[32,1],[[30,3]],null]],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1," "],[10,2],[15,0,[28,[32,2],["org-estimated-target-audience__description pb4 t-14 t-normal ",[52,[30,2],"org-estimated-target-audience__description--error t-black","t-black--light"]],null]],[12],[1,"\\n"],[41,[30,2],[[[1," "],[1,[30,4]],[1,"\\n"]],[]],[[[1," "],[1,[30,5]],[1,"\\n"]],[]]],[1," "],[13],[1,"\\n"]],[]]],[1," "],[10,2],[14,0,"org-estimated-target-audience__help-message t-14 t-black--light t-normal pb4"],[12],[1,"\\n "],[1,[30,6]],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n"]],["@isTargetAudienceTooBroad","@isTargetAudienceTooNarrow","@numMembersTargeted","@targetingTooNarrowMessage","@numMembersTargetedDescription","@helpMessage"],false,["if","unless"]]',moduleName:"organization-targeting-audience/components/estimated-target-audience.gts",scope:()=>[r.default,o.default,a.concat],isStrictMode:!0}),(0,n.default)("estimated-target-audience","EstimatedTargetAudience"))
|
|
e.default=l}))
|
|
define("organization-targeting-audience/components/loading-overlay",["exports","@ember/template-factory","@ember/component/template-only","@ember/component","artdeco-loader/components/artdeco-loader"],(function(e,t,n,i,r){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
const o=(0,i.setComponentTemplate)((0,t.createTemplateFactory)({id:"afkWHATW",block:'[[[1,"\\n "],[10,0],[15,0,[29,["org-loading-overlay ",[52,[30,1],"org-is-loading"]]]],[12],[1,"\\n "],[18,2,null],[1,"\\n "],[10,0],[14,0,"org-loader-container"],[12],[1,"\\n "],[8,[32,0],null,null,null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n"]],["@isLoading","&default"],false,["if","yield"]]',moduleName:"organization-targeting-audience/components/loading-overlay.gts",scope:()=>[r.default],isStrictMode:!0}),(0,n.default)("loading-overlay","LoadingOverlay"))
|
|
e.default=o}))
|
|
define("organization-targeting-audience/components/targeted-settings-container",["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","data-layer/utils/organization/models/target","organization-targeting-audience/utils/targeting-modal-helpers","organization-targeting-audience/utils/targeted-settings-helper","@ember/object","@ember/service","@glimmer/tracking","@glimmer/component","@ember/destroyable","@ember/helper","organization-targeting-audience/components/confirm-targeting-strings"],(function(e,t,n,i,r,o,a,l,s,d,c,u,p,m,h,g,f){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var b,_,y,v,T,E,S,w
|
|
const k={interfaceLocales:"i18n_org_admin_confirm_targeting_language",locations:"i18n_org_admin_confirm_targeting_geography",seniorities:"i18n_org_admin_confirm_targeting_seniority_level",industries:"i18n_org_admin_confirm_targeting_industry",functions:"i18n_org_admin_confirm_targeting_job_function",staffCountRanges:"i18n_org_admin_confirm_targeting_company_size"}
|
|
e.default=(0,a.setComponentTemplate)((0,o.createTemplateFactory)({id:"gXzm+AXP",block:'[[[1,"\\n "],[18,1,[[28,[32,0],null,[["actions","state"],[[28,[32,0],null,[["updateTargetedSettings"],[[30,0,["updateTargetedSettings"]]]]],[28,[32,0],null,[["numMembersTargeted","isEstimatedTargetAudienceLoading"],[[28,[31,1],[[30,0,["numMembersTargeted"]]],null],[28,[31,1],[[30,0,["isEstimatedTargetAudienceLoading"]]],null]]]]]]]]],[1,"\\n "]],["&default"],false,["yield","readonly"]]',moduleName:"organization-targeting-audience/components/targeted-settings-container.gjs",scope:()=>[g.hash],isStrictMode:!0}),(b=(0,u.inject)("global-services@store-shim"),_=(0,u.inject)("i18n"),y=class extends m.default{get isEstimatedTargetedAudienceEnabled(){return!!this.args.targetAudienceSettings}get shouldUseDashTargetedContentsResource(){return this.lix.getTreatmentIsEnabled("voyager.web.organization-admin-use-dash-targeted-contents")}constructor(){super(...arguments);(0,t.default)(this,"storeShim",v,this);(0,t.default)(this,"i18n",T,this);(0,t.default)(this,"lix",E,this);(0,t.default)(this,"isEstimatedTargetAudienceLoading",S,this);(0,t.default)(this,"numMembersTargeted",w,this)
|
|
this.mismatchFieldLabels=this._initMismatchFieldLabels()
|
|
this.infoMissingText=this.i18n.lookupTranslation(f.default,"i18n_org_admin_confirm_targeting_info_missing")()
|
|
this.confirmTargetingMembers=[]
|
|
const{targetAudience:e}=this.args
|
|
e&&this._setNumberOfMembersTargeted(e,this.confirmTargetingMembers)}updateTargetedSettings(e){if(!e)return
|
|
const{confirmTargetingMembers:t}=this
|
|
this.numMembersTargeted||(this.numMembersTargeted=null)
|
|
t.length||(0,l.hasAudienceForTarget)(e,this.shouldUseDashTargetedContentsResource)?this._setNumberOfMembersTargeted(e,t):this.numMembersTargeted=null}_initMismatchFieldLabels(){const{i18n:e}=this,t={}
|
|
Object.entries(k).forEach((n=>{let[i,r]=n
|
|
t[i]=function(t){return e.lookupTranslation(f.default,t)()}(r)}))
|
|
return t}_parseMatchResponseDetails(e){const{infoMissingText:t,mismatchFieldLabels:n}=this
|
|
let i=[]
|
|
e&&Object.keys(n).forEach((r=>{e[r]&&(e[r].length>0?i=i.concat(e[r].map((e=>{const t="staffCountRanges"===r?(0,d.default)(this.i18n,e.start,e.end):e.localizedName
|
|
return{category:n[r],value:t}}))):i.push({category:n[r],value:t}))}))
|
|
return i}_parseMatchResponse(e){if(!e)return null
|
|
return{isTargeted:e.matchScore>=0,mismatchedData:this._parseMatchResponseDetails(e.mismatchedData)}}_setNumberOfMembersTargeted(e,t){const n=t.map((e=>e.profile)),{followedCompanyUrn:i}=this.args,r=(0,s.matchProfiles)(this.storeShim,e,n,i,{},this.shouldUseDashTargetedContentsResource)
|
|
this.isEstimatedTargetAudienceLoading=!0
|
|
r.then((e=>{if(this.isDestroying)return
|
|
const n=e.profileResults.reduce(((e,t)=>{e[t.member]=t
|
|
return e}),{})
|
|
t.forEach((e=>{const t=n[e.profile.entityUrn]
|
|
e.setProperties(this._parseMatchResponse(t))}))
|
|
this.numMembersTargeted=e.numMatchingMembers})).catch((e=>{if((0,h.isDestroying)(this))throw e
|
|
if(e&&e.isAdapterError)return[]
|
|
throw e})).finally((()=>{this.isDestroying||(this.isEstimatedTargetAudienceLoading=!1)}))}},v=(0,i.default)(y.prototype,"storeShim",[b],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),T=(0,i.default)(y.prototype,"i18n",[_],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),E=(0,i.default)(y.prototype,"lix",[u.inject],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),S=(0,i.default)(y.prototype,"isEstimatedTargetAudienceLoading",[p.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),w=(0,i.default)(y.prototype,"numMembersTargeted",[p.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),(0,i.default)(y.prototype,"updateTargetedSettings",[c.action],Object.getOwnPropertyDescriptor(y.prototype,"updateTargetedSettings"),y.prototype),y))}))
|
|
define("organization-targeting-audience/components/targeting-audience",["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","global-utils/utils/locale-helpers","@glimmer/tracking","profile-validators/helpers/format-geo-urn","data-layer/utils/organization/models/target","organization-targeting-audience/utils/targeting-modal-helpers","global-utils/utils/urn-converter","@glimmer/component","@ember/service","@ember/object","@ember/utils","@linkedin/ember-m3-pdsc-model-builder","organization-targeting-audience/components/loading-overlay","organization-targeting-audience/components/estimated-audience","ember-cli-pemberly-i18n/helpers/t","organization-targeting-audience/components/targeting-selection-list","organization-targeting-audience/components/audience-selection","@ember/helper","global-helpers/helpers/gte"],(function(e,t,n,i,r,o,a,l,s,d,c,u,p,m,h,g,f,b,_,y,v,T,E,S,w){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var k,C,D,O,A
|
|
const I=Object.freeze({ADD:"add",REMOVE:"remove"})
|
|
e.default=(0,a.setComponentTemplate)((0,o.createTemplateFactory)({id:"79xswCi3",block:'[[[1,"\\n"],[41,[30,0,["hasAudienceForTarget"]],[[[1," "],[10,0],[12],[1,"\\n "],[8,[32,0],null,[["@isLoading"],[[30,1]]],[["default"],[[[[1,"\\n "],[8,[32,1],[[24,0,"ph5 pv3"]],[["@numMembersTargeted","@numMembersTargetedDescription","@isTargetedAudienceTooBroad","@isTargetedAudienceTooNarrow","@targetingTooNarrowMessage","@helpMessage"],[[30,2],[28,[32,2],["i18n_org_audience_description","organization-targeting-audience/components/targeting-audience"],null],[30,3],[30,4],[28,[32,2],["i18n_org_audience_not_enough_targeted_followers","organization-targeting-audience/components/targeting-audience"],[["count"],[[30,5]]]],[28,[32,2],["i18n_org_update_targeting_learn_more","organization-targeting-audience/components/targeting-audience"],[["linkInfo"],[[28,[32,3],null,[["href"],["/help/linkedin/answer/26034"]]]]]]]],null],[1,"\\n "]],[]]]]],[1,"\\n "],[8,[32,4],[[24,0,"ph5 pb3"]],[["@targetAudience","@onTargetAudienceChange","@isTargetAudienceError"],[[30,6],[30,7],[30,8]]],null],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1,"\\n "],[10,0],[14,0,"display-flex flex-wrap p5"],[12],[1,"\\n "],[8,[32,5],[[24,0,"targeting-audience__audience-selection"]],[["@targetAudiences","@audienceType","@addAudienceLabel","@typeaheadTypes","@typeaheadPlaceholder","@typeaheadLimit","@typeaheadisActiveOnFocus","@addAudienceTarget","@removeAudienceTarget","@resultItemClasses","@labelClassName","@showSelectedValues","@addAudienceButtonControlName","@fetchOnFocus"],[[30,6,["interfaceLocales"]],[28,[32,2],["i18n_org_audience_language","organization-targeting-audience/components/targeting-audience"],null],[28,[32,2],["i18n_org_add_audience_language","organization-targeting-audience/components/targeting-audience"],null],[30,0,["typeaheadTypes","language"]],[28,[32,2],["i18n_org_audience_language","organization-targeting-audience/components/targeting-audience"],null],50,true,[30,0,["addLanguageSetting"]],[28,[32,6],[[30,0,["removeSpecificSettings"]],[30,0,["targetAudienceSegments","interfaceLocales"]]],null],"t-14 t-black","t-normal",false,"targeting_audience_add_language_target_button",true]],null],[1,"\\n "],[8,[32,5],[[24,0,"targeting-audience__audience-selection"]],[["@targetAudiences","@audienceType","@addAudienceLabel","@typeaheadTypes","@typeaheadPlaceholder","@typeaheadLimit","@typeaheadisActiveOnFocus","@addAudienceTarget","@removeAudienceTarget","@resultItemClasses","@labelClassName","@showSelectedValues","@fetchOnFocus","@isDisabled","@addAudienceButtonControlName"],[[30,6,["locations"]],[28,[32,2],["i18n_org_audience_region","organization-targeting-audience/components/targeting-audience"],null],[28,[32,2],["i18n_org_add_audience_region","organization-targeting-audience/components/targeting-audience"],null],[30,0,["typeaheadTypes","countryGroups"]],[28,[32,2],["i18n_org_audience_region","organization-targeting-audience/components/targeting-audience"],null],54,true,[30,0,["audienceTargetFunctionForRegion"]],[28,[32,6],[[30,0,["removeSpecificSettings"]],[30,0,["targetAudienceSegments","locations"]]],null],"t-14 t-black","t-normal",false,true,[28,[32,7],[[30,6,["locations","length"]],150],null],"targeting_audience_add_region_target_button"]],null],[1,"\\n "],[8,[32,5],[[24,0,"targeting-audience__audience-selection"]],[["@targetAudiences","@audienceType","@addAudienceLabel","@typeaheadTypes","@typeaheadPlaceholder","@typeaheadLimit","@typeaheadisActiveOnFocus","@addAudienceTarget","@removeAudienceTarget","@resultItemClasses","@labelClassName","@showSelectedValues","@addAudienceButtonControlName","@fetchOnFocus"],[[30,6,["functions"]],[28,[32,2],["i18n_org_job_function","organization-targeting-audience/components/targeting-audience"],null],[28,[32,2],["i18n_org_add_job_function","organization-targeting-audience/components/targeting-audience"],null],[30,0,["typeaheadTypes","function"]],[28,[32,2],["i18n_org_job_function","organization-targeting-audience/components/targeting-audience"],null],50,true,[28,[32,6],[[30,0,["updateSpecificSetting"]],[30,0,["targetAudienceSegments","functions"]]],null],[28,[32,6],[[30,0,["removeSpecificSettings"]],[30,0,["targetAudienceSegments","functions"]]],null],"t-14 t-black","t-normal",false,"targeting_audience_add_functions_target_button",true]],null],[1,"\\n\\n "],[8,[32,5],[[24,0,"targeting-audience__audience-selection"]],[["@targetAudiences","@audienceType","@addAudienceLabel","@typeaheadTypes","@typeaheadPlaceholder","@typeaheadLimit","@addAudienceTarget","@removeAudienceTarget","@resultItemClasses","@labelClassName","@showSelectedValues","@isDisabled","@addAudienceButtonControlName"],[[30,6,["locations"]],[28,[32,2],["i18n_org_audience_location","organization-targeting-audience/components/targeting-audience"],null],[28,[32,2],["i18n_org_add_audience_location","organization-targeting-audience/components/targeting-audience"],null],[30,0,["typeaheadTypes","location"]],[28,[32,2],["i18n_org_audience_location","organization-targeting-audience/components/targeting-audience"],null],5,[28,[32,6],[[30,0,["updateSpecificSetting"]],[30,0,["targetAudienceSegments","locations"]]],null],[28,[32,6],[[30,0,["removeSpecificSettings"]],[30,0,["targetAudienceSegments","locations"]]],null],"t-14 t-black","t-normal",false,[28,[32,7],[[30,6,["locations","length"]],150],null],"targeting_audience_add_location_target_button"]],null],[1,"\\n\\n "],[8,[32,5],[[24,0,"targeting-audience__audience-selection"]],[["@targetAudiences","@audienceType","@addAudienceLabel","@typeaheadTypes","@typeaheadPlaceholder","@typeaheadLimit","@hasBrowseButton","@addAudienceTarget","@removeAudienceTarget","@resultItemClasses","@labelClassName","@showSelectedValues","@addAudienceButtonControlName"],[[30,6,["schools"]],[28,[32,2],["i18n_org_audience_university","organization-targeting-audience/components/targeting-audience"],null],[28,[32,2],["i18n_org_add_audience_university","organization-targeting-audience/components/targeting-audience"],null],[30,0,["typeaheadTypes","school"]],[28,[32,2],["i18n_org_audience_university","organization-targeting-audience/components/targeting-audience"],null],5,false,[28,[32,6],[[30,0,["updateSpecificSetting"]],[30,0,["targetAudienceSegments","schools"]]],null],[28,[32,6],[[30,0,["removeSpecificSettings"]],[30,0,["targetAudienceSegments","schools"]]],null],"t-14 t-black","t-normal",false,"targeting_audience_add_school_target_button"]],null],[1,"\\n\\n "],[8,[32,5],[[24,0,"targeting-audience__audience-selection"]],[["@dashOrganizationUrn","@targetAudiences","@audienceType","@addAudienceLabel","@typeaheadTypes","@typeaheadPlaceholder","@typeaheadLimit","@typeaheadisActiveOnFocus","@addAudienceTarget","@removeAudienceTarget","@resultItemClasses","@labelClassName","@showSelectedValues","@addAudienceButtonControlName","@fetchOnFocus"],[[30,9],[30,6,["staffCountRanges"]],[28,[32,2],["i18n_org_company_size","organization-targeting-audience/components/targeting-audience"],null],[28,[32,2],["i18n_org_add_company_size","organization-targeting-audience/components/targeting-audience"],null],[30,0,["typeaheadTypes","staffCountRange"]],[28,[32,2],["i18n_org_company_size","organization-targeting-audience/components/targeting-audience"],null],50,true,[30,0,["addStaffCountRange"]],[28,[32,6],[[30,0,["removeSpecificSettings"]],[30,0,["targetAudienceSegments","staffCountRanges"]]],null],"t-14 t-black","t-normal",false,"targeting_audience_add_company_size_target_button",true]],null],[1,"\\n\\n "],[8,[32,5],[[24,0,"targeting-audience__audience-selection"]],[["@targetAudiences","@audienceType","@addAudienceLabel","@typeaheadTypes","@typeaheadPlaceholder","@typeaheadLimit","@typeaheadisActiveOnFocus","@addAudienceTarget","@removeAudienceTarget","@resultItemClasses","@labelClassName","@showSelectedValues","@addAudienceButtonControlName","@fetchOnFocus"],[[30,6,["seniorities"]],[28,[32,2],["i18n_org_audience_seniority","organization-targeting-audience/components/targeting-audience"],null],[28,[32,2],["i18n_org_add_audience_seniority","organization-targeting-audience/components/targeting-audience"],null],[30,0,["typeaheadTypes","seniority"]],[28,[32,2],["i18n_org_audience_seniority","organization-targeting-audience/components/targeting-audience"],null],50,true,[28,[32,6],[[30,0,["updateSpecificSetting"]],[30,0,["targetAudienceSegments","seniorities"]]],null],[28,[32,6],[[30,0,["removeSpecificSettings"]],[30,0,["targetAudienceSegments","seniorities"]]],null],"t-14 t-black","t-normal",false,"targeting_audience_add_seniority_target_button",true]],null],[1,"\\n\\n "],[8,[32,5],[[24,0,"targeting-audience__audience-selection"]],[["@targetAudiences","@audienceType","@addAudienceLabel","@typeaheadTypes","@typeaheadPlaceholder","@typeaheadLimit","@addAudienceTarget","@removeAudienceTarget","@resultItemClasses","@labelClassName","@showSelectedValues","@addAudienceButtonControlName"],[[30,6,["industries"]],[28,[32,2],["i18n_org_audience_industry","organization-targeting-audience/components/targeting-audience"],null],[28,[32,2],["i18n_org_add_audience_industry","organization-targeting-audience/components/targeting-audience"],null],[30,0,["typeaheadTypes","industry"]],[28,[32,2],["i18n_org_audience_industry","organization-targeting-audience/components/targeting-audience"],null],5,[28,[32,6],[[30,0,["updateSpecificSetting"]],[30,0,["targetAudienceSegments","industries"]]],null],[28,[32,6],[[30,0,["removeSpecificSettings"]],[30,0,["targetAudienceSegments","industries"]]],null],"t-14 t-black","t-normal",false,"targeting_audience_add_industry_target_button"]],null],[1,"\\n "],[13],[1,"\\n "]],["@isEstimatedTargetAudienceLoading","@numMembersTargeted","@isTargetedAudienceTooBroad","@isTargetedAudienceTooNarrow","@minTargetedFollowers","@targetAudience","@onTargetAudienceChange","@isTargetAudienceError","@dashOrganizationUrn"],false,["if"]]',moduleName:"organization-targeting-audience/components/targeting-audience.gjs",scope:()=>[_.default,y.default,v.default,S.hash,T.default,E.default,S.fn,w.default],isStrictMode:!0}),(k=(0,h.inject)("global-services@store-shim"),C=class extends m.default{constructor(){super(...arguments);(0,t.default)(this,"storeShim",D,this);(0,t.default)(this,"lix",O,this);(0,n.default)(this,"targetAudienceSegments",this.shouldUseDashTargetedContentsResource?c.DASH_TARGET_AUDIENCE_SEGMENTS:c.TARGET_AUDIENCE_SEGMENTS);(0,n.default)(this,"typeaheadTypes",c.TYPEAHEAD_TYPES);(0,t.default)(this,"locationsWithinRegionCache",A,this)}get shouldUseDashTargetedContentsResource(){return this.lix.getTreatmentIsEnabled("voyager.web.organization-admin-use-dash-targeted-contents")}get hasAudienceForTarget(){return(0,c.hasAudienceForTarget)(this.args.targetAudience,this.shouldUseDashTargetedContentsResource)}audienceTargetFunctionForRegion(e,t,n){this.updateRegion(e,t,n)}updateRegion(e,t,n){const i=(0,g.get)(e,"entityUrn"),r=(0,d.formatGeoUrn)(i,this.shouldUseDashTargetedContentsResource),o=(0,g.get)(e,"defaultLocalizedName")
|
|
this._updateRegion(this.targetAudienceSegments.locations,r,o,t,n)}updateSpecificSetting(e,t){var n
|
|
let i=null,r="",o=null
|
|
e!==this.targetAudienceSegments.locations&&(o=(0,g.get)(t,"hitInfo"))
|
|
switch(e){case this.targetAudienceSegments.schools:if(this.shouldUseDashTargetedContentsResource){var a,l
|
|
i=null==t||null===(a=t.target)||void 0===a||null===(l=a.company)||void 0===l?void 0:l.entityUrn}else i=(0,p.toUrn)("shared/school",(0,p.fromUrn)((0,g.get)(o,"school.entityUrn")).id)
|
|
break
|
|
case this.targetAudienceSegments.locations:if(this.shouldUseDashTargetedContentsResource){var s,d
|
|
i=null==t||null===(s=t.target)||void 0===s||null===(d=s.geo)||void 0===d?void 0:d.entityUrn}else{var c,u
|
|
i=(0,p.convertUrnType)("common/geo",null==t||null===(c=t.target)||void 0===c||null===(u=c.geo)||void 0===u?void 0:u.entityUrn)}break
|
|
case this.targetAudienceSegments.industries:var m,h
|
|
i=null==t||null===(m=t.target)||void 0===m||null===(h=m.industry)||void 0===h?void 0:h.entityUrn
|
|
break
|
|
default:i=(0,g.get)(o,"urn")||(0,g.get)(o,"entityUrn")}(null===(n=r)||void 0===n?void 0:n.length)<1&&(r=(0,g.get)(t,"title.text")||(0,g.get)(t,"text.text"))
|
|
this._updateSpecificSetting(e,i,r)}removeSpecificSettings(e,t){this.args.onTargetAudienceChange(t,e,I.REMOVE)}addLanguageSetting(e){const t=(0,g.get)(this.args.targetAudience,this.targetAudienceSegments.interfaceLocales),n=(0,l.stringToLocale)((0,g.get)(e,"hitInfo.locale")),{language:i,country:r}=(0,g.getProperties)(n,"language","country")
|
|
if(!(0,f.isEmpty)(t.filter((e=>(0,g.get)(e,"language")===i&&(0,g.get)(e,"country")===r))))return
|
|
const o={language:i,country:r,localizedName:(0,g.get)(e,"text.text")},a=(0,b.buildModel)("com.linkedin.voyager.common.LanguageLocale",o)
|
|
this.args.onTargetAudienceChange(a,this.targetAudienceSegments.interfaceLocales,I.ADD)}addStaffCountRange(e){const{start:t,end:n}=(0,g.getProperties)((0,g.get)(e,"hitInfo"),"start","end")
|
|
if((0,g.get)(this.args.targetAudience,"staffCountRanges").map((e=>e.start)).includes(t))return
|
|
const i=(0,b.buildModel)("com.linkedin.voyager.organization.shared.StaffCountRange",{start:t,end:n,localizedName:(0,g.get)(e,"text.text")})
|
|
this.args.onTargetAudienceChange(i,this.targetAudienceSegments.staffCountRanges,I.ADD)}_updateRegion(e,t,n,i,r){const o=(0,g.get)(this.args.targetAudience,e),a=[...o,...this.locationsWithinRegionCache].length>=150
|
|
if((0,u.isUrnMissingFromTargetedAudiences)(o,t)&&!a){const e=(0,u.buildStandardizedEntity)(this.storeShim,t,n)
|
|
this.locationsWithinRegionCache.push(e)}if(i===r){this.args.onTargetAudienceChange([...o,...this.locationsWithinRegionCache],e,I.ADD,a,this.targetAudienceSegments.countryGroups)
|
|
this.locationsWithinRegionCache=[]}}_updateSpecificSetting(e,t,n){const i=(0,g.get)(this.args.targetAudience,e),r=i.length>=149
|
|
if((0,u.isUrnMissingFromTargetedAudiences)(i,t)){if(this.shouldUseDashTargetedContentsResource){const i={urn:t,localizedName:n}
|
|
this.args.onTargetAudienceChange(i,e,I.ADD,r)
|
|
return}const i=(0,u.buildStandardizedEntity)(this.storeShim,t,n)
|
|
this.args.onTargetAudienceChange(i,e,I.ADD,r)}}},D=(0,i.default)(C.prototype,"storeShim",[k],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),O=(0,i.default)(C.prototype,"lix",[h.inject],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),A=(0,i.default)(C.prototype,"locationsWithinRegionCache",[s.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),(0,i.default)(C.prototype,"audienceTargetFunctionForRegion",[g.action],Object.getOwnPropertyDescriptor(C.prototype,"audienceTargetFunctionForRegion"),C.prototype),(0,i.default)(C.prototype,"updateSpecificSetting",[g.action],Object.getOwnPropertyDescriptor(C.prototype,"updateSpecificSetting"),C.prototype),(0,i.default)(C.prototype,"removeSpecificSettings",[g.action],Object.getOwnPropertyDescriptor(C.prototype,"removeSpecificSettings"),C.prototype),(0,i.default)(C.prototype,"addLanguageSetting",[g.action],Object.getOwnPropertyDescriptor(C.prototype,"addLanguageSetting"),C.prototype),(0,i.default)(C.prototype,"addStaffCountRange",[g.action],Object.getOwnPropertyDescriptor(C.prototype,"addStaffCountRange"),C.prototype),C))}))
|
|
define("organization-targeting-audience/components/targeting-selection-list",["exports","@ember/template-factory","@ember/component/template-only","@ember/component","artdeco-pill/components/artdeco-pill-dismiss","ember-cli-pemberly-i18n/helpers/t","@ember/helper","artdeco-inline-feedback/components/artdeco-inline-feedback"],(function(e,t,n,i,r,o,a,l){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
const s=(0,i.setComponentTemplate)((0,t.createTemplateFactory)({id:"RmmrvN7f",block:'[[[1,"\\n"],[1," "],[11,0],[24,0,"targeting-selection-list"],[17,1],[12],[1,"\\n "],[10,"ul"],[14,0,"display-flex flex-row flex-wrap"],[12],[1,"\\n"],[42,[28,[31,1],[[30,2]],null],null,[[[42,[28,[31,2],[[28,[31,2],[[30,3]],null]],null],null,[[[1," "],[10,"li"],[14,0,"list-style-none pr2 pt2"],[12],[1,"\\n "],[8,[32,0],null,[["@size","@text","@a11yText","@onDismiss"],[3,[30,5,["localizedName"]],[28,[32,1],["a11y_remove_audience_pill","organization-targeting-audience/components/targeting-selection-list"],[["selection"],[[30,5,["localizedName"]]]]],[28,[32,2],[[30,6],[30,5],[30,4],"remove"],null]]],null],[1,"\\n "],[13],[1,"\\n"]],[5]],null]],[3,4]],null],[1," "],[13],[1,"\\n"],[41,[30,7],[[[1," "],[8,[32,3],[[24,0,"mt4 mb3"]],[["@message","@type"],[[28,[32,1],["i18n_target_audience_warning","organization-targeting-audience/components/targeting-selection-list"],null],"yield"]],null],[1,"\\n"]],[]],null],[1," "],[13],[1,"\\n"]],["&attrs","@targetAudience","selections","audience","selection","@onTargetAudienceChange","@isTargetAudienceError"],false,["each","-each-in","-track-array","if"]]',moduleName:"organization-targeting-audience/components/targeting-selection-list.gjs",scope:()=>[r.default,o.default,a.fn,l.default],isStrictMode:!0}),(0,n.default)("targeting-selection-list","TargetingSelectionList"))
|
|
e.default=s}))
|
|
define("organization-targeting-audience/components/typeahead-input",["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","@glimmer/tracking","rsvp","tracked-toolbox","global-helpers/helpers/load","@ember/utils","@ember/object","ember-lifeline","@glimmer/component","@ember/debug","ember","global-modifiers/modifiers/focus","ember-cli-artdeco-typeahead/components/artdeco-typeahead","artdeco-loader/components/artdeco-loader","@ember/helper"],(function(e,t,n,i,r,o,a,l,s,d,c,u,p,m,h,g,f,b,_,y,v){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var T,E,S,w,k,C
|
|
e.default=(0,a.setComponentTemplate)((0,o.createTemplateFactory)({id:"6qHKqoLQ",block:'[[[1,"\\n "],[11,0],[17,1],[4,[32,0],null,[["when","onSelector"],[[30,2],"input"]]],[12],[1,"\\n"],[41,[30,3],[[[1," "],[10,"label"],[15,"for",[30,4]],[15,0,[52,[30,5],"visually-hidden"]],[12],[1,"\\n "],[1,[30,3]],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1,"\\n "],[8,[32,1],null,[["@className","@onDismiss"],[[30,6],[30,0,["onDismissTypeahead"]]]],[["default"],[[[[1,"\\n "],[8,[30,7,["typeahead-input"]],null,[["@value","@className","@placeholder","@inputId","@disabled","@onBlur","@autocomplete","@onInput","@onFocus","@onKeyDown","@aria-label"],[[30,0,["typeaheadValue"]],[30,8],[30,9],[30,4],[30,10],[30,11],"off",[30,0,["typeaheadChange"]],[30,0,["typeaheadInputFocus"]],[30,0,["typeaheadKeyDown"]],[30,12]]],null],[1,"\\n\\n"],[41,[30,0,["shouldRenderTypeaheadResultList"]],[[[1," "],[8,[30,7,["typeahead-results-list"]],null,[["@ariaLabel","@className"],[[30,13],[28,[32,2],["org-typeahead-input__typeahead-results ",[30,14]],null]]],[["default"],[[[[1,"\\n"],[41,[30,0,["typeaheadResults","isLoading"]],[[[1," "],[8,[32,3],null,[["@size","@class","@a11yText"],["small","org-typeahead-input__loader-icon",[30,16]]],null],[1,"\\n"]],[]],[[[41,[30,0,["showResults"]],[[[41,[51,[30,0,["typeaheadResults","isLoaded"]]],[[[1," "],[10,2],[14,0,"org-typeahead-input__header-text t-sans t-14 t-white"],[14,"role","option"],[14,"aria-disabled","true"],[14,"aria-selected","false"],[12],[1,"\\n "],[1,[30,17]],[1,"\\n "],[13],[1,"\\n"]],[]],null],[42,[28,[31,3],[[28,[31,3],[[30,0,["displayedResults"]]],null]],null],null,[[[1," "],[8,[30,15,["typeahead-result"]],null,[["@className","@idx","@onSelect"],[[28,[32,2],["artdeco-list__item org-typeahead-input__typeahead-result ",[30,20]],null],[30,19],[28,[32,4],[[30,0,["onTypeaheadSelectSuggestion"]],[30,18]],null]]],[["default"],[[[[1,"\\n "],[18,22,[[28,[32,5],null,[["suggestion","index"],[[30,18],[30,19]]]]]],[1,"\\n "]],[]]]]],[1,"\\n"]],[18,19]],null]],[]],[[[41,[30,21],[[[1," "],[10,2],[14,0,"t-14 t-black p2"],[14,"role","option"],[14,"aria-disabled","true"],[14,"aria-selected","false"],[12],[1,"\\n "],[1,[30,21]],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1," "]],[]]]],[]]],[1," "]],[15]]]]],[1,"\\n"]],[]],null],[1," "]],[7]]]]],[1,"\\n "],[13],[1,"\\n "]],["&attrs","@shouldAutoFocus","@labelText","@inputId","@hideLabel","@className","typeahead","@inputClasses","@placeholderString","@isDisabled","@onBlur","@ariaLabel","@resultsListLabelText","@resultListClasses","typeaheadList","@loadingIconLabel","@defaultHeaderText","suggestion","index","@resultItemClasses","@noResultsFoundText","&default"],false,["if","unless","each","-track-array","yield"]]',moduleName:"organization-targeting-audience/components/typeahead-input.gjs",scope:()=>[b.default,_.default,v.concat,y.default,v.fn,v.hash],isStrictMode:!0}),(T=(0,d.localCopy)("args.typeaheadValue"),E=class extends h.default{constructor(){super(...arguments);(0,t.default)(this,"typeaheadResults",S,this);(0,t.default)(this,"shouldShowSuggestedHeaderText",w,this);(0,t.default)(this,"results",k,this);(0,t.default)(this,"typeaheadValue",C,this)}get shouldRenderTypeaheadResultList(){var e
|
|
return!this.args.hideResults&&((null===(e=this.typeaheadResults)||void 0===e?void 0:e.isLoading)||this.showResults||this.noResults)}get noResults(){var e,t
|
|
return""!==this.typeaheadValue&&(null===(e=this.typeaheadResults)||void 0===e?void 0:e.isLoaded)&&(0,u.isEmpty)(null===(t=this.typeaheadResults)||void 0===t?void 0:t.value)}get showResults(){return!(0,u.isEmpty)(this.displayedResults)}get displayedResults(){var e
|
|
return null!==(e=this.typeaheadResults)&&void 0!==e&&e.isLoaded?this.typeaheadResults.value:this.args.defaultSuggestions}typeaheadChange(e){var t
|
|
this.typeaheadValue=null===(t=e.target)||void 0===t?void 0:t.value;(0,m.debounceTask)(this,"_handleTypeaheadFetch",this.typeaheadValue,f.default.testing?0:300)}typeaheadInputFocus(e){var t;(0,m.debounceTask)(this,"_handleTypeaheadFocus",null===(t=e.target)||void 0===t?void 0:t.value,f.default.testing?0:300)}typeaheadKeyDown(e){if((13===e.which||13===e.keyCode)&&this.args.onFreeTextSubmit){this.typeaheadValue=""
|
|
return this.args.onFreeTextSubmit(e.target.value)}return!1}onTypeaheadSelectSuggestion(e){this.typeaheadResults=void 0
|
|
this.typeaheadValue=""
|
|
this.args.onSelectSuggestion(e)}onDismissTypeahead(){var e,t
|
|
this.typeaheadResults=void 0
|
|
this.args.isDisabled||(this.typeaheadValue="")
|
|
null===(e=(t=this.args).onDismissAction)||void 0===e||e.call(t)}_fetchTypeaheadSuggestions(e){return this.args.onFetch(e).then((e=>(0,p.get)(e,"elements")))}_handleTypeaheadFocus(e){var t,n
|
|
if(this.args.fetchOnFocus){const t=this._fetchTypeaheadSuggestions(e)
|
|
this.typeaheadResults=(0,c.load)(t)}null===(t=(n=this.args).onInputFocus)||void 0===t||t.call(n,e)}_handleTypeaheadFetch(e){const t=!e||this.args.isDisabled?(0,s.resolve)([]):this._fetchTypeaheadSuggestions(e)
|
|
this.typeaheadResults=(0,c.load)(t)}},S=(0,i.default)(E.prototype,"typeaheadResults",[l.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),w=(0,i.default)(E.prototype,"shouldShowSuggestedHeaderText",[l.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),k=(0,i.default)(E.prototype,"results",[l.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),C=(0,i.default)(E.prototype,"typeaheadValue",[T],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),(0,i.default)(E.prototype,"typeaheadChange",[p.action],Object.getOwnPropertyDescriptor(E.prototype,"typeaheadChange"),E.prototype),(0,i.default)(E.prototype,"typeaheadInputFocus",[p.action],Object.getOwnPropertyDescriptor(E.prototype,"typeaheadInputFocus"),E.prototype),(0,i.default)(E.prototype,"typeaheadKeyDown",[p.action],Object.getOwnPropertyDescriptor(E.prototype,"typeaheadKeyDown"),E.prototype),(0,i.default)(E.prototype,"onTypeaheadSelectSuggestion",[p.action],Object.getOwnPropertyDescriptor(E.prototype,"onTypeaheadSelectSuggestion"),E.prototype),(0,i.default)(E.prototype,"onDismissTypeahead",[p.action],Object.getOwnPropertyDescriptor(E.prototype,"onDismissTypeahead"),E.prototype),E))}))
|
|
define("organization-targeting-audience/services/targeting-facets",["exports","@babel/runtime/helpers/esm/initializerDefineProperty","@babel/runtime/helpers/esm/defineProperty","@babel/runtime/helpers/esm/applyDecoratedDescriptor","@babel/runtime/helpers/esm/initializerWarningHelper","@ember/destroyable","@ember/object","rsvp","@ember/service","global-utils/utils/urn-converter","data-layer/utils/organization/resource-to-url-map","organization-targeting-audience/utils/targeted-settings-helper","graphql-queries/queries/organizations/company-employee-count-ranges.graphql","@linkedin/ember-restli-graphql"],(function(e,t,n,i,r,o,a,l,s,d,c,u,p,m){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var h,g,f,b,_,y
|
|
const v={FUNCTION:"typeahead/typeahead-industry",LANGUAGE:"typeahead/typeahead-industry",SENIORITY:"typeahead/typeahead-industry"},T={industryCategory:e=>({q:"category",industryCategory:e}),country:e=>({q:"geoStatesByCountry",countryCode:(0,d.fromUrn)(e).id}),language:()=>({q:"languages"})},E="staffcountrange",S={language:e=>(0,a.get)(e,"displayText"),seniority:e=>(0,a.get)(e,"name")}
|
|
function w(e,t){var n
|
|
return(null===(n=S[e])||void 0===n?void 0:n.call(S,t))??(0,a.get)(t,"localizedName")}const k=Object.freeze({industryCategory:c.urlsMap.IndustriesDashResource,function:c.urlsMap.PremiumDashFunctionsResource,language:c.urlsMap.DashLanguageSelection,seniority:c.urlsMap.JobsSenioritiesDashResource}),C=Object.freeze({industryCategory:c.urlsMap.IndustriesResource,function:c.urlsMap.JobsFunctionsResource,language:c.urlsMap.LanguageLocalesResource,seniority:c.urlsMap.JobsSenioritiesResource})
|
|
e.default=(h=(0,s.inject)("global-services@store-shim"),g=(0,s.inject)("@linkedin/ember-restli-graphql@graphql"),f=class extends s.default{constructor(){super(...arguments);(0,n.default)(this,"targets",new Map);(0,t.default)(this,"storeShim",b,this);(0,t.default)(this,"i18n",_,this);(0,t.default)(this,"graphql",y,this)}_fetchTargetingFacets(e,t){const{storeShim:n}=this,i=T[e],r=null==i?void 0:i(t)
|
|
if(e&&e!==E&&r)return n.queryURL(k[e],{params:r}).then((n=>{if((0,o.isDestroying)(this))return
|
|
const i=(0,a.get)(n,"elements"),r=t??e
|
|
this.targets.set(r,i)
|
|
return i})).catch((e=>{if((0,o.isDestroying)(this))throw e
|
|
if(e&&e.isAdapterError)return[]
|
|
throw e}))
|
|
if(e){let i
|
|
i=e===E?this._fetchStaffCountRanges(t).then((e=>(0,a.get)(e,"employeeCountRangeSelectors"))):"function"===e||"seniority"===e?n.queryURL(k[e]).then((e=>(0,a.get)(e,"elements"))):n.queryURL(C[e]).then((e=>(0,a.get)(e,"elements")))
|
|
return i.then((t=>{if((0,o.isDestroying)(this))return
|
|
let n=t
|
|
e===E&&(n=n.map((e=>this._buildLocalizedStaffCountRange(e))))
|
|
this.targets.set(e,n)
|
|
return n})).catch((e=>{if((0,o.isDestroying)(this))throw e
|
|
if(e&&e.isAdapterError)return[]
|
|
throw e}))}return(0,l.reject)(new Error("No targeting facet"))}_fetchStaffCountRanges(e){return this.graphql.executeQuery(p.default,{companyUrns:[e]}).then((e=>{if(!(0,o.isDestroying)(this))return(0,a.get)(e,"data.organizationDashCompaniesByIds.firstObject")})).catch((e=>{if((0,o.isDestroying)(this))throw e
|
|
if(e&&e instanceof m.GraphQLQueryError)throw e
|
|
return null}))}_buildLocalizedStaffCountRange(e){const{start:t,end:n}=(0,a.getProperties)(e,"start","end")
|
|
return{localizedName:(0,u.default)(this.i18n,t,n),start:t,end:n}}getTargetingFacets(e,t){const n=this.targets.get(t)
|
|
return void 0!==n?(0,l.resolve)(n):this._fetchTargetingFacets(e,t)}getTypeaheadHits(e,t,n){const i=this.getTargetingFacets(e.toLowerCase(),n),r=[]
|
|
return(0,l.map)([i],(n=>{n.filter((n=>w(e,n).toLowerCase().indexOf(t.toLowerCase())>=0)).forEach((t=>{const n=w(e,t),i=a.default.create({text:n}),o=a.default.create({text:i,subtext:n,hitInfo:t,type:v[e]})
|
|
r.pushObject(o)}))
|
|
return{elements:r}}))}},b=(0,i.default)(f.prototype,"storeShim",[h],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),_=(0,i.default)(f.prototype,"i18n",[s.inject],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),y=(0,i.default)(f.prototype,"graphql",[g],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),f)}))
|
|
define("organization-targeting-audience/template-registry",[],(function(){}))
|
|
define("organization-targeting-audience/utils/requests/content/targeted-content",["exports","@ember/object","global-utils/utils/urn-converter","organization-crud-utils/utils/organization/restli-action-request-builder","voyager-web/config/environment","data-layer/utils/organization/models/target"],(function(e,t,n,i,r,o){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.matchProfileTargetedContentRequest=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],d=arguments.length>3&&void 0!==arguments[3]&&arguments[3]
|
|
const c=e.serialize?e.serialize():e,u=r.map((e=>(0,t.get)(e,"entityUrn"))),p=(0,t.get)(c,"schools")
|
|
if(p){const e=p.map((e=>(0,n.isUrn)(e)?e:(0,t.get)(e,"urn")))
|
|
c.schools=e}const m={followedCompanies:s,profileUrns:u,target:c}
|
|
if(d){if(s.length){const e=s.map((e=>(0,n.convertUrnType)("organization/dash-company",e)))
|
|
m.followedCompanies=e}Object.keys(m.target).filter((e=>e!==o.DASH_TARGET_AUDIENCE_SEGMENTS.interfaceLocales&&e!==o.DASH_TARGET_AUDIENCE_SEGMENTS.staffCountRanges)).forEach((e=>{m.target[e]=m.target[e].map((e=>e.urn))}))
|
|
return(0,i.default)(l,"matchTarget",m)}return(0,i.default)(a,"matchTarget",m)}
|
|
const a=`/${r.default.namespace}/organization/targetedContents`,l=`/${r.default.namespace}/voyagerTalentbrandDashTargetedContents`}))
|
|
define("organization-targeting-audience/utils/target-hierarchy-tree",["exports","@ember/array","@ember/object"],(function(e,t,n){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=function e(i,r,o){return n.default.create({children:{},data:i,parent:r,isSelected:o,_selectedNodesMap:!r&&n.default.create({}),selectionCount:0,_getRoot(){return r?r._getRoot():this},getSelectedNodesMap(){return this._getRoot()._selectedNodesMap},_updateCount(){let e=this.isSelected?1:0
|
|
e+=Object.keys(this.children).reduce(((e,t)=>e+this.children[t].selectionCount),0);(0,n.set)(this,"selectionCount",e)
|
|
this.parent&&this.parent._updateCount()},deselect(){const e=(0,n.get)(this,"data.urn")
|
|
this.isSelected=!1
|
|
const t=this.getSelectedNodesMap();(0,n.set)(t,e,null)
|
|
delete this.getSelectedNodesMap()[e]
|
|
this._updateCount()},getSelectedNodesList(){const e=this.getSelectedNodesMap()
|
|
return Object.keys(e).map((t=>(0,n.get)(e,t)))},findSelected(e){return(0,n.get)(this.getSelectedNodesMap(),e)},removeDescendants(){Object.keys(this.children).forEach((e=>this.children[e].remove()))},remove(){const e=this.parent,t=(0,n.get)(this,"data.urn")
|
|
this.removeDescendants()
|
|
delete e.children[t]
|
|
const i=this.getSelectedNodesMap();(0,n.set)(i,t,null)
|
|
delete this.getSelectedNodesMap()[t]
|
|
this._updateCount()},_addChild(t,i,r){const o=(0,n.get)(t,"urn")
|
|
let a=this.children[o]
|
|
if(a){r&&a.removeDescendants()
|
|
a.isSelected=i
|
|
a.data=t}else{this.children[o]=new e(t,this,i)
|
|
a=this.children[o]}if(i){const e=this.getSelectedNodesMap();(0,n.set)(e,o,a)}a._updateCount()
|
|
return a},addNode(e,t){const i=(0,n.get)(e,"path")
|
|
let r,o=this
|
|
for(let a=0,l=i.length;a<l;a++){r=o.children[i[a]]
|
|
if(a===l-1)o._addChild(e,!0,t)
|
|
else if(!r){const e=n.default.create({path:i.slice(0,a+1),urn:i[a]})
|
|
r=o._addChild(e,!1)}o=r}},addNodes(e){(0,t.isArray)(e)&&e.forEach((e=>this.addNode(e)))}})}}))
|
|
define("organization-targeting-audience/utils/targeted-content-helpers",["exports","@linkedin/ember-m3-pdsc-model-builder"],(function(e,t){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.buildStandardizedEntity=function(e,n){return(0,t.buildModel)("com.linkedin.voyager.organization.content.StandardizedEntity",{urn:e,localizedName:n})}
|
|
e.isUrnMissingFromTargetedAudiences=function(e,t){return!e.some((e=>e.urn===t))}}))
|
|
define("organization-targeting-audience/utils/targeted-settings-helper",["exports","organization-targeting-audience/components/confirm-targeting-strings"],(function(e,t){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=function(e,i,r){let o
|
|
o=0===i?"selfEmployed":r?"range":"rangeWithNoEnd"
|
|
return e.lookupTranslation(t.default,n[o])([{start:i,end:r}])}
|
|
const n={selfEmployed:"i18n_organization_staff_count_range_self_employed",range:"i18n_organization_staff_count_range",rangeWithNoEnd:"i18n_organization_staff_count_range_no_end"}}))
|
|
define("organization-targeting-audience/utils/targeting-modal-helpers",["exports","organization-targeting-audience/utils/requests/content/targeted-content","@linkedin/ember-m3-pdsc-model-builder","data-layer/utils/organization/models/target","global-utils/utils/urn-converter","@ember/object","ember-copy","@ember/utils","organization-targeting-audience/utils/targeted-content-helpers"],(function(e,t,n,i,r,o,a,l,s){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.buildStandardizedEntity=d
|
|
e.convertLocalTargetAudienceToTargetModelForm=function(e){const t=(0,a.copy)(e),n=(0,o.get)(t,"schools")||[];(0,l.isEmpty)(n)||(t.schools=n.map((e=>(0,o.get)(e,"urn"))))
|
|
return t}
|
|
e.createDraftVersionForTargetAudience=function(e,t,n){const r=e||{}
|
|
if(n)return Object.values(i.DASH_TARGET_AUDIENCE_SEGMENTS).reduce(((e,n)=>{const i=(0,o.get)(r,n)
|
|
e[n]=i?c(t,n,i):[]
|
|
return e}),{})
|
|
return Object.keys(i.TARGET_AUDIENCE_SEGMENTS).reduce(((e,n)=>{const i=(0,o.get)(r,n)
|
|
e[n]=i?c(t,n,i):[]
|
|
return e}),{})}
|
|
e.isUrnMissingFromTargetedAudiences=function(e,t){return s.isUrnMissingFromTargetedAudiences(e,t)}
|
|
e.matchProfiles=function(e,n,i,r){let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},l=arguments.length>5&&void 0!==arguments[5]&&arguments[5]
|
|
const s=r?[r]:[],d=(0,t.matchProfileTargetedContentRequest)(n,i,s,l),c={recipe:"com.linkedin.voyager.organization.content.TargetAudienceMatchResult",method:d[1],params:d[2].data,reload:!0,adapterOptions:a}
|
|
l&&delete c.recipe
|
|
return e.queryURL(d[0],c).then((e=>({profileResults:(0,o.get)(e,"profileMatchResults.value"),numMatchingMembers:(0,o.get)(e,"numMatchingMembers")})))}
|
|
function d(e,t,n){return s.buildStandardizedEntity(t,n)}function c(e,t,a){switch(t){case i.TARGET_AUDIENCE_SEGMENTS.schools:return a.map((t=>{const n=e.peekRecord("com.linkedin.voyager.entities.shared.MiniSchool",(0,r.convertUrnType)("entities/shared/mini-school",t))||{}
|
|
return d(0,t,(0,o.get)(n,"schoolName")||"")}))
|
|
case i.TARGET_AUDIENCE_SEGMENTS.staffCountRanges:return a.map((e=>(0,n.buildModel)("com.linkedin.voyager.organization.shared.StaffCountRange",(0,o.getProperties)(e,"start","end"))))
|
|
case i.TARGET_AUDIENCE_SEGMENTS.interfaceLocales:return a.map((e=>(0,n.buildModel)("com.linkedin.voyager.common.LanguageLocale",(0,o.getProperties)(e,"language","country","localizedName"))))
|
|
default:return a.map((e=>{const{urn:t,localizedName:n}=(0,o.getProperties)(e,"urn","localizedName")
|
|
return d(0,t,n)}))}}}))
|
|
define("polls-creation/components/polls-detour",["exports","@babel/runtime/helpers/esm/initializerDefineProperty","@babel/runtime/helpers/esm/defineProperty","@babel/runtime/helpers/esm/classPrivateMethodGet","@babel/runtime/helpers/esm/applyDecoratedDescriptor","@babel/runtime/helpers/esm/initializerWarningHelper","@ember/template-factory","@ember/component","detour-framework/utils/detour-constants","polls-creation/utils/polls-detour-manager","@ember/object","@glimmer/tracking","@glimmer/component","global-utils/utils/keyboard-utils","@ember/service","@ember/render-modifiers/modifiers/did-update","artdeco-text-input/components/artdeco-text-input","ember-cli-pemberly-i18n/helpers/t","global-modifiers/modifiers/focus","artdeco-button/components/artdeco-button","@ember/helper","global-helpers/helpers/or","global-helpers/helpers/eq","@ember/modifier","detour-framework/components/share-box-footer","sharing-shared/utils/text-view-model-helpers"],(function(e,t,n,i,r,o,a,l,s,d,c,u,p,m,h,g,f,b,_,y,v,T,E,S,w,k){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var C,D,O,A,I,P,x,M,R,N,U,L,F,z,j,V,B,H,G,q,K,W
|
|
const Y=Object.freeze({1:"i18n_poll_creation_duration_day_left",3:"i18n_poll_creation_duration_three_days_left",7:"i18n_poll_creation_duration_week_left",14:"i18n_poll_creation_duration_two_weeks_left"})
|
|
e.default=(0,l.setComponentTemplate)((0,a.createTemplateFactory)({id:"HkYUlvK8",block:'[[[1,"\\n"],[1," "],[11,0],[24,0,"full-height"],[17,1],[12],[1,"\\n "],[11,"form"],[24,0,"share-box-modal-content__container pv3 ph5"],[4,[32,0],[[30,0,["focusOnLastInput"]],[30,0,["answerOptions"]]],null],[12],[1,"\\n "],[10,0],[14,0,"mb4"],[12],[1,"\\n "],[8,[32,1],[[4,[32,3],null,[["onSelector"],["textarea"]]]],[["@type","@label","@inputClasses","@required","@placeholder","@maxLength","@restrictToMaxLength","@onInput","@value"],["multiline",[28,[32,2],["i18n_question_header","polls-creation/components/polls-detour"],null],"polls-detour__form-fields polls-detour__question-field",true,[28,[32,2],["i18n_question_suggestion_text","polls-creation/components/polls-detour"],null],[30,0,["maxQuestionLength"]],false,[30,0,["handlePollQuestion"]],[30,0,["pollQuestion"]]]],null],[1,"\\n "],[13],[1,"\\n"],[42,[28,[31,1],[[28,[31,1],[[30,0,["answerOptions"]]],null]],null],null,[[[1," "],[10,0],[14,0,"mb3"],[12],[1,"\\n "],[10,0],[12],[1,"\\n "],[10,"label"],[15,"for",[29,["poll-option-",[30,2,["optionNumber"]]]]],[15,0,[28,[32,4],["polls-detour__input-label ",[52,[30,2,["required"]],"polls-detour__required-input-indicator"]],null]],[12],[1,[30,2,["label"]]],[13],[1,"\\n"],[41,[30,2,["hasRemoveButton"]],[[[1," "],[8,[32,5],[[16,"aria-label",[28,[32,2],["i18n_remove_aria_label","polls-creation/components/polls-detour"],[["pollOptionNumber"],[[30,2,["optionNumber"]]]]]],[4,[32,6],["click",[28,[32,7],[[30,0,["removeOption"]],[30,2,["optionNumber"]]],null]],null]],[["@text","@type","@size","@controlType","@class"],[[28,[32,2],["i18n_remove","polls-creation/components/polls-detour"],null],"tertiary","1","button","polls-detour__remove-option-button"]],null],[1,"\\n"]],[]],null],[1," "],[13],[1,"\\n "],[8,[32,1],null,[["@type","@inputId","@inputClasses","@placeholder","@maxLength","@required","@restrictToMaxLength","@onInput","@value"],["text",[28,[32,4],["poll-option-",[30,2,["optionNumber"]]],null],"polls-detour__form-fields",[30,2,["placeholder"]],[30,2,["maxLength"]],[28,[32,8],[[28,[32,9],[[30,2,["optionNumber"]],1],null],[28,[32,9],[[30,2,["optionNumber"]],2],null]],null],false,[28,[32,7],[[30,0,["handlePollText"]],[30,2,["optionNumber"]]],null],[30,2,["value"]]]],null],[1,"\\n "],[13],[1,"\\n"]],[2]],null],[1,"\\n"],[41,[30,0,["shouldShowAddOption"]],[[[1," "],[10,0],[14,0,"mb3"],[12],[1,"\\n "],[8,[32,5],[[4,[32,6],["click",[30,0,["addOption"]]],null]],[["@text","@type","@icon","@controlType"],[[28,[32,2],["i18n_add_option","polls-creation/components/polls-detour"],null],"secondary","add","button"]],null],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1,"\\n "],[10,"h3"],[14,1,"polls-duration-label"],[14,0,"t-14 t-black t-bold mb3"],[12],[1,[28,[32,2],["i18n_poll_duration_header","polls-creation/components/polls-detour"],null]],[13],[1,"\\n\\n "],[11,"select"],[24,"aria-labelledby","polls-duration-label"],[24,0,"mb4"],[4,[32,6],["change",[30,0,["handlePollDurationChange"]]],null],[4,[32,6],["keyup",[30,0,["onKeyUp"]]],null],[12],[1,"\\n "],[10,"option"],[14,2,"1"],[15,"selected",[28,[32,9],[[30,0,["pollDuration"]],1],null]],[12],[1,[28,[32,2],["i18n_num_days","polls-creation/components/polls-detour"],[["numDays"],["1"]]]],[13],[1,"\\n "],[10,"option"],[14,2,"3"],[15,"selected",[28,[32,9],[[30,0,["pollDuration"]],3],null]],[12],[1,[28,[32,2],["i18n_num_days","polls-creation/components/polls-detour"],[["numDays"],["3"]]]],[13],[1,"\\n "],[10,"option"],[14,2,"7"],[15,"selected",[28,[32,9],[[30,0,["pollDuration"]],7],null]],[12],[1,[28,[32,2],["i18n_num_weeks","polls-creation/components/polls-detour"],[["numWeeks"],["1"]]]],[13],[1,"\\n "],[10,"option"],[14,2,"14"],[15,"selected",[28,[32,9],[[30,0,["pollDuration"]],14],null]],[12],[1,[28,[32,2],["i18n_num_weeks","polls-creation/components/polls-detour"],[["numWeeks"],["2"]]]],[13],[1,"\\n "],[13],[1,"\\n "],[10,2],[14,0,"mb3 t-14 t-black"],[12],[1,[28,[32,2],["i18n_legal_disclaimer_text","polls-creation/components/polls-detour"],null]],[13],[1,"\\n "],[13],[1,"\\n\\n "],[8,[32,10],null,[["@secondaryAction","@primaryAction","@primaryControlName","@secondaryControlName","@secondaryButtonKey","@primaryButtonKey","@isPrimaryDisabled"],[[30,3],[30,0,["createPollPreview"]],"poll_creation_done","poll_creation_cancel",[30,0,["footerSecondaryButtonKeys","BACK"]],[30,0,["footerPrimaryButtonKeys","DONE"]],[30,0,["doneButtonDisabled"]]]],null],[1,"\\n "],[13],[1,"\\n "]],["&attrs","opt","@goToCreation"],false,["each","-track-array","if"]]',moduleName:"polls-creation/components/polls-detour.gjs",scope:()=>[g.default,f.default,b.default,_.default,v.concat,y.default,S.on,v.fn,T.default,E.default,w.default],isStrictMode:!0}),(C=(0,h.inject)("i18n"),D=(0,h.inject)("global-services@store-shim"),O=(0,h.inject)("tracking"),A=(0,h.inject)("lix"),I=(0,h.inject)("m3-schema"),P=(0,h.inject)("@linkedin/ember-restli-graphql@graphql"),x=(W=new WeakSet,K=class e extends p.default{get shouldShowAddOption(){return this.answerOptions.length<4}get doneButtonDisabled(){const[e,t]=this.pollUserOptions,n=this.pollUserOptions.some((e=>e.length>30))
|
|
return!e.trim()||!t.trim()||!this.pollQuestion.trim()||n||this.pollQuestion.length>this.maxQuestionLength}constructor(){var i,r
|
|
super(...arguments)
|
|
W.add(this);(0,t.default)(this,"i18n",M,this);(0,t.default)(this,"storeShim",R,this);(0,t.default)(this,"tracking",N,this);(0,t.default)(this,"lix",U,this);(0,t.default)(this,"m3Schema",L,this);(0,t.default)(this,"graphql",F,this);(0,n.default)(this,"maxQuestionLength",140);(0,t.default)(this,"answerOptions",z,this);(0,t.default)(this,"pollUserOptions",j,this);(0,t.default)(this,"pollQuestion",V,this);(0,t.default)(this,"pollDuration",B,this);(0,t.default)(this,"hasTypedQuestion",H,this);(0,t.default)(this,"hasTypedOptionOne",G,this);(0,t.default)(this,"hasTypedOptionTwo",q,this);(0,n.default)(this,"footerSecondaryButtonKeys",s.SHARE_BOX_FOOTER_SECONDARY_KEYS);(0,n.default)(this,"footerPrimaryButtonKeys",s.SHARE_BOX_FOOTER_PRIMARY_KEYS)
|
|
if(this.args.detourData)this._loadForm(this.args.detourData)
|
|
else{const e=[...Array(2).keys()]
|
|
this.answerOptions=e.map((e=>this._createOption(e+1,"")))
|
|
this.pollUserOptions=e.map((()=>""))}this.tracking.firePageViewEvent("d_flagship3_poll_creation_form")
|
|
null===(i=(r=this.args).updateShareboxModalConfig)||void 0===i||i.call(r,{modalHeader:this.i18n.lookupTranslation(e,"i18n_create_poll")(),controlName:"poll_creation_exit",shouldFocusOnHeader:!0})}focusOnLastInput(e){const t=e.getElementsByTagName("input")
|
|
t[t.length-1].focus()}_getOptionName(t){return this.i18n.lookupTranslation(e,"i18n_option_number")([{optionNumber:t}])}_getOptionSuggestionText(t){return this.i18n.lookupTranslation(e,"i18n_option_suggestion_text")([{optionNumber:t}])}_createOption(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:""
|
|
return{optionNumber:e,label:this._getOptionName(e),required:e<=2,placeholder:this._getOptionSuggestionText(e),maxLength:30,value:t,hasRemoveButton:e>2}}_loadForm(e){const t=e.pollUserOptions.map(((e,t)=>this._createOption(t+1,e)))
|
|
this.answerOptions=t
|
|
this.pollQuestion=e.pollQuestion
|
|
this.pollUserOptions=e.pollUserOptions
|
|
this.pollDuration=e.pollDuration
|
|
this.hasTypedQuestion=!1
|
|
this.hasTypedOptionOne=!1
|
|
this.hasTypedOptionTwo=!1}handlePollText(e,t){if(!this.isDestroying){if(1===e&&this.hasTypedOptionOne){this.tracking.fireInteractionEvent("poll_option_1_text","SHORT_PRESS")
|
|
this.hasTypedOptionOne=!1}if(2===e&&this.hasTypedOptionTwo){this.tracking.fireInteractionEvent("poll_option_2_text","SHORT_PRESS")
|
|
this.hasTypedOptionTwo=!1}this.pollUserOptions[e-1]=t.target.value
|
|
this.pollUserOptions=[...this.pollUserOptions]}}handlePollQuestion(e){if(this.hasTypedQuestion){this.tracking.fireInteractionEvent("poll_question_text","SHORT_PRESS")
|
|
this.hasTypedQuestion=!1}this.pollQuestion=e.target.value}handlePollDurationChange(e){var t
|
|
this.pollDuration=parseInt(null==e||null===(t=e.target)||void 0===t?void 0:t.value,10)
|
|
this.tracking.fireInteractionEvent("poll_duration_select","SHORT_PRESS")}addOption(e){e.preventDefault()
|
|
this.tracking.fireInteractionEvent("poll_add_option","SHORT_PRESS")
|
|
const{answerOptions:t}=this
|
|
this.answerOptions=this.answerOptions.concat([this._createOption(t.length+1,"")])
|
|
this.pollUserOptions=this.pollUserOptions.concat([""])}removeOption(e,t){t.preventDefault()
|
|
this.pollUserOptions.splice(e-1,1)
|
|
this.answerOptions.pop()
|
|
this.answerOptions=this.answerOptions.map(((e,t)=>this._createOption(t+1,this.pollUserOptions[t])))}onKeyUp(e){(0,m.isEscapeKey)(e)&&e.stopPropagation()}createPollPreview(){if(!this.doneButtonDisabled){var e,t
|
|
const{pollDuration:n,pollQuestion:r,pollUserOptions:o,storeShim:a,lix:l,m3Schema:s,graphql:c}=this,{nonMemberActor:u}=this.args,p=(0,i.default)(this,W,Q).call(this,r,o,n)
|
|
null===(e=(t=this.args).onDetourComplete)||void 0===e||e.call(t,new d.default({dashPreviewComponent:p,pollQuestion:r,pollUserOptions:o,pollDuration:n,store:a,nonMemberActor:u,lix:l,m3Schema:s,graphql:c}))}}}),M=(0,r.default)(x.prototype,"i18n",[C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),R=(0,r.default)(x.prototype,"storeShim",[D],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),N=(0,r.default)(x.prototype,"tracking",[O],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),U=(0,r.default)(x.prototype,"lix",[A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),L=(0,r.default)(x.prototype,"m3Schema",[I],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),F=(0,r.default)(x.prototype,"graphql",[P],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),z=(0,r.default)(x.prototype,"answerOptions",[u.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),j=(0,r.default)(x.prototype,"pollUserOptions",[u.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),V=(0,r.default)(x.prototype,"pollQuestion",[u.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),B=(0,r.default)(x.prototype,"pollDuration",[u.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 7}}),H=(0,r.default)(x.prototype,"hasTypedQuestion",[u.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),G=(0,r.default)(x.prototype,"hasTypedOptionOne",[u.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),q=(0,r.default)(x.prototype,"hasTypedOptionTwo",[u.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),(0,r.default)(x.prototype,"handlePollText",[c.action],Object.getOwnPropertyDescriptor(x.prototype,"handlePollText"),x.prototype),(0,r.default)(x.prototype,"handlePollQuestion",[c.action],Object.getOwnPropertyDescriptor(x.prototype,"handlePollQuestion"),x.prototype),(0,r.default)(x.prototype,"handlePollDurationChange",[c.action],Object.getOwnPropertyDescriptor(x.prototype,"handlePollDurationChange"),x.prototype),(0,r.default)(x.prototype,"addOption",[c.action],Object.getOwnPropertyDescriptor(x.prototype,"addOption"),x.prototype),(0,r.default)(x.prototype,"removeOption",[c.action],Object.getOwnPropertyDescriptor(x.prototype,"removeOption"),x.prototype),(0,r.default)(x.prototype,"onKeyUp",[c.action],Object.getOwnPropertyDescriptor(x.prototype,"onKeyUp"),x.prototype),(0,r.default)(x.prototype,"createPollPreview",[c.action],Object.getOwnPropertyDescriptor(x.prototype,"createPollPreview"),x.prototype),x))
|
|
function Q(e,t,n){const i=this.i18n.lookupTranslation(K,"i18n_vote_disclaimer_text")(),r=this.i18n.lookupTranslation(K,"i18n_learn_more")(),o=this.i18n.lookupTranslation(K,Y[n])(),a=t.map((e=>this.m3Schema.buildModel("com.linkedin.voyager.dash.feed.component.polls.PollOption",{pollOptionUrn:"",preDashPollOptionUrn:"",option:(0,k.createTextViewModelV2)(e)}))),l=t.map((()=>this.m3Schema.buildModel("com.linkedin.voyager.dash.feed.component.polls.PollOptionSummary",{voteCount:0,optionThatReceivedMostVotes:!1}))),s=this.m3Schema.buildModel("com.linkedin.voyager.dash.common.text.TextViewModel",{text:`${i} ${r}`,textDirection:"USER_LOCALE",attributesV2:[this.m3Schema.buildModel("com.linkedin.voyager.dash.common.text.TextAttribute",{start:i.length+1,length:r.length+1,detailDataUnion:{textLink:this.m3Schema.buildModel("com.linkedin.voyager.dash.common.text.TextLink",{viewingBehavior:"OPEN_EXTERNALLY",url:"#"})}})]}),d=this.m3Schema.buildModel("com.linkedin.voyager.dash.feed.component.polls.PollSummary",{pollOptionSummaries:l,remainingDuration:(0,k.createTextViewModelV2)(o),uniqueVotersCount:0,entityUrn:"",preDashEntityUrn:""}),c=this.m3Schema.buildModel("com.linkedin.voyager.dash.feed.component.polls.PollComponent",{creatorView:!0,question:(0,k.createTextViewModelV2)(e),pollOptions:a,pollSummary:d,showPollSummaryInfo:!0,visibilityInfo:s})
|
|
return this.m3Schema.buildModel("com.linkedin.voyager.dash.feed.component.FeedComponent",{pollComponent:c})}}))
|
|
define("polls-creation/template-registry",[],(function(){}))
|
|
define("polls-creation/utils/polls-constants",["exports","@linkedin/ember-pem/utils/degradation-tracking-metadata"],(function(e,t){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.PEM_FEATURE_KEYS=e.DEGRADATION_TRACKING_METADATA=void 0
|
|
const n=e.PEM_FEATURE_KEYS=Object.freeze({POLL_CREATION:"create-a-poll"})
|
|
e.DEGRADATION_TRACKING_METADATA=Object.freeze({POLL_CREATION:new t.default(n.POLL_CREATION,"poll-error-toast",{productName:"Voyager - Feed - Polls",clientSensorGroupName:"feed"})})}))
|
|
define("polls-creation/utils/polls-detour-manager",["exports","detour-framework/utils/detour-manager","detour-framework/utils/detour-constants","detour-framework/utils/detour-status-data","polls-creation/utils/polls-utils","detour-framework/utils/dash-detour-preview-data","polls-creation/utils/polls-constants","graphql-queries/mutations/polls-creation/poll-create.graphql"],(function(e,t,n,i,r,o,a,l){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
class s extends t.default{constructor(){let{dashPreviewComponent:e,pollQuestion:t,pollUserOptions:r,pollUrn:a,pollDuration:l,store:s,organizationActorUrn:d,lix:c,m3Schema:u,graphql:p,nonMemberActor:m}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
|
const h={pollQuestion:t,pollUserOptions:r,pollUrn:a,pollDuration:l},g=new o.default({previewComponent:e,previewState:n.DETOUR_PREVIEW_STATES.SUCCEEDED})
|
|
super({detourStatusData:new i.default({detourState:n.DETOUR_STATES.SUCCEEDED,detourData:h}),dashDetourPreviewData:g,detourType:n.DETOUR_TYPES.POLL})
|
|
this.dashPreviewComponent=e
|
|
this.pollQuestion=t
|
|
this.pollUserOptions=r
|
|
this.pollUrn=a
|
|
this.pollDuration=l
|
|
this.storeShim=s
|
|
this.organizationActorUrn=d
|
|
this.getShareMedia=this._getShareMedia.bind(this)
|
|
this.lix=c
|
|
this.m3Schema=u
|
|
this.graphql=p
|
|
this.nonMemberActor=m}_createPoll(){var e
|
|
const t=this.pollUserOptions.filter((e=>""!==e)),n={question:this.pollQuestion,duration:(0,r.daysToDashEnum)(this.pollDuration),options:t}
|
|
if(null!==(e=this.nonMemberActor)&&void 0!==e&&e.dashCompanyUrn){var i
|
|
n.nonMemberActorUrn=null===(i=this.nonMemberActor)||void 0===i?void 0:i.dashCompanyUrn}const o=[a.DEGRADATION_TRACKING_METADATA.POLL_CREATION]
|
|
return this.graphql.executeMutation(l.default,{poll:n},{adapterOptions:{readOnCreate:!1,degradations:o,degradedEntityIDsToRemove:[]}})}_getShareMedia(){return this._createPoll().then((e=>[this.m3Schema.buildModel("com.linkedin.voyager.contentcreation.ShareMedia",{mediaUrn:e.data.doCreatePollFeedDashPollsPollSummary.result.entityUrn})]))}_getDashShareMedia(){return this._createPoll().then((e=>[{mediaUrn:e.data.doCreatePollFeedDashPollsPollSummary.result.entityUrn,category:"URN_REFERENCE"}]))}}e.default=s}))
|
|
define("polls-creation/utils/polls-utils",["exports"],(function(e){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.daysToDashEnum=function(e){switch(e){case 1:return"ONE_DAY"
|
|
case 3:return"THREE_DAYS"
|
|
case 7:return"ONE_WEEK"
|
|
case 14:return"TWO_WEEKS"
|
|
default:throw new Error("Unsupported number of days used")}}
|
|
e.daysToSeconds=function(e){return 24*e*60*60}}))
|
|
define("profile-validators/components/error-message",["exports","@ember/template-factory","@ember/component/template-only","@ember/component"],(function(e,t,n,i){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
const r=(0,i.setComponentTemplate)((0,t.createTemplateFactory)({id:"cr0AIbFE",block:'[[[1,"\\n "],[10,2],[14,0,"pe-form-field__error-message"],[12],[1,"\\n "],[1,[30,1,["message"]]],[1,"\\n "],[13],[1,"\\n"]],["@error"],false,[]]',moduleName:"profile-validators/components/error-message.gts",isStrictMode:!0}),(0,n.default)("error-message","ErrorMessage"))
|
|
e.default=r}))
|
|
define("profile-validators/components/validators/date-errors",["exports","@ember/template-factory","@ember/component/template-only","@ember/component"],(function(e,t,n,i){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
const r=(0,i.setComponentTemplate)((0,t.createTemplateFactory)({id:"LGsoozP4",block:'[[[1,"\\n"],[1,"\\n "]],[],false,[]]',moduleName:"profile-validators/components/validators/date-errors.gts",isStrictMode:!0}),(0,n.default)("date-errors","DateErrors"))
|
|
e.default=r}))
|
|
define("profile-validators/components/validators/profile-errors",["exports","@ember/template-factory","@ember/component/template-only","@ember/component"],(function(e,t,n,i){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
const r=(0,i.setComponentTemplate)((0,t.createTemplateFactory)({id:"IAeYyPnG",block:'[[[1,"\\n"],[1,"\\n "]],[],false,[]]',moduleName:"profile-validators/components/validators/profile-errors.gts",isStrictMode:!0}),(0,n.default)("profile-errors","ProfileErrors"))
|
|
e.default=r}))
|
|
define("profile-validators/components/validators/text-errors",["exports","@ember/template-factory","@ember/component/template-only","@ember/component"],(function(e,t,n,i){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
const r=(0,i.setComponentTemplate)((0,t.createTemplateFactory)({id:"Ki4ECGDH",block:'[[[1,"\\n"],[1,"\\n "]],[],false,[]]',moduleName:"profile-validators/components/validators/text-errors.gts",isStrictMode:!0}),(0,n.default)("text-errors","TextErrors"))
|
|
e.default=r}))
|
|
define("profile-validators/helpers/format-geo-urn",["exports","@ember/component/helper"],(function(e,t){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
e.formatGeoUrn=n
|
|
function n(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]
|
|
if("string"!=typeof e)return null
|
|
const n="urn:li:fs_geo",i="urn:li:fsd_geo"
|
|
return t?e.replace(n,i):e.replace(i,n)}const i=(0,t.helper)((function(e){let[t,i]=e
|
|
if(t)return n(t,i)}))
|
|
e.default=i}))
|
|
define("profile-validators/template-registry",[],(function(){}))
|
|
define("profile-validators/utils/constants/location",["exports","profile-validators/helpers/format-geo-urn"],(function(e,t){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.ZIP_CODE_VALIDATION=e.STATE_URN_PREFIX=e.POSTAL_CODE_MAX_LENGTH=e.POSTAL_CODE_GEO_COUNTRY_URN=e.NON_POSTAL_COUNTRIES=void 0
|
|
e.NON_POSTAL_COUNTRIES=["br","cn","in","my","mx"],e.ZIP_CODE_VALIDATION={au:"^\\d{4}$",be:"^\\d{4}$",ca:"^(?:[a-zA-Z0-9-\\s](?![-\\s].*[-\\s])){3,7}$",ch:"^\\d{4}$",de:"^\\d{5}$",dk:"^\\d{4}$",es:"^\\d{5}$",fr:"^\\d{5}$",gb:"^(?:[a-zA-Z0-9-\\s](?![-\\s].*[-\\s])){2,8}$",it:"^\\d{5}$",nl:"^(?:[a-zA-Z0-9-\\s](?![-\\s].*[-\\s])){4,7}$",no:"^\\d{4}$",pl:"^\\d{2}[-\\s]?\\d{3}$",pt:"^\\d{4}([-\\s]?\\d{3})?$",se:"^(\\d{3})([ ]?\\d{2})$",us:"^\\d{5}([-\\s]?\\d{4})?$"},e.POSTAL_CODE_MAX_LENGTH=10,e.STATE_URN_PREFIX="urn:li:fs_state:"
|
|
const n={"urn:li:fs_geo:100446943":"ar","urn:li:fs_geo:103883259":"at","urn:li:fs_geo:101452733":"au","urn:li:fs_geo:100565514":"be","urn:li:fs_geo:105333783":"bg","urn:li:fs_geo:101174742":"ca","urn:li:fs_geo:106693272":"ch","urn:li:fs_geo:104621616":"cl","urn:li:fs_geo:101282230":"de","urn:li:fs_geo:104514075":"dk","urn:li:fs_geo:105646813":"es","urn:li:fs_geo:100456013":"fi","urn:li:fs_geo:104630756":"fo","urn:li:fs_geo:105015875":"fr","urn:li:fs_geo:101165590":"gb","urn:li:fs_geo:105001561":"gf","urn:li:fs_geo:104232339":"gp","urn:li:fs_geo:104677530":"gr","urn:li:fs_geo:107006862":"gu","urn:li:fs_geo:104688944":"hr","urn:li:fs_geo:100288700":"hu","urn:li:fs_geo:105238872":"is","urn:li:fs_geo:103350119":"it","urn:li:fs_geo:100878084":"li","urn:li:fs_geo:104042105":"lu","urn:li:fs_geo:103091690":"mq","urn:li:fs_geo:102890719":"nl","urn:li:fs_geo:103819153":"no","urn:li:fs_geo:105490917":"nz","urn:li:fs_geo:102927786":"pe","urn:li:fs_geo:105072130":"pl","urn:li:fs_geo:105245958":"pr","urn:li:fs_geo:100364837":"pt","urn:li:fs_geo:104065273":"py","urn:li:fs_geo:104265812":"re","urn:li:fs_geo:101855366":"rs","urn:li:fs_geo:101728296":"ru","urn:li:fs_geo:105117694":"se","urn:li:fs_geo:102454443":"sg","urn:li:fs_geo:106137034":"si","urn:li:fs_geo:104187078":"tw","urn:li:fs_geo:102264497":"ua","urn:li:fs_geo:103644278":"us","urn:li:fs_geo:100867946":"uy","urn:li:fs_geo:101490751":"ve"},i=e.POSTAL_CODE_GEO_COUNTRY_URN=n
|
|
Object.entries(n).forEach((e=>{let[n,r]=e
|
|
i[(0,t.formatGeoUrn)(n,!0)]=r}))}))
|
|
define("profile-validators/utils/validators/base-validator",["exports","@babel/runtime/helpers/esm/defineProperty","@ember/debug","@ember/object","@ember/utils"],(function(e,t,n,i,r){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
e.default=class{constructor(e){(0,t.default)(this,"i18n",void 0)
|
|
this.i18n=e}getMessage(e,t,n){const i=this.i18n.lookupTranslation(e,t)(n)
|
|
return i}setError(e,t,n){if((0,i.get)(e,"hasDirtyAttributes")){(0,i.get)(e,"errors").add(t,n)
|
|
return}let r
|
|
null==e||e.eachAttribute((e=>{r||(r=e)}))
|
|
r||(r=t)
|
|
const o=(0,i.get)(e,r);(0,i.set)(e,r,o);(0,i.get)(e,"errors").add(t,n);(0,i.set)(e,r,o);(0,i.get)(e,"errors").add(t,n)}}}))
|
|
define("profile-validators/utils/validators/date-validator",["exports","@babel/runtime/helpers/esm/defineProperty","@ember/object","profile-validators/utils/validators/base-validator","global-utils/utils/number-util","global-utils/utils/date-utils"],(function(e,t,n,i,r,o){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
class a extends i.default{constructor(e,n){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new Date
|
|
super(e);(0,t.default)(this,"record",void 0);(0,t.default)(this,"hasYearField",void 0);(0,t.default)(this,"canDateBeInFuture",void 0);(0,t.default)(this,"today",void 0)
|
|
this.record=n
|
|
this.hasYearField=i
|
|
this.canDateBeInFuture=r
|
|
this.today=o}getDateErrorMessage(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i]
|
|
return this.getMessage("components/profile-validators@validators/date-errors",e,n)}validateDate(){const e=(0,n.get)(this.record,"birthDateOn");(0,n.get)(e,"errors").clear()
|
|
const t=(0,n.get)(e,"day")
|
|
let i=t?(0,r.parseInteger)(t):void 0
|
|
const a=(0,n.get)(e,"month"),l=a?Math.max(0,(0,r.parseInteger)(a)-1):void 0,s=(0,n.get)(e,"year"),d=s?(0,r.parseInteger)(s):void 0
|
|
if(i){l||this.setError(e,"month",this.getDateErrorMessage("enter_month"))
|
|
!d&&this.hasYearField&&this.setError(e,"year",this.getDateErrorMessage("enter_year"))}if(l){!d&&this.hasYearField&&this.setError(e,"year",this.getDateErrorMessage("enter_year"))
|
|
i||this.hasYearField||this.setError(e,"day",this.getDateErrorMessage("enter_day"))}if(l&&d&&this.hasYearField){const t=new Date(d,l+1,0).getDate()
|
|
i?i>t&&this.setError(e,"day",this.getDateErrorMessage("invalid_day",{daysInMonth:t})):i=1
|
|
if(!this.canDateBeInFuture&&(0,o.isFutureDate)(d,l,Math.min(i,t),this.today)){const{today:t}=this,n=d>t.getFullYear(),i=l>t.getMonth()
|
|
n?this.setError(e,"year",this.getDateErrorMessage("date_past_today")):i?this.setError(e,"month",this.getDateErrorMessage("date_past_today")):this.setError(e,"day",this.getDateErrorMessage("date_past_today"))}}}}e.default=a}))
|
|
define("profile-validators/utils/validators/identity/profile/profile-contact-info",["exports","@babel/runtime/helpers/esm/defineProperty","profile-validators/utils/validators/date-validator"],(function(e,t,n){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
e.default=class{constructor(e,i){(0,t.default)(this,"dateValidator",void 0);(0,t.default)(this,"record",void 0)
|
|
this.dateValidator=new n.default(e,i,!1)
|
|
this.record=i}validateAllFields(){this.record.birthDateOn&&this.dateValidator.validateDate()}}}))
|
|
define("profile-validators/utils/validators/identity/profile/profile",["exports","@babel/runtime/helpers/esm/defineProperty","@ember/debug","@ember/object","profile-validators/utils/validators/text-validator"],(function(e,t,n,i,r){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
const o={urlKeywords:/(https?(:\/\/)|www\.)/i,specialChars:/([!@#$%^&*+=|<>?:;\\])/,pronouns:/^([\p{L}@, ]+\/[\p{L}@, ]|[\p{L}@, ])+$/u},a={firstName:{min:1,max:50},phoneticFirstName:{max:50},lastName:{min:1,max:50},maidenName:{max:50},phoneticLastName:{max:50},headline:{min:1,max:220}},l=[o.urlKeywords.source,o.specialChars.source].join("|"),s=[o.urlKeywords.source].join("|")
|
|
e.default=class{constructor(e,n,i,o,l){(0,t.default)(this,"textValidator",void 0);(0,t.default)(this,"record",void 0);(0,t.default)(this,"useEditDash",void 0);(0,t.default)(this,"lix",void 0)
|
|
this.textValidator=new r.default(e,n,"components/profile-validators@validators/profile-errors",a,i,o)
|
|
this.record=n
|
|
this.useEditDash=i
|
|
this.lix=l}regexCheck(e,t,n){const r=this.useEditDash?this.textValidator.getDashFieldName(e):e,o=(0,i.get)(this.record,r)
|
|
"string"==typeof o&&t.test(o)&&this.textValidator.setError(this.record,r,this.textValidator.getErrorMessage(n))}validateName(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]
|
|
const n=new RegExp(l,"i")
|
|
this.textValidator.validateTextFieldLengthRange(e,t)
|
|
this.regexCheck(e,n,"remove_special_characters")}validateFirstName(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0]
|
|
this.validateName("firstName",e)}validatePhoneticFirstName(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0]
|
|
this.textValidator.validateTextFieldLengthRange("phoneticFirstName",e)}validateLastName(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0]
|
|
this.validateName("lastName",e)}validatePhoneticLastName(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0]
|
|
this.textValidator.validateTextFieldLengthRange("phoneticLastName",e)}validateMaidenName(){this.validateName("maidenName")}validateHeadline(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0]
|
|
const t=new RegExp(s,"i")
|
|
this.textValidator.validateTextFieldLengthRange("headline",e)
|
|
this.regexCheck("headline",t,"invalid_headline")}validateAllSecondaryLocaleFields(){this.validateFirstName()
|
|
this.validatePhoneticFirstName(!0)
|
|
this.validateLastName()
|
|
this.validatePhoneticLastName(!0)
|
|
this.validateHeadline()}}}))
|
|
define("profile-validators/utils/validators/text-validator",["exports","@babel/runtime/helpers/esm/defineProperty","@ember/utils","@ember/debug","profile-services/utils/identity-store/dash-edit-model-helpers","profile-validators/utils/validators/base-validator","@ember/string"],(function(e,t,n,i,r,o,a){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
class l extends o.default{constructor(e,n,i,r,o,a){super(e);(0,t.default)(this,"record",void 0);(0,t.default)(this,"errorsTemplate",void 0);(0,t.default)(this,"locale",void 0);(0,t.default)(this,"textFieldLengthRange",void 0);(0,t.default)(this,"useMultiLocale",void 0)
|
|
this.record=n
|
|
this.errorsTemplate=i
|
|
this.textFieldLengthRange=r
|
|
this.useMultiLocale=o
|
|
this.locale=a}getDashFieldName(e){return this.useMultiLocale&&r.MULTI_LOCALE_FIELDS.has(e)?(0,r.getMultiLocaleFieldForLocale)(e,this.locale):e}getErrorMessage(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i]
|
|
return this.getMessage(this.errorsTemplate,e,n)}validateTextFieldLengthRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]
|
|
const n=this.getDashFieldName(e),{errors:i}=this.record
|
|
i&&i.findBy("attribute",n)&&i.remove(n)
|
|
const r=this.record[n]||"",o=this.textFieldLengthRange[e]
|
|
if(!o)return
|
|
const l=r.trim().length
|
|
t&&0===l||l<(o.min||0)&&i.add(n,this.getErrorMessage(`enter_${(0,a.underscore)(e)}`))
|
|
l>o.max&&this.setError(this.record,n,this.getMessage("components/profile-validators@validators/text-errors","you_have_exceeded_limit",[{count:l-o.max}]))}}e.default=l}))
|
|
define("service-marketplace-detour/components/description-examples",["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","@glimmer/component","@ember/service","artdeco-carousel/components/artdeco-carousel","ember-cli-pemberly-i18n/helpers/t","ember-vector-images/components/lazy-image"],(function(e,t,n,i,r,o,a,l,s,d,c,u){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var p,m,h
|
|
e.default=(0,a.setComponentTemplate)((0,o.createTemplateFactory)({id:"Bca2KXue",block:'[[[1,"\\n"],[1," "],[8,[32,0],[[17,1]],[["@class","@carouselItems","@hidePrevNextBtnText","@pageSize"],["smp-detour-description-examples",[30,0,["carouselItems","length"]],true,1]],[["default"],[[[[1,"\\n "],[8,[30,2,["slider"]],null,null,[["default"],[[[[1,"\\n"],[42,[28,[31,1],[[28,[31,1],[[30,0,["carouselItems"]]],null]],null],null,[[[1," "],[8,[30,2,["item"]],null,[["@class"],["smp-detour-carousel-card"]],[["default"],[[[[1,"\\n "],[10,"h2"],[14,0,"t-16 t-black mb3"],[12],[1,"\\n "],[1,[28,[32,1],["carousel_title","service-marketplace-detour/components/description-examples"],null]],[1,"\\n "],[13],[1,"\\n "],[10,0],[14,0,"display-flex"],[12],[1,"\\n "],[8,[32,2],null,[["@image","@alt","@title","@ghostType","@class","@width"],[[30,3,["mockImg"]],[28,[32,1],["photo_alt_text","service-marketplace-detour/components/description-examples"],null],[28,[32,1],["photo_alt_text","service-marketplace-detour/components/description-examples"],null],"person","EntityPhoto-circle-3 flex-shrink-zero",100]],null],[1,"\\n "],[10,2],[14,0,"t-14 t-black--light flex-grow-1 ml3"],[12],[1,"\\n "],[1,[30,3,["exampleText"]]],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "]],[]]]]],[1,"\\n"]],[3]],null],[1," "]],[]]]]],[1,"\\n "]],[2]]]]],[1,"\\n "]],["&attrs","carousel","carouselItem"],false,["each","-track-array"]]',moduleName:"service-marketplace-detour/components/description-examples.gjs",scope:()=>[d.default,c.default,u.default],isStrictMode:!0}),(p=(0,s.inject)("i18n"),m=class e extends l.default{constructor(){super(...arguments);(0,t.default)(this,"i18n",h,this)
|
|
this.carouselItems=[{mockImg:"https://media.licdn.com/media/AAUQAgE2AAgAAQAAAAAAAASVAAAAJGJmOTZjZTI3LTgxNjItNGNlZC05ZGM0LTZhNjBlYjgxMmM2ZA.png",exampleText:this.i18n.lookupTranslation(e,"carousel_example_1")()},{mockImg:"https://media.licdn.com/media/AAUQAgE2AAgAAQAAAAAAAAWBAAAAJDVhOGQ3YzExLTRkNWMtNDg3NS04ZWUwLTUzNjNhNTgzMmI0Yg.png",exampleText:this.i18n.lookupTranslation(e,"carousel_example_2")()},{mockImg:"https://media.licdn.com/media/AAUQAgE2AAgAAQAAAAAAAAbjAAAAJDc5Mjg3OGJiLThkYWItNGZhNS04M2Y3LWNkZTBiMGFjOTY5Yw.png",exampleText:this.i18n.lookupTranslation(e,"carousel_example_3")()}]}},h=(0,i.default)(m.prototype,"i18n",[p],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),m))}))
|
|
define("service-marketplace-detour/components/form",["exports","@ember/template-factory","@ember/component","@babel/runtime/helpers/esm/initializerDefineProperty","@babel/runtime/helpers/esm/defineProperty","@babel/runtime/helpers/esm/applyDecoratedDescriptor","@babel/runtime/helpers/esm/initializerWarningHelper","detour-framework/utils/detour-constants","@linkedin/ember-restli-graphql","service-marketplace-detour/utils/degradation-tracking","service-marketplace-detour/utils/service-marketplace-detour-manager","service-marketplace-detour/utils/requests/data-fetchers","@linkedin/ember-m3-pdsc-model-builder","@glimmer/tracking","@glimmer/component","@ember/utils","@ember/service","@ember/object","@ember/debug","@ember/destroyable","ember-cli-pemberly-tracking/modifiers/track-render","ember-cli-pemberly-i18n/helpers/t","@ember/modifier","ember-set-helper/helpers/set","global-modifiers/modifiers/focus","global-helpers/helpers/eq","basic-typeahead/components/basic-typeahead","basic-typeahead/components/ta-fetch","global-helpers/helpers/or","search-ta-kit/helpers/graphql-fetch-results","search-ta-kit/components/search-typeahead-hit","artdeco-inline-feedback/components/artdeco-inline-feedback","@ember/helper","artdeco-text-input/components/artdeco-text-input","service-marketplace-detour/components/description-examples","detour-framework/components/share-box-footer","global-helpers/helpers/not"],(function(e,t,n,i,r,o,a,l,s,d,c,u,p,m,h,g,f,b,_,y,v,T,E,S,w,k,C,D,O,A,I,P,x,M,R,N,U){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var L,F,z,j,V,B,H,G,q,K,W,Y,Q,$,X,Z,J,ee,te,ne,ie,re,oe,ae,le,se,de,ce
|
|
let ue=(L=class{constructor(){let{isTouched:e=!1,text:t="",name:n="",urn:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,i.default)(this,"isTouched",F,this);(0,i.default)(this,"text",z,this);(0,i.default)(this,"name",j,this);(0,i.default)(this,"urn",V,this)
|
|
this.isTouched=e
|
|
this.text=t
|
|
this.name=n
|
|
this.urn=r}},F=(0,o.default)(L.prototype,"isTouched",[m.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),z=(0,o.default)(L.prototype,"text",[m.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),j=(0,o.default)(L.prototype,"name",[m.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),V=(0,o.default)(L.prototype,"urn",[m.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),L)
|
|
e.default=(0,n.setComponentTemplate)((0,t.createTemplateFactory)({id:"HqZ52HPo",block:'[[[1,"\\n"],[1," "],[11,0],[24,0,"smp-detour-form mb0 share-box-modal-content__container"],[17,1],[4,[32,0],null,[["pageKey","routeName","currentRoute"],["flagship3_marketplaces_chipotle_services_form",[28,[32,1],[[53,"outletState"],"render.name"],null],[28,[32,1],[[53,"outletState"],"render"],null]]]],[12],[1,"\\n "],[10,"h1"],[14,0,"t-14 t-bold"],[12],[1,"\\n "],[1,[28,[32,2],["form_title","service-marketplace-detour/components/form"],null]],[1,"\\n "],[13],[1,"\\n\\n"],[1," "],[10,"label"],[14,0,"smp-detour-form__label"],[14,"for","smp-detour-l1-service"],[12],[1,"\\n "],[1,[28,[32,2],["l1_service_question","service-marketplace-detour/components/form"],null]],[1,"\\n "],[13],[1,"\\n\\n "],[11,"select"],[24,1,"smp-detour-l1-service"],[16,0,[52,[30,0,["showL1ServiceError"]],"smp-detour-form__field--error"]],[16,"aria-describedby",[52,[30,0,["showL1ServiceError"]],"smp-detour-l1-service-error"]],[4,[32,3],["change",[30,0,["onL1ServiceSelect"]]],null],[4,[32,3],["blur",[28,[32,4],[[30,0],"_selectedL1Service.isTouched",true],null]],null],[4,[32,5],null,null],[12],[1,"\\n "],[10,"option"],[14,2,""],[14,"disabled",""],[15,"selected",[28,[32,6],[[30,0,["_selectedL1Service","urn"]]],null]],[12],[1,"\\n "],[1,[28,[32,2],["l1_service_placeholder","service-marketplace-detour/components/form"],null]],[1,"\\n "],[13],[1,"\\n\\n"],[42,[28,[31,3],[[28,[31,3],[[30,2]],null]],null],null,[[[1," "],[10,"option"],[15,2,[30,3,["entityUrn"]]],[15,"selected",[28,[32,7],[[30,3,["entityUrn"]],[30,0,["_selectedL1Service","urn"]]],null]],[12],[1,"\\n "],[1,[30,3,["name"]]],[1,"\\n "],[13],[1,"\\n"]],[3]],null],[1,"\\n"],[1," "],[10,"option"],[14,2,"other"],[15,"selected",[28,[32,7],[[30,0,["_selectedL1Service","urn"]],"other"],null]],[12],[1,"\\n "],[1,[28,[32,2],["l1_service_other","service-marketplace-detour/components/form"],null]],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n"],[41,[30,0,["showL1ServiceError"]],[[[1," "],[10,0],[14,0,"smp-detour-form__error-text t-12 t-bold"],[14,"role","alert"],[12],[1,"\\n "],[10,1],[14,1,"smp-detour-l1-service-error"],[12],[1,[28,[32,2],["l1_service_error","service-marketplace-detour/components/form"],null]],[13],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1,"\\n"],[41,[30,0,["showServiceTypeahead"]],[[[1," "],[10,"label"],[14,0,"smp-detour-form__label"],[14,1,"smp-detour-l2-service-label"],[14,"for","smp-detour-l2-service"],[12],[1,"\\n "],[1,[28,[32,2],["l2_service_generic_question","service-marketplace-detour/components/form"],null]],[1,"\\n "],[13],[1,"\\n\\n "],[8,[32,8],[[24,0,"search-basic-typeahead search-vertical-typeahead relative"]],[["@initialKeywords","@expandOnFocus"],[[30,0,["_selectedL2Service","name"]],true]],[["default"],[[[[1,"\\n "],[8,[30,4,["trigger"]],[[24,"aria-describedby","smp-detour-l2-service-label"]],[["@placeholder","@inputId","@onInput","@onBlur","@onFocus","@className"],[[28,[32,2],["l2_service_typeahead_placeholder","service-marketplace-detour/components/form"],null],"smp-detour-l2-service",[30,0,["handleL2TypeaheadInput"]],[28,[32,4],[[30,0],"_selectedL2Service.isTouched",true],null],[28,[32,9],[[30,0,["handleL2TypeaheadFocus"]],[30,4,["currentKeywords"]]],null],[52,[30,0,["showL2ServiceError"]],"smp-detour-form__field--error"]]],null],[1,"\\n"],[41,[30,4,["isExpanded"]],[[[1," "],[8,[32,10],null,[["@keywords","@fetchFn","@debouncePeriod"],[[28,[32,11],[[30,4,["currentKeywords"]],[30,0,["typeaheadEmptyKeyword"]]],null],[28,[32,12],null,[["type","typeaheadUseCase"],[[30,0,["_skillTaType"]],"MARKETPLACE"]]],200]],[["default"],[[[[1,"\\n"],[41,[30,6],[[[1," "],[8,[30,4,["triggered-content"]],null,null,[["default"],[[[[1,"\\n"],[42,[28,[31,3],[[28,[31,3],[[30,5]],null]],null],null,[[[1," "],[8,[30,7,["selectable"]],null,[["@onSelect","@value","@keywordsValue"],[[28,[32,9],[[30,0,["onL2TypeaheadSelect"]],[30,8]],null],[30,8],[30,8,["title","text"]]]],[["default"],[[[[1,"\\n "],[8,[32,13],null,[["@hit"],[[30,8]]],null],[1,"\\n "]],[]]]]],[1,"\\n"]],[8]],null],[1," "]],[7]]]]],[1,"\\n"]],[]],null],[1," "]],[5,6]]]]],[1,"\\n"]],[]],null],[1," "]],[4]]]]],[1,"\\n"]],[]],[[[41,[30,0,["_selectedL1Service","urn"]],[[[1," "],[10,"label"],[14,0,"smp-detour-form__label"],[14,"for","smp-detour-l2-service"],[12],[1,"\\n "],[1,[28,[32,2],["l2_service_question","service-marketplace-detour/components/form"],[["selectedL1ServiceName"],[[30,0,["_selectedL1Service","name"]]]]]],[1,"\\n "],[13],[1,"\\n "],[11,"select"],[24,1,"smp-detour-l2-service"],[16,0,[52,[30,0,["showL2ServiceError"]],"smp-detour-form__field--error"]],[16,"disabled",[52,[30,0,["showL2ServicesLoadingError"]],"disabled"]],[4,[32,3],["change",[30,0,["onL2ServiceSelect"]]],null],[4,[32,3],["blur",[28,[32,4],[[30,0],"_selectedL2Service.isTouched",true],null]],null],[12],[1,"\\n "],[10,"option"],[14,2,""],[14,"disabled",""],[15,"selected",[28,[32,6],[[30,0,["_selectedL2Service","urn"]]],null]],[12],[1,"\\n "],[1,[28,[32,2],["l2_service_placeholder","service-marketplace-detour/components/form"],null]],[1,"\\n "],[13],[1,"\\n\\n"],[42,[28,[31,3],[[28,[31,3],[[30,0,["l2Services"]]],null]],null],null,[[[1," "],[10,"option"],[15,2,[30,9,["entityUrn"]]],[15,"selected",[28,[32,7],[[30,9,["entityUrn"]],[30,0,["_selectedL2Service","urn"]]],null]],[12],[1,"\\n "],[1,[30,9,["name"]]],[1,"\\n "],[13],[1,"\\n"]],[9]],null],[1," "],[13],[1,"\\n "]],[]],null]],[]]],[1,"\\n"],[41,[30,0,["showL2ServicesLoadingError"]],[[[1," "],[8,[32,14],null,[["@classNames","@type","@message","@linkText","@onClick"],["mt1","error",[52,[30,0,["allowLoadL2ServicesRetry"]],[28,[32,2],["l2_service_load_error_text","service-marketplace-detour/components/form"],[["selectedL1ServiceName"],[[30,0,["_selectedL1Service","name"]]]]],[28,[32,2],["l2_service_load_error_try_again_later","service-marketplace-detour/components/form"],[["selectedL1ServiceName"],[[30,0,["_selectedL1Service","name"]]]]]],[52,[30,0,["allowLoadL2ServicesRetry"]],[28,[32,2],["l2_service_load_error_retry","service-marketplace-detour/components/form"],null]],[52,[30,0,["allowLoadL2ServicesRetry"]],[30,0,["retryLoadL2"]]]]],null],[1,"\\n"]],[]],[[[41,[30,0,["showL2ServiceError"]],[[[1," "],[10,0],[14,0,"smp-detour-form__error-text t-12 t-bold"],[14,"role","alert"],[14,"aria-labelledby","smp-detour-l2-service-error"],[12],[1,"\\n "],[10,1],[14,1,"smp-detour-l2-service-error"],[12],[1,[28,[32,2],["l2_service_error","service-marketplace-detour/components/form"],null]],[13],[1,"\\n "],[13],[1,"\\n "]],[]],null]],[]]],[1,"\\n"],[1," "],[10,"label"],[14,0,"smp-detour-form__label"],[14,1,"smp-detour-location-label"],[14,"for","smp-detour-location"],[12],[1,"\\n "],[1,[28,[32,2],["location_question","service-marketplace-detour/components/form"],null]],[1,"\\n "],[13],[1,"\\n "],[8,[32,8],[[24,0,"search-basic-typeahead search-vertical-typeahead relative"]],[["@initialKeywords","@expandOnFocus"],[[30,0,["_selectedLocation","name"]],true]],[["default"],[[[[1,"\\n "],[8,[30,10,["trigger"]],[[24,"aria-describedby","smp-detour-location-label"]],[["@inputId","@placeholder","@onInput","@onBlur","@className"],["smp-detour-location",[28,[32,2],["location_placeholder","service-marketplace-detour/components/form"],null],[28,[32,4],[[30,0],"_selectedLocation.urn",[27]],null],[28,[32,4],[[30,0],"_selectedLocation.isTouched",true],null],[52,[30,0,["showLocationError"]],"smp-detour-form__field--error"]]],null],[1,"\\n"],[41,[30,10,["isExpanded"]],[[[1," "],[8,[32,10],null,[["@keywords","@fetchFn","@debouncePeriod"],[[28,[32,11],[[30,10,["currentKeywords"]],[30,0,["typeaheadEmptyKeyword"]]],null],[28,[32,12],null,[["type","queryContext"],[[30,0,["_locationTaType"]],[30,0,["_locationTaQueryContext"]]]]],200]],[["default"],[[[[1,"\\n"],[41,[30,12],[[[1," "],[8,[30,10,["triggered-content"]],null,null,[["default"],[[[[1,"\\n"],[42,[28,[31,3],[[28,[31,3],[[30,11]],null]],null],null,[[[1," "],[8,[30,13,["selectable"]],null,[["@value","@keywordsValue","@onSelect"],[[30,14],[30,14,["title","text"]],[28,[32,9],[[30,0,["onLocationSelect"]],[30,14]],null]]],[["default"],[[[[1,"\\n "],[8,[32,13],null,[["@hit"],[[30,14]]],null],[1,"\\n "]],[]]]]],[1,"\\n"]],[14]],null],[1," "]],[13]]]]],[1,"\\n"]],[]],null],[1," "]],[11,12]]]]],[1,"\\n"]],[]],null],[1," "]],[10]]]]],[1,"\\n"],[41,[30,0,["showLocationError"]],[[[1," "],[10,0],[14,0,"smp-detour-form__error-text t-12 t-bold"],[14,"role","alert"],[14,"aria-labelledby","smp-detour-location-error"],[12],[1,"\\n "],[10,1],[14,1,"smp-detour-location-error"],[12],[1,[28,[32,2],["location_error","service-marketplace-detour/components/form"],null]],[13],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1,"\\n"],[1," "],[10,0],[15,0,[28,[32,15],["relative",[52,[30,0,["showDescriptionError"]]," smp-detour-form__multiline-input--error"]],null]],[12],[1,"\\n "],[8,[32,16],null,[["@inputClasses","@type","@maxLength","@label","@required","@onInput","@onFocusOut","@placeholder","@value","@aria-label"],[[28,[32,15],["smp-detour-form__multiline-input",[52,[30,0,["showDescriptionError"]]," smp-detour-form__field--error"]],null],"multiline",[30,0,["maxDescriptionLength"]],[28,[32,2],["description_question","service-marketplace-detour/components/form"],null],true,[30,0,["onDescriptionInput"]],[30,0,["onDescriptionFocusOut"]],[28,[32,2],["description_placeholder","service-marketplace-detour/components/form"],null],[30,0,["_description","text"]],[28,[32,15],[[28,[32,2],["description_question","service-marketplace-detour/components/form"],null]," ",[28,[32,2],["description_helper_text","service-marketplace-detour/components/form"],[["minDescriptionLength"],[[30,0,["minDescriptionLength"]]]]]],null]]],null],[1,"\\n"],[1," "],[10,1],[14,0,"smp-detour-form__multiline-input-helper-text t-12 t-black--light"],[12],[1,"\\n "],[1,[28,[32,2],["description_helper_text","service-marketplace-detour/components/form"],[["minDescriptionLength"],[[30,0,["minDescriptionLength"]]]]]],[1,"\\n "],[13],[1,"\\n\\n "],[13],[1,"\\n\\n "],[8,[32,17],[[24,0,"mt5"]],null,null],[1,"\\n "],[13],[1,"\\n\\n "],[8,[32,18],null,[["@secondaryAction","@secondaryControlName","@secondaryButtonKey","@isPrimaryDisabled","@primaryButtonKey","@primaryAction","@primaryControlName"],[[30,15],[30,16],[30,0,["footerSecondaryButtonKeys","BACK"]],[28,[32,19],[[30,0,["isSaveEnabled"]]],null],[30,0,["footerPrimaryButtonKeys","DONE"]],[30,0,["onFormSave"]],"find_an_expert_form_save"]],null],[1,"\\n "]],["&attrs","@l1Services","l1Service","ta","results","isLoaded","content","result","l2Service","ta","results","isLoaded","content","result","@onBack","@backButtonControlName"],false,["-get-dynamic-var","if","each","-track-array"]]',moduleName:"service-marketplace-detour/components/form.gjs",scope:()=>[v.default,x.get,T.default,E.on,S.default,w.default,g.isEmpty,k.default,C.default,x.fn,D.default,O.default,A.default,I.default,P.default,x.concat,M.default,R.default,N.default,U.default],isStrictMode:!0}),(B=(0,f.inject)("i18n"),H=(0,f.inject)("global-services@store-shim"),G=(0,f.inject)("locale"),q=(0,f.inject)("tracking"),K=(0,f.inject)("@linkedin/ember-restli-graphql@graphql"),W=(0,f.inject)("pem-tracking"),Y=(0,f.inject)("global-services@a11y-notification"),Q=class e extends h.default{get showL1ServiceError(){return this._shouldShowFieldError(this._selectedL1Service)}get showL2ServiceError(){return this._shouldShowFieldError(this._selectedL2Service)}get showLocationError(){return this._shouldShowFieldError(this._selectedLocation)}get isShareDashMediaEnabled(){return this.lix.getTreatmentIsEnabled("voyager.web.smp-dash-share-media")}get showDescriptionError(){const{isTouched:e,text:t}=this._description,n=t&&t.length?t.length:0
|
|
return e&&(n<this.minDescriptionLength||n>this.maxDescriptionLength)}get isSaveEnabled(){const e=this._description.text.length
|
|
return!(0,g.isEmpty)(this._selectedL1Service.urn)&&!(0,g.isEmpty)(this._selectedL2Service.urn)&&!(0,g.isEmpty)(this._selectedLocation.urn)&&e>=this.minDescriptionLength&&e<=this.maxDescriptionLength}get showServiceTypeahead(){return"other"===this._selectedL1Service.urn}constructor(){super(...arguments);(0,i.default)(this,"i18n",$,this);(0,i.default)(this,"lix",X,this);(0,i.default)(this,"storeShim",Z,this);(0,i.default)(this,"locale",J,this);(0,i.default)(this,"tracking",ee,this);(0,i.default)(this,"graphql",te,this);(0,i.default)(this,"pemTracking",ne,this);(0,i.default)(this,"a11yNotification",ie,this);(0,r.default)(this,"maxDescriptionLength",750);(0,r.default)(this,"minDescriptionLength",25);(0,r.default)(this,"_skillTaType","SKILL");(0,r.default)(this,"_locationTaType","GEO");(0,r.default)(this,"_locationTaQueryContext",{geoSearchTypes:["POPULATED_PLACE"]});(0,i.default)(this,"_selectedL1Service",re,this);(0,i.default)(this,"_selectedL2Service",oe,this);(0,i.default)(this,"_selectedLocation",ae,this);(0,i.default)(this,"_description",le,this);(0,i.default)(this,"l2Services",se,this);(0,i.default)(this,"allowLoadL2ServicesRetry",de,this);(0,i.default)(this,"showL2ServicesLoadingError",ce,this);(0,r.default)(this,"footerSecondaryButtonKeys",l.SHARE_BOX_FOOTER_SECONDARY_KEYS);(0,r.default)(this,"footerPrimaryButtonKeys",l.SHARE_BOX_FOOTER_PRIMARY_KEYS)
|
|
this.typeaheadEmptyKeyword=this.i18n.lookupTranslation(e,"typeahead_empty_keyword")()
|
|
this._selectedLocation=new ue({...this.args.selectedLocation})
|
|
if(this.args.detourData){const{selectedL1Service:e,selectedL2Service:t,selectedLocation:n,description:i}=(0,b.getProperties)(this.args.detourData,"selectedL1Service","selectedL2Service","selectedLocation","description")
|
|
this._selectedL1Service=new ue({...e})
|
|
this._selectedL2Service=new ue({...t})
|
|
this._selectedLocation=new ue({...n})
|
|
this._description=new ue({...i})
|
|
this.showServiceTypeahead||this._loadL2ByL1(this._selectedL1Service.urn)}}onFormSave(){this.isSaveEnabled&&this.args.onDetourComplete&&this.args.onDetourComplete(this._getDetourManager())}onL1ServiceSelect(t){const n=t.target.value,i=this.args.l1Services.find((e=>(0,b.get)(e,"entityUrn")===n))
|
|
this._selectedL1Service={urn:n,name:i?(0,b.get)(i,"name"):this.i18n.lookupTranslation(e,"l1_service_other")()}
|
|
this.l2Services=null
|
|
this._selectedL2Service=new ue
|
|
i&&this._loadL2ByL1(n)
|
|
this.tracking.fireInteractionEvent("find_an_expert_form_L1_select")}onL2ServiceSelect(e){const t=e.target.value
|
|
if(t){const e=this.l2Services.find((e=>(0,b.get)(e,"entityUrn")===t))
|
|
this._setSelectedL2Service(t,(0,b.get)(e,"name"))}this.tracking.fireInteractionEvent("find_an_expert_form_L2_select")}handleL2TypeaheadInput(){this._selectedL2Service.urn=void 0
|
|
this.tracking.fireInteractionEvent("find_an_expert_form_L2_typeahead_type")}handleL2TypeaheadFocus(e){e||this.tracking.fireInteractionEvent("find_an_expert_form_L2_typeahead_expand")}onL2TypeaheadSelect(e){this._setSelectedL2Service((0,b.get)(e,"target.skill.entityUrn"),(0,b.get)(e,"title.text"))
|
|
this.tracking.fireInteractionEvent("find_an_expert_form_L2_typeahead_select")}onLocationSelect(e){this._selectedLocation.urn=(0,b.get)(e,"target.geo.entityUrn")
|
|
this._selectedLocation.name=(0,b.get)(e,"title.text")
|
|
this.tracking.fireInteractionEvent("find_an_expert_form_location_select")}onDescriptionInput(e){const t=e.target.value
|
|
this._description.text=t
|
|
this.tracking.fireInteractionEvent("find_an_expert_form_description_edit")}retryLoadL2(){this.allowLoadL2ServicesRetry=!1
|
|
this._loadL2ByL1(this._selectedL1Service.urn)}onDescriptionFocusOut(t){let{target:{value:n}}=t
|
|
this._description.isTouched||(this._description.isTouched=!0)
|
|
const i=n&&n.length?n.length:0;(i<this.minDescriptionLength||i>this.maxDescriptionLength)&&this.a11yNotification.setTextInLiveRegion(this.i18n.lookupTranslation(e,"description_error")([{minDescriptionLength:this.minDescriptionLength}]))}_setSelectedL2Service(e,t){this._selectedL2Service.urn=e
|
|
this._selectedL2Service.name=t
|
|
this._prefillDescription()}_shouldShowFieldError(e){const{isTouched:t,urn:n}=e
|
|
return t&&(0,g.isEmpty)(n)}_prefillDescription(){const t=this.i18n.lookupTranslation(e,"description_generated")([{selectedL2ServiceName:this._selectedL2Service.name}])
|
|
this._description.text=t}_loadL2ByL1(e){const t={adapterOptions:{degradations:[d.DEGRADATION_METADATA.FETCH_L2_SKILLS_BY_PARENT],degradedEntityIDsToRemove:[]}}
|
|
this.graphql.executeQuery(...(0,u.buildFetchSuggestedL2ServicesByParentGraphqlRequest)(e,t)).then((e=>{if(!this.isDestroying){this.l2Services=(0,b.get)(e,"data.marketplacesDashServiceMarketplaceSkillsByParentSkill.elements").map((e=>(0,b.get)(e,"standardizedSkill")))
|
|
this.showL2ServicesLoadingError=!1}})).catch((e=>{if((0,y.isDestroying)(this))throw e
|
|
this.showL2ServicesLoadingError=!0
|
|
if(e&&!e.isAdapterError&&!(e instanceof s.GraphQLQueryError))throw e}))}_constructEntityComponent(t,n){const i=(0,p.buildModel)("com.linkedin.voyager.common.TextViewModel",{text:t}),r=(0,p.buildModel)("com.linkedin.voyager.common.TextViewModel",{text:n}),o=(0,p.buildModel)("com.linkedin.voyager.common.TextViewModel",{text:this.i18n.lookupTranslation(e,"share_component_description")()})
|
|
return(0,p.buildModel)("com.linkedin.voyager.feed.render.EntityComponent",{title:i,subtitle:r,description:o})}_constructDashEntityComponent(t,n){const i=(0,p.buildModel)("com.linkedin.voyager.dash.common.text.TextViewModel",{text:t}),r=(0,p.buildModel)("com.linkedin.voyager.dash.common.text.TextViewModel",{text:n}),o=(0,p.buildModel)("com.linkedin.voyager.dash.common.text.TextViewModel",{text:this.i18n.lookupTranslation(e,"share_component_description")()}),a=(0,p.buildModel)("com.linkedin.voyager.dash.feed.component.entity.EntityComponent",{title:i,subtitle:r,description:o})
|
|
return(0,p.buildModel)("com.linkedin.voyager.dash.feed.component.FeedComponent",{entityComponent:a})}_getDetourManager(){const{_selectedL1Service:e,_selectedL2Service:t,_selectedLocation:n,_description:i}=this,r=new c.default({previewComponent:this._constructEntityComponent(t.name,n.name),dashPreviewComponent:this._constructDashEntityComponent(t.name,n.name),onCancel:this._onDetourCancel.bind(this),description:{text:i.text},selectedL1Service:{urn:e.urn,name:e.name},selectedL2Service:{urn:t.urn,name:t.name},selectedLocation:{urn:n.urn,name:n.name},store:this.storeShim,i18nService:this.i18n,interfaceLocale:this.locale.interfaceLocale,pemTrackingService:this.pemTracking,isShareDashMediaEnabled:this.isShareDashMediaEnabled})
|
|
return r}_onDetourCancel(){if(!this.isDestroying){this._selectedL1Service=new ue
|
|
this._selectedL2Service=new ue
|
|
this._selectedLocation=new ue
|
|
this._description=new ue}}},$=(0,o.default)(Q.prototype,"i18n",[B],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),X=(0,o.default)(Q.prototype,"lix",[f.inject],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Z=(0,o.default)(Q.prototype,"storeShim",[H],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),J=(0,o.default)(Q.prototype,"locale",[G],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ee=(0,o.default)(Q.prototype,"tracking",[q],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),te=(0,o.default)(Q.prototype,"graphql",[K],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ne=(0,o.default)(Q.prototype,"pemTracking",[W],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ie=(0,o.default)(Q.prototype,"a11yNotification",[Y],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),re=(0,o.default)(Q.prototype,"_selectedL1Service",[m.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new ue}}),oe=(0,o.default)(Q.prototype,"_selectedL2Service",[m.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new ue}}),ae=(0,o.default)(Q.prototype,"_selectedLocation",[m.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new ue}}),le=(0,o.default)(Q.prototype,"_description",[m.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new ue}}),se=(0,o.default)(Q.prototype,"l2Services",[m.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),de=(0,o.default)(Q.prototype,"allowLoadL2ServicesRetry",[m.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),ce=(0,o.default)(Q.prototype,"showL2ServicesLoadingError",[m.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),(0,o.default)(Q.prototype,"onFormSave",[b.action],Object.getOwnPropertyDescriptor(Q.prototype,"onFormSave"),Q.prototype),(0,o.default)(Q.prototype,"onL1ServiceSelect",[b.action],Object.getOwnPropertyDescriptor(Q.prototype,"onL1ServiceSelect"),Q.prototype),(0,o.default)(Q.prototype,"onL2ServiceSelect",[b.action],Object.getOwnPropertyDescriptor(Q.prototype,"onL2ServiceSelect"),Q.prototype),(0,o.default)(Q.prototype,"handleL2TypeaheadInput",[b.action],Object.getOwnPropertyDescriptor(Q.prototype,"handleL2TypeaheadInput"),Q.prototype),(0,o.default)(Q.prototype,"handleL2TypeaheadFocus",[b.action],Object.getOwnPropertyDescriptor(Q.prototype,"handleL2TypeaheadFocus"),Q.prototype),(0,o.default)(Q.prototype,"onL2TypeaheadSelect",[b.action],Object.getOwnPropertyDescriptor(Q.prototype,"onL2TypeaheadSelect"),Q.prototype),(0,o.default)(Q.prototype,"onLocationSelect",[b.action],Object.getOwnPropertyDescriptor(Q.prototype,"onLocationSelect"),Q.prototype),(0,o.default)(Q.prototype,"onDescriptionInput",[b.action],Object.getOwnPropertyDescriptor(Q.prototype,"onDescriptionInput"),Q.prototype),(0,o.default)(Q.prototype,"retryLoadL2",[b.action],Object.getOwnPropertyDescriptor(Q.prototype,"retryLoadL2"),Q.prototype),(0,o.default)(Q.prototype,"onDescriptionFocusOut",[b.action],Object.getOwnPropertyDescriptor(Q.prototype,"onDescriptionFocusOut"),Q.prototype),Q))}))
|
|
define("service-marketplace-detour/components/service-marketplace-detour",["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/helper","@ember/component","detour-framework/utils/detour-constants","@linkedin/ember-restli-graphql","service-marketplace-detour/utils/degradation-tracking","service-marketplace-detour/utils/requests/data-fetchers","rsvp","@glimmer/tracking","@glimmer/component","@ember/service","@ember/object","@ember/destroyable","@ember/render-modifiers/modifiers/did-insert","artdeco-loader/components/artdeco-loader","artdeco-empty-state/components/artdeco-empty-state","ember-cli-pemberly-i18n/helpers/t","service-marketplace-detour/components/form","detour-framework/components/share-box-footer"],(function(e,t,n,i,r,o,a,l,s,d,c,u,p,m,h,g,f,b,_,y,v,T,E,S){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var w,k,C,D,O,A,I,P,x,M,R,N,U,L
|
|
e.default=(0,l.setComponentTemplate)((0,o.createTemplateFactory)({id:"xmDa1TOk",block:'[[[1,"\\n"],[1," "],[11,0],[24,0,"display-flex flex-grow-1 flex-column"],[17,1],[4,[32,0],[[30,0,["onInsert"]]],null],[12],[1,"\\n"],[41,[30,0,["isLoading"]],[[[1," "],[10,0],[14,0,"display-flex justify-center align-items-center flex-grow-1 flex-column"],[12],[1,"\\n "],[8,[32,1],null,null,null],[1,"\\n "],[13],[1,"\\n"]],[]],[[[41,[30,0,["showErrorState"]],[[[1," "],[10,0],[14,0,"share-box-modal-content__container mb0"],[12],[1,"\\n "],[8,[32,2],null,[["@headline","@illustration","@message","@size","@actionText","@onButtonClick","@buttonType","@class"],[[28,[32,3],["service_marketplace_detour_error","service-marketplace-detour/components/service-marketplace-detour"],null],"sad-browser",[52,[30,0,["allowLoadFormRetry"]],[28,[32,3],["service_marketplace_detour_try_again","service-marketplace-detour/components/service-marketplace-detour"],null],[28,[32,3],["service_marketplace_detour_try_again_later","service-marketplace-detour/components/service-marketplace-detour"],null]],1,[52,[30,0,["allowLoadFormRetry"]],[28,[32,3],["service_marketplace_detour_error_retry","service-marketplace-detour/components/service-marketplace-detour"],null]],[30,0,["retryLoadForm"]],"tertiary","pt6 pb5"]],null],[1,"\\n "],[13],[1,"\\n"]],[]],[[[1," "],[8,[32,4],null,[["@l1Services","@selectedLocation","@detourData","@onDetourComplete","@onBack","@backButtonControlName"],[[30,0,["l1Services"]],[30,0,["selectedLocation"]],[30,2],[30,3],[30,0,["backToPreviousScreen"]],[30,0,["backButtonControlName"]]]],null],[1,"\\n "]],[]]]],[]]],[1,"\\n"],[41,[30,0,["showShareboxFooter"]],[[[1," "],[8,[32,5],null,[["@secondaryAction","@secondaryControlName","@secondaryButtonKey"],[[30,0,["backToPreviousScreen"]],[30,0,["backButtonControlName"]],[30,0,["footerSecondaryButtonKeys","BACK"]]]],null],[1,"\\n"]],[]],null],[1," "],[13],[1,"\\n "]],["&attrs","@detourData","@onDetourComplete"],false,["if"]]',moduleName:"service-marketplace-detour/components/service-marketplace-detour.gjs",scope:()=>[_.default,y.default,v.default,T.default,E.default,S.default],isStrictMode:!0}),(w=(0,g.inject)("profile-services@identity-store"),k=(0,g.inject)("authentication@authenticated-user"),C=(0,g.inject)("i18n"),D=(0,g.inject)("@linkedin/ember-restli-graphql@graphql"),O=class e extends h.default{get showForm(){return this.l1Services&&this.selectedLocation}get backButtonControlName(){return this.showErrorState?"find_an_expert_error_back":"find_an_expert_form_back"}get showShareboxFooter(){return!this.showForm}constructor(){super(...arguments);(0,t.default)(this,"identityStore",A,this);(0,t.default)(this,"authenticatedUser",I,this);(0,t.default)(this,"i18n",P,this);(0,t.default)(this,"graphql",x,this);(0,t.default)(this,"showErrorState",M,this);(0,t.default)(this,"allowLoadFormRetry",R,this);(0,t.default)(this,"isLoading",N,this);(0,t.default)(this,"l1Services",U,this);(0,t.default)(this,"selectedLocation",L,this);(0,n.default)(this,"footerSecondaryButtonKeys",s.SHARE_BOX_FOOTER_SECONDARY_KEYS)
|
|
this._loadForm()}onInsert(){this.args.updateShareboxModalConfig&&this.args.updateShareboxModalConfig({modalHeader:this.i18n.lookupTranslation(e,"service_marketplace_detour_header")(),controlName:"share.profinder_detour_exit",shouldFocusOnHeader:!0})}backToPreviousScreen(){this.args.goToCreation&&this.args.goToCreation()}loadForm(){this._loadForm()}retryLoadForm(){this.allowLoadFormRetry=!1
|
|
this._loadForm()}_loadForm(){const{identityStore:e,authenticatedUser:t,graphql:n}=this
|
|
this.isLoading=!0
|
|
const i={adapterOptions:{degradations:[c.DEGRADATION_METADATA.FETCH_L1_SKILLS_BY_GROUPING],degradedEntityIDsToRemove:[]}};(0,p.hash)({profile:(0,u.getFullProfile)(e,t.memberId),l1ServicesData:n.executeQuery(...(0,u.buildFetchSuggestedL1ServicesGraphqlRequest)(i))}).then((e=>{let{profile:t,l1ServicesData:n}=e
|
|
if(!this.isDestroying){this.l1Services=(0,f.get)(n,"data.marketplacesDashServiceMarketplaceSkillsByServiceSkillsGroupingType.elements").map((e=>(0,f.get)(e,"standardizedSkill")))
|
|
this.selectedLocation={name:(0,f.get)(t,"geoLocation.geo.defaultLocalizedName"),urn:(0,f.get)(t,"geoLocation.geoUrn")}
|
|
this.showErrorState=!1
|
|
this.allowLoadFormRetry=!0}})).catch((e=>{if((0,b.isDestroying)(this))throw e
|
|
this.showErrorState=!0
|
|
if(e&&!(e instanceof d.GraphQLQueryError)&&!e.isAdapterError)throw e})).finally((()=>{this.isDestroying||(this.isLoading=!1)}))}},A=(0,i.default)(O.prototype,"identityStore",[w],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),I=(0,i.default)(O.prototype,"authenticatedUser",[k],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),P=(0,i.default)(O.prototype,"i18n",[C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),x=(0,i.default)(O.prototype,"graphql",[D],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),M=(0,i.default)(O.prototype,"showErrorState",[m.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),R=(0,i.default)(O.prototype,"allowLoadFormRetry",[m.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),N=(0,i.default)(O.prototype,"isLoading",[m.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),U=(0,i.default)(O.prototype,"l1Services",[m.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),L=(0,i.default)(O.prototype,"selectedLocation",[m.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),(0,i.default)(O.prototype,"onInsert",[f.action],Object.getOwnPropertyDescriptor(O.prototype,"onInsert"),O.prototype),(0,i.default)(O.prototype,"backToPreviousScreen",[f.action],Object.getOwnPropertyDescriptor(O.prototype,"backToPreviousScreen"),O.prototype),(0,i.default)(O.prototype,"loadForm",[f.action],Object.getOwnPropertyDescriptor(O.prototype,"loadForm"),O.prototype),(0,i.default)(O.prototype,"retryLoadForm",[f.action],Object.getOwnPropertyDescriptor(O.prototype,"retryLoadForm"),O.prototype),O))}))
|
|
define("service-marketplace-detour/template-registry",[],(function(){}))
|
|
define("service-marketplace-detour/templates/utils/hashtag-helpers",["exports","@ember/template-factory"],(function(e,t){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
e.default=(0,t.createTemplateFactory)({id:"RQgfx0ar",block:"[[],[],false,[]]",moduleName:"service-marketplace-detour/templates/utils/hashtag-helpers.hbs",isStrictMode:!1})}))
|
|
define("service-marketplace-detour/utils/degradation-tracking",["exports","@linkedin/ember-pem/utils/degradation-tracking-metadata"],(function(e,t){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.DEGRADATION_METADATA=void 0
|
|
const n={clientSensorGroupName:"service-marketplace",nonDegradedResponseCodes:[]},i=Object.freeze({VOYAGER_SERVICES_MARKETPLACE:"Voyager - Services Marketplace"})
|
|
e.DEGRADATION_METADATA={FETCH_L2_SKILLS_BY_PARENT:new t.default("fetch-l2-skills-by-parent","failed-fetch-l2-skills-by-parent",{productName:i.VOYAGER_SERVICES_MARKETPLACE,...n}),FETCH_L1_SKILLS_BY_GROUPING:new t.default("fetch-l1-skills-by-grouping","failed-fetch-l1-skills-by-grouping",{productName:i.VOYAGER_SERVICES_MARKETPLACE,...n}),CHIPOTLE_RFP_CREATE:new t.default("chipotle-rfp-create","failed-chipotle-rfp-create",{productName:i.VOYAGER_SERVICES_MARKETPLACE,...n})}}))
|
|
define("service-marketplace-detour/utils/requests/data-fetchers",["exports","@ember/object","global-utils/utils/create-cache-key-from-query","rsvp","graphql-queries/queries/service-marketplace/skills-by-grouping-type.graphql","graphql-queries/queries/service-marketplace/skills-by-parent-skill.graphql"],(function(e,t,n,i,r,o){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.buildFetchSuggestedL1ServicesGraphqlRequest=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
|
const t={q:"serviceSkillsGroupingType",serviceSkillsGroupingType:"SHARE_COMPOSE"}
|
|
return[r.default,{serviceSkillsGroupingType:"SHARE_COMPOSE"},{cacheKey:(0,n.default)(a,t),...e}]}
|
|
e.buildFetchSuggestedL2ServicesByParentGraphqlRequest=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}
|
|
const i={q:"parentSkill",parentSkill:e}
|
|
return[o.default,{parentSkill:e},{cacheKey:(0,n.default)(a,i),...t}]}
|
|
e.getFullProfile=function(e,n){const r="com.linkedin.voyager.dash.deco.identity.profile.FullProfile",o=e.peekRecord(r,n)
|
|
return o?(0,i.resolve)(o):e.queryURL("com.linkedin.voyager.dash.identity.profile.Profile",n,{params:{recipe:r}}).then((e=>(0,t.get)(e,"elements.firstObject")))}
|
|
const a="voyagerMarketplacesDashServiceMarketplaceSkills"}))
|
|
define("service-marketplace-detour/utils/requests/data-submissions",["exports","voyager-web/config/environment"],(function(e,t){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.buildSubmitRfsRequest=function(e){return[`/${t.default.namespace}/voyagerMarketplacesDashGenericRequestsForProposals`,"POST",{data:e}]}}))
|
|
define("service-marketplace-detour/utils/service-marketplace-detour-manager",["exports","@ember/debug","detour-framework/utils/detour-constants","detour-framework/utils/detour-manager","detour-framework/utils/detour-preview-data","detour-framework/utils/dash-detour-preview-data","detour-framework/utils/detour-status-data","detour-framework/utils/progress-data","sharing-shared/utils/text-view-model-helpers","@linkedin/ember-m3-pdsc-model-builder","service-marketplace-detour/utils/requests/data-submissions","service-marketplace-detour/utils/degradation-tracking"],(function(e,t,n,i,r,o,a,l,s,d,c,u){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
const p="service-marketplace-detour@utils/hashtag-helpers"
|
|
class m extends i.default{constructor(){let{onCancel:e,previewComponent:t,dashPreviewComponent:i,description:s,selectedL1Service:d,selectedL2Service:c,selectedLocation:u,store:p,i18nService:m,interfaceLocale:h,pemTrackingService:g,isShareDashMediaEnabled:f}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
|
const b={selectedL1Service:d,selectedL2Service:c,selectedLocation:u,description:s},_=new l.default({headline:""})
|
|
super({detourStatusData:new a.default({detourState:n.DETOUR_STATES.IN_PROGRESS,detourData:b,progressData:_}),detourPreviewData:new r.default({previewComponent:t,previewState:n.DETOUR_PREVIEW_STATES.SUCCEEDED}),dashDetourPreviewData:new o.default({previewComponent:i,previewState:n.DETOUR_PREVIEW_STATES.SUCCEEDED}),onCancel:e,detourType:n.DETOUR_TYPES.SERVICE_MARKETPLACE})
|
|
this.previewComponent=t
|
|
this.dashPreviewComponent=i
|
|
this.selectedL1Service=d
|
|
this.selectedL2Service=c
|
|
this.selectedLocation=u
|
|
this.description=s
|
|
this.storeShim=p
|
|
this.i18nService=m
|
|
this.interfaceLocale=h
|
|
this.pemTrackingService=g
|
|
this.getShareText=this._getShareText.bind(this)
|
|
this.getShareMedia=this._getShareMedia.bind(this)
|
|
f&&(this.getDashShareMedia=this._getDashShareMedia.bind(this))}_generateServiceHashTag(e){return this.i18nService.lookupTranslation(p,"encoded_hashtag_with_placeholder")([{hashtag_text:this._sanitizeServiceName(e)}])}_sanitizeServiceName(e){const t=e.replace(/&/g,this.i18nService.lookupTranslation(p,"amperstand_replacement")()).replace(/-|\/.*|\(.*\)/g,"")
|
|
return/ru_RU|ar_AE/.test(this.interfaceLocale)?t.trim().replace(/\s/g,"_"):t.replace(/\s/g,"")}_getShareText(){const{text:e,mentions:t}=this.description,n=[e],i=this.i18nService.lookupTranslation(p,"find_a_pro_hashtag")()
|
|
"other"!==this.selectedL1Service.urn&&n.push(this._generateServiceHashTag(this.selectedL1Service.name))
|
|
n.push(this._generateServiceHashTag(this.selectedL2Service.name),i)
|
|
return(0,s.generateTVMV2FromTextAndMentions)(n.join(" "),t)}_getShareMedia(){const e={description:this.description.text,skillUrn:this.selectedL2Service.urn,geoPlaceUrn:this.selectedLocation.urn},t=(0,c.buildSubmitRfsRequest)(e),i=this.storeShim.adapterFor("-ember-m3").ajax(...t)
|
|
this.pemTrackingService.trackFeatureDegradations(t[0],[],[u.DEGRADATION_METADATA.CHIPOTLE_RFP_CREATE],i)
|
|
return i.then((e=>{let{newId:t}=e
|
|
return[(0,d.buildModel)("com.linkedin.voyager.contentcreation.ShareMedia",{category:n.SHARE_MEDIA_CATEGORIES.URN_REFERENCE,mediaUrn:t})]}))}_getDashShareMedia(){const e={description:this.description.text,skillUrn:this.selectedL2Service.urn,geoPlaceUrn:this.selectedLocation.urn},t=(0,c.buildSubmitRfsRequest)(e),i=this.storeShim.adapterFor("-ember-m3").ajax(...t)
|
|
this.pemTrackingService.trackFeatureDegradations(t[0],[],[u.DEGRADATION_METADATA.CHIPOTLE_RFP_CREATE],i)
|
|
return i.then((e=>{let{newId:t}=e
|
|
return[{category:n.SHARE_MEDIA_CATEGORIES.URN_REFERENCE,mediaUrn:t}]}))}}e.default=m}))
|
|
define("team-moments/components/celebration-container",["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","@ember/destroyable","@glimmer/component","@glimmer/tracking","@ember/service","@ember/object","@ember/debug","rsvp","@linkedin/ember-m3-pdsc-model-builder","team-moments/utils/team-moments-utils","team-moments/utils/team-moments-constants","detour-framework/utils/preview-utils","detour-framework/utils/detour-constants","detour-framework/utils/detour-manager","detour-framework/utils/detour-preview-data","detour-framework/utils/dash-detour-preview-data","detour-framework/utils/detour-status-data","vector/utils/constants","sharing-shared/utils/text-view-model-helpers","feed-utils/utils/client-sensor-constants","global-utils/utils/urn-id-helpers","global-utils/utils/urn-converter"],(function(e,t,n,i,r,o,a,l,s,d,c,u,p,m,h,g,f,b,_,y,v,T,E,S,w,k,C,D){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var O,A,I,P,x,M,R,N,U,L,F,z,j,V,B,H,G,q,K,W
|
|
const Y=(0,a.createTemplateFactory)({id:"tfAsdu+d",block:'[[[18,2,[[28,[37,1],null,[["onUploadImage","onUploadImageError","removeImage","selectTheme","onUpdateSelectedRecipients","goToShare","transitionToChooserMenuOrSharebox","transitionToPrevious","transitionToNext"],[[30,0,["onUploadImage"]],[30,0,["onUploadImageError"]],[30,0,["removeImage"]],[30,0,["selectTheme"]],[30,0,["onUpdateSelectedRecipients"]],[30,0,["goToShare"]],[30,0,["transitionToChooserMenuOrSharebox"]],[30,0,["transitionToPrevious"]],[30,0,["transitionToNext"]]]]],[28,[37,1],null,[["occasion","steps","controlNameByStep","celebrationComponentModel","celebrationImage","selectedTheme","prefilledRecipient","selectedRecipients","mediaData"],[[30,0,["occasion"]],[30,0,["steps"]],[30,0,["controlNameByStep"]],[30,0,["celebrationComponentModel"]],[30,0,["celebrationImage"]],[30,0,["selectedTheme"]],[30,1],[30,0,["selectedRecipients"]],[30,0,["backgroundImageMedia"]]]]]]]],["@prefilledRecipient","&default"],false,["yield","hash"]]',moduleName:"team-moments/components/celebration-container.hbs",isStrictMode:!1})
|
|
let Q=e.default=(O=(0,c.inject)("client-sensor-web@client-sensor"),A=(0,c.inject)("formatter"),I=(0,c.inject)("i18n"),P=(0,c.inject)("vector@vector-media-upload"),x=(0,c.inject)("global-services@store-shim"),M=(0,c.inject)("persistent-toast-manager@persistent-toast-manager"),R=class extends s.default{get celebrationComponentModel(){return{$type:"com.linkedin.voyager.feed.render.CelebrationComponent",image:this.celebrationImage,icon:this.celebrationIcon,headline:this.celebrationHeadline,highlightedMessage:this.celebrationHighlightedMessage}}get dashCelebrationComponentModel(){return{celebrationComponent:{$type:"com.linkedin.voyager.dash.feed.component.celebration.CelebrationComponent",image:this.celebrationImage,icon:this.celebrationIcon,headline:this.celebrationHeadline,highlightedMessage:this.celebrationHighlightedMessage}}}constructor(){super(...arguments);(0,t.default)(this,"clientSensor",N,this);(0,t.default)(this,"formatter",U,this);(0,t.default)(this,"i18n",L,this);(0,t.default)(this,"vectorMediaUpload",F,this);(0,t.default)(this,"storeShim",z,this);(0,t.default)(this,"persistentToastManager",j,this);(0,t.default)(this,"backgroundImageMedia",V,this);(0,t.default)(this,"selectedTheme",B,this);(0,t.default)(this,"selectedRecipients",H,this);(0,t.default)(this,"celebrationImage",G,this);(0,t.default)(this,"celebrationIcon",q,this);(0,t.default)(this,"celebrationHeadline",K,this);(0,t.default)(this,"celebrationHighlightedMessage",W,this);(0,n.default)(this,"occasion",void 0);(0,n.default)(this,"shareOrigin",this.args.shareOrigin);(0,n.default)(this,"updateModalHeader",this.args.updateModalHeader);(0,n.default)(this,"steps",f.CELEBRATION_STEPS);(0,n.default)(this,"controlNameByStep",f.CONTROL_NAME_BY_STEP)
|
|
if(this.args.detourData){this._setState(this.args.detourData)
|
|
this.isInEditMode=!0}else this._initState(this.args.occasion)}goToShare(){var e,t,n
|
|
const i=this._getDetourManager()
|
|
null===(e=(t=this.args).onDetourComplete)||void 0===e||e.call(t,i,"celebrations")
|
|
null===(n=this.updateModalHeader)||void 0===n||n.call(this,void 0)}onUploadImage(e){return m.Promise.resolve((0,b.getImageProps)(e.data)).then((t=>{let{src:n,height:i,width:r,accessibilityText:o}=t
|
|
if((0,l.isDestroying)(this))return
|
|
const a=(0,b.getDashImageViewComponentFromImageUrls)(n,i,r,o)
|
|
this.celebrationImage=a
|
|
this.backgroundImageMedia=e}))}onUploadImageError(e){if(e.errorCode===S.UPLOAD_MEDIA_ERROR_CODES.IMAGE_SIZE_LIMIT_REACHED){this.clientSensor.incrementMetricCounter({groupName:k.CLIENT_SENSOR_GROUP_NAME,metricName:k.CelebrationsClientSensorMetrics.CELEBRATION_CREATION_IMAGE_TOO_LARGE})
|
|
const e=this.i18n.lookupTranslation("components/team-moments@celebration-container","i18n_image_size_error")()
|
|
this.persistentToastManager.error({message:e})}}removeImage(){this.celebrationImage=void 0
|
|
this.selectedTheme=void 0
|
|
this.backgroundImageMedia=void 0}selectTheme(e){this.celebrationImage=e.preview
|
|
this.selectedTheme=e
|
|
this.backgroundImageMedia=void 0}onUpdateSelectedRecipients(e){this._updateSelectedRecipients(e)}transitionToChooserMenuOrSharebox(){this.isInEditMode?this.args.goToCreation():this.args.transitionToChooserMenu()}transitionToPrevious(e){if(e.hasPreviousStep){if(!this.isInEditMode){this.celebrationHighlightedMessage=void 0
|
|
this.selectedRecipients=void 0}e["transition-to-previous"].call(this)}else this.transitionToChooserMenuOrSharebox()}transitionToNext(e){e.hasNextStep?e["transition-to-next"].call(this):this.goToShare()}_initState(e){var t
|
|
this.occasion=e
|
|
const n=(0,g.createCelebrationComponent)(e)
|
|
this.celebrationImage=n.image
|
|
this.celebrationIcon=n.icon
|
|
this.celebrationHeadline=n.headline
|
|
this.celebrationHighlightedMessage=n.highlightedMessage
|
|
this.selectedTheme=e.defaultPreviewTemplateUrn?null===(t=e.templates)||void 0===t?void 0:t.find((t=>t.celebrationTempleUrn===e.defaultPreviewTemplateUrn)):void 0
|
|
this.args.prefilledRecipient&&this._updateSelectedRecipients([this.args.prefilledRecipient])}_setState(e){var t,n
|
|
this.occasion=e.occasion
|
|
const i=e.celebrationComponentModel
|
|
this.celebrationImage=i.image
|
|
this.celebrationIcon=i.icon
|
|
this.celebrationHeadline=i.headline
|
|
this.celebrationHighlightedMessage=i.highlightedMessage
|
|
this.backgroundImageMedia=e.backgroundImageMedia
|
|
this.selectedTheme=e.selectedTheme
|
|
this.selectedRecipients=e.selectedRecipients
|
|
this.shareOrigin=e.shareOrigin
|
|
this.updateModalHeader=e.updateModalHeader
|
|
null===(t=this.updateModalHeader)||void 0===t||t.call(this,null===(n=this.occasion.creationTitle)||void 0===n?void 0:n.text)}_updateSelectedRecipients(e){const t=(0,g.convertRecipientsToHighlightedText)({layout:"components/team-moments@celebration-container",recipients:e,i18n:this.i18n,formatter:this.formatter})
|
|
this.celebrationHighlightedMessage=t
|
|
this.selectedRecipients=e}_getDetourManager(){const e=new E.default({detourState:_.DETOUR_STATES.SUCCEEDED,detourData:{occasion:this.occasion,backgroundImageMedia:this.backgroundImageMedia,celebrationComponentModel:this.celebrationComponentModel,celebrationImage:this.celebrationImage,selectedTheme:this.selectedTheme,selectedRecipients:this.selectedRecipients,shareOrigin:this.shareOrigin,updateModalHeader:this.updateModalHeader}}),t=new v.default({previewComponent:this.celebrationComponentModel,previewState:_.DETOUR_PREVIEW_STATES.SUCCEEDED}),n=new T.default({previewComponent:this.dashCelebrationComponentModel,previewState:_.DETOUR_PREVIEW_STATES.SUCCEEDED}),i=new y.default({detourStatusData:e,detourPreviewData:t,dashDetourPreviewData:n,detourType:_.DETOUR_TYPES.CELEBRATION})
|
|
i.getShareMedia=this._getShareMedia.bind(this)
|
|
i.getDashShareMedia=this._getDashShareMedia.bind(this)
|
|
i.getShareText=this._getShareText.bind(this)
|
|
return i}_getShareMedia(){return this._uploadImageToVector().then((e=>{var t
|
|
return this._uploadCelebrationMedia((null==e?void 0:e.urn)||(null==e||null===(t=e.meta)||void 0===t?void 0:t.urn)).then((e=>[(0,h.buildModel)("com.linkedin.voyager.contentcreation.ShareMedia",{mediaUrn:e.newId})]))}))}_getDashShareMedia(){return this._uploadImageToVector().then((e=>{var t
|
|
return this._uploadCelebrationMedia((null==e?void 0:e.urn)||(null===(t=e.meta)||void 0===t?void 0:t.urn)).then((e=>[{mediaUrn:e.newId,category:"URN_REFERENCE"}]))}))}_uploadImageToVector(){if(this.backgroundImageMedia){var e
|
|
return this.vectorMediaUpload.ingest([{file:this.backgroundImageMedia.data,mediaUploadType:S.UPLOAD_MEDIA_TYPES.CELEBRATION,uploadParams:{organizationActorUrn:null===(e=this.args)||void 0===e?void 0:e.organizationActorUrn}}]).then((e=>{let[t]=e
|
|
return t}))}return m.Promise.resolve({})}_getShareText(){if(!this.isInEditMode){const{text:e,mentions:t}=(0,g.convertTextViewModelToShareViewModel)(this.occasion.prefillSuggestion)
|
|
return(0,w.generateTVMV2FromTextAndMentions)(e,t)}}_uploadCelebrationMedia(e){var t,n,i
|
|
const r={type:this.occasion.type,backgroundImageUrn:e,templateUrn:this.selectedTheme?this.selectedTheme.urn:void 0,recipients:null===(t=this.selectedRecipients)||void 0===t?void 0:t.map((e=>(0,g.getValidProfileUrnForEntity)(e))),companyCreatorUrn:this.args.organizationActorUrn},o={type:this.occasion.type,backgroundImageUrn:e,templateUrn:this.selectedTheme?null===(n=this.selectedTheme)||void 0===n?void 0:n.celebrationTempleUrn:void 0,recipients:null===(i=this.selectedRecipients)||void 0===i?void 0:i.map((e=>(0,g.getValidProfileUrnForEntity)(e,!0))),companyCreatorUrn:this.args.organizationActorUrn&&(0,D.convertUrnType)("organization/dash-company",this.args.organizationActorUrn)},{urn:a}=this.selectedTheme||{}
|
|
if(a){const e=(0,C.extractUrnParts)(a)[1],[t,n]=(0,C.parseId)(e)
|
|
if(t&&"PROFILE_PROJECT_CUSTOM_IMAGE"===t){r.backgroundImageUrn=n
|
|
delete r.templateUrn
|
|
o.backgroundImageUrn=n
|
|
delete o.templateUrn}}const l=(0,g.generateCelebrationInstanceV2Dash)(o)
|
|
return this.storeShim.adapterFor("-ember-m3").ajax("/voyager/api/voyagerFeedDashCelebration/","POST",{data:l}).then((e=>{this.clientSensor.incrementMetricCounter({groupName:k.CLIENT_SENSOR_GROUP_NAME,metricName:k.CelebrationsClientSensorMetrics.CELEBRATION_CREATION_REQUEST_SUCCESS})
|
|
return e})).catch((e=>{this.clientSensor.incrementMetricCounter({groupName:k.CLIENT_SENSOR_GROUP_NAME,metricName:k.CelebrationsClientSensorMetrics.CELEBRATION_CREATION_REQUEST_FAILED})
|
|
throw e}))}},N=(0,i.default)(R.prototype,"clientSensor",[O],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),U=(0,i.default)(R.prototype,"formatter",[A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),L=(0,i.default)(R.prototype,"i18n",[I],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),F=(0,i.default)(R.prototype,"vectorMediaUpload",[P],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),z=(0,i.default)(R.prototype,"storeShim",[x],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),j=(0,i.default)(R.prototype,"persistentToastManager",[M],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),V=(0,i.default)(R.prototype,"backgroundImageMedia",[d.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),B=(0,i.default)(R.prototype,"selectedTheme",[d.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),H=(0,i.default)(R.prototype,"selectedRecipients",[d.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),G=(0,i.default)(R.prototype,"celebrationImage",[d.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),q=(0,i.default)(R.prototype,"celebrationIcon",[d.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),K=(0,i.default)(R.prototype,"celebrationHeadline",[d.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),W=(0,i.default)(R.prototype,"celebrationHighlightedMessage",[d.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),(0,i.default)(R.prototype,"goToShare",[u.action],Object.getOwnPropertyDescriptor(R.prototype,"goToShare"),R.prototype),(0,i.default)(R.prototype,"onUploadImage",[u.action],Object.getOwnPropertyDescriptor(R.prototype,"onUploadImage"),R.prototype),(0,i.default)(R.prototype,"onUploadImageError",[u.action],Object.getOwnPropertyDescriptor(R.prototype,"onUploadImageError"),R.prototype),(0,i.default)(R.prototype,"removeImage",[u.action],Object.getOwnPropertyDescriptor(R.prototype,"removeImage"),R.prototype),(0,i.default)(R.prototype,"selectTheme",[u.action],Object.getOwnPropertyDescriptor(R.prototype,"selectTheme"),R.prototype),(0,i.default)(R.prototype,"onUpdateSelectedRecipients",[u.action],Object.getOwnPropertyDescriptor(R.prototype,"onUpdateSelectedRecipients"),R.prototype),(0,i.default)(R.prototype,"transitionToChooserMenuOrSharebox",[u.action],Object.getOwnPropertyDescriptor(R.prototype,"transitionToChooserMenuOrSharebox"),R.prototype),(0,i.default)(R.prototype,"transitionToPrevious",[u.action],Object.getOwnPropertyDescriptor(R.prototype,"transitionToPrevious"),R.prototype),(0,i.default)(R.prototype,"transitionToNext",[u.action],Object.getOwnPropertyDescriptor(R.prototype,"transitionToNext"),R.prototype),R);(0,o.setComponentTemplate)(Y,Q)}))
|
|
define("team-moments/components/celebration-detour",["exports","@ember/component","@ember/template-factory","@ember/component/template-only"],(function(e,t,n,i){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
const r=(0,n.createTemplateFactory)({id:"n2hN/Hxn",block:'[[[11,0],[17,1],[12],[1,"\\n "],[8,[39,0],null,[["@detourData","@occasion","@organizationActorUrn","@onDetourComplete","@goToCreation","@transitionToChooserMenu"],[[30,2],[30,3],[52,[28,[37,2],[[30,4,["actorType"]],"company"],null],[30,4,["urn"]]],[30,5],[30,6],[30,7]]],[["default"],[[[[1,"\\n "],[8,[39,3],null,null,[["default"],[[[[1,"\\n\\n "],[10,0],[14,0,"share-box-modal-content__container"],[12],[1,"\\n "],[8,[30,10,["step"]],null,[["@stepId","@isValid","@title"],[[30,9,["steps","SELECT_IMAGE"]],[30,9,["celebrationImage"]],[28,[37,4],[[30,9,["occasion","creationTitle"]]],null]]],[["default"],[[[[1,"\\n "],[8,[39,5],[[4,[38,6],null,[["pageKey","routeName","currentRoute"],["flagship3_celebrations_update_form",[28,[37,7],[[53,"outletState"],"render.name"],null],[28,[37,7],[[53,"outletState"],"render"],null]]]]],[["@celebrationThemes","@selectedTheme","@selectedImage","@occasionTitle","@uploadPhotoText","@prefilledRecipient","@modalTitle","@onUploadImage","@onUploadImageError","@removeImage","@selectTheme","@updateShareboxModalConfig","@imageFile"],[[30,9,["occasion","templates"]],[30,9,["selectedTheme"]],[30,9,["celebrationImage"]],[30,9,["occasion","title"]],[30,9,["occasion","uploadPhotoText"]],[30,9,["prefilledRecipient"]],[28,[37,4],[[30,9,["occasion","creationTitle"]]],null],[30,8,["onUploadImage"]],[30,8,["onUploadImageError"]],[30,8,["removeImage"]],[30,8,["selectTheme"]],[30,11],[52,[30,9,["mediaData"]],[30,9,["mediaData","data"]]]]],null],[1,"\\n "]],[]]]]],[1,"\\n\\n"],[41,[28,[37,9],[[30,9,["occasion","recipientChooserTitle"]],[28,[37,10],[[30,9,["prefilledRecipient"]]],null]],null],[[[1," "],[8,[30,10,["step"]],null,[["@stepId","@isValid","@title"],[[30,9,["steps","SELECT_RECIPIENT"]],[52,[30,9,["occasion","recipientRequired"]],[30,9,["selectedRecipients","length"]],true],[28,[37,4],[[30,9,["occasion","recipientChooserTitle"]]],null]]],[["default"],[[[[1,"\\n "],[8,[39,11],[[4,[38,6],null,[["pageKey","routeName","currentRoute"],["flagship3_celebrations_update_typeahead",[28,[37,7],[[53,"outletState"],"render.name"],null],[28,[37,7],[[53,"outletState"],"render"],null]]]]],[["@prefilledSelections","@organizationActorUrn","@modalTitle","@onSelectionsChanged","@updateShareboxModalConfig"],[[30,9,["selectedRecipients"]],[52,[28,[37,2],[[30,4,["actorType"]],"company"],null],[30,4,["urn"]]],[28,[37,4],[[30,9,["occasion","recipientChooserTitle"]]],null],[30,8,["onUpdateSelectedRecipients"]],[30,11]]],null],[1,"\\n "]],[]]]]],[1,"\\n"]],[]],null],[1," "],[13],[1,"\\n\\n "],[8,[39,12],null,[["@secondaryAction","@secondaryControlName","@secondaryButtonKey","@primaryAction","@isPrimaryDisabled","@primaryButtonKey","@primaryControlName"],[[28,[37,13],[[30,8,["transitionToPrevious"]],[30,10]],null],[28,[37,7],[[28,[37,7],[[30,9,["controlNameByStep"]],[30,10,["currentStep"]]],null],"BACK"],null],"BACK",[28,[37,13],[[30,8,["transitionToNext"]],[30,10]],null],[28,[37,10],[[30,10,["isCurrentStepValid"]]],null],"NEXT",[28,[37,7],[[28,[37,7],[[30,9,["controlNameByStep"]],[30,10,["currentStep"]]],null],"NEXT"],null]]],null],[1,"\\n "]],[10]]]]],[1,"\\n "]],[8,9]]]]],[1,"\\n"],[13]],["&attrs","@detourData","@occasion","@nonMemberActor","@onDetourComplete","@goToCreation","@transitionToChooserMenu","actions","properties","stepManager","@updateShareboxModalConfig"],false,["team-moments@celebration-container","if","global-helpers@eq","step-manager@step-manager","text-view-model@text-view-model","team-moments@celebration-image-chooser","ember-cli-pemberly-tracking@track-render","get","-get-dynamic-var","global-helpers@and","global-helpers@not","team-moments@celebration-recipient-chooser","detour-framework@share-box-footer","fn"]]',moduleName:"team-moments/components/celebration-detour.hbs",isStrictMode:!1})
|
|
e.default=(0,t.setComponentTemplate)(r,(0,i.default)())}))
|
|
define("team-moments/components/celebration-image-chooser",["exports","@babel/runtime/helpers/esm/applyDecoratedDescriptor","@ember/component","@ember/template-factory","@ember/object","@glimmer/component"],(function(e,t,n,i,r,o){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var a
|
|
const l=(0,i.createTemplateFactory)({id:"Wws2w9zg",block:'[[[11,0],[24,0,"team-moments-celebration-image-chooser"],[17,1],[4,[38,0],[[30,0,["setShareboxModalConfig"]]],null],[12],[1,"\\n "],[10,"section"],[15,0,[52,[28,[37,2],[[30,2],[30,3]],null],"team-moments-celebration-image-chooser__preview-border"]],[12],[1,"\\n "],[8,[39,3],null,[["@selectedImage","@imageFile","@onUploadImage","@onUploadImageError","@removeImage","@uploadPhotoText","@hasTemplates"],[[30,4],[30,5],[30,6],[30,7],[30,8],[30,9],[30,0,["hasTemplates"]]]],null],[1,"\\n\\n"],[41,[28,[37,2],[[30,2],[30,3]],null],[[[1," "],[10,0],[14,0,"team-moments-celebration-image-chooser__headline-container"],[12],[1,"\\n"],[41,[30,2],[[[1," "],[10,2],[14,0,"text-align-center t-14 t-black--light t-bold"],[12],[1,"\\n "],[8,[39,4],null,[["@tvm"],[[30,2]]],null],[1,"\\n "],[13],[1,"\\n"]],[]],null],[41,[30,3],[[[1," "],[10,2],[14,0,"text-align-center mt2 t-20 t-black t-bold"],[12],[1,"\\n "],[1,[28,[35,5],["i18n_member_fullname","team-moments/components/celebration-image-chooser"],[["member"],[[28,[37,6],[[30,3]],null]]]]],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1," "],[13],[1,"\\n"]],[]],null],[1," "],[13],[1,"\\n\\n "],[10,"ul"],[14,0,"team-moments-celebration-image-chooser__theme-list"],[12],[1,"\\n"],[42,[28,[37,8],[[28,[37,8],[[30,10]],null]],null],null,[[[1," "],[10,"li"],[15,0,[28,[37,9],["team-moments-celebration-image-chooser__theme-list-item",[52,[28,[37,10],[[30,12],[30,11]],null]," team-moments-celebration-image-chooser__theme-list-item--selected"]],null]],[12],[1,"\\n "],[11,"button"],[16,"aria-pressed",[52,[28,[37,10],[[30,12],[30,11]],null],"true","false"]],[24,4,"button"],[4,[38,11],["celebrations_image"],null],[4,[38,12],["click",[28,[37,13],[[30,13],[30,11]],null]],null],[12],[1,"\\n "],[8,[39,14],null,[["@images","@imgWidth","@imgClasses"],[[30,11,["thumbnail"]],800,"full-width full-height"]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n"]],[11]],null],[1," "],[13],[1,"\\n"],[13]],["&attrs","@occasionTitle","@prefilledRecipient","@selectedImage","@imageFile","@onUploadImage","@onUploadImageError","@removeImage","@uploadPhotoText","@celebrationThemes","theme","@selectedTheme","@selectTheme"],false,["did-insert","if","global-helpers@or","team-moments@celebration-image-editable","text-view-model@text-view-model-v2","t","global-helpers@name","each","-track-array","concat","global-helpers@eq","ember-cli-pemberly-tracking@track-interaction","on","fn","image-view-model@image-view-model"]]',moduleName:"team-moments/components/celebration-image-chooser.hbs",isStrictMode:!1})
|
|
let s=e.default=(a=class extends o.default{get hasTemplates(){return this.args.celebrationThemes.length>0}setShareboxModalConfig(){var e,t
|
|
null===(e=(t=this.args).updateShareboxModalConfig)||void 0===e||e.call(t,{modalHeader:this.args.modalTitle,controlName:"celebrations_close",shouldFocusOnHeader:!0})}},(0,t.default)(a.prototype,"setShareboxModalConfig",[r.action],Object.getOwnPropertyDescriptor(a.prototype,"setShareboxModalConfig"),a.prototype),a);(0,n.setComponentTemplate)(l,s)}))
|
|
define("team-moments/components/celebration-image-editable",["exports","@ember/component","@ember/template-factory","@ember/component/template-only"],(function(e,t,n,i){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
const r=(0,n.createTemplateFactory)({id:"yeOj6ggc",block:'[[[1,"\\n"],[10,0],[14,0,"team-moments-celebration-image-editable"],[12],[1,"\\n "],[8,[39,0],null,[["@backgroundImage"],[[30,1]]],null],[1,"\\n "],[10,0],[14,0,"team-moments-celebration-image-editable__image-edit-layer"],[12],[1,"\\n"],[41,[30,1],[[[1," "],[10,0],[14,0,"team-moments-celebration-image-editable__buttons-container"],[12],[1,"\\n "],[8,[39,2],[[4,[38,4],["celebrations_remove_media"],null],[4,[38,5],["click",[30,2]],null]],[["@type","@color","@size","@circle","@icon","@class","@aria-label"],["primary","muted",1,true,"close","team-moments-celebration-image-editable__buttons-container-btn",[28,[37,3],["i18n_remove_image_a11y","team-moments/components/celebration-image-editable"],null]]],null],[1,"\\n "],[13],[1,"\\n"]],[]],[[[1," "],[10,0],[14,0,"display-flex flex-column"],[12],[1,"\\n "],[10,"label"],[14,"for","team-moments-celebration-image-editable__file-input"],[14,0,"m0 team-moments-celebration-image-editable__upload-button"],[12],[1,"\\n "],[10,0],[14,0,"artdeco-button artdeco-button--2 artdeco-button--tertiary full-width"],[12],[1,"\\n"],[41,[30,3],[[[1," "],[1,[28,[35,6],[[30,3]],null]],[1,"\\n"]],[]],[[[1," "],[8,[39,7],[[24,0,"artdeco-button__icon"]],[["@type","@size","@name"],["system","small","camera"]],null],[1,"\\n\\n "],[1,[28,[35,3],["i18n_upload_photo_cta","team-moments/components/celebration-image-editable"],null]],[1,"\\n"]],[]]],[1," "],[13],[1,"\\n "],[8,[39,8],null,[["@multiple","@mediaType","@class","@onMediaData","@onMediaError","@id","@controlName"],[false,"IMAGE_SHARING","visually-hidden",[30,4],[30,5],"team-moments-celebration-image-editable__file-input","celebrations_insert_media"]],null],[1,"\\n "],[13],[1,"\\n"],[41,[30,6],[[[1," "],[10,2],[14,0,"t-14 t-black--light"],[12],[1,"\\n "],[1,[28,[35,3],["i18n_select_from_below","team-moments/components/celebration-image-editable"],null]],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1," "],[13],[1,"\\n"]],[]]],[1," "],[13],[1,"\\n"],[13]],["@selectedImage","@removeImage","@uploadPhotoText","@onUploadImage","@onUploadImageError","@hasTemplates"],false,["feed-components-shared@celebration-image","if","artdeco-button@artdeco-button","t","ember-cli-pemberly-tracking@track-interaction","on","text-view-model@text-view-model","hue-web-icons@icon","detour-framework@upload-media-input"]]',moduleName:"team-moments/components/celebration-image-editable.hbs",isStrictMode:!1})
|
|
e.default=(0,t.setComponentTemplate)(r,(0,i.default)())}))
|
|
define("team-moments/components/celebration-recipient-chooser",["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","@ember/destroyable","@ember/service","@ember/object","@glimmer/component","global-utils/utils/urn-converter","graphql-queries/queries/search/search-reusable-typeahead-collection-finder-type-query.graphql"],(function(e,t,n,i,r,o,a,l,s,d,c,u,p){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var m,h,g
|
|
const f=(0,a.createTemplateFactory)({id:"S4nyZDXz",block:'[[[11,0],[17,1],[4,[38,0],[[30,0,["setShareboxModalConfig"]]],null],[12],[1,"\\n "],[8,[39,1],null,[["@selectionLimit","@placeholder","@prefilledSelections","@typeaheadSearchFn","@onSelectionsChanged","@entitySelectedControlName","@entityUnselectedControlName"],[8,[28,[37,2],["search_placeholder","team-moments/components/celebration-recipient-chooser"],null],[30,2],[30,0,["onTypeaheadSearch"]],[30,3],"celebrations_typeahead_textentry","celebrations_typeahead_textentry"]],null],[1,"\\n"],[13]],["&attrs","@prefilledSelections","@onSelectionsChanged"],false,["did-insert","team-moments@multi-select-typeahead-v2","t"]]',moduleName:"team-moments/components/celebration-recipient-chooser.hbs",isStrictMode:!1})
|
|
let b=e.default=(m=(0,s.inject)("@linkedin/ember-restli-graphql@graphql"),h=class extends c.default{constructor(){super(...arguments);(0,t.default)(this,"graphql",g,this)}setShareboxModalConfig(){var e,t
|
|
null===(e=(t=this.args).updateShareboxModalConfig)||void 0===e||e.call(t,{modalHeader:this.args.modalTitle,controlName:"celebrations_close",shouldFocusOnHeader:!0})}onTypeaheadSearch(e){const t={keywords:e,type:"PEOPLE",q:"type"},n=this.args.organizationActorUrn?{typeaheadUseCase:"PHOTOTAGGING",typeaheadFilterQuery:{companyUrns:[`${(0,u.fromUrn)(this.args.organizationActorUrn).id}`]}}:{typeaheadUseCase:"PHOTOTAGGING"}
|
|
t.query=n
|
|
return this.graphql.executeQuery(p.default,{keywords:e,query:n,type:"PEOPLE"},{reload:!0}).then((e=>{var t,n
|
|
if(!(0,l.isDestroying)(this))return(null===(t=e.data)||void 0===t||null===(n=t.searchDashReusableTypeaheadByType)||void 0===n?void 0:n.elements)??[]}))}},g=(0,i.default)(h.prototype,"graphql",[m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),(0,i.default)(h.prototype,"setShareboxModalConfig",[d.action],Object.getOwnPropertyDescriptor(h.prototype,"setShareboxModalConfig"),h.prototype),(0,i.default)(h.prototype,"onTypeaheadSearch",[d.action],Object.getOwnPropertyDescriptor(h.prototype,"onTypeaheadSearch"),h.prototype),h);(0,o.setComponentTemplate)(f,b)}))
|
|
define("team-moments/components/chooser-menu",["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","@ember/destroyable","@ember/service","@glimmer/component","global-utils/utils/create-cache-key-from-query","feed-utils/utils/error-parsing","feed-utils/utils/constants","feed-utils/utils/client-sensor-constants","@glimmer/tracking","detour-framework/utils/detour-constants","sharing-shared/utils/sharing-shared-constants"],(function(e,t,n,i,r,o,a,l,s,d,c,u,p,m,h,g,f){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var b,_,y,v,T,E,S,w,k,C
|
|
const D=(0,a.createTemplateFactory)({id:"6QARDA9J",block:'[[[11,0],[17,1],[12],[1,"\\n "],[10,0],[14,0,"share-box-modal-content__container"],[12],[1,"\\n "],[10,"ul"],[14,0,"artdeco-list"],[12],[1,"\\n"],[42,[28,[37,1],[[28,[37,1],[[30,0,["occasions"]]],null]],null],null,[[[1," "],[10,"li"],[14,0,"p0"],[12],[1,"\\n "],[11,"button"],[24,0,"team-moments-chooser-menu__occasion-option"],[24,4,"button"],[4,[38,2],["click",[28,[37,3],[[30,3],[30,2]],null]],null],[4,[38,2],["focus",[30,4]],null],[4,[38,4],null,[["when"],[[28,[37,5],[[30,5],[30,2,["type"]]],null]]]],[12],[1,"\\n "],[10,0],[14,0,"display-flex align-items-flex-start flex-column"],[12],[1,"\\n "],[10,2],[14,0,"t-14 t-sans t-bold t-black"],[12],[1,"\\n "],[8,[39,6],null,[["@tvm"],[[30,2,["name"]]]],null],[1,"\\n "],[13],[1,"\\n"],[41,[30,2,["description"]],[[[1," "],[10,2],[14,0,"t-12 t-sans t-black--light text-align-left"],[12],[1,"\\n "],[8,[39,6],null,[["@tvm"],[[30,2,["description"]]]],null],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1," "],[13],[1,"\\n "],[13],[1,"\\n "],[10,"hr"],[14,0,"artdeco-divider m0"],[12],[13],[1,"\\n "],[13],[1,"\\n"]],[2]],null],[1," "],[13],[1,"\\n "],[13],[1,"\\n\\n "],[8,[39,8],null,[["@secondaryAction","@secondaryControlName","@secondaryButtonKey"],[[30,6],"celebrations_chooser_dismiss_form",[30,0,["footerSecondaryButtonKeys","BACK"]]]],null],[1,"\\n"],[13]],["&attrs","occasion","@onClickOccasion","@resetPreviousOccasion","@previousOccasion","@onCancel"],false,["each","-track-array","on","fn","global-modifiers@focus","global-helpers@eq","text-view-model@text-view-model-v2","if","detour-framework@share-box-footer"]]',moduleName:"team-moments/components/chooser-menu.hbs",isStrictMode:!1})
|
|
let O=e.default=(b=(0,s.inject)("client-sensor-web@client-sensor"),_=(0,s.inject)("i18n"),y=(0,s.inject)("jet"),v=(0,s.inject)("global-services@store-shim"),T=class extends d.default{constructor(){var e,i
|
|
super(...arguments);(0,t.default)(this,"clientSensor",E,this);(0,t.default)(this,"i18n",S,this);(0,t.default)(this,"jet",w,this);(0,t.default)(this,"storeShim",k,this);(0,t.default)(this,"occasions",C,this);(0,n.default)(this,"footerSecondaryButtonKeys",g.SHARE_BOX_FOOTER_SECONDARY_KEYS)
|
|
this._fetchOccassions()
|
|
const r=!!this.args.previousOccasion
|
|
null===(e=(i=this.args).updateShareboxModalConfig)||void 0===e||e.call(i,{modalHeader:this.i18n.lookupTranslation("components/team-moments@chooser-menu","select_occasion")(),controlName:"celebrations_chooser_exit",shouldFocusOnHeader:!r})}_fetchOccassions(){let e={cacheKey:"feed/occasions",params:{q:"viewerType",isCompanyActor:!1}},t={SUCCESS:m.CelebrationsClientSensorMetrics.OCCASIONS_COLLECTION_REQUEST_SUCCESS,FAILED:m.CelebrationsClientSensorMetrics.OCCASIONS_COLLECTION_REQUEST_FAILED}
|
|
const{nonMemberActor:n}=this.args
|
|
if((null==n?void 0:n.actorType)===f.ACTOR_TYPES.company){const n={q:"viewerType",isCompanyActor:!0}
|
|
e={params:n,cacheKey:(0,c.default)("feed/occasions",n)}
|
|
t={SUCCESS:m.CelebrationsClientSensorMetrics.OCCASIONS_COLLECTION_VIEWER_TYPE_REQUEST_SUCCESS,FAILED:m.CelebrationsClientSensorMetrics.OCCASIONS_COLLECTION_VIEWER_TYPE_REQUEST_FAILED}}return this.storeShim.queryURL("/voyager/api/voyagerFeedDashOccasions",e).then((e=>{if((0,l.isDestroying)(this))return
|
|
this.clientSensor.incrementMetricCounter({groupName:m.CLIENT_SENSOR_GROUP_NAME,metricName:t.SUCCESS})
|
|
const n=e.elements
|
|
this.occasions=n??[]})).catch((e=>{if((0,l.isDestroying)(this))throw e
|
|
this.clientSensor.incrementMetricCounter({groupName:m.CLIENT_SENSOR_GROUP_NAME,metricName:t.FAILED})
|
|
if(!(0,u.isHttpErrorStatus)(e))throw e
|
|
this.jet.logError(new Error("Network request failed while attempting to fetch celebration occasions"),p.JET_TAGS.GET_OCCASIONS,!1)}))}},E=(0,i.default)(T.prototype,"clientSensor",[b],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),S=(0,i.default)(T.prototype,"i18n",[_],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),w=(0,i.default)(T.prototype,"jet",[y],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),k=(0,i.default)(T.prototype,"storeShim",[v],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),C=(0,i.default)(T.prototype,"occasions",[h.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),T);(0,o.setComponentTemplate)(D,O)}))
|
|
define("team-moments/components/multi-select-typeahead-v2",["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","@ember/service","@glimmer/component","@ember/object","ember-lifeline","@glimmer/tracking","tracked-built-ins"],(function(e,t,n,i,r,o,a,l,s,d,c,u,p){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var m,h,g,f,b,_,y,v,T,E,S
|
|
const w=(0,a.createTemplateFactory)({id:"7kZt//Z3",block:'[[[11,0],[24,0,"team-moments-celebration-multi-select-typeahead"],[17,1],[12],[1,"\\n "],[8,[39,0],null,null,[["default"],[[[[1,"\\n\\n "],[10,0],[14,0,"display-flex flex-wrap team-moments-multi-select-typeahead__input-and-pills"],[12],[1,"\\n"],[42,[28,[37,2],[[28,[37,2],[[30,0,["selectedTypeaheadHitV2s"]]],null]],null],null,[[[1," "],[8,[39,3],null,[["@class","@text","@onDismiss","@size"],["team-moments-multi-select-typeahead__pill",[30,3,["title","text"]],[28,[37,4],[[30,0,["onUnselectTypeaheadHit"]],[30,3]],null],2]],null],[1,"\\n"]],[3]],null],[1," "],[8,[30,2,["typeahead-input"]],[[24,0,"team-moments-multi-select-typeahead__input-container"],[4,[38,5],null,[["when","onSelector"],[[30,0,["shouldFocusInput"]],"input"]]]],[["@value","@onInput","@placeholder","@className","@autofocus"],[[30,0,["typeaheadQuery"]],[30,0,["onTypeaheadSearch"]],[30,4],"team-moments-multi-select-typeahead__input",true]],null],[1,"\\n "],[13],[1,"\\n\\n "],[8,[30,2,["typeahead-results-list"]],null,[["@class"],["team-moments-multi-select-typeahead__result-list-container"]],[["default"],[[[[1,"\\n"],[42,[28,[37,2],[[28,[37,2],[[30,0,["typeaheadResults"]]],null]],null],null,[[[44,[[28,[37,7],[[30,0,["selectedUrnSet"]],[30,6,["target","profile","entityUrn"]]],null]],[[[1," "],[8,[30,5,["typeahead-result"]],[[24,0,"team-moments-multi-select-typeahead__result-item"]],[["@idx","@onSelect"],[[30,7],[28,[37,4],[[52,[30,8],[30,0,["onUnselectTypeaheadHit"]],[30,0,["onSelectTypeaheadHit"]]],[30,6]],null]]],[["default"],[[[[1,"\\n "],[8,[39,9],null,[["@hit","@class"],[[30,6],"display-flex align-items-center team-moments-multi-select-typeahead__hit-flex-basis"]],null],[1,"\\n "],[10,"figure"],[12],[1,"\\n"],[41,[30,8],[[[1," "],[10,0],[14,0,"team-moments-multi-select-typeahead__select-icon"],[12],[13],[1,"\\n "],[10,1],[14,0,"a11y-text"],[12],[1,[28,[35,10],["selected_a11y","team-moments/components/multi-select-typeahead-v2"],null]],[13],[1,"\\n"]],[]],[[[1," "],[10,0],[14,0,"team-moments-multi-select-typeahead__select-icon--muted"],[12],[13],[1,"\\n"]],[]]],[1," "],[13],[1,"\\n "]],[]]]]],[1,"\\n"]],[8]]]],[6,7]],null],[1," "]],[5]]]]],[1,"\\n\\n "]],[2]]]]],[1,"\\n"],[13]],["&attrs","ta","hitV2","@placeholder","taList","result","idx","isTypeaheadResultSelected"],false,["ember-cli-artdeco-typeahead@artdeco-typeahead","each","-track-array","artdeco-pill@artdeco-pill-dismiss","fn","global-modifiers@focus","let","team-moments@has","if","search-ta-kit@search-typeahead-hit","t"]]',moduleName:"team-moments/components/multi-select-typeahead-v2.hbs",isStrictMode:!1})
|
|
let k=e.default=(m=(0,l.inject)("i18n"),h=(0,l.inject)("tracking"),g=(0,l.inject)("persistent-toast-manager@persistent-toast-manager"),f=class extends s.default{constructor(){super(...arguments);(0,t.default)(this,"i18n",b,this);(0,t.default)(this,"tracking",_,this);(0,t.default)(this,"persistentToastManager",y,this);(0,n.default)(this,"selectedUrnSet",new p.TrackedSet);(0,t.default)(this,"typeaheadQuery",v,this);(0,t.default)(this,"selectedTypeaheadHitV2s",T,this);(0,t.default)(this,"typeaheadResults",E,this);(0,t.default)(this,"shouldFocusInput",S,this)
|
|
this._initSelections()}_initSelections(){const e=this.args.prefilledSelections||[]
|
|
e.forEach((e=>{var t,n
|
|
return this.selectedUrnSet.add(null===(t=e.target)||void 0===t||null===(n=t.profile)||void 0===n?void 0:n.entityUrn)}))
|
|
this.selectedTypeaheadHitV2s=e
|
|
this._onTypeaheadSearch("a",!0)}onTypeaheadSearch(e){const t=e.target.value;(0,c.debounceTask)(this,"_onTypeaheadSearch",t,300)}onSelectTypeaheadHit(e){this._addSelection(e)
|
|
this._fireSelectionCIE(!0)
|
|
this._resetTypeahead()
|
|
this.shouldFocusInput=!0}onUnselectTypeaheadHit(e){this._removeSelection(e)
|
|
this._fireSelectionCIE(!1)}_addSelection(e){var t,n,i,r
|
|
const{selectionLimit:o}=this.args
|
|
if(isFinite(o)&&this.selectedTypeaheadHitV2s.length>=o){const e=this.i18n.lookupTranslation("components/team-moments@multi-select-typeahead-v2","i18n_limit_exceed_error")([{limit:o}])
|
|
this.persistentToastManager.error({message:e})
|
|
return}const a=null===(t=e.target)||void 0===t||null===(n=t.profile)||void 0===n?void 0:n.entityUrn
|
|
this.selectedUrnSet.add(a)
|
|
this.selectedTypeaheadHitV2s=[...this.selectedTypeaheadHitV2s,e]
|
|
null===(i=(r=this.args).onSelectionsChanged)||void 0===i||i.call(r,this.selectedTypeaheadHitV2s)}_removeSelection(e){var t,n,i,r
|
|
const o=null===(t=e.target)||void 0===t||null===(n=t.profile)||void 0===n?void 0:n.entityUrn
|
|
this.selectedUrnSet.delete(o)
|
|
const a=this.selectedTypeaheadHitV2s.filter((e=>{var t,n
|
|
return(null===(t=e.target)||void 0===t||null===(n=t.profile)||void 0===n?void 0:n.entityUrn)!==o}))
|
|
this.selectedTypeaheadHitV2s=a
|
|
null===(i=(r=this.args).onSelectionsChanged)||void 0===i||i.call(r,a)}_fireSelectionCIE(){const e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0]?this.args.entitySelectedControlName:this.args.entityUnselectedControlName
|
|
e&&this.tracking.fireInteractionEvent(e)}_onTypeaheadSearch(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]||(this.typeaheadQuery=e)
|
|
e?this.args.typeaheadSearchFn(e).then((e=>{this.isDestroying||(this.typeaheadResults=e)})):this.typeaheadResults=[]}_resetTypeahead(){this.typeaheadQuery=""}},b=(0,i.default)(f.prototype,"i18n",[m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),_=(0,i.default)(f.prototype,"tracking",[h],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),y=(0,i.default)(f.prototype,"persistentToastManager",[g],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),v=(0,i.default)(f.prototype,"typeaheadQuery",[u.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),T=(0,i.default)(f.prototype,"selectedTypeaheadHitV2s",[u.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),E=(0,i.default)(f.prototype,"typeaheadResults",[u.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){}}),S=(0,i.default)(f.prototype,"shouldFocusInput",[u.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),(0,i.default)(f.prototype,"onTypeaheadSearch",[d.action],Object.getOwnPropertyDescriptor(f.prototype,"onTypeaheadSearch"),f.prototype),(0,i.default)(f.prototype,"onSelectTypeaheadHit",[d.action],Object.getOwnPropertyDescriptor(f.prototype,"onSelectTypeaheadHit"),f.prototype),(0,i.default)(f.prototype,"onUnselectTypeaheadHit",[d.action],Object.getOwnPropertyDescriptor(f.prototype,"onUnselectTypeaheadHit"),f.prototype),f);(0,o.setComponentTemplate)(w,k)}))
|
|
define("team-moments/components/multi-select-typeahead",["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","@ember/service","@glimmer/component","ember-copy","@ember/object","ember-lifeline","@glimmer/tracking"],(function(e,t,n,i,r,o,a,l,s,d,c,u,p){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var m,h,g,f,b,_,y
|
|
const v=(0,a.createTemplateFactory)({id:"qsHI2hbY",block:'[[[11,0],[24,0,"team-moments-celebration-multi-select-typeahead"],[17,1],[12],[1,"\\n "],[8,[39,0],null,null,[["default"],[[[[1,"\\n\\n "],[10,0],[14,0,"display-flex flex-wrap team-moments-multi-select-typeahead__input-and-pills"],[12],[1,"\\n"],[42,[28,[37,2],[[28,[37,2],[[30,0,["selectedTypeaheadHitV2s"]]],null]],null],null,[[[1," "],[8,[39,3],null,[["@class","@text","@onDismiss","@size"],["m1",[30,3,["text","text"]],[28,[37,4],[[30,0,["onUnselectTypeaheadHit"]],[30,3]],null],2]],null],[1,"\\n"]],[3]],null],[1," "],[8,[30,2,["typeahead-input"]],[[24,0,"team-moments-multi-select-typeahead__input-container"],[4,[38,5],null,[["when","onSelector"],[[30,0,["shouldFocusInput"]],"input"]]]],[["@value","@onInput","@placeholder","@className","@autofocus"],[[30,0,["typeaheadQuery"]],[30,0,["onTypeaheadSearch"]],[30,4],"team-moments-multi-select-typeahead__input","autofocus"]],null],[1,"\\n "],[13],[1,"\\n\\n "],[8,[30,2,["typeahead-results-list"]],null,[["@class"],["team-moments-multi-select-typeahead__result-list"]],[["default"],[[[[1,"\\n"],[42,[28,[37,2],[[28,[37,2],[[30,0,["typeaheadResults"]]],null]],null],null,[[[1," "],[8,[30,5,["typeahead-result"]],[[24,0,"team-moments-multi-select-typeahead__result-item"]],[["@idx","@onSelect"],[[30,7],[28,[37,4],[[30,0,["onSelectTypeaheadHit"]],[30,6]],null]]],[["default"],[[[[1,"\\n "],[8,[39,6],null,[["@hit","@class"],[[30,6],"display-flex align-items-center"]],null],[1,"\\n "]],[]]]]],[1,"\\n"]],[6,7]],null],[1," "]],[5]]]]],[1,"\\n\\n "]],[2]]]]],[1,"\\n"],[13]],["&attrs","ta","hitV2","@placeholder","taList","result","idx"],false,["ember-cli-artdeco-typeahead@artdeco-typeahead","each","-track-array","artdeco-pill@artdeco-pill-dismiss","fn","global-modifiers@focus","search-ta-kit@search-typeahead-hit-v2"]]',moduleName:"team-moments/components/multi-select-typeahead.hbs",isStrictMode:!1})
|
|
let T=e.default=(m=(0,l.inject)("tracking"),h=class extends s.default{constructor(){super(...arguments);(0,t.default)(this,"tracking",g,this);(0,t.default)(this,"typeaheadQuery",f,this);(0,t.default)(this,"typeaheadResults",b,this);(0,t.default)(this,"selectedTypeaheadHitV2s",_,this);(0,t.default)(this,"shouldFocusInput",y,this)
|
|
const{prefilledSelections:e}=this.args
|
|
this.selectedTypeaheadHitV2s=(0,d.copy)(e||[])}onTypeaheadSearch(e){const t=e.target.value;(0,u.debounceTask)(this,"_onTypeaheadSearch",t,300)}onSelectTypeaheadHit(e){this._addSelection(e)
|
|
this._fireSelectionCIE(!0)
|
|
this._resetTypeahead()
|
|
this.shouldFocusInput=!0}onUnselectTypeaheadHit(e){this._removeSelection(e)
|
|
this._fireSelectionCIE(!1)}_addSelection(e){var t,n
|
|
this.selectedTypeaheadHitV2s=[...this.selectedTypeaheadHitV2s,e]
|
|
null===(t=(n=this.args).onSelectionsChanged)||void 0===t||t.call(n,this.selectedTypeaheadHitV2s)}_removeSelection(e){var t,n
|
|
this.selectedTypeaheadHitV2s=this.selectedTypeaheadHitV2s.filter((t=>t!==e))
|
|
null===(t=(n=this.args).onSelectionsChanged)||void 0===t||t.call(n,this.selectedTypeaheadHitV2s)}_fireSelectionCIE(){const e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0]?this.args.entitySelectedControlName:this.args.entityUnselectedControlName
|
|
e&&this.tracking.fireInteractionEvent(e)}_onTypeaheadSearch(e){this.typeaheadQuery=e
|
|
e?this.args.typeaheadSearchFn(e).then((e=>{if(!this.isDestroying){const t=e.filter((e=>!this.selectedTypeaheadHitV2s.find((t=>t.targetUrn===e.targetUrn))))
|
|
this.typeaheadResults=t}})):this.typeaheadResults=[]}_resetTypeahead(){this.typeaheadQuery=""
|
|
this.typeaheadResults=[]}},g=(0,i.default)(h.prototype,"tracking",[m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),f=(0,i.default)(h.prototype,"typeaheadQuery",[p.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),b=(0,i.default)(h.prototype,"typeaheadResults",[p.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),_=(0,i.default)(h.prototype,"selectedTypeaheadHitV2s",[p.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),y=(0,i.default)(h.prototype,"shouldFocusInput",[p.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),(0,i.default)(h.prototype,"onTypeaheadSearch",[c.action],Object.getOwnPropertyDescriptor(h.prototype,"onTypeaheadSearch"),h.prototype),(0,i.default)(h.prototype,"onSelectTypeaheadHit",[c.action],Object.getOwnPropertyDescriptor(h.prototype,"onSelectTypeaheadHit"),h.prototype),(0,i.default)(h.prototype,"onUnselectTypeaheadHit",[c.action],Object.getOwnPropertyDescriptor(h.prototype,"onUnselectTypeaheadHit"),h.prototype),h);(0,o.setComponentTemplate)(v,T)}))
|
|
define("team-moments/components/team-moments-detour",["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","@glimmer/component","@ember/debug","@ember/object","@glimmer/tracking","@ember/service"],(function(e,t,n,i,r,o,a,l,s,d,c,u){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var p,m,h,g,f
|
|
const b=(0,a.createTemplateFactory)({id:"JM+L7/rL",block:'[[[11,0],[17,1],[12],[1,"\\n"],[41,[28,[37,1],[[30,0,["occasionDetour"]],"CELEBRATION_DETOUR"],null],[[[1," "],[8,[39,2],null,[["@occasion","@detourData","@nonMemberActor","@onDetourComplete","@updateShareboxModalConfig","@goToCreation","@transitionToChooserMenu"],[[30,0,["occasion"]],[30,2],[30,3],[30,4],[30,5],[30,6],[30,0,["transitionToChooserMenu"]]]],null],[1,"\\n"]],[]],[[[41,[28,[37,1],[[30,0,["occasionDetour"]],"APPRECIATION_DETOUR"],null],[[[1," "],[8,[39,3],null,[["@onDetourComplete","@occasion","@goToCreation","@isFromTeamMomentsDetour","@nonMemberActor","@detourData","@updateShareboxModalConfig","@transitionToChooserMenu"],[[30,4],[30,0,["occasion"]],[30,6],true,[30,3],[30,2],[30,5],[30,0,["transitionToChooserMenu"]]]],null],[1,"\\n"]],[]],[[[1," "],[8,[39,4],[[4,[38,5],null,[["pageKey","routeName","currentRoute"],["flagship3_celebrations_chooser",[28,[37,6],[[53,"outletState"],"render.name"],null],[28,[37,6],[[53,"outletState"],"render"],null]]]]],[["@resetPreviousOccasion","@previousOccasion","@nonMemberActor","@updateShareboxModalConfig","@onCancel","@onClickOccasion"],[[30,0,["resetPreviousOccasion"]],[30,0,["occasion","type"]],[30,3],[30,5],[30,6],[30,0,["onClickOccasion"]]]],null],[1,"\\n "]],[]]]],[]]],[13]],["&attrs","@detourData","@nonMemberActor","@onDetourComplete","@updateShareboxModalConfig","@goToCreation"],false,["if","global-helpers@eq","team-moments@celebration-detour","appreciation@kudos-detour","team-moments@chooser-menu","ember-cli-pemberly-tracking@track-render","get","-get-dynamic-var"]]',moduleName:"team-moments/components/team-moments-detour.hbs",isStrictMode:!1}),_="CELEBRATION_DETOUR",y="APPRECIATION_DETOUR"
|
|
let v=e.default=(p=(0,u.inject)("tracking"),m=class extends l.default{constructor(){super(...arguments);(0,t.default)(this,"tracking",h,this);(0,t.default)(this,"occasion",g,this);(0,t.default)(this,"occasionDetour",f,this)
|
|
const{detourData:e}=this.args
|
|
e&&this._setState(e)}onClickOccasion(e){const t=e.type,n="APPRECIATION"===t?"celebrations_chooser_select_kudos":`celebrations_chooser_select_${t.toLowerCase()}`
|
|
this.tracking.fireInteractionEvent(n)
|
|
this._navigateToOccasionDetour(e)}transitionToChooserMenu(){this.occasionDetour=void 0}resetPreviousOccasion(){this.occasion=void 0}_setState(e){const{occasion:t}=e
|
|
this._navigateToOccasionDetour(t)}_navigateToOccasionDetour(e){const t=e.type
|
|
this.occasionDetour=t?"APPRECIATION"===t?y:_:void 0
|
|
this.occasion=e}},h=(0,i.default)(m.prototype,"tracking",[p],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),g=(0,i.default)(m.prototype,"occasion",[c.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),f=(0,i.default)(m.prototype,"occasionDetour",[c.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),(0,i.default)(m.prototype,"onClickOccasion",[d.action],Object.getOwnPropertyDescriptor(m.prototype,"onClickOccasion"),m.prototype),(0,i.default)(m.prototype,"transitionToChooserMenu",[d.action],Object.getOwnPropertyDescriptor(m.prototype,"transitionToChooserMenu"),m.prototype),(0,i.default)(m.prototype,"resetPreviousOccasion",[d.action],Object.getOwnPropertyDescriptor(m.prototype,"resetPreviousOccasion"),m.prototype),m);(0,o.setComponentTemplate)(b,v)}))
|
|
define("team-moments/helpers/has",["exports","@ember/component/helper","@ember/debug"],(function(e,t,n){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
e.has=i
|
|
function i(e){let[t,n]=e
|
|
return t.has(n)}const r=(0,t.helper)(i)
|
|
e.default=r}))
|
|
define("team-moments/utils/team-moments-constants",["exports"],(function(e){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.CONTROL_NAME_BY_STEP=e.CELEBRATION_STEPS=e.CELEBRATION_SHARE_ORIGIN=void 0
|
|
e.CELEBRATION_SHARE_ORIGIN=Object.freeze({NOTIFICATION:"NOTIFICATION"})
|
|
const t=e.CELEBRATION_STEPS=Object.freeze({SELECT_IMAGE:"SELECT_IMAGE",SELECT_RECIPIENT:"SELECT_RECIPIENT",EDIT_POST:"EDIT_POST"})
|
|
e.CONTROL_NAME_BY_STEP=Object.freeze({[t.SELECT_IMAGE]:{BACK:"celebrations_back",NEXT:"celebrations_next"},[t.SELECT_RECIPIENT]:{BACK:"celebrations_typeahead_cancel",NEXT:"celebrations_typeahead_next"},[t.EDIT_POST]:{BACK:"share.close"}})}))
|
|
define("team-moments/utils/team-moments-utils",["exports","@linkedin/ember-m3-pdsc-model-builder","global-utils/utils/html-safe","global-utils/utils/api-compat","global-utils/utils/urn-converter","global-helpers/helpers/name"],(function(e,t,n,i,r,o){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.convertRecipientsToHighlightedText=function(e){let r,a,{recipients:l=[],i18n:s,layout:d,formatter:c}=e
|
|
const u=function(e,t){return e.map((e=>{var n
|
|
return"com.linkedin.voyager.identity.shared.MiniProfile"===(0,i.classNameOf)(e)?t.formatName((0,o.getName)(e),"full"):null===(n=e.title)||void 0===n?void 0:n.text}))}(l,c)
|
|
if(u.length){r=(0,n.default)(s.lookupTranslation(d,"recipient_texts")([u])).string
|
|
a=u.map((e=>function(e,n){const i={length:e.length,start:n.indexOf(e),type:"BOLD"}
|
|
return(0,t.buildModel)("com.linkedin.voyager.common.TextAttribute",i)}(e,r)))}if(r)return(0,t.buildModel)("com.linkedin.voyager.common.TextViewModel",{text:r,attributes:a})
|
|
return}
|
|
e.convertTextViewModelToShareViewModel=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
|
const{text:t}=e,n=(e.attributes??[]).map((e=>{const{start:n,length:i}=e
|
|
return{match:{start:n,length:i,text:t.substr(n,i)},entity:e.miniProfile||e.miniCompany}}))
|
|
return{text:t,mentions:n}}
|
|
e.createCelebrationComponent=function(e){var n
|
|
const i=e.icon,r=e.title,o=e.backgroundImage,a=null===(n=e.templates)||void 0===n?void 0:n.find((t=>t.celebrationTempleUrn===e.defaultPreviewTemplateUrn))
|
|
return(0,t.buildModel)("com.linkedin.voyager.dash.feed.component.celebration.CelebrationComponent",{image:a?a.preview:o,icon:i,headline:r},{validate:!1})}
|
|
e.generateCelebrationInstanceV2=function(e){let{type:n,backgroundImageUrn:i,templateUrn:o,recipients:a,companyCreatorUrn:l}=e
|
|
const s={type:n,backgroundImageUrn:i,recipients:a,templateUrn:o}
|
|
l&&(s.companyCreatorUrn=(0,r.convertUrnType)("organization/company",l))
|
|
return(0,t.buildModel)("com.linkedin.voyager.feed.Celebration",s)}
|
|
e.generateCelebrationInstanceV2Dash=function(e){let{type:n,backgroundImageUrn:i,templateUrn:o,recipients:a,companyCreatorUrn:l}=e
|
|
const s={type:n,backgroundImageUrn:i,recipients:a,templateUrn:o}
|
|
l&&(s.companyCreatorUrn=(0,r.convertUrnType)("organization/dash-company",l))
|
|
return(0,t.buildModel)("com.linkedin.voyager.dash.feed.contentcreation.Celebration",s)}
|
|
e.getValidProfileUrnForEntity=function(e){const t=(0,i.classNameOf)(e)
|
|
if("com.linkedin.voyager.typeahead.TypeaheadHitV2"===t)return e.targetUrn
|
|
if("com.linkedin.voyager.dash.search.typeahead.TypeaheadViewModel"===t){var n,r
|
|
return null===(n=e.target)||void 0===n||null===(r=n.profile)||void 0===r?void 0:r.entityUrn}return e.entityUrn}}))
|
|
define("url-preview-detour/components/edit-title",["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/utils","@ember/object","@glimmer/tracking","@glimmer/component","global-modifiers/modifiers/focus","ember-cli-pemberly-i18n/helpers/t","artdeco-text-input/components/artdeco-text-input","artdeco-button/components/artdeco-button","@ember/helper","@ember/modifier"],(function(e,t,n,i,r,o,a,l,s,d,c,u,p,m,h,g,f){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var b,_
|
|
e.default=(0,a.setComponentTemplate)((0,o.createTemplateFactory)({id:"Ft5/XoYS",block:'[[[1,"\\n"],[1,"\\n "],[11,0],[24,0,"url-preview-detour-edit-title__overlay"],[17,1],[12],[1,"\\n "],[11,"form"],[24,0,"url-preview-detour-edit-title__form"],[24,"tabindex","-1"],[4,[32,0],null,[["when"],[[30,2]]]],[12],[1,"\\n "],[10,"h3"],[14,0,"t-14 t-white t-bold mv2"],[14,1,"url-preview-detour-edit-title__heading"],[12],[1,"\\n "],[1,[28,[32,1],["i18n_edit_form_heading","url-preview-detour/components/edit-title"],null]],[1,"\\n "],[13],[1,"\\n "],[10,2],[14,0,"t-12 t-white--light t-normal"],[14,1,"url-preview-detour-edit-title__desc"],[12],[1,"\\n "],[1,[28,[32,1],["i18n_edit_form_description","url-preview-detour/components/edit-title"],null]],[1,"\\n "],[13],[1,"\\n "],[8,[32,2],[[24,"aria-labelledby","url-preview-detour-edit-title__heading"],[24,"aria-describedby","url-preview-detour-edit-title__desc"]],[["@type","@color","@value","@onInput","@maxLength","@restrictToMaxLength","@inputClasses"],["text","inverse",[30,3],[30,0,["onEditTitle"]],140,true,"url-preview-detour-edit-title__text-input mt4"]],null],[1,"\\n "],[10,0],[14,0,"fr mv4"],[12],[1,"\\n "],[8,[32,3],[[16,"aria-label",[28,[32,1],["i18n_cancel","url-preview-detour/components/edit-title"],null]],[4,[32,4],["click",[30,4]],null]],[["@text","@color","@type","@size","@controlType"],[[28,[32,1],["i18n_cancel","url-preview-detour/components/edit-title"],null],"inverse","secondary",1,"button"]],null],[1,"\\n "],[8,[32,3],[[16,"aria-label",[28,[32,1],["i18n_save_article_title","url-preview-detour/components/edit-title"],null]],[4,[32,4],["click",[28,[32,5],[[30,5],[30,0,["updatedTitle"]]],null]],null]],[["@text","@color","@type","@class","@size","@controlType","@disabled"],[[28,[32,1],["i18n_save","url-preview-detour/components/edit-title"],null],"inverse","primary","ml2",1,"button",[30,0,["saveBtnDisabled"]]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "]],["&attrs","@shouldFocusEditTitleForm","@articleTitle","@onCancel","@onSave"],false,[]]',moduleName:"url-preview-detour/components/edit-title.gjs",scope:()=>[u.default,p.default,m.default,h.default,f.on,g.fn],isStrictMode:!0}),(b=class extends c.default{constructor(){super(...arguments);(0,t.default)(this,"updatedTitle",_,this)}get saveBtnDisabled(){return(0,l.isEmpty)(this.updatedTitle)}onEditTitle(e){let{target:{value:t}}=e
|
|
this.updatedTitle=t}},_=(0,i.default)(b.prototype,"updatedTitle",[d.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),(0,i.default)(b.prototype,"onEditTitle",[s.action],Object.getOwnPropertyDescriptor(b.prototype,"onEditTitle"),b.prototype),b))}))
|
|
define("url-preview-detour/components/url-preview-detour",["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/helper","@ember/component","detour-framework/utils/detour-constants","@glimmer/tracking","organization-detour/utils/url-preview-utils","organization-detour/url-preview-detour-manager","detour-framework/utils/preview-utils","vector/utils/constants","detour-framework/utils/media-upload","rsvp","@linkedin/ember-m3-pdsc-model-builder","@ember/object","@glimmer/component","@ember/array","@ember/service","@ember/render-modifiers/modifiers/did-insert","artdeco-button/components/artdeco-button","ember-cli-pemberly-i18n/helpers/t","global-modifiers/modifiers/focus","detour-framework/components/upload-media-input","hue-web-icons/components/icon","url-preview-detour/components/edit-title","global-helpers/helpers/not","update-components/components/mini-update-v2","detour-framework/components/share-box-footer","global-utils/utils/api-compat","@ember/modifier"],(function(e,t,n,i,r,o,a,l,s,d,c,u,p,m,h,g,f,b,_,y,v,T,E,S,w,k,C,D,O,A,I,P,x){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var M,R,N,U,L,F,z,j,V,B,H
|
|
e.default=(0,l.setComponentTemplate)((0,o.createTemplateFactory)({id:"2za20w+/",block:'[[[1,"\\n"],[1," "],[11,0],[24,0,"url-preview-detour__preview-container-wrapper"],[4,[32,0],[[30,0,["maybeUpdateShareboxModalConfig"]]],null],[12],[1,"\\n "],[10,0],[14,0,"share-creation-state__preview-container"],[12],[1,"\\n "],[10,0],[14,0,"share-creation-state__preview-container-controls"],[12],[1,"\\n "],[8,[32,1],[[4,[32,3],["click",[30,0,["onToggleEditTitle"]]],null],[4,[32,4],null,[["when"],[[30,0,["shouldFocusEditTitleButton"]]]]]],[["@type","@size","@color","@class","@icon","@text"],["primary","1","muted","url-preview-detour__edit-title-button mr2","edit",[28,[32,2],["i18n_edit-article-title","url-preview-detour/components/url-preview-detour"],null]]],null],[1,"\\n "],[8,[32,5],null,[["@class","@onMediaData","@id","@controlName","@mediaType"],["share-box__custom-image-upload visually-hidden",[30,0,["onUrlPreviewImageUpload"]],"url-preview-image","share_change_article_preview","IMAGE_SHARING"]],null],[1,"\\n "],[10,"label"],[14,"for","url-preview-image"],[14,0,"share-creation-state__preview-container-btn mv0 artdeco-button artdeco-button--circle artdeco-button--muted artdeco-button--1"],[12],[1,"\\n "],[8,[32,6],null,[["@type","@size","@name"],["system","small","camera"]],null],[1,"\\n "],[10,1],[14,0,"visually-hidden"],[12],[1,"\\n "],[1,[28,[32,2],["i18n_upload_image_preview","url-preview-detour/components/url-preview-detour"],null]],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n"],[41,[30,0,["editTitleOpen"]],[[[1," "],[8,[32,7],null,[["@articleTitle","@onCancel","@onSave","@shouldFocusEditTitleForm"],[[30,0,["articleTitle"]],[30,0,["onToggleEditTitle"]],[30,0,["onSaveTitle"]],[28,[32,8],[[30,0,["shouldFocusEditTitleButton"]]],null]]],null],[1,"\\n"]],[]],null],[1,"\\n "],[8,[32,9],[[24,0,"url-preview-detour__preview"]],[["@showContentOnly","@disableContentDisplayed","@update","@isDashEnabled","@isPreviewMode","@disableStackedView"],[false,false,[30,0,["previewedUpdateV2"]],[30,0,["isDashUpdate"]],true,true]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n\\n "],[8,[32,10],null,[["@primaryAction","@primaryButtonKey","@primaryControlName","@secondaryAction","@secondaryButtonKey","@secondaryControlName"],[[30,0,["primaryButton","clickHandler"]],[30,0,["primaryButton","buttonKey"]],[30,0,["primaryButton","controlName"]],[30,0,["secondaryButton","clickHandler"]],[30,0,["secondaryButton","buttonKey"]],[30,0,["secondaryButton","controlName"]]]],null],[1,"\\n "]],[],false,["if"]]',moduleName:"url-preview-detour/components/url-preview-detour.gjs",scope:()=>[T.default,E.default,S.default,x.on,w.default,k.default,C.default,D.default,O.default,A.default,I.default],isStrictMode:!0}),(M=(0,v.inject)("i18n"),R=(0,v.inject)("global-services@store-shim"),N=(0,v.inject)("vector@vector-media-upload"),U=class e extends _.default{constructor(){super(...arguments);(0,t.default)(this,"i18n",L,this);(0,t.default)(this,"storeShim",F,this);(0,t.default)(this,"vectorMediaUpload",z,this);(0,t.default)(this,"editTitleOpen",j,this);(0,t.default)(this,"customArticleTitle",V,this);(0,t.default)(this,"newImageViewComponent",B,this);(0,t.default)(this,"articleImageUploadPromise",H,this)}get primaryButton(){return{clickHandler:this.onNext,controlName:"url_preview_detour_done",buttonKey:s.SHARE_BOX_FOOTER_PRIMARY_KEYS.DONE}}get secondaryButton(){return{clickHandler:this.args.goToCreation,controlName:"url_preview_detour_back",buttonKey:s.SHARE_BOX_FOOTER_SECONDARY_KEYS.BACK}}get shouldFocusEditTitleButton(){return!this.editTitleOpen}get initialUpdateV2(){var e
|
|
return null===(e=this.args.detourData)||void 0===e?void 0:e.initialUpdateV2}get isDashUpdate(){var e
|
|
return"com.linkedin.voyager.dash.feed.Update"===(0,P.classNameOf)(null===(e=this.args.detourData)||void 0===e?void 0:e.initialUpdateV2)}get mediaUrn(){var e
|
|
return null===(e=this.args.detourData)||void 0===e?void 0:e.mediaUrn}get originalUrl(){var e
|
|
return null===(e=this.args.detourData)||void 0===e?void 0:e.originalUrl}get previewedUpdateV2(){return this.newImageViewComponent||this.customArticleTitle?this.isDashUpdate?(0,c.getUpdateWithGivenArticleImageOrTitle)(this.storeShim,this.initialUpdateV2,this.newImageViewComponent,(0,f.buildModel)("com.linkedin.voyager.dash.common.text.TextViewModel",{text:this.customArticleTitle})):(0,c.getUpdateV2WithGivenArticleImageOrTitle)(this.storeShim,this.initialUpdateV2,this.newImageViewComponent,(0,f.buildModel)("com.linkedin.voyager.common.TextViewModel",{text:this.customArticleTitle})):this.initialUpdateV2}get articleTitle(){return this.isDashUpdate?(0,b.get)(this.previewedUpdateV2,"content.articleComponent.title.text"):(0,b.get)(this.previewedUpdateV2,"content.title.text")}maybeUpdateShareboxModalConfig(){var t,n
|
|
null===(t=(n=this.args).updateShareboxModalConfig)||void 0===t||t.call(n,{modalHeader:this.i18n.lookupTranslation(e,"i18n_detour_header")(),controlName:"url_preview_exit",shouldFocusOnHeader:!0})}onSaveTitle(e){this.customArticleTitle=e
|
|
this._onToggleEditTitle()}onToggleEditTitle(){this._onToggleEditTitle()}onUrlPreviewImageUpload(e){(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:""
|
|
const n=(0,y.isArray)(e)?e:[e]
|
|
return g.Promise.all(n.map((e=>(0,p.getImageProps)(e,t))))})(e.data).then((e=>{if(this.isDestroying)return
|
|
const t=this.isDashUpdate?p.getDashImageViewComponentFromImageUrls:p.getImageViewComponentFromImageUrls,n=e.filter((e=>"string"==typeof e.src)).map((e=>{let{src:n,height:i,width:r,accessibilityText:o}=e
|
|
return t(n,i,r,o)}))
|
|
n[0]&&([this.newImageViewComponent]=n)}))
|
|
const{nonMemberActor:t}=this.args,n=this.isDashUpdate?t.dashUrn:t.urn,i=new h.default({media:e,mediaUploadType:m.UPLOAD_MEDIA_TYPES.IMAGE_SHARING,uploadService:this.vectorMediaUpload,organizationActorUrn:n})
|
|
this.articleImageUploadPromise=i.uploadMedia()}onNext(){var e,t
|
|
null===(e=(t=this.args).onDetourComplete)||void 0===e||e.call(t,new u.default({urlPreviewDataPromise:this.isDashUpdate?(0,g.resolve)({data:{contentcreationDashUpdateUrlPreviewByUrl:{elements:[{update:this.previewedUpdateV2,originalUrl:this.originalUrl}]}}}):(0,g.resolve)({update:this.previewedUpdateV2,originalUrl:this.originalUrl}),i18nService:this.i18n,customArticleImagePromise:this.articleImageUploadPromise,customArticleTitle:this.customArticleTitle,isOrganizationActor:!0,isUrlPreviewDashEnabled:this.isDashUpdate}))}_onToggleEditTitle(){this.editTitleOpen=!this.editTitleOpen}},L=(0,i.default)(U.prototype,"i18n",[M],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),F=(0,i.default)(U.prototype,"storeShim",[R],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),z=(0,i.default)(U.prototype,"vectorMediaUpload",[N],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),j=(0,i.default)(U.prototype,"editTitleOpen",[d.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),V=(0,i.default)(U.prototype,"customArticleTitle",[d.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),B=(0,i.default)(U.prototype,"newImageViewComponent",[d.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),H=(0,i.default)(U.prototype,"articleImageUploadPromise",[d.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),(0,i.default)(U.prototype,"maybeUpdateShareboxModalConfig",[b.action],Object.getOwnPropertyDescriptor(U.prototype,"maybeUpdateShareboxModalConfig"),U.prototype),(0,i.default)(U.prototype,"onSaveTitle",[b.action],Object.getOwnPropertyDescriptor(U.prototype,"onSaveTitle"),U.prototype),(0,i.default)(U.prototype,"onToggleEditTitle",[b.action],Object.getOwnPropertyDescriptor(U.prototype,"onToggleEditTitle"),U.prototype),(0,i.default)(U.prototype,"onUrlPreviewImageUpload",[b.action],Object.getOwnPropertyDescriptor(U.prototype,"onUrlPreviewImageUpload"),U.prototype),(0,i.default)(U.prototype,"onNext",[b.action],Object.getOwnPropertyDescriptor(U.prototype,"onNext"),U.prototype),U))}))
|
|
define("url-preview-detour/template-registry",[],(function(){}))
|
|
define("writing-assistant/components/feedback-card-v2",["exports","@babel/runtime/helpers/esm/initializerDefineProperty","@babel/runtime/helpers/esm/defineProperty","@babel/runtime/helpers/esm/classPrivateMethodGet","@babel/runtime/helpers/esm/applyDecoratedDescriptor","@babel/runtime/helpers/esm/initializerWarningHelper","@ember/template-factory","@ember/component","global-utils/utils/a11y-focus-element","@glimmer/tracking","hue-web-icons/components/icon","writing-assistant/utils/writing-assistant-constants","@ember/service","@ember/object","@glimmer/component","artdeco-button/components/artdeco-button","global-modifiers/modifiers/focus","ember-cli-pemberly-tracking/modifiers/track-interaction","ember-cli-pemberly-i18n/helpers/t","global-helpers/helpers/eq","global-helpers/helpers/not","@ember/modifier","global-modifiers/modifiers/scroll-into-view","@ember/helper"],(function(e,t,n,i,r,o,a,l,s,d,c,u,p,m,h,g,f,b,_,y,v,T,E,S){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var w,k,C,D,O,A,I,P,x,M,R
|
|
e.default=(0,l.setComponentTemplate)((0,a.createTemplateFactory)({id:"0e24f5oI",block:'[[[1,"\\n"],[1," "],[10,0],[15,0,[29,[[30,1]]]],[12],[1,"\\n "],[10,0],[12],[1,"\\n"],[41,[30,0,["showFeedbackHeaderContainer"]],[[[1," "],[10,0],[15,0,[29,["writing-assistant-feedback__header-container\\n ",[52,[30,2],"writing-assistant-feedback__header-container--with-border"]]]],[12],[1,"\\n"],[41,[30,2],[[[41,[30,3],[[[1," "],[8,[32,0],[[4,[32,2],["click",[30,4]],null],[4,[32,3],["wa_undo"],null]],[["@color","@icon","@size","@type","@text","@aria-label"],["muted","undo","4","tertiary",[28,[32,1],["i18n_undo","writing-assistant/components/feedback-card-v2"],null],[28,[32,1],["i18n_undo","writing-assistant/components/feedback-card-v2"],null]]],null],[1,"\\n"]],[]],null],[1," "],[10,0],[14,0,"writing-assistant-feedback__voting-btns-v2"],[12],[1,"\\n"],[41,[30,0,["showFeedbackSubmitted"]],[[[1," "],[8,[32,4],[[24,0,"writing-assistant-feedback__success-icon"]],[["@type","@size","@name"],["system","medium","signal-success"]],null],[1,"\\n "],[10,1],[14,0,"writing-assistant-feedback__success-message"],[12],[1,"\\n "],[1,[28,[32,1],["i18n_feedback_submitted","writing-assistant/components/feedback-card-v2"],null]],[1,"\\n "],[13],[1,"\\n"]],[]],[[[1," "],[8,[32,0],[[4,[32,2],["click",[28,[32,5],[[30,0,["onFeedbackVote"]],"SATISFIED"],null]],null],[4,[32,3],["wa_feedback_positive"],null]],[["@circle","@color","@icon","@size","@type","@text","@aria-label"],[true,"muted","thumbs-up-outline","3","secondary",[28,[32,1],["i18n_feedback_thumbs_up","writing-assistant/components/feedback-card-v2"],null],[28,[32,1],["i18n_feedback_thumbs_up","writing-assistant/components/feedback-card-v2"],null]]],null],[1,"\\n\\n "],[8,[32,0],[[24,0,"writing-assistant-feedback__down-btn-v2"],[4,[32,2],["click",[28,[32,5],[[30,0,["onFeedbackVote"]],"UNSATISFIED"],null]],null],[4,[32,3],["wa_feedback_negative"],null]],[["@circle","@color","@icon","@size","@type","@text","@aria-label"],[true,"muted","thumbs-down-outline","3","secondary",[28,[32,1],["i18n_feedback_thumbs_down","writing-assistant/components/feedback-card-v2"],null],[28,[32,1],["i18n_feedback_thumbs_down","writing-assistant/components/feedback-card-v2"],null]]],null],[1,"\\n"]],[]]],[1," "],[13],[1,"\\n"]],[]],[[[1," "],[10,0],[14,0,"writing-assistant-feedback__voting-btns-v2"],[12],[1,"\\n "],[10,1],[14,0,"writing-assistant-feedback__header-v2"],[12],[1,[28,[32,1],["i18n_was_this_helpful","writing-assistant/components/feedback-card-v2"],null]],[13],[1,"\\n\\n "],[8,[32,0],[[24,0,"writing-assistant-feedback__voting-btn"],[4,[32,2],["click",[28,[32,5],[[30,0,["onFeedbackVote"]],"SATISFIED"],null]],null],[4,[32,3],["wa_feedback_positive"],null]],[["@circle","@color","@icon","@size","@type","@text","@aria-label"],[true,"muted","thumbs-up-outline","1","secondary",[28,[32,1],["i18n_feedback_thumbs_up","writing-assistant/components/feedback-card-v2"],null],[28,[32,1],["i18n_feedback_thumbs_up","writing-assistant/components/feedback-card-v2"],null]]],null],[1,"\\n\\n "],[8,[32,0],[[24,0,"writing-assistant-feedback__voting-btn writing-assistant-feedback__down-btn-v2"],[4,[32,2],["click",[28,[32,5],[[30,0,["onFeedbackVote"]],"UNSATISFIED"],null]],null],[4,[32,3],["wa_feedback_negative"],null]],[["@circle","@color","@icon","@size","@type","@text","@aria-label"],[true,"muted","thumbs-down-outline","1","secondary",[28,[32,1],["i18n_feedback_thumbs_down","writing-assistant/components/feedback-card-v2"],null],[28,[32,1],["i18n_feedback_thumbs_down","writing-assistant/components/feedback-card-v2"],null]]],null],[1,"\\n "],[13],[1,"\\n"]],[]]],[1,"\\n "],[13],[1,"\\n"]],[]],[[[41,[30,0,["showFeedbackCardSurvey"]],[[[1," "],[10,2],[14,0,"writing-assistant-feedback__body-text-v2"],[12],[1,"\\n "],[1,[28,[32,1],["i18n_feedback_survey_title","writing-assistant/components/feedback-card-v2"],null]],[1,"\\n "],[13],[1,"\\n "]],[]],null]],[]]],[1," "],[13],[1,"\\n\\n "],[10,0],[14,0,"writing-assistant-feedback__body-v2"],[12],[1,"\\n "],[10,2],[14,0,"writing-assistant-feedback__body-text-v2"],[12],[1,"\\n "],[1,[30,0,["feedbackText"]]],[1,"\\n "],[13],[1,"\\n"],[41,[30,0,["showFeedbackCardSurvey"]],[[[1," "],[10,0],[14,0,"display-flex flex-column mt2"],[12],[1,"\\n "],[10,"fieldset"],[12],[1,"\\n"],[42,[28,[31,2],[[28,[31,2],[[30,0,["feedbackSurveyOptions"]]],null]],null],null,[[[1," "],[11,"input"],[16,1,[29,["wa-feedback-form-option-",[30,6]]]],[24,3,"wa-feedback-option"],[16,2,[30,5,["value"]]],[16,"checked",[52,[28,[32,6],[[30,7],[30,5,["value"]]],null],true,false]],[24,4,"radio"],[4,[32,7],null,[["when"],[[28,[32,6],[[30,6],0],null]]]],[4,[32,2],["change",[30,0,["onFeedbackOptionSelect"]]],null],[12],[13],[1,"\\n "],[10,"label"],[15,"for",[29,["wa-feedback-form-option-",[30,6]]]],[12],[1,"\\n "],[1,[30,5,["text"]]],[1,"\\n "],[13],[1,"\\n"]],[5,6]],null],[1," "],[13],[1,"\\n "],[8,[32,0],[[24,0,"writing-assistant-feedback__form-submit-btn"],[4,[32,2],["click",[30,0,["onSubmit"]]],null],[4,[32,9],null,[["options"],[[28,[32,10],null,[["behavior"],["smooth"]]]]]]],[["@color","@text","@type","@disabled"],["muted","Submit","secondary",[28,[32,8],[[30,0,["isFeedbackOptionSelected"]]],null]]],null],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1," "],[13],[1,"\\n "],[13],[1,"\\n "]],["@customClass","@isWritingAssistantPremiumEnabled","@improveWithAiQuery","@onFeedbackCardUndo","option","index","@feedbackCardView"],false,["if","each","-track-array"]]',moduleName:"writing-assistant/components/feedback-card-v2.gjs",scope:()=>[g.default,_.default,T.on,b.default,c.default,S.fn,y.default,f.default,v.default,E.default,S.hash],isStrictMode:!0}),(w=(0,p.inject)("i18n"),k=(0,p.inject)("tracking"),C=(I=new WeakSet,P=new WeakSet,x=new WeakSet,M=new WeakSet,R=new WeakSet,class e extends h.default{constructor(){super(...arguments)
|
|
R.add(this)
|
|
M.add(this)
|
|
x.add(this)
|
|
P.add(this)
|
|
I.add(this);(0,t.default)(this,"i18n",D,this);(0,t.default)(this,"tracking",O,this);(0,t.default)(this,"shouldFocusOnExitFeedbackBtn",A,this)}get isFeedbackOptionSelected(){return u.GEN_AI_CONTENT_SURVEY_CHOICES.includes(this.args.feedbackCardView)}get showFeedbackCardSurvey(){return"FEEDBACK_SURVEY"===this.args.feedbackCardView||this.isFeedbackOptionSelected}get showFeedbackSubmitted(){return"FEEDBACK_SURVEY_SUBMITTED_PREMIUM"===this.args.feedbackCardView}get feedbackSurveyOptions(){return u.GEN_AI_CONTENT_SURVEY_CHOICES.map((t=>({text:this.i18n.lookupTranslation(e,`i18n_${t}`)(),value:t})))}get feedbackText(){return"SATISFIED"===this.args.feedbackCardView?this.i18n.lookupTranslation(e,"i18n_feedback_thumbs_up_response")():"FEEDBACK_SURVEY_SUBMITTED"===this.args.feedbackCardView?this.i18n.lookupTranslation(e,"i18n_feedback_thumbs_down_response")():""}get showFeedbackHeaderContainer(){return"REQUEST"===this.args.feedbackCardView&&"FEEDBACK_SURVEY"!==this.args.feedbackCardView||this.showFeedbackSubmitted}onFeedbackOptionSelect(e){let{target:{value:t}}=e
|
|
this.args.onFeedbackCardAction(t)}onFeedbackVote(e){(0,i.default)(this,x,U).call(this,this.args.gaiContentUrn,e)
|
|
if("UNSATISFIED"===e){this.args.onFeedbackCardAction("FEEDBACK_SURVEY");(0,i.default)(this,M,L).call(this)}else(0,i.default)(this,P,N).call(this)}onSubmit(){(0,i.default)(this,R,F).call(this);(0,i.default)(this,P,N).call(this)}}),D=(0,r.default)(C.prototype,"i18n",[w],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),O=(0,r.default)(C.prototype,"tracking",[k],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),A=(0,r.default)(C.prototype,"shouldFocusOnExitFeedbackBtn",[d.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),(0,r.default)(C.prototype,"onFeedbackOptionSelect",[m.action],Object.getOwnPropertyDescriptor(C.prototype,"onFeedbackOptionSelect"),C.prototype),(0,r.default)(C.prototype,"onFeedbackVote",[m.action],Object.getOwnPropertyDescriptor(C.prototype,"onFeedbackVote"),C.prototype),(0,r.default)(C.prototype,"onSubmit",[m.action],Object.getOwnPropertyDescriptor(C.prototype,"onSubmit"),C.prototype),C))
|
|
function N(){this.args.onFeedbackCardAction("FEEDBACK_SURVEY_SUBMITTED_PREMIUM")}function U(e,t){const n={feedbackChoiceSelected:t,gaiContentUrn:e}
|
|
this.tracking.fireTrackingPayload("GenerativeAIContentGeneralFeedbackSubmitEvent",n)}function L(){const e={gaiContentUrn:this.args.gaiContentUrn,surveyChoicesShown:u.GEN_AI_CONTENT_SURVEY_CHOICES}
|
|
this.tracking.fireTrackingPayload("GenerativeAIContentSurveyImpressionEvent",e)}function F(){const e={surveyChoicesSelected:[this.args.feedbackCardView],gaiContentUrn:this.args.gaiContentUrn}
|
|
this.tracking.fireTrackingPayload("GenerativeAIContentSurveySubmitEvent",e)}}))
|
|
define("writing-assistant/components/feedback-card",["exports","@babel/runtime/helpers/esm/initializerDefineProperty","@babel/runtime/helpers/esm/defineProperty","@babel/runtime/helpers/esm/classPrivateMethodGet","@babel/runtime/helpers/esm/applyDecoratedDescriptor","@babel/runtime/helpers/esm/initializerWarningHelper","@ember/template-factory","@ember/component","global-utils/utils/a11y-focus-element","@glimmer/tracking","writing-assistant/utils/writing-assistant-constants","@ember/service","@ember/object","@glimmer/component","artdeco-button/components/artdeco-button","global-modifiers/modifiers/focus","ember-cli-pemberly-tracking/modifiers/track-interaction","ember-cli-pemberly-i18n/helpers/t","global-helpers/helpers/eq","@ember/modifier","global-modifiers/modifiers/scroll-into-view","@ember/helper"],(function(e,t,n,i,r,o,a,l,s,d,c,u,p,m,h,g,f,b,_,y,v,T){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var E,S,w,k,C,D,O,A,I
|
|
e.default=(0,l.setComponentTemplate)((0,a.createTemplateFactory)({id:"BrgDQ0EJ",block:'[[[1,"\\n"],[41,[30,0,["showFeedbackForm"]],[[[1," "],[10,0],[15,0,[29,["writing-assistant-feedback ",[30,1]]]],[12],[1,"\\n "],[10,0],[14,0,"writing-assistant-feedback__header"],[12],[1,"\\n "],[1,[30,0,["feedbackTitle"]]],[1,"\\n\\n "],[10,1],[14,0,"writing-assistant-feedback__close-btn"],[12],[1,"\\n "],[8,[32,0],[[4,[32,1],["click",[30,0,["onDismiss"]]],null],[4,[32,2],null,[["when"],[[30,0,["shouldFocusOnExitFeedbackBtn"]]]]],[4,[32,3],[[30,0,["dismissCIE"]]],null]],[["@circle","@color","@icon","@size","@type"],[true,"muted","close","1","tertiary"]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n\\n "],[10,0],[14,0,"writing-assistant-feedback__body"],[12],[1,"\\n "],[10,2],[14,0,"writing-assistant-feedback__body-text"],[12],[1,"\\n "],[1,[30,0,["feedbackText"]]],[1,"\\n "],[13],[1,"\\n"],[41,[30,0,["showFeedbackBtns"]],[[[1," "],[10,0],[14,0,"writing-assistant-feedback__voting-btns"],[12],[1,"\\n "],[8,[32,0],[[4,[32,1],["click",[28,[32,5],[[30,0,["onFeedbackVote"]],[30,0,["customTrackingFeedbackChoice","SATISFIED"]]],null]],null],[4,[32,3],[[30,0,["controlInteractionEvents","FEEDBACK_THUMBS_UP"]]],null]],[["@circle","@color","@icon","@size","@type","@text"],[true,"muted","thumbs-up-outline","1","tertiary",[28,[32,4],["i18n_feedback_thumbs_up","writing-assistant/components/feedback-card"],null]]],null],[1,"\\n\\n "],[8,[32,0],[[4,[32,1],["click",[28,[32,5],[[30,0,["onFeedbackVote"]],[30,0,["customTrackingFeedbackChoice","UNSATISFIED"]]],null]],null],[4,[32,3],[[30,0,["controlInteractionEvents","FEEDBACK_THUMBS_DOWN"]]],null]],[["@circle","@color","@icon","@size","@type","@class","@text"],[true,"muted","thumbs-down-outline","1","tertiary","writing-assistant-feedback__down-btn",[28,[32,4],["i18n_feedback_thumbs_down","writing-assistant/components/feedback-card"],null]]],null],[1,"\\n "],[13],[1,"\\n"]],[]],null],[41,[30,0,["showFeedbackCardSurvey"]],[[[1," "],[10,0],[14,0,"display-flex flex-column mt2"],[12],[1,"\\n "],[10,"fieldset"],[12],[1,"\\n"],[42,[28,[31,2],[[28,[31,2],[[30,0,["feedbackSurveyOptions"]]],null]],null],null,[[[1," "],[11,"input"],[16,1,[29,["wa-feedback-form-option-",[30,3]]]],[24,3,"wa-feedback-option"],[16,2,[30,2,["value"]]],[16,"checked",[52,[28,[32,6],[[30,0,["feedbackView"]],[30,2,["value"]]],null],true,false]],[24,4,"radio"],[4,[32,2],null,[["when"],[[28,[32,6],[[30,3],0],null]]]],[4,[32,1],["change",[30,0,["onFeedbackOptionSelect"]]],null],[12],[13],[1,"\\n "],[10,"label"],[15,"for",[29,["wa-feedback-form-option-",[30,3]]]],[12],[1,"\\n "],[1,[30,2,["text"]]],[1,"\\n "],[13],[1,"\\n"]],[2,3]],null],[1," "],[13],[1,"\\n "],[8,[32,0],[[24,0,"writing-assistant-feedback__form-submit-btn"],[4,[32,1],["click",[30,0,["onSubmit"]]],null],[4,[32,7],null,[["options"],[[28,[32,8],null,[["behavior"],["smooth"]]]]]]],[["@color","@text","@type","@disabled"],["muted","Submit","secondary",[30,0,["isSubmitBtnDisabled"]]]],null],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1," "],[13],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1," "]],["@class","option","index"],false,["if","each","-track-array"]]',moduleName:"writing-assistant/components/feedback-card.gjs",scope:()=>[h.default,y.on,g.default,f.default,b.default,T.fn,_.default,v.default,T.hash],isStrictMode:!0}),(E=(0,u.inject)("i18n"),S=(0,u.inject)("tracking"),w=(O=new WeakSet,A=new WeakSet,I=new WeakSet,class e extends m.default{constructor(){super(...arguments)
|
|
I.add(this)
|
|
A.add(this)
|
|
O.add(this);(0,t.default)(this,"i18n",k,this);(0,t.default)(this,"tracking",C,this);(0,t.default)(this,"shouldFocusOnExitFeedbackBtn",D,this);(0,n.default)(this,"controlInteractionEvents",c.WRITING_ASSISTANT_TRACKING.CONTROL_INTERACTION_EVENTS);(0,n.default)(this,"customTrackingFeedbackChoice",c.GEN_AI_CONTENT_GENERAL_FEEDBACK_CHOICE)}get dismissCIE(){return this.showFeedbackBtns?this.controlInteractionEvents.FEEDBACK_DISMISS:this.controlInteractionEvents.FEEDBACK_DISMISS_CONFIRMATION}get isFeedbackOptionSelected(){return c.GEN_AI_CONTENT_SURVEY_CHOICES.includes(this.feedbackView)}get isSubmitBtnDisabled(){return!this.isFeedbackOptionSelected}get showFeedbackForm(){return!(this.feedbackView===c.FEEDBACK_CARD_VIEW.NONE)}get showFeedbackCardSurvey(){return this.feedbackView===c.FEEDBACK_CARD_VIEW.FEEDBACK_SURVEY||this.isFeedbackOptionSelected}get feedbackSurveyOptions(){return c.GEN_AI_CONTENT_SURVEY_CHOICES.map((t=>({text:this.i18n.lookupTranslation(e,`i18n_${t}`)(),value:t})))}get feedbackView(){return this.args.feedbackCardView}get feedbackTitle(){return this.feedbackView===c.FEEDBACK_CARD_VIEW.UP_VOTE||this.feedbackView===c.FEEDBACK_CARD_VIEW.FEEDBACK_SURVEY_SUBMITTED?this.i18n.lookupTranslation(e,"i18n_feedback_thanks")():this.i18n.lookupTranslation(e,"i18n_feedback_title")()}get feedbackText(){return this.feedbackView===c.FEEDBACK_CARD_VIEW.UP_VOTE?this.i18n.lookupTranslation(e,"i18n_feedback_thumbs_up_response")():this.feedbackView===c.FEEDBACK_CARD_VIEW.FEEDBACK_SURVEY_SUBMITTED?this.i18n.lookupTranslation(e,"i18n_feedback_thumbs_down_response")():this.feedbackView===c.FEEDBACK_CARD_VIEW.FEEDBACK_SURVEY||this.isFeedbackOptionSelected?this.i18n.lookupTranslation(e,"i18n_feedback_survey_title")():this.i18n.lookupTranslation(e,"i18n_feedback_text")()}get showFeedbackBtns(){return this.feedbackView===c.FEEDBACK_CARD_VIEW.REQUEST&&this.feedbackView!==c.FEEDBACK_CARD_VIEW.FEEDBACK_SURVEY}onFeedbackOptionSelect(e){let{target:{value:t}}=e
|
|
this.args.onFeedbackCardAction(t)}onFeedbackVote(e){(0,i.default)(this,O,P).call(this,this.args.gaiContentUrn,e)
|
|
if(e===this.customTrackingFeedbackChoice.UNSATISFIED){this.args.onFeedbackCardAction(c.FEEDBACK_CARD_VIEW.FEEDBACK_SURVEY);(0,i.default)(this,A,x).call(this)}else{this.args.onFeedbackCardAction(e)
|
|
this.shouldFocusOnExitFeedbackBtn=!0}}onDismiss(){this.args.onFeedbackCardAction("CLOSED");(0,s.default)(this,".ql-editor")}onSubmit(){(0,i.default)(this,I,M).call(this)
|
|
this.args.onFeedbackCardAction(c.FEEDBACK_CARD_VIEW.FEEDBACK_SURVEY_SUBMITTED)
|
|
this.shouldFocusOnExitFeedbackBtn=!0}}),k=(0,r.default)(w.prototype,"i18n",[E],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),C=(0,r.default)(w.prototype,"tracking",[S],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),D=(0,r.default)(w.prototype,"shouldFocusOnExitFeedbackBtn",[d.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),(0,r.default)(w.prototype,"onFeedbackOptionSelect",[p.action],Object.getOwnPropertyDescriptor(w.prototype,"onFeedbackOptionSelect"),w.prototype),(0,r.default)(w.prototype,"onFeedbackVote",[p.action],Object.getOwnPropertyDescriptor(w.prototype,"onFeedbackVote"),w.prototype),(0,r.default)(w.prototype,"onDismiss",[p.action],Object.getOwnPropertyDescriptor(w.prototype,"onDismiss"),w.prototype),(0,r.default)(w.prototype,"onSubmit",[p.action],Object.getOwnPropertyDescriptor(w.prototype,"onSubmit"),w.prototype),w))
|
|
function P(e,t){const n={feedbackChoiceSelected:t,gaiContentUrn:e}
|
|
this.tracking.fireTrackingPayload("GenerativeAIContentGeneralFeedbackSubmitEvent",n)}function x(){const e={gaiContentUrn:this.args.gaiContentUrn,surveyChoicesShown:c.GEN_AI_CONTENT_SURVEY_CHOICES}
|
|
this.tracking.fireTrackingPayload("GenerativeAIContentSurveyImpressionEvent",e)}function M(){const e={surveyChoicesSelected:[this.feedbackView],gaiContentUrn:this.args.gaiContentUrn}
|
|
this.tracking.fireTrackingPayload("GenerativeAIContentSurveySubmitEvent",e)}}))
|
|
define("writing-assistant/components/loader",["exports","@ember/template-factory","@ember/helper","@ember/component/template-only","@ember/component","job-posting-shared/components/shimmer","ember-cli-pemberly-i18n/helpers/t","artdeco-button/components/artdeco-button","ember-cli-pemberly-tracking/modifiers/track-interaction","global-modifiers/modifiers/focus","@ember/modifier"],(function(e,t,n,i,r,o,a,l,s,d,c){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
const u=(0,r.setComponentTemplate)((0,t.createTemplateFactory)({id:"umLS+NOK",block:'[[[1,"\\n"],[1," "],[10,0],[14,0,"writing-assistant-loader"],[12],[1,"\\n "],[10,0],[12],[1,"\\n "],[8,[32,0],[[24,0,"writing-assistant-loader__block"]],null,null],[1,"\\n "],[8,[32,0],[[24,0,"writing-assistant-loader__block"]],null,null],[1,"\\n "],[8,[32,0],[[24,0,"writing-assistant-loader__block"]],null,null],[1,"\\n "],[8,[32,0],[[24,0,"writing-assistant-loader__block"]],null,null],[1,"\\n "],[8,[32,0],[[24,0,"writing-assistant-loader__block"]],null,null],[1,"\\n "],[13],[1,"\\n "],[10,0],[14,0,"writing-assistant-loader__text-container"],[12],[1,"\\n "],[10,2],[14,0,"writing-assistant-loader__text-heading"],[12],[1,[52,[30,1],[28,[32,1],["i18n_writing_post","writing-assistant/components/loader"],null],[28,[32,1],["i18n_drafting_post","writing-assistant/components/loader"],null]]],[13],[1,"\\n "],[8,[32,2],[[4,[32,3],["click",[30,2]],null],[4,[32,4],["wa_cancel_draft"],null],[4,[32,5],null,null]],[["@color","@size","@type","@text"],["muted",2,"secondary",[28,[32,1],["i18n_draft_cancel","writing-assistant/components/loader"],null]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n"]],["@isPremiumEnabled","@cancelHandler"],false,["if"]]',moduleName:"writing-assistant/components/loader.gjs",scope:()=>[o.default,a.default,l.default,c.on,s.default,d.default],isStrictMode:!0}),(0,i.default)("loader","Loader"))
|
|
e.default=u}))
|
|
define("writing-assistant/components/min-words-count",["exports","@ember/template-factory","@ember/component","@glimmer/component","ember-cli-pemberly-i18n/helpers/t","artdeco-inline-feedback/components/artdeco-inline-feedback"],(function(e,t,n,i,r,o){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
class a extends i.default{get minWordsCount(){return`${Math.min(this.args.inputQueryWordCount,this.args.minInputWordsRequired)}/${this.args.minInputWordsRequired}`}}e.default=a;(0,n.setComponentTemplate)((0,t.createTemplateFactory)({id:"cwNhwsRO",block:'[[[1,"\\n"],[1," "],[10,0],[15,0,[29,["display-flex ",[30,1]]]],[12],[1,"\\n"],[41,[30,2],[[[1," "],[1,[30,0,["minWordsCount"]]],[1,"\\n"]],[]],[[[1," "],[8,[32,0],null,[["@message","@type","@isIconHidden"],[[28,[32,1],["i18n_minimum_required_words","writing-assistant/components/min-words-count"],[["wordCount"],[[30,0,["minWordsCount"]]]]],"note",true]],null],[1,"\\n"]],[]]],[1," "],[13],[1,"\\n "]],["@class","@shouldOnlyShowCount"],false,["if"]]',moduleName:"writing-assistant/components/min-words-count.gjs",scope:()=>[o.default,r.default],isStrictMode:!0}),a)}))
|
|
define("writing-assistant/components/writing-assistant",["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","writing-assistant/utils/writing-assistant-constants","sharing-shared/utils/sharing-shared-constants","sharing-shared/utils/sharing-shared-utils","@glimmer/tracking","@ember/object","@ember/service","@glimmer/component","writing-assistant/components/loader","artdeco-empty-state/components/artdeco-empty-state","ember-cli-pemberly-i18n/helpers/t","ember-cli-pemberly-tracking/modifiers/track-render","artdeco-button/components/artdeco-button","ember-cli-pemberly-tracking/modifiers/track-interaction","artdeco-hoverables/components/artdeco-hoverable-trigger","hue-web-icons/components/icon","@ember/helper","artdeco-hoverables/components/artdeco-hoverable-content","artdeco-text-input/components/artdeco-text-input","ember-set-helper/helpers/set","global-modifiers/modifiers/focus","artdeco-inline-feedback/components/artdeco-inline-feedback","@ember/modifier"],(function(e,t,n,i,r,o,a,l,s,d,c,u,p,m,h,g,f,b,_,y,v,T,E,S,w,k,C,D,O){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.default=void 0
|
|
var A,I,P,x,M,R,N,U,L,F,z,j,V,B
|
|
e.default=(0,a.setComponentTemplate)((0,o.createTemplateFactory)({id:"XPglnU40",block:'[[[1,"\\n"],[41,[30,0,["isAPIRequestInProgress"]],[[[1," "],[8,[32,0],null,[["@cancelHandler","@isPremiumEnabled"],[[30,0,["onCancelAIDraft"]],[30,1]]],null],[1,"\\n"]],[]],[[[41,[30,0,["shouldShowErrorView"]],[[[1," "],[8,[32,1],[[4,[32,3],null,[["pageKey","routeName","currentRoute"],[[30,0,["trackingEvents","PAGEVIEW_EVENTS","ERROR_STATE"]],[28,[32,4],[[53,"outletState"],"render.name"],null],[28,[32,4],[[53,"outletState"],"render"],null]]]]],[["@illustration","@headline","@message","@class"],["error-server",[28,[32,2],["i18n_ai_error_heading","writing-assistant/components/writing-assistant"],null],[28,[32,2],["i18n_ai_error_message","writing-assistant/components/writing-assistant"],null],"writing-assistant-input__error-container"]],null],[1,"\\n "],[10,0],[14,0,"display-flex justify-center"],[12],[1,"\\n "],[8,[32,5],[[4,[32,6],["click",[30,0,["onCancelAIDraft"]]],null],[4,[32,7],[[30,0,["trackingEvents","CONTROL_INTERACTION_EVENTS","WA_CANCEL_ERROR"]]],null]],[["@class","@color","@size","@type","@text"],["writing-assistant-input__error-cancel-button","muted",2,"tertiary",[28,[32,2],["i18n_draft_cancel","writing-assistant/components/writing-assistant"],null]]],null],[1,"\\n "],[8,[32,5],[[4,[32,6],["click",[30,0,["onDraftPost"]]],null],[4,[32,7],[[30,0,["trackingEvents","CONTROL_INTERACTION_EVENTS","WA_TRY_AGAIN"]]],null]],[["@color","@size","@type","@text"],["muted",2,"secondary",[28,[32,2],["i18n_try_again","writing-assistant/components/writing-assistant"],null]]],null],[1,"\\n "],[13],[1,"\\n"]],[]],[[[41,[30,0,["shouldShowQueryEditor"]],[[[1," "],[10,0],[15,0,[29,["writing-assistant-input__container\\n ",[52,[30,0,["isInputFocused"]],"writing-assistant-input__container-focused"]]]],[12],[1,"\\n "],[10,0],[14,0,"display-flex"],[12],[1,"\\n "],[10,2],[14,0,"writing-assistant-input__header-text"],[12],[1,[28,[32,2],["i18n_draft_using_ai","writing-assistant/components/writing-assistant"],null]],[13],[1,"\\n "],[8,[32,8],null,[["@class","@for","@to","@on","@placement"],["writing-assistant-input__header-notice-trigger","writing-assistant-input_info","writing-assistant-hoverable-outlet","click","bottom"]],[["default"],[[[[1,"\\n "],[11,"button"],[16,"aria-controls",[30,2,["ariaId"]]],[16,"aria-expanded",[30,2,["ariaExpanded"]]],[24,0,"t-black"],[24,4,"button"],[4,[32,7],[[30,0,["trackingEvents","CONTROL_INTERACTION_EVENTS","WA_VIEW_INFO"]]],null],[12],[1,"\\n "],[8,[32,9],[[24,0,"writing-assistant-input__header-notice-icon"]],[["@type","@size","@name"],["system","small","signal-notice"]],null],[1,"\\n "],[13],[1,"\\n "]],[2]]]]],[1,"\\n "],[10,0],[14,0,"writing-assistant-input__beta-label"],[12],[1,[28,[32,2],["i8n_beta_label","writing-assistant/components/writing-assistant"],null]],[13],[1,"\\n "],[13],[1,"\\n "],[10,2],[14,0,"text-body-xsmall t-black--light mt1"],[12],[1,[28,[32,2],["i18n_community_policy","writing-assistant/components/writing-assistant"],[["linkInfo"],[[28,[32,10],null,[["target","href","rel"],["_blank","/legal/professional-community-policies","noopener noreferrer"]]]]]]],[13],[1,"\\n "],[10,0],[14,1,"writing-assistant-hoverable-outlet"],[12],[13],[1,"\\n "],[8,[32,11],null,[["@theme","@contentClass","@id","@to"],["inverse","writing-assistant-input__header-notice-content","writing-assistant-input_info","writing-assistant-hoverable-outlet"]],[["default"],[[[[1,"\\n "],[1,[28,[32,2],["i18n_draft_using_ai_tooltip","writing-assistant/components/writing-assistant"],[["linkInfo","minRequiredWordCount"],[[28,[32,10],null,[["target","href","rel"],["_blank","/help/linkedin/answer/a1517763","noopener noreferrer"]]],[30,0,["minInputWordsRequired"]]]]]],[1,"\\n "]],[]]]]],[1,"\\n "],[8,[32,12],[[4,[32,14],null,[["onSelector"],["textarea"]]]],[["@inputClasses","@onFocusIn","@onFocusOut","@onInput","@type","@required","@placeholder","@value"],[[29,["writing-assistant-input__editor",[52,[30,3]," writing-assistant-input__editor-expanded"]]],[28,[32,13],[[30,0],"isInputFocused",true],null],[28,[32,13],[[30,0],"isInputFocused",false],null],[30,0,["onTextChange"]],"multiline",true,[28,[32,2],["i18n_ai_input_placeholder","writing-assistant/components/writing-assistant"],null],[30,0,["inputQuery"]]]],null],[1,"\\n "],[10,0],[14,0,"display-flex justify-space-between align-items-center"],[12],[1,"\\n "],[10,2],[14,0,"writing-assistant-input__minchars"],[12],[1,[28,[32,2],["i18n_minimum_required_words","writing-assistant/components/writing-assistant"],[["wordCount"],[[30,0,["minWordsCount"]]]]]],[13],[1,"\\n "],[10,0],[14,0,"writing-assistant-input__footer-buttons"],[12],[1,"\\n "],[8,[32,5],[[4,[32,6],["click",[30,4]],null],[4,[32,7],[[30,0,["trackingEvents","CONTROL_INTERACTION_EVENTS","WA_CLOSE_INPUT"]]],null]],[["@size","@type","@class","@text"],[2,"secondary","writing-assistant-input__footer-secondary-button",[28,[32,2],["i18n_draft_cancel","writing-assistant/components/writing-assistant"],null]]],null],[1,"\\n "],[8,[32,5],[[4,[32,6],["click",[30,0,["onDraftPost"]]],null],[4,[32,7],[[30,0,["trackingEvents","CONTROL_INTERACTION_EVENTS","WA_CREATE_DRAFT"]]],null]],[["@size","@type","@disabled","@text"],[2,"primary",[30,0,["isDraftButtonDisabled"]],[28,[32,2],["i18n_create_draft","writing-assistant/components/writing-assistant"],null]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n"],[41,[30,0,["showErrorMessage"]],[[[1," "],[10,0],[14,0,"writing-assistant-input__error-message"],[12],[1,"\\n "],[8,[32,15],null,[["@message","@type","@isIconHidden"],[[30,0,["abusiveInputErrorMsg"]],"note",false]],null],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1," "]],[]],null]],[]]]],[]]],[1," "]],["@isPremiumEnabled","trigger","@isWritingAssistantInExpandedMode","@cancelHandler"],false,["if","-get-dynamic-var"]]',moduleName:"writing-assistant/components/writing-assistant.gjs",scope:()=>[h.default,g.default,f.default,b.default,E.get,_.default,O.on,y.default,v.default,T.default,E.hash,S.default,w.default,k.default,C.default,D.default],isStrictMode:!0}),(A=(0,p.inject)("global-services@store-shim"),I=(0,p.inject)("tracking"),P=(0,p.inject)("watchman-tracking@watchman-tracking"),x=class extends m.default{get inputQueryWordCount(){return this.inputQuery.split(" ").filter((e=>""!==e)).length}get minWordsCount(){return`${Math.min(this.inputQueryWordCount,this.minInputWordsRequired)}/${this.minInputWordsRequired}`}get isDraftButtonDisabled(){return this.inputQueryWordCount<this.minInputWordsRequired||this.inputQuery===this.invalidInputQuery}get showErrorMessage(){return this.inputQuery===this.invalidInputQuery&&!!this.abusiveInputErrorMsg}constructor(){super(...arguments);(0,n.default)(this,"minInputWordsRequired",20);(0,n.default)(this,"trackingEvents",l.WRITING_ASSISTANT_TRACKING);(0,t.default)(this,"storeShim",M,this);(0,t.default)(this,"tracking",R,this);(0,t.default)(this,"watchmanTracking",N,this);(0,t.default)(this,"isAPIRequestInProgress",U,this);(0,t.default)(this,"shouldShowErrorView",L,this);(0,t.default)(this,"shouldShowQueryEditor",F,this);(0,t.default)(this,"inputQuery",z,this);(0,t.default)(this,"invalidInputQuery",j,this);(0,t.default)(this,"isInputFocused",V,this);(0,t.default)(this,"abusiveInputErrorMsg",B,this)
|
|
if(this.args.improveWithAiQuery){this.inputQuery=this.args.improveWithAiQuery
|
|
this.shouldShowQueryEditor=!1
|
|
this.onDraftPost()}}onDraftPost(){var e,t
|
|
this.watchmanTracking.startInteraction({groupName:"sharing",userJourney:"share-box-core",userInteraction:"sharing-writing-assistant"})
|
|
this.abusiveInputErrorMsg=void 0;(0,d.fireShareboxInteractionEvent)({shareSessionUrn:this.args.trackingUrn,actionType:s.SHAREBOX_INTERACTION_TYPES.CLICK_GENERATE_WA,tracking:this.tracking})
|
|
this.isAPIRequestInProgress=!0
|
|
null===(e=(t=this.args).inProgressHandler)||void 0===e||e.call(t,!0)
|
|
this.shouldShowErrorView=!1
|
|
const n={domainUrn:this.args.trackingUrn,input:{text:this.inputQuery}}
|
|
this.args.dashNonMemberActorUrn&&(n.nonMemberActorUrn=this.args.dashNonMemberActorUrn)
|
|
this.storeShim.queryURL("/voyager/api/voyagerContentcreationDashWritingAssistant",{method:"POST",params:n,queryParams:{action:"generateTextV2"},reload:!0}).then((e=>{if(!this.isDestroying&&this.isAPIRequestInProgress){var t,n
|
|
null===(t=(n=this.args).successHandler)||void 0===t||t.call(n,e.commentary.text,e.gaiContentUrn)
|
|
this.isAPIRequestInProgress=!1
|
|
this.watchmanTracking.endInteraction({groupName:"sharing",userJourney:"share-box-core",userInteraction:"sharing-writing-assistant"})}})).catch((e=>{if(this.isDestroying)throw e
|
|
if(this.isAPIRequestInProgress){var t,n,i,r
|
|
const d=e&&(null===(t=e.errors)||void 0===t||null===(n=t[0])||void 0===n?void 0:n.status),c=d&&parseInt(d,10),u=e&&(null===(i=e.errors)||void 0===i||null===(r=i[0])||void 0===r?void 0:r.message)
|
|
this.isAPIRequestInProgress=!1
|
|
if(422!==c){this.watchmanTracking.endInteractionWithError({groupName:"sharing",userJourney:"share-box-core",userInteraction:"sharing-writing-assistant"})
|
|
this.shouldShowErrorView=!0
|
|
throw e}var o,a,l,s
|
|
this.invalidInputQuery=this.inputQuery
|
|
this.abusiveInputErrorMsg=u
|
|
null===(o=(a=this.args).errorHandler)||void 0===o||o.call(a,this.invalidInputQuery,u)
|
|
null===(l=(s=this.args).inProgressHandler)||void 0===l||l.call(s,!1)
|
|
this.watchmanTracking.endInteraction({groupName:"sharing",userJourney:"share-box-core",userInteraction:"sharing-writing-assistant"})}}))}onTextChange(e){var t,n
|
|
let{target:{value:i}}=e
|
|
this.inputQuery=i
|
|
null===(t=(n=this.args).cacheAiInputQuery)||void 0===t||t.call(n,i)}onCancelAIDraft(){var e,t,n,i
|
|
this.isAPIRequestInProgress=!1
|
|
null===(e=(t=this.args).inProgressHandler)||void 0===e||e.call(t,!1)
|
|
this.shouldShowErrorView=!1
|
|
null===(n=(i=this.args).apiRequestCancelHandler)||void 0===n||n.call(i)}},M=(0,i.default)(x.prototype,"storeShim",[A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),R=(0,i.default)(x.prototype,"tracking",[I],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),N=(0,i.default)(x.prototype,"watchmanTracking",[P],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),U=(0,i.default)(x.prototype,"isAPIRequestInProgress",[c.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),L=(0,i.default)(x.prototype,"shouldShowErrorView",[c.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),F=(0,i.default)(x.prototype,"shouldShowQueryEditor",[c.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),z=(0,i.default)(x.prototype,"inputQuery",[c.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return this.args.initQuery||""}}),j=(0,i.default)(x.prototype,"invalidInputQuery",[c.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return this.args.initInvalidQuery||null}}),V=(0,i.default)(x.prototype,"isInputFocused",[c.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),B=(0,i.default)(x.prototype,"abusiveInputErrorMsg",[c.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return this.args.invalidAiInputErrorMessage}}),(0,i.default)(x.prototype,"onDraftPost",[u.action],Object.getOwnPropertyDescriptor(x.prototype,"onDraftPost"),x.prototype),(0,i.default)(x.prototype,"onTextChange",[u.action],Object.getOwnPropertyDescriptor(x.prototype,"onTextChange"),x.prototype),(0,i.default)(x.prototype,"onCancelAIDraft",[u.action],Object.getOwnPropertyDescriptor(x.prototype,"onCancelAIDraft"),x.prototype),x))}))
|
|
define("writing-assistant/template-registry",[],(function(){}))
|
|
define("writing-assistant/utils/writing-assistant-constants",["exports"],(function(e){"use strict"
|
|
Object.defineProperty(e,"__esModule",{value:!0})
|
|
e.WRITING_ASSISTANT_TRACKING=e.GEN_AI_CONTENT_SURVEY_CHOICES=e.GEN_AI_CONTENT_GENERAL_FEEDBACK_CHOICE=e.FEEDBACK_CARD_VIEW=void 0
|
|
e.WRITING_ASSISTANT_TRACKING=Object.freeze({PAGEVIEW_EVENTS:{ERROR_STATE:"flagship3_wa_error_state"},CONTROL_INTERACTION_EVENTS:{FEEDBACK_DISMISS_CONFIRMATION:"dismiss_wa_feedback_confirmation",FEEDBACK_DISMISS:"dismiss_wa_feedback",FEEDBACK_THUMBS_DOWN:"wa_feedback_negative",FEEDBACK_THUMBS_UP:"wa_feedback_positive",WA_CANCEL_DRAFT_LOADER:"wa_cancel_draft",WA_CANCEL_ERROR:"wa_cancel_error",WA_CLOSE_INPUT:"close_wa_input",WA_CREATE_DRAFT:"wa_create_draft",WA_TRY_AGAIN:"wa_try_again",WA_VIEW_INFO:"view_wa_info",WA_UNDO:"wa_undo"}}),e.FEEDBACK_CARD_VIEW=Object.freeze({CLOSED:"CLOSED",REQUEST:"REQUEST",UP_VOTE:"SATISFIED",DOWN_VOTE:"UNSATISFIED",FEEDBACK_SURVEY:"FEEDBACK_SURVEY",FEEDBACK_SURVEY_SUBMITTED:"FEEDBACK_SURVEY_SUBMITTED"}),e.GEN_AI_CONTENT_GENERAL_FEEDBACK_CHOICE=Object.freeze({SATISFIED:"SATISFIED",UNSATISFIED:"UNSATISFIED"}),e.GEN_AI_CONTENT_SURVEY_CHOICES=Object.freeze(["NOT_RELEVANT_TO_MY_ORIGINAL_IDEA","DOES_NOT_SOUND_LIKE_ME","NOT_ENGAGING_TO_READ","INCLUDES_INCORRECT_INFORMATION","OFFENSIVE_BIASED_OR_HARMFUL","OTHER"])}))
|
|
|
|
//# sourceMappingURL=engine-vendor.map |