mergn-webapp-sdk 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -5
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Mergn Web SDK
|
|
2
2
|
|
|
3
|
-
](https://www.npmjs.com/package/mergn-webapp-sdk)
|
|
4
|
+
[](https://www.npmjs.com/package/mergn-webapp-sdk)
|
|
5
5
|
|
|
6
6
|
## Installation
|
|
7
7
|
|
|
@@ -9,14 +9,14 @@ Mergn Web SDK is available as an npm package.
|
|
|
9
9
|
|
|
10
10
|
### Use a package manager
|
|
11
11
|
|
|
12
|
-
`npm install mergn-
|
|
12
|
+
`npm install mergn-webapp-sdk --save`
|
|
13
13
|
|
|
14
14
|
## Initialization
|
|
15
15
|
|
|
16
16
|
#### Add your Mergn account credentials
|
|
17
17
|
|
|
18
18
|
```javascript
|
|
19
|
-
import mergn from 'mergn-
|
|
19
|
+
import mergn from 'mergn-webapp-sdk';
|
|
20
20
|
|
|
21
21
|
mergn.init('Api_Key'); // Replace with values applicable to you. Refer below
|
|
22
22
|
```
|
|
@@ -35,6 +35,17 @@ mergn.recordEvent('Product viewed');
|
|
|
35
35
|
mergn.recordEvent('Product viewed', [{ eventProperty: 'Mens Accessories', value: 59.99 }]);
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
+
### Attribute Record
|
|
39
|
+
|
|
40
|
+
Records or updates the attributes of user such as name, age or address.
|
|
41
|
+
|
|
42
|
+
```javascript
|
|
43
|
+
mergn.recordAttribute({
|
|
44
|
+
name: 'John Smith',
|
|
45
|
+
age: 5,
|
|
46
|
+
});
|
|
47
|
+
```
|
|
48
|
+
|
|
38
49
|
### User Login
|
|
39
50
|
|
|
40
51
|
Use this method where user is logged in successfully to record login event.
|
|
@@ -55,7 +66,7 @@ mergn.logout();
|
|
|
55
66
|
|
|
56
67
|
### Offline Mode
|
|
57
68
|
|
|
58
|
-
`mergn-
|
|
69
|
+
`mergn-webapp-sdk` automatically queue events in case of internet disruption, and sends them once internet is restored while the user is on the website
|
|
59
70
|
|
|
60
71
|
max event queue limit is 50, after which events are ignored
|
|
61
72
|
|
package/dist/index.d.mts
CHANGED
|
@@ -8,10 +8,10 @@ declare class MergnService {
|
|
|
8
8
|
login(identity: string): Promise<void>;
|
|
9
9
|
updateAttribute(attributeName: string, attributeValue: string, data?: Record<string, any>): Promise<void>;
|
|
10
10
|
logout(): Promise<void>;
|
|
11
|
-
recordEvent(eventName: string, eventProperties?:
|
|
11
|
+
recordEvent(eventName: string, eventProperties?: {
|
|
12
12
|
eventProperty: string;
|
|
13
13
|
value: any;
|
|
14
|
-
}]): Promise<void>;
|
|
14
|
+
}[]): Promise<void>;
|
|
15
15
|
}
|
|
16
16
|
declare const _default: MergnService;
|
|
17
17
|
|
package/dist/index.d.ts
CHANGED
|
@@ -8,10 +8,10 @@ declare class MergnService {
|
|
|
8
8
|
login(identity: string): Promise<void>;
|
|
9
9
|
updateAttribute(attributeName: string, attributeValue: string, data?: Record<string, any>): Promise<void>;
|
|
10
10
|
logout(): Promise<void>;
|
|
11
|
-
recordEvent(eventName: string, eventProperties?:
|
|
11
|
+
recordEvent(eventName: string, eventProperties?: {
|
|
12
12
|
eventProperty: string;
|
|
13
13
|
value: any;
|
|
14
|
-
}]): Promise<void>;
|
|
14
|
+
}[]): Promise<void>;
|
|
15
15
|
}
|
|
16
16
|
declare const _default: MergnService;
|
|
17
17
|
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x273a96=_0x3444;(function(_0xfa722d,_0x37240d){const _0x3add77=_0x3444,_0x43d706=_0xfa722d();while(!![]){try{const _0x4bff3e=parseInt(_0x3add77(0x187))/0x1+parseInt(_0x3add77(0x18a))/0x2+parseInt(_0x3add77(0x1c1))/0x3+-parseInt(_0x3add77(0x191))/0x4*(parseInt(_0x3add77(0x1c5))/0x5)+parseInt(_0x3add77(0x179))/0x6+-parseInt(_0x3add77(0x1d2))/0x7*(parseInt(_0x3add77(0x1bf))/0x8)+-parseInt(_0x3add77(0x1b1))/0x9*(parseInt(_0x3add77(0x19b))/0xa);if(_0x4bff3e===_0x37240d)break;else _0x43d706['push'](_0x43d706['shift']());}catch(_0x1d3e04){_0x43d706['push'](_0x43d706['shift']());}}}(_0x1d54,0x32212));var ue=Object[_0x273a96(0x1e1)],b=Object[_0x273a96(0x1b7)],de=Object[_0x273a96(0x1ac)],pe=Object['getOwnPropertyDescriptor'],ge=Object['getOwnPropertyDescriptors'],Ee=Object[_0x273a96(0x1aa)],Nt=Object[_0x273a96(0x1a6)],he=Object[_0x273a96(0x1c2)],xt=Object[_0x273a96(0x1e4)][_0x273a96(0x196)],me=Object[_0x273a96(0x1e4)][_0x273a96(0x178)],Lt=(_0x692c57,_0x5033e0,_0x429e72)=>_0x5033e0 in _0x692c57?b(_0x692c57,_0x5033e0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x429e72}):_0x692c57[_0x5033e0]=_0x429e72,pt=(_0x41cf84,_0x360662)=>{const _0x5a2ec4=_0x273a96;for(var _0x3ecb62 in _0x360662||(_0x360662={}))xt[_0x5a2ec4(0x17a)](_0x360662,_0x3ecb62)&&Lt(_0x41cf84,_0x3ecb62,_0x360662[_0x3ecb62]);if(Nt){for(var _0x3ecb62 of Nt(_0x360662))me['call'](_0x360662,_0x3ecb62)&&Lt(_0x41cf84,_0x3ecb62,_0x360662[_0x3ecb62]);}return _0x41cf84;},gt=(_0x121e0e,_0x21c9aa)=>de(_0x121e0e,ge(_0x21c9aa)),ye=(_0x4446b8,_0x29b92e)=>{for(var _0x5c75d6 in _0x29b92e)b(_0x4446b8,_0x5c75d6,{'get':_0x29b92e[_0x5c75d6],'enumerable':!0x0});},Dt=(_0x1dbf41,_0x2b8938,_0x267632,_0x76c42)=>{const _0x51d73f=_0x273a96;if(_0x2b8938&&typeof _0x2b8938==_0x51d73f(0x199)||typeof _0x2b8938=='function'){for(let _0x1f1b97 of Ee(_0x2b8938))!xt['call'](_0x1dbf41,_0x1f1b97)&&_0x1f1b97!==_0x267632&&b(_0x1dbf41,_0x1f1b97,{'get':()=>_0x2b8938[_0x1f1b97],'enumerable':!(_0x76c42=pe(_0x2b8938,_0x1f1b97))||_0x76c42['enumerable']});}return _0x1dbf41;},_t=(_0x435484,_0x2c278b,_0xfee4d8)=>(_0xfee4d8=_0x435484!=null?ue(he(_0x435484)):{},Dt(_0x2c278b||!_0x435484||!_0x435484['__esModule']?b(_0xfee4d8,_0x273a96(0x1c0),{'value':_0x435484,'enumerable':!0x0}):_0xfee4d8,_0x435484)),ve=_0x1ccb6e=>Dt(b({},'__esModule',{'value':!0x0}),_0x1ccb6e),Et=(_0x1a8f01,_0x2fd371,_0x3e8a58)=>{const _0x2fc1a5=_0x273a96;if(!_0x2fd371[_0x2fc1a5(0x185)](_0x1a8f01))throw TypeError('Cannot\x20'+_0x3e8a58);},u=(_0xadb66,_0x5ef72e,_0x5804ee)=>(Et(_0xadb66,_0x5ef72e,'read\x20from\x20private\x20field'),_0x5804ee?_0x5804ee[_0x273a96(0x17a)](_0xadb66):_0x5ef72e[_0x273a96(0x1a8)](_0xadb66)),i=(_0xc144f4,_0x4b9f3d,_0x25811f)=>{const _0x51da21=_0x273a96;if(_0x4b9f3d['has'](_0xc144f4))throw TypeError(_0x51da21(0x177));_0x4b9f3d instanceof WeakSet?_0x4b9f3d['add'](_0xc144f4):_0x4b9f3d[_0x51da21(0x1ea)](_0xc144f4,_0x25811f);},E=(_0x29d6f3,_0x20ab3c,_0x1e5b6b,_0x16ed23)=>(Et(_0x29d6f3,_0x20ab3c,_0x273a96(0x17c)),_0x16ed23?_0x16ed23[_0x273a96(0x17a)](_0x29d6f3,_0x1e5b6b):_0x20ab3c[_0x273a96(0x1ea)](_0x29d6f3,_0x1e5b6b),_0x1e5b6b),Ct=(_0x59e76c,_0x5d798e,_0x422b6e,_0x41e8ae)=>({set '_'(_0x4ea716){E(_0x59e76c,_0x5d798e,_0x4ea716,_0x422b6e);},get '_'(){return u(_0x59e76c,_0x5d798e,_0x41e8ae);}}),n=(_0x231baf,_0x433595,_0x1bb9ab)=>(Et(_0x231baf,_0x433595,_0x273a96(0x1bd)),_0x1bb9ab),a=(_0x5d217a,_0x57da2c,_0x4c7f13)=>new Promise((_0x36f782,_0x344c79)=>{const _0x23492f=_0x273a96;var _0x130024=_0x51f4a6=>{const _0x18ad0b=_0x3444;try{_0x18470d(_0x4c7f13[_0x18ad0b(0x1a5)](_0x51f4a6));}catch(_0x14bd92){_0x344c79(_0x14bd92);}},_0x5088c5=_0xdb65a5=>{const _0x32aeac=_0x3444;try{_0x18470d(_0x4c7f13[_0x32aeac(0x1f8)](_0xdb65a5));}catch(_0x5f3291){_0x344c79(_0x5f3291);}},_0x18470d=_0x1eef90=>_0x1eef90[_0x23492f(0x195)]?_0x36f782(_0x1eef90['value']):Promise[_0x23492f(0x1c8)](_0x1eef90[_0x23492f(0x181)])['then'](_0x130024,_0x5088c5);_0x18470d((_0x4c7f13=_0x4c7f13[_0x23492f(0x1d0)](_0x5d217a,_0x57da2c))['next']());}),fe={};ye(fe,{'default':()=>Te}),module['exports']=ve(fe);var vt=require('uuid'),$t='https://95sidwa5jk.execute-api.ap-southeast-1.amazonaws.com/Prod/sdk-management/api',ht=_0x273a96(0x1f0),Vt='/record-attribute',Q='/event',Bt='/record-event',Ft=_0x273a96(0x18e),Mt=_0x273a96(0x18f),kt=_0x273a96(0x1da),Qt=_t(require('axios')),jt=require('axios-queue-js'),qt=_t(require('axios-retry')),Jt=require('axios'),c=class extends Error{constructor(_0x44ca74){const _0x2d4e28=_0x273a96;super(_0x44ca74),this['name']=_0x2d4e28(0x1bb);}};c[_0x273a96(0x188)]=!0x1,c[_0x273a96(0x1de)]=!navigator['onLine'],c[_0x273a96(0x1ae)]=!0x1,c[_0x273a96(0x1cc)]=!0x1;var Ie=(_0x191cc6,_0x48c0c3)=>{const _0x5cb978=_0x273a96;_0x48c0c3 instanceof c?console[_0x5cb978(0x1b8)](_0x5cb978(0x198)+_0x191cc6,'MergnError:\x20'+_0x48c0c3[_0x5cb978(0x1eb)]):_0x48c0c3 instanceof Jt['AxiosError']?(console[_0x5cb978(0x1b8)](_0x5cb978(0x198)+_0x191cc6,_0x5cb978(0x1b3)+_0x48c0c3[_0x5cb978(0x1eb)]),_0x48c0c3[_0x5cb978(0x1b0)]?(console[_0x5cb978(0x1b8)](_0x5cb978(0x198)+_0x191cc6,_0x5cb978(0x190)+_0x48c0c3['response'][_0x5cb978(0x1ad)]),console[_0x5cb978(0x1b8)](_0x5cb978(0x198)+_0x191cc6,_0x5cb978(0x1d4),_0x48c0c3['response'][_0x5cb978(0x197)])):_0x48c0c3[_0x5cb978(0x1a2)]?console['error']('OriginateFrom:\x20'+_0x191cc6+_0x5cb978(0x1ba)):console[_0x5cb978(0x1b8)]('OriginateFrom:\x20'+_0x191cc6,_0x5cb978(0x174),_0x48c0c3[_0x5cb978(0x1eb)])):_0x48c0c3 instanceof Error?console['error'](_0x5cb978(0x198)+_0x191cc6,_0x5cb978(0x176),_0x48c0c3[_0x5cb978(0x1eb)]):console[_0x5cb978(0x1b8)](_0x5cb978(0x198)+_0x191cc6,_0x5cb978(0x176),String(_0x48c0c3));},f=(_0x1f8c69,_0x366442,_0x1b8b01)=>a(void 0x0,null,function*(){const _0x44d62a=_0x273a96;try{if(c[_0x44d62a(0x188)])throw new c(_0x44d62a(0x1c4));if(_0x1f8c69!=='add'&&c[_0x44d62a(0x1de)])throw new c(_0x44d62a(0x1ef));if(_0x1f8c69!==_0x44d62a(0x175)&&!c[_0x44d62a(0x1cc)])throw new c(_0x44d62a(0x1ff));return yield _0x366442();}catch(_0x107fba){return _0x1b8b01?_0x1b8b01(_0x107fba):c['showErrorLog']&&Ie(_0x1f8c69,_0x107fba),null;}}),I,R,P,A,j,U,yt,q,zt,d=class d{constructor(){const _0x3bf165=_0x273a96;i(this,j,0x0);let _0x5c516a=Qt[_0x3bf165(0x1c0)][_0x3bf165(0x1e1)]({'baseURL':$t,'headers':{'Content-Type':'application/json'}});E(d,R,_0x5c516a),E(d,P,new jt[(_0x3bf165(0x19a))]({'client':_0x5c516a,'queueSize':0xa})),(0x0,qt[_0x3bf165(0x1c0)])(_0x5c516a,{'onRetry':_0x2121ea=>{const _0x29c539=_0x3bf165;_0x2121ea>=u(d,A)?(c['showErrorLog']&&console[_0x29c539(0x1fc)](_0x29c539(0x1f7)),c['disableSDK']=!0x0):Ct(this,j)['_']++;},'retries':u(d,A),'retryDelay':_0x161e4d=>_0x161e4d*0x1388});}static[_0x273a96(0x1e8)](_0xfb4040){const _0x56905a=_0x273a96;this[_0x56905a(0x1c6)]=_0xfb4040,n(this,q,zt)[_0x56905a(0x17a)](this)[_0x56905a(0x1d6)][_0x56905a(0x1db)][_0x56905a(0x1e7)]['Authorization']=_0xfb4040;}static[_0x273a96(0x1a8)](_0xe8d915){const _0x1f1de5=_0x273a96;return n(this,U,yt)[_0x1f1de5(0x17a)](this)[_0x1f1de5(0x1a8)](_0xe8d915);}static['post'](_0x3e7411,_0x5007bb){const _0x1d206b=_0x273a96;return n(this,U,yt)['call'](this)[_0x1d206b(0x1f6)](_0x3e7411,_0x5007bb||{});}};I=new WeakMap(),R=new WeakMap(),P=new WeakMap(),A=new WeakMap(),j=new WeakMap(),U=new WeakSet(),yt=function(){return u(d,I)||E(d,I,new d()),u(d,P);},q=new WeakSet(),zt=function(){return u(d,I)||E(d,I,new d()),u(d,R);},i(d,U),i(d,q),i(d,I,void 0x0),i(d,R,void 0x0),i(d,P,void 0x0),i(d,A,0x3);function _0x3444(_0x2b4af7,_0x2db0b3){const _0x1d5456=_0x1d54();return _0x3444=function(_0x344455,_0x261165){_0x344455=_0x344455-0x174;let _0x1aecbb=_0x1d5456[_0x344455];return _0x1aecbb;},_0x3444(_0x2b4af7,_0x2db0b3);}var mt=d,y=mt,S,v,O,N,L,x,D,Tt,_,ft,K,Kt,Y,Yt,H,Ht,W,C,G,X,Wt,Z,Gt,tt,Xt,$,St,et,Zt,w,z,rt,te,V,wt,ot,ee,it,re,B,bt,nt,oe,st,ie,at,ne,F,Rt,ct,se,lt,ae,ut,ce,M,Pt,k,At,J,Ut,T=class T{constructor(){const _0x40e711=_0x273a96;i(this,D),i(this,_),i(this,K),i(this,Y),i(this,H),i(this,X),i(this,Z),i(this,tt),i(this,$),i(this,et),i(this,w),i(this,rt),i(this,V),i(this,ot),i(this,it),i(this,B),i(this,nt),i(this,st),i(this,at),i(this,F),i(this,ct),i(this,lt),i(this,ut),i(this,M),i(this,k),i(this,J),i(this,v,''),i(this,O,void 0x0),i(this,N,void 0x0),i(this,L,void 0x0),i(this,x,null),i(this,W,()=>{const _0x4a252c=_0x3444;let _0x179241=()=>{const _0xd7612e=_0x3444;let _0x13cd26=JSON[_0xd7612e(0x1ee)](localStorage['getItem'](_0xd7612e(0x1d9)));_0x13cd26&&localStorage[_0xd7612e(0x1e2)](_0xd7612e(0x1d9),JSON[_0xd7612e(0x1e9)](gt(pt({},_0x13cd26),{'initialTime':''+new Date()[_0xd7612e(0x19f)](),'page':window[_0xd7612e(0x17f)][_0xd7612e(0x1f4)]+window[_0xd7612e(0x17f)][_0xd7612e(0x1ed)]})));};_0x179241(),window['addEventListener'](_0x4a252c(0x202),_0x179241);}),i(this,C,()=>{const _0x34b51e=_0x3444;localStorage[_0x34b51e(0x192)](_0x34b51e(0x1d9));}),i(this,G,()=>{const _0x4f7f9b=_0x3444;let _0x2f8d2c=JSON[_0x4f7f9b(0x1ee)](localStorage[_0x4f7f9b(0x1f9)](_0x4f7f9b(0x1d9))||'{}');(_0x2f8d2c==null?void 0x0:_0x2f8d2c[_0x4f7f9b(0x1fb)])===_0x4f7f9b(0x1a1)&&n(this,V,wt)[_0x4f7f9b(0x17a)](this);}),E(this,L,navigator[_0x40e711(0x1f3)]);}static[_0x273a96(0x1a3)](){return u(T,S)||E(T,S,new T()),u(T,S);}['init'](_0x46c615){const _0x53bbb=_0x273a96;f(_0x53bbb(0x175),()=>a(this,null,function*(){const _0x2432bc=_0x53bbb;n(this,K,Kt)[_0x2432bc(0x17a)](this,_0x46c615),yield n(this,D,Tt)[_0x2432bc(0x17a)](this),setInterval(()=>a(this,null,function*(){yield n(this,D,Tt)['call'](this);}),0x493e0);let _0x3dcf48=localStorage[_0x2432bc(0x1f9)](_0x2432bc(0x1b5)),_0x173eac=!0x1;_0x3dcf48&&(_0x173eac=new Date()[_0x2432bc(0x19f)]()-parseInt(_0x3dcf48,0xa)>0x1b7740,_0x173eac&&n(this,M,Pt)[_0x2432bc(0x17a)](this)),(!_0x3dcf48||_0x173eac||n(this,Y,Yt)['call'](this))&&(n(this,X,Wt)['call'](this),yield n(this,w,z)['call'](this),yield n(this,H,Ht)[_0x2432bc(0x17a)](this)),window[_0x2432bc(0x18c)](_0x2432bc(0x1a4),()=>a(this,null,function*(){const _0xcdda0d=_0x2432bc;c['offline']=!0x1;let _0x140119=JSON['parse'](localStorage[_0xcdda0d(0x1f9)](_0xcdda0d(0x17b))||'[]');Array[_0xcdda0d(0x180)](_0x140119)&&(yield y[_0xcdda0d(0x1f6)](''+Q+Ft,[{'customerId':u(this,v),'events':_0x140119}]),localStorage[_0xcdda0d(0x192)]('offlineEvents'));})),window[_0x2432bc(0x18c)]('offline',()=>{const _0x447963=_0x2432bc;c[_0x447963(0x1de)]=!0x0;}),window['addEventListener']('load',()=>{u(this,G)['call'](this);}),c[_0x2432bc(0x1cc)]=!0x0;let _0x5b3e03=history['pushState'];history['pushState']=(..._0x5ec718)=>{const _0x47a18c=_0x2432bc;_0x5b3e03[_0x47a18c(0x1d0)](history,_0x5ec718),n(this,_,ft)['call'](this);},n(this,_,ft)[_0x2432bc(0x17a)](this);}));}[_0x273a96(0x1ae)](_0x181966=!0x1){const _0x453933=_0x273a96;c[_0x453933(0x1ae)]=_0x181966;}[_0x273a96(0x1b2)](_0x17b468){return a(this,null,function*(){const _0x486331=_0x3444;yield f(_0x486331(0x1b2),()=>a(this,null,function*(){const _0x2b7358=_0x486331;yield n(this,k,At)[_0x2b7358(0x17a)](this);let _0x496d5c=JSON[_0x2b7358(0x1ee)](localStorage[_0x2b7358(0x1f9)](_0x2b7358(0x1af))||'{}');if(_0x496d5c&&Object[_0x2b7358(0x1bc)](_0x496d5c)['length']>0x0){let _0x32ccb4=[];_0x17b468&&Object[_0x2b7358(0x1bc)](_0x17b468)[_0x2b7358(0x1d7)]>0x0&&Object[_0x2b7358(0x1bc)](_0x17b468)[_0x2b7358(0x182)](_0x1a9d5c=>{const _0x1455cf=_0x2b7358;_0x496d5c[_0x1455cf(0x196)](_0x1a9d5c)&&_0x32ccb4[_0x1455cf(0x1f1)]({'attributeId':_0x496d5c[_0x1a9d5c]['id'],'attributeProperties':[],'value':_0x17b468[_0x1a9d5c]});});let _0x434c0d=[{'attributes':_0x32ccb4,'customerId':u(this,v)}];yield n(this,J,Ut)[_0x2b7358(0x17a)](this,_0x434c0d);}}));});}[_0x273a96(0x1a0)](_0x56338f){return a(this,null,function*(){const _0x3fb1a0=_0x3444;yield f(_0x3fb1a0(0x1a0),()=>a(this,null,function*(){const _0x53d707=_0x3fb1a0;yield n(this,w,z)[_0x53d707(0x17a)](this,_0x56338f),yield this[_0x53d707(0x18d)](_0x53d707(0x189),[{'eventProperty':_0x53d707(0x1e0),'value':localStorage[_0x53d707(0x1f9)](_0x53d707(0x1c3))||0x0}]);}));});}[_0x273a96(0x1e3)](_0x2f1ac8,_0x4584b5,_0x1b8ddb){return a(this,null,function*(){const _0x3a9681=_0x3444;yield n(this,k,At)[_0x3a9681(0x17a)](this);let _0x302937=JSON['parse'](localStorage[_0x3a9681(0x1f9)](_0x3a9681(0x1af))||'{}');if(_0x302937&&Object[_0x3a9681(0x1bc)](_0x302937)[_0x3a9681(0x1d7)]>0x0&&_0x302937[_0x3a9681(0x196)](_0x2f1ac8)){let _0x38de4a=_0x302937[_0x2f1ac8],_0x5f123=_0x38de4a[_0x3a9681(0x1e6)],_0x1f5e24=[];_0x1b8ddb&&Object[_0x3a9681(0x1bc)](_0x1b8ddb)[_0x3a9681(0x1d7)]>0x0&&Object[_0x3a9681(0x1bc)](_0x1b8ddb)['forEach'](_0x4fd938=>{const _0xfdc05d=_0x3a9681;_0x5f123[_0xfdc05d(0x196)](_0x4fd938)&&_0x1f5e24[_0xfdc05d(0x1f1)]({'attributePropertyId':_0x5f123[_0x4fd938]['id'],'value':_0x1b8ddb[_0x4fd938]});});let _0x609e78=[{'attributes':[{'attributeId':_0x38de4a['id'],'attributeProperties':_0x1f5e24,'value':_0x4584b5}],'customerId':u(this,v)}];yield n(this,J,Ut)[_0x3a9681(0x17a)](this,_0x609e78);}});}[_0x273a96(0x1cb)](){return a(this,null,function*(){const _0x650ae9=_0x3444;yield f(_0x650ae9(0x1cb),()=>a(this,null,function*(){const _0x36b02d=_0x650ae9;n(this,M,Pt)[_0x36b02d(0x17a)](this),this[_0x36b02d(0x18d)](_0x36b02d(0x1ab),[{'eventProperty':_0x36b02d(0x1e0),'value':localStorage[_0x36b02d(0x1f9)](_0x36b02d(0x1c3))||0x0}]);}));});}[_0x273a96(0x18d)](_0x269333,_0x3df6dd){return a(this,null,function*(){const _0x108efe=_0x3444;yield f(_0x108efe(0x1b9),()=>a(this,null,function*(){const _0x12a58c=_0x108efe;var _0x4b91f8,_0x55793a;let _0x3930c6=n(this,st,ie)[_0x12a58c(0x17a)](this),_0x44f443=n(this,at,ne)['call'](this,_0x3930c6,_0x269333,_0x3df6dd);if(typeof _0x44f443=='string'){c[_0x12a58c(0x1ae)]&&console['error'](_0x44f443);return;}let {id:_0x3498d1}=_0x3930c6[_0x269333];if(c[_0x12a58c(0x1de)]){let _0x43d0ec=JSON['parse'](localStorage[_0x12a58c(0x1f9)](_0x12a58c(0x17b))||'[]');if(_0x43d0ec[_0x12a58c(0x1d7)]<=0x32){let _0x1692ca={'eventId':_0x3498d1};_0x3df6dd&&(_0x1692ca[_0x12a58c(0x1a9)]=_0x44f443),_0x43d0ec['push'](_0x1692ca),localStorage['setItem'](_0x12a58c(0x17b),JSON[_0x12a58c(0x1e9)](_0x43d0ec));}return;}let _0x4c9fae=_0x3df6dd?n(this,F,Rt)[_0x12a58c(0x17a)](this,_0x3498d1,_0x44f443):n(this,F,Rt)[_0x12a58c(0x17a)](this,_0x3498d1),_0x1c1b5f=yield n(this,ct,se)[_0x12a58c(0x17a)](this,_0x4c9fae);n(this,lt,ae)[_0x12a58c(0x17a)](this,(_0x4b91f8=_0x1c1b5f==null?void 0x0:_0x1c1b5f[_0x12a58c(0x197)])==null?void 0x0:_0x4b91f8['data'])&&(n(this,ut,ce)[_0x12a58c(0x17a)](this,(_0x55793a=_0x1c1b5f==null?void 0x0:_0x1c1b5f[_0x12a58c(0x197)])==null?void 0x0:_0x55793a[_0x12a58c(0x197)]),u(this,W)[_0x12a58c(0x17a)](this),n(this,V,wt)['call'](this));}));});}};S=new WeakMap(),v=new WeakMap(),O=new WeakMap(),N=new WeakMap(),L=new WeakMap(),x=new WeakMap(),D=new WeakSet(),Tt=function(){return a(this,null,function*(){const _0x3fe78f=_0x3444;try{yield y[_0x3fe78f(0x1a8)](_0x3fe78f(0x1fe));}catch(_0x2620d7){c[_0x3fe78f(0x188)]=!0x0,c['showErrorLog']&&console[_0x3fe78f(0x1b8)](_0x2620d7[_0x3fe78f(0x1eb)]);}});},_=new WeakSet(),ft=function(){return a(this,null,function*(){const _0x4caeea=_0x3444;let _0x3646ee=window[_0x4caeea(0x17f)][_0x4caeea(0x1f4)]+window['location'][_0x4caeea(0x1ed)];yield this[_0x4caeea(0x18d)]('Viewed\x20Web\x20Page',[{'eventProperty':_0x4caeea(0x1c7),'value':_0x3646ee}]),_0x3646ee!==u(this,x)&&(E(this,x,_0x3646ee),new URLSearchParams(new URL(window[_0x4caeea(0x17f)][_0x4caeea(0x1b6)])[_0x4caeea(0x1be)])[_0x4caeea(0x182)]((_0x8472ac,_0x33e2f0)=>a(this,null,function*(){const _0x76c342=_0x4caeea;yield this[_0x76c342(0x18d)]('Viewed\x20Web\x20Page',[{'eventProperty':_0x76c342(0x19c),'value':_0x33e2f0+':'+_0x8472ac}]);})));});},K=new WeakSet(),Kt=function(_0x12192e){const _0x179d73=_0x273a96;y[_0x179d73(0x1e8)](_0x12192e);},Y=new WeakSet(),Yt=function(){const _0x12f319=_0x273a96;return!localStorage[_0x12f319(0x1f9)](_0x12f319(0x17d))||!localStorage['getItem'](_0x12f319(0x1c3))||!localStorage[_0x12f319(0x1f9)]('attributes')||!localStorage['getItem'](_0x12f319(0x183));},H=new WeakSet(),Ht=function(){return a(this,null,function*(){const _0x28b451=_0x3444;yield n(this,Z,Gt)[_0x28b451(0x17a)](this),yield n(this,$,St)[_0x28b451(0x17a)](this),yield n(this,w,z)[_0x28b451(0x17a)](this);});},W=new WeakMap(),C=new WeakMap(),G=new WeakMap(),X=new WeakSet(),Wt=function(){const _0xe03177=_0x273a96;let _0xa7fe7d=localStorage[_0xe03177(0x1f9)](_0xe03177(0x183));return _0xa7fe7d||(_0xa7fe7d=(0x0,vt['v4'])(),localStorage[_0xe03177(0x1e2)]('uniqueIdentity',_0xa7fe7d)),_0xa7fe7d;},Z=new WeakSet(),Gt=function(){return a(this,null,function*(){const _0x28bf70=_0x3444;if(!localStorage[_0x28bf70(0x1f9)]('events')){let _0x407d9f=(yield n(this,tt,Xt)[_0x28bf70(0x17a)](this))[_0x28bf70(0x197)];_0x407d9f&&(E(this,O,_0x407d9f),localStorage[_0x28bf70(0x1e2)]('events',JSON[_0x28bf70(0x1e9)](u(this,O))));}});},tt=new WeakSet(),Xt=function(){return a(this,null,function*(){const _0x1fe9c5=_0x3444;try{return(yield y['get'](''+Q))[_0x1fe9c5(0x197)];}catch(_0x4fefb3){throw new Error(_0x1fe9c5(0x1df));}});},$=new WeakSet(),St=function(){return a(this,null,function*(){const _0x552dd2=_0x3444;if(!localStorage[_0x552dd2(0x1f9)]('attributes')){let _0x54fbaa=(yield n(this,et,Zt)[_0x552dd2(0x17a)](this))['data'];_0x54fbaa&&(E(this,N,_0x54fbaa),localStorage[_0x552dd2(0x1e2)](_0x552dd2(0x1af),JSON[_0x552dd2(0x1e9)](u(this,N))));}});},et=new WeakSet(),Zt=function(){return a(this,null,function*(){const _0x3d4f8b=_0x3444;try{return(yield y[_0x3d4f8b(0x1a8)](''+ht))[_0x3d4f8b(0x197)];}catch(_0x2cf647){throw new Error(_0x3d4f8b(0x193));}});},w=new WeakSet(),z=function(_0x2f11ef){return a(this,null,function*(){const _0x2256d9=_0x3444;if(!_0x2f11ef){let _0x3d590d=localStorage['getItem'](_0x2256d9(0x1c3));if(_0x3d590d){E(this,v,_0x3d590d);return;}}let _0x48b97c={'deviceId':localStorage[_0x2256d9(0x1f9)]('uniqueIdentity')||(0x0,vt['v4'])(),'os':u(this,L)};_0x2f11ef&&(_0x48b97c[_0x2256d9(0x19e)]=_0x2f11ef);try{let _0x3bb7af=(yield n(this,rt,te)[_0x2256d9(0x17a)](this,_0x48b97c))[_0x2256d9(0x197)];_0x3bb7af!==void 0x0&&(E(this,v,_0x3bb7af),localStorage[_0x2256d9(0x1e2)](_0x2256d9(0x1c3),u(this,v)));}catch(_0x3b0bc1){throw new Error(_0x2256d9(0x1fd));}});},rt=new WeakSet(),te=function(_0x3ff42c){return a(this,null,function*(){const _0x5e0f3f=_0x3444;try{return(yield y[_0x5e0f3f(0x1f6)](''+Mt+kt,_0x3ff42c))['data'];}catch(_0x4a955a){throw new Error('Error\x20posting\x20identity\x20data');}});},V=new WeakSet(),wt=function(){const _0x2dfbca=_0x273a96;let _0x809d27=n(this,ot,ee)[_0x2dfbca(0x17a)](this);if(_0x809d27){let _0x775187=_0x809d27[_0x2dfbca(0x1cd)],_0x5a2c70=_0x809d27[_0x2dfbca(0x1d1)];_0x809d27[_0x2dfbca(0x1ca)]?n(this,it,re)[_0x2dfbca(0x17a)](this,_0x809d27,_0x775187,_0x5a2c70):n(this,B,bt)['call'](this,_0x775187,_0x5a2c70);}},ot=new WeakSet(),ee=function(){const _0x207d44=_0x273a96;let _0x20f5df=localStorage[_0x207d44(0x1f9)](_0x207d44(0x1d9));return _0x20f5df?JSON[_0x207d44(0x1ee)](_0x20f5df):null;},it=new WeakSet(),re=function(_0x93f4a0,_0x386444,_0x11bf9b){const _0x57bbc9=_0x273a96;let _0xffa699=parseInt(_0x93f4a0[_0x57bbc9(0x1e5)],0xa)+_0x93f4a0[_0x57bbc9(0x1ca)]-new Date()['getTime']();_0xffa699>0x0&&_0x93f4a0[_0x57bbc9(0x1a7)]===window['location'][_0x57bbc9(0x1f4)]+window[_0x57bbc9(0x17f)][_0x57bbc9(0x1ed)]&&setTimeout(()=>{const _0x5efaf4=_0x57bbc9;u(this,C)['call'](this),n(this,B,bt)[_0x5efaf4(0x17a)](this,_0x386444,_0x11bf9b);},_0xffa699);},B=new WeakSet(),bt=function(_0x499412,_0x7205a7){const _0xad7765=_0x273a96;let _0x406850=n(this,nt,oe)[_0xad7765(0x17a)](this,_0xad7765(0x1f2),_0x499412,_0x7205a7);document[_0xad7765(0x1dc)][_0xad7765(0x1cf)](_0x406850),u(this,C)[_0xad7765(0x17a)](this);},nt=new WeakSet(),oe=function(_0x1c4d8a,_0x3fd1aa,_0x4b5c9a){const _0x27a869=_0x273a96;var _0x28131a;let _0x2b1029=document[_0x27a869(0x1ec)](_0x1c4d8a);return _0x2b1029['id']='popup_container_'+_0x4b5c9a,_0x2b1029[_0x27a869(0x18b)]=_0x3fd1aa,(_0x28131a=_0x2b1029[_0x27a869(0x1d8)](_0x27a869(0x19d)))==null||_0x28131a[_0x27a869(0x18c)](_0x27a869(0x1dd),()=>a(this,null,function*(){const _0x45fbd9=_0x27a869;_0x2b1029[_0x45fbd9(0x1f5)](),yield this[_0x45fbd9(0x18d)](_0x45fbd9(0x1ce),[{'eventProperty':'Campaign\x20Id','value':_0x4b5c9a}]);})),_0x2b1029[_0x27a869(0x184)](_0x27a869(0x201))['forEach'](_0x1863c3=>{_0x1863c3['addEventListener']('click',()=>a(this,null,function*(){const _0x1c548d=_0x3444;yield this['recordEvent']('Popup\x20Button\x20Clicked',[{'eventProperty':_0x1c548d(0x200),'value':_0x4b5c9a}]);}));}),_0x2b1029[_0x27a869(0x184)](_0x27a869(0x17e))['forEach'](_0x1453b9=>{const _0x5d81a6=_0x27a869;_0x1453b9[_0x5d81a6(0x18c)](_0x5d81a6(0x1dd),()=>a(this,null,function*(){const _0x5001e4=_0x5d81a6;yield this[_0x5001e4(0x18d)](_0x5001e4(0x194),[{'eventProperty':'Campaign\x20Id','value':_0x4b5c9a}]);}));}),_0x2b1029;},st=new WeakSet(),ie=function(){const _0x236668=_0x273a96;let _0x41e223=localStorage['getItem']('events');return _0x41e223?JSON[_0x236668(0x1ee)](_0x41e223):{};},at=new WeakSet(),ne=function(_0x380f7b,_0x4fad9e,_0x556ac6){const _0x81726b=_0x273a96;if(!_0x380f7b[_0x81726b(0x196)](_0x4fad9e))return'Event\x20'+_0x4fad9e+'\x20is\x20not\x20valid.';if(!_0x556ac6)return[];let _0x355456=_0x380f7b[_0x4fad9e];if(!(_0x355456!=null&&_0x355456['eventProperty']))return _0x81726b(0x186)+_0x4fad9e+'\x20does\x20not\x20have\x20a\x20valid\x20eventProperty.';let _0x4b6c10=_0x556ac6[_0x81726b(0x1b4)](({eventProperty:_0x105d96})=>!_0x355456['eventProperty'][_0x81726b(0x196)](_0x105d96))['map'](({eventProperty:_0x46d0c0})=>_0x46d0c0);return _0x4b6c10[_0x81726b(0x1d7)]>0x0?'Event\x20'+_0x4fad9e+'\x20has\x20invalid\x20eventProperties:\x20'+_0x4b6c10[_0x81726b(0x1c9)](',\x20')+'.':_0x556ac6[_0x81726b(0x1d5)](({eventProperty:_0x7ff0af,value:_0x2e1104})=>({'eventPropertyId':_0x355456[_0x81726b(0x1d3)][_0x7ff0af]['id'],'value':_0x2e1104}));},F=new WeakSet(),Rt=function(_0x4383f2,_0x106502){const _0x3afa18=_0x273a96;let _0x3c9e1d=[{'customerId':localStorage[_0x3afa18(0x1f9)](_0x3afa18(0x1c3))||'0','events':[{'eventId':_0x4383f2}]}];return _0x106502&&(_0x3c9e1d[0x0][_0x3afa18(0x17d)][0x0]['eventProperties']=_0x106502),_0x3c9e1d;},ct=new WeakSet(),se=function(_0x2e6ab6){return a(this,null,function*(){const _0x2807db=_0x3444;try{return yield y[_0x2807db(0x1f6)](''+Q+Bt,_0x2e6ab6);}catch(_0x255368){throw new Error(_0x2807db(0x1fa));}});},lt=new WeakSet(),ae=function(_0x34d892){const _0x24717e=_0x273a96;return(_0x34d892==null?void 0x0:_0x34d892[_0x24717e(0x1fb)])===_0x24717e(0x1a1);},ut=new WeakSet(),ce=function(_0x24c7e4){const _0x18fff0=_0x273a96;localStorage['setItem'](_0x18fff0(0x1d9),JSON[_0x18fff0(0x1e9)](gt(pt({},_0x24c7e4),{'initialTime':''+new Date()['getTime']()})));},M=new WeakSet(),Pt=function(){const _0x4119ec=_0x273a96;localStorage[_0x4119ec(0x192)](_0x4119ec(0x1d9)),localStorage[_0x4119ec(0x192)](_0x4119ec(0x17d)),localStorage[_0x4119ec(0x192)](_0x4119ec(0x1af)),localStorage['removeItem']('offlineEvents');},k=new WeakSet(),At=function(){return a(this,null,function*(){const _0x521a0d=_0x3444;localStorage[_0x521a0d(0x1f9)](_0x521a0d(0x1af))||(yield n(this,$,St)[_0x521a0d(0x17a)](this));});},J=new WeakSet(),Ut=function(_0x23dc3b){return a(this,null,function*(){const _0x40c15c=_0x3444;try{return yield y[_0x40c15c(0x1f6)](''+ht+Vt,_0x23dc3b);}catch(_0x40fde3){throw new Error('Error\x20posting\x20attribute\x20record');}});},i(T,S,void 0x0);function _0x1d54(){const _0x53bf7e=['isArray','value','forEach','uniqueIdentity','querySelectorAll','has','Event\x20','112698PManLl','disableSDK','User\x20Login','561010bMZDkb','innerHTML','addEventListener','recordEvent','/record-bulk-event','/customer','HTTP\x20Status:\x20','68032QaEnJf','removeItem','Error\x20fetching\x20attribute\x20data','Popup\x20Image\x20Clicked','done','hasOwnProperty','data','OriginateFrom:\x20','object','AxiosQueueManager','40830tYgItt','UTM\x20Key\x20Value','.u-close-button','identity','getTime','login','Popup','request','getInstance','online','next','getOwnPropertySymbols','page','get','eventProperties','getOwnPropertyNames','User\x20Logout','defineProperties','status','showErrorLog','attributes','response','441LnnahB','recordAttribute','AxiosError:\x20','filter','ttl','href','defineProperty','error','add','\x0aNo\x20response\x20received.\x20Check\x20network\x20connection\x20or\x20server\x20issues.','MergnError','keys','access\x20private\x20method','search','16BTtDaT','default','591321mNDCgV','getPrototypeOf','customer','Mergn\x20SDK\x20is\x20disabled!','40hHoWTZ','apiKey','URL','resolve','join','delay','logout','isInitialized','design','Popup\x20Button\x20Clicked','appendChild','apply','campaignId','608398ILVJZr','eventProperty','Response\x20Data:','map','defaults','length','querySelector','action','/set-identity','headers','body','click','offline','Error\x20fetching\x20event\x20data','Customer\x20Id','create','setItem','updateAttribute','prototype','initialTime','attributeProperty','common','updateAPIKey','stringify','set','message','createElement','pathname','parse','Mergn\x20is\x20offline!','/attribute','push','div','platform','hostname','remove','post','Max\x20retries\x20reached.\x20Disabling\x20SDK.','throw','getItem','Error\x20posting\x20event\x20record','name','log','Error\x20setting\x20identity','brand','Mergn\x20not\x20initialized!','Campaign\x20Id','[id^=\x22u_content_button_\x22]','beforeunload','Error\x20setting\x20up\x20the\x20request:','init','Unexpected\x20error:','Cannot\x20add\x20the\x20same\x20private\x20member\x20more\x20than\x20once','propertyIsEnumerable','749874ptekqd','call','offlineEvents','write\x20to\x20private\x20field','events','.u-popup-container\x20img','location'];_0x1d54=function(){return _0x53bf7e;};return _0x1d54();}var It=T,le=It[_0x273a96(0x1a3)](),Te=le;
|
|
1
|
+
'use strict';function _0x55ec(_0x16c685,_0x2b5834){const _0x3239fe=_0x3239();return _0x55ec=function(_0x55ec32,_0x58a0e4){_0x55ec32=_0x55ec32-0x103;let _0x13156c=_0x3239fe[_0x55ec32];return _0x13156c;},_0x55ec(_0x16c685,_0x2b5834);}const _0x4df8fc=_0x55ec;(function(_0x584f51,_0x48894f){const _0x3396c8=_0x55ec,_0x630832=_0x584f51();while(!![]){try{const _0x5d130f=-parseInt(_0x3396c8(0x14e))/0x1+-parseInt(_0x3396c8(0x15d))/0x2*(-parseInt(_0x3396c8(0x13f))/0x3)+-parseInt(_0x3396c8(0x15c))/0x4+-parseInt(_0x3396c8(0x140))/0x5*(parseInt(_0x3396c8(0x120))/0x6)+-parseInt(_0x3396c8(0x189))/0x7*(-parseInt(_0x3396c8(0x138))/0x8)+parseInt(_0x3396c8(0x15a))/0x9*(-parseInt(_0x3396c8(0x17e))/0xa)+-parseInt(_0x3396c8(0x15e))/0xb*(-parseInt(_0x3396c8(0x131))/0xc);if(_0x5d130f===_0x48894f)break;else _0x630832['push'](_0x630832['shift']());}catch(_0x4117fc){_0x630832['push'](_0x630832['shift']());}}}(_0x3239,0x76604));var de=Object[_0x4df8fc(0x115)],P=Object[_0x4df8fc(0x137)],pe=Object[_0x4df8fc(0x15f)],ge=Object[_0x4df8fc(0x19c)],Ee=Object['getOwnPropertyDescriptors'],me=Object['getOwnPropertyNames'],Lt=Object[_0x4df8fc(0x19b)],he=Object[_0x4df8fc(0x13d)],Dt=Object['prototype'][_0x4df8fc(0x122)],ye=Object[_0x4df8fc(0x107)][_0x4df8fc(0x16f)],xt=(_0x1fe49d,_0x3a3fda,_0x2ba9df)=>_0x3a3fda in _0x1fe49d?P(_0x1fe49d,_0x3a3fda,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2ba9df}):_0x1fe49d[_0x3a3fda]=_0x2ba9df,gt=(_0x2e4410,_0x718998)=>{for(var _0x528e7 in _0x718998||(_0x718998={}))Dt['call'](_0x718998,_0x528e7)&&xt(_0x2e4410,_0x528e7,_0x718998[_0x528e7]);if(Lt){for(var _0x528e7 of Lt(_0x718998))ye['call'](_0x718998,_0x528e7)&&xt(_0x2e4410,_0x528e7,_0x718998[_0x528e7]);}return _0x2e4410;},Et=(_0x3b40a8,_0x30a070)=>pe(_0x3b40a8,Ee(_0x30a070)),ve=(_0x51b479,_0x321e89)=>{for(var _0x6633c6 in _0x321e89)P(_0x51b479,_0x6633c6,{'get':_0x321e89[_0x6633c6],'enumerable':!0x0});},Ct=(_0x2d8146,_0x556993,_0x3bb896,_0x14f5b3)=>{const _0x56eda7=_0x4df8fc;if(_0x556993&&typeof _0x556993==_0x56eda7(0x130)||typeof _0x556993==_0x56eda7(0x165)){for(let _0x51d807 of me(_0x556993))!Dt['call'](_0x2d8146,_0x51d807)&&_0x51d807!==_0x3bb896&&P(_0x2d8146,_0x51d807,{'get':()=>_0x556993[_0x51d807],'enumerable':!(_0x14f5b3=ge(_0x556993,_0x51d807))||_0x14f5b3['enumerable']});}return _0x2d8146;},_t=(_0x5c6d6f,_0x357dd3,_0x22063a)=>(_0x22063a=_0x5c6d6f!=null?de(he(_0x5c6d6f)):{},Ct(_0x357dd3||!_0x5c6d6f||!_0x5c6d6f[_0x4df8fc(0x19d)]?P(_0x22063a,_0x4df8fc(0x18e),{'value':_0x5c6d6f,'enumerable':!0x0}):_0x22063a,_0x5c6d6f)),fe=_0x3679cd=>Ct(P({},_0x4df8fc(0x19d),{'value':!0x0}),_0x3679cd),mt=(_0x249f69,_0x33a34b,_0x411589)=>{const _0x231087=_0x4df8fc;if(!_0x33a34b[_0x231087(0x185)](_0x249f69))throw TypeError(_0x231087(0x13a)+_0x411589);},u=(_0x2645c1,_0x158347,_0x20808e)=>(mt(_0x2645c1,_0x158347,'read\x20from\x20private\x20field'),_0x20808e?_0x20808e[_0x4df8fc(0x19f)](_0x2645c1):_0x158347['get'](_0x2645c1)),i=(_0x114ff4,_0x1d53a2,_0x3ce04f)=>{const _0x30cd38=_0x4df8fc;if(_0x1d53a2[_0x30cd38(0x185)](_0x114ff4))throw TypeError(_0x30cd38(0x170));_0x1d53a2 instanceof WeakSet?_0x1d53a2[_0x30cd38(0x169)](_0x114ff4):_0x1d53a2[_0x30cd38(0x173)](_0x114ff4,_0x3ce04f);},m=(_0x31680b,_0x4008ea,_0x27d88f,_0x185e0b)=>(mt(_0x31680b,_0x4008ea,'write\x20to\x20private\x20field'),_0x185e0b?_0x185e0b[_0x4df8fc(0x19f)](_0x31680b,_0x27d88f):_0x4008ea[_0x4df8fc(0x173)](_0x31680b,_0x27d88f),_0x27d88f),$t=(_0x907f9b,_0x240e47,_0x310212,_0x19c019)=>({set '_'(_0x91b4f2){m(_0x907f9b,_0x240e47,_0x91b4f2,_0x310212);},get '_'(){return u(_0x907f9b,_0x240e47,_0x19c019);}}),s=(_0x4728ca,_0x25a58f,_0x1dff4c)=>(mt(_0x4728ca,_0x25a58f,_0x4df8fc(0x134)),_0x1dff4c),a=(_0xab7535,_0x330086,_0x5b16f1)=>new Promise((_0x40ca80,_0x5c7f6d)=>{const _0x5e64cf=_0x4df8fc;var _0x25b492=_0x1abe45=>{try{_0x525003(_0x5b16f1['next'](_0x1abe45));}catch(_0x4020ac){_0x5c7f6d(_0x4020ac);}},_0x4cbce5=_0x48e948=>{try{_0x525003(_0x5b16f1['throw'](_0x48e948));}catch(_0x299760){_0x5c7f6d(_0x299760);}},_0x525003=_0x454d71=>_0x454d71[_0x5e64cf(0x108)]?_0x40ca80(_0x454d71[_0x5e64cf(0x14d)]):Promise[_0x5e64cf(0x127)](_0x454d71[_0x5e64cf(0x14d)])[_0x5e64cf(0x139)](_0x25b492,_0x4cbce5);_0x525003((_0x5b16f1=_0x5b16f1[_0x5e64cf(0x17c)](_0xab7535,_0x330086))[_0x5e64cf(0x12f)]());}),Se={};ve(Se,{'default':()=>Te}),module[_0x4df8fc(0x129)]=fe(Se);var ft=require('uuid'),Vt='https://95sidwa5jk.execute-api.ap-southeast-1.amazonaws.com/Prod/sdk-management/api',ht=_0x4df8fc(0x171),Bt=_0x4df8fc(0x16b),q=_0x4df8fc(0x10b),Ft='/record-event',Mt=_0x4df8fc(0x11e),kt=_0x4df8fc(0x153),Jt=_0x4df8fc(0x10d),jt=_t(require('axios')),qt=require('axios-queue-js'),zt=_t(require('axios-retry')),Qt=require('axios'),c=class extends Error{constructor(_0x3a5d63){const _0x23db35=_0x4df8fc;super(_0x3a5d63),this[_0x23db35(0x198)]=_0x23db35(0x195);}};c[_0x4df8fc(0x147)]=!0x1,c[_0x4df8fc(0x16a)]=!navigator[_0x4df8fc(0x17d)],c[_0x4df8fc(0x18b)]=!0x1,c[_0x4df8fc(0x12c)]=!0x1;var Ie=(_0x388813,_0x5b469c)=>{const _0x4e5bb9=_0x4df8fc;_0x5b469c instanceof c?console['error'](_0x4e5bb9(0x126)+_0x388813,_0x4e5bb9(0x12d)+_0x5b469c['message']):_0x5b469c instanceof Qt[_0x4e5bb9(0x167)]?(console['error']('OriginateFrom:\x20'+_0x388813,_0x4e5bb9(0x14c)+_0x5b469c[_0x4e5bb9(0x146)]),_0x5b469c[_0x4e5bb9(0x157)]?(console[_0x4e5bb9(0x10a)](_0x4e5bb9(0x126)+_0x388813,'HTTP\x20Status:\x20'+_0x5b469c[_0x4e5bb9(0x157)]['status']),console[_0x4e5bb9(0x10a)](_0x4e5bb9(0x126)+_0x388813,_0x4e5bb9(0x19e),_0x5b469c[_0x4e5bb9(0x157)]['data'])):_0x5b469c[_0x4e5bb9(0x1a0)]?console['error'](_0x4e5bb9(0x126)+_0x388813+'\x0aNo\x20response\x20received.\x20Check\x20network\x20connection\x20or\x20server\x20issues.'):console[_0x4e5bb9(0x10a)](_0x4e5bb9(0x126)+_0x388813,_0x4e5bb9(0x181),_0x5b469c['message'])):_0x5b469c instanceof Error?console[_0x4e5bb9(0x10a)](_0x4e5bb9(0x126)+_0x388813,'Unexpected\x20error:',_0x5b469c[_0x4e5bb9(0x146)]):console[_0x4e5bb9(0x10a)]('OriginateFrom:\x20'+_0x388813,_0x4e5bb9(0x196),String(_0x5b469c));},S=(_0xa6ba36,_0x18a460,_0x24a1ca)=>a(void 0x0,null,function*(){const _0x70b2cb=_0x4df8fc;try{if(c['disableSDK'])throw new c(_0x70b2cb(0x10e));if(_0xa6ba36!==_0x70b2cb(0x169)&&c[_0x70b2cb(0x16a)])throw new c(_0x70b2cb(0x18a));if(_0xa6ba36!==_0x70b2cb(0x16c)&&!c[_0x70b2cb(0x12c)])throw new c(_0x70b2cb(0x154));return yield _0x18a460();}catch(_0xabe5ea){return _0x24a1ca?_0x24a1ca(_0xabe5ea):c['showErrorLog']&&Ie(_0xa6ba36,_0xabe5ea),null;}}),f,A,U,O,z,N,vt,K,Kt,p=class p{constructor(){const _0x3938e3=_0x4df8fc;i(this,z,0x0);let _0x5100c0=jt['default'][_0x3938e3(0x115)]({'baseURL':Vt,'headers':{'Content-Type':_0x3938e3(0x180)}});m(p,A,_0x5100c0),m(p,U,new qt[(_0x3938e3(0x199))]({'client':_0x5100c0,'queueSize':0xa})),(0x0,zt['default'])(_0x5100c0,{'onRetry':_0x5afc23=>{const _0x3ceb31=_0x3938e3;_0x5afc23>=u(p,O)?(c[_0x3ceb31(0x18b)]&&console[_0x3ceb31(0x163)](_0x3ceb31(0x175)),c[_0x3ceb31(0x147)]=!0x0):$t(this,z)['_']++;},'retries':u(p,O),'retryDelay':_0x155d97=>_0x155d97*0x1388});}static[_0x4df8fc(0x143)](_0x29e257){const _0x20fe8b=_0x4df8fc;this[_0x20fe8b(0x12a)]=_0x29e257,s(this,K,Kt)[_0x20fe8b(0x19f)](this)[_0x20fe8b(0x152)]['headers'][_0x20fe8b(0x161)][_0x20fe8b(0x145)]=_0x29e257;}static[_0x4df8fc(0x125)](_0x424659){const _0x313915=_0x4df8fc;return s(this,N,vt)[_0x313915(0x19f)](this)[_0x313915(0x125)](_0x424659);}static[_0x4df8fc(0x179)](_0x22505b,_0x33881a){const _0x3010f1=_0x4df8fc;return s(this,N,vt)[_0x3010f1(0x19f)](this)['post'](_0x22505b,_0x33881a||{});}};f=new WeakMap(),A=new WeakMap(),U=new WeakMap(),O=new WeakMap(),z=new WeakMap(),N=new WeakSet(),vt=function(){return u(p,f)||m(p,f,new p()),u(p,U);},K=new WeakSet(),Kt=function(){return u(p,f)||m(p,f,new p()),u(p,A);},i(p,N),i(p,K),i(p,f,void 0x0),i(p,A,void 0x0),i(p,U,void 0x0),i(p,O,0x3);var yt=p,y=yt,w,v,L,x,D,C,_,Tt,$,St,H,Yt,W,Ht,G,Wt,X,V,Z,tt,Gt,et,Xt,rt,Zt,B,wt,ot,te,b,Y,it,ee,F,bt,nt,re,st,oe,M,Rt,at,ie,ct,ne,lt,se,k,Pt,ut,ae,dt,ce,pt,le,J,At,Q,Ut,j,Ot,I=class I{constructor(){const _0x567048=_0x4df8fc;i(this,_),i(this,$),i(this,H),i(this,W),i(this,G),i(this,tt),i(this,et),i(this,rt),i(this,B),i(this,ot),i(this,b),i(this,it),i(this,F),i(this,nt),i(this,st),i(this,M),i(this,at),i(this,ct),i(this,lt),i(this,k),i(this,ut),i(this,dt),i(this,pt),i(this,J),i(this,Q),i(this,j),i(this,v,''),i(this,L,void 0x0),i(this,x,void 0x0),i(this,D,void 0x0),i(this,C,null),i(this,X,()=>{const _0x2b85e4=_0x55ec;let _0x1ad5de=()=>{const _0x455a23=_0x55ec;let _0x15abaa=JSON[_0x455a23(0x119)](localStorage[_0x455a23(0x104)](_0x455a23(0x142)));_0x15abaa&&localStorage[_0x455a23(0x186)](_0x455a23(0x142),JSON[_0x455a23(0x164)](Et(gt({},_0x15abaa),{'initialTime':''+new Date()[_0x455a23(0x123)](),'page':window[_0x455a23(0x11d)]['hostname']+window[_0x455a23(0x11d)][_0x455a23(0x128)]})));};_0x1ad5de(),window['addEventListener'](_0x2b85e4(0x187),_0x1ad5de);}),i(this,V,()=>{const _0x36b3a8=_0x55ec;localStorage['removeItem'](_0x36b3a8(0x142));}),i(this,Z,()=>{const _0x12f44f=_0x55ec;let _0x31f6a1=JSON[_0x12f44f(0x119)](localStorage[_0x12f44f(0x104)]('action')||'{}');(_0x31f6a1==null?void 0x0:_0x31f6a1['name'])==='Popup'&&s(this,F,bt)['call'](this);}),m(this,D,navigator[_0x567048(0x160)]);}static[_0x4df8fc(0x13c)](){return u(I,w)||m(I,w,new I()),u(I,w);}[_0x4df8fc(0x16c)](_0xcf40df){const _0x5bafa9=_0x4df8fc;S(_0x5bafa9(0x16c),()=>a(this,null,function*(){const _0x2021e5=_0x5bafa9;s(this,H,Yt)[_0x2021e5(0x19f)](this,_0xcf40df),yield s(this,_,Tt)[_0x2021e5(0x19f)](this),setInterval(()=>a(this,null,function*(){const _0x1f3cab=_0x2021e5;yield s(this,_,Tt)[_0x1f3cab(0x19f)](this);}),0x493e0);let _0x21ec86=localStorage['getItem'](_0x2021e5(0x11a)),_0x4ce69e=!0x1;_0x21ec86&&(_0x4ce69e=new Date()[_0x2021e5(0x123)]()-parseInt(_0x21ec86,0xa)>0x1b7740,_0x4ce69e&&s(this,J,At)[_0x2021e5(0x19f)](this)),(!_0x21ec86||_0x4ce69e||s(this,W,Ht)[_0x2021e5(0x19f)](this))&&(s(this,tt,Gt)[_0x2021e5(0x19f)](this),yield s(this,b,Y)['call'](this),yield s(this,G,Wt)['call'](this)),window[_0x2021e5(0x182)]('online',()=>a(this,null,function*(){const _0x38a445=_0x2021e5;c[_0x38a445(0x16a)]=!0x1;let _0x4798f0=JSON[_0x38a445(0x119)](localStorage[_0x38a445(0x104)](_0x38a445(0x12e))||'[]');Array[_0x38a445(0x13b)](_0x4798f0)&&(yield y[_0x38a445(0x179)](''+q+Mt,[{'customerId':u(this,v),'events':_0x4798f0}]),localStorage[_0x38a445(0x193)](_0x38a445(0x12e)));})),window[_0x2021e5(0x182)](_0x2021e5(0x16a),()=>{c['offline']=!0x0;}),window[_0x2021e5(0x182)](_0x2021e5(0x191),()=>{u(this,Z)['call'](this);}),c['isInitialized']=!0x0;let _0x43d9d6=history[_0x2021e5(0x192)];history[_0x2021e5(0x192)]=(..._0x298ab2)=>{_0x43d9d6['apply'](history,_0x298ab2),s(this,$,St)['call'](this);},s(this,$,St)[_0x2021e5(0x19f)](this);}));}['showErrorLog'](_0x1f02e6=!0x1){const _0x1640e4=_0x4df8fc;c[_0x1640e4(0x18b)]=_0x1f02e6;}['recordAttribute'](_0x11e2ca){return a(this,null,function*(){yield S('recordAttribute',()=>a(this,null,function*(){const _0x2a8ed3=_0x55ec;yield s(this,Q,Ut)[_0x2a8ed3(0x19f)](this);let _0x35c1cd=JSON['parse'](localStorage['getItem']('attributes')||'[]');if(_0x35c1cd&&Object['keys'](_0x35c1cd)[_0x2a8ed3(0x184)]>0x0){let _0x34bf01=[];_0x11e2ca&&Object[_0x2a8ed3(0x183)](_0x11e2ca)[_0x2a8ed3(0x184)]>0x0&&Object['keys'](_0x11e2ca)[_0x2a8ed3(0x162)](_0x42ef9e=>{const _0xc6c03e=_0x2a8ed3;_0x35c1cd[_0xc6c03e(0x122)](_0x42ef9e)&&_0x34bf01[_0xc6c03e(0x110)]({'attributeId':_0x35c1cd[_0x42ef9e]['id'],'attributeProperties':[],'value':_0x11e2ca[_0x42ef9e]});});let _0x8a2390=[{'attributes':_0x34bf01,'customerId':u(this,v)}];yield s(this,j,Ot)[_0x2a8ed3(0x19f)](this,_0x8a2390);}}));});}[_0x4df8fc(0x141)](_0x24372d){return a(this,null,function*(){const _0x5082f7=_0x55ec;yield S(_0x5082f7(0x141),()=>a(this,null,function*(){const _0x51bd8f=_0x5082f7;yield s(this,b,Y)[_0x51bd8f(0x19f)](this,_0x24372d),yield this['recordEvent'](_0x51bd8f(0x112),[{'eventProperty':_0x51bd8f(0x156),'value':localStorage['getItem'](_0x51bd8f(0x194))||0x0}]);}));});}['updateAttribute'](_0x7d0130,_0x348eee,_0x46992f){return a(this,null,function*(){const _0xd8ca6b=_0x55ec;yield s(this,Q,Ut)[_0xd8ca6b(0x19f)](this);let _0x400374=JSON[_0xd8ca6b(0x119)](localStorage[_0xd8ca6b(0x104)](_0xd8ca6b(0x132))||'{}');if(_0x400374&&Object['keys'](_0x400374)[_0xd8ca6b(0x184)]>0x0&&_0x400374[_0xd8ca6b(0x122)](_0x7d0130)){let _0x56975d=_0x400374[_0x7d0130],_0x58fb1f=_0x56975d[_0xd8ca6b(0x168)],_0x593ea6=[];_0x46992f&&Object['keys'](_0x46992f)[_0xd8ca6b(0x184)]>0x0&&Object['keys'](_0x46992f)[_0xd8ca6b(0x162)](_0x188ec4=>{const _0x2e7028=_0xd8ca6b;_0x58fb1f[_0x2e7028(0x122)](_0x188ec4)&&_0x593ea6[_0x2e7028(0x110)]({'attributePropertyId':_0x58fb1f[_0x188ec4]['id'],'value':_0x46992f[_0x188ec4]});});let _0x5de779=[{'attributes':[{'attributeId':_0x56975d['id'],'attributeProperties':_0x593ea6,'value':_0x348eee}],'customerId':u(this,v)}];yield s(this,j,Ot)['call'](this,_0x5de779);}});}[_0x4df8fc(0x176)](){return a(this,null,function*(){const _0x10a032=_0x55ec;yield S(_0x10a032(0x176),()=>a(this,null,function*(){const _0x5d8248=_0x10a032;s(this,J,At)[_0x5d8248(0x19f)](this),this['recordEvent']('User\x20Logout',[{'eventProperty':'Customer\x20Id','value':localStorage['getItem'](_0x5d8248(0x194))||0x0}]);}));});}['recordEvent'](_0x260751,_0x219ed0){return a(this,null,function*(){const _0x289b55=_0x55ec;yield S(_0x289b55(0x169),()=>a(this,null,function*(){const _0x12f35a=_0x289b55;var _0x512db4,_0x265061;let _0x420ff7=s(this,ct,ne)['call'](this),_0x153155=s(this,lt,se)[_0x12f35a(0x19f)](this,_0x420ff7,_0x260751,_0x219ed0);if(typeof _0x153155==_0x12f35a(0x18c)){c[_0x12f35a(0x18b)]&&console['error'](_0x153155);return;}let {id:_0x2314e9}=_0x420ff7[_0x260751];if(c[_0x12f35a(0x16a)]){let _0x26cf8e=JSON['parse'](localStorage[_0x12f35a(0x104)](_0x12f35a(0x12e))||'[]');if(_0x26cf8e['length']<=0x32){let _0x10f76f={'eventId':_0x2314e9};_0x219ed0&&(_0x10f76f[_0x12f35a(0x113)]=_0x153155),_0x26cf8e[_0x12f35a(0x110)](_0x10f76f),localStorage[_0x12f35a(0x186)](_0x12f35a(0x12e),JSON[_0x12f35a(0x164)](_0x26cf8e));}return;}let _0x572a77=_0x219ed0?s(this,k,Pt)['call'](this,_0x2314e9,_0x153155):s(this,k,Pt)[_0x12f35a(0x19f)](this,_0x2314e9),_0xd320f0=yield s(this,ut,ae)['call'](this,_0x572a77);s(this,dt,ce)['call'](this,(_0x512db4=_0xd320f0==null?void 0x0:_0xd320f0[_0x12f35a(0x105)])==null?void 0x0:_0x512db4['data'])&&(s(this,pt,le)[_0x12f35a(0x19f)](this,(_0x265061=_0xd320f0==null?void 0x0:_0xd320f0['data'])==null?void 0x0:_0x265061[_0x12f35a(0x105)]),u(this,X)[_0x12f35a(0x19f)](this),s(this,F,bt)['call'](this));}));});}};function _0x3239(){const _0x395803=['Max\x20retries\x20reached.\x20Disabling\x20SDK.','logout','\x20Values','delay','post','createElement','remove','apply','onLine','10LKUVXE','design','application/json','Error\x20setting\x20up\x20the\x20request:','addEventListener','keys','length','has','setItem','beforeunload','Error\x20posting\x20event\x20record','14yfztLG','Mergn\x20is\x20offline!','showErrorLog','string','\x20does\x20not\x20have\x20a\x20valid\x20eventProperty.','default','campaignId','brand','load','pushState','removeItem','customer','MergnError','Unexpected\x20error:','initialTime','name','AxiosQueueManager','identity','getOwnPropertySymbols','getOwnPropertyDescriptor','__esModule','Response\x20Data:','call','request','URL','getItem','data','.u-popup-container\x20img','prototype','done','map','error','/event','page','/set-identity','Mergn\x20SDK\x20is\x20disabled!','join','push','submit','User\x20Login','eventProperties','.u-close-button','create','eventProperty','Error\x20posting\x20identity\x20data','form','parse','ttl','Popup\x20Button\x20Clicked','Error\x20posting\x20attribute\x20record','location','/record-bulk-event','Error\x20fetching\x20attribute\x20data','30lHQdpK','Form\x20Submit','hasOwnProperty','getTime','Error\x20fetching\x20event\x20data','get','OriginateFrom:\x20','resolve','pathname','exports','apiKey','div','isInitialized','MergnError:\x20','offlineEvents','next','object','17652NtyvQT','attributes','search','access\x20private\x20method','popup_container_','\x20is\x20not\x20valid.','defineProperty','96840jAQisX','then','Cannot\x20','isArray','getInstance','getPrototypeOf','querySelectorAll','234cxxvFM','137285ecoOuw','login','action','updateAPIKey','Campaign\x20Id','Authorization','message','disableSDK','Popup','Viewed\x20Web\x20Page','filter','Popup\x20Image\x20Clicked','AxiosError:\x20','value','624910wyGWUi','hostname','href','recordEvent','defaults','/customer','Mergn\x20not\x20initialized!','click','Customer\x20Id','response','Event\x20',',\x20Value:\x20','6780825iMsNGk','innerHTML','3057264GIYVCi','15128CiejQo','16082MdLLLk','defineProperties','platform','common','forEach','log','stringify','function','body','AxiosError','attributeProperty','add','offline','/record-attribute','init','\x20has\x20invalid\x20eventProperties:\x20','uniqueIdentity','propertyIsEnumerable','Cannot\x20add\x20the\x20same\x20private\x20member\x20more\x20than\x20once','/attribute','[id^=\x22u_content_button_\x22]','set','events'];_0x3239=function(){return _0x395803;};return _0x3239();}w=new WeakMap(),v=new WeakMap(),L=new WeakMap(),x=new WeakMap(),D=new WeakMap(),C=new WeakMap(),_=new WeakSet(),Tt=function(){return a(this,null,function*(){const _0xc7e680=_0x55ec;try{yield y[_0xc7e680(0x125)](_0xc7e680(0x190));}catch(_0x5e25c6){c[_0xc7e680(0x147)]=!0x0,c['showErrorLog']&&console[_0xc7e680(0x10a)](_0x5e25c6[_0xc7e680(0x146)]);}});},$=new WeakSet(),St=function(){return a(this,null,function*(){const _0x40e64d=_0x55ec;let _0x334d6b=window[_0x40e64d(0x11d)][_0x40e64d(0x14f)]+window['location']['pathname'];yield this[_0x40e64d(0x151)](_0x40e64d(0x149),[{'eventProperty':_0x40e64d(0x103),'value':_0x334d6b}]),_0x334d6b!==u(this,C)&&(m(this,C,_0x334d6b),new URLSearchParams(new URL(window[_0x40e64d(0x11d)][_0x40e64d(0x150)])[_0x40e64d(0x133)])[_0x40e64d(0x162)]((_0x50fecc,_0x4cb4bc)=>a(this,null,function*(){const _0x4fdb68=_0x40e64d;yield this[_0x4fdb68(0x151)](_0x4fdb68(0x149),[{'eventProperty':'UTM\x20Key\x20Value','value':_0x4cb4bc+':'+_0x50fecc}]);})));});},H=new WeakSet(),Yt=function(_0x2b3292){const _0x3be596=_0x4df8fc;y[_0x3be596(0x143)](_0x2b3292);},W=new WeakSet(),Ht=function(){const _0x64f9cd=_0x4df8fc;return!localStorage[_0x64f9cd(0x104)](_0x64f9cd(0x174))||!localStorage[_0x64f9cd(0x104)](_0x64f9cd(0x194))||!localStorage[_0x64f9cd(0x104)]('attributes')||!localStorage[_0x64f9cd(0x104)](_0x64f9cd(0x16e));},G=new WeakSet(),Wt=function(){return a(this,null,function*(){const _0x17d47a=_0x55ec;yield s(this,et,Xt)[_0x17d47a(0x19f)](this),yield s(this,B,wt)[_0x17d47a(0x19f)](this),yield s(this,b,Y)[_0x17d47a(0x19f)](this);});},X=new WeakMap(),V=new WeakMap(),Z=new WeakMap(),tt=new WeakSet(),Gt=function(){const _0x4efceb=_0x4df8fc;let _0x802109=localStorage['getItem'](_0x4efceb(0x16e));return _0x802109||(_0x802109=(0x0,ft['v4'])(),localStorage[_0x4efceb(0x186)](_0x4efceb(0x16e),_0x802109)),_0x802109;},et=new WeakSet(),Xt=function(){return a(this,null,function*(){const _0x596c87=_0x55ec;if(!localStorage['getItem'](_0x596c87(0x174))){let _0x28ef81=(yield s(this,rt,Zt)['call'](this))['data'];_0x28ef81&&(m(this,L,_0x28ef81),localStorage['setItem'](_0x596c87(0x174),JSON[_0x596c87(0x164)](u(this,L))));}});},rt=new WeakSet(),Zt=function(){return a(this,null,function*(){const _0x1d9653=_0x55ec;try{return(yield y[_0x1d9653(0x125)](''+q))[_0x1d9653(0x105)];}catch(_0x57f90a){throw new Error(_0x1d9653(0x124));}});},B=new WeakSet(),wt=function(){return a(this,null,function*(){const _0x2c1e9e=_0x55ec;if(!localStorage[_0x2c1e9e(0x104)]('attributes')){let _0x5568b0=(yield s(this,ot,te)[_0x2c1e9e(0x19f)](this))[_0x2c1e9e(0x105)];_0x5568b0&&(m(this,x,_0x5568b0),localStorage[_0x2c1e9e(0x186)](_0x2c1e9e(0x132),JSON[_0x2c1e9e(0x164)](u(this,x))));}});},ot=new WeakSet(),te=function(){return a(this,null,function*(){const _0x38978e=_0x55ec;try{return(yield y['get'](''+ht))[_0x38978e(0x105)];}catch(_0x4e2679){throw new Error(_0x38978e(0x11f));}});},b=new WeakSet(),Y=function(_0x29dd5e){return a(this,null,function*(){const _0x5c134f=_0x55ec;if(!_0x29dd5e){let _0x348e39=localStorage[_0x5c134f(0x104)](_0x5c134f(0x194));if(_0x348e39){m(this,v,_0x348e39);return;}}let _0x4c3676={'deviceId':localStorage[_0x5c134f(0x104)](_0x5c134f(0x16e))||(0x0,ft['v4'])(),'os':u(this,D)};_0x29dd5e&&(_0x4c3676[_0x5c134f(0x19a)]=_0x29dd5e);try{let _0x397447=(yield s(this,it,ee)[_0x5c134f(0x19f)](this,_0x4c3676))[_0x5c134f(0x105)];_0x397447!==void 0x0&&(m(this,v,_0x397447),localStorage[_0x5c134f(0x186)](_0x5c134f(0x194),u(this,v)));}catch(_0x5dd099){throw new Error('Error\x20setting\x20identity');}});},it=new WeakSet(),ee=function(_0x5c6c0b){return a(this,null,function*(){const _0x1c598f=_0x55ec;try{return(yield y['post'](''+kt+Jt,_0x5c6c0b))[_0x1c598f(0x105)];}catch(_0x30af88){throw new Error(_0x1c598f(0x117));}});},F=new WeakSet(),bt=function(){const _0x13a7ce=_0x4df8fc;let _0x4c3ab3=s(this,nt,re)['call'](this);if(_0x4c3ab3){let _0x15c113=_0x4c3ab3[_0x13a7ce(0x17f)],_0x1b4e9e=_0x4c3ab3[_0x13a7ce(0x18f)];_0x4c3ab3[_0x13a7ce(0x178)]?s(this,st,oe)[_0x13a7ce(0x19f)](this,_0x4c3ab3,_0x15c113,_0x1b4e9e):s(this,M,Rt)[_0x13a7ce(0x19f)](this,_0x15c113,_0x1b4e9e);}},nt=new WeakSet(),re=function(){const _0x31daa6=_0x4df8fc;let _0x161b9f=localStorage[_0x31daa6(0x104)](_0x31daa6(0x142));return _0x161b9f?JSON['parse'](_0x161b9f):null;},st=new WeakSet(),oe=function(_0xb27ac5,_0x272194,_0x598403){const _0x2933d7=_0x4df8fc;let _0x3a279d=parseInt(_0xb27ac5[_0x2933d7(0x197)],0xa)+_0xb27ac5['delay']-new Date()[_0x2933d7(0x123)]();_0x3a279d>0x0&&_0xb27ac5[_0x2933d7(0x10c)]===window[_0x2933d7(0x11d)][_0x2933d7(0x14f)]+window[_0x2933d7(0x11d)][_0x2933d7(0x128)]&&setTimeout(()=>{const _0x53342e=_0x2933d7;u(this,V)['call'](this),s(this,M,Rt)[_0x53342e(0x19f)](this,_0x272194,_0x598403);},_0x3a279d);},M=new WeakSet(),Rt=function(_0x74a14,_0x7feba7){const _0x290a13=_0x4df8fc;let _0x3518ea=s(this,at,ie)['call'](this,_0x290a13(0x12b),_0x74a14,_0x7feba7);document[_0x290a13(0x166)]['appendChild'](_0x3518ea),u(this,V)['call'](this);},at=new WeakSet(),ie=function(_0x104306,_0xb8f588,_0x3bda79){const _0x325a61=_0x4df8fc;var _0x1c98d1;let _0x4abb20=document[_0x325a61(0x17a)](_0x104306);return _0x4abb20['id']=_0x325a61(0x135)+_0x3bda79,_0x4abb20[_0x325a61(0x15b)]=_0xb8f588,_0x4abb20[_0x325a61(0x13e)](_0x325a61(0x118))[_0x325a61(0x162)]((_0x1f026d,_0x16c2ea)=>{const _0x98eb3b=_0x325a61;_0x1f026d[_0x98eb3b(0x182)](_0x98eb3b(0x111),_0xef80f8=>a(this,null,function*(){const _0xf88b7c=_0x98eb3b;_0xef80f8['preventDefault']();let _0x4a8cfa=new FormData(_0x1f026d),_0x29dc13={};for(let [_0x275e19,_0x375dcb]of _0x4a8cfa['entries']())_0x29dc13[_0x275e19]=_0x375dcb,console['log']('Name:\x20'+_0x275e19+_0xf88b7c(0x159)+_0x375dcb);yield this[_0xf88b7c(0x151)](_0xf88b7c(0x121),[{'eventProperty':_0xf88b7c(0x144),'value':_0x3bda79},{'eventProperty':'Form\x20'+(_0x16c2ea+0x1)+_0xf88b7c(0x177),'value':_0x29dc13}]);}));}),(_0x1c98d1=_0x4abb20['querySelector'](_0x325a61(0x114)))==null||_0x1c98d1['addEventListener'](_0x325a61(0x155),()=>a(this,null,function*(){const _0x2bb713=_0x325a61;_0x4abb20[_0x2bb713(0x17b)](),yield this[_0x2bb713(0x151)](_0x2bb713(0x11b),[{'eventProperty':_0x2bb713(0x144),'value':_0x3bda79}]);})),_0x4abb20['querySelectorAll'](_0x325a61(0x172))[_0x325a61(0x162)](_0xe7875=>{const _0x4fba87=_0x325a61;_0xe7875['addEventListener'](_0x4fba87(0x155),()=>a(this,null,function*(){const _0x5d98aa=_0x4fba87;yield this['recordEvent'](_0x5d98aa(0x11b),[{'eventProperty':_0x5d98aa(0x144),'value':_0x3bda79}]);}));}),_0x4abb20[_0x325a61(0x13e)](_0x325a61(0x106))['forEach'](_0x1c5934=>{const _0x4833c6=_0x325a61;_0x1c5934[_0x4833c6(0x182)](_0x4833c6(0x155),()=>a(this,null,function*(){const _0x3c733a=_0x4833c6;yield this['recordEvent'](_0x3c733a(0x14b),[{'eventProperty':_0x3c733a(0x144),'value':_0x3bda79}]);}));}),_0x4abb20;},ct=new WeakSet(),ne=function(){const _0x3dfea5=_0x4df8fc;let _0x23bfbb=localStorage[_0x3dfea5(0x104)]('events');return _0x23bfbb?JSON[_0x3dfea5(0x119)](_0x23bfbb):{};},lt=new WeakSet(),se=function(_0x379c66,_0x27c040,_0x2a1f58){const _0xcd4adb=_0x4df8fc;if(!_0x379c66['hasOwnProperty'](_0x27c040))return _0xcd4adb(0x158)+_0x27c040+_0xcd4adb(0x136);if(!_0x2a1f58)return[];let _0x839444=_0x379c66[_0x27c040];if(!(_0x839444!=null&&_0x839444[_0xcd4adb(0x116)]))return _0xcd4adb(0x158)+_0x27c040+_0xcd4adb(0x18d);let _0x3c270c=_0x2a1f58[_0xcd4adb(0x14a)](({eventProperty:_0x46ccc7})=>!_0x839444[_0xcd4adb(0x116)][_0xcd4adb(0x122)](_0x46ccc7))[_0xcd4adb(0x109)](({eventProperty:_0x1f55d6})=>_0x1f55d6);return _0x3c270c[_0xcd4adb(0x184)]>0x0?_0xcd4adb(0x158)+_0x27c040+_0xcd4adb(0x16d)+_0x3c270c[_0xcd4adb(0x10f)](',\x20')+'.':_0x2a1f58[_0xcd4adb(0x109)](({eventProperty:_0x1424da,value:_0x2d5ef7})=>({'eventPropertyId':_0x839444[_0xcd4adb(0x116)][_0x1424da]['id'],'value':_0x2d5ef7}));},k=new WeakSet(),Pt=function(_0x355a14,_0x5def48){const _0x2121df=_0x4df8fc;let _0x185210=[{'customerId':localStorage[_0x2121df(0x104)](_0x2121df(0x194))||'0','events':[{'eventId':_0x355a14}]}];return _0x5def48&&(_0x185210[0x0]['events'][0x0]['eventProperties']=_0x5def48),_0x185210;},ut=new WeakSet(),ae=function(_0x22298f){return a(this,null,function*(){const _0x538470=_0x55ec;try{return yield y[_0x538470(0x179)](''+q+Ft,_0x22298f);}catch(_0x1c2461){throw new Error(_0x538470(0x188));}});},dt=new WeakSet(),ce=function(_0x4bee84){const _0x59ed29=_0x4df8fc;return(_0x4bee84==null?void 0x0:_0x4bee84[_0x59ed29(0x198)])===_0x59ed29(0x148);},pt=new WeakSet(),le=function(_0x3ce6f5){const _0x364abb=_0x4df8fc;localStorage[_0x364abb(0x186)](_0x364abb(0x142),JSON[_0x364abb(0x164)](Et(gt({},_0x3ce6f5),{'initialTime':''+new Date()['getTime']()})));},J=new WeakSet(),At=function(){const _0x50708c=_0x4df8fc;localStorage['removeItem'](_0x50708c(0x142)),localStorage['removeItem'](_0x50708c(0x174)),localStorage['removeItem'](_0x50708c(0x132)),localStorage['removeItem'](_0x50708c(0x12e));},Q=new WeakSet(),Ut=function(){return a(this,null,function*(){const _0x475076=_0x55ec;localStorage[_0x475076(0x104)]('attributes')||(yield s(this,B,wt)[_0x475076(0x19f)](this));});},j=new WeakSet(),Ot=function(_0x5ac031){return a(this,null,function*(){const _0x3c9227=_0x55ec;try{return yield y[_0x3c9227(0x179)](''+ht+Bt,_0x5ac031);}catch(_0x13c230){throw new Error(_0x3c9227(0x11c));}});},i(I,w,void 0x0);var It=I,ue=It['getInstance'](),Te=ue;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x102e79=_0x2461;(function(_0xb22c39,_0x2ce1a7){const _0x3ea33e=_0x2461,_0x1933de=_0xb22c39();while(!![]){try{const _0x4e4be6=-parseInt(_0x3ea33e(0xbb))/0x1*(-parseInt(_0x3ea33e(0xb2))/0x2)+parseInt(_0x3ea33e(0xfa))/0x3+-parseInt(_0x3ea33e(0xd6))/0x4*(parseInt(_0x3ea33e(0xd3))/0x5)+parseInt(_0x3ea33e(0xeb))/0x6+-parseInt(_0x3ea33e(0x103))/0x7*(-parseInt(_0x3ea33e(0xce))/0x8)+-parseInt(_0x3ea33e(0xae))/0x9*(-parseInt(_0x3ea33e(0x10f))/0xa)+-parseInt(_0x3ea33e(0xf6))/0xb;if(_0x4e4be6===_0x2ce1a7)break;else _0x1933de['push'](_0x1933de['shift']());}catch(_0x28c43c){_0x1933de['push'](_0x1933de['shift']());}}}(_0xf6f0,0x21a93));var re=Object[_0x102e79(0xd9)],oe=Object[_0x102e79(0xb9)],ie=Object[_0x102e79(0xe9)],Ut=Object[_0x102e79(0xf5)],ne=Object['prototype'][_0x102e79(0xea)],se=Object[_0x102e79(0x11b)][_0x102e79(0xe8)],Ot=(_0x469973,_0x594e2e,_0x599016)=>_0x594e2e in _0x469973?re(_0x469973,_0x594e2e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x599016}):_0x469973[_0x594e2e]=_0x599016,dt=(_0x1f542a,_0x3f8c5f)=>{for(var _0x4018d3 in _0x3f8c5f||(_0x3f8c5f={}))ne['call'](_0x3f8c5f,_0x4018d3)&&Ot(_0x1f542a,_0x4018d3,_0x3f8c5f[_0x4018d3]);if(Ut){for(var _0x4018d3 of Ut(_0x3f8c5f))se['call'](_0x3f8c5f,_0x4018d3)&&Ot(_0x1f542a,_0x4018d3,_0x3f8c5f[_0x4018d3]);}return _0x1f542a;},pt=(_0xec5627,_0x466806)=>oe(_0xec5627,ie(_0x466806)),gt=(_0x5763df,_0x291922,_0x5c946c)=>{const _0x25b6c3=_0x102e79;if(!_0x291922['has'](_0x5763df))throw TypeError(_0x25b6c3(0xe6)+_0x5c946c);},u=(_0x4d9ba7,_0x2718ba,_0x2c1ea8)=>(gt(_0x4d9ba7,_0x2718ba,'read\x20from\x20private\x20field'),_0x2c1ea8?_0x2c1ea8[_0x102e79(0xc5)](_0x4d9ba7):_0x2718ba[_0x102e79(0xb5)](_0x4d9ba7)),i=(_0x1e07a0,_0x47e0df,_0x39b9ab)=>{const _0x441f3f=_0x102e79;if(_0x47e0df['has'](_0x1e07a0))throw TypeError(_0x441f3f(0xb7));_0x47e0df instanceof WeakSet?_0x47e0df[_0x441f3f(0xe0)](_0x1e07a0):_0x47e0df[_0x441f3f(0x11a)](_0x1e07a0,_0x39b9ab);},E=(_0x411b69,_0x53a6dc,_0x4f937c,_0x349275)=>(gt(_0x411b69,_0x53a6dc,_0x102e79(0x10e)),_0x349275?_0x349275[_0x102e79(0xc5)](_0x411b69,_0x4f937c):_0x53a6dc['set'](_0x411b69,_0x4f937c),_0x4f937c),Nt=(_0xfb280d,_0x10b186,_0xb6fe54,_0x1b0eae)=>({set '_'(_0x533017){E(_0xfb280d,_0x10b186,_0x533017,_0xb6fe54);},get '_'(){return u(_0xfb280d,_0x10b186,_0x1b0eae);}}),n=(_0x345f21,_0x38bb9b,_0x4d5905)=>(gt(_0x345f21,_0x38bb9b,_0x102e79(0xb3)),_0x4d5905),a=(_0x362c91,_0xac63d8,_0x18d2e3)=>new Promise((_0x1dba41,_0x8da0ff)=>{const _0x24ccab=_0x102e79;var _0x2b5fed=_0x1a4d76=>{try{_0x1528f9(_0x18d2e3['next'](_0x1a4d76));}catch(_0x521ee3){_0x8da0ff(_0x521ee3);}},_0x311b0a=_0x56a9d2=>{try{_0x1528f9(_0x18d2e3['throw'](_0x56a9d2));}catch(_0xd71bfb){_0x8da0ff(_0xd71bfb);}},_0x1528f9=_0x139301=>_0x139301[_0x24ccab(0xfe)]?_0x1dba41(_0x139301[_0x24ccab(0x114)]):Promise['resolve'](_0x139301['value'])['then'](_0x2b5fed,_0x311b0a);_0x1528f9((_0x18d2e3=_0x18d2e3[_0x24ccab(0x119)](_0x362c91,_0xac63d8))['next']());});import{v4 as _0x545129}from'uuid';var Lt=_0x102e79(0x120),Et=_0x102e79(0xec),xt=_0x102e79(0xfb),J=_0x102e79(0xdb),Dt='/record-event',_t=_0x102e79(0x111),Ct=_0x102e79(0xba),$t=_0x102e79(0x116);import _0x4f380e from'axios';import{AxiosQueueManager as _0x30ea77}from'axios-queue-js';import _0x3dd9c8 from'axios-retry';import{AxiosError as _0xdf195}from'axios';var c=class extends Error{constructor(_0x59cf3e){const _0x1a0954=_0x102e79;super(_0x59cf3e),this[_0x1a0954(0xdd)]=_0x1a0954(0xf0);}};c['disableSDK']=!0x1,c[_0x102e79(0xd7)]=!navigator['onLine'],c[_0x102e79(0xdf)]=!0x1,c[_0x102e79(0x10c)]=!0x1;var ce=(_0x44d697,_0xb5017f)=>{const _0x4834bd=_0x102e79;_0xb5017f instanceof c?console[_0x4834bd(0x124)](_0x4834bd(0xf2)+_0x44d697,'MergnError:\x20'+_0xb5017f[_0x4834bd(0x104)]):_0xb5017f instanceof _0xdf195?(console[_0x4834bd(0x124)](_0x4834bd(0xf2)+_0x44d697,_0x4834bd(0xb4)+_0xb5017f['message']),_0xb5017f[_0x4834bd(0xf4)]?(console['error'](_0x4834bd(0xf2)+_0x44d697,'HTTP\x20Status:\x20'+_0xb5017f[_0x4834bd(0xf4)][_0x4834bd(0x11e)]),console['error'](_0x4834bd(0xf2)+_0x44d697,_0x4834bd(0xda),_0xb5017f['response'][_0x4834bd(0xe7)])):_0xb5017f[_0x4834bd(0xf7)]?console[_0x4834bd(0x124)](_0x4834bd(0xf2)+_0x44d697+'\x0aNo\x20response\x20received.\x20Check\x20network\x20connection\x20or\x20server\x20issues.'):console[_0x4834bd(0x124)](_0x4834bd(0xf2)+_0x44d697,_0x4834bd(0xe4),_0xb5017f['message'])):_0xb5017f instanceof Error?console[_0x4834bd(0x124)](_0x4834bd(0xf2)+_0x44d697,'Unexpected\x20error:',_0xb5017f['message']):console[_0x4834bd(0x124)](_0x4834bd(0xf2)+_0x44d697,_0x4834bd(0xac),String(_0xb5017f));},f=(_0x588f29,_0x387d46,_0x172629)=>a(void 0x0,null,function*(){const _0x278ee6=_0x102e79;try{if(c[_0x278ee6(0xcb)])throw new c('Mergn\x20SDK\x20is\x20disabled!');if(_0x588f29!==_0x278ee6(0xe0)&&c[_0x278ee6(0xd7)])throw new c(_0x278ee6(0x10d));if(_0x588f29!==_0x278ee6(0x100)&&!c['isInitialized'])throw new c(_0x278ee6(0x10b));return yield _0x387d46();}catch(_0x55c9ca){return _0x172629?_0x172629(_0x55c9ca):c['showErrorLog']&&ce(_0x588f29,_0x55c9ca),null;}}),I,b,R,P,Q,A,mt,j,Vt,d=class d{constructor(){const _0xa6eb29=_0x102e79;i(this,Q,0x0);let _0x22857e=_0x4f380e[_0xa6eb29(0x123)]({'baseURL':Lt,'headers':{'Content-Type':_0xa6eb29(0xfc)}});E(d,b,_0x22857e),E(d,R,new _0x30ea77({'client':_0x22857e,'queueSize':0xa})),_0x3dd9c8(_0x22857e,{'onRetry':_0x3c0796=>{const _0x2b8c7a=_0xa6eb29;_0x3c0796>=u(d,P)?(c[_0x2b8c7a(0xdf)]&&console[_0x2b8c7a(0x105)](_0x2b8c7a(0xd0)),c[_0x2b8c7a(0xcb)]=!0x0):Nt(this,Q)['_']++;},'retries':u(d,P),'retryDelay':_0x502f10=>_0x502f10*0x1388});}static['updateAPIKey'](_0x3b9230){const _0x33159a=_0x102e79;this[_0x33159a(0xcc)]=_0x3b9230,n(this,j,Vt)[_0x33159a(0xc5)](this)['defaults'][_0x33159a(0x102)][_0x33159a(0x122)]['Authorization']=_0x3b9230;}static[_0x102e79(0xb5)](_0x54c755){return n(this,A,mt)['call'](this)['get'](_0x54c755);}static['post'](_0x42e249,_0x33adb0){return n(this,A,mt)['call'](this)['post'](_0x42e249,_0x33adb0||{});}};function _0x2461(_0x5e41a0,_0x124556){const _0xf6f05d=_0xf6f0();return _0x2461=function(_0x246178,_0x1ec865){_0x246178=_0x246178-0xaa;let _0x23eeeb=_0xf6f05d[_0x246178];return _0x23eeeb;},_0x2461(_0x5e41a0,_0x124556);}I=new WeakMap(),b=new WeakMap(),R=new WeakMap(),P=new WeakMap(),Q=new WeakMap(),A=new WeakSet(),mt=function(){return u(d,I)||E(d,I,new d()),u(d,R);},j=new WeakSet(),Vt=function(){return u(d,I)||E(d,I,new d()),u(d,b);},i(d,A),i(d,j),i(d,I,void 0x0),i(d,b,void 0x0),i(d,R,void 0x0),i(d,P,0x3);function _0xf6f0(){const _0x17b1d9=['name','uniqueIdentity','showErrorLog','add','logout','querySelector','UTM\x20Key\x20Value','Error\x20setting\x20up\x20the\x20request:','Campaign\x20Id','Cannot\x20','data','propertyIsEnumerable','getOwnPropertyDescriptors','hasOwnProperty','1397202yIldxz','/attribute','Viewed\x20Web\x20Page','getItem','identity','MergnError','initialTime','OriginateFrom:\x20','remove','response','getOwnPropertySymbols','6185960QNtSVM','request','keys','innerHTML','536808gMosUx','/record-attribute','application/json','attributes','done','recordAttribute','init','\x20has\x20invalid\x20eventProperties:\x20','headers','14uIoCLa','message','log','parse','Popup','recordEvent','\x20does\x20not\x20have\x20a\x20valid\x20eventProperty.','filter','Mergn\x20not\x20initialized!','isInitialized','Mergn\x20is\x20offline!','write\x20to\x20private\x20field','980RlMvyy','delay','/record-bulk-event','.u-popup-container\x20img','Popup\x20Button\x20Clicked','value','design','/set-identity','getInstance','offlineEvents','apply','set','prototype','hostname','eventProperties','status','pushState','https://95sidwa5jk.execute-api.ap-southeast-1.amazonaws.com/Prod/sdk-management/api','beforeunload','common','create','error','action','div','map','post','User\x20Login','Unexpected\x20error:','stringify','1926BAAvEN','addEventListener','Event\x20','.u-close-button','2644qYHKAW','access\x20private\x20method','AxiosError:\x20','get','pathname','Cannot\x20add\x20the\x20same\x20private\x20member\x20more\x20than\x20once','[id^=\x22u_content_button_\x22]','defineProperties','/customer','175xTdwgv','removeItem','page','Popup\x20Image\x20Clicked','Error\x20setting\x20identity','Error\x20posting\x20identity\x20data','forEach','customer','online','click','call','platform','location','Customer\x20Id','length','getTime','disableSDK','apiKey','load','753744mcyVws','Error\x20posting\x20event\x20record','Max\x20retries\x20reached.\x20Disabling\x20SDK.','URL','events','761630GuyQuo','ttl','setItem','4ymYuSW','offline','join','defineProperty','Response\x20Data:','/event','eventProperty'];_0xf6f0=function(){return _0x17b1d9;};return _0xf6f0();}var ht=d,y=ht,S,v,U,O,N,L,x,vt,D,It,z,Ft,K,Mt,Y,kt,H,_,W,G,Jt,X,Qt,Z,jt,C,Tt,tt,qt,w,q,et,zt,$,ft,rt,Kt,ot,Yt,V,St,it,Ht,nt,Wt,st,Gt,B,wt,at,Xt,ct,Zt,lt,te,F,bt,M,Rt,k,Pt,T=class T{constructor(){const _0x5c5249=_0x102e79;i(this,x),i(this,D),i(this,z),i(this,K),i(this,Y),i(this,G),i(this,X),i(this,Z),i(this,C),i(this,tt),i(this,w),i(this,et),i(this,$),i(this,rt),i(this,ot),i(this,V),i(this,it),i(this,nt),i(this,st),i(this,B),i(this,at),i(this,ct),i(this,lt),i(this,F),i(this,M),i(this,k),i(this,v,''),i(this,U,void 0x0),i(this,O,void 0x0),i(this,N,void 0x0),i(this,L,null),i(this,H,()=>{const _0x3a38c1=_0x2461;let _0x14b9a0=()=>{const _0x14e3e7=_0x2461;let _0x212df7=JSON[_0x14e3e7(0x106)](localStorage[_0x14e3e7(0xee)](_0x14e3e7(0x125)));_0x212df7&&localStorage['setItem'](_0x14e3e7(0x125),JSON[_0x14e3e7(0xad)](pt(dt({},_0x212df7),{'initialTime':''+new Date()['getTime'](),'page':window['location']['hostname']+window[_0x14e3e7(0xc7)][_0x14e3e7(0xb6)]})));};_0x14b9a0(),window[_0x3a38c1(0xaf)](_0x3a38c1(0x121),_0x14b9a0);}),i(this,_,()=>{const _0x40333c=_0x2461;localStorage['removeItem'](_0x40333c(0x125));}),i(this,W,()=>{const _0x2d85ec=_0x2461;let _0x5d2776=JSON[_0x2d85ec(0x106)](localStorage[_0x2d85ec(0xee)](_0x2d85ec(0x125))||'{}');(_0x5d2776==null?void 0x0:_0x5d2776[_0x2d85ec(0xdd)])===_0x2d85ec(0x107)&&n(this,$,ft)[_0x2d85ec(0xc5)](this);}),E(this,N,navigator[_0x5c5249(0xc6)]);}static[_0x102e79(0x117)](){return u(T,S)||E(T,S,new T()),u(T,S);}[_0x102e79(0x100)](_0x3b6d2e){const _0x14ab1e=_0x102e79;f(_0x14ab1e(0x100),()=>a(this,null,function*(){const _0x4b58f4=_0x14ab1e;n(this,z,Ft)[_0x4b58f4(0xc5)](this,_0x3b6d2e),yield n(this,x,vt)[_0x4b58f4(0xc5)](this),setInterval(()=>a(this,null,function*(){const _0x4514b2=_0x4b58f4;yield n(this,x,vt)[_0x4514b2(0xc5)](this);}),0x493e0);let _0x1cd61a=localStorage['getItem'](_0x4b58f4(0xd4)),_0x1a15cb=!0x1;_0x1cd61a&&(_0x1a15cb=new Date()[_0x4b58f4(0xca)]()-parseInt(_0x1cd61a,0xa)>0x1b7740,_0x1a15cb&&n(this,F,bt)[_0x4b58f4(0xc5)](this)),(!_0x1cd61a||_0x1a15cb||n(this,K,Mt)[_0x4b58f4(0xc5)](this))&&(n(this,G,Jt)['call'](this),yield n(this,w,q)[_0x4b58f4(0xc5)](this),yield n(this,Y,kt)[_0x4b58f4(0xc5)](this)),window['addEventListener'](_0x4b58f4(0xc3),()=>a(this,null,function*(){const _0x4251cd=_0x4b58f4;c['offline']=!0x1;let _0x269541=JSON[_0x4251cd(0x106)](localStorage[_0x4251cd(0xee)](_0x4251cd(0x118))||'[]');Array['isArray'](_0x269541)&&(yield y[_0x4251cd(0xaa)](''+J+_t,[{'customerId':u(this,v),'events':_0x269541}]),localStorage['removeItem'](_0x4251cd(0x118)));})),window[_0x4b58f4(0xaf)](_0x4b58f4(0xd7),()=>{c['offline']=!0x0;}),window[_0x4b58f4(0xaf)](_0x4b58f4(0xcd),()=>{u(this,W)['call'](this);}),c['isInitialized']=!0x0;let _0x452079=history[_0x4b58f4(0x11f)];history[_0x4b58f4(0x11f)]=(..._0x5072a7)=>{const _0x110be0=_0x4b58f4;_0x452079[_0x110be0(0x119)](history,_0x5072a7),n(this,D,It)['call'](this);},n(this,D,It)['call'](this);}));}['showErrorLog'](_0x15c1e2=!0x1){const _0x4fb2eb=_0x102e79;c[_0x4fb2eb(0xdf)]=_0x15c1e2;}[_0x102e79(0xff)](_0x3a1d13){return a(this,null,function*(){const _0x43730a=_0x2461;yield f(_0x43730a(0xff),()=>a(this,null,function*(){const _0xc7c795=_0x43730a;yield n(this,M,Rt)[_0xc7c795(0xc5)](this);let _0x4447d8=JSON[_0xc7c795(0x106)](localStorage[_0xc7c795(0xee)](_0xc7c795(0xfd))||'{}');if(_0x4447d8&&Object['keys'](_0x4447d8)['length']>0x0){let _0x4bc13d=[];_0x3a1d13&&Object[_0xc7c795(0xf8)](_0x3a1d13)['length']>0x0&&Object[_0xc7c795(0xf8)](_0x3a1d13)[_0xc7c795(0xc1)](_0x273f69=>{const _0x1b8947=_0xc7c795;_0x4447d8[_0x1b8947(0xea)](_0x273f69)&&_0x4bc13d['push']({'attributeId':_0x4447d8[_0x273f69]['id'],'attributeProperties':[],'value':_0x3a1d13[_0x273f69]});});let _0x160c57=[{'attributes':_0x4bc13d,'customerId':u(this,v)}];yield n(this,k,Pt)[_0xc7c795(0xc5)](this,_0x160c57);}}));});}['login'](_0x525535){return a(this,null,function*(){yield f('login',()=>a(this,null,function*(){const _0x1f76f5=_0x2461;yield n(this,w,q)[_0x1f76f5(0xc5)](this,_0x525535),yield this[_0x1f76f5(0x108)](_0x1f76f5(0xab),[{'eventProperty':_0x1f76f5(0xc8),'value':localStorage[_0x1f76f5(0xee)](_0x1f76f5(0xc2))||0x0}]);}));});}['updateAttribute'](_0x21b69c,_0x8a19df,_0x1ccbe8){return a(this,null,function*(){const _0x39e69f=_0x2461;yield n(this,M,Rt)[_0x39e69f(0xc5)](this);let _0x42ec3c=JSON[_0x39e69f(0x106)](localStorage[_0x39e69f(0xee)](_0x39e69f(0xfd))||'{}');if(_0x42ec3c&&Object[_0x39e69f(0xf8)](_0x42ec3c)[_0x39e69f(0xc9)]>0x0&&_0x42ec3c[_0x39e69f(0xea)](_0x21b69c)){let _0x31dedf=_0x42ec3c[_0x21b69c],_0x14c569=_0x31dedf['attributeProperty'],_0x3da171=[];_0x1ccbe8&&Object[_0x39e69f(0xf8)](_0x1ccbe8)[_0x39e69f(0xc9)]>0x0&&Object[_0x39e69f(0xf8)](_0x1ccbe8)['forEach'](_0x20261d=>{const _0x4427f2=_0x39e69f;_0x14c569[_0x4427f2(0xea)](_0x20261d)&&_0x3da171['push']({'attributePropertyId':_0x14c569[_0x20261d]['id'],'value':_0x1ccbe8[_0x20261d]});});let _0x25a344=[{'attributes':[{'attributeId':_0x31dedf['id'],'attributeProperties':_0x3da171,'value':_0x8a19df}],'customerId':u(this,v)}];yield n(this,k,Pt)[_0x39e69f(0xc5)](this,_0x25a344);}});}[_0x102e79(0xe1)](){return a(this,null,function*(){yield f('logout',()=>a(this,null,function*(){const _0x334850=_0x2461;n(this,F,bt)[_0x334850(0xc5)](this),this[_0x334850(0x108)]('User\x20Logout',[{'eventProperty':_0x334850(0xc8),'value':localStorage[_0x334850(0xee)]('customer')||0x0}]);}));});}[_0x102e79(0x108)](_0x2d8584,_0xb3d1d9){return a(this,null,function*(){yield f('add',()=>a(this,null,function*(){const _0x491c97=_0x2461;var _0x4ecf3f,_0x2b6c35;let _0x5334b5=n(this,nt,Wt)[_0x491c97(0xc5)](this),_0xc32990=n(this,st,Gt)[_0x491c97(0xc5)](this,_0x5334b5,_0x2d8584,_0xb3d1d9);if(typeof _0xc32990=='string'){c[_0x491c97(0xdf)]&&console[_0x491c97(0x124)](_0xc32990);return;}let {id:_0x810596}=_0x5334b5[_0x2d8584];if(c[_0x491c97(0xd7)]){let _0x2b3005=JSON[_0x491c97(0x106)](localStorage[_0x491c97(0xee)](_0x491c97(0x118))||'[]');if(_0x2b3005[_0x491c97(0xc9)]<=0x32){let _0x1b783a={'eventId':_0x810596};_0xb3d1d9&&(_0x1b783a[_0x491c97(0x11d)]=_0xc32990),_0x2b3005['push'](_0x1b783a),localStorage[_0x491c97(0xd5)]('offlineEvents',JSON['stringify'](_0x2b3005));}return;}let _0x366f0a=_0xb3d1d9?n(this,B,wt)[_0x491c97(0xc5)](this,_0x810596,_0xc32990):n(this,B,wt)[_0x491c97(0xc5)](this,_0x810596),_0x3fcd0c=yield n(this,at,Xt)[_0x491c97(0xc5)](this,_0x366f0a);n(this,ct,Zt)[_0x491c97(0xc5)](this,(_0x4ecf3f=_0x3fcd0c==null?void 0x0:_0x3fcd0c['data'])==null?void 0x0:_0x4ecf3f[_0x491c97(0xe7)])&&(n(this,lt,te)[_0x491c97(0xc5)](this,(_0x2b6c35=_0x3fcd0c==null?void 0x0:_0x3fcd0c[_0x491c97(0xe7)])==null?void 0x0:_0x2b6c35[_0x491c97(0xe7)]),u(this,H)[_0x491c97(0xc5)](this),n(this,$,ft)['call'](this));}));});}};S=new WeakMap(),v=new WeakMap(),U=new WeakMap(),O=new WeakMap(),N=new WeakMap(),L=new WeakMap(),x=new WeakSet(),vt=function(){return a(this,null,function*(){const _0x119152=_0x2461;try{yield y[_0x119152(0xb5)]('brand');}catch(_0x59a9f3){c[_0x119152(0xcb)]=!0x0,c['showErrorLog']&&console[_0x119152(0x124)](_0x59a9f3[_0x119152(0x104)]);}});},D=new WeakSet(),It=function(){return a(this,null,function*(){const _0x4dd1e0=_0x2461;let _0x4733f6=window[_0x4dd1e0(0xc7)][_0x4dd1e0(0x11c)]+window[_0x4dd1e0(0xc7)][_0x4dd1e0(0xb6)];yield this['recordEvent'](_0x4dd1e0(0xed),[{'eventProperty':_0x4dd1e0(0xd1),'value':_0x4733f6}]),_0x4733f6!==u(this,L)&&(E(this,L,_0x4733f6),new URLSearchParams(new URL(window[_0x4dd1e0(0xc7)]['href'])['search'])[_0x4dd1e0(0xc1)]((_0x4f93a9,_0x278325)=>a(this,null,function*(){const _0x5b7cdf=_0x4dd1e0;yield this[_0x5b7cdf(0x108)](_0x5b7cdf(0xed),[{'eventProperty':_0x5b7cdf(0xe3),'value':_0x278325+':'+_0x4f93a9}]);})));});},z=new WeakSet(),Ft=function(_0x35ff17){y['updateAPIKey'](_0x35ff17);},K=new WeakSet(),Mt=function(){const _0xa8704c=_0x102e79;return!localStorage[_0xa8704c(0xee)](_0xa8704c(0xd2))||!localStorage[_0xa8704c(0xee)](_0xa8704c(0xc2))||!localStorage[_0xa8704c(0xee)](_0xa8704c(0xfd))||!localStorage[_0xa8704c(0xee)](_0xa8704c(0xde));},Y=new WeakSet(),kt=function(){return a(this,null,function*(){const _0x48abbf=_0x2461;yield n(this,X,Qt)[_0x48abbf(0xc5)](this),yield n(this,C,Tt)[_0x48abbf(0xc5)](this),yield n(this,w,q)[_0x48abbf(0xc5)](this);});},H=new WeakMap(),_=new WeakMap(),W=new WeakMap(),G=new WeakSet(),Jt=function(){const _0x194996=_0x102e79;let _0x42625c=localStorage[_0x194996(0xee)](_0x194996(0xde));return _0x42625c||(_0x42625c=_0x545129(),localStorage['setItem'](_0x194996(0xde),_0x42625c)),_0x42625c;},X=new WeakSet(),Qt=function(){return a(this,null,function*(){const _0x5d8014=_0x2461;if(!localStorage['getItem'](_0x5d8014(0xd2))){let _0x18bdf5=(yield n(this,Z,jt)[_0x5d8014(0xc5)](this))['data'];_0x18bdf5&&(E(this,U,_0x18bdf5),localStorage['setItem']('events',JSON[_0x5d8014(0xad)](u(this,U))));}});},Z=new WeakSet(),jt=function(){return a(this,null,function*(){const _0x1b620b=_0x2461;try{return(yield y[_0x1b620b(0xb5)](''+J))[_0x1b620b(0xe7)];}catch(_0x488c5f){throw new Error('Error\x20fetching\x20event\x20data');}});},C=new WeakSet(),Tt=function(){return a(this,null,function*(){const _0x1022d2=_0x2461;if(!localStorage[_0x1022d2(0xee)](_0x1022d2(0xfd))){let _0x344f4a=(yield n(this,tt,qt)[_0x1022d2(0xc5)](this))[_0x1022d2(0xe7)];_0x344f4a&&(E(this,O,_0x344f4a),localStorage['setItem'](_0x1022d2(0xfd),JSON[_0x1022d2(0xad)](u(this,O))));}});},tt=new WeakSet(),qt=function(){return a(this,null,function*(){const _0x31b8ac=_0x2461;try{return(yield y[_0x31b8ac(0xb5)](''+Et))['data'];}catch(_0x26715a){throw new Error('Error\x20fetching\x20attribute\x20data');}});},w=new WeakSet(),q=function(_0x26ccf5){return a(this,null,function*(){const _0x379c38=_0x2461;if(!_0x26ccf5){let _0x57e6ff=localStorage[_0x379c38(0xee)](_0x379c38(0xc2));if(_0x57e6ff){E(this,v,_0x57e6ff);return;}}let _0x54c4ab={'deviceId':localStorage[_0x379c38(0xee)](_0x379c38(0xde))||_0x545129(),'os':u(this,N)};_0x26ccf5&&(_0x54c4ab[_0x379c38(0xef)]=_0x26ccf5);try{let _0x417fc2=(yield n(this,et,zt)['call'](this,_0x54c4ab))[_0x379c38(0xe7)];_0x417fc2!==void 0x0&&(E(this,v,_0x417fc2),localStorage['setItem'](_0x379c38(0xc2),u(this,v)));}catch(_0x35bcaf){throw new Error(_0x379c38(0xbf));}});},et=new WeakSet(),zt=function(_0x56c645){return a(this,null,function*(){const _0xdc7aa0=_0x2461;try{return(yield y[_0xdc7aa0(0xaa)](''+Ct+$t,_0x56c645))[_0xdc7aa0(0xe7)];}catch(_0x43664a){throw new Error(_0xdc7aa0(0xc0));}});},$=new WeakSet(),ft=function(){const _0x1e01af=_0x102e79;let _0x15f423=n(this,rt,Kt)[_0x1e01af(0xc5)](this);if(_0x15f423){let _0x3759c9=_0x15f423[_0x1e01af(0x115)],_0xe7df60=_0x15f423['campaignId'];_0x15f423[_0x1e01af(0x110)]?n(this,ot,Yt)[_0x1e01af(0xc5)](this,_0x15f423,_0x3759c9,_0xe7df60):n(this,V,St)[_0x1e01af(0xc5)](this,_0x3759c9,_0xe7df60);}},rt=new WeakSet(),Kt=function(){const _0x180645=_0x102e79;let _0x2b2123=localStorage['getItem'](_0x180645(0x125));return _0x2b2123?JSON[_0x180645(0x106)](_0x2b2123):null;},ot=new WeakSet(),Yt=function(_0x457ce8,_0x445f9c,_0x568b3a){const _0x276502=_0x102e79;let _0x5858d8=parseInt(_0x457ce8[_0x276502(0xf1)],0xa)+_0x457ce8[_0x276502(0x110)]-new Date()[_0x276502(0xca)]();_0x5858d8>0x0&&_0x457ce8[_0x276502(0xbd)]===window[_0x276502(0xc7)][_0x276502(0x11c)]+window['location'][_0x276502(0xb6)]&&setTimeout(()=>{const _0x6be1ae=_0x276502;u(this,_)[_0x6be1ae(0xc5)](this),n(this,V,St)[_0x6be1ae(0xc5)](this,_0x445f9c,_0x568b3a);},_0x5858d8);},V=new WeakSet(),St=function(_0xd45981,_0x4ea394){const _0x29199=_0x102e79;let _0x1e2dcf=n(this,it,Ht)[_0x29199(0xc5)](this,_0x29199(0x126),_0xd45981,_0x4ea394);document['body']['appendChild'](_0x1e2dcf),u(this,_)['call'](this);},it=new WeakSet(),Ht=function(_0x5e8994,_0x15cabb,_0x597929){const _0x20cc1f=_0x102e79;var _0x279df0;let _0x1f2bfc=document['createElement'](_0x5e8994);return _0x1f2bfc['id']='popup_container_'+_0x597929,_0x1f2bfc[_0x20cc1f(0xf9)]=_0x15cabb,(_0x279df0=_0x1f2bfc[_0x20cc1f(0xe2)](_0x20cc1f(0xb1)))==null||_0x279df0[_0x20cc1f(0xaf)](_0x20cc1f(0xc4),()=>a(this,null,function*(){const _0x5c5d07=_0x20cc1f;_0x1f2bfc[_0x5c5d07(0xf3)](),yield this['recordEvent']('Popup\x20Button\x20Clicked',[{'eventProperty':'Campaign\x20Id','value':_0x597929}]);})),_0x1f2bfc['querySelectorAll'](_0x20cc1f(0xb8))[_0x20cc1f(0xc1)](_0x22b113=>{const _0x1fbfa7=_0x20cc1f;_0x22b113[_0x1fbfa7(0xaf)](_0x1fbfa7(0xc4),()=>a(this,null,function*(){const _0x299825=_0x1fbfa7;yield this[_0x299825(0x108)](_0x299825(0x113),[{'eventProperty':_0x299825(0xe5),'value':_0x597929}]);}));}),_0x1f2bfc['querySelectorAll'](_0x20cc1f(0x112))[_0x20cc1f(0xc1)](_0x3dbe8b=>{const _0x24e5b6=_0x20cc1f;_0x3dbe8b[_0x24e5b6(0xaf)](_0x24e5b6(0xc4),()=>a(this,null,function*(){const _0x50e2c2=_0x24e5b6;yield this[_0x50e2c2(0x108)](_0x50e2c2(0xbe),[{'eventProperty':_0x50e2c2(0xe5),'value':_0x597929}]);}));}),_0x1f2bfc;},nt=new WeakSet(),Wt=function(){const _0x15d44c=_0x102e79;let _0x2b95f9=localStorage[_0x15d44c(0xee)]('events');return _0x2b95f9?JSON[_0x15d44c(0x106)](_0x2b95f9):{};},st=new WeakSet(),Gt=function(_0x411bf8,_0x4afad6,_0x2e593e){const _0x3313ec=_0x102e79;if(!_0x411bf8['hasOwnProperty'](_0x4afad6))return _0x3313ec(0xb0)+_0x4afad6+'\x20is\x20not\x20valid.';if(!_0x2e593e)return[];let _0x1deda2=_0x411bf8[_0x4afad6];if(!(_0x1deda2!=null&&_0x1deda2[_0x3313ec(0xdc)]))return _0x3313ec(0xb0)+_0x4afad6+_0x3313ec(0x109);let _0x838664=_0x2e593e[_0x3313ec(0x10a)](({eventProperty:_0x43521d})=>!_0x1deda2[_0x3313ec(0xdc)][_0x3313ec(0xea)](_0x43521d))[_0x3313ec(0x127)](({eventProperty:_0x5cb172})=>_0x5cb172);return _0x838664[_0x3313ec(0xc9)]>0x0?_0x3313ec(0xb0)+_0x4afad6+_0x3313ec(0x101)+_0x838664[_0x3313ec(0xd8)](',\x20')+'.':_0x2e593e[_0x3313ec(0x127)](({eventProperty:_0x4998cd,value:_0x27bb9d})=>({'eventPropertyId':_0x1deda2['eventProperty'][_0x4998cd]['id'],'value':_0x27bb9d}));},B=new WeakSet(),wt=function(_0x167a44,_0x3804f4){const _0x4fabf=_0x102e79;let _0x14c415=[{'customerId':localStorage['getItem'](_0x4fabf(0xc2))||'0','events':[{'eventId':_0x167a44}]}];return _0x3804f4&&(_0x14c415[0x0][_0x4fabf(0xd2)][0x0][_0x4fabf(0x11d)]=_0x3804f4),_0x14c415;},at=new WeakSet(),Xt=function(_0x4493fe){return a(this,null,function*(){const _0x3bfbed=_0x2461;try{return yield y['post'](''+J+Dt,_0x4493fe);}catch(_0x3464db){throw new Error(_0x3bfbed(0xcf));}});},ct=new WeakSet(),Zt=function(_0x54e022){const _0x16c8f1=_0x102e79;return(_0x54e022==null?void 0x0:_0x54e022[_0x16c8f1(0xdd)])===_0x16c8f1(0x107);},lt=new WeakSet(),te=function(_0x12e960){const _0x1add55=_0x102e79;localStorage[_0x1add55(0xd5)](_0x1add55(0x125),JSON[_0x1add55(0xad)](pt(dt({},_0x12e960),{'initialTime':''+new Date()[_0x1add55(0xca)]()})));},F=new WeakSet(),bt=function(){const _0x26ee83=_0x102e79;localStorage[_0x26ee83(0xbc)](_0x26ee83(0x125)),localStorage[_0x26ee83(0xbc)](_0x26ee83(0xd2)),localStorage[_0x26ee83(0xbc)]('attributes'),localStorage['removeItem'](_0x26ee83(0x118));},M=new WeakSet(),Rt=function(){return a(this,null,function*(){const _0x18526b=_0x2461;localStorage[_0x18526b(0xee)](_0x18526b(0xfd))||(yield n(this,C,Tt)[_0x18526b(0xc5)](this));});},k=new WeakSet(),Pt=function(_0xc3d8f4){return a(this,null,function*(){const _0x51b6e3=_0x2461;try{return yield y[_0x51b6e3(0xaa)](''+Et+xt,_0xc3d8f4);}catch(_0x30307c){throw new Error('Error\x20posting\x20attribute\x20record');}});},i(T,S,void 0x0);var yt=T,ee=yt[_0x102e79(0x117)](),Fe=ee;export{Fe as default};
|
|
1
|
+
const _0x2f5ce2=_0x32e9;(function(_0x316e95,_0x56d29c){const _0x1a1536=_0x32e9,_0x193f83=_0x316e95();while(!![]){try{const _0x3e0616=parseInt(_0x1a1536(0x1ff))/0x1*(-parseInt(_0x1a1536(0x267))/0x2)+parseInt(_0x1a1536(0x205))/0x3+parseInt(_0x1a1536(0x1ee))/0x4*(parseInt(_0x1a1536(0x22f))/0x5)+parseInt(_0x1a1536(0x21f))/0x6*(parseInt(_0x1a1536(0x225))/0x7)+-parseInt(_0x1a1536(0x250))/0x8+parseInt(_0x1a1536(0x24f))/0x9*(parseInt(_0x1a1536(0x1f9))/0xa)+-parseInt(_0x1a1536(0x25a))/0xb;if(_0x3e0616===_0x56d29c)break;else _0x193f83['push'](_0x193f83['shift']());}catch(_0x337191){_0x193f83['push'](_0x193f83['shift']());}}}(_0x1232,0xb84dd));var oe=Object[_0x2f5ce2(0x249)],ie=Object[_0x2f5ce2(0x268)],ne=Object[_0x2f5ce2(0x1fd)],Ot=Object[_0x2f5ce2(0x239)],se=Object[_0x2f5ce2(0x242)][_0x2f5ce2(0x241)],ae=Object['prototype'][_0x2f5ce2(0x21d)],Nt=(_0x3fb9d8,_0x9df29a,_0xe1bdd1)=>_0x9df29a in _0x3fb9d8?oe(_0x3fb9d8,_0x9df29a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xe1bdd1}):_0x3fb9d8[_0x9df29a]=_0xe1bdd1,pt=(_0x1ef20d,_0x1bc852)=>{const _0x49c012=_0x2f5ce2;for(var _0x5aff4c in _0x1bc852||(_0x1bc852={}))se[_0x49c012(0x245)](_0x1bc852,_0x5aff4c)&&Nt(_0x1ef20d,_0x5aff4c,_0x1bc852[_0x5aff4c]);if(Ot){for(var _0x5aff4c of Ot(_0x1bc852))ae[_0x49c012(0x245)](_0x1bc852,_0x5aff4c)&&Nt(_0x1ef20d,_0x5aff4c,_0x1bc852[_0x5aff4c]);}return _0x1ef20d;},gt=(_0x5ebde2,_0x3ae757)=>ie(_0x5ebde2,ne(_0x3ae757)),Et=(_0x13144f,_0x113f4d,_0x44d548)=>{const _0x480f6b=_0x2f5ce2;if(!_0x113f4d['has'](_0x13144f))throw TypeError(_0x480f6b(0x22c)+_0x44d548);},u=(_0x294225,_0x3c48c7,_0x5c6410)=>(Et(_0x294225,_0x3c48c7,_0x2f5ce2(0x1ea)),_0x5c6410?_0x5c6410[_0x2f5ce2(0x245)](_0x294225):_0x3c48c7['get'](_0x294225)),i=(_0x4c39d7,_0x35ea5d,_0x6431e3)=>{const _0x45aad2=_0x2f5ce2;if(_0x35ea5d['has'](_0x4c39d7))throw TypeError(_0x45aad2(0x1e8));_0x35ea5d instanceof WeakSet?_0x35ea5d[_0x45aad2(0x1fe)](_0x4c39d7):_0x35ea5d['set'](_0x4c39d7,_0x6431e3);},m=(_0x265d8c,_0x17fb2a,_0x2e5b57,_0x10f569)=>(Et(_0x265d8c,_0x17fb2a,_0x2f5ce2(0x22b)),_0x10f569?_0x10f569[_0x2f5ce2(0x245)](_0x265d8c,_0x2e5b57):_0x17fb2a[_0x2f5ce2(0x22e)](_0x265d8c,_0x2e5b57),_0x2e5b57),Lt=(_0x41f618,_0x29cf62,_0x5a6a62,_0x271de7)=>({set '_'(_0x3088cb){m(_0x41f618,_0x29cf62,_0x3088cb,_0x5a6a62);},get '_'(){return u(_0x41f618,_0x29cf62,_0x271de7);}}),n=(_0x287cfa,_0x1db845,_0xabfc62)=>(Et(_0x287cfa,_0x1db845,_0x2f5ce2(0x23c)),_0xabfc62),a=(_0x13752f,_0xe48650,_0x245f27)=>new Promise((_0x1b2226,_0x27beb9)=>{const _0x40dd58=_0x2f5ce2;var _0xd2a8cd=_0x24093a=>{const _0x15d6c3=_0x32e9;try{_0x25752b(_0x245f27[_0x15d6c3(0x227)](_0x24093a));}catch(_0x96cba2){_0x27beb9(_0x96cba2);}},_0x626676=_0x196b0b=>{const _0x13a9ef=_0x32e9;try{_0x25752b(_0x245f27[_0x13a9ef(0x217)](_0x196b0b));}catch(_0x265f42){_0x27beb9(_0x265f42);}},_0x25752b=_0x68a3b2=>_0x68a3b2[_0x40dd58(0x230)]?_0x1b2226(_0x68a3b2['value']):Promise[_0x40dd58(0x20c)](_0x68a3b2['value'])[_0x40dd58(0x26a)](_0xd2a8cd,_0x626676);_0x25752b((_0x245f27=_0x245f27[_0x40dd58(0x261)](_0x13752f,_0xe48650))[_0x40dd58(0x227)]());});import{v4 as _0x1c8958}from'uuid';var xt=_0x2f5ce2(0x272),mt='/attribute',Dt=_0x2f5ce2(0x264),j='/event',Ct=_0x2f5ce2(0x224),_t='/record-bulk-event',$t=_0x2f5ce2(0x1f7),Vt=_0x2f5ce2(0x223);import _0x56519a from'axios';import{AxiosQueueManager as _0x5ba107}from'axios-queue-js';import _0x176ab3 from'axios-retry';import{AxiosError as _0x41720f}from'axios';var c=class extends Error{constructor(_0x523577){const _0x5a1bbb=_0x2f5ce2;super(_0x523577),this[_0x5a1bbb(0x271)]=_0x5a1bbb(0x262);}};c[_0x2f5ce2(0x212)]=!0x1,c['offline']=!navigator[_0x2f5ce2(0x20b)],c['showErrorLog']=!0x1,c['isInitialized']=!0x1;var le=(_0x57768d,_0xf7cfc9)=>{const _0x183489=_0x2f5ce2;_0xf7cfc9 instanceof c?console['error'](_0x183489(0x1fa)+_0x57768d,_0x183489(0x1e9)+_0xf7cfc9['message']):_0xf7cfc9 instanceof _0x41720f?(console[_0x183489(0x1f5)](_0x183489(0x1fa)+_0x57768d,'AxiosError:\x20'+_0xf7cfc9[_0x183489(0x1f1)]),_0xf7cfc9[_0x183489(0x23b)]?(console[_0x183489(0x1f5)](_0x183489(0x1fa)+_0x57768d,'HTTP\x20Status:\x20'+_0xf7cfc9[_0x183489(0x23b)][_0x183489(0x253)]),console[_0x183489(0x1f5)](_0x183489(0x1fa)+_0x57768d,_0x183489(0x24a),_0xf7cfc9[_0x183489(0x23b)]['data'])):_0xf7cfc9[_0x183489(0x273)]?console[_0x183489(0x1f5)](_0x183489(0x1fa)+_0x57768d+_0x183489(0x265)):console['error'](_0x183489(0x1fa)+_0x57768d,_0x183489(0x232),_0xf7cfc9[_0x183489(0x1f1)])):_0xf7cfc9 instanceof Error?console[_0x183489(0x1f5)](_0x183489(0x1fa)+_0x57768d,_0x183489(0x214),_0xf7cfc9['message']):console[_0x183489(0x1f5)](_0x183489(0x1fa)+_0x57768d,'Unexpected\x20error:',String(_0xf7cfc9));},S=(_0x188a6c,_0x5c1fbf,_0x46749c)=>a(void 0x0,null,function*(){const _0x4e877d=_0x2f5ce2;try{if(c[_0x4e877d(0x212)])throw new c(_0x4e877d(0x257));if(_0x188a6c!==_0x4e877d(0x1fe)&&c[_0x4e877d(0x1ed)])throw new c(_0x4e877d(0x20a));if(_0x188a6c!==_0x4e877d(0x243)&&!c[_0x4e877d(0x1f3)])throw new c('Mergn\x20not\x20initialized!');return yield _0x5c1fbf();}catch(_0x47ea94){return _0x46749c?_0x46749c(_0x47ea94):c[_0x4e877d(0x201)]&&le(_0x188a6c,_0x47ea94),null;}}),f,P,A,U,q,O,yt,z,Bt,p=class p{constructor(){const _0x5bcc05=_0x2f5ce2;i(this,q,0x0);let _0x11aaff=_0x56519a[_0x5bcc05(0x234)]({'baseURL':xt,'headers':{'Content-Type':_0x5bcc05(0x20f)}});m(p,P,_0x11aaff),m(p,A,new _0x5ba107({'client':_0x11aaff,'queueSize':0xa})),_0x176ab3(_0x11aaff,{'onRetry':_0x3a5f11=>{const _0x122a9a=_0x5bcc05;_0x3a5f11>=u(p,U)?(c[_0x122a9a(0x201)]&&console[_0x122a9a(0x25d)]('Max\x20retries\x20reached.\x20Disabling\x20SDK.'),c[_0x122a9a(0x212)]=!0x0):Lt(this,q)['_']++;},'retries':u(p,U),'retryDelay':_0x5281e8=>_0x5281e8*0x1388});}static[_0x2f5ce2(0x270)](_0x3e76f5){const _0x293eb7=_0x2f5ce2;this[_0x293eb7(0x25f)]=_0x3e76f5,n(this,z,Bt)[_0x293eb7(0x245)](this)[_0x293eb7(0x213)][_0x293eb7(0x25b)][_0x293eb7(0x24e)]['Authorization']=_0x3e76f5;}static[_0x2f5ce2(0x22d)](_0x4315f8){const _0x3f6577=_0x2f5ce2;return n(this,O,yt)['call'](this)[_0x3f6577(0x22d)](_0x4315f8);}static[_0x2f5ce2(0x22a)](_0x21e32f,_0x1198c2){const _0x4c3412=_0x2f5ce2;return n(this,O,yt)[_0x4c3412(0x245)](this)[_0x4c3412(0x22a)](_0x21e32f,_0x1198c2||{});}};f=new WeakMap(),P=new WeakMap(),A=new WeakMap(),U=new WeakMap(),q=new WeakMap(),O=new WeakSet(),yt=function(){return u(p,f)||m(p,f,new p()),u(p,A);},z=new WeakSet(),Bt=function(){return u(p,f)||m(p,f,new p()),u(p,P);},i(p,O),i(p,z),i(p,f,void 0x0),i(p,P,void 0x0),i(p,A,void 0x0),i(p,U,0x3);function _0x1232(){const _0x3466d3=['string','forEach','throw','Popup','User\x20Logout','href','map','addEventListener','propertyIsEnumerable','length','7464IRAPxw','entries','keys','delay','/set-identity','/record-event','6258ZyEjNF','data','next','join','Popup\x20Button\x20Clicked','post','write\x20to\x20private\x20field','Cannot\x20','get','set','2906505ynEoOx','done','getItem','Error\x20setting\x20up\x20the\x20request:','online','create','User\x20Login','location','initialTime','eventProperty','getOwnPropertySymbols','Error\x20posting\x20identity\x20data','response','access\x20private\x20method','events','\x20does\x20not\x20have\x20a\x20valid\x20eventProperty.','getInstance','Event\x20','hasOwnProperty','prototype','init','[id^=\x22u_content_button_\x22]','call','parse','recordEvent','offlineEvents','defineProperty','Response\x20Data:','login','\x20has\x20invalid\x20eventProperties:\x20','querySelectorAll','common','27vuGXbh','9499424SfmxxE','action','eventProperties','status','.u-close-button','uniqueIdentity','Viewed\x20Web\x20Page','Mergn\x20SDK\x20is\x20disabled!','body','pushState','5902919adPJBe','headers','UTM\x20Key\x20Value','log','design','apiKey','Campaign\x20Id','apply','MergnError','stringify','/record-attribute','\x0aNo\x20response\x20received.\x20Check\x20network\x20connection\x20or\x20server\x20issues.','Customer\x20Id','12652RMoKmQ','defineProperties','removeItem','then','submit','page','form','customer','logout','updateAPIKey','name','https://95sidwa5jk.execute-api.ap-southeast-1.amazonaws.com/Prod/sdk-management/api','request','remove','createElement','popup_container_','filter','recordAttribute','innerHTML','Cannot\x20add\x20the\x20same\x20private\x20member\x20more\x20than\x20once','MergnError:\x20','read\x20from\x20private\x20field','getTime','setItem','offline','4UXdBpS','Form\x20Submit','hostname','message','div','isInitialized','click','error','push','/customer','brand','404070Gjglua','OriginateFrom:\x20','ttl','URL','getOwnPropertyDescriptors','add','35jCCWel','beforeunload','showErrorLog','campaignId','Popup\x20Image\x20Clicked','isArray','2657154sWLyGe','updateAttribute','querySelector','attributes','Error\x20setting\x20identity','Mergn\x20is\x20offline!','onLine','resolve',',\x20Value:\x20','attributeProperty','application/json','appendChild','search','disableSDK','defaults','Unexpected\x20error:'];_0x1232=function(){return _0x3466d3;};return _0x1232();}var ht=p,y=ht,w,v,N,L,x,D,C,ft,_,It,Y,Mt,H,kt,W,Jt,G,$,X,Z,Qt,tt,jt,et,qt,V,Tt,rt,zt,b,K,ot,Kt,B,St,it,Yt,nt,Ht,F,wt,st,Wt,at,Gt,ct,Xt,M,bt,lt,Zt,ut,te,dt,ee,k,Rt,J,Pt,Q,At,I=class I{constructor(){i(this,C),i(this,_),i(this,Y),i(this,H),i(this,W),i(this,Z),i(this,tt),i(this,et),i(this,V),i(this,rt),i(this,b),i(this,ot),i(this,B),i(this,it),i(this,nt),i(this,F),i(this,st),i(this,at),i(this,ct),i(this,M),i(this,lt),i(this,ut),i(this,dt),i(this,k),i(this,J),i(this,Q),i(this,v,''),i(this,N,void 0x0),i(this,L,void 0x0),i(this,x,void 0x0),i(this,D,null),i(this,G,()=>{const _0x44f3c1=_0x32e9;let _0x5a8e34=()=>{const _0x57cc36=_0x32e9;let _0x52c91c=JSON[_0x57cc36(0x246)](localStorage[_0x57cc36(0x231)](_0x57cc36(0x251)));_0x52c91c&&localStorage[_0x57cc36(0x1ec)](_0x57cc36(0x251),JSON[_0x57cc36(0x263)](gt(pt({},_0x52c91c),{'initialTime':''+new Date()['getTime'](),'page':window['location']['hostname']+window[_0x57cc36(0x236)]['pathname']})));};_0x5a8e34(),window[_0x44f3c1(0x21c)](_0x44f3c1(0x200),_0x5a8e34);}),i(this,$,()=>{const _0x58dffb=_0x32e9;localStorage[_0x58dffb(0x269)](_0x58dffb(0x251));}),i(this,X,()=>{const _0x1d5926=_0x32e9;let _0x270ec4=JSON['parse'](localStorage[_0x1d5926(0x231)](_0x1d5926(0x251))||'{}');(_0x270ec4==null?void 0x0:_0x270ec4['name'])===_0x1d5926(0x218)&&n(this,B,St)[_0x1d5926(0x245)](this);}),m(this,x,navigator['platform']);}static[_0x2f5ce2(0x23f)](){return u(I,w)||m(I,w,new I()),u(I,w);}[_0x2f5ce2(0x243)](_0x504fc7){const _0x842cb5=_0x2f5ce2;S(_0x842cb5(0x243),()=>a(this,null,function*(){const _0x291f54=_0x842cb5;n(this,Y,Mt)['call'](this,_0x504fc7),yield n(this,C,ft)[_0x291f54(0x245)](this),setInterval(()=>a(this,null,function*(){const _0x42f9d4=_0x291f54;yield n(this,C,ft)[_0x42f9d4(0x245)](this);}),0x493e0);let _0x46bc65=localStorage['getItem'](_0x291f54(0x1fb)),_0x1d039a=!0x1;_0x46bc65&&(_0x1d039a=new Date()[_0x291f54(0x1eb)]()-parseInt(_0x46bc65,0xa)>0x1b7740,_0x1d039a&&n(this,k,Rt)[_0x291f54(0x245)](this)),(!_0x46bc65||_0x1d039a||n(this,H,kt)['call'](this))&&(n(this,Z,Qt)[_0x291f54(0x245)](this),yield n(this,b,K)[_0x291f54(0x245)](this),yield n(this,W,Jt)['call'](this)),window[_0x291f54(0x21c)](_0x291f54(0x233),()=>a(this,null,function*(){const _0x4dc089=_0x291f54;c['offline']=!0x1;let _0x51af41=JSON['parse'](localStorage['getItem']('offlineEvents')||'[]');Array[_0x4dc089(0x204)](_0x51af41)&&(yield y[_0x4dc089(0x22a)](''+j+_t,[{'customerId':u(this,v),'events':_0x51af41}]),localStorage[_0x4dc089(0x269)](_0x4dc089(0x248)));})),window[_0x291f54(0x21c)](_0x291f54(0x1ed),()=>{const _0x1fc95f=_0x291f54;c[_0x1fc95f(0x1ed)]=!0x0;}),window[_0x291f54(0x21c)]('load',()=>{const _0x43dbbf=_0x291f54;u(this,X)[_0x43dbbf(0x245)](this);}),c['isInitialized']=!0x0;let _0x1e2c9a=history['pushState'];history[_0x291f54(0x259)]=(..._0x5908ba)=>{const _0x3b340c=_0x291f54;_0x1e2c9a[_0x3b340c(0x261)](history,_0x5908ba),n(this,_,It)[_0x3b340c(0x245)](this);},n(this,_,It)['call'](this);}));}[_0x2f5ce2(0x201)](_0x35dc0f=!0x1){const _0x1a6019=_0x2f5ce2;c[_0x1a6019(0x201)]=_0x35dc0f;}['recordAttribute'](_0x43ef66){return a(this,null,function*(){const _0xb1a36e=_0x32e9;yield S(_0xb1a36e(0x278),()=>a(this,null,function*(){const _0x394521=_0xb1a36e;yield n(this,J,Pt)['call'](this);let _0x379cd2=JSON[_0x394521(0x246)](localStorage['getItem']('attributes')||'[]');if(_0x379cd2&&Object[_0x394521(0x221)](_0x379cd2)[_0x394521(0x21e)]>0x0){let _0x24784b=[];_0x43ef66&&Object[_0x394521(0x221)](_0x43ef66)[_0x394521(0x21e)]>0x0&&Object['keys'](_0x43ef66)['forEach'](_0x21d2d4=>{const _0x53da88=_0x394521;_0x379cd2[_0x53da88(0x241)](_0x21d2d4)&&_0x24784b[_0x53da88(0x1f6)]({'attributeId':_0x379cd2[_0x21d2d4]['id'],'attributeProperties':[],'value':_0x43ef66[_0x21d2d4]});});let _0x185681=[{'attributes':_0x24784b,'customerId':u(this,v)}];yield n(this,Q,At)[_0x394521(0x245)](this,_0x185681);}}));});}[_0x2f5ce2(0x24b)](_0x5325d8){return a(this,null,function*(){const _0xce1c14=_0x32e9;yield S(_0xce1c14(0x24b),()=>a(this,null,function*(){const _0x90ead8=_0xce1c14;yield n(this,b,K)['call'](this,_0x5325d8),yield this[_0x90ead8(0x247)](_0x90ead8(0x235),[{'eventProperty':_0x90ead8(0x266),'value':localStorage['getItem'](_0x90ead8(0x26e))||0x0}]);}));});}[_0x2f5ce2(0x206)](_0x4deef0,_0x185ee8,_0x4e5a88){return a(this,null,function*(){const _0x1306f9=_0x32e9;yield n(this,J,Pt)['call'](this);let _0x375e5f=JSON[_0x1306f9(0x246)](localStorage[_0x1306f9(0x231)](_0x1306f9(0x208))||'{}');if(_0x375e5f&&Object[_0x1306f9(0x221)](_0x375e5f)['length']>0x0&&_0x375e5f[_0x1306f9(0x241)](_0x4deef0)){let _0x42bc3c=_0x375e5f[_0x4deef0],_0x11427a=_0x42bc3c[_0x1306f9(0x20e)],_0x507aa7=[];_0x4e5a88&&Object[_0x1306f9(0x221)](_0x4e5a88)[_0x1306f9(0x21e)]>0x0&&Object[_0x1306f9(0x221)](_0x4e5a88)[_0x1306f9(0x216)](_0x56f2fc=>{const _0x569d7e=_0x1306f9;_0x11427a['hasOwnProperty'](_0x56f2fc)&&_0x507aa7[_0x569d7e(0x1f6)]({'attributePropertyId':_0x11427a[_0x56f2fc]['id'],'value':_0x4e5a88[_0x56f2fc]});});let _0x5023ae=[{'attributes':[{'attributeId':_0x42bc3c['id'],'attributeProperties':_0x507aa7,'value':_0x185ee8}],'customerId':u(this,v)}];yield n(this,Q,At)[_0x1306f9(0x245)](this,_0x5023ae);}});}['logout'](){return a(this,null,function*(){const _0x4afcfe=_0x32e9;yield S(_0x4afcfe(0x26f),()=>a(this,null,function*(){const _0x30d497=_0x4afcfe;n(this,k,Rt)[_0x30d497(0x245)](this),this[_0x30d497(0x247)](_0x30d497(0x219),[{'eventProperty':_0x30d497(0x266),'value':localStorage[_0x30d497(0x231)]('customer')||0x0}]);}));});}[_0x2f5ce2(0x247)](_0x2fa96b,_0x3a8469){return a(this,null,function*(){yield S('add',()=>a(this,null,function*(){const _0x20d1f3=_0x32e9;var _0x392205,_0x1c9c1c;let _0x181bb9=n(this,at,Gt)[_0x20d1f3(0x245)](this),_0x1a4a14=n(this,ct,Xt)['call'](this,_0x181bb9,_0x2fa96b,_0x3a8469);if(typeof _0x1a4a14==_0x20d1f3(0x215)){c['showErrorLog']&&console[_0x20d1f3(0x1f5)](_0x1a4a14);return;}let {id:_0x1c4a33}=_0x181bb9[_0x2fa96b];if(c[_0x20d1f3(0x1ed)]){let _0x4d13af=JSON[_0x20d1f3(0x246)](localStorage[_0x20d1f3(0x231)](_0x20d1f3(0x248))||'[]');if(_0x4d13af[_0x20d1f3(0x21e)]<=0x32){let _0x5140c={'eventId':_0x1c4a33};_0x3a8469&&(_0x5140c['eventProperties']=_0x1a4a14),_0x4d13af[_0x20d1f3(0x1f6)](_0x5140c),localStorage[_0x20d1f3(0x1ec)](_0x20d1f3(0x248),JSON[_0x20d1f3(0x263)](_0x4d13af));}return;}let _0x805c48=_0x3a8469?n(this,M,bt)['call'](this,_0x1c4a33,_0x1a4a14):n(this,M,bt)['call'](this,_0x1c4a33),_0x550fca=yield n(this,lt,Zt)[_0x20d1f3(0x245)](this,_0x805c48);n(this,ut,te)[_0x20d1f3(0x245)](this,(_0x392205=_0x550fca==null?void 0x0:_0x550fca['data'])==null?void 0x0:_0x392205[_0x20d1f3(0x226)])&&(n(this,dt,ee)[_0x20d1f3(0x245)](this,(_0x1c9c1c=_0x550fca==null?void 0x0:_0x550fca['data'])==null?void 0x0:_0x1c9c1c['data']),u(this,G)[_0x20d1f3(0x245)](this),n(this,B,St)[_0x20d1f3(0x245)](this));}));});}};w=new WeakMap(),v=new WeakMap(),N=new WeakMap(),L=new WeakMap(),x=new WeakMap(),D=new WeakMap(),C=new WeakSet(),ft=function(){return a(this,null,function*(){const _0x5269b6=_0x32e9;try{yield y[_0x5269b6(0x22d)](_0x5269b6(0x1f8));}catch(_0x19ac50){c[_0x5269b6(0x212)]=!0x0,c[_0x5269b6(0x201)]&&console['error'](_0x19ac50['message']);}});},_=new WeakSet(),It=function(){return a(this,null,function*(){const _0x650363=_0x32e9;let _0x7d15a9=window[_0x650363(0x236)]['hostname']+window['location']['pathname'];yield this[_0x650363(0x247)](_0x650363(0x256),[{'eventProperty':_0x650363(0x1fc),'value':_0x7d15a9}]),_0x7d15a9!==u(this,D)&&(m(this,D,_0x7d15a9),new URLSearchParams(new URL(window[_0x650363(0x236)][_0x650363(0x21a)])[_0x650363(0x211)])[_0x650363(0x216)]((_0x38362a,_0x3e366c)=>a(this,null,function*(){const _0x52c0d4=_0x650363;yield this[_0x52c0d4(0x247)](_0x52c0d4(0x256),[{'eventProperty':_0x52c0d4(0x25c),'value':_0x3e366c+':'+_0x38362a}]);})));});},Y=new WeakSet(),Mt=function(_0x4cb812){const _0x86999f=_0x2f5ce2;y[_0x86999f(0x270)](_0x4cb812);},H=new WeakSet(),kt=function(){const _0x4b51be=_0x2f5ce2;return!localStorage[_0x4b51be(0x231)]('events')||!localStorage[_0x4b51be(0x231)](_0x4b51be(0x26e))||!localStorage[_0x4b51be(0x231)](_0x4b51be(0x208))||!localStorage['getItem']('uniqueIdentity');},W=new WeakSet(),Jt=function(){return a(this,null,function*(){const _0x37c27e=_0x32e9;yield n(this,tt,jt)['call'](this),yield n(this,V,Tt)[_0x37c27e(0x245)](this),yield n(this,b,K)['call'](this);});},G=new WeakMap(),$=new WeakMap(),X=new WeakMap(),Z=new WeakSet(),Qt=function(){const _0x4ac6c6=_0x2f5ce2;let _0x3b3d4d=localStorage[_0x4ac6c6(0x231)]('uniqueIdentity');return _0x3b3d4d||(_0x3b3d4d=_0x1c8958(),localStorage['setItem'](_0x4ac6c6(0x255),_0x3b3d4d)),_0x3b3d4d;},tt=new WeakSet(),jt=function(){return a(this,null,function*(){const _0x3d50bd=_0x32e9;if(!localStorage[_0x3d50bd(0x231)]('events')){let _0x129324=(yield n(this,et,qt)[_0x3d50bd(0x245)](this))[_0x3d50bd(0x226)];_0x129324&&(m(this,N,_0x129324),localStorage[_0x3d50bd(0x1ec)](_0x3d50bd(0x23d),JSON['stringify'](u(this,N))));}});},et=new WeakSet(),qt=function(){return a(this,null,function*(){try{return(yield y['get'](''+j))['data'];}catch(_0x3d75b4){throw new Error('Error\x20fetching\x20event\x20data');}});},V=new WeakSet(),Tt=function(){return a(this,null,function*(){const _0x18b4ad=_0x32e9;if(!localStorage[_0x18b4ad(0x231)]('attributes')){let _0x2bb122=(yield n(this,rt,zt)[_0x18b4ad(0x245)](this))[_0x18b4ad(0x226)];_0x2bb122&&(m(this,L,_0x2bb122),localStorage['setItem'](_0x18b4ad(0x208),JSON[_0x18b4ad(0x263)](u(this,L))));}});},rt=new WeakSet(),zt=function(){return a(this,null,function*(){const _0x57284b=_0x32e9;try{return(yield y[_0x57284b(0x22d)](''+mt))[_0x57284b(0x226)];}catch(_0x560115){throw new Error('Error\x20fetching\x20attribute\x20data');}});},b=new WeakSet(),K=function(_0x41b6c3){return a(this,null,function*(){const _0x3f21d4=_0x32e9;if(!_0x41b6c3){let _0x3a3a8c=localStorage[_0x3f21d4(0x231)](_0x3f21d4(0x26e));if(_0x3a3a8c){m(this,v,_0x3a3a8c);return;}}let _0x5229de={'deviceId':localStorage[_0x3f21d4(0x231)](_0x3f21d4(0x255))||_0x1c8958(),'os':u(this,x)};_0x41b6c3&&(_0x5229de['identity']=_0x41b6c3);try{let _0x26a261=(yield n(this,ot,Kt)[_0x3f21d4(0x245)](this,_0x5229de))[_0x3f21d4(0x226)];_0x26a261!==void 0x0&&(m(this,v,_0x26a261),localStorage['setItem'](_0x3f21d4(0x26e),u(this,v)));}catch(_0x48ec6e){throw new Error(_0x3f21d4(0x209));}});},ot=new WeakSet(),Kt=function(_0x85d5c8){return a(this,null,function*(){const _0x181a4a=_0x32e9;try{return(yield y[_0x181a4a(0x22a)](''+$t+Vt,_0x85d5c8))[_0x181a4a(0x226)];}catch(_0x3327f0){throw new Error(_0x181a4a(0x23a));}});},B=new WeakSet(),St=function(){const _0x2a8222=_0x2f5ce2;let _0x2c2ed0=n(this,it,Yt)[_0x2a8222(0x245)](this);if(_0x2c2ed0){let _0x1ed3fd=_0x2c2ed0[_0x2a8222(0x25e)],_0x6663f1=_0x2c2ed0[_0x2a8222(0x202)];_0x2c2ed0[_0x2a8222(0x222)]?n(this,nt,Ht)[_0x2a8222(0x245)](this,_0x2c2ed0,_0x1ed3fd,_0x6663f1):n(this,F,wt)[_0x2a8222(0x245)](this,_0x1ed3fd,_0x6663f1);}},it=new WeakSet(),Yt=function(){const _0x5caad1=_0x2f5ce2;let _0x135b96=localStorage['getItem'](_0x5caad1(0x251));return _0x135b96?JSON[_0x5caad1(0x246)](_0x135b96):null;},nt=new WeakSet(),Ht=function(_0x3356f5,_0x40f0fb,_0x5339db){const _0x5ace7d=_0x2f5ce2;let _0x321f3b=parseInt(_0x3356f5[_0x5ace7d(0x237)],0xa)+_0x3356f5[_0x5ace7d(0x222)]-new Date()[_0x5ace7d(0x1eb)]();_0x321f3b>0x0&&_0x3356f5[_0x5ace7d(0x26c)]===window['location'][_0x5ace7d(0x1f0)]+window[_0x5ace7d(0x236)]['pathname']&&setTimeout(()=>{u(this,$)['call'](this),n(this,F,wt)['call'](this,_0x40f0fb,_0x5339db);},_0x321f3b);},F=new WeakSet(),wt=function(_0x144b20,_0x32c40c){const _0xe19872=_0x2f5ce2;let _0x501784=n(this,st,Wt)[_0xe19872(0x245)](this,_0xe19872(0x1f2),_0x144b20,_0x32c40c);document[_0xe19872(0x258)][_0xe19872(0x210)](_0x501784),u(this,$)['call'](this);},st=new WeakSet(),Wt=function(_0x580bec,_0x29c926,_0x495541){const _0x2b4f30=_0x2f5ce2;var _0x37c404;let _0x3cf70c=document[_0x2b4f30(0x275)](_0x580bec);return _0x3cf70c['id']=_0x2b4f30(0x276)+_0x495541,_0x3cf70c[_0x2b4f30(0x1e7)]=_0x29c926,_0x3cf70c[_0x2b4f30(0x24d)](_0x2b4f30(0x26d))[_0x2b4f30(0x216)]((_0x40714d,_0x382baf)=>{const _0x2bd16c=_0x2b4f30;_0x40714d['addEventListener'](_0x2bd16c(0x26b),_0x3b5e8f=>a(this,null,function*(){const _0x595647=_0x2bd16c;_0x3b5e8f['preventDefault']();let _0x1c8b8d=new FormData(_0x40714d),_0x16570e={};for(let [_0x50b1a9,_0x168923]of _0x1c8b8d[_0x595647(0x220)]())_0x16570e[_0x50b1a9]=_0x168923,console[_0x595647(0x25d)]('Name:\x20'+_0x50b1a9+_0x595647(0x20d)+_0x168923);yield this['recordEvent'](_0x595647(0x1ef),[{'eventProperty':_0x595647(0x260),'value':_0x495541},{'eventProperty':'Form\x20'+(_0x382baf+0x1)+'\x20Values','value':_0x16570e}]);}));}),(_0x37c404=_0x3cf70c[_0x2b4f30(0x207)](_0x2b4f30(0x254)))==null||_0x37c404[_0x2b4f30(0x21c)](_0x2b4f30(0x1f4),()=>a(this,null,function*(){const _0x16848f=_0x2b4f30;_0x3cf70c[_0x16848f(0x274)](),yield this['recordEvent']('Popup\x20Button\x20Clicked',[{'eventProperty':_0x16848f(0x260),'value':_0x495541}]);})),_0x3cf70c['querySelectorAll'](_0x2b4f30(0x244))[_0x2b4f30(0x216)](_0x29891c=>{const _0x46ba35=_0x2b4f30;_0x29891c['addEventListener'](_0x46ba35(0x1f4),()=>a(this,null,function*(){const _0x1e4e50=_0x46ba35;yield this['recordEvent'](_0x1e4e50(0x229),[{'eventProperty':_0x1e4e50(0x260),'value':_0x495541}]);}));}),_0x3cf70c['querySelectorAll']('.u-popup-container\x20img')[_0x2b4f30(0x216)](_0xfcfff5=>{const _0x374988=_0x2b4f30;_0xfcfff5['addEventListener'](_0x374988(0x1f4),()=>a(this,null,function*(){const _0x14304c=_0x374988;yield this[_0x14304c(0x247)](_0x14304c(0x203),[{'eventProperty':_0x14304c(0x260),'value':_0x495541}]);}));}),_0x3cf70c;},at=new WeakSet(),Gt=function(){const _0x1a8bb5=_0x2f5ce2;let _0x178962=localStorage[_0x1a8bb5(0x231)](_0x1a8bb5(0x23d));return _0x178962?JSON[_0x1a8bb5(0x246)](_0x178962):{};},ct=new WeakSet(),Xt=function(_0x243776,_0x58ec05,_0x55cb16){const _0xb7c9c6=_0x2f5ce2;if(!_0x243776[_0xb7c9c6(0x241)](_0x58ec05))return _0xb7c9c6(0x240)+_0x58ec05+'\x20is\x20not\x20valid.';if(!_0x55cb16)return[];let _0x4d9394=_0x243776[_0x58ec05];if(!(_0x4d9394!=null&&_0x4d9394[_0xb7c9c6(0x238)]))return _0xb7c9c6(0x240)+_0x58ec05+_0xb7c9c6(0x23e);let _0x3899ad=_0x55cb16[_0xb7c9c6(0x277)](({eventProperty:_0x1f5479})=>!_0x4d9394['eventProperty'][_0xb7c9c6(0x241)](_0x1f5479))[_0xb7c9c6(0x21b)](({eventProperty:_0x44a616})=>_0x44a616);return _0x3899ad[_0xb7c9c6(0x21e)]>0x0?_0xb7c9c6(0x240)+_0x58ec05+_0xb7c9c6(0x24c)+_0x3899ad[_0xb7c9c6(0x228)](',\x20')+'.':_0x55cb16[_0xb7c9c6(0x21b)](({eventProperty:_0xb4cad4,value:_0x59d00e})=>({'eventPropertyId':_0x4d9394['eventProperty'][_0xb4cad4]['id'],'value':_0x59d00e}));},M=new WeakSet(),bt=function(_0x1ed566,_0x406930){const _0x4f203f=_0x2f5ce2;let _0x32ca2a=[{'customerId':localStorage[_0x4f203f(0x231)](_0x4f203f(0x26e))||'0','events':[{'eventId':_0x1ed566}]}];return _0x406930&&(_0x32ca2a[0x0][_0x4f203f(0x23d)][0x0][_0x4f203f(0x252)]=_0x406930),_0x32ca2a;},lt=new WeakSet(),Zt=function(_0x1afa1b){return a(this,null,function*(){try{return yield y['post'](''+j+Ct,_0x1afa1b);}catch(_0x2f86d4){throw new Error('Error\x20posting\x20event\x20record');}});},ut=new WeakSet(),te=function(_0x2c4484){const _0x53ce2a=_0x2f5ce2;return(_0x2c4484==null?void 0x0:_0x2c4484[_0x53ce2a(0x271)])===_0x53ce2a(0x218);},dt=new WeakSet(),ee=function(_0x3e26b5){const _0x46a98c=_0x2f5ce2;localStorage['setItem'](_0x46a98c(0x251),JSON[_0x46a98c(0x263)](gt(pt({},_0x3e26b5),{'initialTime':''+new Date()['getTime']()})));},k=new WeakSet(),Rt=function(){const _0x33b66a=_0x2f5ce2;localStorage[_0x33b66a(0x269)](_0x33b66a(0x251)),localStorage[_0x33b66a(0x269)](_0x33b66a(0x23d)),localStorage[_0x33b66a(0x269)](_0x33b66a(0x208)),localStorage['removeItem'](_0x33b66a(0x248));},J=new WeakSet(),Pt=function(){return a(this,null,function*(){const _0x448aaa=_0x32e9;localStorage[_0x448aaa(0x231)]('attributes')||(yield n(this,V,Tt)[_0x448aaa(0x245)](this));});},Q=new WeakSet(),At=function(_0x2b1a44){return a(this,null,function*(){const _0x27b032=_0x32e9;try{return yield y[_0x27b032(0x22a)](''+mt+Dt,_0x2b1a44);}catch(_0x41fbcc){throw new Error('Error\x20posting\x20attribute\x20record');}});},i(I,w,void 0x0);function _0x32e9(_0x4fa784,_0x9f58db){const _0x123219=_0x1232();return _0x32e9=function(_0x32e998,_0x1035b4){_0x32e998=_0x32e998-0x1e7;let _0x4bedc5=_0x123219[_0x32e998];return _0x4bedc5;},_0x32e9(_0x4fa784,_0x9f58db);}var vt=I,re=vt['getInstance'](),Me=re;export{Me as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mergn-webapp-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "yaseenmergn123",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
"build": "tsup",
|
|
14
14
|
"postbuild": "mv ./dist/index.mjs ./dist/index2.js && node ./obfuscate.js && rm -rf ./dist/index2.js",
|
|
15
15
|
"test": "jest",
|
|
16
|
-
"watch": "onchange 'src/**/*.ts' -- npm run build && npm unlink mergn-
|
|
16
|
+
"watch": "onchange 'src/**/*.ts' -- npm run build && npm unlink mergn-webapp-sdk && npm link",
|
|
17
17
|
"lint": "eslint --ext .js,.ts .",
|
|
18
18
|
"format": "prettier --ignore-path .gitignore --write \"**/*.+(js|ts|json)\"",
|
|
19
19
|
"prepare": "husky install",
|
|
20
|
-
"link": "npm unlink mergn-
|
|
20
|
+
"link": "npm unlink mergn-webapp-sdk && npm link"
|
|
21
21
|
},
|
|
22
22
|
"lint-staged": {
|
|
23
23
|
"*": "prettier --write --ignore-unknown",
|