mergn-webapp-sdk 1.0.183 → 1.0.185

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.
@@ -1 +1,75 @@
1
- 'use strict';(function(_0xd65653,_0x7cb097){const _0x36d735=_0x103a,_0x31e369=_0xd65653();while(!![]){try{const _0x3d9ab7=parseInt(_0x36d735(0x244))/0x1*(-parseInt(_0x36d735(0x31a))/0x2)+-parseInt(_0x36d735(0x1d8))/0x3+-parseInt(_0x36d735(0x300))/0x4*(parseInt(_0x36d735(0x221))/0x5)+-parseInt(_0x36d735(0x196))/0x6*(-parseInt(_0x36d735(0x2a6))/0x7)+parseInt(_0x36d735(0x2f8))/0x8*(-parseInt(_0x36d735(0x30b))/0x9)+parseInt(_0x36d735(0x21b))/0xa+parseInt(_0x36d735(0x2a5))/0xb;if(_0x3d9ab7===_0x7cb097)break;else _0x31e369['push'](_0x31e369['shift']());}catch(_0x3a5e67){_0x31e369['push'](_0x31e369['shift']());}}}(_0x4242,0x6d9cf));function _0x103a(_0x11ace0,_0x3976e4){const _0x42421b=_0x4242();return _0x103a=function(_0x103a52,_0x514249){_0x103a52=_0x103a52-0x170;let _0x348a15=_0x42421b[_0x103a52];return _0x348a15;},_0x103a(_0x11ace0,_0x3976e4);}((()=>{const _0x296cec=_0x103a;var _0x59c8c=Object[_0x296cec(0x27b)],_0x77db99=Object[_0x296cec(0x29c)],_0x2eebf7=Object['getOwnPropertyDescriptors'],_0x343eb2=Object['getOwnPropertySymbols'],_0xb578db=Object[_0x296cec(0x2bd)]['hasOwnProperty'],_0x15bbb7=Object['prototype'][_0x296cec(0x2d0)],_0x4698d1=_0x357417=>{throw TypeError(_0x357417);},_0x5af436=(_0x5cfab8,_0xe07ecb,_0x7a426)=>_0xe07ecb in _0x5cfab8?_0x59c8c(_0x5cfab8,_0xe07ecb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x7a426}):_0x5cfab8[_0xe07ecb]=_0x7a426,_0x503010=(_0x1b1194,_0x2a7dd1)=>{const _0x380494=_0x296cec;for(var _0x34ba55 in _0x2a7dd1||(_0x2a7dd1={}))_0xb578db['call'](_0x2a7dd1,_0x34ba55)&&_0x5af436(_0x1b1194,_0x34ba55,_0x2a7dd1[_0x34ba55]);if(_0x343eb2){for(var _0x34ba55 of _0x343eb2(_0x2a7dd1))_0x15bbb7[_0x380494(0x1f6)](_0x2a7dd1,_0x34ba55)&&_0x5af436(_0x1b1194,_0x34ba55,_0x2a7dd1[_0x34ba55]);}return _0x1b1194;},_0x40ff3b=(_0x17dc90,_0x373bba)=>_0x77db99(_0x17dc90,_0x2eebf7(_0x373bba)),_0x337662=(_0x30a771,_0x13c808,_0x5dabca)=>_0x13c808[_0x296cec(0x2d8)](_0x30a771)||_0x4698d1(_0x296cec(0x239)+_0x5dabca),_0x5ca857=(_0x3a5689,_0x2b2542,_0x5471ad)=>(_0x337662(_0x3a5689,_0x2b2542,_0x296cec(0x1c6)),_0x5471ad?_0x5471ad[_0x296cec(0x1f6)](_0x3a5689):_0x2b2542[_0x296cec(0x250)](_0x3a5689)),_0x110e3a=(_0x1a2278,_0x120ea3,_0x2e9d2b)=>_0x120ea3[_0x296cec(0x2d8)](_0x1a2278)?_0x4698d1(_0x296cec(0x20a)):_0x120ea3 instanceof WeakSet?_0x120ea3['add'](_0x1a2278):_0x120ea3[_0x296cec(0x25f)](_0x1a2278,_0x2e9d2b),_0xc1bc85=(_0x53f0d5,_0x357e8d,_0x1c0d77,_0x114ad5)=>(_0x337662(_0x53f0d5,_0x357e8d,'write\x20to\x20private\x20field'),_0x114ad5?_0x114ad5[_0x296cec(0x1f6)](_0x53f0d5,_0x1c0d77):_0x357e8d['set'](_0x53f0d5,_0x1c0d77),_0x1c0d77),_0x6f8ad2=(_0x12081b,_0x300507,_0x146151)=>(_0x337662(_0x12081b,_0x300507,'access\x20private\x20method'),_0x146151),_0x26cf2f=(_0xd51000,_0xe56567,_0x4a05bc)=>new Promise((_0x598ebe,_0x5ce509)=>{const _0x3facdd=_0x296cec;var _0x554758=_0x589a7c=>{const _0x42e3e3=_0x103a;try{_0x1a601c(_0x4a05bc[_0x42e3e3(0x326)](_0x589a7c));}catch(_0x51abf5){_0x5ce509(_0x51abf5);}},_0x5a8f4a=_0x3d24ac=>{const _0x46f322=_0x103a;try{_0x1a601c(_0x4a05bc[_0x46f322(0x2b1)](_0x3d24ac));}catch(_0x3cb51f){_0x5ce509(_0x3cb51f);}},_0x1a601c=_0x8fd26c=>_0x8fd26c[_0x3facdd(0x1af)]?_0x598ebe(_0x8fd26c[_0x3facdd(0x240)]):Promise[_0x3facdd(0x317)](_0x8fd26c['value'])['then'](_0x554758,_0x5a8f4a);_0x1a601c((_0x4a05bc=_0x4a05bc[_0x3facdd(0x19e)](_0xd51000,_0xe56567))[_0x3facdd(0x326)]());}),_0x3d113a=_0x296cec(0x179),_0x41a3c4=_0x296cec(0x1de),_0x83457f='/attribute',_0x32149c=_0x296cec(0x2bc),_0x4bdfb6='/event',_0x2926d0=_0x296cec(0x2f2),_0x385937=_0x296cec(0x222),_0x15981c=_0x296cec(0x1e3),_0x3316a9='/set-identity',_0x301093='/brand/get-web-push-public-key',_0x2d2721=_0x296cec(0x23a),_0x161ed4=class extends Error{constructor(_0x527de7){const _0x4e6b82=_0x296cec;super(_0x527de7),this[_0x4e6b82(0x26a)]=_0x4e6b82(0x217);}};_0x161ed4[_0x296cec(0x1a0)]=!0x1,_0x161ed4[_0x296cec(0x17c)]=!navigator[_0x296cec(0x328)],_0x161ed4[_0x296cec(0x185)]=0x0,_0x161ed4['isInitialized']=!0x1,_0x161ed4[_0x296cec(0x2ca)]=!0x1;var _0x1ec4ee=(_0x307ff6,_0x475e4b)=>{const _0xb26fb4=_0x296cec;_0x475e4b instanceof _0x161ed4?_0x55e808(0x2,_0xb26fb4(0x275)+_0x307ff6+_0xb26fb4(0x1ab)+_0x475e4b[_0xb26fb4(0x1e8)]):_0x475e4b instanceof Error?_0x55e808(0x2,_0xb26fb4(0x275)+_0x307ff6+'\x0aUnexpected\x20error:\x20'+_0x475e4b['message']):_0x55e808(0x2,_0xb26fb4(0x275)+_0x307ff6+'\x0aUnexpected\x20error:\x20'+String(_0x475e4b));},_0x793e5e=(_0x314fec,_0x54de12,_0x177945,_0x1a10dd=!0x1)=>_0x26cf2f(void 0x0,null,function*(){const _0x569745=_0x296cec;try{_0xf1c899(_0x314fec,!0x0),_0x2fd0ea(_0x314fec+_0x569745(0x204),!0x0);try{if(_0x314fec!=='verify\x20API\x20key'){if(_0x314fec!==_0x569745(0x368)&&_0x161ed4[_0x569745(0x1a0)])throw new _0x161ed4(_0x569745(0x1d9));if(_0x314fec!==_0x569745(0x1dd)&&_0x161ed4['offline'])throw new _0x161ed4(_0x569745(0x301));if(_0x314fec!==_0x569745(0x1b4)&&_0x314fec!==_0x569745(0x368)&&_0x314fec!=='record\x20event'&&_0x314fec!==_0x569745(0x2cf)&&_0x314fec!==_0x569745(0x1e0)&&!_0x161ed4[_0x569745(0x2d2)])throw new _0x161ed4(_0x569745(0x2e4));if(_0x314fec!==_0x569745(0x26d)&&_0x314fec!==_0x569745(0x1dd)&&_0x314fec!==_0x569745(0x2cf)&&_0x161ed4['loading'])throw new _0x161ed4(_0x569745(0x2a8));}return yield _0x54de12();}catch(_0x2cb0a5){return _0x177945?_0x177945(_0x2cb0a5):(_0x161ed4['debugLevel']===0x2||_0x161ed4[_0x569745(0x185)]===0x3)&&_0x1ec4ee(_0x314fec,_0x2cb0a5),null;}finally{_0x2fd0ea(_0x314fec+'\x20Time',!0x1),_0xf1c899(_0x314fec,!0x1);}}catch(_0x4b95ce){return null;}}),_0x5c88e2=(_0x22428b=>(_0x22428b[_0x22428b[_0x296cec(0x18e)]=0x0]='NONE',_0x22428b[_0x22428b[_0x296cec(0x2d6)]=0x1]=_0x296cec(0x2d6),_0x22428b[_0x22428b[_0x296cec(0x1b1)]=0x2]=_0x296cec(0x1b1),_0x22428b[_0x22428b[_0x296cec(0x33a)]=0x3]=_0x296cec(0x33a),_0x22428b[_0x22428b['DEBUG']=0x4]=_0x296cec(0x346),_0x22428b))(_0x5c88e2||{}),_0x55e808=(_0x2d6ada,_0x2e54c0)=>{const _0x386ce7=_0x296cec;_0x161ed4['debugLevel']!==0x0&&(_0x161ed4[_0x386ce7(0x185)]>=0x3?_0x2d6ada===0x1?console[_0x386ce7(0x34b)](_0x386ce7(0x353)+new Date()[_0x386ce7(0x176)](),_0x2e54c0):_0x2d6ada===0x2&&console['error'](_0x386ce7(0x31b)+new Date()[_0x386ce7(0x176)](),_0x2e54c0):_0x161ed4[_0x386ce7(0x185)]===0x1&&_0x2d6ada===0x1?console[_0x386ce7(0x34b)](_0x386ce7(0x353)+new Date()[_0x386ce7(0x176)](),_0x2e54c0):_0x161ed4[_0x386ce7(0x185)]===0x2&&_0x2d6ada===0x2&&console['error'](_0x386ce7(0x31b)+new Date()[_0x386ce7(0x176)](),_0x2e54c0));},_0x2fd0ea=(_0x557001,_0x5e221d)=>{const _0x454f52=_0x296cec;_0x161ed4['debugLevel']!==0x0&&(_0x5e221d?console[_0x454f52(0x2f3)](_0x557001):console[_0x454f52(0x29b)](_0x557001));},_0xf1c899=(_0x441530,_0x3b37a5)=>{const _0x1b43d4=_0x296cec;_0x161ed4[_0x1b43d4(0x185)]!==0x0&&(_0x3b37a5?console['group'](_0x441530):console[_0x1b43d4(0x262)]());},_0x6e4ebb,_0x55d2b3,_0x123d57,_0x441433,_0x386d76=class _0x4bc98d{constructor(){_0x110e3a(this,_0x55d2b3);}[_0x296cec(0x22f)](_0x451f50,_0x5b267a=0x3,_0x1b86af=0x3e8){return new Promise((_0x5322b6,_0x3129ce)=>{let _0x6e690e=_0x18aa15=>_0x26cf2f(this,null,function*(){try{let _0x5c6bc7=yield _0x451f50();_0x5322b6(_0x5c6bc7);}catch(_0x23f61a){_0x18aa15===0x0?_0x3129ce(_0x23f61a):setTimeout(()=>{_0x6e690e(_0x18aa15-0x1);},_0x1b86af);}});_0x6e690e(_0x5b267a);});}static[_0x296cec(0x27c)](){return _0x5ca857(_0x4bc98d,_0x6e4ebb)||_0xc1bc85(_0x4bc98d,_0x6e4ebb,new _0x4bc98d()),_0x5ca857(_0x4bc98d,_0x6e4ebb);}['setApiURL'](_0x200949){const _0x24e21f=_0x296cec;_0x4bc98d[_0x24e21f(0x303)]=_0x200949;}[_0x296cec(0x285)](_0x497cfc){const _0x1b9ca5=_0x296cec;_0x4bc98d[_0x1b9ca5(0x1c1)]=_0x497cfc;let _0x5ee415=_0x497cfc,_0x37a48c=/m(\d+)rgn/,_0x2ff3b5=_0x5ee415['match'](_0x37a48c);_0x2ff3b5&&(_0x4bc98d['brandId']=_0x2ff3b5[0x1]);}[_0x296cec(0x17b)](){const _0x39acdd=_0x296cec;return _0x4bc98d[_0x39acdd(0x1c1)];}[_0x296cec(0x2d3)](){const _0x4ac6cf=_0x296cec;return _0x4bc98d[_0x4ac6cf(0x198)];}[_0x296cec(0x250)](_0x2caec4){return _0x26cf2f(this,null,function*(){const _0x4a197c=_0x103a;let _0x1a2cbf=_0x6f8ad2(this,_0x55d2b3,_0x441433)[_0x4a197c(0x1f6)](this,_0x4bc98d['apiKey']);try{let _0x3ecdd7=yield fetch(_0x6f8ad2(this,_0x55d2b3,_0x123d57)[_0x4a197c(0x1f6)](this)+_0x2caec4,{'headers':{'Authorization':_0x1a2cbf,'Content-Type':_0x4a197c(0x1b2)}});if(!_0x3ecdd7['ok'])throw new Error(_0x1a2cbf+_0x4a197c(0x316)+JSON[_0x4a197c(0x2dd)](yield _0x3ecdd7[_0x4a197c(0x294)]()));return _0x3ecdd7[_0x4a197c(0x294)]();}catch(_0x199424){return Promise['reject'](_0x199424);}});}['post'](_0x277d3d,_0x22736f,_0x161546){return _0x26cf2f(this,null,function*(){const _0x351936=_0x103a;let _0x2fdbec=_0x6f8ad2(this,_0x55d2b3,_0x441433)[_0x351936(0x1f6)](this,_0x4bc98d['apiKey']);try{return(yield fetch(_0x6f8ad2(this,_0x55d2b3,_0x123d57)[_0x351936(0x1f6)](this)+_0x277d3d,{'body':JSON['stringify'](_0x22736f||{}),'headers':{'Authorization':_0x2fdbec,'Content-Type':_0x351936(0x1b2)},'method':_0x351936(0x2ac),'signal':_0x161546}))[_0x351936(0x294)]();}catch(_0x58fdda){return Promise[_0x351936(0x269)](_0x58fdda);}});}[_0x296cec(0x29a)](_0xcaf4db,_0x289522){return _0x26cf2f(this,null,function*(){const _0x530aab=_0x103a;return(yield fetch(_0x6f8ad2(this,_0x55d2b3,_0x123d57)[_0x530aab(0x1f6)](this)+_0xcaf4db,{'body':JSON[_0x530aab(0x2dd)](_0x289522||{}),'headers':{'Authorization':_0x6f8ad2(this,_0x55d2b3,_0x441433)[_0x530aab(0x1f6)](this,_0x4bc98d[_0x530aab(0x1c1)]),'Content-Type':'application/json'},'method':_0x530aab(0x23e)}))[_0x530aab(0x294)]();});}[_0x296cec(0x1a8)](){return _0x26cf2f(this,null,function*(){const _0x5c2d71=_0x103a;try{let _0x1a996b=(yield(yield fetch(_0x6f8ad2(this,_0x55d2b3,_0x123d57)[_0x5c2d71(0x1f6)](this)+_0x2d2721))[_0x5c2d71(0x294)]())[_0x5c2d71(0x2e8)];_0x4bc98d[_0x5c2d71(0x23d)]=new Date(_0x1a996b),_0x4bc98d[_0x5c2d71(0x2b9)]=new Date();}catch(_0x2418e2){_0x55e808(0x2,_0x5c2d71(0x2fa));}});}[_0x296cec(0x1c3)](){const _0xd7618b=_0x296cec;if(!_0x4bc98d[_0xd7618b(0x23d)]||!_0x4bc98d[_0xd7618b(0x2b9)])return _0x55e808(0x2,_0xd7618b(0x1e7)),new Date();let _0x585428=new Date()[_0xd7618b(0x1ef)]()-_0x4bc98d[_0xd7618b(0x2b9)][_0xd7618b(0x1ef)]();return new Date(_0x4bc98d[_0xd7618b(0x23d)][_0xd7618b(0x1ef)]()+_0x585428);}[_0x296cec(0x2c5)](_0x13c16b,_0x3e171a,_0x3bf33d){return _0x26cf2f(this,null,function*(){const _0x2fc02b=_0x103a;return this['retryPromise'](()=>this[_0x2fc02b(0x263)](_0x13c16b,_0x3e171a,_0x3bf33d));});}};_0x6e4ebb=new WeakMap(),_0x55d2b3=new WeakSet(),_0x123d57=function(){const _0x8b957f=_0x296cec;return _0x386d76[_0x8b957f(0x303)];},_0x441433=function(_0x1316b8){const _0x7d91b4=_0x296cec;return btoa(_0x1316b8+':'+new Date()[_0x7d91b4(0x1ef)]());},_0x110e3a(_0x386d76,_0x6e4ebb),_0x386d76[_0x296cec(0x303)]=_0x41a3c4;var _0x45b4cf=_0x386d76,_0x16192f=_0x45b4cf[_0x296cec(0x27c)](),_0x455866=(_0x456271=>(_0x456271[_0x296cec(0x348)]=_0x296cec(0x253),_0x456271[_0x296cec(0x2b3)]=_0x296cec(0x36f),_0x456271[_0x296cec(0x1bd)]=_0x296cec(0x24e),_0x456271[_0x296cec(0x1cd)]=_0x296cec(0x308),_0x456271['UTM_CONTENT']=_0x296cec(0x355),_0x456271[_0x296cec(0x1ba)]=_0x296cec(0x223),_0x456271[_0x296cec(0x267)]=_0x296cec(0x20d),_0x456271['FBCLID']=_0x296cec(0x261),_0x456271))(_0x455866||{}),_0xc20675=new Set(Object[_0x296cec(0x304)](_0x455866)),_0x2227ce='Popup\x20Action',_0x4ce0f0=_0x296cec(0x356),_0xfdc362,_0x20779b,_0x43a6cd,_0x2f36d3,_0x2ff983,_0x3ce516,_0x46c56e,_0x53002e,_0x530f13,_0x585a22,_0x40f67a,_0x9a167a,_0x543e10,_0x41c2c2,_0x2fefd7,_0x45e647,_0x3447cf,_0x341f7a,_0x2bd0b5,_0x15828e=class _0x441607{constructor(){const _0xd2f245=_0x296cec;_0x110e3a(this,_0x46c56e),this[_0xd2f245(0x203)]=null,this[_0xd2f245(0x351)]=_0x5431c4=>{const _0x371ac2=_0xd2f245;_0x55e808(0x1,_0x371ac2(0x180)),navigator[_0x371ac2(0x1d4)][_0x371ac2(0x30c)]()[_0x371ac2(0x35b)](_0x41bb77=>{const _0x140f3f=_0x371ac2;var _0x5dbb8a,_0x3d662f;_0x55e808(0x1,_0x140f3f(0x2d7)),(_0x5dbb8a=_0x41bb77[0x0])!=null&&_0x5dbb8a['active']&&(_0x55e808(0x1,_0x140f3f(0x2c1)),(_0x3d662f=_0x41bb77[0x0][_0x140f3f(0x345)])==null||_0x3d662f[_0x140f3f(0x228)](JSON['stringify'](_0x5431c4)));})[_0x371ac2(0x1f1)](_0x128c8b=>{const _0x23f372=_0x371ac2;_0x55e808(0x2,_0x23f372(0x18a)+_0x128c8b[_0x23f372(0x1e8)]);});},this['loadWebPushActionInLocalStorage']=()=>{const _0x2c4907=_0xd2f245;_0x444c8c[_0x2c4907(0x1fe)]({'actionCondition':()=>!0x0,'actionMethod':_0x1b8a46=>_0x6f8ad2(this,_0x46c56e,_0x41c2c2)[_0x2c4907(0x1f6)](this,Number(_0x1b8a46['web_optin_instance_id'])),'localStorageKey':_0x2c4907(0x230)});},_0x110e3a(this,_0x543e10,()=>{const _0x43ab6e=_0xd2f245;_0x444c8c[_0x43ab6e(0x305)](_0x43ab6e(0x230));}),_0x110e3a(this,_0x341f7a,_0x5dd5cc=>{const _0x3a5aa1=_0xd2f245;_0x444c8c[_0x3a5aa1(0x28f)]({'id':_0x5dd5cc,'localStorageKey':_0x3a5aa1(0x230)});});}static[_0x296cec(0x27c)](){return _0x5ca857(_0x441607,_0xfdc362)||_0xc1bc85(_0x441607,_0xfdc362,new _0x441607()),_0x5ca857(_0x441607,_0xfdc362);}[_0x296cec(0x1b4)](_0x46afa2,_0x10cb64){return _0x26cf2f(this,null,function*(){const _0x1e9184=_0x103a;var _0x52a084;if(_0x55e808(0x1,_0x1e9184(0x19c)),_0x258c26[_0x1e9184(0x342)]({'eventName':'init','eventProperties':[{'eventProperty':_0x1e9184(0x319),'value':_0x1e9184(0x1d4)in navigator},{'eventProperty':_0x1e9184(0x254),'value':_0x1e9184(0x1e9)in window}]}),'serviceWorker'in navigator&&_0x1e9184(0x1e9)in window){_0x55e808(0x1,_0x1e9184(0x307));try{_0x258c26[_0x1e9184(0x342)]({'eventName':'init_condition'}),_0xc1bc85(_0x441607,_0x20779b,yield navigator['serviceWorker'][_0x1e9184(0x25e)](_0x10cb64||_0x1e9184(0x1d2))),_0x55e808(0x1,_0x1e9184(0x35c)),_0x55e808(0x1,_0x1e9184(0x30e)),this[_0x1e9184(0x351)]({'customer':localStorage['getItem'](_0x1e9184(0x17a))||'','events':_0x258c26[_0x1e9184(0x329)](),'API_KEY':_0x16192f[_0x1e9184(0x17b)](),'device_id':localStorage['getItem'](_0x1e9184(0x192))||'','operatingSystem':_0x444c8c[_0x1e9184(0x2c6)](),'osVersion':_0x444c8c[_0x1e9184(0x34e)](),'Platform':_0x444c8c[_0x1e9184(0x241)]()}),_0xc1bc85(_0x441607,_0x2ff983,!0x0);let _0x2fc0af=_0x6f8ad2(this,_0x46c56e,_0x2fefd7)[_0x1e9184(0x1f6)](this),_0x4b9e4d=Object[_0x1e9184(0x35d)](_0x2fc0af||{});if(_0x4b9e4d[_0x1e9184(0x270)]&&_0x6f8ad2(this,_0x46c56e,_0x41c2c2)[_0x1e9184(0x1f6)](this,Number(_0x4b9e4d[0x0])),!_0x46afa2)return;let _0x3b2ac7=yield(_0x52a084=_0x5ca857(_0x441607,_0x20779b))==null?void 0x0:_0x52a084[_0x1e9184(0x209)][_0x1e9184(0x320)]();_0x55e808(0x1,_0x1e9184(0x234)),_0x5ca857(_0x441607,_0x20779b)&&(_0x55e808(0x1,_0x1e9184(0x202)),_0x5ca857(_0x441607,_0x20779b)['update']()),_0x3b2ac7?(_0x55e808(0x1,_0x1e9184(0x232)),_0x258c26[_0x1e9184(0x342)]({'eventName':_0x1e9184(0x246)}),yield _0x6f8ad2(this,_0x46c56e,_0x40f67a)[_0x1e9184(0x1f6)](this),_0xc1bc85(_0x441607,_0x43a6cd,!0x0)):(_0x55e808(0x1,_0x1e9184(0x26e)),yield _0x6f8ad2(this,_0x46c56e,_0x53002e)[_0x1e9184(0x1f6)](this,_0x5ca857(_0x441607,_0x3ce516)||void 0x0));}catch(_0x385f23){let _0x58e83d=_0x385f23&&_0x385f23[_0x1e9184(0x1e8)]?_0x385f23[_0x1e9184(0x1e8)][_0x1e9184(0x295)](0x0,0x64):'undefined';yield _0x258c26[_0x1e9184(0x342)]({'eventName':_0x1e9184(0x36a),'eventProperties':[{'eventProperty':'message','value':''+_0x58e83d}]}),_0x55e808(0x2,'Service\x20Worker\x20registration\x20failed:'),_0x55e808(0x2,_0x58e83d);}}});}[_0x296cec(0x17e)](_0x37aa78){const _0x2655ee=_0x296cec;if(!_0x5ca857(_0x441607,_0x2ff983)){_0xc1bc85(_0x441607,_0x3ce516,_0x37aa78),_0x258c26['recordDebugEvents']({'eventName':'notification_service_not_initialized'}),_0x55e808(0x2,_0x2655ee(0x2d1));return;}_0x793e5e(_0x2655ee(0x17e),()=>_0x26cf2f(this,null,function*(){const _0x42c972=_0x2655ee;var _0x22f719;let _0x29f5af=JSON[_0x42c972(0x216)](localStorage['getItem'](_0x42c972(0x230))||'{}');if(_0x29f5af){for(let _0x1d1666 in _0x29f5af)if(((_0x22f719=_0x29f5af[_0x1d1666])==null?void 0x0:_0x22f719[_0x42c972(0x327)])===_0x42c972(0x23f)){_0x55e808(0x1,_0x42c972(0x1ca));return;}}_0x6f8ad2(this,_0x46c56e,_0x9a167a)[_0x42c972(0x1f6)](this,_0x37aa78),_0x5ca857(this,_0x543e10)['call'](this),_0x6f8ad2(this,_0x46c56e,_0x41c2c2)[_0x42c972(0x1f6)](this,_0x37aa78[_0x42c972(0x2bb)]);}));}};_0xfdc362=new WeakMap(),_0x20779b=new WeakMap(),_0x43a6cd=new WeakMap(),_0x2f36d3=new WeakMap(),_0x2ff983=new WeakMap(),_0x3ce516=new WeakMap(),_0x46c56e=new WeakSet(),_0x53002e=function(_0x545c7f){return _0x26cf2f(this,null,function*(){const _0x1f9139=_0x103a;_0x55e808(0x1,'Checking\x20notification\x20permission:\x20'+JSON[_0x1f9139(0x2dd)](_0x545c7f)+'\x20'),_0x258c26[_0x1f9139(0x342)]({'eventName':_0x1f9139(0x2e1)});let _0x3a0440;try{if(_0x3a0440=Notification[_0x1f9139(0x203)],_0x3a0440){if(_0x55e808(0x1,_0x1f9139(0x324)+_0x3a0440),_0x3a0440==='default')_0x545c7f||(this[_0x1f9139(0x203)]=_0x1f9139(0x2fb),_0x258c26['recordDebugEvents']({'eventName':_0x1f9139(0x2ea)})),_0x545c7f&&(_0x258c26[_0x1f9139(0x342)]({'eventName':_0x1f9139(0x182),'eventProperties':[{'eventProperty':_0x1f9139(0x327),'value':''+(_0x545c7f==null?void 0x0:_0x545c7f['type'])}]}),_0x5ca857(this,_0x341f7a)[_0x1f9139(0x1f6)](this,_0x545c7f[_0x1f9139(0x2bb)]),_0x545c7f[_0x1f9139(0x327)]===_0x1f9139(0x23f)?_0x6f8ad2(this,_0x46c56e,_0x530f13)[_0x1f9139(0x1f6)](this,_0x545c7f):yield _0x6f8ad2(this,_0x46c56e,_0x585a22)['call'](this,_0x545c7f));else{if(_0x3a0440==='denied')_0x258c26[_0x1f9139(0x342)]({'eventName':_0x1f9139(0x235)}),_0x55e808(0x1,_0x1f9139(0x2f0)),_0x545c7f&&_0x545c7f[_0x1f9139(0x2bb)]&&_0x5ca857(this,_0x341f7a)[_0x1f9139(0x1f6)](this,_0x545c7f[_0x1f9139(0x2bb)]);else{if(_0x545c7f&&_0x545c7f[_0x1f9139(0x2bb)]){_0x5ca857(this,_0x341f7a)[_0x1f9139(0x1f6)](this,_0x545c7f[_0x1f9139(0x2bb)]);return;}_0x258c26['recordDebugEvents']({'eventName':_0x1f9139(0x1d7)}),_0x55e808(0x1,_0x1f9139(0x200)),_0x5ca857(_0x15828e,_0x43a6cd)||(yield _0x6f8ad2(this,_0x46c56e,_0x40f67a)['call'](this),yield _0x258c26['recordEvent']({'eventName':_0x1f9139(0x1c5)}),_0x545c7f||_0xc1bc85(_0x15828e,_0x43a6cd,!0x0));}}}}catch(_0x4f6a0f){_0x55e808(0x2,_0x1f9139(0x20f)),_0x258c26['recordDebugEvents']({'eventName':_0x1f9139(0x2f6)});}});},_0x530f13=function(_0x3a12e9){const _0x537fa0=_0x296cec;try{let _0x4bfe94=document[_0x537fa0(0x227)]('div'),_0x34f1bf;_0x3a12e9[_0x537fa0(0x314)][_0x537fa0(0x2a4)]&&(_0x34f1bf=document[_0x537fa0(0x227)]('img'),_0x34f1bf[_0x537fa0(0x1f8)]=_0x3a12e9[_0x537fa0(0x314)][_0x537fa0(0x2a4)],_0x34f1bf[_0x537fa0(0x1cf)]='Image',_0x34f1bf['id']=_0x537fa0(0x1e2));let _0x159728=document[_0x537fa0(0x227)](_0x537fa0(0x172)),_0x1a2642=document[_0x537fa0(0x227)](_0x537fa0(0x172)),_0x5015e5=document[_0x537fa0(0x227)](_0x537fa0(0x172)),_0xf3d1e1=document['createElement']('img'),_0x2731ae=document[_0x537fa0(0x227)](_0x537fa0(0x172)),_0x2db34d=document[_0x537fa0(0x227)](_0x537fa0(0x172)),_0x46ef86=document['createElement'](_0x537fa0(0x172)),_0x314267=document[_0x537fa0(0x227)](_0x537fa0(0x172)),_0x12f4b1=document[_0x537fa0(0x227)](_0x537fa0(0x172)),_0xe0622a=document['createElement'](_0x537fa0(0x172)),_0x5b6651=document['createElement'](_0x537fa0(0x174)),_0x328beb=document[_0x537fa0(0x227)](_0x537fa0(0x174));_0x4bfe94[_0x537fa0(0x2c9)]=_0x537fa0(0x337),_0x159728['className']=_0x537fa0(0x309),_0x1a2642[_0x537fa0(0x2c9)]=_0x314267['className']=_0x12f4b1[_0x537fa0(0x2c9)]=_0x537fa0(0x359),_0x5015e5[_0x537fa0(0x2c9)]=_0x537fa0(0x1eb),_0x2731ae['className']=_0x537fa0(0x343),_0xe0622a[_0x537fa0(0x2c9)]='button-container',_0x2db34d['id']=_0x537fa0(0x1bf),_0x46ef86['id']=_0x537fa0(0x26c),_0x5b6651['id']=_0x537fa0(0x2b7),_0x328beb['id']='button-2',_0xf3d1e1[_0x537fa0(0x1f8)]=_0x3a12e9[_0x537fa0(0x314)][_0x537fa0(0x2ab)],_0xf3d1e1[_0x537fa0(0x1cf)]=_0x537fa0(0x1ce),_0xf3d1e1['id']='logo',_0x2db34d['textContent']=_0x3a12e9[_0x537fa0(0x314)]['banner_title'],_0x46ef86[_0x537fa0(0x335)]=_0x3a12e9[_0x537fa0(0x314)]['banner_text'],_0x5b6651[_0x537fa0(0x335)]=_0x3a12e9[_0x537fa0(0x314)][_0x537fa0(0x362)][_0x537fa0(0x2eb)],_0x328beb[_0x537fa0(0x335)]=_0x3a12e9['banner_design'][_0x537fa0(0x1fc)][_0x537fa0(0x2eb)],_0x5015e5[_0x537fa0(0x339)](_0xf3d1e1),_0x2731ae['appendChild'](_0x2db34d),_0x2731ae['appendChild'](_0x46ef86),_0x1a2642[_0x537fa0(0x339)](_0x5015e5),_0x1a2642['appendChild'](_0x2731ae),_0x34f1bf&&(_0x314267['appendChild'](_0x34f1bf),_0x34f1bf[_0x537fa0(0x31c)]['cssText']='\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'),_0xe0622a['appendChild'](_0x5b6651),_0xe0622a['appendChild'](_0x328beb),_0x12f4b1[_0x537fa0(0x339)](_0xe0622a),_0x159728[_0x537fa0(0x339)](_0x1a2642),_0x159728[_0x537fa0(0x339)](_0x314267),_0x159728[_0x537fa0(0x339)](_0x12f4b1),_0x4bfe94[_0x537fa0(0x339)](_0x159728),_0x4bfe94[_0x537fa0(0x31c)]['cssText']=_0x537fa0(0x24d),_0x159728[_0x537fa0(0x31c)][_0x537fa0(0x24a)]=_0x537fa0(0x20e)+_0x3a12e9[_0x537fa0(0x314)][_0x537fa0(0x318)]+_0x537fa0(0x340),_0x1a2642['style'][_0x537fa0(0x24a)]=_0x314267['style'][_0x537fa0(0x24a)]=_0x12f4b1[_0x537fa0(0x31c)][_0x537fa0(0x24a)]='\x0adisplay:\x20flex;\x0aflex-wrap:\x20wrap;\x0amargin-bottom:\x2010px;\x0a',_0x5015e5[_0x537fa0(0x31c)][_0x537fa0(0x24a)]=_0x537fa0(0x332),_0x2731ae[_0x537fa0(0x31c)][_0x537fa0(0x24a)]='\x0awidth:\x2073%;\x0amargin-left:\x202%;\x0a',_0xf3d1e1['style']['cssText']=_0x537fa0(0x30f),_0x5b6651['style']['cssText']='\x0apadding:\x2012px\x2020px;\x0aborder:\x20none;\x0abackground-color:\x20\x20'+_0x3a12e9[_0x537fa0(0x314)]['button_1']['backgroundColor']+';\x0acolor:\x20'+_0x3a12e9[_0x537fa0(0x314)]['button_1'][_0x537fa0(0x187)]+';\x0acursor:\x20pointer;\x0aborder-radius:\x205px;\x0awidth:\x2048%;\x0a',_0x328beb[_0x537fa0(0x31c)][_0x537fa0(0x24a)]=_0x537fa0(0x213)+_0x3a12e9[_0x537fa0(0x314)][_0x537fa0(0x1fc)][_0x537fa0(0x322)]+';\x0acolor:\x20'+_0x3a12e9[_0x537fa0(0x314)][_0x537fa0(0x1fc)][_0x537fa0(0x187)]+_0x537fa0(0x27a),_0xe0622a[_0x537fa0(0x31c)][_0x537fa0(0x24a)]=_0x537fa0(0x1e5),_0x2db34d[_0x537fa0(0x31c)][_0x537fa0(0x24a)]=_0x537fa0(0x264)+_0x3a12e9['banner_design'][_0x537fa0(0x2e0)]+'\x0a',_0x46ef86['style'][_0x537fa0(0x24a)]=_0x537fa0(0x27d)+_0x3a12e9['banner_design'][_0x537fa0(0x2e0)]+'\x0a',document[_0x537fa0(0x2f5)][_0x537fa0(0x339)](_0x4bfe94),document[_0x537fa0(0x2f5)][_0x537fa0(0x31c)][_0x537fa0(0x24f)]=_0x537fa0(0x189),_0x258c26['recordEvent']({'eventName':_0x537fa0(0x325),'name':_0x537fa0(0x277),'web_optin_instance_id':_0x3a12e9[_0x537fa0(0x2bb)]}),_0x5b6651==null||_0x5b6651['addEventListener']('click',()=>_0x26cf2f(this,null,function*(){const _0x2aeba7=_0x537fa0;_0x4bfe94[_0x2aeba7(0x247)](),_0xc1bc85(_0x15828e,_0x2f36d3,!0x1),document['body'][_0x2aeba7(0x31c)][_0x2aeba7(0x24f)]=_0x2aeba7(0x2b0),yield _0x258c26['recordEvent']({'eventName':'Denied\x20Web\x20Push\x20Soft-ask','web_optin_instance_id':_0x3a12e9[_0x2aeba7(0x2bb)]}),_0x55e808(0x1,'User\x20denied\x20the\x20notification\x20permission.');})),_0x328beb==null||_0x328beb[_0x537fa0(0x2ce)](_0x537fa0(0x28a),()=>_0x26cf2f(this,null,function*(){const _0x5be622=_0x537fa0;_0x4bfe94['remove'](),document[_0x5be622(0x2f5)][_0x5be622(0x31c)][_0x5be622(0x24f)]=_0x5be622(0x2b0),_0x258c26[_0x5be622(0x32c)]({'eventName':_0x5be622(0x357),'web_optin_instance_id':_0x3a12e9[_0x5be622(0x2bb)]}),yield _0x6f8ad2(this,_0x46c56e,_0x585a22)[_0x5be622(0x1f6)](this,_0x3a12e9);}));}catch(_0x1af3b2){}},_0x585a22=function(_0x164293){return _0x26cf2f(this,null,function*(){const _0x18e8e9=_0x103a;try{_0x258c26[_0x18e8e9(0x32c)]({'eventName':'Displayed\x20Web\x20Push\x20Subscription','name':_0x18e8e9(0x277),'web_optin_instance_id':_0x164293[_0x18e8e9(0x2bb)]});let _0x1b7db7=yield Notification[_0x18e8e9(0x1c0)]();_0x1b7db7===_0x18e8e9(0x1da)?(_0x55e808(0x1,_0x18e8e9(0x1b5)),yield _0x6f8ad2(this,_0x46c56e,_0x40f67a)['call'](this),yield _0x258c26[_0x18e8e9(0x32c)]({'eventName':_0x18e8e9(0x20c),'name':_0x18e8e9(0x1d5),'web_optin_instance_id':_0x164293[_0x18e8e9(0x2bb)]})):_0x1b7db7==='denied'?(yield _0x258c26['recordEvent']({'eventName':_0x18e8e9(0x25b)}),_0x55e808(0x1,_0x18e8e9(0x315))):_0x1b7db7==='default'&&(yield _0x258c26[_0x18e8e9(0x32c)]({'eventName':_0x18e8e9(0x323)}),_0x55e808(0x1,'User\x20closed\x20the\x20notification\x20permission\x20dialog.'));}catch(_0x2196a4){_0x55e808(0x2,_0x18e8e9(0x2d5));}_0xc1bc85(_0x15828e,_0x2f36d3,!0x1);});},_0x40f67a=function(){return _0x26cf2f(this,null,function*(){const _0x5b4b77=_0x103a;var _0xb8945d,_0x4c6cc7;let _0x1f8098=yield _0x16192f[_0x5b4b77(0x250)](''+_0x301093);if(_0x1f8098[_0x5b4b77(0x2dc)]){let _0x132193=yield(_0xb8945d=_0x5ca857(_0x15828e,_0x20779b))==null?void 0x0:_0xb8945d[_0x5b4b77(0x209)][_0x5b4b77(0x320)]();_0x132193&&(yield _0x132193[_0x5b4b77(0x2d4)]());let _0x35ef90=yield(_0x4c6cc7=_0x5ca857(_0x15828e,_0x20779b))==null?void 0x0:_0x4c6cc7['pushManager'][_0x5b4b77(0x1fb)]({'applicationServerKey':_0x1f8098[_0x5b4b77(0x2e8)]||'','userVisibleOnly':!0x0}),_0x187739=localStorage[_0x5b4b77(0x32f)](_0x5b4b77(0x17a))||'';_0x55e808(0x1,_0x5b4b77(0x1a3)+_0x187739),(!_0x187739||_0x187739===_0x5b4b77(0x1f4))&&(yield _0x444c8c[_0x5b4b77(0x170)]()),yield _0x16192f[_0x5b4b77(0x29a)](''+_0x15981c,{'customer_id':localStorage[_0x5b4b77(0x32f)](_0x5b4b77(0x17a)),'device_id':localStorage[_0x5b4b77(0x32f)](_0x5b4b77(0x192)),'device_platform':_0x444c8c['getOperatingSystem'](),'is_web_push_subscribed':!0x0,'os':_0x444c8c[_0x5b4b77(0x241)](),'web_push_subscription_page_url':window[_0x5b4b77(0x1b0)][_0x5b4b77(0x273)],'web_push_token':{'token':JSON[_0x5b4b77(0x216)](JSON[_0x5b4b77(0x2dd)](_0x35ef90))}}),_0x55e808(0x1,_0x5b4b77(0x28c));}else throw new Error(_0x5b4b77(0x186));});},_0x9a167a=function(_0x4c41fb){const _0x1ed804=_0x296cec;_0x444c8c[_0x1ed804(0x311)](_0x4c41fb,_0x1ed804(0x230),_0x1ed804(0x2bb));},_0x543e10=new WeakMap(),_0x41c2c2=function(_0x2dc28e){const _0x416eeb=_0x296cec;if(_0x5ca857(_0x15828e,_0x2f36d3))return;_0xc1bc85(_0x15828e,_0x2f36d3,!0x0);let _0x318206=_0x6f8ad2(this,_0x46c56e,_0x2fefd7)[_0x416eeb(0x1f6)](this);if(_0x318206!=null&&_0x318206[_0x2dc28e])switch(_0x318206[_0x2dc28e][_0x416eeb(0x35e)]){case _0x416eeb(0x171):{_0x6f8ad2(this,_0x46c56e,_0x45e647)[_0x416eeb(0x1f6)](this,_0x318206[_0x2dc28e]);break;}case _0x416eeb(0x19a):{_0x6f8ad2(this,_0x46c56e,_0x3447cf)['call'](this,_0x318206[_0x2dc28e]);break;}case _0x416eeb(0x360):{_0x6f8ad2(this,_0x46c56e,_0x2bd0b5)[_0x416eeb(0x1f6)](this,_0x318206[_0x2dc28e]);break;}default:return;}},_0x2fefd7=function(){const _0x21ac02=_0x296cec;let _0x5b3cdd=localStorage[_0x21ac02(0x32f)](_0x21ac02(0x230));return _0x5b3cdd?JSON[_0x21ac02(0x216)](_0x5b3cdd):null;},_0x45e647=function(_0x55bf87){const _0x2d54d9=_0x296cec;_0x444c8c[_0x2d54d9(0x266)]({'clearActionMethod':_0x5ca857(this,_0x341f7a)[_0x2d54d9(0x1c4)](this),'data':_0x55bf87,'displayMethod':_0x6f8ad2(this,_0x46c56e,_0x3447cf)[_0x2d54d9(0x1c4)](this),'idKey':_0x2d54d9(0x2bb),'timeValueKey':'entry_time_value'});},_0x3447cf=function(_0x39534a){const _0x2a2ce1=_0x296cec;_0x6f8ad2(this,_0x46c56e,_0x53002e)[_0x2a2ce1(0x1f6)](this,_0x39534a);},_0x341f7a=new WeakMap(),_0x2bd0b5=function(_0x402735){const _0x28866c=_0x296cec;_0x444c8c[_0x28866c(0x194)]({'data':_0x402735,'displayMethod':_0x6f8ad2(this,_0x46c56e,_0x3447cf)[_0x28866c(0x1c4)](this),'timeValueKey':_0x28866c(0x31e)});},_0x110e3a(_0x15828e,_0xfdc362),_0x110e3a(_0x15828e,_0x20779b,null),_0x110e3a(_0x15828e,_0x43a6cd,!0x1),_0x110e3a(_0x15828e,_0x2f36d3,!0x1),_0x110e3a(_0x15828e,_0x2ff983,!0x1),_0x110e3a(_0x15828e,_0x3ce516,null);var _0x39e85e=_0x15828e,_0x56215b=_0x39e85e['getInstance'](),_0x58e1f7,_0x2e3205,_0x2ad33d,_0x58b3fc,_0x506170,_0x327352,_0x172b50,_0x378a61,_0x187698,_0x4802cd,_0x1f747b,_0xdaa81f,_0x560d78,_0x5e7079,_0x2eef39,_0x5a0995=class _0x4dbf31{constructor(){const _0x47a573=_0x296cec;_0x110e3a(this,_0x2e3205),_0x110e3a(this,_0x172b50,_0x570288=>{const _0x1c3abc=_0x103a;_0x444c8c['clearActionInLocalStorage']({'id':_0x570288,'localStorageKey':_0x1c3abc(0x287)});}),_0x110e3a(this,_0x378a61,(_0x16c76d,_0x806773)=>{const _0x480fac=_0x103a;let _0x2713d0=document[_0x480fac(0x227)]('div');_0x2713d0[_0x480fac(0x1f0)]=_0x806773,_0x2713d0[_0x480fac(0x17d)](_0x480fac(0x24b))[_0x480fac(0x265)](_0x26cc45=>{const _0x4f3100=_0x480fac;let _0x3e3932=document[_0x4f3100(0x227)](_0x4f3100(0x24b));_0x26cc45[_0x4f3100(0x1f8)]?_0x3e3932[_0x4f3100(0x1f8)]=_0x26cc45['src']:_0x3e3932[_0x4f3100(0x335)]=_0x26cc45['textContent'],_0x16c76d[_0x4f3100(0x339)](_0x3e3932);});}),_0x110e3a(this,_0x4802cd,({campaignCustomerInstanceId:_0x245719,campaignId:_0x2c5bea,customForm:_0x3ec5c0,formDiv:_0x3f61b1,popupContainer:_0x54037b})=>{const _0x28f033=_0x103a;let _0x135f24=(_0x3f61b1==null?void 0x0:_0x3f61b1[_0x28f033(0x1a2)](_0x28f033(0x1d0)))||_0x3ec5c0;_0x135f24&&(_0x135f24[_0x28f033(0x17d)]('input')[_0x28f033(0x265)](_0x3700e8=>{const _0x6083f2=_0x28f033;_0x3700e8[_0x6083f2(0x31c)][_0x6083f2(0x220)]('padding',_0x3700e8['style'][_0x6083f2(0x334)],_0x6083f2(0x27e));}),_0x135f24[_0x28f033(0x2ce)](_0x28f033(0x2f7),()=>_0x26cf2f(this,null,function*(){const _0x56eced=_0x28f033;_0x54037b[_0x56eced(0x247)]();let _0x262527=new FormData(_0x135f24),_0x1f0bf6={};_0x55e808(0x1,_0x56eced(0x358));for(let [_0x136c4a,_0x392d25]of _0x262527[_0x56eced(0x215)]())_0x1f0bf6[_0x136c4a]=_0x392d25,_0x55e808(0x1,_0x136c4a+':\x20'+_0x392d25),_0x1ff1e2['recordAttribute'](_0x136c4a,_0x392d25[_0x56eced(0x344)]());yield _0x258c26[_0x56eced(0x32c)]({'campaignCustomerInstanceId':_0x245719,'campaignId':_0x2c5bea,'eventName':_0x2227ce,'eventProperties':[{'eventProperty':_0x56eced(0x2f4),'value':JSON[_0x56eced(0x2dd)]({'campaignId':_0x2c5bea,'formId':(_0x3f61b1==null?void 0x0:_0x3f61b1['id'])||_0x56eced(0x212),'formValues':_0x1f0bf6})},{'eventProperty':'Campaign\x20Id','value':_0x2c5bea[_0x56eced(0x344)]()}],'name':_0x56eced(0x1d0)});})));}),this[_0x47a573(0x32d)]=()=>{const _0x32ed99=_0x47a573;_0x444c8c['loadActionInLocalStorage']({'actionCondition':_0x364811=>_0x364811['message'][_0x32ed99(0x26a)]===_0x32ed99(0x1bb),'actionMethod':_0x249e29=>_0x6f8ad2(this,_0x2e3205,_0x58b3fc)[_0x32ed99(0x1f6)](this,_0x249e29[_0x32ed99(0x271)]),'localStorageKey':_0x32ed99(0x287)});},_0x110e3a(this,_0x2eef39,()=>{const _0x3dd227=_0x47a573;_0x444c8c['storeActionInLocalStorageInternal'](_0x3dd227(0x287));});}static[_0x296cec(0x27c)](){const _0x2d7898=_0x296cec;var _0x4dbb22;return _0x5ca857(_0x4dbf31,_0x58e1f7)||(_0xc1bc85(_0x4dbf31,_0x58e1f7,new _0x4dbf31()),_0x6f8ad2(_0x4dbb22=_0x5ca857(_0x4dbf31,_0x58e1f7),_0x2e3205,_0x2ad33d)[_0x2d7898(0x1f6)](_0x4dbb22)),_0x5ca857(_0x4dbf31,_0x58e1f7);}['showPopup'](_0x2a072f){const _0x5992bf=_0x296cec;let _0x302e4b=JSON[_0x5992bf(0x216)](localStorage[_0x5992bf(0x32f)](_0x5992bf(0x287))||'{}');if(_0x302e4b&&_0x302e4b[_0x2a072f==null?void 0x0:_0x2a072f[_0x5992bf(0x271)]]){_0x55e808(0x1,'Popup\x20already\x20in\x20cache');return;}_0x6f8ad2(this,_0x2e3205,_0x5e7079)[_0x5992bf(0x1f6)](this,_0x2a072f),_0x5ca857(this,_0x2eef39)['call'](this),_0x6f8ad2(this,_0x2e3205,_0x58b3fc)[_0x5992bf(0x1f6)](this,_0x2a072f[_0x5992bf(0x271)]);}['isPopupAction'](_0x2395b8){const _0x2e9344=_0x296cec;return _0x2395b8===_0x2e9344(0x1bb);}};_0x58e1f7=new WeakMap(),_0x2e3205=new WeakSet(),_0x2ad33d=function(){return _0x26cf2f(this,null,function*(){});},_0x58b3fc=function(_0x404fb3){const _0x283f3c=_0x296cec;let _0x2b2c73=_0x6f8ad2(this,_0x2e3205,_0x506170)['call'](this);if(document[_0x283f3c(0x226)]('popup_container_'+_0x404fb3)){_0x55e808(0x1,_0x283f3c(0x338)),_0x5ca857(this,_0x172b50)[_0x283f3c(0x1f6)](this,_0x404fb3);return;}if(_0x2b2c73!=null&&_0x2b2c73[_0x404fb3])switch(_0x2b2c73[_0x404fb3][_0x283f3c(0x29e)]){case _0x283f3c(0x171):{_0x6f8ad2(this,_0x2e3205,_0x327352)[_0x283f3c(0x1f6)](this,_0x2b2c73[_0x404fb3]);break;}case _0x283f3c(0x19a):{_0x6f8ad2(this,_0x2e3205,_0x187698)['call'](this,_0x2b2c73[_0x404fb3]);break;}case _0x283f3c(0x360):{_0x6f8ad2(this,_0x2e3205,_0x560d78)[_0x283f3c(0x1f6)](this,_0x2b2c73[_0x404fb3]);break;}default:return;}},_0x506170=function(){const _0x43940e=_0x296cec;let _0x5672ef=localStorage[_0x43940e(0x32f)]('action');return _0x5672ef?JSON[_0x43940e(0x216)](_0x5672ef):null;},_0x327352=function(_0x359035){const _0x55c7fe=_0x296cec;_0x444c8c['showDelayedAction']({'clearActionMethod':_0x5ca857(this,_0x172b50)[_0x55c7fe(0x1c4)](this),'data':_0x359035,'displayMethod':_0x6f8ad2(this,_0x2e3205,_0x187698)['bind'](this),'idKey':_0x55c7fe(0x271),'timeValueKey':_0x55c7fe(0x177)});},_0x172b50=new WeakMap(),_0x378a61=new WeakMap(),_0x187698=function(_0x27e662){const _0x34647e=_0x296cec;if(document[_0x34647e(0x226)](_0x34647e(0x26f)+_0x27e662[_0x34647e(0x271)]))_0x55e808(0x1,_0x34647e(0x338));else{let _0x3f0e8b=_0x6f8ad2(this,_0x2e3205,_0xdaa81f)[_0x34647e(0x1f6)](this,'div',_0x27e662);_0x5ca857(this,_0x378a61)[_0x34647e(0x1f6)](this,_0x3f0e8b,_0x27e662[_0x34647e(0x1e8)][_0x34647e(0x296)]),document['body'][_0x34647e(0x339)](_0x3f0e8b),_0x258c26[_0x34647e(0x32c)]({'campaignCustomerInstanceId':_0x27e662[_0x34647e(0x1e6)],'campaignId':_0x27e662[_0x34647e(0x271)],'eventName':_0x2227ce,'eventProperties':[{'eventProperty':_0x34647e(0x1fd),'value':JSON[_0x34647e(0x2dd)]({'campaignId':_0x27e662[_0x34647e(0x271)]})}],'name':'view'});}_0x5ca857(this,_0x172b50)[_0x34647e(0x1f6)](this,_0x27e662[_0x34647e(0x271)]);},_0x4802cd=new WeakMap(),_0x1f747b=function(_0x57ff2b,_0x51e5eb){const _0x5a88e0=_0x296cec;let _0x347d3d=_0x57ff2b[_0x5a88e0(0x365)];for(;_0x347d3d;){if(_0x347d3d['id']['startsWith'](_0x51e5eb))return _0x347d3d;_0x347d3d=_0x347d3d[_0x5a88e0(0x365)];}return null;},_0xdaa81f=function(_0x51191a,_0xcda49b){const _0x3c98c6=_0x296cec;let {campaignCustomerInstanceId:_0x55fa53,campaignId:_0x4b2979,message:{design:_0x2c6a54}}=_0xcda49b,_0x3a2a51=document[_0x3c98c6(0x227)](_0x51191a);_0x3a2a51['id']='popup_container_'+_0x4b2979,_0x3a2a51[_0x3c98c6(0x1f0)]=_0x2c6a54,_0x3a2a51[_0x3c98c6(0x31c)][_0x3c98c6(0x1c2)]=_0x3c98c6(0x341),_0x3a2a51['style'][_0x3c98c6(0x321)]='0',_0x3a2a51[_0x3c98c6(0x31c)][_0x3c98c6(0x36d)]='0',_0x3a2a51[_0x3c98c6(0x31c)][_0x3c98c6(0x330)]=_0x3c98c6(0x24c),_0x3a2a51[_0x3c98c6(0x31c)][_0x3c98c6(0x2e9)]=_0x3c98c6(0x24c),_0x3a2a51[_0x3c98c6(0x31c)]['zIndex']='99999999';let _0x25095b=_0x3a2a51[_0x3c98c6(0x1a2)]('.u-popup-container');_0x25095b&&(_0x25095b[_0x3c98c6(0x31c)][_0x3c98c6(0x2da)]='50');let _0x5514e1=_0x25095b['querySelector']('.u-popup-overlay');_0x5514e1&&(_0x55e808(0x1,_0x3c98c6(0x1a4)),_0x5514e1[_0x3c98c6(0x31c)][_0x3c98c6(0x220)](_0x3c98c6(0x2a3),'block','important')),_0x3a2a51[_0x3c98c6(0x17d)](_0x3c98c6(0x1d0))['forEach'](_0x4bbd74=>{const _0x141074=_0x3c98c6;let _0xfde72c=_0x6f8ad2(this,_0x2e3205,_0x1f747b)[_0x141074(0x1f6)](this,_0x4bbd74,_0x141074(0x30d));_0xfde72c?_0x5ca857(this,_0x4802cd)['call'](this,{'campaignCustomerInstanceId':_0x55fa53,'campaignId':_0x4b2979,'formDiv':_0xfde72c,'popupContainer':_0x3a2a51}):_0x5ca857(this,_0x4802cd)[_0x141074(0x1f6)](this,{'campaignCustomerInstanceId':_0x55fa53,'campaignId':_0x4b2979,'customForm':_0x4bbd74,'popupContainer':_0x3a2a51});});let _0x5339d6=_0x3a2a51[_0x3c98c6(0x1a2)]('.u-close-button');return(_0x5339d6==null?void 0x0:_0x5339d6[_0x3c98c6(0x297)](_0x3c98c6(0x19b)))==='#'&&_0x5339d6[_0x3c98c6(0x1fa)](_0x3c98c6(0x19b)),_0x5339d6==null||_0x5339d6[_0x3c98c6(0x2ce)](_0x3c98c6(0x28a),()=>_0x26cf2f(this,null,function*(){const _0x51eaf3=_0x3c98c6;_0x3a2a51[_0x51eaf3(0x247)](),yield _0x258c26[_0x51eaf3(0x32c)]({'campaignCustomerInstanceId':_0x55fa53,'campaignId':_0x4b2979,'eventName':_0x2227ce,'eventProperties':[{'eventProperty':_0x51eaf3(0x22a),'value':JSON[_0x51eaf3(0x2dd)]({'campaignId':_0x4b2979})}],'name':_0x51eaf3(0x173)});})),_0x3a2a51[_0x3c98c6(0x17d)](_0x3c98c6(0x1d6))[_0x3c98c6(0x265)](_0x260812=>{const _0x2a34bb=_0x3c98c6;_0x260812[_0x2a34bb(0x2ce)](_0x2a34bb(0x28a),()=>_0x26cf2f(this,null,function*(){const _0x4e238c=_0x2a34bb;_0x3a2a51['remove'](),yield _0x258c26[_0x4e238c(0x32c)]({'campaignCustomerInstanceId':_0x55fa53,'campaignId':_0x4b2979,'eventName':_0x2227ce,'eventProperties':[{'eventProperty':_0x4e238c(0x1b6),'value':JSON['stringify']({'buttonId':_0x260812['id'],'campaignId':_0x4b2979})}],'name':_0x4e238c(0x28a)});}));}),_0x3a2a51[_0x3c98c6(0x17d)](_0x3c98c6(0x2be))[_0x3c98c6(0x265)](_0x4d0e08=>{const _0x5701ce=_0x3c98c6;_0x4d0e08['addEventListener'](_0x5701ce(0x28a),()=>_0x26cf2f(this,null,function*(){const _0x284c9a=_0x5701ce;var _0x1b7b98;((_0x1b7b98=_0x4d0e08[_0x284c9a(0x365)])==null?void 0x0:_0x1b7b98['tagName'])==='A'&&_0x4d0e08[_0x284c9a(0x365)][_0x284c9a(0x297)](_0x284c9a(0x19b))&&_0x3a2a51[_0x284c9a(0x247)](),yield _0x258c26[_0x284c9a(0x32c)]({'campaignCustomerInstanceId':_0x55fa53,'campaignId':_0x4b2979,'eventName':_0x2227ce,'eventProperties':[{'eventProperty':'Image\x20Click','value':JSON[_0x284c9a(0x2dd)]({'campaignId':_0x4b2979,'imageClassName':_0x4d0e08[_0x284c9a(0x2c9)],'imageId':_0x4d0e08['id']})}],'name':_0x284c9a(0x28a)});}));}),_0x3a2a51;},_0x560d78=function(_0x3f83ce){const _0x1bf34e=_0x296cec;_0x444c8c[_0x1bf34e(0x194)]({'data':_0x3f83ce,'displayMethod':_0x6f8ad2(this,_0x2e3205,_0x187698)[_0x1bf34e(0x1c4)](this),'timeValueKey':_0x1bf34e(0x177)});},_0x5e7079=function(_0x534c6a){const _0x2b4bab=_0x296cec;_0x444c8c[_0x2b4bab(0x311)](_0x534c6a,_0x2b4bab(0x287),'campaignId');},_0x2eef39=new WeakMap(),_0x110e3a(_0x5a0995,_0x58e1f7);var _0x583e1f=_0x5a0995,_0x571a85=_0x583e1f[_0x296cec(0x27c)](),_0x478aa1,_0x1e5ed3,_0x416912,_0x572789,_0xcbf0bc,_0x57f7b8,_0x425008,_0x4e9900,_0x28c2b5=class _0x261b93{constructor(){const _0x5b0e46=_0x296cec;_0x110e3a(this,_0x1e5ed3),this['queue']=Promise[_0x5b0e46(0x317)]();}static[_0x296cec(0x27c)](){const _0x96dfb7=_0x296cec;var _0xcb0013;return _0x5ca857(_0x261b93,_0x478aa1)||(_0xc1bc85(_0x261b93,_0x478aa1,new _0x261b93()),_0x6f8ad2(_0xcb0013=_0x5ca857(_0x261b93,_0x478aa1),_0x1e5ed3,_0x416912)[_0x96dfb7(0x1f6)](_0xcb0013)),_0x5ca857(_0x261b93,_0x478aa1);}['pushToQueue'](_0x672abf){const _0x5b15e2=_0x296cec;let _0x4108d9=JSON['parse'](localStorage[_0x5b15e2(0x32f)](_0x5b15e2(0x281))||'[]');_0x4108d9['push'](_0x672abf),localStorage[_0x5b15e2(0x184)](_0x5b15e2(0x281),JSON[_0x5b15e2(0x2dd)](_0x4108d9));}[_0x296cec(0x1b9)](){return _0x26cf2f(this,null,function*(){const _0x4b13d6=_0x103a;let _0xe7dd42=JSON[_0x4b13d6(0x216)](localStorage[_0x4b13d6(0x32f)](_0x4b13d6(0x281))||'[]');if(Array[_0x4b13d6(0x229)](_0xe7dd42)){for(let _0x19b9c9 of _0xe7dd42)yield this[_0x4b13d6(0x2de)](_0x19b9c9);}});}['recordEvent'](_0x32da3b,_0x4e06cc){return _0x26cf2f(this,null,function*(){const _0x4fcbc6=_0x103a;_0x161ed4['isInitialized']&&!_0x161ed4[_0x4fcbc6(0x2ca)]?yield _0x6f8ad2(this,_0x1e5ed3,_0x572789)['call'](this,_0x32da3b,_0x4e06cc):this[_0x4fcbc6(0x242)](_0x32da3b);});}[_0x296cec(0x2de)](_0x281a1c){return _0x26cf2f(this,null,function*(){const _0x5a79e3=_0x103a;try{yield _0x6f8ad2(this,_0x1e5ed3,_0x572789)[_0x5a79e3(0x1f6)](this,_0x281a1c);}finally{_0x6f8ad2(this,_0x1e5ed3,_0x4e9900)[_0x5a79e3(0x1f6)](this,_0x281a1c[_0x5a79e3(0x206)]);}});}[_0x296cec(0x342)](_0x23c338){return _0x26cf2f(this,null,function*(){const _0x174198=_0x103a;_0x161ed4[_0x174198(0x185)]===0x4&&(!_0x161ed4[_0x174198(0x2cc)]||_0x161ed4[_0x174198(0x2cc)][_0x23c338[_0x174198(0x206)]])&&(yield _0x6f8ad2(this,_0x1e5ed3,_0x572789)[_0x174198(0x1f6)](this,_0x23c338));});}[_0x296cec(0x329)](){const _0x52f038=_0x296cec;let _0x504581=localStorage['getItem'](_0x52f038(0x2a0));return _0x504581?JSON[_0x52f038(0x216)](_0x504581):{};}[_0x296cec(0x2e7)](){return _0x26cf2f(this,null,function*(){const _0x39cba4=_0x103a;if(!localStorage[_0x39cba4(0x32f)](_0x39cba4(0x2a0))){let _0x152cf5=(yield this['fetchEventData']())[_0x39cba4(0x2e8)];if(_0x152cf5){localStorage['setItem'](_0x39cba4(0x2a0),JSON[_0x39cba4(0x2dd)](_0x152cf5));try{_0x56215b[_0x39cba4(0x351)]({'events':_0x152cf5});}catch(_0x1fdf8f){}}}});}[_0x296cec(0x2a9)](){return _0x26cf2f(this,null,function*(){const _0xb5691b=_0x103a;try{return yield _0x16192f['get'](''+_0x4bdfb6);}catch(_0x5c4855){throw new Error(_0xb5691b(0x2ae));}});}['postEventRecord'](_0xab6b40,_0x10f87a){return _0x26cf2f(this,null,function*(){const _0x524510=_0x103a;let _0x5f2115=null,_0x11e037=null,_0x53cf78=new AbortController();return this['queue']=this[_0x524510(0x1ac)][_0x524510(0x35b)](()=>_0x26cf2f(this,null,function*(){const _0x1d3c2a=_0x524510;try{if(_0xab6b40['events'][_0x1d3c2a(0x270)]===0x0)throw new Error('No\x20events\x20to\x20record');let _0x4546b3=yield _0x16192f[_0x1d3c2a(0x263)](_0x1d3c2a(0x274)+_0x4bdfb6+_0x2926d0,_0xab6b40,_0x53cf78[_0x1d3c2a(0x2c7)]);if(_0x4546b3['success'])return _0x11e037=_0x4546b3,_0x4546b3;if(_0x4546b3['message']===_0x1d3c2a(0x31f)+localStorage['getItem'](_0x1d3c2a(0x17a))+'\x20not\x20exists')throw localStorage[_0x1d3c2a(0x2c8)](_0x1d3c2a(0x17a)),new Error(_0x1d3c2a(0x36c));}catch(_0x5338b4){throw _0x55e808(0x2,_0x1d3c2a(0x2b4)),_0x55e808(0x2,_0x1d3c2a(0x289)+_0x5338b4[_0x1d3c2a(0x26a)]),_0x55e808(0x2,_0x1d3c2a(0x28d)+_0x5338b4[_0x1d3c2a(0x1e8)]),(_0x5338b4['name']===_0x1d3c2a(0x1ea)||_0x5338b4[_0x1d3c2a(0x26a)]===_0x1d3c2a(0x279)&&_0x5338b4['message']===_0x1d3c2a(0x32a)||_0x5338b4[_0x1d3c2a(0x1e8)]===_0x1d3c2a(0x1a7))&&(_0x55e808(0x2,'Request\x20aborted'),_0x10f87a&&_0x6f8ad2(this,_0x1e5ed3,_0x425008)[_0x1d3c2a(0x1f6)](this,_0x10f87a)),_0x5f2115=new Error((_0x5338b4==null?void 0x0:_0x5338b4[_0x1d3c2a(0x1e8)])||_0x1d3c2a(0x21a)),_0x5338b4;}return null;}))[_0x524510(0x1f1)](()=>{}),this['queue'][_0x524510(0x35b)](()=>{if(_0x5f2115)throw _0x5f2115;return _0x11e037;});});}};_0x478aa1=new WeakMap(),_0x1e5ed3=new WeakSet(),_0x416912=function(){return _0x26cf2f(this,null,function*(){});},_0x572789=function(_0x2152ed,_0x26633c){return _0x26cf2f(this,null,function*(){yield _0x793e5e('#\x20record\x20event',()=>_0x26cf2f(this,null,function*(){const _0x4c3593=_0x103a;var _0x6847cf,_0x211595,_0x2f5a92,_0x516914;let {campaignCustomerInstanceId:_0x11ee90,campaignId:_0x4ed544,eventName:_0x37e9d9,eventProperties:_0x481449,name:_0x39d4b4,web_optin_instance_id:_0x3e90ae}=_0x2152ed;_0x55e808(0x1,_0x4c3593(0x219)),_0xf1c899(_0x4c3593(0x20b),!0x0),_0x2fd0ea(_0x4c3593(0x193),!0x0),_0x55e808(0x1,'Event\x20Payload'),_0x55e808(0x1,{'campaignCustomerInstanceId':_0x11ee90,'eventName':_0x37e9d9,'eventProperties':_0x481449,'name':_0x39d4b4,'web_optin_instance_id':_0x3e90ae});let _0x5a9e08=_0x444c8c[_0x4c3593(0x241)]();if(_0x5a9e08===_0x4c3593(0x188)||_0x5a9e08===_0x4c3593(0x2af))throw new Error('Invalid\x20platform');_0x37e9d9!==_0x4c3593(0x205)&&(yield _0x444c8c[_0x4c3593(0x238)]());let _0x57fa42=[];_0x481449&&_0x57fa42[_0x4c3593(0x283)](..._0x481449),_0x57fa42[_0x4c3593(0x283)]({'eventProperty':_0x4c3593(0x2f1),'value':_0x5a9e08}),_0x57fa42[_0x4c3593(0x283)]({'eventProperty':_0x4c3593(0x29f),'value':_0x444c8c[_0x4c3593(0x2c6)]()}),_0x57fa42[_0x4c3593(0x283)]({'eventProperty':_0x4c3593(0x336),'value':_0x444c8c[_0x4c3593(0x34e)]()});let _0x2dbd31=this['getStoredEvents'](),_0x2f2bac=_0x6f8ad2(this,_0x1e5ed3,_0xcbf0bc)['call'](this,_0x2dbd31,_0x37e9d9,_0x57fa42);if(typeof _0x2f2bac==_0x4c3593(0x191)){_0x55e808(0x2,_0x2f2bac);return;}_0x444c8c[_0x4c3593(0x34c)]();let {id:_0x2d7197}=_0x2dbd31[_0x37e9d9],_0x2e04f4=_0x6f8ad2(this,_0x1e5ed3,_0x57f7b8)['call'](this,_0x503010(_0x40ff3b(_0x503010(_0x503010(_0x503010({},_0x11ee90?{'campaignCustomerInstanceId':_0x11ee90}:{}),_0x4ed544?{'campaignId':_0x4ed544}:{}),_0x3e90ae?{'web_optin_instance_id':_0x3e90ae}:{}),{'eventId':_0x2d7197,'eventProperties':_0x2f2bac,'sessionId':localStorage[_0x4c3593(0x32f)](_0x4c3593(0x1ae))||''}),_0x39d4b4?{'name':_0x39d4b4}:{}));if(_0x161ed4[_0x4c3593(0x17c)]){let _0x59f0c5=JSON[_0x4c3593(0x216)](localStorage['getItem'](_0x4c3593(0x312))||'[]');_0x59f0c5[_0x4c3593(0x270)]<=0x32&&(_0x59f0c5[_0x4c3593(0x283)](..._0x2e04f4[_0x4c3593(0x2a0)]),localStorage[_0x4c3593(0x184)]('offlineEvents',JSON[_0x4c3593(0x2dd)](_0x59f0c5)));return;}let _0x134b6c=yield this[_0x4c3593(0x1f7)](_0x2e04f4,_0x2152ed);(_0x6847cf=_0x134b6c==null?void 0x0:_0x134b6c['data'])!=null&&_0x6847cf[_0x4c3593(0x218)]?(yield this[_0x4c3593(0x342)]({'eventName':_0x4c3593(0x1bc)}),_0x56215b['showNotification'](_0x134b6c['data']['optIn'])):_0x37e9d9==='Viewed\x20Webpage'&&(yield this[_0x4c3593(0x342)]({'eventName':_0x4c3593(0x272),'eventProperties':[{'eventProperty':'message','value':''+(_0x4c3593(0x2e6)in window&&typeof((_0x211595=window==null?void 0x0:window[_0x4c3593(0x2e6)])==null?void 0x0:_0x211595[_0x4c3593(0x203)])!=_0x4c3593(0x1f4))}]})),(_0x516914=(_0x2f5a92=_0x134b6c==null?void 0x0:_0x134b6c[_0x4c3593(0x2e8)])==null?void 0x0:_0x2f5a92[_0x4c3593(0x347)])==null||_0x516914[_0x4c3593(0x265)](_0x300200=>{const _0x34883c=_0x4c3593;_0x571a85[_0x34883c(0x1aa)](_0x300200[_0x34883c(0x1e8)]['name'])?_0x571a85[_0x34883c(0x1ad)](_0x300200):_0x72a182[_0x34883c(0x2ec)](_0x300200['message'][_0x34883c(0x26a)])&&_0x72a182['showContentCard'](_0x300200);}),_0x2fd0ea(_0x4c3593(0x193),!0x1),_0xf1c899('Recording\x20event',!0x1);}),_0x40a278=>{const _0x28ff23=_0x103a;_0x16192f[_0x28ff23(0x2d3)]()==='67'&&_0x40a278['message']!=='Failed\x20to\x20fetch'&&_0x40a278[_0x28ff23(0x1e8)]!==_0x28ff23(0x1a7)&&_0x40a278['message'][_0x28ff23(0x1cb)](_0x28ff23(0x32a));},_0x26633c);});},_0xcbf0bc=function(_0xcf64eb,_0x3d4989,_0xaa7f59){const _0x4eb1b7=_0x296cec;if(!Object['prototype']['hasOwnProperty'][_0x4eb1b7(0x1f6)](_0xcf64eb,_0x3d4989))return _0x4eb1b7(0x2ba)+_0x3d4989+'\x20is\x20not\x20valid.';if(!_0xaa7f59)return[];let _0x24680d=_0xcf64eb[_0x3d4989];if(!(_0x24680d!=null&&_0x24680d['eventProperty']))return _0x55e808(0x2,'Event\x20'+_0x3d4989+_0x4eb1b7(0x224)),_0x4eb1b7(0x2ba)+_0x3d4989+_0x4eb1b7(0x224);let _0x257e8f=_0xaa7f59[_0x4eb1b7(0x364)](({eventProperty:_0x34ffa6})=>!Object['prototype']['hasOwnProperty'][_0x4eb1b7(0x1f6)](_0x24680d[_0x4eb1b7(0x371)],_0x34ffa6))['map'](({eventProperty:_0xfc7828})=>_0xfc7828);return _0x257e8f['length']>0x0&&(_0x55e808(0x2,_0x4eb1b7(0x256)+_0x3d4989+_0x4eb1b7(0x288)+_0x257e8f[_0x4eb1b7(0x1f9)](',\x20')+'.'),_0xaa7f59=_0xaa7f59[_0x4eb1b7(0x364)](({eventProperty:_0x3a839e})=>!_0x257e8f[_0x4eb1b7(0x1cb)](_0x3a839e))),_0xaa7f59[_0x4eb1b7(0x195)](({eventProperty:_0x1cbe18,value:_0x5081d0})=>({'eventPropertyId':_0x24680d['eventProperty'][_0x1cbe18]['id'],'value':_0x5081d0}));},_0x57f7b8=function(_0x5b5af7){const _0x5ac0a0=_0x296cec;return{'customerId':localStorage['getItem'](_0x5ac0a0(0x17a))||'','deviceId':localStorage[_0x5ac0a0(0x32f)]('uniqueIdentity')||'','events':[_0x5b5af7]};},_0x425008=function(_0x1cb040){const _0x40d06a=_0x296cec;_0x55e808(0x1,_0x40d06a(0x2b6)),_0x55e808(0x1,_0x1cb040);let _0x59bbda=localStorage[_0x40d06a(0x32f)](_0x40d06a(0x281));_0x59bbda&&_0x59bbda!=='undefined'?(_0x59bbda=JSON[_0x40d06a(0x216)](_0x59bbda),_0x59bbda['push'](_0x1cb040)):_0x59bbda=[_0x1cb040],localStorage[_0x40d06a(0x184)](_0x40d06a(0x281),JSON['stringify'](_0x59bbda));},_0x4e9900=function(_0x28ca60){const _0x47c294=_0x296cec;let _0x22d397=JSON[_0x47c294(0x216)](localStorage[_0x47c294(0x32f)](_0x47c294(0x281))||'[]'),_0x1a1bb5=_0x22d397[_0x47c294(0x2df)](_0x22c526=>_0x22c526[_0x47c294(0x206)]===_0x28ca60);_0x1a1bb5>=0x0&&_0x22d397[_0x47c294(0x306)](_0x1a1bb5,0x1),localStorage['setItem'](_0x47c294(0x281),JSON[_0x47c294(0x2dd)](_0x22d397));},_0x110e3a(_0x28c2b5,_0x478aa1);var _0x3abbff=_0x28c2b5,_0x258c26=_0x3abbff['getInstance'](),_0x5bc7f1,_0x5ea06f,_0x39bb8d,_0x35ff60,_0x23fced,_0x331dae,_0x2066b6,_0x4a255e,_0x2aeaa4,_0x46f0af,_0x183a39,_0x335e3b,_0x490cdb=class _0x9916cb{constructor(){const _0x16d44b=_0x296cec;_0x110e3a(this,_0x5ea06f),_0x110e3a(this,_0x2066b6,_0x487ea7=>{const _0x49e620=_0x103a;_0x444c8c[_0x49e620(0x28f)]({'id':_0x487ea7,'localStorageKey':'action'});}),this[_0x16d44b(0x237)]=()=>{const _0x1ec544=_0x16d44b;_0x444c8c[_0x1ec544(0x1fe)]({'actionCondition':_0x284a03=>_0x284a03[_0x1ec544(0x1e8)][_0x1ec544(0x26a)]===_0x1ec544(0x276),'actionMethod':_0x4b138c=>_0x6f8ad2(this,_0x5ea06f,_0x35ff60)['call'](this,_0x4b138c[_0x1ec544(0x271)]),'localStorageKey':_0x1ec544(0x287)});},_0x110e3a(this,_0x335e3b,()=>{const _0x491347=_0x16d44b;_0x444c8c['storeActionInLocalStorageInternal'](_0x491347(0x287));});}static['getInstance'](){const _0x47e597=_0x296cec;var _0x44961d;return _0x5ca857(_0x9916cb,_0x5bc7f1)||(_0xc1bc85(_0x9916cb,_0x5bc7f1,new _0x9916cb()),_0x6f8ad2(_0x44961d=_0x5ca857(_0x9916cb,_0x5bc7f1),_0x5ea06f,_0x39bb8d)[_0x47e597(0x1f6)](_0x44961d)),_0x5ca857(_0x9916cb,_0x5bc7f1);}['showContentCard'](_0x1d3b5f){const _0x35a661=_0x296cec;let _0x701e51=JSON[_0x35a661(0x216)](localStorage[_0x35a661(0x32f)](_0x35a661(0x287))||'{}');if(_0x701e51&&_0x701e51[_0x1d3b5f==null?void 0x0:_0x1d3b5f[_0x35a661(0x271)]]){_0x55e808(0x1,_0x35a661(0x18b));return;}_0x6f8ad2(this,_0x5ea06f,_0x183a39)[_0x35a661(0x1f6)](this,_0x1d3b5f),_0x5ca857(this,_0x335e3b)[_0x35a661(0x1f6)](this),_0x6f8ad2(this,_0x5ea06f,_0x35ff60)['call'](this,_0x1d3b5f[_0x35a661(0x271)]);}[_0x296cec(0x2ec)](_0x2dafee){const _0x32dea1=_0x296cec;return _0x2dafee===_0x32dea1(0x1f5);}};_0x5bc7f1=new WeakMap(),_0x5ea06f=new WeakSet(),_0x39bb8d=function(){return _0x26cf2f(this,null,function*(){});},_0x35ff60=function(_0x428aa0){const _0x5bd21f=_0x296cec;let _0x5be96f=_0x6f8ad2(this,_0x5ea06f,_0x23fced)['call'](this);if(document[_0x5bd21f(0x226)](_0x5bd21f(0x36b)+_0x428aa0)){_0x55e808(0x1,_0x5bd21f(0x236)),_0x5ca857(this,_0x2066b6)[_0x5bd21f(0x1f6)](this,_0x428aa0);return;}if(_0x5be96f!=null&&_0x5be96f[_0x428aa0])switch(_0x5be96f[_0x428aa0]['campaignEntryTime']){case _0x5bd21f(0x171):{_0x6f8ad2(this,_0x5ea06f,_0x331dae)[_0x5bd21f(0x1f6)](this,_0x5be96f[_0x428aa0]);break;}case _0x5bd21f(0x19a):{_0x6f8ad2(this,_0x5ea06f,_0x4a255e)[_0x5bd21f(0x1f6)](this,_0x5be96f[_0x428aa0]);break;}case _0x5bd21f(0x360):{_0x6f8ad2(this,_0x5ea06f,_0x46f0af)[_0x5bd21f(0x1f6)](this,_0x5be96f[_0x428aa0]);break;}default:return;}},_0x23fced=function(){const _0x2dc537=_0x296cec;let _0x457a08=localStorage[_0x2dc537(0x32f)]('action');return _0x457a08?JSON[_0x2dc537(0x216)](_0x457a08):null;},_0x331dae=function(_0x4b4afb){const _0x327e0b=_0x296cec;_0x444c8c['showDelayedAction']({'clearActionMethod':_0x5ca857(this,_0x2066b6)['bind'](this),'data':_0x4b4afb,'displayMethod':_0x6f8ad2(this,_0x5ea06f,_0x4a255e)[_0x327e0b(0x1c4)](this),'idKey':'campaignId','timeValueKey':_0x327e0b(0x177)});},_0x2066b6=new WeakMap(),_0x4a255e=function(_0x5f262e){const _0x252b28=_0x296cec;var _0xdf49e;if(document['getElementById'](_0x252b28(0x36b)+_0x5f262e[_0x252b28(0x271)]))_0x55e808(0x1,_0x252b28(0x236));else{let _0x58e020=_0x6f8ad2(this,_0x5ea06f,_0x2aeaa4)['call'](this,_0x252b28(0x172),_0x5f262e),_0x3dda38=document['querySelector']('#'+_0x5f262e[_0x252b28(0x1e8)]['divId']);_0x3dda38&&(_0x3dda38['innerHTML']=_0x58e020['outerHTML'],_0x258c26[_0x252b28(0x32c)]({'campaignCustomerInstanceId':_0x5f262e['campaignCustomerInstanceId'],'campaignId':_0x5f262e[_0x252b28(0x271)],'eventName':_0x4ce0f0,'eventProperties':[{'eventProperty':_0x252b28(0x2a2),'value':JSON[_0x252b28(0x2dd)]({'campaignId':_0x5f262e[_0x252b28(0x271)]})}],'name':_0x252b28(0x25d)}),(_0xdf49e=document[_0x252b28(0x226)](_0x252b28(0x36b)+_0x5f262e['campaignId']))==null||_0xdf49e[_0x252b28(0x2ce)](_0x252b28(0x28a),()=>{const _0xd7028d=_0x252b28;_0x258c26[_0xd7028d(0x32c)]({'campaignCustomerInstanceId':_0x5f262e['campaignCustomerInstanceId'],'campaignId':_0x5f262e[_0xd7028d(0x271)],'eventName':_0x4ce0f0,'eventProperties':[{'eventProperty':_0xd7028d(0x1b3),'value':JSON[_0xd7028d(0x2dd)]({'campaignId':_0x5f262e[_0xd7028d(0x271)]})}],'name':_0xd7028d(0x28a)});}));}_0x5ca857(this,_0x2066b6)['call'](this,_0x5f262e[_0x252b28(0x271)]);},_0x2aeaa4=function(_0x4fc8ef,_0x477c28){const _0x34495e=_0x296cec;var _0x4bcdf4;let {campaignId:_0x7ed0c4,message:{design:_0x1697fa}}=_0x477c28,_0x4e3b66=document[_0x34495e(0x227)](_0x4fc8ef);return _0x4e3b66['id']=_0x34495e(0x36b)+_0x7ed0c4,_0x4e3b66['innerHTML']=_0x1697fa,(_0x4bcdf4=_0x4e3b66[_0x34495e(0x1a2)](_0x34495e(0x181)))==null||_0x4bcdf4[_0x34495e(0x247)](),_0x4e3b66;},_0x46f0af=function(_0x2f7400){const _0x412158=_0x296cec;_0x444c8c[_0x412158(0x194)]({'data':_0x2f7400,'displayMethod':_0x6f8ad2(this,_0x5ea06f,_0x4a255e)['bind'](this),'timeValueKey':_0x412158(0x177)});},_0x183a39=function(_0x2fbe58){_0x444c8c['storeActionInLocalStorage'](_0x2fbe58,'action','campaignId');},_0x335e3b=new WeakMap(),_0x110e3a(_0x490cdb,_0x5bc7f1);var _0x5d90a9=_0x490cdb,_0x72a182=_0x5d90a9[_0x296cec(0x27c)](),_0x4a8252,_0x5b8a0a,_0x29a458,_0x153a19,_0x424507,_0x59e881,_0x25ce3b,_0x5b9182,_0x7b6785,_0xb9b7cc,_0x3f3826,_0x4a2480,_0x96700,_0x4e39eb,_0x515b71,_0x17f603,_0x11d964,_0x310531,_0x378272,_0xbdb9bc,_0x5548f9,_0x7fb8c1,_0x9b6190,_0xfcc113,_0x3d627e,_0xe00fe8,_0x1a4126,_0x176e8a,_0x5dc204=class _0x46ee20{constructor(){const _0x318a67=_0x296cec;_0x110e3a(this,_0x7b6785),_0x110e3a(this,_0x5b8a0a),_0x110e3a(this,_0x29a458),_0x110e3a(this,_0x153a19),_0x110e3a(this,_0x424507,null),_0x110e3a(this,_0x59e881,null),_0x110e3a(this,_0x25ce3b,!0x1),_0x110e3a(this,_0x5b9182,()=>{setInterval(()=>{_0x793e5e('listen\x20to\x20shopify\x20data',()=>_0x26cf2f(this,null,function*(){const _0x137634=_0x103a;let _0x313a56=localStorage[_0x137634(0x32f)](_0x137634(0x32b));if(_0x313a56!==_0x5ca857(this,_0x59e881)){_0x55e808(0x1,_0x137634(0x1a6)),_0xc1bc85(this,_0x59e881,_0x313a56);let _0x59f822=JSON[_0x137634(0x216)](_0x313a56||'{}');if(_0x59f822!=null&&_0x59f822[_0x137634(0x351)]){_0x55e808(0x1,_0x137634(0x2fe));let _0x444fad=_0x59f822[_0x137634(0x351)];delete _0x59f822['pushMessageToSW'],localStorage['setItem']('mergn_shopify',JSON[_0x137634(0x2dd)](_0x59f822)),_0x56215b[_0x137634(0x351)](_0x444fad);}if(_0x59f822!=null&&_0x59f822[_0x137634(0x218)]){let _0x4a8a4a=_0x59f822[_0x137634(0x218)];delete _0x59f822['optIn'],localStorage[_0x137634(0x184)](_0x137634(0x32b),JSON[_0x137634(0x2dd)](_0x59f822)),_0x56215b[_0x137634(0x17e)](_0x4a8a4a);}if(_0x59f822!=null&&_0x59f822[_0x137634(0x347)]){let _0x4c9c75=_0x59f822[_0x137634(0x347)];delete _0x59f822[_0x137634(0x347)],localStorage[_0x137634(0x184)](_0x137634(0x32b),JSON[_0x137634(0x2dd)](_0x59f822)),_0x4c9c75[_0x137634(0x265)](_0x292f93=>{const _0x35c7fe=_0x137634;_0x571a85[_0x35c7fe(0x1aa)](_0x292f93[_0x35c7fe(0x1e8)][_0x35c7fe(0x26a)])?_0x571a85[_0x35c7fe(0x1ad)](_0x292f93):_0x72a182[_0x35c7fe(0x2ec)](_0x292f93['message'][_0x35c7fe(0x26a)])&&_0x72a182['showContentCard'](_0x292f93);});}}}));},0x3e8);}),this['storeActionInLocalStorageInternal']=_0x1da1da=>{const _0x500a38=_0x103a;let _0x19ca9b=()=>{const _0x1040cb=_0x103a;let _0xc35fdb=JSON['parse'](localStorage[_0x1040cb(0x32f)](_0x1da1da)||'{}');Object[_0x1040cb(0x35d)](_0xc35fdb)['forEach'](_0x338df4=>{_0xc35fdb[_0x338df4]['initialTime']=new Date()['getTime']();}),localStorage[_0x1040cb(0x184)](_0x1da1da,JSON['stringify'](_0xc35fdb));};_0x19ca9b(),window[_0x500a38(0x2ce)]('beforeunload',_0x19ca9b);},this[_0x318a67(0x28f)]=({id:_0x214d25,localStorageKey:_0x1e49d0})=>{const _0x46f7c2=_0x318a67;let _0x2aefa3=JSON[_0x46f7c2(0x216)](localStorage[_0x46f7c2(0x32f)](_0x1e49d0)||'{}');_0x2aefa3[_0x214d25]&&delete _0x2aefa3[_0x214d25],localStorage[_0x46f7c2(0x184)](_0x1e49d0,JSON[_0x46f7c2(0x2dd)](_0x2aefa3));},this[_0x318a67(0x1fe)]=({actionCondition:_0x2dc36b,actionMethod:_0x2b758c,localStorageKey:_0x19662e})=>{const _0x173fc8=_0x318a67;let _0x1d85fc=JSON[_0x173fc8(0x216)](localStorage['getItem'](_0x19662e)||'{}');Object[_0x173fc8(0x35d)](_0x1d85fc)[_0x173fc8(0x265)](_0x107504=>{_0x2dc36b(_0x1d85fc[_0x107504])&&_0x2b758c(_0x1d85fc[_0x107504]);});};}static[_0x296cec(0x27c)](){return _0x5ca857(_0x46ee20,_0x4a8252)||_0xc1bc85(_0x46ee20,_0x4a8252,new _0x46ee20()),_0x5ca857(_0x46ee20,_0x4a8252);}[_0x296cec(0x1b4)](_0x3d8e5a,_0x1a728f){return _0x26cf2f(this,null,function*(){const _0x25e947=_0x103a;_0x55e808(0x1,_0x25e947(0x331));let _0x53cf60=_0x6f8ad2(this,_0x7b6785,_0x96700)['call'](this);_0x1a728f!=null&&_0x1a728f[_0x25e947(0x207)]&&_0xc1bc85(this,_0x25ce3b,!0x0),_0x6f8ad2(this,_0x7b6785,_0xb9b7cc)[_0x25e947(0x1f6)](this,_0x3d8e5a);let _0x494913=this[_0x25e947(0x241)]();if(_0x494913==='Crawlers'||_0x494913===_0x25e947(0x2af)){_0x55e808(0x2,_0x25e947(0x231));return;}if(yield _0x16192f[_0x25e947(0x1a8)](),_0x55e808(0x1,'Verifying\x20API\x20Key'),yield _0x6f8ad2(this,_0x7b6785,_0x3d627e)[_0x25e947(0x1f6)](this,0x3),_0x1a728f!=null&&_0x1a728f[_0x25e947(0x207)]&&_0x5ca857(this,_0x5b9182)[_0x25e947(0x1f6)](this),_0x1a728f!=null&&_0x1a728f[_0x25e947(0x2ee)])try{_0x161ed4['loading']=!0x0,yield this[_0x25e947(0x170)](_0x1a728f[_0x25e947(0x2ee)]);}finally{_0x161ed4['loading']=!0x1;}yield this[_0x25e947(0x238)](),yield _0x258c26[_0x25e947(0x1b9)](),yield _0x1ff1e2['recordAttributeFromQueue'](),_0x258c26[_0x25e947(0x342)]({'eventName':'base_init'}),_0x55e808(0x1,'Initializing\x20notification\x20service\x20from\x20Base\x20Service'),yield _0x793e5e(_0x25e947(0x292),()=>_0x26cf2f(this,null,function*(){const _0x41be8d=_0x25e947;yield _0x56215b[_0x41be8d(0x1b4)](_0x53cf60,_0x1a728f==null?void 0x0:_0x1a728f[_0x41be8d(0x211)]);})),yield _0x6f8ad2(this,_0x7b6785,_0x176e8a)[_0x25e947(0x1f6)](this,_0x1a728f==null?void 0x0:_0x1a728f['shopify']);let _0x2e37e9=history[_0x25e947(0x21d)];history['pushState']=(..._0x26fe13)=>{const _0x2e65b=_0x25e947;_0x2e37e9[_0x2e65b(0x19e)](history,_0x26fe13),_0x6f8ad2(this,_0x7b6785,_0x1a4126)[_0x2e65b(0x1f6)](this,_0x1a728f==null?void 0x0:_0x1a728f[_0x2e65b(0x207)]);},_0x55e808(0x1,_0x25e947(0x36e));});}[_0x296cec(0x27f)](_0x58afaf){_0xc1bc85(this,_0x5b8a0a,_0x58afaf);}[_0x296cec(0x291)](_0x3e6981){_0xc1bc85(this,_0x29a458,_0x3e6981);}['setOperatingSystem'](_0x55bbb){_0xc1bc85(this,_0x153a19,_0x55bbb);}[_0x296cec(0x2c4)](_0x2f1824){_0xc1bc85(this,_0x424507,_0x2f1824);}[_0x296cec(0x1c9)](){return _0x5ca857(this,_0x424507);}[_0x296cec(0x241)](){return _0x5ca857(this,_0x5b8a0a);}[_0x296cec(0x34e)](){return _0x5ca857(this,_0x29a458);}[_0x296cec(0x2c6)](){return _0x5ca857(this,_0x153a19);}['updateSessionCreated'](){}[_0x296cec(0x194)]({data:_0xc097d,displayMethod:_0x219cde,timeValueKey:_0x385dfd}){const _0xaeb269=_0x296cec;let _0x1cc01a=()=>{const _0x10695c=_0x103a;var _0x3cdb14;let _0x514b56=window['innerHeight'],_0x1e16c5=document[_0x10695c(0x33b)][_0x10695c(0x35f)];window[_0x10695c(0x18c)]/(_0x1e16c5-_0x514b56)*0x64>(((_0x3cdb14=_0xc097d[_0x385dfd])==null?void 0x0:_0x3cdb14['value'])||0x0)&&(window[_0x10695c(0x2b5)](_0x10695c(0x349),_0x1cc01a),_0x219cde(_0xc097d));};window[_0xaeb269(0x2ce)](_0xaeb269(0x349),_0x1cc01a);}[_0x296cec(0x266)]({clearActionMethod:_0x320fc3,data:_0x179d8d,displayMethod:_0x3d0156,idKey:_0x38e6a6,timeValueKey:_0x34b12d}){const _0x100191=_0x296cec;var _0x431639,_0x3d1de3,_0x146b8e;let _0x44f009=(_0x431639=_0x179d8d[_0x34b12d])==null?void 0x0:_0x431639[_0x100191(0x240)];((_0x3d1de3=_0x179d8d[_0x34b12d])==null?void 0x0:_0x3d1de3[_0x100191(0x2a1)])===_0x100191(0x1b8)&&(_0x44f009=_0x44f009*0x3c);let _0x58fde6=_0x179d8d[_0x100191(0x34f)]-0x1f4+(_0x44f009||0x0)*0x3e8-new Date()['getTime']();_0x55e808(0x1,_0x100191(0x2e2)+_0x179d8d[_0x100191(0x34f)]),_0x55e808(0x1,_0x100191(0x29d)+((_0x146b8e=_0x179d8d[_0x34b12d])==null?void 0x0:_0x146b8e['value'])),_0x55e808(0x1,'Current\x20time:\x20'+new Date()[_0x100191(0x1ef)]()),_0x55e808(0x1,_0x100191(0x2bf)+_0x58fde6),_0x58fde6>0x0?setTimeout(()=>{_0x320fc3(_0x179d8d[_0x38e6a6]),_0x3d0156(_0x179d8d);},_0x58fde6):(_0x320fc3(_0x179d8d[_0x38e6a6]),_0x3d0156(_0x179d8d));}['storeActionInLocalStorage'](_0x4c4cf6,_0x453f87,_0x775af7){const _0x4dbc74=_0x296cec;var _0x2fedbc;let _0x3cf381=JSON['parse'](localStorage[_0x4dbc74(0x32f)](_0x453f87)||'{}'),_0x4a7edd=(_0x2fedbc=_0x775af7 in _0x4c4cf6&&_0x4c4cf6[_0x775af7])!=null?_0x2fedbc:'';_0x4a7edd&&(_0x3cf381[_0x4a7edd]=_0x40ff3b(_0x503010({},_0x4c4cf6),{'initialTime':new Date()[_0x4dbc74(0x1ef)]()}),localStorage[_0x4dbc74(0x184)](_0x453f87,JSON[_0x4dbc74(0x2dd)](_0x3cf381)));}['checkTTL'](){return _0x26cf2f(this,null,function*(){const _0x11b1e4=_0x103a;yield _0x793e5e(_0x11b1e4(0x1b7),()=>_0x26cf2f(this,null,function*(){const _0x33c6ef=_0x11b1e4;if(_0x5ca857(this,_0x25ce3b))return;_0x55e808(0x1,_0x33c6ef(0x255)),_0xf1c899(_0x33c6ef(0x255),!0x0),_0x2fd0ea(_0x33c6ef(0x2ef),!0x0);let _0x5d3608=localStorage[_0x33c6ef(0x32f)](_0x33c6ef(0x2c2)),_0x4941bd=!0x1;if(_0x4941bd=_0x6f8ad2(this,_0x7b6785,_0x96700)[_0x33c6ef(0x1f6)](this,_0x5d3608),_0x4941bd){let _0x547bc9=localStorage[_0x33c6ef(0x32f)](_0x33c6ef(0x1ae)),_0xe8766=localStorage['getItem'](_0x33c6ef(0x2c2));if(_0x547bc9&&_0xe8766){let _0x2deb1e=parseInt(_0xe8766,0xa);yield _0x258c26[_0x33c6ef(0x32c)]({'eventName':'Web\x20Session\x20Concluded','eventProperties':[{'eventProperty':'SESSION_ID','value':localStorage[_0x33c6ef(0x32f)](_0x33c6ef(0x1ae))},{'eventProperty':_0x33c6ef(0x252),'value':Number[_0x33c6ef(0x2c3)](_0x2deb1e)?new Date(_0x2deb1e)[_0x33c6ef(0x176)]():new Date()[_0x33c6ef(0x176)]()}]});}localStorage['removeItem'](_0x33c6ef(0x2c2)),localStorage['removeItem'](_0x33c6ef(0x1ae)),localStorage['setItem'](_0x33c6ef(0x2c2),''+new Date()[_0x33c6ef(0x1ef)]()),yield _0x6f8ad2(this,_0x7b6785,_0x5548f9)[_0x33c6ef(0x1f6)](this),this[_0x33c6ef(0x293)]();}(!_0x5d3608||_0x4941bd||_0x6f8ad2(this,_0x7b6785,_0x378272)[_0x33c6ef(0x1f6)](this))&&(_0x6f8ad2(this,_0x7b6785,_0x11d964)[_0x33c6ef(0x1f6)](this)&&_0x6f8ad2(this,_0x7b6785,_0xbdb9bc)['call'](this),_0x6f8ad2(this,_0x7b6785,_0x17f603)[_0x33c6ef(0x1f6)](this)&&(yield this['setIdentity']()),(_0x6f8ad2(this,_0x7b6785,_0x96700)['call'](this)||_0x6f8ad2(this,_0x7b6785,_0x4e39eb)['call'](this))&&(yield _0x6f8ad2(this,_0x7b6785,_0x9b6190)[_0x33c6ef(0x1f6)](this)),yield _0x6f8ad2(this,_0x7b6785,_0x5548f9)[_0x33c6ef(0x1f6)](this),(_0x6f8ad2(this,_0x7b6785,_0x96700)[_0x33c6ef(0x1f6)](this)||_0x6f8ad2(this,_0x7b6785,_0x515b71)[_0x33c6ef(0x1f6)](this))&&(yield _0x6f8ad2(this,_0x7b6785,_0xfcc113)[_0x33c6ef(0x1f6)](this))),_0x2fd0ea(_0x33c6ef(0x2ef),!0x1),_0xf1c899(_0x33c6ef(0x255),!0x1);}));});}['clearLocalStorage'](){const _0x4fc82a=_0x296cec;localStorage['removeItem'](_0x4fc82a(0x287)),localStorage['removeItem'](_0x4fc82a(0x2a0)),localStorage[_0x4fc82a(0x2c8)](_0x4fc82a(0x1be)),localStorage[_0x4fc82a(0x2c8)]('offlineEvents');}[_0x296cec(0x33f)](_0x169e73){const _0x41b147=_0x296cec;let _0x3815b0=this[_0x41b147(0x259)](_0x41b147(0x248));if(_0x3815b0&&_0x3815b0!==_0x41b147(0x1f4)){let _0x4cff85=this[_0x41b147(0x299)](_0x3815b0);return _0x169e73&&_0x169e73===_0x4cff85?!0x0:_0x4cff85;}return!0x1;}[_0x296cec(0x2aa)](_0x15ee3f){const _0x1160bc=_0x296cec;let _0x498bd1=this[_0x1160bc(0x249)](_0x15ee3f);this[_0x1160bc(0x2e5)]('mergn_identity',_0x498bd1,0x16d);}[_0x296cec(0x249)](_0xe56f15){const _0x562b90=_0x296cec;let _0x4dedcf=new TextEncoder()[_0x562b90(0x2fd)](_0xe56f15),_0x3104b8='';for(let _0x183655=0x0;_0x183655<_0x4dedcf[_0x562b90(0x270)];_0x183655++)_0x3104b8+=String['fromCharCode'](_0x4dedcf[_0x183655]);return btoa(_0x3104b8);}[_0x296cec(0x299)](_0x24d866){const _0x53e74f=_0x296cec;let _0x33eda2=atob(_0x24d866),_0x37b75f=new Uint8Array(_0x33eda2[_0x53e74f(0x270)]);for(let _0x2ea215=0x0;_0x2ea215<_0x33eda2[_0x53e74f(0x270)];_0x2ea215++)_0x37b75f[_0x2ea215]=_0x33eda2[_0x53e74f(0x33c)](_0x2ea215);return new TextDecoder()[_0x53e74f(0x2cb)](_0x37b75f);}['getCookie'](_0x26ddbf){const _0x102344=_0x296cec;var _0x1d3f09;let _0x49ade1=(';\x20'+document[_0x102344(0x282)])[_0x102344(0x233)](';\x20'+_0x26ddbf+'=');return _0x49ade1[_0x102344(0x270)]===0x2&&((_0x1d3f09=_0x49ade1[_0x102344(0x2e3)]())==null?void 0x0:_0x1d3f09[_0x102344(0x233)](';')['shift']())||null;}['setCookie'](_0x23b40a,_0x2104c3,_0x22f3cb){const _0x1b42f5=_0x296cec;let _0xd14d5a=new Date();_0xd14d5a[_0x1b42f5(0x28b)](_0xd14d5a[_0x1b42f5(0x1ef)]()+_0x22f3cb*0x18*0x3c*0x3c*0x3e8);let _0x8ffe9a=_0x1b42f5(0x1f2)+_0xd14d5a['toUTCString']();document[_0x1b42f5(0x282)]=_0x23b40a+'='+_0x2104c3+';\x20'+_0x8ffe9a+';\x20path=/;\x20secure;\x20SameSite=Strict';}[_0x296cec(0x170)](_0x3a1cdc){return _0x26cf2f(this,null,function*(){const _0x144062=_0x103a;_0x55e808(0x1,_0x144062(0x1c8)),_0x55e808(0x1,_0x3a1cdc);let _0x3df3e7=this['checkIfIdentityExists'](_0x3a1cdc);if(_0x55e808(0x1,'local\x20identity:\x20'+_0x3df3e7),typeof _0x3df3e7==_0x144062(0x22c)&&_0x3df3e7)return;let _0x418693=localStorage['getItem'](_0x144062(0x192));(!_0x418693||_0x418693===_0x144062(0x1f4))&&(_0x418693=_0x6f8ad2(this,_0x7b6785,_0xbdb9bc)['call'](this));let _0x4d3d96={'deviceId':_0x418693,'os':this[_0x144062(0x241)]()};if(_0x3a1cdc)_0x4d3d96['identity']=_0x3a1cdc;else{if(typeof _0x3df3e7=='string')_0x4d3d96[_0x144062(0x2ee)]=_0x3df3e7;else{if(!_0x3a1cdc&&localStorage[_0x144062(0x32f)]('customer'))return;}}try{_0x55e808(0x1,_0x144062(0x1a5)),_0x55e808(0x1,_0x4d3d96);let _0x12abee=yield _0x6f8ad2(this,_0x7b6785,_0x7fb8c1)['call'](this,_0x4d3d96);if(_0x12abee!==void 0x0){localStorage[_0x144062(0x184)](_0x144062(0x17a),_0x12abee),this[_0x144062(0x2aa)](_0x4d3d96['identity']);try{_0x56215b['pushMessageToSW']({'customer':_0x12abee});}catch(_0x557e69){}}}catch(_0x36929b){throw new Error(_0x144062(0x2b8));}});}};_0x4a8252=new WeakMap(),_0x5b8a0a=new WeakMap(),_0x29a458=new WeakMap(),_0x153a19=new WeakMap(),_0x424507=new WeakMap(),_0x59e881=new WeakMap(),_0x25ce3b=new WeakMap(),_0x5b9182=new WeakMap(),_0x7b6785=new WeakSet(),_0xb9b7cc=function(_0x47613c){const _0x5e8367=_0x296cec;_0x16192f[_0x5e8367(0x285)](_0x47613c),this['setPlatform'](_0x6f8ad2(this,_0x7b6785,_0x3f3826)[_0x5e8367(0x1f6)](this)),this[_0x5e8367(0x291)](_0x6f8ad2(this,_0x7b6785,_0x4a2480)[_0x5e8367(0x1f6)](this)),this['setOperatingSystem'](navigator[_0x5e8367(0x1e1)]);},_0x3f3826=function(){const _0x1d5a6f=_0x296cec;var _0x290c0e;let _0x588846=navigator[_0x1d5a6f(0x1e1)][_0x1d5a6f(0x280)]();return/googlebot|bingbot|yandexbot|duckduckbot|slurp|twitterbot|linkedinbot|facebot|pinterest|vkshare|applebot|baiduspider|adsbot-google|msnbot|yahoobot|sogou|facebookexternalhit/i['test'](_0x588846)?_0x1d5a6f(0x188):/wv|wkwebview|instagram|facebook|fbav|fban|twitter|snapchat|pinterest|linkedin|tiktok/i[_0x1d5a6f(0x214)](_0x588846)?_0x1d5a6f(0x210):/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i['test'](_0x588846)?('Notification'in window&&typeof((_0x290c0e=window==null?void 0x0:window[_0x1d5a6f(0x2e6)])==null?void 0x0:_0x290c0e[_0x1d5a6f(0x203)])!=_0x1d5a6f(0x1f4),_0x1d5a6f(0x210)):/windows|macintosh|linux|x11/i[_0x1d5a6f(0x214)](_0x588846)?_0x1d5a6f(0x1a9):'Unknown';},_0x4a2480=function(){const _0x289f04=_0x296cec;let _0x183c23=navigator[_0x289f04(0x1e1)],_0xe96dd5;return _0x183c23[_0x289f04(0x28e)](_0x289f04(0x290))>-0x1?_0xe96dd5=_0x289f04(0x290):_0x183c23[_0x289f04(0x28e)](_0x289f04(0x175))>-0x1||_0x183c23[_0x289f04(0x28e)](_0x289f04(0x1d1))>-0x1||_0x183c23[_0x289f04(0x28e)](_0x289f04(0x268))>-0x1?_0xe96dd5='Facebook':_0x183c23[_0x289f04(0x28e)](_0x289f04(0x22e))>-0x1?_0xe96dd5=_0x289f04(0x22e):_0x183c23['indexOf'](_0x289f04(0x183))>-0x1?_0xe96dd5=_0x289f04(0x183):_0x183c23[_0x289f04(0x28e)](_0x289f04(0x21f))>-0x1?_0xe96dd5=_0x289f04(0x21f):_0x183c23['indexOf'](_0x289f04(0x2b2))>-0x1?_0xe96dd5=_0x289f04(0x2b2):_0x183c23['indexOf']('Chrome')>-0x1&&_0x183c23[_0x289f04(0x28e)](_0x289f04(0x258))===-0x1?_0xe96dd5='Google\x20Chrome':_0x183c23[_0x289f04(0x28e)](_0x289f04(0x31d))>-0x1&&_0x183c23[_0x289f04(0x28e)](_0x289f04(0x2a7))===-0x1?_0xe96dd5=_0x289f04(0x31d):_0x183c23[_0x289f04(0x28e)](_0x289f04(0x23c))>-0x1?_0xe96dd5=_0x289f04(0x18d):_0x183c23[_0x289f04(0x28e)](_0x289f04(0x258))>-0x1?_0xe96dd5=_0x289f04(0x33d):_0x183c23[_0x289f04(0x28e)]('MSIE')>-0x1||_0x183c23[_0x289f04(0x28e)](_0x289f04(0x1e4))>-0x1?_0xe96dd5=_0x289f04(0x30a):_0x183c23[_0x289f04(0x28e)]('Opera')>-0x1||_0x183c23['indexOf']('OPR')>-0x1?_0xe96dd5=_0x289f04(0x370):_0x183c23['indexOf'](_0x289f04(0x333))>-0x1?_0xe96dd5=_0x289f04(0x333):_0x183c23[_0x289f04(0x28e)](_0x289f04(0x352))>-0x1?_0xe96dd5=_0x289f04(0x352):_0x183c23['indexOf'](_0x289f04(0x302))>-0x1?_0xe96dd5=_0x289f04(0x201):_0x183c23['indexOf'](_0x289f04(0x190))>-0x1?_0xe96dd5=_0x289f04(0x260):_0x183c23['indexOf'](_0x289f04(0x2f9))>-0x1?_0xe96dd5='QQ\x20Browser':_0x183c23['indexOf'](_0x289f04(0x1ec))>-0x1?_0xe96dd5=_0x289f04(0x2cd):_0x183c23[_0x289f04(0x28e)](_0x289f04(0x251))>-0x1?_0xe96dd5='Sogou\x20Browser':_0xe96dd5=_0x289f04(0x2af),_0xe96dd5;},_0x96700=function(_0x3b1d92){const _0x35f2c8=_0x296cec;let _0x346e78;return _0x3b1d92||(_0x346e78=localStorage['getItem'](_0x35f2c8(0x2c2))),_0x3b1d92||_0x346e78?new Date()['getTime']()-parseInt(_0x3b1d92||_0x346e78||'',0xa)>0x124f80:!0x0;},_0x4e39eb=function(){const _0x435aea=_0x296cec;return!localStorage[_0x435aea(0x32f)](_0x435aea(0x2a0));},_0x515b71=function(){const _0x261d91=_0x296cec;return!localStorage[_0x261d91(0x32f)](_0x261d91(0x1be));},_0x17f603=function(){return!localStorage['getItem']('customer');},_0x11d964=function(){const _0x359ae4=_0x296cec;return!localStorage[_0x359ae4(0x32f)](_0x359ae4(0x192));},_0x310531=function(){const _0x314bb1=_0x296cec;return!localStorage[_0x314bb1(0x32f)](_0x314bb1(0x1ae));},_0x378272=function(){const _0x3a77a3=_0x296cec;return _0x6f8ad2(this,_0x7b6785,_0x4e39eb)['call'](this)||_0x6f8ad2(this,_0x7b6785,_0x515b71)['call'](this)||_0x6f8ad2(this,_0x7b6785,_0x17f603)[_0x3a77a3(0x1f6)](this)||_0x6f8ad2(this,_0x7b6785,_0x11d964)[_0x3a77a3(0x1f6)](this)||_0x6f8ad2(this,_0x7b6785,_0x310531)[_0x3a77a3(0x1f6)](this);},_0xbdb9bc=function(){const _0x438987=_0x296cec;let _0x52b86f=localStorage[_0x438987(0x32f)]('uniqueIdentity');return _0x52b86f||(_0x52b86f=crypto[_0x438987(0x361)](),localStorage['setItem'](_0x438987(0x192),_0x52b86f)),_0x52b86f;},_0x5548f9=function(){return _0x26cf2f(this,null,function*(){yield _0x793e5e('store\x20session',()=>_0x26cf2f(this,null,function*(){const _0x3c945b=_0x103a;let _0x5335e3=localStorage['getItem']('session');if(!_0x5335e3){_0x5335e3=crypto[_0x3c945b(0x361)](),localStorage[_0x3c945b(0x184)](_0x3c945b(0x1ae),_0x5335e3);let _0xa4789e=localStorage['getItem']('ttl'),_0x4cf897=_0xa4789e?parseInt(_0xa4789e,0xa):'';yield _0x258c26[_0x3c945b(0x32c)]({'eventName':_0x3c945b(0x1f3),'eventProperties':[{'eventProperty':_0x3c945b(0x35a),'value':localStorage[_0x3c945b(0x32f)]('session')},{'eventProperty':_0x3c945b(0x252),'value':_0x4cf897?new Date(_0x4cf897)[_0x3c945b(0x176)]():new Date()[_0x3c945b(0x176)]()}]});}}),_0xebfdf1=>{const _0x44bb7a=_0x103a;_0x16192f['getBrandId']()==='67'&&_0xebfdf1[_0x44bb7a(0x1e8)]!=='Failed\x20to\x20fetch'&&_0xebfdf1[_0x44bb7a(0x1e8)];});});},_0x7fb8c1=function(_0x24ef5f){return _0x26cf2f(this,null,function*(){const _0x5c80a5=_0x103a;try{return(yield _0x16192f[_0x5c80a5(0x2c5)](''+_0x385937+_0x3316a9,_0x24ef5f))[_0x5c80a5(0x2e8)];}catch(_0x41118e){throw new Error(_0x5c80a5(0x34d));}});},_0x9b6190=function(){return _0x26cf2f(this,null,function*(){const _0x5114cc=_0x103a;yield _0x258c26[_0x5114cc(0x2e7)]();});},_0xfcc113=function(){return _0x26cf2f(this,null,function*(){yield _0x1ff1e2['storeAttributeInLocalStorage']();});},_0x3d627e=function(_0x158e1c){return _0x26cf2f(this,null,function*(){const _0x2b48ce=_0x103a;yield _0x793e5e(_0x2b48ce(0x368),()=>_0x26cf2f(this,null,function*(){const _0x11e4b2=_0x2b48ce;var _0x362de0;try{let _0x2605cd=parseInt(localStorage[_0x11e4b2(0x32f)](_0x11e4b2(0x17f))||'0',0xa)||0x0;if(!_0x2605cd||_0x2605cd&&new Date()['getTime']()>_0x2605cd){let _0x4b4348=yield _0x16192f[_0x11e4b2(0x250)]('/brand');if(!(_0x4b4348!=null&&_0x4b4348['success']))throw new Error(JSON[_0x11e4b2(0x2dd)](_0x4b4348));localStorage[_0x11e4b2(0x184)](_0x11e4b2(0x17f),(new Date()[_0x11e4b2(0x1ef)]()+0x493e0)[_0x11e4b2(0x344)]());}_0x161ed4[_0x11e4b2(0x1a0)]=!0x1,_0x161ed4[_0x11e4b2(0x2d2)]=!0x0;}catch(_0x9a7d5a){if(_0x16192f[_0x11e4b2(0x2d3)]()==='67'&&!((_0x362de0=_0x9a7d5a==null?void 0x0:_0x9a7d5a[_0x11e4b2(0x1e8)])!=null&&_0x362de0[_0x11e4b2(0x225)](_0x11e4b2(0x250)))&&(_0x9a7d5a==null?void 0x0:_0x9a7d5a[_0x11e4b2(0x1e8)])!==_0x11e4b2(0x22d)&&_0x9a7d5a[_0x11e4b2(0x1e8)]!=='Failed\x20to\x20fetch'&&_0x9a7d5a[_0x11e4b2(0x1e8)],_0x158e1c&&_0x158e1c>=0x1){yield new Promise(_0x5cd89a=>setTimeout(_0x5cd89a,0x5dc)),yield _0x6f8ad2(this,_0x7b6785,_0x3d627e)[_0x11e4b2(0x1f6)](this,_0x158e1c-0x1);return;}throw _0x161ed4['disableSDK']=!0x0,new Error(_0x11e4b2(0x22d));}}));});},_0xe00fe8=function(_0x165a9e){return _0x26cf2f(this,null,function*(){const _0x23bf85=_0x103a;var _0xc2a274;_0x55e808(0x1,_0x23bf85(0x21e));let _0x5234ea=(_0xc2a274=window==null?void 0x0:window[_0x23bf85(0x1b0)])==null?void 0x0:_0xc2a274[_0x23bf85(0x19b)];if(this[_0x23bf85(0x2c4)](_0x5234ea),_0x165a9e){_0x5234ea[_0x23bf85(0x1cb)](_0x23bf85(0x25c))&&(yield _0x258c26[_0x23bf85(0x32c)]({'eventName':_0x23bf85(0x367)}));return;}_0x258c26[_0x23bf85(0x342)]({'eventName':'pre_vwp'});let _0x2b797e=[];new URLSearchParams(new URL(window[_0x23bf85(0x1b0)][_0x23bf85(0x19b)])[_0x23bf85(0x1cc)])[_0x23bf85(0x265)]((_0x3c0daf,_0x511c91)=>_0x26cf2f(this,null,function*(){const _0x1f3cd4=_0x23bf85;_0xc20675['has'](_0x511c91)&&_0x2b797e[_0x1f3cd4(0x283)]({'eventProperty':_0x511c91,'value':_0x3c0daf});})),yield _0x258c26[_0x23bf85(0x32c)]({'eventName':_0x23bf85(0x313),'eventProperties':[{'eventProperty':_0x23bf85(0x278),'value':window[_0x23bf85(0x1b0)]['pathname']},..._0x2b797e]});});},_0x1a4126=function(_0x157b93){return _0x26cf2f(this,null,function*(){const _0x562465=_0x103a;var _0x334498;_0x55e808(0x1,_0x562465(0x25a));let _0xd9b336=(_0x334498=window==null?void 0x0:window[_0x562465(0x1b0)])==null?void 0x0:_0x334498['href'];(this[_0x562465(0x1c9)]()===null||this[_0x562465(0x1c9)]()===void 0x0||_0xd9b336!==this['getPreviousUrl']())&&(yield _0x6f8ad2(this,_0x7b6785,_0xe00fe8)[_0x562465(0x1f6)](this,_0x157b93));});},_0x176e8a=function(_0x44b4db){return _0x26cf2f(this,null,function*(){const _0x448795=_0x103a;var _0x6cfd69,_0x2e7fbd;let _0x1bd76c=(_0x6cfd69=window==null?void 0x0:window[_0x448795(0x1b0)])==null?void 0x0:_0x6cfd69['href'];_0x258c26['recordDebugEvents']({'eventName':_0x448795(0x1a1),'eventProperties':[{'eventProperty':'message','value':(_0x1bd76c!==this[_0x448795(0x1c9)]())+':'+_0x1bd76c+':'+this[_0x448795(0x1c9)]()}]});try{yield _0x6f8ad2(this,_0x7b6785,_0xe00fe8)[_0x448795(0x1f6)](this,_0x44b4db);}catch(_0x3829f2){let _0x144fd1=_0x3829f2&&_0x3829f2[_0x448795(0x1e8)]?(_0x2e7fbd=_0x3829f2==null?void 0x0:_0x3829f2[_0x448795(0x1e8)])==null?void 0x0:_0x2e7fbd[_0x448795(0x295)](0x0,0x64):'undefined';yield _0x258c26[_0x448795(0x342)]({'eventName':'vwp_error','eventProperties':[{'eventProperty':_0x448795(0x1e8),'value':''+_0x144fd1}]});}});},_0x110e3a(_0x5dc204,_0x4a8252);var _0x11287b=_0x5dc204,_0x444c8c=_0x11287b['getInstance'](),_0x4fdf32,_0x13fdfe,_0x4bff7e,_0x54258d,_0x86332b,_0xdb824f,_0x4ded54,_0x2575fd,_0x24365c,_0x5af6fb,_0x489942,_0x330f08=class _0x30af88{constructor(){_0x110e3a(this,_0x4bff7e),_0x110e3a(this,_0x13fdfe,!0x1);}static[_0x296cec(0x27c)](){var _0x15cca1;return _0x5ca857(_0x30af88,_0x4fdf32)||(_0xc1bc85(_0x30af88,_0x4fdf32,new _0x30af88()),_0x6f8ad2(_0x15cca1=_0x5ca857(_0x30af88,_0x4fdf32),_0x4bff7e,_0x54258d)['call'](_0x15cca1)),_0x5ca857(_0x30af88,_0x4fdf32);}[_0x296cec(0x199)](){return _0x26cf2f(this,null,function*(){const _0x2022f7=_0x103a;yield _0x793e5e(_0x2022f7(0x34a),()=>_0x26cf2f(this,null,function*(){const _0x237528=_0x2022f7;let _0x22cd27=JSON[_0x237528(0x216)](localStorage[_0x237528(0x32f)](_0x237528(0x310))||'[]');if(Array[_0x237528(0x229)](_0x22cd27))for(let _0x4b4fb5 of _0x22cd27){if(_0x55e808(0x1,'Recording\x20pre-initialized\x20attributes'),_0x55e808(0x1,_0x4b4fb5),yield this[_0x237528(0x1dc)](_0x4b4fb5[_0x237528(0x1d3)],_0x4b4fb5[_0x237528(0x33e)])){_0x55e808(0x1,_0x237528(0x363)+_0x4b4fb5['attributeName']+_0x237528(0x197)+_0x4b4fb5[_0x237528(0x33e)]),_0x6f8ad2(this,_0x4bff7e,_0x4ded54)[_0x237528(0x1f6)](this,_0x4b4fb5[_0x237528(0x1d3)],_0x4b4fb5[_0x237528(0x33e)]);return;}yield _0x6f8ad2(this,_0x4bff7e,_0x2575fd)['call'](this,{'attributeName':_0x4b4fb5[_0x237528(0x1d3)],'attributeValue':_0x4b4fb5[_0x237528(0x33e)]});}}));});}[_0x296cec(0x2cf)](_0x4f2765,_0x19ed4c,_0x5bfd66){return _0x26cf2f(this,null,function*(){const _0x4522af=_0x103a;if(yield this['checkIfAttributeExists'](_0x4f2765,_0x19ed4c)){_0x55e808(0x1,_0x4522af(0x286)+_0x4f2765+'\x20already\x20exists\x20with\x20value\x20'+_0x19ed4c),_0x6f8ad2(this,_0x4bff7e,_0x4ded54)[_0x4522af(0x1f6)](this,_0x4f2765,_0x19ed4c);return;}_0x6f8ad2(this,_0x4bff7e,_0xdb824f)[_0x4522af(0x1f6)](this,_0x4f2765),_0x6f8ad2(this,_0x4bff7e,_0x86332b)[_0x4522af(0x1f6)](this,_0x4f2765,_0x19ed4c),_0x161ed4[_0x4522af(0x2d2)]&&!_0x161ed4[_0x4522af(0x2ca)]&&(yield _0x6f8ad2(this,_0x4bff7e,_0x2575fd)[_0x4522af(0x1f6)](this,{'attributeName':_0x4f2765,'attributeProperties':_0x5bfd66,'attributeValue':_0x19ed4c}));});}['storeAttributeInLocalStorage'](){return _0x26cf2f(this,null,function*(){const _0x4494eb=_0x103a;if(!localStorage['getItem']('attributes')&&!_0x5ca857(this,_0x13fdfe)){_0xc1bc85(this,_0x13fdfe,!0x0);try{let _0x223aed=(yield this['fetchAttributeData']())[_0x4494eb(0x2e8)];_0x223aed&&localStorage[_0x4494eb(0x184)](_0x4494eb(0x1be),JSON[_0x4494eb(0x2dd)](_0x223aed));}catch(_0x5e0e5f){throw new Error(_0x4494eb(0x2fc));}finally{_0xc1bc85(this,_0x13fdfe,!0x1);}}});}['fetchAttributeData'](){return _0x26cf2f(this,null,function*(){const _0x1d73de=_0x103a;try{return yield _0x16192f['get'](''+_0x83457f);}catch(_0x2bf0c1){throw new Error(_0x1d73de(0x23b));}});}[_0x296cec(0x354)](_0xb06759,_0x198b04){return _0x26cf2f(this,null,function*(){const _0x5664ed=_0x103a;let _0x4cacce=_0x444c8c[_0x5664ed(0x259)](_0x5664ed(0x26b)),_0xf104d5;if(!_0x4cacce)_0xf104d5={};else{let _0x410377=_0x444c8c[_0x5664ed(0x299)](_0x4cacce);_0xf104d5=JSON['parse'](_0x410377);}_0xf104d5[_0xb06759]=_0x198b04;let _0x25c2a9=_0x444c8c[_0x5664ed(0x249)](JSON[_0x5664ed(0x2dd)](_0xf104d5));_0x444c8c[_0x5664ed(0x2e5)](_0x5664ed(0x26b),_0x25c2a9,0x16d);});}[_0x296cec(0x1dc)](_0x3e7abc,_0x148f5c){return _0x26cf2f(this,null,function*(){const _0x235aa0=_0x103a;let _0x4f13d1=_0x444c8c[_0x235aa0(0x259)]('mergn_customer_attributes');if(!_0x4f13d1)return!0x1;let _0x41c4ee=_0x444c8c[_0x235aa0(0x299)](_0x4f13d1),_0x4a8919=JSON[_0x235aa0(0x216)](_0x41c4ee);return Object[_0x235aa0(0x2bd)][_0x235aa0(0x2d9)][_0x235aa0(0x1f6)](_0x4a8919,_0x3e7abc)?_0x148f5c!==void 0x0?_0x4a8919[_0x3e7abc]===_0x148f5c:!0x0:!0x1;});}};_0x4fdf32=new WeakMap(),_0x13fdfe=new WeakMap(),_0x4bff7e=new WeakSet(),_0x54258d=function(){return _0x26cf2f(this,null,function*(){});},_0x86332b=function(_0x256dc3,_0x1696f8){const _0x1b2615=_0x296cec;let _0x26c5e3=JSON[_0x1b2615(0x216)](localStorage['getItem']('preInitializedAttributes')||'[]');_0x26c5e3[_0x1b2615(0x283)]({'attributeName':_0x256dc3,'attributeValue':_0x1696f8}),localStorage['setItem']('preInitializedAttributes',JSON[_0x1b2615(0x2dd)](_0x26c5e3));},_0xdb824f=function(_0xd9be16){return _0x26cf2f(this,null,function*(){const _0xcf752b=_0x103a;let _0x173cae=JSON[_0xcf752b(0x216)](localStorage[_0xcf752b(0x32f)](_0xcf752b(0x310))||'[]');for(let _0x75c9ac of _0x173cae)_0x75c9ac[_0xcf752b(0x1d3)]===_0xd9be16&&(_0x173cae[_0xcf752b(0x306)](_0x173cae['indexOf'](_0x75c9ac),0x1),localStorage['setItem'](_0xcf752b(0x310),JSON[_0xcf752b(0x2dd)](_0x173cae)));});},_0x4ded54=function(_0x2e421b,_0x2645fe){return _0x26cf2f(this,null,function*(){const _0x3b0356=_0x103a;let _0x249526=JSON[_0x3b0356(0x216)](localStorage[_0x3b0356(0x32f)](_0x3b0356(0x310))||'[]');for(let _0x4821cb of _0x249526)JSON[_0x3b0356(0x2dd)](_0x4821cb)===JSON[_0x3b0356(0x2dd)]({'attributeName':_0x2e421b,'attributeValue':_0x2645fe})&&(_0x249526[_0x3b0356(0x306)](_0x249526[_0x3b0356(0x28e)](_0x4821cb),0x1),localStorage[_0x3b0356(0x184)](_0x3b0356(0x310),JSON[_0x3b0356(0x2dd)](_0x249526)));});},_0x2575fd=function(_0x4c2a28){return _0x26cf2f(this,arguments,function*({attributeName:_0x474705,attributeProperties:_0x2723df,attributeValue:_0x5bf4c5}){const _0x1414b3=_0x103a;yield _0x793e5e(_0x1414b3(0x369),()=>_0x26cf2f(this,null,function*(){const _0x5ae480=_0x1414b3;if(_0x55e808(0x1,_0x5ae480(0x1ff)),_0xf1c899(_0x5ae480(0x1ff),!0x0),_0x2fd0ea(_0x5ae480(0x2c0),!0x0),_0x55e808(0x1,_0x5ae480(0x366)),_0x55e808(0x1,_0x5ae480(0x2db)+_0x474705+'\x20|\x20Attribute\x20Value:\x20'+_0x5bf4c5),!_0x5bf4c5||_0x5bf4c5===''){_0x55e808(0x2,_0x5ae480(0x1df));return;}yield _0x444c8c[_0x5ae480(0x238)](),yield _0x6f8ad2(this,_0x4bff7e,_0x5af6fb)[_0x5ae480(0x1f6)](this);let _0x4f751c=JSON[_0x5ae480(0x216)](localStorage['getItem'](_0x5ae480(0x1be))||'{}'),_0x2eb8f6=_0x2723df?_0x6f8ad2(this,_0x4bff7e,_0x24365c)['call'](this,_0x4f751c,_0x474705,_0x2723df):_0x6f8ad2(this,_0x4bff7e,_0x24365c)[_0x5ae480(0x1f6)](this,_0x4f751c,_0x474705);if(typeof _0x2eb8f6==_0x5ae480(0x191)){_0x55e808(0x2,_0x2eb8f6);return;}_0x4f751c[_0x474705][_0x5ae480(0x243)]&&(yield _0x444c8c[_0x5ae480(0x170)](typeof _0x5bf4c5==_0x5ae480(0x191)?_0x5bf4c5:JSON['stringify'](_0x5bf4c5))),_0x444c8c[_0x5ae480(0x34c)]();let {id:_0x175609}=_0x4f751c[_0x474705],_0x37a019={'attributeId':_0x175609,'attributeProperties':_0x2eb8f6,'customerId':localStorage[_0x5ae480(0x32f)]('customer')||'','value':_0x5bf4c5};yield _0x6f8ad2(this,_0x4bff7e,_0x489942)['call'](this,_0x37a019,_0x474705,_0x5bf4c5),_0x6f8ad2(this,_0x4bff7e,_0x4ded54)[_0x5ae480(0x1f6)](this,_0x474705,_0x5bf4c5),_0x2fd0ea(_0x5ae480(0x2c0),!0x1),_0xf1c899('Recording\x20attribute',!0x1);}));});},_0x24365c=function(_0x1410d3,_0x584d94,_0x7c1c6d){const _0x9f4027=_0x296cec;if(!Object['prototype'][_0x9f4027(0x2d9)]['call'](_0x1410d3,_0x584d94))return _0x9f4027(0x286)+_0x584d94+_0x9f4027(0x284);if(!_0x7c1c6d)return[];let _0x51d39b=_0x1410d3[_0x584d94];if(!(_0x51d39b!=null&&_0x51d39b[_0x9f4027(0x298)]))return _0x9f4027(0x286)+_0x584d94+'\x20does\x20not\x20have\x20a\x20valid\x20attributeProperty.';let _0x299963=_0x7c1c6d[_0x9f4027(0x364)](({attributeProperty:_0x22c2bc})=>!Object[_0x9f4027(0x2bd)]['hasOwnProperty']['call'](_0x51d39b[_0x9f4027(0x298)],_0x22c2bc))[_0x9f4027(0x195)](({attributeProperty:_0x2e1133})=>_0x2e1133);return _0x299963[_0x9f4027(0x270)]>0x0?'Attribute\x20'+_0x584d94+_0x9f4027(0x257)+_0x299963[_0x9f4027(0x1f9)](',\x20')+'.':_0x7c1c6d[_0x9f4027(0x195)](({attributeProperty:_0x9f97bd,value:_0x1ae6e0})=>({'attributePropertyId':_0x51d39b[_0x9f4027(0x298)][_0x9f97bd]['id'],'value':_0x1ae6e0}));},_0x5af6fb=function(){return _0x26cf2f(this,null,function*(){const _0x216932=_0x103a;localStorage['getItem'](_0x216932(0x1be))||(yield this[_0x216932(0x208)]());});},_0x489942=function(_0x1024bd,_0x5ea1e5,_0x52b4fd){return _0x26cf2f(this,null,function*(){const _0x200aeb=_0x103a;try{let _0x4df5d7=yield _0x16192f[_0x200aeb(0x263)](''+_0x83457f+_0x32149c,_0x1024bd);return yield this[_0x200aeb(0x354)](_0x5ea1e5,_0x52b4fd),_0x4df5d7;}catch(_0x55e671){throw new Error('Error\x20posting\x20attribute\x20record');}});},_0x110e3a(_0x330f08,_0x4fdf32);var _0x378c80=_0x330f08,_0x1ff1e2=_0x378c80['getInstance'](),_0x448aaf,_0x2266f0=class _0x1589cc{constructor(){}static[_0x296cec(0x27c)](){return _0x5ca857(_0x1589cc,_0x448aaf)||_0xc1bc85(_0x1589cc,_0x448aaf,new _0x1589cc()),_0x5ca857(_0x1589cc,_0x448aaf);}[_0x296cec(0x1b4)](_0x4aa106,_0x28d61e){setTimeout(()=>{_0x793e5e('init',()=>_0x26cf2f(this,null,function*(){const _0x1d8e1d=_0x103a;yield _0x793e5e(_0x1d8e1d(0x1e0),()=>_0x26cf2f(this,null,function*(){const _0x28c5b1=_0x1d8e1d;_0x55e808(0x1,_0x28c5b1(0x19f));let _0x4301c4=localStorage['getItem'](_0x28c5b1(0x2ad));_0x4301c4&&(_0x161ed4['debugLevel']=parseInt(_0x4301c4,0xa));})),_0x55e808(0x1,_0x1d8e1d(0x22b)),yield _0x444c8c[_0x1d8e1d(0x1b4)](_0x4aa106,_0x28d61e),_0x258c26[_0x1d8e1d(0x342)]({'eventName':'mergn_init'}),_0x55e808(0x1,_0x1d8e1d(0x1db)),window[_0x1d8e1d(0x2ce)](_0x1d8e1d(0x21c),()=>_0x26cf2f(this,null,function*(){const _0x4db58a=_0x1d8e1d;_0x161ed4[_0x4db58a(0x17c)]=!0x1;let _0x2e8e57=JSON[_0x4db58a(0x216)](localStorage['getItem'](_0x4db58a(0x312))||'[]');Array['isArray'](_0x2e8e57)&&(yield _0x258c26[_0x4db58a(0x1f7)]({'customerId':localStorage[_0x4db58a(0x32f)](_0x4db58a(0x17a))||'','deviceId':localStorage['getItem']('uniqueIdentity')||'','events':_0x2e8e57}),localStorage[_0x4db58a(0x2c8)](_0x4db58a(0x312))),_0x444c8c[_0x4db58a(0x238)](),_0x444c8c[_0x4db58a(0x34c)]();})),window[_0x1d8e1d(0x2ce)](_0x1d8e1d(0x17c),()=>{_0x161ed4['offline']=!0x0;}),window[_0x1d8e1d(0x2ce)]('load',()=>{const _0x3ecef4=_0x1d8e1d;_0x571a85[_0x3ecef4(0x32d)](),_0x56215b[_0x3ecef4(0x2ff)]();});}));});}[_0x296cec(0x32e)](_0x491de8,_0xe62b28){const _0x5618d9=_0x296cec;let _0x4a3335=localStorage['getItem'](_0x5618d9(0x2ad));if(_0x4a3335){_0x161ed4[_0x5618d9(0x185)]=parseInt(_0x4a3335,0xa);return;}if(!(_0x491de8 in _0x5c88e2)){console[_0x5618d9(0x2ed)](_0x5618d9(0x19d));return;}_0x161ed4[_0x5618d9(0x2cc)]=_0xe62b28||{},_0x161ed4[_0x5618d9(0x185)]=_0x491de8;try{_0x56215b[_0x5618d9(0x351)]({'debugLevel':_0x491de8});}catch(_0x51f734){}}['recordAttribute'](_0x2367c5,_0x19cf67){return _0x26cf2f(this,null,function*(){const _0x4785f3=_0x103a;return _0x55e808(0x1,'attributeName'),_0x55e808(0x1,_0x2367c5),_0x55e808(0x1,_0x4785f3(0x33e)),_0x55e808(0x1,_0x19cf67),new Promise((_0x4d33bc,_0x4db130)=>{setTimeout(()=>_0x26cf2f(this,null,function*(){try{yield _0x793e5e('recordAttribute',()=>_0x26cf2f(this,null,function*(){const _0x434576=_0x103a;let _0x51f7a5;Array[_0x434576(0x229)](_0x19cf67)?_0x51f7a5=JSON['stringify'](_0x19cf67):typeof _0x19cf67=='number'?_0x51f7a5=''+_0x19cf67:_0x51f7a5=_0x19cf67,_0x55e808(0x1,'Recording\x20attribute'),_0x55e808(0x1,_0x434576(0x2db)+_0x2367c5+_0x434576(0x1ee)+_0x51f7a5),yield _0x1ff1e2[_0x434576(0x2cf)](_0x2367c5,_0x51f7a5);})),_0x4d33bc();}catch(_0x3f2165){_0x4db130(_0x3f2165);}}));});});}[_0x296cec(0x26d)](_0x22f598){return _0x26cf2f(this,null,function*(){return new Promise((_0x56c70b,_0x5579a5)=>{setTimeout(()=>_0x26cf2f(this,null,function*(){const _0x523a51=_0x103a;try{yield _0x793e5e('login',()=>_0x26cf2f(this,null,function*(){const _0x4df73f=_0x103a;_0x55e808(0x1,'Logging\x20in'),_0x55e808(0x1,_0x4df73f(0x245)+_0x22f598),_0x161ed4[_0x4df73f(0x2ca)]=!0x0,yield _0x444c8c[_0x4df73f(0x170)](_0x22f598);})),_0x56c70b();}catch(_0x515307){_0x5579a5(_0x515307);}finally{_0x161ed4[_0x523a51(0x2ca)]=!0x1,yield _0x258c26['recordEventsFromQueue'](),yield _0x1ff1e2['recordAttributeFromQueue']();}}));});});}[_0x296cec(0x350)](){setTimeout(()=>{const _0x24b8ed=_0x103a;_0x793e5e(_0x24b8ed(0x350),()=>_0x26cf2f(this,null,function*(){const _0x5eb4cf=_0x24b8ed;_0x55e808(0x1,_0x5eb4cf(0x178)),_0x444c8c[_0x5eb4cf(0x293)]();}));});}[_0x296cec(0x32c)](_0x99138c,_0x3ebe62){return _0x26cf2f(this,null,function*(){return new Promise((_0x232c49,_0x962e6e)=>{setTimeout(()=>_0x26cf2f(this,null,function*(){const _0x3d2969=_0x103a;try{yield _0x793e5e(_0x3d2969(0x1dd),()=>_0x26cf2f(this,null,function*(){const _0x5bf639=_0x3d2969;if(_0x55e808(0x1,_0x5bf639(0x20b)),_0x55e808(0x1,_0x5bf639(0x1ed)+{'eventName':_0x99138c,'eventProperties':_0x3ebe62}),!_0x99138c||typeof _0x99138c!=_0x5bf639(0x191)){_0x55e808(0x2,_0x5bf639(0x18f));return;}yield _0x258c26['recordEvent']({'eventName':_0x99138c,'eventProperties':_0x3ebe62});})),_0x232c49();}catch(_0x30b713){_0x962e6e(_0x30b713);}}));});});}['getVersion'](){return _0x3d113a;}};_0x448aaf=new WeakMap(),_0x110e3a(_0x2266f0,_0x448aaf);var _0x5d8a08=_0x2266f0,_0x3ae762=_0x5d8a08[_0x296cec(0x27c)]();typeof window!=_0x296cec(0x1f4)&&(window[_0x296cec(0x1c7)]=_0x3ae762);var _0x3d467b=_0x3ae762;})());function _0x4242(){const _0xa12994=['removeEventListener','Adding\x20to\x20pre-initialized\x20event:','button-1','Error\x20setting\x20identity','lastSyncTime','Event\x20','web_optin_instance_id','/set-attribute','prototype','.u-popup-container\x20img','Time\x20difference:\x20','Recording\x20attribute\x20Time','Service\x20Worker\x20ready','ttl','isInteger','setPreviousUrl','retryPost','getOperatingSystem','signal','removeItem','className','loading','decode','recordDebugEventsToggle','Baidu\x20Browser','addEventListener','recordAttribute','propertyIsEnumerable','Notification\x20service\x20is\x20not\x20initialized','isInitialized','getBrandId','unsubscribe','Failed\x20to\x20request\x20notification\x20permission','INFO','Service\x20Worker\x20registration','has','hasOwnProperty','zIndex','Attribute\x20Name:\x20','success','stringify','recordEventPreInitialized','findIndex','text_color','check_permission','Initial\x20time:\x20','pop','Mergn\x20not\x20initialized!','setCookie','Notification','storeEventsAndPropertiesInLocalStorage','data','height','Turned\x20Off\x20Notification\x20Reset\x20Permission','text','isContentCardAction','error','identity','Checking\x20TTL\x20Time','The\x20user\x20has\x20blocked\x20notifications.','Platform','/record-event','time','Form\x20Submit','body','notification_permission_error','submit','8SPStsD','QQBrowser','Failed\x20to\x20sync\x20real-world\x20time','default','Error\x20storing\x20attribute\x20data\x20in\x20local\x20storage','encode','Pushing\x20message\x20to\x20SW\x20from\x20Shopify\x20data','loadWebPushActionInLocalStorage','3880HQPxQT','Mergn\x20is\x20offline!','SamsungBrowser','API_URL','values','storeActionInLocalStorageInternal','splice','Service\x20Worker\x20and\x20Push\x20Manager\x20are\x20supported','utm_term','mergnWebPushPopup','Internet\x20Explorer','1959903ggubDk','getRegistrations','u_content_form_','Pushing\x20message\x20to\x20service\x20worker\x20for\x20initialization','\x0amax-width:\x20100%;\x0aheight:\x20auto;\x0a','preInitializedAttributes','storeActionInLocalStorage','offlineEvents','Viewed\x20Webpage','banner_design','User\x20denied\x20the\x20notification\x20permission.','\x20-\x20','resolve','banner_color','service_worker','30090XkUKzI','ERROR:\x20','style','Safari','entry_time_value','Customer\x20with\x20id\x20','getSubscription','top','backgroundColor','Closed\x20Web\x20Push\x20Subscription','Notification\x20permission:\x20','Viewed\x20Web\x20Push\x20Soft-ask','next','type','onLine','getStoredEvents','Failed\x20to\x20fetch','mergn_shopify','recordEvent','loadPopupEventActionInLocalStorage','setDebugLevel','getItem','width','Initializing\x20base\x20service','\x0awidth:\x2025%;\x0a','Vivaldi','padding','textContent','os-version','mergn-overlay','Popup\x20already\x20displayed','appendChild','ALL','documentElement','charCodeAt','Microsoft\x20Edge','attributeValue','checkIfIdentityExists',';\x0apadding:\x2015px;\x0aborder-radius:\x205px;\x0amax-width:\x20380px;\x0amax-height:\x20463px;\x0a','fixed','recordDebugEvents','mergn-column-75','toString','active','DEBUG','campaigns','UTM_SOURCE','scroll','#\x20recordAttributeFromQueue','info','updateSessionCreated','Error\x20posting\x20identity\x20data','getOSVersion','initialTime','logout','pushMessageToSW','Brave','INFO:\x20','storeAttribute','utm_content','Content\x20Card\x20Action','Accepted\x20Web\x20Push\x20Soft-ask','Form\x20submitted\x20values:','mergn-row','SESSION_ID','then','Service\x20Worker\x20registered','keys','entry_time','scrollHeight','SCROLL','randomUUID','button_1','Pre\x20Initialized\x20Attribute\x20','filter','parentElement','Attribute\x20Payload:','Thank\x20you\x20page','verify\x20API\x20key','#\x20recordAttribute','Reachability\x20Push\x20Web','contentCard_container_','Re\x20initializing\x20customer\x20Id','left','tracking\x20page\x20change\x20register','utm_medium','Opera','eventProperty','setIdentity','DELAY','div','close','button','Facebook','toISOString','campaignEntryTimeValue','Logging\x20out','1.0.183','customer','getAPIKey','offline','querySelectorAll','showNotification','verifyTTL','Pushing\x20message\x20to\x20service\x20worker','.u-close-button','notification_data','Snapchat','setItem','debugLevel','Failed\x20to\x20subscribe\x20the\x20user','color','Crawlers','hidden','Failed\x20to\x20push\x20message\x20to\x20service\x20worker:\x20','ContentCard\x20already\x20in\x20cache','scrollY','Mozilla\x20Firefox','NONE','Event\x20name\x20is\x20required\x20and\x20must\x20be\x20a\x20string','UCBrowser','string','uniqueIdentity','Recording\x20event\x20Time','showAfterScrollAction','map','6tzubsj','\x20already\x20exists\x20with\x20value\x20','brandId','recordAttributeFromQueue','IMMEDIATELY','href','Initializing\x20Notification\x20Service','Debug\x20level\x20must\x20be\x20according\x20to:\x0a\x20NONE:\x200,\x20INFO:\x201,\x20ERROR:\x202,\x20ALL:\x203','apply','Log\x20level\x20check','disableSDK','show_notification_error','querySelector','subscribeUserToPush\x20Customer\x20ID:\x20','Popup\x20overlay\x20element\x20found','Setting\x20identity\x20to:','Shopify\x20data\x20changed','Load\x20failed','syncRealWorldTime','Web','isPopupAction','\x0aMergnError:\x20','queue','showPopup','session','done','location','ERROR','application/json','Content\x20Card\x20Click','init','User\x20granted\x20the\x20notification\x20permission.','Button\x20Click','#\x20check\x20TTL','min','recordEventsFromQueue','GAD_SOURCE','Popup','optin_data','UTM_CAMPAIGN','attributes','title','requestPermission','apiKey','position','getCurrentUTCDate','bind','Already\x20Registered\x20To\x20Web\x20Push','read\x20from\x20private\x20field','mergn','identity\x20received:\x20','getPreviousUrl','Notification\x20already\x20in\x20cache','includes','search','UTM_TERM','Image','alt','form','FBAV','/mergn-sw.js','attributeName','serviceWorker','subscribed','[id^=\x22u_content_button_\x22]','already_registered','1683375hnrnFv','Mergn\x20SDK\x20is\x20disabled!','granted','Mergn\x20SDK\x20Initialized','checkIfAttributeExists','record\x20event','https://api.mergn.com/sdk-management/api','Attribute\x20value\x20is\x20required','log\x20level\x20check','userAgent','centered-image','/device/add-device-token','Trident','\x0adisplay:\x20flex;\x0ajustify-content:\x20space-between;\x0aalign-items:\x20center;\x0aflex-wrap:\x20nowrap;\x0awidth:\x20100%;\x0a','campaignCustomerInstanceId','UTC\x20Date\x20or\x20last\x20sync\x20time\x20is\x20not\x20set','message','PushManager','AbortError','mergn-column-25','Baidu','Event\x20Payload:\x0a\x20',',\x20Attribute\x20Value:\x20','getTime','innerHTML','catch','expires=','Web\x20Session\x20Started','undefined','content_card','call','postEventRecord','src','join','removeAttribute','subscribe','button_2','Popup\x20View','loadActionInLocalStorage','Recording\x20attribute','The\x20user\x20has\x20already\x20enabled\x20notifications.','Samsung\x20Internet','Service\x20Worker\x20registration\x20is\x20available','permission','\x20Time','Web\x20Session\x20Concluded','eventName','shopify','storeAttributeInLocalStorage','pushManager','Cannot\x20add\x20the\x20same\x20private\x20member\x20more\x20than\x20once','Recording\x20event','Allowed\x20Web\x20Push\x20Subscription','gclid','\x0abackground-color:\x20','Failed\x20to\x20check\x20notification\x20permission','Mobile','swPath','custom_form','\x0apadding:\x2012px\x2020px;\x0aborder:\x20none;\x0abackground-color:\x20\x20','test','entries','parse','MergnError','optIn','#\x20Recording\x20event','Error\x20posting\x20event\x20record','7346770kcMits','online','pushState','Performing\x20viewed\x20web\x20page\x20event','LinkedIn','setProperty','3010EJzxEu','/customer','gad_source','\x20does\x20not\x20have\x20a\x20valid\x20eventProperty.','startsWith','getElementById','createElement','postMessage','isArray','Close\x20Click','Initializing\x20Mergn\x20SDK','boolean','Error\x20verifying\x20API\x20key','Twitter','retryPromise','web_push_action','Not\x20initializing\x20base\x20service\x20for\x20crawlers\x20or\x20unknown\x20platforms','Existing\x20subscription\x20found','split','Checking\x20for\x20existing\x20subscription','Turned\x20Off\x20Notification','ContentCard\x20already\x20displayed','loadContentCardEventActionInLocalStorage','checkTTL','Cannot\x20','/brand/get-time','Error\x20fetching\x20attribute\x20data','Firefox','UTCDate','PUT','two_step','value','getPlatform','pushToQueue','should_set_identity','41cqtlrp','Identity:\x20','existing_subscription','remove','mergn_identity','encodeData','cssText','script','100%','\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','utm_campaign','overflow','get','Sogou','SESSION_CREATED','utm_source','push_manager','Checking\x20TTL','Filtering\x20Event\x20','\x20has\x20invalid\x20attributeProperties:\x20','Edg','getCookie','Tracking\x20page\x20change','Blocked\x20Web\x20Push\x20Subscription','thank_you','view','register','set','UC\x20Browser','fbclid','groupEnd','post','\x0amargin-bottom:\x205px;\x0afont-size:\x2016px;\x0acolor:\x20','forEach','showDelayedAction','GCLID','FBAN','reject','name','mergn_customer_attributes','subtitle','login','No\x20existing\x20subscription\x20found','popup_container_','length','campaignId','no_optin','pathname','/v2','OriginateFrom:\x20','ContentCard','viewed','URL','TypeError',';\x0acursor:\x20pointer;\x0aborder-radius:\x205px;\x0awidth:\x2048%;\x0a','defineProperty','getInstance','\x0amargin-bottom:\x205px;\x0afont-size:\x2013px;\x0acolor:\x20','important','setPlatform','toLowerCase','preInitializedEvents','cookie','push','\x20is\x20not\x20valid.','updateAPIKey','Attribute\x20','action','\x20invalid\x20eventProperties:\x20','name:\x20','click','setTime','User\x20is\x20subscribed','message:\x20','indexOf','clearActionInLocalStorage','Instagram','setOSVersion','notification\x20service','clearLocalStorage','json','substring','design','getAttribute','attributeProperty','decodeData','put','timeEnd','defineProperties','Time\x20value:\x20','campaignEntryTime','operating-system','events','duration','Content\x20Card\x20View','display','banner_image','14636996FUAvLq','2543373ZyqUav','Chrome','Mergn\x20is\x20loading!','fetchEventData','storeIdentity','banner_icon','POST','mergn_debug_level','Error\x20fetching\x20event\x20data','Unknown','auto','throw','TikTok','UTM_MEDIUM','Error\x20posting\x20event\x20record:'];_0x4242=function(){return _0xa12994;};return _0x4242();}
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,bi=Object.prototype.propertyIsEnumerable;var bt=l=>{throw TypeError(l)};var ft=(l,e,t)=>e in l?Ei(l,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):l[e]=t,z=(l,e)=>{for(var t in e||(e={}))fi.call(e,t)&&ft(l,t,e[t]);if(It)for(var t of It(e))bi.call(e,t)&&ft(l,t,e[t]);return l},Pe=(l,e)=>vi(l,Ii(e));var Be=(l,e,t)=>e.has(l)||bt("Cannot "+t);var d=(l,e,t)=>(Be(l,e,"read from private field"),t?t.call(l):e.get(l)),E=(l,e,t)=>e.has(l)?bt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(l):e.set(l,t),f=(l,e,t,i)=>(Be(l,e,"write to private field"),i?i.call(l,t):e.set(l,t),t),s=(l,e,t)=>(Be(l,e,"access private method"),t);var c=(l,e,t)=>new Promise((i,n)=>{var r=v=>{try{I(t.next(v))}catch(h){n(h)}},a=v=>{try{I(t.throw(v))}catch(h){n(h)}},I=v=>v.done?i(v.value):Promise.resolve(v.value).then(r,a);I((t=t.apply(l,e)).next())});var ht="1.0.185";var St="https://api.mergn.com/sdk-management/api",Me="/attribute",yt="/set-attribute",$e="/event",Tt="/record-event";var wt="/customer",Pt="/device/add-device-token",Ot="/set-identity",Nt="/brand/get-web-push-public-key",_t="/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=(l,e)=>{e instanceof g?o(2,`OriginateFrom: ${l}
3
+ MergnError: ${e.message}`):e instanceof Error?o(2,`OriginateFrom: ${l}
4
+ Unexpected error: ${e.message}`):o(2,`OriginateFrom: ${l}
5
+ Unexpected error: ${String(e)}`)},N=(l,e,t,i=!1)=>c(void 0,null,function*(){try{D(l,!0),C(`${l} Time`,!0);try{if(l!=="verify API key"){if(l!=="verify API key"&&g.disableSDK)throw new g("Mergn SDK is disabled!");if(l!=="record event"&&g.offline)throw new g("Mergn is offline!");if(l!=="init"&&l!=="verify API key"&&l!=="record event"&&l!=="recordAttribute"&&l!=="log level check"&&!g.isInitialized)throw new g("Mergn not initialized!");if(l!=="login"&&l!=="record event"&&l!=="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(l,n),null}finally{C(`${l} Time`,!1),D(l,!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||{}),o=(l,e)=>{g.debugLevel!==0&&(g.debugLevel>=3?l===1?console.info(`INFO: ${new Date().toISOString()}`,e):l===2&&console.error(`ERROR: ${new Date().toISOString()}`,e):g.debugLevel===1&&l===1?console.info(`INFO: ${new Date().toISOString()}`,e):g.debugLevel===2&&l===2&&console.error(`ERROR: ${new Date().toISOString()}`,e))},C=(l,e)=>{g.debugLevel!==0&&(e?console.time(l):console.timeEnd(l))},D=(l,e)=>{g.debugLevel!==0&&(e?console.group(l):console.groupEnd())};var ne,U,me,Oe,T=class T{constructor(){E(this,U)}retryPromise(e,t=3,i=1e3){return new Promise((n,r)=>{let a=I=>c(this,null,function*(){try{let v=yield e();n(v)}catch(v){I===0?r(v):setTimeout(()=>{a(I-1)},i)}});a(t)})}static getInstance(){return d(T,ne)||f(T,ne,new T),d(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=s(this,U,Oe).call(this,T.apiKey);try{let i=yield fetch(s(this,U,me).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=s(this,U,Oe).call(this,T.apiKey);try{return(yield fetch(s(this,U,me).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(s(this,U,me).call(this)+e,{body:JSON.stringify(t||{}),headers:{Authorization:s(this,U,Oe).call(this,T.apiKey),"Content-Type":"application/json"},method:"PUT"})).json()})}syncRealWorldTime(){return c(this,null,function*(){try{let e=(yield(yield fetch(s(this,U,me).call(this)+_t)).json()).data;T.UTCDate=new Date(e),T.lastSyncTime=new Date}catch(e){o(2,"Failed to sync real-world time")}})}getCurrentUTCDate(){if(!T.UTCDate||!T.lastSyncTime)return o(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)}retryPost(e,t,i){return c(this,null,function*(){return this.retryPromise(()=>this.post(e,t,i))})}};ne=new WeakMap,U=new WeakSet,me=function(){return T.API_URL},Oe=function(e){return btoa(`${e}:${new Date().getTime()}`)},E(T,ne),T.API_URL=St;var Ve=T,_=Ve.getInstance();var At=(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))(At||{});var Rt=new Set(Object.values(At));var re="Popup Action";var Ge="Content Card Action";var oe,W,se,Y,Ee,ve,b,Je,Ct,Ke,Ne,Dt,Re,_e,je,xt,Ae,Q,Ut,y=class y{constructor(){E(this,b);this.permission=null;this.pushMessageToSW=e=>{o(1,"Pushing message to service worker"),navigator.serviceWorker.getRegistrations().then(t=>{var i,n;o(1,"Service Worker registration"),(i=t[0])!=null&&i.active&&(o(1,"Service Worker ready"),(n=t[0].active)==null||n.postMessage(JSON.stringify(e)))}).catch(t=>{o(2,`Failed to push message to service worker: ${t.message}`)})};this.loadWebPushActionInLocalStorage=()=>{p.loadActionInLocalStorage({actionCondition:()=>!0,actionMethod:e=>s(this,b,_e).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 d(y,oe)||f(y,oe,new y),d(y,oe)}init(e,t){return c(this,null,function*(){var i;if(o(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){o(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")),o(1,"Service Worker registered"),o(1,"Pushing message to service worker for initialization"),this.pushMessageToSW({customer:localStorage.getItem("customer")||"",events:m.getStoredEvents(),API_KEY:_.getAPIKey(),device_id:localStorage.getItem("uniqueIdentity")||"",operatingSystem:p.getOperatingSystem(),osVersion:p.getOSVersion(),Platform:p.getPlatform()}),f(y,Ee,!0);let n=s(this,b,je).call(this),r=Object.keys(n||{});if(r.length&&s(this,b,_e).call(this,Number(r[0])),!e)return;let a=yield(i=d(y,W))==null?void 0:i.pushManager.getSubscription();o(1,"Checking for existing subscription"),d(y,W)&&(o(1,"Service Worker registration is available"),d(y,W).update()),a?(o(1,"Existing subscription found"),m.recordDebugEvents({eventName:"existing_subscription"}),yield s(this,b,Ne).call(this),f(y,se,!0)):(o(1,"No existing subscription found"),yield s(this,b,Je).call(this,d(y,ve)||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}`}]}),o(2,"Service Worker registration failed:"),o(2,r)}}})}showNotification(e){if(!d(y,Ee)){f(y,ve,e),m.recordDebugEvents({eventName:"notification_service_not_initialized"}),o(2,"Notification service is not initialized");return}N("showNotification",()=>c(this,null,function*(){var i;let t=JSON.parse(localStorage.getItem("web_push_action")||"{}");if(t){for(let n in t)if(((i=t[n])==null?void 0:i.type)===e.type){o(1,`Notification ${e.type} already in cache`);return}}s(this,b,Dt).call(this,e),d(this,Re).call(this),s(this,b,_e).call(this,e.web_optin_instance_id)}))}};oe=new WeakMap,W=new WeakMap,se=new WeakMap,Y=new WeakMap,Ee=new WeakMap,ve=new WeakMap,b=new WeakSet,Je=function(e){return c(this,null,function*(){o(1,`Checking notification permission: ${JSON.stringify(e)} `),m.recordDebugEvents({eventName:"check_permission"});let t;try{if(t=Notification.permission,t)if(o(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}`}]}),d(this,Q).call(this,e.web_optin_instance_id),e.type==="two_step"?s(this,b,Ct).call(this,e):yield s(this,b,Ke).call(this,e));else if(t==="denied")m.recordDebugEvents({eventName:"Turned Off Notification"}),o(1,"The user has blocked notifications."),e&&e.web_optin_instance_id&&d(this,Q).call(this,e.web_optin_instance_id);else{if(e&&e.web_optin_instance_id){d(this,Q).call(this,e.web_optin_instance_id);return}m.recordDebugEvents({eventName:"already_registered"}),o(1,"The user has already enabled notifications."),d(y,se)||(yield s(this,b,Ne).call(this),yield m.recordEvent({eventName:"Already Registered To Web Push"}),e||f(y,se,!0))}}catch(i){o(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"),a=document.createElement("div"),I=document.createElement("img"),v=document.createElement("div"),h=document.createElement("div"),S=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",a.className="mergn-column-25",v.className="mergn-column-75",j.className="button-container",h.id="title",S.id="subtitle",F.id="button-1",R.id="button-2",I.src=e.banner_design.banner_icon,I.alt="Image",I.id="logo",h.textContent=e.banner_design.banner_title,S.textContent=e.banner_design.banner_text,F.textContent=e.banner_design.button_1.text,R.textContent=e.banner_design.button_2.text,a.appendChild(I),v.appendChild(h),v.appendChild(S),r.appendChild(a),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
+ `,a.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
+ `,h.style.cssText=`
66
+ margin-bottom: 5px;
67
+ font-size: 16px;
68
+ color: ${e.banner_design.text_color}
69
+ `,S.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}),o(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 s(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"?(o(1,"User granted the notification permission."),yield s(this,b,Ne).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"}),o(1,"User denied the notification permission.")):t==="default"&&(yield m.recordEvent({eventName:"Closed Web Push Subscription"}),o(1,"User closed the notification permission dialog."))}catch(t){o(2,"Failed to request notification permission")}f(y,Y,!1)})},Ne=function(){return c(this,null,function*(){var t,i;let e=yield _.get(`${Nt}`);if(o(1,`Getting Web Key: ${e.success}`),e.success){let n=yield(t=d(y,W))==null?void 0:t.pushManager.getSubscription();o(1,`Existing Subscription: ${!!n}`),n&&(yield n.unsubscribe());let r=yield(i=d(y,W))==null?void 0:i.pushManager.subscribe({applicationServerKey:e.data||"",userVisibleOnly:!0}),a=localStorage.getItem("customer")||"";o(1,`subscribeUserToPush Customer ID: ${a}`),(!a||a==="undefined")&&(yield p.setIdentity()),yield _.put(`${Pt}`,{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))}}),o(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,_e=function(e){if(d(y,Y))return;f(y,Y,!0);let t=s(this,b,je).call(this);if(t!=null&&t[e])switch(t[e].entry_time){case"DELAY":{s(this,b,xt).call(this,t[e]);break}case"IMMEDIATELY":{s(this,b,Ae).call(this,t[e]);break}case"SCROLL":{s(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:d(this,Q).bind(this),data:e,displayMethod:s(this,b,Ae).bind(this),idKey:"web_optin_instance_id",timeValueKey:"entry_time_value"})},Ae=function(e){s(this,b,Je).call(this,e)},Q=new WeakMap,Ut=function(e){p.showAfterScrollAction({data:e,displayMethod:s(this,b,Ae).bind(this),timeValueKey:"entry_time_value"})},E(y,oe),E(y,W,null),E(y,se,!1),E(y,Y,!1),E(y,Ee,!1),E(y,ve,null);var He=y,k=He.getInstance();var q,w,kt,Ye,Ft,Wt,ce,Ce,Le,Ie,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 a=document.createElement("script");r.src?a.src=r.src:a.textContent=r.textContent,e.appendChild(a)})});E(this,Ie,({campaignCustomerInstanceId:e,campaignId:t,customForm:i,formDiv:n,popupContainer:r})=>{let a=(n==null?void 0:n.querySelector("form"))||i;a&&(a.querySelectorAll("input").forEach(I=>{I.style.setProperty("padding",I.style.padding,"important")}),a.addEventListener("submit",()=>c(this,null,function*(){r.remove();let I=new FormData(a),v={};o(1,"Form submitted values:");for(let[h,S]of I.entries())v[h]=S,o(1,`${h}: ${S}`),G.recordAttribute(h,S.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=>s(this,w,Ye).call(this,e.campaignId),localStorageKey:"action"})};E(this,De,()=>{p.storeActionInLocalStorageInternal("action")})}static getInstance(){var e;return d($,q)||(f($,q,new $),s(e=d($,q),w,kt).call(e)),d($,q)}showPopup(e){let t=JSON.parse(localStorage.getItem("action")||"{}");if(t&&t[e==null?void 0:e.campaignId]){o(1,"Popup already in cache");return}s(this,w,Vt).call(this,e),d(this,De).call(this),s(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=s(this,w,Ft).call(this);if(document.getElementById(`popup_container_${e}`)){o(1,"Popup already displayed"),d(this,ce).call(this,e);return}if(t!=null&&t[e])switch(t[e].campaignEntryTime){case"DELAY":{s(this,w,Wt).call(this,t[e]);break}case"IMMEDIATELY":{s(this,w,Le).call(this,t[e]);break}case"SCROLL":{s(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:d(this,ce).bind(this),data:e,displayMethod:s(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}`))o(1,"Popup already displayed");else{let t=s(this,w,Mt).call(this,"div",e);d(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"})}d(this,ce).call(this,e.campaignId)},Ie=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,a=document.createElement(e);a.id=`popup_container_${n}`,a.innerHTML=r,a.style.position="fixed",a.style.top="0",a.style.left="0",a.style.width="100%",a.style.height="100%",a.style.zIndex="99999999";let I=a.querySelector(".u-popup-container");I&&(I.style.zIndex="50");let v=I.querySelector(".u-popup-overlay");v&&(o(1,"Popup overlay element found"),v.style.setProperty("display","block","important")),a.querySelectorAll("form").forEach(S=>{let L=s(this,w,Bt).call(this,S,"u_content_form_");L?d(this,Ie).call(this,{campaignCustomerInstanceId:i,campaignId:n,formDiv:L,popupContainer:a}):d(this,Ie).call(this,{campaignCustomerInstanceId:i,campaignId:n,customForm:S,popupContainer:a})});let h=a.querySelector(".u-close-button");return(h==null?void 0:h.getAttribute("href"))==="#"&&h.removeAttribute("href"),h==null||h.addEventListener("click",()=>c(this,null,function*(){a.remove(),yield m.recordEvent({campaignCustomerInstanceId:i,campaignId:n,eventName:re,eventProperties:[{eventProperty:"Close Click",value:JSON.stringify({campaignId:n})}],name:"close"})})),a.querySelectorAll('[id^="u_content_button_"]').forEach(S=>{S.addEventListener("click",()=>c(this,null,function*(){a.remove(),yield m.recordEvent({campaignCustomerInstanceId:i,campaignId:n,eventName:re,eventProperties:[{eventProperty:"Button Click",value:JSON.stringify({buttonId:S.id,campaignId:n})}],name:"click"})}))}),a.querySelectorAll(".u-popup-container img").forEach(S=>{S.addEventListener("click",()=>c(this,null,function*(){var L;((L=S.parentElement)==null?void 0:L.tagName)==="A"&&S.parentElement.getAttribute("href")&&a.remove(),yield m.recordEvent({campaignCustomerInstanceId:i,campaignId:n,eventName:re,eventProperties:[{eventProperty:"Image Click",value:JSON.stringify({campaignId:n,imageClassName:S.className,imageId:S.id})}],name:"click"})}))}),a},$t=function(e){p.showAfterScrollAction({data:e,displayMethod:s(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,A,Gt,xe,Ht,Jt,Kt,jt,H=class H{constructor(){E(this,A);this.queue=Promise.resolve()}static getInstance(){var e;return d(H,Z)||(f(H,Z,new H),s(e=d(H,Z),A,Gt).call(e)),d(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 s(this,A,xe).call(this,e,t):this.pushToQueue(e)})}recordEventPreInitialized(e){return c(this,null,function*(){try{yield s(this,A,xe).call(this,e)}finally{s(this,A,jt).call(this,e.eventName)}})}recordDebugEvents(e){return c(this,null,function*(){g.debugLevel===4&&(!g.recordDebugEventsToggle||g.recordDebugEventsToggle[e.eventName])&&(yield s(this,A,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 _.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 a=yield _.post(`/v2${$e}${Tt}`,e,r.signal);if(a.success)return n=a,a;if(a.message===`Customer with id ${localStorage.getItem("customer")} not exists`)throw localStorage.removeItem("customer"),new Error("Re initializing customer Id")}catch(a){throw o(2,"Error posting event record:"),o(2,`name: ${a.name}`),o(2,`message: ${a.message}`),(a.name==="AbortError"||a.name==="TypeError"&&a.message==="Failed to fetch"||a.message==="Load failed")&&(o(2,"Request aborted"),t&&s(this,A,Kt).call(this,t)),i=new Error((a==null?void 0:a.message)||"Error posting event record"),a}return null})).catch(()=>{}),this.queue.then(()=>{if(i)throw i;return n})})}};Z=new WeakMap,A=new WeakSet,Gt=function(){return c(this,null,function*(){})},xe=function(e,t){return c(this,null,function*(){yield N("# record event",()=>c(this,null,function*(){var pt,mt,Et,vt;let{campaignCustomerInstanceId:i,campaignId:n,eventName:r,eventProperties:a,name:I,web_optin_instance_id:v}=e;o(1,"# Recording event"),D("Recording event",!0),C("Recording event Time",!0),o(1,"Event Payload"),o(1,{campaignCustomerInstanceId:i,eventName:r,eventProperties:a,name:I,web_optin_instance_id:v});let h=p.getPlatform();if(h==="Crawlers"||h==="Unknown")throw new Error("Invalid platform");r!=="Web Session Concluded"&&(yield p.checkTTL());let S=[];a&&S.push(...a),S.push({eventProperty:"Platform",value:h}),S.push({eventProperty:"operating-system",value:p.getOperatingSystem()}),S.push({eventProperty:"os-version",value:p.getOSVersion()});let L=this.getStoredEvents(),B=s(this,A,Ht).call(this,L,r,S);if(typeof B=="string"){o(2,B);return}p.updateSessionCreated();let{id:j}=L[r],F=s(this,A,Jt).call(this,z(Pe(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):le.isContentCardAction(M.message.name)&&le.showContentCard(M)}),C("Recording event Time",!1),D("Recording event",!1)}),i=>{_.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 o(2,`Event ${t} does not have a valid eventProperty.`),`Event ${t} does not have a valid eventProperty.`;let r=i.filter(({eventProperty:a})=>!Object.prototype.hasOwnProperty.call(n.eventProperty,a)).map(({eventProperty:a})=>a);return r.length>0&&(o(2,`Filtering Event ${t} invalid eventProperties: ${r.join(", ")}.`),i=i.filter(({eventProperty:a})=>!r.includes(a))),i.map(({eventProperty:a,value:I})=>({eventPropertyId:n.eventProperty[a].id,value:I}))},Jt=function(e){return{customerId:localStorage.getItem("customer")||"",deviceId:localStorage.getItem("uniqueIdentity")||"",events:[e]}},Kt=function(e){o(1,"Adding to pre-initialized event:"),o(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,O,zt,Ze,Yt,Qt,de,Ue,qt,Zt,Xt,ke,J=class J{constructor(){E(this,O);E(this,de,e=>{p.clearActionInLocalStorage({id:e,localStorageKey:"action"})});this.loadContentCardEventActionInLocalStorage=()=>{p.loadActionInLocalStorage({actionCondition:e=>e.message.name==="ContentCard",actionMethod:e=>s(this,O,Ze).call(this,e.campaignId),localStorageKey:"action"})};E(this,ke,()=>{p.storeActionInLocalStorageInternal("action")})}static getInstance(){var e;return d(J,X)||(f(J,X,new J),s(e=d(J,X),O,zt).call(e)),d(J,X)}showContentCard(e){let t=JSON.parse(localStorage.getItem("action")||"{}");if(t&&t[e==null?void 0:e.campaignId]){o(1,"ContentCard already in cache");return}s(this,O,Xt).call(this,e),d(this,ke).call(this),s(this,O,Ze).call(this,e.campaignId)}isContentCardAction(e){return e==="content_card"}};X=new WeakMap,O=new WeakSet,zt=function(){return c(this,null,function*(){})},Ze=function(e){let t=s(this,O,Yt).call(this);if(document.getElementById(`contentCard_container_${e}`)){o(1,"ContentCard already displayed"),d(this,de).call(this,e);return}if(t!=null&&t[e])switch(t[e].campaignEntryTime){case"DELAY":{s(this,O,Qt).call(this,t[e]);break}case"IMMEDIATELY":{s(this,O,Ue).call(this,t[e]);break}case"SCROLL":{s(this,O,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:d(this,de).bind(this),data:e,displayMethod:s(this,O,Ue).bind(this),idKey:"campaignId",timeValueKey:"campaignEntryTimeValue"})},de=new WeakMap,Ue=function(e){var t;if(document.getElementById(`contentCard_container_${e.campaignId}`))o(1,"ContentCard already displayed");else{let i=s(this,O,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"})}))}d(this,de).call(this,e.campaignId)},qt=function(e,t){var a;let{campaignId:i,message:{design:n}}=t,r=document.createElement(e);return r.id=`contentCard_container_${i}`,r.innerHTML=n,(a=r.querySelector(".u-close-button"))==null||a.remove(),r},Zt=function(e){p.showAfterScrollAction({data:e,displayMethod:s(this,O,Ue).bind(this),timeValueKey:"campaignEntryTimeValue"})},Xt=function(e){p.storeActionInLocalStorage(e,"action","campaignId")},ke=new WeakMap,E(J,X);var qe=J,le=qe.getInstance();var ue,be,he,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,be);E(this,he);E(this,Se);E(this,ye,null);E(this,Te,null);E(this,we,!1);E(this,Fe,()=>{setInterval(()=>{N("listen to shopify data",()=>c(this,null,function*(){let e=localStorage.getItem("mergn_shopify");if(e!==d(this,Te)){o(1,"Shopify data changed"),f(this,Te,e);let t=JSON.parse(e||"{}");if(t!=null&&t.pushMessageToSW){o(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):le.isContentCardAction(n.message.name)&&le.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 d(ee,ue)||f(ee,ue,new ee),d(ee,ue)}init(e,t){return c(this,null,function*(){o(1,"Initializing base service");let i=s(this,u,fe).call(this);t!=null&&t.shopify&&f(this,we,!0),s(this,u,ei).call(this,e);let n=this.getPlatform();if(n==="Crawlers"||n==="Unknown"){o(2,"Not initializing base service for crawlers or unknown platforms");return}if(yield _.syncRealWorldTime(),o(1,"Verifying API Key"),yield s(this,u,st).call(this,3),t!=null&&t.shopify&&d(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"}),o(1,"Initializing notification service from Base Service"),yield N("notification service",()=>c(this,null,function*(){yield k.init(i,t==null?void 0:t.swPath)})),yield s(this,u,li).call(this,t==null?void 0:t.shopify);let r=history.pushState;history.pushState=(...a)=>{r.apply(history,a),s(this,u,ci).call(this,t==null?void 0:t.shopify)},o(1,"tracking page change register")})}setPlatform(e){f(this,be,e)}setOSVersion(e){f(this,he,e)}setOperatingSystem(e){f(this,Se,e)}setPreviousUrl(e){f(this,ye,e)}getPreviousUrl(){return d(this,ye)}getPlatform(){return d(this,be)}getOSVersion(){return d(this,he)}getOperatingSystem(){return d(this,Se)}updateSessionCreated(){}showAfterScrollAction({data:e,displayMethod:t,timeValueKey:i}){let n=()=>{var h;let r=window.innerHeight,a=document.documentElement.scrollHeight;window.scrollY/(a-r)*100>(((h=e[i])==null?void 0:h.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,h,S;let a=(v=t[r])==null?void 0:v.value;((h=t[r])==null?void 0:h.duration)==="min"&&(a=a*60);let I=t.initialTime-500+(a||0)*1e3-new Date().getTime();o(1,`Initial time: ${t.initialTime}`),o(1,`Time value: ${(S=t[r])==null?void 0:S.value}`),o(1,`Current time: ${new Date().getTime()}`),o(1,`Time difference: ${I}`),I>0?setTimeout(()=>{e(t[n]),i(t)},I):(e(t[n]),i(t))}storeActionInLocalStorage(e,t,i){var a;let n=JSON.parse(localStorage.getItem(t)||"{}"),r=(a=i in e&&e[i])!=null?a:"";r&&(n[r]=Pe(z({},e),{initialTime:new Date().getTime()}),localStorage.setItem(t,JSON.stringify(n)))}checkTTL(){return c(this,null,function*(){yield N("# check TTL",()=>c(this,null,function*(){if(d(this,we))return;o(1,"Checking TTL"),D("Checking TTL",!0),C("Checking TTL Time",!0);let e=localStorage.getItem("ttl"),t=!1;if(t=s(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 s(this,u,ot).call(this),this.clearLocalStorage()}(!e||t||s(this,u,ri).call(this))&&(s(this,u,nt).call(this)&&s(this,u,rt).call(this),s(this,u,it).call(this)&&(yield this.setIdentity()),(s(this,u,fe).call(this)||s(this,u,et).call(this))&&(yield s(this,u,si).call(this)),yield s(this,u,ot).call(this),(s(this,u,fe).call(this)||s(this,u,tt).call(this))&&(yield s(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*(){o(1,"identity received: "),o(1,e);let t=this.checkIfIdentityExists(e);if(o(1,`local identity: ${t}`),typeof t=="boolean"&&t)return;let i=localStorage.getItem("uniqueIdentity");(!i||i==="undefined")&&(i=s(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{o(1,"Setting identity to:"),o(1,n);let r=yield s(this,u,oi).call(this,n);if(r!==void 0){localStorage.setItem("customer",r),this.storeIdentity(n.identity);try{k.pushMessageToSW({customer:r})}catch(a){}}}catch(r){throw new Error("Error setting identity")}})}};ue=new WeakMap,be=new WeakMap,he=new WeakMap,Se=new WeakMap,ye=new WeakMap,Te=new WeakMap,we=new WeakMap,Fe=new WeakMap,u=new WeakSet,ei=function(e){_.updateAPIKey(e),this.setPlatform(s(this,u,ti).call(this)),this.setOSVersion(s(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 s(this,u,et).call(this)||s(this,u,tt).call(this)||s(this,u,it).call(this)||s(this,u,nt).call(this)||s(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 N("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=>{_.getBrandId()==="67"&&e.message!=="Failed to fetch"&&e.message})})},oi=function(e){return c(this,null,function*(){try{return(yield _.retryPost(`${wt}${Ot}`,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 N("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 _.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(_.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 s(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;o(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,a)=>c(this,null,function*(){Rt.has(a)&&i.push({eventProperty:a,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;o(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 s(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 s(this,u,at).call(this,e)}catch(r){let a=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:`${a}`}]})}})},E(ee,ue);var Xe=ee,p=Xe.getInstance();var te,ge,P,di,ui,gi,We,lt,dt,pi,mi,K=class K{constructor(){E(this,P);E(this,ge,!1)}static getInstance(){var e;return d(K,te)||(f(K,te,new K),s(e=d(K,te),P,di).call(e)),d(K,te)}recordAttributeFromQueue(){return c(this,null,function*(){yield N("# recordAttributeFromQueue",()=>c(this,null,function*(){let e=JSON.parse(localStorage.getItem("preInitializedAttributes")||"[]");if(Array.isArray(e))for(let t of e){if(o(1,"Recording pre-initialized attributes"),o(1,t),yield this.checkIfAttributeExists(t.attributeName,t.attributeValue)){o(1,`Pre Initialized Attribute ${t.attributeName} already exists with value ${t.attributeValue}`),s(this,P,We).call(this,t.attributeName,t.attributeValue);return}yield s(this,P,lt).call(this,{attributeName:t.attributeName,attributeValue:t.attributeValue})}}))})}recordAttribute(e,t,i){return c(this,null,function*(){if(yield this.checkIfAttributeExists(e,t)){o(1,`Attribute ${e} already exists with value ${t}`),s(this,P,We).call(this,e,t);return}s(this,P,gi).call(this,e),s(this,P,ui).call(this,e,t),g.isInitialized&&!g.loading&&(yield s(this,P,lt).call(this,{attributeName:e,attributeProperties:i,attributeValue:t}))})}storeAttributeInLocalStorage(){return c(this,null,function*(){if(!localStorage.getItem("attributes")&&!d(this,ge)){f(this,ge,!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,ge,!1)}}})}fetchAttributeData(){return c(this,null,function*(){try{return yield _.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 a=p.decodeData(i);n=JSON.parse(a)}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,ge=new WeakMap,P=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 N("# recordAttribute",()=>c(this,null,function*(){if(o(1,"Recording attribute"),D("Recording attribute",!0),C("Recording attribute Time",!0),o(1,"Attribute Payload:"),o(1,`Attribute Name: ${e} | Attribute Value: ${i}`),!i||i===""){o(2,"Attribute value is required");return}yield p.checkTTL(),yield s(this,P,pi).call(this);let r=JSON.parse(localStorage.getItem("attributes")||"{}"),a=t?s(this,P,dt).call(this,r,e,t):s(this,P,dt).call(this,r,e);if(typeof a=="string"){o(2,a);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:a,customerId:localStorage.getItem("customer")||"",value:i};yield s(this,P,mi).call(this,v,e,i),s(this,P,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:a})=>!Object.prototype.hasOwnProperty.call(n.attributeProperty,a)).map(({attributeProperty:a})=>a);return r.length>0?`Attribute ${t} has invalid attributeProperties: ${r.join(", ")}.`:i.map(({attributeProperty:a,value:I})=>({attributePropertyId:n.attributeProperty[a].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 _.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 pe,ie=class ie{constructor(){}static getInstance(){return d(ie,pe)||f(ie,pe,new ie),d(ie,pe)}init(e,t){setTimeout(()=>{N("init",()=>c(this,null,function*(){yield N("log level check",()=>c(this,null,function*(){o(1,"Log level check");let i=localStorage.getItem("mergn_debug_level");i&&(g.debugLevel=parseInt(i,10))})),o(1,"Initializing Mergn SDK"),yield p.init(e,t),m.recordDebugEvents({eventName:"mergn_init"}),o(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 o(1,"attributeName"),o(1,e),o(1,"attributeValue"),o(1,t),new Promise((i,n)=>{setTimeout(()=>c(this,null,function*(){try{yield N("recordAttribute",()=>c(this,null,function*(){let r;Array.isArray(t)?r=JSON.stringify(t):typeof t=="number"?r=`${t}`:r=t,o(1,"Recording attribute"),o(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 N("login",()=>c(this,null,function*(){o(1,"Logging in"),o(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(()=>{N("logout",()=>c(this,null,function*(){o(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 N("record event",()=>c(this,null,function*(){if(o(1,"Recording event"),o(1,`Event Payload:
75
+ ${{eventName:e,eventProperties:t}}`),!e||typeof e!="string"){o(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 ht}};pe=new WeakMap,E(ie,pe);var ut=ie,gt=ut.getInstance();typeof window!="undefined"&&(window.mergn=gt);var jr=gt;})();