window.Seeka = window.Seeka || {};
window.Seeka.client = window.Seeka.client || {};
window.Seeka.client.origin = { h: 'thebureaufashionweek.com' };
"use strict";(()=>{var Dm=Object.create;var Rr=Object.defineProperty,Om=Object.defineProperties,Nm=Object.getOwnPropertyDescriptor,Rm=Object.getOwnPropertyDescriptors,_m=Object.getOwnPropertyNames,Nr=Object.getOwnPropertySymbols,Um=Object.getPrototypeOf,As=Object.prototype.hasOwnProperty,pa=Object.prototype.propertyIsEnumerable;var rr=Math.pow,Cs=(r,e,t)=>e in r?Rr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,y=(r,e)=>{for(var t in e||(e={}))As.call(e,t)&&Cs(r,t,e[t]);if(Nr)for(var t of Nr(e))pa.call(e,t)&&Cs(r,t,e[t]);return r},H=(r,e)=>Om(r,Rm(e));var ha=(r,e)=>{var t={};for(var i in r)As.call(r,i)&&e.indexOf(i)<0&&(t[i]=r[i]);if(r!=null&&Nr)for(var i of Nr(r))e.indexOf(i)<0&&pa.call(r,i)&&(t[i]=r[i]);return t};var M=(r,e)=>()=>(r&&(e=r(r=0)),e);var Bm=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),nr=(r,e)=>{for(var t in e)Rr(r,t,{get:e[t],enumerable:!0})},Fm=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of _m(e))!As.call(r,n)&&n!==t&&Rr(r,n,{get:()=>e[n],enumerable:!(i=Nm(e,n))||i.enumerable});return r};var Hm=(r,e,t)=>(t=r!=null?Dm(Um(r)):{},Fm(e||!r||!r.__esModule?Rr(t,"default",{value:r,enumerable:!0}):t,r));var l=(r,e,t)=>Cs(r,typeof e!="symbol"?e+"":e,t);var h=(r,e,t)=>new Promise((i,n)=>{var s=c=>{try{a(t.next(c))}catch(d){n(d)}},o=c=>{try{a(t.throw(c))}catch(d){n(d)}},a=c=>c.done?i(c.value):Promise.resolve(c.value).then(s,o);a((t=t.apply(r,e)).next())});var Yt,Ku=M(()=>{Yt=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0});var il={};nr(il,{Hash:()=>gr,abytes:()=>_t,aexists:()=>Un,ahash:()=>cx,anumber:()=>lo,aoutput:()=>fo,asyncLoop:()=>yx,byteSwap:()=>go,byteSwap32:()=>Yu,byteSwapIfBE:()=>fx,bytesToHex:()=>px,bytesToUtf8:()=>vx,checkOpts:()=>Ix,clean:()=>Ut,concatBytes:()=>kx,createHasher:()=>ht,createOptHasher:()=>el,createView:()=>pr,createXOFer:()=>tl,hexToBytes:()=>hx,isBytes:()=>Qu,isLE:()=>mo,kdfInputToBytes:()=>bx,nextTick:()=>Xu,randomBytes:()=>Px,rotl:()=>lx,rotr:()=>Re,swap32IfBE:()=>mx,swap8IfBE:()=>zu,toBytes:()=>_i,u32:()=>ux,u8:()=>dx,utf8ToBytes:()=>po,wrapConstructor:()=>xx,wrapConstructorWithOpts:()=>Cx,wrapXOFConstructorWithOpts:()=>Ax});function Qu(r){return r instanceof Uint8Array||ArrayBuffer.isView(r)&&r.constructor.name==="Uint8Array"}function lo(r){if(!Number.isSafeInteger(r)||r<0)throw new Error("positive integer expected, got "+r)}function _t(r,...e){if(!Qu(r))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(r.length))throw new Error("Uint8Array expected of length "+e+", got length="+r.length)}function cx(r){if(typeof r!="function"||typeof r.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");lo(r.outputLen),lo(r.blockLen)}function Un(r,e=!0){if(r.destroyed)throw new Error("Hash instance has been destroyed");if(e&&r.finished)throw new Error("Hash#digest() has already been called")}function fo(r,e){_t(r);let t=e.outputLen;if(r.length<t)throw new Error("digestInto() expects output buffer of length at least "+t)}function dx(r){return new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}function ux(r){return new Uint32Array(r.buffer,r.byteOffset,Math.floor(r.byteLength/4))}function Ut(...r){for(let e=0;e<r.length;e++)r[e].fill(0)}function pr(r){return new DataView(r.buffer,r.byteOffset,r.byteLength)}function Re(r,e){return r<<32-e|r>>>e}function lx(r,e){return r<<e|r>>>32-e>>>0}function go(r){return r<<24&4278190080|r<<8&16711680|r>>>8&65280|r>>>24&255}function Yu(r){for(let e=0;e<r.length;e++)r[e]=go(r[e]);return r}function px(r){if(_t(r),Zu)return r.toHex();let e="";for(let t=0;t<r.length;t++)e+=gx[r[t]];return e}function Ju(r){if(r>=pt._0&&r<=pt._9)return r-pt._0;if(r>=pt.A&&r<=pt.F)return r-(pt.A-10);if(r>=pt.a&&r<=pt.f)return r-(pt.a-10)}function hx(r){if(typeof r!="string")throw new Error("hex string expected, got "+typeof r);if(Zu)return Uint8Array.fromHex(r);let e=r.length,t=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);let i=new Uint8Array(t);for(let n=0,s=0;n<t;n++,s+=2){let o=Ju(r.charCodeAt(s)),a=Ju(r.charCodeAt(s+1));if(o===void 0||a===void 0){let c=r[s]+r[s+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+s)}i[n]=o*16+a}return i}function yx(r,e,t){return h(this,null,function*(){let i=Date.now();for(let n=0;n<r;n++){t(n);let s=Date.now()-i;s>=0&&s<e||(yield Xu(),i+=s)}})}function po(r){if(typeof r!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(r))}function vx(r){return new TextDecoder().decode(r)}function _i(r){return typeof r=="string"&&(r=po(r)),_t(r),r}function bx(r){return typeof r=="string"&&(r=po(r)),_t(r),r}function kx(...r){let e=0;for(let i=0;i<r.length;i++){let n=r[i];_t(n),e+=n.length}let t=new Uint8Array(e);for(let i=0,n=0;i<r.length;i++){let s=r[i];t.set(s,n),n+=s.length}return t}function Ix(r,e){if(e!==void 0&&{}.toString.call(e)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(r,e)}function ht(r){let e=i=>r().update(_i(i)).digest(),t=r();return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=()=>r(),e}function el(r){let e=(i,n)=>r(n).update(_i(i)).digest(),t=r({});return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=i=>r(i),e}function tl(r){let e=(i,n)=>r(n).update(_i(i)).digest(),t=r({});return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=i=>r(i),e}function Px(r=32){if(Yt&&typeof Yt.getRandomValues=="function")return Yt.getRandomValues(new Uint8Array(r));if(Yt&&typeof Yt.randomBytes=="function")return Uint8Array.from(Yt.randomBytes(r));throw new Error("crypto.getRandomValues must be defined")}var mo,zu,fx,mx,Zu,gx,pt,Xu,gr,xx,Cx,Ax,Bn=M(()=>{Ku();mo=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;zu=mo?r=>r:r=>go(r),fx=zu;mx=mo?r=>r:Yu,Zu=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",gx=Array.from({length:256},(r,e)=>e.toString(16).padStart(2,"0"));pt={_0:48,_9:57,A:65,F:70,a:97,f:102};Xu=()=>h(null,null,function*(){});gr=class{};xx=ht,Cx=el,Ax=tl});function Sx(r,e,t,i){if(typeof r.setBigUint64=="function")return r.setBigUint64(e,t,i);let n=BigInt(32),s=BigInt(4294967295),o=Number(t>>n&s),a=Number(t&s),c=i?4:0,d=i?0:4;r.setUint32(e+c,o,i),r.setUint32(e+d,a,i)}function rl(r,e,t){return r&e^~r&t}function nl(r,e,t){return r&e^r&t^e&t}var hr,yt,vt,ge,pe,sl=M(()=>{Bn();hr=class extends gr{constructor(e,t,i,n){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=i,this.isLE=n,this.buffer=new Uint8Array(e),this.view=pr(this.buffer)}update(e){Un(this),e=_i(e),_t(e);let{view:t,buffer:i,blockLen:n}=this,s=e.length;for(let o=0;o<s;){let a=Math.min(n-this.pos,s-o);if(a===n){let c=pr(e);for(;n<=s-o;o+=n)this.process(c,o);continue}i.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===n&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Un(this),fo(e,this),this.finished=!0;let{buffer:t,view:i,blockLen:n,isLE:s}=this,{pos:o}=this;t[o++]=128,Ut(this.buffer.subarray(o)),this.padOffset>n-o&&(this.process(i,0),o=0);for(let u=o;u<n;u++)t[u]=0;Sx(i,n-8,BigInt(this.length*8),s),this.process(i,0);let a=pr(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let d=c/4,f=this.get();if(d>f.length)throw new Error("_sha2: outputLen bigger than state");for(let u=0;u<d;u++)a.setUint32(4*u,f[u],s)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let i=e.slice(0,t);return this.destroy(),i}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:i,length:n,finished:s,destroyed:o,pos:a}=this;return e.destroyed=o,e.finished=s,e.length=n,e.pos=a,n%t&&e.buffer.set(i),e}clone(){return this._cloneInto()}},yt=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),vt=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),ge=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),pe=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209])});function wx(r,e=!1){return e?{h:Number(r&Fn),l:Number(r>>ol&Fn)}:{h:Number(r>>ol&Fn)|0,l:Number(r&Fn)|0}}function al(r,e=!1){let t=r.length,i=new Uint32Array(t),n=new Uint32Array(t);for(let s=0;s<t;s++){let{h:o,l:a}=wx(r[s],e);[i[s],n[s]]=[o,a]}return[i,n]}function rt(r,e,t,i){let n=(e>>>0)+(i>>>0);return{h:r+t+(n/rr(2,32)|0)|0,l:n|0}}var Fn,ol,ho,yo,Zt,Xt,yr,vr,cl,dl,ul,ll,fl,ml,gl=M(()=>{Fn=BigInt(4294967295),ol=BigInt(32);ho=(r,e,t)=>r>>>t,yo=(r,e,t)=>r<<32-t|e>>>t,Zt=(r,e,t)=>r>>>t|e<<32-t,Xt=(r,e,t)=>r<<32-t|e>>>t,yr=(r,e,t)=>r<<64-t|e>>>t-32,vr=(r,e,t)=>r>>>t-32|e<<64-t;cl=(r,e,t)=>(r>>>0)+(e>>>0)+(t>>>0),dl=(r,e,t,i)=>e+t+i+(r/rr(2,32)|0)|0,ul=(r,e,t,i)=>(r>>>0)+(e>>>0)+(t>>>0)+(i>>>0),ll=(r,e,t,i,n)=>e+t+i+n+(r/rr(2,32)|0)|0,fl=(r,e,t,i,n)=>(r>>>0)+(e>>>0)+(t>>>0)+(i>>>0)+(n>>>0),ml=(r,e,t,i,n,s)=>e+t+i+n+s+(r/rr(2,32)|0)|0});var hl={};nr(hl,{SHA224:()=>Hn,SHA256:()=>br,SHA384:()=>jn,SHA512:()=>ei,SHA512_224:()=>Vn,SHA512_256:()=>Wn,sha224:()=>Ox,sha256:()=>Dx,sha384:()=>Rx,sha512:()=>Nx,sha512_224:()=>Ux,sha512_256:()=>_x});var Ex,Bt,br,Hn,pl,Mx,Lx,Ft,Ht,ei,jn,ve,be,Vn,Wn,Dx,Ox,Nx,Rx,_x,Ux,yl=M(()=>{sl();gl();Bn();Ex=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Bt=new Uint32Array(64),br=class extends hr{constructor(e=32){super(64,e,8,!1),this.A=yt[0]|0,this.B=yt[1]|0,this.C=yt[2]|0,this.D=yt[3]|0,this.E=yt[4]|0,this.F=yt[5]|0,this.G=yt[6]|0,this.H=yt[7]|0}get(){let{A:e,B:t,C:i,D:n,E:s,F:o,G:a,H:c}=this;return[e,t,i,n,s,o,a,c]}set(e,t,i,n,s,o,a,c){this.A=e|0,this.B=t|0,this.C=i|0,this.D=n|0,this.E=s|0,this.F=o|0,this.G=a|0,this.H=c|0}process(e,t){for(let u=0;u<16;u++,t+=4)Bt[u]=e.getUint32(t,!1);for(let u=16;u<64;u++){let m=Bt[u-15],g=Bt[u-2],p=Re(m,7)^Re(m,18)^m>>>3,v=Re(g,17)^Re(g,19)^g>>>10;Bt[u]=v+Bt[u-7]+p+Bt[u-16]|0}let{A:i,B:n,C:s,D:o,E:a,F:c,G:d,H:f}=this;for(let u=0;u<64;u++){let m=Re(a,6)^Re(a,11)^Re(a,25),g=f+m+rl(a,c,d)+Ex[u]+Bt[u]|0,v=(Re(i,2)^Re(i,13)^Re(i,22))+nl(i,n,s)|0;f=d,d=c,c=a,a=o+g|0,o=s,s=n,n=i,i=g+v|0}i=i+this.A|0,n=n+this.B|0,s=s+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,d=d+this.G|0,f=f+this.H|0,this.set(i,n,s,o,a,c,d,f)}roundClean(){Ut(Bt)}destroy(){this.set(0,0,0,0,0,0,0,0),Ut(this.buffer)}},Hn=class extends br{constructor(){super(28),this.A=vt[0]|0,this.B=vt[1]|0,this.C=vt[2]|0,this.D=vt[3]|0,this.E=vt[4]|0,this.F=vt[5]|0,this.G=vt[6]|0,this.H=vt[7]|0}},pl=al(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(r=>BigInt(r))),Mx=pl[0],Lx=pl[1],Ft=new Uint32Array(80),Ht=new Uint32Array(80),ei=class extends hr{constructor(e=64){super(128,e,16,!1),this.Ah=pe[0]|0,this.Al=pe[1]|0,this.Bh=pe[2]|0,this.Bl=pe[3]|0,this.Ch=pe[4]|0,this.Cl=pe[5]|0,this.Dh=pe[6]|0,this.Dl=pe[7]|0,this.Eh=pe[8]|0,this.El=pe[9]|0,this.Fh=pe[10]|0,this.Fl=pe[11]|0,this.Gh=pe[12]|0,this.Gl=pe[13]|0,this.Hh=pe[14]|0,this.Hl=pe[15]|0}get(){let{Ah:e,Al:t,Bh:i,Bl:n,Ch:s,Cl:o,Dh:a,Dl:c,Eh:d,El:f,Fh:u,Fl:m,Gh:g,Gl:p,Hh:v,Hl:I}=this;return[e,t,i,n,s,o,a,c,d,f,u,m,g,p,v,I]}set(e,t,i,n,s,o,a,c,d,f,u,m,g,p,v,I){this.Ah=e|0,this.Al=t|0,this.Bh=i|0,this.Bl=n|0,this.Ch=s|0,this.Cl=o|0,this.Dh=a|0,this.Dl=c|0,this.Eh=d|0,this.El=f|0,this.Fh=u|0,this.Fl=m|0,this.Gh=g|0,this.Gl=p|0,this.Hh=v|0,this.Hl=I|0}process(e,t){for(let E=0;E<16;E++,t+=4)Ft[E]=e.getUint32(t),Ht[E]=e.getUint32(t+=4);for(let E=16;E<80;E++){let A=Ft[E-15]|0,S=Ht[E-15]|0,T=Zt(A,S,1)^Zt(A,S,8)^ho(A,S,7),D=Xt(A,S,1)^Xt(A,S,8)^yo(A,S,7),O=Ft[E-2]|0,j=Ht[E-2]|0,G=Zt(O,j,19)^yr(O,j,61)^ho(O,j,6),N=Xt(O,j,19)^vr(O,j,61)^yo(O,j,6),K=ul(D,N,Ht[E-7],Ht[E-16]),te=ll(K,T,G,Ft[E-7],Ft[E-16]);Ft[E]=te|0,Ht[E]=K|0}let{Ah:i,Al:n,Bh:s,Bl:o,Ch:a,Cl:c,Dh:d,Dl:f,Eh:u,El:m,Fh:g,Fl:p,Gh:v,Gl:I,Hh:b,Hl:w}=this;for(let E=0;E<80;E++){let A=Zt(u,m,14)^Zt(u,m,18)^yr(u,m,41),S=Xt(u,m,14)^Xt(u,m,18)^vr(u,m,41),T=u&g^~u&v,D=m&p^~m&I,O=fl(w,S,D,Lx[E],Ht[E]),j=ml(O,b,A,T,Mx[E],Ft[E]),G=O|0,N=Zt(i,n,28)^yr(i,n,34)^yr(i,n,39),K=Xt(i,n,28)^vr(i,n,34)^vr(i,n,39),te=i&s^i&a^s&a,Z=n&o^n&c^o&c;b=v|0,w=I|0,v=g|0,I=p|0,g=u|0,p=m|0,{h:u,l:m}=rt(d|0,f|0,j|0,G|0),d=a|0,f=c|0,a=s|0,c=o|0,s=i|0,o=n|0;let R=cl(G,K,Z);i=dl(R,j,N,te),n=R|0}({h:i,l:n}=rt(this.Ah|0,this.Al|0,i|0,n|0)),{h:s,l:o}=rt(this.Bh|0,this.Bl|0,s|0,o|0),{h:a,l:c}=rt(this.Ch|0,this.Cl|0,a|0,c|0),{h:d,l:f}=rt(this.Dh|0,this.Dl|0,d|0,f|0),{h:u,l:m}=rt(this.Eh|0,this.El|0,u|0,m|0),{h:g,l:p}=rt(this.Fh|0,this.Fl|0,g|0,p|0),{h:v,l:I}=rt(this.Gh|0,this.Gl|0,v|0,I|0),{h:b,l:w}=rt(this.Hh|0,this.Hl|0,b|0,w|0),this.set(i,n,s,o,a,c,d,f,u,m,g,p,v,I,b,w)}roundClean(){Ut(Ft,Ht)}destroy(){Ut(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}},jn=class extends ei{constructor(){super(48),this.Ah=ge[0]|0,this.Al=ge[1]|0,this.Bh=ge[2]|0,this.Bl=ge[3]|0,this.Ch=ge[4]|0,this.Cl=ge[5]|0,this.Dh=ge[6]|0,this.Dl=ge[7]|0,this.Eh=ge[8]|0,this.El=ge[9]|0,this.Fh=ge[10]|0,this.Fl=ge[11]|0,this.Gh=ge[12]|0,this.Gl=ge[13]|0,this.Hh=ge[14]|0,this.Hl=ge[15]|0}},ve=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),be=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]),Vn=class extends ei{constructor(){super(28),this.Ah=ve[0]|0,this.Al=ve[1]|0,this.Bh=ve[2]|0,this.Bl=ve[3]|0,this.Ch=ve[4]|0,this.Cl=ve[5]|0,this.Dh=ve[6]|0,this.Dl=ve[7]|0,this.Eh=ve[8]|0,this.El=ve[9]|0,this.Fh=ve[10]|0,this.Fl=ve[11]|0,this.Gh=ve[12]|0,this.Gl=ve[13]|0,this.Hh=ve[14]|0,this.Hl=ve[15]|0}},Wn=class extends ei{constructor(){super(32),this.Ah=be[0]|0,this.Al=be[1]|0,this.Bh=be[2]|0,this.Bl=be[3]|0,this.Ch=be[4]|0,this.Cl=be[5]|0,this.Dh=be[6]|0,this.Dl=be[7]|0,this.Eh=be[8]|0,this.El=be[9]|0,this.Fh=be[10]|0,this.Fl=be[11]|0,this.Gh=be[12]|0,this.Gl=be[13]|0,this.Hh=be[14]|0,this.Hl=be[15]|0}},Dx=ht(()=>new br),Ox=ht(()=>new Hn),Nx=ht(()=>new ei),Rx=ht(()=>new jn),_x=ht(()=>new Wn),Ux=ht(()=>new Vn)});var le,Sl=M(()=>{le=class extends Error{constructor(e){super(e),this.name="DecodingError"}}});var he,wl=M(()=>{he=class extends Error{constructor(e){super(e),this.name="EncodingError"}}});var ot,Tl=M(()=>{ot=class extends Error{constructor(e){super(e),this.name="GVLError"}}});var Ce,El=M(()=>{Ce=class extends Error{constructor(e,t,i=""){super(`invalid value ${t} passed for ${e} ${i}`),this.name="TCModelError"}}});var Ae=M(()=>{Sl();wl();Tl();El()});var _e,To=M(()=>{Ae();_e=class{static encode(e){if(!/^[0-1]+$/.test(e))throw new he("Invalid bitField");let t=e.length%this.LCM;e+=t?"0".repeat(this.LCM-t):"";let i="";for(let n=0;n<e.length;n+=this.BASIS)i+=this.DICT[parseInt(e.substr(n,this.BASIS),2)];return i}static decode(e){if(!/^[A-Za-z0-9\-_]+$/.test(e))throw new le("Invalidly encoded Base64URL string");let t="";for(let i=0;i<e.length;i++){let n=this.REVERSE_DICT.get(e[i]).toString(2);t+="0".repeat(this.BASIS-n.length)+n}return t}};l(_e,"DICT","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),l(_e,"REVERSE_DICT",new Map([["A",0],["B",1],["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25],["a",26],["b",27],["c",28],["d",29],["e",30],["f",31],["g",32],["h",33],["i",34],["j",35],["k",36],["l",37],["m",38],["n",39],["o",40],["p",41],["q",42],["r",43],["s",44],["t",45],["u",46],["v",47],["w",48],["x",49],["y",50],["z",51],["0",52],["1",53],["2",54],["3",55],["4",56],["5",57],["6",58],["7",59],["8",60],["9",61],["-",62],["_",63]])),l(_e,"BASIS",6),l(_e,"LCM",24)});var at,kr,Ml=M(()=>{at=class at{has(e){return at.langSet.has(e)}parseLanguage(e){e=e.toUpperCase();let t=e.split("-")[0];if(e.length>=2&&t.length==2){if(at.langSet.has(e))return e;if(at.langSet.has(t))return t;let i=t+"-"+t;if(at.langSet.has(i))return i;for(let n of at.langSet)if(n.indexOf(e)!==-1||n.indexOf(t)!==-1)return n}throw new Error(`unsupported language ${e}`)}forEach(e){at.langSet.forEach(e)}get size(){return at.langSet.size}};l(at,"langSet",new Set(["AR","BG","BS","CA","CS","CY","DA","DE","EL","EN","ES","ET","EU","FI","FR","GL","HE","HI","HR","HU","ID","IT","JA","KA","KO","LT","LV","MK","MS","MT","NL","NO","PL","PT-BR","PT-PT","RO","RU","SK","SL","SQ","SR-LATN","SR-CYRL","SV","SW","TH","TL","TR","UK","VI","ZH","ZH-HANT"]));kr=at});var x,Eo=M(()=>{x=class{};l(x,"cmpId","cmpId"),l(x,"cmpVersion","cmpVersion"),l(x,"consentLanguage","consentLanguage"),l(x,"consentScreen","consentScreen"),l(x,"created","created"),l(x,"supportOOB","supportOOB"),l(x,"isServiceSpecific","isServiceSpecific"),l(x,"lastUpdated","lastUpdated"),l(x,"numCustomPurposes","numCustomPurposes"),l(x,"policyVersion","policyVersion"),l(x,"publisherCountryCode","publisherCountryCode"),l(x,"publisherCustomConsents","publisherCustomConsents"),l(x,"publisherCustomLegitimateInterests","publisherCustomLegitimateInterests"),l(x,"publisherLegitimateInterests","publisherLegitimateInterests"),l(x,"publisherConsents","publisherConsents"),l(x,"publisherRestrictions","publisherRestrictions"),l(x,"purposeConsents","purposeConsents"),l(x,"purposeLegitimateInterests","purposeLegitimateInterests"),l(x,"purposeOneTreatment","purposeOneTreatment"),l(x,"specialFeatureOptins","specialFeatureOptins"),l(x,"useNonStandardTexts","useNonStandardTexts"),l(x,"vendorConsents","vendorConsents"),l(x,"vendorLegitimateInterests","vendorLegitimateInterests"),l(x,"vendorListVersion","vendorListVersion"),l(x,"vendorsAllowed","vendorsAllowed"),l(x,"vendorsDisclosed","vendorsDisclosed"),l(x,"version","version")});var Ll=M(()=>{});var Dl=M(()=>{});var De,ii=M(()=>{De=class{clone(){let e=new this.constructor;return Object.keys(this).forEach(i=>{let n=this.deepClone(this[i]);n!==void 0&&(e[i]=n)}),e}deepClone(e){let t=typeof e;if(t==="number"||t==="string"||t==="boolean")return e;if(e!==null&&t==="object"){if(typeof e.clone=="function")return e.clone();if(e instanceof Date)return new Date(e.getTime());if(e[Symbol.iterator]!==void 0){let i=[];for(let n of e)i.push(this.deepClone(n));return e instanceof Array?i:new e.constructor(i)}else{let i={};for(let n in e)e.hasOwnProperty(n)&&(i[n]=this.deepClone(e[n]));return i}}}}});var we,es=M(()=>{(function(r){r[r.NOT_ALLOWED=0]="NOT_ALLOWED",r[r.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",r[r.REQUIRE_LI=2]="REQUIRE_LI"})(we||(we={}))});var Ir,ct,Mo=M(()=>{ii();Ae();es();Ir=class Ir extends De{constructor(t,i){super();l(this,"purposeId_");l(this,"restrictionType");t!==void 0&&(this.purposeId=t),i!==void 0&&(this.restrictionType=i)}static unHash(t){let i=t.split(this.hashSeparator),n=new Ir;if(i.length!==2)throw new Ce("hash",t);return n.purposeId=parseInt(i[0],10),n.restrictionType=parseInt(i[1],10),n}get hash(){if(!this.isValid())throw new Error("cannot hash invalid PurposeRestriction");return`${this.purposeId}${Ir.hashSeparator}${this.restrictionType}`}get purposeId(){return this.purposeId_}set purposeId(t){this.purposeId_=t}isValid(){return Number.isInteger(this.purposeId)&&this.purposeId>0&&(this.restrictionType===we.NOT_ALLOWED||this.restrictionType===we.REQUIRE_CONSENT||this.restrictionType===we.REQUIRE_LI)}isSameAs(t){return this.purposeId===t.purposeId&&this.restrictionType===t.restrictionType}};l(Ir,"hashSeparator","-");ct=Ir});var ri,Ol=M(()=>{Mo();es();ii();ri=class extends De{constructor(){super(...arguments);l(this,"bitLength",0);l(this,"map",new Map);l(this,"gvl_")}has(t){return this.map.has(t)}isOkToHave(t,i,n){var o;let s=!0;if((o=this.gvl)!=null&&o.vendors){let a=this.gvl.vendors[n];if(a)if(t===we.NOT_ALLOWED)s=a.legIntPurposes.includes(i)||a.purposes.includes(i);else if(a.flexiblePurposes.length)switch(t){case we.REQUIRE_CONSENT:s=a.flexiblePurposes.includes(i)&&a.legIntPurposes.includes(i);break;case we.REQUIRE_LI:s=a.flexiblePurposes.includes(i)&&a.purposes.includes(i);break}else s=!1;else s=!1}return s}add(t,i){if(this.isOkToHave(i.restrictionType,i.purposeId,t)){let n=i.hash;this.has(n)||(this.map.set(n,new Set),this.bitLength=0),this.map.get(n).add(t)}}restrictPurposeToLegalBasis(t){let i=Array.from(this.gvl.vendorIds),n=t.hash,s=i[i.length-1],o=[...Array(s).keys()].map(a=>a+1);if(!this.has(n))this.map.set(n,new Set(o)),this.bitLength=0;else for(let a=1;a<=s;a++)this.map.get(n).add(a)}getVendors(t){let i=[];if(t){let n=t.hash;this.has(n)&&(i=Array.from(this.map.get(n)))}else{let n=new Set;this.map.forEach(s=>{s.forEach(o=>{n.add(o)})}),i=Array.from(n)}return i.sort((n,s)=>n-s)}getRestrictionType(t,i){let n;return this.getRestrictions(t).forEach(s=>{s.purposeId===i&&(n===void 0||n>s.restrictionType)&&(n=s.restrictionType)}),n}vendorHasRestriction(t,i){let n=!1,s=this.getRestrictions(t);for(let o=0;o<s.length&&!n;o++)n=i.isSameAs(s[o]);return n}getMaxVendorId(){let t=0;return this.map.forEach(i=>{t=Math.max(Array.from(i)[i.size-1],t)}),t}getRestrictions(t){let i=[];return this.map.forEach((n,s)=>{t?n.has(t)&&i.push(ct.unHash(s)):i.push(ct.unHash(s))}),i}getPurposes(){let t=new Set;return this.map.forEach((i,n)=>{t.add(ct.unHash(n).purposeId)}),Array.from(t)}remove(t,i){let n=i.hash,s=this.map.get(n);s&&(s.delete(t),s.size==0&&(this.map.delete(n),this.bitLength=0))}set gvl(t){this.gvl_||(this.gvl_=t,this.map.forEach((i,n)=>{let s=ct.unHash(n);Array.from(i).forEach(a=>{this.isOkToHave(s.restrictionType,s.purposeId,a)||i.delete(a)})}))}get gvl(){return this.gvl_}isEmpty(){return this.map.size===0}get numRestrictions(){return this.map.size}}});var Lo,Nl=M(()=>{(function(r){r.COOKIE="cookie",r.WEB="web",r.APP="app"})(Lo||(Lo={}))});var Rl=M(()=>{});var X,Do=M(()=>{(function(r){r.CORE="core",r.VENDORS_DISCLOSED="vendorsDisclosed",r.VENDORS_ALLOWED="vendorsAllowed",r.PUBLISHER_TC="publisherTC"})(X||(X={}))});var bt,_l=M(()=>{Do();bt=class{};l(bt,"ID_TO_KEY",[X.CORE,X.VENDORS_DISCLOSED,X.VENDORS_ALLOWED,X.PUBLISHER_TC]),l(bt,"KEY_TO_ID",{[X.CORE]:0,[X.VENDORS_DISCLOSED]:1,[X.VENDORS_ALLOWED]:2,[X.PUBLISHER_TC]:3})});var fe,Ul=M(()=>{ii();Ae();fe=class extends De{constructor(){super(...arguments);l(this,"bitLength",0);l(this,"maxId_",0);l(this,"set_",new Set)}*[Symbol.iterator](){for(let t=1;t<=this.maxId;t++)yield[t,this.has(t)]}values(){return this.set_.values()}get maxId(){return this.maxId_}has(t){return this.set_.has(t)}unset(t){Array.isArray(t)?t.forEach(i=>this.unset(i)):typeof t=="object"?this.unset(Object.keys(t).map(i=>Number(i))):(this.set_.delete(Number(t)),this.bitLength=0,t===this.maxId&&(this.maxId_=0,this.set_.forEach(i=>{this.maxId_=Math.max(this.maxId,i)})))}isIntMap(t){let i=typeof t=="object";return i=i&&Object.keys(t).every(n=>{let s=Number.isInteger(parseInt(n,10));return s=s&&this.isValidNumber(t[n].id),s=s&&t[n].name!==void 0,s}),i}isValidNumber(t){return parseInt(t,10)>0}isSet(t){let i=!1;return t instanceof Set&&(i=Array.from(t).every(this.isValidNumber)),i}set(t){if(Array.isArray(t))t.forEach(i=>this.set(i));else if(this.isSet(t))this.set(Array.from(t));else if(this.isIntMap(t))this.set(Object.keys(t).map(i=>Number(i)));else if(this.isValidNumber(t))this.set_.add(t),this.maxId_=Math.max(this.maxId,t),this.bitLength=0;else throw new Ce("set()",t,"must be positive integer array, positive integer, Set<number>, or IntMap")}empty(){this.set_=new Set,this.maxId_=0}forEach(t){for(let i=1;i<=this.maxId;i++)t(this.has(i),i)}get size(){return this.set_.size}setAll(t){this.set(t)}}});var Bl=M(()=>{});var Fl=M(()=>{});var Hl=M(()=>{});var jl=M(()=>{});var Vl=M(()=>{});var Wl=M(()=>{});var Gl=M(()=>{});var $l=M(()=>{});var ql=M(()=>{});var Kl=M(()=>{});var Jl=M(()=>{});var Ql=M(()=>{Bl();Fl();Hl();jl();Vl();Wl();Gl();$l();ql();Kl();Jl()});var Te=M(()=>{Ml();Eo();Ll();Dl();Mo();Ol();Nl();Rl();es();Do();_l();Ul();Ql()});var zl,Yl,Zl,Xl,ef,tf,rf,nf,sf,of,af,cf,df,uf,lf,ff,mf,gf,P,ts=M(()=>{Te();gf=x.cmpId,mf=x.cmpVersion,ff=x.consentLanguage,lf=x.consentScreen,uf=x.created,df=x.isServiceSpecific,cf=x.lastUpdated,af=x.policyVersion,of=x.publisherCountryCode,sf=x.publisherLegitimateInterests,nf=x.publisherConsents,rf=x.purposeConsents,tf=x.purposeLegitimateInterests,ef=x.purposeOneTreatment,Xl=x.specialFeatureOptins,Zl=x.useNonStandardTexts,Yl=x.vendorListVersion,zl=x.version;P=class{};l(P,gf,12),l(P,mf,12),l(P,ff,12),l(P,lf,6),l(P,uf,36),l(P,df,1),l(P,cf,36),l(P,af,6),l(P,of,12),l(P,sf,24),l(P,nf,24),l(P,rf,24),l(P,tf,24),l(P,ef,1),l(P,Xl,12),l(P,Zl,1),l(P,Yl,12),l(P,zl,6),l(P,"anyBoolean",1),l(P,"encodingType",1),l(P,"maxId",16),l(P,"numCustomPurposes",6),l(P,"numEntries",12),l(P,"numRestrictions",12),l(P,"purposeId",6),l(P,"restrictionType",2),l(P,"segmentType",3),l(P,"singleOrRange",1),l(P,"vendorId",16)});var pf=M(()=>{});var ye,Hi=M(()=>{ye=class{static encode(e){return String(Number(e))}static decode(e){return e==="1"}}});var B,jt=M(()=>{Ae();B=class{static encode(e,t){let i;if(typeof e=="string"&&(e=parseInt(e,10)),i=e.toString(2),i.length>t||e<0)throw new he(`${e} too large to encode into ${t}`);return i.length<t&&(i="0".repeat(t-i.length)+i),i}static decode(e,t){if(t!==e.length)throw new le("invalid bit length");return parseInt(e,2)}}});var ji,Oo=M(()=>{jt();Ae();ji=class{static encode(e,t){return B.encode(Math.round(e.getTime()/100),t)}static decode(e,t){if(t!==e.length)throw new le("invalid bit length");let i=new Date;return i.setTime(B.decode(e,t)*100),i}}});var Oe,is=M(()=>{Hi();Ae();Te();Oe=class{static encode(e,t){let i="";for(let n=1;n<=t;n++)i+=ye.encode(e.has(n));return i}static decode(e,t){if(e.length!==t)throw new le("bitfield encoding length mismatch");let i=new fe;for(let n=1;n<=t;n++)ye.decode(e[n-1])&&i.set(n);return i.bitLength=e.length,i}}});var Vi,No=M(()=>{jt();Ae();Vi=class{static encode(e,t){e=e.toUpperCase();let i=65,n=e.charCodeAt(0)-i,s=e.charCodeAt(1)-i;if(n<0||n>25||s<0||s>25)throw new he(`invalid language code: ${e}`);if(t%2===1)throw new he(`numBits must be even, ${t} is not valid`);t=t/2;let o=B.encode(n,t),a=B.encode(s,t);return o+a}static decode(e,t){let i;if(t===e.length&&!(e.length%2)){let s=e.length/2,o=B.decode(e.slice(0,s),s)+65,a=B.decode(e.slice(s),s)+65;i=String.fromCharCode(o)+String.fromCharCode(a)}else throw new le("invalid bit length for language");return i}}});var xr,Ro=M(()=>{ts();Hi();Ae();jt();Te();xr=class{static encode(e){let t=B.encode(e.numRestrictions,P.numRestrictions);if(!e.isEmpty()){let i=(n,s)=>{for(let o=n+1;o<=s;o++)if(e.gvl.vendorIds.has(o))return o;return n};e.getRestrictions().forEach(n=>{t+=B.encode(n.purposeId,P.purposeId),t+=B.encode(n.restrictionType,P.restrictionType);let s=e.getVendors(n),o=s.length,a=0,c=0,d="";for(let f=0;f<o;f++){let u=s[f];if(c===0&&(a++,c=u),f===o-1||s[f+1]>i(u,s[o-1])){let m=u!==c;d+=ye.encode(m),d+=B.encode(c,P.vendorId),m&&(d+=B.encode(u,P.vendorId)),c=0}}t+=B.encode(a,P.numEntries),t+=d})}return t}static decode(e){let t=0,i=new ri,n=B.decode(e.substr(t,P.numRestrictions),P.numRestrictions);t+=P.numRestrictions;for(let s=0;s<n;s++){let o=B.decode(e.substr(t,P.purposeId),P.purposeId);t+=P.purposeId;let a=B.decode(e.substr(t,P.restrictionType),P.restrictionType);t+=P.restrictionType;let c=new ct(o,a),d=B.decode(e.substr(t,P.numEntries),P.numEntries);t+=P.numEntries;for(let f=0;f<d;f++){let u=ye.decode(e.substr(t,P.anyBoolean));t+=P.anyBoolean;let m=B.decode(e.substr(t,P.vendorId),P.vendorId);if(t+=P.vendorId,u){let g=B.decode(e.substr(t,P.vendorId),P.vendorId);if(t+=P.vendorId,g<m)throw new le(`Invalid RangeEntry: endVendorId ${g} is less than ${m}`);for(let p=m;p<=g;p++)i.add(p,c)}else i.add(m,c)}}return i.bitLength=t,i}}});var ni,_o=M(()=>{(function(r){r[r.FIELD=0]="FIELD",r[r.RANGE=1]="RANGE"})(ni||(ni={}))});var dt,Uo=M(()=>{Te();rs();jt();Hi();is();_o();Ae();dt=class{static encode(e){let t=[],i=[],n=B.encode(e.maxId,P.maxId),s="",o,a=P.maxId+P.encodingType,c=a+e.maxId,d=P.vendorId*2+P.singleOrRange+P.numEntries,f=a+P.numEntries;return e.forEach((u,m)=>{s+=ye.encode(u),o=e.maxId>d&&f<c,o&&u&&(e.has(m+1)?i.length===0&&(i.push(m),f+=P.singleOrRange,f+=P.vendorId):(i.push(m),f+=P.vendorId,t.push(i),i=[]))}),o?(n+=String(ni.RANGE),n+=this.buildRangeEncoding(t)):(n+=String(ni.FIELD),n+=s),n}static decode(e,t){let i,n=0,s=B.decode(e.substr(n,P.maxId),P.maxId);n+=P.maxId;let o=B.decode(e.charAt(n),P.encodingType);if(n+=P.encodingType,o===ni.RANGE){if(i=new fe,t===1){if(e.substr(n,1)==="1")throw new le("Unable to decode default consent=1");n++}let a=B.decode(e.substr(n,P.numEntries),P.numEntries);n+=P.numEntries;for(let c=0;c<a;c++){let d=ye.decode(e.charAt(n));n+=P.singleOrRange;let f=B.decode(e.substr(n,P.vendorId),P.vendorId);if(n+=P.vendorId,d){let u=B.decode(e.substr(n,P.vendorId),P.vendorId);n+=P.vendorId;for(let m=f;m<=u;m++)i.set(m)}else i.set(f)}}else{let a=e.substr(n,s);n+=s,i=Oe.decode(a,s)}return i.bitLength=n,i}static buildRangeEncoding(e){let t=e.length,i=B.encode(t,P.numEntries);return e.forEach(n=>{let s=n.length===1;i+=ye.encode(!s),i+=B.encode(n[0],P.vendorId),s||(i+=B.encode(n[1],P.vendorId))}),i}}});function ns(){return{[x.version]:B,[x.created]:ji,[x.lastUpdated]:ji,[x.cmpId]:B,[x.cmpVersion]:B,[x.consentScreen]:B,[x.consentLanguage]:Vi,[x.vendorListVersion]:B,[x.policyVersion]:B,[x.isServiceSpecific]:ye,[x.useNonStandardTexts]:ye,[x.specialFeatureOptins]:Oe,[x.purposeConsents]:Oe,[x.purposeLegitimateInterests]:Oe,[x.purposeOneTreatment]:ye,[x.publisherCountryCode]:Vi,[x.vendorConsents]:dt,[x.vendorLegitimateInterests]:dt,[x.publisherRestrictions]:xr,segmentType:B,[x.vendorsDisclosed]:dt,[x.vendorsAllowed]:dt,[x.publisherConsents]:Oe,[x.publisherLegitimateInterests]:Oe,[x.numCustomPurposes]:B,[x.publisherCustomConsents]:Oe,[x.publisherCustomLegitimateInterests]:Oe}}var hf=M(()=>{Te();Hi();Oo();is();jt();No();Ro();Uo()});var Bo=M(()=>{Hi();Oo();hf();is();jt();No();Ro();_o();Uo()});var Cr,yf=M(()=>{Te();Cr=class{constructor(){l(this,1,{[X.CORE]:[x.version,x.created,x.lastUpdated,x.cmpId,x.cmpVersion,x.consentScreen,x.consentLanguage,x.vendorListVersion,x.purposeConsents,x.vendorConsents]});l(this,2,{[X.CORE]:[x.version,x.created,x.lastUpdated,x.cmpId,x.cmpVersion,x.consentScreen,x.consentLanguage,x.vendorListVersion,x.policyVersion,x.isServiceSpecific,x.useNonStandardTexts,x.specialFeatureOptins,x.purposeConsents,x.purposeLegitimateInterests,x.purposeOneTreatment,x.publisherCountryCode,x.vendorConsents,x.vendorLegitimateInterests,x.publisherRestrictions],[X.PUBLISHER_TC]:[x.publisherConsents,x.publisherLegitimateInterests,x.numCustomPurposes,x.publisherCustomConsents,x.publisherCustomLegitimateInterests],[X.VENDORS_ALLOWED]:[x.vendorsAllowed],[X.VENDORS_DISCLOSED]:[x.vendorsDisclosed]})}}});var Ar,vf=M(()=>{Te();Ar=class{constructor(e,t){l(this,1,[X.CORE]);l(this,2,[X.CORE]);if(e.version===2)if(e.isServiceSpecific)this[2].push(X.PUBLISHER_TC);else{let i=!!(t&&t.isForVendors);(!i||e[x.supportOOB]===!0)&&this[2].push(X.VENDORS_DISCLOSED),i&&(e[x.supportOOB]&&e[x.vendorsAllowed].size>0&&this[2].push(X.VENDORS_ALLOWED),this[2].push(X.PUBLISHER_TC))}}}});var bf=M(()=>{});var Fo=M(()=>{yf();vf();bf()});var si,kf=M(()=>{To();ts();Bo();Fo();Ae();Eo();Te();si=class{static encode(e,t){let i;try{i=this.fieldSequence[String(e.version)][t]}catch(o){throw new he(`Unable to encode version: ${e.version}, segment: ${t}`)}let n="";t!==X.CORE&&(n=B.encode(bt.KEY_TO_ID[t],P.segmentType));let s=ns();return i.forEach(o=>{let a=e[o],c=s[o],d=P[o];d===void 0&&this.isPublisherCustom(o)&&(d=Number(e[x.numCustomPurposes]));try{n+=c.encode(a,d)}catch(f){throw new he(`Error encoding ${t}->${o}: ${f.message}`)}}),_e.encode(n)}static decode(e,t,i){let n=_e.decode(e),s=0;i===X.CORE&&(t.version=B.decode(n.substr(s,P[x.version]),P[x.version])),i!==X.CORE&&(s+=P.segmentType);let o=this.fieldSequence[String(t.version)][i],a=ns();return o.forEach(c=>{let d=a[c],f=P[c];if(f===void 0&&this.isPublisherCustom(c)&&(f=Number(t[x.numCustomPurposes])),f!==0){let u=n.substr(s,f);if(d===dt?t[c]=d.decode(u,t.version):t[c]=d.decode(u,f),Number.isInteger(f))s+=f;else if(Number.isInteger(t[c].bitLength))s+=t[c].bitLength;else throw new le(c)}}),t}static isPublisherCustom(e){return e.indexOf("publisherCustom")===0}};l(si,"fieldSequence",new Cr)});var Wi,If=M(()=>{Ae();Te();Wi=class{static process(e,t){let i=e.gvl;if(!i)throw new he("Unable to encode TCModel without a GVL");if(!i.isReady)throw new he("Unable to encode TCModel tcModel.gvl.readyPromise is not resolved");e=e.clone(),e.consentLanguage=i.language.slice(0,2).toUpperCase(),(t==null?void 0:t.version)>0&&(t==null?void 0:t.version)<=this.processor.length?e.version=t.version:e.version=this.processor.length;let n=e.version-1;if(!this.processor[n])throw new he(`Invalid version: ${e.version}`);return this.processor[n](e,i)}};l(Wi,"processor",[e=>e,(e,t)=>{e.publisherRestrictions.gvl=t,e.purposeLegitimateInterests.unset([1,3,4,5,6]);let i=new Map;return i.set("legIntPurposes",e.vendorLegitimateInterests),i.set("purposes",e.vendorConsents),i.forEach((n,s)=>{n.forEach((o,a)=>{if(o){let c=t.vendors[a];if(!c||c.deletedDate)n.unset(a);else if(c[s].length===0)if(s==="legIntPurposes"&&c.purposes.length===0&&c.legIntPurposes.length===0&&c.specialPurposes.length>0)n.set(a);else if(s==="legIntPurposes"&&c.purposes.length>0&&c.legIntPurposes.length===0&&c.specialPurposes.length>0)n.set(a);else if(e.isServiceSpecific)if(c.flexiblePurposes.length===0)n.unset(a);else{let d=e.publisherRestrictions.getRestrictions(a),f=!1;for(let u=0,m=d.length;u<m&&!f;u++)f=d[u].restrictionType===we.REQUIRE_CONSENT&&s==="purposes"||d[u].restrictionType===we.REQUIRE_LI&&s==="legIntPurposes";f||n.unset(a)}else n.unset(a)}})}),e.vendorsDisclosed.set(t.vendors),e}])});var rs=M(()=>{To();ts();pf();kf();If();Bo();Fo()});var Pr,Ho=M(()=>{Pr=class{static absCall(e,t,i,n){return new Promise((s,o)=>{let a=new XMLHttpRequest,c=()=>{if(a.readyState==XMLHttpRequest.DONE)if(a.status>=200&&a.status<300){let m=a.response;if(typeof m=="string")try{m=JSON.parse(m)}catch(g){}s(m)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},d=()=>{o(new Error("error"))},f=()=>{o(new Error("aborted"))},u=()=>{o(new Error("Timeout "+n+"ms "+e))};a.withCredentials=i,a.addEventListener("load",c),a.addEventListener("error",d),a.addEventListener("abort",f),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=n,a.ontimeout=u,a.send(t)})}static post(e,t,i=!1,n=0){return this.absCall(e,JSON.stringify(t),i,n)}static fetch(e,t=!1,i=0){return this.absCall(e,null,t,i)}}});var _,oi,jo=M(()=>{ii();Ae();Ho();Te();_=class _ extends De{constructor(t,i){super();l(this,"readyPromise");l(this,"gvlSpecificationVersion");l(this,"vendorListVersion");l(this,"tcfPolicyVersion");l(this,"lastUpdated");l(this,"purposes");l(this,"specialPurposes");l(this,"features");l(this,"specialFeatures");l(this,"isReady_",!1);l(this,"vendors_");l(this,"vendorIds");l(this,"fullVendorList");l(this,"byPurposeVendorMap");l(this,"bySpecialPurposeVendorMap");l(this,"byFeatureVendorMap");l(this,"bySpecialFeatureVendorMap");l(this,"stacks");l(this,"dataCategories");l(this,"lang_");l(this,"cacheLang_");l(this,"isLatest",!1);let n=_.baseUrl,s=i==null?void 0:i.language;if(s)try{s=_.consentLanguages.parseLanguage(s)}catch(o){throw new ot("Error during parsing the language: "+o.message)}if(this.lang_=s||_.DEFAULT_LANGUAGE,this.cacheLang_=s||_.DEFAULT_LANGUAGE,this.isVendorList(t))this.populate(t),this.readyPromise=Promise.resolve();else{if(!n)throw new ot("must specify GVL.baseUrl before loading GVL json");if(t>0){let o=t;_.CACHE.has(o)?(this.populate(_.CACHE.get(o)),this.readyPromise=Promise.resolve()):(n+=_.versionedFilename.replace("[VERSION]",String(o)),this.readyPromise=this.fetchJson(n))}else _.CACHE.has(_.LATEST_CACHE_KEY)?(this.populate(_.CACHE.get(_.LATEST_CACHE_KEY)),this.readyPromise=Promise.resolve()):(this.isLatest=!0,this.readyPromise=this.fetchJson(n+_.latestFilename))}}static set baseUrl(t){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(t))throw new ot("Invalid baseUrl!  You may not pull directly from vendorlist.consensu.org and must provide your own cache");t.length>0&&t[t.length-1]!=="/"&&(t+="/"),this.baseUrl_=t}static get baseUrl(){return this.baseUrl_}static emptyLanguageCache(t){let i=!1;return t==null&&_.LANGUAGE_CACHE.size>0?(_.LANGUAGE_CACHE=new Map,i=!0):typeof t=="string"&&this.consentLanguages.has(t.toUpperCase())&&(_.LANGUAGE_CACHE.delete(t.toUpperCase()),i=!0),i}static emptyCache(t){let i=!1;return Number.isInteger(t)&&t>=0?(_.CACHE.delete(t),i=!0):t===void 0&&(_.CACHE=new Map,i=!0),i}cacheLanguage(){_.LANGUAGE_CACHE.has(this.cacheLang_)||_.LANGUAGE_CACHE.set(this.cacheLang_,{purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories})}fetchJson(t){return h(this,null,function*(){try{this.populate(yield Pr.fetch(t))}catch(i){throw new ot(i.message)}})}getJson(){return H(y({gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.clonePurposes(),specialPurposes:this.cloneSpecialPurposes(),features:this.cloneFeatures(),specialFeatures:this.cloneSpecialFeatures(),stacks:this.cloneStacks()},this.dataCategories?{dataCategories:this.cloneDataCategories()}:{}),{vendors:this.cloneVendors()})}cloneSpecialFeatures(){let t={};for(let i of Object.keys(this.specialFeatures))t[i]=_.cloneFeature(this.specialFeatures[i]);return t}cloneFeatures(){let t={};for(let i of Object.keys(this.features))t[i]=_.cloneFeature(this.features[i]);return t}cloneStacks(){let t={};for(let i of Object.keys(this.stacks))t[i]=_.cloneStack(this.stacks[i]);return t}cloneDataCategories(){let t={};for(let i of Object.keys(this.dataCategories))t[i]=_.cloneDataCategory(this.dataCategories[i]);return t}cloneSpecialPurposes(){let t={};for(let i of Object.keys(this.specialPurposes))t[i]=_.clonePurpose(this.specialPurposes[i]);return t}clonePurposes(){let t={};for(let i of Object.keys(this.purposes))t[i]=_.clonePurpose(this.purposes[i]);return t}static clonePurpose(t){return y(y({id:t.id,name:t.name,description:t.description},t.descriptionLegal?{descriptionLegal:t.descriptionLegal}:{}),t.illustrations?{illustrations:Array.from(t.illustrations)}:{})}static cloneFeature(t){return y(y({id:t.id,name:t.name,description:t.description},t.descriptionLegal?{descriptionLegal:t.descriptionLegal}:{}),t.illustrations?{illustrations:Array.from(t.illustrations)}:{})}static cloneDataCategory(t){return{id:t.id,name:t.name,description:t.description}}static cloneStack(t){return{id:t.id,name:t.name,description:t.description,purposes:Array.from(t.purposes),specialFeatures:Array.from(t.specialFeatures)}}static cloneDataRetention(t){return H(y({},typeof t.stdRetention=="number"?{stdRetention:t.stdRetention}:{}),{purposes:y({},t.purposes),specialPurposes:y({},t.specialPurposes)})}static cloneVendorUrls(t){return t.map(i=>y({langId:i.langId,privacy:i.privacy},i.legIntClaim?{legIntClaim:i.legIntClaim}:{}))}static cloneVendor(t){return y(y(y(y(y(y(y(y(y(y(y({id:t.id,name:t.name,purposes:Array.from(t.purposes),legIntPurposes:Array.from(t.legIntPurposes),flexiblePurposes:Array.from(t.flexiblePurposes),specialPurposes:Array.from(t.specialPurposes),features:Array.from(t.features),specialFeatures:Array.from(t.specialFeatures)},t.overflow?{overflow:{httpGetLimit:t.overflow.httpGetLimit}}:{}),typeof t.cookieMaxAgeSeconds=="number"||t.cookieMaxAgeSeconds===null?{cookieMaxAgeSeconds:t.cookieMaxAgeSeconds}:{}),t.usesCookies!==void 0?{usesCookies:t.usesCookies}:{}),t.policyUrl?{policyUrl:t.policyUrl}:{}),t.cookieRefresh!==void 0?{cookieRefresh:t.cookieRefresh}:{}),t.usesNonCookieAccess!==void 0?{usesNonCookieAccess:t.usesNonCookieAccess}:{}),t.dataRetention?{dataRetention:this.cloneDataRetention(t.dataRetention)}:{}),t.urls?{urls:this.cloneVendorUrls(t.urls)}:{}),t.dataDeclaration?{dataDeclaration:Array.from(t.dataDeclaration)}:{}),t.deviceStorageDisclosureUrl?{deviceStorageDisclosureUrl:t.deviceStorageDisclosureUrl}:{}),t.deletedDate?{deletedDate:t.deletedDate}:{})}cloneVendors(){let t={};for(let i of Object.keys(this.fullVendorList))t[i]=_.cloneVendor(this.fullVendorList[i]);return t}changeLanguage(t){return h(this,null,function*(){let i=t;try{i=_.consentLanguages.parseLanguage(t)}catch(s){throw new ot("Error during parsing the language: "+s.message)}let n=t.toUpperCase();if(!(i.toLowerCase()===_.DEFAULT_LANGUAGE.toLowerCase()&&!_.LANGUAGE_CACHE.has(n))&&i!==this.lang_)if(this.lang_=i,_.LANGUAGE_CACHE.has(n)){let s=_.LANGUAGE_CACHE.get(n);for(let o in s)s.hasOwnProperty(o)&&(this[o]=s[o])}else{let s=_.baseUrl+_.languageFilename.replace("[LANG]",this.lang_.toLowerCase());try{yield this.fetchJson(s),this.cacheLang_=n,this.cacheLanguage()}catch(o){throw new ot("unable to load language: "+o.message)}}})}get language(){return this.lang_}isVendorList(t){return t!==void 0&&t.vendors!==void 0}populate(t){this.purposes=t.purposes,this.specialPurposes=t.specialPurposes,this.features=t.features,this.specialFeatures=t.specialFeatures,this.stacks=t.stacks,this.dataCategories=t.dataCategories,this.isVendorList(t)&&(this.gvlSpecificationVersion=t.gvlSpecificationVersion,this.tcfPolicyVersion=t.tcfPolicyVersion,this.vendorListVersion=t.vendorListVersion,this.lastUpdated=t.lastUpdated,typeof this.lastUpdated=="string"&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors_=t.vendors,this.fullVendorList=t.vendors,this.mapVendors(),this.isReady_=!0,this.isLatest&&_.CACHE.set(_.LATEST_CACHE_KEY,this.getJson()),_.CACHE.has(this.vendorListVersion)||_.CACHE.set(this.vendorListVersion,this.getJson())),this.cacheLanguage()}mapVendors(t){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(i=>{this.byPurposeVendorMap[i]={legInt:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(i=>{this.bySpecialPurposeVendorMap[i]=new Set}),Object.keys(this.features).forEach(i=>{this.byFeatureVendorMap[i]=new Set}),Object.keys(this.specialFeatures).forEach(i=>{this.bySpecialFeatureVendorMap[i]=new Set}),Array.isArray(t)||(t=Object.keys(this.fullVendorList).map(i=>+i)),this.vendorIds=new Set(t),this.vendors_=t.reduce((i,n)=>{let s=this.vendors_[String(n)];return s&&s.deletedDate===void 0&&(s.purposes.forEach(o=>{this.byPurposeVendorMap[String(o)].consent.add(n)}),s.specialPurposes.forEach(o=>{this.bySpecialPurposeVendorMap[String(o)].add(n)}),s.legIntPurposes.forEach(o=>{this.byPurposeVendorMap[String(o)].legInt.add(n)}),s.flexiblePurposes&&s.flexiblePurposes.forEach(o=>{this.byPurposeVendorMap[String(o)].flexible.add(n)}),s.features.forEach(o=>{this.byFeatureVendorMap[String(o)].add(n)}),s.specialFeatures.forEach(o=>{this.bySpecialFeatureVendorMap[String(o)].add(n)}),i[n]=s),i},{})}getFilteredVendors(t,i,n,s){let o=t.charAt(0).toUpperCase()+t.slice(1),a,c={};return t==="purpose"&&n?a=this["by"+o+"VendorMap"][String(i)][n]:a=this["by"+(s?"Special":"")+o+"VendorMap"][String(i)],a.forEach(d=>{c[String(d)]=this.vendors[String(d)]}),c}getVendorsWithConsentPurpose(t){return this.getFilteredVendors("purpose",t,"consent")}getVendorsWithLegIntPurpose(t){return this.getFilteredVendors("purpose",t,"legInt")}getVendorsWithFlexiblePurpose(t){return this.getFilteredVendors("purpose",t,"flexible")}getVendorsWithSpecialPurpose(t){return this.getFilteredVendors("purpose",t,void 0,!0)}getVendorsWithFeature(t){return this.getFilteredVendors("feature",t)}getVendorsWithSpecialFeature(t){return this.getFilteredVendors("feature",t,void 0,!0)}get vendors(){return this.vendors_}narrowVendorsTo(t){this.mapVendors(t)}get isReady(){return this.isReady_}clone(){let t=new _(this.getJson());return this.lang_!==_.DEFAULT_LANGUAGE&&t.changeLanguage(this.lang_),t}static isInstanceOf(t){return typeof t=="object"&&typeof t.narrowVendorsTo=="function"}};l(_,"LANGUAGE_CACHE",new Map),l(_,"CACHE",new Map),l(_,"LATEST_CACHE_KEY",0),l(_,"DEFAULT_LANGUAGE","EN"),l(_,"consentLanguages",new kr),l(_,"baseUrl_"),l(_,"latestFilename","vendor-list.json"),l(_,"versionedFilename","archives/vendor-list-v[VERSION].json"),l(_,"languageFilename","purposes-[LANG].json");oi=_});var Gi,Vo=M(()=>{ii();Ae();jo();Te();Gi=class extends De{constructor(t){super();l(this,"isServiceSpecific_",!1);l(this,"supportOOB_",!0);l(this,"useNonStandardTexts_",!1);l(this,"purposeOneTreatment_",!1);l(this,"publisherCountryCode_","AA");l(this,"version_",2);l(this,"consentScreen_",0);l(this,"policyVersion_",5);l(this,"consentLanguage_","EN");l(this,"cmpId_",0);l(this,"cmpVersion_",0);l(this,"vendorListVersion_",0);l(this,"numCustomPurposes_",0);l(this,"gvl_");l(this,"created");l(this,"lastUpdated");l(this,"specialFeatureOptins",new fe);l(this,"purposeConsents",new fe);l(this,"purposeLegitimateInterests",new fe);l(this,"publisherConsents",new fe);l(this,"publisherLegitimateInterests",new fe);l(this,"publisherCustomConsents",new fe);l(this,"publisherCustomLegitimateInterests",new fe);l(this,"customPurposes");l(this,"vendorConsents",new fe);l(this,"vendorLegitimateInterests",new fe);l(this,"vendorsDisclosed",new fe);l(this,"vendorsAllowed",new fe);l(this,"publisherRestrictions",new ri);t&&(this.gvl=t),this.updated()}set gvl(t){oi.isInstanceOf(t)||(t=new oi(t)),this.gvl_=t,this.publisherRestrictions.gvl=t}get gvl(){return this.gvl_}set cmpId(t){if(t=Number(t),Number.isInteger(t)&&t>1)this.cmpId_=t;else throw new Ce("cmpId",t)}get cmpId(){return this.cmpId_}set cmpVersion(t){if(t=Number(t),Number.isInteger(t)&&t>-1)this.cmpVersion_=t;else throw new Ce("cmpVersion",t)}get cmpVersion(){return this.cmpVersion_}set consentScreen(t){if(t=Number(t),Number.isInteger(t)&&t>-1)this.consentScreen_=t;else throw new Ce("consentScreen",t)}get consentScreen(){return this.consentScreen_}set consentLanguage(t){this.consentLanguage_=t}get consentLanguage(){return this.consentLanguage_}set publisherCountryCode(t){if(/^([A-z]){2}$/.test(t))this.publisherCountryCode_=t.toUpperCase();else throw new Ce("publisherCountryCode",t)}get publisherCountryCode(){return this.publisherCountryCode_}set vendorListVersion(t){if(t=Number(t)>>0,t<0)throw new Ce("vendorListVersion",t);this.vendorListVersion_=t}get vendorListVersion(){return this.gvl?this.gvl.vendorListVersion:this.vendorListVersion_}set policyVersion(t){if(this.policyVersion_=parseInt(t,10),this.policyVersion_<0)throw new Ce("policyVersion",t)}get policyVersion(){return this.gvl?this.gvl.tcfPolicyVersion:this.policyVersion_}set version(t){this.version_=parseInt(t,10)}get version(){return this.version_}set isServiceSpecific(t){this.isServiceSpecific_=t}get isServiceSpecific(){return this.isServiceSpecific_}set useNonStandardTexts(t){this.useNonStandardTexts_=t}get useNonStandardTexts(){return this.useNonStandardTexts_}set supportOOB(t){this.supportOOB_=t}get supportOOB(){return this.supportOOB_}set purposeOneTreatment(t){this.purposeOneTreatment_=t}get purposeOneTreatment(){return this.purposeOneTreatment_}setAllVendorConsents(){this.vendorConsents.set(this.gvl.vendors)}unsetAllVendorConsents(){this.vendorConsents.empty()}setAllVendorsDisclosed(){this.vendorsDisclosed.set(this.gvl.vendors)}unsetAllVendorsDisclosed(){this.vendorsDisclosed.empty()}setAllVendorsAllowed(){this.vendorsAllowed.set(this.gvl.vendors)}unsetAllVendorsAllowed(){this.vendorsAllowed.empty()}setAllVendorLegitimateInterests(){this.vendorLegitimateInterests.set(this.gvl.vendors)}unsetAllVendorLegitimateInterests(){this.vendorLegitimateInterests.empty()}setAllPurposeConsents(){this.purposeConsents.set(this.gvl.purposes)}unsetAllPurposeConsents(){this.purposeConsents.empty()}setAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.set(this.gvl.purposes)}unsetAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.empty()}setAllSpecialFeatureOptins(){this.specialFeatureOptins.set(this.gvl.specialFeatures)}unsetAllSpecialFeatureOptins(){this.specialFeatureOptins.empty()}setAll(){this.setAllVendorConsents(),this.setAllPurposeLegitimateInterests(),this.setAllSpecialFeatureOptins(),this.setAllPurposeConsents(),this.setAllVendorLegitimateInterests()}unsetAll(){this.unsetAllVendorConsents(),this.unsetAllPurposeLegitimateInterests(),this.unsetAllSpecialFeatureOptins(),this.unsetAllPurposeConsents(),this.unsetAllVendorLegitimateInterests()}get numCustomPurposes(){let t=this.numCustomPurposes_;if(typeof this.customPurposes=="object"){let i=Object.keys(this.customPurposes).sort((n,s)=>Number(n)-Number(s));t=parseInt(i.pop(),10)}return t}set numCustomPurposes(t){if(this.numCustomPurposes_=parseInt(t,10),this.numCustomPurposes_<0)throw new Ce("numCustomPurposes",t)}updated(){let t=new Date,i=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()));this.created=i,this.lastUpdated=i}};l(Gi,"consentLanguages",oi.consentLanguages)});var Wo,xf=M(()=>{rs();Te();jt();Vo();Wo=class{static encode(e,t){let i="",n;return e=Wi.process(e,t),Array.isArray(t==null?void 0:t.segments)?n=t.segments:n=new Ar(e,t)[""+e.version],n.forEach((s,o)=>{let a="";o<n.length-1&&(a="."),i+=si.encode(e,s)+a}),i}static decode(e,t){let i=e.split("."),n=i.length;t||(t=new Gi);for(let s=0;s<n;s++){let o=i[s],c=_e.decode(o.charAt(0)).substr(0,P.segmentType),d=bt.ID_TO_KEY[B.decode(c,P.segmentType).toString()];si.decode(o,t,d)}return t}}});var Go={};nr(Go,{Base64Url:()=>_e,BitLength:()=>P,BooleanEncoder:()=>ye,Cloneable:()=>De,ConsentLanguages:()=>kr,DateEncoder:()=>ji,DecodingError:()=>le,DeviceDisclosureStorageAccessType:()=>Lo,EncodingError:()=>he,FieldEncoderMap:()=>ns,FieldSequence:()=>Cr,Fields:()=>x,FixedVectorEncoder:()=>Oe,GVL:()=>oi,GVLError:()=>ot,IntEncoder:()=>B,Json:()=>Pr,LangEncoder:()=>Vi,PurposeRestriction:()=>ct,PurposeRestrictionVector:()=>ri,PurposeRestrictionVectorEncoder:()=>xr,RestrictionType:()=>we,Segment:()=>X,SegmentEncoder:()=>si,SegmentIDs:()=>bt,SegmentSequence:()=>Ar,SemanticPreEncoder:()=>Wi,TCModel:()=>Gi,TCModelError:()=>Ce,TCString:()=>Wo,Vector:()=>fe,VectorEncodingType:()=>ni,VendorVectorEncoder:()=>dt});var $o=M(()=>{rs();Ae();Te();ii();jo();Ho();Vo();xf()});var Af=Bm((qo,Ko)=>{(function(r,e){typeof qo=="object"&&typeof Ko!="undefined"?Ko.exports=function(t,i,n,s,o){for(i=i.split?i.split("."):i,s=0;s<i.length;s++)t=t?t[i[s]]:o;return t===o?n:t}:typeof define=="function"&&define.amd?define(function(){return function(t,i,n,s,o){for(i=i.split?i.split("."):i,s=0;s<i.length;s++)t=t?t[i[s]]:o;return t===o?n:t}}):r.dlv=function(t,i,n,s,o){for(i=i.split?i.split("."):i,s=0;s<i.length;s++)t=t?t[i[s]]:o;return t===o?n:t}})(qo)});function Pf(r,e){return e.charAt(0)[r]()+e.slice(1)}function Gx(r){return wf(r)?Vx("null"):typeof r=="object"?Kx(r):Object.prototype.toString.call(r).slice(8,-1)}function cs(r,e){e===void 0&&(e=!0);var t=Gx(r);return e?Wx(t):t}function wr(r,e){return typeof e===r}function wf(r){return r===null}function $x(r){return cs(r)==="number"&&!isNaN(r)}function Tf(r){return cs(r)==="array"}function ke(r){if(!qx(r))return!1;for(var e=r;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(r)===e}function qx(r){return r&&(typeof r=="object"||r!==null)}function Kx(r){return We(r.constructor)?r.constructor.name:null}function Jx(r){return r instanceof Error||It(r.message)&&r.constructor&&$x(r.constructor.stackTraceLimit)}function Ef(r,e){if(typeof e!="object"||wf(e))return!1;if(e instanceof r)return!0;var t=cs(new r(""));if(Jx(e))for(;e;){if(cs(e)===t)return!0;e=Object.getPrototypeOf(e)}return!1}function ds(r,e){var t=r instanceof Element||r instanceof HTMLDocument;return t&&e?Qx(r,e):t}function Qx(r,e){return e===void 0&&(e=""),r&&r.nodeName===e.toUpperCase()}function us(r){var e=[].slice.call(arguments,1);return function(){return r.apply(void 0,[].slice.call(arguments).concat(e))}}var Sr,Jo,Qo,zo,kt,as,$U,Ee,qU,KU,JU,QU,zU,Vx,Wx,We,It,ai,Sf,YU,ZU,XU,eB,tB,iB,rB,Tr=M(()=>{Sr="undefined",Jo="object",Qo="any",zo="*",kt="__",as=typeof process!="undefined"?process:{},$U=as.env&&as.env.NODE_ENV||"",Ee=typeof document!="undefined",qU=Ee&&window.location.hostname==="localhost",KU=as.versions!=null&&as.versions.node!=null,JU=typeof Deno!="undefined"&&Deno.core!==void 0,QU=typeof self=="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope",zU=Ee&&window.name==="nodejs"||typeof navigator!="undefined"&&navigator.userAgent!==void 0&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));Vx=Pf.bind(null,"toUpperCase"),Wx=Pf.bind(null,"toLowerCase");We=wr.bind(null,"function"),It=wr.bind(null,"string"),ai=wr.bind(null,"undefined"),Sf=wr.bind(null,"boolean"),YU=wr.bind(null,"symbol");ZU=Ef.bind(null,TypeError),XU=Ef.bind(null,SyntaxError);eB=us(ds,"form"),tB=us(ds,"button"),iB=us(ds,"input"),rB=us(ds,"select")});function Mf(r){try{return decodeURIComponent(r.replace(/\+/g," "))}catch(e){return null}}function Lf(){if(Ee){var r=navigator,e=r.languages;return r.userLanguage||(e&&e.length?e[0]:r.language)}}function Df(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(r){}}function Of(r){return function(e){for(var t,i=Object.create(null),n=/([^&=]+)=?([^&]*)/g;t=n.exec(e);){var s=Mf(t[1]),o=Mf(t[2]);if(s)if(s.substring(s.length-2)==="[]"){var a=i[s=s.substring(0,s.length-2)]||(i[s]=[]);i[s]=Array.isArray(a)?a:[],i[s].push(o)}else i[s]=o===""||o}for(var c in i){var d=c.split("[");d.length>1&&(zx(i,d.map(function(f){return f.replace(/[?[\]\\ ]/g,"")}),i[c]),delete i[c])}return i}(function(e){if(e){var t=e.match(/\?(.*)/);return t&&t[1]?t[1].split("#")[0]:""}return Ee&&window.location.search.substring(1)}(r))}function zx(r,e,t){for(var i=e.length-1,n=0;n<i;++n){var s=e[n];if(s==="__proto__"||s==="constructor")break;s in r||(r[s]={}),r=r[s]}r[e[i]]=t}function Er(){for(var r="",e=0,t=4294967295*Math.random()|0;e++<36;){var i="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"[e-1],n=15&t;r+=i=="-"||i=="4"?i:(i=="x"?n:3&n|8).toString(16),t=e%8==0?4294967295*Math.random()|0:t>>4}return r}var ls,Nf=M(()=>{ls=Hm(Af());Tr()});function Ue(r){return di[ci][r]}function Be(r,e){return di[ci][r]=e}function Ge(r){delete di[ci][r]}function Vt(r,e,t){var i;try{if(Mr(r)){var n=window[r];i=n[e].bind(n)}}catch(s){}return i||t}function Mr(r){if(typeof fs[r]!==Sr)return fs[r];try{var e=window[r];e.setItem(Sr,Sr),e.removeItem(Sr)}catch(t){return fs[r]=!1}return fs[r]=!0}var $i,ci,di,fs,qi=M(()=>{Tr();$i="global",ci=kt+"global"+kt,di=typeof self===Jo&&self.self===self&&self||typeof global===Jo&&global.global===global&&global||void 0;di[ci]||(di[ci]={});fs={}});function F(){return F=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}return r},F.apply(this,arguments)}function Xf(r,e,t){var i;if(typeof e===Gt&&typeof t===xt&&(t=e,e=void 0),typeof t!==xt){if(typeof t!==Gt)throw new Error("enhancer"+ms);return t(Xf)(r,e)}if(typeof r!==Gt)throw new Error("reducer"+ms);var n=r,s=e,o=[],a=o,c=!1;function d(){a===o&&(a=o.slice())}function f(){return s}function u(g){if(typeof g!==Gt)throw new Error("Listener"+ms);var p=!0;return d(),a.push(g),function(){if(p){p=!1,d();var v=a.indexOf(g);a.splice(v,1)}}}function m(g){if(!ke(g))throw new Error("Act != obj");if(typeof g.type===xt)throw new Error("ActType "+xt);if(c)throw new Error("Dispatch in reducer");try{c=!0,s=n(s,g)}finally{c=!1}for(var p=o=a,v=0;v<p.length;v++)(0,p[v])();return g}return m({type:"@@redux/INIT"}),(i={dispatch:m,subscribe:u,getState:f,replaceReducer:function(g){if(typeof g!==Gt)throw new Error("next reducer"+ms);n=g,m({type:"@@redux/INIT"})}})[Rf]=function(){var g,p=u;return(g={subscribe:function(v){if(typeof v!="object")throw new TypeError("Observer != obj");function I(){v.next&&v.next(f())}return I(),{unsubscribe:p(I)}}})[Rf]=function(){return this},g},i}function Zx(r,e){var t=e&&e.type;return"action "+(t&&t.toString()||"?")+"reducer "+r+" returns "+xt}function Qi(){var r=[].slice.call(arguments);return r.length===0?function(e){return e}:r.length===1?r[0]:r.reduce(function(e,t){return function(){return e(t.apply(void 0,[].slice.call(arguments)))}})}function Xx(){var r=arguments;return function(e){return function(t,i,n){var s,o=e(t,i,n),a=o.dispatch,c={getState:o.getState,dispatch:function(d){return a(d)}};return s=[].slice.call(r).map(function(d){return d(c)}),F({},o,{dispatch:a=Qi.apply(void 0,s)(o.dispatch)})}}}function eC(r){var e=r.storage.setItem;return function(t){return function(i){return function(n){if(n.type===U.bootstrap){var s=n.params,o=n.user,a=n.persistedUser,c=n.initialUser,d=a.userId===o.userId;a.anonymousId!==o.anonymousId&&e(Ct,o.anonymousId),d||e($t,o.userId),c.traits&&e(ui,F({},d&&a.traits?a.traits:{},c.traits));var f=Object.keys(n.params);if(f.length){var u=s.an_uid,m=s.an_event,g=f.reduce(function(p,v){if(v.match(_f)||v.match(/^(d|g)clid/)){var I=v.replace(_f,"");p.campaign[I==="campaign"?"name":I]=s[v]}return v.match(Uf)&&(p.props[v.replace(Uf,"")]=s[v]),v.match(Bf)&&(p.traits[v.replace(Bf,"")]=s[v]),p},{campaign:{},props:{},traits:{}});t.dispatch(F({type:U.params,raw:s},g,u?{userId:u}:{})),u&&setTimeout(function(){return r.identify(u,g.traits)},0),m&&setTimeout(function(){return r.track(m,g.props)},0),Object.keys(g.campaign).length&&t.dispatch({type:U.campaign,campaign:g.campaign})}}return i(n)}}}}function tC(r){return function(e,t){if(e===void 0&&(e={}),t===void 0&&(t={}),t.type===U.setItemEnd){if(t.key===Ct)return F({},e,{anonymousId:t.value});if(t.key===$t)return F({},e,{userId:t.value})}switch(t.type){case U.identify:return Object.assign({},e,{userId:t.userId,traits:F({},e.traits,t.traits)});case U.reset:return[$t,Ct,ui].forEach(function(i){r.removeItem(i)}),Object.assign({},e,{userId:null,anonymousId:null,traits:{}});default:return e}}}function Ff(r){return{userId:r.getItem($t),anonymousId:r.getItem(Ct),traits:r.getItem(ui)}}function iC(r){var e=r.storage,t=e.setItem,i=e.removeItem,n=e.getItem;return function(s){return function(o){return function(a){var c=a.userId,d=a.traits,f=a.options;if(a.type===U.reset&&([$t,ui,Ct].forEach(function(g){i(g)}),[Wt,Ki,"traits"].forEach(function(g){Ge(ia(g))})),a.type===U.identify){n(Ct)||t(Ct,Er());var u=n($t),m=n(ui)||{};u&&u!==c&&s.dispatch({type:U.userIdChanged,old:{userId:u,traits:m},new:{userId:c,traits:d},options:f}),c&&t($t,c),d&&t(ui,F({},m,d))}return o(a)}}}}function Hf(r,e){Lr[r]&&We(Lr[r])&&(Lr[r](e),delete Lr[r])}function tm(r,e,t){return new Promise(function(i,n){return e()?i(r):t<1?n(F({},r,{queue:!0})):new Promise(function(s){return setTimeout(s,10)}).then(function(s){return tm(r,e,t-10).then(i,n)})})}function rC(r){return{abort:r}}function im(r,e,t){var i={},n=e(),s=r.getState(),o=s.plugins,a=s.queue,c=s.user;if(!s.context.offline&&a&&a.actions&&a.actions.length){var d=a.actions.reduce(function(u,m,g){return o[m.plugin].loaded?(u.process.push(m),u.processIndex.push(g)):(u.requeue.push(m),u.requeueIndex.push(g)),u},{processIndex:[],process:[],requeue:[],requeueIndex:[]});if(d.processIndex&&d.processIndex.length){d.processIndex.forEach(function(u){var m=a.actions[u],g=m.plugin,p=m.payload.type,v=n[g][p];if(v&&We(v)){var I,b=function(A,S){return A===void 0&&(A={}),S===void 0&&(S={}),[Wt,Ki].reduce(function(T,D){return A.hasOwnProperty(D)&&S[D]&&S[D]!==A[D]&&(T[D]=S[D]),T},A)}(m.payload,c),w=i[b.meta.rid];if(!w&&(I=v({payload:b,config:o[g].config,instance:t,abort:rC}))&&ke(I)&&I.abort)return void(i[b.meta.rid]=!0);if(!w){var E=p+":"+g;r.dispatch(F({},b,{type:E,_:{called:E,from:"queueDrain"}}))}}});var f=a.actions.filter(function(u,m){return!~d.processIndex.indexOf(m)});a.actions=f}}}function Zo(r){var e=r.pluginName,t=r.method+"Aborted"+(e?":"+e:"");r.store.dispatch(F({},r.data,{type:t,_:{called:t,from:"abort"}}))}function Wf(r,e,t){var i=e[r]||t[r];return i&&i.config?i.config:{}}function Gf(r,e){return e.reduce(function(t,i){return i[r]?t.concat({methodName:r,pluginName:i.name,method:i[r]}):t},[])}function $f(r,e){var t=r.replace(Ji,""),i=e?":"+e:"";return[""+r+i,""+t+i,t+"End"+i]}function Xo(r,e){var t=r.abort;return!!t&&(t===!0||qf(t,e)||t&&qf(t.plugins,e))}function rm(r,e){var t=r.abort;if(!t)return!1;if(t===!0||It(t))return!0;var i=t.plugins;return Dr(t)&&t.length===e||Dr(i)&&i.length===e}function Dr(r){return Array.isArray(r)}function qf(r,e){return!(!r||!Dr(r))&&r.includes(e)}function Kf(r){var e=r.match(/(.*):(.*)/);return!!e&&{method:e[1],name:e[2]}}function nC(r){return Object.keys(r).reduce(function(e,t){return t==="type"||(e[t]=ke(r[t])?Object.assign({},r[t]):r[t]),e},{})}function sC(r,e,t){var i={};return function(n){return function(s){return function(o){try{var a,c=function(A){return a?A:s(u)},d=o.type,f=o.plugins,u=o;if(o.abort)return Promise.resolve(s(o));if(d===U.enablePlugin&&n.dispatch({type:U.initializeStart,plugins:f,disabled:[],fromEnable:!0,meta:o.meta}),d===U.disablePlugin&&setTimeout(function(){return Hf(o.meta.rid,{payload:o})},0),d===U.initializeEnd){var m=e(),g=Object.keys(m),p=g.filter(function(A){return f.includes(A)}).map(function(A){return m[A]}),v=[],I=[],b=o.disabled,w=p.map(function(A){var S=A.loaded,T=A.name,D=A.config;return tm(A,function(){return S({config:D})},1e4).then(function(O){return i[T]||(n.dispatch({type:U.pluginReadyType(T),name:T,events:Object.keys(A).filter(function(j){return!ta.includes(j)})}),i[T]=!0),v=v.concat(T),A}).catch(function(O){if(O instanceof Error)throw new Error(O);return I=I.concat(O.name),O})});Promise.all(w).then(function(A){var S={plugins:v,failed:I,disabled:b};setTimeout(function(){g.length===w.length+b.length&&n.dispatch(F({},{type:U.ready},S))},0)})}var E=function(){if(d!==U.bootstrap)return/^ready:([^:]*)$/.test(d)&&setTimeout(function(){return im(n,e,r)},0),Promise.resolve(function(A,S,T,D,O){try{var j=We(S)?S():S,G=A.type,N=G.replace(Ji,"");if(A._&&A._.called)return Promise.resolve(A);var K=T.getState(),te=(oe=j,(ce=K.plugins)===void 0&&(ce={}),(Fe=A.options)===void 0&&(Fe={}),Object.keys(oe).filter(function(k){var C=Fe.plugins||{};return Sf(C[k])?C[k]:C.all!==!1&&(!ce[k]||ce[k].enabled!==!1)}).map(function(k){return oe[k]}));G===U.initializeStart&&A.fromEnable&&(te=Object.keys(K.plugins).filter(function(k){var C=K.plugins[k];return A.plugins.includes(k)&&!C.initialized}).map(function(k){return j[k]}));var Z=te.map(function(k){return k.name}),R=function(k,C,L){var V=$f(k).map(function($){return Gf($,C)});return C.reduce(function($,J){var de=J.name,Q=$f(k,de).map(function(ir){return Gf(ir,C)}),W=Q[0],z=Q[1],$e=Q[2];return W.length&&($.beforeNS[de]=W),z.length&&($.duringNS[de]=z),$e.length&&($.afterNS[de]=$e),$},{before:V[0],beforeNS:{},during:V[1],duringNS:{},after:V[2],afterNS:{}})}(G,te);return Promise.resolve(Yo({action:A,data:{exact:R.before,namespaced:R.beforeNS},state:K,allPlugins:j,allMatches:R,instance:T,store:D,EVENTS:O})).then(function(k){function C(){var $=function(){if(G.match(Ji))return Promise.resolve(Yo({action:F({},L,{type:N+"End"}),data:{exact:R.after,namespaced:R.afterNS},state:K,allPlugins:j,allMatches:R,instance:T,store:D,EVENTS:O})).then(function(J){J.meta&&J.meta.hasCallback&&Hf(J.meta.rid,{payload:J})})}();return $&&$.then?$.then(function(){return k}):k}if(rm(k,Z.length))return k;var L,V=function(){if(G!==N)return Promise.resolve(Yo({action:F({},k,{type:N}),data:{exact:R.during,namespaced:R.duringNS},state:K,allPlugins:j,allMatches:R,instance:T,store:D,EVENTS:O})).then(function($){L=$});L=k}();return V&&V.then?V.then(C):C()})}catch(k){return Promise.reject(k)}var oe,ce,Fe}(o,e,r,n,t)).then(function(A){return a=1,s(A)})}();return Promise.resolve(E&&E.then?E.then(c):c(E))}catch(A){return Promise.reject(A)}}}}}function oC(r){return function(e){return function(t){return function(i){var n=i.type,s=i.key,o=i.value,a=i.options;if(n===U.setItem||n===U.removeItem){if(i.abort)return t(i);n===U.setItem?r.setItem(s,o,a):r.removeItem(s,a)}return t(i)}}}}function cC(r){return function(e,t){e===void 0&&(e={});var i={};if(t.type==="initialize:aborted")return e;if(/^registerPlugin:([^:]*)$/.test(t.type)){var n=Jf(t.type,"registerPlugin"),s=r()[n];if(!s||!n)return e;var o=t.enabled,a=s.config;return i[n]={enabled:o,initialized:!!o&&!s.initialize,loaded:!!o&&!!s.loaded({config:a}),config:a},F({},e,i)}if(/^initialize:([^:]*)$/.test(t.type)){var c=Jf(t.type,U.initialize),d=r()[c];return d&&c?(i[c]=F({},e[c],{initialized:!0,loaded:!!d.loaded({config:d.config})}),F({},e,i)):e}if(/^ready:([^:]*)$/.test(t.type))return i[t.name]=F({},e[t.name],{loaded:!0}),F({},e,i);switch(t.type){case U.disablePlugin:return F({},e,Qf(t.plugins,!1,e));case U.enablePlugin:return F({},e,Qf(t.plugins,!0,e));default:return e}}}function Jf(r,e){return r.substring(e.length+1,r.length)}function Qf(r,e,t){return r.reduce(function(i,n){return i[n]=F({},t[n],{enabled:e}),i},t)}function nm(r){try{return JSON.parse(JSON.stringify(r))}catch(e){}return r}function uC(r,e){r===void 0&&(r=dC);var t=e.options,i=e.meta;if(e.type===U.track){var n=nm(F({event:e.event,properties:e.properties},Object.keys(t).length&&{options:t},{meta:i}));return F({},r,{last:n,history:r.history.concat(n)})}return r}function fC(r,e){r===void 0&&(r=lC);var t=e.payload;switch(e.type){case"queue":var i;return i=t&&t.type&&t.type===U.identify?[e].concat(r.actions):r.actions.concat(e),F({},r,{actions:i});case"dequeue":return[];default:return r}}function mC(r){var e=/(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(r);return"/"+(e&&e[3]?e[3].split("?")[0].replace(sm,""):"")}function hC(r,e){r===void 0&&(r=pC);var t=e.options;if(e.type===U.page){var i=nm(F({properties:e.properties,meta:e.meta},Object.keys(t).length&&{options:t}));return F({},r,{last:i,history:r.history.concat(i)})}return r}function yC(r,e){r===void 0&&(r=zf);var t=r.initialized,i=e.campaign;switch(e.type){case U.campaign:return F({},r,{campaign:i});case U.offline:return F({},r,{offline:!0});case U.online:return F({},r,{offline:!1});default:return t?r:F({},zf,r,{initialized:!0})}}function bC(r,e,t){if(Ee){var i=window[(t?"add":"remove")+"EventListener"];r.split(" ").forEach(function(n){i(n,e)})}}function kC(r){var e=bC.bind(null,"online offline",function(t){return Promise.resolve(!navigator.onLine).then(r)});return e(!0),function(t){return e(!1)}}function um(){return Be("analytics",[]),function(r){return function(e,t,i){var n=r(e,t,i),s=n.dispatch;return Object.assign(n,{dispatch:function(o){return di[ci].analytics.push(o.action||o),s(o)}})}}}function Yf(r){return function(){return Qi(Qi.apply(null,arguments),um())}}function ea(r){return r?Tf(r)?r:[r]:[]}function Zf(r,e,t){r===void 0&&(r={});var i,n,s=Er();return e&&(Lr[s]=(i=e,n=function(o){for(var a,c=o||Array.prototype.slice.call(arguments),d=0;d<c.length;d++)if(We(c[d])){a=c[d];break}return a}(t),function(o){n&&n(o),i(o)})),F({},r,{rid:s,ts:new Date().getTime()},e?{hasCallback:!0}:{})}function lm(r){r===void 0&&(r={});var e=r.reducers||{},t=r.initialUser||{},i=(r.plugins||[]).reduce(function(k,C){if(We(C))return k.middlewares=k.middlewares.concat(C),k;if(C.NAMESPACE&&(C.name=C.NAMESPACE),!C.name)throw new Error("https://lytics.dev/errors/1");C.config||(C.config={});var L=C.EVENTS?Object.keys(C.EVENTS).map(function(J){return C.EVENTS[J]}):[];k.pluginEnabled[C.name]=!(C.enabled===!1||C.config.enabled===!1),delete C.enabled,C.methods&&(k.methods[C.name]=Object.keys(C.methods).reduce(function(J,de){var Q;return J[de]=(Q=C.methods[de],function(){for(var W=Array.prototype.slice.call(arguments),z=new Array(Q.length),$e=0;$e<W.length;$e++)z[$e]=W[$e];return z[z.length]=S,Q.apply({instance:S},z)}),J},{}),delete C.methods);var V=Object.keys(C).concat(L),$=new Set(k.events.concat(V));if(k.events=Array.from($),k.pluginsArray=k.pluginsArray.concat(C),k.plugins[C.name])throw new Error(C.name+"AlreadyLoaded");return k.plugins[C.name]=C,k.plugins[C.name].loaded||(k.plugins[C.name].loaded=function(){return!0}),k},{plugins:{},pluginEnabled:{},methods:{},pluginsArray:[],middlewares:[],events:[]}),n=r.storage?r.storage:{getItem:Ue,setItem:Be,removeItem:Ge},s=function(k){return function(C,L,V){return L.getState("user")[C]||(V&&ke(V)&&V[C]?V[C]:Ff(k)[C]||Ue(ia(C))||null)}}(n),o=i.plugins,a=i.events.filter(function(k){return!ta.includes(k)}).sort(),c=new Set(a.concat(hs).filter(function(k){return!ta.includes(k)})),d=Array.from(c).sort(),f=function(){return o},u=new aC,m=u.addMiddleware,g=u.removeMiddleware,p=u.dynamicMiddlewares,v=function(){throw new Error("Abort disabled inListener")},I=Of(),b=Ff(n),w=F({},b,t,I.an_uid?{userId:I.an_uid}:{},I.an_aid?{anonymousId:I.an_aid}:{});w.anonymousId||(w.anonymousId=Er());var E=F({enable:function(k,C){return new Promise(function(L){R.dispatch({type:U.enablePlugin,plugins:ea(k),_:{originalAction:U.enablePlugin}},L,[C])})},disable:function(k,C){return new Promise(function(L){R.dispatch({type:U.disablePlugin,plugins:ea(k),_:{originalAction:U.disablePlugin}},L,[C])})}},i.methods),A=!1,S={identify:function(k,C,L,V){try{var $=It(k)?k:null,J=ke(k)?k:C,de=L||{},Q=S.user();Be(ia(Wt),$);var W=$||J.userId||s(Wt,S,J);return Promise.resolve(new Promise(function(z){R.dispatch(F({type:U.identifyStart,userId:W,traits:J||{},options:de,anonymousId:Q.anonymousId},Q.id&&Q.id!==$&&{previousId:Q.id}),z,[C,L,V])}))}catch(z){return Promise.reject(z)}},track:function(k,C,L,V){try{var $=ke(k)?k.event:k;if(!$||!It($))throw new Error("EventMissing");var J=ke(k)?k:C||{},de=ke(L)?L:{};return Promise.resolve(new Promise(function(Q){R.dispatch({type:U.trackStart,event:$,properties:J,options:de,userId:s(Wt,S,C),anonymousId:s(Ki,S,C)},Q,[C,L,V])}))}catch(Q){return Promise.reject(Q)}},page:function(k,C,L){try{var V=ke(k)?k:{},$=ke(C)?C:{};return Promise.resolve(new Promise(function(J){R.dispatch({type:U.pageStart,properties:gC(V),options:$,userId:s(Wt,S,V),anonymousId:s(Ki,S,V)},J,[k,C,L])}))}catch(J){return Promise.reject(J)}},user:function(k){if(k===Wt||k==="id")return s(Wt,S);if(k===Ki||k==="anonId")return s(Ki,S);var C=S.getState("user");return k?(0,ls.default)(C,k):C},reset:function(k){return new Promise(function(C){R.dispatch({type:U.resetStart},C,k)})},ready:function(k){return A&&k({plugins:E,instance:S}),S.on(U.ready,function(C){k(C),A=!0})},on:function(k,C){if(!k||!We(C))return!1;if(k===U.bootstrap)throw new Error(".on disabled for "+k);var L=/Start$|Start:/;if(k==="*"){var V=function(Q){return function(W){return function(z){return z.type.match(L)&&C({payload:z,instance:S,plugins:o}),W(z)}}},$=function(Q){return function(W){return function(z){return z.type.match(L)||C({payload:z,instance:S,plugins:o}),W(z)}}};return m(V,gs),m($,ps),function(){g(V,gs),g($,ps)}}var J=k.match(L)?gs:ps,de=function(Q){return function(W){return function(z){return z.type===k&&C({payload:z,instance:S,plugins:o,abort:v}),W(z)}}};return m(de,J),function(){return g(de,J)}},once:function(k,C){if(!k||!We(C))return!1;if(k===U.bootstrap)throw new Error(".once disabled for "+k);var L=S.on(k,function(V){C({payload:V.payload,instance:S,plugins:o,abort:v}),L()});return L},getState:function(k){var C=R.getState();return k?(0,ls.default)(C,k):Object.assign({},C)},dispatch:function(k){var C=It(k)?{type:k}:k;if(hs.includes(C.type))throw new Error("reserved action "+C.type);var L=F({},C,{_:F({originalAction:C.type},k._||{})});R.dispatch(L)},enablePlugin:E.enable,disablePlugin:E.disable,plugins:E,storage:{getItem:n.getItem,setItem:function(k,C,L){R.dispatch({type:U.setItemStart,key:k,value:C,options:L})},removeItem:function(k,C){R.dispatch({type:U.removeItemStart,key:k,options:C})}},setAnonymousId:function(k,C){S.storage.setItem(Ct,k,C)},events:{core:hs,plugins:a}},T=i.middlewares.concat([function(k){return function(C){return function(L){return L.meta||(L.meta=Zf()),C(L)}}},p(gs),sC(S,f,{all:d,plugins:a}),oC(n),eC(S),iC(S),p(ps)]),D={context:yC,user:tC(n),page:hC,track:uC,plugins:cC(f),queue:fC},O=Qi,j=Qi;if(Ee&&r.debug){var G=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;G&&(O=G({trace:!0,traceLimit:25})),j=function(){return arguments.length===0?um():ke(typeof arguments[0])?Yf():Yf().apply(null,arguments)}}var N,K=function(k){return Object.keys(k).reduce(function(C,L){return vC.includes(L)||(C[L]=k[L]),C},{})}(r),te=i.pluginsArray.reduce(function(k,C){var L=C.name,V=C.config,$=C.loaded,J=i.pluginEnabled[L];return k[L]={enabled:J,initialized:!!J&&!C.initialize,loaded:!!$({config:V}),config:V},k},{}),Z={context:K,user:w,plugins:te},R=Xf(function(k){for(var C=Object.keys(k),L={},V=0;V<C.length;V++){var $=C[V];typeof k[$]===Gt&&(L[$]=k[$])}var J,de=Object.keys(L);try{(function(Q){Object.keys(Q).forEach(function(W){var z=Q[W];if(typeof z(void 0,{type:"@@redux/INIT"})===xt||typeof z(void 0,{type:Yx})===xt)throw new Error("reducer "+W+" "+xt)})})(L)}catch(Q){J=Q}return function(Q,W){if(Q===void 0&&(Q={}),J)throw J;for(var z=!1,$e={},ir=0;ir<de.length;ir++){var Or=de[ir],ga=Q[Or],xs=(0,L[Or])(ga,W);if(typeof xs===xt){var Lm=Zx(Or,W);throw new Error(Lm)}$e[Or]=xs,z=z||xs!==ga}return z?$e:Q}}(F({},D,e)),Z,j(O(Xx.apply(void 0,T))));R.dispatch=(N=R.dispatch,function(k,C,L){var V=F({},k,{meta:Zf(k.meta,C,ea(L))});return N.apply(null,[V])});var oe=Object.keys(o);R.dispatch({type:U.bootstrap,plugins:oe,config:K,params:I,user:w,initialUser:t,persistedUser:b});var ce=oe.filter(function(k){return i.pluginEnabled[k]}),Fe=oe.filter(function(k){return!i.pluginEnabled[k]});return R.dispatch({type:U.registerPlugins,plugins:oe,enabled:i.pluginEnabled}),i.pluginsArray.map(function(k,C){var L=k.bootstrap,V=k.config,$=k.name;L&&We(L)&&L({instance:S,config:V,payload:k}),R.dispatch({type:U.registerPluginType($),name:$,enabled:i.pluginEnabled[$],plugin:k}),i.pluginsArray.length===C+1&&R.dispatch({type:U.initializeStart,plugins:ce,disabled:Fe})}),kC(function(k){R.dispatch({type:k?U.offline:U.online})}),function(k,C,L){setInterval(function(){return im(k,C,L)},3e3)}(R,f,S),S}var Gt,xt,Yx,Rf,ms,Ct,$t,ui,em,Wt,Ki,hs,ta,U,_f,Uf,Bf,ia,Lr,Yo,Ji,jf,Vf,aC,dC,lC,sm,om,am,cm,dm,gC,pC,zf,vC,gs,ps,ra=M(()=>{Nf();qi();Tr();Gt="function",xt="undefined",Yx="@@redux/"+Math.random().toString(36),Rf=function(){return typeof Symbol===Gt&&Symbol.observable||"@@observable"}(),ms=" != "+Gt;Ct=kt+"anon_id",$t=kt+"user_id",ui=kt+"user_traits",em={__proto__:null,ANON_ID:Ct,USER_ID:$t,USER_TRAITS:ui},Wt="userId",Ki="anonymousId",hs=["bootstrap","params","campaign","initializeStart","initialize","initializeEnd","ready","resetStart","reset","resetEnd","pageStart","page","pageEnd","pageAborted","trackStart","track","trackEnd","trackAborted","identifyStart","identify","identifyEnd","identifyAborted","userIdChanged","registerPlugins","enablePlugin","disablePlugin","online","offline","setItemStart","setItem","setItemEnd","setItemAborted","removeItemStart","removeItem","removeItemEnd","removeItemAborted"],ta=["name","EVENTS","config","loaded"],U=hs.reduce(function(r,e){return r[e]=e,r},{registerPluginType:function(r){return"registerPlugin:"+r},pluginReadyType:function(r){return"ready:"+r}}),_f=/^utm_/,Uf=/^an_prop_/,Bf=/^an_trait_/;ia=function(r){return kt+"TEMP"+kt+r};Lr={};Yo=function(r){var e=r.data,t=r.action,i=r.instance,n=r.state,s=r.allPlugins,o=r.allMatches,a=r.store,c=r.EVENTS;try{var d=n.plugins,f=n.context,u=t.type,m=u.match(Ji),g=e.exact.map(function(I){return I.pluginName});m&&(g=o.during.map(function(I){return I.pluginName}));var p=function(I,b){return function(w,E,A){var S=E.config,T=E.name,D=T+"."+w.type;A&&(D=A.event);var O=w.type.match(Ji)?function(j,G,N,K,te){return function(Z,R){var oe=K?K.name:j,ce=R&&Dr(R)?R:N;if(K&&(!(ce=R&&Dr(R)?R:[j]).includes(j)||ce.length!==1))throw new Error("Method "+G+" can only abort "+j+" plugin. "+JSON.stringify(ce)+" input valid");return F({},te,{abort:{reason:Z,plugins:ce,caller:G,_:oe}})}}(T,D,b,A,w):function(j,G){return function(){throw new Error(j.type+" action not cancellable. Remove abort in "+G)}}(w,D);return{payload:nC(w),instance:I,config:S||{},abort:O}}}(i,g),v=e.exact.reduce(function(I,b){var w=b.pluginName,E=b.methodName,A=!1;return E.match(/^initialize/)||E.match(/^reset/)||(A=!d[w].loaded),f.offline&&E.match(/^(page|track|identify)/)&&(A=!0),I[""+w]=A,I},{});return Promise.resolve(e.exact.reduce(function(I,b,w){try{var E=b.pluginName;return Promise.resolve(I).then(function(A){function S(){return Promise.resolve(A)}var T=function(){if(e.namespaced&&e.namespaced[E])return Promise.resolve(e.namespaced[E].reduce(function(D,O,j){try{return Promise.resolve(D).then(function(G){return O.method&&We(O.method)?(function(Z,R){var oe=Kf(Z);if(oe&&oe.name===R){var ce=Kf(oe.method);throw new Error([R+" plugin is calling method "+Z,"Plugins cant call self","Use "+oe.method+" "+(ce?"or "+ce.method:"")+" in "+R+" plugin insteadof "+Z].join(`
`))}}(O.methodName,O.pluginName),Promise.resolve(O.method({payload:G,instance:i,abort:(N=G,K=E,te=O.pluginName,function(Z,R){return F({},N,{abort:{reason:Z,plugins:R||[K],caller:u,from:te||K}})}),config:Wf(O.pluginName,d,s),plugins:d})).then(function(Z){var R=ke(Z)?Z:{};return Promise.resolve(F({},G,R))})):G;var N,K,te})}catch(G){return Promise.reject(G)}},Promise.resolve(t))).then(function(D){A[E]=D});A[E]=t}();return T&&T.then?T.then(S):S()})}catch(A){return Promise.reject(A)}},Promise.resolve({}))).then(function(I){return Promise.resolve(e.exact.reduce(function(b,w,E){try{var A=e.exact.length===E+1,S=w.pluginName,T=s[S];return Promise.resolve(b).then(function(D){var O=I[S]?I[S]:{};if(m&&(O=D),Xo(O,S))return Zo({data:O,method:u,instance:i,pluginName:S,store:a}),Promise.resolve(D);if(Xo(D,S))return A&&Zo({data:D,method:u,instance:i,store:a}),Promise.resolve(D);if(v.hasOwnProperty(S)&&v[S]===!0)return a.dispatch({type:"queue",plugin:S,payload:O,_:{called:"queue",from:"queueMechanism"}}),Promise.resolve(D);var j=p(I[S],s[S]);return Promise.resolve(T[u]({abort:j.abort,payload:O,instance:i,config:Wf(S,d,s),plugins:d})).then(function(G){var N=ke(G)?G:{},K=F({},D,N),te=I[S];if(Xo(te,S))Zo({data:te,method:u,instance:i,pluginName:S,store:a});else{var Z=u+":"+S;(Z.match(/:/g)||[]).length<2&&!u.match(jf)&&!u.match(Vf)&&i.dispatch(F({},m?K:O,{type:Z,_:{called:Z,from:"submethod"}}))}return Promise.resolve(K)})})}catch(D){return Promise.reject(D)}},Promise.resolve(t))).then(function(b){if(!(u.match(Ji)||u.match(/^registerPlugin/)||u.match(Vf)||u.match(jf)||u.match(/^params/)||u.match(/^userIdChanged/))){if(c.plugins.includes(u),b._&&b._.originalAction===u)return b;var w=F({},b,{_:{originalAction:b.type,called:b.type,from:"engineEnd"}});rm(b,e.exact.length)&&!u.match(/End$/)&&(w=F({},w,{type:b.type+"Aborted"})),a.dispatch(w)}return b})})}catch(I){return Promise.reject(I)}},Ji=/Start$/,jf=/^bootstrap/,Vf=/^ready/;aC=function(){var r=this;this.before=[],this.after=[],this.addMiddleware=function(e,t){r[t]=r[t].concat(e)},this.removeMiddleware=function(e,t){var i=r[t].findIndex(function(n){return n===e});i!==-1&&(r[t]=[].concat(r[t].slice(0,i),r[t].slice(i+1)))},this.dynamicMiddlewares=function(e){return function(t){return function(i){return function(n){var s={getState:t.getState,dispatch:function(a){return t.dispatch(a)}},o=r[e].map(function(a){return a(s)});return Qi.apply(void 0,o)(i)(n)}}}}};dC={last:{},history:[]};lC={actions:[]};sm=/#.*$/;gC=function(r){if(r===void 0&&(r={}),!Ee)return r;var e=document,t=e.title,i=e.referrer,n=window,s=n.location,o=n.innerWidth,a=n.innerHeight,c=s.hash,d=s.search,f=function(m){var g=function(){if(Ee){for(var p,v=document.getElementsByTagName("link"),I=0;p=v[I];I++)if(p.getAttribute("rel")==="canonical")return p.getAttribute("href")}}();return g?g.match(/\?/)?g:g+m:window.location.href.replace(sm,"")}(d),u={title:t,url:f,path:mC(f),hash:c,search:d,width:o,height:a};return i&&i!==""&&(u.referrer=i),F({},u,r)},pC={last:{},history:[]};om=function(){if(!Ee)return!1;var r=navigator.appVersion;return~r.indexOf("Win")?"Windows":~r.indexOf("Mac")?"MacOS":~r.indexOf("X11")?"UNIX":~r.indexOf("Linux")?"Linux":"Unknown OS"}(),am=Ee?document.referrer:null,cm=Lf(),dm=Df();zf={initialized:!1,sessionId:Er(),app:null,version:null,debug:!1,offline:!!Ee&&!navigator.onLine,os:{name:om},userAgent:Ee?navigator.userAgent:"node",library:{name:"analytics",version:"0.12.16"},timezone:dm,locale:cm,campaign:{},referrer:am};vC=["plugins","reducers","storage"];gs="before",ps="after"});function sa(r){return li?ys(r,"",-1):Ge(r)}function oa(){if(li!==void 0)return li;var r="cookiecookie";try{ys(r,r),li=document.cookie.indexOf(r)!==-1,sa(r)}catch(e){li=!1}return li}function ys(r,e,t,i,n,s){if(typeof window!="undefined"){var o=arguments.length>1;return li===!1&&(o?Be(r,e):Ue(r)),o?document.cookie=r+"="+encodeURIComponent(e)+(t?"; expires="+new Date(+new Date+1e3*t).toUTCString()+(i?"; path="+i:"")+(n?"; domain="+n:"")+(s?"; secure":""):""):decodeURIComponent((("; "+document.cookie).split("; "+r+"=")[1]||"").split(";")[0])}}var zi,li,na,fm,mm=M(()=>{qi();zi="cookie",li=oa(),na=ys,fm=ys});var Yi,gm,yB,vB,bB,pm=M(()=>{qi();Yi="localStorage",gm=Mr.bind(null,"localStorage"),yB=Vt("localStorage","getItem",Ue),vB=Vt("localStorage","setItem",Be),bB=Vt("localStorage","removeItem",Ge)});var Zi,hm,xB,CB,AB,ym=M(()=>{qi();Zi="sessionStorage",hm=Mr.bind(null,"sessionStorage"),xB=Vt("sessionStorage","getItem",Ue),CB=Vt("sessionStorage","setItem",Be),AB=Vt("sessionStorage","removeItem",Ge)});function Xi(r){var e=r;try{if((e=JSON.parse(r))==="true")return!0;if(e==="false")return!1;if(ke(e))return e;parseFloat(e)===e&&(e=parseFloat(e))}catch(t){}if(e!==null&&e!=="")return e}function vm(r,e){if(r){var t=aa(e),i=!la(t),n=ca(t)?Xi(localStorage.getItem(r)):void 0;if(i&&!ai(n))return n;var s=da(t)?Xi(na(r)):void 0;if(i&&s)return s;var o=ua(t)?Xi(sessionStorage.getItem(r)):void 0;if(i&&o)return o;var a=Ue(r);return i?a:{localStorage:n,sessionStorage:o,cookie:s,global:a}}}function AC(r,e,t){if(r&&!ai(e)){var i={},n=aa(t),s=JSON.stringify(e),o=!la(n);return ca(n)&&(i[Yi]=vs(Yi,e,Xi(localStorage.getItem(r))),localStorage.setItem(r,s),o)?i[Yi]:da(n)&&(i[zi]=vs(zi,e,Xi(na(r))),fm(r,s),o)?i[zi]:ua(n)&&(i[Zi]=vs(Zi,e,Xi(sessionStorage.getItem(r))),sessionStorage.setItem(r,s),o)?i[Zi]:(i[$i]=vs($i,e,Ue(r)),Be(r,e),o?i[$i]:i)}}function PC(r,e){if(r){var t=aa(e),i=vm(r,zo),n={};return!ai(i.localStorage)&&ca(t)&&(localStorage.removeItem(r),n[Yi]=i.localStorage),!ai(i.cookie)&&da(t)&&(sa(r),n[zi]=i.cookie),!ai(i.sessionStorage)&&ua(t)&&(sessionStorage.removeItem(r),n[Zi]=i.sessionStorage),!ai(i.global)&&bs(t,$i)&&(Ge(r),n[$i]=i.global),n}}function aa(r){return r?It(r)?r:r.storage:Qo}function ca(r){return IC&&bs(r,Yi)}function da(r){return CC&&bs(r,zi)}function ua(r){return xC&&bs(r,Zi)}function la(r){return r===zo||r==="all"}function bs(r,e){return r===Qo||r===e||la(r)}function vs(r,e,t){return{location:r,current:e,previous:t}}var IC,xC,CC,bm,km=M(()=>{qi();mm();pm();ym();Tr();IC=gm(),xC=hm(),CC=oa();bm={setItem:AC,getItem:vm,removeItem:PC}});var Cm={};nr(Cm,{Analytics:()=>wC,CONSTANTS:()=>em,EVENTS:()=>U,default:()=>wC,init:()=>wC});function SC(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Im(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),t.push.apply(t,i)}return t}function xm(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Im(Object(t),!0).forEach(function(i){SC(r,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Im(Object(t)).forEach(function(i){Object.defineProperty(r,i,Object.getOwnPropertyDescriptor(t,i))})}return r}function wC(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e={storage:bm};return lm(xm(xm({},e),r))}var Am=M(()=>{ra();ra();km()});var ma={};nr(ma,{ActivityDefinitionHelper:()=>nt,AnalyticsLibrary:()=>$s,ConditionOperator:()=>Ks,ConsentMappingMatchType:()=>zs,ContentIdentificationBehavior:()=>qs,ConvergeApi:()=>Rt,ConvergeSdk:()=>qt,ConvergeSdkConfiguration:()=>er,DataLayerHelper:()=>ti,DebugHelper:()=>zt,ECommerceContentType:()=>js,ECommerceFinancialStatus:()=>Gs,ECommerceFulfillmentStatus:()=>Ws,ECommercePlatform:()=>Vs,ExperienceTrackingViewContextType:()=>Zs,FacebookPixelConversionEventName:()=>Ys,HandlersSdkConfiguration:()=>Ui,HookListenerTypes:()=>Jn,IabPrivacyConsentPurposeId:()=>Qs,IabPrivacyConsentPurposeIdMap:()=>Fi,OrganisationBrandBillingStatusEnablement:()=>Xs,PluginMethodNotImplementedMessage:()=>co,PreInitialiseIdentityMediator:()=>Di,PreInitialiseTrackMediator:()=>Oi,PrivacyDataControlMode:()=>fr,RegionalConsentGrantOption:()=>Js,ScopedConvergeSdk:()=>tr,SdkLogEventLevel:()=>eo,TrackingActivityNames:()=>Li,UrlHelper:()=>Dn,WindowPostMessageMediationEventName:()=>xo,augmentActivityFromPipelineRuleContainers:()=>On,compareTextMatchInfo:()=>it,getActivityName:()=>_u,getParamFromQueryString:()=>Se,install:()=>DC,isUrlMatch:()=>oo,isUrlMatchedToFilter:()=>_n,normalizeToE164:()=>An,removePiiFromQueryString:()=>so,removePiiFromUrl:()=>Ln,sanitizeResourceUrl:()=>mt,urlToWinLocation:()=>mr});var jm=typeof global=="object"&&global&&global.Object===Object&&global,_r=jm;var Vm=typeof self=="object"&&self&&self.Object===Object&&self,Wm=_r||Vm||Function("return this")(),se=Wm;var Gm=se.Symbol,me=Gm;var ya=Object.prototype,$m=ya.hasOwnProperty,qm=ya.toString,sr=me?me.toStringTag:void 0;function Km(r){var e=$m.call(r,sr),t=r[sr];try{r[sr]=void 0;var i=!0}catch(s){}var n=qm.call(r);return i&&(e?r[sr]=t:delete r[sr]),n}var va=Km;var Jm=Object.prototype,Qm=Jm.toString;function zm(r){return Qm.call(r)}var ba=zm;var Ym="[object Null]",Zm="[object Undefined]",ka=me?me.toStringTag:void 0;function Xm(r){return r==null?r===void 0?Zm:Ym:ka&&ka in Object(r)?va(r):ba(r)}var Ie=Xm;function eg(r){return r!=null&&typeof r=="object"}var ae=eg;var tg="[object Symbol]";function ig(r){return typeof r=="symbol"||ae(r)&&Ie(r)==tg}var At=ig;function rg(r,e){for(var t=-1,i=r==null?0:r.length,n=Array(i);++t<i;)n[t]=e(r[t],t,r);return n}var Ia=rg;var ng=Array.isArray,q=ng;var sg=1/0,xa=me?me.prototype:void 0,Ca=xa?xa.toString:void 0;function Aa(r){if(typeof r=="string")return r;if(q(r))return Ia(r,Aa)+"";if(At(r))return Ca?Ca.call(r):"";var e=r+"";return e=="0"&&1/r==-sg?"-0":e}var Pa=Aa;var og=/\s/;function ag(r){for(var e=r.length;e--&&og.test(r.charAt(e)););return e}var Sa=ag;var cg=/^\s+/;function dg(r){return r&&r.slice(0,Sa(r)+1).replace(cg,"")}var wa=dg;function ug(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}var Y=ug;var Ta=NaN,lg=/^[-+]0x[0-9a-f]+$/i,fg=/^0b[01]+$/i,mg=/^0o[0-7]+$/i,gg=parseInt;function pg(r){if(typeof r=="number")return r;if(At(r))return Ta;if(Y(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=Y(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=wa(r);var t=fg.test(r);return t||mg.test(r)?gg(r.slice(2),t?2:8):lg.test(r)?Ta:+r}var Ps=pg;function hg(r){return r}var fi=hg;var yg="[object AsyncFunction]",vg="[object Function]",bg="[object GeneratorFunction]",kg="[object Proxy]";function Ig(r){if(!Y(r))return!1;var e=Ie(r);return e==vg||e==bg||e==yg||e==kg}var Pt=Ig;var xg=se["__core-js_shared__"],Ur=xg;var Ea=function(){var r=/[^.]+$/.exec(Ur&&Ur.keys&&Ur.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function Cg(r){return!!Ea&&Ea in r}var Ma=Cg;var Ag=Function.prototype,Pg=Ag.toString;function Sg(r){if(r!=null){try{return Pg.call(r)}catch(e){}try{return r+""}catch(e){}}return""}var ut=Sg;var wg=/[\\^$.*+?()[\]{}|]/g,Tg=/^\[object .+?Constructor\]$/,Eg=Function.prototype,Mg=Object.prototype,Lg=Eg.toString,Dg=Mg.hasOwnProperty,Og=RegExp("^"+Lg.call(Dg).replace(wg,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ng(r){if(!Y(r)||Ma(r))return!1;var e=Pt(r)?Og:Tg;return e.test(ut(r))}var La=Ng;function Rg(r,e){return r==null?void 0:r[e]}var Da=Rg;function _g(r,e){var t=Da(r,e);return La(t)?t:void 0}var Pe=_g;var Ug=Pe(se,"WeakMap"),Br=Ug;var Oa=Object.create,Bg=function(){function r(){}return function(e){if(!Y(e))return{};if(Oa)return Oa(e);r.prototype=e;var t=new r;return r.prototype=void 0,t}}(),Fr=Bg;function Fg(r,e,t){switch(t.length){case 0:return r.call(e);case 1:return r.call(e,t[0]);case 2:return r.call(e,t[0],t[1]);case 3:return r.call(e,t[0],t[1],t[2])}return r.apply(e,t)}var Na=Fg;function Hg(){}var Ra=Hg;function jg(r,e){var t=-1,i=r.length;for(e||(e=Array(i));++t<i;)e[t]=r[t];return e}var Hr=jg;var Vg=800,Wg=16,Gg=Date.now;function $g(r){var e=0,t=0;return function(){var i=Gg(),n=Wg-(i-t);if(t=i,n>0){if(++e>=Vg)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}var _a=$g;function qg(r){return function(){return r}}var Ua=qg;var Kg=function(){try{var r=Pe(Object,"defineProperty");return r({},"",{}),r}catch(e){}}(),mi=Kg;var Jg=mi?function(r,e){return mi(r,"toString",{configurable:!0,enumerable:!1,value:Ua(e),writable:!0})}:fi,Ba=Jg;var Qg=_a(Ba),Fa=Qg;function zg(r,e){for(var t=-1,i=r==null?0:r.length;++t<i&&e(r[t],t,r)!==!1;);return r}var jr=zg;function Yg(r,e,t,i){for(var n=r.length,s=t+(i?1:-1);i?s--:++s<n;)if(e(r[s],s,r))return s;return-1}var Ha=Yg;function Zg(r){return r!==r}var ja=Zg;function Xg(r,e,t){for(var i=t-1,n=r.length;++i<n;)if(r[i]===e)return i;return-1}var Va=Xg;function ep(r,e,t){return e===e?Va(r,e,t):Ha(r,ja,t)}var Wa=ep;function tp(r,e){var t=r==null?0:r.length;return!!t&&Wa(r,e,0)>-1}var Ga=tp;var ip=9007199254740991,rp=/^(?:0|[1-9]\d*)$/;function np(r,e){var t=typeof r;return e=e==null?ip:e,!!e&&(t=="number"||t!="symbol"&&rp.test(r))&&r>-1&&r%1==0&&r<e}var St=np;function sp(r,e,t){e=="__proto__"&&mi?mi(r,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[e]=t}var gi=sp;function op(r,e){return r===e||r!==r&&e!==e}var qe=op;var ap=Object.prototype,cp=ap.hasOwnProperty;function dp(r,e,t){var i=r[e];(!(cp.call(r,e)&&qe(i,t))||t===void 0&&!(e in r))&&gi(r,e,t)}var pi=dp;function up(r,e,t,i){var n=!t;t||(t={});for(var s=-1,o=e.length;++s<o;){var a=e[s],c=i?i(t[a],r[a],a,t,r):void 0;c===void 0&&(c=r[a]),n?gi(t,a,c):pi(t,a,c)}return t}var Ke=up;var $a=Math.max;function lp(r,e,t){return e=$a(e===void 0?r.length-1:e,0),function(){for(var i=arguments,n=-1,s=$a(i.length-e,0),o=Array(s);++n<s;)o[n]=i[e+n];n=-1;for(var a=Array(e+1);++n<e;)a[n]=i[n];return a[e]=t(o),Na(r,this,a)}}var qa=lp;function fp(r,e){return Fa(qa(r,e,fi),r+"")}var Vr=fp;var mp=9007199254740991;function gp(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=mp}var hi=gp;function pp(r){return r!=null&&hi(r.length)&&!Pt(r)}var Je=pp;function hp(r,e,t){if(!Y(t))return!1;var i=typeof e;return(i=="number"?Je(t)&&St(e,t.length):i=="string"&&e in t)?qe(t[e],r):!1}var Ka=hp;function yp(r){return Vr(function(e,t){var i=-1,n=t.length,s=n>1?t[n-1]:void 0,o=n>2?t[2]:void 0;for(s=r.length>3&&typeof s=="function"?(n--,s):void 0,o&&Ka(t[0],t[1],o)&&(s=n<3?void 0:s,n=1),e=Object(e);++i<n;){var a=t[i];a&&r(e,a,i,s)}return e})}var Ja=yp;var vp=Object.prototype;function bp(r){var e=r&&r.constructor,t=typeof e=="function"&&e.prototype||vp;return r===t}var wt=bp;function kp(r,e){for(var t=-1,i=Array(r);++t<r;)i[t]=e(t);return i}var Qa=kp;var Ip="[object Arguments]";function xp(r){return ae(r)&&Ie(r)==Ip}var Ss=xp;var za=Object.prototype,Cp=za.hasOwnProperty,Ap=za.propertyIsEnumerable,Pp=Ss(function(){return arguments}())?Ss:function(r){return ae(r)&&Cp.call(r,"callee")&&!Ap.call(r,"callee")},He=Pp;function Sp(){return!1}var Ya=Sp;var ec=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Za=ec&&typeof module=="object"&&module&&!module.nodeType&&module,wp=Za&&Za.exports===ec,Xa=wp?se.Buffer:void 0,Tp=Xa?Xa.isBuffer:void 0,Ep=Tp||Ya,Me=Ep;var Mp="[object Arguments]",Lp="[object Array]",Dp="[object Boolean]",Op="[object Date]",Np="[object Error]",Rp="[object Function]",_p="[object Map]",Up="[object Number]",Bp="[object Object]",Fp="[object RegExp]",Hp="[object Set]",jp="[object String]",Vp="[object WeakMap]",Wp="[object ArrayBuffer]",Gp="[object DataView]",$p="[object Float32Array]",qp="[object Float64Array]",Kp="[object Int8Array]",Jp="[object Int16Array]",Qp="[object Int32Array]",zp="[object Uint8Array]",Yp="[object Uint8ClampedArray]",Zp="[object Uint16Array]",Xp="[object Uint32Array]",re={};re[$p]=re[qp]=re[Kp]=re[Jp]=re[Qp]=re[zp]=re[Yp]=re[Zp]=re[Xp]=!0;re[Mp]=re[Lp]=re[Wp]=re[Dp]=re[Gp]=re[Op]=re[Np]=re[Rp]=re[_p]=re[Up]=re[Bp]=re[Fp]=re[Hp]=re[jp]=re[Vp]=!1;function eh(r){return ae(r)&&hi(r.length)&&!!re[Ie(r)]}var tc=eh;function th(r){return function(e){return r(e)}}var Tt=th;var ic=typeof exports=="object"&&exports&&!exports.nodeType&&exports,or=ic&&typeof module=="object"&&module&&!module.nodeType&&module,ih=or&&or.exports===ic,ws=ih&&_r.process,rh=function(){try{var r=or&&or.require&&or.require("util").types;return r||ws&&ws.binding&&ws.binding("util")}catch(e){}}(),Ne=rh;var rc=Ne&&Ne.isTypedArray,nh=rc?Tt(rc):tc,Qe=nh;var sh=Object.prototype,oh=sh.hasOwnProperty;function ah(r,e){var t=q(r),i=!t&&He(r),n=!t&&!i&&Me(r),s=!t&&!i&&!n&&Qe(r),o=t||i||n||s,a=o?Qa(r.length,String):[],c=a.length;for(var d in r)(e||oh.call(r,d))&&!(o&&(d=="length"||n&&(d=="offset"||d=="parent")||s&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||St(d,c)))&&a.push(d);return a}var Wr=ah;function ch(r,e){return function(t){return r(e(t))}}var Gr=ch;var dh=Gr(Object.keys,Object),nc=dh;var uh=Object.prototype,lh=uh.hasOwnProperty;function fh(r){if(!wt(r))return nc(r);var e=[];for(var t in Object(r))lh.call(r,t)&&t!="constructor"&&e.push(t);return e}var $r=fh;function mh(r){return Je(r)?Wr(r):$r(r)}var ze=mh;function gh(r){var e=[];if(r!=null)for(var t in Object(r))e.push(t);return e}var sc=gh;var ph=Object.prototype,hh=ph.hasOwnProperty;function yh(r){if(!Y(r))return sc(r);var e=wt(r),t=[];for(var i in r)i=="constructor"&&(e||!hh.call(r,i))||t.push(i);return t}var oc=yh;function vh(r){return Je(r)?Wr(r,!0):oc(r)}var Ye=vh;var bh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,kh=/^\w*$/;function Ih(r,e){if(q(r))return!1;var t=typeof r;return t=="number"||t=="symbol"||t=="boolean"||r==null||At(r)?!0:kh.test(r)||!bh.test(r)||e!=null&&r in Object(e)}var yi=Ih;var xh=Pe(Object,"create"),lt=xh;function Ch(){this.__data__=lt?lt(null):{},this.size=0}var ac=Ch;function Ah(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}var cc=Ah;var Ph="__lodash_hash_undefined__",Sh=Object.prototype,wh=Sh.hasOwnProperty;function Th(r){var e=this.__data__;if(lt){var t=e[r];return t===Ph?void 0:t}return wh.call(e,r)?e[r]:void 0}var dc=Th;var Eh=Object.prototype,Mh=Eh.hasOwnProperty;function Lh(r){var e=this.__data__;return lt?e[r]!==void 0:Mh.call(e,r)}var uc=Lh;var Dh="__lodash_hash_undefined__";function Oh(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=lt&&e===void 0?Dh:e,this}var lc=Oh;function vi(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var i=r[e];this.set(i[0],i[1])}}vi.prototype.clear=ac;vi.prototype.delete=cc;vi.prototype.get=dc;vi.prototype.has=uc;vi.prototype.set=lc;var Ts=vi;function Nh(){this.__data__=[],this.size=0}var fc=Nh;function Rh(r,e){for(var t=r.length;t--;)if(qe(r[t][0],e))return t;return-1}var Et=Rh;var _h=Array.prototype,Uh=_h.splice;function Bh(r){var e=this.__data__,t=Et(e,r);if(t<0)return!1;var i=e.length-1;return t==i?e.pop():Uh.call(e,t,1),--this.size,!0}var mc=Bh;function Fh(r){var e=this.__data__,t=Et(e,r);return t<0?void 0:e[t][1]}var gc=Fh;function Hh(r){return Et(this.__data__,r)>-1}var pc=Hh;function jh(r,e){var t=this.__data__,i=Et(t,r);return i<0?(++this.size,t.push([r,e])):t[i][1]=e,this}var hc=jh;function bi(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var i=r[e];this.set(i[0],i[1])}}bi.prototype.clear=fc;bi.prototype.delete=mc;bi.prototype.get=gc;bi.prototype.has=pc;bi.prototype.set=hc;var Mt=bi;var Vh=Pe(se,"Map"),Lt=Vh;function Wh(){this.size=0,this.__data__={hash:new Ts,map:new(Lt||Mt),string:new Ts}}var yc=Wh;function Gh(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}var vc=Gh;function $h(r,e){var t=r.__data__;return vc(e)?t[typeof e=="string"?"string":"hash"]:t.map}var Dt=$h;function qh(r){var e=Dt(this,r).delete(r);return this.size-=e?1:0,e}var bc=qh;function Kh(r){return Dt(this,r).get(r)}var kc=Kh;function Jh(r){return Dt(this,r).has(r)}var Ic=Jh;function Qh(r,e){var t=Dt(this,r),i=t.size;return t.set(r,e),this.size+=t.size==i?0:1,this}var xc=Qh;function ki(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var i=r[e];this.set(i[0],i[1])}}ki.prototype.clear=yc;ki.prototype.delete=bc;ki.prototype.get=kc;ki.prototype.has=Ic;ki.prototype.set=xc;var Kt=ki;var zh="Expected a function";function Es(r,e){if(typeof r!="function"||e!=null&&typeof e!="function")throw new TypeError(zh);var t=function(){var i=arguments,n=e?e.apply(this,i):i[0],s=t.cache;if(s.has(n))return s.get(n);var o=r.apply(this,i);return t.cache=s.set(n,o)||s,o};return t.cache=new(Es.Cache||Kt),t}Es.Cache=Kt;var Cc=Es;var Yh=500;function Zh(r){var e=Cc(r,function(i){return t.size===Yh&&t.clear(),i}),t=e.cache;return e}var Ac=Zh;var Xh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ey=/\\(\\)?/g,ty=Ac(function(r){var e=[];return r.charCodeAt(0)===46&&e.push(""),r.replace(Xh,function(t,i,n,s){e.push(n?s.replace(ey,"$1"):i||t)}),e}),Pc=ty;function iy(r){return r==null?"":Pa(r)}var Ze=iy;function ry(r,e){return q(r)?r:yi(r,e)?[r]:Pc(Ze(r))}var Ii=ry;var ny=1/0;function sy(r){if(typeof r=="string"||At(r))return r;var e=r+"";return e=="0"&&1/r==-ny?"-0":e}var Xe=sy;function oy(r,e){e=Ii(e,r);for(var t=0,i=e.length;r!=null&&t<i;)r=r[Xe(e[t++])];return t&&t==i?r:void 0}var qr=oy;function ay(r,e,t){var i=r==null?void 0:qr(r,e);return i===void 0?t:i}var ft=ay;function cy(r,e){for(var t=-1,i=e.length,n=r.length;++t<i;)r[n+t]=e[t];return r}var xi=cy;var Sc=me?me.isConcatSpreadable:void 0;function dy(r){return q(r)||He(r)||!!(Sc&&r&&r[Sc])}var wc=dy;function Tc(r,e,t,i,n){var s=-1,o=r.length;for(t||(t=wc),n||(n=[]);++s<o;){var a=r[s];e>0&&t(a)?e>1?Tc(a,e-1,t,i,n):xi(n,a):i||(n[n.length]=a)}return n}var Kr=Tc;function uy(r){var e=r==null?0:r.length;return e?Kr(r,1):[]}var Ms=uy;var ly=Gr(Object.getPrototypeOf,Object),Ot=ly;var fy="[object Object]",my=Function.prototype,gy=Object.prototype,Ec=my.toString,py=gy.hasOwnProperty,hy=Ec.call(Object);function yy(r){if(!ae(r)||Ie(r)!=fy)return!1;var e=Ot(r);if(e===null)return!0;var t=py.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&Ec.call(t)==hy}var Mc=yy;function vy(r,e,t){var i=-1,n=r.length;e<0&&(e=-e>n?0:n+e),t=t>n?n:t,t<0&&(t+=n),n=e>t?0:t-e>>>0,e>>>=0;for(var s=Array(n);++i<n;)s[i]=r[i+e];return s}var Lc=vy;function by(r,e,t){var i=r.length;return t=t===void 0?i:t,!e&&t>=i?r:Lc(r,e,t)}var Dc=by;var ky="\\ud800-\\udfff",Iy="\\u0300-\\u036f",xy="\\ufe20-\\ufe2f",Cy="\\u20d0-\\u20ff",Ay=Iy+xy+Cy,Py="\\ufe0e\\ufe0f",Sy="\\u200d",wy=RegExp("["+Sy+ky+Ay+Py+"]");function Ty(r){return wy.test(r)}var Jr=Ty;function Ey(r){return r.split("")}var Oc=Ey;var Nc="\\ud800-\\udfff",My="\\u0300-\\u036f",Ly="\\ufe20-\\ufe2f",Dy="\\u20d0-\\u20ff",Oy=My+Ly+Dy,Ny="\\ufe0e\\ufe0f",Ry="["+Nc+"]",Ls="["+Oy+"]",Ds="\\ud83c[\\udffb-\\udfff]",_y="(?:"+Ls+"|"+Ds+")",Rc="[^"+Nc+"]",_c="(?:\\ud83c[\\udde6-\\uddff]){2}",Uc="[\\ud800-\\udbff][\\udc00-\\udfff]",Uy="\\u200d",Bc=_y+"?",Fc="["+Ny+"]?",By="(?:"+Uy+"(?:"+[Rc,_c,Uc].join("|")+")"+Fc+Bc+")*",Fy=Fc+Bc+By,Hy="(?:"+[Rc+Ls+"?",Ls,_c,Uc,Ry].join("|")+")",jy=RegExp(Ds+"(?="+Ds+")|"+Hy+Fy,"g");function Vy(r){return r.match(jy)||[]}var Hc=Vy;function Wy(r){return Jr(r)?Hc(r):Oc(r)}var jc=Wy;function Gy(r){return function(e){e=Ze(e);var t=Jr(e)?jc(e):void 0,i=t?t[0]:e.charAt(0),n=t?Dc(t,1).join(""):e.slice(1);return i[r]()+n}}var Vc=Gy;var $y=Vc("toUpperCase"),Qr=$y;function qy(r){return Qr(Ze(r).toLowerCase())}var Wc=qy;function Ky(r,e,t,i){var n=-1,s=r==null?0:r.length;for(i&&s&&(t=r[++n]);++n<s;)t=e(t,r[n],n,r);return t}var Gc=Ky;function Jy(r){return function(e){return r==null?void 0:r[e]}}var $c=Jy;var Qy={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},zy=$c(Qy),qc=zy;var Yy=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Zy="\\u0300-\\u036f",Xy="\\ufe20-\\ufe2f",ev="\\u20d0-\\u20ff",tv=Zy+Xy+ev,iv="["+tv+"]",rv=RegExp(iv,"g");function nv(r){return r=Ze(r),r&&r.replace(Yy,qc).replace(rv,"")}var Kc=nv;var sv=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function ov(r){return r.match(sv)||[]}var Jc=ov;var av=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function cv(r){return av.test(r)}var Qc=cv;var ed="\\ud800-\\udfff",dv="\\u0300-\\u036f",uv="\\ufe20-\\ufe2f",lv="\\u20d0-\\u20ff",fv=dv+uv+lv,td="\\u2700-\\u27bf",id="a-z\\xdf-\\xf6\\xf8-\\xff",mv="\\xac\\xb1\\xd7\\xf7",gv="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",pv="\\u2000-\\u206f",hv=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",rd="A-Z\\xc0-\\xd6\\xd8-\\xde",yv="\\ufe0e\\ufe0f",nd=mv+gv+pv+hv,sd="['\u2019]",zc="["+nd+"]",vv="["+fv+"]",od="\\d+",bv="["+td+"]",ad="["+id+"]",cd="[^"+ed+nd+od+td+id+rd+"]",kv="\\ud83c[\\udffb-\\udfff]",Iv="(?:"+vv+"|"+kv+")",xv="[^"+ed+"]",dd="(?:\\ud83c[\\udde6-\\uddff]){2}",ud="[\\ud800-\\udbff][\\udc00-\\udfff]",Ci="["+rd+"]",Cv="\\u200d",Yc="(?:"+ad+"|"+cd+")",Av="(?:"+Ci+"|"+cd+")",Zc="(?:"+sd+"(?:d|ll|m|re|s|t|ve))?",Xc="(?:"+sd+"(?:D|LL|M|RE|S|T|VE))?",ld=Iv+"?",fd="["+yv+"]?",Pv="(?:"+Cv+"(?:"+[xv,dd,ud].join("|")+")"+fd+ld+")*",Sv="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",wv="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Tv=fd+ld+Pv,Ev="(?:"+[bv,dd,ud].join("|")+")"+Tv,Mv=RegExp([Ci+"?"+ad+"+"+Zc+"(?="+[zc,Ci,"$"].join("|")+")",Av+"+"+Xc+"(?="+[zc,Ci+Yc,"$"].join("|")+")",Ci+"?"+Yc+"+"+Zc,Ci+"+"+Xc,wv,Sv,od,Ev].join("|"),"g");function Lv(r){return r.match(Mv)||[]}var md=Lv;function Dv(r,e,t){return r=Ze(r),e=t?void 0:e,e===void 0?Qc(r)?md(r):Jc(r):r.match(e)||[]}var gd=Dv;var Ov="['\u2019]",Nv=RegExp(Ov,"g");function Rv(r){return function(e){return Gc(gd(Kc(e).replace(Nv,"")),r,"")}}var zr=Rv;var _v=zr(function(r,e,t){return e=e.toLowerCase(),r+(t?Wc(e):e)}),Os=_v;function Uv(){this.__data__=new Mt,this.size=0}var pd=Uv;function Bv(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t}var hd=Bv;function Fv(r){return this.__data__.get(r)}var yd=Fv;function Hv(r){return this.__data__.has(r)}var vd=Hv;var jv=200;function Vv(r,e){var t=this.__data__;if(t instanceof Mt){var i=t.__data__;if(!Lt||i.length<jv-1)return i.push([r,e]),this.size=++t.size,this;t=this.__data__=new Kt(i)}return t.set(r,e),this.size=t.size,this}var bd=Vv;function Ai(r){var e=this.__data__=new Mt(r);this.size=e.size}Ai.prototype.clear=pd;Ai.prototype.delete=hd;Ai.prototype.get=yd;Ai.prototype.has=vd;Ai.prototype.set=bd;var et=Ai;function Wv(r,e){return r&&Ke(e,ze(e),r)}var kd=Wv;function Gv(r,e){return r&&Ke(e,Ye(e),r)}var Id=Gv;var Pd=typeof exports=="object"&&exports&&!exports.nodeType&&exports,xd=Pd&&typeof module=="object"&&module&&!module.nodeType&&module,$v=xd&&xd.exports===Pd,Cd=$v?se.Buffer:void 0,Ad=Cd?Cd.allocUnsafe:void 0;function qv(r,e){if(e)return r.slice();var t=r.length,i=Ad?Ad(t):new r.constructor(t);return r.copy(i),i}var Yr=qv;function Kv(r,e){for(var t=-1,i=r==null?0:r.length,n=0,s=[];++t<i;){var o=r[t];e(o,t,r)&&(s[n++]=o)}return s}var Sd=Kv;function Jv(){return[]}var Zr=Jv;var Qv=Object.prototype,zv=Qv.propertyIsEnumerable,wd=Object.getOwnPropertySymbols,Yv=wd?function(r){return r==null?[]:(r=Object(r),Sd(wd(r),function(e){return zv.call(r,e)}))}:Zr,Pi=Yv;function Zv(r,e){return Ke(r,Pi(r),e)}var Td=Zv;var Xv=Object.getOwnPropertySymbols,eb=Xv?function(r){for(var e=[];r;)xi(e,Pi(r)),r=Ot(r);return e}:Zr,Xr=eb;function tb(r,e){return Ke(r,Xr(r),e)}var Ed=tb;function ib(r,e,t){var i=e(r);return q(r)?i:xi(i,t(r))}var en=ib;function rb(r){return en(r,ze,Pi)}var ar=rb;function nb(r){return en(r,Ye,Xr)}var Md=nb;var sb=Pe(se,"DataView"),tn=sb;var ob=Pe(se,"Promise"),rn=ob;var ab=Pe(se,"Set"),Nt=ab;var Ld="[object Map]",cb="[object Object]",Dd="[object Promise]",Od="[object Set]",Nd="[object WeakMap]",Rd="[object DataView]",db=ut(tn),ub=ut(Lt),lb=ut(rn),fb=ut(Nt),mb=ut(Br),Jt=Ie;(tn&&Jt(new tn(new ArrayBuffer(1)))!=Rd||Lt&&Jt(new Lt)!=Ld||rn&&Jt(rn.resolve())!=Dd||Nt&&Jt(new Nt)!=Od||Br&&Jt(new Br)!=Nd)&&(Jt=function(r){var e=Ie(r),t=e==cb?r.constructor:void 0,i=t?ut(t):"";if(i)switch(i){case db:return Rd;case ub:return Ld;case lb:return Dd;case fb:return Od;case mb:return Nd}return e});var je=Jt;var gb=Object.prototype,pb=gb.hasOwnProperty;function hb(r){var e=r.length,t=new r.constructor(e);return e&&typeof r[0]=="string"&&pb.call(r,"index")&&(t.index=r.index,t.input=r.input),t}var _d=hb;var yb=se.Uint8Array,Si=yb;function vb(r){var e=new r.constructor(r.byteLength);return new Si(e).set(new Si(r)),e}var wi=vb;function bb(r,e){var t=e?wi(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.byteLength)}var Ud=bb;var kb=/\w*$/;function Ib(r){var e=new r.constructor(r.source,kb.exec(r));return e.lastIndex=r.lastIndex,e}var Bd=Ib;var Fd=me?me.prototype:void 0,Hd=Fd?Fd.valueOf:void 0;function xb(r){return Hd?Object(Hd.call(r)):{}}var jd=xb;function Cb(r,e){var t=e?wi(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}var nn=Cb;var Ab="[object Boolean]",Pb="[object Date]",Sb="[object Map]",wb="[object Number]",Tb="[object RegExp]",Eb="[object Set]",Mb="[object String]",Lb="[object Symbol]",Db="[object ArrayBuffer]",Ob="[object DataView]",Nb="[object Float32Array]",Rb="[object Float64Array]",_b="[object Int8Array]",Ub="[object Int16Array]",Bb="[object Int32Array]",Fb="[object Uint8Array]",Hb="[object Uint8ClampedArray]",jb="[object Uint16Array]",Vb="[object Uint32Array]";function Wb(r,e,t){var i=r.constructor;switch(e){case Db:return wi(r);case Ab:case Pb:return new i(+r);case Ob:return Ud(r,t);case Nb:case Rb:case _b:case Ub:case Bb:case Fb:case Hb:case jb:case Vb:return nn(r,t);case Sb:return new i;case wb:case Mb:return new i(r);case Tb:return Bd(r);case Eb:return new i;case Lb:return jd(r)}}var Vd=Wb;function Gb(r){return typeof r.constructor=="function"&&!wt(r)?Fr(Ot(r)):{}}var sn=Gb;var $b="[object Map]";function qb(r){return ae(r)&&je(r)==$b}var Wd=qb;var Gd=Ne&&Ne.isMap,Kb=Gd?Tt(Gd):Wd,$d=Kb;var Jb="[object Set]";function Qb(r){return ae(r)&&je(r)==Jb}var qd=Qb;var Kd=Ne&&Ne.isSet,zb=Kd?Tt(Kd):qd,Jd=zb;var Yb=1,Zb=2,Xb=4,Qd="[object Arguments]",ek="[object Array]",tk="[object Boolean]",ik="[object Date]",rk="[object Error]",zd="[object Function]",nk="[object GeneratorFunction]",sk="[object Map]",ok="[object Number]",Yd="[object Object]",ak="[object RegExp]",ck="[object Set]",dk="[object String]",uk="[object Symbol]",lk="[object WeakMap]",fk="[object ArrayBuffer]",mk="[object DataView]",gk="[object Float32Array]",pk="[object Float64Array]",hk="[object Int8Array]",yk="[object Int16Array]",vk="[object Int32Array]",bk="[object Uint8Array]",kk="[object Uint8ClampedArray]",Ik="[object Uint16Array]",xk="[object Uint32Array]",ie={};ie[Qd]=ie[ek]=ie[fk]=ie[mk]=ie[tk]=ie[ik]=ie[gk]=ie[pk]=ie[hk]=ie[yk]=ie[vk]=ie[sk]=ie[ok]=ie[Yd]=ie[ak]=ie[ck]=ie[dk]=ie[uk]=ie[bk]=ie[kk]=ie[Ik]=ie[xk]=!0;ie[rk]=ie[zd]=ie[lk]=!1;function on(r,e,t,i,n,s){var o,a=e&Yb,c=e&Zb,d=e&Xb;if(t&&(o=n?t(r,i,n,s):t(r)),o!==void 0)return o;if(!Y(r))return r;var f=q(r);if(f){if(o=_d(r),!a)return Hr(r,o)}else{var u=je(r),m=u==zd||u==nk;if(Me(r))return Yr(r,a);if(u==Yd||u==Qd||m&&!n){if(o=c||m?{}:sn(r),!a)return c?Ed(r,Id(o,r)):Td(r,kd(o,r))}else{if(!ie[u])return n?r:{};o=Vd(r,u,a)}}s||(s=new et);var g=s.get(r);if(g)return g;s.set(r,o),Jd(r)?r.forEach(function(I){o.add(on(I,e,t,I,r,s))}):$d(r)&&r.forEach(function(I,b){o.set(b,on(I,e,t,b,r,s))});var p=d?c?Md:ar:c?Ye:ze,v=f?void 0:p(r);return jr(v||r,function(I,b){v&&(b=I,I=r[b]),pi(o,b,on(I,e,t,b,r,s))}),o}var Zd=on;var Ck=1,Ak=4;function Pk(r){return Zd(r,Ck|Ak)}var Qt=Pk;var Sk="__lodash_hash_undefined__";function wk(r){return this.__data__.set(r,Sk),this}var Xd=wk;function Tk(r){return this.__data__.has(r)}var eu=Tk;function an(r){var e=-1,t=r==null?0:r.length;for(this.__data__=new Kt;++e<t;)this.add(r[e])}an.prototype.add=an.prototype.push=Xd;an.prototype.has=eu;var cn=an;function Ek(r,e){for(var t=-1,i=r==null?0:r.length;++t<i;)if(e(r[t],t,r))return!0;return!1}var tu=Ek;function Mk(r,e){return r.has(e)}var dn=Mk;var Lk=1,Dk=2;function Ok(r,e,t,i,n,s){var o=t&Lk,a=r.length,c=e.length;if(a!=c&&!(o&&c>a))return!1;var d=s.get(r),f=s.get(e);if(d&&f)return d==e&&f==r;var u=-1,m=!0,g=t&Dk?new cn:void 0;for(s.set(r,e),s.set(e,r);++u<a;){var p=r[u],v=e[u];if(i)var I=o?i(v,p,u,e,r,s):i(p,v,u,r,e,s);if(I!==void 0){if(I)continue;m=!1;break}if(g){if(!tu(e,function(b,w){if(!dn(g,w)&&(p===b||n(p,b,t,i,s)))return g.push(w)})){m=!1;break}}else if(!(p===v||n(p,v,t,i,s))){m=!1;break}}return s.delete(r),s.delete(e),m}var un=Ok;function Nk(r){var e=-1,t=Array(r.size);return r.forEach(function(i,n){t[++e]=[n,i]}),t}var iu=Nk;function Rk(r){var e=-1,t=Array(r.size);return r.forEach(function(i){t[++e]=i}),t}var Ti=Rk;var _k=1,Uk=2,Bk="[object Boolean]",Fk="[object Date]",Hk="[object Error]",jk="[object Map]",Vk="[object Number]",Wk="[object RegExp]",Gk="[object Set]",$k="[object String]",qk="[object Symbol]",Kk="[object ArrayBuffer]",Jk="[object DataView]",ru=me?me.prototype:void 0,Ns=ru?ru.valueOf:void 0;function Qk(r,e,t,i,n,s,o){switch(t){case Jk:if(r.byteLength!=e.byteLength||r.byteOffset!=e.byteOffset)return!1;r=r.buffer,e=e.buffer;case Kk:return!(r.byteLength!=e.byteLength||!s(new Si(r),new Si(e)));case Bk:case Fk:case Vk:return qe(+r,+e);case Hk:return r.name==e.name&&r.message==e.message;case Wk:case $k:return r==e+"";case jk:var a=iu;case Gk:var c=i&_k;if(a||(a=Ti),r.size!=e.size&&!c)return!1;var d=o.get(r);if(d)return d==e;i|=Uk,o.set(r,e);var f=un(a(r),a(e),i,n,s,o);return o.delete(r),f;case qk:if(Ns)return Ns.call(r)==Ns.call(e)}return!1}var nu=Qk;var zk=1,Yk=Object.prototype,Zk=Yk.hasOwnProperty;function Xk(r,e,t,i,n,s){var o=t&zk,a=ar(r),c=a.length,d=ar(e),f=d.length;if(c!=f&&!o)return!1;for(var u=c;u--;){var m=a[u];if(!(o?m in e:Zk.call(e,m)))return!1}var g=s.get(r),p=s.get(e);if(g&&p)return g==e&&p==r;var v=!0;s.set(r,e),s.set(e,r);for(var I=o;++u<c;){m=a[u];var b=r[m],w=e[m];if(i)var E=o?i(w,b,m,e,r,s):i(b,w,m,r,e,s);if(!(E===void 0?b===w||n(b,w,t,i,s):E)){v=!1;break}I||(I=m=="constructor")}if(v&&!I){var A=r.constructor,S=e.constructor;A!=S&&"constructor"in r&&"constructor"in e&&!(typeof A=="function"&&A instanceof A&&typeof S=="function"&&S instanceof S)&&(v=!1)}return s.delete(r),s.delete(e),v}var su=Xk;var eI=1,ou="[object Arguments]",au="[object Array]",ln="[object Object]",tI=Object.prototype,cu=tI.hasOwnProperty;function iI(r,e,t,i,n,s){var o=q(r),a=q(e),c=o?au:je(r),d=a?au:je(e);c=c==ou?ln:c,d=d==ou?ln:d;var f=c==ln,u=d==ln,m=c==d;if(m&&Me(r)){if(!Me(e))return!1;o=!0,f=!1}if(m&&!f)return s||(s=new et),o||Qe(r)?un(r,e,t,i,n,s):nu(r,e,c,t,i,n,s);if(!(t&eI)){var g=f&&cu.call(r,"__wrapped__"),p=u&&cu.call(e,"__wrapped__");if(g||p){var v=g?r.value():r,I=p?e.value():e;return s||(s=new et),n(v,I,t,i,s)}}return m?(s||(s=new et),su(r,e,t,i,n,s)):!1}var du=iI;function uu(r,e,t,i,n){return r===e?!0:r==null||e==null||!ae(r)&&!ae(e)?r!==r&&e!==e:du(r,e,t,i,uu,n)}var Ei=uu;var rI=1,nI=2;function sI(r,e,t,i){var n=t.length,s=n,o=!i;if(r==null)return!s;for(r=Object(r);n--;){var a=t[n];if(o&&a[2]?a[1]!==r[a[0]]:!(a[0]in r))return!1}for(;++n<s;){a=t[n];var c=a[0],d=r[c],f=a[1];if(o&&a[2]){if(d===void 0&&!(c in r))return!1}else{var u=new et;if(i)var m=i(d,f,c,r,e,u);if(!(m===void 0?Ei(f,d,rI|nI,i,u):m))return!1}}return!0}var lu=sI;function oI(r){return r===r&&!Y(r)}var fn=oI;function aI(r){for(var e=ze(r),t=e.length;t--;){var i=e[t],n=r[i];e[t]=[i,n,fn(n)]}return e}var fu=aI;function cI(r,e){return function(t){return t==null?!1:t[r]===e&&(e!==void 0||r in Object(t))}}var mn=cI;function dI(r){var e=fu(r);return e.length==1&&e[0][2]?mn(e[0][0],e[0][1]):function(t){return t===r||lu(t,r,e)}}var mu=dI;function uI(r,e){return r!=null&&e in Object(r)}var gu=uI;function lI(r,e,t){e=Ii(e,r);for(var i=-1,n=e.length,s=!1;++i<n;){var o=Xe(e[i]);if(!(s=r!=null&&t(r,o)))break;r=r[o]}return s||++i!=n?s:(n=r==null?0:r.length,!!n&&hi(n)&&St(o,n)&&(q(r)||He(r)))}var pu=lI;function fI(r,e){return r!=null&&pu(r,e,gu)}var hu=fI;var mI=1,gI=2;function pI(r,e){return yi(r)&&fn(e)?mn(Xe(r),e):function(t){var i=ft(t,r);return i===void 0&&i===e?hu(t,r):Ei(e,i,mI|gI)}}var yu=pI;function hI(r){return function(e){return e==null?void 0:e[r]}}var vu=hI;function yI(r){return function(e){return qr(e,r)}}var bu=yI;function vI(r){return yi(r)?vu(Xe(r)):bu(r)}var ku=vI;function bI(r){return typeof r=="function"?r:r==null?fi:typeof r=="object"?q(r)?yu(r[0],r[1]):mu(r):ku(r)}var Iu=bI;function kI(r){return function(e,t,i){for(var n=-1,s=Object(e),o=i(e),a=o.length;a--;){var c=o[r?a:++n];if(t(s[c],c,s)===!1)break}return e}}var xu=kI;var II=xu(),gn=II;function xI(r,e){return r&&gn(r,e,ze)}var Cu=xI;var CI=function(){return se.Date.now()},pn=CI;var AI="Expected a function",PI=Math.max,SI=Math.min;function wI(r,e,t){var i,n,s,o,a,c,d=0,f=!1,u=!1,m=!0;if(typeof r!="function")throw new TypeError(AI);e=Ps(e)||0,Y(t)&&(f=!!t.leading,u="maxWait"in t,s=u?PI(Ps(t.maxWait)||0,e):s,m="trailing"in t?!!t.trailing:m);function g(T){var D=i,O=n;return i=n=void 0,d=T,o=r.apply(O,D),o}function p(T){return d=T,a=setTimeout(b,e),f?g(T):o}function v(T){var D=T-c,O=T-d,j=e-D;return u?SI(j,s-O):j}function I(T){var D=T-c,O=T-d;return c===void 0||D>=e||D<0||u&&O>=s}function b(){var T=pn();if(I(T))return w(T);a=setTimeout(b,v(T))}function w(T){return a=void 0,m&&i?g(T):(i=n=void 0,o)}function E(){a!==void 0&&clearTimeout(a),d=0,i=c=n=a=void 0}function A(){return a===void 0?o:w(pn())}function S(){var T=pn(),D=I(T);if(i=arguments,n=this,c=T,D){if(a===void 0)return p(c);if(u)return clearTimeout(a),a=setTimeout(b,e),g(c)}return a===void 0&&(a=setTimeout(b,e)),o}return S.cancel=E,S.flush=A,S}var cr=wI;function TI(r,e,t){(t!==void 0&&!qe(r[e],t)||t===void 0&&!(e in r))&&gi(r,e,t)}var dr=TI;function EI(r){return ae(r)&&Je(r)}var hn=EI;function MI(r,e){if(!(e==="constructor"&&typeof r[e]=="function")&&e!="__proto__")return r[e]}var ur=MI;function LI(r){return Ke(r,Ye(r))}var Au=LI;function DI(r,e,t,i,n,s,o){var a=ur(r,t),c=ur(e,t),d=o.get(c);if(d){dr(r,t,d);return}var f=s?s(a,c,t+"",r,e,o):void 0,u=f===void 0;if(u){var m=q(c),g=!m&&Me(c),p=!m&&!g&&Qe(c);f=c,m||g||p?q(a)?f=a:hn(a)?f=Hr(a):g?(u=!1,f=Yr(c,!0)):p?(u=!1,f=nn(c,!0)):f=[]:Mc(c)||He(c)?(f=a,He(a)?f=Au(a):(!Y(a)||Pt(a))&&(f=sn(c))):u=!1}u&&(o.set(c,f),n(f,c,i,s,o),o.delete(c)),dr(r,t,f)}var Pu=DI;function Su(r,e,t,i,n){r!==e&&gn(e,function(s,o){if(n||(n=new et),Y(s))Pu(r,e,o,t,Su,i,n);else{var a=i?i(ur(r,o),s,o+"",r,e,n):void 0;a===void 0&&(a=s),dr(r,o,a)}},Ye)}var wu=Su;var OI=Ja(function(r,e,t,i){wu(r,e,t,i)}),Rs=OI;function NI(r,e,t){for(var i=-1,n=r==null?0:r.length;++i<n;)if(t(e,r[i]))return!0;return!1}var Tu=NI;function RI(r){var e=r==null?0:r.length;return e?r[e-1]:void 0}var yn=RI;var _I="[object Date]";function UI(r){return ae(r)&&Ie(r)==_I}var Eu=UI;var Mu=Ne&&Ne.isDate,BI=Mu?Tt(Mu):Eu,_s=BI;var FI="[object Map]",HI="[object Set]",jI=Object.prototype,VI=jI.hasOwnProperty;function WI(r){if(r==null)return!0;if(Je(r)&&(q(r)||typeof r=="string"||typeof r.splice=="function"||Me(r)||Qe(r)||He(r)))return!r.length;var e=je(r);if(e==FI||e==HI)return!r.size;if(wt(r))return!$r(r).length;for(var t in r)if(VI.call(r,t))return!1;return!0}var Us=WI;function GI(r,e,t){t=typeof t=="function"?t:void 0;var i=t?t(r,e):void 0;return i===void 0?Ei(r,e,void 0,t):!!i}var vn=GI;function $I(r,e,t,i){if(!Y(r))return r;e=Ii(e,r);for(var n=-1,s=e.length,o=s-1,a=r;a!=null&&++n<s;){var c=Xe(e[n]),d=t;if(c==="__proto__"||c==="constructor"||c==="prototype")return r;if(n!=o){var f=a[c];d=i?i(f,c,a):void 0,d===void 0&&(d=Y(f)?f:St(e[n+1])?[]:{})}pi(a,c,d),a=a[c]}return r}var Lu=$I;function qI(r,e,t){return r==null?r:Lu(r,e,t)}var Bs=qI;var KI=zr(function(r,e,t){return r+(t?" ":"")+Qr(e)}),Fs=KI;function JI(r,e,t){var i=q(r),n=i||Me(r)||Qe(r);if(e=Iu(e,4),t==null){var s=r&&r.constructor;n?t=i?new s:[]:Y(r)?t=Pt(s)?Fr(Ot(r)):{}:t={}}return(n?jr:Cu)(r,function(o,a,c){return e(t,o,a,c)}),t}var Hs=JI;var QI=1/0,zI=Nt&&1/Ti(new Nt([,-0]))[1]==QI?function(r){return new Nt(r)}:Ra,Du=zI;var YI=200;function ZI(r,e,t){var i=-1,n=Ga,s=r.length,o=!0,a=[],c=a;if(t)o=!1,n=Tu;else if(s>=YI){var d=e?null:Du(r);if(d)return Ti(d);o=!1,n=dn,c=new cn}else c=e?[]:a;e:for(;++i<s;){var f=r[i],u=e?e(f):f;if(f=t||f!==0?f:0,o&&u===u){for(var m=c.length;m--;)if(c[m]===u)continue e;e&&c.push(u),a.push(f)}else n(c,u,t)||(c!==a&&c.push(u),a.push(f))}return a}var bn=ZI;var XI=Vr(function(r){return bn(Kr(r,1,hn,!0))}),kn=XI;function ex(r){return r&&r.length?bn(r):[]}var Mi=ex;var tx=(r,e,i={})=>{var t=ha(i,[]);let n=[],s=cr(()=>h(null,null,function*(){let c=[...n];n.length=0,yield r(c)}),e,y({maxWait:e},t)),o=()=>{s.cancel(),n.length=0},a=c=>{q(c)?n.push(...Ms(c)):n.push(c),s()};return a.cancel=o,a.flush=s.flush,a},Ou=tx;var lr=r=>{function e(t){return Hs(t,function(i,n,s){let o=!_s(n)&&Y(n),a=o?e(n):n;o&&Us(a)||(q(i)?i.push(a):i[s]=a)})}return Y(r)?e(r):r};var Li=(N=>(N.Undefined="undefined",N.PageViewOrganic="pageViewOrganic",N.PageViewUtmAttributed="pageViewUtmAttributed",N.AddPaymentMethod="addPaymentMethod",N.AddToWishlist="addToWishlist",N.ContactMessage="contactMessage",N.Custom="custom",N.SyncCart="syncCart",N.Order="order",N.InitiateCheckout="initiateCheckout",N.AddToCart="addToCart",N.RemoveFromCart="removeFromCart",N.OneTimeItemPurchase="oneTimeItemPurchase",N.SubscriptionItemPurchase="subscriptionItemPurchase",N.ViewProduct="viewProduct",N.ViewPage="viewPage",N.ApplyPromotionalCode="applyPromotionalCode",N.KeywordSearch="keywordSearch",N.UserLoginSignup="userLoginSignup",N.UserLogin="userLogin",N.NewsletterSignup="newsletterSignup",N.Lead="lead",N.ChangeProductAttribute="changeProductAttribute",N.FilterItemsByAttribute="filterItemsByAttribute",N.Schedule="schedule",N.ViewContentItem="viewContentItem",N.StartTrial="startTrial",N))(Li||{}),js=(n=>(n.Undefined="undefined",n.SingleProduct="singleProduct",n.SingleVariant="singleVariant",n.Collection="collection",n))(js||{}),Vs=(c=>(c.None="none",c.BigCommerce="bigCommerce",c.Shopify="shopify",c.OrderGroove="orderGroove",c.Magento="magento",c.Generic="generic",c.WooCommerce="wooCommerce",c.Demandware="demandware",c))(Vs||{}),Ws=(o=>(o.Undefined="undefined",o.Fulfilled="fulfilled",o.NoneFulfilled="noneFulfilled",o.PartiallyFulfilled="partiallyFulfilled",o.RestockedOrCancelled="restockedOrCancelled",o.Pending="pending",o))(Ws||{}),Gs=(c=>(c.Undefined="undefined",c.Pending="pending",c.Authorized="authorized",c.PartiallyPaid="partiallyPaid",c.Paid="paid",c.PartiallyRefunded="partiallyRefunded",c.Refunded="refunded",c.Voided="voided",c))(Gs||{}),$s=(u=>(u.Undefined="undefined",u.Seeka="seeka",u.DynamicYield="dynamicYield",u.Segment="segment",u.FacebookPixel="facebookPixel",u.GoogleAnalytics="googleAnalytics",u.Braze="braze",u.SnapchatPixel="snapchatPixel",u.Pinterest="pinterest",u.TikTokPixel="tikTokPixel",u.GoogleAds="googleAds",u))($s||{}),qs=(o=>(o.Default="default",o.Sku="sku",o.ProductId="productId",o.VariantId="variantId",o.ProductIdAndVariantIdUnderscore="productIdAndVariantIdUnderscore",o.VariantIdOrProductId="variantIdOrProductId",o))(qs||{});var Ks=(T=>(T.Undefined="undefined",T.Equals="equals",T.NotEquals="notEquals",T.Contains="contains",T.NotContains="notContains",T.StartsWith="startsWith",T.EndsWith="endsWith",T.IsNull="isNull",T.NotNull="notNull",T.IsTrue="isTrue",T.IsFalse="isFalse",T.GreaterThanOrEquals="greaterThanOrEquals",T.LessThanOrEquals="lessThanOrEquals",T.GreaterThan="greaterThan",T.LessThan="lessThan",T.Before="before",T.After="after",T.Between="between",T.In="in",T.NotIn="notIn",T.Regex="regEx",T.Any="any",T))(Ks||{});var Js=(i=>(i.Unset="unset",i.Granted="granted",i.Denied="denied",i))(Js||{}),Qs=(t=>(t.Undefined="undefined",t.MeasureAdvertisingPerformance="measureAdvertisingPerformance",t))(Qs||{}),zs=(i=>(i.Undefined="undefined",i.AllOf="allOf",i.AnyOf="anyOf",i))(zs||{}),fr=(i=>(i.Disabled="disabled",i.Explicit="explicit",i.Implicit="implicit",i))(fr||{}),Ys=(A=>(A.Undefined="undefined",A.Custom="custom",A.AddPaymentInfo="addPaymentInfo",A.AddToCart="addToCart",A.AddToWishlist="addToWishlist",A.CompleteRegistration="completeRegistration",A.Contact="contact",A.CustomizeProduct="customizeProduct",A.Donate="donate",A.FindLocation="findLocation",A.InitiateCheckout="initiateCheckout",A.Lead="lead",A.PageView="pageView",A.Purchase="purchase",A.Schedule="schedule",A.Search="search",A.StartTrial="startTrial",A.SubmitApplication="submitApplication",A.Subscribe="subscribe",A.ViewContent="viewContent",A))(Ys||{}),Zs=(g=>(g.Undefined="undefined",g.Other="other",g.Home="home",g.Category="category",g.SingleProduct="singleProduct",g.Cart="cart",g.SinglePost="singlePost",g.PostList="postList",g.SignIn="signIn",g.CheckoutStart="checkoutStart",g.CheckoutStep="checkoutStep",g.CheckoutSuccess="checkoutSuccess",g.SearchResults="searchResults",g))(Zs||{}),Xs=(o=>(o.Undefined="undefined",o.FullyFeatured="fullyFeatured",o.BrowserOnlyDueToCurrentPlan="browserOnlyDueToCurrentPlan",o.BrowserOnlyDueToBillingFailure="browserOnlyDueToBillingFailure",o.NoFeaturesEnabledDueToBillingFailure="noFeaturesEnabledDueToBillingFailure",o.NoFeaturesEnabledDueToNoCurrentPlan="noFeaturesEnabledDueToNoCurrentPlan",o))(Xs||{});var eo=(n=>(n.Information="information",n.Warning="warning",n.Error="error",n.Verbose="verbose",n))(eo||{});var Rt=class{constructor(e,t){l(this,"ingest");this.ingest=new to(e,t)}};l(Rt,"immediateTriggerSendForActivities",["addPaymentMethod","addToCart","contactMessage","lead","order","initiateCheckout","schedule","startTrial","subscriptionItemPurchase","newsletterSignup"]);var to=class{constructor(e,t){l(this,"push");l(this,"send");l(this,"sdk");l(this,"flushQueueDebounced");this.sdk=t;let i={fetch(o,a){return h(this,null,function*(){var p,v,I,b,w,E,A,S,T,D,O,j,G,N,K,te,Z,R;let c=(t==null?void 0:t.config)||e,d=y({},a!=null?a:{});(d.keepalive===void 0||d.keepalive===null)&&(d.keepalive=!0);let f=new Headers(d.headers);f.set("Accept","application/json"),f.set("X-OrgId",c.organisationId),f.set("X-Converge-Key",c.key),(p=c.runtime)!=null&&p.ver&&f.set("X-Sdk-Runtime-Version",(v=c.runtime)==null?void 0:v.ver),(I=c.runtime)!=null&&I.type&&f.set("X-Sdk-Runtime-Type",(b=c.runtime)==null?void 0:b.type),(E=(w=c.runtime)==null?void 0:w.client)!=null&&E.ver&&f.set("X-Sdk-Client-Version",(S=(A=c.runtime)==null?void 0:A.client)==null?void 0:S.ver),(D=(T=c.runtime)==null?void 0:T.client)!=null&&D.type&&f.set("X-Sdk-Client-Type",(j=(O=c.runtime)==null?void 0:O.client)==null?void 0:j.type),(K=(N=(G=c.runtime)==null?void 0:G.client)==null?void 0:N.origin)!=null&&K.h&&f.set("X-Sdk-Client-Origin-Host",(R=(Z=(te=c.runtime)==null?void 0:te.client)==null?void 0:Z.origin)==null?void 0:R.h),d.headers=f;let u=new AbortController,m=setTimeout(()=>u.abort(),2e4);d.signal=u.signal;let g=yield window.fetch(o,d);return clearTimeout(m),g})}},n=o=>{var a,c;if(typeof navigator=="undefined"||!navigator.sendBeacon)return!1;try{let d=(t==null?void 0:t.config)||e,f=JSON.stringify({meta:{orgId:d.organisationId,key:d.key,env:d.env||void 0,rt:(a=d.runtime)!=null&&a.ver?{ver:d.runtime.ver,type:d.runtime.type,client:d.runtime.client?{ver:d.runtime.client.ver,type:d.runtime.client.type,origin:(c=d.runtime.client.origin)!=null&&c.h?{h:d.runtime.client.origin.h}:void 0}:void 0}:void 0},data:o}),u=new Blob([f],{type:"text/plain"});return navigator.sendBeacon(`${d.ingestEndpoint}/api/ingest`,u)}catch(d){return!1}};this.flushQueueDebounced=Ou(o=>h(this,null,function*(){if(!(!o||o.length===0))try{this.sdk&&this.sdk.debug.verbose("Publish - processing queue",{queueItems:o});let a=o.filter(u=>!!u.activity).map(u=>u.activity),c=o.filter(u=>!!u.identity).map(u=>u.identity),d=o.filter(u=>!!u.bot).map(u=>u.bot),f=o.filter(u=>!!u.log).map(u=>u.log);yield Promise.all([this.send(a,c,[],[]),this.send([],[],d,f)]),this.sdk&&this.sdk.debug.verbose("Publish - processed queue",{activity:a,ids:c,bots:d,logs:f})}catch(a){this.sdk||console.error("Seeka - failed to publish queue",a)}}),1700,{}),this.push=(o,a,c,d)=>h(this,null,function*(){this.sdk&&this.sdk.debug.verbose("Publish - pushing to queue",{activities:o,identities:a,bots:c,logs:d}),o&&o.length>0&&this.flushQueueDebounced(o.map(f=>({activity:lr(y({},f))}))),a&&a.length>0&&this.flushQueueDebounced(a.map(f=>({identity:lr(y({},f))}))),d&&d.length>0&&this.flushQueueDebounced(d.map(f=>({log:lr(y({},f))}))),c&&c.length>0&&this.flushQueueDebounced(c.map(f=>({bot:lr(y({},f))}))),o!=null&&o.some(f=>{var u;return Rt.immediateTriggerSendForActivities.indexOf((u=f.payload)==null?void 0:u.activityName)>-1})&&(yield this.flushQueueDebounced.flush())}),this.send=(o,a,c,d)=>h(this,null,function*(){let f=(t==null?void 0:t.config)||e,u={data:[],meta:f.env?{env:f.env}:void 0};o&&o.length>0&&o.forEach(g=>{u.data.push({ev:g})}),a&&a.length>0&&a.forEach(g=>{u.data.push({id:g})}),c&&c.length>0&&c.forEach(g=>{u.data.push({bot:g})}),d&&d.length>0&&d.forEach(g=>{if(g.properties){let p=typeof g.properties=="string"?g.properties:JSON.stringify(g.properties);p.length>4e3&&(this.sdk&&this.sdk.debug.warn("Publish - log properties too large so not including props in batch",{messageTemplate:g.messageTemplate,jsonPropsLength:p.length}),g.properties={error:"properties removed due to size"})}u.data.push({log:g})});let m=g=>h(this,null,function*(){var I;let p=(t==null?void 0:t.config)||e;if(!(yield i.fetch(`${p.ingestEndpoint}/api/ingest`,{method:"POST",body:JSON.stringify(g),credentials:"omit",mode:"cors",headers:{"Content-Type":"application/json"}})).ok)throw new Error("Failed to publish batch");this.sdk&&((I=g.data)==null||I.forEach(b=>{var w,E,A,S;this.sdk&&this.sdk.debug.verbose(`Publish - send - ${(b.ev?((E=(w=b.ev)==null?void 0:w.payload)==null?void 0:E.activityName)+" "+((S=(A=b.ev)==null?void 0:A.payload)==null?void 0:S.activityId):null)||(b.id?"identity":null)||(b.bot?"bot metric":null)||(b.log?"log":null)||"unknown"}`,{item:b})}))});u&&u.data.length>0&&(n(u.data)?this.sdk&&u.data.forEach(g=>{var p,v,I,b;this.sdk&&this.sdk.debug.verbose(`Publish - beacon - ${(g.ev?((v=(p=g.ev)==null?void 0:p.payload)==null?void 0:v.activityName)+" "+((b=(I=g.ev)==null?void 0:I.payload)==null?void 0:b.activityId):null)||(g.id?"identity":null)||(g.bot?"bot metric":null)||(g.log?"log":null)||"unknown"}`,{item:g})}):yield m(u))})}};var Di=class{constructor(e){l(this,"p");l(this,"personId");l(this,"device",{});this.p=e}getTrait(e){throw new Error("Unavailable.")}addTrait(e,t,i){return h(this,null,function*(){this.p("addTrait",[e,t,i])})}setTrait(e,t,i){return h(this,null,function*(){this.p("setTrait",[e,t,i])})}getProfile(){throw new Error("Unavailable.")}setProfile(e){return h(this,null,function*(){this.p("setProfile",[e])})}touchAndGetSessionId(){throw new Error("Unavailable.")}mergeProfile(e){return h(this,null,function*(){this.p("mergeProfile",[e])})}mergeTwoProfiles(e,t){throw new Error("Unavailable.")}reset(e){return h(this,null,function*(){this.p("reset",[e])})}syncIdentity(e){throw new Error("Unavailable.")}isAnonymous(e){throw new Error("Unavailable.")}flushIdentitySyncQueue(){return h(this,null,function*(){this.p("flushIdentitySyncQueue",[])})}sanitiseProfile(e){throw new Error("Unavailable.")}generateNewSessionId(e){throw new Error("Unavailable.")}};var Oi=class{constructor(e){l(this,"p");this.p=e}custom(e,t,i){this.p("custom",[e,t,i])}viewPage(e,t){this.p("viewPage",[e,t])}addPaymentMethod(e,t,i){this.p("addPaymentMethod",[e,t,i])}keywordSearch(e,t,i){this.p("keywordSearch",[e,t,i])}userLogin(e,t,i){this.p("userLogin",[e,t,i])}userLoginSignup(e,t,i){this.p("userLoginSignup",[e,t,i])}newsletterSignup(e,t,i){this.p("newsletterSignup",[e,t,i])}applyPromotionalCode(e,t,i){this.p("applyPromotionalCode",[e,t,i])}lead(e,t,i){this.p("lead",[e,t,i])}startTrial(e,t,i){this.p("startTrial",[e,t,i])}contactMessage(e,t,i){this.p("contactMessage",[e,t,i])}schedule(e,t,i){this.p("schedule",[e,t,i])}viewContentItem(e,t,i){this.p("viewContentItem",[e,t,i])}order(e,t,i){this.p("order",[e,t,i])}subscriptionItemPurchase(e,t,i){this.p("subscriptionItemPurchase",[e,t,i])}initiateCheckout(e,t,i){this.p("initiateCheckout",[e,t,i])}viewProduct(e,t,i){this.p("viewProduct",[e,t,i])}addToCart(e,t,i){this.p("addToCart",[e,t,i])}addToWishlist(e,t,i){this.p("addToWishlist",[e,t,i])}removeFromCart(e,t,i){this.p("removeFromCart",[e,t,i])}changeProductAttribute(e,t,i){this.p("changeProductAttribute",[e,t,i])}filterItemsByAttribute(e,t,i){this.p("filterItemsByAttribute",[e,t,i])}activity(e,t,i){this.p("activity",[e,t,i])}};function In(){return typeof crypto!="undefined"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{let e=Math.random()*16|0;return(r==="x"?e:e&3|8).toString(16)})}var Nu=r=>{window.SeekaBindedGlobalErrorListener||(window.addEventListener("unhandledrejection",e=>{var t,i,n,s,o,a,c;r("Unhandled promise rejection",{error:JSON.stringify({stack:((t=e.reason)==null?void 0:t.stack)||((i=e.reason)==null?void 0:i.stacktrace),detail:(n=e.reason)==null?void 0:n.toString(),file:(s=e.reason)==null?void 0:s.filename,loc:((o=e.reason)==null?void 0:o.lineno)+":"+((a=e.reason)==null?void 0:a.colno),message:(c=e.reason)==null?void 0:c.message})})}),window.addEventListener("error",e=>(r("Unhandled error - "+(e==null?void 0:e.message),{error:JSON.stringify({stack:e.error.stack||e.error.stacktrace,detail:e.error.toString(),file:e.filename,loc:e.lineno+":"+e.colno,message:e==null?void 0:e.message})}),!1)),window.SeekaBindedGlobalErrorListener=!0)},ne=typeof window=="undefined";var Ru=(r,e)=>tt()?r==="error":xn(r)>=xn(e),xn=r=>tt()?4:r=="verbose"?1:r=="information"?2:r=="warning"?3:r=="error"?4:0;function tt(){return typeof process!="undefined"&&typeof process.env!="undefined"&&process.env.JEST_WORKER_ID!==void 0||typeof jest!="undefined"}var ee=class ee{constructor(e){l(this,"sdk");l(this,"isDebugEnabled");l(this,"isDebugToStringLogEnabled");l(this,"minimumLevel");l(this,"unitTestEnv");l(this,"isDebugEnabledStateName","debug.isEnabled");l(this,"isDebugToStringEnabledStateName","debug.isEnabled.toString");l(this,"minimumLevelStateName","debug.minimumLevel");l(this,"minimumLevelToPublishToSeekaBackend","warning");l(this,"isSidekickDiagnoseMode");l(this,"isSidekickBuilderMode");var a,c,d,f,u,m,g,p,v,I;this.sdk=e,this.unitTestEnv=tt();let t=this.sdk.state.get(this.isDebugEnabledStateName),i=!1,n=null;if(!ne){let b=e.dataLayer.window.sessionStorage(),w=e.dataLayer.window.location();if(this.isSidekickDiagnoseMode=b.getItem("seeka_diagid")!=null&&b.getItem("seeka_diagid")!=null||w.href.indexOf("_s_sidekick_mode=diagnose")>-1||b.getItem(w.host+"/sk/_s_sidekick_mode")==="diagnose"||!!((a=this.sdk.config)!=null&&a.testMode),this.isSidekickBuilderMode=((c=w==null?void 0:w.search)==null?void 0:c.indexOf("_s_sidekick_mode=build"))>-1,e.util&&e.util.url)try{n=e.util.url.getParamFromQueryString("debugLevel",w.href),i=!!n}catch(E){console.error("[Seeka] - failed to get debug level from url",E)}}t!=null?this.isDebugEnabled=this.isSidekickDiagnoseMode||t:this.isDebugEnabled=this.isSidekickDiagnoseMode||((f=(d=e.config)==null?void 0:d.debug)==null?void 0:f.isEnabled)===!0||!1,i&&(this.isDebugEnabled=!0);let s=this.sdk.state.get(this.isDebugToStringEnabledStateName);if(s!=null?this.isDebugToStringLogEnabled=s:this.isDebugToStringLogEnabled=((m=(u=e.config)==null?void 0:u.debug)==null?void 0:m.isToStringLogEnabled)===!0||!1,!ne){let b=e.dataLayer.window.sessionStorage();if(b.getItem("seeka_diaglevel")!=null&&b.getItem("seeka_diaglevel")!=null){let w=b.getItem("seeka_diaglevel");this.minimumLevel=w,this.minimumLevelToPublishToSeekaBackend=w}}(p=(g=e.config)==null?void 0:g.debug)!=null&&p.isDiagnosisEnabled&&(this.minimumLevelToPublishToSeekaBackend="information");let o=this.sdk.state.get(this.minimumLevelStateName);if(o!=null?this.minimumLevel=o:this.minimumLevel=((I=(v=e.config)==null?void 0:v.debug)==null?void 0:I.minimumLevel)||ee.DefaultMinimumLevel,n)try{this.minimumLevel=n}catch(b){console.error("[Seeka] - failed to set debug level from url",b)}}setEnabled(e,t){this.isDebugEnabled=!!e,this.sdk.state.set(this.isDebugEnabledStateName,this.isDebugEnabled),t!=null&&(this.sdk.state.set(this.isDebugToStringEnabledStateName,t||!1),this.isDebugToStringLogEnabled=t||!1)}toggleDevMode(e){var t,i;if(this.isDebugEnabled&&e!==!0||e===!1){this.setEnabled(!1);try{let n=(t=this.sdk)==null?void 0:t.dataLayer.window.sessionStorage();n&&n.setItem("seeka_testmode_toggle","0")}catch(n){console.error("[Seeka] - failed to set test mode toggle",n)}return this.setMinimumLevel("information"),!1}else{this.setEnabled(!0);try{let n=(i=this.sdk)==null?void 0:i.dataLayer.window.sessionStorage();n&&n.setItem("seeka_testmode_toggle","")}catch(n){console.error("[Seeka] - failed to set test mode toggle",n)}return this.setMinimumLevel("verbose"),!0}}static getDatabase(){return h(this,null,function*(){return tt()?null:new Promise((e,t)=>{let i;try{i=indexedDB.open(ee.seekaDatabaseName,ee.seekaDatabaseVersion)}catch(n){this.indexDbErrorOpenLogged||this.ignoreDbOpenError||console.error("[Seeka] - failed to open indexDb database",n),this.indexDbErrorOpenLogged=!0,e(null);return}i.onsuccess=n=>{let s=i.result;s.objectStoreNames.contains(ee.logStoreName)&&e(s)},i.onupgradeneeded=n=>{let s=i.result;s.objectStoreNames.contains(ee.logStoreName)&&s.deleteObjectStore(ee.logStoreName);let o=s.createObjectStore(ee.logStoreName,{autoIncrement:!0});o.createIndex("level","level",{unique:!1}),o.createIndex("created","created",{unique:!1}),o.transaction.oncomplete=a=>{e(s)},o.transaction.onerror=a=>{t(a)}},i.onerror=n=>{t(n)}})})}static getPersistedLogs(e){return h(this,null,function*(){if(tt())return[];let t=yield ee.getDatabase();return t==null?[]:new Promise((i,n)=>{let s=t.transaction([ee.logStoreName]).objectStore(ee.logStoreName).getAll();s.onsuccess=o=>{e!=null?i((s.result||[]).slice(0,e)):i(s.result||[])},s.onerror=o=>{n(o)}})})}static clearPersistedLogs(){return h(this,null,function*(){if(tt())return;let e=yield ee.getDatabase();if(e!=null)return new Promise((t,i)=>{let n=e.transaction([ee.logStoreName],"readwrite").objectStore(ee.logStoreName).clear();n.onsuccess=s=>{t()},n.onerror=s=>{i(s)}})})}getPersistedLogs(){return h(this,null,function*(){return yield ee.getPersistedLogs()})}clearPersistedLogs(){return h(this,null,function*(){yield ee.clearPersistedLogs()})}setMinimumLevel(e){this.minimumLevel=e?e.toLowerCase():ee.DefaultMinimumLevel,this.sdk.state.set(this.minimumLevelStateName,this.minimumLevel)}setEnv(e){localStorage.setItem("sk_env",e),window.location.reload()}resetEnv(){localStorage.removeItem("sk_env"),window.location.reload()}setSdkVersion(e){localStorage.setItem("sk_sdk_version",e),window.location.reload()}resetSdkVersion(){localStorage.removeItem("sk_sdk_version"),window.location.reload()}shouldLogLevel(e){return Ru(e,this.minimumLevel)}getLogLevelVerbosity(e){return xn(e)}isEnabled(){var t,i;let e=this.sdk.state.get(this.isDebugEnabledStateName);return e!=null?!((t=this.sdk)!=null&&t.config.isDisabled)&&e:!((i=this.sdk)!=null&&i.config.isDisabled)&&(this.isSidekickDiagnoseMode||this.isDebugEnabled)||!1}isOperationAllowed(e,t,i){try{return this.sdk.config.testMode==="diag"?(this.log(`TestMode - ${e} for ${t} blocked by test mode ${this.sdk.config.testMode}`,H(y({},i),{logMetadata:H(y({},i==null?void 0:i.logMetadata),{stream:!0})})),!1):!0}catch(n){return console.error("[Seeka] - failed to check if operation is allowed",n),!0}}isToStringConsoleEnabled(){let e=this.sdk.state.get(this.isDebugToStringEnabledStateName);return e!=null?e:this.isDebugToStringLogEnabled||!1}prepareLogProps(e){if(e instanceof Error)return this.sdk.util.parse.parseError(e);for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&e[t]instanceof Error&&(e[t]=this.sdk.util.parse.parseError(e[t]));return e}write(e,t,i){var s,o;let n=this.unitTestEnv||i&&i.preventLogApiPublish===!0||this.isSidekickBuilderMode;try{i&&(i=this.prepareLogProps(i));let a=!this.unitTestEnv&&i&&i.logMetadata&&i.logMetadata.stream===!0,c=this.isEnabled(),d=this.shouldLogLevel(e);if(c||a||d){if(i!=null&&a)try{ee.getDatabase().then(f=>{if(f==null)return;let u=f.transaction([ee.logStoreName],"readwrite").objectStore(ee.logStoreName),m=new Date().getTime(),g={logId:`${m}-${Math.floor(Math.random()*1e6)}`,created:m,level:e,message:t,props:i,scope:{key:this.sdk.config.scopeKey,description:this.sdk.config.scopeDescription}};u.add(g)})}catch(f){console.error("[Seeka] - failed to write log to local database",f)}if(c&&d){let u=["[Seeka] "+new Date().toISOString()+" -",t+(i?" -":"")];switch(this.isToStringConsoleEnabled()?u.push(i?JSON.stringify(i):""):i&&u.push(i),u.push({scope:{key:this.sdk.config.scopeKey,description:this.sdk.config.scopeDescription}}),e){case"error":console.error.apply(void 0,u);break;case"warning":console.warn.apply(void 0,u);break;case"information":console.info.apply(void 0,u);break;default:console.log.apply(void 0,u)}}(!n&&this.isSidekickDiagnoseMode||c&&!((o=(s=this.sdk.config)==null?void 0:s.debug)!=null&&o.isLogPublishingDisabled)&&!n)&&this.getLogLevelVerbosity(e)>=this.getLogLevelVerbosity(this.minimumLevelToPublishToSeekaBackend)&&this.send(e,t,{logProps:i}).catch(f=>{console.error("[Seeka] - Failed to publish log",f)})}}catch(a){console.error("[Seeka] - failed to write log",a)}}send(e,t,i,n){return h(this,null,function*(){yield this.sdk.convergeApi.ingest.push([],[],[],[{logLevel:e,logType:"sdkLog",messageTemplate:t,identifiers:yield this.sdk.identity.getProfile(),id:In(),source:this.createTrackingSource("sdk/js/log"),properties:{messageTemplateProps:n,props:JSON.stringify(i)},utm:this.sdk.attribution.getCurrentTouchCampaign()}])})}createTrackingSource(e){var i,n,s,o;let t={method:e,loc:((s=(n=(i=this.sdk.dataLayer.window.location())==null?void 0:i.href)==null?void 0:n.split("_s_sidekick")[0])==null?void 0:s.split("#")[0])||"",vt:this.sdk.dataLayer.document.title(),sess:this.sdk.identity.touchAndGetSessionId(),diag:((o=this.sdk.dataLayer.window.sessionStorage())==null?void 0:o.getItem("seeka_diagid"))||void 0,origin:"browser",device:this.sdk.identity.device};return this.verbose("Tracking source created",{src:t}),t}log(e,t){this.write("information",e,t)}verbose(e,t){this.write("verbose",e,t)}error(e,t){this.write("error",e,t)}warn(e,t){this.write("warning",e,t)}};l(ee,"DefaultMinimumLevel","warning"),l(ee,"seekaDatabaseName","seeka"),l(ee,"logStoreName","logs"),l(ee,"seekaDatabaseVersion",3),l(ee,"indexDbErrorOpenLogged",!1),l(ee,"ignoreDbOpenError",!1);var zt=ee;var Cn=r=>r==null||r===""||String(r).trim()===""?"":String(r),_u=r=>{let e=Object.keys(Li),t=r.toLowerCase(),i=e.find(n=>n.toLowerCase()===t);return i?Li[i]:"custom"},Uu=(r,e,t=!1)=>{if(e instanceof HTMLLabelElement&&e.htmlFor)try{let i=r.querySelector(`#${CSS.escape(e.htmlFor)}`);if(i)return i}catch(i){}return ix(e,t)},ix=(r,e)=>{var s,o,a,c,d,f,u,m,g,p,v;if(((s=r.nextElementSibling)==null?void 0:s.tagName)==="INPUT")return r.nextElementSibling;if(((o=r.previousElementSibling)==null?void 0:o.tagName)==="INPUT")return r.previousElementSibling;if(e&&((a=r.nextElementSibling)==null?void 0:a.tagName)==="SELECT")return r.nextElementSibling;if(e&&((c=r.previousElementSibling)==null?void 0:c.tagName)==="SELECT")return r.previousElementSibling;let t=(d=r.nextElementSibling)==null?void 0:d.querySelectorAll("input");if(t&&t.length>0)return t[0];if(e){let I=(f=r.nextElementSibling)==null?void 0:f.querySelectorAll("select");if(I&&I.length>0)return I[0]}let i=(u=r.parentElement)==null?void 0:u.querySelectorAll("input");if(i&&i.length>0)return i[0];if(e){let I=(m=r.parentElement)==null?void 0:m.querySelectorAll("select");if(I&&I.length>0)return I[0]}let n=(p=(g=r.parentElement)==null?void 0:g.parentElement)==null?void 0:p.querySelectorAll("input");if(n&&n.length>0)return n[0];if(e){let I=(v=r.parentElement)==null?void 0:v.querySelectorAll("select");if(I&&I.length>0)return I[0]}return r.closest("input")||(e?r.closest("select"):void 0)||void 0};var Bu=[{iso2:"US",code:"1",localLengths:[10]},{iso2:"CA",code:"1",localLengths:[10]},{iso2:"CN",code:"86",localLengths:[11]},{iso2:"IN",code:"91",localLengths:[10]},{iso2:"ID",code:"62",localLengths:[10,11,12]},{iso2:"PK",code:"92",localLengths:[10]},{iso2:"BR",code:"55",localLengths:[10]},{iso2:"NG",code:"234",localLengths:[10]},{iso2:"BD",code:"880",localLengths:[10]},{iso2:"RU",code:"7",localLengths:[10]},{iso2:"MX",code:"52",localLengths:[10]},{iso2:"JP",code:"81",localLengths:[9,10]},{iso2:"ET",code:"251",localLengths:[9]},{iso2:"PH",code:"63",localLengths:[10]},{iso2:"EG",code:"20",localLengths:[10]},{iso2:"VN",code:"84",localLengths:[9]},{iso2:"CD",code:"243",localLengths:[9]},{iso2:"TR",code:"90",localLengths:[10]},{iso2:"IR",code:"98",localLengths:[10]},{iso2:"DE",code:"49",localLengths:[10,11]},{iso2:"TH",code:"66",localLengths:[9]},{iso2:"FR",code:"33",localLengths:[9]},{iso2:"GB",code:"44",localLengths:[10]},{iso2:"IT",code:"39",localLengths:[9]},{iso2:"TZ",code:"255",localLengths:[9]},{iso2:"MM",code:"95",localLengths:[9]},{iso2:"KR",code:"82",localLengths:[9,10]},{iso2:"ES",code:"34",localLengths:[9]},{iso2:"UA",code:"380",localLengths:[9]},{iso2:"AU",code:"61",localLengths:[9]}],rx=Bu.slice().sort((r,e)=>e.code.length-r.code.length);function An(r,e){let t=r.trim();if(t.startsWith("+")){let n=t.slice(1).replace(/\D/g,"");return n.length>=6&&n.length<=15?`+${n}`:r}if(t.startsWith("00")){let n=t.slice(2).replace(/\D/g,"");return n.length>=6&&n.length<=15?`+${n}`:r}let i=t.replace(/\D/g,"");for(let{code:n,localLengths:s}of rx)if(i.startsWith(n)){let o=i.slice(n.length);if(s.includes(o.length))return`+${n}${o}`}if(e){let n=e.trim().toUpperCase(),s=Bu.find(o=>o.iso2===n);if(s&&(i.startsWith("0")&&(i=i.slice(1)),s.localLengths.includes(i.length)))return`+${s.code}${i}`}return r}var Pn=r=>{let e=(r.getUTCMonth()+1).toString();e.length<2&&(e="0"+e);let t=r.getUTCDate().toString();t.length<2&&(t="0"+t);let i=r.getUTCHours().toString();i.length<2&&(i="0"+i);let n=r.getUTCMinutes().toString();n.length<2&&(n="0"+n);let s=r.getUTCSeconds().toString();return s.length<2&&(s="0"+s),`${r.getUTCFullYear()}${e}${t}.${i}${n}${s}`},Fu=r=>r?r.replace(/[-._~`]/g,"").trim():null,io=()=>new Date().getTime()+"."+Ni(),Ni=()=>Math.floor(Math.random()*8999999999+1e9).toString(),Sn=r=>new Date(Date.UTC(parseInt(r.substring(0,4)),parseInt(r.substring(4,6))-1,parseInt(r.substring(6,8)),parseInt(r.substring(9,11)),parseInt(r.substring(11,13)),parseInt(r.substring(13,15)))),wn=r=>"sk.1."+(r||new Date).getTime()+"."+Ni(),Tn=r=>r?r.replace(/[^\d.]*/g,""):"",En=r=>(!r||r.length==0,r.sort((e,t)=>{let i=BigInt(e.split(".")[2]),n=BigInt(t.split(".")[2]);return i>n?1:i<n?-1:0})[0]);var ro=class{getRandomNumberString(){return Ni()}isEmpty(e){return e==null||e===""}getNewBrowserIdentifier(e){return wn(e)}getEarliestAssignedBrowserIdentifier(e){return En(e)}dateToYYYYMMDD(e){return e.toISOString().slice(0,10).replace(/-/g,"")}dateToUtcDateTimeReferenceString(e){return Pn(e)}dateFromUtcDateTimeReferenceString(e){return Sn(e)}base64Encode(e){return e==null?null:btoa(e)}alphaNumericOnly(e){return Fu(e)}isFirstCharacterAlpha(e){let t=e;return t.length===0?!1:(t.length>1&&(t=t[1]),t.match(/[a-z]/i)&&!0||!1)}trimLeadingAndTrailingChars(e,t){return t==="]"&&(t="\\]"),t==="^"&&(t="\\^"),t==="\\"&&(t="\\\\"),e.replace(new RegExp("^["+t+"]+|["+t+"]+$","g"),"")}sentenceCaseToSnakeCase(e){return this.trimLeadingAndTrailingChars(e.trim().replace(/\.?([A-Z]+)/g,"_$1").toLowerCase().replace(/^_/,"").replace(/__/g,"_").trim(),"_")}separatePersonFullName(e){if(!e)return{firstName:null,lastName:null};let t=e.trim().split(" ");return t.length===1?{firstName:e,lastName:null}:t.length===2?{firstName:t[0],lastName:t[1]}:{firstName:t[0],lastName:t.slice(1).join(" ")}}},Mn=ro;var Hu=new Mn,no=class{constructor(){l(this,"inputSelectorIgnoreTypes",["button","checkbox","password","radio","color","file","image","submit","day","month","week","hidden"])}parseStr(e){return Cn(e)}parseFloat(e){if(e==null||e==="")return 0;let t=e.toString().replace(/[^0-9.]/g,"");return Number.isNaN(Number(t))?0:Number(t)}parseMoney(e){if(e==null||e===0||e==="")return+"0.00";let t=this.parseFloat(e);return Number(t.toFixed(3))}parseInt(e){return e==null||e===""||Number.isNaN(Number(e.toString()))?0:Math.floor(Number(e))}cloneDeep(e){return JSON.parse(JSON.stringify(e))}parseError(e){let t={};return Object.getOwnPropertyNames(e).forEach(function(i){t[i]=e[i]}),t}isNumber(e){return/^-?\d+$/.test(e)}lastOrDefault(e){if(!(e==null||e.length===0))return yn(e)}last(e){return yn(e)}getNestedProperty(e,t){return ft(e,t)}setNestedProperty(e,t,i){return Bs(e,t,i)}mergeDeep(e,t){function i(n,s){if(q(n))return kn(n,s)}return q(e)&&q(t)?kn(e,t):Rs(e,t,i)}isDeepEqual(e,t){return vn(e,t)}isDeepEqualIgnoringTraits(e,t){return vn(e,t,(n,s,o)=>{if(o==="traits")return!0})}parseFormToPersonDetails(e){let t=this.parseFormToPersonDetailsForLabels(e),i=this.parseFormToPersonDetailsForNameOrIdOrPlaceholderAttributes(e);if(t==null&&i==null)return null;let n=this.getLongestString([t==null?void 0:t.phone,i==null?void 0:i.phone]),s=this.getLongestString([t==null?void 0:t.countryCode,i==null?void 0:i.countryCode]),o=n?this.normalizePhoneToE164(n,s)||this.phoneNumberToE164(n):void 0;return{firstName:this.getLongestString([t==null?void 0:t.firstName,i==null?void 0:i.firstName]),fullName:this.getLongestString([t==null?void 0:t.fullName,i==null?void 0:i.fullName]),lastName:this.getLongestString([t==null?void 0:t.lastName,i==null?void 0:i.lastName]),email:this.getLongestString([t==null?void 0:t.email,i==null?void 0:i.email]),phone:o,countryCode:s,country:this.getLongestString([t==null?void 0:t.country,i==null?void 0:i.country]),state:this.getLongestString([t==null?void 0:t.state,i==null?void 0:i.state]),stateCode:this.getLongestString([t==null?void 0:t.stateCode,i==null?void 0:i.stateCode]),locality:this.getLongestString([t==null?void 0:t.locality,i==null?void 0:i.locality]),postcode:this.getLongestString([t==null?void 0:t.postcode,i==null?void 0:i.postcode])}}getLongestString(e){if(!e||e.length===0)return;let t=e.filter(n=>!!n),i=t[0];for(let n=0;n<t.length;n++){let s=t[n];s.length>i.length&&(i=s)}return i}parseFormToPersonDetailsForNameOrIdOrPlaceholderAttributes(e){let t=Array.from(e.querySelectorAll("input, select"));if(t.length===0)return null;let i={};return t.forEach(n=>{var f,u;let s=((f=n.getAttribute("type"))==null?void 0:f.toLowerCase())||"";if(this.inputSelectorIgnoreTypes.includes(s))return;let c=([n.getAttribute("aria-label"),n.getAttribute("title"),n instanceof HTMLInputElement?n.placeholder:null,n.name,n.id].find(m=>m&&m.trim().length>0)||"").toString().toLowerCase().replace(/\*/g,"").replace(/[\.\:]/g,"").split("(")[0].trim(),d=(u=n.value)==null?void 0:u.trim();if(d){if(c.includes("email")||c.includes("e-mail")||s==="email"){let m=this.emailAddress(d);(!i.email||m&&m.length>i.email.length)&&(i.email=m);return}if(c.includes("phone")||c.includes("mobile")||n.inputMode==="tel"||s==="tel"){let m=this.phoneNumberToE164(d);(!i.phone||m&&m.length>i.phone.length)&&(i.phone=m);return}if(/^(first\s?name|givenname|given)$/.test(c)){let m=d;(!i.firstName||m&&m.length>i.firstName.length)&&(i.firstName=m);return}if(/^(last\s?name|surname|family)$/.test(c)){let m=d;(!i.lastName||m&&m.length>i.lastName.length)&&(i.lastName=m);return}if(!i.fullName&&/^(name|full\s?name|your name)$/.test(c)){i.fullName=d;let m=Hu.separatePersonFullName(d);i.firstName||(i.firstName=m.firstName||void 0),i.lastName||(i.lastName=m.lastName||void 0);return}if(c.includes("country")){let m=d;(!i.countryCode||m&&m.length>i.countryCode.length)&&(i.countryCode=m);return}if(!i.state&&/(state|province|region)/.test(c)){i.state=d;return}if(!i.locality&&/(city|locality|town)/.test(c)){i.locality=d;return}if(!i.postcode&&/(zip|postal|post\s?code)/.test(c)){i.postcode=d;return}}}),Object.keys(i).length?i:null}parseFormToPersonDetailsForLabels(e){let t=Array.from(e.querySelectorAll("label, div.MGLLabel"));if(t.length===0)return null;let i={};return t.forEach(n=>{var c;let s=(n.textContent||"").toLowerCase().replace(/\*/g,"").replace(/[\.\:]/g,"").split("(")[0].trim(),o=Uu(e,n);if(!o)return;let a=(c=o.value)==null?void 0:c.trim();if(a){if(/^(first\s?name|givenname|given)$/.test(s)){let d=a;(!i.firstName||d&&d.length>i.firstName.length)&&(i.firstName=d);return}if(/^(last\s?name|surname|family)$/.test(s)){let d=a;(!i.lastName||d&&d.length>i.lastName.length)&&(i.lastName=d);return}if(!i.fullName&&/^(name|full\s?name|your name)$/.test(s)){i.fullName=a;let d=Hu.separatePersonFullName(a);i.firstName||(i.firstName=d.firstName||void 0),i.lastName||(i.lastName=d.lastName||void 0);return}if(s.includes("email")||s.includes("e-mail")){let d=this.emailAddress(a);(!i.email||d&&d.length>i.email.length)&&(i.email=d);return}if(s.includes("phone")&&!s.includes("country")){let d=this.phoneNumberToE164(a);(!i.phone||d&&d.length>i.phone.length)&&(i.phone=d);return}if(s.includes("country")){let d=a;(!i.countryCode||d&&d.length>i.countryCode.length)&&(i.countryCode=d);return}if(!i.state&&/(state|province|region)/.test(s)){i.state=a;return}if(!i.locality&&/(city|locality|town)/.test(s)){i.locality=a;return}if(!i.postcode&&/(zip|postal|post\s?code)/.test(s)){i.postcode=a;return}}}),Object.keys(i).length?i:null}emailAddress(e){return e?e.trim().toLowerCase():""}phoneNumberToE164(e){return e==null?"":(e=e.trim().replace(/-/gi,"").replace(/\(/gi,"").replace(/\)/gi,"").replace(/ /g,"").replace(/\+/g,""),e)}normalizePhoneToE164(e,t){if(e==null)return;let i=e.trim();if(!i)return;let n=An(i,t);return n&&n.startsWith("+")?n:void 0}getContentIdFromProduct(e,t,i){var a,c,d,f,u,m,g,p,v,I,b,w,E;if(!e)return;let n=(a=t.processing)==null?void 0:a.contentIdentificationBehavior,s=null;i=="googleAnalytics"&&(((u=(f=(d=(c=t.analytics)==null?void 0:c.libraries)==null?void 0:d.googleAnalytics)==null?void 0:f.merchant)==null?void 0:u.productItemIdBehavior)!=null&&(n=(v=(p=(g=(m=t.analytics)==null?void 0:m.libraries)==null?void 0:g.googleAnalytics)==null?void 0:p.merchant)==null?void 0:v.productItemIdBehavior),s=this.parseStr((E=(w=(b=(I=t.analytics)==null?void 0:I.libraries)==null?void 0:b.googleAnalytics)==null?void 0:w.merchant)==null?void 0:E.productItemIdPrefix));let o;switch(n){case"sku":o=e==null?void 0:e.sku;break;case"productId":o=e==null?void 0:e.productIdentifier;break;case"variantId":o=e==null?void 0:e.variantIdentifier;break;case"productIdAndVariantIdUnderscore":this.parseStr(e.variantIdentifier)&&this.parseStr(e.productIdentifier)?o=`${e.productIdentifier}_${e.variantIdentifier}`:this.parseStr(e.variantIdentifier)?o=e.variantIdentifier:o=e.productIdentifier;break;case"variantIdOrProductId":this.parseStr(e.variantIdentifier)?o=e.variantIdentifier:o=e.productIdentifier;break;default:o=this.parseStr(e==null?void 0:e.sku)||this.parseStr(e==null?void 0:e.variantIdentifier)||this.parseStr(e==null?void 0:e.productIdentifier);break}return s?`${s}${o}`:o}getContentNameFromProduct(e,t){return this.parseStr(e==null?void 0:e.variantName)||this.parseStr(e==null?void 0:e.productName)}},Ri=no;var Se=(r,e)=>{var s;if(r==null)return null;e.indexOf("http")===-1&&e.indexOf("?")===-1&&(e="?"+e),r=r.replace(/[[\]]/g,"\\$&");let t=new RegExp("[?&]"+r+"(=([^&#]*)|&|#|$)"),i=t.exec(e);if(!i||!i[2])return null;let n=decodeURIComponent(i[2].replace(/\+/g," "));return((s=Cn(n))==null?void 0:s.trim())||null},mr=r=>{if(!r)throw new Error("href is required");let e=new URL(r);return{hash:e.hash,host:e.host,hostname:e.hostname,href:r,origin:e.origin,pathname:e.pathname,port:e.port,protocol:e.protocol,search:e.search}},Ln=r=>{if(!r)return null;let e=new URL(r),t=e.searchParams;return Array.from(t.keys()).forEach(n=>{(n.indexOf("email")>-1||n.indexOf("firstname")>-1||n.indexOf("first_name")>-1||n.indexOf("lastname")>-1||n.indexOf("last_name")>-1)&&t.delete(n)}),e.toString()},so=r=>{if(!r)return null;r.indexOf("?")===-1&&(r="?"+r);let e="https://test.com",t=e+r,i=Ln(t);return i&&(i===e||i===e+"/"?"":i.substring(i.indexOf("?")+1))},oo=(r,e)=>{if(!e)return!0;if(r||(r="/"),e||(e="/"),e.endsWith("*")){let t=e.replace("*","");return mt(r).startsWith(t)}else return mt(r)===mt(e)},mt=(r,e=!0)=>{var s;r.indexOf("http")===-1&&r.indexOf("/")!==0&&(r="/"+r);let n=(((s=new URL(r.indexOf("http")!==0?"https://domain.com"+r:r).pathname)==null?void 0:s.trim())||"").split("?")[0];return n.indexOf("/")!==0&&(n="/"+n),n.slice(n.length-1)==="/"&&(n=n.slice(0,n.length-1)),e&&(n.length>5&&n.slice(n.length-5)===".json"&&(n=n.slice(0,n.length-5)),n.length>3&&n.slice(n.length-3)===".js"&&(n=n.slice(0,n.length-3))),n.toLowerCase()};var nx=new Ri,ao=class{getParamFromQueryString(e,t){var o;if(e==null||!t)return null;t.indexOf("http")===-1&&t.indexOf("?")===-1&&(t="?"+t),e=e.replace(/[[\]]/g,"\\$&");let i=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)"),n=i.exec(t);if(!n||!n[2])return null;let s=decodeURIComponent(n[2].replace(/\+/g," "));return((o=nx.parseStr(s))==null?void 0:o.trim())||null}isUrlMatch(e,t){return oo(e,t)}urlToWinLocation(e){return mr(e)}sanitizeResourceUrl(e,t=!0){return mt(e,t)}removePiiFromUrl(e){return Ln(e)}removePiiFromQueryString(e){return so(e)}},Dn=ao;var co="Method not implemented.";function ue(r,e){if(!e||!r)return{};let t=Object.keys(r),i=y({},e);return t.forEach(n=>{i[n]=void 0}),i}function sx(r){return Fs(r==null?void 0:r.replace("converge-plugin-","").replace(/-/g," "))}function ox(r){let e=Os(r.replace("converge-plugin-",""));return e==="googleAnalytics4"?"googleAnalytics":e==="pinterestTag"?"pinterest":e}function ax(r){let e=r.split("-"),t=e[e.length-1];return e[e.length-2]==="G"?`G-${t}`:t}function ju(r,e){return{name:r.name,convergePlugin:r,config:r.config,isInitialised:!1,enabled:e,initialize:t=>h(null,null,function*(){if(r.init!=null){t.payload.profile=yield r.sdk.identity.getProfile(),r.sdk.debug.verbose(`Plugin.${r.name}.wrapper.initialize`,H(y({},t),{plugins:[]}));try{r.init(t)}catch(i){r.sdk.debug.error("Plugin.Wrapper.init failed",i)}}}),initializeEnd:t=>h(null,null,function*(){if(r.initComplete!=null){r.sdk.debug.verbose(`Plugin.${r.name}.wrapper.initializeEnd`);try{yield r.initComplete(t)}catch(i){r.sdk.debug.error("Plugin.Wrapper.initComplete failed",i)}}}),methods:{getPlugin(...t){return r}},ready:t=>h(null,null,function*(){if(r.onReady){r.sdk.debug.verbose(`Plugin.${r.name}.wrapper.ready`);try{yield r.onReady()}catch(i){r.sdk.debug.error("Plugin.Wrapper.onReady failed",i)}}}),page:t=>{},track:t=>{var c,d,f,u,m,g;r.sdk.debug.verbose(`Plugin.${r.name}.wrapper.track`,H(y({},t),{plugins:[]}));let i=!1,n=!1,s=t.payload.event,o=t.payload.options.metadata,a={activityName:s,activity:t.payload.properties,props:t.payload.properties,metadata:o};try{if((d=(c=r.config)==null?void 0:c.pipeline)!=null&&d.containers&&r.type!=="converge-plugin-seeka"){let p=y({},a),v=On(a,r.config.pipeline.containers,r.sdk,r.sdk.debug.createTrackingSource(`sdk/js/activity/plugin/${r.type}/track`));if(v.wasAugmented){a=H(y(y({},a),v.activity),{metadata:y(y({},a.metadata),v.activity.metadata)});let I=sx(r.type);r.sdk.debug.verbose(`${I} - Pipeline rule applied to activity`,{original:p,augmented:a,plugin:{convergePlugin:{name:r.name,type:r.type}},logMetadata:{stream:!0,original:{activityName:p.activityName,activityNameCustom:(f=p.props)==null?void 0:f.activityNameCustom},destination:{platform:ox(r.type),identifier:ax(r.name),activityName:a.activityName,activityNameCustom:(u=a.props)==null?void 0:u.activityNameCustom}}})}}}catch(p){r.sdk.debug.error("Plugin.Wrapper.track.pipeline.rules failed",p)}try{switch(a.activityName){case"viewPage":r.viewPage&&(r.viewPage(a.props,a.metadata),i=!0);break;case"addPaymentMethod":r.addPaymentMethod&&(r.addPaymentMethod(a.activity,ue({},a.props),a.metadata),i=!0);break;case"keywordSearch":r.keywordSearch&&(r.keywordSearch(a.activity,ue({},a.props),a.metadata),i=!0);break;case"userLogin":r.userLogin&&(r.userLogin(a.activity,ue({},a.props),a.metadata),i=!0);break;case"userLoginSignup":r.userLoginSignup&&(r.userLoginSignup(a.activity,ue({},a.props),a.metadata),i=!0);break;case"newsletterSignup":r.newsletterSignup&&(r.newsletterSignup(a.activity,ue({},a.props),a.metadata),i=!0);break;case"applyPromotionalCode":r.applyPromotionalCode&&(r.applyPromotionalCode(a.activity,ue({},a.props),a.metadata),i=!0);break;case"lead":r.lead&&(r.lead(a.activity,ue({},a.props),a.metadata),i=!0);break;case"startTrial":r.startTrial&&(r.startTrial(a.activity,ue({},a.props),a.metadata),i=!0);break;case"contactMessage":r.contactMessage&&(r.contactMessage(a.activity,ue({},a.props),a.metadata),i=!0);break;case"schedule":r.schedule&&(r.schedule(a.activity,ue({},a.props),a.metadata),i=!0);break;case"viewContentItem":r.viewContentItem&&(r.viewContentItem(a.activity,ue({},a.props),a.metadata),i=!0);break;case"order":r.order&&(r.order(a.activity,ue({},a.props),a.metadata),i=!0);break;case"subscriptionItemPurchase":r.subscriptionItemPurchase&&(r.subscriptionItemPurchase(a.activity,ue({},a.props),a.metadata),i=!0);break;case"initiateCheckout":r.initiateCheckout&&(r.initiateCheckout(a.activity,ue({},a.props),a.metadata),i=!0);break;case"viewProduct":r.viewProduct&&(r.viewProduct(a.activity,ue({},a.props),a.metadata),i=!0);break;case"addToCart":r.addToCart&&(r.addToCart(a.activity,ue({},a.props),a.metadata),i=!0);break;case"addToWishlist":r.addToWishlist&&(r.addToWishlist(a.activity,ue({},a.props),a.metadata),i=!0);break;case"removeFromCart":r.removeFromCart&&(r.removeFromCart(a.activity,ue({},a.props),a.metadata),i=!0);break;case"changeProductAttribute":r.changeProductAttribute&&(r.changeProductAttribute(a.activity,ue({},a.props),a.metadata),i=!0);break;case"filterItemsByAttribute":r.filterItemsByAttribute&&(r.filterItemsByAttribute(a.activity,ue({},a.props),a.metadata),i=!0);break;case"custom":default:r.custom&&(r.custom((m=a.props)==null?void 0:m.activityNameCustom,a.props,a.metadata),i=!0);break}!i&&r.activity&&(n=!0,r.activity(a.activityName,a.props,a.metadata))}catch(p){if(p.message==co&&!n)(g=r.activity)==null||g.call(r,a.activityName,a.props,a.metadata);else throw p}},identify:t=>h(null,null,function*(){var i,n;if(r.onProfileChanged){r.sdk.debug.verbose(`Plugin.${r.name}.wrapper.identify`,H(y({},t),{plugins:[]}));try{let s=(n=(i=t==null?void 0:t.payload)==null?void 0:i.traits)==null?void 0:n.profile;s&&(yield r.onProfileChanged(s))}catch(s){r.sdk.debug.error("Plugin.wrapper.onProfileChanged failed",s)}}}),loaded:()=>{let t=!0;return r.isLoaded&&(t=r.isLoaded(),r.sdk.debug.verbose(`Plugin.${r.name}.wrapper.loaded = ${t}`)),t}}}var Nn=class{constructor(e){l(this,"sdk");this.sdk=e}addEventListeners(){window.addEventListener("klaviyoForms",e=>{var t;try{let i=(t=e==null?void 0:e.detail)==null?void 0:t.type;switch(this.sdk.debug.verbose("Seeka - Klaviyo - event bubble",{evType:i}),i){case"open":case"embedOpen":case"close":case"redirectedToUrl":case"stepSubmit":setTimeout(()=>{this.sdk.hooks.onViewLayoutChange()},3e3);break}}catch(i){this.sdk.debug.error("Converge - Klaviyo - message handle error",i)}})}};var Wu="@seeka-labs/converge",Gu="1.12.1";function $u(r,e,t){return t&&e&&(e==null?void 0:e.trim())!==""?e:r.toString().toLowerCase()==="custom".toString().toLowerCase()?e!=null?e:"":r.toString()}function Rn(r,e,t){var s;let i=[];switch(r.type){case"activityTracked":{let o=$u(e.activityName,(s=e.props)==null?void 0:s.activityNameCustom,!1);if(!r.activityNames||r.activityNames.length===0||!r.activityNames.some(a=>a.toLowerCase()===o.toLowerCase()))return{isMatch:!1,resultDescriptions:["Activity name does not match filter"],filter:r};i.push("Activity name matches filter");break}default:return{isMatch:!1,resultDescriptions:["Filter type '"+r.type+"' is not supported"],filter:r}}let n=!1;if(r.sourceFilter&&r.sourceFilter.filters&&r.sourceFilter.filters.length>0){let o=[];r.sourceFilter.filters.forEach(c=>{let d=!1;switch(c.type){case"domain":{if(c.key&&t.loc){let f=gt(t.loc,!1),u=gt(t.loc,!0),m=c.key.toLowerCase();f&&(f===m||u===m)?(i.push(`Source domain matches ${c.key}`),d=!0):i.push(`Source domain does not match ${c.key}`)}break}case"wildcard":{i.push("Matches all sources due to wildcard"),d=!0;break}default:}o.push(d)});let a=r.sourceFilter.comparer==="undefined"?"and":r.sourceFilter.comparer;if(a==="and")n=o.every(c=>c);else if(a==="or")n=o.some(c=>c);else throw new Error(`Not supported: ${a}`)}return{isMatch:n,resultDescriptions:i,filter:r}}function gt(r,e){var t;try{if(!r)return null;let i=r+"";i.startsWith("http")||(i="https://"+i);let s=(t=new URL(i).hostname)==null?void 0:t.toLowerCase();return e&&s.startsWith("www.")?s.substring(4):s}catch(i){return null}}function _n(r,e,t,i,n){if(!r||r.length===0)return i;let s=[];if(r.forEach(o=>{let a=!1;if(o.type)switch(o.type){case"domain":{if(t){let c=gt(t,!1);o.textMatch?(it(o.textMatch,c,n)||it(o.textMatch,gt(t,!0),n))&&(a=!0):o.key&&c&&c.toLowerCase()===o.key.toLowerCase()&&(a=!0)}break}case"pagePath":{let c=new URL(t),d=mt(c.pathname);o.textMatch?o.textMatch.operator==="equals"?a=it(H(y({},o.textMatch),{matchValue:mt(o.textMatch.matchValue||"")}),d,n):a=it(o.textMatch,d,n):n==null||n.debug.error("TextMatchInfo is missing for PagePath source filter",{sourceFilter:o});break}case"url":{o.textMatch?a=it(o.textMatch,t,n):n==null||n.debug.error("TextMatchInfo is missing for Url source filter",{sourceFilter:o});break}case"wildcard":{a=!0;break}default:throw new Error(`Not supported: ${o.type}`)}s.push(a)}),e==="and"||!e)return s.every(o=>o);if(e==="or")return s.some(o=>o);throw new Error(`Not supported: ${e}`)}function it(r,e,t){if(!r)return!1;if(r.operator==="any")return!0;let i=(e||"").toLowerCase().trim(),n=(r.matchValue||"").toLowerCase().trim();switch(r.operator){case"equals":return i===n;case"notEquals":return i!==n;case"contains":return i?i.includes(n):!1;case"notContains":return i?!i.includes(n):!1;case"startsWith":return i?i.startsWith(n):!1;case"endsWith":return i?i.endsWith(n):!1;case"isNull":return!i;case"notNull":return!!i;case"isTrue":return i==="true"||i==="1"||i==="yes";case"isFalse":return i==="false"||i==="0"||i==="no";case"in":try{return i?JSON.parse(n).map(o=>o.trim().toLowerCase()).some(o=>o.toLowerCase()===i):!1}catch(s){return t?t.debug.error(`Error parsing In condition: ${s}`):console.error(`Error parsing In condition: ${s}`),!1}case"notIn":try{return i?!JSON.parse(n).map(o=>o.trim().toLowerCase()).some(o=>o.toLowerCase()===i):!1}catch(s){return t?t.debug.error(`Error parsing NotIn condition: ${s}`):console.error(`Error parsing In condition: ${s}`),!1}case"regEx":return new RegExp(n,"i").test(i);default:throw new Error(`Not supported: ${r.operator}`)}}var uo=class{constructor(e,t,i){l(this,"sdk");l(this,"keyPrefix");l(this,"orgKeyPrefix");l(this,"secureCookies",!1);l(this,"mainCookieDomain");var n;if(this.sdk=e,this.keyPrefix=t+"__",this.orgKeyPrefix=i+"__",e){let s=e.dataLayer.window.location();if(s&&s.hostname){let o=(n=gt(s.href,!0))==null?void 0:n.toLowerCase();o&&o!=="localhost"&&(this.mainCookieDomain="."+o),this.secureCookies=s.protocol==="https:"}}}get(e){var t;try{let i=document.cookie.match(new RegExp("(^| )"+e+"=([^;]+)"));return i?i[2]:null}catch(i){return(t=this.sdk)==null||t.debug.error("Failed to get cookie val",i),null}}getSeekaScopedCookie(e){let t=this.keyPrefix+e;return this.get(t)}getSeekaOrgCookie(e){let t=this.orgKeyPrefix+e;return this.get(t)}getSeekaScopedByNamePrefix(e){let t=this.keyPrefix+e;return this.getByNamePrefix(t)}getByNamePrefix(e){var t;try{return document.cookie.split(";").filter(function(i){return i.trim().indexOf(e)===0}).map(function(i){return i.trim()})||[]}catch(i){return(t=this.sdk)==null||t.debug.error("Failed to get cookies by val name prefix",i),[]}}setSeekaScoped(e,t,i){let n=this.keyPrefix+e;this.set(n,t,i)}setSeekaOrg(e,t,i){let n=this.orgKeyPrefix+e;this.set(n,t,i)}set(e,t,i,n){var s,o,a,c,d;try{let f="",u=new Date;if(u.setTime(u.getTime()+(i||365*50)*24*60*60*1e3),f="; expires="+u.toUTCString(),(s=this.sdk)==null||s.debug.verbose("Setting cookie",{cookieName:e,val:t,mainCookieDomain:this.mainCookieDomain,secureCookies:this.secureCookies,domains:n}),n){let g=Array.isArray(n)?n:[n];for(let p of g){let v=e+"="+(t||"")+f+";path=/;SameSite=Lax;domain="+p;(o=this.sdk)==null||o.debug.verbose("Setting domain cookie",{domain:p,cookieString:v}),document.cookie=v}}let m=this.secureCookies?";secure":"";if(this.mainCookieDomain){let g=e+"="+(t||"")+f+";path=/;SameSite=Lax;domain="+this.mainCookieDomain+m;(a=this.sdk)==null||a.debug.verbose("Setting main domain cookie",{cookieString:g}),document.cookie=g}else{let g=e+"="+(t||"")+f+";path=/;SameSite=Lax"+m;(c=this.sdk)==null||c.debug.verbose("Setting no-domain cookie",{cookieString:g}),document.cookie=g}setTimeout(()=>{var p;let g=this.get(e);(p=this.sdk)==null||p.debug.verbose("Cookie verification",{cookieName:e,retrieved:g})},0)}catch(f){(d=this.sdk)==null||d.debug.warn("Failed to set cookie",f)}}},qu=uo;var vo=null,Gn=null,bo=class{constructor(e){l(this,"sdk");this.sdk=e}sha256(e){return h(this,null,function*(){if(!e||(e=e.trim(),!e))return"";try{vo||(vo=yield Promise.resolve().then(()=>(yl(),hl))),Gn||(Gn=yield Promise.resolve().then(()=>(Bn(),il)));let t=Gn.utf8ToBytes(e);return Gn.bytesToHex(vo.sha256(t)).toLowerCase()}catch(t){let i=this.sdk.dataLayer.window.location().protocol,n=!ne&&i.substring(0,5)!=="https";return this.sdk.debug.error(n?"Failed to sha256 as current protocol is not HTTPS. Data requested to be hashed will be handled as empty text.":"Failed to sha256. Data requested to be hashed will be handled as empty text.",t),""}})}},vl=bo;var ko=class{constructor(e){l(this,"sdk");l(this,"methodCallQueue",{});l(this,"priorityMethodCallQueue",{});this.sdk=e,this.methodCallQueue=this.createQueue("standard"),this.priorityMethodCallQueue=this.createQueue("priority")}createQueue(e){return{name:e,items:[],failedItems:[]}}sleep(e){return new Promise(t=>setTimeout(t,e))}addMethodCallToQueue(e,t,i,n,s){let o=this.methodCallQueue;s&&(o=this.priorityMethodCallQueue),n?o.items.push({id:io(),func:function(){return h(this,null,function*(){yield e.apply(t,i)})},context:t,params:i,isAsync:n}):o.items.push({id:io(),func:function(){e.apply(t,i)},context:t,params:i,isAsync:n}),this.sdk.debug.verbose("Queue - addMethodCallToQueue",o.name)}startProcessingPriorityMethods(){return h(this,null,function*(){this.sdk.debug.verbose("Queue - startProcessingPriorityMethods"),yield this.processQueue(this.priorityMethodCallQueue),this.sdk.debug.verbose("Queue - finishProcessingPriorityMethods")})}startProcessingStandardMethods(){return h(this,null,function*(){this.sdk.debug.verbose("Queue - startProcessingStandardMethods"),yield this.processQueue(this.methodCallQueue),this.sdk.debug.verbose("Queue - finishProcessingStandardMethods")})}processQueue(e){return h(this,null,function*(){this.sdk.debug.verbose("Queue - processing starting",e.name);let t=performance.now();for(;e.items.length>0;){let n=e.items[0];try{let s=performance.now();n.isAsync?yield n.func():n.func();let o=performance.now();this.sdk.debug.verbose(`Queue - handled item in ${o-s}ms`,e.name)}catch(s){this.sdk.debug.error("Queue - failed handling item "+e.name,s),e.failedItems.push(n)}finally{e.items.shift()}}let i=performance.now();this.sdk.debug.verbose(`Queue - processing complete in ${i-t}ms`,e.name)})}},bl=ko;var Le=new Ri,Io=class{order(e){return e&&(e.totalDiscounts&&(e.totalDiscounts=Le.parseMoney(e.totalDiscounts)),e.totalLineItemsPrice&&(e.totalLineItemsPrice=Le.parseMoney(e.totalLineItemsPrice)),e.totalPrice&&(e.totalPrice=Le.parseMoney(e.totalPrice)),e.totalRefunds&&(e.totalRefunds=Le.parseMoney(e.totalRefunds)),e.totalShippingPrice&&(e.totalShippingPrice=Le.parseMoney(e.totalShippingPrice)),e.totalTax&&(e.totalTax=Le.parseMoney(e.totalTax)),e.products&&e.products.length>0&&(e.products=e.products.filter(t=>!!t).map(t=>this.product(t)).filter(t=>!!t)),(!e.products||e.products.length===0)&&(e.products=[]),e)}product(e){return!e||(e.totalDiscount&&(e.totalDiscount=Le.parseMoney(e.totalDiscount)),e.unitPrice&&(e.unitPrice=Le.parseMoney(e.unitPrice)),e.quantity&&(e.quantity=Le.parseFloat(e.quantity)),e.productName=Le.parseStr(e.productName),e.variantIdentifier=Le.parseStr(e.variantIdentifier),e.productIdentifier=Le.parseStr(e.productIdentifier),e.variantName=Le.parseStr(e.variantName),!e.productName&&!e.variantIdentifier&&!e.productIdentifier&&!e.variantName)?null:e}},kl=Io;function Il(r={}){return{name:"analytics-plugin-converge-configurationapply",config:y({},r),pageStart:({abort:e,config:t})=>{var i,n;if(((n=(i=t.tracking)==null?void 0:i.processing)==null?void 0:n.isBrowserEventsDisabled)===!0)return e("Cancel the page call because browser events are disabled")},identifyStart:({abort:e,config:t})=>{var i,n;if(((n=(i=t.tracking)==null?void 0:i.processing)==null?void 0:n.isIdentityDisabled)===!0)return e("Cancel the identify call because identity is disabled")},trackStart:({abort:e,config:t})=>{var i,n;if(((n=(i=t.tracking)==null?void 0:i.processing)==null?void 0:n.isBrowserEventsDisabled)===!0)return e("Cancel the track call because browser events are disabled")},loaded:()=>!0}}var $n=class{constructor(e){l(this,"sdk");l(this,"instanceKeyPrefix");l(this,"orgKeyPrefix");l(this,"globalKeyPrefix");l(this,"state",{});this.sdk=e,this.instanceKeyPrefix="sk__i_"+e.config.scopeKey+"__",this.orgKeyPrefix="sk__o_"+e.config.organisationId+"__",this.globalKeyPrefix="sk__"}getKeyPrefix(e){return e==="org"?this.orgKeyPrefix:e==="global"?this.globalKeyPrefix:this.instanceKeyPrefix}removeByPrefix(e,t){for(let i in this.state)i.indexOf(this.getKeyPrefix(t)+e)==0&&delete this.state[i]}set(e,t,i){this.state[this.getKeyPrefix(i)+e]=t}get(e,t){return"key"in this.state?this.state[this.getKeyPrefix(t)+e]:null}};var qn=class{constructor(e,t,i){l(this,"instanceKeyPrefix");l(this,"orgKeyPrefix");l(this,"globalKeyPrefix");l(this,"storage");this.instanceKeyPrefix="sk__i_"+e+"__",this.orgKeyPrefix="sk__o_"+t+"__",this.globalKeyPrefix="sk__",this.storage=i}getKeyPrefix(e){return e==="org"?this.orgKeyPrefix:e==="global"?this.globalKeyPrefix:this.instanceKeyPrefix}removeByPrefix(e,t){let i=Object.keys(this.storage);for(let n in i){let s=i[n];s.indexOf(this.getKeyPrefix(t)+e)===0&&this.storage.removeItem(s)}}set(e,t,i){this.storage.setItem(this.getKeyPrefix(i)+e,JSON.stringify(t))}get(e,t){let i=this.storage.getItem(this.getKeyPrefix(t)+e);return i==null||i==null?null:JSON.parse(i)}};var Kn=class{constructor(e){l(this,"sdk");this.sdk=e}addEventListeners(){window.addEventListener("message",e=>{if(e.origin==="https://bookings.nowbookit.com")try{let t=JSON.parse(e.data);if(t.type!=="NBIWidget2GoogleAnalytics")return;switch(this.sdk.debug.verbose("Converge - Now book it - event bubble",t),t.event.event){case"Booking Confirmed":this.sdk.track.lead();break}}catch(t){this.sdk.debug.error("Converge - Now book it - message handle error",t)}})}};var nt=class r{constructor(e){l(this,"sdk");l(this,"definitionListenerBindedToElementDataAttrPrefix");l(this,"firedDefinitionIds",[]);this.sdk=e,this.definitionListenerBindedToElementDataAttrPrefix="data-sk-act-def-binded-"+e.config.scopeKey}bindEventHandlersForActivityDefinitions(){var t,i,n,s,o;this.sdk.debug.verbose("Activity definitions - bindEventHandlersForActivityDefinitions starting");let e=(((s=(n=(i=(t=this.sdk.config)==null?void 0:t.tracking)==null?void 0:i.analytics)==null?void 0:n.autoCollection)==null?void 0:s.activityDefinitions)||[]).filter(a=>a.triggerSettings&&a.triggerSettings.firingTriggers&&a.triggerSettings.firingTriggers.filter(c=>c.htmlElements&&c.htmlElements.length>0).length>0);this.sdk.debug.verbose("Activity definitions - bindEventHandlersForActivityDefinitions processing",{definitions:e});for(let a=0;a<e.length;a++){let c=e[a];if(this.isTriggersPassableForCurrentViewContext(c.triggerSettings,void 0,!0,c.id)&&!(!c.triggerSettings||!c.triggerSettings.firingTriggers)){this.sdk.debug.verbose("Activity definitions - "+c.id+" - processing binding definition",{definition:c});for(let d=0;d<c.triggerSettings.firingTriggers.length;d++){let f=c.triggerSettings.firingTriggers[d];if(!(!f||!f.htmlElements||f.htmlElements.length===0))for(let u=0;u<f.htmlElements.length;u++){let m=f.htmlElements[u];if(!m.locator||!m.eventTypes||m.eventTypes.length==0)continue;let g=r.getDocumentElementsFromLocator(m.locator);if(g.length===0){this.sdk.debug.verbose("Activity definitions - "+c.id+" - no elements found for locator",{locator:m.locator,definition:c});continue}this.sdk.debug.verbose("Activity definitions - "+c.id+" - elements found for locator",{locator:m.locator,htmlElements:g,definition:c});for(let p=0;p<g.length;p++){let v=g[p];if(v.tagName)for(let I=0;I<m.eventTypes.length;I++){let b=m.eventTypes[I],w=`${this.definitionListenerBindedToElementDataAttrPrefix}-${c.id}`;v.getAttribute(w)?this.sdk.debug.verbose("Activity definitions - "+c.id+" - element binding - already bound for "+b,{locator:m.locator,htmlElement:v,definition:c}):(b==="submit"?((o=v.tagName)==null?void 0:o.toUpperCase())==="FORM"?this.bindFormSubmit(v,c):this.sdk.debug.warn("Not binding submit to element that does not support it",{tagName:v.tagName,definition:c}):v.offsetParent===null?this.sdk.debug.verbose("Activity definitions - "+c.id+" - element binding - not binding to hidden element "+b,{locator:m.locator,htmlElement:v,definition:c}):v.addEventListener(b,A=>h(this,null,function*(){yield this.processCustomActivityDefinition(c,{eventType:A.type,target:A.currentTarget})}),!1),v.setAttribute(w,"binded"),this.sdk.debug.verbose("Activity definitions - "+c.id+" - element binding - bound for "+b,{locator:m.locator,htmlElement:v,definition:c}))}}}}}}this.sdk.debug.verbose("Activity definitions - bindEventHandlersForActivityDefinitions completed")}bindFormSubmit(e,t){let i=window.gform&&e.id&&e.id.startsWith("gform_")&&e.attributes["data-formid"],n=!1;if(i){let s=e.getAttribute("data-formid"),o=(a,c)=>h(this,null,function*(){if(this.sdk.debug.verbose("Listened to Gravity form submission",{gFormId:s,data:a,def:t,el:e,gFormVersion:c}),a.form.dataset.formid!==s||a.submissionType!==window.gform.submission.SUBMISSION_TYPE_SUBMIT)return a;this.sdk.debug.log("Handling Gravity form submission",{data:a,def:t,el:e,gFormVersion:c}),yield this.processCustomActivityDefinition(t,{eventType:"submit",target:e})});this.sdk.debug.verbose("Binding to Gravity form submission",{def:t,el:e,gFormId:s});try{window.gform.utils.addAsyncFilter?window.gform.utils.addAsyncFilter("gform/submission/pre_submission",a=>h(this,null,function*(){return yield o(a,"async"),a})):window.gform.addFilter("gform/submission/pre_submission",function(a){return o(a,"sync"),a}),n=!0}catch(a){this.sdk.debug.warn("Failed to bind to Gravity form submission event",{error:a})}}n||e.addEventListener("submit",s=>h(this,null,function*(){yield this.processCustomActivityDefinition(t,{eventType:s.type,target:e})}),!0)}static getValueFromWindowGlobal(e,t,i){if(!e)return null;let n=null;try{i==null||i.debug.verbose("Getting value from window global",{winGlobalRef:e});let s=ft(window,e);typeof s=="function"?n=s():n=s}catch(s){i==null||i.debug.error("Failed to get value from window global",{error:s,winGlobalRef:e})}return t&&typeof n=="string"?Tn(n):n}static getParameterValueFromElement(e,t){if(!e)return null;let i=null;return(e.tagName==="SPAN"||e.tagName==="DIV"||e.tagName==="H1"||e.tagName==="H2"||e.tagName==="H3")&&(i=e.innerText),e.tagName==="INPUT"&&(i=e.value),e.tagName==="SELECT"&&(i=e.value),e.tagName==="TEXTAREA"&&(i=e.value),t?Tn(i):i}static getHtmlElementsFromTextMatchInfo(e,t,i,n,s,o){var d,f,u,m,g;let a="",c=n||"";switch(e.operator){case"equals":a=`${c}[${t}="${(d=e.matchValue)==null?void 0:d.trim()}"]`;break;case"contains":a=`${c}[${t}*="${(f=e.matchValue)==null?void 0:f.trim()}"]`;break;case"startsWith":a=`${c}[${t}^="${(u=e.matchValue)==null?void 0:u.trim()}"]`;break;case"endsWith":a=`${c}[${t}$="${(m=e.matchValue)==null?void 0:m.trim()}"]`;break;case"regEx":let p=new RegExp(((g=e.matchValue)==null?void 0:g.trim())||"");return Array.from(document.querySelectorAll(c||"*")).filter(v=>p.test(v.id));default:o?o==null||o.debug.warn(`Activity definitions - unsupported ${i} operator`,{textMatch:e}):console.warn(`Activity definitions - unsupported ${i} operator`,{textMatch:e});break}return a?s!=null?s.filter(p=>p.matches(a)):Array.from(document.querySelectorAll(a)):[]}static getDocumentElementsFromLocator(e,t){try{let i=null;e.elementIdMatch&&(i=r.getHtmlElementsFromTextMatchInfo(e.elementIdMatch,"id","elementIdMatch",null,i,t)),e.linkUrlMatch&&(i=r.getHtmlElementsFromTextMatchInfo(e.linkUrlMatch,"href","linkUrlMatch","a",i,t)),e.innerTextMatch&&e.elementTypes&&e.innerTextMatch.matchValue?e.innerTextMatch.operator?e.elementTypes.forEach(s=>{var o,a;if(e.innerTextMatch){let c=`${s}`,d=i!=null?i:Array.from(document.querySelectorAll(c)),f=(a=(o=e.innerTextMatch)==null?void 0:o.matchValue)==null?void 0:a.toLowerCase();switch(e.innerTextMatch.operator){case"equals":i=(i||[]).concat(Array.from(d).filter(m=>{var g,p;return f&&(((g=m.textContent)==null?void 0:g.trim().toLowerCase())===f||((p=m.value)==null?void 0:p.trim().toLowerCase())===f)}));break;case"contains":i=(i||[]).concat(Array.from(d).filter(m=>{var g,p;return f&&(((g=m.textContent)==null?void 0:g.includes(f))||((p=m.value)==null?void 0:p.includes(f)))}));break;case"startsWith":i=(i||[]).concat(Array.from(d).filter(m=>{var g,p;return f&&(((g=m.textContent)==null?void 0:g.startsWith(f))||((p=m.value)==null?void 0:p.startsWith(f)))}));break;case"endsWith":i=(i||[]).concat(Array.from(d).filter(m=>{var g,p;return f&&(((g=m.textContent)==null?void 0:g.endsWith(f))||((p=m.value)==null?void 0:p.endsWith(f)))}));break;case"regEx":let u=new RegExp(f||"");i=(i||[]).concat(Array.from(d).filter(m=>u.test(m.textContent||"")||u.test(m.value||"")));break;default:t?t==null||t.debug.warn("Activity definitions - unsupported innerTextMatch operator",{locator:e}):console.warn("Activity definitions - unsupported innerTextMatch operator",{locator:e});break}}}):t?t==null||t.debug.warn("Activity definitions - locator.innerTextMatch.operator is not set",{locator:e}):console.warn("Activity definitions - locator.innerTextMatch.operator is not set",{locator:e}):!e.linkUrlMatch&&!e.elementIdMatch&&!e.innerTextMatch&&e.elementTypes&&e.elementTypes.length>0&&e.elementTypes.forEach(s=>{let o=`${s}`;i!=null?i=i.filter(a=>a.matches(o)):i=(i||[]).concat(Array.from(document.querySelectorAll(o)))});let n=e.classNames&&e.classNames.length>0?e.classNames.filter(s=>!!s):[];if(n.length>0)if(e.elementTypes&&e.elementTypes.length>0)e.elementTypes.forEach(s=>{let o=`${s}.${n.join(".")}`;i!=null?i=i.filter(a=>a.matches(o)):i=(i||[]).concat(Array.from(document.querySelectorAll(o)))});else{let s=`.${n.join(".")}`;i!=null?i=i.filter(o=>o.matches(s)):i=(i||[]).concat(Array.from(document.querySelectorAll(s)))}return(i===null||i.length===0)&&t&&(t==null||t.debug.verbose("Activity definitions - no elements found for locator",{locator:e})),i||[]}catch(i){return t?t==null||t.debug.error("Activity definitions - getDocumentElementsFromLocator failed",{err:i,locator:e}):console.error("Activity definitions - getDocumentElementsFromLocator failed",i,e),[]}}processCustomActivityDefinitions(){return h(this,null,function*(){var t,i,n,s;let e=((s=(n=(i=(t=this.sdk.config)==null?void 0:t.tracking)==null?void 0:i.analytics)==null?void 0:n.autoCollection)==null?void 0:s.activityDefinitions)||[];e&&this.sdk.debug.verbose("Activity definitions - processing definitions",{definitions:e});for(let o=0;o<e.length;o++){let a=e[o];yield this.processCustomActivityDefinition(a)}})}processCustomActivityDefinition(e,t){return h(this,null,function*(){if(this.sdk.debug.verbose("Activity definitions - "+e.id+" - processing definition",{definition:e,eventInfo:t}),e.triggerSettings&&!this.isTriggersPassableForCurrentViewContext(e.triggerSettings,t,!1,e.id)){this.sdk.debug.verbose("Activity definitions - "+e.id+" - not handling - triggers not passable for current view context",{definition:e,eventInfo:t});return}this.sdk.debug.verbose("Activity definitions - "+e.id+" - handling definition",{definition:e,eventInfo:t});let i={};try{if((t==null?void 0:t.eventType)==="submit"||(t==null?void 0:t.eventType)==="click"){let o=t.target.tagName.toLowerCase()==="form"?t.target:this.getNParentElement(t.target,9,"form"),a=null;if(o)a=this.sdk.util.parse.parseFormToPersonDetails(o),a&&this.sdk.debug.verbose("Activity definitions - "+e.id+" - extracted identity from form",{form:o,definition:e,eventInfo:t});else{let d=this.getNParentElement(t.target,9,void 0);d&&(a=this.sdk.util.parse.parseFormToPersonDetails(d),a&&this.sdk.debug.verbose("Activity definitions - "+e.id+" - extracted identity from target element",{form:o,definition:e,eventInfo:t}))}if(a&&(a.email&&(i.email=[a.email]),a.phone&&(i.phone=[a.phone]),a.firstName?i.firstName=[a.firstName]:a.fullName&&(i.firstName=[a.fullName]),a.lastName&&(i.lastName=[a.lastName]),a.country||a.countryCode||a.state||a.stateCode||a.locality||a.postcode)){i.address=[];let d={};a.country&&(d.country=a.country),a.countryCode&&(d.countryCode=a.countryCode),a.state&&(d.state=a.state),a.stateCode&&(d.stateCode=a.stateCode),a.locality&&(d.locality=a.locality),a.postcode&&(d.postcode=a.postcode),i.address.push(d)}let c=this.setProfileConsentFieldsFromDefinition(e,i);(a||c)&&(yield this.sdk.identity.mergeProfile(i))}else this.setProfileConsentFieldsFromDefinition(e,i)&&(yield this.sdk.identity.mergeProfile(i));if(e.id&&(t==null?void 0:t.eventType)==="submit"){if(this.firedDefinitionIds.includes(e.id)){this.sdk.debug.warn("Not double firing activity definition",{definition:e,firedDefinitionIds:this.firedDefinitionIds});return}this.firedDefinitionIds.push(e.id)}let n=y({},e.activityParameters);e.activityNameCustom&&(n.activityNameCustom=e.activityNameCustom),this.setDynamicActivityParameterValues(n,{locatorElement:t==null?void 0:t.target});let s=this.getActivityParamsFromDynamic(e.activityName,n);yield this.sdk.track.activity(e.activityName,s,{sourceDefinition:e})}catch(n){this.sdk.debug.error("Activity definitions - "+e.id+" - failed to process definition",n)}})}getActivityParamsFromDynamic(e,t){var o,a;let i=y({},t),n=i.contentName||i.sourceContentName;n&&(i.contentName=n);let s=t;if(s){let c=s.contentId;c&&e=="viewContentItem"&&(i.identifiers=[c]);let d=s.productIdentifier,f=s.productName,u=this.sdk.util.parse.parseMoney(Tn((o=s.unitPrice||s.totalPrice)==null?void 0:o.toString()));(f||d)&&(e==="order"||e==="initiateCheckout"||e==="addPaymentMethod"||e==="oneTimeItemPurchase"||e==="subscriptionItemPurchase")&&(i.products||(i.products=[]),i.totalPrice=u,(a=i.products)==null||a.push({productIdentifier:d,productName:f,quantity:1,unitPrice:u})),u&&(e==="removeFromCart"||e==="addToCart"||e==="addToWishlist"||e==="viewProduct")&&(i.unitPrice=u)}return i}setProfileConsentFieldsFromDefinition(e,t){var s,o,a,c,d,f,u,m,g,p,v,I,b,w,E,A,S,T,D,O,j,G,N;let i=!1;t.consent||(t.consent={});let n=(e.activityNameCustom||e.activityName)+" on "+window.location.hostname;return(s=e.consentSettings)!=null&&s.analytics&&(t.consent.analytics||(t.consent.analytics={}),((o=e.consentSettings)==null?void 0:o.analytics.consentGranted)===!0?(t.consent.analytics.consentGrantedAt=new Date,t.consent.analytics.consentGrantedSourceName=((a=e.consentSettings)==null?void 0:a.analytics.consentSourceName)||n,i=!0):((c=e.consentSettings)==null?void 0:c.analytics.consentGranted)===!1&&(t.consent.analytics.consentNotGrantedAt=new Date,t.consent.analytics.consentNotGrantedSourceName=((d=e.consentSettings)==null?void 0:d.analytics.consentSourceName)||n,i=!0)),(f=e.consentSettings)!=null&&f.loyalty&&(t.consent.loyalty||(t.consent.loyalty={}),((u=e.consentSettings)==null?void 0:u.loyalty.consentGranted)===!0?(t.consent.loyalty.consentGrantedAt=new Date,t.consent.loyalty.consentGrantedSourceName=((m=e.consentSettings)==null?void 0:m.loyalty.consentSourceName)||n,i=!0):((g=e.consentSettings)==null?void 0:g.loyalty.consentGranted)===!1&&(t.consent.loyalty.consentNotGrantedAt=new Date,t.consent.loyalty.consentNotGrantedSourceName=((p=e.consentSettings)==null?void 0:p.loyalty.consentSourceName)||n,i=!0)),(v=e.consentSettings)!=null&&v.marketing&&(t.consent.marketing||(t.consent.marketing={}),(b=(I=e.consentSettings)==null?void 0:I.marketing)!=null&&b.sms&&(t.consent.marketing.sms||(t.consent.marketing.sms={}),((w=e.consentSettings)==null?void 0:w.marketing.sms.consentGranted)===!0?(t.consent.marketing.sms.consentGrantedAt=new Date,t.consent.marketing.sms.consentGrantedSourceName=((E=e.consentSettings)==null?void 0:E.marketing.sms.consentSourceName)||n,i=!0):((A=e.consentSettings)==null?void 0:A.marketing.sms.consentGranted)===!1&&(t.consent.marketing.sms.consentNotGrantedAt=new Date,t.consent.marketing.sms.consentNotGrantedSourceName=((S=e.consentSettings)==null?void 0:S.marketing.sms.consentSourceName)||n,i=!0)),(D=(T=e.consentSettings)==null?void 0:T.marketing)!=null&&D.email&&(t.consent.marketing.email||(t.consent.marketing.email={}),((O=e.consentSettings)==null?void 0:O.marketing.email.consentGranted)===!0?(t.consent.marketing.email.consentGrantedAt=new Date,t.consent.marketing.email.consentGrantedSourceName=((j=e.consentSettings)==null?void 0:j.marketing.email.consentSourceName)||n,i=!0):((G=e.consentSettings)==null?void 0:G.marketing.email.consentGranted)===!1&&(t.consent.marketing.email.consentNotGrantedAt=new Date,t.consent.marketing.email.consentNotGrantedSourceName=((N=e.consentSettings)==null?void 0:N.marketing.email.consentSourceName)||n,i=!0))),i&&this.sdk.debug.verbose("Activity definitions - "+e.id+" - setting consent fields",{definition:e,consent:t.consent}),i}setDynamicActivityParameterValues(e,t){Object.keys(e).forEach(i=>{(typeof e[i]=="string"||e[i]instanceof String)&&(e[i]=this.setDynamicActivityParameterValue(e[i],t,i)),typeof e[i]=="object"&&e[i]!==null&&this.setDynamicActivityParameterValues(e[i],t)})}setDynamicActivityParameterValue(e,t,i){if(!e.startsWith("{{"))return e;let n=e.replace(/{{/gi,"").replace(/}}/gi,"");if(this.sdk.debug.verbose("Activity definitions - setting dynamic parameter value",{paramValue:e,paramName:i,dynamicParam:n,dynamicParamSources:t}),n==="locatorElement.innerText"&&t.locatorElement)return t.locatorElement[n.split(".")[1]];if(n==="documentElement.title")return this.sdk.dataLayer.document.title()||"";if(n.indexOf("queryElement")===0){let s=n.substring(n.indexOf(":")+1),o=document.querySelectorAll(s);if(!o||o.length===0)return this.sdk.debug.warn("Dynamic parameter - did not find element for selector "+s,{paramValue:e,dynamicParamSources:t}),"";o.length>1&&this.sdk.debug.warn("Dynamic parameter - matched multiple elements for selector "+s,{paramValue:e,dynamicParamSources:t,matched:o});let a=i==="unitPrice"||i==="totalPrice"||i==="totalDiscounts"||i==="predictedValue",c=r.getParameterValueFromElement(o[0],a)||"";return c?this.sdk.debug.verbose("Dynamic parameter - matched element and got value "+n,{gotVal:c,paramValue:e,dynamicParamSources:t,el:o[0]}):this.sdk.debug.warn("Dynamic parameter - matched element but no value found for param "+n,{paramValue:e,dynamicParamSources:t,el:o[0]}),c}if(n.indexOf("windowGlobal")===0){let s=n.substring(n.indexOf(":")+1),o=i==="unitPrice"||i==="totalPrice"||i==="totalDiscounts"||i==="predictedValue",a=r.getValueFromWindowGlobal(s,o,this.sdk);return a?this.sdk.debug.verbose("Dynamic parameter - matched window global and got value "+n,{theVal:a,paramValue:e,winGlobalRef:s}):this.sdk.debug.warn("Dynamic parameter - no value found for window global param "+n,{paramValue:e,winGlobalRef:s}),a}return this.sdk.debug.warn("Dynamic parameter - cannot fill value for param "+n,{paramValue:e,dynamicParamSources:t}),""}isTriggersPassableForCurrentViewContext(e,t,i,n){let s=n?" - "+n:"";if(!e||!e.firingTriggers||e.firingTriggers.length===0||e.firingTriggersComparer==="undefined")return this.sdk.debug.verbose(`Activity definitions${s} - trigger group - FAIL - invalid config`,{triggerSettings:e,eventInfo:t}),!1;let o=this.sdk.debug.createTrackingSource("sdk/js/activity/trigger"),a=!0;for(let c=0;c<e.firingTriggers.length;c++){let d=e.firingTriggers[c];if(this.isTriggerPassableForCurrentViewContext(d,t,i,o,n)){if(e.firingTriggersComparer==="or")return!0}else a=!1}if(a){this.sdk.debug.verbose(`Activity definitions${s} - firingTriggers group - PASS`,{triggerSettings:e,eventInfo:t});let c=(e.blockingTriggers||[]).filter(d=>d.filters&&d.filters.length>0);if(c){let d=!1;for(let f=0;f<c.length;f++){let u=c[f];if(this.isTriggerPassableForCurrentViewContext(u,t,i,o,n)){if(e.blockingTriggersComparer==="or")return!1;d=!0}}if(d)return this.sdk.debug.verbose(`Activity definitions${s} - blockingTriggers group - FAIL`,{triggerSettings:e,eventInfo:t}),!1}return!0}return this.sdk.debug.verbose(`Activity definitions${s} - firingTriggers group - FAIL`,{triggerSettings:e,eventInfo:t}),!1}isTriggerPassableForCurrentViewContext(e,t,i,n,s){if(!e)return!1;let o=s?" - "+s:"";if(e.filters&&e.filters.length>0)if(_n(e.filters,e.comparer,n.loc,!0,this.sdk))this.sdk.debug.verbose(`Activity definitions${o} - trigger - PASS - filter matched`,{trigger:e,eventInfo:t,source:n});else return this.sdk.debug.verbose(`Activity definitions${o} - trigger - FAIL - filter not matched`,{trigger:e,eventInfo:t,source:n}),!1;if(e.htmlElements&&e.htmlElements.length>0){if(!i&&!t)return!i&&!t?(this.sdk.debug.verbose(`Activity definitions${o} - trigger - FAIL - origin not HTML event`,{trigger:e,eventInfo:t,source:n}),!1):(this.sdk.debug.verbose(`Activity definitions${o} - trigger - PASS - considering null event as pass`,{trigger:e,eventInfo:t,source:n}),!0);if(t)for(let a=0;a<e.htmlElements.length;a++){let c=e.htmlElements[a];this.isTriggerMatchedToHtmlElement(c,t)?this.sdk.debug.verbose(`Activity definitions${o} - trigger - PASS - HTML element event match`,{trigger:e,eventInfo:t,htmlElement:c,source:n}):this.sdk.debug.verbose(`Activity definitions${o} - trigger - FAIL - HTML element event match`,{trigger:e,eventInfo:t,htmlElement:c,source:n})}}return this.sdk.debug.verbose(`Activity definitions${o} - trigger - PASS`,{trigger:e,eventInfo:t,source:n}),!0}isTriggerMatchedToHtmlElement(e,t){return t&&e.eventTypes&&e.eventTypes.indexOf(t.eventType)>-1}getNParentElement(e,t,i){var a;this.sdk.debug.verbose("Activity definitions - get the n parent",{maxParentElementDepth:t,el:e});let n=null,s=0,o=e;for(;s<=t&&o.parentNode;){if(o=(o==null?void 0:o.parentNode)||null,i&&((a=o.tagName)==null?void 0:a.toUpperCase())===i.toUpperCase()||s===t){n=o;break}s++}return n?this.sdk.debug.verbose("Activity definitions - get parent n element found",{found:n,maxParentElementDepth:t,el:e}):this.sdk.debug.verbose("Activity definitions - get parent n element not found",{maxParentElementDepth:t,el:e}),n}};var Jn=(e=>(e.OnRouteChange="onRouteChange",e))(Jn||{}),xo="seeka.mediate",xl=!1,st=class r{constructor(e){l(this,"sdk");l(this,"definitionHelper");l(this,"windowPostMessageMediator");l(this,"disabledListeners");l(this,"viewLayoutChangedListenerBindedToElementDataAttr","data-sk-view-layout-binded");l(this,"onRouteChangePreCheck",e=>e.hostname!==window.location.hostname||this.sdk.util.url.sanitizeResourceUrl(e.pathname)===this.sdk.util.url.sanitizeResourceUrl(window.location.pathname)?!1:(window.Seeka||(window.Seeka={}),window.Seeka.context||(window.Seeka.context={}),window.Seeka.context.window||(window.Seeka.context.window={}),window.Seeka.context.window.location=e,!0));var t,i,n,s,o,a;this.sdk=e,this.definitionHelper=new nt(this.sdk),this.disabledListeners=((o=(s=(n=(i=(t=window.Seeka)==null?void 0:t.context)==null?void 0:i.tracking)==null?void 0:n.processing)==null?void 0:s.hooks)==null?void 0:o.disabledListeners)||[],(a=this.sdk.config.tracking.processing)!=null&&a.mediateBrowserMethodsToWindowReference&&this.sdk.debug.verbose("Hooks - mediating browser methods to window reference",{ref:this.sdk.config.tracking.processing.mediateBrowserMethodsToWindowReference})}onRouteChange(e){return h(this,null,function*(){var i,n,s;if(this.sdk.debug.verbose("Hooks - onRouteChange",{newLocation:e}),e&&!this.onRouteChangePreCheck(e))return;let t=yield this.sdk.handlers.getViewContext();t&&this.sdk.handlers.setViewContext(t),(n=(i=this.sdk.config.tracking.analytics)==null?void 0:i.autoCollection)!=null&&n.activityNames&&((s=this.sdk.config.tracking.analytics)==null?void 0:s.autoCollection.activityNames.indexOf("viewPage"))>-1&&(yield this.sdk.track.viewPage()),yield this.onViewLayoutChange(),this.definitionHelper.firedDefinitionIds=[],yield this.definitionHelper.processCustomActivityDefinitions()})}onWindowLifeEnd(){return h(this,null,function*(){this.sdk.debug.verbose("Hooks - onWindowLifeEnd"),yield Promise.all([this.sdk.identity.flushIdentitySyncQueue(),this.sdk.convergeApi.ingest.flushQueueDebounced.flush()])})}onViewLayoutChange(){return h(this,null,function*(){yield this.definitionHelper.bindEventHandlersForActivityDefinitions(),document.querySelectorAll('a, button, input[type="button"]').forEach(e=>{try{e.getAttribute(this.viewLayoutChangedListenerBindedToElementDataAttr)||(e.setAttribute(this.viewLayoutChangedListenerBindedToElementDataAttr,"binded"),e.addEventListener("click",t=>{setTimeout(()=>h(this,null,function*(){yield this.onViewLayoutChange()}),3500)}))}catch(t){this.sdk.debug.error("Hooks - onPageReady - bind buttons failed",t)}})})}onPageReady(){return h(this,null,function*(){this.sdk.debug.verbose("Hooks - onPageReady"),typeof document!="undefined"&&document.addEventListener("gform/theme/scripts_loaded",()=>{this.onViewLayoutChange()}),window.addEventListener("message",t=>h(this,null,function*(){var i,n,s;if(t.origin&&t.origin.indexOf("stripe.com")>-1&&t.data){let o=null;try{o=JSON.parse(t.data)}catch(a){this.sdk.debug.verbose("Hooks - onPageReady - stripe message event failed to parse",{event:t,err:a})}if(o)try{o.message&&o.message.payload&&(o.message.payload.event==="ready"&&setTimeout(()=>this.onViewLayoutChange(),1250),o.message.payload.event==="change"&&o.message.payload.data&&o.message.payload.data.complete===!0&&((n=(i=this.sdk.config.tracking.analytics)==null?void 0:i.autoCollection)!=null&&n.activityNames&&this.sdk.config.tracking.analytics.autoCollection.activityNames.indexOf("addPaymentMethod")>-1?xl?this.sdk.debug.verbose("Not firing add payment method due to stripe message as it has already fired"):(yield this.sdk.track.addPaymentMethod({paymentMethodName:(s=o.message.payload.data.value)==null?void 0:s.type}),xl=!0,this.sdk.debug.verbose("Fired add payment method due to stripe message",{payload:o})):this.sdk.debug.verbose("Not firing add payment method due to stripe message as auto tracking not enabled",{payload:o})))}catch(a){this.sdk.debug.warn("Hooks - onPageReady - stripe message event failed to handle",{event:t,err:a})}}}));let e=yield this.sdk.handlers.getViewContext();e&&this.sdk.handlers.setViewContext(e),yield this.sdk.util.queue.startProcessingStandardMethods(),document.readyState==="complete"||document.readyState==="interactive"?setTimeout(()=>h(this,null,function*(){yield this.sdk.attribution.applyCrossDomainTrackingToDom()}),1):document.addEventListener("DOMContentLoaded",()=>h(this,null,function*(){yield this.sdk.attribution.applyCrossDomainTrackingToDom()})),this.onViewLayoutChange(),setTimeout(()=>this.onViewLayoutChange(),4e3)})}onViewContextSet(e){return h(this,null,function*(){this.sdk.debug.verbose("Hooks - onViewContextSet",e);let t=[];for(let i in this.sdk.lib.analytics.plugins){let n=this.sdk.lib.analytics.plugins[i];if(n.getPlugin){let s=n.getPlugin();s&&s.onViewContextSet&&t.push(s.onViewContextSet(e))}}yield Promise.all(t)})}onOrderSuccessPageView(){return h(this,null,function*(){let e=yield this.sdk.handlers.getCart();e?(this.sdk.debug.verbose("Hooks - onOrderSuccessPageView - auto collecting order activity."),yield this.sdk.track.order(e)):this.sdk.debug.warn("Hooks - onOrderSuccessPageView - cannot fire as handlers.getCart not implemented or returned an empty cart.")})}mediateWindowPostMessage(e){var t,i,n;if(this.windowPostMessageMediator||(t=this.sdk.config.tracking.processing)!=null&&t.mediateBrowserMethodsToWindowReference){let s=this.windowPostMessageMediator||((i=this.sdk.config.tracking.processing)!=null&&i.mediateBrowserMethodsToWindowReference?ft(window,this.sdk.config.tracking.processing.mediateBrowserMethodsToWindowReference):void 0);if(s){this.sdk.debug.verbose("Hooks - mediating window post message",e);try{s(xo,e),this.windowPostMessageMediator||(this.windowPostMessageMediator=s,this.sdk.debug.verbose("Hooks - stored reference to to post message mediator",{ref:(n=this.sdk.config.tracking.processing)==null?void 0:n.mediateBrowserMethodsToWindowReference}))}catch(o){this.sdk.debug.error("Hooks - Failed to mediate window post message",{err:o,payload:e})}}}}publishEvent(e,t){t||(t={}),t.scope={key:this.sdk.config.scopeKey,description:this.sdk.config.scopeDescription},r.publishEventGlobal(e,t),this.sdk.debug.verbose(`Hooks - published event converge.${e.toString()}`,{payload:{detail:t}})}static publishEventGlobal(e,t){let i="converge."+e.toString(),n=new CustomEvent(i,{detail:t});window.dispatchEvent(n),window.self!==window.top&&window.parent&&document&&document.referrer&&window.parent.postMessage({source:"seeka",eventName:i,detail:t},document.referrer)}};var Qn=class{constructor(){l(this,"retrieveActivityIdentifier")}},zn=class{constructor(e){l(this,"sdk");l(this,"definitionHelper");l(this,"pageViewFiredForUrlCache",[]);this.sdk=e,this.definitionHelper=new nt(this.sdk)}activityFirePreconditionCheck(e,t,i,n){return h(this,null,function*(){var s,o;if(this.sdk.config.isDisabled)return!1;if(!this.sdk.status.isInitialised||this.sdk.status.isIntialiseInFlight||!this.sdk.lib.analytics){this.sdk.debug.verbose("SDK not initialised so pushing tracking on queue",{activityName:e,activity:t,props:i});let a=null,c=[];switch(e){case"addPaymentMethod":a=this.sdk.track.addPaymentMethod,c=[t,i,n];break;case"addToWishlist":a=this.sdk.track.addToWishlist,c=[i,n];break;case"custom":a=this.sdk.track.custom,c=[t,i,n];break;case"startTrial":a=this.sdk.track.startTrial,c=[t,i,n];break;case"order":a=this.sdk.track.order,c=[t,i,n];break;case"subscriptionItemPurchase":a=this.sdk.track.subscriptionItemPurchase,c=[t,i,n];break;case"initiateCheckout":a=this.sdk.track.initiateCheckout,c=[t,i,n];break;case"addToCart":a=this.sdk.track.addToCart,c=[t,i,n];break;case"removeFromCart":a=this.sdk.track.removeFromCart,c=[t,i,n];break;case"viewProduct":a=this.sdk.track.viewProduct,c=[t,i,n];break;case"viewPage":a=this.sdk.track.viewPage,c=[i,n];break;case"applyPromotionalCode":a=this.sdk.track.applyPromotionalCode,c=[t,i,n];break;case"keywordSearch":a=this.sdk.track.keywordSearch,c=[t,i,n];break;case"userLoginSignup":a=this.sdk.track.userLoginSignup,c=[t,i,n];break;case"userLogin":a=this.sdk.track.userLogin,c=[t,i,n];break;case"newsletterSignup":a=this.sdk.track.newsletterSignup,c=[t,i,n];break;case"lead":a=this.sdk.track.lead,c=[t,i,n];break;case"contactMessage":a=this.sdk.track.contactMessage,c=[t,i,n];break;case"schedule":a=this.sdk.track.schedule,c=[t,i,n];break;case"viewContentItem":a=this.sdk.track.viewContentItem,c=[t,i,n];break}return a!=null?this.sdk.util.queue.addMethodCallToQueue(a,this.sdk.track,c,!0,!1):this.sdk.debug.warn("SDK not initialised and not able to push tracking to queue",{activityName:e,activity:t,props:i}),!1}if(e==="viewPage"){let a=((o=(s=this.sdk.dataLayer.window.location())==null?void 0:s.href)==null?void 0:o.split("#")[0])||"";if(a&&this.pageViewFiredForUrlCache.indexOf(a)>-1)return this.sdk.debug.verbose("Page view already fired for this URL so not firing again",{activityName:e,activity:t,props:i,scope:this.sdk.config.scopeKey}),!1;this.sdk.debug.verbose("Page view not fired, firing",{thisPageViewUrl:a,scope:this.sdk.config.scopeKey}),this.pageViewFiredForUrlCache.push(a)}return!0})}onBeforeActivityTrack(e,t,i,n){return h(this,null,function*(){let s=i||{};if(s.activityIdentifier||(s.activityIdentifier=yield this.retrieveActivityIdentifier(e,t,i),this.sdk.debug.verbose("ActivitySdk.onBeforeActivityTrack - automatically generated activity identifier as it was not provided in the activity",{activityName:e,activity:t,outputProps:s,originalProps:y({},i)})),(e=="addPaymentMethod"||e=="addToWishlist"||e=="initiateCheckout"||e=="oneTimeItemPurchase"||e=="subscriptionItemPurchase"||e=="order")&&(t||(t={}),t.products||(t.products=[]),t=this.sdk.util.sanitise.order(t),t.products.length===0)){let o=yield this.sdk.handlers.getCart();o&&(t=H(y(y({},t),o),{products:o.products}))}if(e=="addPaymentMethod"||e=="addToCart"||e=="addToWishlist"||e=="initiateCheckout"||e=="custom"||e=="lead"||e=="contactMessage"||e=="schedule"||e=="newsletterSignup"||e=="startTrial"||e=="oneTimeItemPurchase"||e=="order"||e=="removeFromCart"||e=="userLogin"||e=="userLoginSignup"){let o=yield this.sdk.handlers.getLoggedInUser();o&&(yield this.sdk.identity.mergeProfile(o))}return{activity:t,props:s,metadata:n}})}onAfterActivitySanitise(e,t,i,n){return h(this,null,function*(){let s=yield this.sdk.activity.validateActivityAndSetDefaults(e,t,i);i=s.props,t=s.activity,this.sdk.hooks.mediateWindowPostMessage({api:"track",method:e,params:[t,i,n]});let o=e=="custom"?{activityNameCustom:t}:y({},t),a=e=="custom"?H(y({},i),{activityNameCustom:t}):y({},i);return this.sdk.hooks.publishEvent("activity.tracked",{activityName:e,activity:o,props:a,metadata:n}),{activity:t,props:i,metadata:n}})}validateActivityAndSetDefaults(e,t,i,n){return h(this,null,function*(){var c;let s=i||{},o={activityName:e,provided:t?this.sdk.util.parse.cloneDeep(t):void 0,props:i,messages:[]},a=`Activity validation - ${e} -`;if(e=="order"){let d=t;if(!d)return this.sdk.debug.warn(`${a} activity properties not provided`,o),{activity:t,props:s,metadata:n};!d.orderIdentifier&&!d.orderNumber&&o.messages.push("orderIdentifier and orderNumber not provided when one is required")}if(e=="order"||e=="addPaymentMethod"||e=="initiateCheckout"){let d=t;if(!d)return this.sdk.debug.warn(`${a} order property not provided`,o),{activity:t,props:s,metadata:n};if(!d.products||d.products.length===0)o.messages.push("products array not provided");else for(let f=0;f<d.products.length;f++){let u=d.products[f],m=this.validateProductActivityAndSetDefaults(u,f,d.currencyCode,!0);if(d.products[f]=m.product,m.messages)for(let g in m.messages)Object.prototype.hasOwnProperty.call(m.messages,g)&&o.messages.push(m.messages[g])}d.currencyCode||((c=this.sdk.config.tracking.defaults)!=null&&c.currencyCode?(d.currencyCode=this.sdk.config.tracking.defaults.currencyCode,o.messages.push(`transaction currencyCode not provided so using default currency code ${this.sdk.config.tracking.defaults.currencyCode} in SDK config`)):o.messages.push("transaction currencyCode not provided and no default currency code set in SDK config")),d.totalPrice||(!d.products||d.products.length===0?o.messages.push("totalPrice not provided and could not calculate total due to no products being provided"):(d.totalPrice=this.sdk.util.parse.parseMoney(d.products.map(f=>(f.unitPrice||0)*(f.quantity||1)).reduce((f,u)=>f+u,0)),d.totalTax&&!isNaN(d.totalTax)&&(d.totalPrice+=this.sdk.util.parse.parseMoney(d.totalTax)),d.totalShippingPrice&&!isNaN(d.totalShippingPrice)&&(d.totalPrice+=this.sdk.util.parse.parseMoney(d.totalShippingPrice)),d.totalPrice=this.sdk.util.parse.parseMoney(d.totalPrice)))}if(e=="addPaymentMethod"){let d=t;if(!d)return this.sdk.debug.warn(`${a} order property not provided`,o),{activity:t,props:s,metadata:n};d.paymentMethodName||o.messages.push("paymentMethodName not provided")}if(e=="viewProduct"||e=="addToCart"||e=="removeFromCart"||e=="addToWishlist"){let d=t;if(!d)return this.sdk.debug.warn(`${a} product not provided`,o),{activity:t,props:s,metadata:n};let f=e=="addToCart"||e=="removeFromCart",u=this.validateProductActivityAndSetDefaults(d,void 0,void 0,f);if(t=u.product,u.messages)for(let m in u.messages)Object.prototype.hasOwnProperty.call(u.messages,m)&&o.messages.push(u.messages[m])}if(e=="applyPromotionalCode"){let d=t;d!=null&&d.code||o.messages.push("code not provided")}if(e=="keywordSearch"){let d=t;d!=null&&d.searchText||o.messages.push("searchText not provided")}if(e=="userLogin"||e=="userLoginSignup"||e=="newsletterSignup"){let d=t;if(!d)return this.sdk.debug.warn(`${a} activity properties not provided`,o),{activity:t,props:s,metadata:n};(!d.userAccountIdentifierValue&&d.userAccountIdentifierTypeName||d.userAccountIdentifierValue&&!d.userAccountIdentifierTypeName)&&o.messages.push("userAccountIdentifierValue and userAccountIdentifierTypeName should be provided together"),!d.userAccountIdentifierValue&&!d.userAccountIdentifierTypeName&&!d.emailAddress&&o.messages.push("either emailAddress or (userAccountIdentifierValue and userAccountIdentifierTypeName) was not provided")}return o.messages.length>0&&this.sdk.debug.warn(`${a} failed`,o),{activity:t,props:s,metadata:n}})}isActivityMatchedToFilter(e,t,i,n,s){return Rn(e,{activityName:i,activity:{},props:n,metadata:s},this.sdk.debug.createTrackingSource(`sdk/js/activity/${t}/track`))}validateProductActivityAndSetDefaults(e,t,i,n){var c;let s=[],o=t!=null?"product #"+(t+1)+" - ":"product ",a=e.type=="collection";return!a&&!e.currencyCode&&(i?e.currencyCode=i:(c=this.sdk.config.tracking.defaults)!=null&&c.currencyCode?(e.currencyCode=this.sdk.config.tracking.defaults.currencyCode,s.push(`${o}currencyCode not provided so using default currency code ${this.sdk.config.tracking.defaults.currencyCode} in SDK config`)):s.push(`${o}currencyCode not provided and no default currency code set in SDK config`)),!a&&(e.unitPrice===void 0||e.unitPrice===null)&&s.push(`${o}unitPrice not provided`),!a&&n&&(e.quantity===null||e.quantity===void 0?(s.push(`${o}quantity not provided. setting quantity to 1`),e.quantity=1):e.quantity<=0&&(s.push(`${o}quantity provided as less than or equal to 0. setting quantity to 1`),e.quantity=1)),!e.productName&&!e.variantName&&s.push(`${o}productName and variantName not provided but one is required`),!a&&!e.sku&&!e.productIdentifier&&!e.variantIdentifier&&s.push(`${o}sku, productIdentifier and variantIdentifier not provided but one is required`),{product:e,messages:s}}retrieveActivityIdentifier(e,t,i,n){return h(this,null,function*(){var s;if((s=this.sdk.config.activity)!=null&&s.retrieveActivityIdentifier){let o=yield this.sdk.config.activity.retrieveActivityIdentifier(e,t,i);if(!o)this.sdk.debug.warn("ActivitySdk.retrieveActivityIdentifier was called but returned an empty or null identifier. Will generate a random identifier.",{activityName:e,activity:t,props:i});else return o}return yield this.generateRandomActivityIdentifier(e,t,i)})}generateRandomActivityIdentifier(e,t,i){return h(this,null,function*(){let n=t==null?void 0:t.orderNumber;return n||(n=t==null?void 0:t.orderIdentifier),n?`${e}_${n}`:In()})}queueCollectionOfAutomaticActivities(){this.sdk.util.queue.addMethodCallToQueue(()=>h(this,null,function*(){var e,t,i;(t=(e=this.sdk.config.tracking.analytics)==null?void 0:e.autoCollection)!=null&&t.activityNames&&((i=this.sdk.config.tracking.analytics)==null?void 0:i.autoCollection.activityNames.indexOf("viewPage"))>-1&&(yield this.sdk.track.viewPage())}),this,[],!0,!1),this.sdk.util.queue.addMethodCallToQueue(()=>h(this,null,function*(){var e,t,i,n,s,o;!ne&&((e=this.sdk.config.tracking.analytics)!=null&&e.autoCollection)&&((t=this.sdk.config.tracking.analytics)!=null&&t.autoCollection.orderSuccessUrlPathMatchRegex)&&this.sdk.util.url.isUrlMatch(this.sdk.dataLayer.window.location().pathname,this.sdk.config.tracking.analytics.autoCollection.orderSuccessUrlPathMatchRegex)&&(this.sdk.debug.verbose("Order status page detected based on URL regex",(i=this.sdk.config.tracking.analytics)==null?void 0:i.autoCollection.orderSuccessUrlPathMatchRegex),(s=(n=this.sdk.config.tracking.analytics)==null?void 0:n.autoCollection)!=null&&s.activityNames&&((o=this.sdk.config.tracking.analytics)==null?void 0:o.autoCollection.activityNames.indexOf("order"))>-1&&(yield this.sdk.track.order()))}),this,[],!0,!1),this.sdk.util.queue.addMethodCallToQueue(()=>h(this,null,function*(){var e,t,i;if((t=(e=this.sdk.config.tracking.analytics)==null?void 0:e.autoCollection)!=null&&t.activityNames&&((i=this.sdk.config.tracking.analytics)==null?void 0:i.autoCollection.activityNames.indexOf("viewProduct"))>-1){let n=yield this.sdk.handlers.getCurrentProduct();n&&(yield this.sdk.track.viewProduct(n))}}),this,[],!0,!1),this.sdk.util.queue.addMethodCallToQueue(()=>h(this,null,function*(){var e,t,i;if((t=(e=this.sdk.config.tracking.analytics)==null?void 0:e.autoCollection)!=null&&t.activityNames&&((i=this.sdk.config.tracking.analytics)==null?void 0:i.autoCollection.activityNames.indexOf("keywordSearch"))>-1){let n=yield this.sdk.handlers.getCurrentSearchContext();if(n&&n.searchText)yield this.sdk.track.keywordSearch(n);else if(!ne){let s=this.sdk.config.tracking.analytics.autoCollection.keywordSearchQueryParamName||"q",o=this.sdk.util.url.getParamFromQueryString(s,this.sdk.dataLayer.window.location().href);o&&(yield this.sdk.track.keywordSearch({searchText:o}))}}}),this,[],!0,!1),this.sdk.util.queue.addMethodCallToQueue(()=>h(this,null,function*(){yield this.definitionHelper.processCustomActivityDefinitions()}),this,[],!0,!1)}};var Yn=class{constructor(e){l(this,"sdk");l(this,"stateKeyPrefix","attr.");l(this,"stateKeys",{lastTouchCampaign:"camp.last"});this.sdk=e}addCrossDomainTracking(e,t){if(ne||!this.sdk||!e||!e.startsWith("https://")&&!e.startsWith("http://"))return e;let i=e+"";if(this.sdk.identity&&this.sdk.identity.personId&&(i.includes("sk.pid")||(i=`${i}${i.includes("?")?"&":"?"}sk.pid=${this.sdk.identity.personId}`),i.includes("sk.sid")||(i=`${i}${i.includes("?")?"&":"?"}sk.sid=${this.sdk.identity.touchAndGetSessionId()}`)),t&&t!=="none"){if(i.includes("utm_"))this.sdk.debug.verbose("Attribution.addCrossDomainTracking.utmParamsAlreadyPresent",{url:i});else if(t==="urlPassthrough"){let n=this.getCurrentTouchCampaign();n&&(i=this.addUtmTrackingToUrl(i,n),this.sdk.debug.verbose("Attribution.addCrossDomainTracking.utmParamsAdded."+t,{url:i,utmParams:n,utmBehavior:t}))}else if(t==="sessionPassthrough"){let n=this.getLastTouchCampaign();n&&(i=this.addUtmTrackingToUrl(i,n),this.sdk.debug.verbose("Attribution.addCrossDomainTracking.utmParamsAdded."+t,{url:i,utmParams:n,utmBehavior:t}))}}return(this.sdk.config.plugins||[]).forEach(n=>{if(n){if(n.addCrossDomainTrackingQuery)try{let s=n.addCrossDomainTrackingQuery();s&&s.forEach((o,a)=>{a&&!i.includes(`${a}=`)&&(i=`${i}${i.includes("?")?"&":"?"}${a}=${o}`)})}catch(s){this.sdk.debug.error("Attribution.addCrossDomainTrackingQuery.pluginError",{plugin:n,error:s})}if(n.addCrossDomainTracking)try{i=n.addCrossDomainTracking(i)}catch(s){this.sdk.debug.error("Attribution.addCrossDomainTracking.pluginError",{plugin:n,error:s})}}}),i}addUtmTrackingToUrl(e,t){if(!e||!t)return e;let i=e+"";return t.id&&(i=`${i}${i.includes("?")?"&":"?"}utm_id=${t.id}`),t.content&&(i=`${i}${i.includes("?")?"&":"?"}utm_content=${t.content}`),t.source&&(i=`${i}${i.includes("?")?"&":"?"}utm_source=${t.source}`),t.campaign&&(i=`${i}${i.includes("?")?"&":"?"}utm_campaign=${t.campaign}`),t.term&&(i=`${i}${i.includes("?")?"&":"?"}utm_term=${t.term}`),t.medium&&(i=`${i}${i.includes("?")?"&":"?"}utm_medium=${t.medium}`),i}getCurrentTouchCampaign(){if(ne)return;let e=this.sdk.dataLayer.window.location(),t=this.sdk.util.url.getParamFromQueryString("utm_id",e.href),i=this.sdk.util.url.getParamFromQueryString("utm_content",e.href),n=this.sdk.util.url.getParamFromQueryString("utm_source",e.href)||this.sdk.util.url.getParamFromQueryString("source",e.href),s=this.sdk.util.url.getParamFromQueryString("utm_campaign",e.href)||this.sdk.util.url.getParamFromQueryString("campaign",e.href),o=this.sdk.util.url.getParamFromQueryString("utm_term",e.href)||this.sdk.util.url.getParamFromQueryString("term",e.href),a=this.sdk.util.url.getParamFromQueryString("utm_medium",e.href)||this.sdk.util.url.getParamFromQueryString("medium",e.href),c=this.sdk.util.url.getParamFromQueryString("fbclid",e.href);if(t||(t=this.sdk.util.url.getParamFromQueryString("campaign_id",e.href)),i||(i=this.sdk.util.url.getParamFromQueryString("ad_name",e.href)),n||(n=this.sdk.util.url.getParamFromQueryString("placement",e.href)),s||(s=this.sdk.util.url.getParamFromQueryString("campaign_name",e.href)),t||i||n||s||o||a)return!a&&c&&(a="cpc"),!n&&c&&(n="fb"),{id:t,content:i,source:n,campaign:s,term:o,medium:a}}setLastTouchCampaign(e){let t=this.getLastTouchCampaign();!this.isCampaignDataEqual(t,e)?(this.sdk.state.set(this.stateKeyPrefix+this.stateKeys.lastTouchCampaign,e),this.sdk.debug.verbose("Attribution.setLastTouchCampaign.wasChanged",{key:this.stateKeyPrefix+this.stateKeys.lastTouchCampaign,value:e})):this.sdk.debug.verbose("Attribution.setLastTouchCampaign.unchanged",{key:this.stateKeyPrefix+this.stateKeys.lastTouchCampaign,value:e})}getLastTouchCampaign(){return this.sdk.state.get(this.stateKeyPrefix+this.stateKeys.lastTouchCampaign)}isCampaignDataEqual(e,t){if(!e&&!t)return!0;let i=!e;return e&&((e.id!==(t==null?void 0:t.id)||!e.id&&(t!=null&&t.id))&&(i=!0),(e.content!==(t==null?void 0:t.content)||!e.content&&(t!=null&&t.content))&&(i=!0),(e.source!==(t==null?void 0:t.source)||!e.source&&(t!=null&&t.source))&&(i=!0),(e.campaign!==(t==null?void 0:t.campaign)||!e.campaign&&(t!=null&&t.campaign))&&(i=!0),(e.term!==(t==null?void 0:t.term)||!e.term&&(t!=null&&t.term))&&(i=!0),(e.medium!==(t==null?void 0:t.medium)||!e.medium&&(t!=null&&t.medium))&&(i=!0)),!i}applyCrossDomainTrackingToDom(){return h(this,null,function*(){var e,t;try{let i=((t=(e=this.sdk.config.tracking.analytics)==null?void 0:e.crossDomain)==null?void 0:t.rules)||[];if(!i||i.length===0)return;let n=this.sdk.dataLayer.window.location();if(!n||!n.hostname)return;let s=gt(n.href,!1),o=gt(n.href,!0);yield Promise.all(i.map(a=>h(this,null,function*(){if(!a||!a.sourceHostname||!a.destinationLink||!a.destinationLink.matchValue||!a.destinationLink.operator)return;if(!it(a.sourceHostname,s,this.sdk)&&!it(a.sourceHostname,o,this.sdk)){this.sdk.debug.verbose("Attribution.applyCrossDomainTracking.sourceHostname.noMatch",{rule:a,sourceDomain:s});return}let c={elementTypes:["a"],linkUrlMatch:a.destinationLink};this.sdk.debug.verbose("Attribution.applyCrossDomainTracking.sourceHostname.match",{rule:a,sourceDomain:s,locator:c});let d=nt.getDocumentElementsFromLocator(c,this.sdk);if(!d||d.length===0){this.sdk.debug.verbose("Attribution.applyCrossDomainTracking.destinationLink.match.noLinks",{rule:a,sourceDomain:s,locator:c});return}else this.sdk.debug.verbose("Attribution.applyCrossDomainTracking.destinationLink.match.foundLinks",{rule:a,sourceDomain:s,locator:c,links:d}),d.forEach(f=>{var m,g;let u=(m=f.attributes.getNamedItem("data-sk-link-xdomain"))==null?void 0:m.value;if(u){this.sdk.debug.verbose("Attribution.applyCrossDomainTracking.destinationLink.match.alreadyAdded",{href:f.href,ruleId:u});return}if(f.href){let p=f.href+"";f.href=this.addCrossDomainTracking(f.href,(g=a.utm)==null?void 0:g.behavior),f.setAttribute("data-sk-link-xdomain",a.id||"no-id"),this.sdk.debug.verbose("Attribution.applyCrossDomainTracking.destinationLink.match.foundLinks.addedTracking",{rule:a,sourceDomain:s,locator:c,link:f,before:p,after:f.href})}})})))}catch(i){this.sdk.debug.error("Attribution.applyCrossDomainTracking.error",{error:i})}})}};var ti=class{constructor(){l(this,"window",{location:()=>{var e,t,i;return ne?void 0:((i=(t=(e=window.Seeka)==null?void 0:e.context)==null?void 0:t.window)==null?void 0:i.location)||window.location},localStorage:()=>{var e,t,i;return ne?void 0:((i=(t=(e=window.Seeka)==null?void 0:e.context)==null?void 0:t.window)==null?void 0:i.localStorage)||window.localStorage},sessionStorage:()=>{var e,t,i;return ne?void 0:((i=(t=(e=window.Seeka)==null?void 0:e.context)==null?void 0:t.window)==null?void 0:i.sessionStorage)||window.sessionStorage}});l(this,"document",{referrer:()=>{var e,t,i;return ne?void 0:((i=(t=(e=window.Seeka)==null?void 0:e.context)==null?void 0:t.document)==null?void 0:i.referrer)||document.referrer},title:()=>{var e,t,i;return ne?void 0:((i=(t=(e=window.Seeka)==null?void 0:e.context)==null?void 0:t.document)==null?void 0:i.title)||document.title}});l(this,"navigator",{userAgent:()=>{var e,t,i;return ne?void 0:((i=(t=(e=window.Seeka)==null?void 0:e.context)==null?void 0:t.navigator)==null?void 0:i.userAgent)||navigator.userAgent},language:()=>{var e,t,i;return ne?void 0:((i=(t=(e=window.Seeka)==null?void 0:e.context)==null?void 0:t.navigator)==null?void 0:i.language)||navigator.language}})}};var Ui=class{constructor(){l(this,"getCart");l(this,"getCurrentProduct");l(this,"getLoggedInUser");l(this,"getViewContext");l(this,"getCurrentSearchContext");l(this,"getCurrentConsent")}},Zn=class{constructor(e){l(this,"sdk");l(this,"viewContext");this.sdk=e}getCart(){return h(this,null,function*(){var e;if(window.Seeka&&window.Seeka.context&&window.Seeka.context.cart)return window.Seeka.context.cart;if((e=this.sdk.config.handlers)!=null&&e.getCart){let t=yield this.sdk.config.handlers.getCart();if(t)return this.sdk.debug.verbose("HandlersSdk.getCart",t),t;this.sdk.debug.verbose("HandlersSdk.getCart","produced an empty result")}else this.sdk.debug.verbose("HandlersSdk.getCart","was called but is not defined on ConvergeSdkConfiguration.HandlersSdkConfiguration and data layer empty")})}getCurrentProduct(){return h(this,null,function*(){var e;if(window.Seeka&&window.Seeka.context&&window.Seeka.context.product)return window.Seeka.context.product;if((e=this.sdk.config.handlers)!=null&&e.getCurrentProduct){let t=yield this.sdk.config.handlers.getCurrentProduct();if(t)return this.sdk.debug.verbose("HandlersSdk.getCurrentProduct",t),t;this.sdk.debug.verbose("HandlersSdk.getCurrentProduct","produced an empty result")}else this.sdk.debug.verbose("HandlersSdk.getCurrentProduct","was called but is not defined on ConvergeSdkConfiguration.HandlersSdkConfiguration and data layer empty")})}getCurrentSearchContext(){return h(this,null,function*(){var e;if(window.Seeka&&window.Seeka.context&&window.Seeka.context.search)return window.Seeka.context.search;if((e=this.sdk.config.handlers)!=null&&e.getCurrentSearchContext){let t=yield this.sdk.config.handlers.getCurrentSearchContext();if(t)return this.sdk.debug.verbose("HandlersSdk.getCurrentSearchContext",t),t;this.sdk.debug.verbose("HandlersSdk.getCurrentSearchContext","produced an empty result")}})}getLoggedInUser(){return h(this,null,function*(){var e;if(window.Seeka&&window.Seeka.context&&window.Seeka.context.user)return window.Seeka.context.user;if((e=this.sdk.config.handlers)!=null&&e.getLoggedInUser){let t=yield this.sdk.config.handlers.getLoggedInUser();if(t)return this.sdk.debug.verbose("HandlersSdk.getLoggedInUser",t),t;this.sdk.debug.verbose("HandlersSdk.getLoggedInUser","produced an empty result")}else this.sdk.debug.verbose("HandlersSdk.getLoggedInUser","was called but is not defined on ConvergeSdkConfiguration.HandlersSdkConfiguration")})}getViewContext(){return h(this,null,function*(){var e;if((e=this.sdk.config.handlers)!=null&&e.getViewContext){let t=yield this.sdk.config.handlers.getViewContext();if(t)return this.sdk.debug.verbose("HandlersSdk.getViewContext",t),t;this.sdk.debug.verbose("HandlersSdk.getViewContext","produced an empty result")}else{if(this.viewContext)return this.viewContext;this.sdk.debug.verbose("HandlersSdk.getViewContext","was called but is not defined on ConvergeSdkConfiguration.HandlersSdkConfiguration and HandlersSdk.setViewContext was not previously called.")}})}setViewContext(e){this.viewContext=e,this.sdk.hooks.onViewContextSet(e)}};var Ve={browserId:"bId",personId:"pId",sessionId:"sId",sessionLastTouch:"sIdTouch",audienceMemberId:"aMId"},xe="id.",Bi="id.trait.",Co=r=>{let e=Pn(r),t=Ni();return`${e}.${t}`},Ao=r=>{if(!r)return!1;let e=r.split(".");return!(e.length!=4||e[0]!="sk"||e[1]!="1"||Number.isNaN(Number(e[2]))||Number.isNaN(Number(e[3])))},Cl=(r,e,t,i,n,s,o,a)=>{var p,v,I;Po(i,t,s,o,r);let c=i.get(xe+Ve.browserId,"org");if((!c||c.length===0)&&(c=e.seekaBId||null),!c){let b=n.getSeekaOrgCookie("sk_bid");if(b)try{c=JSON.parse(b)}catch(w){o("Failed to parse seekaBId cookie",w)}}let d=null;r&&(d=Se("skpid",r)||Se("sk.pid",r),d&&(Ao(d)?s("Using provided person ID as per query string parameter sk.pid",{urlProvidedPersonId:d}):(d=null,a("Not using provided person ID as per query string parameter sk.pid as it is not formatted correctly",{urlProvidedPersonId:d}))));let f=d||i.get(xe+Ve.personId,"org")||n.getSeekaOrgCookie("sk_pid")||((I=(v=(p=window.Seeka)==null?void 0:p.context)==null?void 0:v.user)==null?void 0:I.seekaPId)||e.seekaPId;f||(f=e.seekaPId);let u=!1,m=!1;if(c&&c.length>0&&s("Using previously assigned seekaBId",c),f&&s("Using previously assigned seekaPId",f),f&&(!c||c.length==0)&&(c=[f],u=!0,s("Assigned seekaBId from seekaPId")),!f&&c&&c.length>0&&(f=En(c),m=!0,s("Assigned seekaPId from earliest seekaBId")),!f){let b=wn();s("Assigned new seekaPId",b),f=b,m=!0}(!c||c.length==0)&&(c=[f],u=!0,s("Assigned seekaBId from new seekaPId",f)),u&&(e.seekaBId=c),m&&(e.seekaPId=f),So(e,i,n,s),e.seekaBId=c,e.seekaPId=f;let g={personId:f,browserId:c,newIdentifiers:e};return s("Using identifiers",e),g},Po=(r,e,t,i,n)=>{var s,o;try{let a=n?Se("sk.sid",n):null;a&&r.set(xe+Ve.sessionId,a,"global");let c=a||r.get(xe+Ve.sessionId,"global")||((o=(s=window.Seeka)==null?void 0:s.context)==null?void 0:o.sess)||null,d=r.get(xe+Ve.sessionLastTouch,"global"),f=d?new Date(d):new Date,u=!1;if(c&&f!=null){let m=e||1800,g=Sn(c),p=new Date(new Date(f).setSeconds(f.getSeconds()+m));f!=null&&p<=new Date?(t("Identity.session.touchAndGetSessionId.sessionTimedOut",{maxSecondsForSession:m,currentSessionLastTouched:f,currentSessionCreatedAt:g,currentSessionTimeOutAt:p,currentSessionId:c}),u=!0):t("Identity.session.touchAndGetSessionId.useExistingSession",{maxSecondsForSession:m,currentSessionLastTouched:f,currentSessionCreatedAt:g,currentSessionTimeOutAt:p,currentSessionId:c})}else c||(u=!0);if(u){let m=Co(new Date);r.set(xe+Ve.sessionId,m,"global"),t("Identity.session.touchAndGetSessionId.sessionCreated",{currentSessionId:c,newSessionId:m,currentSessionLastTouched:f}),c=m}return r.set(xe+Ve.sessionLastTouch,new Date().toISOString(),"global"),c}catch(a){return i("Identity.session.touchAndGetSessionId failed",a),""}},So=(r,e,t,i)=>{r.seekaBId&&(e.set(xe+Ve.browserId,r.seekaBId,"org"),t.setSeekaOrg("sk_bid",JSON.stringify(r.seekaBId),void 0),i("Identity.setStatePersistedIdentifiers.seekaBId",{key:xe+Ve.browserId,value:r.seekaBId})),r.seekaPId&&(e.set(xe+Ve.personId,r.seekaPId,"org"),t.setSeekaOrg("sk_pid",r.seekaPId,void 0),i("Identity.setStatePersistedIdentifiers.seekaPId",{key:xe+Ve.browserId,value:r.seekaPId}))};var Fi={measureAdvertisingPerformance:7};var Xn=class{constructor(e){l(this,"sdk");l(this,"identifiers");l(this,"profileChangeCounter",0);l(this,"device",{});l(this,"personId");l(this,"flushIdentitySyncQueue",()=>h(this,null,function*(){yield this.syncIdentityDebounced.flush()}));l(this,"syncIdentityDebounced",cr(()=>h(this,null,function*(){yield this.syncIdentity("sdk/js/profile/change")}),1500,{maxWait:1500}));var t,i,n,s,o,a;this.sdk=e,(i=(t=window.Seeka)==null?void 0:t.context)!=null&&i.user&&this.sdk.debug.verbose("Identity - Initialising from window.Seeka.context.user",window.Seeka.context.user),this.identifiers=(s=(n=window.Seeka)==null?void 0:n.context)!=null&&s.user?y({},(a=(o=window.Seeka)==null?void 0:o.context)==null?void 0:a.user):{},this.ensureTraitsNotNull()}isValidSeekaPersonId(e){return Ao(e)}getOrAssign(){var i,n,s,o;let e=(s=(n=(i=this.sdk.config.tracking)==null?void 0:i.analytics)==null?void 0:n.identity)==null?void 0:s.userSessionTimeoutSeconds,t=Cl((o=this.sdk.dataLayer.window.location())==null?void 0:o.href,this.identifiers,e,this.sdk.state,this.sdk.util.cookie,(a,c)=>this.sdk.debug.verbose(a,c),(a,c)=>this.sdk.debug.error(a,c),(a,c)=>this.sdk.debug.warn(a,c));return this.identifiers=y({},t.newIdentifiers),this.personId=this.identifiers.seekaPId,{personId:t.personId,browserId:t.browserId}}reset(e){return h(this,null,function*(){if(this.identifiers={},this.personId=void 0,this.ensureTraitsNotNull(),e===!0){this.sdk.state.removeByPrefix(xe,"instance"),this.sdk.state.removeByPrefix(Bi,"instance"),this.sdk.state.removeByPrefix(xe,"global"),this.sdk.state.removeByPrefix(Bi,"global"),this.sdk.state.removeByPrefix(xe,"org"),this.sdk.state.removeByPrefix(Bi,"org");try{this.sdk.util.cookie.setSeekaOrg("sk_pid","",-1),this.sdk.util.cookie.setSeekaOrg("sk_bid","",-1)}catch(t){this.sdk.debug.error("Identity.reset failed to remove cookie",t)}}this.sdk.debug.verbose("Identity.reset",{resetStorage:e}),yield this.onProfileChanged()})}getTrait(e){return h(this,null,function*(){this.ensureTraitsNotNull();let t=this.sdk.state.get(Bi+e,"org")||[],i=this.sdk.util.parse.getNestedProperty(this.identifiers.traits,e);i&&Array.isArray(i)&&i.length>0&&(t=t.concat(i));let n=t&&t.length>0?t.filter(s=>s&&!0):null;return this.sdk.debug.verbose("Identity.getTrait."+e,n),n})}addTrait(e,t,i){return h(this,null,function*(){this.ensureTraitsNotNull();let n=(yield this.getTrait(e))||[],s=[].concat(n);s.push(t),this.sdk.debug.verbose("Identity.addTrait."+e,{before:n,new:s}),yield this.setTrait(e,s,i)})}setTrait(e,t,i){return h(this,null,function*(){this.ensureTraitsNotNull();let n=y({},this.identifiers),s=(yield this.getTrait(e))||[];this.identifiers.traits=this.sdk.util.parse.setNestedProperty(this.identifiers.traits,e,t),i&&this.sdk.state.set(Bi+e,t,"org"),s.length!==(t==null?void 0:t.length)?(this.sdk.debug.verbose("Identity.setTrait."+e,t),yield this.onProfileChanged()):this.sdk.debug.verbose("Identity.setTrait profile was not changed",this.identifiers)})}getProfile(){return this.sdk.debug.verbose("Identity.getProfile",this.identifiers),this.sanitiseProfile(this.identifiers)}setProfile(e){return h(this,null,function*(){try{let t=y({},this.identifiers);e=this.sanitiseProfile(e),this.identifiers=y({},e),this.personId=this.identifiers.seekaPId,this.ensureTraitsNotNull(),this.getOrAssign(),yield this.onProfileSet("setProfile",t,this.identifiers)}catch(t){this.sdk.debug.error("Identity.setProfile failed",t)}})}mergeTwoProfiles(e,t){let i=this.sanitiseProfile(Qt(e)),n=this.sanitiseProfile(Qt(t)),s=this.sdk.util.parse.mergeDeep(i,n);return s.shopify=this.sdk.util.parse.mergeDeep(i.shopify||{},n.shopify||{}),s.magento=this.sdk.util.parse.mergeDeep(i.magento||{},n.magento||{}),s.facebook=this.sdk.util.parse.mergeDeep(i.facebook||{},n.facebook||{}),s.snapchat=this.sdk.util.parse.mergeDeep(i.snapchat||{},n.snapchat||{}),s.tiktok=this.sdk.util.parse.mergeDeep(i.tiktok||{},n.tiktok||{}),s.google=this.sdk.util.parse.mergeDeep(i.google||{},n.google||{}),s.wooCommerce=this.sdk.util.parse.mergeDeep(i.wooCommerce||{},n.wooCommerce||{}),s.bigCommerce=this.sdk.util.parse.mergeDeep(i.bigCommerce||{},n.bigCommerce||{}),s.address=this.sdk.util.parse.mergeDeep(i.address||[],n.address||[]),s.consent=this.sdk.util.parse.mergeDeep(i.consent||{},n.consent||{}),s.seekaBId=Mi([...e.seekaBId||[],...t.seekaBId||[],e.seekaPId||"",t.seekaPId||""].filter(Boolean)).filter(o=>o!==s.seekaPId),s.traits=y(y({},i.traits),n.traits),y({},this.sanitiseProfile(s))}mergeProfile(e){return h(this,null,function*(){try{let t=Qt(y({},this.identifiers));this.identifiers=this.mergeTwoProfiles(this.identifiers,e),this.personId=this.identifiers.seekaPId,this.ensureTraitsNotNull(),yield this.onProfileSet("mergeProfile",t,this.identifiers)}catch(t){this.sdk.debug.error("Identity.mergeProfile failed",t)}})}onProfileSet(e,t,i){return h(this,null,function*(){this.personId=i.seekaPId,this.sdk.util.parse.isDeepEqual(t,i)?this.sdk.debug.verbose(`Identity.${e} identity was not changed`,i):(this.sdk.debug.log(`Identity.${e} caused identity to change`,{previous:t,newlySet:i}),this.setStatePersistedIdentifiers(i),this.sdk.hooks.mediateWindowPostMessage({api:"identity",method:"mergeProfile",params:[i]}),yield this.onProfileChanged())})}setStatePersistedIdentifiers(e){So(e,this.sdk.state,this.sdk.util.cookie,(t,i)=>this.sdk.debug.verbose(t,i))}isAnonymous(e){return e?!(e.email&&e.email.length>0&&e.email[0]||e.phone&&e.phone.length>0&&e.phone[0]||e.firstName&&e.firstName.length>0&&e.firstName[0]||e.lastName&&e.lastName.length>0&&e.lastName[0]||e.address&&e.address.length>0&&e.address[0]&&e.address[0].addressLine1):!0}syncIdentity(e){return h(this,null,function*(){var i,n,s,o,a,c,d,f,u,m,g,p,v,I,b,w,E,A,S,T,D,O,j,G,N,K,te,Z,R,oe,ce,Fe,k,C,L,V,$,J,de;let t=!0;if(this.sdk.config.enablement&&(this.sdk.config.enablement==="browserOnlyDueToBillingFailure"||this.sdk.config.enablement==="noFeaturesEnabledDueToBillingFailure"||this.sdk.config.enablement==="noFeaturesEnabledDueToNoCurrentPlan"?(this.sdk.debug.warn("Billing - Restricted so not syncing identity from Seeka API"),t=!1):this.sdk.config.enablement==="browserOnlyDueToCurrentPlan"&&(this.sdk.debug.verbose("Billing - Browser only plan so not syncing identity from Seeka API"),t=!1)),t&&!((n=(i=this.sdk.config.tracking)==null?void 0:i.processing)!=null&&n.isIdentityDisabled)&&!this.sdk.config.isDisabled){let Q={logMetadata:{stream:!0,traits:{}}};try{Q={logMetadata:{stream:!0,traits:{email:!!((s=this.identifiers.email)!=null&&s.length),phone:!!((o=this.identifiers.phone)!=null&&o.length),firstName:!!((a=this.identifiers.firstName)!=null&&a.length),lastName:!!((c=this.identifiers.lastName)!=null&&c.length),facebook:{fbp:!!((f=(d=this.identifiers.facebook)==null?void 0:d.fbp)!=null&&f.length),fbc:!!((m=(u=this.identifiers.facebook)==null?void 0:u.fbc)!=null&&m.length),lead:!!((p=(g=this.identifiers.facebook)==null?void 0:g.lead)!=null&&p.length)},snapchat:{scid:!!((I=(v=this.identifiers.snapchat)==null?void 0:v.scid)!=null&&I.length),sccid:!!((w=(b=this.identifiers.snapchat)==null?void 0:b.sccid)!=null&&w.length)},tiktok:{ttclid:!!((A=(E=this.identifiers.tiktok)==null?void 0:E.ttclid)!=null&&A.length),ttp:!!((T=(S=this.identifiers.tiktok)==null?void 0:S.ttp)!=null&&T.length),lead:!!((O=(D=this.identifiers.tiktok)==null?void 0:D.lead)!=null&&O.length)},google:{gclid:!!((G=(j=this.identifiers.google)==null?void 0:j.gclid)!=null&&G.length),clientId:!!((K=(N=this.identifiers.google)==null?void 0:N.userClientId)!=null&&K.length)},consent:{marketing:{sms:!!(this.identifiers.consent&&this.identifiers.consent.marketing&&this.identifiers.consent.marketing.sms&&((Z=(te=this.identifiers.consent.marketing)==null?void 0:te.sms)!=null&&Z.consentGrantedAt||(oe=(R=this.identifiers.consent.marketing)==null?void 0:R.sms)!=null&&oe.consentNotGrantedAt)),email:!!(this.identifiers.consent&&this.identifiers.consent.marketing&&this.identifiers.consent.marketing.email&&((Fe=(ce=this.identifiers.consent.marketing)==null?void 0:ce.email)!=null&&Fe.consentGrantedAt||(C=(k=this.identifiers.consent.marketing)==null?void 0:k.email)!=null&&C.consentNotGrantedAt))},analytics:!!(this.identifiers.consent&&this.identifiers.consent.analytics&&((L=this.identifiers.consent.analytics)!=null&&L.consentGrantedAt||(V=this.identifiers.consent.analytics)!=null&&V.consentNotGrantedAt)),loyalty:!!(this.identifiers.consent&&this.identifiers.consent.loyalty&&(($=this.identifiers.consent.loyalty)!=null&&$.consentGrantedAt||(J=this.identifiers.consent.loyalty)!=null&&J.consentNotGrantedAt))}}}},this.identifiers.address&&this.identifiers.address.length>0&&(Q.logMetadata.traits.address={addressLine1:!!this.identifiers.address.find(W=>!!W.addressLine1),addressLine2:!!this.identifiers.address.find(W=>!!W.addressLine2),streetName:!!this.identifiers.address.find(W=>!!W.streetName),locality:!!this.identifiers.address.find(W=>!!W.locality),state:!!this.identifiers.address.find(W=>!!W.state),stateCode:!!this.identifiers.address.find(W=>!!W.stateCode),postcode:!!this.identifiers.address.find(W=>!!W.postcode),country:!!this.identifiers.address.find(W=>!!W.country),countryCode:!!this.identifiers.address.find(W=>!!W.countryCode)})}catch(W){console.warn("Error in logging identity traits",W)}if(this.sdk.privacy.isIabPurposesGranted([Fi.measureAdvertisingPerformance],"Seeka identity server push")){let W="Seeka - Server";if(this.sdk.debug.isOperationAllowed("profile push",W,Q)){yield this.sdk.convergeApi.ingest.push([],[{id:this.identifiers,src:this.sdk.debug.createTrackingSource(e)}],[],[]);try{this.sdk.debug.log(`${W} profile push`,Q)}catch(z){this.sdk.debug.error("Identity - failed to log identity sync",z)}}}return(de=this.sdk.dataLayer.window.sessionStorage())==null||de.setItem("sk.pid.last",new Date().getTime().toString()),this.identifiers}else return this.sdk.config.isDisabled||this.sdk.debug.warn("Cannot sync identity when isIdentityDisabled"),H(y({},this.identifiers),{seekaBId:[this.identifiers.seekaPId]})})}setSeekaPIdInput(e){try{if(!e)return;document.querySelectorAll("[data-q='seeka_id'], input[id='seekaProfileId'], input[name='seekaProfileId']").forEach(i=>{i.value=e})}catch(t){this.sdk.debug.error("Identity.setSeekaPIdInput failed",t)}}onProfileChanged(){return h(this,null,function*(){this.profileChangeCounter++;let e={profileChangeCounter:this.profileChangeCounter,identifiers:this.identifiers};this.sdk.debug.verbose("Identity.onProfileChanged (#"+this.profileChangeCounter+")",{eventPayload:e}),this.sdk.hooks.publishEvent("identity.changed",e),yield this.syncIdentityDebounced(),this.setSeekaPIdInput(this.identifiers.seekaPId),this.sdk.lib.analytics&&this.sdk.lib.analytics.identify&&(this.sdk.status.isInitialised?yield this.sdk.lib.analytics.identify(this.identifiers.seekaPId,{profile:this.identifiers}):this.sdk.util.queue.addMethodCallToQueue(this.sdk.lib.analytics.identify,this.sdk.lib.analytics,[this.identifiers.seekaPId,{profile:this.identifiers}],!1))})}sanitiseProfile(e){if(e.email){let t=[];for(let i of e.email)t.push(this.sdk.util.parse.emailAddress(i));e.email=Mi(t.filter(i=>i&&!0))}if(e.phone){let t=[];for(let i of e.phone)t.push(this.sdk.util.parse.phoneNumberToE164(i));e.phone=Mi(t.filter(i=>i&&!0))}return e.firstName&&(e.firstName=e.firstName.map(t=>t?t.trim():null).filter(t=>t&&!0)),e.lastName&&(e.lastName=e.lastName.map(t=>t?t.trim():null).filter(t=>t&&!0)),e.dob&&e.dob.length>0&&(e.dob=e.dob.filter(Boolean)),e.seekaBId=Mi(e.seekaBId).filter(t=>t!==e.seekaPId),e.facebook?(e.facebook.fbc||(e.facebook.fbc=[]),e.facebook.fbp||(e.facebook.fbp=[]),e.facebook.login||(e.facebook.login=[]),e.facebook.lead||(e.facebook.lead=[])):e.facebook={fbc:[],fbp:[],login:[],lead:[]},e.snapchat?(e.snapchat.scid||(e.snapchat.scid=[]),e.snapchat.sccid||(e.snapchat.sccid=[])):e.snapchat={scid:[],sccid:[]},e.tiktok?(e.tiktok.ttclid||(e.tiktok.ttclid=[]),e.tiktok.ttp||(e.tiktok.ttp=[])):e.tiktok={ttclid:[],ttp:[],lead:[]},e.google?(e.google.userClientId||(e.google.userClientId=[]),e.google.gclid||(e.google.gclid=[])):e.google={userClientId:[],gclid:[]},e.magento?(e.magento.orderId||(e.magento.orderId=[]),e.magento.orderNumber||(e.magento.orderNumber=[]),e.magento.customerId||(e.magento.customerId=[]),e.magento.checkoutId||(e.magento.checkoutId=[]),e.magento.cartId||(e.magento.cartId=[])):e.magento={cartId:[],checkoutId:[],customerId:[],orderId:[],orderNumber:[]},e.bigCommerce||(e.bigCommerce={}),e.wooCommerce?(e.wooCommerce.orderId||(e.wooCommerce.orderId=[]),e.wooCommerce.customerId||(e.wooCommerce.customerId=[]),e.wooCommerce.cartHash||(e.wooCommerce.cartHash=[])):e.wooCommerce={orderId:[],customerId:[],cartHash:[]},e.shopify?(e.shopify.cartId||(e.shopify.cartId=[]),e.shopify.cartToken||(e.shopify.cartToken=[]),e.shopify.checkoutId||(e.shopify.checkoutId=[]),e.shopify.checkoutToken||(e.shopify.checkoutToken=[]),e.shopify.customerId||(e.shopify.customerId=[]),e.shopify.uniqueToken||(e.shopify.uniqueToken=[]),e.shopify.deviceId||(e.shopify.deviceId=[]),e.shopify.visitToken||(e.shopify.visitToken=[]),e.shopify.microSessionId||(e.shopify.microSessionId=[]),e.shopify.orderId||(e.shopify.orderId=[]),e.shopify.sessionHash||(e.shopify.sessionHash=[])):e.shopify={cartId:[],cartToken:[],checkoutId:[],checkoutToken:[],customerId:[],uniqueToken:[],deviceId:[],visitToken:[],microSessionId:[],orderId:[],sessionHash:[]},(!e.address||!q(e.address))&&(e.address=[]),e.address=e.address.filter(t=>t&&!0),e.consent||(e.consent={}),e.consent.marketing||(e.consent.marketing={}),e.consent.marketing.email||(e.consent.marketing.email={}),e.consent.marketing.sms||(e.consent.marketing.sms={}),e.consent.analytics||(e.consent.analytics={}),e.consent.loyalty||(e.consent.loyalty={}),e}touchAndGetSessionId(){var t,i,n,s;let e=(n=(i=(t=this.sdk.config.tracking)==null?void 0:t.analytics)==null?void 0:i.identity)==null?void 0:n.userSessionTimeoutSeconds;return Po(this.sdk.state,e,(o,a)=>this.sdk.debug.verbose(o,a),(o,a)=>this.sdk.debug.error(o,a),(s=this.sdk.dataLayer.window.location())==null?void 0:s.href)}generateNewSessionId(e){return Co(e)}ensureTraitsNotNull(){(this.identifiers==null||this.identifiers==null)&&(this.identifiers={}),(this.identifiers.traits==null||this.identifiers.traits==null)&&(this.identifiers.traits={}),this.identifiers.shopify||(this.identifiers.shopify={}),this.identifiers.facebook||(this.identifiers.facebook={}),this.identifiers.tiktok||(this.identifiers.tiktok={}),this.identifiers.magento||(this.identifiers.magento={}),this.identifiers.wooCommerce||(this.identifiers.wooCommerce={}),this.identifiers.snapchat||(this.identifiers.snapchat={}),this.identifiers.google||(this.identifiers.google={}),this.identifiers.consent||(this.identifiers.consent={}),this.identifiers.consent.marketing||(this.identifiers.consent.marketing={}),this.identifiers.consent.marketing.email||(this.identifiers.consent.marketing.email={}),this.identifiers.consent.marketing.sms||(this.identifiers.consent.marketing.sms={}),this.identifiers.consent.analytics||(this.identifiers.consent.analytics={}),this.identifiers.consent.loyalty||(this.identifiers.consent.loyalty={})}};var Al={disabled:0,implicit:1,explicit:2};function wo(r,e){var i;let t=(i=Al[r])!=null?i:-1;return Al[e]>t?e:r}var Bx=Object.values(fr);function Fx(r){if(typeof r!="string")return;let e=r.trim().toLowerCase();return Bx.includes(e)?e:void 0}function Pl(r,e,t){let i=Fx(e);if(i===void 0){if(!(e==null||typeof e=="string"&&e.trim()==="")){let s;try{s=typeof e=="string"?e:String(e)}catch(o){s="[unstringifiable override]"}t==null||t(s)}return{mode:r,override:void 0}}return{mode:wo(r,i),override:i}}var Hx={iabConsentManagerId:99999999,iabConsentManagerVersion:2,iabVendorListJsonUrl:""},jx={lastUpdated:"2024-03-31T07:26:12.453Z",gvlSpecificationVersion:2,vendorListVersion:2,tcfPolicyVersion:2,vendors:{},purposes:{[Fi.measureAdvertisingPerformance.toString()]:{description:"Measure advertising performance"}},specialPurposes:{},features:{},specialFeatures:{},stacks:{}},ss=class{constructor(e,t){l(this,"sdk");l(this,"mode");l(this,"cmp");l(this,"iabVendorList",jx);l(this,"state",null);l(this,"sessionOverrideInfo",null);var o,a,c,d,f;this.sdk=e;let i=((c=(a=(o=e.config.tracking)==null?void 0:o.processing)==null?void 0:a.privacyDataControl)==null?void 0:c.mode)||"disabled",n;try{n=ne||(f=(d=window.Seeka)==null?void 0:d.privacy)==null?void 0:f.mode}catch(u){n=void 0}let s=Pl(i,n,u=>this.sdk.debug.warn(`Privacy - Ignoring unrecognised session data control override "${u}". Using brand mode "${i}".`));this.mode=s.mode,s.override!==void 0&&(this.sessionOverrideInfo={brandMode:i,overrideMode:s.override,effectiveMode:s.mode}),this.cmp=t||Hx}emitOverrideTelemetry(){let e=this.sessionOverrideInfo;if(!e)return;let t=this.sdk.telemetry;if(!(!t||typeof t.trackMetric!="function"))try{t.trackMetric({metricKey:"privacy.mode.override",metricValue:1,metricUnit:"count",context:{brandMode:e.brandMode,overrideMode:e.overrideMode,effectiveMode:e.effectiveMode}}),this.sessionOverrideInfo=null}catch(i){}}setPrivacyState(e){return h(this,null,function*(){this.sdk.debug.verbose("Privacy - State - Request change",{newState:y({},e),oldState:y({},this.state)});let t=yield this.normaliseState(e),i=this.state?y({},this.state):{};!this.sdk.util.parse.isDeepEqual(t,i)?(this.state=t,this.sdk.status.isInitialised&&(this.sdk.debug.log("Privacy - State - Changed",{newState:this.state,oldState:i,logMetadata:{stream:!0}}),this.onPrivacyStateChanged(i),this.sdk.hooks.publishEvent("privacy.state.changed",{newState:y({},this.state),oldState:i}))):this.sdk.debug.verbose("Privacy - State - Unchanged",{newState:this.state})})}onPrivacyStateChanged(e){var s;let t=this.sdk.identity.getProfile();this.sdk.identity.mergeProfile({consent:H(y({},t.consent),{privacy:{tcfConsentString:(s=this.state)==null?void 0:s.tcfConsentString}})}).then(()=>{this.sdk.debug.verbose("Privacy - Updated profile with new privacy state",{newState:this.state})}).catch(o=>{this.sdk.debug.error("Privacy - Failed to update profile with new privacy state",{e:o})}),this.sdk.state.set("sdk.privacy.state",this.state);let i=[],n=[];(this.sdk.config.plugins||[]).forEach(o=>{if(!o)return;this.sdk.debug.verbose("Privacy - privacy state change so checking plugin");let a=this.isPluginLoadable(o);if(o.enabled!=null&&o.enabled!==null&&o.enabled!==a){let c=(o.type||o.name).replace("converge-plugin-","").replace(/-/g," ");a?(this.sdk.debug.log(`Privacy - Plugin ${c} is disabled. Enabling due to privacy state`,{logMetadata:{stream:!0}}),i.push(o.name),o.enabled=!0):(this.sdk.debug.log(`Privacy - Plugin ${c} is enabled. Disabling due to privacy state`,{logMetadata:{stream:!0}}),n.push(o.name),o.enabled=!1)}}),i.length>0&&this.sdk.lib.analytics.plugins.enable(i),n.length>0&&this.sdk.lib.analytics.plugins.disable(n,o=>{this.sdk.debug.verbose("Privacy - Disabled plugins",{e:o})})}setConsentManager(e){return h(this,null,function*(){this.cmp=e})}normaliseState(e){return h(this,null,function*(){if(!e||(!e.deniedIabPurposeIds||e.deniedIabPurposeIds.length==0)&&(!e.grantedIabPurposeIds||e.grantedIabPurposeIds.length==0)&&!e.tcfConsentString)return null;if(e.deniedIabPurposeIds&&e.deniedIabPurposeIds.length>0&&e.grantedIabPurposeIds&&e.grantedIabPurposeIds.length>0&&e.tcfConsentString)return e;if(e.grantedIabPurposeIds&&e.grantedIabPurposeIds.length>0&&!e.tcfConsentString){let{TCModel:t,GVL:i,TCString:n}=yield Promise.resolve().then(()=>($o(),Go)),s=new t;s.purposeConsents.set(e.grantedIabPurposeIds),s.gvl=new i(this.iabVendorList),e.tcfConsentString=n.encode(s)}else if(!e.grantedIabPurposeIds&&e.tcfConsentString){let{TCString:t}=yield Promise.resolve().then(()=>($o(),Go)),i=t.decode(e.tcfConsentString);e.grantedIabPurposeIds=Array.from(i.purposeConsents.values())}return e})}isPluginLoadable(e){var t;return!this.mode||this.mode==="disabled"||((t=e.privacyConfig)==null?void 0:t.isPrivacyPlugin)===!0?!0:!e.privacyConfig||e.privacyConfig.requiresIabPurposes===null||e.privacyConfig.requiresIabPurposes===void 0?(this.sdk.debug.verbose(`Privacy - Missing required IAB purposes for plugin ${e.name} and privacy data control mode is ${this.mode}`),!1):e.privacyConfig.requiresIabPurposes.length===0?(this.sdk.debug.verbose(`Privacy - ${e.name} is exempt from privacy data control mode`),!0):this.isIabPurposesGranted(e.privacyConfig.requiresIabPurposes,`Loading plugin ${e.name}`)}isIabPurposesGranted(e,t){if(!this.mode||this.mode==="disabled")return!0;switch(this.mode){case"explicit":return!this.state||!this.state.grantedIabPurposeIds||this.state.grantedIabPurposeIds.length===0?(this.sdk.debug.verbose(`Privacy - Missing IAB consent purpose IDs on privacy state. ${t} blocked due to data control mode ${this.mode}`),!1):e.every(i=>this.state&&this.state.grantedIabPurposeIds.includes(i));case"implicit":return this.state&&this.state.deniedIabPurposeIds&&this.state.deniedIabPurposeIds.length>0?!e.find(i=>this.state&&this.state.deniedIabPurposeIds.includes(i)):!this.state||!this.state.grantedIabPurposeIds||this.state.grantedIabPurposeIds.length===0?(this.sdk.debug.verbose(`Privacy - Missing IAB consent purpose IDs on privacy state. ${t} blocked due to data control mode ${this.mode}`),!0):e.every(i=>this.state&&this.state.grantedIabPurposeIds.includes(i));default:return this.sdk.debug.error(`Privacy - Unknown data control mode. ${t} blocked`),!1}}};var Cf=r=>{let e=window.sessionStorage.getItem("seeka_testmode"),t=Se("test",window.location.href)||(e==="full"?e:null),i=!!t&&t!=="nostream";if(!i&&Se("_s_sidekick",window.location.href)!=="1"&&window.sessionStorage.getItem(window.location.host+"/sk/_s_sidekick")!=="1")return;let n=Se("_s_sidekick_endpoint",window.location.href),s=Se("_s_sidekick_token",window.location.href)||window.sessionStorage.getItem(window.location.host+"/sk/_s_sidekick_token"),o=Se("_s_sidekick_mode",window.location.href)||window.sessionStorage.getItem(window.location.host+"/sk/_s_sidekick_mode"),a=Se("_s_sidekick_converge",window.location.href)||window.sessionStorage.getItem(window.location.host+"/sk/_s_sidekick_converge"),c=Se("_s_sidekick_offline",window.location.href)==="1"||window.sessionStorage.getItem(window.location.host+"/sk/_s_sidekick_offline")==="1";if(i&&!o&&(o="diagnose"),s&&a||o==="diagnose"){let d=!!Se("cache",window.location.href),f=new Date().getTime(),u=null;try{u=localStorage.getItem("sk_sdk_version")}catch(p){}let m=u||r||"latest",g=()=>{if(!document.getElementById("seekaWebsiteSidekickScript")){let p=document.createElement("script");p.id="seekaWebsiteSidekickScript";let v;n?v=`https://${n}/dist/js/converge-util-website-sidekick/${m}/static/js/bundle.js`:v=`https://sdk.seeka.services/dist/js/converge-util-website-sidekick/${m}/static/js/bundle.js`,d&&(v+=`?cache=${f}`);try{let I=localStorage.getItem("sk_env")||window.Seeka&&window.Seeka.env;I&&(v+=(v.includes("?")?"&":"?")+"env="+encodeURIComponent(I))}catch(I){}p.src=v,document.body.appendChild(p),window.sessionStorage.setItem(window.location.host+"/sk/_s_sidekick","1"),window.sessionStorage.setItem(window.location.host+"/sk/_s_sidekick_mode",o||"build"),s&&window.sessionStorage.setItem(window.location.host+"/sk/_s_sidekick_token",s),a&&window.sessionStorage.setItem(window.location.host+"/sk/_s_sidekick_converge",a),window.sessionStorage.setItem(window.location.host+"/sk/_s_sidekick_offline",c?"1":"0")}if(!document.getElementById("seekaWebsiteSidekickStyles")){let p=document.createElement("link");p.id="seekaWebsiteSidekickStyles",p.rel="stylesheet",p.type="text/css";let v;n?v=`https://${n}/dist/js/converge-util-website-sidekick/${m}/static/css/bundle.css`:v=`https://sdk.seeka.services/dist/js/converge-util-website-sidekick/${m}/static/css/bundle.css`,d&&(v+=`?cache=${f}`);try{let I=localStorage.getItem("sk_env")||window.Seeka&&window.Seeka.env;I&&(v+=(v.includes("?")?"&":"?")+"env="+encodeURIComponent(I))}catch(I){}p.href=v,document.head.appendChild(p)}};document.body?g():window.addEventListener("load",()=>g())}};var os=class{constructor(e){l(this,"sdk");this.sdk=e}activity(e,t,i){return h(this,null,function*(){this.sdk.debug.verbose("Track.activity called",{name:e,props:t,metadata:i});try{switch(e){case"addPaymentMethod":{yield this.addPaymentMethod(t==null?void 0:t.order,t,i);break}case"addToWishlist":{yield this.addToWishlist(t==null?void 0:t.product,t,i);break}case"contactMessage":{yield this.contactMessage(t==null?void 0:t.info,t,i);break}case"custom":{yield this.custom((t==null?void 0:t.activityNameCustom)||e,t,i);break}case"order":{yield this.order((t==null?void 0:t.order)||t,t,i);break}case"subscriptionItemPurchase":{yield this.subscriptionItemPurchase(t==null?void 0:t.order,t,i);break}case"initiateCheckout":{yield this.initiateCheckout(t==null?void 0:t.order,t,i);break}case"addToCart":{yield this.addToCart(t==null?void 0:t.product,t,i);break}case"removeFromCart":{yield this.removeFromCart(t==null?void 0:t.product,t,i);break}case"viewProduct":{yield this.viewProduct(t==null?void 0:t.product,t,i);break}case"viewPage":{yield this.viewPage(t,i);break}case"applyPromotionalCode":{yield this.applyPromotionalCode(t==null?void 0:t.info,t,i);break}case"keywordSearch":{yield this.keywordSearch(t==null?void 0:t.info,t,i);break}case"userLoginSignup":{yield this.userLoginSignup(t==null?void 0:t.info,t,i);break}case"userLogin":{yield this.userLogin(t==null?void 0:t.info,t,i);break}case"newsletterSignup":{yield this.newsletterSignup(t==null?void 0:t.info,t,i);break}case"lead":{yield this.lead(t==null?void 0:t.info,t,i);break}case"startTrial":{yield this.startTrial(t==null?void 0:t.info,t,i);break}case"changeProductAttribute":{yield this.changeProductAttribute(t==null?void 0:t.info,t,i);break}case"filterItemsByAttribute":{yield this.filterItemsByAttribute(t==null?void 0:t.filters,t,i);break}case"schedule":{yield this.schedule(t==null?void 0:t.info,t,i);break}case"viewContentItem":{yield this.viewContentItem(t==null?void 0:t.info,t,i);break}default:yield this.custom(e,t,i);break}}catch(n){this.sdk.debug.error("Track.activity failed",n)}})}mergeIdentityWithActivityProps(e,t){return h(this,null,function*(){var i,n;try{if(((n=(i=this.sdk.config.tracking)==null?void 0:i.processing)==null?void 0:n.isIdentityDisabled)===!0)return;let s={};s.magento={},s.shopify={},s.magento.orderId=[],s.shopify.orderId=[];let o=!1;if(t!=null&&t.emailAddress&&(s.email=[t==null?void 0:t.emailAddress],o=!0),e!=null&&e.platformType)switch(e==null?void 0:e.platformType){case"magento":e!=null&&e.orderIdentifier&&(s.magento.orderId.push(e.orderIdentifier),o=!0),e!=null&&e.orderNumber&&(s.magento.orderId.push(e.orderNumber),o=!0),e!=null&&e.customerIdentifier&&(s.magento.customerId=[e.customerIdentifier],o=!0);break;case"shopify":e!=null&&e.orderIdentifier&&(s.shopify.orderId.push(e.orderIdentifier),o=!0),e!=null&&e.orderNumber&&(s.shopify.orderId.push(e.orderNumber),o=!0),e!=null&&e.customerIdentifier&&(s.shopify.customerId=[e.customerIdentifier],o=!0);break}o&&(yield this.sdk.identity.mergeProfile(s))}catch(s){this.sdk.debug.error("Track.mergeIdentityWithActivityProps failed",s)}})}custom(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("custom",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("custom",void 0,t,i);t=n.props,i=n.metadata,t=(yield this.sdk.activity.onAfterActivitySanitise("custom",e,t,i)).props,this.sdk.debug.log("Seeka - Browser track "+e,{props:t,metadata:i,logMetadata:{stream:!0,activityName:"custom",activityNameCustom:e}}),yield this.sdk.lib.analytics.track(e,H(y({},t),{activityNameCustom:e}),{metadata:i})}catch(n){this.sdk.debug.error("Track.custom failed",n)}})}viewPage(e,t){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("viewPage",void 0,e)))return;let i=yield this.sdk.activity.onBeforeActivityTrack("viewPage",void 0,e,t);e=i.props,t=i.metadata,e=(yield this.sdk.activity.onAfterActivitySanitise("viewPage",void 0,e,t)).props,this.sdk.debug.log("Seeka - Browser track viewPage",{props:e,metadata:t,logMetadata:{stream:!0,activityName:"viewPage"}}),yield this.sdk.lib.analytics.track("viewPage",y({},e),{metadata:t})}catch(i){this.sdk.debug.error("Track.viewPage failed",i)}})}addPaymentMethod(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("addPaymentMethod",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("addPaymentMethod",e,t,i);t=n.props,i=n.metadata,e=n.activity,e&&(e=this.sdk.util.sanitise.order(e)),yield this.mergeIdentityWithActivityProps(e,void 0);let s=yield this.sdk.activity.onAfterActivitySanitise("addPaymentMethod",e,t,i);t=s.props,e=s.activity,this.sdk.debug.log("Seeka - Browser track addPaymentMethod",H(y(y({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"addPaymentMethod"}})),yield this.sdk.lib.analytics.track("addPaymentMethod",y(y({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.addPaymentMethod failed",n)}})}keywordSearch(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("keywordSearch",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("keywordSearch",e,t,i);t=n.props,i=n.metadata,e=n.activity;let s=yield this.sdk.activity.onAfterActivitySanitise("keywordSearch",e,t,i);t=s.props,e=s.activity,i=s.metadata,this.sdk.debug.log("Seeka - Browser track keywordSearch",H(y(y({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"keywordSearch"}})),yield this.sdk.lib.analytics.track("keywordSearch",y(y({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.keywordSearch failed",n)}})}userLogin(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("userLogin",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("userLogin",e,t,i);t=n.props,i=n.metadata,e=n.activity,yield this.mergeIdentityWithActivityProps(void 0,e),e!=null&&e.emailAddress&&(e.emailAddress=this.sdk.util.parse.emailAddress(e.emailAddress));let s=yield this.sdk.activity.onAfterActivitySanitise("userLogin",e,t,i);t=s.props,e=s.activity,i=s.metadata,this.sdk.debug.log("Seeka - Browser track userLogin",H(y(y({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"userLogin"}})),yield this.sdk.lib.analytics.track("userLogin",y(y({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.userLogin failed",n)}})}userLoginSignup(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("userLoginSignup",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("userLoginSignup",e,t,i);t=n.props,i=n.metadata,e=n.activity,yield this.mergeIdentityWithActivityProps(void 0,e),e!=null&&e.emailAddress&&(e.emailAddress=this.sdk.util.parse.emailAddress(e.emailAddress));let s=yield this.sdk.activity.onAfterActivitySanitise("userLoginSignup",e,t,i);t=s.props,e=s.activity,i=s.metadata,this.sdk.debug.log("Seeka - Browser track userLoginSignup",H(y(y({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"userLoginSignup"}})),yield this.sdk.lib.analytics.track("userLoginSignup",y(y({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.userLoginSignup failed",n)}})}newsletterSignup(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("newsletterSignup",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("newsletterSignup",e,t,i);t=n.props,i=n.metadata,e=n.activity,yield this.mergeIdentityWithActivityProps(void 0,e),e!=null&&e.emailAddress&&(e.emailAddress=this.sdk.util.parse.emailAddress(e.emailAddress));let s=yield this.sdk.activity.onAfterActivitySanitise("newsletterSignup",e,t,i);t=s.props,e=s.activity,i=s.metadata,this.sdk.debug.log("Seeka - Browser track newsletterSignup",H(y(y({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"newsletterSignup"}})),yield this.sdk.lib.analytics.track("newsletterSignup",y(y({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.newsletterSignup failed",n)}})}applyPromotionalCode(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("applyPromotionalCode",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("applyPromotionalCode",e,t,i);t=n.props,i=n.metadata,e=n.activity;let s=yield this.sdk.activity.onAfterActivitySanitise("applyPromotionalCode",e,t,i);t=s.props,e=s.activity,i=s.metadata,this.sdk.debug.log("Seeka - Browser track applyPromotionalCode",H(y(y({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"applyPromotionalCode"}})),yield this.sdk.lib.analytics.track("applyPromotionalCode",y(y({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.applyPromotionalCode failed",n)}})}lead(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("lead",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("lead",e,t,i);t=n.props,i=n.metadata,e=n.activity;let s=yield this.sdk.activity.onAfterActivitySanitise("lead",e,t,i);t=s.props,e=s.activity,i=s.metadata,this.sdk.debug.log("Seeka - Browser track lead",H(y(y({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"lead"}})),yield this.sdk.lib.analytics.track("lead",y(y({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.lead failed",n)}})}startTrial(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("startTrial",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("startTrial",e,t,i);t=n.props,i=n.metadata,e=n.activity;let s=yield this.sdk.activity.onAfterActivitySanitise("startTrial",e,t,i);t=s.props,e=s.activity,i=s.metadata,this.sdk.debug.log("Seeka - Browser track startTrial",H(y(y({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"startTrial"}})),yield this.sdk.lib.analytics.track("startTrial",y(y({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.startTrial failed",n)}})}contactMessage(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("contactMessage",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("contactMessage",e,t,i);t=n.props,i=n.metadata,e=n.activity;let s=yield this.sdk.activity.onAfterActivitySanitise("contactMessage",e,t,i);t=s.props,e=s.activity,i=s.metadata,this.sdk.debug.log("Seeka - Browser track contactMessage",H(y(y({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"contactMessage"}})),yield this.sdk.lib.analytics.track("contactMessage",y(y({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.contactMessage failed",n)}})}schedule(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("schedule",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("schedule",e,t,i);t=n.props,i=n.metadata,e=n.activity;let s=yield this.sdk.activity.onAfterActivitySanitise("schedule",e,t,i);t=s.props,e=s.activity,i=s.metadata,this.sdk.debug.log("Seeka - Browser track schedule",H(y(y({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"schedule"}})),yield this.sdk.lib.analytics.track("schedule",y(y({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.schedule failed",n)}})}viewContentItem(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("viewContentItem",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("viewContentItem",e,t,i);t=n.props,i=n.metadata,e=n.activity;let s=yield this.sdk.activity.onAfterActivitySanitise("viewContentItem",e,t,i);t=s.props,e=s.activity,i=s.metadata,this.sdk.debug.log("Seeka - Browser track viewContentItem",H(y(y({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"viewContentItem"}})),yield this.sdk.lib.analytics.track("viewContentItem",y(y({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.viewContentItem failed",n)}})}order(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("order",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("order",e,t,i);t=n.props,i=n.metadata,e=n.activity,e&&(e=this.sdk.util.sanitise.order(e)),yield this.mergeIdentityWithActivityProps(e,void 0);let s=yield this.sdk.activity.onAfterActivitySanitise("order",e,t,i);t=s.props,e=s.activity,this.sdk.debug.log("Seeka - Browser track order",H(y(y({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"order"}})),yield this.sdk.lib.analytics.track("order",y(y({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.order failed",n)}})}subscriptionItemPurchase(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("subscriptionItemPurchase",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("subscriptionItemPurchase",e,t,i);t=n.props,i=n.metadata,e=n.activity,e&&(e=this.sdk.util.sanitise.order(e)),yield this.mergeIdentityWithActivityProps(e,void 0);let s=yield this.sdk.activity.onAfterActivitySanitise("subscriptionItemPurchase",e,t,i);t=s.props,e=s.activity,this.sdk.debug.log("Seeka - Browser track subscriptionItemPurchase",H(y(y({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"subscriptionItemPurchase"}})),yield this.sdk.lib.analytics.track("subscriptionItemPurchase",y(y({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.order failed",n)}})}initiateCheckout(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("initiateCheckout",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("initiateCheckout",e,t,i);t=n.props,i=n.metadata,e=n.activity,e&&(e=this.sdk.util.sanitise.order(e)),yield this.mergeIdentityWithActivityProps(e,void 0);let s=yield this.sdk.activity.onAfterActivitySanitise("initiateCheckout",e,t,i);t=s.props,e=s.activity,this.sdk.debug.log("Seeka - Browser track initiateCheckout",H(y(y({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"initiateCheckout"}})),yield this.sdk.lib.analytics.track("initiateCheckout",y(y({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.initiateCheckout failed",n)}})}viewProduct(e,t,i){return h(this,null,function*(){try{if(e||(e=yield this.sdk.handlers.getCurrentProduct()),!(yield this.sdk.activity.activityFirePreconditionCheck("viewProduct",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("viewProduct",e,t,i);t=n.props,i=n.metadata,e=n.activity,e&&(e=this.sdk.util.sanitise.product(e)||{});let s=yield this.sdk.activity.onAfterActivitySanitise("viewProduct",e,t,i);t=s.props,e=s.activity,this.sdk.debug.log("Seeka - Browser track viewProduct",H(y(y({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"viewProduct"}})),yield this.sdk.lib.analytics.track("viewProduct",y(y({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.viewProduct failed",n)}})}addToCart(e,t,i){return h(this,null,function*(){try{if(e||(e=yield this.sdk.handlers.getCurrentProduct()),!(yield this.sdk.activity.activityFirePreconditionCheck("addToCart",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("addToCart",e,t,i);t=n.props,i=n.metadata,e=n.activity,e&&(e=this.sdk.util.sanitise.product(e)||{});let s=yield this.sdk.activity.onAfterActivitySanitise("addToCart",e,t,i);t=s.props,e=s.activity,this.sdk.debug.log("Seeka - Browser track addToCart",H(y(y({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"addToCart"}})),yield this.sdk.lib.analytics.track("addToCart",y(y({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.addToCart failed",n)}})}addToWishlist(e,t,i){return h(this,null,function*(){try{if(e||(e=yield this.sdk.handlers.getCurrentProduct()),!(yield this.sdk.activity.activityFirePreconditionCheck("addToWishlist",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("addToWishlist",e,t,i);t=n.props,i=n.metadata,e=n.activity,e&&(e=this.sdk.util.sanitise.product(e)||{});let s=yield this.sdk.activity.onAfterActivitySanitise("addToWishlist",e,t,i);t=s.props,e=s.activity,this.sdk.debug.log("Seeka - Browser track addToWishlist",H(y(y({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"addToWishlist"}})),yield this.sdk.lib.analytics.track("addToWishlist",y(y({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.addToWishlist failed",n)}})}removeFromCart(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("removeFromCart",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("removeFromCart",e,t,i);t=n.props,i=n.metadata,e=n.activity,e&&(e=this.sdk.util.sanitise.product(e)||{});let s=yield this.sdk.activity.onAfterActivitySanitise("removeFromCart",e,t,i);t=s.props,e=s.activity,this.sdk.debug.log("Seeka - Browser track removeFromCart",H(y(y({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"removeFromCart"}})),yield this.sdk.lib.analytics.track("removeFromCart",y(y({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.removeFromCart failed",n)}})}changeProductAttribute(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("changeProductAttribute",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("changeProductAttribute",e,t,i);t=n.props,i=n.metadata,e=n.activity;let s=yield this.sdk.activity.onAfterActivitySanitise("changeProductAttribute",e,t,i);t=s.props,e=s.activity,i=s.metadata,this.sdk.debug.log("Seeka - Browser track changeProductAttribute",H(y(y({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"changeProductAttribute"}})),yield this.sdk.lib.analytics.track("changeProductAttribute",y(y({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.changeProductAttribute failed",n)}})}filterItemsByAttribute(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("filterItemsByAttribute",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("filterItemsByAttribute",e,t,i);t=n.props,i=n.metadata,e=n.activity;let s=yield this.sdk.activity.onAfterActivitySanitise("filterItemsByAttribute",e,t,i);t=s.props,e=s.activity,this.sdk.debug.log("Seeka - Browser track filterItemsByAttribute",H(y(y({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"filterItemsByAttribute"}})),yield this.sdk.lib.analytics.track("filterItemsByAttribute",y(y({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.filterItemsByAttribute failed",n)}})}};var er=class r{constructor(e,t,i,n,s,o,a,c,d){l(this,"scopeKey");l(this,"scopeDescription");l(this,"debug",{});l(this,"key","");l(this,"organisationId","");l(this,"endpoint","");l(this,"ingestEndpoint","");l(this,"plugins",[]);l(this,"enablement");l(this,"handlers",new Ui);l(this,"activity",new Qn);l(this,"runtime",{});l(this,"env");l(this,"testMode");l(this,"isDisabled",!1);l(this,"tracking",{});var f;this.key=e,this.organisationId=t,i&&(this.tracking=i),n&&(this.endpoint=n),a&&(this.ingestEndpoint=a),this.handlers=s,this.activity=o,this.scopeDescription=d||"",this.scopeKey=c||"",r.ensureDefaults(this),(i!=null&&i.debug&&i.debug.isDiagnosisEnabled||((f=new ti().window.sessionStorage())==null?void 0:f.getItem("seeka_diag_force"))==="1")&&(this.debug||(this.debug={}),this.debug.isDiagnosisEnabled=!0)}static ensureDefaults(e){var n,s,o,a,c,d,f,u;e.plugins||(e.plugins=[]),e.tracking||(e.tracking={debug:{},defaults:{},analytics:{},processing:{}}),e.tracking.debug||(e.tracking.debug={}),e.tracking.defaults||(e.tracking.defaults={}),e.tracking.analytics||(e.tracking.analytics={}),e.tracking.processing||(e.tracking.processing={}),e.endpoint||(e.endpoint="https://api.seeka.services"),e.ingestEndpoint||(e.ingestEndpoint="https://router.seeka.services");let t={ver:(s=(n=e.runtime)==null?void 0:n.client)==null?void 0:s.ver,type:(a=(o=e.runtime)==null?void 0:o.client)==null?void 0:a.type,origin:(d=(c=e.runtime)==null?void 0:c.client)==null?void 0:d.origin},i=(f=window.Seeka)==null?void 0:f.client;if(i&&(i.origin&&(t.origin=i.origin),i.type&&(t.type=i.type),i.ver&&(t.ver=i.ver)),e.runtime={ver:Gu,type:"js/"+Wu,client:t},!e.env)try{e.env=localStorage.getItem("sk_env")||void 0}catch(m){}!e.env&&((u=window.Seeka)!=null&&u.env)&&(e.env=window.Seeka.env),e.debug||(e.debug={}),e.debug.minimumLevel?e.debug.minimumLevel=e.debug.minimumLevel.toLowerCase():e.debug.minimumLevel=zt.DefaultMinimumLevel,e.enablement||(e.enablement="fullyFeatured")}},qt=class{constructor(e){l(this,"config");l(this,"state");l(this,"debug");l(this,"track");l(this,"hooks");l(this,"handlers");l(this,"activity");l(this,"identity");l(this,"privacy");l(this,"attribution");l(this,"convergeApi");l(this,"dataLayer");l(this,"lib");l(this,"util");l(this,"status");l(this,"telemetry");l(this,"_initTimings");this.config=e||new er("",""),er.ensureDefaults(this.config),this.status={isIntialiseInFlight:!1,isInitialised:!1},this.dataLayer=new ti,this.state=ne?new $n(this):new qn(this.config.scopeKey,this.config.organisationId,this.dataLayer.window.localStorage()),this.convergeApi=new Rt(this.config,this),this.debug=new zt(this);try{this.track=new os(this),this.hooks=new st(this),this.handlers=new Zn(this),this.activity=new zn(this),this.identity=new Xn(this),this.privacy=new ss(this,void 0),this.attribution=new Yn(this),this.lib={analytics:{}},this.util={cookie:new qu(this,this.config.scopeKey,this.config.organisationId),parse:new Ri,text:new Mn,url:new Dn,hash:new vl(this),sanitise:new kl,queue:new bl(this)}}catch(t){console.error("Failed to construct Converge SDK",t)}}initWithDefaults(){return h(this,null,function*(){if(this.status.isIntialiseInFlight){this.debug.warn("Cannot call initWithDefaults when initialisation already in flight.");return}if(this.status.isInitialised){this.debug.warn("Cannot call initWithDefaults when initialisation already completed.");return}this.status.isIntialiseInFlight=!0,this.status.isIntialiseInFlight=!1,this.init(),this.debug.log("Loaded SDK defaults",this.config)})}init(e){this.initAsync(e).catch(t=>{this.debug.error("Failed to initialise Converge SDK",t)})}initAsync(e){return h(this,null,function*(){var t;try{if(ne){this.debug.verbose("Not initialising SDK in SSR");return}if(this.debug.verbose("Attempting to initialise SDK",this.config),this.status.isIntialiseInFlight){this.debug.warn("Cannot call init when initialisation already in flight.");return}if(this.status.isInitialised){this.debug.warn("Cannot call init when initialisation already completed.");return}this.status.isIntialiseInFlight=!0;try{this._initTimings={start:performance.now()}}catch(i){}if(window.addEventListener("beforeunload",i=>h(this,null,function*(){yield this.hooks.onWindowLifeEnd()})),(t=this.config.debug)!=null&&t.isGlobalErrorListeningEnabled)try{Nu((i,n)=>this.debug.error(i,n))}catch(i){this.debug.error("Failed to bind error listeners",i)}try{yield this.internalInit(e||!1),this.status.isIntialiseInFlight=!1,this.debug.log("Initialised SDK",H(y({},this.config),{plugins:[]}))}catch(i){this.status.isInitialised=!1,this.status.isIntialiseInFlight=!1,this.debug.error("Failed to initialise Converge SDK async",i)}}catch(i){try{this.debug.error("Fatal: Failed to initialise SDK async",i)}catch(n){console.error("Fatal: Failed to initialise SDK async",{err:i,caughtError:n})}}})}internalInit(e){return h(this,null,function*(){var o,a,c,d,f;if(this.config.tracking||(this.config.tracking={}),e||st.publishEventGlobal("sdk.init.start"),!ne){let u=this.dataLayer.window.location(),m=this.dataLayer.window.sessionStorage();(this.util.url.getParamFromQueryString("_s_sidekick",u.href)==="1"||m.getItem(u.host+"/sk/_s_sidekick")==="1")&&this.util.url.getParamFromQueryString("_s_sidekick_mode",u.href)!=="diagnose"&&m.getItem(u.host+"/sk/_s_sidekick_mode")!=="diagnose"&&(this.debug.warn("Converge SDK is disabled due to Sidekick being active"),this.config.isDisabled=!0);let g=this.util.url.getParamFromQueryString("test",u.href);if(g)m&&m.setItem("seeka_testmode",g),this.config.testMode=g;else if(m&&m.getItem("seeka_testmode"))this.config.testMode=m.getItem("seeka_testmode");else if(((o=u.hostname)==null?void 0:o.toLowerCase())==="localhost"&&!g&&!m.getItem("seeka_testmode")&&!m.getItem("seeka_testmode_toggle")){let v="Setting SDK test mode to diag due to localhost. Data will not be tracked.";this.debug.log(v,{logMetadata:{stream:!0}}),this.config.testMode="diag",tt()||this.debug.warn("Seeka - "+v)}if(this.config.testMode){let v=`SDK test mode is set to ${this.config.testMode}.`;this.config.testMode==="diag"&&(v+=" Data will not be sent to destinations.",v+=`\r
\r
`,v+=`\r
\r
`,v+="Append ?test=nostream to url to enable full SDK including event publishing to data destinations for this browser session.",v+=`\r
\r
`,v+="Append ?test=full to url to enable full SDK including diagnostic tool and event publishing for this browser session.",v+=`\r
\r
`,v+=`\r
\r
`,this.config.debug||(this.config.debug={}),this.config.debug.isDiagnosisEnabled=!0,this.debug.toggleDevMode(!0)),this.debug.log(v,{logMetadata:{stream:!0}}),tt()||(console.warn("--------------------------------"),console.warn("--------------------------------"),console.warn("Seeka - "+v),console.warn("--------------------------------"),console.warn("--------------------------------"))}let p=this.util.url.getParamFromQueryString("_s_diagid",u.href)||m.getItem("seeka_diagid");(p||(a=this.config.debug)!=null&&a.isDiagnosisEnabled)&&(p=p||this.identity.generateNewSessionId(new Date),m&&m.setItem("seeka_diagid",p),this.debug.log("Diag - Session ID",p))}this.identity.getOrAssign();let t=this.attribution.getCurrentTouchCampaign();t&&this.attribution.setLastTouchCampaign(t);let i={app:"converge-"+this.config.scopeKey,debug:((d=(c=this.config)==null?void 0:c.debug)==null?void 0:d.isEnabled)===!0,plugins:[]};i.plugins.push(Il(this.config));let n=null;if(this.config.plugins){this.config.plugins=this.config.plugins.filter(m=>m!=null);let u=this.config.plugins.filter(m=>m.privacyConfig&&m.privacyConfig.isPrivacyPlugin===!0);if(u&&u.length>0)for(let m of u)try{yield this.loadPlugin(m,i)}catch(g){this.debug.error(`Failed to load privacy plugin ${(m==null?void 0:m.name)||"unknown"}`,g)}for(let m in this.config.plugins)if(Object.prototype.hasOwnProperty.call(this.config.plugins,m)){let g=this.config.plugins[m];if(!g)continue;try{if(g.config||(g.config={}),g.type!=="converge-plugin-seeka"&&((f=g.privacyConfig)==null?void 0:f.isPrivacyPlugin)!==!0){if(yield this.loadPlugin(g,i),g.getCrossDomainTrackingRules)try{let p=yield g.getCrossDomainTrackingRules();p&&p.length>0&&(this.debug.verbose(`Plugin.${g.name}.getCrossDomainTrackingRules`,p),this.config.tracking||(this.config.tracking={}),this.config.tracking.analytics||(this.config.tracking.analytics={}),this.config.tracking.analytics.crossDomain||(this.config.tracking.analytics.crossDomain={}),this.config.tracking.analytics.crossDomain.rules||(this.config.tracking.analytics.crossDomain.rules=[]),this.config.tracking.analytics.crossDomain.rules=[...this.config.tracking.analytics.crossDomain.rules,...p])}catch(p){this.debug.error(`Plugin.${g.name}.getCrossDomainTrackingRules failed`,p)}}else g.type==="converge-plugin-seeka"&&(n=g,g.config.scopeKey||(g.config.scopeKey=this.config.scopeKey))}catch(p){this.debug.error(`Failed to load plugin ${(g==null?void 0:g.name)||(g==null?void 0:g.type)||m}`,p)}}}if(n!=null)try{yield this.loadPlugin(n,i)}catch(u){this.debug.error("Failed to load Seeka plugin",u)}try{this._initTimings&&(this._initTimings.pluginsLoaded=performance.now())}catch(u){}let{Analytics:s}=yield Promise.resolve().then(()=>(Am(),Cm));this.lib.analytics=s(i),this.lib.analytics.on("ready",()=>h(this,null,function*(){var g,p,v,I;this.util.queue.addMethodCallToQueue(()=>{this.activity.definitionHelper.bindEventHandlersForActivityDefinitions()},this,[],!1,!0),this.util.queue.addMethodCallToQueue(()=>{if(!this.hooks.disabledListeners||!this.hooks.disabledListeners.includes("onRouteChange")){let b=window.navigation;b&&b.addEventListener("navigate",w=>{if(w.destination&&w.destination.url){if(!w.destination.sameDocument)return;let E=mr(w.destination.url);this.hooks.onRouteChange(E)}})}},this,[],!1,!1),this.util.queue.addMethodCallToQueue(()=>h(this,null,function*(){let b=yield this.handlers.getLoggedInUser();b&&(yield this.identity.mergeProfile(b))}),this,[],!0,!0),this.util.queue.addMethodCallToQueue(()=>h(this,null,function*(){var b,w,E,A,S,T,D,O,j,G,N,K,te,Z,R,oe,ce,Fe,k,C,L,V;this.config.tracking.defaults||(this.config.tracking.defaults={}),(A=(E=(w=(b=window.Seeka)==null?void 0:b.context)==null?void 0:w.tracking)==null?void 0:E.defaults)!=null&&A.currencyCode&&(this.config.tracking.defaults.currencyCode=window.Seeka.context.tracking.defaults.currencyCode),this.config.tracking.analytics||(this.config.tracking.analytics={}),this.config.tracking.analytics.autoCollection||(this.config.tracking.analytics.autoCollection={}),((j=(O=(D=(T=(S=window.Seeka)==null?void 0:S.context)==null?void 0:T.tracking)==null?void 0:D.analytics)==null?void 0:O.autoCollection)==null?void 0:j.activityNames)!=null&&(this.config.tracking.analytics.autoCollection.activityNames=(Z=(te=(K=(N=(G=window.Seeka)==null?void 0:G.context)==null?void 0:N.tracking)==null?void 0:K.analytics)==null?void 0:te.autoCollection)==null?void 0:Z.activityNames),this.config.tracking.processing||(this.config.tracking.processing={}),(Fe=(ce=(oe=(R=window.Seeka)==null?void 0:R.context)==null?void 0:oe.tracking)==null?void 0:ce.processing)!=null&&Fe.contentIdentificationBehavior&&(this.config.tracking.processing.contentIdentificationBehavior=(V=(L=(C=(k=window.Seeka)==null?void 0:k.context)==null?void 0:C.tracking)==null?void 0:L.processing)==null?void 0:V.contentIdentificationBehavior)}),this,[],!0,!0);let u=[];if(window.ConvergeTrackingQueue)try{window.ConvergeTrackingQueue.length>0&&window.ConvergeTrackingQueue.forEach(b=>{b&&b.t==="act"&&b.a.length>1?this.util.queue.addMethodCallToQueue(this.track[b.a[0]],this.track,b.a.slice(1),!0,!1):b&&b.t==="id"&&b.a.length>1?this.util.queue.addMethodCallToQueue(this.identity[b.a[0]],this.identity,b.a.slice(1),!0,!1):b&&b.t==="priv"&&b.a.length>1&&(b.a[0]==="setPrivacyState"||b.a[0]==="setConsentManager")?u.push(b):this.debug.warn("Invalid pre-initialise queue item",b)},this)}catch(b){this.debug.error("Failed to process pre-initialise queue items",b)}yield this.util.queue.startProcessingPriorityMethods(),this.status.isInitialised=!0;try{this._initTimings&&(this._initTimings.ready=performance.now())}catch(b){}for(let b of u)try{yield this.privacy[b.a[0]](...b.a.slice(1))}catch(w){this.debug.error("Failed to apply pre-initialise privacy call",{method:b.a[0],err:w})}let m=(p=(g=this.config.runtime)==null?void 0:g.client)==null?void 0:p.type;(m==="dynamic"||m!=null&&m.startsWith("iframe/dynamic"))&&(this.config.tracking.analytics||(this.config.tracking.analytics={}),this.config.tracking.analytics.autoCollection||(this.config.tracking.analytics.autoCollection={}),this.config.tracking.analytics.autoCollection.activityNames=[]),this.activity.queueCollectionOfAutomaticActivities(),e?st.publishEventGlobal("sdk.ready.instance"):st.publishEventGlobal("sdk.ready");try{new Kn(this).addEventListeners()}catch(b){this.debug.error("Init Now book it listeners error",b)}try{new Nn(this).addEventListeners()}catch(b){this.debug.error("Init Klaviyo listeners error",b)}Cf((I=(v=this.config)==null?void 0:v.runtime)==null?void 0:I.ver),yield this.hooks.onPageReady()}))})}loadPlugin(e,t){return h(this,null,function*(){if(this.debug.verbose(`Attempting to load ${e.name}`,e.config),e.sdk=this,e.isProxyPlugin)e.enabled=!0,e.analyticsLibPlugin?(e.analyticsLibPlugin.config||(e.analyticsLibPlugin.config={}),e.analyticsLibPlugin.config.sdk=this,t.plugins.push(e.analyticsLibPlugin),this.debug.verbose(`Loaded proxy plugin ${e.name}`,H(y({},e.analyticsLibPlugin),{config:{plugins:[]}}))):this.debug.warn(`Attempting to load ${e.name} failed due to isProxyPlugin=true and analyticsLibPlugin on plugin is not defined`,e.config);else{let i=yield this.privacy.isPluginLoadable(e);e.enabled=i,yield this.loadIdentifiers(e),e.beforeInit&&(yield e.beforeInit()),t.plugins.push(ju(e,i)),this.debug.log(`Loaded plugin ${e.name}`,{version:e.version||"unknown",config:e.config})}})}loadIdentifiers(e){return h(this,null,function*(){if(e!=null&&e.collectIdentifiers)if(e.enabled)try{let t=yield e.collectIdentifiers();e.sdk.debug.verbose(`Plugin.${e.name}.collectIdentifiers`,t),t&&(yield this.identity.mergeProfile(t))}catch(t){this.debug.error(`Plugin.${e.name}.collectIdentifiers failed`,t)}else this.debug.verbose(`Plugin.${e==null?void 0:e.name}.collectIdentifiers - skipping due to plugin disabled`)})}refreshIdentifiers(){return h(this,null,function*(){var e;return(e=this.config.plugins)==null||e.forEach(t=>h(this,null,function*(){yield this.loadIdentifiers(t)})),yield this.identity.getProfile()})}};var tr=class{constructor(e){l(this,"instances",{});l(this,"status",{isInitialised:!1,isIntialiseInFlight:!1});l(this,"identity",{getTrait:e=>{throw new Error("Method not available for scoped install.")},addTrait:(e,t,i)=>{throw new Error("Method not available for scoped install.")},setTrait:(e,t,i)=>{throw new Error("Method not available for scoped install.")},getProfile:()=>{throw new Error("Method not available for scoped install.")},setProfile:e=>{throw new Error("Method not available for scoped install.")},touchAndGetSessionId:()=>{throw new Error("Method not available for scoped install.")},mergeProfile:e=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(t=>this.instances[t].identity.mergeProfile(e)))}),mergeTwoProfiles:(e,t)=>{throw new Error("Method not available for scoped install.")},reset:e=>{throw new Error("Method not available for scoped install.")},syncIdentity:e=>{throw new Error("Method not available for scoped install.")},isAnonymous:e=>{throw new Error("Method not available for scoped install.")},flushIdentitySyncQueue:()=>{throw new Error("Method not available for scoped install.")},sanitiseProfile:e=>{throw new Error("Method not available for scoped install.")},generateNewSessionId:function(e){throw new Error("Function not implemented.")},personId:void 0,device:{}});l(this,"privacy",(()=>{let e=this,t=null,i=s=>s&&H(y({},s),{grantedIabPurposeIds:s.grantedIabPurposeIds&&[...s.grantedIabPurposeIds],deniedIabPurposeIds:s.deniedIabPurposeIds&&[...s.deniedIabPurposeIds]});return{setPrivacyState:s=>h(this,null,function*(){t=i(s),yield Promise.all(Object.keys(this.instances).map(o=>this.instances[o].privacy.setPrivacyState(i(s))))}),setConsentManager:s=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(o=>this.instances[o].privacy.setConsentManager(s)))}),isPluginLoadable:s=>{throw new Error("Method not available for scoped install. Walk this.instances and call privacy.isPluginLoadable on a specific instance.")},isIabPurposesGranted:(s,o)=>{throw new Error("Method not available for scoped install. Walk this.instances and call privacy.isIabPurposesGranted on a specific instance.")},emitOverrideTelemetry:()=>{Object.keys(this.instances).forEach(s=>{var o,a;return(a=(o=this.instances[s].privacy).emitOverrideTelemetry)==null?void 0:a.call(o)})},get state(){return t&&i(t)},get mode(){return Object.keys(e.instances).reduce((s,o)=>wo(s,e.instances[o].privacy.mode),"disabled")}}})());l(this,"track",{custom:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.custom(e,t,i)))}),viewPage:(e,t)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(i=>this.instances[i].track.viewPage(e,t)))}),addPaymentMethod:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.addPaymentMethod(e,t,i)))}),keywordSearch:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.keywordSearch(e,t,i)))}),userLogin:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.userLogin(e,t,i)))}),userLoginSignup:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.userLoginSignup(e,t,i)))}),newsletterSignup:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.newsletterSignup(e,t,i)))}),applyPromotionalCode:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.applyPromotionalCode(e,t,i)))}),lead:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.lead(e,t,i)))}),startTrial:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.startTrial(e,t,i)))}),contactMessage:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.contactMessage(e,t,i)))}),schedule:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.schedule(e,t,i)))}),viewContentItem:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.viewContentItem(e,t,i)))}),order:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.order(e,t,i)))}),subscriptionItemPurchase:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.subscriptionItemPurchase(e,t,i)))}),initiateCheckout:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.initiateCheckout(e,t,i)))}),viewProduct:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.viewProduct(e,t,i)))}),addToCart:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.addToCart(e,t,i)))}),addToWishlist:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.addToWishlist(e,t,i)))}),removeFromCart:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.removeFromCart(e,t,i)))}),changeProductAttribute:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.changeProductAttribute(e,t,i)))}),filterItemsByAttribute:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.filterItemsByAttribute(e,t,i)))}),activity:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.activity(e,t,i)))})});l(this,"debug",{log:(e,t)=>{Object.keys(this.instances).forEach(i=>this.instances[i].debug.log(e,t))},setEnabled:(e,t)=>{Object.keys(this.instances).forEach(i=>this.instances[i].debug.setEnabled(e,t))},toggleDevMode:e=>Object.keys(this.instances).map(t=>this.instances[t].debug.toggleDevMode(e)).filter(t=>t===!0).length>0,setMinimumLevel:e=>{Object.keys(this.instances).forEach(t=>this.instances[t].debug.setMinimumLevel(e))},isEnabled:()=>{throw new Error("Method not available for scoped install.")},verbose:(e,t)=>{Object.keys(this.instances).forEach(i=>this.instances[i].debug.verbose(e,t))},error:(e,t)=>{Object.keys(this.instances).forEach(i=>this.instances[i].debug.error(e,t))},warn:(e,t)=>{Object.keys(this.instances).forEach(i=>this.instances[i].debug.warn(e,t))},setEnv:e=>{var t;(t=Object.values(this.instances)[0])==null||t.debug.setEnv(e)},resetEnv:()=>{var e;(e=Object.values(this.instances)[0])==null||e.debug.resetEnv()},setSdkVersion:e=>{var t;(t=Object.values(this.instances)[0])==null||t.debug.setSdkVersion(e)},resetSdkVersion:()=>{var e;(e=Object.values(this.instances)[0])==null||e.debug.resetSdkVersion()}});try{if(!e||e.length===0){console.error("Seeka - Install - No configuration to load",{configs:e});return}let t=Object.keys(this.instances),i=t.length>0||e.length>1;for(let n=0;n<e.length;n++){let s=e[n];if(s.scopeKey=i||s.scopeKey?s.scopeKey:s.key.replace(/sdkr_/gi,"").slice(-16),i&&(!s.scopeKey||!s.scopeDescription)){console.error("Seeka - Install - Cannot install SDK with empty scope key or scope description",{scopeKey:s.scopeKey,scopeDescription:s.scopeDescription});continue}if(t.indexOf(s.scopeKey)>-1){console.error("Seeka - Install - Cannot install SDK as an instance is already installed with this scope key",{scopeKey:s.scopeKey,scopeDescription:s.scopeDescription,loadedScopeKeys:t});continue}this.instances[s.scopeKey]=new qt(s)}}catch(t){console.error("Seeka - Install - Failed to construct scoped Converge SDK",t)}}init(){try{let e=Object.keys(this.instances);this.status.isIntialiseInFlight=!0;let t=e.length>1;t&&st.publishEventGlobal("sdk.init.start");let i=[];for(let n=0;n<e.length;n++){let s=e[n],o=this.instances[s];!o.status||o.status.isInitialised===!1&&o.status.isIntialiseInFlight===!1?(o.debug.log("Seeka - Install - initialising instance",{scopeKey:s}),i.push(o.initAsync(t)),o.debug.log("Install - Install - initialised scoped SDK with key "+s,{scopeKey:s,scopeDescription:o.config.scopeDescription})):o.debug.warn("Install - Not initialising scoped SDK with key "+s,{status:o.status,scopeKey:s,scopeDescription:o.config.scopeDescription})}Promise.all(i).then(()=>{t&&st.publishEventGlobal("sdk.ready"),this.status.isIntialiseInFlight=!1,this.status.isInitialised=!0}).catch(n=>{this.status.isIntialiseInFlight=!1,console.error("Seeka - Install - Failed to initialise scoped SDK",n)})}catch(e){console.error("Seeka - Install - Failed to initialise scoped SDK",e)}}};var ks=class{constructor(e){l(this,"p");this.p=e}setPrivacyState(e){return h(this,null,function*(){this.p("setPrivacyState",[e])})}setConsentManager(e){return h(this,null,function*(){this.p("setConsentManager",[e])})}};var Pm=(r,e,t)=>{window.Converge||(window.Converge={}),window.ConvergeTrackingQueue||(window.ConvergeTrackingQueue=[]),window.Converge.track||(window.Converge.track=new Oi(r)),window.Converge.identity||(window.Converge.identity=new Di(e)),t&&!window.Converge.privacy&&(window.Converge.privacy=new ks(t)),window._skInitH||(window._skInitH=[])},Sm=()=>{window.addEventListener("message",r=>{let e=r.data;e.dest==="seeka"&&window.Converge[e.payload.api][e.payload.method](...e.payload.params)},!1)};var wm=(r,e,t)=>{var n;if(!e||e.length===0||!r)return t;let i=r.toLowerCase().replace("www.","").split(":")[0];for(let s=0;s<e.length;s++){let o=e[s],a=(n=o.hostname)==null?void 0:n.toLowerCase().replace("www.","").split(":")[0];if(i.endsWith(a)||a.endsWith(i)||i===a)return o;let c=a.split(".").slice(1).join(".");if(i.endsWith(c)||c.endsWith(i))return o}return t};var fa=(r,e)=>{r.forEach(t=>{if(t.id&&Tm.has(t.id))return;t.id&&Tm.add(t.id);let i=document.getElementsByTagName("script")[0];e&&document.body?document.body.appendChild(t):i&&i.parentNode?i.parentNode.insertBefore(t,i):document.head.appendChild(t)})},Tm=new Set,EC=r=>{var n;let e="sk_int";(sessionStorage&&sessionStorage.getItem(e)==="1"||((n=window.location.search)==null?void 0:n.indexOf("_s_sidekick"))>-1)&&fa(r,!1);let t=["scroll","click","keydown","mousemove","touchstart","touchmove","mousedown"],i=s=>{fa(r,!0),t.forEach(o=>window.removeEventListener(o,i)),sessionStorage&&sessionStorage.setItem(e,"1")};t.forEach(s=>window.addEventListener(s,i))},Is=(r,e,t,i)=>{var o,a,c,d;if(window._skInitH||(window._skInitH=[]),window._skInitH.indexOf(r)>-1)return;window._skInitH.push(r);let n=document.createElement("script");n.async=!0,n.id="seeka-init",e&&(n.onload=function(f){e(f)}),t&&(n.onerror=function(f){t(f)});let s=null;if(r.indexOf("cache=")>-1||((o=window.location.search)==null?void 0:o.indexOf("cache=0"))>-1||((a=window.location.search)==null?void 0:a.indexOf("test=full"))>-1||((c=window.location.search)==null?void 0:c.indexOf("_cache=0"))>-1||((d=window.location.search)==null?void 0:d.indexOf("_s_sidekick_mode"))>-1)s=new Date().getTime().toString();else try{s=sessionStorage.getItem("sk_config_cache")}catch(f){s=""}s&&(r=r+"&cache="+s);try{let f=localStorage.getItem("sk_env")||window.Seeka&&window.Seeka.env;f&&(r+="&env="+encodeURIComponent(f));let u=localStorage.getItem("sk_sdk_version");u&&(r+="&vo="+encodeURIComponent(u))}catch(f){}n.src=r,window.Seeka=window.Seeka||{},window.Seeka.client=window.Seeka.client||{};try{window.Seeka.client.origin={h:new URL(r).hostname}}catch(f){console.log(f)}i===!0?EC([n]):fa([n],!1)},Em=r=>{var a,c;if(!r||!r.instances||r.instances.length===0)return;if((a=r.privacyOverride)!=null&&a.mode)try{let d=window.Seeka=window.Seeka||{},f={disabled:0,implicit:1,explicit:2},u=(c=d.privacy)==null?void 0:c.mode,m=typeof u=="string"?f[u.trim().toLowerCase()]:void 0,g=f[String(r.privacyOverride.mode).trim().toLowerCase()];if(u===void 0?!0:g!==void 0&&(m===void 0||g>m)){let v=d.privacy=d.privacy||{};v.mode=r.privacyOverride.mode}}catch(d){console.warn(d)}let e={hostname:"sdk.seeka.services"};(!r.hosts||r.hosts.length===0)&&(r.hosts=[e]);let t=!1;try{t=!!sessionStorage.getItem("sk_ses_h_def")}catch(d){console.error(d)}let i=t?e:wm(window.location.hostname,r.hosts,e),n=r.instances.map(d=>d.id).join("_"),s="";r.instances.forEach((d,f)=>{s+=(s?"&":"?")+`k[${f}]=${d.key}`});let o=d=>`${d.protocol||"https"}://${d.hostname}${d.port?":"+d.port:""}${d.path===void 0?"/static/c":d.path}/${n}${d.ext===void 0?".js":d.ext}${s}${r.extraParams?"&"+r.extraParams:""}`;Is(o(i),r.onLoad,d=>{i.hostname!==e.hostname?window.location.hostname==="localhost"?console.error("Failed Seeka "+i.hostname):(console.warn("Failed Seeka "+i.hostname+". Using "+e.hostname),sessionStorage.setItem("sk_ses_h_def","1"),Is(o(e),r.onLoad,()=>{console.error("Failed Seeka "+e.hostname),r.onError&&r.onError(d)})):r.onError&&r.onError(d)},r.waitForInteraction)};var Mm=()=>{Pm((r,e)=>{window.ConvergeTrackingQueue.push({t:"act",a:[r,...e]})},(r,e)=>{window.ConvergeTrackingQueue.push({t:"id",a:[r,...e]})},(r,e)=>{window.ConvergeTrackingQueue.push({t:"priv",a:[r,...e]})})};function On(r,e,t,i){var n;if(!e||e.length===0)return{wasAugmented:!1,activity:r,wasMatched:!1};t.debug.verbose("Checking if activity should be augmented by pipeline rule containers",{activityIdentifier:(n=r.props)==null?void 0:n.activityIdentifier});for(let s of e.sort((o,a)=>(o.processingOrder||0)-(a.processingOrder||0))){let o=MC(r,s,t,i);if(o.wasMatched)return o}return{wasAugmented:!1,activity:r,wasMatched:!1}}function MC(r,e,t,i){var n,s;if(!e.pipelineRules||e.pipelineRules.length===0)return{wasAugmented:!1,activity:r,wasMatched:!1};for(let o of e.pipelineRules){if(!o.activityFilter){t.debug.warn("Pipeline rule has no activity filter, skipping",{rule:o});continue}let a=Rn(o.activityFilter,r,i);if(a.isMatch)return t.debug.verbose("Pipeline rule matched activity with rule",{activityIdentifier:(n=r.props)==null?void 0:n.activityIdentifier,filterResult:a,rule:o}),LC(r,o,t);t.debug.verbose("Pipeline rule did not match activity with rule",{activityIdentifier:(s=r.props)==null?void 0:s.activityIdentifier,filterResult:a,rule:o})}return{wasAugmented:!1,activity:r,wasMatched:!1}}function LC(r,e,t){var a,c,d;if(!e)return{wasAugmented:!1,activity:r,wasMatched:!0,rule:e};let i=Qt(r);i.props||(i.props={});let n=!1,s;e.activityModifiers&&(e.activityModifiers.activityName==="custom"?e.activityModifiers.activityNameCustom?(i.props.activityNameCustom=e.activityModifiers.activityNameCustom,s=e.activityModifiers.activityNameOverride||void 0,n=!0,t.debug.verbose("Applying pipeline rule destination settings to activity with rule for custom activity",{activityIdentifier:(a=r.props)==null?void 0:a.activityIdentifier,activity:r,rule:e})):t.debug.warn("Not Applying pipeline rule destination settings to activity with rule for custom activity as activityNameCustom was empty for activityModifiers",{activityIdentifier:(c=r.props)==null?void 0:c.activityIdentifier,activity:r,rule:e}):e.activityModifiers.activityName!=="undefined"&&(t.debug.verbose("Applying pipeline rule destination settings to activity with rule for standard activity",{activityIdentifier:(d=r.props)==null?void 0:d.activityIdentifier,activity:r,rule:e}),i.activityName=e.activityModifiers.activityName,i.props.activityNameCustom=void 0,s=e.activityModifiers.activityNameOverride||void 0,n=!0));let o={wasAugmented:n,activity:i,wasMatched:!0,rule:e,destinationActivityNameOverride:s};return r.metadata||(r.metadata={}),r.metadata.augmentResult=o,o}var DC={bindEventListeners:Sm,SeekaInit:Is,setStandardGlobals:Mm,SeekaInstall:Em};window.SeekaConvergeCore=ma;window.ConvergeSdk=r=>{let e=new qt(r);return e.init(),e};window.SeekaSdk=r=>{let e=new tr(r);return e.init(),Object.keys(e.instances).length===1?e.instances[Object.keys(e.instances)[0]]:e};})();
"use strict";(()=>{var K=Object.defineProperty,J=Object.defineProperties;var Y=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var Z=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable;var j=(r,n,t)=>n in r?K(r,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[n]=t,T=(r,n)=>{for(var t in n||(n={}))Z.call(n,t)&&j(r,t,n[t]);if(O)for(var t of O(n))Q.call(n,t)&&j(r,t,n[t]);return r},R=(r,n)=>J(r,Y(n));var y=(r,n,t)=>j(r,typeof n!="symbol"?n+"":n,t);var z=(r,n,t)=>new Promise((i,o)=>{var c=u=>{try{l(t.next(u))}catch(s){o(s)}},e=u=>{try{l(t.throw(u))}catch(s){o(s)}},l=u=>u.done?i(u.value):Promise.resolve(u.value).then(c,e);l((t=t.apply(r,n)).next())});var X=" daum[ /]| deusu/| yadirectfetcher|(?:^|[^g])news(?!sapphire)|(?<! (?:channel/|google/))google(?!(app|/google| pixel))|(?<! cu)bots?(?:\\b|_)|(?<!(?:lib))http|(?<![hg]m)score|(?<!cam)scan|@[a-z][\\w-]+\\.|\\(\\)|\\.com\\b|\\btime/|\\||^<|^[\\w \\.\\-\\(?:\\):%]+(?:/v?\\d+(?:\\.\\d+)?(?:\\.\\d{1,10})*?)?(?:,|$)|^[^ ]{50,}$|^\\d+\\b|^\\w*search\\b|^\\w+/[\\w\\(\\)]*$|^active|^ad muncher|^amaya|^avsdevicesdk/|^biglotron|^bot|^bw/|^clamav[ /]|^client/|^cobweb/|^custom|^ddg[_-]android|^discourse|^dispatch/\\d|^downcast/|^duckduckgo|^email|^facebook|^getright/|^gozilla/|^hobbit|^hotzonu|^hwcdn/|^igetter/|^jeode/|^jetty/|^jigsaw|^microsoft bits|^movabletype|^mozilla/\\d\\.\\d\\s[\\w\\.-]+$|^mozilla/\\d\\.\\d\\s\\(compatible;?(?:\\s\\w+\\/\\d+\\.\\d+)?\\)$|^navermailapp|^netsurf|^offline|^openai/|^owler|^php|^postman|^python|^rank|^read|^reed|^rest|^rss|^snapchat|^space bison|^svn|^swcd |^taringa|^thumbor/|^track|^w3c|^webbandit/|^webcopier|^wget|^whatsapp|^wordpress|^xenu link sleuth|^yahoo|^yandex|^zdm/\\d|^zoom marketplace/|^{{.*}}$|analyzer|archive|ask jeeves/teoma|audit|bit\\.ly/|bluecoat drtr|browsex|burpcollaborator|capture|catch|check\\b|checker|chrome-lighthouse|chromeframe|classifier|cloudflare|convertify|crawl|cypress/|dareboost|datanyze|dejaclick|detect|dmbrowser|download|evc-batch/|exaleadcloudview|feed|firephp|functionize|gomezagent|grab|headless|httrack|hubspot marketing grader|hydra|ibisbrowser|infrawatch|insight|inspect|iplabel|ips-agent|java(?!;)|library|linkcheck|mail\\.ru/|manager|measure|neustar wpm|node|nutch|offbyone|onetrust|optimize|pageburst|pagespeed|parser|perl|phantomjs|pingdom|powermarks|preview|proxy|ptst[ /]\\d|retriever|rexx;|rigor|rss\\b|scrape|server|sogou|sparkler/|speedcurve|spider|splash|statuscake|supercleaner|synapse|synthetic|tools|torrent|transcoder|url|validator|virtuoso|wappalyzer|webglance|webkit2png|whatcms/|xtate/",ee=/bot|crawl|http|lighthouse|scan|search|spider/i,C;function te(){if(C instanceof RegExp)return C;try{C=new RegExp(X,"i")}catch(r){C=ee}return C}function U(r){return!!r&&te().test(r)}function b(r,n,t,i){return new(t||(t=Promise))(function(o,c){function e(s){try{u(i.next(s))}catch(a){c(a)}}function l(s){try{u(i.throw(s))}catch(a){c(a)}}function u(s){var a;s.done?o(s.value):(a=s.value,a instanceof t?a:new t(function(g){g(a)})).then(e,l)}u((i=i.apply(r,n||[])).next())})}function w(r,n){var t,i,o,c,e={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(u){return function(s){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;c&&(c=0,a[0]&&(e=0)),e;)try{if(t=1,i&&(o=2&a[0]?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return e.label++,{value:a[1],done:!1};case 5:e.label++,i=a[1],a=[0];continue;case 7:a=e.ops.pop(),e.trys.pop();continue;default:if(o=e.trys,!((o=o.length>0&&o[o.length-1])||a[0]!==6&&a[0]!==2)){e=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){e.label=a[1];break}if(a[0]===6&&e.label<o[1]){e.label=o[1],o=a;break}if(o&&e.label<o[2]){e.label=o[2],e.ops.push(a);break}o[2]&&e.ops.pop(),e.trys.pop();continue}a=n.call(r,e)}catch(g){a=[6,g],i=0}finally{t=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([u,s])}}}var f={exclude:[],include:[],logging:!0,timeout:1e3};var G={},re={timeout:"true"},v=function(r,n){typeof window!="undefined"&&(G[r]=n)},ne=function(){return Object.fromEntries(Object.entries(G).filter(function(r){var n,t=r[0];return!(!((n=f==null?void 0:f.exclude)===null||n===void 0)&&n.includes(t))}).filter(function(r){var n,t,i,o,c=r[0];return!((n=f==null?void 0:f.include)===null||n===void 0)&&n.some(function(e){return e.includes(".")})?(t=f==null?void 0:f.include)===null||t===void 0?void 0:t.some(function(e){return e.startsWith(c)}):((i=f==null?void 0:f.include)===null||i===void 0?void 0:i.length)===0||((o=f==null?void 0:f.include)===null||o===void 0?void 0:o.includes(c))}).map(function(r){return[r[0],(0,r[1])()]}))};function A(r){return r^=r>>>16,r=Math.imul(r,2246822507),r^=r>>>13,r=Math.imul(r,3266489909),(r^=r>>>16)>>>0}var h=new Uint32Array([597399067,2869860233,951274213,2716044179]);function m(r,n){return r<<n|r>>>32-n}function L(r,n){var t;if(n===void 0&&(n=0),n=n?0|n:0,typeof r=="string"&&(t=r,r=new TextEncoder().encode(t).buffer),!(r instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");var i=new Uint32Array([n,n,n,n]);(function(c,e){for(var l=c.byteLength/16|0,u=new Uint32Array(c,0,4*l),s=0;s<l;s++){var a=u.subarray(4*s,4*(s+1));a[0]=Math.imul(a[0],h[0]),a[0]=m(a[0],15),a[0]=Math.imul(a[0],h[1]),e[0]=e[0]^a[0],e[0]=m(e[0],19),e[0]=e[0]+e[1],e[0]=Math.imul(e[0],5)+1444728091,a[1]=Math.imul(a[1],h[1]),a[1]=m(a[1],16),a[1]=Math.imul(a[1],h[2]),e[1]=e[1]^a[1],e[1]=m(e[1],17),e[1]=e[1]+e[2],e[1]=Math.imul(e[1],5)+197830471,a[2]=Math.imul(a[2],h[2]),a[2]=m(a[2],17),a[2]=Math.imul(a[2],h[3]),e[2]=e[2]^a[2],e[2]=m(e[2],15),e[2]=e[2]+e[3],e[2]=Math.imul(e[2],5)+2530024501,a[3]=Math.imul(a[3],h[3]),a[3]=m(a[3],18),a[3]=Math.imul(a[3],h[0]),e[3]=e[3]^a[3],e[3]=m(e[3],13),e[3]=e[3]+e[0],e[3]=Math.imul(e[3],5)+850148119}})(r,i),function(c,e){var l=c.byteLength/16|0,u=c.byteLength%16,s=new Uint32Array(4),a=new Uint8Array(c,16*l,u);switch(u){case 15:s[3]=s[3]^a[14]<<16;case 14:s[3]=s[3]^a[13]<<8;case 13:s[3]=s[3]^a[12],s[3]=Math.imul(s[3],h[3]),s[3]=m(s[3],18),s[3]=Math.imul(s[3],h[0]),e[3]=e[3]^s[3];case 12:s[2]=s[2]^a[11]<<24;case 11:s[2]=s[2]^a[10]<<16;case 10:s[2]=s[2]^a[9]<<8;case 9:s[2]=s[2]^a[8],s[2]=Math.imul(s[2],h[2]),s[2]=m(s[2],17),s[2]=Math.imul(s[2],h[3]),e[2]=e[2]^s[2];case 8:s[1]=s[1]^a[7]<<24;case 7:s[1]=s[1]^a[6]<<16;case 6:s[1]=s[1]^a[5]<<8;case 5:s[1]=s[1]^a[4],s[1]=Math.imul(s[1],h[1]),s[1]=m(s[1],16),s[1]=Math.imul(s[1],h[2]),e[1]=e[1]^s[1];case 4:s[0]=s[0]^a[3]<<24;case 3:s[0]=s[0]^a[2]<<16;case 2:s[0]=s[0]^a[1]<<8;case 1:s[0]=s[0]^a[0],s[0]=Math.imul(s[0],h[0]),s[0]=m(s[0],15),s[0]=Math.imul(s[0],h[1]),e[0]=e[0]^s[0]}}(r,i),function(c,e){e[0]=e[0]^c.byteLength,e[1]=e[1]^c.byteLength,e[2]=e[2]^c.byteLength,e[3]=e[3]^c.byteLength,e[0]=e[0]+e[1]|0,e[0]=e[0]+e[2]|0,e[0]=e[0]+e[3]|0,e[1]=e[1]+e[0]|0,e[2]=e[2]+e[0]|0,e[3]=e[3]+e[0]|0,e[0]=A(e[0]),e[1]=A(e[1]),e[2]=A(e[2]),e[3]=A(e[3]),e[0]=e[0]+e[1]|0,e[0]=e[0]+e[2]|0,e[0]=e[0]+e[3]|0,e[1]=e[1]+e[0]|0,e[2]=e[2]+e[0]|0,e[3]=e[3]+e[0]|0}(r,i);var o=new Uint8Array(i.buffer);return Array.from(o).map(function(c){return c.toString(16).padStart(2,"0")}).join("")}function oe(r,n){return new Promise(function(t){setTimeout(function(){return t(n)},r)})}function ie(r,n,t){return Promise.all(r.map(function(i){return Promise.race([i,oe(n,t)])}))}function _(){return b(this,void 0,void 0,function(){var r,n,t,i,o;return w(this,function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),r=ne(),n=Object.keys(r),[4,ie(Object.values(r),(f==null?void 0:f.timeout)||1e3,re)];case 1:return t=c.sent(),i=t.filter(function(e){return e!==void 0}),o={},i.forEach(function(e,l){o[n[l]]=e}),[2,W(o,f.exclude||[],f.include||[],"")];case 2:throw c.sent();case 3:return[2]}})})}function W(r,n,t,i){i===void 0&&(i="");for(var o={},c=function(s,a){var g=i+s+".";if(typeof a!="object"||Array.isArray(a)){var B=n.some(function(M){return g.startsWith(M)}),x=t.some(function(M){return g.startsWith(M)});B&&!x||(o[s]=a)}else{var P=W(a,n,t,g);Object.keys(P).length>0&&(o[s]=P)}},e=0,l=Object.entries(r);e<l.length;e++){var u=l[e];c(u[0],u[1])}return o}function V(r){return b(this,void 0,void 0,function(){var n,t;return w(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,_()];case 1:return n=i.sent(),t=L(JSON.stringify(n)),Math.random()<1e-5&&f.logging&&function(o,c){b(this,void 0,void 0,function(){var e,l;return w(this,function(u){switch(u.label){case 0:if(e="https://logging.thumbmarkjs.com/v1/log",l={thumbmark:o,components:c,version:"0.20.6"},sessionStorage.getItem("_tmjs_l"))return[3,4];sessionStorage.setItem("_tmjs_l","1"),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})];case 2:case 3:return u.sent(),[3,4];case 4:return[2]}})})}(t,n),r?[2,{hash:t.toString(),data:n}]:[2,t.toString()];case 2:throw i.sent();case 3:return[2]}})})}function k(){if(typeof navigator=="undefined")return{name:"unknown",version:"unknown"};for(var r=navigator.userAgent,n={edg:"Edge",opr:"Opera",samsung:"SamsungBrowser"},t=0,i=[new RegExp("(?<name>SamsungBrowser)\\/(?<version>\\d+(?:\\.\\d+)?)"),new RegExp("(?<name>Edge|Edg)\\/(?<version>\\d+(?:\\.\\d+)?)"),new RegExp("(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\\/(?<version>\\d+(?:\\.\\d+)?)"),new RegExp("(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\\/(?<version>\\d+(?:\\.\\d+)?)"),new RegExp("(?<name>Safari)\\/(?<version>\\d+(?:\\.\\d+)?)"),new RegExp("(?<name>MSIE|Trident|IEMobile).+?(?<version>\\d+(?:\\.\\d+)?)"),new RegExp("(?<name>samsung).*Version\\/(?<version>\\d+(?:\\.\\d+)?)","i"),new RegExp("(?<name>[A-Za-z]+)\\/(?<version>\\d+(?:\\.\\d+)?)")];t<i.length;t++){var o=i[t],c=r.match(o);if(c&&c.groups)return{name:n[c.groups.name.toLowerCase()]||c.groups.name,version:c.groups.version}}return{name:"unknown",version:"unknown"}}function ae(r){for(var n=0,t=0;t<r.length;++t)n+=Math.abs(r[t]);return n}var se=k();function $(r,n,t){for(var i=[],o=0;o<r[0].data.length;o++){for(var c=[],e=0;e<r.length;e++)c.push(r[e].data[o]);i.push(ce(c))}var l=new Uint8ClampedArray(i);return new ImageData(l,n,t)}function ce(r){if(r.length===0)return 0;for(var n={},t=0,i=r;t<i.length;t++)n[c=i[t]]=(n[c]||0)+1;var o=r[0];for(var c in n)n[c]>n[o]&&(o=parseInt(c,10));return o}["SamsungBrowser","Safari"].includes(se.name)||v("audio",function(){return b(this,void 0,void 0,function(){return w(this,function(r){return[2,new Promise(function(n,t){try{var i=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),o=i.createBufferSource(),c=i.createOscillator();c.frequency.value=1e3;var e,l=i.createDynamicsCompressor();l.threshold.value=-50,l.knee.value=40,l.ratio.value=12,l.attack.value=0,l.release.value=.2,c.connect(l),l.connect(i.destination),c.start(),i.oncomplete=function(u){e=u.renderedBuffer.getChannelData(0),n({sampleHash:ae(e),oscillator:c.type,maxChannels:i.destination.maxChannelCount,channelCountMode:o.channelCountMode})},i.startRendering()}catch(u){console.error("Error creating audio fingerprint:",u),t(u)}})]})})});var H=k(),F=H.name.toLowerCase(),le=H.version.split(".")[0]||"0",ue=parseInt(le,10);F==="firefox"||F==="safari"&&ue===17||v("canvas",function(){return document.createElement("canvas").getContext("2d"),new Promise(function(r){var n=Array.from({length:3},function(){return function(){var t=document.createElement("canvas"),i=t.getContext("2d");if(!i)return new ImageData(1,1);t.width=280,t.height=20;var o=i.createLinearGradient(0,0,t.width,t.height);o.addColorStop(0,"red"),o.addColorStop(.16666666666666666,"orange"),o.addColorStop(.3333333333333333,"yellow"),o.addColorStop(.5,"green"),o.addColorStop(.6666666666666666,"blue"),o.addColorStop(.8333333333333334,"indigo"),o.addColorStop(1,"violet"),i.fillStyle=o,i.fillRect(0,0,t.width,t.height);var c="Random Text WMwmil10Oo";return i.font="23.123px Arial",i.fillStyle="black",i.fillText(c,-5,15),i.fillStyle="rgba(0, 0, 255, 0.5)",i.fillText(c,-3.3,17.7),i.beginPath(),i.moveTo(0,0),i.lineTo(2*t.width/7,t.height),i.strokeStyle="white",i.lineWidth=2,i.stroke(),i.getImageData(0,0,t.width,t.height)}()});r({commonImageDataHash:L($(n,280,20).data.toString()).toString()})})});var E,de=["Arial","Arial Black","Arial Narrow","Arial Rounded MT","Arimo","Archivo","Barlow","Bebas Neue","Bitter","Bookman","Calibri","Cabin","Candara","Century","Century Gothic","Comic Sans MS","Constantia","Courier","Courier New","Crimson Text","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Dosis","Droid Sans","Exo","Fira Code","Fira Sans","Franklin Gothic Medium","Garamond","Geneva","Georgia","Gill Sans","Helvetica","Impact","Inconsolata","Indie Flower","Inter","Josefin Sans","Karla","Lato","Lexend","Lucida Bright","Lucida Console","Lucida Sans Unicode","Manrope","Merriweather","Merriweather Sans","Montserrat","Myriad","Noto Sans","Nunito","Nunito Sans","Open Sans","Optima","Orbitron","Oswald","Pacifico","Palatino","Perpetua","PT Sans","PT Serif","Poppins","Prompt","Public Sans","Quicksand","Rajdhani","Recursive","Roboto","Roboto Condensed","Rockwell","Rubik","Segoe Print","Segoe Script","Segoe UI","Sora","Source Sans Pro","Space Mono","Tahoma","Taviraj","Times","Times New Roman","Titillium Web","Trebuchet MS","Ubuntu","Varela Round","Verdana","Work Sans"],fe=["monospace","sans-serif","serif"];function N(r,n){if(!r)throw new Error("Canvas context not supported");return r.font,r.font="72px ".concat(n),r.measureText("WwMmLli0Oo").width}function he(){var r,n=document.createElement("canvas"),t=(r=n.getContext("webgl"))!==null&&r!==void 0?r:n.getContext("experimental-webgl");if(t&&"getParameter"in t)try{var i=(t.getParameter(t.VENDOR)||"").toString(),o=(t.getParameter(t.RENDERER)||"").toString(),c={vendor:i,renderer:o,version:(t.getParameter(t.VERSION)||"").toString(),shadingLanguageVersion:(t.getParameter(t.SHADING_LANGUAGE_VERSION)||"").toString()};if(!o.length||!i.length){var e=t.getExtension("WEBGL_debug_renderer_info");if(e){var l=(t.getParameter(e.UNMASKED_VENDOR_WEBGL)||"").toString(),u=(t.getParameter(e.UNMASKED_RENDERER_WEBGL)||"").toString();l&&(c.vendorUnmasked=l),u&&(c.rendererUnmasked=u)}}return c}catch(s){}return"undefined"}function ge(){var r=new Float32Array(1),n=new Uint8Array(r.buffer);return r[0]=1/0,r[0]=r[0]-r[0],n[3]}function pe(r,n){var t={};return n.forEach(function(i){var o=function(c){if(c.length===0)return null;var e={};c.forEach(function(s){var a=String(s);e[a]=(e[a]||0)+1});var l=c[0],u=1;return Object.keys(e).forEach(function(s){e[s]>u&&(l=s,u=e[s])}),l}(r.map(function(c){return i in c?c[i]:void 0}).filter(function(c){return c!==void 0}));o&&(t[i]=o)}),t}function me(){var r=[],n={"prefers-contrast":["high","more","low","less","forced","no-preference"],"any-hover":["hover","none"],"any-pointer":["none","coarse","fine"],pointer:["none","coarse","fine"],hover:["hover","none"],update:["fast","slow"],"inverted-colors":["inverted","none"],"prefers-reduced-motion":["reduce","no-preference"],"prefers-reduced-transparency":["reduce","no-preference"],scripting:["none","initial-only","enabled"],"forced-colors":["active","none"]};return Object.keys(n).forEach(function(t){n[t].forEach(function(i){matchMedia("(".concat(t,": ").concat(i,")")).matches&&r.push("".concat(t,": ").concat(i))})}),r}k().name!="Firefox"&&v("fonts",function(){var r=this;return new Promise(function(n,t){try{(function(i){var o;b(this,void 0,void 0,function(){var c,e,l;return w(this,function(u){switch(u.label){case 0:return document.body?[3,2]:[4,(s=50,new Promise(function(g){return setTimeout(g,s,a)}))];case 1:return u.sent(),[3,0];case 2:if((c=document.createElement("iframe")).setAttribute("frameBorder","0"),(e=c.style).setProperty("position","fixed"),e.setProperty("display","block","important"),e.setProperty("visibility","visible"),e.setProperty("border","0"),e.setProperty("opacity","0"),c.src="about:blank",document.body.appendChild(c),!(l=c.contentDocument||((o=c.contentWindow)===null||o===void 0?void 0:o.document)))throw new Error("Iframe document is not accessible");return i({iframe:l}),setTimeout(function(){document.body.removeChild(c)},0),[2]}var s,a})})})(function(i){var o=i.iframe;return b(r,void 0,void 0,function(){var c,e,l,u;return w(this,function(s){return c=o.createElement("canvas"),e=c.getContext("2d"),l=fe.map(function(a){return N(e,a)}),u={},de.forEach(function(a){var g=N(e,a);l.includes(g)||(u[a]=g)}),n(u),[2]})})})}catch(i){t({error:"unsupported"})}})}),v("hardware",function(){return new Promise(function(r,n){var t=navigator.deviceMemory!==void 0?navigator.deviceMemory:0,i=window.performance&&window.performance.memory?window.performance.memory:0;r({videocard:he(),architecture:ge(),deviceMemory:t.toString()||"undefined",jsHeapSizeLimit:i.jsHeapSizeLimit||0})})}),v("locales",function(){return new Promise(function(r){r({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),v("permissions",function(){return b(this,void 0,void 0,function(){var r;return w(this,function(n){return E=(f==null?void 0:f.permissions_to_check)||["accelerometer","accessibility","accessibility-events","ambient-light-sensor","background-fetch","background-sync","bluetooth","camera","clipboard-read","clipboard-write","device-info","display-capture","gyroscope","geolocation","local-fonts","magnetometer","microphone","midi","nfc","notifications","payment-handler","persistent-storage","push","speaker","storage-access","top-level-storage-access","window-management","query"],k().name.toLowerCase()==="safari"&&(E=E.filter(function(t){return!["camera","geolocation","microphone"].includes(t)})),r=Array.from({length:(f==null?void 0:f.retries)||3},function(){return function(){return b(this,void 0,void 0,function(){var t,i,o,c,e;return w(this,function(l){switch(l.label){case 0:t={},i=0,o=E,l.label=1;case 1:if(!(i<o.length))return[3,6];c=o[i],l.label=2;case 2:return l.trys.push([2,4,,5]),[4,navigator.permissions.query({name:c})];case 3:return e=l.sent(),t[c]=e.state.toString(),[3,5];case 4:return l.sent(),[3,5];case 5:return i++,[3,1];case 6:return[2,t]}})})}()}),[2,Promise.all(r).then(function(t){return pe(t,E)})]})})}),v("plugins",function(){var r=[];if(navigator.plugins)for(var n=0;n<navigator.plugins.length;n++){var t=navigator.plugins[n];r.push([t.name,t.filename,t.description].join("|"))}return new Promise(function(i){i({plugins:r})})}),v("screen",function(){return new Promise(function(r){r({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:me()})})}),v("system",function(){return new Promise(function(r){var n=k(),t={platform:window.navigator.platform,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:n.name,version:n.version}};n.name.toLowerCase()!=="safari"&&(t.applePayVersion=function(){if(window.location.protocol==="https:"&&typeof window.ApplePaySession=="function")try{for(var i=window.ApplePaySession.supportsVersion,o=15;o>0;o--)if(i(o))return o}catch(c){return 0}return 0}(),t.cookieEnabled=window.navigator.cookieEnabled),r(t)})});var p,ve=k().name!=="SamsungBrowser"?1:3,d=null;v("webgl",function(){return b(this,void 0,void 0,function(){var r;return w(this,function(n){typeof document!="undefined"&&((p=document.createElement("canvas")).width=200,p.height=100,d=p.getContext("webgl"));try{if(!d)throw new Error("WebGL not supported");return r=Array.from({length:ve},function(){return function(){try{if(!d)throw new Error("WebGL not supported");var t=`
          attribute vec2 position;
          void main() {
              gl_Position = vec4(position, 0.0, 1.0);
          }
      `,i=`
          precision mediump float;
          void main() {
              gl_FragColor = vec4(0.812, 0.195, 0.553, 0.921); // Set line color
          }
      `,o=d.createShader(d.VERTEX_SHADER),c=d.createShader(d.FRAGMENT_SHADER);if(!o||!c)throw new Error("Failed to create shaders");if(d.shaderSource(o,t),d.shaderSource(c,i),d.compileShader(o),!d.getShaderParameter(o,d.COMPILE_STATUS))throw new Error("Vertex shader compilation failed: "+d.getShaderInfoLog(o));if(d.compileShader(c),!d.getShaderParameter(c,d.COMPILE_STATUS))throw new Error("Fragment shader compilation failed: "+d.getShaderInfoLog(c));var e=d.createProgram();if(!e)throw new Error("Failed to create shader program");if(d.attachShader(e,o),d.attachShader(e,c),d.linkProgram(e),!d.getProgramParameter(e,d.LINK_STATUS))throw new Error("Shader program linking failed: "+d.getProgramInfoLog(e));d.useProgram(e);for(var l=137,u=new Float32Array(4*l),s=2*Math.PI/l,a=0;a<l;a++){var g=a*s;u[4*a]=0,u[4*a+1]=0,u[4*a+2]=Math.cos(g)*(p.width/2),u[4*a+3]=Math.sin(g)*(p.height/2)}var B=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,B),d.bufferData(d.ARRAY_BUFFER,u,d.STATIC_DRAW);var x=d.getAttribLocation(e,"position");d.enableVertexAttribArray(x),d.vertexAttribPointer(x,2,d.FLOAT,!1,0,0),d.viewport(0,0,p.width,p.height),d.clearColor(0,0,0,1),d.clear(d.COLOR_BUFFER_BIT),d.drawArrays(d.LINES,0,2*l);var P=new Uint8ClampedArray(p.width*p.height*4);return d.readPixels(0,0,p.width,p.height,d.RGBA,d.UNSIGNED_BYTE,P),new ImageData(P,p.width,p.height)}catch(M){return new ImageData(1,1)}finally{d&&(d.bindBuffer(d.ARRAY_BUFFER,null),d.useProgram(null),d.viewport(0,0,d.drawingBufferWidth,d.drawingBufferHeight),d.clearColor(0,0,0,0))}}()}),[2,{commonImageHash:L($(r,p.width,p.height).data.toString()).toString()}]}catch(t){return[2,{webgl:"unsupported"}]}return[2]})})});var S=function(r,n,t,i){for(var o=(t-n)/i,c=0,e=0;e<i;e++)c+=r(n+(e+.5)*o);return c*o};v("math",function(){return b(void 0,void 0,void 0,function(){return w(this,function(r){return[2,{acos:Math.acos(.5),asin:S(Math.asin,-1,1,97),atan:S(Math.atan,-1,1,97),cos:S(Math.cos,0,Math.PI,97),cosh:Math.cosh(9/7),e:Math.E,largeCos:Math.cos(1e20),largeSin:Math.sin(1e20),largeTan:Math.tan(1e20),log:Math.log(1e3),pi:Math.PI,sin:S(Math.sin,-Math.PI,Math.PI,97),sinh:S(Math.sinh,-9/7,7/9,97),sqrt:Math.sqrt(2),tan:S(Math.tan,0,2*Math.PI,97),tanh:S(Math.tanh,-9/7,7/9,97)}]})})});var q="1.12.1";var I=class{constructor(n){y(this,"privacyConfig",{requiresIabPurposes:[]});y(this,"sdk");y(this,"analyticsLibPlugin");y(this,"isProxyPlugin",!0);y(this,"name");y(this,"type");y(this,"version");y(this,"config");this.type="converge-plugin-botdetection",this.name=this.type,this.version=q,this.sdk={},this.config=n||{},this.analyticsLibPlugin=we(this.config)}isLoaded(){var n;return((n=this.analyticsLibPlugin)==null?void 0:n.loaded())==!0}};function D(r){return r?U(r):!1}function we(r={}){return{name:"analytics-plugin-botdetection",config:R(T({},r),{sdk:{}}),initializeStart:i=>z(null,[i],function*({abort:n,config:t}){var c;let o=t.sdk;try{let e=t.userAgentOverride||o.dataLayer.navigator.userAgent(),l,u;if(o.identity.device.fp?(l=Promise.resolve(),u=Promise.resolve()):(l=V().then(s=>{o.identity.device.fp=s.toString()}),u=_().then(s=>{s&&s.system&&(s.system.browser&&(o.identity.device.bn=s.system.browser.name,o.identity.device.bv=s.system.browser.version),o.identity.device.pl=s.system.platform)})),D(e)&&(!((c=o.identity.device)!=null&&c.pl)||o.identity.device.pl.toLowerCase()!="iphone")&&(yield Promise.all([l,u]),o.debug.log("[Bot detection] - Bot user agent detected."+(t.allowDisableSdk?" Disabling SDK":"")),t.allowDisableSdk&&(o.config.isDisabled=!0),yield o.convergeApi.ingest.push([],[],[{id:R(T({},yield o.identity.getProfile()),{ua:[e]}),src:o.debug.createTrackingSource("sdk/js/bot/detect")}],[]),t.allowDisableSdk))return n("Cancel the initialize call because bot UA was detected")}catch(e){o.debug.error("Failed to start bot detection plugin",e)}}),pageStart:({abort:n,config:t})=>{if(t.allowDisableSdk&&D(t.userAgentOverride))return n("Cancel the page call because bot UA was detected")},identifyStart:({abort:n,config:t})=>{if(t.allowDisableSdk&&D(t.userAgentOverride))return n("Cancel the identify call because bot UA was detected")},trackStart:({abort:n,config:t})=>{if(t.allowDisableSdk&&D(t.userAgentOverride))return n("Cancel the track call because bot UA was detected")},loaded:()=>!0}}window.BotDetectionConvergeSdkPlugin=r=>new I(r);})();
"use strict";(()=>{var V=Object.create;var M=Object.defineProperty,j=Object.defineProperties,U=Object.getOwnPropertyDescriptor,z=Object.getOwnPropertyDescriptors,$=Object.getOwnPropertyNames,L=Object.getOwnPropertySymbols,Q=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty,K=Object.prototype.propertyIsEnumerable;var w=(s,e,t)=>e in s?M(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,v=(s,e)=>{for(var t in e||(e={}))T.call(e,t)&&w(s,t,e[t]);if(L)for(var t of L(e))K.call(e,t)&&w(s,t,e[t]);return s},k=(s,e)=>j(s,z(e));var W=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports);var Y=(s,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of $(e))!T.call(s,l)&&l!==t&&M(s,l,{get:()=>e[l],enumerable:!(i=U(e,l))||i.enumerable});return s};var Z=(s,e,t)=>(t=s!=null?V(Q(s)):{},Y(e||!s||!s.__esModule?M(t,"default",{value:s,enumerable:!0}):t,s));var I=(s,e,t)=>w(s,typeof e!="symbol"?e+"":e,t);var g=(s,e,t)=>new Promise((i,l)=>{var n=r=>{try{o(t.next(r))}catch(u){l(u)}},c=r=>{try{o(t.throw(r))}catch(u){l(u)}},o=r=>r.done?i(r.value):Promise.resolve(r.value).then(n,c);o((t=t.apply(s,e)).next())});var O=W((te,q)=>{q.exports=SeekaConvergeCore});var y=Z(O());var B="1.12.1";var S=!1,C=!1,R=(...s)=>{},h=(...s)=>{},A=()=>(S||R("Pixel not initialized before using call ReactPixel.init with required params"),S),P=()=>window.fbq,J={autoConfig:!0,debug:!1},N={init(s,e={},t=J){S=typeof window!="undefined"&&!!P();function i(n){return document.querySelectorAll(`script[src='${n}']`).length>0}let l="https://connect.facebook.net/en_US/fbevents.js";if(i(l)?console.debug("Seeka - Facebook Pixel tag already installed."):function(n,c,o,r,u,d,a){n.fbq||(u=n.fbq=function(){u.callMethod?u.callMethod.apply(u,arguments):u.queue.push(arguments)},n._fbq||(n._fbq=u),u.push=u,u.loaded=!0,u.version="2.0",u.queue=[],d=c.createElement(o),d.async=!0,d.src=r,a=c.getElementsByTagName(o)[0],a.parentNode.insertBefore(d,a))}(window,document,"script",l),!s)R("Please provide pixel id(s) for initializing");else{try{P().disablePushState=!0}catch(n){console.error(n,"Failed to disable fbq.disablePushState")}t.autoConfig===!1&&P()("set","autoConfig",!1,s),P()("init",s,e),S=!0,C=t.debug}},pageView(){},track(s,e){if(!A())return;let t=(e==null?void 0:e.eventId)||void 0;this.cleanProps(e),P()("track",s,e,{eventID:t}),C&&(h(`called fbq('track', '${s}');`),e&&h("with data",e))},trackSingle(s,e,t){if(!A())return;let i=(t==null?void 0:t.eventId)||void 0;this.cleanProps(t),P()("trackSingle",s,e,t,{eventID:i}),C&&(h(`called fbq('trackSingle', '${s}', '${e}');`),t&&h("with data",t))},trackCustom(s,e){if(!A())return;let t=(e==null?void 0:e.eventId)||void 0;this.cleanProps(e),P()("trackCustom",s,e,{eventID:t}),C&&(h(`called fbq('trackCustom', '${s}');`),e&&h("with data",e))},trackSingleCustom(s,e,t){if(!A())return;let i=(t==null?void 0:t.eventId)||void 0;this.cleanProps(t),P()("trackSingleCustom",s,e,t,{eventID:i}),C&&(h(`called fbq('trackSingleCustom', '${s}', '${e}');`),t&&h("with data",t))},grantConsent(){A()&&(P()("consent","grant"),C&&h("called fbq('consent', 'grant');"))},revokeConsent(){A()&&(P()("consent","revoke"),C&&h("called fbq('consent', 'revoke');"))},fbq(...s){A()&&(P()(...s),C&&(h(`called fbq('${s.slice(0,2).join("', '")}')`),s[2]&&h("with data",s[2])))},cleanProps(s){s&&(s.eventId&&delete s.eventId,s.testEventCode&&delete s.testEventCode)}};var p=class{constructor(e){I(this,"sdk");I(this,"analyticsLibPlugin");I(this,"privacyConfig",{requiresIabPurposes:[y.IabPrivacyConsentPurposeIdMap.measureAdvertisingPerformance]});I(this,"name");I(this,"type");I(this,"version");I(this,"config");this.type="converge-plugin-facebook-pixel",this.name=this.type+"-"+(e==null?void 0:e.pixelId),this.version=B,this.sdk={},this.config=e||{}}init(e){return g(this,null,function*(){this.analyticsLibPlugin=G(this.config),e.payload.facebookUserData=yield this.convertProfileToFacebookUserData(e.payload.profile),yield this.analyticsLibPlugin.initialize(e),e.payload.facebookUserData&&this.sdk.debug.verbose("Meta pixel -  advanced matching parameters",e.payload.facebookUserData);let t=this.sdk.util.url.getParamFromQueryString("test_event_code",this.sdk.dataLayer.window.location().href)||this.sdk.state.get("plugin.facebook.pixel.testEventCode");this.config||(this.config={pixelId:"",autoConfig:!0,debug:!1,testEventCode:void 0}),t&&(this.config.testEventCode=t,this.sdk.state.set("plugin.facebook.pixel.testEventCode",t))})}addCrossDomainTrackingQuery(){let e=new Map,t=this.sdk.util.cookie.get("_fbp")||"";return t&&e.set("sk.fbp",t),e}collectIdentifiers(){return g(this,null,function*(){let e={facebook:{fbp:[],fbc:[],login:[],lead:[]}};try{let n=this.sdk.util.url.getParamFromQueryString("sk.fbp",this.sdk.dataLayer.window.location().href),c=this.sdk.util.cookie.get("_fbp");if(n)e.facebook.fbp.push(n),this.sdk.util.cookie.set("_fbp",c),this.sdk.debug.verbose("Meta pixel - fbp from url",n);else if(c)e.facebook.fbp.push(c),this.sdk.debug.verbose("Meta pixel - fbp cookie",c);else{let o=this.generateNewFacebookBrowserId();this.sdk.util.cookie.set("_fbp",o),e.facebook.fbp.push(o)}}catch(n){this.sdk.debug.warn("Meta pixel -  Failed to collect fbp",n)}let t=this.sdk.util.url.getParamFromQueryString("fbclid",this.sdk.dataLayer.window.location().href),i=this.extractClickIdentifier(t),l=this.normaliseFacebookClickId(t);try{let n=this.sdk.util.cookie.get("_fbc"),c=n,o=null;n&&(o=n),l&&(!n||c!==i)&&(o=l),c&&(!i||c!==i)&&e.facebook.fbc.push(n),o&&this.extractClickIdentifier(o)!=c&&e.facebook.fbc.push(o),(!n&&o||c!==this.extractClickIdentifier(o))&&this.sdk.util.cookie.set("_fbc",o)}catch(n){this.sdk.debug.warn("Meta pixel -  Failed to collect fbc",n)}return this.sdk.debug.verbose("Meta pixel -  collected identifiers",e),e})}isLoaded(){var e;return((e=this.analyticsLibPlugin)==null?void 0:e.loaded())==!0}activity(e,t,i){return g(this,null,function*(){this.custom(e,t,i,e)})}custom(e,t,i,l){return g(this,null,function*(){var o,r;let n=((o=i==null?void 0:i.augmentResult)==null?void 0:o.destinationActivityNameOverride)||e,c=yield this.onBeforeSendParams(k(v({},t),{payload:{event:n,isCustomEvent:!0,props:v({},(r=t==null?void 0:t.payload)==null?void 0:r.properties)}}),l||y.TrackingActivityNames.Custom);this.analyticsLibPlugin.track(c,this.sdk)})}viewPage(e,t){return g(this,null,function*(){var l;let i=((l=t==null?void 0:t.augmentResult)==null?void 0:l.destinationActivityNameOverride)||(e==null?void 0:e.activityNameCustom)||"PageView";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},e),{payload:{event:i}}),y.TrackingActivityNames.ViewPage),this.sdk)})}addPaymentMethod(e,t,i){return g(this,null,function*(){var n,c,o,r,u;let l=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"AddPaymentInfo";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:l,props:{currency:(e==null?void 0:e.currencyCode)||((o=(c=this.sdk.config.tracking)==null?void 0:c.defaults)==null?void 0:o.currencyCode),value:(e==null?void 0:e.totalPrice)||((r=e==null?void 0:e.products)==null?void 0:r.map(d=>(d.unitPrice||0)*(d.quantity||1)).reduce((d,a)=>d+a,0))||void 0,paymentMethodName:(e==null?void 0:e.paymentMethodName)||void 0,contents:(u=e==null?void 0:e.products)==null?void 0:u.map(d=>d?{id:this.sdk.util.parse.getContentIdFromProduct(d,this.sdk.config.tracking,y.AnalyticsLibrary.FacebookPixel),item_price:d.unitPrice,quantity:d.quantity}:null).filter(Boolean).filter(d=>d==null?void 0:d.id)}}}),y.TrackingActivityNames.AddPaymentMethod),this.sdk)})}keywordSearch(e,t,i){return g(this,null,function*(){var n;let l=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"Search";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:l,props:{search_string:e==null?void 0:e.searchText}}}),y.TrackingActivityNames.KeywordSearch),this.sdk)})}userLogin(e,t,i){return g(this,null,function*(){var c,o;let l=((c=i==null?void 0:i.augmentResult)==null?void 0:c.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"UserLogin",n=yield this.onBeforeSendParams(k(v({},t),{payload:{event:l,isCustomEvent:!0,props:v({},(o=t==null?void 0:t.payload)==null?void 0:o.properties)}}),y.TrackingActivityNames.UserLogin);this.analyticsLibPlugin.track(n,this.sdk)})}userLoginSignup(e,t,i){return g(this,null,function*(){var n;let l=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"CompleteRegistration";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:l}}),y.TrackingActivityNames.UserLoginSignup),this.sdk)})}newsletterSignup(e,t,i){return g(this,null,function*(){var n;let l=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"CompleteRegistration";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:l}}),y.TrackingActivityNames.NewsletterSignup),this.sdk)})}lead(e,t,i){return g(this,null,function*(){var o,r,u,d,a,b;let l=((o=i==null?void 0:i.augmentResult)==null?void 0:o.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"Lead",n=(e==null?void 0:e.currencyCode)||((u=(r=this.sdk.config.tracking)==null?void 0:r.defaults)==null?void 0:u.currencyCode),c=(e==null?void 0:e.predictedValue)||(e==null?void 0:e.predictedLtv)||void 0;if(!c||c<=0){let f=(b=(a=(d=this.sdk.config.tracking)==null?void 0:d.analytics)==null?void 0:a.autoCollection)==null?void 0:b.defaultActivityCurrencyAmount;f!=null&&f.amount&&f.amount>0&&(n=f.currencyCode,c=f.amount,this.sdk.debug.log("Set value of event due to Meta requiring a value for this event and default currency amount config is set"))}this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:l,props:{content_name:e==null?void 0:e.sourceContentName,currency:n,value:c,companyName:e==null?void 0:e.companyName,companySize:e==null?void 0:e.companySize,predictedLtv:e==null?void 0:e.predictedLtv,predictedValue:e==null?void 0:e.predictedValue}}}),y.TrackingActivityNames.Lead),this.sdk)})}startTrial(e,t,i){return g(this,null,function*(){var n;let l=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"StartTrial";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:l,props:{content_name:e==null?void 0:e.sourceContentName,currency:e==null?void 0:e.currencyCode,value:(e==null?void 0:e.predictedValue)||(e==null?void 0:e.predictedLtv),companyName:e==null?void 0:e.companyName,companySize:e==null?void 0:e.companySize,predictedLtv:e==null?void 0:e.predictedLtv,predictedValue:e==null?void 0:e.predictedValue}}}),y.TrackingActivityNames.StartTrial),this.sdk)})}contactMessage(e,t,i){return g(this,null,function*(){var n;let l=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"Contact";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:l,props:{content_name:e==null?void 0:e.sourceContentName,currency:e==null?void 0:e.currencyCode,value:(e==null?void 0:e.predictedValue)||(e==null?void 0:e.predictedLtv),companyName:e==null?void 0:e.companyName,companySize:e==null?void 0:e.companySize,predictedLtv:e==null?void 0:e.predictedLtv,predictedValue:e==null?void 0:e.predictedValue}}}),y.TrackingActivityNames.ContactMessage),this.sdk)})}schedule(e,t,i){return g(this,null,function*(){var n;let l=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"Schedule";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:l,props:{content_name:e==null?void 0:e.sourceContentName,currency:e==null?void 0:e.currencyCode,value:(e==null?void 0:e.predictedValue)||(e==null?void 0:e.predictedLtv),companyName:e==null?void 0:e.companyName,companySize:e==null?void 0:e.companySize,predictedLtv:e==null?void 0:e.predictedLtv,predictedValue:e==null?void 0:e.predictedValue}}}),y.TrackingActivityNames.Schedule),this.sdk)})}viewContentItem(e,t,i){return g(this,null,function*(){var c,o,r,u;let l=((c=i==null?void 0:i.augmentResult)==null?void 0:c.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"ViewContent",n=(e==null?void 0:e.items)&&(e==null?void 0:e.items.length)>0;this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:l,props:{content_name:e==null?void 0:e.contentName,content_category:e==null?void 0:e.categoryName,content_type:(e==null?void 0:e.contentType)===y.ECommerceContentType.Collection?"product_group":(e==null?void 0:e.contentType)===y.ECommerceContentType.SingleProduct||(e==null?void 0:e.contentType)===y.ECommerceContentType.SingleVariant?"product":void 0,currency:(e==null?void 0:e.currencyCode)||((r=(o=this.sdk.config.tracking)==null?void 0:o.defaults)==null?void 0:r.currencyCode),value:e==null?void 0:e.value,content_ids:n?void 0:e!=null&&e.identifiers&&e.identifiers.length>0?e.identifiers:void 0,contents:n?(u=e==null?void 0:e.items)==null?void 0:u.map(d=>d?{id:this.sdk.util.parse.getContentIdFromProduct(d,this.sdk.config.tracking,y.AnalyticsLibrary.FacebookPixel),item_price:d.unitPrice,quantity:d.quantity}:null).filter(Boolean).filter(d=>d==null?void 0:d.id):void 0}}}),y.TrackingActivityNames.ViewContentItem),this.sdk)})}order(e,t,i){return g(this,null,function*(){var o,r,u,d,a,b,f,F,_;let l=((o=i==null?void 0:i.augmentResult)==null?void 0:o.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"Purchase",n=(e==null?void 0:e.currencyCode)||((u=(r=this.sdk.config.tracking)==null?void 0:r.defaults)==null?void 0:u.currencyCode),c=(e==null?void 0:e.totalPrice)||((d=e==null?void 0:e.products)==null?void 0:d.map(m=>(m.unitPrice||0)*(m.quantity||1)).reduce((m,x)=>m+x,0))||void 0;if(!c||c<=0){let m=(f=(b=(a=this.sdk.config.tracking)==null?void 0:a.analytics)==null?void 0:b.autoCollection)==null?void 0:f.defaultActivityCurrencyAmount;if(m!=null&&m.amount&&m.amount>0)n=m.currencyCode,c=m.amount,this.sdk.debug.log("Set value of event due to Meta requiring a value for this event and default currency amount config is set");else{this.sdk.debug.warn("Not sending purchase event to Meta due to no value being set on the payload.");return}}this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:l,props:{currency:n,value:c,content_type:e?"product":void 0,num_items:((F=e==null?void 0:e.products)==null?void 0:F.map(m=>m.quantity||1).reduce((m,x)=>m+x,0))||void 0,order_id:(e==null?void 0:e.orderIdentifier)||(e==null?void 0:e.orderNumber),paymentMethodName:(e==null?void 0:e.paymentMethodName)||void 0,contents:(_=e==null?void 0:e.products)==null?void 0:_.map(m=>m?{id:this.sdk.util.parse.getContentIdFromProduct(m,this.sdk.config.tracking,y.AnalyticsLibrary.FacebookPixel),item_price:m.unitPrice,quantity:m.quantity}:null).filter(Boolean).filter(m=>m==null?void 0:m.id)}}}),y.TrackingActivityNames.Order),this.sdk)})}subscriptionItemPurchase(e,t,i){return g(this,null,function*(){var n,c,o,r,u,d;let l=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"Subscribe";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:l,props:{currency:(e==null?void 0:e.currencyCode)||((o=(c=this.sdk.config.tracking)==null?void 0:c.defaults)==null?void 0:o.currencyCode),value:(e==null?void 0:e.totalPrice)||((r=e==null?void 0:e.products)==null?void 0:r.map(a=>(a.unitPrice||0)*(a.quantity||1)).reduce((a,b)=>a+b,0))||void 0,content_type:e?"product":void 0,num_items:((u=e==null?void 0:e.products)==null?void 0:u.map(a=>a.quantity||1).reduce((a,b)=>a+b,0))||void 0,order_id:(e==null?void 0:e.orderIdentifier)||(e==null?void 0:e.orderNumber),paymentMethodName:(e==null?void 0:e.paymentMethodName)||void 0,contents:(d=e==null?void 0:e.products)==null?void 0:d.map(a=>a?{id:this.sdk.util.parse.getContentIdFromProduct(a,this.sdk.config.tracking,y.AnalyticsLibrary.FacebookPixel),item_price:a.unitPrice,quantity:a.quantity}:null).filter(Boolean).filter(a=>a==null?void 0:a.id)}}}),y.TrackingActivityNames.SubscriptionItemPurchase),this.sdk)})}initiateCheckout(e,t,i){return g(this,null,function*(){var n,c,o,r,u,d;let l=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"InitiateCheckout";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:l,props:{currency:(e==null?void 0:e.currencyCode)||((o=(c=this.sdk.config.tracking)==null?void 0:c.defaults)==null?void 0:o.currencyCode),value:(e==null?void 0:e.totalPrice)||((r=e==null?void 0:e.products)==null?void 0:r.map(a=>(a.unitPrice||0)*(a.quantity||1)).reduce((a,b)=>a+b,0))||void 0,num_items:((u=e==null?void 0:e.products)==null?void 0:u.map(a=>a.quantity||1).reduce((a,b)=>a+b,0))||void 0,order_id:(e==null?void 0:e.orderIdentifier)||(e==null?void 0:e.orderNumber),contents:(d=e==null?void 0:e.products)==null?void 0:d.map(a=>a?{id:this.sdk.util.parse.getContentIdFromProduct(a,this.sdk.config.tracking,y.AnalyticsLibrary.FacebookPixel),item_price:a.unitPrice,quantity:a.quantity}:null).filter(Boolean).filter(a=>a==null?void 0:a.id)}}}),y.TrackingActivityNames.InitiateCheckout),this.sdk)})}viewProduct(e,t,i){return g(this,null,function*(){var n,c,o;let l=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"ViewContent";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:l,props:{currency:(e==null?void 0:e.currencyCode)||((o=(c=this.sdk.config.tracking)==null?void 0:c.defaults)==null?void 0:o.currencyCode),value:e==null?void 0:e.unitPrice,content_name:this.sdk.util.parse.getContentNameFromProduct(e,this.sdk.config.tracking),content_type:"product",content_category:e==null?void 0:e.categoryName,content_ids:[this.sdk.util.parse.getContentIdFromProduct(e,this.sdk.config.tracking,y.AnalyticsLibrary.FacebookPixel)]}}}),y.TrackingActivityNames.ViewProduct),this.sdk)})}changeProductAttribute(e,t,i){return g(this,null,function*(){var c,o,r;let l=((c=i==null?void 0:i.augmentResult)==null?void 0:c.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"CustomizeProduct",n=e==null?void 0:e.product;this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:l,props:{currency:(n==null?void 0:n.currencyCode)||((r=(o=this.sdk.config.tracking)==null?void 0:o.defaults)==null?void 0:r.currencyCode),value:n==null?void 0:n.unitPrice,content_name:this.sdk.util.parse.getContentNameFromProduct(n,this.sdk.config.tracking),content_type:"product",content_category:n==null?void 0:n.categoryName,content_ids:[this.sdk.util.parse.getContentIdFromProduct(n,this.sdk.config.tracking,y.AnalyticsLibrary.FacebookPixel)]}}}),y.TrackingActivityNames.ChangeProductAttribute),this.sdk)})}addToWishlist(e,t,i){return g(this,null,function*(){var o,r,u;let l=((o=i==null?void 0:i.augmentResult)==null?void 0:o.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"AddToWishlist",n=null,c=this.sdk.util.parse.getContentIdFromProduct(e,this.sdk.config.tracking,y.AnalyticsLibrary.FacebookPixel);c&&(n={id:c,item_price:e==null?void 0:e.unitPrice,quantity:e==null?void 0:e.quantity}),this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:l,props:{currency:(e==null?void 0:e.currencyCode)||((u=(r=this.sdk.config.tracking)==null?void 0:r.defaults)==null?void 0:u.currencyCode),value:e!=null&&e.unitPrice?(e==null?void 0:e.unitPrice)*((e==null?void 0:e.quantity)||1):void 0,content_name:this.sdk.util.parse.getContentNameFromProduct(e,this.sdk.config.tracking),content_type:"product",content_category:e==null?void 0:e.categoryName,contents:n?[n]:void 0}}}),y.TrackingActivityNames.AddToWishlist),this.sdk)})}addToCart(e,t,i){return g(this,null,function*(){var o,r,u;let l=((o=i==null?void 0:i.augmentResult)==null?void 0:o.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"AddToCart",n=null,c=this.sdk.util.parse.getContentIdFromProduct(e,this.sdk.config.tracking,y.AnalyticsLibrary.FacebookPixel);c&&(n={id:c,item_price:e==null?void 0:e.unitPrice,quantity:e==null?void 0:e.quantity}),this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:l,props:{currency:(e==null?void 0:e.currencyCode)||((u=(r=this.sdk.config.tracking)==null?void 0:r.defaults)==null?void 0:u.currencyCode),value:e!=null&&e.unitPrice?(e==null?void 0:e.unitPrice)*((e==null?void 0:e.quantity)||1):void 0,content_name:this.sdk.util.parse.getContentNameFromProduct(e,this.sdk.config.tracking),content_type:"product",content_category:e==null?void 0:e.categoryName,contents:n?[n]:void 0}}}),y.TrackingActivityNames.AddToCart),this.sdk)})}convertProfileToFacebookUserData(e){return g(this,null,function*(){var i,l,n,c,o,r,u,d;let t={};if(t.external_id=e.seekaPId,e.email&&e.email.length>0&&(t.em=(i=this.sdk.util.parse.last(e.email))==null?void 0:i.toLowerCase()),e.phone&&e.phone.length>0&&(t.ph=this.sdk.util.parse.last(e.phone)),e.dob&&e.dob.length>0)try{let a=this.sdk.util.parse.last(e.dob);a&&(t.db=this.sdk.util.text.dateToYYYYMMDD(a))}catch(a){this.sdk.debug.warn("Meta pixel -  failed to set dob",{error:a,dob:this.sdk.util.parse.last(e.dob)})}if(e.gender&&e.gender.length>0)try{t.ge=(l=this.sdk.util.parse.last(e.gender))==null?void 0:l.toLowerCase()}catch(a){this.sdk.debug.warn("Meta pixel -  failed to set gender",{error:a,gender:this.sdk.util.parse.last(e.gender)})}if(e.firstName&&e.firstName.length>0&&(t.fn=(n=this.sdk.util.parse.last(e.firstName))==null?void 0:n.toLowerCase()),e.lastName&&e.lastName.length>0&&(t.ln=(c=this.sdk.util.parse.last(e.lastName))==null?void 0:c.toLowerCase()),e.facebook&&e.facebook.fbc&&e.facebook.fbc.length>0){let a=this.sdk.util.parse.last(e.facebook.fbc);a&&(t.fbc=yield this.sdk.util.hash.sha256(a))}if(e.facebook&&e.facebook.fbp&&e.facebook.fbp.length>0&&(t.fbp=this.sdk.util.parse.last(e.facebook.fbp)),e.address&&e.address.length>0){let a=this.sdk.util.parse.last(e.address);a&&(a.locality&&(t.ct=(o=a.locality)==null?void 0:o.replace(/ /gi,"").toLowerCase()),a.stateCode?t.st=(r=a.stateCode)==null?void 0:r.toLowerCase():a.state&&(t.st=a.state),a.postcode&&(t.zp=a.postcode),a.countryCode?t.country=(u=a.countryCode)==null?void 0:u.toLowerCase():a.country&&(t.country=(d=a.country)==null?void 0:d.toLowerCase()))}return this.sdk.debug.verbose("Meta pixel -  user data",t),t})}onBeforeSendParams(e,t){return g(this,null,function*(){var n;let i=e?v({},e):{};i.payload||(i.payload={}),i.payload.props||(i.payload.props={}),!i.payload.props.eventId&&(e!=null&&e.activityIdentifier)&&(i.payload.props.eventId=e==null?void 0:e.activityIdentifier),t&&(i.payload._convergeActivityName=t),i.payload._activityIdentifier=(e==null?void 0:e.activityIdentifier)||"";try{(n=this.config)!=null&&n.testEventCode&&(i.payload.props.testEventCode=this.config.testEventCode)}catch(c){this.sdk.debug.error("Meta pixel - Failed to get test event code",c)}e.totalPrice&&(i.payload.props.value=e.totalPrice,delete i.payload.props.totalPrice),e.currencyCode&&(i.payload.props.currency=e.currencyCode,delete i.payload.props.currencyCode),e.contentName&&(i.payload.props.content_name=e.contentName,delete i.payload.props.contentName),(!i.payload.props.content_ids||i.payload.props.content_ids.length===0)&&(e.contentId&&((!i.payload.props.contents||i.payload.props.contents.length===0)&&(i.payload.props.content_ids=[e.contentId]),delete i.payload.props.contentId),e.productIdentifier&&((!i.payload.props.contents||i.payload.props.contents.length===0)&&(i.payload.props.content_ids=[e.productIdentifier]),delete i.payload.props.productIdentifier));let l=i.payload.props;if(l){let c=l.value,o=c!=null?String(c).trim():null;(c==null||c===0||(o==="0"||o==="0.0")||o==="")&&(delete l.value,delete l.currency)}return i})}extractClickIdentifier(e){if(!e)return null;let t=e.split(".");return t.length<3?e:t[3]}normaliseFacebookClickId(e){return e?(e.indexOf("fb.")!==0&&(e="fb.1."+new Date().getTime()+"."+e),e):null}generateNewFacebookBrowserId(){return"fb.1."+new Date().getTime()+"."+this.sdk.util.text.getRandomNumberString()}},E=[];function G(s){return{name:"analytics-plugin-facebook-pixel",config:v({},s),initialize:e=>g(null,null,function*(){let i=e.config;E.indexOf(s.pixelId)===-1&&(N.init(i.pixelId,e.payload.facebookUserData,{autoConfig:i.autoConfig===void 0||i.autoConfig===null?!0:i.autoConfig,debug:(i==null?void 0:i.debug)===!0}),E.push(s.pixelId))}),page:e=>{},track:(e,t)=>{X(s,e.payload.event,e.payload,t)},identify:()=>{},loaded:()=>E.indexOf(s.pixelId)>-1}}var D=Object.keys(y.FacebookPixelConversionEventName).filter(s=>s!=y.FacebookPixelConversionEventName.Undefined).map(s=>s.toString());function X(s,e,t,i){var n,c,o,r,u,d;t.isCustomEvent&&D.includes(e)?(t.isCustomEvent=!1,i.debug.verbose("Facebook pixel -  Changing custom event to Facebook standard event",{pixelId:s.pixelId,event:e})):!t.isCustomEvent&&!D.includes(e)&&(t.isCustomEvent=!0,i.debug.verbose("Facebook pixel -  Changing standard event to Facebook custom event",{pixelId:s.pixelId,event:e}));let l="Facebook pixel - Browser track";if(s.fireEventsToAllInstalledPixels){i.debug.verbose("Facebook pixel - Firing event to all pixels",{event:e,payload:t.props});let a={props:t.props,logMetadata:{stream:!0,destination:{activityName:e,platform:y.AnalyticsLibrary.FacebookPixel,identifier:"All installed"}}};if(!i.debug.isOperationAllowed(e,l,a))return;t.isCustomEvent?N.trackCustom(e,t.props):N.track(e,t.props),i.debug.log(`${l} `+e,a),(d=i.telemetry)==null||d.trackEgress({platformTypeKey:"meta.pixel",platformIdentifier:"all",egressType:(t.isCustomEvent?"trackCustom.":"track.")+e,payload:t.props||{},destinationEventId:(r=t.props)==null?void 0:r.eventId,originActivityName:t._convergeActivityName||e,originActivityId:t._activityIdentifier||((u=t.props)==null?void 0:u.eventId)||"",originSessionIdentifier:"",destinationEventName:e})}else{i.debug.verbose("Facebook pixel - Firing event to specific pixels",{pixelId:s.pixelId,event:e,payload:t.props});let a={props:t.props,logMetadata:{stream:!0,destination:{activityName:e,platform:y.AnalyticsLibrary.FacebookPixel,identifier:s.pixelId}}};if(!i.debug.isOperationAllowed(e,l,a))return;t.isCustomEvent?N.trackSingleCustom(s.pixelId,e,t.props):N.trackSingle(s.pixelId,e,t.props),i.debug.log(`${l} `+e,a),(o=i.telemetry)==null||o.trackEgress({platformTypeKey:"meta.pixel",platformIdentifier:s.pixelId,egressType:(t.isCustomEvent?"trackCustom.":"track.")+e,payload:t.props||{},destinationEventId:(n=t.props)==null?void 0:n.eventId,originActivityName:t._convergeActivityName||e,originActivityId:t._activityIdentifier||((c=t.props)==null?void 0:c.eventId)||"",originSessionIdentifier:"",destinationEventName:e})}}window.FacebookPixelConvergeSdkPlugin=s=>new p(s);})();
"use strict";(()=>{var ie=Object.create;var M=Object.defineProperty,ne=Object.defineProperties,ae=Object.getOwnPropertyDescriptor,se=Object.getOwnPropertyDescriptors,oe=Object.getOwnPropertyNames,V=Object.getOwnPropertySymbols,re=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable;var L=(a,e,t)=>e in a?M(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,l=(a,e)=>{for(var t in e||(e={}))q.call(e,t)&&L(a,t,e[t]);if(V)for(var t of V(e))ce.call(e,t)&&L(a,t,e[t]);return a},d=(a,e)=>ne(a,se(e));var le=(a,e)=>()=>(e||a((e={exports:{}}).exports,e),e.exports);var ge=(a,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of oe(e))!q.call(a,s)&&s!==t&&M(a,s,{get:()=>e[s],enumerable:!(i=ae(e,s))||i.enumerable});return a};var K=(a,e,t)=>(t=a!=null?ie(re(a)):{},ge(e||!a||!a.__esModule?M(t,"default",{value:a,enumerable:!0}):t,a));var I=(a,e,t)=>L(a,typeof e!="symbol"?e+"":e,t);var y=(a,e,t)=>new Promise((i,s)=>{var n=g=>{try{o(t.next(g))}catch(u){s(u)}},r=g=>{try{o(t.throw(g))}catch(u){s(u)}},o=g=>g.done?i(g.value):Promise.resolve(g.value).then(n,r);o((t=t.apply(a,e)).next())});var T=le((he,Q)=>{Q.exports=SeekaConvergeCore});var v=K(T());var H="1.12.1";var C=K(T());var Y={send_page_view:!1,anonymize_ip:!1,allow_google_signals:!0,cookie_update:!0,allow_ad_personalization_signals:!0,cookie_flags:""},_="dataLayer",W=!1,J="https://www.googletagmanager.com/gtag/js";function E(a){if(!a)throw new Error("No GA Measurement ID defined");if(Array.isArray(a))return a;if(typeof a=="string")return[a];throw new Error("GA Measurement ID must be string or array of strings")}var Z=(a,e)=>window[_]?(W||(e.debug.verbose("Google Analytics 4 - Using existing window.dataLayer due to it already existing",{config:a}),W=!0),_):a.dataLayerName,ue=a=>{let e=a.util.url.getParamFromQueryString("sk.gases",a.dataLayer.window.location().href)||null;return e?{sessionId:e,origin:"crossDomain"}:{sessionId:a.identity.touchAndGetSessionId(),origin:"seeka"}};function ye(a){let e={};return a.id&&(e.id=a.id),a.campaign&&(e.name=a.campaign),a.source&&(e.source=a.source),a.medium&&(e.medium=a.medium),a.content&&(e.content=a.content),a.term&&(e.term=a.term),{campaign:e}}function X(a,e){var u;let t=Array.isArray(a.measurementIds)&&a.measurementIds.length>0?String(a.measurementIds[0]||"").trim():typeof a.measurementIds=="string"?String(a.measurementIds||"").trim():"",i=a.customScriptSrc||J,s=Z(a,e),n=i;try{let f=new URL(i,((u=e.dataLayer.window.location())==null?void 0:u.href)||window.location.href);t&&f.searchParams.set("id",t),s!==_&&f.searchParams.set("l",s),n=f.toString()}catch(f){let A=i.includes("?")?i.split("?"):[i,""],k=new URLSearchParams(A[1]||"");t&&k.set("id",t),s!==_&&k.set("l",s),n=`${A[0]}?${k.toString()}`}let r=null,o=null;try{r=new URL(i,window.location.href)}catch(f){r=null}try{o=new URL(J)}catch(f){o=null}let g=document.querySelectorAll("script[src]");for(let f of Array.from(g)){let A=f.src,k=null;try{k=new URL(A,window.location.href)}catch(P){k=null}if(!k)continue;let c=r&&k.host===r.host&&k.pathname===r.pathname,m=o&&k.host===o.host&&k.pathname===o.pathname;if(!(!c&&!m)&&(new URLSearchParams(k.search).get("l")||_)===s)return{loaded:!0,tagUrl:n}}return{loaded:!1,tagUrl:n}}var p=class{constructor(a,e){I(this,"sdk");I(this,"config");I(this,"measurementIds");I(this,"loadedInstances",{});this.sdk=a,this.config=e,this.measurementIds=E(e.measurementIds)}initialize(){var f,A,k;let{gtagName:a,gtagConfig:e,additionalTags:t}=this.config,i=Z(this.config,this.sdk);window[i]||(window[i]=window[i]||[],this.sdk.debug.verbose("Google Analytics 4 - Set window[dataLayerName]",{config:this.config}));let s=!1;window[a]||(window[a]=function(){window[i].push(arguments)},s=!0,this.sdk.debug.verbose(`Google Analytics 4 - Set window[${a}]`,{config:this.config})),s?(window[a]("js",new Date),this.sdk.debug.verbose(`Google Analytics 4 - Set js on window[${a}]`,{config:this.config})):this.sdk.debug.warn(`Google Analytics 4 - Not setting js on window[${a}]`,{config:this.config});let n=(A=(f=this.sdk.config.tracking)==null?void 0:f.processing)==null?void 0:A.consent;if(n&&!n.disableConsentManagement&&n.regionalConsent)for(let c of n.regionalConsent){if(!c.configuration)continue;let m={};c.configuration.adStorage&&c.configuration.adStorage!==C.RegionalConsentGrantOption.Unset&&(m.ad_storage=c.configuration.adStorage),c.configuration.analyticsStorage&&c.configuration.analyticsStorage!==C.RegionalConsentGrantOption.Unset&&(m.analytics_storage=c.configuration.analyticsStorage),c.configuration.adUserData&&c.configuration.adUserData!==C.RegionalConsentGrantOption.Unset&&(m.ad_user_data=c.configuration.adUserData),c.configuration.adPersonalisation&&c.configuration.adPersonalisation!==C.RegionalConsentGrantOption.Unset&&(m.ad_personalization=c.configuration.adPersonalisation),c.configuration.functionalityStorage&&c.configuration.functionalityStorage!==C.RegionalConsentGrantOption.Unset&&(m.functionality_storage=c.configuration.functionalityStorage),c.configuration.securityStorage&&c.configuration.securityStorage!==C.RegionalConsentGrantOption.Unset&&(m.security_storage=c.configuration.securityStorage),c.configuration.personalisationStorage&&c.configuration.personalisationStorage!==C.RegionalConsentGrantOption.Unset&&(m.personalization_storage=c.configuration.personalisationStorage);let P="";c.countryCode&&c.subdivisionCode?P=`${c.countryCode}-${c.subdivisionCode}`:c.countryCode&&(P=c.countryCode),P&&(m.region=[P]),this.sdk.debug.verbose(`Google Analytics 4 - Set consent for region ${P}`,{val:m}),window[a]("consent","default",m)}let r=X(this.config,this.sdk);if(!(this.measurementIds&&this.measurementIds.length>0||t&&t.length>0))this.sdk.debug.warn("Google Analytics 4 - No measurement IDs or additional tags supplied. Skipping gtag.js injection.");else if(r.loaded)this.sdk.debug.verbose("Google Analytics 4 - not injecting gtag.js script as it is already loaded",{config:this.config,gtagScriptUrl:r.tagUrl});else{let c=document.createElement("script");c.async=!0,c.src=r.tagUrl,document.body?(document.body.appendChild(c),this.sdk.debug.verbose("Google Analytics 4 - injected gtag.js script",{config:this.config,gtagScriptUrl:r.tagUrl})):window.addEventListener("DOMContentLoaded",()=>{document.body.appendChild(c),this.sdk.debug.verbose("Google Analytics 4 - injected gtag.js script",{config:this.config,gtagScriptUrl:r.tagUrl})})}let o=l(l({transport_type:"beacon"},this.config.gtagConfig?this.config.gtagConfig:{}),this.config.isGoogleDebugMode===!0||(k=window.location.search)!=null&&k.includes("gtm_debug")?{debug_mode:!0}:{}),g=ue(this.sdk);g.origin==="crossDomain"&&(this.sdk.debug.verbose("Google Analytics 4 - Set session_id from sk.gases url param",{crossDomainSessionId:g.sessionId}),o.session_id=g.sessionId);let u=this.sdk.util.url.getParamFromQueryString("sk.gacl",this.sdk.dataLayer.window.location().href)||null;u&&(o.client_id=u,this.sdk.debug.verbose("Google Analytics 4 - Set client_id from sk.gacl url param",{crossDomainClientId:u})),this.sdk.debug.verbose("Google Analytics 4 - using configuration",{gtagConf:o,config:this.config});for(let c=0;c<this.measurementIds.length;c++)this.loadedInstances[this.measurementIds[c]]||(window[a]("config",this.measurementIds[c],o),this.loadedInstances[this.measurementIds[c]]=!0,this.sdk.debug.verbose(`Google Analytics 4 - Initialised measurement ID ${this.measurementIds[c]} with gtag config`,{gtagConf:o}));if(t&&t.length>0)for(let c=0;c<t.length;c++){let m=t[c];if(m.tagId&&(!this.measurementIds||this.measurementIds.indexOf(m.tagId)===-1)&&(window[a]("config",m.tagId,o),this.sdk.debug.verbose(`Google Analytics 4 - Initialised additional config ID ${m.tagId} with gtag config`,{gtagConf:o})),m.phoneConversions&&m.phoneConversions.length>0)for(let P=0;P<m.phoneConversions.length;P++){let b=m.phoneConversions[P];if(b.conversionLabel&&b.phoneConversionNumber){let N={phone_conversion_number:b.phoneConversionNumber};window[a]("config",`${m.tagId}/${b.conversionLabel}`,N),this.sdk.debug.verbose(`Google Analytics 4 - Initialised phone conversion config ID ${m.tagId}/${b.conversionLabel} with phone config`,{phoneConfig:N})}}}}identify(a){let e=this.sdk.identity.getProfile(),{gtagName:t}=this.config;if(!window[t]||!this.measurementIds.length){this.sdk.debug.warn(`Google Analytics 4 - Not handling identify call as window[${t}] is undefined or there are no measurement IDs`,{gtagName:t});return}else this.sdk.debug.verbose("Google Analytics 4 - Handling identify call",{gtagName:t,payload:a,profile:e});window[t]("set",{user_data:a,user_id:e.seekaPId});let i=[...new Set([e.seekaPId,...e.seekaBId||[]])].filter(Boolean);window[t]("set","user_properties",{user_id:e.seekaPId,user_ids:i})}track(a){var A,k,c,m;if(this.config.isIframeClient){this.sdk.debug.verbose("Google Analytics 4 - Not handling track call as it is an iframe client",{config:this.config});return}let{gtagName:e,enableAutomaticLastTouchAttribution:t}=this.config,i=a==null?void 0:a.event,s=(a==null?void 0:a.properties)||{};if(!window[e]||!this.measurementIds.length){this.sdk.debug.warn(`Google Analytics 4 - Not handling event track call as window[${e}] is undefined or there are no measurement IDs`,{gtagName:e,event:i,properties:s});return}let n=t?this.sdk.attribution.getLastTouchCampaign():null,r=n?ye(n):void 0,o={page_location:this.sdk.util.url.removePiiFromUrl((A=this.sdk.dataLayer.window.location())==null?void 0:A.href),page_path:(k=this.sdk.dataLayer.window.location())==null?void 0:k.pathname,page_title:this.sdk.dataLayer.document.title(),page_hash:(c=this.sdk.dataLayer.window.location())==null?void 0:c.hash,page_search:this.sdk.util.url.removePiiFromQueryString((m=this.sdk.dataLayer.window.location())==null?void 0:m.search),page_referrer:this.sdk.util.url.removePiiFromUrl(this.sdk.dataLayer.document.referrer())},g=d(l(l(l({},s),o),r),{tracking_origin:"seeka"}),u="Google Analytics 4 - Browser track",f={logMetadata:{stream:!0,destination:{activityName:i,platform:C.AnalyticsLibrary.GoogleAnalytics}}};if(this.sdk.debug.isOperationAllowed(i,u,f))for(let P=0;P<this.measurementIds.length;P++){let b=d(l({},g),{send_to:this.measurementIds[P]});window[e]("event",i,b),this.sdk.debug.log(`${u} `+i,d(l({},f),{identifier:this.measurementIds[P]}))}}loaded(){return X(this.config,this.sdk).loaded===!0}disable(a){let e=a?E(a):this.measurementIds;for(let t=0;t<this.measurementIds.length;t++){let i=this.measurementIds[t];e.includes(i)&&(window[`ga-disable-${i}`]=!0)}}enable(a){let e=a?E(a):this.measurementIds;for(let t=0;t<this.measurementIds.length;t++){let i=this.measurementIds[t];e.includes(i)&&(window[`ga-disable-${i}`]=!1)}}};function me(a={}){let e=null;return{name:"google-analytics",config:a,initialize:t=>{let i=t.config,s=t.sdk;e=new p(s,i),e.initialize()},identify:({payload:t})=>{e&&e.identify(t)},page:({payload:t,config:i,sdk:s})=>{},track:({payload:t,sdk:i})=>{var s,n;e&&(e.track({event:t==null?void 0:t.event,properties:t==null?void 0:t.properties}),(n=i.telemetry)==null||n.trackEgress({platformTypeKey:"google.analytics.tag.track",platformIdentifier:(Array.isArray(a.measurementIds)?a.measurementIds[0]:a.measurementIds)||"",egressType:"event."+((t==null?void 0:t.event)||""),payload:(t==null?void 0:t.properties)||{},originActivityName:(t==null?void 0:t._convergeActivityName)||(t==null?void 0:t.event)||"",originActivityId:(t==null?void 0:t._activityIdentifier)||((s=t==null?void 0:t.properties)==null?void 0:s.activityIdentifier)||"",originSessionIdentifier:"",destinationEventName:(t==null?void 0:t.event)||""}))},loaded:()=>e?e.loaded():!1,methods:{disable:t=>{e==null||e.disable(t)},enable:t=>{e==null||e.enable(t)}}}}var ee=me;var S=class{constructor(e){I(this,"sdk");I(this,"analyticsLibPlugin");I(this,"privacyConfig",{requiresIabPurposes:[v.IabPrivacyConsentPurposeIdMap.measureAdvertisingPerformance]});I(this,"name");I(this,"type");I(this,"version");I(this,"config");I(this,"isIframeClient",!1);this.type="converge-plugin-google-analytics-4",this.name=this.type+"-"+e.measurementId,this.version=H,this.sdk={},this.config=e||{}}init(e){return y(this,null,function*(){var c,m,P,b,N,D,F,U,O,z,R,j,B;this.config||(this.config={measurementId:"",debug:!1,enableAutomaticLastTouchAttribution:!1}),this.isIframeClient=((m=(c=this.sdk.config.runtime)==null?void 0:c.client)==null?void 0:m.type)==="iframe",this.isIframeClient&&this.sdk.debug.warn("Seeka running in an iframe and Google Ads / GTAG / GA4 do not play nice with iframes, certain event firing will be disabled and sent via server side instead.");let t=((D=(N=(b=(P=this.sdk.config.tracking)==null?void 0:P.analytics)==null?void 0:b.libraries)==null?void 0:N.googleAnalytics)==null?void 0:D.googleTags)||[],i=((O=(U=(F=this.sdk.config.tracking)==null?void 0:F.analytics)==null?void 0:U.autoCollection)==null?void 0:O.activityDefinitions)||[];i.length>0&&i.forEach(h=>{var x,$;let w=(($=(x=h==null?void 0:h.vendorSettings)==null?void 0:x.google)==null?void 0:$.googleAdsConversionTriggers)||[];w.length>0&&w.forEach(G=>{G.conversionId&&!t.find(te=>te.tagId===G.conversionId)&&t.push({tagId:G.conversionId})})});let s=`${this.sdk.config.scopeKey}_${this.sdk.util.text.alphaNumericOnly(this.config.measurementId)}`,n=`gtagSeekaGa4_${s}`,r=`dataLayerSeekaGa4_${s}`,o=d(l({},e.config),{measurementIds:[(z=this.config)==null?void 0:z.measurementId],isGoogleDebugMode:this.sdk.debug.isDebugEnabled,enableAutomaticLastTouchAttribution:(R=this.config)==null?void 0:R.enableAutomaticLastTouchAttribution,additionalTags:t,gtagName:n,dataLayerName:r,isIframeClient:this.isIframeClient,gtagConfig:d(l({},Y),{cookie_prefix:"_ga_seeka"})});o.debug&&this.sdk.debug.warn("Google Analytics 4 - Debug mode is enabled",this.sdk.config),o.enableAutomaticLastTouchAttribution&&this.sdk.debug.verbose("Google Analytics 4 - Automatic last touch attribution is enabled",this.sdk.config),this.analyticsLibPlugin=ee(o);let g=d(l({},e),{config:o});g.sdk=this.sdk,yield this.analyticsLibPlugin.initialize(g);let u=null,f=null,A=this.sdk.util.url.getParamFromQueryString("gclid",(j=this.sdk.dataLayer.window.location())==null?void 0:j.href)||null;try{u=yield new Promise(h=>{var w;window[n]("get",(w=this.config)==null?void 0:w.measurementId,"client_id",h)}),u?(this.sdk.state.set("plugin.google.analytics.client_id",u),this.sdk.debug.verbose("Google Analytics 4 - client",u)):this.sdk.debug.warn("Google Analytics 4 - Did not collect google client ID")}catch(h){this.sdk.debug.warn("Google Analytics 4 - Failed to collect google client ID",h)}try{f=yield new Promise(h=>{var w;window[n]("get",(w=this.config)==null?void 0:w.measurementId,"session_id",h)}),f?(this.sdk.state.set("plugin.google.analytics.session_id",f),this.sdk.debug.verbose("Google Analytics 4 - session",f)):this.sdk.debug.warn("Google Analytics 4 - Did not collect google session ID")}catch(h){this.sdk.debug.warn("Google Analytics 4 - Failed to collect google session ID",h)}if((A||u)&&(yield this.sdk.identity.mergeProfile({google:{gclid:A?[A]:[],userClientId:u?[u]:[]}})),((B=this.config)==null?void 0:B.enableAutomaticLastTouchAttribution)===!0)try{let h=this.sdk.attribution.getLastTouchCampaign();h&&window[n]("set",{campaign_id:h.id,campaign_name:h.campaign,campaign_source:h.source,campaign_medium:h.medium,campaign_term:h.term,campaign_content:h.content})}catch(h){this.sdk.debug.warn("Google Analytics 4 - Failed to set campaign data",h)}(this.sdk.config.plugins||[]).filter(h=>h.type===this.type).length===1&&(window.gtag||(window.gtag=window[n],this.sdk.debug.verbose("Setting global window.gtag")),window.dataLayer||(window.dataLayer=window[r],this.sdk.debug.verbose("Setting global window.dataLayer")))})}addCrossDomainTrackingQuery(){let e=new Map;return e.set("sk.gacl",this.sdk.state.get("plugin.google.analytics.client_id")||""),e.set("sk.gases",this.sdk.state.get("plugin.google.analytics.session_id")||""),e}onProfileChanged(e){return y(this,null,function*(){yield this.setGoogleUserData(e)})}setGoogleUserData(e){return y(this,null,function*(){try{let t=yield this.convertProfileToGoogleAnalyticsUserData(e);t&&(this.sdk.debug.verbose("Google Analytics 4 - user data",{googleUserData:t,profile:e}),yield this.analyticsLibPlugin.identify({payload:t,config:this.analyticsLibPlugin.config,sdk:this.sdk}))}catch(t){this.sdk.debug.warn("Google Analytics 4 - Failed to set user data",t)}})}onReady(){return y(this,null,function*(){let e=yield this.sdk.identity.getProfile();yield this.setGoogleUserData(e)})}collectIdentifiers(){return y(this,null,function*(){var i;let e={google:{gclid:[],userClientId:[]}};try{let s=this.sdk.util.url.getParamFromQueryString("gclid",(i=this.sdk.dataLayer.window.location())==null?void 0:i.href);s&&e.google.gclid.push(s)}catch(s){this.sdk.debug.warn("Google Analytics 4 - Failed to set gclid",s)}let t=this.sdk.state.get("plugin.google.analytics.client_id");return t&&e.google.userClientId.push(t),this.sdk.debug.verbose("Google Analytics 4 - collected identifiers",e),e})}isLoaded(){var e;return((e=this.analyticsLibPlugin)==null?void 0:e.loaded({config:this.analyticsLibPlugin.config},this.sdk))==!0}activity(e,t,i){return y(this,null,function*(){this.custom(e,t)})}custom(e,t,i){return y(this,null,function*(){var n,r;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(e);this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.Custom,d(l({},t),{payload:{event:s,isCustomEvent:!0,properties:l(l({},t?this.convertOrderToGoogleAnalyticsProps({totalPrice:t.unitPrice||t.totalPrice,currencyCode:t.currencyCode,orderIdentifier:t.orderIdentifier,orderNumber:t.orderNumber,checkoutIdentifier:t.checkoutIdentifier,cartIdentifier:t.cartIdentifier,paymentMethodName:t.paymentMethodName,products:t.products&&t.products.length>0?t.products:t.contentName||t.contentId||t.productIdentifier||t.productName?[{productIdentifier:t.contentId||t.productIdentifier,productName:t.contentName||t.productName}]:void 0},t.activityIdentifier):{}),(r=t==null?void 0:t.payload)==null?void 0:r.properties)}}),i,t==null?void 0:t.activityIdentifier))})}viewPage(e,t){return y(this,null,function*(){var s;let i=((s=t==null?void 0:t.augmentResult)==null?void 0:s.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(e==null?void 0:e.activityNameCustom)||"page_view";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.ViewPage,d(l({},e),{payload:{event:i}}),t,e==null?void 0:e.activityIdentifier))})}addPaymentMethod(e,t,i){return y(this,null,function*(){var n;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"add_payment_info";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.AddPaymentMethod,d(l({},t),{payload:{event:s,properties:l({},this.convertOrderToGoogleAnalyticsProps(e,t==null?void 0:t.activityIdentifier))}}),i,t==null?void 0:t.activityIdentifier))})}keywordSearch(e,t,i){return y(this,null,function*(){var n;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"search";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.KeywordSearch,d(l({},t),{payload:{event:s,properties:{search_term:e==null?void 0:e.searchText}}}),i,t==null?void 0:t.activityIdentifier))})}userLogin(e,t,i){return y(this,null,function*(){var n;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"login";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.UserLogin,d(l({},t),{payload:{event:s}}),i,t==null?void 0:t.activityIdentifier))})}userLoginSignup(e,t,i){return y(this,null,function*(){var n;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"sign_up";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.UserLoginSignup,d(l({},t),{payload:{event:s,properties:{sign_up_type:"login"}}}),i,t==null?void 0:t.activityIdentifier))})}newsletterSignup(e,t,i){return y(this,null,function*(){var n;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"sign_up";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.NewsletterSignup,d(l({},t),{payload:{event:s,properties:{sign_up_type:"newsletter"}}}),i,t==null?void 0:t.activityIdentifier))})}applyPromotionalCode(e,t,i){return y(this,null,function*(){var n;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"select_promotion";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.ApplyPromotionalCode,d(l({},t),{payload:{event:s,properties:{promotion_id:e==null?void 0:e.code}}}),i,t==null?void 0:t.activityIdentifier))})}lead(e,t,i){return y(this,null,function*(){var r,o,g;let s=((r=i==null?void 0:i.augmentResult)==null?void 0:r.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"generate_lead",n=(e==null?void 0:e.predictedValue)!=null&&(e==null?void 0:e.predictedValue)!=null?e.predictedValue:null;n==null&&(n=(e==null?void 0:e.predictedLtv)!=null&&(e==null?void 0:e.predictedLtv)!=null?e.predictedLtv:null),n==null&&(n=1),this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.Lead,d(l({},t),{payload:{event:s,properties:{currency:(e==null?void 0:e.currencyCode)||((g=(o=this.sdk.config.tracking)==null?void 0:o.defaults)==null?void 0:g.currencyCode),value:n,content_name:e==null?void 0:e.sourceContentName,predicted_ltv:e==null?void 0:e.predictedLtv,predicted_value:e==null?void 0:e.predictedValue}}}),i,t==null?void 0:t.activityIdentifier))})}startTrial(e,t,i){return y(this,null,function*(){var n,r,o;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"start_trial";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.StartTrial,d(l({},t),{payload:{event:s,isCustomEvent:!0,properties:{currency:(e==null?void 0:e.currencyCode)||((o=(r=this.sdk.config.tracking)==null?void 0:r.defaults)==null?void 0:o.currencyCode),value:(e==null?void 0:e.predictedValue)||(e==null?void 0:e.predictedLtv),content_name:e==null?void 0:e.sourceContentName,predicted_ltv:e==null?void 0:e.predictedLtv,predicted_value:e==null?void 0:e.predictedValue}}}),i,t==null?void 0:t.activityIdentifier))})}contactMessage(e,t,i){return y(this,null,function*(){var n,r,o;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"contact_message";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.ContactMessage,d(l({},t),{payload:{event:s,isCustomEvent:!0,properties:{currency:(e==null?void 0:e.currencyCode)||((o=(r=this.sdk.config.tracking)==null?void 0:r.defaults)==null?void 0:o.currencyCode),value:(e==null?void 0:e.predictedValue)||(e==null?void 0:e.predictedLtv),content_name:e==null?void 0:e.sourceContentName,predicted_ltv:e==null?void 0:e.predictedLtv,predicted_value:e==null?void 0:e.predictedValue}}}),i,t==null?void 0:t.activityIdentifier))})}schedule(e,t,i){return y(this,null,function*(){var n,r,o;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"schedule";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.Schedule,d(l({},t),{payload:{event:s,isCustomEvent:!0,properties:{currency:(e==null?void 0:e.currencyCode)||((o=(r=this.sdk.config.tracking)==null?void 0:r.defaults)==null?void 0:o.currencyCode),value:(e==null?void 0:e.predictedValue)||(e==null?void 0:e.predictedLtv),content_name:e==null?void 0:e.sourceContentName,predicted_ltv:e==null?void 0:e.predictedLtv,predicted_value:e==null?void 0:e.predictedValue}}}),i,t==null?void 0:t.activityIdentifier))})}viewContentItem(e,t,i){return y(this,null,function*(){var n;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"view_item";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.ViewContentItem,d(l({},t),{payload:{event:s,properties:{item_type:"content",items:[{item_name:e==null?void 0:e.contentName}]}}}),i,t==null?void 0:t.activityIdentifier))})}order(e,t,i){return y(this,null,function*(){var n;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"purchase";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.Order,d(l({},t),{payload:{event:s,properties:l({},this.convertOrderToGoogleAnalyticsProps(e,t==null?void 0:t.activityIdentifier))}}),i,(e==null?void 0:e.orderIdentifier)||(e==null?void 0:e.orderNumber)||(t==null?void 0:t.activityIdentifier)))})}subscriptionItemPurchase(e,t,i){return y(this,null,function*(){var n;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"purchase";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.Order,d(l({},t),{payload:{event:s,properties:l({},this.convertOrderToGoogleAnalyticsProps(e,t==null?void 0:t.activityIdentifier))}}),i,t==null?void 0:t.activityIdentifier))})}initiateCheckout(e,t,i){return y(this,null,function*(){var n;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"begin_checkout";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.InitiateCheckout,d(l({},t),{payload:{event:s,properties:l({},this.convertOrderToGoogleAnalyticsProps(e,t==null?void 0:t.activityIdentifier))}}),i,t==null?void 0:t.activityIdentifier))})}viewProduct(e,t,i){return y(this,null,function*(){var n,r,o,g;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"view_item";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.ViewProduct,d(l({},t),{payload:{event:s,properties:{currency:(e==null?void 0:e.currencyCode)||((o=(r=this.sdk.config.tracking)==null?void 0:r.defaults)==null?void 0:o.currencyCode),value:e==null?void 0:e.unitPrice,item_type:((g=e==null?void 0:e.type)==null?void 0:g.toString())||v.ECommerceContentType.SingleProduct.toString(),items:[this.convertProductToGoogleAnalyticsProduct(e)]}}}),i,t==null?void 0:t.activityIdentifier))})}addToCart(e,t,i){return y(this,null,function*(){var n,r,o;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"add_to_cart";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.AddToCart,d(l({},t),{payload:{event:s,properties:{currency:(e==null?void 0:e.currencyCode)||((o=(r=this.sdk.config.tracking)==null?void 0:r.defaults)==null?void 0:o.currencyCode),value:e!=null&&e.unitPrice?(e==null?void 0:e.unitPrice)*((e==null?void 0:e.quantity)||1):void 0,items:[this.convertProductToGoogleAnalyticsProduct(e)]}}}),i,t==null?void 0:t.activityIdentifier))})}addToWishlist(e,t,i){return y(this,null,function*(){var n,r,o;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"add_to_wishlist";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.AddToWishlist,d(l({},t),{payload:{event:s,properties:{currency:(e==null?void 0:e.currencyCode)||((o=(r=this.sdk.config.tracking)==null?void 0:r.defaults)==null?void 0:o.currencyCode),value:e!=null&&e.unitPrice?(e==null?void 0:e.unitPrice)*((e==null?void 0:e.quantity)||1):void 0,items:[this.convertProductToGoogleAnalyticsProduct(e)]}}}),i,t==null?void 0:t.activityIdentifier))})}removeFromCart(e,t,i){return y(this,null,function*(){var n,r,o;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"remove_from_cart";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.RemoveFromCart,d(l({},t),{payload:{event:s,properties:{currency:(e==null?void 0:e.currencyCode)||((o=(r=this.sdk.config.tracking)==null?void 0:r.defaults)==null?void 0:o.currencyCode),value:e!=null&&e.unitPrice?(e==null?void 0:e.unitPrice)*((e==null?void 0:e.quantity)||1):void 0,items:[this.convertProductToGoogleAnalyticsProduct(e)]}}}),i,t==null?void 0:t.activityIdentifier))})}changeProductAttribute(e,t){return y(this,null,function*(){})}filterItemsByAttribute(e,t){return y(this,null,function*(){})}convertProfileToGoogleAnalyticsUserData(e){let t={};if(t.user_id=e.seekaPId,e.email&&e.email.length>0&&(t.email=e.email.slice(-3)),e.phone&&e.phone.length>0&&(t.phone_number=e.phone.slice(-3)),e.firstName&&e.firstName.length>0&&(t.address||(t.address={}),t.address.first_name=this.sdk.util.parse.last(e.firstName)),e.lastName&&e.lastName.length>0&&(t.address||(t.address={}),t.address.last_name=this.sdk.util.parse.last(e.lastName)),e.address&&e.address.length>0){let i=this.sdk.util.parse.last(e.address);t.address||(t.address={}),i&&((i.addressLine1||i.addressLine2)&&(t.address.street=((i.addressLine1||"")+" "+(i.addressLine2||"")).trim()),i.locality&&(t.address.city=i.locality),(i.state||i.stateCode)&&(t.address.region=i.state?i.state:i.stateCode),i.postcode&&(t.address.postal_code=i.postcode),i.countryCode&&(t.address.country=i.countryCode.toUpperCase()))}return this.sdk.debug.verbose("Google Analytics 4 - user data",t),t}onBeforeSendParams(e,t,i,s){return y(this,null,function*(){let n=t?l({},t):{};n.payload||(n.payload={}),n.payload.props||(n.payload.props={}),n.payload._convergeActivityName=e.toString(),n.payload._activityIdentifier=(t==null?void 0:t.activityIdentifier)||s||"",n.instance=this.sdk.lib.analytics,n.config=this.analyticsLibPlugin.config,n.sdk=this.sdk;try{this.handlePostEventFireForDefinition(e,n,i==null?void 0:i.sourceDefinition,s)}catch(r){this.sdk.debug.error("Google Analytics 4 - Failed to fire post event fire for definition",{error:r,activity:e,props:t,parameters:n,metadata:i})}return n})}handlePostEventFireForDefinition(e,t,i,s){var r,o;if(!i)return;let n=((o=(r=i.vendorSettings)==null?void 0:r.google)==null?void 0:o.googleAdsConversionTriggers)||[];if(n.length>0)for(let g=0;g<n.length;g++){let u=n[g];this.fireGoogleAdConversionEvent(e,u,t,s)}}fireGoogleAdConversionEvent(e,t,i,s){var o,g,u;let n=t.conversionId+"/"+t.conversionLabel,r=d(l({},i),{payload:d(l({},i.payload),{event:"conversion",properties:d(l({},i.payload.properties),{send_to:n,transaction_id:s})})});this.analyticsLibPlugin.track(r),this.sdk.debug.log(`Google Analytics 4 - Sent conversion event from ${e} to ${n}`,{originalActivity:e,params:r.payload,logMetadata:{stream:!0}}),(u=this.sdk.telemetry)==null||u.trackEgress({platformTypeKey:"google.ads.tag.track",platformIdentifier:t.conversionId,egressType:"event.conversion",payload:{send_to:n,transaction_id:s},originActivityName:e.toString(),originActivityId:((g=(o=i==null?void 0:i.payload)==null?void 0:o.properties)==null?void 0:g.activityIdentifier)||"",originSessionIdentifier:"",destinationEventName:"conversion"})}sanitizeEventNameForMeasurementProtocol(e,t=!0){if(!e)return null;let i=e.replace(/-/g,"_").replace(/\./g,"_").replace(/ /g,"");return t&&(i=this.sdk.util.text.sentenceCaseToSnakeCase(i)),i.length>40&&this.sdk.debug.warn("Google Analytics 4 - Google Measurement protocol cannot have event names greater than 40 characters.",{before:e,attempted:i}),this.sdk.util.text.isFirstCharacterAlpha(i)||this.sdk.debug.warn("Google Analytics 4 - Google Measurement protocol event names must start with an alphabetic character.",{before:e,attempted:i}),i.toLowerCase()}convertOrderToGoogleAnalyticsProps(e,t){var s,n,r,o;if(!e)return;let i={currency:(e==null?void 0:e.currencyCode)||((n=(s=this.sdk.config.tracking)==null?void 0:s.defaults)==null?void 0:n.currencyCode),value:(e==null?void 0:e.totalPrice)||((r=e==null?void 0:e.products)==null?void 0:r.map(g=>(g.unitPrice||0)*(g.quantity||1)).reduce((g,u)=>g+u,0))||void 0,transaction_id:e.orderIdentifier||e.orderNumber||t,items:(o=e==null?void 0:e.products)==null?void 0:o.map((g,u)=>this.convertProductToGoogleAnalyticsProduct(g,u))};return e!=null&&e.paymentMethodName&&(i.payment_type=e==null?void 0:e.paymentMethodName),(e==null?void 0:e.totalShippingPrice)!=null&&(e==null?void 0:e.totalShippingPrice)!=null&&(i.shipping=e.totalShippingPrice),(e==null?void 0:e.totalTax)!=null&&(e==null?void 0:e.totalTax)!=null&&(i.tax=e.totalTax),i}convertProductToGoogleAnalyticsProduct(e,t){var s,n;let i={item_id:this.sdk.util.parse.getContentIdFromProduct(e,this.sdk.config.tracking,v.AnalyticsLibrary.GoogleAnalytics),item_name:e!=null&&e.productName?e==null?void 0:e.productName:e==null?void 0:e.variantName,item_variant:e!=null&&e.productName?e==null?void 0:e.variantIdentifier:void 0,currency:(e==null?void 0:e.currencyCode)||((n=(s=this.sdk.config.tracking)==null?void 0:s.defaults)==null?void 0:n.currencyCode),discount:e==null?void 0:e.totalDiscount,item_brand:e==null?void 0:e.brandName,item_category:e==null?void 0:e.categoryName,price:e==null?void 0:e.unitPrice,quantity:e==null?void 0:e.quantity};return t!=null&&(i.index=t),this.sdk.debug.verbose("Google Analytics 4 - converted product",{product:e,gaProduct:i}),i}};window.GoogleAnalytics4ConvergeSdkPlugin=a=>new S(a);})();
"use strict";(()=>{var D=Object.create;var x=Object.defineProperty,q=Object.defineProperties,O=Object.getOwnPropertyDescriptor,B=Object.getOwnPropertyDescriptors,R=Object.getOwnPropertyNames,w=Object.getOwnPropertySymbols,j=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable;var I=(a,t,e)=>t in a?x(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e,y=(a,t)=>{for(var e in t||(t={}))f.call(t,e)&&I(a,e,t[e]);if(w)for(var e of w(t))U.call(t,e)&&I(a,e,t[e]);return a},m=(a,t)=>q(a,B(t));var V=(a,t)=>()=>(t||a((t={exports:{}}).exports,t),t.exports);var F=(a,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let c of R(t))!f.call(a,c)&&c!==e&&x(a,c,{get:()=>t[c],enumerable:!(i=O(t,c))||i.enumerable});return a};var z=(a,t,e)=>(e=a!=null?D(j(a)):{},F(t||!a||!a.__esModule?x(e,"default",{value:a,enumerable:!0}):e,a));var g=(a,t,e)=>I(a,typeof t!="symbol"?t+"":t,e);var l=(a,t,e)=>new Promise((i,c)=>{var n=d=>{try{o(e.next(d))}catch(k){c(k)}},s=d=>{try{o(e.throw(d))}catch(k){c(k)}},o=d=>d.done?i(d.value):Promise.resolve(d.value).then(n,s);o((e=e.apply(a,t)).next())});var M=V((H,E)=>{E.exports=SeekaConvergeCore});var r=z(M());var _="1.12.1";var L=!1,N=!1,W=[],P=()=>(N||console.warn("Pixel not initialized \u2014 please call TiktokPixel.init(pixelId, advancedMatching) first."),N),K=(a,t,e,i,c,n)=>{let s=typeof window!="undefined"&&!!window.ttq,o;if(s)console.debug("Seeka - TikTok Pixel already loaded."),o=window.ttq;else{a.TiktokAnalyticsObject=e,o=a[e]=a[e]||[],o.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie","holdConsent","revokeConsent","grantConsent"],o.setAndDefer=function(d,k){d[k]=function(){d.push([k].concat(Array.prototype.slice.call(arguments,0)))}};for(let d=0;d<o.methods.length;d++)o.setAndDefer(o,o.methods[d]);o.instance=function(d){let k=o._i[d]||[];for(let v=0;v<o.methods.length;v++)o.setAndDefer(k,o.methods[v]);return k},o.load=function(d,k){let v="https://analytics.tiktok.com/i18n/pixel/events.js";o._i=o._i||{},o._i[d]=[],o._i[d]._u=v,o._t=o._t||{},o._t[d]=+new Date,o._o=o._o||{},o._o[d]=k||{};let h=document.createElement("script");h.async=!0,h.src=`${v}?sdkid=${d}&lib=${e}`;let C=document.getElementsByTagName("script")[0];C.parentNode.insertBefore(h,C)}}i?(o.load(i),o.identify(c),L=n.debug,N=!0,W.push(i)):console.warn("Please provide a valid TikTok Pixel ID to init.")},u=()=>window.ttq,$={init(a,t={},e={debug:!1}){K(window,document,"ttq",a,t,e)},page(){if(!P())return;u().page()},track(a,t,e,i){if(!P())return;let n=u().instance(i.pixelId);a.toLowerCase()==="pageview"?n.track("Pageview",t,e):n.track(a,t,e)},identify(a){if(!P())return;u().identify(a)},instances(){return P()?u().instances():[]},debug(a){L=a,u().debug(a)},on(a,t){u().on(a,t)},off(a,t){u().off(a,t)},once(a,t){u().once(a,t)},ready(a,t){if(!P())return;u().ready(a)},alias(a){if(!P())return;u().alias(a)},group(a){if(!P())return;u().group(a.groupId,a.groupProperties)},enableCookie(){u().enableCookie()},disableCookie(){u().disableCookie()},holdConsent(){u().holdConsent()},revokeConsent(){u().revokeConsent()},grantConsent(){u().grantConsent()}},A=$;var b=class{constructor(t){g(this,"sdk");g(this,"analyticsLibPlugin");g(this,"privacyConfig",{requiresIabPurposes:[r.IabPrivacyConsentPurposeIdMap.measureAdvertisingPerformance]});g(this,"name");g(this,"type");g(this,"version");g(this,"config");g(this,"ttpCheckCount",0);g(this,"ttpCheck");g(this,"commonPropsToTrackingData",t=>{if(!t)return{};let e={};return t.productIdentifier&&(e.content_ids=[t.productIdentifier]),t.productName&&(e.content_name=t.productName),t.contentId&&(e.content_ids=[t.contentId]),t.contentName&&(e.content_name=t.contentName),t.currencyCode&&(e.currency=t.currencyCode),t.searchText&&(e.search_string=t.searchText),t.sourceContentName&&(e.content_name=t.sourceContentName),t.unitPrice&&(e.value=t.unitPrice),t.totalPrice&&(e.value=t.totalPrice),e});this.type="converge-plugin-tiktok-pixel",this.name=this.type+"-"+t.pixelId,this.version=_,this.sdk={},this.config=t||{}}init(t){return l(this,null,function*(){this.analyticsLibPlugin=G(this.config),t.payload.tiktokUserData=this.convertProfileToTikTokUserData(t.payload.profile),yield this.analyticsLibPlugin.initialize(t),t.payload.tiktokUserData&&this.sdk.debug.verbose("TikTok - advanced matching parameters",t.payload.tiktokUserData);let e=this.sdk.util.url.getParamFromQueryString("tt_test_event_code",this.sdk.dataLayer.window.location().href)||this.sdk.state.get("plugin.tiktok.pixel.testEventCode");this.config||(this.config={pixelId:"",debug:!1,testEventCode:e}),e&&(this.config.testEventCode=e,this.sdk.state.set("plugin.tiktok.pixel.testEventCode",e))})}onReady(){return l(this,null,function*(){this.ttpCheck=setInterval(()=>l(this,null,function*(){let t=yield this.ensureTtpCollected();this.ttpCheckCount++,t&&this.ttpCheck&&clearInterval(this.ttpCheck),(t||this.ttpCheckCount>15)&&(this.ttpCheck&&clearInterval(this.ttpCheck),this.ttpCheckCount=0)}),200)})}ensureTtpCollected(){return l(this,null,function*(){var i,c,n,s;this.sdk.debug.verbose("TikTok - ensuring ttp collection");let t=yield this.sdk.identity.getProfile();if(t&&((i=t.tiktok)!=null&&i.ttp)&&((c=t.tiktok)==null?void 0:c.ttp.length)>0)return!0;let e=yield this.collectIdentifiers();return e&&((n=e.tiktok)!=null&&n.ttp)&&((s=e.tiktok)==null?void 0:s.ttp.length)>0?(yield this.sdk.identity.mergeProfile(e),!0):!1})}addCrossDomainTrackingQuery(){let t=new Map,e=this.sdk.util.cookie.get("_ttp")||"";return e?t.set("sk.ttp",e):this.sdk.debug.verbose("TikTok - could not add cross domain param"),t}collectIdentifiers(){return l(this,null,function*(){let t={tiktok:{ttp:[],ttclid:[],lead:[]}};try{let i=this.sdk.util.url.getParamFromQueryString("sk.ttp",this.sdk.dataLayer.window.location().href),c=this.sdk.util.cookie.get("_ttp");i?(t.tiktok.ttp.push(i),this.sdk.util.cookie.set("_ttp",i),this.sdk.debug.verbose("TikTok - ttp from url",c)):c?(t.tiktok.ttp.push(c),this.sdk.debug.verbose("TikTok - ttp cookie",c)):this.sdk.debug.warn("TikTok - Failed to collect ttp")}catch(i){this.sdk.debug.warn("TikTok - Failed to collect ttp",i)}let e=this.sdk.util.url.getParamFromQueryString("ttclid",this.sdk.dataLayer.window.location().href);try{let i=this.sdk.util.cookie.get("ttclid");i&&t.tiktok.ttclid.push(i),e&&(!i||i.indexOf(e)===-1)&&(t.tiktok.ttclid.push(e),this.sdk.util.cookie.set("ttclid",e))}catch(i){this.sdk.debug.warn("TikTok -  Failed to collect ttclid",i)}return this.sdk.debug.verbose("TikTok - collected identifiers",t),t})}isLoaded(){var t;return((t=this.analyticsLibPlugin)==null?void 0:t.loaded())==!0}custom(t,e,i){return l(this,null,function*(){var s;let c=((s=i==null?void 0:i.augmentResult)==null?void 0:s.destinationActivityNameOverride)||(e==null?void 0:e.activityNameCustom)||t,n=yield this.onBeforeSendParams({props:e,eventName:c,convergeActivityName:r.TrackingActivityNames.Custom,payload:this.commonPropsToTrackingData(e)});this.analyticsLibPlugin.track(n)})}viewPage(t,e){return l(this,null,function*(){var c;let i=((c=e==null?void 0:e.augmentResult)==null?void 0:c.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"Pageview";this.analyticsLibPlugin.track(yield this.onBeforeSendParams({props:t,eventName:i,convergeActivityName:r.TrackingActivityNames.ViewPage,payload:this.commonPropsToTrackingData(t)}))})}addPaymentMethod(t,e,i){return l(this,null,function*(){var n;let c=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(e==null?void 0:e.activityNameCustom)||"AddPaymentInfo";this.analyticsLibPlugin.track(yield this.onBeforeSendParams({props:e,eventName:c,convergeActivityName:r.TrackingActivityNames.AddPaymentMethod,payload:this.convertOrderToTikTokProps(t,e)}))})}keywordSearch(t,e,i){return l(this,null,function*(){var n;let c=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(e==null?void 0:e.activityNameCustom)||"Search";this.analyticsLibPlugin.track(yield this.onBeforeSendParams({props:e,eventName:c,convergeActivityName:r.TrackingActivityNames.KeywordSearch,payload:m(y({},this.commonPropsToTrackingData(e)),{search_string:t==null?void 0:t.searchText})}))})}userLogin(t,e,i){return l(this,null,function*(){var n;let c=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(e==null?void 0:e.activityNameCustom)||"SubmitForm";this.analyticsLibPlugin.track(yield this.onBeforeSendParams({props:e,eventName:c,convergeActivityName:r.TrackingActivityNames.UserLogin,payload:this.commonPropsToTrackingData(e)}))})}userLoginSignup(t,e,i){return l(this,null,function*(){var n;let c=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(e==null?void 0:e.activityNameCustom)||"CompleteRegistration";this.analyticsLibPlugin.track(yield this.onBeforeSendParams({props:e,eventName:c,convergeActivityName:r.TrackingActivityNames.UserLoginSignup,payload:this.commonPropsToTrackingData(e)}))})}newsletterSignup(t,e,i){return l(this,null,function*(){var n;let c=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(e==null?void 0:e.activityNameCustom)||"CompleteRegistration";this.analyticsLibPlugin.track(yield this.onBeforeSendParams({props:e,eventName:c,convergeActivityName:r.TrackingActivityNames.NewsletterSignup,payload:m(y({},this.commonPropsToTrackingData(e)),{registration_type:"newsletter"})}))})}lead(t,e,i){return l(this,null,function*(){var n,s,o;let c=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(e==null?void 0:e.activityNameCustom)||"SubmitForm";this.analyticsLibPlugin.track(yield this.onBeforeSendParams({props:e,eventName:c,convergeActivityName:r.TrackingActivityNames.Lead,payload:m(y({},this.commonPropsToTrackingData(e)),{currency:(t==null?void 0:t.currencyCode)||((o=(s=this.sdk.config.tracking)==null?void 0:s.defaults)==null?void 0:o.currencyCode),value:(t==null?void 0:t.predictedValue)||(t==null?void 0:t.predictedLtv),content_name:t==null?void 0:t.sourceContentName})}))})}contactMessage(t,e,i){return l(this,null,function*(){var n,s,o;let c=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(e==null?void 0:e.activityNameCustom)||"Contact";this.analyticsLibPlugin.track(yield this.onBeforeSendParams({props:e,eventName:c,convergeActivityName:r.TrackingActivityNames.ContactMessage,payload:m(y({},this.commonPropsToTrackingData(e)),{currency:(t==null?void 0:t.currencyCode)||((o=(s=this.sdk.config.tracking)==null?void 0:s.defaults)==null?void 0:o.currencyCode),value:(t==null?void 0:t.predictedValue)||(t==null?void 0:t.predictedLtv),content_name:t==null?void 0:t.sourceContentName})}))})}schedule(t,e,i){return l(this,null,function*(){var n,s,o;let c=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(e==null?void 0:e.activityNameCustom)||"Schedule";this.analyticsLibPlugin.track(yield this.onBeforeSendParams({props:e,eventName:c,convergeActivityName:r.TrackingActivityNames.Schedule,payload:m(y({},this.commonPropsToTrackingData(e)),{currency:(t==null?void 0:t.currencyCode)||((o=(s=this.sdk.config.tracking)==null?void 0:s.defaults)==null?void 0:o.currencyCode),value:(t==null?void 0:t.predictedValue)||(t==null?void 0:t.predictedLtv),content_name:t==null?void 0:t.sourceContentName})}))})}startTrial(t,e,i){return l(this,null,function*(){var n,s,o;let c=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(e==null?void 0:e.activityNameCustom)||"StartTrial";this.analyticsLibPlugin.track(yield this.onBeforeSendParams({props:e,eventName:c,convergeActivityName:r.TrackingActivityNames.StartTrial,payload:m(y({},this.commonPropsToTrackingData(e)),{currency:(t==null?void 0:t.currencyCode)||((o=(s=this.sdk.config.tracking)==null?void 0:s.defaults)==null?void 0:o.currencyCode),value:(t==null?void 0:t.predictedValue)||(t==null?void 0:t.predictedLtv),content_name:t==null?void 0:t.sourceContentName})}))})}viewContentItem(t,e,i){return l(this,null,function*(){var s;let c=((s=i==null?void 0:i.augmentResult)==null?void 0:s.destinationActivityNameOverride)||(e==null?void 0:e.activityNameCustom)||"ViewContent",n=this.convertOrderToTikTokProps({products:t==null?void 0:t.items,currencyCode:t==null?void 0:t.currencyCode},e);this.analyticsLibPlugin.track(yield this.onBeforeSendParams({props:e,eventName:c,convergeActivityName:r.TrackingActivityNames.ViewContentItem,payload:m(y({},n),{currency:(t==null?void 0:t.currencyCode)||(n==null?void 0:n.currency),value:(t==null?void 0:t.value)||(n==null?void 0:n.value),content_category:t==null?void 0:t.categoryName,content_ids:t!=null&&t.identifiers&&(t==null?void 0:t.identifiers.length)>0?t==null?void 0:t.identifiers:n.content_ids,content_name:t!=null&&t.contentName?t.contentName:n.content_name,contents:n.contents,content_type:t!=null&&t.contentType?this.seekaContentTypeToTikTokContentType(t==null?void 0:t.contentType):void 0})}))})}order(t,e,i){return l(this,null,function*(){var n;let c=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(e==null?void 0:e.activityNameCustom)||"CompletePayment";this.analyticsLibPlugin.track(yield this.onBeforeSendParams({props:e,eventName:c,convergeActivityName:r.TrackingActivityNames.Order,payload:this.convertOrderToTikTokProps(t,e)}))})}changeProductAttribute(t,e,i){return l(this,null,function*(){var n;let c=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(e==null?void 0:e.activityNameCustom)||"CustomizeProduct";this.analyticsLibPlugin.track(yield this.onBeforeSendParams({props:e,eventName:c,convergeActivityName:r.TrackingActivityNames.ChangeProductAttribute,payload:this.convertOrderToTikTokProps({products:t!=null&&t.product?[t==null?void 0:t.product]:[]},e)}))})}subscriptionItemPurchase(t,e,i){return l(this,null,function*(){var n;let c=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(e==null?void 0:e.activityNameCustom)||"Subscribe";this.analyticsLibPlugin.track(yield this.onBeforeSendParams({props:e,eventName:c,convergeActivityName:r.TrackingActivityNames.SubscriptionItemPurchase,payload:this.convertOrderToTikTokProps(t,e)}))})}initiateCheckout(t,e,i){return l(this,null,function*(){var n;let c=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(e==null?void 0:e.activityNameCustom)||"InitiateCheckout";this.analyticsLibPlugin.track(yield this.onBeforeSendParams({props:e,eventName:c,convergeActivityName:r.TrackingActivityNames.InitiateCheckout,payload:this.convertOrderToTikTokProps(t,e)}))})}viewProduct(t,e,i){return l(this,null,function*(){var n;let c=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(e==null?void 0:e.activityNameCustom)||"ViewContent";this.analyticsLibPlugin.track(yield this.onBeforeSendParams({props:e,eventName:c,convergeActivityName:r.TrackingActivityNames.ViewProduct,payload:this.convertOrderToTikTokProps({products:t?[t]:[]},e)}))})}addToCart(t,e,i){return l(this,null,function*(){var n;let c=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(e==null?void 0:e.activityNameCustom)||"AddToCart";this.analyticsLibPlugin.track(yield this.onBeforeSendParams({props:e,eventName:c,convergeActivityName:r.TrackingActivityNames.AddToCart,payload:this.convertOrderToTikTokProps({products:t?[t]:[]},e)}))})}addToWishlist(t,e,i){return l(this,null,function*(){var n;let c=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(e==null?void 0:e.activityNameCustom)||"AddToWishlist";this.analyticsLibPlugin.track(yield this.onBeforeSendParams({props:e,eventName:c,convergeActivityName:r.TrackingActivityNames.AddToWishlist,payload:this.convertOrderToTikTokProps({products:t?[t]:[]},e)}))})}seekaContentTypeToTikTokContentType(t){return t===r.ECommerceContentType.SingleProduct||t===r.ECommerceContentType.SingleVariant?"product":t===r.ECommerceContentType.Collection?"product_group":void 0}convertProfileToTikTokUserData(t){var i,c,n,s,o,d,k;let e={};if(e.external_id=t.seekaPId,(i=t.tiktok)!=null&&i.ttp&&((c=t.tiktok)==null?void 0:c.ttp.length)>0&&(e.ttp=(n=t.tiktok)==null?void 0:n.ttp[0]),t.email&&t.email.length>0&&(e.email=(o=(s=this.sdk.util.parse.last(t.email))==null?void 0:s.toLowerCase())==null?void 0:o.trim(),e.email||delete e.email),t.phone&&t.phone.length>0){let v=t!=null&&t.address&&(t==null?void 0:t.address.length)>0?t==null?void 0:t.address.filter(T=>T.countryCode&&T.countryCode.length===2).map(T=>T.countryCode):[],h=v.length>0?this.sdk.util.parse.last(v):(k=(d=this.sdk.config.tracking)==null?void 0:d.defaults)==null?void 0:k.countryCode,C=t.phone.map(T=>(0,r.normalizeToE164)(T,h)).filter(Boolean);C.length>0&&(e.phone_number=this.sdk.util.parse.last(C),e.phone_number||delete e.phone_number)}return this.sdk.debug.verbose("TikTok - user data",e),e}onBeforeSendParams(n){return l(this,arguments,function*({payload:t,props:e,eventName:i,convergeActivityName:c}){var o;return e!=null&&e.activityIdentifier||this.sdk.debug.warn("TikTok - missing activityIdentifier",{payload:t,props:e,eventName:i}),t!=null&&t.contents&&(t.contents=(t.contents||[]).filter(Boolean),t.contents.length===0?delete t.contents:(delete t.content_category,delete t.content_ids,delete t.content_name)),(!t.value||t.value===""||t.value===0)&&(delete t.value,delete t.currency),{sdk:this.sdk,payload:{event:i,convergeActivityName:c,activityIdentifier:e==null?void 0:e.activityIdentifier,props:t,properties:{event_id:e==null?void 0:e.activityIdentifier,test_event_code:((o=this.config)==null?void 0:o.testEventCode)||void 0}}}})}onProfileChanged(t){return l(this,null,function*(){this.analyticsLibPlugin.identify({sdk:this.sdk,identity:this.convertProfileToTikTokUserData(t)})})}convertOrderToTikTokProps(t,e){var n,s,o,d;if(!t&&!e)return{};let i=e?this.commonPropsToTrackingData(e):{};return t?m(y({},i),{currency:t!=null&&t.currencyCode?t==null?void 0:t.currencyCode:t.products&&t.products.length>0&&t.products[0].currencyCode?t.products[0].currencyCode:(s=(n=this.sdk.config.tracking)==null?void 0:n.defaults)==null?void 0:s.currencyCode,value:(t==null?void 0:t.totalPrice)||((o=t==null?void 0:t.products)==null?void 0:o.map(k=>(k.unitPrice||0)*(k.quantity||1)).reduce((k,v)=>k+v,0))||void 0,content_type:"product",contents:((d=t==null?void 0:t.products)==null?void 0:d.map(k=>this.convertProductToTikTokProduct(k)))||(i==null?void 0:i.contents),order_id:(t==null?void 0:t.orderIdentifier)||(t==null?void 0:t.orderNumber)}):i}convertProductToTikTokProduct(t){return{price:t==null?void 0:t.unitPrice,quantity:t==null?void 0:t.quantity,content_id:this.sdk.util.parse.getContentIdFromProduct(t,this.sdk.config.tracking,r.AnalyticsLibrary.TikTokPixel)}}},S=[];function G(a){return{name:"analytics-plugin-tiktok-pixel",config:y({},a),initialize:t=>l(null,null,function*(){let i=t.config;S.indexOf(i.pixelId)===-1&&(A.init(i.pixelId,t.payload.tiktokUserData,{debug:(i==null?void 0:i.debug)===!0}),S.push(i.pixelId))}),page:t=>{},track:({sdk:t,payload:e})=>{var n,s;let i={props:e,logMetadata:{stream:!0,destination:{activityName:e.event,platform:r.AnalyticsLibrary.TikTokPixel,identifier:a.pixelId}}},c="TikTok - Browser track";t.debug.isOperationAllowed(e.event,c,i)&&(A.track(e.event,e.props,e.properties,a),t.debug.log(`${c} `+e.event,i),(s=t.telemetry)==null||s.trackEgress({platformTypeKey:"tiktok.pixel.track",platformIdentifier:a.pixelId,egressType:"track."+e.event,payload:e.props||{},destinationEventId:(n=e.properties)==null?void 0:n.event_id,destinationEventName:e.event,originActivityName:e.convergeActivityName||e.event,originActivityId:e.activityIdentifier||"",originSessionIdentifier:""}))},identify:({sdk:t,identity:e})=>{let i={props:e,logMetadata:{stream:!0,identity:e,destination:{platform:r.AnalyticsLibrary.TikTokPixel,identifier:a.pixelId}}};t.debug.log("TikTok - identify",i),A.identify(e)},ready:(t,e)=>{A.ready(t,e)},loaded:()=>S.indexOf(a.pixelId)>-1}}window.TikTokPixelConvergeSdkPlugin=a=>new b(a);})();
"use strict";(()=>{var F=Object.create;var A=Object.defineProperty;var U=Object.getOwnPropertyDescriptor;var K=Object.getOwnPropertyNames,j=Object.getOwnPropertySymbols,O=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var u=(n,e,t)=>e in n?A(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,P=(n,e)=>{for(var t in e||(e={}))B.call(e,t)&&u(n,t,e[t]);if(j)for(var t of j(e))W.call(e,t)&&u(n,t,e[t]);return n};var R=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports);var V=(n,e,t,c)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of K(e))!B.call(n,s)&&s!==t&&A(n,s,{get:()=>e[s],enumerable:!(c=U(e,s))||c.enumerable});return n};var z=(n,e,t)=>(t=n!=null?F(O(n)):{},V(e||!n||!n.__esModule?A(t,"default",{value:n,enumerable:!0}):t,n));var m=(n,e,t)=>u(n,typeof e!="symbol"?e+"":e,t);var a=(n,e,t)=>new Promise((c,s)=>{var l=o=>{try{d(t.next(o))}catch(r){s(r)}},v=o=>{try{d(t.throw(o))}catch(r){s(r)}},d=o=>o.done?c(o.value):Promise.resolve(o.value).then(l,v);d((t=t.apply(n,e)).next())});var D=R((q,x)=>{x.exports=SeekaConvergeCore});var i=z(D());var L="1.12.1";var g=class{constructor(e){m(this,"sdk");m(this,"privacyConfig",{requiresIabPurposes:[i.IabPrivacyConsentPurposeIdMap.measureAdvertisingPerformance]});m(this,"name");m(this,"type");m(this,"version");m(this,"config");this.type="converge-plugin-seeka",e!=null&&e.scopeKey?this.name=this.type+"-"+e.scopeKey:this.name=this.type,this.version=L,this.sdk={},this.config=e||{}}init(e){return a(this,null,function*(){})}initComplete(e){return a(this,null,function*(){})}onReady(){return a(this,null,function*(){})}isLoaded(){return!0}activity(e,t){return a(this,null,function*(){yield this.sendActivity({activityName:e,time:t==null?void 0:t.time},t)})}custom(e,t,c){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.Custom,activityNameCustom:e,time:t==null?void 0:t.time},t)})}viewPage(e,t){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.ViewPage,time:e==null?void 0:e.time},e)})}addPaymentMethod(e,t,c){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.AddPaymentMethod,commerce:e,time:t==null?void 0:t.time},t)})}keywordSearch(e,t,c){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.KeywordSearch,search:e,time:t==null?void 0:t.time},t)})}userLogin(e,t,c){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.UserLogin,userAccount:e,time:t==null?void 0:t.time},t)})}userLoginSignup(e,t,c){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.UserLoginSignup,signUp:e,time:t==null?void 0:t.time},t)})}newsletterSignup(e,t,c){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.NewsletterSignup,signUp:e,time:t==null?void 0:t.time},t)})}applyPromotionalCode(e,t,c){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.ApplyPromotionalCode,promotion:e,time:t==null?void 0:t.time},t)})}lead(e,t,c){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.Lead,lead:e,time:t==null?void 0:t.time},t)})}startTrial(e,t,c){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.StartTrial,lead:e,time:t==null?void 0:t.time},t)})}contactMessage(e,t,c){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.ContactMessage,lead:e,time:t==null?void 0:t.time},t)})}schedule(e,t,c){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.Schedule,lead:e,time:t==null?void 0:t.time},t)})}viewContentItem(e,t,c){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.ViewContentItem,contentItem:e,time:t==null?void 0:t.time},t)})}order(e,t,c){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.Order,commerce:e,time:t==null?void 0:t.time},t)})}subscriptionItemPurchase(e,t,c){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.SubscriptionItemPurchase,commerce:e,time:t==null?void 0:t.time},t)})}initiateCheckout(e,t,c){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.InitiateCheckout,commerce:e,time:t==null?void 0:t.time},t)})}viewProduct(e,t,c){return a(this,null,function*(){let s={activityName:i.TrackingActivityNames.ViewProduct,time:t==null?void 0:t.time,commerce:{currencyCode:e==null?void 0:e.currencyCode,products:e?[e]:[]}};yield this.sendActivity(s,t)})}addToCart(e,t,c){return a(this,null,function*(){let s={activityName:i.TrackingActivityNames.AddToCart,time:t==null?void 0:t.time,commerce:{currencyCode:e==null?void 0:e.currencyCode,products:e?[e]:[]}};yield this.sendActivity(s,t)})}addToWishlist(e,t,c){return a(this,null,function*(){let s={activityName:i.TrackingActivityNames.AddToWishlist,time:t==null?void 0:t.time,commerce:{currencyCode:e==null?void 0:e.currencyCode,products:e?[e]:[]}};yield this.sendActivity(s,t)})}removeFromCart(e,t,c){return a(this,null,function*(){let s={activityName:i.TrackingActivityNames.RemoveFromCart,time:t==null?void 0:t.time,commerce:{currencyCode:e==null?void 0:e.currencyCode,products:e?[e]:[]}};yield this.sendActivity(s,t)})}changeProductAttribute(e,t,c){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.ChangeProductAttribute,time:t==null?void 0:t.time,contentBehaviour:{changeProduct:e}},t)})}filterItemsByAttribute(e,t,c){return a(this,null,function*(){!e||e.length==0||(yield Promise.all(e.map(s=>this.sendActivity({activityName:i.TrackingActivityNames.FilterItemsByAttribute,time:t==null?void 0:t.time,contentBehaviour:{filterItems:s}},t))))})}sendActivity(e,t,c){return a(this,null,function*(){var f,b,S,M,w,E,N,T,_;if(this.sdk.config.enablement){if(this.sdk.config.enablement===i.OrganisationBrandBillingStatusEnablement.BrowserOnlyDueToBillingFailure||this.sdk.config.enablement===i.OrganisationBrandBillingStatusEnablement.NoFeaturesEnabledDueToBillingFailure||this.sdk.config.enablement===i.OrganisationBrandBillingStatusEnablement.NoFeaturesEnabledDueToNoCurrentPlan){this.sdk.debug.warn("Billing - Restricted so not publishing activity to Seeka API");return}else if(this.sdk.config.enablement===i.OrganisationBrandBillingStatusEnablement.BrowserOnlyDueToCurrentPlan){this.sdk.debug.verbose("Billing - Browser only plan so not publishing activity to Seeka API");return}}if(((b=(f=this.sdk.config.tracking)==null?void 0:f.processing)==null?void 0:b.isServerEventsDisabled)===!0)return;let s={},l=yield this.sdk.identity.getProfile();t||(t={}),!e.activityId&&t&&t!=null&&t.activityIdentifier&&(e.activityId=(S=t==null?void 0:t.activityIdentifier)==null?void 0:S.toString(),delete t.activityIdentifier),t.activityNameCustom&&(e.activityNameCustom=t.activityNameCustom,delete t.activityNameCustom);let v=this.sdk.state.get("plugin.facebook.pixel.testEventCode");v&&(s["facebook.pixel.test_event_code"]=v);let d=this.sdk.state.get("plugin.tiktok.pixel.testEventCode");d&&(s["tiktok.pixel.test_event_code"]=d),this.sdk.debug.isDebugEnabled===!0&&(s["google.analytics.debug_mode"]="1");let r=[],k=this.sdk.attribution.getCurrentTouchCampaign();k&&r.push(k),e.properties=P(P({},e.properties||{}),t.custom||{});let y=this.sdk.debug.createTrackingSource("sdk/js/activity/send");(M=this.sdk.privacy.state)!=null&&M.tcfConsentString&&(y.privacy={tcfConsentString:this.sdk.privacy.state.tcfConsentString}),t.time&&(e.time=t.time,y.time=t.time),(!e.time||e.time.getFullYear()==1||e.time.getFullYear()==1900)&&(e.time=void 0,y.time=void 0);let C={payload:e,id:l,props:s,src:y,utm:r};C.props.activityIdentifier=void 0;let I={props:e,logMetadata:{stream:!0,destination:{activityName:e.activityNameCustom||e.activityName,platform:i.AnalyticsLibrary.Seeka,identifier:this.sdk.config.organisationId}}},h="Seeka - Server track";this.sdk.debug.isOperationAllowed((w=e.activityName)==null?void 0:w.toString(),h,I)&&(yield this.sdk.convergeApi.ingest.push([C],[],[],[]),(_=this.sdk.telemetry)==null||_.trackEgress({platformTypeKey:"seeka.browser.track",platformIdentifier:((E=this.config)==null?void 0:E.scopeKey)||"self",egressType:"push."+(e.activityNameCustom||e.activityName),payload:s||{},originActivityName:((N=e.activityName)==null?void 0:N.toString())||"",originActivityNameCustom:e.activityNameCustom,originActivityId:e.activityId||"",originSessionIdentifier:"",destinationEventName:e.activityNameCustom||((T=e.activityName)==null?void 0:T.toString())||""}),i.ConvergeApi.immediateTriggerSendForActivities.indexOf(e.activityName)>-1&&(yield this.sdk.identity.flushIdentitySyncQueue(),yield this.sdk.convergeApi.ingest.flushQueueDebounced.flush()),this.sdk.debug.log(`${h} `+e.activityName,I))})}};window.SeekaConvergeSdkPlugin=n=>new g(n);})();
"use strict";(()=>{var N=Object.create;var w=Object.defineProperty;var U=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var T=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty;var B=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports);var M=(i,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of D(e))!j.call(i,a)&&a!==o&&w(i,a,{get:()=>e[a],enumerable:!(n=U(e,a))||n.enumerable});return i};var b=(i,e,o)=>(o=i!=null?N(T(i)):{},M(e||!i||!i.__esModule?w(o,"default",{value:i,enumerable:!0}):o,i));var y=B((O,A)=>{A.exports=SeekaConvergeCore});var $=b(y());var G="2.7.1";var f=b(y()),P={send_page_view:!1,anonymize_ip:!1,allow_google_signals:!0,cookie_update:!0,allow_ad_personalization_signals:!0,cookie_flags:""},m="dataLayer",I=!1,C="https://www.googletagmanager.com/gtag/js";function k(i){if(!i)throw new Error("No GA Measurement ID defined");if(Array.isArray(i))return i;if(typeof i=="string")return[i];throw new Error("GA Measurement ID must be string or array of strings")}var _=(i,e)=>window[m]?(I||(e.debug.verbose("Google Analytics 4 - Using existing window.dataLayer due to it already existing",{config:i}),I=!0),m):i.dataLayerName,E=i=>{let e=i.util.url.getParamFromQueryString("sk.gases",i.dataLayer.window.location().href)||null;return e?{sessionId:e,origin:"crossDomain"}:{sessionId:i.identity.touchAndGetSessionId(),origin:"seeka"}};function F(i){let e={};return i.id&&(e.id=i.id),i.campaign&&(e.name=i.campaign),i.source&&(e.source=i.source),i.medium&&(e.medium=i.medium),i.content&&(e.content=i.content),i.term&&(e.term=i.term),{campaign:e}}function S(i,e){let o=Array.isArray(i.measurementIds)&&i.measurementIds.length>0?String(i.measurementIds[0]||"").trim():typeof i.measurementIds=="string"?String(i.measurementIds||"").trim():"",n=i.customScriptSrc||C,a=_(i,e),r=n;try{let d=new URL(n,e.dataLayer.window.location()?.href||window.location.href);o&&d.searchParams.set("id",o),a!==m&&d.searchParams.set("l",a),r=d.toString()}catch{let d=n.includes("?")?n.split("?"):[n,""],t=new URLSearchParams(d[1]||"");o&&t.set("id",o),a!==m&&t.set("l",a),r=`${d[0]}?${t.toString()}`}let l=null,g=null;try{l=new URL(n,window.location.href)}catch{l=null}try{g=new URL(C)}catch{g=null}let c=document.querySelectorAll("script[src]");for(let d of Array.from(c)){let t=d.src,s=null;try{s=new URL(t,window.location.href)}catch{s=null}if(!s)continue;let u=l&&s.host===l.host&&s.pathname===l.pathname,h=g&&s.host===g.host&&s.pathname===g.pathname;if(!(!u&&!h)&&(new URLSearchParams(s.search).get("l")||m)===a)return{loaded:!0,tagUrl:r}}return{loaded:!1,tagUrl:r}}var L=class{sdk;config;measurementIds;loadedInstances={};constructor(i,e){this.sdk=i,this.config=e,this.measurementIds=k(e.measurementIds)}initialize(){let{gtagName:i,gtagConfig:e,additionalTags:o}=this.config,n=_(this.config,this.sdk);window[n]||(window[n]=window[n]||[],this.sdk.debug.verbose("Google Analytics 4 - Set window[dataLayerName]",{config:this.config}));let a=!1;window[i]||(window[i]=function(){window[n].push(arguments)},a=!0,this.sdk.debug.verbose(`Google Analytics 4 - Set window[${i}]`,{config:this.config})),a?(window[i]("js",new Date),this.sdk.debug.verbose(`Google Analytics 4 - Set js on window[${i}]`,{config:this.config})):this.sdk.debug.warn(`Google Analytics 4 - Not setting js on window[${i}]`,{config:this.config});let r=this.sdk.config.tracking?.processing?.consent;if(r&&!r.disableConsentManagement&&r.regionalConsent)for(let t of r.regionalConsent){if(!t.configuration)continue;let s={};t.configuration.adStorage&&t.configuration.adStorage!==f.RegionalConsentGrantOption.Unset&&(s.ad_storage=t.configuration.adStorage),t.configuration.analyticsStorage&&t.configuration.analyticsStorage!==f.RegionalConsentGrantOption.Unset&&(s.analytics_storage=t.configuration.analyticsStorage),t.configuration.adUserData&&t.configuration.adUserData!==f.RegionalConsentGrantOption.Unset&&(s.ad_user_data=t.configuration.adUserData),t.configuration.adPersonalisation&&t.configuration.adPersonalisation!==f.RegionalConsentGrantOption.Unset&&(s.ad_personalization=t.configuration.adPersonalisation),t.configuration.functionalityStorage&&t.configuration.functionalityStorage!==f.RegionalConsentGrantOption.Unset&&(s.functionality_storage=t.configuration.functionalityStorage),t.configuration.securityStorage&&t.configuration.securityStorage!==f.RegionalConsentGrantOption.Unset&&(s.security_storage=t.configuration.securityStorage),t.configuration.personalisationStorage&&t.configuration.personalisationStorage!==f.RegionalConsentGrantOption.Unset&&(s.personalization_storage=t.configuration.personalisationStorage);let u="";t.countryCode&&t.subdivisionCode?u=`${t.countryCode}-${t.subdivisionCode}`:t.countryCode&&(u=t.countryCode),u&&(s.region=[u]),this.sdk.debug.verbose(`Google Analytics 4 - Set consent for region ${u}`,{val:s}),window[i]("consent","default",s)}let l=S(this.config,this.sdk);if(!(this.measurementIds&&this.measurementIds.length>0||o&&o.length>0))this.sdk.debug.warn("Google Analytics 4 - No measurement IDs or additional tags supplied. Skipping gtag.js injection.");else if(l.loaded)this.sdk.debug.verbose("Google Analytics 4 - not injecting gtag.js script as it is already loaded",{config:this.config,gtagScriptUrl:l.tagUrl});else{let t=document.createElement("script");t.async=!0,t.src=l.tagUrl,document.body?(document.body.appendChild(t),this.sdk.debug.verbose("Google Analytics 4 - injected gtag.js script",{config:this.config,gtagScriptUrl:l.tagUrl})):window.addEventListener("DOMContentLoaded",()=>{document.body.appendChild(t),this.sdk.debug.verbose("Google Analytics 4 - injected gtag.js script",{config:this.config,gtagScriptUrl:l.tagUrl})})}let g={transport_type:"beacon",...this.config.gtagConfig?this.config.gtagConfig:{},...this.config.isGoogleDebugMode===!0||window.location.search?.includes("gtm_debug")?{debug_mode:!0}:{}},c=E(this.sdk);c.origin==="crossDomain"&&(this.sdk.debug.verbose("Google Analytics 4 - Set session_id from sk.gases url param",{crossDomainSessionId:c.sessionId}),g.session_id=c.sessionId);let d=this.sdk.util.url.getParamFromQueryString("sk.gacl",this.sdk.dataLayer.window.location().href)||null;d&&(g.client_id=d,this.sdk.debug.verbose("Google Analytics 4 - Set client_id from sk.gacl url param",{crossDomainClientId:d})),this.sdk.debug.verbose("Google Analytics 4 - using configuration",{gtagConf:g,config:this.config});for(let t=0;t<this.measurementIds.length;t++)this.loadedInstances[this.measurementIds[t]]||(window[i]("config",this.measurementIds[t],g),this.loadedInstances[this.measurementIds[t]]=!0,this.sdk.debug.verbose(`Google Analytics 4 - Initialised measurement ID ${this.measurementIds[t]} with gtag config`,{gtagConf:g}));if(o&&o.length>0)for(let t=0;t<o.length;t++){let s=o[t];if(s.tagId&&(!this.measurementIds||this.measurementIds.indexOf(s.tagId)===-1)&&(window[i]("config",s.tagId,g),this.sdk.debug.verbose(`Google Analytics 4 - Initialised additional config ID ${s.tagId} with gtag config`,{gtagConf:g})),s.phoneConversions&&s.phoneConversions.length>0)for(let u=0;u<s.phoneConversions.length;u++){let h=s.phoneConversions[u];if(h.conversionLabel&&h.phoneConversionNumber){let v={phone_conversion_number:h.phoneConversionNumber};window[i]("config",`${s.tagId}/${h.conversionLabel}`,v),this.sdk.debug.verbose(`Google Analytics 4 - Initialised phone conversion config ID ${s.tagId}/${h.conversionLabel} with phone config`,{phoneConfig:v})}}}}identify(i){let e=this.sdk.identity.getProfile(),{gtagName:o}=this.config;if(!window[o]||!this.measurementIds.length){this.sdk.debug.warn(`Google Analytics 4 - Not handling identify call as window[${o}] is undefined or there are no measurement IDs`,{gtagName:o});return}else this.sdk.debug.verbose("Google Analytics 4 - Handling identify call",{gtagName:o,payload:i,profile:e});window[o]("set",{user_data:i,user_id:e.seekaPId});let n=[...new Set([e.seekaPId,...e.seekaBId||[]])].filter(Boolean);window[o]("set","user_properties",{user_id:e.seekaPId,user_ids:n})}track(i){if(this.config.isIframeClient){this.sdk.debug.verbose("Google Analytics 4 - Not handling track call as it is an iframe client",{config:this.config});return}let{gtagName:e,enableAutomaticLastTouchAttribution:o}=this.config,n=i?.event,a=i?.properties||{};if(!window[e]||!this.measurementIds.length){this.sdk.debug.warn(`Google Analytics 4 - Not handling event track call as window[${e}] is undefined or there are no measurement IDs`,{gtagName:e,event:n,properties:a});return}let r=o?this.sdk.attribution.getLastTouchCampaign():null,l=r?F(r):void 0,g={page_location:this.sdk.util.url.removePiiFromUrl(this.sdk.dataLayer.window.location()?.href),page_path:this.sdk.dataLayer.window.location()?.pathname,page_title:this.sdk.dataLayer.document.title(),page_hash:this.sdk.dataLayer.window.location()?.hash,page_search:this.sdk.util.url.removePiiFromQueryString(this.sdk.dataLayer.window.location()?.search),page_referrer:this.sdk.util.url.removePiiFromUrl(this.sdk.dataLayer.document.referrer())},c={...a,...g,...l,tracking_origin:"seeka"},d="Google Analytics 4 - Browser track",t={logMetadata:{stream:!0,destination:{activityName:n,platform:f.AnalyticsLibrary.GoogleAnalytics}}};if(this.sdk.debug.isOperationAllowed(n,d,t))for(let s=0;s<this.measurementIds.length;s++){let u={...c,send_to:this.measurementIds[s]};window[e]("event",n,u),this.sdk.debug.log(`${d} `+n,{...t,identifier:this.measurementIds[s]})}}loaded(){return S(this.config,this.sdk).loaded===!0}disable(i){let e=i?k(i):this.measurementIds;for(let o=0;o<this.measurementIds.length;o++){let n=this.measurementIds[o];e.includes(n)&&(window[`ga-disable-${n}`]=!0)}}enable(i){let e=i?k(i):this.measurementIds;for(let o=0;o<this.measurementIds.length;o++){let n=this.measurementIds[o];e.includes(n)&&(window[`ga-disable-${n}`]=!1)}}};var p=class{constructor(e){this.type="seeka-app-google-ads",this.name=this.type+"-"+e.appInstallId,this.name=this.type,this.version=G,this.sdk={},this.config=e||{}}sdk;gtagHelper=null;gtagName=null;isIframeClient=!1;privacyConfig={requiresIabPurposes:[]};name;type;version;config;async beforeInit(){this.isIframeClient=this.sdk.config.runtime?.client?.type==="iframe";let e=(this.config.mappings||[]).map(a=>a.googleConversionAction?.conversionId||"").filter(Boolean);if(e.length===0){this.sdk.debug.verbose("Google Ads - No Google tags required for Google Ads plugin");return}let o=(this.sdk.config.tracking.analytics?.libraries?.googleAnalytics?.googleTags||[]).map(a=>a.tagId).filter(Boolean),n=e.filter(a=>o.indexOf(a)===-1);n.length>0&&(this.sdk.debug.verbose(`Google Ads - Adding Google tags for Google Ads plugin: ${n.join(", ")}`),this.sdk.config.tracking||(this.sdk.config.tracking={}),this.sdk.config.tracking.analytics||(this.sdk.config.tracking.analytics={}),this.sdk.config.tracking.analytics.libraries||(this.sdk.config.tracking.analytics.libraries={}),this.sdk.config.tracking.analytics.libraries.googleAnalytics||(this.sdk.config.tracking.analytics.libraries.googleAnalytics={}),this.sdk.config.tracking.analytics.libraries.googleAnalytics.googleTags||(this.sdk.config.tracking.analytics.libraries.googleAnalytics.googleTags=[]),this.sdk.config.tracking.analytics.libraries.googleAnalytics.googleTags=[...this.sdk.config.tracking.analytics.libraries.googleAnalytics.googleTags,...n.map(a=>({tagId:a}))],await this.checkConfigureGtags())}async checkConfigureGtags(){if(!this.sdk.config.plugins||this.sdk.config.plugins.length===0){this.sdk.debug.warn("Google Ads - No plugins detected");return}this.sdk.config.plugins.some(o=>o.type==="converge-plugin-google-analytics-4")?this.sdk.debug.verbose("Google Ads - Google Analytics 4 plugin detected, not configuring GTAGs"):(this.sdk.debug.verbose("Google Ads - No Google Analytics 4 plugin detected, configuring GTAGs"),await this.configureGtags())}async configureGtags(){let e=this.sdk.config.tracking?.analytics?.libraries?.googleAnalytics?.googleTags||[];if(e.length===0){this.sdk.debug.warn("Google Ads - No Google tags configured for Google Ads plugin");return}let o=`${this.sdk.config.scopeKey}_${this.sdk.util.text.alphaNumericOnly(this.config.appInstallId)}`;this.gtagName=`gtagSeekaGa4_${o}`;let n=`dataLayerSeekaGa4_${o}`;this.gtagHelper=new L(this.sdk,{measurementIds:[],isGoogleDebugMode:this.sdk.debug.isDebugEnabled,additionalTags:e,gtagName:this.gtagName,dataLayerName:n,isIframeClient:this.isIframeClient,gtagConfig:{...P,cookie_prefix:"_ga_seeka"}}),this.gtagHelper.initialize()}async activity(e,o,n){this.sdk.debug.log(`Google Ads - Listened to activity ${e} with props`,{props:o,metadata:n});let a=(this.config.mappings||[]).filter(Boolean).filter(r=>r.active&&r.googleConversionAction&&(r.googleConversionAction.type==="WEBPAGE"||r.googleConversionAction.type==="WEBPAGE_CODELESS"));if(a.length!==0)for(let r of a){let l=this.sdk.activity.isActivityMatchedToFilter(r.seekaActivityMatch,this.type,e,o,n),g=l.isMatch,c={currencyCode:o?.currencyCode||this.sdk.config?.tracking?.analytics?.autoCollection?.defaultActivityCurrencyAmount?.currencyCode||this.sdk.config.tracking?.defaults?.currencyCode||null,value:o?.unitPrice||o?.totalPrice||this.sdk.config?.tracking?.analytics?.autoCollection?.defaultActivityCurrencyAmount?.amount||null};if(g||this.sdk.debug.verbose(`Google Ads - Activity ${e} does not match conversion mapping`,{name:e,props:o,conversion:r,matchResult:l}),g){c.value||this.sdk.debug.log(`Google Ads - Activity ${e} does not contain a value ${e}`,{name:e,props:o,conversion:r}),this.sdk.debug.verbose(`Google Ads - Tracking conversion for activity ${e} with conversion id ${r.googleConversionAction.conversionId} and label ${r.googleConversionAction.conversionLabel} and value ${c}`);let d={send_to:`${r.googleConversionAction.conversionId}/${r.googleConversionAction.conversionLabel}`,value:c?.value,currency:c?.currencyCode,transaction_id:o?.orderIdentifier||o?.orderNumber||o?.activityIdentifier},t="Google Ads - Conversion track",s={props:d,logMetadata:{stream:!0,destination:{activityName:"conversion",platform:$.AnalyticsLibrary.GoogleAnalytics,identifier:r.googleConversionAction.conversionId}}};this.sdk.debug.isOperationAllowed("conversion",t,s)&&(this.callGtag("event","conversion",d)||this.sdk.debug.warn("Google Ads - Google tag not found, not firing Google Ads conversion",{conversionId:r.googleConversionAction.conversionId,conversionLabel:r.googleConversionAction.conversionLabel}),this.sdk.debug.log(`${t} conversion`,s))}}}callGtag(e,o,n){if(this.gtagHelper){if(!this.gtagName)return this.sdk.debug.warn("Google Ads - Google tag name not found"),!1;let a=window[this.gtagName];return a?(a(e,o,n),this.sdk.debug.verbose(`Google Ads - Called Google tag ${this.gtagName} with payload`,{payload:n}),!0):(this.sdk.debug.warn("Google Ads - Google tag not found"),!1)}else return this.callGtagViaPlugin(e,o,n)}callGtagViaPlugin(e,o,n){let a=(this.sdk.config.plugins||[]).filter(l=>l.type==="converge-plugin-google-analytics-4");if(!a||a.length===0)return!1;let r=!1;return a.forEach(l=>{let g=l.analyticsLibPlugin?.config?.gtagName;if(!g)return;let c=window[g];c&&(c(e,o,n),this.sdk.debug.verbose(`Google Ads - Called plugin Google tag ${g} with payload`,{payload:n}),r=!0)}),r}async collectIdentifiers(){let e={google:{gclid:[]}};try{let o=this.sdk.util.url.getParamFromQueryString("gclid",this.sdk.dataLayer.window.location()?.href);o&&e.google.gclid.push(o)}catch(o){this.sdk.debug.warn("Google Ads - Failed to set gclid",o)}return this.sdk.debug.verbose("Google Ads - collected identifiers",e),e}async init(e){}isLoaded(){return!0}};window.GoogleAdsAppConvergeSdkPlugin=i=>new p(i);})();
window.Converge = SeekaSdk([
                {
                    "scopeKey": "a2a1d8568a181204953f3a1c1543f0eb",
                    "scopeDescription": "The Bureau Fashion Week",
                    "debug": {},
                    "key": "sdkr_Q2ZESjhLUjZ4SVJDVkVoRmpzclNSTnhJYVpHRkVCdkZUdGhtdlBBTlNJQ0s1YlBUZlhJaUh4aXJtSGhTcEhZZ004REFhNEQwZExQRWRhaDlGekpTYWdzY3BkNWFSb3ppOXFuanlhTzlIeV84Uk1Ud1NuN19oeElBS2hNV1hNV2xXWmdDMGM5Wm94bWsxbVJoXzZtNTFqRDJYUExFZVIwbGdPV2M5U003RXUybEREeHg",
                    "organisationId": "ce50c838682f7276388f3a16639e0c96",
                    "plugins": [
                        (function(){try{return BotDetectionConvergeSdkPlugin({});}catch(e){console.error('[Converge] Plugin BotDetectionConvergeSdkPlugin failed to load',e);return null}})(),(function(){try{return FacebookPixelConvergeSdkPlugin({ 'pixelId': '1655210495464283', 'pipeline': null });}catch(e){console.error('[Converge] Plugin FacebookPixelConvergeSdkPlugin failed to load',e);return null}})(),(function(){try{return FacebookPixelConvergeSdkPlugin({ 'pixelId': '570201587850053', 'pipeline': null });}catch(e){console.error('[Converge] Plugin FacebookPixelConvergeSdkPlugin failed to load',e);return null}})(),(function(){try{return GoogleAnalytics4ConvergeSdkPlugin({ 'measurementId': 'G-GPJ97EV5S3', 'enableAutomaticLastTouchAttribution': false, 'pipeline': null });}catch(e){console.error('[Converge] Plugin GoogleAnalytics4ConvergeSdkPlugin failed to load',e);return null}})(),(function(){try{return TikTokPixelConvergeSdkPlugin({ 'pixelId': 'D4U45A3C77U3NA785D9G', 'pipeline': null });}catch(e){console.error('[Converge] Plugin TikTokPixelConvergeSdkPlugin failed to load',e);return null}})(),(function(){try{return GoogleAdsAppConvergeSdkPlugin({"appId":"3f5ecdb4-71c5-4b70-8d02-e0239fbf88e6","appInstallId":"0fd46b11-ede1-521c-b2aa-3a1c1f0aa85d","appUrl":"https://apps.seeka.services/google-ads","mappings":[{"id":"1dd76def-2275-4378-b780-dfd2ecaaf8a0","googleConversionAction":{"resourceName":"customers/5136908617/conversionActions/857804537","id":857804537,"name":"Purchase_manual","status":"ENABLED","type":"WEBPAGE","category":"PURCHASE","conversionLabel":"apcgCPmdhJkDEJOO1IoD","conversionId":"AW-827655955"},"active":true,"seekaActivityMatch":{"id":"cd5c265e-db9a-4e42-98f3-dbce2b235c69","type":"activityTracked","activityNames":["Order"],"sourceFilter":{"comparer":"or","filters":[{"type":"wildcard","key":"*","label":"Any source","textMatch":null}],"description":""}}}]});}catch(e){console.error('[Converge] Plugin GoogleAdsAppConvergeSdkPlugin failed to load',e);return null}})(),(function(){try{return SeekaConvergeSdkPlugin({ "scopeKey": "a2a1d8568a181204953f3a1c1543f0eb" });}catch(e){console.error('[Converge] Plugin SeekaConvergeSdkPlugin failed to load',e);return null}})()
                    ].filter(function(p){return p!=null}),
                    "enablement": "fullyFeatured",
                    "endpoint": "https://api.seeka.services",
                    "ingestEndpoint": "https://router.seeka.services",
                    "tracking": {
  "endpoint": "https://api.seeka.services",
  "ingestEndpoint": "https://router.seeka.services",
  "debug": {},
  "defaults": {
    "currencyCode": "AUD",
    "countryCode": "US"
  },
  "analytics": {
    "libraries": {
      "seeka": {
        "library": "seeka"
      },
      "googleAnalytics": {
        "googleTags": [],
        "merchant": {},
        "library": "googleAnalytics"
      },
      "facebookPixel": {
        "library": "facebookPixel"
      },
      "tikTokPixel": {
        "library": "tikTokPixel"
      },
      "dynamicYield": {
        "library": "dynamicYield"
      },
      "segment": {
        "library": "segment"
      },
      "snapchatPixel": {
        "library": "snapchatPixel"
      },
      "pinterestPixel": {
        "library": "pinterest"
      }
    },
    "autoCollection": {
      "activityNames": [
        "viewPage",
        "viewProduct",
        "addToCart",
        "keywordSearch",
        "newsletterSignup",
        "addPaymentMethod",
        "order"
      ],
      "keywordSearchQueryParamName": "q",
      "activityDefinitions": [
        {
          "triggerSettings": {
            "schemaVersion": 2,
            "firingTriggersComparer": "and",
            "firingTriggers": [
              {
                "htmlElements": [
                  {
                    "locator": {
                      "elementTypes": [
                        "A"
                      ],
                      "innerTextMatch": {
                        "operator": "equals",
                        "matchValue": "BUY TICKETS NOW\nSecure your spot before pricing increases"
                      },
                      "linkUrlMatch": {
                        "operator": "startsWith",
                        "matchValue": "https://thebureaufashionweek.flicket.io/events/e160c549-c3b9-4c9b-b58e-436505fbbd79/reservation"
                      }
                    },
                    "eventTypes": [
                      "click"
                    ]
                  }
                ],
                "comparer": "and",
                "filters": [
                  {
                    "label": "",
                    "type": "domain",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "thebureaufashionweek.com"
                    }
                  },
                  {
                    "label": "",
                    "type": "pagePath",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "/new-york-fashion-week-tickets-september-2025"
                    }
                  }
                ],
                "description": ""
              }
            ],
            "blockingTriggersComparer": "and",
            "blockingTriggers": [
              {
                "htmlElements": [],
                "comparer": "and",
                "filters": [],
                "description": ""
              }
            ]
          },
          "vendorSettings": {
            "google": {
              "googleAdsConversionTriggers": []
            }
          },
          "consentSettings": {
            "analytics": {},
            "marketing": {
              "email": {},
              "sms": {}
            },
            "loyalty": {}
          },
          "activityName": "custom",
          "activityNameCustom": "Ticket Button Click",
          "activityParameters": {
            "contentName": "{{locatorElement.innerText}}"
          },
          "id": "61aace57-3dd2-4a8b-af95-7796b373589c",
          "description": "Hero"
        },
        {
          "triggerSettings": {
            "schemaVersion": 2,
            "firingTriggersComparer": "and",
            "firingTriggers": [
              {
                "htmlElements": [
                  {
                    "locator": {
                      "elementTypes": [
                        "A"
                      ],
                      "innerTextMatch": {
                        "operator": "equals",
                        "matchValue": "September 12th Fashion Show  4:00PM\nBuy Tickets"
                      },
                      "linkUrlMatch": {
                        "operator": "startsWith",
                        "matchValue": "https://thebureaufashionweek.flicket.io/e160c549-c3b9-4c9b-b58e-436505fbbd79/releases/friday-400pm"
                      }
                    },
                    "eventTypes": [
                      "click"
                    ]
                  }
                ],
                "comparer": "and",
                "filters": [
                  {
                    "label": "",
                    "type": "domain",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "thebureaufashionweek.com"
                    }
                  },
                  {
                    "label": "",
                    "type": "pagePath",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "/new-york-fashion-week-tickets-september-2025"
                    }
                  }
                ],
                "description": ""
              }
            ],
            "blockingTriggersComparer": "and",
            "blockingTriggers": [
              {
                "htmlElements": [],
                "comparer": "and",
                "filters": [],
                "description": ""
              }
            ]
          },
          "vendorSettings": {
            "google": {
              "googleAdsConversionTriggers": []
            }
          },
          "consentSettings": {
            "analytics": {},
            "marketing": {
              "email": {},
              "sms": {}
            },
            "loyalty": {}
          },
          "activityName": "custom",
          "activityNameCustom": "Ticket Button Click",
          "activityParameters": {
            "contentName": "{{locatorElement.innerText}}"
          },
          "id": "55368038-ea84-4055-b4a4-5f04596b1b52",
          "description": "Sept_12_4.00pm_background"
        },
        {
          "triggerSettings": {
            "schemaVersion": 2,
            "firingTriggersComparer": "and",
            "firingTriggers": [
              {
                "htmlElements": [
                  {
                    "locator": {
                      "elementTypes": [
                        "A"
                      ],
                      "innerTextMatch": {
                        "operator": "equals",
                        "matchValue": "September 12th Fashion Show  4:00PM\nBuy Tickets"
                      },
                      "linkUrlMatch": {
                        "operator": "startsWith",
                        "matchValue": "https://thebureaufashionweek.flicket.io/e160c549-c3b9-4c9b-b58e-436505fbbd79/releases/friday-400pm"
                      }
                    },
                    "eventTypes": [
                      "click"
                    ]
                  }
                ],
                "comparer": "and",
                "filters": [
                  {
                    "label": "",
                    "type": "domain",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "thebureaufashionweek.com"
                    }
                  },
                  {
                    "label": "",
                    "type": "pagePath",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "/new-york-fashion-week-tickets-september-2025"
                    }
                  }
                ],
                "description": ""
              }
            ],
            "blockingTriggersComparer": "and",
            "blockingTriggers": [
              {
                "htmlElements": [],
                "comparer": "and",
                "filters": [],
                "description": ""
              }
            ]
          },
          "vendorSettings": {
            "google": {
              "googleAdsConversionTriggers": []
            }
          },
          "consentSettings": {
            "analytics": {},
            "marketing": {
              "email": {},
              "sms": {}
            },
            "loyalty": {}
          },
          "activityName": "custom",
          "activityNameCustom": "Ticket Button Click",
          "activityParameters": {
            "contentName": "{{locatorElement.innerText}}"
          },
          "id": "640eeb31-dda0-4de8-aacb-3e9c867d7919",
          "description": "Sept_12_4.00pm_buy-tickets"
        },
        {
          "triggerSettings": {
            "schemaVersion": 2,
            "firingTriggersComparer": "and",
            "firingTriggers": [
              {
                "htmlElements": [
                  {
                    "locator": {
                      "elementTypes": [
                        "A"
                      ],
                      "innerTextMatch": {
                        "operator": "equals",
                        "matchValue": "September 12th Fashion Show  6:00PM\nBuy Tickets"
                      },
                      "linkUrlMatch": {
                        "operator": "startsWith",
                        "matchValue": "https://thebureaufashionweek.flicket.io/e160c549-c3b9-4c9b-b58e-436505fbbd79/releases/friday-600pm"
                      }
                    },
                    "eventTypes": [
                      "click"
                    ]
                  }
                ],
                "comparer": "and",
                "filters": [
                  {
                    "label": "",
                    "type": "domain",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "thebureaufashionweek.com"
                    }
                  },
                  {
                    "label": "",
                    "type": "pagePath",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "/new-york-fashion-week-tickets-september-2025"
                    }
                  }
                ],
                "description": ""
              }
            ],
            "blockingTriggersComparer": "and",
            "blockingTriggers": [
              {
                "htmlElements": [],
                "comparer": "and",
                "filters": [],
                "description": ""
              }
            ]
          },
          "vendorSettings": {
            "google": {
              "googleAdsConversionTriggers": []
            }
          },
          "consentSettings": {
            "analytics": {},
            "marketing": {
              "email": {},
              "sms": {}
            },
            "loyalty": {}
          },
          "activityName": "custom",
          "activityNameCustom": "Ticket Button Click",
          "activityParameters": {
            "contentName": "{{locatorElement.innerText}}"
          },
          "id": "542c0a93-7fc7-4a5e-ba5c-c3f1bc580fd3",
          "description": "Sept_12_6.00pm_background"
        },
        {
          "triggerSettings": {
            "schemaVersion": 2,
            "firingTriggersComparer": "and",
            "firingTriggers": [
              {
                "htmlElements": [
                  {
                    "locator": {
                      "classNames": [
                        "buy"
                      ],
                      "elementTypes": [
                        "A"
                      ],
                      "innerTextMatch": {
                        "operator": "equals",
                        "matchValue": "September 12th Fashion Show  6:00PM\nBuy Tickets"
                      },
                      "linkUrlMatch": {
                        "operator": "startsWith",
                        "matchValue": "https://thebureaufashionweek.flicket.io/e160c549-c3b9-4c9b-b58e-436505fbbd79/releases/friday-600pm"
                      }
                    },
                    "eventTypes": [
                      "click"
                    ]
                  }
                ],
                "comparer": "and",
                "filters": [
                  {
                    "label": "",
                    "type": "domain",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "thebureaufashionweek.com"
                    }
                  },
                  {
                    "label": "",
                    "type": "pagePath",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "/new-york-fashion-week-tickets-september-2025"
                    }
                  }
                ],
                "description": ""
              }
            ],
            "blockingTriggersComparer": "and",
            "blockingTriggers": [
              {
                "htmlElements": [],
                "comparer": "and",
                "filters": [],
                "description": ""
              }
            ]
          },
          "vendorSettings": {
            "google": {
              "googleAdsConversionTriggers": []
            }
          },
          "consentSettings": {
            "analytics": {},
            "marketing": {
              "email": {},
              "sms": {}
            },
            "loyalty": {}
          },
          "activityName": "custom",
          "activityNameCustom": "Ticket Button Click",
          "activityParameters": {
            "contentName": "{{locatorElement.innerText}}"
          },
          "id": "a656e310-9012-4f7c-96ff-7f21dceac679",
          "description": "Sept_12_6.00pm_buy-tickets"
        },
        {
          "triggerSettings": {
            "schemaVersion": 2,
            "firingTriggersComparer": "and",
            "firingTriggers": [
              {
                "htmlElements": [
                  {
                    "locator": {
                      "elementTypes": [
                        "A"
                      ],
                      "innerTextMatch": {
                        "operator": "equals",
                        "matchValue": "September 12th Fashion Show  8:30PM\nBuy Tickets"
                      },
                      "linkUrlMatch": {
                        "operator": "startsWith",
                        "matchValue": "https://thebureaufashionweek.flicket.io/e160c549-c3b9-4c9b-b58e-436505fbbd79/releases/Friday%208%3A30PM"
                      }
                    },
                    "eventTypes": [
                      "click"
                    ]
                  }
                ],
                "comparer": "and",
                "filters": [
                  {
                    "label": "",
                    "type": "domain",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "thebureaufashionweek.com"
                    }
                  },
                  {
                    "label": "",
                    "type": "pagePath",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "/new-york-fashion-week-tickets-september-2025"
                    }
                  }
                ],
                "description": ""
              }
            ],
            "blockingTriggersComparer": "and",
            "blockingTriggers": [
              {
                "htmlElements": [],
                "comparer": "and",
                "filters": [],
                "description": ""
              }
            ]
          },
          "vendorSettings": {
            "google": {
              "googleAdsConversionTriggers": []
            }
          },
          "consentSettings": {
            "analytics": {},
            "marketing": {
              "email": {},
              "sms": {}
            },
            "loyalty": {}
          },
          "activityName": "custom",
          "activityNameCustom": "Ticket Button Click",
          "activityParameters": {
            "contentName": "{{locatorElement.innerText}}"
          },
          "id": "3cae67b7-7c18-4c2a-b18c-a6c5aaccf967",
          "description": "Sept_12_8.30pm_background"
        },
        {
          "triggerSettings": {
            "schemaVersion": 2,
            "firingTriggersComparer": "and",
            "firingTriggers": [
              {
                "htmlElements": [
                  {
                    "locator": {
                      "elementTypes": [
                        "A"
                      ],
                      "innerTextMatch": {
                        "operator": "equals",
                        "matchValue": "September 12th Fashion Show  8:30PM\nBuy Tickets"
                      },
                      "linkUrlMatch": {
                        "operator": "startsWith",
                        "matchValue": "https://thebureaufashionweek.flicket.io/e160c549-c3b9-4c9b-b58e-436505fbbd79/releases/Friday%208%3A30PM"
                      }
                    },
                    "eventTypes": [
                      "click"
                    ]
                  }
                ],
                "comparer": "and",
                "filters": [
                  {
                    "label": "",
                    "type": "domain",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "thebureaufashionweek.com"
                    }
                  },
                  {
                    "label": "",
                    "type": "pagePath",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "/new-york-fashion-week-tickets-september-2025"
                    }
                  }
                ],
                "description": ""
              }
            ],
            "blockingTriggersComparer": "and",
            "blockingTriggers": [
              {
                "htmlElements": [],
                "comparer": "and",
                "filters": [],
                "description": ""
              }
            ]
          },
          "vendorSettings": {
            "google": {
              "googleAdsConversionTriggers": []
            }
          },
          "consentSettings": {
            "analytics": {},
            "marketing": {
              "email": {},
              "sms": {}
            },
            "loyalty": {}
          },
          "activityName": "custom",
          "activityNameCustom": "Ticket Button Click",
          "activityParameters": {
            "contentName": "{{locatorElement.innerText}}"
          },
          "id": "737aa013-7781-41cf-9f72-24f1ae9aac17",
          "description": "Sept_12_8.30pm_buy-tickets"
        },
        {
          "triggerSettings": {
            "schemaVersion": 2,
            "firingTriggersComparer": "and",
            "firingTriggers": [
              {
                "htmlElements": [
                  {
                    "locator": {
                      "elementTypes": [
                        "A"
                      ],
                      "innerTextMatch": {
                        "operator": "equals",
                        "matchValue": "September 12th  After Party  10:00PM\nBuy Tickets"
                      },
                      "linkUrlMatch": {
                        "operator": "startsWith",
                        "matchValue": "https://thebureaufashionweek.flicket.io/e160c549-c3b9-4c9b-b58e-436505fbbd79/releases/Friday%20After%20Party"
                      }
                    },
                    "eventTypes": [
                      "click"
                    ]
                  }
                ],
                "comparer": "and",
                "filters": [
                  {
                    "label": "",
                    "type": "domain",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "thebureaufashionweek.com"
                    }
                  },
                  {
                    "label": "",
                    "type": "pagePath",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "/new-york-fashion-week-tickets-september-2025"
                    }
                  }
                ],
                "description": ""
              }
            ],
            "blockingTriggersComparer": "and",
            "blockingTriggers": [
              {
                "htmlElements": [],
                "comparer": "and",
                "filters": [],
                "description": ""
              }
            ]
          },
          "vendorSettings": {
            "google": {
              "googleAdsConversionTriggers": []
            }
          },
          "consentSettings": {
            "analytics": {},
            "marketing": {
              "email": {},
              "sms": {}
            },
            "loyalty": {}
          },
          "activityName": "custom",
          "activityNameCustom": "Ticket Button Click",
          "activityParameters": {
            "contentName": "{{locatorElement.innerText}}"
          },
          "id": "ae9fdb2e-48ae-4b48-abb5-7f40ed121c99",
          "description": "Sept_12_after-party_background"
        },
        {
          "triggerSettings": {
            "schemaVersion": 2,
            "firingTriggersComparer": "and",
            "firingTriggers": [
              {
                "htmlElements": [
                  {
                    "locator": {
                      "elementTypes": [
                        "A"
                      ],
                      "innerTextMatch": {
                        "operator": "equals",
                        "matchValue": "September 12th  After Party  10:00PM\nBuy Tickets"
                      },
                      "linkUrlMatch": {
                        "operator": "startsWith",
                        "matchValue": "https://thebureaufashionweek.flicket.io/e160c549-c3b9-4c9b-b58e-436505fbbd79/releases/Friday%20After%20Party"
                      }
                    },
                    "eventTypes": [
                      "click"
                    ]
                  }
                ],
                "comparer": "and",
                "filters": [
                  {
                    "label": "",
                    "type": "domain",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "thebureaufashionweek.com"
                    }
                  },
                  {
                    "label": "",
                    "type": "pagePath",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "/new-york-fashion-week-tickets-september-2025"
                    }
                  }
                ],
                "description": ""
              }
            ],
            "blockingTriggersComparer": "and",
            "blockingTriggers": [
              {
                "htmlElements": [],
                "comparer": "and",
                "filters": [],
                "description": ""
              }
            ]
          },
          "vendorSettings": {
            "google": {
              "googleAdsConversionTriggers": []
            }
          },
          "consentSettings": {
            "analytics": {},
            "marketing": {
              "email": {},
              "sms": {}
            },
            "loyalty": {}
          },
          "activityName": "custom",
          "activityNameCustom": "Ticket Button Click",
          "activityParameters": {
            "contentName": "{{locatorElement.innerText}}"
          },
          "id": "c6395d27-5d41-4ce3-9c55-049a43ff9898",
          "description": "Sept_12_after-party_buy-tickets"
        },
        {
          "triggerSettings": {
            "schemaVersion": 2,
            "firingTriggersComparer": "and",
            "firingTriggers": [
              {
                "htmlElements": [
                  {
                    "locator": {
                      "elementTypes": [
                        "A"
                      ],
                      "innerTextMatch": {
                        "operator": "equals",
                        "matchValue": "September 13th Fashion Show  12:00PM\nBuy Tickets"
                      },
                      "linkUrlMatch": {
                        "operator": "startsWith",
                        "matchValue": "https://thebureaufashionweek.flicket.io/e160c549-c3b9-4c9b-b58e-436505fbbd79/releases/Saturday%2012%3A00PM"
                      }
                    },
                    "eventTypes": [
                      "click"
                    ]
                  }
                ],
                "comparer": "and",
                "filters": [
                  {
                    "label": "",
                    "type": "domain",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "thebureaufashionweek.com"
                    }
                  },
                  {
                    "label": "",
                    "type": "pagePath",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "/new-york-fashion-week-tickets-september-2025"
                    }
                  }
                ],
                "description": ""
              }
            ],
            "blockingTriggersComparer": "and",
            "blockingTriggers": [
              {
                "htmlElements": [],
                "comparer": "and",
                "filters": [],
                "description": ""
              }
            ]
          },
          "vendorSettings": {
            "google": {
              "googleAdsConversionTriggers": []
            }
          },
          "consentSettings": {
            "analytics": {},
            "marketing": {
              "email": {},
              "sms": {}
            },
            "loyalty": {}
          },
          "activityName": "custom",
          "activityNameCustom": "Ticket Button Click",
          "activityParameters": {
            "contentName": "{{locatorElement.innerText}}"
          },
          "id": "ce6a0732-0713-4385-83aa-187092551570",
          "description": "Sept_13_12pm_background"
        },
        {
          "triggerSettings": {
            "schemaVersion": 2,
            "firingTriggersComparer": "and",
            "firingTriggers": [
              {
                "htmlElements": [
                  {
                    "locator": {
                      "elementTypes": [
                        "A"
                      ],
                      "innerTextMatch": {
                        "operator": "equals",
                        "matchValue": "September 13th Fashion Show  12:00PM\nBuy Tickets"
                      },
                      "linkUrlMatch": {
                        "operator": "startsWith",
                        "matchValue": "https://thebureaufashionweek.flicket.io/e160c549-c3b9-4c9b-b58e-436505fbbd79/releases/Saturday%2012%3A00PM"
                      }
                    },
                    "eventTypes": [
                      "click"
                    ]
                  }
                ],
                "comparer": "and",
                "filters": [
                  {
                    "label": "",
                    "type": "domain",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "thebureaufashionweek.com"
                    }
                  },
                  {
                    "label": "",
                    "type": "pagePath",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "/new-york-fashion-week-tickets-september-2025"
                    }
                  }
                ],
                "description": ""
              }
            ],
            "blockingTriggersComparer": "and",
            "blockingTriggers": [
              {
                "htmlElements": [],
                "comparer": "and",
                "filters": [],
                "description": ""
              }
            ]
          },
          "vendorSettings": {
            "google": {
              "googleAdsConversionTriggers": []
            }
          },
          "consentSettings": {
            "analytics": {},
            "marketing": {
              "email": {},
              "sms": {}
            },
            "loyalty": {}
          },
          "activityName": "custom",
          "activityNameCustom": "Ticket Button Click",
          "activityParameters": {
            "contentName": "{{locatorElement.innerText}}"
          },
          "id": "2192379d-7083-438d-ba56-a494a326776a",
          "description": "Sept_13_12pm_buy-tickets"
        }
      ]
    },
    "identity": {
      "userSessionTimeoutSeconds": 1800
    }
  },
  "processing": {
    "publishToVendorsTimeoutSeconds": 600,
    "contentIdentificationBehavior": "default"
  },
  "browserSdkVersion": "latest"
},
                    "runtime": { "client": {"ver":"2.3.2","type":"wordpress"} }
                }
            ]);