diff --git a/libs/deps/martech.main.standard.min.js b/libs/deps/martech.main.standard.min.js index 4f2bb6b192..3d7a9adf0e 100644 --- a/libs/deps/martech.main.standard.min.js +++ b/libs/deps/martech.main.standard.min.js @@ -1 +1 @@ -!function(){"use strict";var t=window,e=document,n=Object.defineProperty,a="replace",o=function(t){return t=t[a](/%2523access_token%253D.*?%2526/gim,"%2526")[a](/%23access_token%3D.*?%26/gim,"%26")[a](/#access_token=.*?&/gim,"&")[a](/information=[^\&]+/,"")[a](/puser=[^\&]+/,"")[a](/fnuser=[^\&]+/,"")[a](/lnuser=[^\&]+/,"")};function i(){try{var t="referrer",a=e[t],i=o(a);i!==a&&n(e,t,{configurable:!0,value:i})}catch(t){}}var r=e.head,l=t.marketingtech,c=decodeURIComponent;function d(t){var n,a,o,i;for(a=0,o=(n=e.cookie?e.cookie.split("; "):[]).length;a1?t-1:0),o=1;o>>1:t>>>1;e.push(t)}return function(n,t){n=unescape(encodeURIComponent(n)),t||(t=0),t^=-1;for(var r=0;r>>8^e[o]}return(t^=-1)>>>0}}(),T=function(){var e={};return e.promise=new Promise((function(n,t){e.resolve=n,e.reject=t})),e},P=function(e,n){return e===n},x=function(e,n,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:P;return e.filter((function(t,r){return x(e,t,n)===r}))},N=function(e,n){return e.substr(-n.length)===n},q=function(e,n){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:{},t=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]:document).createElement(e);return Object.keys(n).forEach((function(e){o.setAttribute(e,n[e])})),M(o,t),r.forEach((function(e){return _(o,e)})),o},j="BODY",U="IFRAME",H="IMG",F="DIV",B="STYLE",V="SCRIPT",z="HEAD",J=function(e){var n=e.src,t=e.currentDocument,r=void 0===t?document:t;return new Promise((function(e,t){L(H,{src:n},{onload:e,onerror:t,onabort:t},[],r)}))},Q=function(e){return"function"==typeof e},G=function(e){return Array.isArray(e)&&e.length>0},X=function(e){return Array.isArray(e)?e:null==e?[]:[].slice.call(e)},Y=/^\s*>/,W=function(e,n){if(!Y.test(n))return X(e.querySelectorAll(n));var t="alloy-"+Date.now();try{return e.classList.add(t),X(e.querySelectorAll("."+t+" "+n))}finally{e.classList.remove(t)}},$=function(e,n){return e.substr(0,n.length)===n},K=":shadow",Z=function(e){return e.split(K)},ee=function(e,n){var t=n;return $(t,">")?window.document.documentMode?t.substring(1).trim():(e instanceof Element||e instanceof HTMLDocument?":scope":":host")+" "+t:t},ne=function(e,n){if(!window.document.documentElement.attachShadow)return W(e,n.replace(K,""));var t=Z(n);if(t.length<2)return W(e,n);for(var r=e,o=0;o1&&void 0!==arguments[1]?arguments[1]:document;return te(e)?ne(n,e):W(n,e)},oe="MutationObserver",ie="requestAnimationFrame",ae={childList:!0,subtree:!0},ue="visibilityState",ce="visible",se=100,de=5e3,fe=function(e){return new Error("Could not find: "+e)},le=function(e){return new Promise(e)},pe=function(e){return Q(e[oe])},ge=function(e,n,t,r,o){return le((function(i,a){var u=new e[oe]((function(){var e=o(t);G(e)&&(u.disconnect(),i(e))}));setTimeout((function(){u.disconnect(),a(fe(t))}),r),u.observe(n,ae)}))},ve=function(e){return e[ue]===ce},me=function(e,n,t,r){return le((function(o,i){(function t(){var i=r(n);G(i)?o(i):e[ie](t)})(),setTimeout((function(){i(fe(n))}),t)}))},he=function(e,n,t){return le((function(r,o){(function n(){var o=t(e);G(o)?r(o):setTimeout(n,se)})(),setTimeout((function(){o(fe(e))}),n)}))},ye=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:re,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:de,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:document,i=n(e);return G(i)?Promise.resolve(i):pe(r)?ge(r,o,e,t,n):ve(o)?me(r,e,t,n):he(e,t,n)},be=function(e,n){return n.matches?n.matches(e):n.msMatchesSelector(e)},we=function(e){var n=e.parentNode;return n?n.removeChild(e):null},Ce={name:"Adobe Alloy"},Ee={style:{display:"none",width:0,height:0}},Ie=function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n.appendNode,r=void 0===t?_:t,o=n.awaitSelector,i=void 0===o?ye:o,a=n.createNode,u=void 0===a?L:a,c=n.fireImage,s=void 0===c?J:c,d=s,f=function(){return i(j).then((function(n){var t=Jd(n,1)[0];return e||(e=u(U,Ce,Ee),r(t,e))}))},l=function(e){var n=e.src;return f().then((function(e){var t=e.contentWindow.document;return s({src:n,currentDocument:t})}))};return function(e){var n=e.hideReferrer,t=e.url;return n?l({src:t}):d({src:t})}},Oe=function(e){return h(e)&&0===Object.keys(e).length},Se=function e(n,t){return m(n)||!h(n)?n:Object.keys(n).reduce((function(r,o){var i=n[o];if(h(i)){var a=e(i,t);return Oe(a)?r:Hd(Hd({},r),{},Bd({},o,a))}return t(i)?Hd(Hd({},r),{},Bd({},o,i)):r}),{})},Re=function(e,n){return Array.prototype.concat.apply([],e.map(n))},ke="com.adobe.alloy.",De=function(e,n){return e.slice(-n)},Te=ke+"getTld",Pe=function(e,n){for(var t="",r=e.location.hostname.toLowerCase().split("."),o=1;o0},Xe=function(e,n){var t=new Map;return function(){var r=n?n.apply(void 0,arguments):arguments.length<=0?void 0:arguments[0];if(t.has(r))return t.get(r);var o=e.apply(void 0,arguments);return t.set(r,o),o}},Ye=function(){},We=function(e,n,t){var r=String(e),o=String(t);if(r.length>=n||0===o.length)return r;for(var i=n-r.length;i>o.length;)o+=o;return o.slice(0,i)+r},$e=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e){for(var t={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:/?#]*)(?::(\d*))?))?((((?:[^?#/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@/]*@)([^:/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#/]*\.[^?#/.]+(?:[?#]|$)))*\/?)?([^?#/]*))(?:\?([^#]*))?(?:#(.*))?)/}},r=t.parser[n.strictMode?"strict":"loose"].exec(e),o={},i=14;i--;)o[t.key[i]]=r[i]||"";return o[t.q.name]={},o[t.key[12]].replace(t.q.parser,(function(e,n,r){n&&(o[t.q.name][n]=r)})),o}},Ke=function(e){var n={},t=e.split(".");switch(t.length){case 1:n.subdomain="",n.domain=e,n.topLevelDomain="";break;case 2:n.subdomain="",n.domain=e,n.topLevelDomain=t[1];break;case 3:n.subdomain="www"===t[0]?"":t[0],n.domain=e,n.topLevelDomain=t[2];break;case 4:n.subdomain="www"===t[0]?"":t[0],n.domain=e,n.topLevelDomain=t[2]+"."+t[3]}return n},Ze=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ke;Qe(e)||(e="");var t=$e(e)||{},r=t.host,o=void 0===r?"":r,i=t.path,a=void 0===i?"":i,u=t.query,c=void 0===u?"":u,s=t.anchor;return Hd({path:a,query:c,fragment:void 0===s?"":s},n(o))},en=function(e){if(m(e)||"object"!==Fd(e))return null;var n=Se(e,(function(e){return!m(e)&&(!!Be(e)||(!!Ve(e)||(!!Ge(e)||!!G(e))))}));return Oe(n)?null:n},nn=function(e,n,t,r){n=n||"&",t=t||"=";var o={};if("string"!=typeof e||0===e.length)return o;var i=/\+/g;e=e.split(n);var a=1e3;r&&"number"==typeof r.maxKeys&&(a=r.maxKeys);var u=e.length;a>0&&u>a&&(u=a);for(var c=0;c=0?(s=p.substr(0,g),d=p.substr(g+1)):(s=p,d=""),f=decodeURIComponent(s),l=decodeURIComponent(d),of(o,f)?Array.isArray(o[f])?o[f].push(l):o[f]=[o[f],l]:o[f]=l}return o},tn=function(e){switch(Fd(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}},rn=function(e,n,t,r){return n=n||"&",t=t||"=",null===e&&(e=void 0),"object"===Fd(e)?Object.keys(e).map((function(r){var o=encodeURIComponent(tn(r))+t;return Array.isArray(e[r])?e[r].map((function(e){return o+encodeURIComponent(tn(e))})).join(n):o+encodeURIComponent(tn(e[r]))})).join(n):r?encodeURIComponent(tn(r))+t+encodeURIComponent(tn(e)):""},on=rf((function(e,n){n.decode=n.parse=nn,n.encode=n.stringify=rn}));on.decode,on.parse,on.encode,on.stringify;for(var an={parse:function(e){return"string"==typeof e&&(e=e.trim().replace(/^[?#&]/,"")),on.parse(e)},stringify:function(e){return on.stringify(e)}},un=function(e){return e instanceof Error?e:new Error(e)},cn=function(e){var n=e.error,t=e.message;try{n.message=t}catch(e){}},sn=function(e){var n=e.error,t=e.message,r=un(n),o=t+"\nCaused by: "+r.message;return cn({error:r,message:o}),r},dn=function(e){return Qe(e)&&"true"===e.toLowerCase()},fn=function(e,n){if(Ve(e)||Qe(e)){var t=Math.round(Number(e));if(!isNaN(t))return t}return n},ln=function(e){var n=e.getFullYear(),t=We(e.getMonth()+1,2,"0"),r=We(e.getDate(),2,"0"),o=We(e.getHours(),2,"0"),i=We(e.getMinutes(),2,"0"),a=We(e.getSeconds(),2,"0"),u=We(e.getMilliseconds(),3,"0"),c=fn(e.getTimezoneOffset(),0);return n+"-"+t+"-"+r+"T"+o+":"+i+":"+a+"."+u+(c>0?"-":"+")+We(Math.floor(Math.abs(c)/60),2,"0")+":"+We(Math.abs(c)%60,2,"0")},pn=rf((function(e){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var t=new Uint8Array(16);e.exports=function(){return n(t),t}}else{var r=new Array(16);e.exports=function(){for(var e,n=0;n<16;n++)0==(3&n)&&(e=4294967296*Math.random()),r[n]=e>>>((3&n)<<3)&255;return r}}})),gn=[],vn=0;vn<256;++vn)gn[vn]=(vn+256).toString(16).substr(1);var mn=af,hn=uf,yn=function(e){return function(n,t){return null==n?n:e.call(this,n,t)}},bn=function(e,n){return function(t,r){return n.call(this,e.call(this,t,r),r)}},wn=function(e,n){return function(t,r){var o=this,i=[],a=[e,n].reduce((function(e,n){try{return n.call(o,e,r)}catch(n){return i.push(n),e}}),t);if(i.length)throw new Error(i.join("\n"));return a}},Cn=function(e,n,t){return v(bn(e,n),e,t)},En=function(e,n,t){return v(bn(e,yn(n)),e,t)},In=function(e,n,t){return v(wn(yn(n),e),e,t)},On=function(e,n,t,r){if(!e)throw new Error("'"+t+"': Expected "+r+", but got "+JSON.stringify(n)+".")},Sn=function(e,n){return On(Be(e),e,n,"true or false"),e},Rn=function(e,n){return On(Q(e),e,n,"a function"),e},kn=function(e){return function(n,t){var r=this;On(Array.isArray(n),n,t,"an array");var o=[],i=n.map((function(i,a){try{return e.call(r,i,t+"["+a+"]",n)}catch(e){return void o.push(e.message)}}));if(o.length)throw new Error(o.join("\n"));return i}},Dn=function(e){return function(n){return null==n?e:n}},Tn=function(e,n,t){return function(r,o){On(h(r),r,o,"an object");var i=r[e],a=r[t],u=zd(r,[e,t].map(tf)),c=n(i,o);if(void 0!==c){var s="The field '"+e+"' is deprecated. Use '"+t+"' instead.";if(o&&(s="'"+o+"': "+s),void 0!==a&&a!==c)throw new Error(s);this&&this.logger&&this.logger.warn(s)}return Hd(Bd({},t,a||c),u)}},Pn=function(e){return function(n,t){return On(n===e,n,t,""+e),n}},xn=function(e){return function(n,t){var r=this;On(h(n),n,t,"an object");var o=[],i={};if(Object.keys(n).forEach((function(a){var u=n[a],c=t?t+"."+a:a;try{var s=e.call(r,u,c);void 0!==s&&(i[a]=s)}catch(e){o.push(e.message)}})),o.length)throw new Error(o.join("\n"));return i}},An=function(e,n){return function(t,r){return On(t>=n,t,r,e+" greater than or equal to "+n),t}},Nn=function(e){return function(n,t){var r=[];if(Object.keys(n).forEach((function(n){if(!e[n]){var o=t?t+"."+n:n;r.push("'"+o+"': Unknown field.")}})),r.length)throw new Error(r.join("\n"));return n}},qn=function(e){return function(n,t){return h(n)?On(!Oe(n),n,t,e):On(n.length>0,n,t,e),n}},_n=function(e){return function(n,t){var r=this;On(h(n),n,t,"an object");var o=[],i={};if(Object.keys(e).forEach((function(a){var u=n[a],c=e[a],s=t?t+"."+a:a;try{var d=c.call(r,u,s);void 0!==d&&(i[a]=d)}catch(e){o.push(e.message)}})),Object.keys(n).forEach((function(e){Object.prototype.hasOwnProperty.call(i,e)||(i[e]=n[e])})),o.length)throw new Error(o.join("\n"));return i}},Mn=function(e,n){return function(t,r){var o,i=this,a=q(e,(function(e){try{return o=e.call(i,t,r),!0}catch(e){return!1}}));return On(a,t,r,n),o}},Ln=function(){var e=[];return function(n,t){return On(-1===e.indexOf(n),n,t,"a unique value across instances"),e.push(n),n}},jn=function(e){for(var n=Object.create(null),t=0;t1&&void 0!==arguments[1]?arguments[1]:{},r=Fe(Object.keys(e),Object.keys(t));if(r.length)throw new Error("[ComponentRegistry] Could not register "+n+" because it has existing command(s): "+r.join(","));Object.keys(t).forEach((function(r){var o=t[r];o.commandName=r,o.run=qt(o.run,"["+n+"] An error occurred while executing the "+r+" command."),e[r]=o}))},r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(t).forEach((function(r){n[r]=n[r]||[],n[r].push(qt(t[r],"["+e+"] An error occurred while executing the "+r+" lifecycle hook."))}))};return{register:function(e,n){var o=n.commands,i=n.lifecycle;t(e,o),r(e,i)},getCommand:function(n){return e[n]},getCommandNames:function(){return Object.keys(e)},getLifecycleCallbacks:function(e){return n[e]||[]}}},Mt=function(e){var n=e.logger,t=e.sendFetchRequest,r=e.sendBeaconRequest,o=e.isRequestRetryable,i=e.getRequestRetryDelay;return function(e){var a=e.requestId,u=e.url,c=e.payload,s=e.useSendBeacon,d=JSON.stringify(c),f=JSON.parse(d);n.logOnBeforeNetworkRequest({url:u,requestId:a,payload:f});var l=function e(){var c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return(s?r:t)(u,d).then((function(t){var r;if(o({response:t,retriesAttempted:c})){var s=i({response:t,retriesAttempted:c});return new Promise((function(n){setTimeout((function(){n(e(c+1))}),s)}))}try{r=JSON.parse(t.body)}catch(e){}return n.logOnNetworkResponse(Hd(Hd({requestId:a,url:u,payload:f},t),{},{parsedBody:r,retriesAttempted:c})),{statusCode:t.statusCode,body:t.body,parsedBody:r,getHeader:t.getHeader}}))};return l().catch((function(e){throw n.logOnNetworkError({requestId:a,url:u,payload:f,error:e}),sn({error:e,message:"Network request failed."})}))}},Lt=function(e){var n=e.logger;return function(e){if(e){var t=e.split(";");if(t.length>=2&&t[1].length>0)try{var r=parseInt(t[1],10);if(!isNaN(r))return{regionId:r}}catch(e){}n.warn('Invalid adobe edge: "'+e+'"')}return{}}},jt="in",Ut="out",Ht="pending",Ft="general",Bt="declinedConsent",Vt="default",zt="initial",Jt="new",Qt=function(e){var n=new Error(e);return n.code=Bt,n.message=e,n},Gt=function(e){var n=e.logger,t=[],r=function(){for(;t.length;)t.shift().resolve()},o=function(){for(;t.length;)t.shift().reject(Qt("The user declined consent."))},i=function(){return Promise.resolve()},a=function(){return Promise.resolve()},u=function(){return Promise.reject(Qt("No consent preferences have been set."))},c=function(){return Promise.reject(Qt("The user declined consent."))},s=function(e){if(e)return Promise.reject(new Error("Consent is pending."));var n=T();return t.push(n),n.promise};return{in:function(e){e===Vt?this.awaitConsent=i:(e===zt?n.info("Loaded user consent preferences. The user previously consented."):e===Jt&&this.awaitConsent!==a&&n.info("User consented."),r(),this.awaitConsent=a)},out:function(e){e===Vt?(n.warn("User consent preferences not found. Default consent of out will be used."),this.awaitConsent=u):(e===zt?n.warn("Loaded user consent preferences. The user previously declined consent."):e===Jt&&this.awaitConsent!==c&&n.warn("User declined consent."),o(),this.awaitConsent=c)},pending:function(e){e===Vt&&n.info("User consent preferences not found. Default consent of pending will be used. Some commands may be delayed."),this.awaitConsent=s},awaitConsent:function(){return Promise.reject(new Error("Consent has not been initialized."))},withConsent:function(){return this.awaitConsent(!0)}}},Xt=function(e){var n=e.generalConsentState,t=e.logger,r=function(e,r){switch(e[Ft]){case jt:n.in(r);break;case Ut:n.out(r);break;case Ht:n.pending(r);break;default:t.warn("Unknown consent value: "+e[Ft])}};return{initializeConsent:function(e,n){n[Ft]?r(n,zt):r(e,Vt)},setConsent:function(e){r(e,Jt)},suspend:function(){n.pending()},awaitConsent:function(){return n.awaitConsent()},withConsent:function(){return n.withConsent()}}},Yt=function(e){return e&&e._experience&&e._experience.decisioning&&G(e._experience.decisioning.propositions)?e._experience.decisioning.propositions:[]},Wt=function(){var e,n,t={},r=!1,o=!1,i=!0,a=function(e){if(o)throw new Error(e+" cannot be called after event is finalized.")},u={hasQuery:function(){return Object.prototype.hasOwnProperty.call(this.getContent(),"query")},getContent:function(){var r=JSON.parse(JSON.stringify(t));return e&&I(r,{xdm:e}),n&&I(r,{data:n}),r},setUserXdm:function(n){a("setUserXdm"),e=n},setUserData:function(e){a("setUserData"),n=e},mergeXdm:function(e){a("mergeXdm"),e&&I(t,{xdm:e})},mergeData:function(e){a("mergeData"),e&&I(t,{data:e})},mergeMeta:function(e){a("mergeMeta"),e&&I(t,{meta:e})},mergeQuery:function(e){a("mergeQuery"),e&&I(t,{query:e})},documentMayUnload:function(){r=!0},finalize:function(r){if(!o){var a=A([].concat(Qd(Yt(e)),Qd(Yt(t.xdm))),(function(e,n){return e===n||e.id&&n.id&&e.id===n.id&&e.scope&&n.scope&&e.scope===n.scope}));if(e&&this.mergeXdm(e),a.length>0&&(t.xdm._experience.decisioning.propositions=a),n&&u.mergeData(n),o=!0,r){i=!1;var c={xdm:t.xdm||{},data:t.data||{}},s=r(c);i=!1!==s,t.xdm=c.xdm||{},t.data=c.data||{},Oe(t.xdm)&&delete t.xdm,Oe(t.data)&&delete t.data}}},getDocumentMayUnload:function(){return r},isEmpty:function(){return Oe(t)&&(!e||Oe(e))&&(!n||Oe(n))},shouldSend:function(){return i},getViewName:function(){if(e&&e.web&&e.web.webPageDetails)return e.web.webPageDetails.viewName},toJSON:function(){if(!o)throw new Error("toJSON called before finalize");return t}};return u},$t="Retry-After",Kt="x-adobe-edge",Zt=function(e){var n=e.extractEdgeInfo;return function(e){var t=e.content,r=void 0===t?{}:t,o=e.getHeader,i=r.handle,a=void 0===i?[]:i,u=r.errors,c=void 0===u?[]:u,s=r.warnings,d=void 0===s?[]:s;return{getPayloadsByType:function(e){return Re(a.filter((function(n){return n.type===e})),(function(e){return e.payload}))},getErrors:function(){return c},getWarnings:function(){return d},getEdge:function(){return n(o(Kt))},toJSON:function(){return r}}}},er="configure",nr="setDebug",tr=function(e){var n,t=e.logger,r=e.configureCommand,o=e.setDebugCommand,i=e.handleError,a=e.validateCommandOptions,u=function(e,i){var u;if(e===er){if(n)throw new Error("The library has already been configured and may only be configured once.");u=function(){return(n=r(i)).then((function(){}))}}else{if(!n)throw new Error("The library must be configured first. Please do so by executing the configure command.");u=e===nr?function(){return o(i)}:function(){return n.then((function(n){var t=n.getCommand(e);if(!t||!Q(t.run)){var r=[er,nr].concat(n.getCommandNames()).join(", ");throw new Error("The "+e+" command does not exist. List of available commands: "+r+".")}var o=a({command:t,options:i});return t.run(o)}),(function(){return t.warn("An error during configuration is preventing the "+e+" command from executing."),new Promise((function(){}))}))}}return u};return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(r){var o=u(e,n);t.logOnBeforeCommand({commandName:e,options:n}),r(o())})).catch((function(n){return i(n,e+" command")})).catch((function(r){throw t.logOnCommandRejected({commandName:e,options:n,error:r}),r})).then((function(r){var o=h(r)?r:{};return t.logOnCommandResolved({commandName:e,options:n,result:o}),o}))}},rr="https://adobe.ly/3sHgQHb",or=function(e){var n=e.command,t=e.options,r=n.commandName,o=n.documentationUri,i=void 0===o?rr:o,a=n.optionsValidator,u=t;if(a)try{u=a(t)}catch(e){throw new Error("Invalid "+r+" command options:\n\t - "+e+" For command documentation see: "+i)}return u},ir=function(e){var n=e.options;return Et({type:It(),xdm:Et({eventType:It(),identityMap:St}),data:Et({}),documentUnloading:yt(),renderDecisions:yt(),decisionScopes:ht(It()).uniqueItems(),personalization:Et({decisionScopes:ht(It()).uniqueItems(),surfaces:ht(It()).uniqueItems(),sendDisplayEvent:yt().default(!0),includeRenderedPropositions:yt().default(!1),defaultPersonalizationEnabled:yt(),decisionContext:Et({})}).default({sendDisplayEvent:!0}),datasetId:It(),mergeId:It(),edgeConfigOverrides:Rt,initializePersonalization:yt()}).required().noUnknownFields()(n)},ar=function(e){var n=e.options;return Et({renderDecisions:yt(),responseHeaders:Ct(It().required()),responseBody:Et({handle:ht(Et({type:It().required(),payload:mt().required()})).required()}).required(),personalization:Et({sendDisplayEvent:yt().default(!0),decisionContext:Et({})}).default({sendDisplayEvent:!0})}).noUnknownFields()(n)},ur=["xdm","data","documentUnloading","type","mergeId","datasetId","edgeConfigOverrides"],cr=function(e){var n=e.eventManager,t=e.logger;return{commands:{sendEvent:{documentationUri:"https://adobe.ly/3GQ3Q7t",optionsValidator:function(e){return ir({options:e})},run:function(e){var r=e.xdm,o=e.data,i=e.documentUnloading,a=e.type,u=e.mergeId,c=e.datasetId,s=e.edgeConfigOverrides,d=zd(e,ur),f=n.createEvent();return i&&f.documentMayUnload(),f.setUserXdm(r),f.setUserData(o),a&&f.mergeXdm({eventType:a}),u&&f.mergeXdm({eventMergeId:u}),s&&(d.edgeConfigOverrides=s),c&&(t.warn("The 'datasetId' option has been deprecated. Please use 'edgeConfigOverrides.com_adobe_experience_platform.datasets.event.datasetId' instead."),d.edgeConfigOverrides=s||{},I(d.edgeConfigOverrides,{com_adobe_experience_platform:{datasets:{event:{datasetId:c}}}})),n.sendEvent(f,d)}},applyResponse:{documentationUri:"",optionsValidator:function(e){return ar({options:e})},run:function(e){var t=e.renderDecisions,r=void 0!==t&&t,o=e.decisionContext,i=void 0===o?{}:o,a=e.responseHeaders,u=void 0===a?{}:a,c=e.responseBody,s=void 0===c?{handle:[]}:c,d=e.personalization,f=n.createEvent();return n.applyResponse(f,{renderDecisions:r,decisionContext:i,responseHeaders:u,responseBody:s,personalization:d})}}}}};cr.namespace="DataCollector";var sr=function(e){var n=e.eventManager,t=e.lifecycle,r=e.handleError;return function(e){var o=e.target,i=n.createEvent();return i.documentMayUnload(),t.onClick({event:i,clickedElement:o}).then((function(){return i.isEmpty()?Promise.resolve():n.sendEvent(i)})).then(Ye).catch((function(e){r(e,"click collection")}))}},dr=function(e){var n=e.eventManager,t=e.lifecycle,r=e.handleError,o=sr({eventManager:n,lifecycle:t,handleError:r});document.addEventListener("click",o,!0)},fr=It().regexp().default("\\.(exe|zip|wav|mp3|mov|mpg|avi|wmv|pdf|doc|docx|xls|xlsx|ppt|pptx)$"),lr=Et({clickCollectionEnabled:yt().default(!0),onBeforeLinkClickSend:bt(),downloadLinkQualifier:fr}),pr=function(e){var n=e.getLinkDetails,t=e.config,r=e.logger;return t.clickCollectionEnabled?function(e){var o=e.targetElement,i=e.event,a=n({targetElement:o,config:t,logger:r});a&&(i.mergeXdm(a.xdm),i.setUserData(a.data))}:function(){}},gr=function(e){var n=e.window,t=e.getLinkName,r=e.getLinkRegion,o=e.getAbsoluteUrlFromAnchorElement,i=e.findSupportedAnchorElement,a=e.determineLinkType;return function(e){var u=e.targetElement,c=e.config,s=e.logger,d=i(u);if(d){var f=o(n,d);if(f){var l=a(n,c,f,d),p=r(d),g=t(d),v=c.onBeforeLinkClickSend,m={xdm:{eventType:"web.webinteraction.linkClicks",web:{webInteraction:{name:g,region:p,type:l,URL:f,linkClicks:{value:1}}}},data:{},clickedElement:u};if(!v)return m;if(!1!==v(m))return m;s.info("This link click event is not triggered because it was canceled in onBeforeLinkClickSend.")}else s.info("This link click event is not triggered because the HTML element doesn't have an URL.")}else s.info("This link click event is not triggered because the HTML element is not an anchor.")}},vr=function(e){return e&&/^[a-z0-9]+:\/\//i.test(e)},mr=function(e){return!(!e.href||"A"!==e.tagName&&"AREA"!==e.tagName||e.onclick&&e.protocol&&!(e.protocol.toLowerCase().indexOf("javascript")<0))},hr=function(e){var n=e.indexOf("?"),t=e.indexOf("#");return n>=0&&(n=0?e.substring(0,t):e},yr=function(e,n,t){var r=new RegExp(e),o=hr(n).toLowerCase();return!!t.download||r.test(o)},br=function(e,n){var t=e.location.hostname.toLowerCase();return!(hr(n).toLowerCase().indexOf(t)>=0)},wr=function(e){return e&&e.replace(/\s+/g," ").trim()},Cr=/^(SCRIPT|STYLE|LINK|CANVAS|NOSCRIPT|#COMMENT)$/i,Er=function(e){return!(e&&e.nodeName&&e.nodeName.match(Cr))},Ir=function e(n){var t=[],r=!1;Er(n)?(t.push(n),n.childNodes&&Array.prototype.slice.call(n.childNodes).forEach((function(n){var o=e(n);t=t.concat(o.supportedNodes),r=r||o.includesUnsupportedNodes}))):r=!0;return{supportedNodes:t,includesUnsupportedNodes:r}},Or=function(e,n,t){var r;return t&&t!==e.nodeName.toUpperCase()||(r=e.getAttribute(n)),r},Sr=function(e){var n={texts:[]};return e.supportedNodes.forEach((function(e){e.getAttribute&&(n.alt||(n.alt=wr(e.getAttribute("alt"))),n.title||(n.title=wr(e.getAttribute("title"))),n.inputValue||(n.inputValue=wr(Or(e,"value","INPUT"))),n.imgSrc||(n.imgSrc=wr(Or(e,"src","IMG")))),e.nodeValue&&n.texts.push(e.nodeValue)})),n},Rr=/^(HEADER|MAIN|FOOTER|NAV)$/i,kr=function(e){var n;return"region"===e.role&&Ge(e["aria-label"])&&(n=e["aria-label"]),n},Dr=function(e){var n;return e&&e.nodeName&&e.nodeName.match(Rr)&&(n=e.nodeName),n},Tr=gr({window:window,getLinkName:function(e){var n=wr(e.innerText||e.textContent),t=Ir(e);if(!n||t.includesUnsupportedNodes){var r=Sr(t);(n=wr(r.texts.join("")))||(n=r.alt||r.title||r.inputValue||r.imgSrc)}return n||""},getLinkRegion:function(e){for(var n,t=e.parentNode;t;){if(n=wr(t.id||kr(t)||Dr(t)))return n;t=t.parentNode}return"BODY"},getAbsoluteUrlFromAnchorElement:function(e,n){var t=e.location,r=n.href?n.href:"",o=n.protocol,i=n.host;if(!vr(r)){o||(o=t.protocol?t.protocol:""),o=o?o+"//":"",i||(i=t.host?t.host:"");var a="";if("/"!==r.substring(0,1)){var u=t.pathname.lastIndexOf("/");u=u<0?0:u,a=t.pathname.substring(0,u)}r=""+o+i+a+"/"+r}return r},findSupportedAnchorElement:function(e){for(var n=e;n;){if(mr(n))return n;n=n.parentNode}return null},determineLinkType:function(e,n,t,r){var o="other";return yr(n.downloadLinkQualifier,t,r)?o="download":br(e,t)&&(o="exit"),o}}),Pr=function(e){var n=e.config,t=e.eventManager,r=e.handleError,o=e.logger,i=pr({getLinkDetails:Tr,config:n,logger:o});return{lifecycle:{onComponentsRegistered:function(e){var n=e.lifecycle;dr({eventManager:t,lifecycle:n,handleError:r})},onClick:function(e){var n=e.event,t=e.clickedElement;i({targetElement:t,event:n})}}}};Pr.namespace="ActivityCollector",Pr.configValidators=lr,Pr.buildOnInstanceConfiguredExtraParams=function(e){var n=e.config,t=e.logger;return{getLinkDetails:function(e){return Tr({targetElement:e,config:n,logger:t})}}};var xr=function(e,n){return"ID sync "+(n?"succeeded":"failed")+": "+e.spec.url},Ar=function(e){var n=e.fireReferrerHideableImage,t=e.logger;return function(e){var r=e.filter((function(e){return"url"===e.type}));return r.length?Promise.all(r.map((function(e){return n(e.spec).then((function(){t.info(xr(e,!0))})).catch((function(){t.error(xr(e,!1))}))}))).then(Ye):Promise.resolve()}},Nr=Et({thirdPartyCookiesEnabled:yt().default(!0),idMigrationEnabled:yt().default(!0)}),qr=Et({namespaces:ht(wt("ECID")).nonEmpty().uniqueItems().default(["ECID"]),edgeConfigOverrides:Rt}).noUnknownFields().default({namespaces:["ECID"]}),_r=Et({url:It().required().nonEmpty(),edgeConfigOverrides:Rt}).required().noUnknownFields(),Mr=function(e){var n,t=e.addEcidQueryToPayload,r=e.addQueryStringIdentityToPayload,o=e.ensureSingleIdentity,i=e.setLegacyEcid,a=e.handleResponseForIdSyncs,u=e.getEcidFromResponse,c=e.getIdentity,s=e.consent,d=e.appendIdentityToUrl,f=e.logger,l={};return{lifecycle:{onBeforeRequest:function(e){var n=e.request,i=e.onResponse,a=e.onRequestFailure;return t(n.getPayload()),r(n.getPayload()),o({request:n,onResponse:i,onRequestFailure:a})},onResponse:function(e){var t=e.response;return n||(n=u(t))&&i(n),l=v(l,t.getEdge()),a(t)}},commands:{getIdentity:{optionsValidator:qr,run:function(e){return s.awaitConsent().then((function(){return n?void 0:c(e)})).then((function(){return{identity:{ECID:n},edge:l}}))}},appendIdentityToUrl:{optionsValidator:_r,run:function(e){return s.withConsent().then((function(){return n?void 0:c(e)})).then((function(){return{url:d(n,e.url)}})).catch((function(n){return f.warn("Unable to append identity to url. "+n.message),e}))}}}}},Lr=function(e){var n=e.config,t=e.getEcidFromVisitor,r=e.apexDomain,o=e.isPageSsl,i=e.cookieJar,a=n.idMigrationEnabled,u="AMCV_"+n.orgId,c=function(){var e=null,n="s_ecid",t=i.get(n)||i.get(u);if(t){var r=/(^|\|)MCMID\|(\d+)($|\|)/,o=t.match(r);o&&(e=o[2])}return e};return{getEcid:function(){if(a){var e=c();return e?Promise.resolve(e):t()}return Promise.resolve()},setEcid:function(e){if(a&&c()!==e){var n=o?{sameSite:"none",secure:!0}:{};i.set(u,"MCMID|"+e,Hd({domain:r,expires:390},n))}}}},jr=function(e){var n=e.logger;return new Promise((function(e,t){if(h(window.adobe)&&h(window.adobe.optIn)){var r=window.adobe.optIn;n.info("Delaying request while waiting for legacy opt-in to let Visitor retrieve ECID from server."),r.fetchPermissions((function(){r.isApproved([r.Categories.ECID])?(n.info("Received legacy opt-in approval to let Visitor retrieve ECID from server."),e()):t(new Error("Legacy opt-in was declined."))}),!0)}else e()}))},Ur=function(e){var n=e.Visitor;return Q(n)&&Q(n.getInstance)&&n},Hr=function(e){var n=e.logger,t=e.orgId,r=e.awaitVisitorOptIn;return function(){var e=Ur(window);return e?r({logger:n}).then((function(){return n.info("Delaying request while using Visitor to retrieve ECID from server."),new Promise((function(r){e.getInstance(t,{}).getMarketingCloudVisitorID((function(e){n.info("Resuming previously delayed request that was waiting for ECID from Visitor."),r(e)}),!0)}))})).catch((function(e){e?n.info(e.message+", retrieving ECID from experience edge"):n.info("An error occurred while obtaining the ECID from Visitor.")})):Promise.resolve()}},Fr=function(e){var n=e.processIdSyncs;return function(e){return n(e.getPayloadsByType("identity:exchange"))}},Br=function(e){var n,t=e.doesIdentityCookieExist,r=e.setDomainForInitialIdentityPayload,o=e.addLegacyEcidToPayload,i=e.awaitIdentityCookie,a=e.logger,u=function(e){return r(e),o(e.getPayload())};return function(e){var r=e.request,o=e.onResponse,c=e.onRequestFailure;if(t())return r.setIsIdentityEstablished(),Promise.resolve();if(n){a.info("Delaying request while retrieving ECID from server.");var s=n;return n=s.catch((function(){return i({onResponse:o,onRequestFailure:c})})),s.then((function(){a.info("Resuming previously delayed request."),r.setIsIdentityEstablished()})).catch((function(){return u(r)}))}return(n=i({onResponse:o,onRequestFailure:c})).catch((function(){})),u(r)}},Vr="ECID",zr=function(e){e.mergeQuery({identity:{fetch:[Vr]}})},Jr=function(e){return function(n){for(var t=Object.keys(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{},i=e.namespaces,a=e.edgeConfigOverrides,u=co({payload:t(i),globalConfigOverrides:o,localConfigOverrides:a}),c=r(u);return n({request:c})}},mo=function(e){var n=e.payload,t=e.datastreamIdOverride;return to({payload:n,datastreamIdOverride:t,getAction:function(){return"identity/acquire"},getUseSendBeacon:function(){return!1}})},ho=function(e){var n={query:{identity:{fetch:e}}};return oo({content:n,addIdentity:no(n),hasIdentity:io(n)})},yo=/^([^?#]*)(\??[^#]*)(#?.*)$/,bo=function(e){return""===e?"?":"?"===e?"":"&"},wo=function(e){var n=e.dateProvider,t=e.orgId;return function(e,r){var o=Math.round(n().getTime()/1e3),i=encodeURIComponent("TS="+o+"|MCMID="+e+"|MCORGID="+encodeURIComponent(t)),a=Jd(r.match(yo),4),u=a[1],c=a[2],s=a[3];return""+u+c+bo(c)+"adobe_mc="+i+s}},Co=function(e){var n=e.config,t=e.logger,r=e.consent,o=e.fireReferrerHideableImage,i=e.sendEdgeNetworkRequest,a=e.apexDomain,u=n.orgId,c=n.thirdPartyCookiesEnabled,s=n.edgeConfigOverrides,f=Hr({logger:t,orgId:u,awaitVisitorOptIn:jr}),l=R({logger:t,cookieJar:C}),p=Lr({config:n,getEcidFromVisitor:f,apexDomain:a,cookieJar:l,isPageSsl:"https:"===window.location.protocol}),g=je({orgId:u}),v=vo({sendEdgeNetworkRequest:i,createIdentityRequestPayload:ho,createIdentityRequest:mo,globalConfigOverrides:s}),m=Gr({thirdPartyCookiesEnabled:c,areThirdPartyCookiesSupportedByDefault:d}),h=Xr({getLegacyEcid:p.getEcid,addEcidToPayload:Kr}),y=$r({locationSearch:window.document.location.search,dateProvider:function(){return new Date},orgId:u,logger:t}),b=Zr({doesIdentityCookieExist:g,orgId:u,logger:t}),w=Br({doesIdentityCookieExist:g,setDomainForInitialIdentityPayload:m,addLegacyEcidToPayload:h,awaitIdentityCookie:b,logger:t}),E=Ar({fireReferrerHideableImage:o,logger:t}),I=Fr({processIdSyncs:E}),O=wo({dateProvider:function(){return new Date},orgId:u,globalConfigOverrides:s});return Mr({addEcidQueryToPayload:zr,addQueryStringIdentityToPayload:y,ensureSingleIdentity:w,setLegacyEcid:p.setEcid,handleResponseForIdSyncs:I,getEcidFromResponse:eo,getIdentity:v,consent:r,appendIdentityToUrl:O,logger:t,config:n})};Co.namespace="Identity",Co.configValidators=Nr;var Eo=function(e,n){return"URL destination "+(n?"succeeded":"failed")+": "+e.spec.url},Io=function(e){var n=e.fireReferrerHideableImage,t=e.logger,r=e.cookieJar,o=e.isPageSsl?{sameSite:"none",secure:!0}:{},i=function(e){e.filter((function(e){return"cookie"===e.type})).forEach((function(e){var n=e.spec,t=n.name,i=n.value,a=n.domain,u=n.ttlDays;r.set(t,i||"",Hd({domain:a||"",expires:u||10},o))}))},a=function(e){var r=e.filter((function(e){return"url"===e.type}));return Promise.all(r.map((function(e){return n(e.spec).then((function(){t.info(Eo(e,!0))})).catch((function(){}))}))).then(Ye)};return function(e){return i(e),a(e)}},Oo=function(e){var n=e.processDestinations,t=function(e){var t=e.response.getPayloadsByType("activation:push");return n(t)},r=function(e){return{destinations:e.response.getPayloadsByType("activation:pull")}};return function(e){var n=e.response;return t({response:n}).then((function(){return r({response:n})}))}},So=function(e){var n=e.logger,t=e.fireReferrerHideableImage,r=C.withConverter({write:function(e){return encodeURIComponent(e)}}),o=R({logger:n,cookieJar:r}),i=Io({fireReferrerHideableImage:t,logger:n,cookieJar:o,isPageSsl:"https:"===window.location.protocol});return{lifecycle:{onResponse:Oo({processDestinations:i})},commands:{}}};So.namespace="Audiences";var Ro,ko,Do="web",To="webapp",Po="://",xo="#",Ao=/^(\w+):\/\/([^/#]+)(\/[^#]*)?(#.*)?$/,No=/^(?:.*@)?(?:[a-z\d\u00a1-\uffff.-]+|\[[a-f\d:]+])(?::\d+)?$/,qo=/^\/(?:[/\w\u00a1-\uffff-.~]|%[a-fA-F\d]{2})*$/,_o=/^#(?:[/\w\u00a1-\uffff-.~]|%[a-fA-F\d]{2})+$/,Mo=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",n=e.length;n>0&&-1!=="/".indexOf(e.charAt(n-1));)n-=1;return e.substring(0,n)||"/"},Lo=function(e){return Ge(e)?e.toLowerCase():""},jo=function(e){return Ge(e)?e.toLowerCase():""},Uo=function(e){return Ge(e)?Mo(e):"/"},Ho=function(e){var n=e.match(Ao);return n?{surfaceType:Lo(n[1]),authority:jo(n[2]),path:Uo(n[3]),fragment:n[4]}:null},Fo=function(e){return""+e.surfaceType+Po+e.authority+(e.path||"")+(e.fragment||"")},Bo=function(e){var n=e(),t=n.host.toLowerCase(),r=n.pathname;return Do+Po+t+Mo(r)},Vo=function(e,n){return $(e,xo)?Bo(n)+e:e},zo=function(e,n,t){var r=function(e){return t.warn(e),null};if(!Ge(e))return r("Invalid surface: "+e);var o=Vo(e,n),i=Ho(o);return null===i?r("Invalid surface: "+e):c([Do,To],i.surfaceType)?i.authority&&No.test(i.authority)?i.path&&!qo.test(i.path)?r("Invalid path "+i.path+" in surface: "+e):i.fragment&&!_o.test(i.fragment)?r("Invalid fragment "+i.fragment+" in surface: "+e):i:r("Invalid authority "+i.authority+" in surface: "+e):r("Unsupported surface type "+i.surfaceType+" in surface: "+e)},Jo=function(e){return!!e&&0===e.indexOf(Do+Po)&&-1===e.indexOf(xo)},Qo=function(){var e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((function(t){return zo(t,e,n)})).filter((function(e){return!m(e)})).map(Fo)},Go="__view__",Xo="https://ns.adobe.com/personalization/default-content-item",Yo="https://ns.adobe.com/personalization/dom-action",Wo="https://ns.adobe.com/personalization/html-content-item",$o="https://ns.adobe.com/personalization/json-content-item",Ko="https://ns.adobe.com/personalization/ruleset-item",Zo="https://ns.adobe.com/personalization/redirect-item",ei="https://ns.adobe.com/personalization/message/in-app",ni="https://ns.adobe.com/personalization/message/feed-item",ti=function(e){c(e,Go)||e.push(Go)},ri=function(e,n){var t=Bo(n);c(e,t)||e.push(t)},oi=function(e){return e.filter((function(n,t){return e.indexOf(n)===t}))},ii=function(e){var n=e.getPageLocation,t=e.renderDecisions,r=e.decisionScopes,o=e.personalization,i=e.event,a=e.isCacheInitialized,u=e.logger,s=i.getViewName();return{isRenderDecisions:function(){return t},isSendDisplayEvent:function(){return!!o.sendDisplayEvent},shouldIncludeRenderedPropositions:function(){return!!o.includeRenderedPropositions},getViewName:function(){return s},hasScopes:function(){return r.length>0||G(o.decisionScopes)},hasSurfaces:function(){return G(o.surfaces)},hasViewName:function(){return Ge(s)},createQueryDetails:function(){var e=Qd(r);G(o.decisionScopes)&&e.push.apply(e,Qd(o.decisionScopes));var t=Qo(o.surfaces,n,u);this.shouldRequestDefaultPersonalization()&&(ti(e),ri(t,n));var i=[Xo,Wo,$o,Zo,Ko,ei,ni];return c(e,Go)&&i.push(Yo),{schemas:i,decisionScopes:oi(e),surfaces:oi(t)}},isCacheInitialized:function(){return a},shouldFetchData:function(){return this.hasScopes()||this.hasSurfaces()||this.shouldRequestDefaultPersonalization()},shouldUseCachedData:function(){return this.hasViewName()&&!this.shouldFetchData()},shouldRequestDefaultPersonalization:function(){return o.defaultPersonalizationEnabled||!this.isCacheInitialized()&&!1!==o.defaultPersonalizationEnabled}}},ai="Rendering is disabled for authoring mode.",ui="decisioning.propositionDisplay",ci="decisioning.propositionInteract",si="decisioning.propositionTrigger",di="decisioning.propositionDismiss",fi=1,li={DISPLAY:"display",INTERACT:"interact",TRIGGER:"trigger",DISMISS:"dismiss"},pi=(Bd(Ro={},ui,li.DISPLAY),Bd(Ro,ci,li.INTERACT),Bd(Ro,si,li.TRIGGER),Bd(Ro,di,li.DISMISS),Ro);Bd(ko={},li.DISPLAY,ui),Bd(ko,li.INTERACT,ci),Bd(ko,li.TRIGGER,si),Bd(ko,li.DISMISS,di);var gi,vi=function(e){return pi[e]},mi={propositions:[]},hi=function(e){var n=e.logger,t=e.options,r=Et({propositions:ht(Et(mt())),metadata:Et(mt()),viewName:It()}).required();try{return r(t)}catch(e){return n.warn("Invalid options for applyPropositions. No propositions will be applied.",e),mi}},yi=function(e){var n=e.getPageLocation,t=e.logger,r=e.fetchDataHandler,o=e.viewChangeHandler,i=e.onClickHandler,a=e.isAuthoringModeEnabled,u=e.mergeQuery,c=e.viewCache,s=e.showContainers,d=e.applyPropositions,f=e.setTargetMigration,l=e.mergeDecisionsMeta,p=e.renderedPropositions;return{lifecycle:{onDecision:e.onDecisionHandler,onBeforeRequest:function(e){var n=e.request;return f(n),Promise.resolve()},onBeforeEvent:function(e){var i=e.event,d=e.renderDecisions,f=e.decisionScopes,g=void 0===f?[]:f,v=e.personalization,m=void 0===v?{}:v,h=e.onResponse,y=void 0===h?Ye:h,b=e.onRequestFailure,w=void 0===b?Ye:b;if(y((function(){return{propositions:[]}})),w((function(){return s()})),a())return t.warn(ai),u(i,{enabled:!1}),Promise.resolve();var C=ii({getPageLocation:n,renderDecisions:d,decisionScopes:g,personalization:m,event:i,isCacheInitialized:c.isInitialized(),logger:t}),E=[];if(C.shouldIncludeRenderedPropositions()&&E.push(p.clear()),C.shouldFetchData()){var I=c.createCacheUpdate(C.getViewName());w((function(){return I.cancel()})),r({cacheUpdate:I,personalizationDetails:C,event:i,onResponse:y})}else C.shouldUseCachedData()&&E.push(o({personalizationDetails:C,event:i,onResponse:y,onRequestFailure:w}));return Promise.all(E).then((function(e){var n=Re(e,(function(e){return e}));G(n)&&l(i,n,[li.DISPLAY])}))},onClick:function(e){var n=e.event,t=e.clickedElement;i({event:n,clickedElement:t})}},commands:{applyPropositions:{optionsValidator:function(e){return hi({logger:t,options:e})},run:d}}}},bi=function(e){return L(F,{},{innerHTML:e})},wi=rf((function(e,n){var t,r;t=b,r=function(e){if(e.CSS&&e.CSS.escape)return e.CSS.escape;var n=function(e){if(0==arguments.length)throw new TypeError("`CSS.escape` requires an argument.");for(var n,t=String(e),r=t.length,o=-1,i="",a=t.charCodeAt(0);++o=1&&n<=31||127==n||0==o&&n>=48&&n<=57||1==o&&n>=48&&n<=57&&45==a?"\\"+n.toString(16)+" ":0==o&&1==r&&45==n||!(n>=128||45==n||95==n||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122)?"\\"+t.charAt(o):t.charAt(o):i+="�";return i};return e.CSS||(e.CSS={}),e.CSS.escape=n,n},e.exports=r(t)})),Ci=":eq(",Ei=/:eq\((\d+)\)/g,Ii=function(e){return-1===e.indexOf(Ci)},Oi=function(e){return e.split(Ei).filter(Ge)},Si=/(#|\.)(-?\w+)/g,Ri=function(e,n,t){return""+n+wi(t)},ki=function(e){return e.replace(Si,Ri)},Di=function(e){for(var n=[],t=ki(e.trim()),r=Oi(t),o=r.length,i=0;if-1)break;if(a1&&void 0!==arguments[1]?arguments[1]:document).getElementById(e)},xi=function(e,n,t){e.setAttribute(n,t)},Ai=function(e,n){return e.getAttribute(n)},Ni=function(e,n){e.removeAttribute(n)},qi=function(e,n,t,r){var o;o=r?n+":"+t+" !"+r+";":n+":"+t+";",e.style.cssText+=";"+o},_i=function(e){return e.parentNode},Mi=function(e){return e.nextElementSibling},Li=function(e,n){if(e){var t=_i(e);t&&t.insertBefore(n,Mi(e))}},ji=function(e,n){if(e){var t=_i(e);t&&t.insertBefore(n,e)}},Ui=function(e){var n=e.children;return n?X(n):[]},Hi=function(e){var n=e.childNodes;return n?X(n):[]},Fi=function(e){return e.firstElementChild},Bi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;if(void 0===gi){var n=e.querySelector("[nonce]");gi=n&&(n.nonce||n.getAttribute("nonce"))}return gi},Vi="alloy-prehiding",zi="{ visibility: hidden }",Ji={},Qi=function(e){if(!Ji[e]){var n=Bi(),t=Hd({},n&&{nonce:n}),r=L(B,t,{textContent:e+" "+zi});_(document.head,r),Ji[e]=r}},Gi=function(e){var n=Ji[e];n&&(we(n),delete Ji[e])},Xi=function(e){if(e&&!Pi(Vi)){var n=Bi(),t=Hd({id:Vi},n&&{nonce:n}),r=L(B,t,{textContent:e});_(document.head,r)}},Yi=function(){var e=Pi(Vi);e&&we(e)},Wi=function(e,n){e.textContent=n},$i="src",Ki=function(e){return e.tagName===H},Zi=function(e){return L(H,{src:e})},ea=function(e){re(H,e).forEach((function(e){var n=Ai(e,$i);n&&Zi(n)}))},na=function(e,n){return e.tagName===n},ta=function(e){return na(e,B)&&!Ai(e,$i)},ra=function(e){var n=re(B,e),t=n.length,r=Bi();if(r)for(var o=0;o=0;){var u=r[a],c=Fi(e);c?ji(c,u):_(e,u),a-=1}return pa(e,o),ga(i)},ba=function(e,n){var t=bi(n);ra(t);var r=Hi(t),o=fa(t),i=la(t);return ea(t),r.forEach((function(n){ji(e,n)})),pa(e,o),ga(i)},wa=function(e,n){ba(e,n),we(e)},Ca=function(e,n){var t=bi(n);ra(t);var r=Hi(t),o=fa(t),i=la(t);return ea(t),r.forEach((function(n){Li(e,n)})),pa(e,o),ga(i)},Ea=["priority"],Ia=function(e,n){var t=n.priority,r=zd(n,Ea);Object.keys(r).forEach((function(n){qi(e,n,r[n],t)}))},Oa=function(e,n){Object.keys(n).forEach((function(t){xi(e,t,n[t])}))},Sa=function(e,n){Ki(e)&&(Zi(n),Ni(e,$i),xi(e,$i,n))},Ra=function(e,n){var t=n.from,r=n.to,o=Ui(e),i=o[t],a=o[r];i&&a&&(t0&&void 0!==arguments[0]?arguments[0]:document).location.href.indexOf("adobe_authoring_enabled")},Va=function(e,n,t,r){if(0!==n.length){var o={};t.forEach((function(e){o[e]=fi}));var i={_experience:{decisioning:{propositions:n,propositionEventType:o}}};r&&(i._experience.decisioning.propositionAction=r),e.mergeXdm(i)}},za=function(e,n){e.mergeQuery({personalization:Hd({},n)})},Ja=function(e){var n=e.mergeDecisionsMeta,t=e.collectClicks,r=e.getClickSelectors,o=e.getClickMetasBySelector;return function(e){var i=e.event,a=e.clickedElement,u=r();if(G(u)){var c=t(a,u,o),s=c.decisionsMeta,d=c.eventLabel,f=c.viewName;if(G(s)){var l={eventType:ci};f&&(l.web={webPageDetails:{viewName:f}}),i.mergeXdm(l),n(i,s,[li.INTERACT],d?{label:d}:void 0)}}}},Qa=function(e){var n=e.createProposition,t=!1,r=Promise.resolve({}),o=function(e,t){var r=e[t.toLowerCase()];return r&&r.length>0?r:[n({scope:t,scopeDetails:{characteristics:{scopeType:qa}},items:[{schema:Xo}]},!1)]};return{createCacheUpdate:function(e){var n=T();return t=!0,r=r.then((function(e){return n.promise.then((function(n){return v({},e,n)})).catch((function(){return e}))})),{update:function(t){var r=t.filter((function(e){return e.getScope()})),i=qe(r,(function(e){return e.getScope().toLowerCase()}));return n.resolve(i),e?o(i,e):[]},cancel:function(){n.reject()}}},getView:function(e){return r.then((function(n){return o(n,e)}))},isInitialized:function(){return t}}},Ga=function(e){var n=e.processPropositions,t=e.viewCache;return function(e){var r,o,i=e.personalizationDetails,a=e.onResponse,u=i.getViewName();return a((function(){return{propositions:r,decisions:o}})),t.getView(u).then((function(e){var t;if(i.isRenderDecisions()){var a=n(e);return t=a.render,r=a.returnedPropositions,o=a.returnedDecisions,t()}var u=n([],e);return r=u.returnedPropositions,o=u.returnedDecisions,[]}))}},Xa=function(e){return Object.keys(e).map((function(n){return Hd({id:n},e[n])}))},Ya=function(){var e={};return{storeClickMetrics:function(n){var t=n.selector,r=n.meta,o=r.id,i=r.scope,a=r.scopeDetails,u=r.trackingLabel,c=r.scopeType;e[t]||(e[t]={}),e[t][o]={scope:i,scopeDetails:a,trackingLabel:u,scopeType:c}},getClickSelectors:function(){return Object.keys(e)},getClickMetasBySelector:function(n){return e[n]?Xa(e[n]):{}}}},Wa=[Yo,Wo,ei],$a=function(e){var n=e.processPropositions,t=e.createProposition,r=e.renderedPropositions,o=e.viewCache,i=function(e){return Wa.indexOf(e.schema)>-1},a=function(e){var n=e.items,t=e.metadataForScope;return n.filter(i).map((function(e){return e.schema!==Wo?Hd({},e):h(t)?Hd(Hd({},e),{},{data:Hd(Hd({},e.data),{},{selector:t.selector,type:t.actionType})}):void 0})).filter((function(e){return e}))},u=function(e){return!(e.scope===Go&&e.renderAttempted)},c=function(e){var n=e.propositions,t=e.metadata;return n.filter(u).map((function(e){return G(e.items)?{id:e.id,scope:e.scope,scopeDetails:e.scopeDetails,items:a({items:e.items,metadataForScope:t[e.scope]})}:e})).filter((function(e){return G(e.items)}))};return function(e){var i=e.propositions,a=void 0===i?[]:i,u=e.metadata,s=void 0===u?{}:u,d=e.viewName,f=T();r.concat(f.promise);var l=c({propositions:a,metadata:s}).map((function(e){return t(e)}));return Promise.resolve().then((function(){return d?o.getView(d):[]})).then((function(e){var t=n([].concat(Qd(l),Qd(e))),r=t.render,o=t.returnedPropositions;return r().then(f.resolve),{propositions:o}}))}},Ka=function(e){var n=e.window;return function(){return n.location}},Za=function(e){return e.targetMigrationEnabled?function(e){e.getPayload().mergeMeta({target:{migration:!0}})}:Ye},eu="customCode",nu="BODY > *:eq(0)",tu=function(e){var n=e.selector;return e.type!==eu||n!==nu?e:v({},e,{selector:"BODY"})},ru=function(e){return!Qe(e)||!e.trim()},ou="appendHtml",iu="SCRIPT,LINK,STYLE",au=function(e){var n=bi(e);return re(iu,n).map((function(e){return e.outerHTML})).join("")},uu=function(e){var n=v({},e),t=n.content,r=n.selector;if(ru(t))return n;if(null==r)return n;var o=Ti(r);return ca(o[0],z)?(n.type=ou,n.content=au(t),n):n},cu=function(e){return function(n){return n?e.reduce((function(e,n){return v(e,n(e))}),n):n}},su=function(e){var n=e.preprocess,t=e.isPageWideSurface,r=function(e,t){var r=e.schema,o=e.data,i=e.characteristics,a=(i=void 0===i?{}:i).trackingLabel,u=n(o);return{getSchema:function(){return r},getData:function(){return u},getProposition:function(){return t},getTrackingLabel:function(){return a},getOriginalItem:function(){return e},toString:function(){return JSON.stringify(e)},toJSON:function(){return e}}};return function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=e.id,i=e.scope,a=e.scopeDetails,u=e.items,c=void 0===u?[]:u,s=(a||{}).characteristics,d=(s=void 0===s?{}:s).scopeType;return{getScope:function(){return i||i},getScopeType:function(){return i===Go||t(i)?_a:d===qa?qa:Ma},getItems:function(){var e=this;return c.map((function(n){return r(n,e)}))},getNotification:function(){return{id:o,scope:i,scopeDetails:a}},toJSON:function(){return e},addToReturnValues:function(t,r,o,i){n&&(t.push(Hd(Hd({},e),{},{items:o.map((function(e){return e.getOriginalItem()})),renderAttempted:i})),i||r.push(Hd(Hd({},e),{},{items:o.map((function(e){return e.getOriginalItem()}))})))}}}},du=function(){var e=Promise.resolve([]);return{concat:function(n){e=e.then((function(e){return n.then((function(n){return e.concat(n)})).catch((function(){return e}))}))},clear:function(){var n=e;return e=Promise.resolve([]),n}}},fu=function(){return{setRenderAttempted:!0,includeInNotification:!0}},lu=function(e){var n=e.modules,t=e.logger,r=e.storeClickMetrics;return function(e){var o=e.getData()||{},i=o.type,a=o.selector;return i?"click"===i?a?(r({selector:a,meta:Hd(Hd({},e.getProposition().getNotification()),{},{trackingLabel:e.getTrackingLabel(),scopeType:e.getProposition().getScopeType()})}),{setRenderAttempted:!0,includeInNotification:!1}):(t.warn("Invalid DOM action data: missing selector.",e.getData()),{setRenderAttempted:!1,includeInNotification:!1}):n[i]?{render:function(){return n[i](e.getData())},setRenderAttempted:!0,includeInNotification:!0}:(t.warn("Invalid DOM action data: unknown type.",e.getData()),{setRenderAttempted:!1,includeInNotification:!1}):(t.warn("Invalid DOM action data: missing type.",e.getData()),{setRenderAttempted:!1,includeInNotification:!1})}},pu=function(e){var n=e.modules,t=e.logger;return function(e){var r=e.getData()||{},o=r.type;return r.selector&&o?n[o]?{render:function(){n[o](e.getData())},setRenderAttempted:!0,includeInNotification:!0}:(t.warn("Invalid HTML content data",e.getData()),{setRenderAttempted:!1,includeInNotification:!1}):{setRenderAttempted:!1,includeInNotification:!1}}},gu=function(e){var n=e.logger,t=e.executeRedirect,r=e.collect;return function(e){var o=(e.getData()||{}).content;return o?{render:function(){return r({decisionsMeta:[e.getProposition().getNotification()],documentMayUnload:!0}).then((function(){return t(o)}))},setRenderAttempted:!0,onlyRenderThis:!0}:(n.warn("Invalid Redirect data",e.getData()),{})}},vu=function(e){var n=e.schemaProcessors,t=e.logger,r=function(e,n){return function(){return Promise.resolve().then(e).then((function(){return t.enabled&&t.info("Action "+n.toString()+" executed."),!0})).catch((function(e){if(t.enabled){var r=e.message,o=e.stack,i="Failed to execute action "+n.toString()+". "+r+" "+o;t.warn(i)}return!1}))}},o=function(e,n){return Promise.all(e.map((function(e){return e()}))).then((function(e){if(e.includes(!0))return n}))},i=function(e){var t=n[e.getSchema()];return t?t(e):{}},a=function(e){for(var n,t,a,u,c=e.renderers,s=e.returnedPropositions,d=e.returnedDecisions,f=e.items,l=e.proposition,p=Qd(c),g=Qd(s),v=Qd(d),m=[],h=[],y=[],b=!1,w=!1,C=0;f.length>C;){u=f[C];var E=i(u);if(n=E.render,t=E.setRenderAttempted,a=E.includeInNotification,w=E.onlyRenderThis){g=[],v=[],t?(m=[u],h=[]):(m=[],h=[u]),p=[],y=[n],b=a;break}n&&y.push(r(n,u)),a&&(b=!0),t?m.push(u):h.push(u),C+=1}if(y.length>0){var I=b?l.getNotification():void 0;p.push((function(){return o(y,I)}))}else b&&p.push((function(){return l.getNotification()}));return m.length>0&&l.addToReturnValues(g,v,m,!0),h.length>0&&l.addToReturnValues(g,v,h,!1),{renderers:p,returnedPropositions:g,returnedDecisions:v,onlyRenderThis:w}};return function(e){for(var n,t,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=[],u=[],c=[],s=0;e.length>s;){r=(t=e[s]).getItems();var d=a({renderers:i,returnedPropositions:u,returnedDecisions:c,items:r,proposition:t});if(i=d.renderers,u=d.returnedPropositions,c=d.returnedDecisions,n=d.onlyRenderThis)break;s+=1}return n&&e.forEach((function(e,n){n!==s&&e.addToReturnValues(u,c,e.getItems(),!1)})),o.forEach((function(e){e.addToReturnValues(u,c,e.getItems(),!1)})),{returnedPropositions:u,returnedDecisions:c,render:function(){return Promise.all(i.map((function(e){return e()}))).then((function(e){return e.filter((function(e){return e}))}))}}}},mu=function(e){var n=e.processPropositions,t=e.createProposition,r=e.notificationHandler;return function(e){var o=e.renderDecisions,i=e.propositions,a=e.event,u=e.personalization,c=void 0===u?{}:u;if(!o)return Promise.resolve();var s=c.sendDisplayEvent,d=void 0===s||s,f=a?a.getViewName():void 0,l=i.map((function(e){return t(e,!0)})),p=n(l),g=p.render,v=p.returnedPropositions,m=r(o,d,f);return g().then(m),Promise.resolve({propositions:v})}},hu="text/html",yu="application/json",bu="defaultContent",wu=["content","contentType"],Cu=["mobileParameters","webParameters","html"],Eu=function(e,n){for(var t=0;t0&&we(n[0])},Su=function(e){var n={};if(!e||"a"!==e.tagName.toLowerCase())return n;var t=e.href;if(!t||!$(t,"adbinapp://"))return n;var r,o,i=t.split("?"),a=i[0].split("://")[1],u=e.innerText,c=e.getAttribute("data-uuid")||"";if(G(i)){var s=an.parse(i[1]);r=s.interaction||"",o=decodeURIComponent(s.link||"")}return{action:a,interaction:r,link:o,label:u,uuid:c}},Ru=function(e){return function(n){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?e.location.href=n:e.location.replace(n),new Promise((function(){}))}},ku="alloy-messaging-container",Du="alloy-overlay-container",Tu="alloy-content-iframe",Pu=function(){return[ku,Du].forEach(Ou)},xu=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ru(window);return function(t){t.preventDefault(),t.stopImmediatePropagation();var r=t.target,o="a"===r.tagName.toLowerCase()?r:r.closest("a");if(o){var i=Su(o),a=i.action,u=i.interaction,c=i.link,s=i.label,d=i.uuid;e(a,{label:s,id:u,uuid:d,link:c}),"dismiss"===a&&Pu(),Ge(c)&&c.length>0&&n(c,!0)}}},Au=function(e,n){var t=(new DOMParser).parseFromString(e,hu),r=t.querySelector("script");r&&r.setAttribute("nonce",Bi());var o=L("iframe",{src:URL.createObjectURL(new Blob([t.documentElement.outerHTML],{type:"text/html"})),id:Tu});return o.addEventListener("load",(function(){(0,(o.contentDocument||o.contentWindow.document).addEventListener)("click",n)})),o},Nu=function(e,n,t,r){[{id:Du,element:r},{id:ku,element:t},{id:Tu,element:e}].forEach((function(e){var t=e.id,r=e.element,o=n[t],i=o.style,a=void 0===i?{}:i,u=o.params,c=void 0===u?{}:u;v(r.style,a);var s=c.parentElement,d=void 0===s?"body":s,f=c.insertionMethod,l=void 0===f?"appendChild":f,p=c.enabled,g=void 0===p||p,m=document.querySelector(d);g&&m&&"function"==typeof m[l]&&m[l](r)}))},qu=function(e){var n=e.verticalAlign,t=e.width,r=e.horizontalAlign,o=e.backdropColor,i=e.height,a=e.cornerRadius,u=e.horizontalInset,c=e.verticalInset,s=e.uiTakeover,d={width:t?t+"%":"100%",backgroundColor:o||"rgba(0, 0, 0, 0.5)",borderRadius:a?a+"px":"0px",border:"none",position:void 0!==s&&s?"fixed":"relative",overflow:"hidden"};return"left"===r?d.left=u?u+"%":"0":"right"===r?d.right=u?u+"%":"0":"center"===r&&(d.left="50%",d.transform="translateX(-50%)"),"top"===n?d.top=c?c+"%":"0":"bottom"===n?(d.position="fixed",d.bottom=c?c+"%":"0"):"center"===n&&(d.top="50%",d.transform=("center"===r?d.transform+" ":"")+"translateY(-50%)",d.display="flex",d.alignItems="center",d.justifyContent="center"),d.height=i?i+"vh":"100%",d},_u=function(e){return{position:"fixed",top:"0",left:"0",width:"100%",height:"100%",background:"transparent",opacity:e.backdropOpacity||.5,backgroundColor:e.backdropColor||"#FFFFFF"}},Mu=["enabled","parentElement","insertionMethod"],Lu=function(e){if(!e)return!1;var n=Object.keys(e);if(!c(n,ku))return!1;if(!c(n,Du))return!1;for(var t=kt(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;Pu();var t=e.content,r=e.contentType,o=e.mobileParameters,i=e.webParameters;if(r===hu){var a=L("div",{id:ku}),u=Au(t,xu(n)),c=L("div",{id:Du});Lu(i)||(i=ju(o)),i&&Nu(u,i,a,c)}},Hu=function(e,n){return new Promise((function(t){var r=e.meta;Uu(e,(function(e,t){var o={};o[li.INTERACT]=fi,-1!==Object.values(li).indexOf(e)&&(o[e]=fi),n({decisionsMeta:[r],propositionAction:t,eventType:ci,propositionEventTypes:Object.keys(o)})})),t({meta:r})}))},Fu=function(e){return{defaultContent:function(n){return Hu(n,e)}}},Bu=function(e,n){return function(t,r,o){if(!t)return function(){};if(!r){var i=T();return n.concat(i.promise),i.resolve}return function(n){n.length>0&&e({decisionsMeta:n,viewName:o})}}},Vu=function(e){var n,t=e.config,r=e.logger,o=e.eventManager,i=t.targetMigrationEnabled,a=t.prehidingStyle,u=Pa({eventManager:o,mergeDecisionsMeta:Va}),c=Ya(),s=c.getClickMetasBySelector,d=c.getClickSelectors,f=c.storeClickMetrics,l=Ka({window:window}),p=Ta(),g=cu([uu,tu]),v=su({preprocess:g,isPageWideSurface:Jo}),m=Qa({createProposition:v}),h=Ru(window),y=(Bd(n={},Xo,fu),Bd(n,Yo,lu({modules:p,logger:r,storeClickMetrics:f})),Bd(n,Wo,pu({modules:p,logger:r})),Bd(n,Zo,gu({logger:r,executeRedirect:h,collect:u})),Bd(n,ei,Iu({modules:Fu(u),logger:r})),n),b=vu({schemaProcessors:y,logger:r}),w=du(),C=Bu(u,w),E=Aa({prehidingStyle:a,showContainers:Yi,hideContainers:Xi,mergeQuery:za,processPropositions:b,createProposition:v,notificationHandler:C}),I=Ja({mergeDecisionsMeta:Va,collectClicks:Fa,getClickSelectors:d,getClickMetasBySelector:s}),O=Ga({processPropositions:b,viewCache:m}),S=$a({processPropositions:b,createProposition:v,renderedPropositions:w,viewCache:m}),R=Za({targetMigrationEnabled:i}),k=mu({processPropositions:b,createProposition:v,notificationHandler:C});return yi({getPageLocation:l,logger:r,fetchDataHandler:E,viewChangeHandler:O,onClickHandler:I,isAuthoringModeEnabled:Ba,mergeQuery:za,viewCache:m,showContainers:Yi,applyPropositions:S,setTargetMigration:R,mergeDecisionsMeta:Va,renderedPropositions:w,onDecisionHandler:k})};Vu.namespace="Personalization",Vu.configValidators=Et({prehidingStyle:It().nonEmpty(),targetMigrationEnabled:yt().default(!1)});var zu=function(e){return function(n){var t={webPageDetails:{URL:e.location.href||e.location},webReferrer:{URL:e.document.referrer}};I(n,{web:t})}},Ju=function(e){var n=e.screen.orientation;if(null==n||null==n.type)return null;var t=n.type.split("-");return 0===t.length||"portrait"!==t[0]&&"landscape"!==t[0]?null:t[0]},Qu=function(e){if(Q(e.matchMedia)){if(e.matchMedia("(orientation: portrait)").matches)return"portrait";if(e.matchMedia("(orientation: landscape)").matches)return"landscape"}return null},Gu=function(e){return function(n){var t=e.screen,r=t.width,o=t.height,i={},a=fn(o);a>=0&&(i.screenHeight=a);var u=fn(r);u>=0&&(i.screenWidth=u);var c=Ju(e)||Qu(e);c&&(i.screenOrientation=c),Object.keys(i).length>0&&I(n,{device:i})}},Xu=function(e){return function(n){var t=e.document.documentElement,r=(t=void 0===t?{}:t).clientWidth,o=t.clientHeight,i={type:"browser"},a=fn(r);a>=0&&(i.browserDetails={viewportWidth:a});var u=fn(o);u>=0&&(i.browserDetails=i.browserDetails||{},i.browserDetails.viewportHeight=u),I(n,{environment:i})}},Yu=function(e){return function(n){var t=e(),r={},o=fn(t.getTimezoneOffset());void 0!==o&&(r.localTimezoneOffset=o),(void 0===o||Math.abs(o)<6e3)&&(r.localTime=ln(t)),I(n,{placeContext:r})}},Wu=function(e){return function(n){var t=e().toISOString();I(n,{timestamp:t})}},$u="https://ns.adobe.com/experience/alloy",Ku="2.19.2",Zu=function(e){I(e,{implementationDetails:{name:$u,version:Ku,environment:"browser"}})},ec=function(e,n,t,r){var o=e.context,i=Re(o,(function(e,r){return t[e]?[t[e]]:(n.warn("Invalid context["+r+"]: '"+e+"' is not available."),[])})).concat(r);return{namespace:"Context",lifecycle:{onBeforeEvent:function(e){var t=e.event,r={};return Promise.all(i.map((function(e){return Promise.resolve(e(r,n))}))).then((function(){return t.mergeXdm(r)}))}}}},nc=[["architecture","string"],["bitness","string"],["model","string"],["platformVersion","string"],["wow64","boolean"]],tc=function(e){return void 0!==e.userAgentData},rc=function(e){return tc(e)?function(n,t){try{return e.userAgentData.getHighEntropyValues(nc.map((function(e){return e[0]}))).then((function(e){var t={};nc.forEach((function(n){var r=Jd(n,2),o=r[0],i=r[1];Object.prototype.hasOwnProperty.call(e,o)&&Fd(e[o])===i&&(t[o]=e[o])})),I(n,{environment:{browserDetails:{userAgentClientHints:t}}})}))}catch(e){return t.warn("Unable to collect user-agent client hints. "+e.message),Ye}}:Ye},oc=zu(window),ic=Gu(window),ac=Xu(window),uc=Yu((function(){return new Date})),cc=Wu((function(){return new Date})),sc={web:oc,device:ic,environment:ac,placeContext:uc},dc={highEntropyUserAgentHints:rc(navigator)},fc=Hd(Hd({},sc),dc),lc=[cc,Zu],pc=function(e){var n=e.config,t=e.logger;return ec(n,t,fc,lc)};pc.namespace="Context",pc.configValidators=Et({context:ht(It()).default(Object.keys(sc))});var gc=function(e){var n=e.storedConsent,t=e.taskQueue,r=e.defaultConsent,o=e.consent,i=e.sendSetConsentRequest,a=e.validateSetConsentOptions,u=e.consentHashStore,c=e.doesIdentityCookieExist,s=Bd({},Ft,r),d=n.read(),f=c(),l=void 0!==d[Ft];f&&l||u.clear(),f||(n.clear(),d={}),o.initializeConsent(s,d);var p=function(){if(0===t.length){var e=n.read();void 0!==e[Ft]&&o.setConsent(e)}};return{commands:{setConsent:{optionsValidator:a,run:function(e){var n=e.consent,r=e.identityMap,a=e.edgeConfigOverrides;o.suspend();var c=u.lookup(n);return t.addTask((function(){return c.isNew()?i({consentOptions:n,identityMap:r,edgeConfigOverrides:a}):Promise.resolve()})).then((function(){return c.save()})).finally(p)}}},lifecycle:{onResponse:p,onRequestFailure:p}}},vc=function e(n){return Array.isArray(n)?n.map((function(n){return e(n)})):"object"===Fd(n)&&null!==n?Object.keys(n).sort().reduce((function(t,r){return t[r]=e(n[r]),t}),{}):n},mc=function(e){return D(JSON.stringify(vc(e)))},hc=["standard","version"],yc=function(e){return e.standard+"."+e.version},bc=function(e){var n=e.storage;return{clear:function(){n.clear()},lookup:function(e){var t={},r=function(e){var n=yc(e);e.standard,e.version;var r=zd(e,hc);return t[n]||(t[n]=mc(r).toString()),t[n]};return{isNew:function(){return e.some((function(e){var t=yc(e),o=n.getItem(t);return null===o||o!==r(e)}))},save:function(){e.forEach((function(e){var t=yc(e);n.setItem(t,r(e))}))}}}}},wc=function(){var e={},n=oo({content:e,addIdentity:function(n,t){e.identityMap=e.identityMap||{},e.identityMap[n]=e.identityMap[n]||[],e.identityMap[n].push(t)},hasIdentity:function(n){return void 0!==(e.identityMap&&e.identityMap[n])}});return n.setConsent=function(n){e.consent=n},n},Cc=function(e){var n=e.payload,t=e.datastreamIdOverride;return to({payload:n,datastreamIdOverride:t,getAction:function(){return"privacy/set-consent"},getUseSendBeacon:function(){return!1}})},Ec=function(e){var n=e.parseConsentCookie,t=e.orgId,r=e.cookieJar,o=Ne(t,Me);return{read:function(){var e=r.get(o);return e?n(e):{}},clear:function(){r.remove(o)}}},Ic=function(e){var n=e.createConsentRequestPayload,t=e.createConsentRequest,r=e.sendEdgeNetworkRequest,o=e.edgeConfigOverrides;return function(e){var i=e.consentOptions,a=e.identityMap,u=e.edgeConfigOverrides,c=co({payload:n(),globalConfigOverrides:o,localConfigOverrides:u});c.payload.setConsent(i),h(a)&&Object.keys(a).forEach((function(e){a[e].forEach((function(n){c.payload.addIdentity(e,n)}))}));var s=t(c);return r({request:s}).then((function(){}))}},Oc=function(e){return e.split(";").reduce((function(e,n){var t=Jd(n.split("="),2),r=t[0],o=t[1];return e[r]=o,e}),{})},Sc=Et({consent:ht(mt()).required().nonEmpty(),identityMap:St,edgeConfigOverrides:Rt}).noUnknownFields().required(),Rc=function(e){var n=e.config,t=e.consent,r=e.sendEdgeNetworkRequest,o=e.createNamespacedStorage,i=n.orgId,a=n.defaultConsent,u=Ec({parseConsentCookie:Oc,orgId:i,cookieJar:C}),c=k(),s=Ic({createConsentRequestPayload:wc,createConsentRequest:Cc,sendEdgeNetworkRequest:r,edgeConfigOverrides:n.edgeConfigOverrides}),d=o(Ae(i)+".consentHashes."),f=bc({storage:d.persistent}),l=je({orgId:i});return gc({storedConsent:u,taskQueue:c,defaultConsent:a,consent:t,sendSetConsentRequest:s,validateSetConsentOptions:Sc,consentHashStore:f,doesIdentityCookieExist:l})};Rc.namespace="Privacy";var kc=function(){return{eventMergeId:hn()}},Dc=function(e){return{commands:{createEventMergeId:{run:e.createEventMergeId}}}},Tc=function(){return Dc({createEventMergeId:kc})};Tc.namespace="EventMerge";var Pc=function(e){var n=e.config,t=e.componentRegistry,r=[].concat(Qd(t.getCommandNames()),[er,nr]).sort(),o=Hd({},n);return Object.keys(n).forEach((function(e){var t=n[e];"function"==typeof t&&(o[e]=t.toString())})),{version:Ku,configs:o,commands:r}},xc=function(e){var n=e.config,t=e.componentRegistry,r=Pc({config:n,componentRegistry:t});return{commands:{getLibraryInfo:{run:function(){return{libraryInfo:r}}}}}};xc.namespace="LibraryInfo";var Ac,Nc,qc="personalization:decisions",_c=function(e){return null!==e&&"object"===Fd(e)&&Object.getPrototypeOf(e)===Object.prototype},Mc=function e(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return Object.keys(n).forEach((function(o){_c(n[o])||Array.isArray(n[o])?e(n[o],t,[].concat(Qd(r),[o])):t[[].concat(Qd(r),[o]).join(".")]=n[o]})),t},Lc=function(e){return _c(e)?Mc(e):e},jc=function(e){var n=e.renderDecisions,t=e.decisionProvider,r=e.applyResponse,o=e.event,i=e.personalization,a=e.decisionContext,u=Hd(Hd({},Lc(o.getContent())),a);return function(e){var a=e.response;if(t.addPayloads(a.getPayloadsByType(qc)),!o.hasQuery())return{propositions:[]};var c=t.evaluate(u);return r({renderDecisions:n,propositions:c,event:o,personalization:i})}},Uc={MATCHER:"matcher",GROUP:"group",HISTORICAL:"historical"},Hc={EQUALS:"eq",NOT_EQUALS:"ne",EXISTS:"ex",NOT_EXISTS:"nx",GREATER_THAN:"gt",GREATER_THAN_OR_EQUAL_TO:"ge",LESS_THAN:"lt",LESS_THAN_OR_EQUAL_TO:"le",CONTAINS:"co",NOT_CONTAINS:"nc",STARTS_WITH:"sw",ENDS_WITH:"ew"},Fc={AND:"and",OR:"or"},Bc={ANY:"any",ORDERED:"ordered"},Vc=(Bd(Ac={},Hc.EQUALS,wf()),Bd(Ac,Hc.NOT_EQUALS,Cf()),Bd(Ac,Hc.EXISTS,Ef()),Bd(Ac,Hc.NOT_EXISTS,If()),Bd(Ac,Hc.GREATER_THAN,Sf()),Bd(Ac,Hc.GREATER_THAN_OR_EQUAL_TO,Rf()),Bd(Ac,Hc.LESS_THAN,kf()),Bd(Ac,Hc.LESS_THAN_OR_EQUAL_TO,Df()),Bd(Ac,Hc.CONTAINS,Tf()),Bd(Ac,Hc.NOT_CONTAINS,Pf()),Bd(Ac,Hc.STARTS_WITH,xf()),Bd(Ac,Hc.ENDS_WITH,Af()),Ac),zc=["iam.eventType","eventType","type"],Jc=["iam.id","id"],Qc=function(e,n){return function(t){var r=e.getItem(n);if(!r)return t;try{return JSON.parse(r)}catch(e){return t}}},Gc=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e};return function(r){e.setItem(n,JSON.stringify(t(r)))}},Xc=function(e){var n=new Date;return n.setDate(n.getDate()-e),n},Yc=function(e){var n=e.scopeDetails,t=(void 0===n?{}:n).activity;return(void 0===t?{}:t).id},Wc=function(){var e={};return{getItem:function(n){return n in e?e[n]:null},setItem:function(n,t){e[n]=t}}},$c=function(e){e.clear()},Kc=function(e){var n=e.eventType,t=void 0===n?"":n,r=e._experience;return!(!t||""===t)&&!(!r||"object"!==Fd(r))},Zc=function(e){var n=e.scopeDetails;return(void 0===n?{}:n).decisionProvider},es=function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[];return Array.isArray(n)?(n.forEach((function(n){Array.isArray(n)?t.push.apply(t,Qd(e(n))):t.push(n)})),t):n},ns=function(e,n,t){return{schema:t.schema,data:t.data,id:t.id||e}},ts="schema",rs=(Bd(Nc={},"cjmiam",(function(e,n,t){var r=t.html,o=t.mobileParameters;return{schema:ei,data:{mobileParameters:o,webParameters:{},content:r,contentType:hu},id:e}})),Bd(Nc,ts,ns),Nc),os=function(){return function(e){var n=e.id,t=e.type,r=e.detail;return"function"==typeof rs[t]?rs[t](n,t,r):r}},is=function(e){var n=e.schema,t=e.data;if(n===Ko)return!0;if(n!==$o)return!1;try{var r="string"==typeof t.content?JSON.parse(t.content):t.content;return r&&Object.prototype.hasOwnProperty.call(r,"version")&&Object.prototype.hasOwnProperty.call(r,"rules")}catch(e){return!1}},as=function(e,n,t){var r=os(),o=Yc(e),i=[],a=function(e){var n=e.data,t=void 0===n?{}:n,r=e.schema===Ko?t:t.content;r&&i.push(tl("string"==typeof r?JSON.parse(r):r))},u=function(a){var u=n.getEvent(ui,o),c=u?u.firstTimestamp:void 0,s=es(i.map((function(e){return e.execute(a)}))).map(r).map((function(e){var n=(t.recordQualified(o)||{}).firstTimestamp;return Hd(Hd({},e),{},{data:Hd(Hd({},e.data),{},{qualifiedDate:n,displayedDate:c})})}));return Hd(Hd({},e),{},{items:s})};return Array.isArray(e.items)&&e.items.filter(is).forEach(a),{evaluate:u,isEvaluable:i.length>0}},us=function(e){var n=e.eventRegistry;return{recordQualified:function(e){if(e)return n.addEvent({},li.TRIGGER,e)}}},cs=function(e){var n=e.eventRegistry,t={},r=us({eventRegistry:n}),o=function(e){var o=Yc(e);if(o){var i=as(e,n,r);i.isEvaluable&&(t[o]=i)}},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.values(t).map((function(n){return n.evaluate(e)})).filter((function(e){return e.items.length>0}))};return{addPayload:o,addPayloads:function(e){e.forEach(o)},evaluate:i}},ss=function(e){return function(n){var t=n.renderDecisions,r=void 0!==t&&t,o=n.propositions,i=void 0===o?[]:o,a=n.event,u=n.personalization;return i.length>0&&e&&e.onDecision({renderDecisions:r,propositions:i,event:a,personalization:u}),{propositions:i}}},ds="AJO",fs="events",ls=1e3,ps=30,gs=function(e){return"iam."+e},vs=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ls,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ps;return function(t){var r={};return Object.keys(t).forEach((function(o){r[o]={},Object.values(t[o]).filter((function(e){return new Date(e.firstTimestamp)>=Xc(n)})).sort((function(e,n){return e.firstTimestamp-n.firstTimestamp})).slice(-1*e).forEach((function(e){r[o][e.event[gs("id")]]=e}))})),r}},ms=function(e){var n,t,r,o=e.storage,i=o,a=function(e){n=Qc(i=e,fs),t=Gc(i,fs,vs(ls,ps)),r=n({})};a(o);var u=function(e,n,o,i){var a;if(n&&o){r[n]||(r[n]={});var u=r[n][o],c=u?u.count:0,s=(new Date).getTime(),d=u?u.firstTimestamp||u.timestamp:s;return r[n][o]={event:Hd(Hd({},e),{},(a={},Bd(a,gs("id"),o),Bd(a,gs("eventType"),n),Bd(a,gs("action"),i),a)),firstTimestamp:d,timestamp:s,count:c+1},t(r),r[n][o]}};return{addExperienceEdgeEvent:function(e){var n=e.getContent().xdm,t=void 0===n?{}:n,r=t._experience;if(Kc(t)){var o=r.decisioning,i=void 0===o?{}:o,a=i.propositionEventType,c=void 0===a?{}:a,s=i.propositionAction,d=void 0===s?{}:s,f=i.propositions,l=void 0===f?[]:f,p=Object.keys(c);if(0!==p.length){var g=function(e){return c[e]===fi},v=d.id;p.filter(g).forEach((function(e){l.forEach((function(n){Zc(n)===ds&&u({},e,Yc(n),v)}))}))}}},addEvent:u,getEvent:function(e,n){if(r[e])return r[e][n]},toJSON:function(){return r},setStorage:a}},hs=function(e){var n=e.eventRegistry,t=e.window,r=(new Date).getTime(),o=function(){return Hd({title:t.title,url:t.url},Ze(t.url))},i=function(){return Hd({url:t.referrer},Ze(t.referrer))},a=function(){var e=new Date,n=e.getTime();return{pageLoadTimestamp:r,currentTimestamp:n,currentDate:e.getDate(),"~state.com.adobe.module.lifecycle/lifecyclecontextdata.dayofweek":e.getDay()+1,"~state.com.adobe.module.lifecycle/lifecyclecontextdata.hourofday":e.getHours(),currentMinute:e.getMinutes(),currentMonth:e.getMonth(),currentYear:e.getFullYear(),pageVisitDuration:n-r,"~timestampu":n/1e3,"~timestampz":e.toISOString()}},u=function(){return{height:t.height,width:t.width,scrollY:t.scrollY,scrollX:t.scrollX}},c={browser:function(){return{name:Qr(t)}}(),page:o(),referringPage:i()},s=function(){return Hd(Hd(Hd({},c),a()),{},{window:u(),"~sdkver":Ku})},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Hd(Hd({},s()),e);return Hd(Hd({},Lc(t)),{},{events:n.toJSON()})};return{getContext:d}},ys=function(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:void 0;return"function"!=typeof e?function(){}:(r[t+=1]={callback:e,params:n},o(t))},a=function(){for(var t=arguments.length,o=new Array(t),i=0;i0},setEmissionPreprocessor:function(n){"function"==typeof n&&(e=n)},setEmissionCondition:function(e){"function"==typeof e&&(n=e)}}},Cs=function(e){var n=e.options;return Et({surfaces:ht(It()).uniqueItems(),schemas:ht(It()).uniqueItems(),callback:bt().required()}).noUnknownFields()(n)},Es=function(e,n){var t=e.surfacesFilter,r=e.schemasFilter;return[{propositions:n.filter((function(e){return!t||c(t,e.scope)})).map((function(e){var n=e.items,t=void 0===n?[]:n;return Hd(Hd({},e),{},{items:t.filter((function(e){return!r||c(r,e.schema)}))})})).filter((function(e){return e.items.length>0}))}]},Is=function(e,n){return n.propositions.length>0},Os=function(){var e=ws();e.setEmissionPreprocessor(Es),e.setEmissionCondition(Is);var n=function(n){var t=n.surfaces,r=n.schemas,o=n.callback,i=e.add(o,{surfacesFilter:t instanceof Array?t:void 0,schemasFilter:r instanceof Array?r:void 0});return Promise.resolve({unsubscribe:i})};return{refresh:function(n){e.hasSubscriptions()&&e.emit(n)},command:{optionsValidator:function(e){return Cs({options:e})},run:n}}},Ss={TYPE:"~type",SOURCE:"~source"},Rs={LIFECYCLE:"com.adobe.eventType.lifecycle",TRACK:"com.adobe.eventType.generic.track",EDGE:"com.adobe.eventType.edge",RULES_ENGINE:"com.adobe.eventType.rulesEngine"},ks={LAUNCH:"com.adobe.eventSource.applicationLaunch",REQUEST:"com.adobe.eventSource.requestContent"},Ds=function(e){var n=e.options;return Et({renderDecisions:yt(),personalization:Et({decisionContext:Et({})})}).noUnknownFields()(n)},Ts=function(e){var n=e.contextProvider,t=e.decisionProvider;return{optionsValidator:function(e){return Ds({options:e})},run:function(e){var r=e.renderDecisions,o=e.decisionContext;return(0,e.applyResponse)({renderDecisions:r,propositions:t.evaluate(n.getContext(o))})}}},Ps=function(e){var n=e.config,t=e.createNamespacedStorage,r=e.consent,o=n.orgId,i=n.personalizationStorageEnabled,a=t(Ae(o)+".decisioning.");i||$c(a.persistent);var u,c=ms({storage:Wc()}),s=cs({eventRegistry:c}),d=hs({eventRegistry:c,window:window}),f=Ts({contextProvider:d,decisionProvider:s}),l=Os();return{lifecycle:{onDecision:function(e){var n=e.propositions;l.refresh(n)},onComponentsRegistered:function(e){u=ss(e.lifecycle),i&&r.awaitConsent().then((function(){c.setStorage(a.persistent)})).catch((function(){a&&$c(a.persistent)}))},onBeforeEvent:function(e){var n,t=e.event,r=e.renderDecisions,o=e.personalization,i=void 0===o?{}:o,a=e.onResponse,f=void 0===a?Ye:a,l=i.decisionContext,p=void 0===l?{}:l;f(jc({renderDecisions:r,decisionProvider:s,applyResponse:u,event:t,personalization:i,decisionContext:d.getContext(Hd((n={},Bd(n,Ss.TYPE,Rs.EDGE),Bd(n,Ss.SOURCE,ks.REQUEST),n),p))})),c.addExperienceEdgeEvent(t)}},commands:{evaluateRulesets:{run:function(e){var n,t=e.renderDecisions,r=e.personalization,o=(void 0===r?{}:r).decisionContext,i=void 0===o?{}:o;return f.run({renderDecisions:t,decisionContext:Hd((n={},Bd(n,Ss.TYPE,Rs.RULES_ENGINE),Bd(n,Ss.SOURCE,ks.REQUEST),n),i),applyResponse:u})},optionsValidator:f.optionsValidator},subscribeRulesetItems:l.command}}};Ps.namespace="DecisioningEngine",Ps.configValidators=Et({personalizationStorageEnabled:yt().default(!1)});var xs=function(e){return{inferences:e.response.getPayloadsByType("rtml:inferences")}},As=function(){return{lifecycle:{onResponse:xs},commands:{}}};As.namespace="MachineLearning";var Ns=[cr,Pr,Co,So,Vu,pc,Rc,Tc,xc,As,Ps],qs="https://adobe.ly/3sHh553",_s=function(e){var n=e.combinedConfigValidator,t=e.options,r=e.logger;try{return n.noUnknownFields().required().call({logger:r},t)}catch(e){throw new Error("Resolve these configuration problems:\n\t - "+e.message.split("\n").join("\n\t - ")+"\nFor configuration documentation see: "+qs)}},Ms=function(e,n,t){return t.reduce((function(t,r){var o=r.buildOnInstanceConfiguredExtraParams;return o&&v(t,o({config:e,logger:n})),t}),{})},Ls=function(e){var n=[],t={get enabled(){return e.enabled},flush:function(){n.forEach((function(n){var t=n.method,r=n.args;return e[t].apply(e,Qd(r))}))}};return Object.keys(e).filter((function(n){return"function"==typeof e[n]})).forEach((function(e){t[e]=function(){for(var t=arguments.length,r=new Array(t),o=0;o0){var i=v({},o,n);t.forEach((function(n){n[e]&&n[e](i)}))}},u=function(e){for(var r=arguments.length,o=new Array(r>1?r-1:0),u=1;u0||n()},logOnInstanceCreated:function(e){a("onInstanceCreated",e),u("info","Instance initialized.")},logOnInstanceConfigured:function(e){a("onInstanceConfigured",e),u("info","Instance configured. Computed configuration:",e.config)},logOnBeforeCommand:function(e){a("onBeforeCommand",e),u("info","Executing "+e.commandName+" command. Options:",e.options)},logOnCommandResolved:function(e){a("onCommandResolved",e),u("info",e.commandName+" command resolved. Result:",e.result)},logOnCommandRejected:function(e){a("onCommandRejected",e),u("error",e.commandName+" command was rejected. Error:",e.error)},logOnBeforeNetworkRequest:function(e){a("onBeforeNetworkRequest",e),u("info","Request "+e.requestId+": Sending request.",e.payload)},logOnNetworkResponse:function(e){a("onNetworkResponse",e);var n=e.parsedBody||e.body?"response body:":"no response body.";u("info","Request "+e.requestId+": Received response with status code "+e.statusCode+" and "+n,e.parsedBody||e.body)},logOnNetworkError:function(e){a("onNetworkError",e),u("error","Request "+e.requestId+": Network request failed.",e.error)},info:u.bind(null,"info"),warn:u.bind(null,"warn"),error:u.bind(null,"error")}},Ws=["edgeConfigOverrides"],$s="Event was canceled because the onBeforeEventSend callback returned false.",Ks=function(e){var n=e.config,t=e.logger,r=e.lifecycle,o=e.consent,i=e.createEvent,a=e.createDataCollectionRequestPayload,u=e.createDataCollectionRequest,c=e.sendEdgeNetworkRequest,s=e.applyResponse,d=n.onBeforeEventSend,f=n.edgeConfigOverrides;return{createEvent:i,sendEvent:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.edgeConfigOverrides,s=zd(n,Ws),l=co({payload:a(),localConfigOverrides:i,globalConfigOverrides:f}),p=u(l),g=S(),v=S();return r.onBeforeEvent(Hd(Hd({},s),{},{event:e,onResponse:g.add,onRequestFailure:v.add})).then((function(){return l.payload.addEvent(e),o.awaitConsent()})).then((function(){try{e.finalize(d)}catch(o){var n=function(){throw o};return v.add(r.onRequestFailure),v.call({error:o}).then(n,n)}if(!e.shouldSend()){v.add(r.onRequestFailure),t.info($s);var o=new Error($s);return v.call({error:o}).then((function(){}))}return c({request:p,runOnResponseCallbacks:g.call,runOnRequestFailureCallbacks:v.call})}))},applyResponse:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.renderDecisions,o=void 0!==t&&t,i=n.decisionContext,c=void 0===i?{}:i,d=n.responseHeaders,f=void 0===d?{}:d,l=n.responseBody,p=void 0===l?{handle:[]}:l,g=n.personalization,v=a(),m=u({payload:v}),h=S();return r.onBeforeEvent({event:e,renderDecisions:o,decisionContext:c,decisionScopes:[Go],personalization:g,onResponse:h.add,onRequestFailure:Ye}).then((function(){return v.addEvent(e),s({request:m,responseHeaders:f,responseBody:p,runOnResponseCallbacks:h.call})}))}}},Zs="state:store",ed=function(e){var n=e.cookieJar,t=e.shouldTransferCookie,r=e.apexDomain,o=e.dateProvider;return{cookiesToPayload:function(e,o){var i=N(o,r),a={domain:r,cookiesEnabled:!0};if(!i){var u=n.get(),c=Object.keys(u).filter(t).map((function(e){return{key:e,value:u[e]}}));c.length&&(a.entries=c)}e.mergeState(a)},responseToCookies:function(e){e.getPayloadsByType(Zs).forEach((function(e){var t={domain:r},i=e.attrs&&e.attrs.SameSite&&e.attrs.SameSite.toLowerCase();void 0!==e.maxAge&&(t.expires=new Date(o().getTime()+1e3*e.maxAge)),void 0!==i&&(t.sameSite=i),"none"===i&&(t.secure=!0),n.set(e.key,e.value,t)}))}}},nd="mboxEdgeCluster",td="at_qa_mode",rd="mbox",od=function(e){var n=e.orgId,t=e.targetMigrationEnabled;return function(e){return Je(n,e)||e===td||t&&e===rd}},id="v1",ad=function(e){var n=e.shift()||[],t=e.shift()||[],r=e;return y.apply(void 0,[{}].concat(Qd(n),Qd(t),Qd(r)))},ud=function(e){return function(n){var t=function(){throw n};return e.call({error:n}).then(t,t)}},cd=function(e){var n=e.config,t=e.lifecycle,r=e.cookieTransfer,o=e.sendNetworkRequest,i=e.createResponse,a=e.processWarningsAndErrors,u=e.getLocationHint,c=e.getAssuranceValidationTokenParams,s=n.edgeDomain,d=n.edgeBasePath,f=n.datastreamId;return function(e){var n=e.request,l=e.runOnResponseCallbacks,p=void 0===l?Ye:l,g=e.runOnRequestFailureCallbacks,v=void 0===g?Ye:g,m=S();m.add(t.onResponse),m.add(p);var h=S();return h.add(t.onRequestFailure),h.add(v),t.onBeforeRequest({request:n,onResponse:m.add,onRequestFailure:h.add}).then((function(){var e=n.getUseIdThirdPartyDomain()?Bs:s,t=u(),i=t?d+"/"+t:d,a=n.getDatastreamIdOverride()||f,l=n.getPayload();a!==f&&l.mergeMeta({sdkConfig:{datastream:{original:f}}});var p="https://"+e+"/"+i+"/"+id+"/"+n.getAction()+"?configId="+a+"&requestId="+n.getId()+c();return r.cookiesToPayload(l,e),o({requestId:n.getId(),url:p,payload:l,useSendBeacon:n.getUseSendBeacon()})})).then((function(e){return a(e),e})).catch(ud(h)).then((function(e){var n=e.parsedBody,t=e.getHeader,o=i({content:n,getHeader:t});return r.responseToCookies(o),m.call({response:o}).then(ad)}))}},sd=204,dd="The server responded with a",fd=function(e){var n=e.logger;return function(e){var t=e.statusCode,r=e.body,o=e.parsedBody;if(t<200||t>=300||!o&&t!==sd||o&&!Array.isArray(o.handle)){var i=o?JSON.stringify(o,null,2):r;throw new Error(dd+" status code "+t+" and "+(i?"response body:\n"+i:"no response body."))}if(o){var a=o.warnings,u=void 0===a?[]:a,c=o.errors,s=void 0===c?[]:c;u.forEach((function(e){n.warn(dd+" warning:",e)})),s.forEach((function(e){n.error(dd+" non-fatal error:",e)}))}}},ld=function(e){var n=e.orgId,t=e.cookieJar,r=Ne(n,Le),o=function(){return t.get(r)},i=function(){var e=t.get(nd);if(e)return"t"+e};return function(){return o()||i()}},pd=3,gd=[429,503,502,504],vd=function(e){var n=e.response;return e.retriesAttempted=0||(o[t]=e[t]);return o}function zd(e,n){if(null==e)return{};var t,r,o=Vd(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Jd(e,n){return Xd(e)||Wd(e,n)||$d(e,n)||ef()}function Qd(e){return Gd(e)||Yd(e)||$d(e)||Zd()}function Gd(e){if(Array.isArray(e))return Kd(e)}function Xd(e){if(Array.isArray(e))return e}function Yd(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Wd(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}function $d(e,n){if(e){if("string"==typeof e)return Kd(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Kd(e,n):void 0}}function Kd(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t2&&void 0!==arguments[2]?arguments[2]:[];if(bf(e[n]))return!1;for(var r=String(e[n]).toLowerCase(),o=0;o2&&void 0!==arguments[2]?arguments[2]:[];if(bf(e[n]))return!1;for(var r=String(e[n]).toLowerCase(),o=0;o2&&void 0!==arguments[2]?arguments[2]:[],r=e[n];if(!Of(r))return!1;for(var o=0;ot[o])return!0;return!1}}}function Rf(){return{matches:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=e[n];if(!Of(r))return!1;for(var o=0;o=t[o])return!0;return!1}}}function kf(){return{matches:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=e[n];if(!Of(r))return!1;for(var o=0;o2&&void 0!==arguments[2]?arguments[2]:[],r=e[n];if(!Of(r))return!1;for(var o=0;o2&&void 0!==arguments[2]?arguments[2]:[];if(bf(e[n]))return!1;for(var r=String(e[n]).toLowerCase(),o=0;o2&&void 0!==arguments[2]?arguments[2]:[];if(bf(e[n]))return!1;for(var r=String(e[n]).toLowerCase(),o=0;o2&&void 0!==arguments[2]?arguments[2]:[];if(bf(e[n]))return!1;for(var r=String(e[n]).toLowerCase(),o=0;o2&&void 0!==arguments[2]?arguments[2]:[];if(bf(e[n]))return!1;for(var r=String(e[n]).toLowerCase(),o=0;ot;case Hc.GREATER_THAN_OR_EQUAL_TO:return e>=t;case Hc.LESS_THAN:return e=t&&c.timestamp<=r?e+d:e}),0)}function Uf(e,n,t,r){var o=t;return e.every((function(e){var t=Mf(e,zc);if(!t)return!1;var i=n.events[t];if(!i)return!1;var a=Mf(e,Jc);if(!a)return!1;var u=i[a];if(!Lf(e,u))return!1;if(null===u||qf(u)||0===u.count)return!1;var c=(qf(o)||u.timestamp>=o)&&(qf(r)||u.timestamp<=r);return o=u.timestamp,c}))?1:0}function Hf(e,n){for(var t=!0,r=0;r0}))},getVersion:function(){return t},numRules:function(){return r.length}}}}function R(e){throw Error(e)}function k(e,t){var r=n.createElement("script"),o=!1;r.src=e,r.async=!0,t&&(r.onload=r.onreadystatechange=function(e){var n=this.readyState;o||n&&"complete"!==n&&"loaded"!==n||(o=!0,t(e))}),a?a.appendChild(r):n.body?n.body.appendChild(r):R("no script parent")}function D(){var n,t,r,o,i,a,c,s=[];n=function(n){o?n(e._satellite):s.push(n)},t=new g((function(e){n(e)})),e.__satelliteLoadedCallback=n,e.__satelliteLoadedPromise=t,r=function(){var n,t,r;for(o=!0,n=0,t=s.length;n