1"use strict";(self.heliuxModules=self.heliuxModules||[]).push([[895],{60205(e,o,i){var t=i(23029),n=i(49530),s=i(50388),r=i(53954),d=i(85501),p=i(31526),a=i(7873),c=i(17249),l=i(50783),u=i(19806),h=i(47533);i(74423);const m=e=>(0,p.Ri)(e),f=(e,o,i={})=>{const t=window.location.hostname,n=["localhost",".adobeaemcloud.com"].some(e=>t.includes(e));document.cookie=n?(0,p.TV)(e,o,{p:i,domain:window.location.hostname}):(0,p.TV)(e,o,i),m(e)||console.error("Cookie not set for",e)};var g=i(37252);const v={componentId:"defaultAutoloadedPopup",timeDelay:0,upperLimit:0,expire:48,selectors:{content:".popup__content",modal:".popup__modal"},modifiers:{noScroll:"noScroll",hidden:"visibility--isHidden-important"},subscribes:{setUpperLimitToZero:"popup:upperlimit:setzero",revealPopup:"popup:reveal"},template:e=>`\n <div class="modal__base"\n data-components="Modal">\n <div class="modal__overlay"></div>\n <div class="modal__container" role="dialog"\n aria-labelledby="modal dialog"\n aria-modal="true">\n <div class="modal__content">${e}</div>\n </div>\n </div>\n `};function k(e,o,i){return o=(0,r.A)(o),(0,s.A)(e,y()?Reflect.construct(o,i||[],(0,r.A)(e).constructor):o.apply(e,i))}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(y=function(){return!!e})()}let b=!1,L=function(e){function o(){return(0,t.A)(this,o),k(this,o,arguments)}return(0,d.A)(o,e),(0,n.A)(o,[{key:"init",value:function(){b||(this.config={...v,...this.config},this.popupId=`popup-${this.config.componentId}`,this.popupExpDate=`popup-exp-${this.config.componentId}`,this.logger=new g.V(this.popupId),this.getElements(),this.setListeners(),"external"===this.config.limitVerification?this.initBasedOnEvent():"user_login"===this.config.limitVerification?this.initBasedOnUserLogin():this.shouldShowPopup()&&this.renderModal())}},{key:"initBasedOnEvent",value:function(){const{modifiers:e,subscribes:o}=this.config;this.renderModal({renderHidden:!0}),(0,p.B1)(o.revealPopup,({componentId:o})=>{o===this.config.componentId&&this.el.classList.remove(e.hidden)})}},{key:"initBasedOnUserLogin",value:function(){this.userStore=new c.L,this.userStoreData=this.userStore.getStore(),this.userStoreData.logged?this.renderPopupForLoggedInUser():(0,p.B1)(a.v.userLoggedIn,()=>{this.renderPopupForLoggedInUser()})}},{key:"renderPopupForLoggedInUser",value:function(){const{componentId:e}=this.config;this.userStoreData?.popupRendered?.[e]||this.renderModal()}},{key:"setListeners",value:function(){(0,p.B1)(this.config.subscribes.setUpperLimitToZero,this.clearCookieUpperLimit.bind(this))}},{key:"shouldShowPopup",value:function(){return this.getModalCookie()||this.setModalCookie(),Number(m(this.popupId))>0}},{key:"loadPopupContentJsLibraries",value:function(){[...this.modal.querySelectorAll("script")].forEach(e=>{const o=document.createElement("script");[...e.attributes].forEach(e=>o.setAttribute(e.name,e.value)),o.appendChild(document.createTextNode(e.innerHTML)),e.parentNode.replaceChild(o,e)})}},{key:"renderModal",value:function({renderHidden:e}={renderHidden:!1}){this.config.conditions?.length?(0,h.Kd)(o=>{if(b)return;const{conditionsFulfilled:i,matchedConditions:t}=(0,u.j)(this.config.conditions,o,"all");this.logger.info("\nConditions checked:",this.config.conditions,"\nConditions matched:",t),i&&this.showModal({renderHidden:e})}):this.showModal({renderHidden:e})}},{key:"showModal",value:function({renderHidden:e}={renderHidden:!1}){this.timeDelay=1e3*Number(this.config.timeDelay),setTimeout(()=>{(0,l.BU)(this.config.experienceFragment).then(({fragmentString:o})=>{const{componentId:i,modifiers:t}=this.config;this.modal.innerHTML=this.config.template(o),this.loadPopupContentJsLibraries(),e?this.el.classList.add(t.hidden):document.body.classList.add(this.config.modifiers.noScroll),this.userStore?.updateStoreData({popupRendered:{[i]:!0}})}).catch(e=>console.warn(e)).finally(()=>this.updateModalCookie())},this.timeDelay),b=!0}},{key:"getModalCookie",value:function(){return m(this.popupId)}},{key:"updateModalCookie",value:function(){const e=Number(m(this.popupId));if(e>0&&e<=Number(this.config.upperLimit)){const o=m(this.popupExpDate);f(this.popupId,e-1,{expires:o})}}},{key:"clearCookieUpperLimit",value:function({componentId:e}){if(e){if(e===this.config.componentId){const e=Number(m(this.popupId)),o=m(this.popupExpDate);e>0&&f(this.popupId,0,{expires:o})}(0,p.al)(this.config.subscribes.setUpperLimitToZero,this.clearCookieUpperLimit)}}},{key:"setModalCookie",value:function(){let e=new Date;const o=60*Number(this.config.expire)*60*1e3;e.setTime(e.getTime()+o),e=e.toUTCString(),m(this.popupExpDate)||f(this.popupExpDate,e,{expires:e}),f(this.popupId,this.config.upperLimit,{expires:e})}}])}(p.xu);(0,p.kz)({Popup:L},0)}},e=>{e.O(0,[750,4253,5117],()=>
1e(60205)),e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.