mergn-webapp-sdk 1.0.178 → 1.0.179
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.global.js +1 -75
- package/dist/index.js +1 -75
- package/dist/index.mjs +1 -0
- package/package.json +1 -1
- package/dist/index2.js +0 -75
package/dist/index.global.js
CHANGED
|
@@ -1,75 +1 @@
|
|
|
1
|
-
/* Copyright (c) 2025 MERGN */
|
|
2
|
-
"use strict";(()=>{var Ei=Object.defineProperty,vi=Object.defineProperties;var Ii=Object.getOwnPropertyDescriptors;var It=Object.getOwnPropertySymbols;var fi=Object.prototype.hasOwnProperty,hi=Object.prototype.propertyIsEnumerable;var ht=d=>{throw TypeError(d)};var ft=(d,e,t)=>e in d?Ei(d,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):d[e]=t,z=(d,e)=>{for(var t in e||(e={}))fi.call(e,t)&&ft(d,t,e[t]);if(It)for(var t of It(e))hi.call(e,t)&&ft(d,t,e[t]);return d},_e=(d,e)=>vi(d,Ii(e));var Be=(d,e,t)=>e.has(d)||ht("Cannot "+t);var l=(d,e,t)=>(Be(d,e,"read from private field"),t?t.call(d):e.get(d)),E=(d,e,t)=>e.has(d)?ht("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(d):e.set(d,t),f=(d,e,t,i)=>(Be(d,e,"write to private field"),i?i.call(d,t):e.set(d,t),t),o=(d,e,t)=>(Be(d,e,"access private method"),t);var c=(d,e,t)=>new Promise((i,n)=>{var r=v=>{try{I(t.next(v))}catch(S){n(S)}},s=v=>{try{I(t.throw(v))}catch(S){n(S)}},I=v=>v.done?i(v.value):Promise.resolve(v.value).then(r,s);I((t=t.apply(d,e)).next())});var bt="1.0.178";var St="https://api.mergn.com/sdk-management/api",Me="/attribute",yt="/set-attribute",$e="/event",Tt="/record-event";var wt="/customer",_t="/device/add-device-token",Pt="/set-identity",Ot="/brand/get-web-push-public-key",At="/brand/get-time";var g=class extends Error{constructor(e){super(e),this.name="MergnError"}};g.disableSDK=!1,g.offline=!navigator.onLine,g.debugLevel=0,g.isInitialized=!1,g.loading=!1;var Si=(d,e)=>{e instanceof g?a(2,`OriginateFrom: ${d}
|
|
3
|
-
MergnError: ${e.message}`):e instanceof Error?a(2,`OriginateFrom: ${d}
|
|
4
|
-
Unexpected error: ${e.message}`):a(2,`OriginateFrom: ${d}
|
|
5
|
-
Unexpected error: ${String(e)}`)},O=(d,e,t,i=!1)=>c(void 0,null,function*(){try{D(d,!0),C(`${d} Time`,!0);try{if(d!=="verify API key"){if(d!=="verify API key"&&g.disableSDK)throw new g("Mergn SDK is disabled!");if(d!=="record event"&&g.offline)throw new g("Mergn is offline!");if(d!=="init"&&d!=="verify API key"&&d!=="record event"&&d!=="recordAttribute"&&d!=="log level check"&&!g.isInitialized)throw new g("Mergn not initialized!");if(d!=="login"&&d!=="record event"&&d!=="recordAttribute"&&g.loading)throw new g("Mergn is loading!")}return yield e()}catch(n){return t?t(n):(g.debugLevel===2||g.debugLevel===3)&&Si(d,n),null}finally{C(`${d} Time`,!1),D(d,!1)}}catch(n){return null}});var x=(r=>(r[r.NONE=0]="NONE",r[r.INFO=1]="INFO",r[r.ERROR=2]="ERROR",r[r.ALL=3]="ALL",r[r.DEBUG=4]="DEBUG",r))(x||{}),a=(d,e)=>{g.debugLevel!==0&&(g.debugLevel>=3?d===1?console.info(`INFO: ${new Date().toISOString()}`,e):d===2&&console.error(`ERROR: ${new Date().toISOString()}`,e):g.debugLevel===1&&d===1?console.info(`INFO: ${new Date().toISOString()}`,e):g.debugLevel===2&&d===2&&console.error(`ERROR: ${new Date().toISOString()}`,e))},C=(d,e)=>{g.debugLevel!==0&&(e?console.time(d):console.timeEnd(d))},D=(d,e)=>{g.debugLevel!==0&&(e?console.group(d):console.groupEnd())};var ne,U,Ee,Pe,T=class T{constructor(){E(this,U)}static getInstance(){return l(T,ne)||f(T,ne,new T),l(T,ne)}setApiURL(e){T.API_URL=e}updateAPIKey(e){T.apiKey=e;let t=e,i=/m(\d+)rgn/,n=t.match(i);n&&(T.brandId=n[1])}getAPIKey(){return T.apiKey}getBrandId(){return T.brandId}get(e){return c(this,null,function*(){let t=o(this,U,Pe).call(this,T.apiKey);try{let i=yield fetch(o(this,U,Ee).call(this)+e,{headers:{Authorization:t,"Content-Type":"application/json"}});if(!i.ok)throw new Error(`${t} - ${JSON.stringify(yield i.json())}`);return i.json()}catch(i){return Promise.reject(i)}})}post(e,t,i){return c(this,null,function*(){let n=o(this,U,Pe).call(this,T.apiKey);try{return(yield fetch(o(this,U,Ee).call(this)+e,{body:JSON.stringify(t||{}),headers:{Authorization:n,"Content-Type":"application/json"},method:"POST",signal:i})).json()}catch(r){return Promise.reject(r)}})}put(e,t){return c(this,null,function*(){return(yield fetch(o(this,U,Ee).call(this)+e,{body:JSON.stringify(t||{}),headers:{Authorization:o(this,U,Pe).call(this,T.apiKey),"Content-Type":"application/json"},method:"PUT"})).json()})}syncRealWorldTime(){return c(this,null,function*(){try{let e=(yield(yield fetch(o(this,U,Ee).call(this)+At)).json()).data;T.UTCDate=new Date(e),T.lastSyncTime=new Date}catch(e){a(2,"Failed to sync real-world time")}})}getCurrentUTCDate(){if(!T.UTCDate||!T.lastSyncTime)return a(2,"UTC Date or last sync time is not set"),new Date;let t=new Date().getTime()-T.lastSyncTime.getTime();return new Date(T.UTCDate.getTime()+t)}};ne=new WeakMap,U=new WeakSet,Ee=function(){return T.API_URL},Pe=function(e){return btoa(`${e}:${new Date().getTime()}`)},E(T,ne),T.API_URL=St;var Ve=T,A=Ve.getInstance();var Nt=(v=>(v.UTM_SOURCE="utm_source",v.UTM_MEDIUM="utm_medium",v.UTM_CAMPAIGN="utm_campaign",v.UTM_TERM="utm_term",v.UTM_CONTENT="utm_content",v.GAD_SOURCE="gad_source",v.GCLID="gclid",v.FBCLID="fbclid",v))(Nt||{});var Rt=new Set(Object.values(Nt));var re="Popup Action";var Ge="Content Card Action";var oe,W,se,Y,ve,Ie,b,Je,Ct,Ke,Oe,Dt,Re,Ae,je,xt,Ne,Q,Ut,y=class y{constructor(){E(this,b);this.permission=null;this.pushMessageToSW=e=>{a(1,"Pushing message to service worker"),navigator.serviceWorker.getRegistrations().then(t=>{var i,n;a(1,"Service Worker registration"),(i=t[0])!=null&&i.active&&(a(1,"Service Worker ready"),(n=t[0].active)==null||n.postMessage(JSON.stringify(e)))}).catch(t=>{a(2,`Failed to push message to service worker: ${t.message}`)})};this.loadWebPushActionInLocalStorage=()=>{p.loadActionInLocalStorage({actionCondition:()=>!0,actionMethod:e=>o(this,b,Ae).call(this,Number(e.web_optin_instance_id)),localStorageKey:"web_push_action"})};E(this,Re,()=>{p.storeActionInLocalStorageInternal("web_push_action")});E(this,Q,e=>{p.clearActionInLocalStorage({id:e,localStorageKey:"web_push_action"})})}static getInstance(){return l(y,oe)||f(y,oe,new y),l(y,oe)}init(e,t){return c(this,null,function*(){var i;if(a(1,"Initializing Notification Service"),m.recordDebugEvents({eventName:"init",eventProperties:[{eventProperty:"service_worker",value:"serviceWorker"in navigator},{eventProperty:"push_manager",value:"PushManager"in window}]}),"serviceWorker"in navigator&&"PushManager"in window){a(1,"Service Worker and Push Manager are supported");try{m.recordDebugEvents({eventName:"init_condition"}),f(y,W,yield navigator.serviceWorker.register(t||"/mergn-sw.js")),a(1,"Service Worker registered"),a(1,"Pushing message to service worker for initialization"),this.pushMessageToSW({customer:localStorage.getItem("customer")||"",events:m.getStoredEvents(),API_KEY:A.getAPIKey(),device_id:localStorage.getItem("uniqueIdentity")||"",operatingSystem:p.getOperatingSystem(),osVersion:p.getOSVersion(),Platform:p.getPlatform()}),f(y,ve,!0);let n=o(this,b,je).call(this),r=Object.keys(n||{});if(r.length&&o(this,b,Ae).call(this,Number(r[0])),!e)return;let s=yield(i=l(y,W))==null?void 0:i.pushManager.getSubscription();a(1,"Checking for existing subscription"),l(y,W)&&(a(1,"Service Worker registration is available"),l(y,W).update()),s?(a(1,"Existing subscription found"),m.recordDebugEvents({eventName:"existing_subscription"}),yield o(this,b,Oe).call(this),f(y,se,!0)):(a(1,"No existing subscription found"),yield o(this,b,Je).call(this,l(y,Ie)||void 0))}catch(n){let r=n&&n.message?n.message.substring(0,100):"undefined";yield m.recordDebugEvents({eventName:"Reachability Push Web",eventProperties:[{eventProperty:"message",value:`${r}`}]}),a(2,"Service Worker registration failed:"),a(2,r)}}})}showNotification(e){if(!l(y,ve)){f(y,Ie,e),m.recordDebugEvents({eventName:"notification_service_not_initialized"}),a(2,"Notification service is not initialized");return}O("showNotification",()=>c(this,null,function*(){let t=JSON.parse(localStorage.getItem("web_push_action")||"{}");if(t&&t[e.web_optin_instance_id]){a(1,"Notification already in cache");return}o(this,b,Dt).call(this,e),l(this,Re).call(this),o(this,b,Ae).call(this,e.web_optin_instance_id)}))}};oe=new WeakMap,W=new WeakMap,se=new WeakMap,Y=new WeakMap,ve=new WeakMap,Ie=new WeakMap,b=new WeakSet,Je=function(e){return c(this,null,function*(){a(1,`Checking notification permission: ${JSON.stringify(e)} `),m.recordDebugEvents({eventName:"check_permission"});let t;try{if(t=Notification.permission,t)if(a(1,`Notification permission: ${t}`),t==="default")e||(this.permission="default",m.recordDebugEvents({eventName:"Turned Off Notification Reset Permission"})),e&&(m.recordDebugEvents({eventName:"notification_data",eventProperties:[{eventProperty:"type",value:`${e==null?void 0:e.type}`}]}),l(this,Q).call(this,e.web_optin_instance_id),e.type==="two_step"?o(this,b,Ct).call(this,e):yield o(this,b,Ke).call(this,e));else if(t==="denied")m.recordDebugEvents({eventName:"Turned Off Notification"}),a(1,"The user has blocked notifications."),e&&e.web_optin_instance_id&&l(this,Q).call(this,e.web_optin_instance_id);else{if(e&&e.web_optin_instance_id){l(this,Q).call(this,e.web_optin_instance_id);return}m.recordDebugEvents({eventName:"already_registered"}),a(1,"The user has already enabled notifications."),l(y,se)||(yield o(this,b,Oe).call(this),yield m.recordEvent({eventName:"Already Registered To Web Push"}),e||f(y,se,!0))}}catch(i){a(2,"Failed to check notification permission"),m.recordDebugEvents({eventName:"notification_permission_error"})}})},Ct=function(e){try{let t=document.createElement("div"),i;e.banner_design.banner_image&&(i=document.createElement("img"),i.src=e.banner_design.banner_image,i.alt="Image",i.id="centered-image");let n=document.createElement("div"),r=document.createElement("div"),s=document.createElement("div"),I=document.createElement("img"),v=document.createElement("div"),S=document.createElement("div"),h=document.createElement("div"),L=document.createElement("div"),B=document.createElement("div"),j=document.createElement("div"),F=document.createElement("button"),R=document.createElement("button");t.className="mergn-overlay",n.className="mergnWebPushPopup",r.className=L.className=B.className="mergn-row",s.className="mergn-column-25",v.className="mergn-column-75",j.className="button-container",S.id="title",h.id="subtitle",F.id="button-1",R.id="button-2",I.src=e.banner_design.banner_icon,I.alt="Image",I.id="logo",S.textContent=e.banner_design.banner_title,h.textContent=e.banner_design.banner_text,F.textContent=e.banner_design.button_1.text,R.textContent=e.banner_design.button_2.text,s.appendChild(I),v.appendChild(S),v.appendChild(h),r.appendChild(s),r.appendChild(v),i&&(L.appendChild(i),i.style.cssText=`
|
|
6
|
-
max-width: 100%;
|
|
7
|
-
height: auto;
|
|
8
|
-
display: block;
|
|
9
|
-
margin-left: auto;
|
|
10
|
-
margin-right: auto;
|
|
11
|
-
border-radius: 10px;
|
|
12
|
-
max-width: 350px;
|
|
13
|
-
aspect-ratio: 2 / 1;
|
|
14
|
-
`),j.appendChild(F),j.appendChild(R),B.appendChild(j),n.appendChild(r),n.appendChild(L),n.appendChild(B),t.appendChild(n),t.style.cssText=`
|
|
15
|
-
position: fixed;
|
|
16
|
-
top: 0;
|
|
17
|
-
left: 0;
|
|
18
|
-
width: 100%;
|
|
19
|
-
height: 100%;
|
|
20
|
-
background-color: rgba(0, 0, 0, 0.5);
|
|
21
|
-
z-index: 99999999999;
|
|
22
|
-
display: flex;
|
|
23
|
-
justify-content: center;
|
|
24
|
-
align-items: start;
|
|
25
|
-
`,n.style.cssText=`
|
|
26
|
-
background-color: ${e.banner_design.banner_color};
|
|
27
|
-
padding: 15px;
|
|
28
|
-
border-radius: 5px;
|
|
29
|
-
max-width: 380px;
|
|
30
|
-
max-height: 463px;
|
|
31
|
-
`,r.style.cssText=L.style.cssText=B.style.cssText=`
|
|
32
|
-
display: flex;
|
|
33
|
-
flex-wrap: wrap;
|
|
34
|
-
margin-bottom: 10px;
|
|
35
|
-
`,s.style.cssText=`
|
|
36
|
-
width: 25%;
|
|
37
|
-
`,v.style.cssText=`
|
|
38
|
-
width: 73%;
|
|
39
|
-
margin-left: 2%;
|
|
40
|
-
`,I.style.cssText=`
|
|
41
|
-
max-width: 100%;
|
|
42
|
-
height: auto;
|
|
43
|
-
`,F.style.cssText=`
|
|
44
|
-
padding: 12px 20px;
|
|
45
|
-
border: none;
|
|
46
|
-
background-color: ${e.banner_design.button_1.backgroundColor};
|
|
47
|
-
color: ${e.banner_design.button_1.color};
|
|
48
|
-
cursor: pointer;
|
|
49
|
-
border-radius: 5px;
|
|
50
|
-
width: 48%;
|
|
51
|
-
`,R.style.cssText=`
|
|
52
|
-
padding: 12px 20px;
|
|
53
|
-
border: none;
|
|
54
|
-
background-color: ${e.banner_design.button_2.backgroundColor};
|
|
55
|
-
color: ${e.banner_design.button_2.color};
|
|
56
|
-
cursor: pointer;
|
|
57
|
-
border-radius: 5px;
|
|
58
|
-
width: 48%;
|
|
59
|
-
`,j.style.cssText=`
|
|
60
|
-
display: flex;
|
|
61
|
-
justify-content: space-between;
|
|
62
|
-
align-items: center;
|
|
63
|
-
flex-wrap: nowrap;
|
|
64
|
-
width: 100%;
|
|
65
|
-
`,S.style.cssText=`
|
|
66
|
-
margin-bottom: 5px;
|
|
67
|
-
font-size: 16px;
|
|
68
|
-
color: ${e.banner_design.text_color}
|
|
69
|
-
`,h.style.cssText=`
|
|
70
|
-
margin-bottom: 5px;
|
|
71
|
-
font-size: 13px;
|
|
72
|
-
color: ${e.banner_design.text_color}
|
|
73
|
-
`,document.body.appendChild(t),document.body.style.overflow="hidden",m.recordEvent({eventName:"Viewed Web Push Soft-ask",name:"viewed",web_optin_instance_id:e.web_optin_instance_id}),F==null||F.addEventListener("click",()=>c(this,null,function*(){t.remove(),f(y,Y,!1),document.body.style.overflow="auto",yield m.recordEvent({eventName:"Denied Web Push Soft-ask",web_optin_instance_id:e.web_optin_instance_id}),a(1,"User denied the notification permission.")})),R==null||R.addEventListener("click",()=>c(this,null,function*(){t.remove(),document.body.style.overflow="auto",m.recordEvent({eventName:"Accepted Web Push Soft-ask",web_optin_instance_id:e.web_optin_instance_id}),yield o(this,b,Ke).call(this,e)}))}catch(t){}},Ke=function(e){return c(this,null,function*(){try{m.recordEvent({eventName:"Displayed Web Push Subscription",name:"viewed",web_optin_instance_id:e.web_optin_instance_id});let t=yield Notification.requestPermission();t==="granted"?(a(1,"User granted the notification permission."),yield o(this,b,Oe).call(this),yield m.recordEvent({eventName:"Allowed Web Push Subscription",name:"subscribed",web_optin_instance_id:e.web_optin_instance_id})):t==="denied"?(yield m.recordEvent({eventName:"Blocked Web Push Subscription"}),a(1,"User denied the notification permission.")):t==="default"&&(yield m.recordEvent({eventName:"Closed Web Push Subscription"}),a(1,"User closed the notification permission dialog."))}catch(t){a(2,"Failed to request notification permission")}f(y,Y,!1)})},Oe=function(){return c(this,null,function*(){var t,i;let e=yield A.get(`${Ot}`);if(e.success){let n=yield(t=l(y,W))==null?void 0:t.pushManager.getSubscription();n&&(yield n.unsubscribe());let r=yield(i=l(y,W))==null?void 0:i.pushManager.subscribe({applicationServerKey:e.data||"",userVisibleOnly:!0}),s=localStorage.getItem("customer")||"";(!s||s!=="undefined")&&(yield p.setIdentity()),yield A.put(`${_t}`,{customer_id:localStorage.getItem("customer"),device_id:localStorage.getItem("uniqueIdentity"),device_platform:p.getOperatingSystem(),is_web_push_subscribed:!0,os:p.getPlatform(),web_push_subscription_page_url:window.location.pathname,web_push_token:{token:JSON.parse(JSON.stringify(r))}}),a(1,"User is subscribed")}else throw new Error("Failed to subscribe the user")})},Dt=function(e){p.storeActionInLocalStorage(e,"web_push_action","web_optin_instance_id")},Re=new WeakMap,Ae=function(e){if(l(y,Y))return;f(y,Y,!0);let t=o(this,b,je).call(this);if(t!=null&&t[e])switch(t[e].entry_time){case"DELAY":{o(this,b,xt).call(this,t[e]);break}case"IMMEDIATELY":{o(this,b,Ne).call(this,t[e]);break}case"SCROLL":{o(this,b,Ut).call(this,t[e]);break}default:return}},je=function(){let e=localStorage.getItem("web_push_action");return e?JSON.parse(e):null},xt=function(e){p.showDelayedAction({clearActionMethod:l(this,Q).bind(this),data:e,displayMethod:o(this,b,Ne).bind(this),idKey:"web_optin_instance_id",timeValueKey:"entry_time_value"})},Ne=function(e){o(this,b,Je).call(this,e)},Q=new WeakMap,Ut=function(e){p.showAfterScrollAction({data:e,displayMethod:o(this,b,Ne).bind(this),timeValueKey:"entry_time_value"})},E(y,oe),E(y,W,null),E(y,se,!1),E(y,Y,!1),E(y,ve,!1),E(y,Ie,null);var He=y,k=He.getInstance();var q,w,kt,Ye,Ft,Wt,ce,Ce,Le,le,Bt,Mt,$t,Vt,De,$=class ${constructor(){E(this,w);E(this,ce,e=>{p.clearActionInLocalStorage({id:e,localStorageKey:"action"})});E(this,Ce,(e,t)=>{let i=document.createElement("div");i.innerHTML=t,i.querySelectorAll("script").forEach(r=>{let s=document.createElement("script");r.src?s.src=r.src:s.textContent=r.textContent,e.appendChild(s)})});E(this,le,({campaignCustomerInstanceId:e,campaignId:t,customForm:i,formDiv:n,popupContainer:r})=>{let s=(n==null?void 0:n.querySelector("form"))||i;s&&(s.querySelectorAll("input").forEach(I=>{I.style.setProperty("padding",I.style.padding,"important")}),s.addEventListener("submit",()=>c(this,null,function*(){r.remove();let I=new FormData(s),v={};a(1,"Form submitted values:");for(let[S,h]of I.entries())v[S]=h,a(1,`${S}: ${h}`),G.recordAttribute(S,h.toString());yield m.recordEvent({campaignCustomerInstanceId:e,campaignId:t,eventName:re,eventProperties:[{eventProperty:"Form Submit",value:JSON.stringify({campaignId:t,formId:(n==null?void 0:n.id)||"custom_form",formValues:v})},{eventProperty:"Campaign Id",value:t.toString()}],name:"form"})})))});this.loadPopupEventActionInLocalStorage=()=>{p.loadActionInLocalStorage({actionCondition:e=>e.message.name==="Popup",actionMethod:e=>o(this,w,Ye).call(this,e.campaignId),localStorageKey:"action"})};E(this,De,()=>{p.storeActionInLocalStorageInternal("action")})}static getInstance(){var e;return l($,q)||(f($,q,new $),o(e=l($,q),w,kt).call(e)),l($,q)}showPopup(e){let t=JSON.parse(localStorage.getItem("action")||"{}");if(t&&t[e==null?void 0:e.campaignId]){a(1,"Popup already in cache");return}o(this,w,Vt).call(this,e),l(this,De).call(this),o(this,w,Ye).call(this,e.campaignId)}isPopupAction(e){return e==="Popup"}};q=new WeakMap,w=new WeakSet,kt=function(){return c(this,null,function*(){})},Ye=function(e){let t=o(this,w,Ft).call(this);if(document.getElementById(`popup_container_${e}`)){a(1,"Popup already displayed"),l(this,ce).call(this,e);return}if(t!=null&&t[e])switch(t[e].campaignEntryTime){case"DELAY":{o(this,w,Wt).call(this,t[e]);break}case"IMMEDIATELY":{o(this,w,Le).call(this,t[e]);break}case"SCROLL":{o(this,w,$t).call(this,t[e]);break}default:return}},Ft=function(){let e=localStorage.getItem("action");return e?JSON.parse(e):null},Wt=function(e){p.showDelayedAction({clearActionMethod:l(this,ce).bind(this),data:e,displayMethod:o(this,w,Le).bind(this),idKey:"campaignId",timeValueKey:"campaignEntryTimeValue"})},ce=new WeakMap,Ce=new WeakMap,Le=function(e){if(document.getElementById(`popup_container_${e.campaignId}`))a(1,"Popup already displayed");else{let t=o(this,w,Mt).call(this,"div",e);l(this,Ce).call(this,t,e.message.design),document.body.appendChild(t),m.recordEvent({campaignCustomerInstanceId:e.campaignCustomerInstanceId,campaignId:e.campaignId,eventName:re,eventProperties:[{eventProperty:"Popup View",value:JSON.stringify({campaignId:e.campaignId})}],name:"view"})}l(this,ce).call(this,e.campaignId)},le=new WeakMap,Bt=function(e,t){let i=e.parentElement;for(;i;){if(i.id.startsWith(t))return i;i=i.parentElement}return null},Mt=function(e,t){let{campaignCustomerInstanceId:i,campaignId:n,message:{design:r}}=t,s=document.createElement(e);s.id=`popup_container_${n}`,s.innerHTML=r,s.style.position="fixed",s.style.top="0",s.style.left="0",s.style.width="100%",s.style.height="100%",s.style.zIndex="99999999";let I=s.querySelector(".u-popup-container");I&&(I.style.zIndex="50");let v=I.querySelector(".u-popup-overlay");v&&(a(1,"Popup overlay element found"),v.style.setProperty("display","block","important")),s.querySelectorAll("form").forEach(h=>{let L=o(this,w,Bt).call(this,h,"u_content_form_");L?l(this,le).call(this,{campaignCustomerInstanceId:i,campaignId:n,formDiv:L,popupContainer:s}):l(this,le).call(this,{campaignCustomerInstanceId:i,campaignId:n,customForm:h,popupContainer:s})}),s.querySelectorAll('[id^="u_content_form_"]').forEach(h=>l(this,le).call(this,{campaignCustomerInstanceId:i,campaignId:n,formDiv:h,popupContainer:s}));let S=s.querySelector(".u-close-button");return(S==null?void 0:S.getAttribute("href"))==="#"&&S.removeAttribute("href"),S==null||S.addEventListener("click",()=>c(this,null,function*(){s.remove(),yield m.recordEvent({campaignCustomerInstanceId:i,campaignId:n,eventName:re,eventProperties:[{eventProperty:"Close Click",value:JSON.stringify({campaignId:n})}],name:"close"})})),s.querySelectorAll('[id^="u_content_button_"]').forEach(h=>{h.addEventListener("click",()=>c(this,null,function*(){s.remove(),yield m.recordEvent({campaignCustomerInstanceId:i,campaignId:n,eventName:re,eventProperties:[{eventProperty:"Button Click",value:JSON.stringify({buttonId:h.id,campaignId:n})}],name:"click"})}))}),s.querySelectorAll(".u-popup-container img").forEach(h=>{h.addEventListener("click",()=>c(this,null,function*(){var L;((L=h.parentElement)==null?void 0:L.tagName)==="A"&&h.parentElement.getAttribute("href")&&s.remove(),yield m.recordEvent({campaignCustomerInstanceId:i,campaignId:n,eventName:re,eventProperties:[{eventProperty:"Image Click",value:JSON.stringify({campaignId:n,imageClassName:h.className,imageId:h.id})}],name:"click"})}))}),s},$t=function(e){p.showAfterScrollAction({data:e,displayMethod:o(this,w,Le).bind(this),timeValueKey:"campaignEntryTimeValue"})},Vt=function(e){p.storeActionInLocalStorage(e,"action","campaignId")},De=new WeakMap,E($,q);var ze=$,V=ze.getInstance();var Z,N,Gt,xe,Ht,Jt,Kt,jt,H=class H{constructor(){E(this,N);this.queue=Promise.resolve()}static getInstance(){var e;return l(H,Z)||(f(H,Z,new H),o(e=l(H,Z),N,Gt).call(e)),l(H,Z)}pushToQueue(e){let t=JSON.parse(localStorage.getItem("preInitializedEvents")||"[]");t.push(e),localStorage.setItem("preInitializedEvents",JSON.stringify(t))}recordEventsFromQueue(){return c(this,null,function*(){let e=JSON.parse(localStorage.getItem("preInitializedEvents")||"[]");if(Array.isArray(e))for(let t of e)yield this.recordEventPreInitialized(t)})}recordEvent(e,t){return c(this,null,function*(){g.isInitialized&&!g.loading?yield o(this,N,xe).call(this,e,t):this.pushToQueue(e)})}recordEventPreInitialized(e){return c(this,null,function*(){try{yield o(this,N,xe).call(this,e)}finally{o(this,N,jt).call(this,e.eventName)}})}recordDebugEvents(e){return c(this,null,function*(){g.debugLevel===4&&(!g.recordDebugEventsToggle||g.recordDebugEventsToggle[e.eventName])&&(yield o(this,N,xe).call(this,e))})}getStoredEvents(){let e=localStorage.getItem("events");return e?JSON.parse(e):{}}storeEventsAndPropertiesInLocalStorage(){return c(this,null,function*(){if(!localStorage.getItem("events")){let e=(yield this.fetchEventData()).data;if(e){localStorage.setItem("events",JSON.stringify(e));try{k.pushMessageToSW({events:e})}catch(t){}}}})}fetchEventData(){return c(this,null,function*(){try{return yield A.get(`${$e}`)}catch(e){throw new Error("Error fetching event data")}})}postEventRecord(e,t){return c(this,null,function*(){let i=null,n=null,r=new AbortController;return this.queue=this.queue.then(()=>c(this,null,function*(){try{if(e.events.length===0)throw new Error("No events to record");let s=yield A.post(`/v2${$e}${Tt}`,e,r.signal);if(s.success)return n=s,s;if(s.message===`Customer with id ${localStorage.getItem("customer")} not exists`)throw localStorage.removeItem("customer"),new Error("Re initializing customer Id")}catch(s){throw a(2,"Error posting event record:"),a(2,`name: ${s.name}`),a(2,`message: ${s.message}`),(s.name==="AbortError"||s.name==="TypeError"&&s.message==="Failed to fetch"||s.message==="Load failed")&&(a(2,"Request aborted"),t&&o(this,N,Kt).call(this,t)),i=new Error((s==null?void 0:s.message)||"Error posting event record"),s}return null})).catch(()=>{}),this.queue.then(()=>{if(i)throw i;return n})})}};Z=new WeakMap,N=new WeakSet,Gt=function(){return c(this,null,function*(){})},xe=function(e,t){return c(this,null,function*(){yield O("# record event",()=>c(this,null,function*(){var pt,mt,Et,vt;let{campaignCustomerInstanceId:i,campaignId:n,eventName:r,eventProperties:s,name:I,web_optin_instance_id:v}=e;a(1,"# Recording event"),D("Recording event",!0),C("Recording event Time",!0),a(1,"Event Payload"),a(1,{campaignCustomerInstanceId:i,eventName:r,eventProperties:s,name:I,web_optin_instance_id:v});let S=p.getPlatform();if(S==="Crawlers"||S==="Unknown")throw new Error("Invalid platform");r!=="Web Session Concluded"&&(yield p.checkTTL());let h=[];s&&h.push(...s),h.push({eventProperty:"Platform",value:S}),h.push({eventProperty:"operating-system",value:p.getOperatingSystem()}),h.push({eventProperty:"os-version",value:p.getOSVersion()});let L=this.getStoredEvents(),B=o(this,N,Ht).call(this,L,r,h);if(typeof B=="string"){a(2,B);return}p.updateSessionCreated();let{id:j}=L[r],F=o(this,N,Jt).call(this,z(_e(z(z(z({},i?{campaignCustomerInstanceId:i}:{}),n?{campaignId:n}:{}),v?{web_optin_instance_id:v}:{}),{eventId:j,eventProperties:B,sessionId:localStorage.getItem("session")||""}),I?{name:I}:{}));if(g.offline){let M=JSON.parse(localStorage.getItem("offlineEvents")||"[]");M.length<=50&&(M.push(...F.events),localStorage.setItem("offlineEvents",JSON.stringify(M)));return}let R=yield this.postEventRecord(F,e);(pt=R==null?void 0:R.data)!=null&&pt.optIn?(yield this.recordDebugEvents({eventName:"optin_data"}),k.showNotification(R.data.optIn)):r==="Viewed Webpage"&&(yield this.recordDebugEvents({eventName:"no_optin",eventProperties:[{eventProperty:"message",value:`${"Notification"in window&&typeof((mt=window==null?void 0:window.Notification)==null?void 0:mt.permission)!="undefined"}`}]})),(vt=(Et=R==null?void 0:R.data)==null?void 0:Et.campaigns)==null||vt.forEach(M=>{V.isPopupAction(M.message.name)?V.showPopup(M):de.isContentCardAction(M.message.name)&&de.showContentCard(M)}),C("Recording event Time",!1),D("Recording event",!1)}),i=>{A.getBrandId()==="67"&&i.message!=="Failed to fetch"&&i.message!=="Load failed"&&i.message.includes("Failed to fetch")},t)})},Ht=function(e,t,i){if(!Object.prototype.hasOwnProperty.call(e,t))return`Event ${t} is not valid.`;if(!i)return[];let n=e[t];if(!(n!=null&&n.eventProperty))return a(2,`Event ${t} does not have a valid eventProperty.`),`Event ${t} does not have a valid eventProperty.`;let r=i.filter(({eventProperty:s})=>!Object.prototype.hasOwnProperty.call(n.eventProperty,s)).map(({eventProperty:s})=>s);return r.length>0&&(a(2,`Filtering Event ${t} invalid eventProperties: ${r.join(", ")}.`),i=i.filter(({eventProperty:s})=>!r.includes(s))),i.map(({eventProperty:s,value:I})=>({eventPropertyId:n.eventProperty[s].id,value:I}))},Jt=function(e){return{customerId:localStorage.getItem("customer")||"",deviceId:localStorage.getItem("uniqueIdentity")||"",events:[e]}},Kt=function(e){a(1,"Adding to pre-initialized event:"),a(1,e);let t=localStorage.getItem("preInitializedEvents");t&&t!=="undefined"?(t=JSON.parse(t),t.push(e)):t=[e],localStorage.setItem("preInitializedEvents",JSON.stringify(t))},jt=function(e){let t=JSON.parse(localStorage.getItem("preInitializedEvents")||"[]"),i=t.findIndex(n=>n.eventName===e);i>=0&&t.splice(i,1),localStorage.setItem("preInitializedEvents",JSON.stringify(t))},E(H,Z);var Qe=H,m=Qe.getInstance();var X,P,zt,Ze,Yt,Qt,ue,Ue,qt,Zt,Xt,ke,J=class J{constructor(){E(this,P);E(this,ue,e=>{p.clearActionInLocalStorage({id:e,localStorageKey:"action"})});this.loadContentCardEventActionInLocalStorage=()=>{p.loadActionInLocalStorage({actionCondition:e=>e.message.name==="ContentCard",actionMethod:e=>o(this,P,Ze).call(this,e.campaignId),localStorageKey:"action"})};E(this,ke,()=>{p.storeActionInLocalStorageInternal("action")})}static getInstance(){var e;return l(J,X)||(f(J,X,new J),o(e=l(J,X),P,zt).call(e)),l(J,X)}showContentCard(e){let t=JSON.parse(localStorage.getItem("action")||"{}");if(t&&t[e==null?void 0:e.campaignId]){a(1,"ContentCard already in cache");return}o(this,P,Xt).call(this,e),l(this,ke).call(this),o(this,P,Ze).call(this,e.campaignId)}isContentCardAction(e){return e==="content_card"}};X=new WeakMap,P=new WeakSet,zt=function(){return c(this,null,function*(){})},Ze=function(e){let t=o(this,P,Yt).call(this);if(document.getElementById(`contentCard_container_${e}`)){a(1,"ContentCard already displayed"),l(this,ue).call(this,e);return}if(t!=null&&t[e])switch(t[e].campaignEntryTime){case"DELAY":{o(this,P,Qt).call(this,t[e]);break}case"IMMEDIATELY":{o(this,P,Ue).call(this,t[e]);break}case"SCROLL":{o(this,P,Zt).call(this,t[e]);break}default:return}},Yt=function(){let e=localStorage.getItem("action");return e?JSON.parse(e):null},Qt=function(e){p.showDelayedAction({clearActionMethod:l(this,ue).bind(this),data:e,displayMethod:o(this,P,Ue).bind(this),idKey:"campaignId",timeValueKey:"campaignEntryTimeValue"})},ue=new WeakMap,Ue=function(e){var t;if(document.getElementById(`contentCard_container_${e.campaignId}`))a(1,"ContentCard already displayed");else{let i=o(this,P,qt).call(this,"div",e),n=document.querySelector(`#${e.message.divId}`);n&&(n.innerHTML=i.outerHTML,m.recordEvent({campaignCustomerInstanceId:e.campaignCustomerInstanceId,campaignId:e.campaignId,eventName:Ge,eventProperties:[{eventProperty:"Content Card View",value:JSON.stringify({campaignId:e.campaignId})}],name:"view"}),(t=document.getElementById(`contentCard_container_${e.campaignId}`))==null||t.addEventListener("click",()=>{m.recordEvent({campaignCustomerInstanceId:e.campaignCustomerInstanceId,campaignId:e.campaignId,eventName:Ge,eventProperties:[{eventProperty:"Content Card Click",value:JSON.stringify({campaignId:e.campaignId})}],name:"click"})}))}l(this,ue).call(this,e.campaignId)},qt=function(e,t){var s;let{campaignId:i,message:{design:n}}=t,r=document.createElement(e);return r.id=`contentCard_container_${i}`,r.innerHTML=n,(s=r.querySelector(".u-close-button"))==null||s.remove(),r},Zt=function(e){p.showAfterScrollAction({data:e,displayMethod:o(this,P,Ue).bind(this),timeValueKey:"campaignEntryTimeValue"})},Xt=function(e){p.storeActionInLocalStorage(e,"action","campaignId")},ke=new WeakMap,E(J,X);var qe=J,de=qe.getInstance();var ge,he,be,Se,ye,Te,we,Fe,u,ei,ti,ii,fe,et,tt,it,nt,ni,ri,rt,ot,oi,si,ai,st,at,ci,li,ee=class ee{constructor(){E(this,u);E(this,he);E(this,be);E(this,Se);E(this,ye,null);E(this,Te,null);E(this,we,!1);E(this,Fe,()=>{setInterval(()=>{O("listen to shopify data",()=>c(this,null,function*(){let e=localStorage.getItem("mergn_shopify");if(e!==l(this,Te)){a(1,"Shopify data changed"),f(this,Te,e);let t=JSON.parse(e||"{}");if(t!=null&&t.pushMessageToSW){a(1,"Pushing message to SW from Shopify data");let i=t.pushMessageToSW;delete t.pushMessageToSW,localStorage.setItem("mergn_shopify",JSON.stringify(t)),k.pushMessageToSW(i)}if(t!=null&&t.optIn){let i=t.optIn;delete t.optIn,localStorage.setItem("mergn_shopify",JSON.stringify(t)),k.showNotification(i)}if(t!=null&&t.campaigns){let i=t.campaigns;delete t.campaigns,localStorage.setItem("mergn_shopify",JSON.stringify(t)),i.forEach(n=>{V.isPopupAction(n.message.name)?V.showPopup(n):de.isContentCardAction(n.message.name)&&de.showContentCard(n)})}}}))},1e3)});this.storeActionInLocalStorageInternal=e=>{let t=()=>{let i=JSON.parse(localStorage.getItem(e)||"{}");Object.keys(i).forEach(n=>{i[n].initialTime=new Date().getTime()}),localStorage.setItem(e,JSON.stringify(i))};t(),window.addEventListener("beforeunload",t)};this.clearActionInLocalStorage=({id:e,localStorageKey:t})=>{let i=JSON.parse(localStorage.getItem(t)||"{}");i[e]&&delete i[e],localStorage.setItem(t,JSON.stringify(i))};this.loadActionInLocalStorage=({actionCondition:e,actionMethod:t,localStorageKey:i})=>{let n=JSON.parse(localStorage.getItem(i)||"{}");Object.keys(n).forEach(r=>{e(n[r])&&t(n[r])})}}static getInstance(){return l(ee,ge)||f(ee,ge,new ee),l(ee,ge)}init(e,t){return c(this,null,function*(){a(1,"Initializing base service");let i=o(this,u,fe).call(this);t!=null&&t.shopify&&f(this,we,!0),o(this,u,ei).call(this,e);let n=this.getPlatform();if(n==="Crawlers"||n==="Unknown"){a(2,"Not initializing base service for crawlers or unknown platforms");return}if(yield A.syncRealWorldTime(),a(1,"Verifying API Key"),yield o(this,u,st).call(this,3),t!=null&&t.shopify&&l(this,Fe).call(this),t!=null&&t.identity)try{g.loading=!0,yield this.setIdentity(t.identity)}finally{g.loading=!1}yield this.checkTTL(),yield m.recordEventsFromQueue(),yield G.recordAttributeFromQueue(),m.recordDebugEvents({eventName:"base_init"}),a(1,"Initializing notification service from Base Service"),yield O("notification service",()=>c(this,null,function*(){yield k.init(i,t==null?void 0:t.swPath)})),yield o(this,u,li).call(this,t==null?void 0:t.shopify);let r=history.pushState;history.pushState=(...s)=>{r.apply(history,s),o(this,u,ci).call(this,t==null?void 0:t.shopify)},a(1,"tracking page change register")})}setPlatform(e){f(this,he,e)}setOSVersion(e){f(this,be,e)}setOperatingSystem(e){f(this,Se,e)}setPreviousUrl(e){f(this,ye,e)}getPreviousUrl(){return l(this,ye)}getPlatform(){return l(this,he)}getOSVersion(){return l(this,be)}getOperatingSystem(){return l(this,Se)}updateSessionCreated(){}showAfterScrollAction({data:e,displayMethod:t,timeValueKey:i}){let n=()=>{var S;let r=window.innerHeight,s=document.documentElement.scrollHeight;window.scrollY/(s-r)*100>(((S=e[i])==null?void 0:S.value)||0)&&(window.removeEventListener("scroll",n),t(e))};window.addEventListener("scroll",n)}showDelayedAction({clearActionMethod:e,data:t,displayMethod:i,idKey:n,timeValueKey:r}){var v,S,h;let s=(v=t[r])==null?void 0:v.value;((S=t[r])==null?void 0:S.duration)==="min"&&(s=s*60);let I=t.initialTime-500+(s||0)*1e3-new Date().getTime();a(1,`Initial time: ${t.initialTime}`),a(1,`Time value: ${(h=t[r])==null?void 0:h.value}`),a(1,`Current time: ${new Date().getTime()}`),a(1,`Time difference: ${I}`),I>0?setTimeout(()=>{e(t[n]),i(t)},I):(e(t[n]),i(t))}storeActionInLocalStorage(e,t,i){var s;let n=JSON.parse(localStorage.getItem(t)||"{}"),r=(s=i in e&&e[i])!=null?s:"";r&&(n[r]=_e(z({},e),{initialTime:new Date().getTime()}),localStorage.setItem(t,JSON.stringify(n)))}checkTTL(){return c(this,null,function*(){yield O("# check TTL",()=>c(this,null,function*(){if(l(this,we))return;a(1,"Checking TTL"),D("Checking TTL",!0),C("Checking TTL Time",!0);let e=localStorage.getItem("ttl"),t=!1;if(t=o(this,u,fe).call(this,e),t){let i=localStorage.getItem("session"),n=localStorage.getItem("ttl");if(i&&n){let r=parseInt(n,10);yield m.recordEvent({eventName:"Web Session Concluded",eventProperties:[{eventProperty:"SESSION_ID",value:localStorage.getItem("session")},{eventProperty:"SESSION_CREATED",value:Number.isInteger(r)?new Date(r).toISOString():new Date().toISOString()}]})}localStorage.removeItem("ttl"),localStorage.removeItem("session"),localStorage.setItem("ttl",`${new Date().getTime()}`),yield o(this,u,ot).call(this),this.clearLocalStorage()}(!e||t||o(this,u,ri).call(this))&&(o(this,u,nt).call(this)&&o(this,u,rt).call(this),o(this,u,it).call(this)&&(yield this.setIdentity()),(o(this,u,fe).call(this)||o(this,u,et).call(this))&&(yield o(this,u,si).call(this)),yield o(this,u,ot).call(this),(o(this,u,fe).call(this)||o(this,u,tt).call(this))&&(yield o(this,u,ai).call(this))),C("Checking TTL Time",!1),D("Checking TTL",!1)}))})}clearLocalStorage(){localStorage.removeItem("action"),localStorage.removeItem("events"),localStorage.removeItem("attributes"),localStorage.removeItem("offlineEvents")}checkIfIdentityExists(e){let t=this.getCookie("mergn_identity");if(t&&t!=="undefined"){let i=this.decodeData(t);return e&&e===i?!0:i}return!1}storeIdentity(e){let t=this.encodeData(e);this.setCookie("mergn_identity",t,365)}encodeData(e){let i=new TextEncoder().encode(e),n="";for(let r=0;r<i.length;r++)n+=String.fromCharCode(i[r]);return btoa(n)}decodeData(e){let t=atob(e),i=new Uint8Array(t.length);for(let r=0;r<t.length;r++)i[r]=t.charCodeAt(r);return new TextDecoder().decode(i)}getCookie(e){var n;let i=`; ${document.cookie}`.split(`; ${e}=`);return i.length===2&&((n=i.pop())==null?void 0:n.split(";").shift())||null}setCookie(e,t,i){let n=new Date;n.setTime(n.getTime()+i*24*60*60*1e3);let r=`expires=${n.toUTCString()}`;document.cookie=`${e}=${t}; ${r}; path=/; secure; SameSite=Strict`}setIdentity(e){return c(this,null,function*(){let t=this.checkIfIdentityExists(e);if(typeof t=="boolean"&&t)return;let i=localStorage.getItem("uniqueIdentity");(!i||i==="undefined")&&(i=o(this,u,rt).call(this));let n={deviceId:i,os:this.getPlatform()};if(e)n.identity=e;else if(typeof t=="string")n.identity=t;else if(!e&&localStorage.getItem("customer"))return;try{let r=yield o(this,u,oi).call(this,n);if(r!==void 0){localStorage.setItem("customer",r),this.storeIdentity(n.identity);try{k.pushMessageToSW({customer:r})}catch(s){}}}catch(r){throw new Error("Error setting identity")}})}};ge=new WeakMap,he=new WeakMap,be=new WeakMap,Se=new WeakMap,ye=new WeakMap,Te=new WeakMap,we=new WeakMap,Fe=new WeakMap,u=new WeakSet,ei=function(e){A.updateAPIKey(e),this.setPlatform(o(this,u,ti).call(this)),this.setOSVersion(o(this,u,ii).call(this)),this.setOperatingSystem(navigator.userAgent)},ti=function(){var t;let e=navigator.userAgent.toLowerCase();return/googlebot|bingbot|yandexbot|duckduckbot|slurp|twitterbot|linkedinbot|facebot|pinterest|vkshare|applebot|baiduspider|adsbot-google|msnbot|yahoobot|sogou|facebookexternalhit/i.test(e)?"Crawlers":/wv|wkwebview|instagram|facebook|fbav|fban|twitter|snapchat|pinterest|linkedin|tiktok/i.test(e)?"Mobile":/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(e)?("Notification"in window&&typeof((t=window==null?void 0:window.Notification)==null?void 0:t.permission)!="undefined","Mobile"):/windows|macintosh|linux|x11/i.test(e)?"Web":"Unknown"},ii=function(){let e=navigator.userAgent,t;return e.indexOf("Instagram")>-1?t="Instagram":e.indexOf("Facebook")>-1||e.indexOf("FBAV")>-1||e.indexOf("FBAN")>-1?t="Facebook":e.indexOf("Twitter")>-1?t="Twitter":e.indexOf("Snapchat")>-1?t="Snapchat":e.indexOf("LinkedIn")>-1?t="LinkedIn":e.indexOf("TikTok")>-1?t="TikTok":e.indexOf("Chrome")>-1&&e.indexOf("Edg")===-1?t="Google Chrome":e.indexOf("Safari")>-1&&e.indexOf("Chrome")===-1?t="Safari":e.indexOf("Firefox")>-1?t="Mozilla Firefox":e.indexOf("Edg")>-1?t="Microsoft Edge":e.indexOf("MSIE")>-1||e.indexOf("Trident")>-1?t="Internet Explorer":e.indexOf("Opera")>-1||e.indexOf("OPR")>-1?t="Opera":e.indexOf("Vivaldi")>-1?t="Vivaldi":e.indexOf("Brave")>-1?t="Brave":e.indexOf("SamsungBrowser")>-1?t="Samsung Internet":e.indexOf("UCBrowser")>-1?t="UC Browser":e.indexOf("QQBrowser")>-1?t="QQ Browser":e.indexOf("Baidu")>-1?t="Baidu Browser":e.indexOf("Sogou")>-1?t="Sogou Browser":t="Unknown",t},fe=function(e){let t;return e||(t=localStorage.getItem("ttl")),e||t?new Date().getTime()-parseInt(e||t||"",10)>12e5:!0},et=function(){return!localStorage.getItem("events")},tt=function(){return!localStorage.getItem("attributes")},it=function(){return!localStorage.getItem("customer")},nt=function(){return!localStorage.getItem("uniqueIdentity")},ni=function(){return!localStorage.getItem("session")},ri=function(){return o(this,u,et).call(this)||o(this,u,tt).call(this)||o(this,u,it).call(this)||o(this,u,nt).call(this)||o(this,u,ni).call(this)},rt=function(){let e=localStorage.getItem("uniqueIdentity");return e||(e=crypto.randomUUID(),localStorage.setItem("uniqueIdentity",e)),e},ot=function(){return c(this,null,function*(){yield O("store session",()=>c(this,null,function*(){let e=localStorage.getItem("session");if(!e){e=crypto.randomUUID(),localStorage.setItem("session",e);let t=localStorage.getItem("ttl"),i=t?parseInt(t,10):"";yield m.recordEvent({eventName:"Web Session Started",eventProperties:[{eventProperty:"SESSION_ID",value:localStorage.getItem("session")},{eventProperty:"SESSION_CREATED",value:i?new Date(i).toISOString():new Date().toISOString()}]})}}),e=>{A.getBrandId()==="67"&&e.message!=="Failed to fetch"&&e.message})})},oi=function(e){return c(this,null,function*(){try{return(yield A.post(`${wt}${Pt}`,e)).data}catch(t){throw new Error("Error posting identity data")}})},si=function(){return c(this,null,function*(){yield m.storeEventsAndPropertiesInLocalStorage()})},ai=function(){return c(this,null,function*(){yield G.storeAttributeInLocalStorage()})},st=function(e){return c(this,null,function*(){yield O("verify API key",()=>c(this,null,function*(){var t;try{let i=parseInt(localStorage.getItem("verifyTTL")||"0",10)||0;if(!i||i&&new Date().getTime()>i){let n=yield A.get("/brand");if(!(n!=null&&n.success))throw new Error(JSON.stringify(n));localStorage.setItem("verifyTTL",(new Date().getTime()+3e5).toString())}g.disableSDK=!1,g.isInitialized=!0}catch(i){if(A.getBrandId()==="67"&&!((t=i==null?void 0:i.message)!=null&&t.startsWith("get"))&&(i==null?void 0:i.message)!=="Error verifying API key"&&i.message!=="Failed to fetch"&&i.message,e&&e>=1){yield new Promise(n=>setTimeout(n,1500)),yield o(this,u,st).call(this,e-1);return}throw g.disableSDK=!0,new Error("Error verifying API key")}}))})},at=function(e){return c(this,null,function*(){var n;a(1,"Performing viewed web page event");let t=(n=window==null?void 0:window.location)==null?void 0:n.href;if(this.setPreviousUrl(t),e){t.includes("thank_you")&&(yield m.recordEvent({eventName:"Thank you page"}));return}m.recordDebugEvents({eventName:"pre_vwp"});let i=[];new URLSearchParams(new URL(window.location.href).search).forEach((r,s)=>c(this,null,function*(){Rt.has(s)&&i.push({eventProperty:s,value:r})})),yield m.recordEvent({eventName:"Viewed Webpage",eventProperties:[{eventProperty:"URL",value:window.location.pathname},...i]})})},ci=function(e){return c(this,null,function*(){var i;a(1,"Tracking page change");let t=(i=window==null?void 0:window.location)==null?void 0:i.href;(this.getPreviousUrl()===null||this.getPreviousUrl()===void 0||t!==this.getPreviousUrl())&&(yield o(this,u,at).call(this,e))})},li=function(e){return c(this,null,function*(){var i,n;let t=(i=window==null?void 0:window.location)==null?void 0:i.href;m.recordDebugEvents({eventName:"show_notification_error",eventProperties:[{eventProperty:"message",value:`${t!==this.getPreviousUrl()}:${t}:${this.getPreviousUrl()}`}]});try{yield o(this,u,at).call(this,e)}catch(r){let s=r&&r.message?(n=r==null?void 0:r.message)==null?void 0:n.substring(0,100):"undefined";yield m.recordDebugEvents({eventName:"vwp_error",eventProperties:[{eventProperty:"message",value:`${s}`}]})}})},E(ee,ge);var Xe=ee,p=Xe.getInstance();var te,pe,_,di,ui,gi,We,lt,dt,pi,mi,K=class K{constructor(){E(this,_);E(this,pe,!1)}static getInstance(){var e;return l(K,te)||(f(K,te,new K),o(e=l(K,te),_,di).call(e)),l(K,te)}recordAttributeFromQueue(){return c(this,null,function*(){yield O("# recordAttributeFromQueue",()=>c(this,null,function*(){let e=JSON.parse(localStorage.getItem("preInitializedAttributes")||"[]");if(Array.isArray(e))for(let t of e){if(a(1,"Recording pre-initialized attributes"),a(1,t),yield this.checkIfAttributeExists(t.attributeName,t.attributeValue)){a(1,`Pre Initialized Attribute ${t.attributeName} already exists with value ${t.attributeValue}`),o(this,_,We).call(this,t.attributeName,t.attributeValue);return}yield o(this,_,lt).call(this,{attributeName:t.attributeName,attributeValue:t.attributeValue})}}))})}recordAttribute(e,t,i){return c(this,null,function*(){if(yield this.checkIfAttributeExists(e,t)){a(1,`Attribute ${e} already exists with value ${t}`),o(this,_,We).call(this,e,t);return}o(this,_,gi).call(this,e),o(this,_,ui).call(this,e,t),g.isInitialized&&!g.loading&&(yield o(this,_,lt).call(this,{attributeName:e,attributeProperties:i,attributeValue:t}))})}storeAttributeInLocalStorage(){return c(this,null,function*(){if(!localStorage.getItem("attributes")&&!l(this,pe)){f(this,pe,!0);try{let e=(yield this.fetchAttributeData()).data;e&&localStorage.setItem("attributes",JSON.stringify(e))}catch(e){throw new Error("Error storing attribute data in local storage")}finally{f(this,pe,!1)}}})}fetchAttributeData(){return c(this,null,function*(){try{return yield A.get(`${Me}`)}catch(e){throw new Error("Error fetching attribute data")}})}storeAttribute(e,t){return c(this,null,function*(){let i=p.getCookie("mergn_customer_attributes"),n;if(!i)n={};else{let s=p.decodeData(i);n=JSON.parse(s)}n[e]=t;let r=p.encodeData(JSON.stringify(n));p.setCookie("mergn_customer_attributes",r,365)})}checkIfAttributeExists(e,t){return c(this,null,function*(){let i=p.getCookie("mergn_customer_attributes");if(!i)return!1;let n=p.decodeData(i),r=JSON.parse(n);return Object.prototype.hasOwnProperty.call(r,e)?t!==void 0?r[e]===t:!0:!1})}};te=new WeakMap,pe=new WeakMap,_=new WeakSet,di=function(){return c(this,null,function*(){})},ui=function(e,t){let i=JSON.parse(localStorage.getItem("preInitializedAttributes")||"[]");i.push({attributeName:e,attributeValue:t}),localStorage.setItem("preInitializedAttributes",JSON.stringify(i))},gi=function(e){return c(this,null,function*(){let t=JSON.parse(localStorage.getItem("preInitializedAttributes")||"[]");for(let i of t)i.attributeName===e&&(t.splice(t.indexOf(i),1),localStorage.setItem("preInitializedAttributes",JSON.stringify(t)))})},We=function(e,t){return c(this,null,function*(){let i=JSON.parse(localStorage.getItem("preInitializedAttributes")||"[]");for(let n of i)JSON.stringify(n)===JSON.stringify({attributeName:e,attributeValue:t})&&(i.splice(i.indexOf(n),1),localStorage.setItem("preInitializedAttributes",JSON.stringify(i)))})},lt=function(n){return c(this,arguments,function*({attributeName:e,attributeProperties:t,attributeValue:i}){yield O("# recordAttribute",()=>c(this,null,function*(){if(a(1,"Recording attribute"),D("Recording attribute",!0),C("Recording attribute Time",!0),a(1,"Attribute Payload:"),a(1,`Attribute Name: ${e} | Attribute Value: ${i}`),!i||i===""){a(2,"Attribute value is required");return}yield p.checkTTL(),yield o(this,_,pi).call(this);let r=JSON.parse(localStorage.getItem("attributes")||"{}"),s=t?o(this,_,dt).call(this,r,e,t):o(this,_,dt).call(this,r,e);if(typeof s=="string"){a(2,s);return}r[e].should_set_identity&&(yield p.setIdentity(typeof i=="string"?i:JSON.stringify(i))),p.updateSessionCreated();let{id:I}=r[e],v={attributeId:I,attributeProperties:s,customerId:localStorage.getItem("customer")||"",value:i};yield o(this,_,mi).call(this,v,e,i),o(this,_,We).call(this,e,i),C("Recording attribute Time",!1),D("Recording attribute",!1)}))})},dt=function(e,t,i){if(!Object.prototype.hasOwnProperty.call(e,t))return`Attribute ${t} is not valid.`;if(!i)return[];let n=e[t];if(!(n!=null&&n.attributeProperty))return`Attribute ${t} does not have a valid attributeProperty.`;let r=i.filter(({attributeProperty:s})=>!Object.prototype.hasOwnProperty.call(n.attributeProperty,s)).map(({attributeProperty:s})=>s);return r.length>0?`Attribute ${t} has invalid attributeProperties: ${r.join(", ")}.`:i.map(({attributeProperty:s,value:I})=>({attributePropertyId:n.attributeProperty[s].id,value:I}))},pi=function(){return c(this,null,function*(){localStorage.getItem("attributes")||(yield this.storeAttributeInLocalStorage())})},mi=function(e,t,i){return c(this,null,function*(){try{let n=yield A.post(`${Me}${yt}`,e);return yield this.storeAttribute(t,i),n}catch(n){throw new Error("Error posting attribute record")}})},E(K,te);var ct=K,G=ct.getInstance();var me,ie=class ie{constructor(){}static getInstance(){return l(ie,me)||f(ie,me,new ie),l(ie,me)}init(e,t){setTimeout(()=>{O("init",()=>c(this,null,function*(){yield O("log level check",()=>c(this,null,function*(){a(1,"Log level check");let i=localStorage.getItem("mergn_debug_level");i&&(g.debugLevel=parseInt(i,10))})),a(1,"Initializing Mergn SDK"),yield p.init(e,t),m.recordDebugEvents({eventName:"mergn_init"}),a(1,"Mergn SDK Initialized"),window.addEventListener("online",()=>c(this,null,function*(){g.offline=!1;let i=JSON.parse(localStorage.getItem("offlineEvents")||"[]");Array.isArray(i)&&(yield m.postEventRecord({customerId:localStorage.getItem("customer")||"",deviceId:localStorage.getItem("uniqueIdentity")||"",events:i}),localStorage.removeItem("offlineEvents")),p.checkTTL(),p.updateSessionCreated()})),window.addEventListener("offline",()=>{g.offline=!0}),window.addEventListener("load",()=>{V.loadPopupEventActionInLocalStorage(),k.loadWebPushActionInLocalStorage()})}))})}setDebugLevel(e,t){let i=localStorage.getItem("mergn_debug_level");if(i){g.debugLevel=parseInt(i,10);return}if(!(e in x)){console.error(`Debug level must be according to:
|
|
74
|
-
NONE: 0, INFO: 1, ERROR: 2, ALL: 3`);return}g.recordDebugEventsToggle=t||{},g.debugLevel=e;try{k.pushMessageToSW({debugLevel:e})}catch(n){}}recordAttribute(e,t){return c(this,null,function*(){return a(1,"attributeName"),a(1,e),a(1,"attributeValue"),a(1,t),new Promise((i,n)=>{setTimeout(()=>c(this,null,function*(){try{yield O("recordAttribute",()=>c(this,null,function*(){let r;Array.isArray(t)?r=JSON.stringify(t):typeof t=="number"?r=`${t}`:r=t,a(1,"Recording attribute"),a(1,`Attribute Name: ${e}, Attribute Value: ${r}`),yield G.recordAttribute(e,r)})),i()}catch(r){n(r)}}))})})}login(e){return c(this,null,function*(){return new Promise((t,i)=>{setTimeout(()=>c(this,null,function*(){try{yield O("login",()=>c(this,null,function*(){a(1,"Logging in"),a(1,`Identity: ${e}`),g.loading=!0,yield p.setIdentity(e)})),t()}catch(n){i(n)}finally{g.loading=!1,yield m.recordEventsFromQueue(),yield G.recordAttributeFromQueue()}}))})})}logout(){setTimeout(()=>{O("logout",()=>c(this,null,function*(){a(1,"Logging out"),p.clearLocalStorage()}))})}recordEvent(e,t){return c(this,null,function*(){return new Promise((i,n)=>{setTimeout(()=>c(this,null,function*(){try{yield O("record event",()=>c(this,null,function*(){if(a(1,"Recording event"),a(1,`Event Payload:
|
|
75
|
-
${{eventName:e,eventProperties:t}}`),!e||typeof e!="string"){a(2,"Event name is required and must be a string");return}yield m.recordEvent({eventName:e,eventProperties:t})})),i()}catch(r){n(r)}}))})})}getVersion(){return bt}};me=new WeakMap,E(ie,me);var ut=ie,gt=ut.getInstance();typeof window!="undefined"&&(window.mergn=gt);var jr=gt;})();
|
|
1
|
+
'use strict';function _0x2da8(){const _0x12db43=['\x0awidth:\x2025%;\x0a','/customer','checkIfIdentityExists',',\x20Attribute\x20Value:\x20','number','SamsungBrowser','className','\x20not\x20exists','remove','toISOString','Event\x20','isPopupAction','recordAttributeFromQueue','button_2','Attribute\x20Payload:','recordEventsFromQueue','Recording\x20event','Turned\x20Off\x20Notification\x20Reset\x20Permission','mergn_init','text_color','MSIE','location','innerHTML','LinkedIn','\x0apadding:\x2012px\x2020px;\x0aborder:\x20none;\x0abackground-color:\x20\x20','height','Opera','beforeunload','toLowerCase','Displayed\x20Web\x20Push\x20Subscription','mergn-row','27171456HAwAGc','DEBUG','Checking\x20TTL\x20Time','setItem','getAttribute','initialTime','reject','Microsoft\x20Edge','script','Pushing\x20message\x20to\x20service\x20worker\x20for\x20initialization','763827pDSgnE','Content\x20Card\x20Click','zIndex','check_permission','cssText','getElementById','7007119meuZLR','disableSDK','read\x20from\x20private\x20field','padding','recordAttribute','push_manager','campaigns','filter','attributeName','forEach','splice','min','Error\x20setting\x20identity','cookie','verifyTTL','debugLevel','Twitter','getPlatform','Initial\x20time:\x20','TikTok','pushMessageToSW','campaignEntryTime','swPath','add','Google\x20Chrome','type','loadContentCardEventActionInLocalStorage','encodeData','banner_color','IMMEDIATELY','getAPIKey','apiKey','Crawlers','Error\x20posting\x20event\x20record','view','getVersion','startsWith','banner_icon','notification_service_not_initialized','setApiURL','Error\x20fetching\x20attribute\x20data','div','#\x20check\x20TTL','ContentCard\x20already\x20in\x20cache','Mergn\x20SDK\x20Initialized','.u-popup-overlay','Mergn\x20SDK\x20is\x20disabled!','attributeValue','clearActionInLocalStorage','No\x20events\x20to\x20record','storeActionInLocalStorageInternal','fetchAttributeData','web_push_action','entry_time','Allowed\x20Web\x20Push\x20Subscription','Initializing\x20notification\x20service\x20from\x20Base\x20Service','info','Pre\x20Initialized\x20Attribute\x20','SCROLL','utm_source','Tracking\x20page\x20change','/mergn-sw.js','decode','removeAttribute','map','Invalid\x20platform','textContent','Form\x20submitted\x20values:','Log\x20level\x20check','logo','/set-identity','getBrandId','offlineEvents','The\x20user\x20has\x20blocked\x20notifications.','ALL','Popup\x20overlay\x20element\x20found','close','Safari','showAfterScrollAction','8355625CCICVw','done','Attribute\x20','string','text','Adding\x20to\x20pre-initialized\x20event:','bind','Failed\x20to\x20fetch','tracking\x20page\x20change\x20register','Recording\x20attribute','FBAV','pre_vwp','Event\x20Payload:\x0a\x20','encode','json','alt','attributes','identity','mergn-column-75','keys','Popup\x20already\x20in\x20cache','eventProperty','\x0awidth:\x2073%;\x0amargin-left:\x202%;\x0a','groupEnd','Sogou','record\x20event','os-version','auto','/record-event','Load\x20failed','optIn','getInstance','Attribute\x20Name:\x20','eventName','updateSessionCreated','group','outerHTML','click','fixed','throw','existing_subscription','Time\x20value:\x20','Re\x20initializing\x20customer\x20Id','UTM_TERM','SESSION_CREATED','Viewed\x20Web\x20Push\x20Soft-ask','The\x20user\x20has\x20already\x20enabled\x20notifications.','popup_container_','OPR','Service\x20Worker\x20registration','submit','message:\x20','attributeProperty','getOwnPropertySymbols','setDebugLevel','User\x20closed\x20the\x20notification\x20permission\x20dialog.','PUT','getCookie','\x20is\x20not\x20valid.','substring','Content\x20Card\x20Action','storeAttributeInLocalStorage','has','scrollHeight','removeItem','Platform','\x0abackground-color:\x20','expires=','action','optin_data','then','subtitle','Closed\x20Web\x20Push\x20Subscription','name:\x20','viewed','values','NONE','\x0aUnexpected\x20error:\x20','banner_title','recordEvent','getTime','web_optin_instance_id','login','register','Notification',';\x0apadding:\x2015px;\x0aborder-radius:\x205px;\x0amax-width:\x20380px;\x0amax-height:\x20463px;\x0a','UTCDate','button-container','getRegistrations','post','Firefox','logout','Debug\x20level\x20must\x20be\x20according\x20to:\x0a\x20NONE:\x200,\x20INFO:\x201,\x20ERROR:\x202,\x20ALL:\x203','message','two_step','Trident','name','application/json','clearLocalStorage','Attribute\x20value\x20is\x20required','UC\x20Browser','length','recordEventPreInitialized','/brand/get-time','1172742nagQRQ','showNotification','Baidu\x20Browser','top','updateAPIKey','resolve','fetchEventData','postMessage','\x20Time','href','serviceWorker','Blocked\x20Web\x20Push\x20Subscription','scrollY','Popup','UTM_SOURCE','gclid','fbclid','documentElement','apply','put','button_1','isContentCardAction','img','lastSyncTime','Failed\x20to\x20sync\x20real-world\x20time','INFO:\x20','Service\x20Worker\x20registered','join','setPlatform','Time\x20difference:\x20','src','notification_permission_error','showContentCard','next','\x20already\x20exists\x20with\x20value\x20','overflow','Viewed\x20Webpage','Notification\x20service\x20is\x20not\x20initialized','Not\x20initializing\x20base\x20service\x20for\x20crawlers\x20or\x20unknown\x20platforms','campaignId','mergnWebPushPopup','permission','pushManager','utm_campaign','Snapchat','Customer\x20with\x20id\x20','Initializing\x20base\x20service','ContentCard\x20already\x20displayed','offline','TypeError','defineProperty','Service\x20Worker\x20and\x20Push\x20Manager\x20are\x20supported','success','Accepted\x20Web\x20Push\x20Soft-ask','hidden','1.0.179','match','load','Initializing\x20Mergn\x20SDK','boolean','QQ\x20Browser','setCookie','getItem','Thank\x20you\x20page','stringify','duration','events','Mergn\x20is\x20offline!','Service\x20Worker\x20ready','mergn-column-25','3910122SVVzhm','Error\x20posting\x20attribute\x20record','createElement','vwp_error','storeEventsAndPropertiesInLocalStorage','listen\x20to\x20shopify\x20data','gad_source','style','shopify','INFO','Error\x20posting\x20event\x20record:','ttl','init_condition','Mergn\x20not\x20initialized!','decodeData','subscribed','showPopup','push','Cannot\x20','GCLID','indexOf','brandId','service_worker','setIdentity','utm_medium','Failed\x20to\x20push\x20message\x20to\x20service\x20worker:\x20','.u-popup-container\x20img','verify\x20API\x20key','parse','Edg','log\x20level\x20check','Image','banner_design','Recording\x20pre-initialized\x20attributes','mergn_identity','Mergn\x20is\x20loading!',';\x0acolor:\x20','User\x20granted\x20the\x20notification\x20permission.','pushToQueue','operating-system','mergn_customer_attributes','unsubscribe','/brand/get-web-push-public-key','customer','Content\x20Card\x20View','Logging\x20out','Shopify\x20data\x20changed','\x0aposition:\x20fixed;\x0atop:\x200;\x0aleft:\x200;\x0awidth:\x20100%;\x0aheight:\x20100%;\x0abackground-color:\x20rgba(0,\x200,\x200,\x200.5);\x0az-index:\x2099999999999;\x0adisplay:\x20flex;\x0ajustify-content:\x20center;\x0aalign-items:\x20start;\x0a','includes','catch','color','Error\x20posting\x20identity\x20data','left','Already\x20Registered\x20To\x20Web\x20Push','loadPopupEventActionInLocalStorage','#\x20Recording\x20event','innerHeight','showDelayedAction','thank_you','\x20-\x20','pathname','\x20does\x20not\x20have\x20a\x20valid\x20eventProperty.','DELAY','split','active','URL','requestPermission','prototype','Cannot\x20add\x20the\x20same\x20private\x20member\x20more\x20than\x20once','online','value','OriginateFrom:\x20','getStoredEvents','removeEventListener','randomUUID','ERROR:\x20','SESSION_ID','onLine','scroll','setProperty','setPreviousUrl','uniqueIdentity','hasOwnProperty','User\x20denied\x20the\x20notification\x20permission.','Unknown','Filtering\x20Event\x20','test','contentCard_container_','setTime','display','notification_data','UTM_MEDIUM','Service\x20Worker\x20registration\x20is\x20available','.u-popup-container','MergnError','/event','preInitializedEvents','form','UTC\x20Date\x20or\x20last\x20sync\x20time\x20is\x20not\x20set','8OudptW','storeAttribute','already_registered','title','GAD_SOURCE','time','important','session','default','getOSVersion','Facebook','denied','centered-image','get','queue','#\x20recordAttributeFromQueue','show_notification_error','Checking\x20TTL','UTM_CONTENT','userAgent','button-1','utm_term','Form\x20Submit','Chrome','entry_time_value','init','ERROR','setOSVersion','[id^=\x22u_content_button_\x22]','getOperatingSystem','u_content_form_','ContentCard','campaignEntryTimeValue','call','Request\x20aborted','checkTTL','1301025AAjNtG','.u-close-button','button','toString','data','toUTCString','Error\x20verifying\x20API\x20key','storeActionInLocalStorage','loading','isInitialized','PushManager','getOwnPropertyDescriptors','99999999','campaignCustomerInstanceId','mergn_shopify','error','Mobile','\x20does\x20not\x20have\x20a\x20valid\x20attributeProperty.','querySelector','Pushing\x20message\x20to\x20SW\x20from\x20Shopify\x20data','\x0amax-width:\x20100%;\x0aheight:\x20auto;\x0adisplay:\x20block;\x0amargin-left:\x20auto;\x0amargin-right:\x20auto;\x0aborder-radius:\x2010px;\x0amax-width:\x20350px;\x0aaspect-ratio:\x202\x20/\x201;\x0a','#\x20recordAttribute','Instagram','Brave',';\x0acursor:\x20pointer;\x0aborder-radius:\x205px;\x0awidth:\x2048%;\x0a','recordDebugEvents','syncRealWorldTime','block','mergn_debug_level','Popup\x20View','\x0amargin-bottom:\x205px;\x0afont-size:\x2016px;\x0acolor:\x20','addEventListener','mergn-overlay','Turned\x20Off\x20Notification','/attribute','Logging\x20in','isArray','Initializing\x20Notification\x20Service','Recording\x20event\x20Time','getPreviousUrl','\x0adisplay:\x20flex;\x0aflex-wrap:\x20wrap;\x0amargin-bottom:\x2010px;\x0a','appendChild','set','API_URL','body','setOperatingSystem','parentElement','subscribe','Popup\x20already\x20displayed','Campaign\x20Id','\x0adisplay:\x20flex;\x0ajustify-content:\x20space-between;\x0aalign-items:\x20center;\x0aflex-wrap:\x20nowrap;\x0awidth:\x20100%;\x0a','querySelectorAll','position','getSubscription','postEventRecord','/brand','Failed\x20to\x20check\x20notification\x20permission','recordDebugEventsToggle','loadActionInLocalStorage','Image\x20Click','preInitializedAttributes','\x20invalid\x20eventProperties:\x20','charCodeAt','undefined'];_0x2da8=function(){return _0x12db43;};return _0x2da8();}function _0x4b11(_0x51e66b,_0x4d64e3){const _0x2da8c7=_0x2da8();return _0x4b11=function(_0x4b1127,_0x34431a){_0x4b1127=_0x4b1127-0x16d;let _0x446f95=_0x2da8c7[_0x4b1127];return _0x446f95;},_0x4b11(_0x51e66b,_0x4d64e3);}(function(_0x556195,_0x5c0d0b){const _0x3d81e2=_0x4b11,_0x8265e8=_0x556195();while(!![]){try{const _0xa7c758=-parseInt(_0x3d81e2(0x34c))/0x1+-parseInt(_0x3d81e2(0x27f))/0x2+parseInt(_0x3d81e2(0x1c2))/0x3*(-parseInt(_0x3d81e2(0x328))/0x4)+-parseInt(_0x3d81e2(0x217))/0x5+parseInt(_0x3d81e2(0x2c5))/0x6+parseInt(_0x3d81e2(0x1c8))/0x7+parseInt(_0x3d81e2(0x1b8))/0x8;if(_0xa7c758===_0x5c0d0b)break;else _0x8265e8['push'](_0x8265e8['shift']());}catch(_0x8456ae){_0x8265e8['push'](_0x8265e8['shift']());}}}(_0x2da8,0xef995));((()=>{const _0x2bb697=_0x4b11;var _0x44ddfe=Object[_0x2bb697(0x2b1)],_0x729690=Object['defineProperties'],_0x2d4e8c=Object[_0x2bb697(0x357)],_0x5c2e40=Object[_0x2bb697(0x24c)],_0x5be83b=Object[_0x2bb697(0x308)]['hasOwnProperty'],_0x78d3ab=Object[_0x2bb697(0x308)]['propertyIsEnumerable'],_0x140d7d=_0x5002c6=>{throw TypeError(_0x5002c6);},_0x69d61c=(_0x1cd2e3,_0xa4b449,_0x1d2a46)=>_0xa4b449 in _0x1cd2e3?_0x44ddfe(_0x1cd2e3,_0xa4b449,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1d2a46}):_0x1cd2e3[_0xa4b449]=_0x1d2a46,_0x3cf723=(_0x41030d,_0x5d5b81)=>{const _0x130846=_0x2bb697;for(var _0x3020d6 in _0x5d5b81||(_0x5d5b81={}))_0x5be83b[_0x130846(0x349)](_0x5d5b81,_0x3020d6)&&_0x69d61c(_0x41030d,_0x3020d6,_0x5d5b81[_0x3020d6]);if(_0x5c2e40){for(var _0x3020d6 of _0x5c2e40(_0x5d5b81))_0x78d3ab[_0x130846(0x349)](_0x5d5b81,_0x3020d6)&&_0x69d61c(_0x41030d,_0x3020d6,_0x5d5b81[_0x3020d6]);}return _0x41030d;},_0x1570ec=(_0x5cb6d5,_0x49b008)=>_0x729690(_0x5cb6d5,_0x2d4e8c(_0x49b008)),_0x52a428=(_0x341e72,_0x538ece,_0xf6826)=>_0x538ece[_0x2bb697(0x255)](_0x341e72)||_0x140d7d(_0x2bb697(0x2d7)+_0xf6826),_0x260c27=(_0x249c9f,_0x16d573,_0x2444a9)=>(_0x52a428(_0x249c9f,_0x16d573,_0x2bb697(0x1ca)),_0x2444a9?_0x2444a9[_0x2bb697(0x349)](_0x249c9f):_0x16d573[_0x2bb697(0x335)](_0x249c9f)),_0x5a45ae=(_0x598e5b,_0x5d800b,_0x20f29c)=>_0x5d800b[_0x2bb697(0x255)](_0x598e5b)?_0x140d7d(_0x2bb697(0x309)):_0x5d800b instanceof WeakSet?_0x5d800b[_0x2bb697(0x1df)](_0x598e5b):_0x5d800b[_0x2bb697(0x183)](_0x598e5b,_0x20f29c),_0x2209aa=(_0x34bea4,_0x733dc,_0x5cae57,_0x30fbc6)=>(_0x52a428(_0x34bea4,_0x733dc,'write\x20to\x20private\x20field'),_0x30fbc6?_0x30fbc6['call'](_0x34bea4,_0x5cae57):_0x733dc[_0x2bb697(0x183)](_0x34bea4,_0x5cae57),_0x5cae57),_0x2912e8=(_0x5b48ea,_0x19ffd3,_0x19875d)=>(_0x52a428(_0x5b48ea,_0x19ffd3,'access\x20private\x20method'),_0x19875d),_0x199939=(_0x294654,_0x1313d9,_0x3364a2)=>new Promise((_0x1b9339,_0x42376a)=>{const _0xb01db1=_0x2bb697;var _0x47939c=_0x76b259=>{const _0x17b92d=_0x4b11;try{_0x2f78e8(_0x3364a2[_0x17b92d(0x2a0)](_0x76b259));}catch(_0x2a091e){_0x42376a(_0x2a091e);}},_0x441cee=_0x3d9ea5=>{const _0x1bf5e3=_0x4b11;try{_0x2f78e8(_0x3364a2[_0x1bf5e3(0x23e)](_0x3d9ea5));}catch(_0x4a1c27){_0x42376a(_0x4a1c27);}},_0x2f78e8=_0x306f8a=>_0x306f8a[_0xb01db1(0x218)]?_0x1b9339(_0x306f8a['value']):Promise[_0xb01db1(0x284)](_0x306f8a[_0xb01db1(0x30b)])[_0xb01db1(0x25d)](_0x47939c,_0x441cee);_0x2f78e8((_0x3364a2=_0x3364a2[_0xb01db1(0x291)](_0x294654,_0x1313d9))[_0xb01db1(0x2a0)]());}),_0x528597=_0x2bb697(0x2b6),_0x3600e1='https://api.mergn.com/sdk-management/api',_0x34239e=_0x2bb697(0x17b),_0x2bcf45='/set-attribute',_0x312ec8=_0x2bb697(0x324),_0x395317=_0x2bb697(0x233),_0x1cda28=_0x2bb697(0x19a),_0x5152f8='/device/add-device-token',_0x1a2dd9=_0x2bb697(0x20e),_0x59624f=_0x2bb697(0x2ef),_0x4f2c54=_0x2bb697(0x27e),_0x4457ec=class extends Error{constructor(_0x3d8550){const _0x129388=_0x2bb697;super(_0x3d8550),this[_0x129388(0x277)]=_0x129388(0x323);}};_0x4457ec[_0x2bb697(0x1c9)]=!0x1,_0x4457ec[_0x2bb697(0x2af)]=!navigator[_0x2bb697(0x312)],_0x4457ec[_0x2bb697(0x1d7)]=0x0,_0x4457ec[_0x2bb697(0x355)]=!0x1,_0x4457ec[_0x2bb697(0x354)]=!0x1;var _0x56aeae=(_0x2e74f8,_0x524a38)=>{const _0x16bded=_0x2bb697;_0x524a38 instanceof _0x4457ec?_0x40dd3d(0x2,'OriginateFrom:\x20'+_0x2e74f8+'\x0aMergnError:\x20'+_0x524a38[_0x16bded(0x274)]):_0x524a38 instanceof Error?_0x40dd3d(0x2,'OriginateFrom:\x20'+_0x2e74f8+_0x16bded(0x264)+_0x524a38[_0x16bded(0x274)]):_0x40dd3d(0x2,_0x16bded(0x30c)+_0x2e74f8+'\x0aUnexpected\x20error:\x20'+String(_0x524a38));},_0x25ba15=(_0x4a5dfd,_0x482ce5,_0x595947,_0x4c99e7=!0x1)=>_0x199939(void 0x0,null,function*(){const _0x47b5d7=_0x2bb697;try{_0x58902d(_0x4a5dfd,!0x0),_0x46ca62(_0x4a5dfd+_0x47b5d7(0x287),!0x0);try{if(_0x4a5dfd!==_0x47b5d7(0x2e0)){if(_0x4a5dfd!==_0x47b5d7(0x2e0)&&_0x4457ec[_0x47b5d7(0x1c9)])throw new _0x4457ec(_0x47b5d7(0x1f6));if(_0x4a5dfd!==_0x47b5d7(0x230)&&_0x4457ec[_0x47b5d7(0x2af)])throw new _0x4457ec(_0x47b5d7(0x2c2));if(_0x4a5dfd!==_0x47b5d7(0x341)&&_0x4a5dfd!==_0x47b5d7(0x2e0)&&_0x4a5dfd!==_0x47b5d7(0x230)&&_0x4a5dfd!==_0x47b5d7(0x1cc)&&_0x4a5dfd!==_0x47b5d7(0x2e3)&&!_0x4457ec[_0x47b5d7(0x355)])throw new _0x4457ec(_0x47b5d7(0x2d2));if(_0x4a5dfd!==_0x47b5d7(0x269)&&_0x4a5dfd!==_0x47b5d7(0x230)&&_0x4a5dfd!==_0x47b5d7(0x1cc)&&_0x4457ec[_0x47b5d7(0x354)])throw new _0x4457ec(_0x47b5d7(0x2e8));}return yield _0x482ce5();}catch(_0x479c50){return _0x595947?_0x595947(_0x479c50):(_0x4457ec['debugLevel']===0x2||_0x4457ec[_0x47b5d7(0x1d7)]===0x3)&&_0x56aeae(_0x4a5dfd,_0x479c50),null;}finally{_0x46ca62(_0x4a5dfd+_0x47b5d7(0x287),!0x1),_0x58902d(_0x4a5dfd,!0x1);}}catch(_0x2f868f){return null;}}),_0x25d871=(_0x2d5241=>(_0x2d5241[_0x2d5241[_0x2bb697(0x263)]=0x0]=_0x2bb697(0x263),_0x2d5241[_0x2d5241[_0x2bb697(0x2ce)]=0x1]=_0x2bb697(0x2ce),_0x2d5241[_0x2d5241[_0x2bb697(0x342)]=0x2]=_0x2bb697(0x342),_0x2d5241[_0x2d5241['ALL']=0x3]=_0x2bb697(0x212),_0x2d5241[_0x2d5241[_0x2bb697(0x1b9)]=0x4]=_0x2bb697(0x1b9),_0x2d5241))(_0x25d871||{}),_0x40dd3d=(_0xd86e63,_0x1429aa)=>{const _0x3779ab=_0x2bb697;_0x4457ec['debugLevel']!==0x0&&(_0x4457ec[_0x3779ab(0x1d7)]>=0x3?_0xd86e63===0x1?console[_0x3779ab(0x200)](_0x3779ab(0x298)+new Date()[_0x3779ab(0x1a2)](),_0x1429aa):_0xd86e63===0x2&&console[_0x3779ab(0x35b)]('ERROR:\x20'+new Date()[_0x3779ab(0x1a2)](),_0x1429aa):_0x4457ec[_0x3779ab(0x1d7)]===0x1&&_0xd86e63===0x1?console[_0x3779ab(0x200)](_0x3779ab(0x298)+new Date()[_0x3779ab(0x1a2)](),_0x1429aa):_0x4457ec[_0x3779ab(0x1d7)]===0x2&&_0xd86e63===0x2&&console[_0x3779ab(0x35b)](_0x3779ab(0x310)+new Date()[_0x3779ab(0x1a2)](),_0x1429aa));},_0x46ca62=(_0x5da06c,_0xb88676)=>{const _0x20785f=_0x2bb697;_0x4457ec[_0x20785f(0x1d7)]!==0x0&&(_0xb88676?console[_0x20785f(0x32d)](_0x5da06c):console['timeEnd'](_0x5da06c));},_0x58902d=(_0x24afa2,_0x19b9af)=>{const _0x566c48=_0x2bb697;_0x4457ec['debugLevel']!==0x0&&(_0x19b9af?console[_0x566c48(0x23a)](_0x24afa2):console[_0x566c48(0x22e)]());},_0x4aeff3,_0x5438f8,_0x1624f0,_0x37c9c2,_0x3b235f=class _0x243673{constructor(){_0x5a45ae(this,_0x5438f8);}static[_0x2bb697(0x236)](){return _0x260c27(_0x243673,_0x4aeff3)||_0x2209aa(_0x243673,_0x4aeff3,new _0x243673()),_0x260c27(_0x243673,_0x4aeff3);}[_0x2bb697(0x1ef)](_0x578bd7){_0x243673['API_URL']=_0x578bd7;}[_0x2bb697(0x283)](_0x14814b){const _0x4b0127=_0x2bb697;_0x243673['apiKey']=_0x14814b;let _0x414710=_0x14814b,_0x4bad22=/m(\d+)rgn/,_0x1cf971=_0x414710[_0x4b0127(0x2b7)](_0x4bad22);_0x1cf971&&(_0x243673[_0x4b0127(0x2da)]=_0x1cf971[0x1]);}[_0x2bb697(0x1e6)](){const _0x264fe5=_0x2bb697;return _0x243673[_0x264fe5(0x1e7)];}['getBrandId'](){const _0x12352d=_0x2bb697;return _0x243673[_0x12352d(0x2da)];}[_0x2bb697(0x335)](_0x1e8961){return _0x199939(this,null,function*(){const _0x2095da=_0x4b11;let _0x1f0c72=_0x2912e8(this,_0x5438f8,_0x37c9c2)[_0x2095da(0x349)](this,_0x243673[_0x2095da(0x1e7)]);try{let _0x178e1e=yield fetch(_0x2912e8(this,_0x5438f8,_0x1624f0)['call'](this)+_0x1e8961,{'headers':{'Authorization':_0x1f0c72,'Content-Type':_0x2095da(0x278)}});if(!_0x178e1e['ok'])throw new Error(_0x1f0c72+_0x2095da(0x300)+JSON['stringify'](yield _0x178e1e[_0x2095da(0x225)]()));return _0x178e1e[_0x2095da(0x225)]();}catch(_0x3612ce){return Promise['reject'](_0x3612ce);}});}[_0x2bb697(0x270)](_0x19977c,_0x277e69,_0x2ce350){return _0x199939(this,null,function*(){const _0x129ffc=_0x4b11;let _0xcde733=_0x2912e8(this,_0x5438f8,_0x37c9c2)[_0x129ffc(0x349)](this,_0x243673[_0x129ffc(0x1e7)]);try{return(yield fetch(_0x2912e8(this,_0x5438f8,_0x1624f0)[_0x129ffc(0x349)](this)+_0x19977c,{'body':JSON[_0x129ffc(0x2bf)](_0x277e69||{}),'headers':{'Authorization':_0xcde733,'Content-Type':'application/json'},'method':'POST','signal':_0x2ce350}))[_0x129ffc(0x225)]();}catch(_0x38c259){return Promise[_0x129ffc(0x1be)](_0x38c259);}});}[_0x2bb697(0x292)](_0x44c491,_0x19f799){return _0x199939(this,null,function*(){const _0x36a7b5=_0x4b11;return(yield fetch(_0x2912e8(this,_0x5438f8,_0x1624f0)[_0x36a7b5(0x349)](this)+_0x44c491,{'body':JSON[_0x36a7b5(0x2bf)](_0x19f799||{}),'headers':{'Authorization':_0x2912e8(this,_0x5438f8,_0x37c9c2)['call'](this,_0x243673[_0x36a7b5(0x1e7)]),'Content-Type':_0x36a7b5(0x278)},'method':_0x36a7b5(0x24f)}))['json']();});}[_0x2bb697(0x173)](){return _0x199939(this,null,function*(){const _0x921d9f=_0x4b11;try{let _0x488f72=(yield(yield fetch(_0x2912e8(this,_0x5438f8,_0x1624f0)[_0x921d9f(0x349)](this)+_0x4f2c54))['json']())[_0x921d9f(0x350)];_0x243673['UTCDate']=new Date(_0x488f72),_0x243673[_0x921d9f(0x296)]=new Date();}catch(_0x50b63f){_0x40dd3d(0x2,_0x921d9f(0x297));}});}['getCurrentUTCDate'](){const _0x3ce02d=_0x2bb697;if(!_0x243673[_0x3ce02d(0x26d)]||!_0x243673['lastSyncTime'])return _0x40dd3d(0x2,_0x3ce02d(0x327)),new Date();let _0x41c94b=new Date()[_0x3ce02d(0x267)]()-_0x243673[_0x3ce02d(0x296)][_0x3ce02d(0x267)]();return new Date(_0x243673[_0x3ce02d(0x26d)][_0x3ce02d(0x267)]()+_0x41c94b);}};_0x4aeff3=new WeakMap(),_0x5438f8=new WeakSet(),_0x1624f0=function(){const _0x53aa98=_0x2bb697;return _0x3b235f[_0x53aa98(0x184)];},_0x37c9c2=function(_0x1fdac7){const _0xb5c3a3=_0x2bb697;return btoa(_0x1fdac7+':'+new Date()[_0xb5c3a3(0x267)]());},_0x5a45ae(_0x3b235f,_0x4aeff3),_0x3b235f[_0x2bb697(0x184)]=_0x3600e1;var _0x4a5b60=_0x3b235f,_0x2301f1=_0x4a5b60[_0x2bb697(0x236)](),_0x965f93=(_0x4c4be0=>(_0x4c4be0[_0x2bb697(0x28d)]=_0x2bb697(0x203),_0x4c4be0[_0x2bb697(0x320)]=_0x2bb697(0x2dd),_0x4c4be0['UTM_CAMPAIGN']=_0x2bb697(0x2aa),_0x4c4be0[_0x2bb697(0x242)]=_0x2bb697(0x33d),_0x4c4be0[_0x2bb697(0x33a)]='utm_content',_0x4c4be0[_0x2bb697(0x32c)]=_0x2bb697(0x2cb),_0x4c4be0[_0x2bb697(0x2d8)]=_0x2bb697(0x28e),_0x4c4be0['FBCLID']=_0x2bb697(0x28f),_0x4c4be0))(_0x965f93||{}),_0x4f9000=new Set(Object[_0x2bb697(0x262)](_0x965f93)),_0x44b784='Popup\x20Action',_0x298ae2=_0x2bb697(0x253),_0x9afa38,_0x593cb3,_0x3e1122,_0x15758b,_0x44e610,_0x38dd69,_0x482a10,_0x2d134a,_0x29bf17,_0x485e92,_0x1a7e14,_0xa2eee6,_0x464d3d,_0x43e6a0,_0xc422ed,_0x1bff45,_0x4d97aa,_0x15029a,_0x5d5200,_0x786408=class _0x582a37{constructor(){const _0x46dabb=_0x2bb697;_0x5a45ae(this,_0x482a10),this[_0x46dabb(0x2a8)]=null,this[_0x46dabb(0x1dc)]=_0x370a70=>{const _0x5b854f=_0x46dabb;_0x40dd3d(0x1,'Pushing\x20message\x20to\x20service\x20worker'),navigator[_0x5b854f(0x289)][_0x5b854f(0x26f)]()[_0x5b854f(0x25d)](_0x133e04=>{const _0x1593b4=_0x5b854f;var _0x1c3626,_0x3d2bd1;_0x40dd3d(0x1,_0x1593b4(0x248)),(_0x1c3626=_0x133e04[0x0])!=null&&_0x1c3626[_0x1593b4(0x305)]&&(_0x40dd3d(0x1,_0x1593b4(0x2c3)),(_0x3d2bd1=_0x133e04[0x0]['active'])==null||_0x3d2bd1[_0x1593b4(0x286)](JSON['stringify'](_0x370a70)));})[_0x5b854f(0x2f6)](_0x437a0e=>{const _0x457c44=_0x5b854f;_0x40dd3d(0x2,_0x457c44(0x2de)+_0x437a0e['message']);});},this['loadWebPushActionInLocalStorage']=()=>{const _0x17ec7f=_0x46dabb;_0x58162d[_0x17ec7f(0x193)]({'actionCondition':()=>!0x0,'actionMethod':_0x4e9860=>_0x2912e8(this,_0x482a10,_0x43e6a0)['call'](this,Number(_0x4e9860[_0x17ec7f(0x268)])),'localStorageKey':_0x17ec7f(0x1fc)});},_0x5a45ae(this,_0x464d3d,()=>{const _0x5e73da=_0x46dabb;_0x58162d[_0x5e73da(0x1fa)](_0x5e73da(0x1fc));}),_0x5a45ae(this,_0x15029a,_0x460837=>{const _0x437b63=_0x46dabb;_0x58162d[_0x437b63(0x1f8)]({'id':_0x460837,'localStorageKey':_0x437b63(0x1fc)});});}static[_0x2bb697(0x236)](){return _0x260c27(_0x582a37,_0x9afa38)||_0x2209aa(_0x582a37,_0x9afa38,new _0x582a37()),_0x260c27(_0x582a37,_0x9afa38);}[_0x2bb697(0x341)](_0x1df7bd,_0x333a5f){return _0x199939(this,null,function*(){const _0x417d99=_0x4b11;var _0x5f1c7f;if(_0x40dd3d(0x1,_0x417d99(0x17e)),_0x2f6659[_0x417d99(0x172)]({'eventName':_0x417d99(0x341),'eventProperties':[{'eventProperty':_0x417d99(0x2db),'value':_0x417d99(0x289)in navigator},{'eventProperty':_0x417d99(0x1cd),'value':_0x417d99(0x356)in window}]}),_0x417d99(0x289)in navigator&&'PushManager'in window){_0x40dd3d(0x1,_0x417d99(0x2b2));try{_0x2f6659[_0x417d99(0x172)]({'eventName':_0x417d99(0x2d1)}),_0x2209aa(_0x582a37,_0x593cb3,yield navigator[_0x417d99(0x289)][_0x417d99(0x26a)](_0x333a5f||_0x417d99(0x205))),_0x40dd3d(0x1,_0x417d99(0x299)),_0x40dd3d(0x1,_0x417d99(0x1c1)),this[_0x417d99(0x1dc)]({'customer':localStorage['getItem']('customer')||'','events':_0x2f6659[_0x417d99(0x30d)](),'API_KEY':_0x2301f1[_0x417d99(0x1e6)](),'device_id':localStorage[_0x417d99(0x2bd)](_0x417d99(0x316))||'','operatingSystem':_0x58162d[_0x417d99(0x345)](),'osVersion':_0x58162d[_0x417d99(0x331)](),'Platform':_0x58162d[_0x417d99(0x1d9)]()}),_0x2209aa(_0x582a37,_0x44e610,!0x0);let _0x472850=_0x2912e8(this,_0x482a10,_0xc422ed)[_0x417d99(0x349)](this),_0x4f2595=Object[_0x417d99(0x22a)](_0x472850||{});if(_0x4f2595['length']&&_0x2912e8(this,_0x482a10,_0x43e6a0)['call'](this,Number(_0x4f2595[0x0])),!_0x1df7bd)return;let _0x57fd62=yield(_0x5f1c7f=_0x260c27(_0x582a37,_0x593cb3))==null?void 0x0:_0x5f1c7f[_0x417d99(0x2a9)][_0x417d99(0x18e)]();_0x40dd3d(0x1,'Checking\x20for\x20existing\x20subscription'),_0x260c27(_0x582a37,_0x593cb3)&&(_0x40dd3d(0x1,_0x417d99(0x321)),_0x260c27(_0x582a37,_0x593cb3)['update']()),_0x57fd62?(_0x40dd3d(0x1,'Existing\x20subscription\x20found'),_0x2f6659['recordDebugEvents']({'eventName':_0x417d99(0x23f)}),yield _0x2912e8(this,_0x482a10,_0x1a7e14)[_0x417d99(0x349)](this),_0x2209aa(_0x582a37,_0x3e1122,!0x0)):(_0x40dd3d(0x1,'No\x20existing\x20subscription\x20found'),yield _0x2912e8(this,_0x482a10,_0x2d134a)[_0x417d99(0x349)](this,_0x260c27(_0x582a37,_0x38dd69)||void 0x0));}catch(_0x5947e1){let _0x58cfb1=_0x5947e1&&_0x5947e1[_0x417d99(0x274)]?_0x5947e1[_0x417d99(0x274)][_0x417d99(0x252)](0x0,0x64):_0x417d99(0x198);yield _0x2f6659[_0x417d99(0x172)]({'eventName':'Reachability\x20Push\x20Web','eventProperties':[{'eventProperty':'message','value':''+_0x58cfb1}]}),_0x40dd3d(0x2,'Service\x20Worker\x20registration\x20failed:'),_0x40dd3d(0x2,_0x58cfb1);}}});}['showNotification'](_0x59bae4){const _0x3efef8=_0x2bb697;if(!_0x260c27(_0x582a37,_0x44e610)){_0x2209aa(_0x582a37,_0x38dd69,_0x59bae4),_0x2f6659[_0x3efef8(0x172)]({'eventName':_0x3efef8(0x1ee)}),_0x40dd3d(0x2,_0x3efef8(0x2a4));return;}_0x25ba15('showNotification',()=>_0x199939(this,null,function*(){const _0x8f3ba8=_0x3efef8;let _0x554c51=JSON[_0x8f3ba8(0x2e1)](localStorage[_0x8f3ba8(0x2bd)](_0x8f3ba8(0x1fc))||'{}');if(_0x554c51&&_0x554c51[_0x59bae4[_0x8f3ba8(0x268)]]){_0x40dd3d(0x1,'Notification\x20already\x20in\x20cache');return;}_0x2912e8(this,_0x482a10,_0xa2eee6)['call'](this,_0x59bae4),_0x260c27(this,_0x464d3d)['call'](this),_0x2912e8(this,_0x482a10,_0x43e6a0)['call'](this,_0x59bae4['web_optin_instance_id']);}));}};_0x9afa38=new WeakMap(),_0x593cb3=new WeakMap(),_0x3e1122=new WeakMap(),_0x15758b=new WeakMap(),_0x44e610=new WeakMap(),_0x38dd69=new WeakMap(),_0x482a10=new WeakSet(),_0x2d134a=function(_0x242734){return _0x199939(this,null,function*(){const _0xae0f1d=_0x4b11;_0x40dd3d(0x1,'Checking\x20notification\x20permission:\x20'+JSON[_0xae0f1d(0x2bf)](_0x242734)+'\x20'),_0x2f6659['recordDebugEvents']({'eventName':_0xae0f1d(0x1c5)});let _0x521ab1;try{if(_0x521ab1=Notification[_0xae0f1d(0x2a8)],_0x521ab1){if(_0x40dd3d(0x1,'Notification\x20permission:\x20'+_0x521ab1),_0x521ab1===_0xae0f1d(0x330))_0x242734||(this['permission']=_0xae0f1d(0x330),_0x2f6659['recordDebugEvents']({'eventName':_0xae0f1d(0x1aa)})),_0x242734&&(_0x2f6659[_0xae0f1d(0x172)]({'eventName':_0xae0f1d(0x31f),'eventProperties':[{'eventProperty':_0xae0f1d(0x1e1),'value':''+(_0x242734==null?void 0x0:_0x242734[_0xae0f1d(0x1e1)])}]}),_0x260c27(this,_0x15029a)['call'](this,_0x242734[_0xae0f1d(0x268)]),_0x242734['type']===_0xae0f1d(0x275)?_0x2912e8(this,_0x482a10,_0x29bf17)['call'](this,_0x242734):yield _0x2912e8(this,_0x482a10,_0x485e92)['call'](this,_0x242734));else{if(_0x521ab1===_0xae0f1d(0x333))_0x2f6659['recordDebugEvents']({'eventName':_0xae0f1d(0x17a)}),_0x40dd3d(0x1,_0xae0f1d(0x211)),_0x242734&&_0x242734[_0xae0f1d(0x268)]&&_0x260c27(this,_0x15029a)[_0xae0f1d(0x349)](this,_0x242734[_0xae0f1d(0x268)]);else{if(_0x242734&&_0x242734[_0xae0f1d(0x268)]){_0x260c27(this,_0x15029a)[_0xae0f1d(0x349)](this,_0x242734['web_optin_instance_id']);return;}_0x2f6659['recordDebugEvents']({'eventName':_0xae0f1d(0x32a)}),_0x40dd3d(0x1,_0xae0f1d(0x245)),_0x260c27(_0x786408,_0x3e1122)||(yield _0x2912e8(this,_0x482a10,_0x1a7e14)[_0xae0f1d(0x349)](this),yield _0x2f6659[_0xae0f1d(0x266)]({'eventName':_0xae0f1d(0x2fa)}),_0x242734||_0x2209aa(_0x786408,_0x3e1122,!0x0));}}}}catch(_0x37913b){_0x40dd3d(0x2,_0xae0f1d(0x191)),_0x2f6659['recordDebugEvents']({'eventName':_0xae0f1d(0x29e)});}});},_0x29bf17=function(_0x194e83){const _0x18a20a=_0x2bb697;try{let _0x48daf9=document[_0x18a20a(0x2c7)]('div'),_0x286913;_0x194e83[_0x18a20a(0x2e5)]['banner_image']&&(_0x286913=document[_0x18a20a(0x2c7)](_0x18a20a(0x295)),_0x286913['src']=_0x194e83['banner_design']['banner_image'],_0x286913[_0x18a20a(0x226)]=_0x18a20a(0x2e4),_0x286913['id']=_0x18a20a(0x334));let _0x21f416=document[_0x18a20a(0x2c7)](_0x18a20a(0x1f1)),_0x2faf64=document[_0x18a20a(0x2c7)](_0x18a20a(0x1f1)),_0x2f74ab=document['createElement'](_0x18a20a(0x1f1)),_0x4a8c94=document['createElement'](_0x18a20a(0x295)),_0x5dee5f=document[_0x18a20a(0x2c7)](_0x18a20a(0x1f1)),_0x4df557=document[_0x18a20a(0x2c7)](_0x18a20a(0x1f1)),_0x58949c=document[_0x18a20a(0x2c7)](_0x18a20a(0x1f1)),_0xbc5ed4=document[_0x18a20a(0x2c7)](_0x18a20a(0x1f1)),_0x1bc39f=document[_0x18a20a(0x2c7)](_0x18a20a(0x1f1)),_0x53c9ab=document[_0x18a20a(0x2c7)]('div'),_0x4bd8bd=document[_0x18a20a(0x2c7)](_0x18a20a(0x34e)),_0x363524=document['createElement']('button');_0x48daf9['className']=_0x18a20a(0x179),_0x21f416[_0x18a20a(0x19f)]=_0x18a20a(0x2a7),_0x2faf64[_0x18a20a(0x19f)]=_0xbc5ed4[_0x18a20a(0x19f)]=_0x1bc39f['className']=_0x18a20a(0x1b7),_0x2f74ab[_0x18a20a(0x19f)]=_0x18a20a(0x2c4),_0x5dee5f['className']=_0x18a20a(0x229),_0x53c9ab[_0x18a20a(0x19f)]=_0x18a20a(0x26e),_0x4df557['id']=_0x18a20a(0x32b),_0x58949c['id']=_0x18a20a(0x25e),_0x4bd8bd['id']=_0x18a20a(0x33c),_0x363524['id']='button-2',_0x4a8c94[_0x18a20a(0x29d)]=_0x194e83['banner_design'][_0x18a20a(0x1ed)],_0x4a8c94[_0x18a20a(0x226)]=_0x18a20a(0x2e4),_0x4a8c94['id']=_0x18a20a(0x20d),_0x4df557[_0x18a20a(0x20a)]=_0x194e83[_0x18a20a(0x2e5)][_0x18a20a(0x265)],_0x58949c['textContent']=_0x194e83['banner_design']['banner_text'],_0x4bd8bd[_0x18a20a(0x20a)]=_0x194e83[_0x18a20a(0x2e5)][_0x18a20a(0x293)][_0x18a20a(0x21b)],_0x363524[_0x18a20a(0x20a)]=_0x194e83['banner_design']['button_2'][_0x18a20a(0x21b)],_0x2f74ab[_0x18a20a(0x182)](_0x4a8c94),_0x5dee5f[_0x18a20a(0x182)](_0x4df557),_0x5dee5f['appendChild'](_0x58949c),_0x2faf64[_0x18a20a(0x182)](_0x2f74ab),_0x2faf64['appendChild'](_0x5dee5f),_0x286913&&(_0xbc5ed4[_0x18a20a(0x182)](_0x286913),_0x286913['style']['cssText']=_0x18a20a(0x16d)),_0x53c9ab[_0x18a20a(0x182)](_0x4bd8bd),_0x53c9ab[_0x18a20a(0x182)](_0x363524),_0x1bc39f[_0x18a20a(0x182)](_0x53c9ab),_0x21f416['appendChild'](_0x2faf64),_0x21f416[_0x18a20a(0x182)](_0xbc5ed4),_0x21f416['appendChild'](_0x1bc39f),_0x48daf9['appendChild'](_0x21f416),_0x48daf9[_0x18a20a(0x2cc)][_0x18a20a(0x1c6)]=_0x18a20a(0x2f4),_0x21f416[_0x18a20a(0x2cc)][_0x18a20a(0x1c6)]=_0x18a20a(0x259)+_0x194e83[_0x18a20a(0x2e5)][_0x18a20a(0x1e4)]+_0x18a20a(0x26c),_0x2faf64[_0x18a20a(0x2cc)][_0x18a20a(0x1c6)]=_0xbc5ed4[_0x18a20a(0x2cc)][_0x18a20a(0x1c6)]=_0x1bc39f[_0x18a20a(0x2cc)]['cssText']=_0x18a20a(0x181),_0x2f74ab[_0x18a20a(0x2cc)][_0x18a20a(0x1c6)]=_0x18a20a(0x199),_0x5dee5f['style'][_0x18a20a(0x1c6)]=_0x18a20a(0x22d),_0x4a8c94[_0x18a20a(0x2cc)][_0x18a20a(0x1c6)]='\x0amax-width:\x20100%;\x0aheight:\x20auto;\x0a',_0x4bd8bd[_0x18a20a(0x2cc)][_0x18a20a(0x1c6)]=_0x18a20a(0x1b1)+_0x194e83[_0x18a20a(0x2e5)][_0x18a20a(0x293)]['backgroundColor']+_0x18a20a(0x2e9)+_0x194e83[_0x18a20a(0x2e5)][_0x18a20a(0x293)][_0x18a20a(0x2f7)]+_0x18a20a(0x171),_0x363524[_0x18a20a(0x2cc)][_0x18a20a(0x1c6)]=_0x18a20a(0x1b1)+_0x194e83[_0x18a20a(0x2e5)]['button_2']['backgroundColor']+_0x18a20a(0x2e9)+_0x194e83[_0x18a20a(0x2e5)][_0x18a20a(0x1a6)][_0x18a20a(0x2f7)]+_0x18a20a(0x171),_0x53c9ab[_0x18a20a(0x2cc)][_0x18a20a(0x1c6)]=_0x18a20a(0x18b),_0x4df557[_0x18a20a(0x2cc)][_0x18a20a(0x1c6)]=_0x18a20a(0x177)+_0x194e83['banner_design'][_0x18a20a(0x1ac)]+'\x0a',_0x58949c[_0x18a20a(0x2cc)]['cssText']='\x0amargin-bottom:\x205px;\x0afont-size:\x2013px;\x0acolor:\x20'+_0x194e83[_0x18a20a(0x2e5)][_0x18a20a(0x1ac)]+'\x0a',document[_0x18a20a(0x185)]['appendChild'](_0x48daf9),document[_0x18a20a(0x185)][_0x18a20a(0x2cc)][_0x18a20a(0x2a2)]=_0x18a20a(0x2b5),_0x2f6659['recordEvent']({'eventName':_0x18a20a(0x244),'name':_0x18a20a(0x261),'web_optin_instance_id':_0x194e83[_0x18a20a(0x268)]}),_0x4bd8bd==null||_0x4bd8bd[_0x18a20a(0x178)]('click',()=>_0x199939(this,null,function*(){const _0x10903c=_0x18a20a;_0x48daf9[_0x10903c(0x1a1)](),_0x2209aa(_0x786408,_0x15758b,!0x1),document[_0x10903c(0x185)][_0x10903c(0x2cc)][_0x10903c(0x2a2)]=_0x10903c(0x232),yield _0x2f6659[_0x10903c(0x266)]({'eventName':'Denied\x20Web\x20Push\x20Soft-ask','web_optin_instance_id':_0x194e83[_0x10903c(0x268)]}),_0x40dd3d(0x1,_0x10903c(0x318));})),_0x363524==null||_0x363524[_0x18a20a(0x178)](_0x18a20a(0x23c),()=>_0x199939(this,null,function*(){const _0x407f7a=_0x18a20a;_0x48daf9[_0x407f7a(0x1a1)](),document[_0x407f7a(0x185)][_0x407f7a(0x2cc)][_0x407f7a(0x2a2)]='auto',_0x2f6659['recordEvent']({'eventName':_0x407f7a(0x2b4),'web_optin_instance_id':_0x194e83['web_optin_instance_id']}),yield _0x2912e8(this,_0x482a10,_0x485e92)[_0x407f7a(0x349)](this,_0x194e83);}));}catch(_0x5678a9){}},_0x485e92=function(_0x45a4fd){return _0x199939(this,null,function*(){const _0x40537f=_0x4b11;try{_0x2f6659[_0x40537f(0x266)]({'eventName':_0x40537f(0x1b6),'name':_0x40537f(0x261),'web_optin_instance_id':_0x45a4fd['web_optin_instance_id']});let _0x551f32=yield Notification[_0x40537f(0x307)]();_0x551f32==='granted'?(_0x40dd3d(0x1,_0x40537f(0x2ea)),yield _0x2912e8(this,_0x482a10,_0x1a7e14)[_0x40537f(0x349)](this),yield _0x2f6659['recordEvent']({'eventName':_0x40537f(0x1fe),'name':_0x40537f(0x2d4),'web_optin_instance_id':_0x45a4fd[_0x40537f(0x268)]})):_0x551f32===_0x40537f(0x333)?(yield _0x2f6659[_0x40537f(0x266)]({'eventName':_0x40537f(0x28a)}),_0x40dd3d(0x1,_0x40537f(0x318))):_0x551f32===_0x40537f(0x330)&&(yield _0x2f6659['recordEvent']({'eventName':_0x40537f(0x25f)}),_0x40dd3d(0x1,_0x40537f(0x24e)));}catch(_0x1f447f){_0x40dd3d(0x2,'Failed\x20to\x20request\x20notification\x20permission');}_0x2209aa(_0x786408,_0x15758b,!0x1);});},_0x1a7e14=function(){return _0x199939(this,null,function*(){const _0x4a902d=_0x4b11;var _0x4f25a1,_0x386145;let _0x2e9a3e=yield _0x2301f1['get'](''+_0x59624f);if(_0x2e9a3e['success']){let _0x235aeb=yield(_0x4f25a1=_0x260c27(_0x786408,_0x593cb3))==null?void 0x0:_0x4f25a1[_0x4a902d(0x2a9)][_0x4a902d(0x18e)]();_0x235aeb&&(yield _0x235aeb[_0x4a902d(0x2ee)]());let _0x523347=yield(_0x386145=_0x260c27(_0x786408,_0x593cb3))==null?void 0x0:_0x386145[_0x4a902d(0x2a9)][_0x4a902d(0x188)]({'applicationServerKey':_0x2e9a3e[_0x4a902d(0x350)]||'','userVisibleOnly':!0x0}),_0x47e9b3=localStorage[_0x4a902d(0x2bd)](_0x4a902d(0x2f0))||'';(!_0x47e9b3||_0x47e9b3!==_0x4a902d(0x198))&&(yield _0x58162d[_0x4a902d(0x2dc)]()),yield _0x2301f1['put'](''+_0x5152f8,{'customer_id':localStorage['getItem']('customer'),'device_id':localStorage[_0x4a902d(0x2bd)](_0x4a902d(0x316)),'device_platform':_0x58162d[_0x4a902d(0x345)](),'is_web_push_subscribed':!0x0,'os':_0x58162d[_0x4a902d(0x1d9)](),'web_push_subscription_page_url':window[_0x4a902d(0x1ae)][_0x4a902d(0x301)],'web_push_token':{'token':JSON['parse'](JSON[_0x4a902d(0x2bf)](_0x523347))}}),_0x40dd3d(0x1,'User\x20is\x20subscribed');}else throw new Error('Failed\x20to\x20subscribe\x20the\x20user');});},_0xa2eee6=function(_0x49b960){const _0x3bae63=_0x2bb697;_0x58162d[_0x3bae63(0x353)](_0x49b960,_0x3bae63(0x1fc),'web_optin_instance_id');},_0x464d3d=new WeakMap(),_0x43e6a0=function(_0x413857){const _0x136052=_0x2bb697;if(_0x260c27(_0x786408,_0x15758b))return;_0x2209aa(_0x786408,_0x15758b,!0x0);let _0x460a25=_0x2912e8(this,_0x482a10,_0xc422ed)[_0x136052(0x349)](this);if(_0x460a25!=null&&_0x460a25[_0x413857])switch(_0x460a25[_0x413857][_0x136052(0x1fd)]){case _0x136052(0x303):{_0x2912e8(this,_0x482a10,_0x1bff45)[_0x136052(0x349)](this,_0x460a25[_0x413857]);break;}case _0x136052(0x1e5):{_0x2912e8(this,_0x482a10,_0x4d97aa)[_0x136052(0x349)](this,_0x460a25[_0x413857]);break;}case _0x136052(0x202):{_0x2912e8(this,_0x482a10,_0x5d5200)[_0x136052(0x349)](this,_0x460a25[_0x413857]);break;}default:return;}},_0xc422ed=function(){const _0xde8fac=_0x2bb697;let _0x3d2daf=localStorage[_0xde8fac(0x2bd)](_0xde8fac(0x1fc));return _0x3d2daf?JSON['parse'](_0x3d2daf):null;},_0x1bff45=function(_0x43853f){const _0x35bb58=_0x2bb697;_0x58162d[_0x35bb58(0x2fe)]({'clearActionMethod':_0x260c27(this,_0x15029a)[_0x35bb58(0x21d)](this),'data':_0x43853f,'displayMethod':_0x2912e8(this,_0x482a10,_0x4d97aa)[_0x35bb58(0x21d)](this),'idKey':_0x35bb58(0x268),'timeValueKey':_0x35bb58(0x340)});},_0x4d97aa=function(_0x12624b){const _0x1e2b88=_0x2bb697;_0x2912e8(this,_0x482a10,_0x2d134a)[_0x1e2b88(0x349)](this,_0x12624b);},_0x15029a=new WeakMap(),_0x5d5200=function(_0x3e2086){const _0x150106=_0x2bb697;_0x58162d[_0x150106(0x216)]({'data':_0x3e2086,'displayMethod':_0x2912e8(this,_0x482a10,_0x4d97aa)[_0x150106(0x21d)](this),'timeValueKey':'entry_time_value'});},_0x5a45ae(_0x786408,_0x9afa38),_0x5a45ae(_0x786408,_0x593cb3,null),_0x5a45ae(_0x786408,_0x3e1122,!0x1),_0x5a45ae(_0x786408,_0x15758b,!0x1),_0x5a45ae(_0x786408,_0x44e610,!0x1),_0x5a45ae(_0x786408,_0x38dd69,null);var _0x5494bd=_0x786408,_0x4ebf71=_0x5494bd['getInstance'](),_0x4c478d,_0x47ed76,_0x2729be,_0x480a68,_0x5e3797,_0x2016e2,_0x59cdeb,_0x262c67,_0x126b75,_0x286481,_0x42035a,_0x3a2480,_0x141014,_0x551a35,_0x17b9f3,_0x555bbe=class _0x3b5fd4{constructor(){const _0x5311f4=_0x2bb697;_0x5a45ae(this,_0x47ed76),_0x5a45ae(this,_0x59cdeb,_0x331c9c=>{const _0x49d009=_0x4b11;_0x58162d['clearActionInLocalStorage']({'id':_0x331c9c,'localStorageKey':_0x49d009(0x25b)});}),_0x5a45ae(this,_0x262c67,(_0x27dd23,_0x393ed0)=>{const _0x3a20db=_0x4b11;let _0x5641a2=document[_0x3a20db(0x2c7)](_0x3a20db(0x1f1));_0x5641a2[_0x3a20db(0x1af)]=_0x393ed0,_0x5641a2['querySelectorAll'](_0x3a20db(0x1c0))['forEach'](_0x3687d7=>{const _0x42cf63=_0x3a20db;let _0x58f52a=document[_0x42cf63(0x2c7)](_0x42cf63(0x1c0));_0x3687d7[_0x42cf63(0x29d)]?_0x58f52a[_0x42cf63(0x29d)]=_0x3687d7[_0x42cf63(0x29d)]:_0x58f52a[_0x42cf63(0x20a)]=_0x3687d7[_0x42cf63(0x20a)],_0x27dd23[_0x42cf63(0x182)](_0x58f52a);});}),_0x5a45ae(this,_0x286481,({campaignCustomerInstanceId:_0x579cb1,campaignId:_0x4d752b,customForm:_0x43603b,formDiv:_0x230dad,popupContainer:_0x41d718})=>{const _0x39e5fa=_0x4b11;let _0x320a88=(_0x230dad==null?void 0x0:_0x230dad[_0x39e5fa(0x35e)](_0x39e5fa(0x326)))||_0x43603b;_0x320a88&&(_0x320a88['querySelectorAll']('input')[_0x39e5fa(0x1d1)](_0x90b2b9=>{const _0x25d246=_0x39e5fa;_0x90b2b9[_0x25d246(0x2cc)][_0x25d246(0x314)](_0x25d246(0x1cb),_0x90b2b9[_0x25d246(0x2cc)][_0x25d246(0x1cb)],_0x25d246(0x32e));}),_0x320a88[_0x39e5fa(0x178)](_0x39e5fa(0x249),()=>_0x199939(this,null,function*(){const _0x5f5c26=_0x39e5fa;_0x41d718['remove']();let _0x10bb32=new FormData(_0x320a88),_0x3ac0ed={};_0x40dd3d(0x1,_0x5f5c26(0x20b));for(let [_0x2e50b5,_0x415dcd]of _0x10bb32['entries']())_0x3ac0ed[_0x2e50b5]=_0x415dcd,_0x40dd3d(0x1,_0x2e50b5+':\x20'+_0x415dcd),_0x499798[_0x5f5c26(0x1cc)](_0x2e50b5,_0x415dcd[_0x5f5c26(0x34f)]());yield _0x2f6659[_0x5f5c26(0x266)]({'campaignCustomerInstanceId':_0x579cb1,'campaignId':_0x4d752b,'eventName':_0x44b784,'eventProperties':[{'eventProperty':_0x5f5c26(0x33e),'value':JSON[_0x5f5c26(0x2bf)]({'campaignId':_0x4d752b,'formId':(_0x230dad==null?void 0x0:_0x230dad['id'])||'custom_form','formValues':_0x3ac0ed})},{'eventProperty':_0x5f5c26(0x18a),'value':_0x4d752b[_0x5f5c26(0x34f)]()}],'name':_0x5f5c26(0x326)});})));}),this[_0x5311f4(0x2fb)]=()=>{const _0x50cfcb=_0x5311f4;_0x58162d[_0x50cfcb(0x193)]({'actionCondition':_0x2ea6a9=>_0x2ea6a9['message'][_0x50cfcb(0x277)]===_0x50cfcb(0x28c),'actionMethod':_0x39e14e=>_0x2912e8(this,_0x47ed76,_0x480a68)['call'](this,_0x39e14e[_0x50cfcb(0x2a6)]),'localStorageKey':'action'});},_0x5a45ae(this,_0x17b9f3,()=>{const _0x239c9f=_0x5311f4;_0x58162d[_0x239c9f(0x1fa)](_0x239c9f(0x25b));});}static[_0x2bb697(0x236)](){var _0x438eb8;return _0x260c27(_0x3b5fd4,_0x4c478d)||(_0x2209aa(_0x3b5fd4,_0x4c478d,new _0x3b5fd4()),_0x2912e8(_0x438eb8=_0x260c27(_0x3b5fd4,_0x4c478d),_0x47ed76,_0x2729be)['call'](_0x438eb8)),_0x260c27(_0x3b5fd4,_0x4c478d);}[_0x2bb697(0x2d5)](_0x1e7b62){const _0x3c1894=_0x2bb697;let _0xab737c=JSON['parse'](localStorage[_0x3c1894(0x2bd)]('action')||'{}');if(_0xab737c&&_0xab737c[_0x1e7b62==null?void 0x0:_0x1e7b62[_0x3c1894(0x2a6)]]){_0x40dd3d(0x1,_0x3c1894(0x22b));return;}_0x2912e8(this,_0x47ed76,_0x551a35)[_0x3c1894(0x349)](this,_0x1e7b62),_0x260c27(this,_0x17b9f3)[_0x3c1894(0x349)](this),_0x2912e8(this,_0x47ed76,_0x480a68)['call'](this,_0x1e7b62[_0x3c1894(0x2a6)]);}[_0x2bb697(0x1a4)](_0x4c404a){const _0x35e95a=_0x2bb697;return _0x4c404a===_0x35e95a(0x28c);}};_0x4c478d=new WeakMap(),_0x47ed76=new WeakSet(),_0x2729be=function(){return _0x199939(this,null,function*(){});},_0x480a68=function(_0x5ac570){const _0x2a84d3=_0x2bb697;let _0x57355a=_0x2912e8(this,_0x47ed76,_0x5e3797)[_0x2a84d3(0x349)](this);if(document[_0x2a84d3(0x1c7)](_0x2a84d3(0x246)+_0x5ac570)){_0x40dd3d(0x1,_0x2a84d3(0x189)),_0x260c27(this,_0x59cdeb)[_0x2a84d3(0x349)](this,_0x5ac570);return;}if(_0x57355a!=null&&_0x57355a[_0x5ac570])switch(_0x57355a[_0x5ac570][_0x2a84d3(0x1dd)]){case _0x2a84d3(0x303):{_0x2912e8(this,_0x47ed76,_0x2016e2)[_0x2a84d3(0x349)](this,_0x57355a[_0x5ac570]);break;}case _0x2a84d3(0x1e5):{_0x2912e8(this,_0x47ed76,_0x126b75)['call'](this,_0x57355a[_0x5ac570]);break;}case _0x2a84d3(0x202):{_0x2912e8(this,_0x47ed76,_0x141014)[_0x2a84d3(0x349)](this,_0x57355a[_0x5ac570]);break;}default:return;}},_0x5e3797=function(){const _0x336b55=_0x2bb697;let _0x25ba48=localStorage[_0x336b55(0x2bd)](_0x336b55(0x25b));return _0x25ba48?JSON['parse'](_0x25ba48):null;},_0x2016e2=function(_0x731b6c){const _0x5a201a=_0x2bb697;_0x58162d[_0x5a201a(0x2fe)]({'clearActionMethod':_0x260c27(this,_0x59cdeb)[_0x5a201a(0x21d)](this),'data':_0x731b6c,'displayMethod':_0x2912e8(this,_0x47ed76,_0x126b75)[_0x5a201a(0x21d)](this),'idKey':_0x5a201a(0x2a6),'timeValueKey':_0x5a201a(0x348)});},_0x59cdeb=new WeakMap(),_0x262c67=new WeakMap(),_0x126b75=function(_0x343924){const _0x16fe56=_0x2bb697;if(document[_0x16fe56(0x1c7)](_0x16fe56(0x246)+_0x343924[_0x16fe56(0x2a6)]))_0x40dd3d(0x1,_0x16fe56(0x189));else{let _0x25fcae=_0x2912e8(this,_0x47ed76,_0x3a2480)[_0x16fe56(0x349)](this,_0x16fe56(0x1f1),_0x343924);_0x260c27(this,_0x262c67)[_0x16fe56(0x349)](this,_0x25fcae,_0x343924['message']['design']),document[_0x16fe56(0x185)][_0x16fe56(0x182)](_0x25fcae),_0x2f6659['recordEvent']({'campaignCustomerInstanceId':_0x343924[_0x16fe56(0x359)],'campaignId':_0x343924[_0x16fe56(0x2a6)],'eventName':_0x44b784,'eventProperties':[{'eventProperty':_0x16fe56(0x176),'value':JSON['stringify']({'campaignId':_0x343924[_0x16fe56(0x2a6)]})}],'name':_0x16fe56(0x1ea)});}_0x260c27(this,_0x59cdeb)[_0x16fe56(0x349)](this,_0x343924[_0x16fe56(0x2a6)]);},_0x286481=new WeakMap(),_0x42035a=function(_0x334a3d,_0x1c6812){const _0x278298=_0x2bb697;let _0x4d8a4a=_0x334a3d[_0x278298(0x187)];for(;_0x4d8a4a;){if(_0x4d8a4a['id'][_0x278298(0x1ec)](_0x1c6812))return _0x4d8a4a;_0x4d8a4a=_0x4d8a4a[_0x278298(0x187)];}return null;},_0x3a2480=function(_0x6ec154,_0x1d5a06){const _0x5219fa=_0x2bb697;let {campaignCustomerInstanceId:_0x257417,campaignId:_0x16b9f5,message:{design:_0x24a972}}=_0x1d5a06,_0x57289d=document[_0x5219fa(0x2c7)](_0x6ec154);_0x57289d['id']=_0x5219fa(0x246)+_0x16b9f5,_0x57289d[_0x5219fa(0x1af)]=_0x24a972,_0x57289d[_0x5219fa(0x2cc)][_0x5219fa(0x18d)]=_0x5219fa(0x23d),_0x57289d[_0x5219fa(0x2cc)][_0x5219fa(0x282)]='0',_0x57289d[_0x5219fa(0x2cc)][_0x5219fa(0x2f9)]='0',_0x57289d['style']['width']='100%',_0x57289d[_0x5219fa(0x2cc)][_0x5219fa(0x1b2)]='100%',_0x57289d[_0x5219fa(0x2cc)][_0x5219fa(0x1c4)]=_0x5219fa(0x358);let _0x2d70bf=_0x57289d[_0x5219fa(0x35e)](_0x5219fa(0x322));_0x2d70bf&&(_0x2d70bf['style'][_0x5219fa(0x1c4)]='50');let _0x18830e=_0x2d70bf[_0x5219fa(0x35e)](_0x5219fa(0x1f5));_0x18830e&&(_0x40dd3d(0x1,_0x5219fa(0x213)),_0x18830e['style']['setProperty'](_0x5219fa(0x31e),_0x5219fa(0x174),'important')),_0x57289d['querySelectorAll'](_0x5219fa(0x326))['forEach'](_0xaeac15=>{const _0x14abab=_0x5219fa;let _0x983a1d=_0x2912e8(this,_0x47ed76,_0x42035a)[_0x14abab(0x349)](this,_0xaeac15,_0x14abab(0x346));_0x983a1d?_0x260c27(this,_0x286481)[_0x14abab(0x349)](this,{'campaignCustomerInstanceId':_0x257417,'campaignId':_0x16b9f5,'formDiv':_0x983a1d,'popupContainer':_0x57289d}):_0x260c27(this,_0x286481)[_0x14abab(0x349)](this,{'campaignCustomerInstanceId':_0x257417,'campaignId':_0x16b9f5,'customForm':_0xaeac15,'popupContainer':_0x57289d});});let _0x4a470a=_0x57289d[_0x5219fa(0x35e)](_0x5219fa(0x34d));return(_0x4a470a==null?void 0x0:_0x4a470a[_0x5219fa(0x1bc)](_0x5219fa(0x288)))==='#'&&_0x4a470a[_0x5219fa(0x207)](_0x5219fa(0x288)),_0x4a470a==null||_0x4a470a[_0x5219fa(0x178)]('click',()=>_0x199939(this,null,function*(){const _0x49b818=_0x5219fa;_0x57289d[_0x49b818(0x1a1)](),yield _0x2f6659['recordEvent']({'campaignCustomerInstanceId':_0x257417,'campaignId':_0x16b9f5,'eventName':_0x44b784,'eventProperties':[{'eventProperty':'Close\x20Click','value':JSON[_0x49b818(0x2bf)]({'campaignId':_0x16b9f5})}],'name':_0x49b818(0x214)});})),_0x57289d[_0x5219fa(0x18c)](_0x5219fa(0x344))[_0x5219fa(0x1d1)](_0x547c67=>{const _0x2ebdab=_0x5219fa;_0x547c67[_0x2ebdab(0x178)]('click',()=>_0x199939(this,null,function*(){const _0x1574ac=_0x2ebdab;_0x57289d[_0x1574ac(0x1a1)](),yield _0x2f6659[_0x1574ac(0x266)]({'campaignCustomerInstanceId':_0x257417,'campaignId':_0x16b9f5,'eventName':_0x44b784,'eventProperties':[{'eventProperty':'Button\x20Click','value':JSON[_0x1574ac(0x2bf)]({'buttonId':_0x547c67['id'],'campaignId':_0x16b9f5})}],'name':_0x1574ac(0x23c)});}));}),_0x57289d[_0x5219fa(0x18c)](_0x5219fa(0x2df))['forEach'](_0x4e02ff=>{const _0x287eab=_0x5219fa;_0x4e02ff[_0x287eab(0x178)](_0x287eab(0x23c),()=>_0x199939(this,null,function*(){const _0x32dc79=_0x287eab;var _0x14642f;((_0x14642f=_0x4e02ff['parentElement'])==null?void 0x0:_0x14642f['tagName'])==='A'&&_0x4e02ff[_0x32dc79(0x187)]['getAttribute'](_0x32dc79(0x288))&&_0x57289d[_0x32dc79(0x1a1)](),yield _0x2f6659[_0x32dc79(0x266)]({'campaignCustomerInstanceId':_0x257417,'campaignId':_0x16b9f5,'eventName':_0x44b784,'eventProperties':[{'eventProperty':_0x32dc79(0x194),'value':JSON[_0x32dc79(0x2bf)]({'campaignId':_0x16b9f5,'imageClassName':_0x4e02ff[_0x32dc79(0x19f)],'imageId':_0x4e02ff['id']})}],'name':'click'});}));}),_0x57289d;},_0x141014=function(_0x47366b){const _0x57918c=_0x2bb697;_0x58162d[_0x57918c(0x216)]({'data':_0x47366b,'displayMethod':_0x2912e8(this,_0x47ed76,_0x126b75)['bind'](this),'timeValueKey':_0x57918c(0x348)});},_0x551a35=function(_0x173504){const _0x1f026b=_0x2bb697;_0x58162d[_0x1f026b(0x353)](_0x173504,'action','campaignId');},_0x17b9f3=new WeakMap(),_0x5a45ae(_0x555bbe,_0x4c478d);var _0x3ff0f6=_0x555bbe,_0x4a1475=_0x3ff0f6['getInstance'](),_0x5485bf,_0x28903d,_0x14df77,_0x2412a9,_0x15b9ff,_0x394571,_0x2c3dd7,_0x269fa0,_0x42cb6e=class _0x39c685{constructor(){const _0x525e3e=_0x2bb697;_0x5a45ae(this,_0x28903d),this[_0x525e3e(0x336)]=Promise[_0x525e3e(0x284)]();}static[_0x2bb697(0x236)](){const _0x1e625e=_0x2bb697;var _0x2431f6;return _0x260c27(_0x39c685,_0x5485bf)||(_0x2209aa(_0x39c685,_0x5485bf,new _0x39c685()),_0x2912e8(_0x2431f6=_0x260c27(_0x39c685,_0x5485bf),_0x28903d,_0x14df77)[_0x1e625e(0x349)](_0x2431f6)),_0x260c27(_0x39c685,_0x5485bf);}[_0x2bb697(0x2eb)](_0x14308a){const _0x1f7a64=_0x2bb697;let _0x47971c=JSON[_0x1f7a64(0x2e1)](localStorage[_0x1f7a64(0x2bd)](_0x1f7a64(0x325))||'[]');_0x47971c[_0x1f7a64(0x2d6)](_0x14308a),localStorage['setItem'](_0x1f7a64(0x325),JSON[_0x1f7a64(0x2bf)](_0x47971c));}[_0x2bb697(0x1a8)](){return _0x199939(this,null,function*(){const _0x5e3a7f=_0x4b11;let _0x31a5d4=JSON['parse'](localStorage[_0x5e3a7f(0x2bd)](_0x5e3a7f(0x325))||'[]');if(Array[_0x5e3a7f(0x17d)](_0x31a5d4)){for(let _0x208973 of _0x31a5d4)yield this[_0x5e3a7f(0x27d)](_0x208973);}});}[_0x2bb697(0x266)](_0x33629d,_0x5a96a3){return _0x199939(this,null,function*(){const _0x19a45a=_0x4b11;_0x4457ec[_0x19a45a(0x355)]&&!_0x4457ec['loading']?yield _0x2912e8(this,_0x28903d,_0x2412a9)[_0x19a45a(0x349)](this,_0x33629d,_0x5a96a3):this['pushToQueue'](_0x33629d);});}[_0x2bb697(0x27d)](_0x5192f8){return _0x199939(this,null,function*(){try{yield _0x2912e8(this,_0x28903d,_0x2412a9)['call'](this,_0x5192f8);}finally{_0x2912e8(this,_0x28903d,_0x269fa0)['call'](this,_0x5192f8['eventName']);}});}[_0x2bb697(0x172)](_0x4a8dbf){return _0x199939(this,null,function*(){const _0x3b6956=_0x4b11;_0x4457ec[_0x3b6956(0x1d7)]===0x4&&(!_0x4457ec[_0x3b6956(0x192)]||_0x4457ec[_0x3b6956(0x192)][_0x4a8dbf[_0x3b6956(0x238)]])&&(yield _0x2912e8(this,_0x28903d,_0x2412a9)[_0x3b6956(0x349)](this,_0x4a8dbf));});}[_0x2bb697(0x30d)](){const _0x5d08c8=_0x2bb697;let _0x1f4804=localStorage[_0x5d08c8(0x2bd)](_0x5d08c8(0x2c1));return _0x1f4804?JSON[_0x5d08c8(0x2e1)](_0x1f4804):{};}[_0x2bb697(0x2c9)](){return _0x199939(this,null,function*(){const _0x3e3592=_0x4b11;if(!localStorage[_0x3e3592(0x2bd)](_0x3e3592(0x2c1))){let _0x47598e=(yield this[_0x3e3592(0x285)]())[_0x3e3592(0x350)];if(_0x47598e){localStorage[_0x3e3592(0x1bb)]('events',JSON['stringify'](_0x47598e));try{_0x4ebf71[_0x3e3592(0x1dc)]({'events':_0x47598e});}catch(_0x23f70c){}}}});}[_0x2bb697(0x285)](){return _0x199939(this,null,function*(){const _0x4f25b2=_0x4b11;try{return yield _0x2301f1[_0x4f25b2(0x335)](''+_0x312ec8);}catch(_0x166593){throw new Error('Error\x20fetching\x20event\x20data');}});}[_0x2bb697(0x18f)](_0x38e9a2,_0x3c05e2){return _0x199939(this,null,function*(){const _0x111025=_0x4b11;let _0x227b14=null,_0x48541c=null,_0x158693=new AbortController();return this[_0x111025(0x336)]=this['queue'][_0x111025(0x25d)](()=>_0x199939(this,null,function*(){const _0xd1d25f=_0x111025;try{if(_0x38e9a2[_0xd1d25f(0x2c1)][_0xd1d25f(0x27c)]===0x0)throw new Error(_0xd1d25f(0x1f9));let _0x5bb070=yield _0x2301f1[_0xd1d25f(0x270)]('/v2'+_0x312ec8+_0x395317,_0x38e9a2,_0x158693['signal']);if(_0x5bb070[_0xd1d25f(0x2b3)])return _0x48541c=_0x5bb070,_0x5bb070;if(_0x5bb070['message']===_0xd1d25f(0x2ac)+localStorage[_0xd1d25f(0x2bd)]('customer')+_0xd1d25f(0x1a0))throw localStorage[_0xd1d25f(0x257)](_0xd1d25f(0x2f0)),new Error(_0xd1d25f(0x241));}catch(_0x598071){throw _0x40dd3d(0x2,_0xd1d25f(0x2cf)),_0x40dd3d(0x2,_0xd1d25f(0x260)+_0x598071[_0xd1d25f(0x277)]),_0x40dd3d(0x2,_0xd1d25f(0x24a)+_0x598071[_0xd1d25f(0x274)]),(_0x598071[_0xd1d25f(0x277)]==='AbortError'||_0x598071[_0xd1d25f(0x277)]===_0xd1d25f(0x2b0)&&_0x598071['message']===_0xd1d25f(0x21e)||_0x598071[_0xd1d25f(0x274)]===_0xd1d25f(0x234))&&(_0x40dd3d(0x2,_0xd1d25f(0x34a)),_0x3c05e2&&_0x2912e8(this,_0x28903d,_0x2c3dd7)[_0xd1d25f(0x349)](this,_0x3c05e2)),_0x227b14=new Error((_0x598071==null?void 0x0:_0x598071[_0xd1d25f(0x274)])||_0xd1d25f(0x1e9)),_0x598071;}return null;}))[_0x111025(0x2f6)](()=>{}),this[_0x111025(0x336)][_0x111025(0x25d)](()=>{if(_0x227b14)throw _0x227b14;return _0x48541c;});});}};_0x5485bf=new WeakMap(),_0x28903d=new WeakSet(),_0x14df77=function(){return _0x199939(this,null,function*(){});},_0x2412a9=function(_0x461b48,_0x19bb22){return _0x199939(this,null,function*(){yield _0x25ba15('#\x20record\x20event',()=>_0x199939(this,null,function*(){const _0x1efa80=_0x4b11;var _0x25b639,_0x23b9c3,_0x1a9a4d,_0x4757c3;let {campaignCustomerInstanceId:_0x4c73bf,campaignId:_0x467d2e,eventName:_0x476535,eventProperties:_0xfad5ea,name:_0x5e2c87,web_optin_instance_id:_0x11d548}=_0x461b48;_0x40dd3d(0x1,_0x1efa80(0x2fc)),_0x58902d(_0x1efa80(0x1a9),!0x0),_0x46ca62(_0x1efa80(0x17f),!0x0),_0x40dd3d(0x1,'Event\x20Payload'),_0x40dd3d(0x1,{'campaignCustomerInstanceId':_0x4c73bf,'eventName':_0x476535,'eventProperties':_0xfad5ea,'name':_0x5e2c87,'web_optin_instance_id':_0x11d548});let _0x1fe3e6=_0x58162d[_0x1efa80(0x1d9)]();if(_0x1fe3e6==='Crawlers'||_0x1fe3e6==='Unknown')throw new Error(_0x1efa80(0x209));_0x476535!=='Web\x20Session\x20Concluded'&&(yield _0x58162d[_0x1efa80(0x34b)]());let _0x3ea40a=[];_0xfad5ea&&_0x3ea40a[_0x1efa80(0x2d6)](..._0xfad5ea),_0x3ea40a['push']({'eventProperty':_0x1efa80(0x258),'value':_0x1fe3e6}),_0x3ea40a['push']({'eventProperty':_0x1efa80(0x2ec),'value':_0x58162d[_0x1efa80(0x345)]()}),_0x3ea40a[_0x1efa80(0x2d6)]({'eventProperty':_0x1efa80(0x231),'value':_0x58162d['getOSVersion']()});let _0x587c9c=this['getStoredEvents'](),_0x546e17=_0x2912e8(this,_0x28903d,_0x15b9ff)[_0x1efa80(0x349)](this,_0x587c9c,_0x476535,_0x3ea40a);if(typeof _0x546e17==_0x1efa80(0x21a)){_0x40dd3d(0x2,_0x546e17);return;}_0x58162d[_0x1efa80(0x239)]();let {id:_0xf9b4c4}=_0x587c9c[_0x476535],_0x3b786d=_0x2912e8(this,_0x28903d,_0x394571)[_0x1efa80(0x349)](this,_0x3cf723(_0x1570ec(_0x3cf723(_0x3cf723(_0x3cf723({},_0x4c73bf?{'campaignCustomerInstanceId':_0x4c73bf}:{}),_0x467d2e?{'campaignId':_0x467d2e}:{}),_0x11d548?{'web_optin_instance_id':_0x11d548}:{}),{'eventId':_0xf9b4c4,'eventProperties':_0x546e17,'sessionId':localStorage[_0x1efa80(0x2bd)](_0x1efa80(0x32f))||''}),_0x5e2c87?{'name':_0x5e2c87}:{}));if(_0x4457ec[_0x1efa80(0x2af)]){let _0x353da5=JSON['parse'](localStorage[_0x1efa80(0x2bd)]('offlineEvents')||'[]');_0x353da5[_0x1efa80(0x27c)]<=0x32&&(_0x353da5[_0x1efa80(0x2d6)](..._0x3b786d[_0x1efa80(0x2c1)]),localStorage['setItem'](_0x1efa80(0x210),JSON['stringify'](_0x353da5)));return;}let _0x3b4860=yield this[_0x1efa80(0x18f)](_0x3b786d,_0x461b48);(_0x25b639=_0x3b4860==null?void 0x0:_0x3b4860[_0x1efa80(0x350)])!=null&&_0x25b639['optIn']?(yield this[_0x1efa80(0x172)]({'eventName':_0x1efa80(0x25c)}),_0x4ebf71[_0x1efa80(0x280)](_0x3b4860['data'][_0x1efa80(0x235)])):_0x476535===_0x1efa80(0x2a3)&&(yield this[_0x1efa80(0x172)]({'eventName':'no_optin','eventProperties':[{'eventProperty':'message','value':''+(_0x1efa80(0x26b)in window&&typeof((_0x23b9c3=window==null?void 0x0:window[_0x1efa80(0x26b)])==null?void 0x0:_0x23b9c3[_0x1efa80(0x2a8)])!=_0x1efa80(0x198))}]})),(_0x4757c3=(_0x1a9a4d=_0x3b4860==null?void 0x0:_0x3b4860['data'])==null?void 0x0:_0x1a9a4d[_0x1efa80(0x1ce)])==null||_0x4757c3[_0x1efa80(0x1d1)](_0xfe65c=>{const _0x2e73df=_0x1efa80;_0x4a1475[_0x2e73df(0x1a4)](_0xfe65c[_0x2e73df(0x274)][_0x2e73df(0x277)])?_0x4a1475[_0x2e73df(0x2d5)](_0xfe65c):_0x3de627['isContentCardAction'](_0xfe65c[_0x2e73df(0x274)][_0x2e73df(0x277)])&&_0x3de627['showContentCard'](_0xfe65c);}),_0x46ca62(_0x1efa80(0x17f),!0x1),_0x58902d(_0x1efa80(0x1a9),!0x1);}),_0x1023cf=>{const _0x300886=_0x4b11;_0x2301f1[_0x300886(0x20f)]()==='67'&&_0x1023cf[_0x300886(0x274)]!==_0x300886(0x21e)&&_0x1023cf['message']!=='Load\x20failed'&&_0x1023cf[_0x300886(0x274)][_0x300886(0x2f5)](_0x300886(0x21e));},_0x19bb22);});},_0x15b9ff=function(_0x1ff707,_0xeeedf9,_0x25c51b){const _0x29f071=_0x2bb697;if(!Object['prototype'][_0x29f071(0x317)][_0x29f071(0x349)](_0x1ff707,_0xeeedf9))return _0x29f071(0x1a3)+_0xeeedf9+_0x29f071(0x251);if(!_0x25c51b)return[];let _0x209dab=_0x1ff707[_0xeeedf9];if(!(_0x209dab!=null&&_0x209dab['eventProperty']))return _0x40dd3d(0x2,'Event\x20'+_0xeeedf9+_0x29f071(0x302)),_0x29f071(0x1a3)+_0xeeedf9+_0x29f071(0x302);let _0x16de07=_0x25c51b[_0x29f071(0x1cf)](({eventProperty:_0x81d29a})=>!Object[_0x29f071(0x308)]['hasOwnProperty']['call'](_0x209dab[_0x29f071(0x22c)],_0x81d29a))['map'](({eventProperty:_0x291de8})=>_0x291de8);return _0x16de07[_0x29f071(0x27c)]>0x0&&(_0x40dd3d(0x2,_0x29f071(0x31a)+_0xeeedf9+_0x29f071(0x196)+_0x16de07[_0x29f071(0x29a)](',\x20')+'.'),_0x25c51b=_0x25c51b['filter'](({eventProperty:_0x2ca531})=>!_0x16de07[_0x29f071(0x2f5)](_0x2ca531))),_0x25c51b[_0x29f071(0x208)](({eventProperty:_0x499ef1,value:_0x421a12})=>({'eventPropertyId':_0x209dab[_0x29f071(0x22c)][_0x499ef1]['id'],'value':_0x421a12}));},_0x394571=function(_0x31bafa){const _0x3af765=_0x2bb697;return{'customerId':localStorage[_0x3af765(0x2bd)](_0x3af765(0x2f0))||'','deviceId':localStorage[_0x3af765(0x2bd)](_0x3af765(0x316))||'','events':[_0x31bafa]};},_0x2c3dd7=function(_0x551e73){const _0x483186=_0x2bb697;_0x40dd3d(0x1,_0x483186(0x21c)),_0x40dd3d(0x1,_0x551e73);let _0xc9b165=localStorage[_0x483186(0x2bd)]('preInitializedEvents');_0xc9b165&&_0xc9b165!=='undefined'?(_0xc9b165=JSON['parse'](_0xc9b165),_0xc9b165[_0x483186(0x2d6)](_0x551e73)):_0xc9b165=[_0x551e73],localStorage['setItem'](_0x483186(0x325),JSON[_0x483186(0x2bf)](_0xc9b165));},_0x269fa0=function(_0x9a6e8c){const _0x33d645=_0x2bb697;let _0x3a4108=JSON['parse'](localStorage['getItem']('preInitializedEvents')||'[]'),_0xd632b4=_0x3a4108['findIndex'](_0x4e251e=>_0x4e251e[_0x33d645(0x238)]===_0x9a6e8c);_0xd632b4>=0x0&&_0x3a4108[_0x33d645(0x1d2)](_0xd632b4,0x1),localStorage[_0x33d645(0x1bb)](_0x33d645(0x325),JSON[_0x33d645(0x2bf)](_0x3a4108));},_0x5a45ae(_0x42cb6e,_0x5485bf);var _0x166648=_0x42cb6e,_0x2f6659=_0x166648[_0x2bb697(0x236)](),_0x4fbb86,_0x4d80e0,_0xf5af9d,_0xb42892,_0x4ee36f,_0x272a82,_0x1ff593,_0x16800e,_0x54355f,_0x256a6f,_0x2f328f,_0x1ef118,_0x3a7f33=class _0x54771d{constructor(){const _0x1a9d07=_0x2bb697;_0x5a45ae(this,_0x4d80e0),_0x5a45ae(this,_0x1ff593,_0x6eec53=>{const _0x137d2b=_0x4b11;_0x58162d[_0x137d2b(0x1f8)]({'id':_0x6eec53,'localStorageKey':_0x137d2b(0x25b)});}),this[_0x1a9d07(0x1e2)]=()=>{const _0x249a9a=_0x1a9d07;_0x58162d[_0x249a9a(0x193)]({'actionCondition':_0x5cd5d2=>_0x5cd5d2[_0x249a9a(0x274)]['name']===_0x249a9a(0x347),'actionMethod':_0x1a20d5=>_0x2912e8(this,_0x4d80e0,_0xb42892)['call'](this,_0x1a20d5[_0x249a9a(0x2a6)]),'localStorageKey':_0x249a9a(0x25b)});},_0x5a45ae(this,_0x1ef118,()=>{const _0x22e493=_0x1a9d07;_0x58162d[_0x22e493(0x1fa)](_0x22e493(0x25b));});}static[_0x2bb697(0x236)](){const _0x1bccfd=_0x2bb697;var _0x197336;return _0x260c27(_0x54771d,_0x4fbb86)||(_0x2209aa(_0x54771d,_0x4fbb86,new _0x54771d()),_0x2912e8(_0x197336=_0x260c27(_0x54771d,_0x4fbb86),_0x4d80e0,_0xf5af9d)[_0x1bccfd(0x349)](_0x197336)),_0x260c27(_0x54771d,_0x4fbb86);}[_0x2bb697(0x29f)](_0x249e45){const _0x40dc1c=_0x2bb697;let _0x6ad793=JSON[_0x40dc1c(0x2e1)](localStorage[_0x40dc1c(0x2bd)](_0x40dc1c(0x25b))||'{}');if(_0x6ad793&&_0x6ad793[_0x249e45==null?void 0x0:_0x249e45[_0x40dc1c(0x2a6)]]){_0x40dd3d(0x1,_0x40dc1c(0x1f3));return;}_0x2912e8(this,_0x4d80e0,_0x2f328f)[_0x40dc1c(0x349)](this,_0x249e45),_0x260c27(this,_0x1ef118)[_0x40dc1c(0x349)](this),_0x2912e8(this,_0x4d80e0,_0xb42892)[_0x40dc1c(0x349)](this,_0x249e45[_0x40dc1c(0x2a6)]);}[_0x2bb697(0x294)](_0x5b1b05){return _0x5b1b05==='content_card';}};_0x4fbb86=new WeakMap(),_0x4d80e0=new WeakSet(),_0xf5af9d=function(){return _0x199939(this,null,function*(){});},_0xb42892=function(_0x29fece){const _0x42f983=_0x2bb697;let _0x120814=_0x2912e8(this,_0x4d80e0,_0x4ee36f)[_0x42f983(0x349)](this);if(document[_0x42f983(0x1c7)](_0x42f983(0x31c)+_0x29fece)){_0x40dd3d(0x1,_0x42f983(0x2ae)),_0x260c27(this,_0x1ff593)['call'](this,_0x29fece);return;}if(_0x120814!=null&&_0x120814[_0x29fece])switch(_0x120814[_0x29fece]['campaignEntryTime']){case _0x42f983(0x303):{_0x2912e8(this,_0x4d80e0,_0x272a82)[_0x42f983(0x349)](this,_0x120814[_0x29fece]);break;}case'IMMEDIATELY':{_0x2912e8(this,_0x4d80e0,_0x16800e)['call'](this,_0x120814[_0x29fece]);break;}case _0x42f983(0x202):{_0x2912e8(this,_0x4d80e0,_0x256a6f)[_0x42f983(0x349)](this,_0x120814[_0x29fece]);break;}default:return;}},_0x4ee36f=function(){const _0x34778d=_0x2bb697;let _0x29dc58=localStorage[_0x34778d(0x2bd)](_0x34778d(0x25b));return _0x29dc58?JSON[_0x34778d(0x2e1)](_0x29dc58):null;},_0x272a82=function(_0x426abe){const _0x54ffd3=_0x2bb697;_0x58162d['showDelayedAction']({'clearActionMethod':_0x260c27(this,_0x1ff593)['bind'](this),'data':_0x426abe,'displayMethod':_0x2912e8(this,_0x4d80e0,_0x16800e)[_0x54ffd3(0x21d)](this),'idKey':_0x54ffd3(0x2a6),'timeValueKey':_0x54ffd3(0x348)});},_0x1ff593=new WeakMap(),_0x16800e=function(_0x68115){const _0x5df45f=_0x2bb697;var _0x28f65e;if(document['getElementById'](_0x5df45f(0x31c)+_0x68115[_0x5df45f(0x2a6)]))_0x40dd3d(0x1,_0x5df45f(0x2ae));else{let _0x1134e9=_0x2912e8(this,_0x4d80e0,_0x54355f)[_0x5df45f(0x349)](this,_0x5df45f(0x1f1),_0x68115),_0x292761=document[_0x5df45f(0x35e)]('#'+_0x68115[_0x5df45f(0x274)]['divId']);_0x292761&&(_0x292761['innerHTML']=_0x1134e9[_0x5df45f(0x23b)],_0x2f6659[_0x5df45f(0x266)]({'campaignCustomerInstanceId':_0x68115['campaignCustomerInstanceId'],'campaignId':_0x68115['campaignId'],'eventName':_0x298ae2,'eventProperties':[{'eventProperty':_0x5df45f(0x2f1),'value':JSON[_0x5df45f(0x2bf)]({'campaignId':_0x68115[_0x5df45f(0x2a6)]})}],'name':_0x5df45f(0x1ea)}),(_0x28f65e=document[_0x5df45f(0x1c7)](_0x5df45f(0x31c)+_0x68115[_0x5df45f(0x2a6)]))==null||_0x28f65e[_0x5df45f(0x178)](_0x5df45f(0x23c),()=>{const _0x50345d=_0x5df45f;_0x2f6659[_0x50345d(0x266)]({'campaignCustomerInstanceId':_0x68115[_0x50345d(0x359)],'campaignId':_0x68115[_0x50345d(0x2a6)],'eventName':_0x298ae2,'eventProperties':[{'eventProperty':_0x50345d(0x1c3),'value':JSON[_0x50345d(0x2bf)]({'campaignId':_0x68115[_0x50345d(0x2a6)]})}],'name':_0x50345d(0x23c)});}));}_0x260c27(this,_0x1ff593)[_0x5df45f(0x349)](this,_0x68115[_0x5df45f(0x2a6)]);},_0x54355f=function(_0x396dff,_0x1f6536){const _0xa88920=_0x2bb697;var _0x59dcc9;let {campaignId:_0x51162b,message:{design:_0xd8ee6b}}=_0x1f6536,_0x61201d=document[_0xa88920(0x2c7)](_0x396dff);return _0x61201d['id']=_0xa88920(0x31c)+_0x51162b,_0x61201d[_0xa88920(0x1af)]=_0xd8ee6b,(_0x59dcc9=_0x61201d[_0xa88920(0x35e)](_0xa88920(0x34d)))==null||_0x59dcc9['remove'](),_0x61201d;},_0x256a6f=function(_0x4f1b38){const _0x125dfe=_0x2bb697;_0x58162d[_0x125dfe(0x216)]({'data':_0x4f1b38,'displayMethod':_0x2912e8(this,_0x4d80e0,_0x16800e)[_0x125dfe(0x21d)](this),'timeValueKey':_0x125dfe(0x348)});},_0x2f328f=function(_0x12e6ba){const _0x2070b6=_0x2bb697;_0x58162d[_0x2070b6(0x353)](_0x12e6ba,_0x2070b6(0x25b),'campaignId');},_0x1ef118=new WeakMap(),_0x5a45ae(_0x3a7f33,_0x4fbb86);var _0x87d18d=_0x3a7f33,_0x3de627=_0x87d18d[_0x2bb697(0x236)](),_0x534daf,_0x1a8d3a,_0x408cda,_0x1a6f61,_0x3ebb9e,_0x23deea,_0x223c5e,_0xf5780b,_0x5dcea6,_0x15d00b,_0x1a7338,_0x430cbd,_0x1953df,_0x168fa4,_0x5f5dae,_0x394769,_0x509bce,_0x355295,_0x5e38e0,_0x4f2701,_0x1babd2,_0x217210,_0x405c20,_0x11c26b,_0x41c11a,_0x54c725,_0x4df6e3,_0x317a50,_0x4a4b3b=class _0x3629c3{constructor(){const _0x3b300f=_0x2bb697;_0x5a45ae(this,_0x5dcea6),_0x5a45ae(this,_0x1a8d3a),_0x5a45ae(this,_0x408cda),_0x5a45ae(this,_0x1a6f61),_0x5a45ae(this,_0x3ebb9e,null),_0x5a45ae(this,_0x23deea,null),_0x5a45ae(this,_0x223c5e,!0x1),_0x5a45ae(this,_0xf5780b,()=>{setInterval(()=>{const _0x5d2d05=_0x4b11;_0x25ba15(_0x5d2d05(0x2ca),()=>_0x199939(this,null,function*(){const _0x53ac25=_0x5d2d05;let _0x563895=localStorage[_0x53ac25(0x2bd)](_0x53ac25(0x35a));if(_0x563895!==_0x260c27(this,_0x23deea)){_0x40dd3d(0x1,_0x53ac25(0x2f3)),_0x2209aa(this,_0x23deea,_0x563895);let _0x30ae34=JSON[_0x53ac25(0x2e1)](_0x563895||'{}');if(_0x30ae34!=null&&_0x30ae34[_0x53ac25(0x1dc)]){_0x40dd3d(0x1,_0x53ac25(0x35f));let _0x438159=_0x30ae34[_0x53ac25(0x1dc)];delete _0x30ae34[_0x53ac25(0x1dc)],localStorage[_0x53ac25(0x1bb)](_0x53ac25(0x35a),JSON[_0x53ac25(0x2bf)](_0x30ae34)),_0x4ebf71[_0x53ac25(0x1dc)](_0x438159);}if(_0x30ae34!=null&&_0x30ae34[_0x53ac25(0x235)]){let _0x14a05a=_0x30ae34[_0x53ac25(0x235)];delete _0x30ae34[_0x53ac25(0x235)],localStorage[_0x53ac25(0x1bb)](_0x53ac25(0x35a),JSON[_0x53ac25(0x2bf)](_0x30ae34)),_0x4ebf71[_0x53ac25(0x280)](_0x14a05a);}if(_0x30ae34!=null&&_0x30ae34[_0x53ac25(0x1ce)]){let _0x24c6fb=_0x30ae34[_0x53ac25(0x1ce)];delete _0x30ae34[_0x53ac25(0x1ce)],localStorage['setItem']('mergn_shopify',JSON[_0x53ac25(0x2bf)](_0x30ae34)),_0x24c6fb['forEach'](_0x33ad35=>{const _0x45718a=_0x53ac25;_0x4a1475[_0x45718a(0x1a4)](_0x33ad35['message'][_0x45718a(0x277)])?_0x4a1475['showPopup'](_0x33ad35):_0x3de627[_0x45718a(0x294)](_0x33ad35[_0x45718a(0x274)][_0x45718a(0x277)])&&_0x3de627[_0x45718a(0x29f)](_0x33ad35);});}}}));},0x3e8);}),this[_0x3b300f(0x1fa)]=_0x3ee4b6=>{const _0x8a9fe7=_0x3b300f;let _0x15ae4f=()=>{const _0x9101e4=_0x4b11;let _0x1e49dd=JSON[_0x9101e4(0x2e1)](localStorage[_0x9101e4(0x2bd)](_0x3ee4b6)||'{}');Object[_0x9101e4(0x22a)](_0x1e49dd)[_0x9101e4(0x1d1)](_0x23a8b5=>{const _0x397e27=_0x9101e4;_0x1e49dd[_0x23a8b5][_0x397e27(0x1bd)]=new Date()[_0x397e27(0x267)]();}),localStorage['setItem'](_0x3ee4b6,JSON[_0x9101e4(0x2bf)](_0x1e49dd));};_0x15ae4f(),window[_0x8a9fe7(0x178)](_0x8a9fe7(0x1b4),_0x15ae4f);},this[_0x3b300f(0x1f8)]=({id:_0x1950f6,localStorageKey:_0x55aad2})=>{const _0x51375d=_0x3b300f;let _0x1e6092=JSON[_0x51375d(0x2e1)](localStorage[_0x51375d(0x2bd)](_0x55aad2)||'{}');_0x1e6092[_0x1950f6]&&delete _0x1e6092[_0x1950f6],localStorage[_0x51375d(0x1bb)](_0x55aad2,JSON[_0x51375d(0x2bf)](_0x1e6092));},this[_0x3b300f(0x193)]=({actionCondition:_0x1e1593,actionMethod:_0x1b457e,localStorageKey:_0xeabfc9})=>{const _0x1edb62=_0x3b300f;let _0x1d1570=JSON['parse'](localStorage[_0x1edb62(0x2bd)](_0xeabfc9)||'{}');Object[_0x1edb62(0x22a)](_0x1d1570)['forEach'](_0x4f02bd=>{_0x1e1593(_0x1d1570[_0x4f02bd])&&_0x1b457e(_0x1d1570[_0x4f02bd]);});};}static[_0x2bb697(0x236)](){return _0x260c27(_0x3629c3,_0x534daf)||_0x2209aa(_0x3629c3,_0x534daf,new _0x3629c3()),_0x260c27(_0x3629c3,_0x534daf);}[_0x2bb697(0x341)](_0xf592a2,_0x9883a8){return _0x199939(this,null,function*(){const _0x3c7649=_0x4b11;_0x40dd3d(0x1,_0x3c7649(0x2ad));let _0xc59416=_0x2912e8(this,_0x5dcea6,_0x1953df)[_0x3c7649(0x349)](this);_0x9883a8!=null&&_0x9883a8['shopify']&&_0x2209aa(this,_0x223c5e,!0x0),_0x2912e8(this,_0x5dcea6,_0x15d00b)['call'](this,_0xf592a2);let _0x23f280=this[_0x3c7649(0x1d9)]();if(_0x23f280==='Crawlers'||_0x23f280===_0x3c7649(0x319)){_0x40dd3d(0x2,_0x3c7649(0x2a5));return;}if(yield _0x2301f1[_0x3c7649(0x173)](),_0x40dd3d(0x1,'Verifying\x20API\x20Key'),yield _0x2912e8(this,_0x5dcea6,_0x41c11a)[_0x3c7649(0x349)](this,0x3),_0x9883a8!=null&&_0x9883a8[_0x3c7649(0x2cd)]&&_0x260c27(this,_0xf5780b)[_0x3c7649(0x349)](this),_0x9883a8!=null&&_0x9883a8['identity'])try{_0x4457ec[_0x3c7649(0x354)]=!0x0,yield this[_0x3c7649(0x2dc)](_0x9883a8[_0x3c7649(0x228)]);}finally{_0x4457ec['loading']=!0x1;}yield this[_0x3c7649(0x34b)](),yield _0x2f6659[_0x3c7649(0x1a8)](),yield _0x499798[_0x3c7649(0x1a5)](),_0x2f6659[_0x3c7649(0x172)]({'eventName':'base_init'}),_0x40dd3d(0x1,_0x3c7649(0x1ff)),yield _0x25ba15('notification\x20service',()=>_0x199939(this,null,function*(){const _0x3e10eb=_0x3c7649;yield _0x4ebf71[_0x3e10eb(0x341)](_0xc59416,_0x9883a8==null?void 0x0:_0x9883a8[_0x3e10eb(0x1de)]);})),yield _0x2912e8(this,_0x5dcea6,_0x317a50)[_0x3c7649(0x349)](this,_0x9883a8==null?void 0x0:_0x9883a8[_0x3c7649(0x2cd)]);let _0x45171a=history['pushState'];history['pushState']=(..._0x50a74e)=>{const _0x174b49=_0x3c7649;_0x45171a[_0x174b49(0x291)](history,_0x50a74e),_0x2912e8(this,_0x5dcea6,_0x4df6e3)['call'](this,_0x9883a8==null?void 0x0:_0x9883a8[_0x174b49(0x2cd)]);},_0x40dd3d(0x1,_0x3c7649(0x21f));});}[_0x2bb697(0x29b)](_0x50a9e6){_0x2209aa(this,_0x1a8d3a,_0x50a9e6);}['setOSVersion'](_0x21bebb){_0x2209aa(this,_0x408cda,_0x21bebb);}[_0x2bb697(0x186)](_0x8082e8){_0x2209aa(this,_0x1a6f61,_0x8082e8);}['setPreviousUrl'](_0x47add6){_0x2209aa(this,_0x3ebb9e,_0x47add6);}[_0x2bb697(0x180)](){return _0x260c27(this,_0x3ebb9e);}[_0x2bb697(0x1d9)](){return _0x260c27(this,_0x1a8d3a);}[_0x2bb697(0x331)](){return _0x260c27(this,_0x408cda);}[_0x2bb697(0x345)](){return _0x260c27(this,_0x1a6f61);}['updateSessionCreated'](){}['showAfterScrollAction']({data:_0x4c4eeb,displayMethod:_0x5e3ddd,timeValueKey:_0x56046c}){const _0x216383=_0x2bb697;let _0x1735be=()=>{const _0x42c886=_0x4b11;var _0x4196f2;let _0x5c7fba=window[_0x42c886(0x2fd)],_0x218608=document[_0x42c886(0x290)][_0x42c886(0x256)];window[_0x42c886(0x28b)]/(_0x218608-_0x5c7fba)*0x64>(((_0x4196f2=_0x4c4eeb[_0x56046c])==null?void 0x0:_0x4196f2[_0x42c886(0x30b)])||0x0)&&(window[_0x42c886(0x30e)](_0x42c886(0x313),_0x1735be),_0x5e3ddd(_0x4c4eeb));};window[_0x216383(0x178)](_0x216383(0x313),_0x1735be);}[_0x2bb697(0x2fe)]({clearActionMethod:_0x448191,data:_0x5756f7,displayMethod:_0x3ef213,idKey:_0x110210,timeValueKey:_0x2e79d8}){const _0xcb1c68=_0x2bb697;var _0x2aa1e2,_0x1f6079,_0x382345;let _0x38d711=(_0x2aa1e2=_0x5756f7[_0x2e79d8])==null?void 0x0:_0x2aa1e2['value'];((_0x1f6079=_0x5756f7[_0x2e79d8])==null?void 0x0:_0x1f6079[_0xcb1c68(0x2c0)])===_0xcb1c68(0x1d3)&&(_0x38d711=_0x38d711*0x3c);let _0x234530=_0x5756f7[_0xcb1c68(0x1bd)]-0x1f4+(_0x38d711||0x0)*0x3e8-new Date()[_0xcb1c68(0x267)]();_0x40dd3d(0x1,_0xcb1c68(0x1da)+_0x5756f7['initialTime']),_0x40dd3d(0x1,_0xcb1c68(0x240)+((_0x382345=_0x5756f7[_0x2e79d8])==null?void 0x0:_0x382345[_0xcb1c68(0x30b)])),_0x40dd3d(0x1,'Current\x20time:\x20'+new Date()[_0xcb1c68(0x267)]()),_0x40dd3d(0x1,_0xcb1c68(0x29c)+_0x234530),_0x234530>0x0?setTimeout(()=>{_0x448191(_0x5756f7[_0x110210]),_0x3ef213(_0x5756f7);},_0x234530):(_0x448191(_0x5756f7[_0x110210]),_0x3ef213(_0x5756f7));}[_0x2bb697(0x353)](_0x3fd8ca,_0xef3411,_0x19d225){const _0x2abd7c=_0x2bb697;var _0x3d8168;let _0x4859e2=JSON[_0x2abd7c(0x2e1)](localStorage['getItem'](_0xef3411)||'{}'),_0x24a7a5=(_0x3d8168=_0x19d225 in _0x3fd8ca&&_0x3fd8ca[_0x19d225])!=null?_0x3d8168:'';_0x24a7a5&&(_0x4859e2[_0x24a7a5]=_0x1570ec(_0x3cf723({},_0x3fd8ca),{'initialTime':new Date()['getTime']()}),localStorage[_0x2abd7c(0x1bb)](_0xef3411,JSON[_0x2abd7c(0x2bf)](_0x4859e2)));}[_0x2bb697(0x34b)](){return _0x199939(this,null,function*(){const _0x615a75=_0x4b11;yield _0x25ba15(_0x615a75(0x1f2),()=>_0x199939(this,null,function*(){const _0x28c53b=_0x615a75;if(_0x260c27(this,_0x223c5e))return;_0x40dd3d(0x1,_0x28c53b(0x339)),_0x58902d(_0x28c53b(0x339),!0x0),_0x46ca62(_0x28c53b(0x1ba),!0x0);let _0x5e100c=localStorage['getItem']('ttl'),_0x5cd304=!0x1;if(_0x5cd304=_0x2912e8(this,_0x5dcea6,_0x1953df)[_0x28c53b(0x349)](this,_0x5e100c),_0x5cd304){let _0x236db6=localStorage[_0x28c53b(0x2bd)](_0x28c53b(0x32f)),_0x47fa4e=localStorage[_0x28c53b(0x2bd)](_0x28c53b(0x2d0));if(_0x236db6&&_0x47fa4e){let _0x3b3b41=parseInt(_0x47fa4e,0xa);yield _0x2f6659[_0x28c53b(0x266)]({'eventName':'Web\x20Session\x20Concluded','eventProperties':[{'eventProperty':_0x28c53b(0x311),'value':localStorage[_0x28c53b(0x2bd)](_0x28c53b(0x32f))},{'eventProperty':_0x28c53b(0x243),'value':Number['isInteger'](_0x3b3b41)?new Date(_0x3b3b41)[_0x28c53b(0x1a2)]():new Date()[_0x28c53b(0x1a2)]()}]});}localStorage[_0x28c53b(0x257)](_0x28c53b(0x2d0)),localStorage['removeItem'](_0x28c53b(0x32f)),localStorage[_0x28c53b(0x1bb)](_0x28c53b(0x2d0),''+new Date()[_0x28c53b(0x267)]()),yield _0x2912e8(this,_0x5dcea6,_0x1babd2)[_0x28c53b(0x349)](this),this['clearLocalStorage']();}(!_0x5e100c||_0x5cd304||_0x2912e8(this,_0x5dcea6,_0x5e38e0)['call'](this))&&(_0x2912e8(this,_0x5dcea6,_0x509bce)['call'](this)&&_0x2912e8(this,_0x5dcea6,_0x4f2701)[_0x28c53b(0x349)](this),_0x2912e8(this,_0x5dcea6,_0x394769)['call'](this)&&(yield this[_0x28c53b(0x2dc)]()),(_0x2912e8(this,_0x5dcea6,_0x1953df)[_0x28c53b(0x349)](this)||_0x2912e8(this,_0x5dcea6,_0x168fa4)[_0x28c53b(0x349)](this))&&(yield _0x2912e8(this,_0x5dcea6,_0x405c20)[_0x28c53b(0x349)](this)),yield _0x2912e8(this,_0x5dcea6,_0x1babd2)[_0x28c53b(0x349)](this),(_0x2912e8(this,_0x5dcea6,_0x1953df)[_0x28c53b(0x349)](this)||_0x2912e8(this,_0x5dcea6,_0x5f5dae)['call'](this))&&(yield _0x2912e8(this,_0x5dcea6,_0x11c26b)[_0x28c53b(0x349)](this))),_0x46ca62('Checking\x20TTL\x20Time',!0x1),_0x58902d('Checking\x20TTL',!0x1);}));});}[_0x2bb697(0x279)](){const _0x1ce2d8=_0x2bb697;localStorage[_0x1ce2d8(0x257)]('action'),localStorage['removeItem'](_0x1ce2d8(0x2c1)),localStorage[_0x1ce2d8(0x257)](_0x1ce2d8(0x227)),localStorage[_0x1ce2d8(0x257)](_0x1ce2d8(0x210));}[_0x2bb697(0x19b)](_0x478d6a){const _0x54aa56=_0x2bb697;let _0x1dcf26=this[_0x54aa56(0x250)](_0x54aa56(0x2e7));if(_0x1dcf26&&_0x1dcf26!==_0x54aa56(0x198)){let _0x16bbf9=this[_0x54aa56(0x2d3)](_0x1dcf26);return _0x478d6a&&_0x478d6a===_0x16bbf9?!0x0:_0x16bbf9;}return!0x1;}['storeIdentity'](_0x3d1282){const _0x53c11b=_0x2bb697;let _0x41aa31=this['encodeData'](_0x3d1282);this[_0x53c11b(0x2bc)](_0x53c11b(0x2e7),_0x41aa31,0x16d);}[_0x2bb697(0x1e3)](_0x43ffe4){const _0x31e231=_0x2bb697;let _0x1308aa=new TextEncoder()[_0x31e231(0x224)](_0x43ffe4),_0xed33fb='';for(let _0x4c3d05=0x0;_0x4c3d05<_0x1308aa[_0x31e231(0x27c)];_0x4c3d05++)_0xed33fb+=String['fromCharCode'](_0x1308aa[_0x4c3d05]);return btoa(_0xed33fb);}[_0x2bb697(0x2d3)](_0x3d608a){const _0xeb9b6b=_0x2bb697;let _0x5cc62d=atob(_0x3d608a),_0x28995c=new Uint8Array(_0x5cc62d[_0xeb9b6b(0x27c)]);for(let _0x228d18=0x0;_0x228d18<_0x5cc62d[_0xeb9b6b(0x27c)];_0x228d18++)_0x28995c[_0x228d18]=_0x5cc62d[_0xeb9b6b(0x197)](_0x228d18);return new TextDecoder()[_0xeb9b6b(0x206)](_0x28995c);}[_0x2bb697(0x250)](_0x5d1c6a){const _0x589ab1=_0x2bb697;var _0x413762;let _0xc7cd2c=(';\x20'+document[_0x589ab1(0x1d5)])[_0x589ab1(0x304)](';\x20'+_0x5d1c6a+'=');return _0xc7cd2c['length']===0x2&&((_0x413762=_0xc7cd2c['pop']())==null?void 0x0:_0x413762[_0x589ab1(0x304)](';')['shift']())||null;}[_0x2bb697(0x2bc)](_0x38d0e9,_0x490c99,_0x579246){const _0x1b0e24=_0x2bb697;let _0x3211bb=new Date();_0x3211bb[_0x1b0e24(0x31d)](_0x3211bb['getTime']()+_0x579246*0x18*0x3c*0x3c*0x3e8);let _0x1d17dd=_0x1b0e24(0x25a)+_0x3211bb[_0x1b0e24(0x351)]();document[_0x1b0e24(0x1d5)]=_0x38d0e9+'='+_0x490c99+';\x20'+_0x1d17dd+';\x20path=/;\x20secure;\x20SameSite=Strict';}['setIdentity'](_0xfb3ae8){return _0x199939(this,null,function*(){const _0x30c88f=_0x4b11;let _0x1cc848=this[_0x30c88f(0x19b)](_0xfb3ae8);if(typeof _0x1cc848==_0x30c88f(0x2ba)&&_0x1cc848)return;let _0x33ceeb=localStorage['getItem'](_0x30c88f(0x316));(!_0x33ceeb||_0x33ceeb===_0x30c88f(0x198))&&(_0x33ceeb=_0x2912e8(this,_0x5dcea6,_0x4f2701)[_0x30c88f(0x349)](this));let _0x4f3e98={'deviceId':_0x33ceeb,'os':this['getPlatform']()};if(_0xfb3ae8)_0x4f3e98[_0x30c88f(0x228)]=_0xfb3ae8;else{if(typeof _0x1cc848==_0x30c88f(0x21a))_0x4f3e98[_0x30c88f(0x228)]=_0x1cc848;else{if(!_0xfb3ae8&&localStorage['getItem'](_0x30c88f(0x2f0)))return;}}try{let _0x23b1a2=yield _0x2912e8(this,_0x5dcea6,_0x217210)[_0x30c88f(0x349)](this,_0x4f3e98);if(_0x23b1a2!==void 0x0){localStorage['setItem'](_0x30c88f(0x2f0),_0x23b1a2),this['storeIdentity'](_0x4f3e98['identity']);try{_0x4ebf71[_0x30c88f(0x1dc)]({'customer':_0x23b1a2});}catch(_0x1ca02f){}}}catch(_0x131ff9){throw new Error(_0x30c88f(0x1d4));}});}};_0x534daf=new WeakMap(),_0x1a8d3a=new WeakMap(),_0x408cda=new WeakMap(),_0x1a6f61=new WeakMap(),_0x3ebb9e=new WeakMap(),_0x23deea=new WeakMap(),_0x223c5e=new WeakMap(),_0xf5780b=new WeakMap(),_0x5dcea6=new WeakSet(),_0x15d00b=function(_0x1a06cc){const _0x2e7924=_0x2bb697;_0x2301f1[_0x2e7924(0x283)](_0x1a06cc),this[_0x2e7924(0x29b)](_0x2912e8(this,_0x5dcea6,_0x1a7338)[_0x2e7924(0x349)](this)),this[_0x2e7924(0x343)](_0x2912e8(this,_0x5dcea6,_0x430cbd)[_0x2e7924(0x349)](this)),this['setOperatingSystem'](navigator[_0x2e7924(0x33b)]);},_0x1a7338=function(){const _0x22db79=_0x2bb697;var _0xb86e35;let _0x2737fe=navigator['userAgent'][_0x22db79(0x1b5)]();return/googlebot|bingbot|yandexbot|duckduckbot|slurp|twitterbot|linkedinbot|facebot|pinterest|vkshare|applebot|baiduspider|adsbot-google|msnbot|yahoobot|sogou|facebookexternalhit/i['test'](_0x2737fe)?_0x22db79(0x1e8):/wv|wkwebview|instagram|facebook|fbav|fban|twitter|snapchat|pinterest|linkedin|tiktok/i[_0x22db79(0x31b)](_0x2737fe)?_0x22db79(0x35c):/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i[_0x22db79(0x31b)](_0x2737fe)?(_0x22db79(0x26b)in window&&typeof((_0xb86e35=window==null?void 0x0:window[_0x22db79(0x26b)])==null?void 0x0:_0xb86e35[_0x22db79(0x2a8)])!=_0x22db79(0x198),_0x22db79(0x35c)):/windows|macintosh|linux|x11/i[_0x22db79(0x31b)](_0x2737fe)?'Web':'Unknown';},_0x430cbd=function(){const _0x17ffe0=_0x2bb697;let _0x2a4b41=navigator[_0x17ffe0(0x33b)],_0x40259b;return _0x2a4b41[_0x17ffe0(0x2d9)]('Instagram')>-0x1?_0x40259b=_0x17ffe0(0x16f):_0x2a4b41[_0x17ffe0(0x2d9)]('Facebook')>-0x1||_0x2a4b41['indexOf'](_0x17ffe0(0x221))>-0x1||_0x2a4b41[_0x17ffe0(0x2d9)]('FBAN')>-0x1?_0x40259b=_0x17ffe0(0x332):_0x2a4b41['indexOf'](_0x17ffe0(0x1d8))>-0x1?_0x40259b='Twitter':_0x2a4b41['indexOf']('Snapchat')>-0x1?_0x40259b=_0x17ffe0(0x2ab):_0x2a4b41[_0x17ffe0(0x2d9)](_0x17ffe0(0x1b0))>-0x1?_0x40259b='LinkedIn':_0x2a4b41[_0x17ffe0(0x2d9)]('TikTok')>-0x1?_0x40259b=_0x17ffe0(0x1db):_0x2a4b41[_0x17ffe0(0x2d9)](_0x17ffe0(0x33f))>-0x1&&_0x2a4b41[_0x17ffe0(0x2d9)](_0x17ffe0(0x2e2))===-0x1?_0x40259b=_0x17ffe0(0x1e0):_0x2a4b41[_0x17ffe0(0x2d9)](_0x17ffe0(0x215))>-0x1&&_0x2a4b41[_0x17ffe0(0x2d9)](_0x17ffe0(0x33f))===-0x1?_0x40259b=_0x17ffe0(0x215):_0x2a4b41[_0x17ffe0(0x2d9)](_0x17ffe0(0x271))>-0x1?_0x40259b='Mozilla\x20Firefox':_0x2a4b41['indexOf'](_0x17ffe0(0x2e2))>-0x1?_0x40259b=_0x17ffe0(0x1bf):_0x2a4b41[_0x17ffe0(0x2d9)](_0x17ffe0(0x1ad))>-0x1||_0x2a4b41['indexOf'](_0x17ffe0(0x276))>-0x1?_0x40259b='Internet\x20Explorer':_0x2a4b41[_0x17ffe0(0x2d9)](_0x17ffe0(0x1b3))>-0x1||_0x2a4b41[_0x17ffe0(0x2d9)](_0x17ffe0(0x247))>-0x1?_0x40259b=_0x17ffe0(0x1b3):_0x2a4b41['indexOf']('Vivaldi')>-0x1?_0x40259b='Vivaldi':_0x2a4b41[_0x17ffe0(0x2d9)](_0x17ffe0(0x170))>-0x1?_0x40259b='Brave':_0x2a4b41[_0x17ffe0(0x2d9)](_0x17ffe0(0x19e))>-0x1?_0x40259b='Samsung\x20Internet':_0x2a4b41['indexOf']('UCBrowser')>-0x1?_0x40259b=_0x17ffe0(0x27b):_0x2a4b41[_0x17ffe0(0x2d9)]('QQBrowser')>-0x1?_0x40259b=_0x17ffe0(0x2bb):_0x2a4b41[_0x17ffe0(0x2d9)]('Baidu')>-0x1?_0x40259b=_0x17ffe0(0x281):_0x2a4b41[_0x17ffe0(0x2d9)](_0x17ffe0(0x22f))>-0x1?_0x40259b='Sogou\x20Browser':_0x40259b=_0x17ffe0(0x319),_0x40259b;},_0x1953df=function(_0x559454){const _0x156754=_0x2bb697;let _0x481bbb;return _0x559454||(_0x481bbb=localStorage['getItem'](_0x156754(0x2d0))),_0x559454||_0x481bbb?new Date()[_0x156754(0x267)]()-parseInt(_0x559454||_0x481bbb||'',0xa)>0x124f80:!0x0;},_0x168fa4=function(){const _0x263766=_0x2bb697;return!localStorage[_0x263766(0x2bd)](_0x263766(0x2c1));},_0x5f5dae=function(){const _0x5b290b=_0x2bb697;return!localStorage[_0x5b290b(0x2bd)]('attributes');},_0x394769=function(){const _0x14bda2=_0x2bb697;return!localStorage[_0x14bda2(0x2bd)](_0x14bda2(0x2f0));},_0x509bce=function(){const _0x3e4d6f=_0x2bb697;return!localStorage[_0x3e4d6f(0x2bd)](_0x3e4d6f(0x316));},_0x355295=function(){const _0x48af2d=_0x2bb697;return!localStorage[_0x48af2d(0x2bd)](_0x48af2d(0x32f));},_0x5e38e0=function(){const _0x1b3183=_0x2bb697;return _0x2912e8(this,_0x5dcea6,_0x168fa4)[_0x1b3183(0x349)](this)||_0x2912e8(this,_0x5dcea6,_0x5f5dae)[_0x1b3183(0x349)](this)||_0x2912e8(this,_0x5dcea6,_0x394769)['call'](this)||_0x2912e8(this,_0x5dcea6,_0x509bce)[_0x1b3183(0x349)](this)||_0x2912e8(this,_0x5dcea6,_0x355295)[_0x1b3183(0x349)](this);},_0x4f2701=function(){const _0x13da2e=_0x2bb697;let _0x5975ca=localStorage[_0x13da2e(0x2bd)](_0x13da2e(0x316));return _0x5975ca||(_0x5975ca=crypto[_0x13da2e(0x30f)](),localStorage['setItem']('uniqueIdentity',_0x5975ca)),_0x5975ca;},_0x1babd2=function(){return _0x199939(this,null,function*(){yield _0x25ba15('store\x20session',()=>_0x199939(this,null,function*(){const _0x1bf822=_0x4b11;let _0x35d00=localStorage['getItem']('session');if(!_0x35d00){_0x35d00=crypto[_0x1bf822(0x30f)](),localStorage[_0x1bf822(0x1bb)](_0x1bf822(0x32f),_0x35d00);let _0x3376e2=localStorage[_0x1bf822(0x2bd)](_0x1bf822(0x2d0)),_0x36a635=_0x3376e2?parseInt(_0x3376e2,0xa):'';yield _0x2f6659[_0x1bf822(0x266)]({'eventName':'Web\x20Session\x20Started','eventProperties':[{'eventProperty':_0x1bf822(0x311),'value':localStorage[_0x1bf822(0x2bd)](_0x1bf822(0x32f))},{'eventProperty':_0x1bf822(0x243),'value':_0x36a635?new Date(_0x36a635)[_0x1bf822(0x1a2)]():new Date()[_0x1bf822(0x1a2)]()}]});}}),_0x38a0ca=>{const _0x2ddd8d=_0x4b11;_0x2301f1[_0x2ddd8d(0x20f)]()==='67'&&_0x38a0ca['message']!==_0x2ddd8d(0x21e)&&_0x38a0ca[_0x2ddd8d(0x274)];});});},_0x217210=function(_0x3b9faf){return _0x199939(this,null,function*(){const _0x5daa85=_0x4b11;try{return(yield _0x2301f1[_0x5daa85(0x270)](''+_0x1cda28+_0x1a2dd9,_0x3b9faf))[_0x5daa85(0x350)];}catch(_0x2913ca){throw new Error(_0x5daa85(0x2f8));}});},_0x405c20=function(){return _0x199939(this,null,function*(){const _0x24bb27=_0x4b11;yield _0x2f6659[_0x24bb27(0x2c9)]();});},_0x11c26b=function(){return _0x199939(this,null,function*(){const _0x24066d=_0x4b11;yield _0x499798[_0x24066d(0x254)]();});},_0x41c11a=function(_0x5bcfa3){return _0x199939(this,null,function*(){const _0x632037=_0x4b11;yield _0x25ba15(_0x632037(0x2e0),()=>_0x199939(this,null,function*(){const _0x3b146a=_0x632037;var _0x2398db;try{let _0x842bbd=parseInt(localStorage[_0x3b146a(0x2bd)](_0x3b146a(0x1d6))||'0',0xa)||0x0;if(!_0x842bbd||_0x842bbd&&new Date()['getTime']()>_0x842bbd){let _0x5e4a80=yield _0x2301f1[_0x3b146a(0x335)](_0x3b146a(0x190));if(!(_0x5e4a80!=null&&_0x5e4a80[_0x3b146a(0x2b3)]))throw new Error(JSON[_0x3b146a(0x2bf)](_0x5e4a80));localStorage[_0x3b146a(0x1bb)](_0x3b146a(0x1d6),(new Date()[_0x3b146a(0x267)]()+0x493e0)['toString']());}_0x4457ec[_0x3b146a(0x1c9)]=!0x1,_0x4457ec[_0x3b146a(0x355)]=!0x0;}catch(_0x4e87cf){if(_0x2301f1[_0x3b146a(0x20f)]()==='67'&&!((_0x2398db=_0x4e87cf==null?void 0x0:_0x4e87cf[_0x3b146a(0x274)])!=null&&_0x2398db[_0x3b146a(0x1ec)](_0x3b146a(0x335)))&&(_0x4e87cf==null?void 0x0:_0x4e87cf['message'])!==_0x3b146a(0x352)&&_0x4e87cf['message']!==_0x3b146a(0x21e)&&_0x4e87cf[_0x3b146a(0x274)],_0x5bcfa3&&_0x5bcfa3>=0x1){yield new Promise(_0x49eb70=>setTimeout(_0x49eb70,0x5dc)),yield _0x2912e8(this,_0x5dcea6,_0x41c11a)[_0x3b146a(0x349)](this,_0x5bcfa3-0x1);return;}throw _0x4457ec[_0x3b146a(0x1c9)]=!0x0,new Error(_0x3b146a(0x352));}}));});},_0x54c725=function(_0x1f25cd){return _0x199939(this,null,function*(){const _0x131b40=_0x4b11;var _0x1a0810;_0x40dd3d(0x1,'Performing\x20viewed\x20web\x20page\x20event');let _0x2f6dfe=(_0x1a0810=window==null?void 0x0:window[_0x131b40(0x1ae)])==null?void 0x0:_0x1a0810[_0x131b40(0x288)];if(this[_0x131b40(0x315)](_0x2f6dfe),_0x1f25cd){_0x2f6dfe[_0x131b40(0x2f5)](_0x131b40(0x2ff))&&(yield _0x2f6659[_0x131b40(0x266)]({'eventName':_0x131b40(0x2be)}));return;}_0x2f6659[_0x131b40(0x172)]({'eventName':_0x131b40(0x222)});let _0x1af3c3=[];new URLSearchParams(new URL(window['location'][_0x131b40(0x288)])['search'])[_0x131b40(0x1d1)]((_0x590d24,_0x10e95b)=>_0x199939(this,null,function*(){const _0x5f15b3=_0x131b40;_0x4f9000[_0x5f15b3(0x255)](_0x10e95b)&&_0x1af3c3['push']({'eventProperty':_0x10e95b,'value':_0x590d24});})),yield _0x2f6659[_0x131b40(0x266)]({'eventName':'Viewed\x20Webpage','eventProperties':[{'eventProperty':_0x131b40(0x306),'value':window[_0x131b40(0x1ae)]['pathname']},..._0x1af3c3]});});},_0x4df6e3=function(_0x43a188){return _0x199939(this,null,function*(){const _0x150d3b=_0x4b11;var _0x44f963;_0x40dd3d(0x1,_0x150d3b(0x204));let _0xa03b47=(_0x44f963=window==null?void 0x0:window[_0x150d3b(0x1ae)])==null?void 0x0:_0x44f963[_0x150d3b(0x288)];(this[_0x150d3b(0x180)]()===null||this[_0x150d3b(0x180)]()===void 0x0||_0xa03b47!==this[_0x150d3b(0x180)]())&&(yield _0x2912e8(this,_0x5dcea6,_0x54c725)[_0x150d3b(0x349)](this,_0x43a188));});},_0x317a50=function(_0x29a31c){return _0x199939(this,null,function*(){const _0x34a051=_0x4b11;var _0xa62e35,_0x494340;let _0xaf3e4a=(_0xa62e35=window==null?void 0x0:window[_0x34a051(0x1ae)])==null?void 0x0:_0xa62e35[_0x34a051(0x288)];_0x2f6659['recordDebugEvents']({'eventName':_0x34a051(0x338),'eventProperties':[{'eventProperty':_0x34a051(0x274),'value':(_0xaf3e4a!==this[_0x34a051(0x180)]())+':'+_0xaf3e4a+':'+this['getPreviousUrl']()}]});try{yield _0x2912e8(this,_0x5dcea6,_0x54c725)[_0x34a051(0x349)](this,_0x29a31c);}catch(_0x10cc23){let _0x3eae70=_0x10cc23&&_0x10cc23[_0x34a051(0x274)]?(_0x494340=_0x10cc23==null?void 0x0:_0x10cc23[_0x34a051(0x274)])==null?void 0x0:_0x494340[_0x34a051(0x252)](0x0,0x64):'undefined';yield _0x2f6659[_0x34a051(0x172)]({'eventName':_0x34a051(0x2c8),'eventProperties':[{'eventProperty':_0x34a051(0x274),'value':''+_0x3eae70}]});}});},_0x5a45ae(_0x4a4b3b,_0x534daf);var _0x1c3b9b=_0x4a4b3b,_0x58162d=_0x1c3b9b[_0x2bb697(0x236)](),_0x597cd1,_0x2c17e3,_0x22dbe5,_0xa872c6,_0x56efc2,_0x37f450,_0x4bc57f,_0x29306f,_0x5d8580,_0x1a410f,_0x16027a,_0x25f847=class _0x361681{constructor(){_0x5a45ae(this,_0x22dbe5),_0x5a45ae(this,_0x2c17e3,!0x1);}static[_0x2bb697(0x236)](){var _0x5be3ef;return _0x260c27(_0x361681,_0x597cd1)||(_0x2209aa(_0x361681,_0x597cd1,new _0x361681()),_0x2912e8(_0x5be3ef=_0x260c27(_0x361681,_0x597cd1),_0x22dbe5,_0xa872c6)['call'](_0x5be3ef)),_0x260c27(_0x361681,_0x597cd1);}['recordAttributeFromQueue'](){return _0x199939(this,null,function*(){const _0x56e3a4=_0x4b11;yield _0x25ba15(_0x56e3a4(0x337),()=>_0x199939(this,null,function*(){const _0x1772bb=_0x56e3a4;let _0x2f9003=JSON[_0x1772bb(0x2e1)](localStorage[_0x1772bb(0x2bd)]('preInitializedAttributes')||'[]');if(Array[_0x1772bb(0x17d)](_0x2f9003))for(let _0x68f578 of _0x2f9003){if(_0x40dd3d(0x1,_0x1772bb(0x2e6)),_0x40dd3d(0x1,_0x68f578),yield this['checkIfAttributeExists'](_0x68f578[_0x1772bb(0x1d0)],_0x68f578['attributeValue'])){_0x40dd3d(0x1,_0x1772bb(0x201)+_0x68f578[_0x1772bb(0x1d0)]+'\x20already\x20exists\x20with\x20value\x20'+_0x68f578[_0x1772bb(0x1f7)]),_0x2912e8(this,_0x22dbe5,_0x4bc57f)[_0x1772bb(0x349)](this,_0x68f578[_0x1772bb(0x1d0)],_0x68f578[_0x1772bb(0x1f7)]);return;}yield _0x2912e8(this,_0x22dbe5,_0x29306f)[_0x1772bb(0x349)](this,{'attributeName':_0x68f578[_0x1772bb(0x1d0)],'attributeValue':_0x68f578[_0x1772bb(0x1f7)]});}}));});}[_0x2bb697(0x1cc)](_0x5a2c29,_0x1f0447,_0x2fc75a){return _0x199939(this,null,function*(){const _0x12cbb5=_0x4b11;if(yield this['checkIfAttributeExists'](_0x5a2c29,_0x1f0447)){_0x40dd3d(0x1,_0x12cbb5(0x219)+_0x5a2c29+_0x12cbb5(0x2a1)+_0x1f0447),_0x2912e8(this,_0x22dbe5,_0x4bc57f)[_0x12cbb5(0x349)](this,_0x5a2c29,_0x1f0447);return;}_0x2912e8(this,_0x22dbe5,_0x37f450)['call'](this,_0x5a2c29),_0x2912e8(this,_0x22dbe5,_0x56efc2)[_0x12cbb5(0x349)](this,_0x5a2c29,_0x1f0447),_0x4457ec['isInitialized']&&!_0x4457ec['loading']&&(yield _0x2912e8(this,_0x22dbe5,_0x29306f)['call'](this,{'attributeName':_0x5a2c29,'attributeProperties':_0x2fc75a,'attributeValue':_0x1f0447}));});}['storeAttributeInLocalStorage'](){return _0x199939(this,null,function*(){const _0x11fd12=_0x4b11;if(!localStorage[_0x11fd12(0x2bd)](_0x11fd12(0x227))&&!_0x260c27(this,_0x2c17e3)){_0x2209aa(this,_0x2c17e3,!0x0);try{let _0x2c7198=(yield this[_0x11fd12(0x1fb)]())[_0x11fd12(0x350)];_0x2c7198&&localStorage[_0x11fd12(0x1bb)]('attributes',JSON[_0x11fd12(0x2bf)](_0x2c7198));}catch(_0x5bc07b){throw new Error('Error\x20storing\x20attribute\x20data\x20in\x20local\x20storage');}finally{_0x2209aa(this,_0x2c17e3,!0x1);}}});}['fetchAttributeData'](){return _0x199939(this,null,function*(){const _0x485d81=_0x4b11;try{return yield _0x2301f1['get'](''+_0x34239e);}catch(_0x15aafd){throw new Error(_0x485d81(0x1f0));}});}[_0x2bb697(0x329)](_0x28deb4,_0x3c7d14){return _0x199939(this,null,function*(){const _0x172df5=_0x4b11;let _0x8da816=_0x58162d[_0x172df5(0x250)]('mergn_customer_attributes'),_0x3753bd;if(!_0x8da816)_0x3753bd={};else{let _0x1743d3=_0x58162d[_0x172df5(0x2d3)](_0x8da816);_0x3753bd=JSON[_0x172df5(0x2e1)](_0x1743d3);}_0x3753bd[_0x28deb4]=_0x3c7d14;let _0x2b7869=_0x58162d[_0x172df5(0x1e3)](JSON[_0x172df5(0x2bf)](_0x3753bd));_0x58162d[_0x172df5(0x2bc)]('mergn_customer_attributes',_0x2b7869,0x16d);});}['checkIfAttributeExists'](_0x240871,_0x3b7c42){return _0x199939(this,null,function*(){const _0x58743c=_0x4b11;let _0xfb0168=_0x58162d[_0x58743c(0x250)](_0x58743c(0x2ed));if(!_0xfb0168)return!0x1;let _0xa66252=_0x58162d[_0x58743c(0x2d3)](_0xfb0168),_0x2208cf=JSON[_0x58743c(0x2e1)](_0xa66252);return Object[_0x58743c(0x308)][_0x58743c(0x317)][_0x58743c(0x349)](_0x2208cf,_0x240871)?_0x3b7c42!==void 0x0?_0x2208cf[_0x240871]===_0x3b7c42:!0x0:!0x1;});}};_0x597cd1=new WeakMap(),_0x2c17e3=new WeakMap(),_0x22dbe5=new WeakSet(),_0xa872c6=function(){return _0x199939(this,null,function*(){});},_0x56efc2=function(_0x434381,_0x5e8227){const _0x4c5abc=_0x2bb697;let _0x427fc2=JSON['parse'](localStorage[_0x4c5abc(0x2bd)](_0x4c5abc(0x195))||'[]');_0x427fc2[_0x4c5abc(0x2d6)]({'attributeName':_0x434381,'attributeValue':_0x5e8227}),localStorage[_0x4c5abc(0x1bb)](_0x4c5abc(0x195),JSON[_0x4c5abc(0x2bf)](_0x427fc2));},_0x37f450=function(_0x430fcf){return _0x199939(this,null,function*(){const _0x3099d1=_0x4b11;let _0x37d8f3=JSON[_0x3099d1(0x2e1)](localStorage[_0x3099d1(0x2bd)]('preInitializedAttributes')||'[]');for(let _0x59d86f of _0x37d8f3)_0x59d86f['attributeName']===_0x430fcf&&(_0x37d8f3[_0x3099d1(0x1d2)](_0x37d8f3[_0x3099d1(0x2d9)](_0x59d86f),0x1),localStorage[_0x3099d1(0x1bb)]('preInitializedAttributes',JSON[_0x3099d1(0x2bf)](_0x37d8f3)));});},_0x4bc57f=function(_0x29abf3,_0x56d1fe){return _0x199939(this,null,function*(){const _0x432a2a=_0x4b11;let _0x17c44e=JSON[_0x432a2a(0x2e1)](localStorage['getItem'](_0x432a2a(0x195))||'[]');for(let _0x1236e9 of _0x17c44e)JSON['stringify'](_0x1236e9)===JSON['stringify']({'attributeName':_0x29abf3,'attributeValue':_0x56d1fe})&&(_0x17c44e[_0x432a2a(0x1d2)](_0x17c44e[_0x432a2a(0x2d9)](_0x1236e9),0x1),localStorage['setItem']('preInitializedAttributes',JSON[_0x432a2a(0x2bf)](_0x17c44e)));});},_0x29306f=function(_0x5e47dc){return _0x199939(this,arguments,function*({attributeName:_0x42960c,attributeProperties:_0x4733b9,attributeValue:_0x3d87f1}){const _0x39eb75=_0x4b11;yield _0x25ba15(_0x39eb75(0x16e),()=>_0x199939(this,null,function*(){const _0x1e14dd=_0x39eb75;if(_0x40dd3d(0x1,_0x1e14dd(0x220)),_0x58902d(_0x1e14dd(0x220),!0x0),_0x46ca62('Recording\x20attribute\x20Time',!0x0),_0x40dd3d(0x1,_0x1e14dd(0x1a7)),_0x40dd3d(0x1,_0x1e14dd(0x237)+_0x42960c+'\x20|\x20Attribute\x20Value:\x20'+_0x3d87f1),!_0x3d87f1||_0x3d87f1===''){_0x40dd3d(0x2,_0x1e14dd(0x27a));return;}yield _0x58162d['checkTTL'](),yield _0x2912e8(this,_0x22dbe5,_0x1a410f)[_0x1e14dd(0x349)](this);let _0x14c899=JSON['parse'](localStorage['getItem'](_0x1e14dd(0x227))||'{}'),_0x1b9795=_0x4733b9?_0x2912e8(this,_0x22dbe5,_0x5d8580)['call'](this,_0x14c899,_0x42960c,_0x4733b9):_0x2912e8(this,_0x22dbe5,_0x5d8580)[_0x1e14dd(0x349)](this,_0x14c899,_0x42960c);if(typeof _0x1b9795==_0x1e14dd(0x21a)){_0x40dd3d(0x2,_0x1b9795);return;}_0x14c899[_0x42960c]['should_set_identity']&&(yield _0x58162d[_0x1e14dd(0x2dc)](typeof _0x3d87f1==_0x1e14dd(0x21a)?_0x3d87f1:JSON[_0x1e14dd(0x2bf)](_0x3d87f1))),_0x58162d[_0x1e14dd(0x239)]();let {id:_0x27df85}=_0x14c899[_0x42960c],_0x254c3d={'attributeId':_0x27df85,'attributeProperties':_0x1b9795,'customerId':localStorage[_0x1e14dd(0x2bd)](_0x1e14dd(0x2f0))||'','value':_0x3d87f1};yield _0x2912e8(this,_0x22dbe5,_0x16027a)[_0x1e14dd(0x349)](this,_0x254c3d,_0x42960c,_0x3d87f1),_0x2912e8(this,_0x22dbe5,_0x4bc57f)[_0x1e14dd(0x349)](this,_0x42960c,_0x3d87f1),_0x46ca62('Recording\x20attribute\x20Time',!0x1),_0x58902d(_0x1e14dd(0x220),!0x1);}));});},_0x5d8580=function(_0x3245c9,_0x4a0e88,_0xe314c9){const _0x4dcc80=_0x2bb697;if(!Object[_0x4dcc80(0x308)][_0x4dcc80(0x317)]['call'](_0x3245c9,_0x4a0e88))return _0x4dcc80(0x219)+_0x4a0e88+'\x20is\x20not\x20valid.';if(!_0xe314c9)return[];let _0x3a6c19=_0x3245c9[_0x4a0e88];if(!(_0x3a6c19!=null&&_0x3a6c19[_0x4dcc80(0x24b)]))return _0x4dcc80(0x219)+_0x4a0e88+_0x4dcc80(0x35d);let _0x30f0f4=_0xe314c9[_0x4dcc80(0x1cf)](({attributeProperty:_0x52053b})=>!Object[_0x4dcc80(0x308)][_0x4dcc80(0x317)]['call'](_0x3a6c19[_0x4dcc80(0x24b)],_0x52053b))['map'](({attributeProperty:_0xaf811})=>_0xaf811);return _0x30f0f4[_0x4dcc80(0x27c)]>0x0?_0x4dcc80(0x219)+_0x4a0e88+'\x20has\x20invalid\x20attributeProperties:\x20'+_0x30f0f4[_0x4dcc80(0x29a)](',\x20')+'.':_0xe314c9[_0x4dcc80(0x208)](({attributeProperty:_0x21ccda,value:_0x2a3386})=>({'attributePropertyId':_0x3a6c19['attributeProperty'][_0x21ccda]['id'],'value':_0x2a3386}));},_0x1a410f=function(){return _0x199939(this,null,function*(){const _0x2733f8=_0x4b11;localStorage['getItem'](_0x2733f8(0x227))||(yield this[_0x2733f8(0x254)]());});},_0x16027a=function(_0x42586f,_0x26d946,_0x4d0cb4){return _0x199939(this,null,function*(){const _0x4858d3=_0x4b11;try{let _0x717a65=yield _0x2301f1['post'](''+_0x34239e+_0x2bcf45,_0x42586f);return yield this[_0x4858d3(0x329)](_0x26d946,_0x4d0cb4),_0x717a65;}catch(_0xcb1e2e){throw new Error(_0x4858d3(0x2c6));}});},_0x5a45ae(_0x25f847,_0x597cd1);var _0x592dc8=_0x25f847,_0x499798=_0x592dc8[_0x2bb697(0x236)](),_0x56a4e7,_0x58124c=class _0x159037{constructor(){}static['getInstance'](){return _0x260c27(_0x159037,_0x56a4e7)||_0x2209aa(_0x159037,_0x56a4e7,new _0x159037()),_0x260c27(_0x159037,_0x56a4e7);}[_0x2bb697(0x341)](_0x936516,_0x17f500){setTimeout(()=>{const _0x28306b=_0x4b11;_0x25ba15(_0x28306b(0x341),()=>_0x199939(this,null,function*(){const _0x4df309=_0x28306b;yield _0x25ba15(_0x4df309(0x2e3),()=>_0x199939(this,null,function*(){const _0xefa659=_0x4df309;_0x40dd3d(0x1,_0xefa659(0x20c));let _0x48eef9=localStorage[_0xefa659(0x2bd)](_0xefa659(0x175));_0x48eef9&&(_0x4457ec['debugLevel']=parseInt(_0x48eef9,0xa));})),_0x40dd3d(0x1,_0x4df309(0x2b9)),yield _0x58162d[_0x4df309(0x341)](_0x936516,_0x17f500),_0x2f6659['recordDebugEvents']({'eventName':_0x4df309(0x1ab)}),_0x40dd3d(0x1,_0x4df309(0x1f4)),window['addEventListener'](_0x4df309(0x30a),()=>_0x199939(this,null,function*(){const _0x23123f=_0x4df309;_0x4457ec['offline']=!0x1;let _0x2cc5d8=JSON[_0x23123f(0x2e1)](localStorage['getItem'](_0x23123f(0x210))||'[]');Array[_0x23123f(0x17d)](_0x2cc5d8)&&(yield _0x2f6659[_0x23123f(0x18f)]({'customerId':localStorage[_0x23123f(0x2bd)](_0x23123f(0x2f0))||'','deviceId':localStorage[_0x23123f(0x2bd)](_0x23123f(0x316))||'','events':_0x2cc5d8}),localStorage[_0x23123f(0x257)](_0x23123f(0x210))),_0x58162d['checkTTL'](),_0x58162d['updateSessionCreated']();})),window[_0x4df309(0x178)](_0x4df309(0x2af),()=>{const _0x304ee0=_0x4df309;_0x4457ec[_0x304ee0(0x2af)]=!0x0;}),window[_0x4df309(0x178)](_0x4df309(0x2b8),()=>{const _0x1b235f=_0x4df309;_0x4a1475[_0x1b235f(0x2fb)](),_0x4ebf71['loadWebPushActionInLocalStorage']();});}));});}[_0x2bb697(0x24d)](_0x389938,_0x1367b7){const _0x93cc0f=_0x2bb697;let _0x6b1346=localStorage[_0x93cc0f(0x2bd)](_0x93cc0f(0x175));if(_0x6b1346){_0x4457ec['debugLevel']=parseInt(_0x6b1346,0xa);return;}if(!(_0x389938 in _0x25d871)){console[_0x93cc0f(0x35b)](_0x93cc0f(0x273));return;}_0x4457ec['recordDebugEventsToggle']=_0x1367b7||{},_0x4457ec[_0x93cc0f(0x1d7)]=_0x389938;try{_0x4ebf71[_0x93cc0f(0x1dc)]({'debugLevel':_0x389938});}catch(_0x8841d){}}['recordAttribute'](_0x20e3bb,_0x2e4a0c){return _0x199939(this,null,function*(){const _0x1b6d62=_0x4b11;return _0x40dd3d(0x1,_0x1b6d62(0x1d0)),_0x40dd3d(0x1,_0x20e3bb),_0x40dd3d(0x1,'attributeValue'),_0x40dd3d(0x1,_0x2e4a0c),new Promise((_0x1a50f9,_0x5923ae)=>{setTimeout(()=>_0x199939(this,null,function*(){const _0x5513a8=_0x4b11;try{yield _0x25ba15(_0x5513a8(0x1cc),()=>_0x199939(this,null,function*(){const _0x33e7eb=_0x5513a8;let _0x217289;Array[_0x33e7eb(0x17d)](_0x2e4a0c)?_0x217289=JSON[_0x33e7eb(0x2bf)](_0x2e4a0c):typeof _0x2e4a0c==_0x33e7eb(0x19d)?_0x217289=''+_0x2e4a0c:_0x217289=_0x2e4a0c,_0x40dd3d(0x1,_0x33e7eb(0x220)),_0x40dd3d(0x1,_0x33e7eb(0x237)+_0x20e3bb+_0x33e7eb(0x19c)+_0x217289),yield _0x499798[_0x33e7eb(0x1cc)](_0x20e3bb,_0x217289);})),_0x1a50f9();}catch(_0x1f9912){_0x5923ae(_0x1f9912);}}));});});}[_0x2bb697(0x269)](_0x25a38c){return _0x199939(this,null,function*(){return new Promise((_0x24c9af,_0x4f1da3)=>{setTimeout(()=>_0x199939(this,null,function*(){const _0xa871da=_0x4b11;try{yield _0x25ba15(_0xa871da(0x269),()=>_0x199939(this,null,function*(){const _0x5ef0ae=_0xa871da;_0x40dd3d(0x1,_0x5ef0ae(0x17c)),_0x40dd3d(0x1,'Identity:\x20'+_0x25a38c),_0x4457ec[_0x5ef0ae(0x354)]=!0x0,yield _0x58162d[_0x5ef0ae(0x2dc)](_0x25a38c);})),_0x24c9af();}catch(_0x4a5182){_0x4f1da3(_0x4a5182);}finally{_0x4457ec[_0xa871da(0x354)]=!0x1,yield _0x2f6659[_0xa871da(0x1a8)](),yield _0x499798[_0xa871da(0x1a5)]();}}));});});}[_0x2bb697(0x272)](){setTimeout(()=>{const _0x1d378b=_0x4b11;_0x25ba15(_0x1d378b(0x272),()=>_0x199939(this,null,function*(){const _0x219755=_0x1d378b;_0x40dd3d(0x1,_0x219755(0x2f2)),_0x58162d['clearLocalStorage']();}));});}['recordEvent'](_0x29b306,_0x44a755){return _0x199939(this,null,function*(){return new Promise((_0x3235f3,_0x49e889)=>{setTimeout(()=>_0x199939(this,null,function*(){const _0x1ad511=_0x4b11;try{yield _0x25ba15(_0x1ad511(0x230),()=>_0x199939(this,null,function*(){const _0xab26e9=_0x1ad511;if(_0x40dd3d(0x1,'Recording\x20event'),_0x40dd3d(0x1,_0xab26e9(0x223)+{'eventName':_0x29b306,'eventProperties':_0x44a755}),!_0x29b306||typeof _0x29b306!=_0xab26e9(0x21a)){_0x40dd3d(0x2,'Event\x20name\x20is\x20required\x20and\x20must\x20be\x20a\x20string');return;}yield _0x2f6659[_0xab26e9(0x266)]({'eventName':_0x29b306,'eventProperties':_0x44a755});})),_0x3235f3();}catch(_0x3a00c2){_0x49e889(_0x3a00c2);}}));});});}[_0x2bb697(0x1eb)](){return _0x528597;}};_0x56a4e7=new WeakMap(),_0x5a45ae(_0x58124c,_0x56a4e7);var _0x247c73=_0x58124c,_0x181e3f=_0x247c73[_0x2bb697(0x236)]();typeof window!=_0x2bb697(0x198)&&(window['mergn']=_0x181e3f);var _0x5b57cc=_0x181e3f;})());
|