@letscooee/web-sdk 9.12.10 → 9.12.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.min.js +1 -1
- package/dist/widget.min.js +20 -20
- package/package.json +1 -1
package/dist/widget.min.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import{$ as
|
|
1
|
+
import{$ as ji,$a as Ms,A as Al,Aa as Se,B as vt,Ba as Ns,C as $n,Ca as ze,D as en,Da as Me,E as Dl,Ea as q,F as Z,Fa as Sn,G as Ui,Ga as Yn,H as Ne,Ha as zn,I as Re,Ia as Kn,J as Vt,Ja as nn,K as Gn,Ka as Ae,L as ti,La as ln,M as Rt,Ma as Tt,N as Nl,Na as gt,O as at,Oa as yt,P as Mt,Pa as Ke,Q as Rl,Qa as Wi,R as Hi,Ra as Vl,S as Ct,Sa as Bl,T as Wt,Ta as Ze,U as Ml,Ua as rt,V as Pl,Va as Ul,W as Ll,Wa as Hl,X as hr,Xa as jl,Y as Pt,Ya as Xn,Z as ct,Za as Rs,_ as B,_a as Yi,a as O,aa as xs,ab as $l,b as we,ba as mr,bb as It,c as Qr,ca as Os,cb as Gl,d as ml,da as tn,db as Ln,e as Ss,ea as As,eb as Wl,f as ki,fa as Ds,fb as Yl,g as gl,ga as Le,h as Ts,ha as Wn,hb as zl,i as ei,ia as gr,ib as Kl,j as _l,ja as $i,jb as Fn,k as mt,ka as St,kb as Xl,l as vl,lb as zi,m as yl,ma as Oe,mb as Tn,n as El,na as Gi,nb as ql,o as bl,oa as Cn,ob as Zl,p as Vi,pa as pe,pb as Ki,q as Is,qa as ni,qb as In,r as wl,ra as ri,rb as ii,s as Cl,sa as Fl,sb as rn,t as Bi,ta as kl,tb as oi,u as Sl,ua as Te,ub as Jl,v as Tl,va as cn,vb as Ql,w as Il,wa as tt,wb as Ps,x as xl,xa as nt,xb as Xi,y as Ol,ya as W,yb as Ls,z as pr,za as z,zb as eu}from"./chunk-EHNBTJQP.js";var iu=Ss((ru,qi)=>{"use strict";(function(t){"use strict";var e={};e.VERSION="1.6.1";var n,r={},i=function(d,g){return function(){return g.apply(d,arguments)}},o=function(){var d=arguments,g=d[0],p,E;for(E=1;E<d.length;E++)for(p in d[E])!(p in g)&&d[E].hasOwnProperty(p)&&(g[p]=d[E][p]);return g},s=function(d,g){return{value:d,name:g}};e.TRACE=s(1,"TRACE"),e.DEBUG=s(2,"DEBUG"),e.INFO=s(3,"INFO"),e.TIME=s(4,"TIME"),e.WARN=s(5,"WARN"),e.ERROR=s(8,"ERROR"),e.OFF=s(99,"OFF");var c=function(d){this.context=d,this.setLevel(d.filterLevel),this.log=this.info};c.prototype={setLevel:function(d){d&&"value"in d&&(this.context.filterLevel=d)},getLevel:function(){return this.context.filterLevel},enabledFor:function(d){var g=this.context.filterLevel;return d.value>=g.value},trace:function(){this.invoke(e.TRACE,arguments)},debug:function(){this.invoke(e.DEBUG,arguments)},info:function(){this.invoke(e.INFO,arguments)},warn:function(){this.invoke(e.WARN,arguments)},error:function(){this.invoke(e.ERROR,arguments)},time:function(d){typeof d=="string"&&d.length>0&&this.invoke(e.TIME,[d,"start"])},timeEnd:function(d){typeof d=="string"&&d.length>0&&this.invoke(e.TIME,[d,"end"])},invoke:function(d,g){n&&this.enabledFor(d)&&n(g,o({level:d},this.context))}};var u=new c({filterLevel:e.OFF});(function(){var d=e;d.enabledFor=i(u,u.enabledFor),d.trace=i(u,u.trace),d.debug=i(u,u.debug),d.time=i(u,u.time),d.timeEnd=i(u,u.timeEnd),d.info=i(u,u.info),d.warn=i(u,u.warn),d.error=i(u,u.error),d.log=d.info})(),e.setHandler=function(d){n=d},e.setLevel=function(d){u.setLevel(d);for(var g in r)r.hasOwnProperty(g)&&r[g].setLevel(d)},e.getLevel=function(){return u.getLevel()},e.get=function(d){return r[d]||(r[d]=new c(o({name:d},u.context)))},e.createDefaultHandler=function(d){d=d||{},d.formatter=d.formatter||function(w,N){N.name&&w.unshift("["+N.name+"]")};var g={},p=function(E,w){Function.prototype.apply.call(E,console,w)};return typeof console>"u"?function(){}:function(E,w){E=Array.prototype.slice.call(E);var N=console.log,M;w.level===e.TIME?(M=(w.name?"["+w.name+"] ":"")+E[0],E[1]==="start"?console.time?console.time(M):g[M]=new Date().getTime():console.timeEnd?console.timeEnd(M):p(N,[M+": "+(new Date().getTime()-g[M])+"ms"])):(w.level===e.WARN&&console.warn?N=console.warn:w.level===e.ERROR&&console.error?N=console.error:w.level===e.INFO&&console.info?N=console.info:w.level===e.DEBUG&&console.debug?N=console.debug:w.level===e.TRACE&&console.trace&&(N=console.trace),d.formatter(E,w),p(N,E))}},e.useDefaults=function(d){e.setLevel(d&&d.defaultLevel||e.DEBUG),e.setHandler(e.createDefaultHandler(d))},e.setDefaults=e.useDefaults,typeof define=="function"&&define.amd?define(e):typeof qi<"u"&&qi.exports?qi.exports=e:(e._prevLogger=t.Logger,e.noConflict=function(){return t.Logger=e._prevLogger,e},t.Logger=e)})(ru)});var Us=Ss((Zi,su)=>{"use strict";(function(t,e){typeof Zi=="object"&&typeof su<"u"?e(Zi):typeof define=="function"&&define.amd?define(["exports"],e):e((t=typeof globalThis<"u"?globalThis:t||self).Sqrl={})})(Zi,function(t){"use strict";function e(A){var x,F,P=new Error(A);return x=P,F=e.prototype,Object.setPrototypeOf?Object.setPrototypeOf(x,F):x.__proto__=F,P}function n(A,x,F){var P=x.slice(0,F).split(/\n/),v=P.length,y=P[v-1].length+1;throw e(A+=" at line "+v+" col "+y+`:
|
|
2
2
|
|
|
3
3
|
`+x.split(/\n/)[v-1]+`
|
|
4
4
|
`+Array(y).join(" ")+"^")}e.prototype=Object.create(Error.prototype,{name:{value:"Squirrelly Error",enumerable:!1}});var r=new Function("return this")().Promise,i=!1;try{i=new Function("return (async function(){}).constructor")()}catch(A){if(!(A instanceof SyntaxError))throw A}function o(A,x){return Object.prototype.hasOwnProperty.call(A,x)}function s(A,x,F){for(var P in x)o(x,P)&&(x[P]==null||typeof x[P]!="object"||P!=="storage"&&P!=="prefixes"||F?A[P]=x[P]:A[P]=s({},x[P]));return A}var c=/^async +/,u=/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})*}|(?!\${)[^\\`])*`/g,d=/'(?:\\[\s\w"'\\`]|[^\n\r'\\])*?'/g,g=/"(?:\\[\s\w"'\\`]|[^\n\r"\\])*?"/g,p=/[.*+\-?^${}()|[\]\\]/g;function E(A){return p.test(A)?A.replace(p,"\\$&"):A}function w(A,x){x.rmWhitespace&&(A=A.replace(/[\r\n]+/g,`
|
|
5
|
-
`).replace(/^\s+|\s+$/gm,"")),u.lastIndex=0,d.lastIndex=0,g.lastIndex=0;var F=x.prefixes,P=[F.h,F.b,F.i,F.r,F.c,F.e].reduce(function(ae,ee){return ae&&ee?ae+"|"+E(ee):ee?E(ee):ae},""),v=new RegExp("([|()]|=>)|('|\"|`|\\/\\*)|\\s*((\\/)?(-|_)?"+E(x.tags[1])+")","g"),y=new RegExp("([^]*?)"+E(x.tags[0])+"(-|_)?\\s*("+P+")?\\s*","g"),H=0,J=!1;function re(ae,ee){var fe,ce={f:[]},
|
|
6
|
-
`)}}return v}var
|
|
5
|
+
`).replace(/^\s+|\s+$/gm,"")),u.lastIndex=0,d.lastIndex=0,g.lastIndex=0;var F=x.prefixes,P=[F.h,F.b,F.i,F.r,F.c,F.e].reduce(function(ae,ee){return ae&&ee?ae+"|"+E(ee):ee?E(ee):ae},""),v=new RegExp("([|()]|=>)|('|\"|`|\\/\\*)|\\s*((\\/)?(-|_)?"+E(x.tags[1])+")","g"),y=new RegExp("([^]*?)"+E(x.tags[0])+"(-|_)?\\s*("+P+")?\\s*","g"),H=0,J=!1;function re(ae,ee){var fe,ce={f:[]},me=0,ge="c";function _e(ve){var Ie=A.slice(H,ve),be=Ie.trim();if(ge==="f")be==="safe"?ce.raw=!0:x.async&&c.test(be)?(be=be.replace(c,""),ce.f.push([be,"",!0])):ce.f.push([be,""]);else if(ge==="fp")ce.f[ce.f.length-1][1]+=be;else if(ge==="err"){if(be){var Ve=Ie.search(/\S/);n("invalid syntax",A,H+Ve)}}else ce[ge]=be;H=ve+1}for(ee==="h"||ee==="b"||ee==="c"?ge="n":ee==="r"&&(ce.raw=!0,ee="i"),v.lastIndex=H;(fe=v.exec(A))!==null;){var h=fe[1],a=fe[2],l=fe[3],_=fe[4],T=fe[5],D=fe.index;if(h)h==="("?(me===0&&(ge==="n"?(_e(D),ge="p"):ge==="f"&&(_e(D),ge="fp")),me++):h===")"?--me===0&&ge!=="c"&&(_e(D),ge="err"):me===0&&h==="|"?(_e(D),ge="f"):h==="=>"&&(_e(D),H+=1,ge="res");else if(a)if(a==="/*"){var k=A.indexOf("*/",v.lastIndex);k===-1&&n("unclosed comment",A,fe.index),v.lastIndex=k+2}else a==="'"?(d.lastIndex=fe.index,d.exec(A)?v.lastIndex=d.lastIndex:n("unclosed string",A,fe.index)):a==='"'?(g.lastIndex=fe.index,g.exec(A)?v.lastIndex=g.lastIndex:n("unclosed string",A,fe.index)):a==="`"&&(u.lastIndex=fe.index,u.exec(A)?v.lastIndex=u.lastIndex:n("unclosed string",A,fe.index));else if(l)return _e(D),H=D+fe[0].length,y.lastIndex=H,J=T,_&&ee==="h"&&(ee="s"),ce.t=ee,ce}return n("unclosed tag",A,ae),ce}var oe=function ae(ee,fe){ee.b=[],ee.d=[];var ce,me=!1,ge=[];function _e(Ve,Be){Ve&&(Ve=function(qe,Ft,$t,wn){var wt,kt;return typeof Ft.autoTrim=="string"?wt=kt=Ft.autoTrim:Array.isArray(Ft.autoTrim)&&(wt=Ft.autoTrim[1],kt=Ft.autoTrim[0]),($t||$t===!1)&&(wt=$t),(wn||wn===!1)&&(kt=wn),wt==="slurp"&&kt==="slurp"?qe.trim():(wt==="_"||wt==="slurp"?qe=String.prototype.trimLeft?qe.trimLeft():qe.replace(/^[\s\uFEFF\xA0]+/,""):wt!=="-"&&wt!=="nl"||(qe=qe.replace(/^(?:\n|\r|\r\n)/,"")),kt==="_"||kt==="slurp"?qe=String.prototype.trimRight?qe.trimRight():qe.replace(/[\s\uFEFF\xA0]+$/,""):kt!=="-"&&kt!=="nl"||(qe=qe.replace(/(?:\n|\r|\r\n)$/,"")),qe)}(Ve,x,J,Be))&&(Ve=Ve.replace(/\\|'/g,"\\$&").replace(/\r\n|\n|\r/g,"\\n"),ge.push(Ve))}for(;(ce=y.exec(A))!==null;){var h,a=ce[1],l=ce[2],_=ce[3]||"";for(var T in F)if(F[T]===_){h=T;break}_e(a,l),H=ce.index+ce[0].length,h||n("unrecognized tag type: "+_,A,H);var D=re(ce.index,h),k=D.t;if(k==="h"){var ve=D.n||"";x.async&&c.test(ve)&&(D.a=!0,D.n=ve.replace(c,"")),D=ae(D),ge.push(D)}else if(k==="c"){if(ee.n===D.n)return me?(me.d=ge,ee.b.push(me)):ee.d=ge,ee;n("Helper start and end don't match",A,ce.index+ce[0].length)}else if(k==="b"){me?(me.d=ge,ee.b.push(me)):ee.d=ge;var Ie=D.n||"";x.async&&c.test(Ie)&&(D.a=!0,D.n=Ie.replace(c,"")),me=D,ge=[]}else if(k==="s"){var be=D.n||"";x.async&&c.test(be)&&(D.a=!0,D.n=be.replace(c,"")),ge.push(D)}else ge.push(D)}if(!fe)throw e('unclosed helper "'+ee.n+'"');return _e(A.slice(H,A.length),!1),ee.d=ge,ee}({f:[]},!0);if(x.plugins)for(var ue=0;ue<x.plugins.length;ue++){var Q=x.plugins[ue];Q.processAST&&(oe.d=Q.processAST(oe.d,x))}return oe.d}function N(A,x){var F=w(A,x),P="var tR='';"+(x.useWith?"with("+x.varName+"||{}){":"")+se(F,x)+"if(cb){cb(null,tR)} return tR"+(x.useWith?"}":"");if(x.plugins)for(var v=0;v<x.plugins.length;v++){var y=x.plugins[v];y.processFnString&&(P=y.processFnString(P,x))}return P}function M(A,x){for(var F=0;F<x.length;F++){var P=x[F][0],v=x[F][1];A=(x[F][2]?"await ":"")+"c.l('F','"+P+"')("+A,v&&(A+=","+v),A+=")"}return A}function L(A,x,F,P,v,y){var H="{exec:"+(v?"async ":"")+K(F,x,A)+",params:["+P+"]";return y&&(H+=",name:'"+y+"'"),v&&(H+=",async:true"),H+="}"}function j(A,x){for(var F="[",P=0;P<A.length;P++){var v=A[P];F+=L(x,v.res||"",v.d,v.p||"",v.a,v.n),P<A.length&&(F+=",")}return F+="]"}function K(A,x,F){return"function("+x+"){var tR='';"+se(A,F)+"return tR}"}function se(A,x){for(var F=0,P=A.length,v="";F<P;F++){var y=A[F];if(typeof y=="string")v+="tR+='"+y+"';";else{var H=y.t,J=y.c||"",re=y.f,oe=y.n||"",ue=y.p||"",Q=y.res||"",ae=y.b,ee=!!y.a;if(H==="i"){x.defaultFilter&&(J="c.l('F','"+x.defaultFilter+"')("+J+")");var fe=M(J,re);!y.raw&&x.autoEscape&&(fe="c.l('F','e')("+fe+")"),v+="tR+="+fe+";"}else if(H==="h")if(x.storage.nativeHelpers.get(oe))v+=x.storage.nativeHelpers.get(oe)(y,x);else{var ce=(ee?"await ":"")+"c.l('H','"+oe+"')("+L(x,Q,y.d,ue,ee);ce+=ae?","+j(ae,x):",[]",v+="tR+="+M(ce+=",c)",re)+";"}else H==="s"?v+="tR+="+M((ee?"await ":"")+"c.l('H','"+oe+"')({params:["+ue+"]},[],c)",re)+";":H==="e"&&(v+=J+`
|
|
6
|
+
`)}}return v}var X=function(){function A(x){this.cache=x}return A.prototype.define=function(x,F){this.cache[x]=F},A.prototype.get=function(x){return this.cache[x]},A.prototype.remove=function(x){delete this.cache[x]},A.prototype.reset=function(){this.cache={}},A.prototype.load=function(x){s(this.cache,x,!0)},A}();function Ee(A,x,F,P){if(x&&x.length>0)throw e((P?"Native":"")+"Helper '"+A+"' doesn't accept blocks");if(F&&F.length>0)throw e((P?"Native":"")+"Helper '"+A+"' doesn't accept filters")}var U={"&":"&","<":"<",">":">",'"':""","'":"'"};function he(A){return U[A]}var te=new X({}),ye=new X({each:function(A,x){var F="",P=A.params[0];if(Ee("each",x,!1),A.async)return new Promise(function(y){(function H(J,re,oe,ue,Q){oe(J[re],re).then(function(ae){ue+=ae,re===J.length-1?Q(ue):H(J,re+1,oe,ue,Q)})})(P,0,A.exec,F,y)});for(var v=0;v<P.length;v++)F+=A.exec(P[v],v);return F},foreach:function(A,x){var F=A.params[0];if(Ee("foreach",x,!1),A.async)return new Promise(function(y){(function H(J,re,oe,ue,Q,ae){ue(re[oe],J[re[oe]]).then(function(ee){Q+=ee,oe===re.length-1?ae(Q):H(J,re,oe+1,ue,Q,ae)})})(F,Object.keys(F),0,A.exec,"",y)});var P="";for(var v in F)o(F,v)&&(P+=A.exec(v,F[v]));return P},include:function(A,x,F){Ee("include",x,!1);var P=F.storage.templates.get(A.params[0]);if(!P)throw e('Could not fetch template "'+A.params[0]+'"');return P(A.params[1],F)},extends:function(A,x,F){var P=A.params[1]||{};P.content=A.exec();for(var v=0;v<x.length;v++){var y=x[v];P[y.name]=y.exec()}var H=F.storage.templates.get(A.params[0]);if(!H)throw e('Could not fetch template "'+A.params[0]+'"');return H(P,F)},useScope:function(A,x){return Ee("useScope",x,!1),A.exec(A.params[0])}}),ke=new X({if:function(A,x){Ee("if",!1,A.f,!0);var F="if("+A.p+"){"+se(A.d,x)+"}";if(A.b)for(var P=0;P<A.b.length;P++){var v=A.b[P];v.n==="else"?F+="else{"+se(v.d,x)+"}":v.n==="elif"&&(F+="else if("+v.p+"){"+se(v.d,x)+"}")}return F},try:function(A,x){if(Ee("try",!1,A.f,!0),!A.b||A.b.length!==1||A.b[0].n!=="catch")throw e("native helper 'try' only accepts 1 block, 'catch'");var F="try{"+se(A.d,x)+"}",P=A.b[0];return F+="catch"+(P.res?"("+P.res+")":"")+"{"+se(P.d,x)+"}"},block:function(A,x){return Ee("block",A.b,A.f,!0),"if(!"+x.varName+"["+A.p+"]){tR+=("+K(A.d,"",x)+")()}else{tR+="+x.varName+"["+A.p+"]}"}}),De=new X({e:function(A){var x=String(A);return/[&<>"']/.test(x)?x.replace(/[&<>"']/g,he):x}}),Pe={varName:"it",autoTrim:[!1,"nl"],autoEscape:!0,defaultFilter:!1,tags:["{{","}}"],l:function(A,x){if(A==="H"){var F=this.storage.helpers.get(x);if(F)return F;throw e("Can't find helper '"+x+"'")}if(A==="F"){var P=this.storage.filters.get(x);if(P)return P;throw e("Can't find filter '"+x+"'")}},async:!1,storage:{helpers:ye,nativeHelpers:ke,filters:De,templates:te},prefixes:{h:"@",b:"#",i:"",r:"*",c:"/",e:"!"},cache:!1,plugins:[],useWith:!1};function Ge(A,x){var F={};return s(F,Pe),x&&s(F,x),A&&s(F,A),F.l.bind(F),F}function Ye(A,x){var F,P=Ge(x||{}),v=Function;if(P.async){if(!i)throw e("This environment doesn't support async/await");v=i}if(P.varName&&(F=P.varName,/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(F)===!1))throw e("options.varName must be a valid JS identifier");try{return new v(P.varName,"c","cb",N(A,P))}catch(y){throw y instanceof SyntaxError?e(`Bad template syntax
|
|
7
7
|
|
|
8
8
|
`+y.message+`
|
|
9
9
|
`+Array(y.message.length+1).join("=")+`
|
|
10
|
-
`+N(A,P)):y}}function ht(A,x){var F;return x.cache&&x.name&&x.storage.templates.get(x.name)?x.storage.templates.get(x.name):(F=typeof A=="function"?A:ze(A,x),x.cache&&x.name&&x.storage.templates.define(x.name,F),F)}Pe.l.bind(Pe),t.compile=ze,t.compileScope=se,t.compileScopeIntoFunction=X,t.compileToString=N,t.defaultConfig=Pe,t.filters=De,t.getConfig=Ge,t.helpers=ye,t.nativeHelpers=ke,t.parse=w,t.render=function(A,x,F,P){var v=Ge(F||{});if(!v.async)return ht(A,v)(x,v);if(!P){if(typeof r=="function")return new r(function(y,H){try{y(ht(A,v)(x,v))}catch(J){H(J)}});throw e("Please provide a callback function, this env doesn't support Promises")}try{ht(A,v)(x,v,P)}catch(y){return P(y)}},t.templates=te,Object.defineProperty(t,"__esModule",{value:!0})})});var rf=Ss((nf,ic)=>{"use strict";(function(t){if(typeof nf=="object"&&typeof ic<"u")ic.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var e;typeof window<"u"?e=window:typeof global<"u"?e=global:typeof self<"u"?e=self:e=this,e.localforage=t()}})(function(){var t,e,n;return function r(i,o,s){function c(g,p){if(!o[g]){if(!i[g]){var E=typeof Qr=="function"&&Qr;if(!p&&E)return E(g,!0);if(u)return u(g,!0);var w=new Error("Cannot find module '"+g+"'");throw w.code="MODULE_NOT_FOUND",w}var N=o[g]={exports:{}};i[g][0].call(N.exports,function(M){var L=i[g][1][M];return c(L||M)},N,N.exports,r,i,o,s)}return o[g].exports}for(var u=typeof Qr=="function"&&Qr,d=0;d<s.length;d++)c(s[d]);return c}({1:[function(r,i,o){(function(s){"use strict";var c=s.MutationObserver||s.WebKitMutationObserver,u;if(c){var d=0,g=new c(M),p=s.document.createTextNode("");g.observe(p,{characterData:!0}),u=function(){p.data=d=++d%2}}else if(!s.setImmediate&&typeof s.MessageChannel<"u"){var E=new s.MessageChannel;E.port1.onmessage=M,u=function(){E.port2.postMessage(0)}}else"document"in s&&"onreadystatechange"in s.document.createElement("script")?u=function(){var j=s.document.createElement("script");j.onreadystatechange=function(){M(),j.onreadystatechange=null,j.parentNode.removeChild(j),j=null},s.document.documentElement.appendChild(j)}:u=function(){setTimeout(M,0)};var w,N=[];function M(){w=!0;for(var j,X,se=N.length;se;){for(X=N,N=[],j=-1;++j<se;)X[j]();se=N.length}w=!1}i.exports=L;function L(j){N.push(j)===1&&!w&&u()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(r,i,o){"use strict";var s=r(1);function c(){}var u={},d=["REJECTED"],g=["FULFILLED"],p=["PENDING"];i.exports=E;function E(U){if(typeof U!="function")throw new TypeError("resolver must be a function");this.state=p,this.queue=[],this.outcome=void 0,U!==c&&L(this,U)}E.prototype.catch=function(U){return this.then(null,U)},E.prototype.then=function(U,pe){if(typeof U!="function"&&this.state===g||typeof pe!="function"&&this.state===d)return this;var te=new this.constructor(c);if(this.state!==p){var ye=this.state===g?U:pe;N(te,ye,this.outcome)}else this.queue.push(new w(te,U,pe));return te};function w(U,pe,te){this.promise=U,typeof pe=="function"&&(this.onFulfilled=pe,this.callFulfilled=this.otherCallFulfilled),typeof te=="function"&&(this.onRejected=te,this.callRejected=this.otherCallRejected)}w.prototype.callFulfilled=function(U){u.resolve(this.promise,U)},w.prototype.otherCallFulfilled=function(U){N(this.promise,this.onFulfilled,U)},w.prototype.callRejected=function(U){u.reject(this.promise,U)},w.prototype.otherCallRejected=function(U){N(this.promise,this.onRejected,U)};function N(U,pe,te){s(function(){var ye;try{ye=pe(te)}catch(ke){return u.reject(U,ke)}ye===U?u.reject(U,new TypeError("Cannot resolve promise with itself")):u.resolve(U,ye)})}u.resolve=function(U,pe){var te=j(M,pe);if(te.status==="error")return u.reject(U,te.value);var ye=te.value;if(ye)L(U,ye);else{U.state=g,U.outcome=pe;for(var ke=-1,De=U.queue.length;++ke<De;)U.queue[ke].callFulfilled(pe)}return U},u.reject=function(U,pe){U.state=d,U.outcome=pe;for(var te=-1,ye=U.queue.length;++te<ye;)U.queue[te].callRejected(pe);return U};function M(U){var pe=U&&U.then;if(U&&(typeof U=="object"||typeof U=="function")&&typeof pe=="function")return function(){pe.apply(U,arguments)}}function L(U,pe){var te=!1;function ye(Ge){te||(te=!0,u.reject(U,Ge))}function ke(Ge){te||(te=!0,u.resolve(U,Ge))}function De(){pe(ke,ye)}var Pe=j(De);Pe.status==="error"&&ye(Pe.value)}function j(U,pe){var te={};try{te.value=U(pe),te.status="success"}catch(ye){te.status="error",te.value=ye}return te}E.resolve=X;function X(U){return U instanceof this?U:u.resolve(new this(c),U)}E.reject=se;function se(U){var pe=new this(c);return u.reject(pe,U)}E.all=q;function q(U){var pe=this;if(Object.prototype.toString.call(U)!=="[object Array]")return this.reject(new TypeError("must be an array"));var te=U.length,ye=!1;if(!te)return this.resolve([]);for(var ke=new Array(te),De=0,Pe=-1,Ge=new this(c);++Pe<te;)ze(U[Pe],Pe);return Ge;function ze(ht,A){pe.resolve(ht).then(x,function(F){ye||(ye=!0,u.reject(Ge,F))});function x(F){ke[A]=F,++De===te&&!ye&&(ye=!0,u.resolve(Ge,ke))}}}E.race=Ee;function Ee(U){var pe=this;if(Object.prototype.toString.call(U)!=="[object Array]")return this.reject(new TypeError("must be an array"));var te=U.length,ye=!1;if(!te)return this.resolve([]);for(var ke=-1,De=new this(c);++ke<te;)Pe(U[ke]);return De;function Pe(Ge){pe.resolve(Ge).then(function(ze){ye||(ye=!0,u.resolve(De,ze))},function(ze){ye||(ye=!0,u.reject(De,ze))})}}},{1:1}],3:[function(r,i,o){(function(s){"use strict";typeof s.Promise!="function"&&(s.Promise=r(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(r,i,o){"use strict";var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f};function c(f,b){if(!(f instanceof b))throw new TypeError("Cannot call a class as a function")}function u(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var d=u();function g(){try{if(!d||!d.open)return!1;var f=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),b=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!f||b)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function p(f,b){f=f||[],b=b||{};try{return new Blob(f,b)}catch(C){if(C.name!=="TypeError")throw C;for(var m=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,S=new m,I=0;I<f.length;I+=1)S.append(f[I]);return S.getBlob(b.type)}}typeof Promise>"u"&&r(3);var E=Promise;function w(f,b){b&&f.then(function(m){b(null,m)},function(m){b(m)})}function N(f,b,m){typeof b=="function"&&f.then(b),typeof m=="function"&&f.catch(m)}function M(f){return typeof f!="string"&&(console.warn(f+" used as a key, but it is not a string."),f=String(f)),f}function L(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var j="local-forage-detect-blob-support",X=void 0,se={},q=Object.prototype.toString,Ee="readonly",U="readwrite";function pe(f){for(var b=f.length,m=new ArrayBuffer(b),S=new Uint8Array(m),I=0;I<b;I++)S[I]=f.charCodeAt(I);return m}function te(f){return new E(function(b){var m=f.transaction(j,U),S=p([""]);m.objectStore(j).put(S,"key"),m.onabort=function(I){I.preventDefault(),I.stopPropagation(),b(!1)},m.oncomplete=function(){var I=navigator.userAgent.match(/Chrome\/(\d+)/),C=navigator.userAgent.match(/Edge\//);b(C||!I||parseInt(I[1],10)>=43)}}).catch(function(){return!1})}function ye(f){return typeof X=="boolean"?E.resolve(X):te(f).then(function(b){return X=b,X})}function ke(f){var b=se[f.name],m={};m.promise=new E(function(S,I){m.resolve=S,m.reject=I}),b.deferredOperations.push(m),b.dbReady?b.dbReady=b.dbReady.then(function(){return m.promise}):b.dbReady=m.promise}function De(f){var b=se[f.name],m=b.deferredOperations.pop();if(m)return m.resolve(),m.promise}function Pe(f,b){var m=se[f.name],S=m.deferredOperations.pop();if(S)return S.reject(b),S.promise}function Ge(f,b){return new E(function(m,S){if(se[f.name]=se[f.name]||J(),f.db)if(b)ke(f),f.db.close();else return m(f.db);var I=[f.name];b&&I.push(f.version);var C=d.open.apply(d,I);b&&(C.onupgradeneeded=function(R){var B=C.result;try{B.createObjectStore(f.storeName),R.oldVersion<=1&&B.createObjectStore(j)}catch($){if($.name==="ConstraintError")console.warn('The database "'+f.name+'" has been upgraded from version '+R.oldVersion+" to version "+R.newVersion+', but the storage "'+f.storeName+'" already exists.');else throw $}}),C.onerror=function(R){R.preventDefault(),S(C.error)},C.onsuccess=function(){var R=C.result;R.onversionchange=function(B){B.target.close()},m(R),De(f)}})}function ze(f){return Ge(f,!1)}function ht(f){return Ge(f,!0)}function A(f,b){if(!f.db)return!0;var m=!f.db.objectStoreNames.contains(f.storeName),S=f.version<f.db.version,I=f.version>f.db.version;if(S&&(f.version!==b&&console.warn('The database "'+f.name+`" can't be downgraded from version `+f.db.version+" to version "+f.version+"."),f.version=f.db.version),I||m){if(m){var C=f.db.version+1;C>f.version&&(f.version=C)}return!0}return!1}function x(f){return new E(function(b,m){var S=new FileReader;S.onerror=m,S.onloadend=function(I){var C=btoa(I.target.result||"");b({__local_forage_encoded_blob:!0,data:C,type:f.type})},S.readAsBinaryString(f)})}function F(f){var b=pe(atob(f.data));return p([b],{type:f.type})}function P(f){return f&&f.__local_forage_encoded_blob}function v(f){var b=this,m=b._initReady().then(function(){var S=se[b._dbInfo.name];if(S&&S.dbReady)return S.dbReady});return N(m,f,f),m}function y(f){ke(f);for(var b=se[f.name],m=b.forages,S=0;S<m.length;S++){var I=m[S];I._dbInfo.db&&(I._dbInfo.db.close(),I._dbInfo.db=null)}return f.db=null,ze(f).then(function(C){return f.db=C,A(f)?ht(f):C}).then(function(C){f.db=b.db=C;for(var R=0;R<m.length;R++)m[R]._dbInfo.db=C}).catch(function(C){throw Pe(f,C),C})}function H(f,b,m,S){S===void 0&&(S=1);try{var I=f.db.transaction(f.storeName,b);m(null,I)}catch(C){if(S>0&&(!f.db||C.name==="InvalidStateError"||C.name==="NotFoundError"))return E.resolve().then(function(){if(!f.db||C.name==="NotFoundError"&&!f.db.objectStoreNames.contains(f.storeName)&&f.version<=f.db.version)return f.db&&(f.version=f.db.version+1),ht(f)}).then(function(){return y(f).then(function(){H(f,b,m,S-1)})}).catch(m);m(C)}}function J(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function re(f){var b=this,m={db:null};if(f)for(var S in f)m[S]=f[S];var I=se[m.name];I||(I=J(),se[m.name]=I),I.forages.push(b),b._initReady||(b._initReady=b.ready,b.ready=v);var C=[];function R(){return E.resolve()}for(var B=0;B<I.forages.length;B++){var $=I.forages[B];$!==b&&C.push($._initReady().catch(R))}var G=I.forages.slice(0);return E.all(C).then(function(){return m.db=I.db,ze(m)}).then(function(Y){return m.db=Y,A(m,b._defaultConfig.version)?ht(m):Y}).then(function(Y){m.db=I.db=Y,b._dbInfo=m;for(var ie=0;ie<G.length;ie++){var xe=G[ie];xe!==b&&(xe._dbInfo.db=m.db,xe._dbInfo.version=m.version)}})}function oe(f,b){var m=this;f=M(f);var S=new E(function(I,C){m.ready().then(function(){H(m._dbInfo,Ee,function(R,B){if(R)return C(R);try{var $=B.objectStore(m._dbInfo.storeName),G=$.get(f);G.onsuccess=function(){var Y=G.result;Y===void 0&&(Y=null),P(Y)&&(Y=F(Y)),I(Y)},G.onerror=function(){C(G.error)}}catch(Y){C(Y)}})}).catch(C)});return w(S,b),S}function ue(f,b){var m=this,S=new E(function(I,C){m.ready().then(function(){H(m._dbInfo,Ee,function(R,B){if(R)return C(R);try{var $=B.objectStore(m._dbInfo.storeName),G=$.openCursor(),Y=1;G.onsuccess=function(){var ie=G.result;if(ie){var xe=ie.value;P(xe)&&(xe=F(xe));var Ue=f(xe,ie.key,Y++);Ue!==void 0?I(Ue):ie.continue()}else I()},G.onerror=function(){C(G.error)}}catch(ie){C(ie)}})}).catch(C)});return w(S,b),S}function Q(f,b,m){var S=this;f=M(f);var I=new E(function(C,R){var B;S.ready().then(function(){return B=S._dbInfo,q.call(b)==="[object Blob]"?ye(B.db).then(function($){return $?b:x(b)}):b}).then(function($){H(S._dbInfo,U,function(G,Y){if(G)return R(G);try{var ie=Y.objectStore(S._dbInfo.storeName);$===null&&($=void 0);var xe=ie.put($,f);Y.oncomplete=function(){$===void 0&&($=null),C($)},Y.onabort=Y.onerror=function(){var Ue=xe.error?xe.error:xe.transaction.error;R(Ue)}}catch(Ue){R(Ue)}})}).catch(R)});return w(I,m),I}function ae(f,b){var m=this;f=M(f);var S=new E(function(I,C){m.ready().then(function(){H(m._dbInfo,U,function(R,B){if(R)return C(R);try{var $=B.objectStore(m._dbInfo.storeName),G=$.delete(f);B.oncomplete=function(){I()},B.onerror=function(){C(G.error)},B.onabort=function(){var Y=G.error?G.error:G.transaction.error;C(Y)}}catch(Y){C(Y)}})}).catch(C)});return w(S,b),S}function ee(f){var b=this,m=new E(function(S,I){b.ready().then(function(){H(b._dbInfo,U,function(C,R){if(C)return I(C);try{var B=R.objectStore(b._dbInfo.storeName),$=B.clear();R.oncomplete=function(){S()},R.onabort=R.onerror=function(){var G=$.error?$.error:$.transaction.error;I(G)}}catch(G){I(G)}})}).catch(I)});return w(m,f),m}function fe(f){var b=this,m=new E(function(S,I){b.ready().then(function(){H(b._dbInfo,Ee,function(C,R){if(C)return I(C);try{var B=R.objectStore(b._dbInfo.storeName),$=B.count();$.onsuccess=function(){S($.result)},$.onerror=function(){I($.error)}}catch(G){I(G)}})}).catch(I)});return w(m,f),m}function ce(f,b){var m=this,S=new E(function(I,C){if(f<0){I(null);return}m.ready().then(function(){H(m._dbInfo,Ee,function(R,B){if(R)return C(R);try{var $=B.objectStore(m._dbInfo.storeName),G=!1,Y=$.openKeyCursor();Y.onsuccess=function(){var ie=Y.result;if(!ie){I(null);return}f===0||G?I(ie.key):(G=!0,ie.advance(f))},Y.onerror=function(){C(Y.error)}}catch(ie){C(ie)}})}).catch(C)});return w(S,b),S}function he(f){var b=this,m=new E(function(S,I){b.ready().then(function(){H(b._dbInfo,Ee,function(C,R){if(C)return I(C);try{var B=R.objectStore(b._dbInfo.storeName),$=B.openKeyCursor(),G=[];$.onsuccess=function(){var Y=$.result;if(!Y){S(G);return}G.push(Y.key),Y.continue()},$.onerror=function(){I($.error)}}catch(Y){I(Y)}})}).catch(I)});return w(m,f),m}function me(f,b){b=L.apply(this,arguments);var m=this.config();f=typeof f!="function"&&f||{},f.name||(f.name=f.name||m.name,f.storeName=f.storeName||m.storeName);var S=this,I;if(!f.name)I=E.reject("Invalid arguments");else{var C=f.name===m.name&&S._dbInfo.db,R=C?E.resolve(S._dbInfo.db):ze(f).then(function(B){var $=se[f.name],G=$.forages;$.db=B;for(var Y=0;Y<G.length;Y++)G[Y]._dbInfo.db=B;return B});f.storeName?I=R.then(function(B){if(B.objectStoreNames.contains(f.storeName)){var $=B.version+1;ke(f);var G=se[f.name],Y=G.forages;B.close();for(var ie=0;ie<Y.length;ie++){var xe=Y[ie];xe._dbInfo.db=null,xe._dbInfo.version=$}var Ue=new E(function(He,st){var nt=d.open(f.name,$);nt.onerror=function(Gt){var Jr=nt.result;Jr.close(),st(Gt)},nt.onupgradeneeded=function(){var Gt=nt.result;Gt.deleteObjectStore(f.storeName)},nt.onsuccess=function(){var Gt=nt.result;Gt.close(),He(Gt)}});return Ue.then(function(He){G.db=He;for(var st=0;st<Y.length;st++){var nt=Y[st];nt._dbInfo.db=He,De(nt._dbInfo)}}).catch(function(He){throw(Pe(f,He)||E.resolve()).catch(function(){}),He})}}):I=R.then(function(B){ke(f);var $=se[f.name],G=$.forages;B.close();for(var Y=0;Y<G.length;Y++){var ie=G[Y];ie._dbInfo.db=null}var xe=new E(function(Ue,He){var st=d.deleteDatabase(f.name);st.onerror=function(){var nt=st.result;nt&&nt.close(),He(st.error)},st.onblocked=function(){console.warn('dropInstance blocked for database "'+f.name+'" until all open connections are closed')},st.onsuccess=function(){var nt=st.result;nt&&nt.close(),Ue(nt)}});return xe.then(function(Ue){$.db=Ue;for(var He=0;He<G.length;He++){var st=G[He];De(st._dbInfo)}}).catch(function(Ue){throw(Pe(f,Ue)||E.resolve()).catch(function(){}),Ue})})}return w(I,b),I}var _e={_driver:"asyncStorage",_initStorage:re,_support:g(),iterate:ue,getItem:oe,setItem:Q,removeItem:ae,clear:ee,length:fe,key:ce,keys:he,dropInstance:me};function h(){return typeof openDatabase=="function"}var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l="~~local_forage_type~",_=/^~~local_forage_type~([^~]+)~/,T="__lfsc__:",D=T.length,k="arbf",ve="blob",Ie="si08",be="ui08",Ve="uic8",Be="si16",qe="si32",Ft="ur16",$t="ui32",wn="fl32",wt="fl64",kt=D+k.length,Pi=Object.prototype.toString;function cl(f){var b=f.length*.75,m=f.length,S,I=0,C,R,B,$;f[f.length-1]==="="&&(b--,f[f.length-2]==="="&&b--);var G=new ArrayBuffer(b),Y=new Uint8Array(G);for(S=0;S<m;S+=4)C=a.indexOf(f[S]),R=a.indexOf(f[S+1]),B=a.indexOf(f[S+2]),$=a.indexOf(f[S+3]),Y[I++]=C<<2|R>>4,Y[I++]=(R&15)<<4|B>>2,Y[I++]=(B&3)<<6|$&63;return G}function vs(f){var b=new Uint8Array(f),m="",S;for(S=0;S<b.length;S+=3)m+=a[b[S]>>2],m+=a[(b[S]&3)<<4|b[S+1]>>4],m+=a[(b[S+1]&15)<<2|b[S+2]>>6],m+=a[b[S+2]&63];return b.length%3===2?m=m.substring(0,m.length-1)+"=":b.length%3===1&&(m=m.substring(0,m.length-2)+"=="),m}function Kp(f,b){var m="";if(f&&(m=Pi.call(f)),f&&(m==="[object ArrayBuffer]"||f.buffer&&Pi.call(f.buffer)==="[object ArrayBuffer]")){var S,I=T;f instanceof ArrayBuffer?(S=f,I+=k):(S=f.buffer,m==="[object Int8Array]"?I+=Ie:m==="[object Uint8Array]"?I+=be:m==="[object Uint8ClampedArray]"?I+=Ve:m==="[object Int16Array]"?I+=Be:m==="[object Uint16Array]"?I+=Ft:m==="[object Int32Array]"?I+=qe:m==="[object Uint32Array]"?I+=$t:m==="[object Float32Array]"?I+=wn:m==="[object Float64Array]"?I+=wt:b(new Error("Failed to get type for BinaryArray"))),b(I+vs(S))}else if(m==="[object Blob]"){var C=new FileReader;C.onload=function(){var R=l+f.type+"~"+vs(this.result);b(T+ve+R)},C.readAsArrayBuffer(f)}else try{b(JSON.stringify(f))}catch(R){console.error("Couldn't convert value into a JSON string: ",f),b(null,R)}}function Xp(f){if(f.substring(0,D)!==T)return JSON.parse(f);var b=f.substring(kt),m=f.substring(D,kt),S;if(m===ve&&_.test(b)){var I=b.match(_);S=I[1],b=b.substring(I[0].length)}var C=cl(b);switch(m){case k:return C;case ve:return p([C],{type:S});case Ie:return new Int8Array(C);case be:return new Uint8Array(C);case Ve:return new Uint8ClampedArray(C);case Be:return new Int16Array(C);case Ft:return new Uint16Array(C);case qe:return new Int32Array(C);case $t:return new Uint32Array(C);case wn:return new Float32Array(C);case wt:return new Float64Array(C);default:throw new Error("Unkown type: "+m)}}var ys={serialize:Kp,deserialize:Xp,stringToBuffer:cl,bufferToString:vs};function ll(f,b,m,S){f.executeSql("CREATE TABLE IF NOT EXISTS "+b.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],m,S)}function qp(f){var b=this,m={db:null};if(f)for(var S in f)m[S]=typeof f[S]!="string"?f[S].toString():f[S];var I=new E(function(C,R){try{m.db=openDatabase(m.name,String(m.version),m.description,m.size)}catch(B){return R(B)}m.db.transaction(function(B){ll(B,m,function(){b._dbInfo=m,C()},function($,G){R(G)})},R)});return m.serializer=ys,I}function Pn(f,b,m,S,I,C){f.executeSql(m,S,I,function(R,B){B.code===B.SYNTAX_ERR?R.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[b.storeName],function($,G){G.rows.length?C($,B):ll($,b,function(){$.executeSql(m,S,I,C)},C)},C):C(R,B)},C)}function Zp(f,b){var m=this;f=M(f);var S=new E(function(I,C){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(B){Pn(B,R,"SELECT * FROM "+R.storeName+" WHERE key = ? LIMIT 1",[f],function($,G){var Y=G.rows.length?G.rows.item(0).value:null;Y&&(Y=R.serializer.deserialize(Y)),I(Y)},function($,G){C(G)})})}).catch(C)});return w(S,b),S}function Jp(f,b){var m=this,S=new E(function(I,C){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(B){Pn(B,R,"SELECT * FROM "+R.storeName,[],function($,G){for(var Y=G.rows,ie=Y.length,xe=0;xe<ie;xe++){var Ue=Y.item(xe),He=Ue.value;if(He&&(He=R.serializer.deserialize(He)),He=f(He,Ue.key,xe+1),He!==void 0){I(He);return}}I()},function($,G){C(G)})})}).catch(C)});return w(S,b),S}function ul(f,b,m,S){var I=this;f=M(f);var C=new E(function(R,B){I.ready().then(function(){b===void 0&&(b=null);var $=b,G=I._dbInfo;G.serializer.serialize(b,function(Y,ie){ie?B(ie):G.db.transaction(function(xe){Pn(xe,G,"INSERT OR REPLACE INTO "+G.storeName+" (key, value) VALUES (?, ?)",[f,Y],function(){R($)},function(Ue,He){B(He)})},function(xe){if(xe.code===xe.QUOTA_ERR){if(S>0){R(ul.apply(I,[f,$,m,S-1]));return}B(xe)}})})}).catch(B)});return w(C,m),C}function Qp(f,b,m){return ul.apply(this,[f,b,m,1])}function eh(f,b){var m=this;f=M(f);var S=new E(function(I,C){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(B){Pn(B,R,"DELETE FROM "+R.storeName+" WHERE key = ?",[f],function(){I()},function($,G){C(G)})})}).catch(C)});return w(S,b),S}function th(f){var b=this,m=new E(function(S,I){b.ready().then(function(){var C=b._dbInfo;C.db.transaction(function(R){Pn(R,C,"DELETE FROM "+C.storeName,[],function(){S()},function(B,$){I($)})})}).catch(I)});return w(m,f),m}function nh(f){var b=this,m=new E(function(S,I){b.ready().then(function(){var C=b._dbInfo;C.db.transaction(function(R){Pn(R,C,"SELECT COUNT(key) as c FROM "+C.storeName,[],function(B,$){var G=$.rows.item(0).c;S(G)},function(B,$){I($)})})}).catch(I)});return w(m,f),m}function rh(f,b){var m=this,S=new E(function(I,C){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(B){Pn(B,R,"SELECT key FROM "+R.storeName+" WHERE id = ? LIMIT 1",[f+1],function($,G){var Y=G.rows.length?G.rows.item(0).key:null;I(Y)},function($,G){C(G)})})}).catch(C)});return w(S,b),S}function ih(f){var b=this,m=new E(function(S,I){b.ready().then(function(){var C=b._dbInfo;C.db.transaction(function(R){Pn(R,C,"SELECT key FROM "+C.storeName,[],function(B,$){for(var G=[],Y=0;Y<$.rows.length;Y++)G.push($.rows.item(Y).key);S(G)},function(B,$){I($)})})}).catch(I)});return w(m,f),m}function oh(f){return new E(function(b,m){f.transaction(function(S){S.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(I,C){for(var R=[],B=0;B<C.rows.length;B++)R.push(C.rows.item(B).name);b({db:f,storeNames:R})},function(I,C){m(C)})},function(S){m(S)})})}function sh(f,b){b=L.apply(this,arguments);var m=this.config();f=typeof f!="function"&&f||{},f.name||(f.name=f.name||m.name,f.storeName=f.storeName||m.storeName);var S=this,I;return f.name?I=new E(function(C){var R;f.name===m.name?R=S._dbInfo.db:R=openDatabase(f.name,"","",0),f.storeName?C({db:R,storeNames:[f.storeName]}):C(oh(R))}).then(function(C){return new E(function(R,B){C.db.transaction(function($){function G(Ue){return new E(function(He,st){$.executeSql("DROP TABLE IF EXISTS "+Ue,[],function(){He()},function(nt,Gt){st(Gt)})})}for(var Y=[],ie=0,xe=C.storeNames.length;ie<xe;ie++)Y.push(G(C.storeNames[ie]));E.all(Y).then(function(){R()}).catch(function(Ue){B(Ue)})},function($){B($)})})}):I=E.reject("Invalid arguments"),w(I,b),I}var ah={_driver:"webSQLStorage",_initStorage:qp,_support:h(),iterate:Jp,getItem:Zp,setItem:Qp,removeItem:eh,clear:th,length:nh,key:rh,keys:ih,dropInstance:sh};function ch(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function dl(f,b){var m=f.name+"/";return f.storeName!==b.storeName&&(m+=f.storeName+"/"),m}function lh(){var f="_localforage_support_test";try{return localStorage.setItem(f,!0),localStorage.removeItem(f),!1}catch{return!0}}function uh(){return!lh()||localStorage.length>0}function dh(f){var b=this,m={};if(f)for(var S in f)m[S]=f[S];return m.keyPrefix=dl(f,b._defaultConfig),uh()?(b._dbInfo=m,m.serializer=ys,E.resolve()):E.reject()}function fh(f){var b=this,m=b.ready().then(function(){for(var S=b._dbInfo.keyPrefix,I=localStorage.length-1;I>=0;I--){var C=localStorage.key(I);C.indexOf(S)===0&&localStorage.removeItem(C)}});return w(m,f),m}function ph(f,b){var m=this;f=M(f);var S=m.ready().then(function(){var I=m._dbInfo,C=localStorage.getItem(I.keyPrefix+f);return C&&(C=I.serializer.deserialize(C)),C});return w(S,b),S}function hh(f,b){var m=this,S=m.ready().then(function(){for(var I=m._dbInfo,C=I.keyPrefix,R=C.length,B=localStorage.length,$=1,G=0;G<B;G++){var Y=localStorage.key(G);if(Y.indexOf(C)===0){var ie=localStorage.getItem(Y);if(ie&&(ie=I.serializer.deserialize(ie)),ie=f(ie,Y.substring(R),$++),ie!==void 0)return ie}}});return w(S,b),S}function mh(f,b){var m=this,S=m.ready().then(function(){var I=m._dbInfo,C;try{C=localStorage.key(f)}catch{C=null}return C&&(C=C.substring(I.keyPrefix.length)),C});return w(S,b),S}function gh(f){var b=this,m=b.ready().then(function(){for(var S=b._dbInfo,I=localStorage.length,C=[],R=0;R<I;R++){var B=localStorage.key(R);B.indexOf(S.keyPrefix)===0&&C.push(B.substring(S.keyPrefix.length))}return C});return w(m,f),m}function _h(f){var b=this,m=b.keys().then(function(S){return S.length});return w(m,f),m}function vh(f,b){var m=this;f=M(f);var S=m.ready().then(function(){var I=m._dbInfo;localStorage.removeItem(I.keyPrefix+f)});return w(S,b),S}function yh(f,b,m){var S=this;f=M(f);var I=S.ready().then(function(){b===void 0&&(b=null);var C=b;return new E(function(R,B){var $=S._dbInfo;$.serializer.serialize(b,function(G,Y){if(Y)B(Y);else try{localStorage.setItem($.keyPrefix+f,G),R(C)}catch(ie){(ie.name==="QuotaExceededError"||ie.name==="NS_ERROR_DOM_QUOTA_REACHED")&&B(ie),B(ie)}})})});return w(I,m),I}function Eh(f,b){if(b=L.apply(this,arguments),f=typeof f!="function"&&f||{},!f.name){var m=this.config();f.name=f.name||m.name,f.storeName=f.storeName||m.storeName}var S=this,I;return f.name?I=new E(function(C){f.storeName?C(dl(f,S._defaultConfig)):C(f.name+"/")}).then(function(C){for(var R=localStorage.length-1;R>=0;R--){var B=localStorage.key(R);B.indexOf(C)===0&&localStorage.removeItem(B)}}):I=E.reject("Invalid arguments"),w(I,b),I}var bh={_driver:"localStorageWrapper",_initStorage:dh,_support:ch(),iterate:hh,getItem:ph,setItem:yh,removeItem:vh,clear:fh,length:_h,key:mh,keys:gh,dropInstance:Eh},wh=function(b,m){return b===m||typeof b=="number"&&typeof m=="number"&&isNaN(b)&&isNaN(m)},Ch=function(b,m){for(var S=b.length,I=0;I<S;){if(wh(b[I],m))return!0;I++}return!1},fl=Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"},Zr={},pl={},pr={INDEXEDDB:_e,WEBSQL:ah,LOCALSTORAGE:bh},Sh=[pr.INDEXEDDB._driver,pr.WEBSQL._driver,pr.LOCALSTORAGE._driver],Li=["dropInstance"],Es=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Li),Th={description:"",driver:Sh.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Ih(f,b){f[b]=function(){var m=arguments;return f.ready().then(function(){return f[b].apply(f,m)})}}function bs(){for(var f=1;f<arguments.length;f++){var b=arguments[f];if(b)for(var m in b)b.hasOwnProperty(m)&&(fl(b[m])?arguments[0][m]=b[m].slice():arguments[0][m]=b[m])}return arguments[0]}var xh=function(){function f(b){c(this,f);for(var m in pr)if(pr.hasOwnProperty(m)){var S=pr[m],I=S._driver;this[m]=I,Zr[I]||this.defineDriver(S)}this._defaultConfig=bs({},Th),this._config=bs({},this._defaultConfig,b),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return f.prototype.config=function(m){if((typeof m>"u"?"undefined":s(m))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var S in m){if(S==="storeName"&&(m[S]=m[S].replace(/\W/g,"_")),S==="version"&&typeof m[S]!="number")return new Error("Database version must be a number.");this._config[S]=m[S]}return"driver"in m&&m.driver?this.setDriver(this._config.driver):!0}else return typeof m=="string"?this._config[m]:this._config},f.prototype.defineDriver=function(m,S,I){var C=new E(function(R,B){try{var $=m._driver,G=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!m._driver){B(G);return}for(var Y=Es.concat("_initStorage"),ie=0,xe=Y.length;ie<xe;ie++){var Ue=Y[ie],He=!Ch(Li,Ue);if((He||m[Ue])&&typeof m[Ue]!="function"){B(G);return}}var st=function(){for(var Jr=function(Dh){return function(){var Nh=new Error("Method "+Dh+" is not implemented by the current driver"),hl=E.reject(Nh);return w(hl,arguments[arguments.length-1]),hl}},ws=0,Ah=Li.length;ws<Ah;ws++){var Cs=Li[ws];m[Cs]||(m[Cs]=Jr(Cs))}};st();var nt=function(Jr){Zr[$]&&console.info("Redefining LocalForage driver: "+$),Zr[$]=m,pl[$]=Jr,R()};"_support"in m?m._support&&typeof m._support=="function"?m._support().then(nt,B):nt(!!m._support):nt(!0)}catch(Gt){B(Gt)}});return N(C,S,I),C},f.prototype.driver=function(){return this._driver||null},f.prototype.getDriver=function(m,S,I){var C=Zr[m]?E.resolve(Zr[m]):E.reject(new Error("Driver not found."));return N(C,S,I),C},f.prototype.getSerializer=function(m){var S=E.resolve(ys);return N(S,m),S},f.prototype.ready=function(m){var S=this,I=S._driverSet.then(function(){return S._ready===null&&(S._ready=S._initDriver()),S._ready});return N(I,m,m),I},f.prototype.setDriver=function(m,S,I){var C=this;fl(m)||(m=[m]);var R=this._getSupportedDrivers(m);function B(){C._config.driver=C.driver()}function $(ie){return C._extend(ie),B(),C._ready=C._initStorage(C._config),C._ready}function G(ie){return function(){var xe=0;function Ue(){for(;xe<ie.length;){var He=ie[xe];return xe++,C._dbInfo=null,C._ready=null,C.getDriver(He).then($).catch(Ue)}B();var st=new Error("No available storage method found.");return C._driverSet=E.reject(st),C._driverSet}return Ue()}}var Y=this._driverSet!==null?this._driverSet.catch(function(){return E.resolve()}):E.resolve();return this._driverSet=Y.then(function(){var ie=R[0];return C._dbInfo=null,C._ready=null,C.getDriver(ie).then(function(xe){C._driver=xe._driver,B(),C._wrapLibraryMethodsWithReady(),C._initDriver=G(R)})}).catch(function(){B();var ie=new Error("No available storage method found.");return C._driverSet=E.reject(ie),C._driverSet}),N(this._driverSet,S,I),this._driverSet},f.prototype.supports=function(m){return!!pl[m]},f.prototype._extend=function(m){bs(this,m)},f.prototype._getSupportedDrivers=function(m){for(var S=[],I=0,C=m.length;I<C;I++){var R=m[I];this.supports(R)&&S.push(R)}return S},f.prototype._wrapLibraryMethodsWithReady=function(){for(var m=0,S=Es.length;m<S;m++)Ih(this,Es[m])},f.prototype.createInstance=function(m){return new f(m)},f}(),Oh=new xh;i.exports=Oh},{3:3}]},{},[4])(4)})});var Mh={schedule(t,e){let n=setTimeout(t,e);return()=>clearTimeout(n)}};function Ph(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function Lh(t){return!!t&&t.nodeType===Node.ELEMENT_NODE}var Fs;function Fh(t,e){if(!Fs){let n=Element.prototype;Fs=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}return t.nodeType===Node.ELEMENT_NODE?Fs.call(t,e):!1}function kh(t){let e={};return t.forEach(({propName:n,templateName:r,transform:i})=>{e[Ph(r)]=[n,i]}),e}function Vh(t,e){return e.get(xs).resolveComponentFactory(t).inputs}function Bh(t,e){let n=t.childNodes,r=e.map(()=>[]),i=-1;e.some((o,s)=>o==="*"?(i=s,!0):!1);for(let o=0,s=n.length;o<s;++o){let c=n[o],u=Uh(c,e,i);u!==-1&&r[u].push(c)}return r}function Uh(t,e,n){let r=n;return Lh(t)&&e.some((i,o)=>i!=="*"&&Fh(t,i)?(r=o,!0):!1),r}var Hh=10,ks=class{componentFactory;inputMap=new Map;constructor(e,n){this.componentFactory=n.get(xs).resolveComponentFactory(e);for(let r of this.componentFactory.inputs)this.inputMap.set(r.propName,r.templateName)}create(e){return new Vs(this.componentFactory,e,this.inputMap)}},Vs=class{componentFactory;injector;inputMap;eventEmitters=new yl(1);events=this.eventEmitters.pipe(Ol(e=>Vi(...e)));componentRef=null;scheduledDestroyFn=null;initialInputValues=new Map;ngZone;elementZone;appRef;cdScheduler;constructor(e,n,r){this.componentFactory=e,this.injector=n,this.inputMap=r,this.ngZone=this.injector.get(Mt),this.appRef=this.injector.get($i),this.cdScheduler=n.get(Nl),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(e){this.runInZone(()=>{if(this.scheduledDestroyFn!==null){this.scheduledDestroyFn(),this.scheduledDestroyFn=null;return}this.componentRef===null&&this.initializeComponent(e)})}disconnect(){this.runInZone(()=>{this.componentRef===null||this.scheduledDestroyFn!==null||(this.scheduledDestroyFn=Mh.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},Hh))})}getInputValue(e){return this.runInZone(()=>this.componentRef===null?this.initialInputValues.get(e):this.componentRef.instance[e])}setInputValue(e,n){if(this.componentRef===null){this.initialInputValues.set(e,n);return}this.runInZone(()=>{this.componentRef.setInput(this.inputMap.get(e)??e,n),this.componentRef.hostView.dirty&&(this.componentRef.changeDetectorRef.markForRefresh(),this.cdScheduler.notify(6))})}initializeComponent(e){let n=Rt.create({providers:[],parent:this.injector}),r=Bh(e,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(n,r,e),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.appRef.attachView(this.componentRef.hostView),this.componentRef.hostView.detectChanges()}initializeInputs(){for(let[e,n]of this.initialInputValues)this.setInputValue(e,n);this.initialInputValues.clear()}initializeOutputs(e){let n=this.componentFactory.outputs.map(({propName:r,templateName:i})=>{let o=e.instance[r];return new _l(s=>{let c=o.subscribe(u=>s.next({name:i,value:u}));return()=>c.unsubscribe()})});this.eventEmitters.next(n)}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}},Bs=class extends HTMLElement{ngElementEventsSubscription=null};function tu(t,e){let n=Vh(t,e.injector),r=e.strategyFactory||new ks(t,e.injector),i=kh(n);class o extends Bs{injector;static observedAttributes=Object.keys(i);get ngElementStrategy(){if(!this._ngElementStrategy){let c=this._ngElementStrategy=r.create(this.injector||e.injector);n.forEach(({propName:u,transform:d})=>{if(!this.hasOwnProperty(u))return;let g=this[u];delete this[u],c.setInputValue(u,g,d)})}return this._ngElementStrategy}_ngElementStrategy;constructor(c){super(),this.injector=c}attributeChangedCallback(c,u,d,g){let[p,E]=i[c];this.ngElementStrategy.setInputValue(p,d,E)}connectedCallback(){let c=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),c=!0),this.ngElementStrategy.connect(this),c||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(c=>{let u=new CustomEvent(c.name,{detail:c.value});this.dispatchEvent(u)})}}return n.forEach(({propName:s,transform:c})=>{Object.defineProperty(o.prototype,s,{get(){return this.ngElementStrategy.getInputValue(s)},set(u){this.ngElementStrategy.setInputValue(s,u,c)},configurable:!0,enumerable:!0})}),o}var nu="9.12.10";var Xe=class t{static SDK_VERSION=nu;static SDK_VERSION_CODE;static SDK="WEB";static LOG_PREFIX="CooeeSDK";static COOEE="cooee";static SESSION_STORAGE_SCROLL_ID="sleid";static IDLE_TIME_IN_SECONDS=30*60;static IN_APP_WRAPPER_NAME="cooee-wrapper";static IN_APP_CONTAINER_NAME="cooee-container";static IN_APP_DEFAULT_PADDING=15;static EVENT_SCREEN_VIEW="CE Screen View";static EVENT_APP_BACKGROUND="CE App Background";static EVENT_TRIGGER_DISPLAYED="CE Trigger Displayed";static EVENT_CAMPAIGN_HOLDOUT="CE Campaign Holdout";static EVENT_CAMPAIGN_REJECTED="CE Campaign Rejected";static EVENT_CAMPAIGN_FAILED="CE Campaign Failed";static EVENT_TRIGGER_CLOSED="CE Trigger Closed";static EVENT_SCROLL="CE Scroll";static EVENT_TRIGGER_CLICKED="CE Trigger Clicked";static EVENT_FORM_SUBMITTED="CE Form Submitted";static EVENT_EXPERIMENT_START="CE Experiment Start";static EVENT_VIDEO_DIALOG_CLOSED="CE Video Dialog Closed";static EVENT_VIDEO_DIALOG_OPENED="CE Video Dialog Opened";static EVENT_VIDEO_CHANGE="CE Video Changed";static EVENT_LAST_VIDEO_ENDED="CE Last Video Ended";static EVENT_VIDEO_MUTED="CE Video Muted";static EVENT_VIDEO_UNMUTED="CE Video Unmuted";static EVENT_ADD_TO_CART_CLICKED="CE Add To Cart Clicked";static EVENT_VIEW_ITEM_CLICKED="CE View Item Clicked";static EVENT_MORE_ITEM_INFO_CLICKED="CE More Item Info Clicked";static EVENT_OPEN_CART_CLICKED="CE Open Cart Clicked";static EVENT_ADD_TO_CART="Add To Cart";static EVENT_REMOVE_FROM_CART="Remove From Cart";static EVENT_VIEW_ITEM="View Item";static EVENT_VIEW_CART="View Cart";static EVENT_OPEN_CART="Open Cart";static EVENT_VIEW_COLLECTION="View Collection";static EVENT_BUY_NOW_CLICKED="Buy Now Clicked";static EVENT_CHECKOUT_STARTED="Checkout Started";static EVENT_REVIEW_CLICKED="Review Clicked";static EVENT_ITEM_THUMBNAIL_CLICKED="Item Thumbnail Clicked";static JS_LOAD_WHITELIST_EVENTS=[this.EVENT_VIEW_ITEM,this.EVENT_VIEW_CART,this.EVENT_VIEW_COLLECTION];static HASH_INITIATE_CHECKOUT="initiate-checkout";static HASH_OPEN_CART_DRAWER="open-cart-drawer";static ADD_BUNDLE_CTA_INBOUND_EVENT="letscooee:inbound:cta:add-bundle";static CTA_OPEN_CART_EVENT="letscooee:outbound:open-cart";static CTA_AFTER_REFRESH_UI="letscooee:outbound:refresh-ui";static POPUP_ACTIVITY_EVENT="letscooee:outbound:popup-activities";static THIRD_PARTY_CHECKOUT_EVENT="letscooee:outbound:third-party-initiate-checkout";static CAMPAIGN_DISPLAYED_ACTIVITY="DISPLAYED";static CAMPAIGN_CLICKED_ACTIVITY="CLICKED";static CAMPAIGN_CLOSED_ACTIVITY="CLOSED";static BLACKLISTED_PAGE_NAMES=["collection","product","cart"];static API_CALL_MAX_ATTEMPTS=3;static API_CALL_RETRY_DELAY=1e3;static PLACEHOLDER_IMAGE="https://cdn.global.letscooee.com/images/placeholders/product.png";static CART_UPDATE_BROADCAST="CART_UPDATE";static GRAPHQL_VERSION="2024-10";static GRAPHQL_API_PATH=`/api/${this.GRAPHQL_VERSION}/graphql.json`;static SHADOW_SPLITTER=":shadow";static CAMPAIGN_ATTRIBUTE="_letscooee_campaign";static CONTENT_ATTRIBUTE="_letscooee_content";static VIA="_via";static PAYMENT_MODAL_DETAILS=[{identifier:"#flo-checkout-wrapper",gateway:"Shopflow"},{identifier:"#fastrr-main-container",gateway:"Shiprocket"},{identifier:"#gokwik-modal-wrapper",gateway:"Gokwik"},{identifier:"#zecpe",gateway:"Ecom 360"}];static{let e=t.SDK_VERSION.split(".").map(n=>n.padStart(2,"0")).join("");t.SDK_VERSION_CODE=parseInt(e,10)}};var xn={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${Xe.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${Xe.SDK_VERSION}/dist/widget.min.js`};var Bt=Fi(iu());var Et=class{static log(...e){Bt.default.info(...e)}static debug(...e){Bt.default.debug(...e)}static error(...e){Bt.default.error(...e)}static warn(...e){Bt.default.warn(...e)}static info(...e){Bt.default.info(...e)}static trace(...e){Bt.default.trace(...e)}};function ou(t=Xe.LOG_PREFIX){Bt.default.useDefaults({formatter:function(n){n.unshift(`${t} (v${Xe.SDK_VERSION}):`)}});let e=$h();(e==="1"||e==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?Bt.default.setLevel(Bt.default[localStorage.cooeeLogLevel]):Bt.default.setLevel(xn.debug?Bt.default.TRACE:Bt.default.OFF)}function $h(){return new URL(location.href).searchParams?.get("cooee-debug")}var qr=Fi(Us());var au={providers:[jl()]};var Wh={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},YE=we(O({},Wh),{"[class.ng-submitted]":"isSubmitted"});var Yh=new en("",{providedIn:"root",factory:()=>uu}),uu="always";var zh=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=Wn({type:t});static \u0275inj=$n({})}return t})();var du=(()=>{class t{static withConfig(n){return{ngModule:t,providers:[{provide:Yh,useValue:n.callSetDisabledState??uu}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=Wn({type:t});static \u0275inj=$n({imports:[zh]})}return t})();var Yt=class{static SWIPER_CSS="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css";static injectScriptURL(e,n){if(!e)return;let r=document.createElement("script");r.id=n??"",r.src=e,r.type="module",document.head.appendChild(r)}static injectRawScript(e){if(!e)return;let n=document.createElement("script");n.id="cooee-app-script",n.innerHTML=e,document.head.appendChild(n)}static injectRawCSS(e,n=document.head){if(!e)return;let r=document.createElement("style");r.textContent=e,n.appendChild(r)}static injectSwiperCSS(e=document.head){this.injectStylesheet(this.SWIPER_CSS,e)}static injectStylesheet(e,n=document.head){if(!e)return;let r=document.createElement("link");r.rel="stylesheet",r.href=e,e===this.SWIPER_CSS&&(r.crossOrigin="anonymous",r.onload=i=>{let s=i.currentTarget?.sheet?.cssRules;if(s){for(let c of s)if(c.type==CSSRule.FONT_FACE_RULE){let u=e.split("/"),d=u.slice(0,u.length-1).join("/"),g=c.cssText;g=g.replace(/url\s*\(\s*['"]?(?!((\/)|((?:https?:)?\/\/)|(?:data:?:)))([^'")]+)['"]?\s*\)/g,`url("${d}/$4")`);let p=document.createElement("style");p.appendChild(document.createTextNode(g)),document.head.appendChild(p)}}}),n.appendChild(r)}static async loadSwiperScript(){window.CooeeSDK.Swiper||(window.CooeeSDK.Swiper=(await import("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.mjs")).Swiper)}};var un=class t{cooeeEvent=new at;cooeeCTA=new at;elementRef=Z(Ct);_engagementTrigger=Wt(null);_triggerContext=Wt(null);constructor(){this.elementRef.nativeElement.update=this.update.bind(this)}get classes(){let e=["letscooee-widget"],n=this._engagementTrigger();return e.push(`widget-${n?.shortID}`),e}get triggerContext(){return this._triggerContext()}set triggerContext(e){this._triggerContext.set(e),this._engagementTrigger.set(e.triggerData),this.engagementTriggerReceived(e.triggerData)}get engagementTrigger(){return this._engagementTrigger()}ngOnInit(){Et.debug("Init",this.constructor.name);let e=this.elementRef.nativeElement.shadowRoot;e&&(Yt.injectStylesheet(xn.styleURL,e),Yt.injectRawCSS(window.CooeeSDK.config.website.commonCSS,e))}ngOnDestroy(){Et.debug("Destroying",this.constructor.name)}sendEventToRenderer(e){this.cooeeEvent.emit(e)}executeCTAViaRenderer(e){this.cooeeCTA.emit(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Le({type:t,selectors:[["ng-component"]],hostVars:2,hostBindings:function(n,r){n&2&&Fl(r.classes)},inputs:{triggerContext:"triggerContext"},outputs:{cooeeEvent:"cooeeEvent",cooeeCTA:"cooeeCTA"},decls:0,vars:0,template:function(n,r){},encapsulation:2})};var Kh=(t,e,n)=>({"--option-color":t,"background-color":e,color:n}),fu=(t,e)=>e.id;function Xh(t,e){if(t&1&&(W(0,"span",6),Ae(1),z()),t&2){let n=K().$implicit;V(),rn(n.displayName||n.name)}}function qh(t,e){if(t&1){let n=We();gt(0),W(1,"button",5),Me("click",function(){let i=Ne(n).$implicit,o=K().$implicit,s=K();return Re(s.onOptionChange(o,i))}),Oe(2,Xh,2,1,"span",6),z()}if(t&2){let n=e.$implicit,r=K().$implicit,i=Ke(1),o=K(),s=n.name;V(),Yn("color-type",i)("selected",o.selectedOptions()[r.name]===s),ge("disabled",n.disabled)("title",s)("ngStyle",Bl(9,Kh,i?s:"",i?s:"",i?"transparent":"")),Cn("data-value",s),V(),Te(i?-1:2)}}function Zh(t,e){if(t&1&&(W(0,"div"),gt(1),W(2,"div",1),Ae(3),z(),W(4,"div",2),Ae(5),z(),W(6,"div",3),Ze(7,qh,3,13,"button",4,fu),z()()),t&2){let n=e.$implicit,r=K();kl("option-group ",n.name.toLowerCase(),""),V(),yt(n.name.toLowerCase().includes("color")),V(2),Tt("",n.name,":"),V(2),rn(r.selectedOptions()[n.name]),V(2),Je(n.optionValues)}}var Zi=class t extends un{selectedVariant=new at;item=Ui.required();selectedOptions=Wt({});options=Wi(()=>{let e=this.item();if(!e.options||e.vars.length===1)return[];if(window.cooeeManipulateProductOptions)try{window.cooeeManipulateProductOptions(e)}catch(n){Et.error(n)}return e.options});matchedVariant=Wi(()=>{let e=this.item(),n=this.selectedOptions();return e.vars.find(r=>e.options.every(i=>n[i.name]===r.selectedOptions.find(o=>o.name===i.name)?.value))});constructor(){super(),Ms(()=>{let n=this.matchedVariant();n&&(this.item().setSelectedVariant(n),this.selectedVariant.emit(n))});let e=Ms(()=>{let n=this.item();if(!n?.options)return;let r=O({},this.selectedOptions());n.options.forEach(i=>{let o=n.vars[0]?.selectedOptions.find(s=>s.name===i.name)?.value;o&&(r[i.name]=o)}),this.selectedOptions.set(r),e.destroy()})}onOptionChange(e,n){let r=O({},this.selectedOptions());r[e.name]=n.name,this.selectedOptions.set(r)}engagementTriggerReceived(){}update(){}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Le({type:t,selectors:[["cooee-item-options-picker"]],inputs:{item:[1,"item"]},outputs:{selectedVariant:"selectedVariant"},features:[St],decls:2,vars:0,consts:[[3,"class"],[1,"name"],[1,"selected-value"],[1,"option-values"],[1,"option-value",3,"disabled","color-type","selected","title","ngStyle"],[1,"option-value",3,"click","disabled","title","ngStyle"],[1,"title"]],template:function(n,r){n&1&&Ze(0,Zh,9,6,"div",0,fu),n&2&&Je(r.options())},dependencies:[zl,Wl,du],styles:[`.option-group{display:flex;gap:4px;align-items:center}.option-group+.option-group{margin-top:8px}.option-values{display:flex;flex-wrap:nowrap;overflow-x:auto;padding:6px;gap:4px}.selected-value{display:none}.option-value{padding:5px 10px;border:1px solid #ccc;cursor:pointer;border-radius:4px;min-width:32px;min-height:32px;text-align:center;position:relative;--selected-color: var(--option-color, rgb(var(--lc-color-button, 0 0 0)))}.option-value.selected{box-shadow:#fff 0 0 0 2px,var(--selected-color) 0 0 0 4px}
|
|
11
|
-
`],encapsulation:3})};var Hs=function(t){return t.SHOPIFY_CHECKOUT="shopify_checkout",t.THIRD_PARTY_CHECKOUT="third_party_checkout",t.CART_PAGE="cart_page",t.CART_DRAWER="cart_drawer",t}(Hs||{});var Ut=function(t){return t[t.NONE=0]="NONE",t[t.REJECT_POPUP=1]="REJECT_POPUP",t[t.ACCEPT_POPUP=2]="ACCEPT_POPUP",t[t.GO_TO_URL=4]="GO_TO_URL",t[t.SHARE=5]="SHARE",t[t.KEY_VALUE=100]="KEY_VALUE",t[t.GO_TO_PRODUCT=101]="GO_TO_PRODUCT",t[t.ADD_TO_CART=102]="ADD_TO_CART",t[t.COPY_COUPON_CODE=103]="COPY_COUPON_CODE",t[t.GO_TO_COLLECTION=104]="GO_TO_COLLECTION",t[t.OPEN_CART=105]="OPEN_CART",t[t.SUBMIT_FORM=106]="SUBMIT_FORM",t[t.INITIATE_CHECKOUT=107]="INITIATE_CHECKOUT",t[t.ADD_BUNDLE=108]="ADD_BUNDLE",t[t.UPGRADE_TO_SUBSCRIPTION=109]="UPGRADE_TO_SUBSCRIPTION",t}(Ut||{});var
|
|
10
|
+
`+N(A,P)):y}}function ht(A,x){var F;return x.cache&&x.name&&x.storage.templates.get(x.name)?x.storage.templates.get(x.name):(F=typeof A=="function"?A:Ye(A,x),x.cache&&x.name&&x.storage.templates.define(x.name,F),F)}Pe.l.bind(Pe),t.compile=Ye,t.compileScope=se,t.compileScopeIntoFunction=K,t.compileToString=N,t.defaultConfig=Pe,t.filters=De,t.getConfig=Ge,t.helpers=ye,t.nativeHelpers=ke,t.parse=w,t.render=function(A,x,F,P){var v=Ge(F||{});if(!v.async)return ht(A,v)(x,v);if(!P){if(typeof r=="function")return new r(function(y,H){try{y(ht(A,v)(x,v))}catch(J){H(J)}});throw e("Please provide a callback function, this env doesn't support Promises")}try{ht(A,v)(x,v,P)}catch(y){return P(y)}},t.templates=te,Object.defineProperty(t,"__esModule",{value:!0})})});var rf=Ss((nf,ic)=>{"use strict";(function(t){if(typeof nf=="object"&&typeof ic<"u")ic.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var e;typeof window<"u"?e=window:typeof global<"u"?e=global:typeof self<"u"?e=self:e=this,e.localforage=t()}})(function(){var t,e,n;return function r(i,o,s){function c(g,p){if(!o[g]){if(!i[g]){var E=typeof Qr=="function"&&Qr;if(!p&&E)return E(g,!0);if(u)return u(g,!0);var w=new Error("Cannot find module '"+g+"'");throw w.code="MODULE_NOT_FOUND",w}var N=o[g]={exports:{}};i[g][0].call(N.exports,function(M){var L=i[g][1][M];return c(L||M)},N,N.exports,r,i,o,s)}return o[g].exports}for(var u=typeof Qr=="function"&&Qr,d=0;d<s.length;d++)c(s[d]);return c}({1:[function(r,i,o){(function(s){"use strict";var c=s.MutationObserver||s.WebKitMutationObserver,u;if(c){var d=0,g=new c(M),p=s.document.createTextNode("");g.observe(p,{characterData:!0}),u=function(){p.data=d=++d%2}}else if(!s.setImmediate&&typeof s.MessageChannel<"u"){var E=new s.MessageChannel;E.port1.onmessage=M,u=function(){E.port2.postMessage(0)}}else"document"in s&&"onreadystatechange"in s.document.createElement("script")?u=function(){var j=s.document.createElement("script");j.onreadystatechange=function(){M(),j.onreadystatechange=null,j.parentNode.removeChild(j),j=null},s.document.documentElement.appendChild(j)}:u=function(){setTimeout(M,0)};var w,N=[];function M(){w=!0;for(var j,K,se=N.length;se;){for(K=N,N=[],j=-1;++j<se;)K[j]();se=N.length}w=!1}i.exports=L;function L(j){N.push(j)===1&&!w&&u()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(r,i,o){"use strict";var s=r(1);function c(){}var u={},d=["REJECTED"],g=["FULFILLED"],p=["PENDING"];i.exports=E;function E(U){if(typeof U!="function")throw new TypeError("resolver must be a function");this.state=p,this.queue=[],this.outcome=void 0,U!==c&&L(this,U)}E.prototype.catch=function(U){return this.then(null,U)},E.prototype.then=function(U,he){if(typeof U!="function"&&this.state===g||typeof he!="function"&&this.state===d)return this;var te=new this.constructor(c);if(this.state!==p){var ye=this.state===g?U:he;N(te,ye,this.outcome)}else this.queue.push(new w(te,U,he));return te};function w(U,he,te){this.promise=U,typeof he=="function"&&(this.onFulfilled=he,this.callFulfilled=this.otherCallFulfilled),typeof te=="function"&&(this.onRejected=te,this.callRejected=this.otherCallRejected)}w.prototype.callFulfilled=function(U){u.resolve(this.promise,U)},w.prototype.otherCallFulfilled=function(U){N(this.promise,this.onFulfilled,U)},w.prototype.callRejected=function(U){u.reject(this.promise,U)},w.prototype.otherCallRejected=function(U){N(this.promise,this.onRejected,U)};function N(U,he,te){s(function(){var ye;try{ye=he(te)}catch(ke){return u.reject(U,ke)}ye===U?u.reject(U,new TypeError("Cannot resolve promise with itself")):u.resolve(U,ye)})}u.resolve=function(U,he){var te=j(M,he);if(te.status==="error")return u.reject(U,te.value);var ye=te.value;if(ye)L(U,ye);else{U.state=g,U.outcome=he;for(var ke=-1,De=U.queue.length;++ke<De;)U.queue[ke].callFulfilled(he)}return U},u.reject=function(U,he){U.state=d,U.outcome=he;for(var te=-1,ye=U.queue.length;++te<ye;)U.queue[te].callRejected(he);return U};function M(U){var he=U&&U.then;if(U&&(typeof U=="object"||typeof U=="function")&&typeof he=="function")return function(){he.apply(U,arguments)}}function L(U,he){var te=!1;function ye(Ge){te||(te=!0,u.reject(U,Ge))}function ke(Ge){te||(te=!0,u.resolve(U,Ge))}function De(){he(ke,ye)}var Pe=j(De);Pe.status==="error"&&ye(Pe.value)}function j(U,he){var te={};try{te.value=U(he),te.status="success"}catch(ye){te.status="error",te.value=ye}return te}E.resolve=K;function K(U){return U instanceof this?U:u.resolve(new this(c),U)}E.reject=se;function se(U){var he=new this(c);return u.reject(he,U)}E.all=X;function X(U){var he=this;if(Object.prototype.toString.call(U)!=="[object Array]")return this.reject(new TypeError("must be an array"));var te=U.length,ye=!1;if(!te)return this.resolve([]);for(var ke=new Array(te),De=0,Pe=-1,Ge=new this(c);++Pe<te;)Ye(U[Pe],Pe);return Ge;function Ye(ht,A){he.resolve(ht).then(x,function(F){ye||(ye=!0,u.reject(Ge,F))});function x(F){ke[A]=F,++De===te&&!ye&&(ye=!0,u.resolve(Ge,ke))}}}E.race=Ee;function Ee(U){var he=this;if(Object.prototype.toString.call(U)!=="[object Array]")return this.reject(new TypeError("must be an array"));var te=U.length,ye=!1;if(!te)return this.resolve([]);for(var ke=-1,De=new this(c);++ke<te;)Pe(U[ke]);return De;function Pe(Ge){he.resolve(Ge).then(function(Ye){ye||(ye=!0,u.resolve(De,Ye))},function(Ye){ye||(ye=!0,u.reject(De,Ye))})}}},{1:1}],3:[function(r,i,o){(function(s){"use strict";typeof s.Promise!="function"&&(s.Promise=r(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(r,i,o){"use strict";var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f};function c(f,b){if(!(f instanceof b))throw new TypeError("Cannot call a class as a function")}function u(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var d=u();function g(){try{if(!d||!d.open)return!1;var f=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),b=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!f||b)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function p(f,b){f=f||[],b=b||{};try{return new Blob(f,b)}catch(C){if(C.name!=="TypeError")throw C;for(var m=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,S=new m,I=0;I<f.length;I+=1)S.append(f[I]);return S.getBlob(b.type)}}typeof Promise>"u"&&r(3);var E=Promise;function w(f,b){b&&f.then(function(m){b(null,m)},function(m){b(m)})}function N(f,b,m){typeof b=="function"&&f.then(b),typeof m=="function"&&f.catch(m)}function M(f){return typeof f!="string"&&(console.warn(f+" used as a key, but it is not a string."),f=String(f)),f}function L(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var j="local-forage-detect-blob-support",K=void 0,se={},X=Object.prototype.toString,Ee="readonly",U="readwrite";function he(f){for(var b=f.length,m=new ArrayBuffer(b),S=new Uint8Array(m),I=0;I<b;I++)S[I]=f.charCodeAt(I);return m}function te(f){return new E(function(b){var m=f.transaction(j,U),S=p([""]);m.objectStore(j).put(S,"key"),m.onabort=function(I){I.preventDefault(),I.stopPropagation(),b(!1)},m.oncomplete=function(){var I=navigator.userAgent.match(/Chrome\/(\d+)/),C=navigator.userAgent.match(/Edge\//);b(C||!I||parseInt(I[1],10)>=43)}}).catch(function(){return!1})}function ye(f){return typeof K=="boolean"?E.resolve(K):te(f).then(function(b){return K=b,K})}function ke(f){var b=se[f.name],m={};m.promise=new E(function(S,I){m.resolve=S,m.reject=I}),b.deferredOperations.push(m),b.dbReady?b.dbReady=b.dbReady.then(function(){return m.promise}):b.dbReady=m.promise}function De(f){var b=se[f.name],m=b.deferredOperations.pop();if(m)return m.resolve(),m.promise}function Pe(f,b){var m=se[f.name],S=m.deferredOperations.pop();if(S)return S.reject(b),S.promise}function Ge(f,b){return new E(function(m,S){if(se[f.name]=se[f.name]||J(),f.db)if(b)ke(f),f.db.close();else return m(f.db);var I=[f.name];b&&I.push(f.version);var C=d.open.apply(d,I);b&&(C.onupgradeneeded=function(R){var V=C.result;try{V.createObjectStore(f.storeName),R.oldVersion<=1&&V.createObjectStore(j)}catch($){if($.name==="ConstraintError")console.warn('The database "'+f.name+'" has been upgraded from version '+R.oldVersion+" to version "+R.newVersion+', but the storage "'+f.storeName+'" already exists.');else throw $}}),C.onerror=function(R){R.preventDefault(),S(C.error)},C.onsuccess=function(){var R=C.result;R.onversionchange=function(V){V.target.close()},m(R),De(f)}})}function Ye(f){return Ge(f,!1)}function ht(f){return Ge(f,!0)}function A(f,b){if(!f.db)return!0;var m=!f.db.objectStoreNames.contains(f.storeName),S=f.version<f.db.version,I=f.version>f.db.version;if(S&&(f.version!==b&&console.warn('The database "'+f.name+`" can't be downgraded from version `+f.db.version+" to version "+f.version+"."),f.version=f.db.version),I||m){if(m){var C=f.db.version+1;C>f.version&&(f.version=C)}return!0}return!1}function x(f){return new E(function(b,m){var S=new FileReader;S.onerror=m,S.onloadend=function(I){var C=btoa(I.target.result||"");b({__local_forage_encoded_blob:!0,data:C,type:f.type})},S.readAsBinaryString(f)})}function F(f){var b=he(atob(f.data));return p([b],{type:f.type})}function P(f){return f&&f.__local_forage_encoded_blob}function v(f){var b=this,m=b._initReady().then(function(){var S=se[b._dbInfo.name];if(S&&S.dbReady)return S.dbReady});return N(m,f,f),m}function y(f){ke(f);for(var b=se[f.name],m=b.forages,S=0;S<m.length;S++){var I=m[S];I._dbInfo.db&&(I._dbInfo.db.close(),I._dbInfo.db=null)}return f.db=null,Ye(f).then(function(C){return f.db=C,A(f)?ht(f):C}).then(function(C){f.db=b.db=C;for(var R=0;R<m.length;R++)m[R]._dbInfo.db=C}).catch(function(C){throw Pe(f,C),C})}function H(f,b,m,S){S===void 0&&(S=1);try{var I=f.db.transaction(f.storeName,b);m(null,I)}catch(C){if(S>0&&(!f.db||C.name==="InvalidStateError"||C.name==="NotFoundError"))return E.resolve().then(function(){if(!f.db||C.name==="NotFoundError"&&!f.db.objectStoreNames.contains(f.storeName)&&f.version<=f.db.version)return f.db&&(f.version=f.db.version+1),ht(f)}).then(function(){return y(f).then(function(){H(f,b,m,S-1)})}).catch(m);m(C)}}function J(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function re(f){var b=this,m={db:null};if(f)for(var S in f)m[S]=f[S];var I=se[m.name];I||(I=J(),se[m.name]=I),I.forages.push(b),b._initReady||(b._initReady=b.ready,b.ready=v);var C=[];function R(){return E.resolve()}for(var V=0;V<I.forages.length;V++){var $=I.forages[V];$!==b&&C.push($._initReady().catch(R))}var G=I.forages.slice(0);return E.all(C).then(function(){return m.db=I.db,Ye(m)}).then(function(Y){return m.db=Y,A(m,b._defaultConfig.version)?ht(m):Y}).then(function(Y){m.db=I.db=Y,b._dbInfo=m;for(var ie=0;ie<G.length;ie++){var xe=G[ie];xe!==b&&(xe._dbInfo.db=m.db,xe._dbInfo.version=m.version)}})}function oe(f,b){var m=this;f=M(f);var S=new E(function(I,C){m.ready().then(function(){H(m._dbInfo,Ee,function(R,V){if(R)return C(R);try{var $=V.objectStore(m._dbInfo.storeName),G=$.get(f);G.onsuccess=function(){var Y=G.result;Y===void 0&&(Y=null),P(Y)&&(Y=F(Y)),I(Y)},G.onerror=function(){C(G.error)}}catch(Y){C(Y)}})}).catch(C)});return w(S,b),S}function ue(f,b){var m=this,S=new E(function(I,C){m.ready().then(function(){H(m._dbInfo,Ee,function(R,V){if(R)return C(R);try{var $=V.objectStore(m._dbInfo.storeName),G=$.openCursor(),Y=1;G.onsuccess=function(){var ie=G.result;if(ie){var xe=ie.value;P(xe)&&(xe=F(xe));var Ue=f(xe,ie.key,Y++);Ue!==void 0?I(Ue):ie.continue()}else I()},G.onerror=function(){C(G.error)}}catch(ie){C(ie)}})}).catch(C)});return w(S,b),S}function Q(f,b,m){var S=this;f=M(f);var I=new E(function(C,R){var V;S.ready().then(function(){return V=S._dbInfo,X.call(b)==="[object Blob]"?ye(V.db).then(function($){return $?b:x(b)}):b}).then(function($){H(S._dbInfo,U,function(G,Y){if(G)return R(G);try{var ie=Y.objectStore(S._dbInfo.storeName);$===null&&($=void 0);var xe=ie.put($,f);Y.oncomplete=function(){$===void 0&&($=null),C($)},Y.onabort=Y.onerror=function(){var Ue=xe.error?xe.error:xe.transaction.error;R(Ue)}}catch(Ue){R(Ue)}})}).catch(R)});return w(I,m),I}function ae(f,b){var m=this;f=M(f);var S=new E(function(I,C){m.ready().then(function(){H(m._dbInfo,U,function(R,V){if(R)return C(R);try{var $=V.objectStore(m._dbInfo.storeName),G=$.delete(f);V.oncomplete=function(){I()},V.onerror=function(){C(G.error)},V.onabort=function(){var Y=G.error?G.error:G.transaction.error;C(Y)}}catch(Y){C(Y)}})}).catch(C)});return w(S,b),S}function ee(f){var b=this,m=new E(function(S,I){b.ready().then(function(){H(b._dbInfo,U,function(C,R){if(C)return I(C);try{var V=R.objectStore(b._dbInfo.storeName),$=V.clear();R.oncomplete=function(){S()},R.onabort=R.onerror=function(){var G=$.error?$.error:$.transaction.error;I(G)}}catch(G){I(G)}})}).catch(I)});return w(m,f),m}function fe(f){var b=this,m=new E(function(S,I){b.ready().then(function(){H(b._dbInfo,Ee,function(C,R){if(C)return I(C);try{var V=R.objectStore(b._dbInfo.storeName),$=V.count();$.onsuccess=function(){S($.result)},$.onerror=function(){I($.error)}}catch(G){I(G)}})}).catch(I)});return w(m,f),m}function ce(f,b){var m=this,S=new E(function(I,C){if(f<0){I(null);return}m.ready().then(function(){H(m._dbInfo,Ee,function(R,V){if(R)return C(R);try{var $=V.objectStore(m._dbInfo.storeName),G=!1,Y=$.openKeyCursor();Y.onsuccess=function(){var ie=Y.result;if(!ie){I(null);return}f===0||G?I(ie.key):(G=!0,ie.advance(f))},Y.onerror=function(){C(Y.error)}}catch(ie){C(ie)}})}).catch(C)});return w(S,b),S}function me(f){var b=this,m=new E(function(S,I){b.ready().then(function(){H(b._dbInfo,Ee,function(C,R){if(C)return I(C);try{var V=R.objectStore(b._dbInfo.storeName),$=V.openKeyCursor(),G=[];$.onsuccess=function(){var Y=$.result;if(!Y){S(G);return}G.push(Y.key),Y.continue()},$.onerror=function(){I($.error)}}catch(Y){I(Y)}})}).catch(I)});return w(m,f),m}function ge(f,b){b=L.apply(this,arguments);var m=this.config();f=typeof f!="function"&&f||{},f.name||(f.name=f.name||m.name,f.storeName=f.storeName||m.storeName);var S=this,I;if(!f.name)I=E.reject("Invalid arguments");else{var C=f.name===m.name&&S._dbInfo.db,R=C?E.resolve(S._dbInfo.db):Ye(f).then(function(V){var $=se[f.name],G=$.forages;$.db=V;for(var Y=0;Y<G.length;Y++)G[Y]._dbInfo.db=V;return V});f.storeName?I=R.then(function(V){if(V.objectStoreNames.contains(f.storeName)){var $=V.version+1;ke(f);var G=se[f.name],Y=G.forages;V.close();for(var ie=0;ie<Y.length;ie++){var xe=Y[ie];xe._dbInfo.db=null,xe._dbInfo.version=$}var Ue=new E(function(He,st){var et=d.open(f.name,$);et.onerror=function(Gt){var Jr=et.result;Jr.close(),st(Gt)},et.onupgradeneeded=function(){var Gt=et.result;Gt.deleteObjectStore(f.storeName)},et.onsuccess=function(){var Gt=et.result;Gt.close(),He(Gt)}});return Ue.then(function(He){G.db=He;for(var st=0;st<Y.length;st++){var et=Y[st];et._dbInfo.db=He,De(et._dbInfo)}}).catch(function(He){throw(Pe(f,He)||E.resolve()).catch(function(){}),He})}}):I=R.then(function(V){ke(f);var $=se[f.name],G=$.forages;V.close();for(var Y=0;Y<G.length;Y++){var ie=G[Y];ie._dbInfo.db=null}var xe=new E(function(Ue,He){var st=d.deleteDatabase(f.name);st.onerror=function(){var et=st.result;et&&et.close(),He(st.error)},st.onblocked=function(){console.warn('dropInstance blocked for database "'+f.name+'" until all open connections are closed')},st.onsuccess=function(){var et=st.result;et&&et.close(),Ue(et)}});return xe.then(function(Ue){$.db=Ue;for(var He=0;He<G.length;He++){var st=G[He];De(st._dbInfo)}}).catch(function(Ue){throw(Pe(f,Ue)||E.resolve()).catch(function(){}),Ue})})}return w(I,b),I}var _e={_driver:"asyncStorage",_initStorage:re,_support:g(),iterate:ue,getItem:oe,setItem:Q,removeItem:ae,clear:ee,length:fe,key:ce,keys:me,dropInstance:ge};function h(){return typeof openDatabase=="function"}var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l="~~local_forage_type~",_=/^~~local_forage_type~([^~]+)~/,T="__lfsc__:",D=T.length,k="arbf",ve="blob",Ie="si08",be="ui08",Ve="uic8",Be="si16",qe="si32",Ft="ur16",$t="ui32",wn="fl32",wt="fl64",kt=D+k.length,Li=Object.prototype.toString;function cl(f){var b=f.length*.75,m=f.length,S,I=0,C,R,V,$;f[f.length-1]==="="&&(b--,f[f.length-2]==="="&&b--);var G=new ArrayBuffer(b),Y=new Uint8Array(G);for(S=0;S<m;S+=4)C=a.indexOf(f[S]),R=a.indexOf(f[S+1]),V=a.indexOf(f[S+2]),$=a.indexOf(f[S+3]),Y[I++]=C<<2|R>>4,Y[I++]=(R&15)<<4|V>>2,Y[I++]=(V&3)<<6|$&63;return G}function vs(f){var b=new Uint8Array(f),m="",S;for(S=0;S<b.length;S+=3)m+=a[b[S]>>2],m+=a[(b[S]&3)<<4|b[S+1]>>4],m+=a[(b[S+1]&15)<<2|b[S+2]>>6],m+=a[b[S+2]&63];return b.length%3===2?m=m.substring(0,m.length-1)+"=":b.length%3===1&&(m=m.substring(0,m.length-2)+"=="),m}function Kp(f,b){var m="";if(f&&(m=Li.call(f)),f&&(m==="[object ArrayBuffer]"||f.buffer&&Li.call(f.buffer)==="[object ArrayBuffer]")){var S,I=T;f instanceof ArrayBuffer?(S=f,I+=k):(S=f.buffer,m==="[object Int8Array]"?I+=Ie:m==="[object Uint8Array]"?I+=be:m==="[object Uint8ClampedArray]"?I+=Ve:m==="[object Int16Array]"?I+=Be:m==="[object Uint16Array]"?I+=Ft:m==="[object Int32Array]"?I+=qe:m==="[object Uint32Array]"?I+=$t:m==="[object Float32Array]"?I+=wn:m==="[object Float64Array]"?I+=wt:b(new Error("Failed to get type for BinaryArray"))),b(I+vs(S))}else if(m==="[object Blob]"){var C=new FileReader;C.onload=function(){var R=l+f.type+"~"+vs(this.result);b(T+ve+R)},C.readAsArrayBuffer(f)}else try{b(JSON.stringify(f))}catch(R){console.error("Couldn't convert value into a JSON string: ",f),b(null,R)}}function Xp(f){if(f.substring(0,D)!==T)return JSON.parse(f);var b=f.substring(kt),m=f.substring(D,kt),S;if(m===ve&&_.test(b)){var I=b.match(_);S=I[1],b=b.substring(I[0].length)}var C=cl(b);switch(m){case k:return C;case ve:return p([C],{type:S});case Ie:return new Int8Array(C);case be:return new Uint8Array(C);case Ve:return new Uint8ClampedArray(C);case Be:return new Int16Array(C);case Ft:return new Uint16Array(C);case qe:return new Int32Array(C);case $t:return new Uint32Array(C);case wn:return new Float32Array(C);case wt:return new Float64Array(C);default:throw new Error("Unkown type: "+m)}}var ys={serialize:Kp,deserialize:Xp,stringToBuffer:cl,bufferToString:vs};function ll(f,b,m,S){f.executeSql("CREATE TABLE IF NOT EXISTS "+b.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],m,S)}function qp(f){var b=this,m={db:null};if(f)for(var S in f)m[S]=typeof f[S]!="string"?f[S].toString():f[S];var I=new E(function(C,R){try{m.db=openDatabase(m.name,String(m.version),m.description,m.size)}catch(V){return R(V)}m.db.transaction(function(V){ll(V,m,function(){b._dbInfo=m,C()},function($,G){R(G)})},R)});return m.serializer=ys,I}function Pn(f,b,m,S,I,C){f.executeSql(m,S,I,function(R,V){V.code===V.SYNTAX_ERR?R.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[b.storeName],function($,G){G.rows.length?C($,V):ll($,b,function(){$.executeSql(m,S,I,C)},C)},C):C(R,V)},C)}function Zp(f,b){var m=this;f=M(f);var S=new E(function(I,C){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(V){Pn(V,R,"SELECT * FROM "+R.storeName+" WHERE key = ? LIMIT 1",[f],function($,G){var Y=G.rows.length?G.rows.item(0).value:null;Y&&(Y=R.serializer.deserialize(Y)),I(Y)},function($,G){C(G)})})}).catch(C)});return w(S,b),S}function Jp(f,b){var m=this,S=new E(function(I,C){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(V){Pn(V,R,"SELECT * FROM "+R.storeName,[],function($,G){for(var Y=G.rows,ie=Y.length,xe=0;xe<ie;xe++){var Ue=Y.item(xe),He=Ue.value;if(He&&(He=R.serializer.deserialize(He)),He=f(He,Ue.key,xe+1),He!==void 0){I(He);return}}I()},function($,G){C(G)})})}).catch(C)});return w(S,b),S}function ul(f,b,m,S){var I=this;f=M(f);var C=new E(function(R,V){I.ready().then(function(){b===void 0&&(b=null);var $=b,G=I._dbInfo;G.serializer.serialize(b,function(Y,ie){ie?V(ie):G.db.transaction(function(xe){Pn(xe,G,"INSERT OR REPLACE INTO "+G.storeName+" (key, value) VALUES (?, ?)",[f,Y],function(){R($)},function(Ue,He){V(He)})},function(xe){if(xe.code===xe.QUOTA_ERR){if(S>0){R(ul.apply(I,[f,$,m,S-1]));return}V(xe)}})})}).catch(V)});return w(C,m),C}function Qp(f,b,m){return ul.apply(this,[f,b,m,1])}function eh(f,b){var m=this;f=M(f);var S=new E(function(I,C){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(V){Pn(V,R,"DELETE FROM "+R.storeName+" WHERE key = ?",[f],function(){I()},function($,G){C(G)})})}).catch(C)});return w(S,b),S}function th(f){var b=this,m=new E(function(S,I){b.ready().then(function(){var C=b._dbInfo;C.db.transaction(function(R){Pn(R,C,"DELETE FROM "+C.storeName,[],function(){S()},function(V,$){I($)})})}).catch(I)});return w(m,f),m}function nh(f){var b=this,m=new E(function(S,I){b.ready().then(function(){var C=b._dbInfo;C.db.transaction(function(R){Pn(R,C,"SELECT COUNT(key) as c FROM "+C.storeName,[],function(V,$){var G=$.rows.item(0).c;S(G)},function(V,$){I($)})})}).catch(I)});return w(m,f),m}function rh(f,b){var m=this,S=new E(function(I,C){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(V){Pn(V,R,"SELECT key FROM "+R.storeName+" WHERE id = ? LIMIT 1",[f+1],function($,G){var Y=G.rows.length?G.rows.item(0).key:null;I(Y)},function($,G){C(G)})})}).catch(C)});return w(S,b),S}function ih(f){var b=this,m=new E(function(S,I){b.ready().then(function(){var C=b._dbInfo;C.db.transaction(function(R){Pn(R,C,"SELECT key FROM "+C.storeName,[],function(V,$){for(var G=[],Y=0;Y<$.rows.length;Y++)G.push($.rows.item(Y).key);S(G)},function(V,$){I($)})})}).catch(I)});return w(m,f),m}function oh(f){return new E(function(b,m){f.transaction(function(S){S.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(I,C){for(var R=[],V=0;V<C.rows.length;V++)R.push(C.rows.item(V).name);b({db:f,storeNames:R})},function(I,C){m(C)})},function(S){m(S)})})}function sh(f,b){b=L.apply(this,arguments);var m=this.config();f=typeof f!="function"&&f||{},f.name||(f.name=f.name||m.name,f.storeName=f.storeName||m.storeName);var S=this,I;return f.name?I=new E(function(C){var R;f.name===m.name?R=S._dbInfo.db:R=openDatabase(f.name,"","",0),f.storeName?C({db:R,storeNames:[f.storeName]}):C(oh(R))}).then(function(C){return new E(function(R,V){C.db.transaction(function($){function G(Ue){return new E(function(He,st){$.executeSql("DROP TABLE IF EXISTS "+Ue,[],function(){He()},function(et,Gt){st(Gt)})})}for(var Y=[],ie=0,xe=C.storeNames.length;ie<xe;ie++)Y.push(G(C.storeNames[ie]));E.all(Y).then(function(){R()}).catch(function(Ue){V(Ue)})},function($){V($)})})}):I=E.reject("Invalid arguments"),w(I,b),I}var ah={_driver:"webSQLStorage",_initStorage:qp,_support:h(),iterate:Jp,getItem:Zp,setItem:Qp,removeItem:eh,clear:th,length:nh,key:rh,keys:ih,dropInstance:sh};function ch(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function dl(f,b){var m=f.name+"/";return f.storeName!==b.storeName&&(m+=f.storeName+"/"),m}function lh(){var f="_localforage_support_test";try{return localStorage.setItem(f,!0),localStorage.removeItem(f),!1}catch{return!0}}function uh(){return!lh()||localStorage.length>0}function dh(f){var b=this,m={};if(f)for(var S in f)m[S]=f[S];return m.keyPrefix=dl(f,b._defaultConfig),uh()?(b._dbInfo=m,m.serializer=ys,E.resolve()):E.reject()}function fh(f){var b=this,m=b.ready().then(function(){for(var S=b._dbInfo.keyPrefix,I=localStorage.length-1;I>=0;I--){var C=localStorage.key(I);C.indexOf(S)===0&&localStorage.removeItem(C)}});return w(m,f),m}function ph(f,b){var m=this;f=M(f);var S=m.ready().then(function(){var I=m._dbInfo,C=localStorage.getItem(I.keyPrefix+f);return C&&(C=I.serializer.deserialize(C)),C});return w(S,b),S}function hh(f,b){var m=this,S=m.ready().then(function(){for(var I=m._dbInfo,C=I.keyPrefix,R=C.length,V=localStorage.length,$=1,G=0;G<V;G++){var Y=localStorage.key(G);if(Y.indexOf(C)===0){var ie=localStorage.getItem(Y);if(ie&&(ie=I.serializer.deserialize(ie)),ie=f(ie,Y.substring(R),$++),ie!==void 0)return ie}}});return w(S,b),S}function mh(f,b){var m=this,S=m.ready().then(function(){var I=m._dbInfo,C;try{C=localStorage.key(f)}catch{C=null}return C&&(C=C.substring(I.keyPrefix.length)),C});return w(S,b),S}function gh(f){var b=this,m=b.ready().then(function(){for(var S=b._dbInfo,I=localStorage.length,C=[],R=0;R<I;R++){var V=localStorage.key(R);V.indexOf(S.keyPrefix)===0&&C.push(V.substring(S.keyPrefix.length))}return C});return w(m,f),m}function _h(f){var b=this,m=b.keys().then(function(S){return S.length});return w(m,f),m}function vh(f,b){var m=this;f=M(f);var S=m.ready().then(function(){var I=m._dbInfo;localStorage.removeItem(I.keyPrefix+f)});return w(S,b),S}function yh(f,b,m){var S=this;f=M(f);var I=S.ready().then(function(){b===void 0&&(b=null);var C=b;return new E(function(R,V){var $=S._dbInfo;$.serializer.serialize(b,function(G,Y){if(Y)V(Y);else try{localStorage.setItem($.keyPrefix+f,G),R(C)}catch(ie){(ie.name==="QuotaExceededError"||ie.name==="NS_ERROR_DOM_QUOTA_REACHED")&&V(ie),V(ie)}})})});return w(I,m),I}function Eh(f,b){if(b=L.apply(this,arguments),f=typeof f!="function"&&f||{},!f.name){var m=this.config();f.name=f.name||m.name,f.storeName=f.storeName||m.storeName}var S=this,I;return f.name?I=new E(function(C){f.storeName?C(dl(f,S._defaultConfig)):C(f.name+"/")}).then(function(C){for(var R=localStorage.length-1;R>=0;R--){var V=localStorage.key(R);V.indexOf(C)===0&&localStorage.removeItem(V)}}):I=E.reject("Invalid arguments"),w(I,b),I}var bh={_driver:"localStorageWrapper",_initStorage:dh,_support:ch(),iterate:hh,getItem:ph,setItem:yh,removeItem:vh,clear:fh,length:_h,key:mh,keys:gh,dropInstance:Eh},wh=function(b,m){return b===m||typeof b=="number"&&typeof m=="number"&&isNaN(b)&&isNaN(m)},Ch=function(b,m){for(var S=b.length,I=0;I<S;){if(wh(b[I],m))return!0;I++}return!1},fl=Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"},Zr={},pl={},fr={INDEXEDDB:_e,WEBSQL:ah,LOCALSTORAGE:bh},Sh=[fr.INDEXEDDB._driver,fr.WEBSQL._driver,fr.LOCALSTORAGE._driver],Fi=["dropInstance"],Es=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Fi),Th={description:"",driver:Sh.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Ih(f,b){f[b]=function(){var m=arguments;return f.ready().then(function(){return f[b].apply(f,m)})}}function bs(){for(var f=1;f<arguments.length;f++){var b=arguments[f];if(b)for(var m in b)b.hasOwnProperty(m)&&(fl(b[m])?arguments[0][m]=b[m].slice():arguments[0][m]=b[m])}return arguments[0]}var xh=function(){function f(b){c(this,f);for(var m in fr)if(fr.hasOwnProperty(m)){var S=fr[m],I=S._driver;this[m]=I,Zr[I]||this.defineDriver(S)}this._defaultConfig=bs({},Th),this._config=bs({},this._defaultConfig,b),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return f.prototype.config=function(m){if((typeof m>"u"?"undefined":s(m))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var S in m){if(S==="storeName"&&(m[S]=m[S].replace(/\W/g,"_")),S==="version"&&typeof m[S]!="number")return new Error("Database version must be a number.");this._config[S]=m[S]}return"driver"in m&&m.driver?this.setDriver(this._config.driver):!0}else return typeof m=="string"?this._config[m]:this._config},f.prototype.defineDriver=function(m,S,I){var C=new E(function(R,V){try{var $=m._driver,G=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!m._driver){V(G);return}for(var Y=Es.concat("_initStorage"),ie=0,xe=Y.length;ie<xe;ie++){var Ue=Y[ie],He=!Ch(Fi,Ue);if((He||m[Ue])&&typeof m[Ue]!="function"){V(G);return}}var st=function(){for(var Jr=function(Dh){return function(){var Nh=new Error("Method "+Dh+" is not implemented by the current driver"),hl=E.reject(Nh);return w(hl,arguments[arguments.length-1]),hl}},ws=0,Ah=Fi.length;ws<Ah;ws++){var Cs=Fi[ws];m[Cs]||(m[Cs]=Jr(Cs))}};st();var et=function(Jr){Zr[$]&&console.info("Redefining LocalForage driver: "+$),Zr[$]=m,pl[$]=Jr,R()};"_support"in m?m._support&&typeof m._support=="function"?m._support().then(et,V):et(!!m._support):et(!0)}catch(Gt){V(Gt)}});return N(C,S,I),C},f.prototype.driver=function(){return this._driver||null},f.prototype.getDriver=function(m,S,I){var C=Zr[m]?E.resolve(Zr[m]):E.reject(new Error("Driver not found."));return N(C,S,I),C},f.prototype.getSerializer=function(m){var S=E.resolve(ys);return N(S,m),S},f.prototype.ready=function(m){var S=this,I=S._driverSet.then(function(){return S._ready===null&&(S._ready=S._initDriver()),S._ready});return N(I,m,m),I},f.prototype.setDriver=function(m,S,I){var C=this;fl(m)||(m=[m]);var R=this._getSupportedDrivers(m);function V(){C._config.driver=C.driver()}function $(ie){return C._extend(ie),V(),C._ready=C._initStorage(C._config),C._ready}function G(ie){return function(){var xe=0;function Ue(){for(;xe<ie.length;){var He=ie[xe];return xe++,C._dbInfo=null,C._ready=null,C.getDriver(He).then($).catch(Ue)}V();var st=new Error("No available storage method found.");return C._driverSet=E.reject(st),C._driverSet}return Ue()}}var Y=this._driverSet!==null?this._driverSet.catch(function(){return E.resolve()}):E.resolve();return this._driverSet=Y.then(function(){var ie=R[0];return C._dbInfo=null,C._ready=null,C.getDriver(ie).then(function(xe){C._driver=xe._driver,V(),C._wrapLibraryMethodsWithReady(),C._initDriver=G(R)})}).catch(function(){V();var ie=new Error("No available storage method found.");return C._driverSet=E.reject(ie),C._driverSet}),N(this._driverSet,S,I),this._driverSet},f.prototype.supports=function(m){return!!pl[m]},f.prototype._extend=function(m){bs(this,m)},f.prototype._getSupportedDrivers=function(m){for(var S=[],I=0,C=m.length;I<C;I++){var R=m[I];this.supports(R)&&S.push(R)}return S},f.prototype._wrapLibraryMethodsWithReady=function(){for(var m=0,S=Es.length;m<S;m++)Ih(this,Es[m])},f.prototype.createInstance=function(m){return new f(m)},f}(),Oh=new xh;i.exports=Oh},{3:3}]},{},[4])(4)})});var Mh={schedule(t,e){let n=setTimeout(t,e);return()=>clearTimeout(n)}};function Ph(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function Lh(t){return!!t&&t.nodeType===Node.ELEMENT_NODE}var Fs;function Fh(t,e){if(!Fs){let n=Element.prototype;Fs=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}return t.nodeType===Node.ELEMENT_NODE?Fs.call(t,e):!1}function kh(t){let e={};return t.forEach(({propName:n,templateName:r,transform:i})=>{e[Ph(r)]=[n,i]}),e}function Vh(t,e){return e.get(xs).resolveComponentFactory(t).inputs}function Bh(t,e){let n=t.childNodes,r=e.map(()=>[]),i=-1;e.some((o,s)=>o==="*"?(i=s,!0):!1);for(let o=0,s=n.length;o<s;++o){let c=n[o],u=Uh(c,e,i);u!==-1&&r[u].push(c)}return r}function Uh(t,e,n){let r=n;return Lh(t)&&e.some((i,o)=>i!=="*"&&Fh(t,i)?(r=o,!0):!1),r}var Hh=10,ks=class{componentFactory;inputMap=new Map;constructor(e,n){this.componentFactory=n.get(xs).resolveComponentFactory(e);for(let r of this.componentFactory.inputs)this.inputMap.set(r.propName,r.templateName)}create(e){return new Vs(this.componentFactory,e,this.inputMap)}},Vs=class{componentFactory;injector;inputMap;eventEmitters=new yl(1);events=this.eventEmitters.pipe(Ol(e=>Bi(...e)));componentRef=null;scheduledDestroyFn=null;initialInputValues=new Map;ngZone;elementZone;appRef;cdScheduler;constructor(e,n,r){this.componentFactory=e,this.injector=n,this.inputMap=r,this.ngZone=this.injector.get(Mt),this.appRef=this.injector.get(Gi),this.cdScheduler=n.get(Nl),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(e){this.runInZone(()=>{if(this.scheduledDestroyFn!==null){this.scheduledDestroyFn(),this.scheduledDestroyFn=null;return}this.componentRef===null&&this.initializeComponent(e)})}disconnect(){this.runInZone(()=>{this.componentRef===null||this.scheduledDestroyFn!==null||(this.scheduledDestroyFn=Mh.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},Hh))})}getInputValue(e){return this.runInZone(()=>this.componentRef===null?this.initialInputValues.get(e):this.componentRef.instance[e])}setInputValue(e,n){if(this.componentRef===null){this.initialInputValues.set(e,n);return}this.runInZone(()=>{this.componentRef.setInput(this.inputMap.get(e)??e,n),this.componentRef.hostView.dirty&&(this.componentRef.changeDetectorRef.markForRefresh(),this.cdScheduler.notify(6))})}initializeComponent(e){let n=Rt.create({providers:[],parent:this.injector}),r=Bh(e,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(n,r,e),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.appRef.attachView(this.componentRef.hostView),this.componentRef.hostView.detectChanges()}initializeInputs(){for(let[e,n]of this.initialInputValues)this.setInputValue(e,n);this.initialInputValues.clear()}initializeOutputs(e){let n=this.componentFactory.outputs.map(({propName:r,templateName:i})=>{let o=e.instance[r];return new _l(s=>{let c=o.subscribe(u=>s.next({name:i,value:u}));return()=>c.unsubscribe()})});this.eventEmitters.next(n)}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}},Bs=class extends HTMLElement{ngElementEventsSubscription=null};function tu(t,e){let n=Vh(t,e.injector),r=e.strategyFactory||new ks(t,e.injector),i=kh(n);class o extends Bs{injector;static observedAttributes=Object.keys(i);get ngElementStrategy(){if(!this._ngElementStrategy){let c=this._ngElementStrategy=r.create(this.injector||e.injector);n.forEach(({propName:u,transform:d})=>{if(!this.hasOwnProperty(u))return;let g=this[u];delete this[u],c.setInputValue(u,g,d)})}return this._ngElementStrategy}_ngElementStrategy;constructor(c){super(),this.injector=c}attributeChangedCallback(c,u,d,g){let[p,E]=i[c];this.ngElementStrategy.setInputValue(p,d,E)}connectedCallback(){let c=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),c=!0),this.ngElementStrategy.connect(this),c||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(c=>{let u=new CustomEvent(c.name,{detail:c.value});this.dispatchEvent(u)})}}return n.forEach(({propName:s,transform:c})=>{Object.defineProperty(o.prototype,s,{get(){return this.ngElementStrategy.getInputValue(s)},set(u){this.ngElementStrategy.setInputValue(s,u,c)},configurable:!0,enumerable:!0})}),o}var nu="9.12.11";var Xe=class t{static SDK_VERSION=nu;static SDK_VERSION_CODE;static SDK="WEB";static LOG_PREFIX="CooeeSDK";static COOEE="cooee";static SESSION_STORAGE_SCROLL_ID="sleid";static IDLE_TIME_IN_SECONDS=30*60;static IN_APP_WRAPPER_NAME="cooee-wrapper";static IN_APP_CONTAINER_NAME="cooee-container";static IN_APP_DEFAULT_PADDING=15;static EVENT_SCREEN_VIEW="CE Screen View";static EVENT_APP_BACKGROUND="CE App Background";static EVENT_TRIGGER_DISPLAYED="CE Trigger Displayed";static EVENT_CAMPAIGN_HOLDOUT="CE Campaign Holdout";static EVENT_CAMPAIGN_REJECTED="CE Campaign Rejected";static EVENT_CAMPAIGN_FAILED="CE Campaign Failed";static EVENT_TRIGGER_CLOSED="CE Trigger Closed";static EVENT_SCROLL="CE Scroll";static EVENT_TRIGGER_CLICKED="CE Trigger Clicked";static EVENT_FORM_SUBMITTED="CE Form Submitted";static EVENT_EXPERIMENT_START="CE Experiment Start";static EVENT_VIDEO_DIALOG_CLOSED="CE Video Dialog Closed";static EVENT_VIDEO_DIALOG_OPENED="CE Video Dialog Opened";static EVENT_VIDEO_CHANGE="CE Video Changed";static EVENT_LAST_VIDEO_ENDED="CE Last Video Ended";static EVENT_VIDEO_MUTED="CE Video Muted";static EVENT_VIDEO_UNMUTED="CE Video Unmuted";static EVENT_ADD_TO_CART_CLICKED="CE Add To Cart Clicked";static EVENT_VIEW_ITEM_CLICKED="CE View Item Clicked";static EVENT_MORE_ITEM_INFO_CLICKED="CE More Item Info Clicked";static EVENT_OPEN_CART_CLICKED="CE Open Cart Clicked";static EVENT_ADD_TO_CART="Add To Cart";static EVENT_REMOVE_FROM_CART="Remove From Cart";static EVENT_VIEW_ITEM="View Item";static EVENT_VIEW_CART="View Cart";static EVENT_OPEN_CART="Open Cart";static EVENT_VIEW_COLLECTION="View Collection";static EVENT_BUY_NOW_CLICKED="Buy Now Clicked";static EVENT_CHECKOUT_STARTED="Checkout Started";static EVENT_REVIEW_CLICKED="Review Clicked";static EVENT_ITEM_THUMBNAIL_CLICKED="Item Thumbnail Clicked";static JS_LOAD_WHITELIST_EVENTS=[this.EVENT_VIEW_ITEM,this.EVENT_VIEW_CART,this.EVENT_VIEW_COLLECTION];static HASH_INITIATE_CHECKOUT="initiate-checkout";static HASH_OPEN_CART_DRAWER="open-cart-drawer";static ADD_BUNDLE_CTA_INBOUND_EVENT="letscooee:inbound:cta:add-bundle";static CTA_OPEN_CART_EVENT="letscooee:outbound:open-cart";static CTA_AFTER_REFRESH_UI="letscooee:outbound:refresh-ui";static POPUP_ACTIVITY_EVENT="letscooee:outbound:popup-activities";static THIRD_PARTY_CHECKOUT_EVENT="letscooee:outbound:third-party-initiate-checkout";static CAMPAIGN_DISPLAYED_ACTIVITY="DISPLAYED";static CAMPAIGN_CLICKED_ACTIVITY="CLICKED";static CAMPAIGN_CLOSED_ACTIVITY="CLOSED";static BLACKLISTED_PAGE_NAMES=["collection","product","cart"];static API_CALL_MAX_ATTEMPTS=3;static API_CALL_RETRY_DELAY=1e3;static PLACEHOLDER_IMAGE="https://cdn.global.letscooee.com/images/placeholders/product.png";static CART_UPDATE_BROADCAST="CART_UPDATE";static GRAPHQL_VERSION="2024-10";static GRAPHQL_API_PATH=`/api/${this.GRAPHQL_VERSION}/graphql.json`;static SHADOW_SPLITTER=":shadow";static CAMPAIGN_ATTRIBUTE="_letscooee_campaign";static CONTENT_ATTRIBUTE="_letscooee_content";static VIA="_via";static PAYMENT_MODAL_DETAILS=[{identifier:"#flo-checkout-wrapper",gateway:"Shopflow"},{identifier:"#fastrr-main-container",gateway:"Shiprocket"},{identifier:"#gokwik-modal-wrapper",gateway:"Gokwik"},{identifier:"#zecpe",gateway:"Ecom 360"}];static{let e=t.SDK_VERSION.split(".").map(n=>n.padStart(2,"0")).join("");t.SDK_VERSION_CODE=parseInt(e,10)}};var xn={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${Xe.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${Xe.SDK_VERSION}/dist/widget.min.js`};var Bt=ki(iu());var Et=class{static log(...e){Bt.default.info(...e)}static debug(...e){Bt.default.debug(...e)}static error(...e){Bt.default.error(...e)}static warn(...e){Bt.default.warn(...e)}static info(...e){Bt.default.info(...e)}static trace(...e){Bt.default.trace(...e)}};function ou(t=Xe.LOG_PREFIX){Bt.default.useDefaults({formatter:function(n){n.unshift(`${t} (v${Xe.SDK_VERSION}):`)}});let e=$h();(e==="1"||e==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?Bt.default.setLevel(Bt.default[localStorage.cooeeLogLevel]):Bt.default.setLevel(xn.debug?Bt.default.TRACE:Bt.default.OFF)}function $h(){return new URL(location.href).searchParams?.get("cooee-debug")}var qr=ki(Us());var au={providers:[jl()]};var Wh={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},GE=we(O({},Wh),{"[class.ng-submitted]":"isSubmitted"});var Yh=new en("",{providedIn:"root",factory:()=>uu}),uu="always";var zh=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=Wn({type:t});static \u0275inj=$n({})}return t})();var du=(()=>{class t{static withConfig(n){return{ngModule:t,providers:[{provide:Yh,useValue:n.callSetDisabledState??uu}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=Wn({type:t});static \u0275inj=$n({imports:[zh]})}return t})();var Yt=class{static SWIPER_CSS="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css";static injectScriptURL(e,n){if(!e)return;let r=document.createElement("script");r.id=n??"",r.src=e,r.type="module",document.head.appendChild(r)}static injectRawScript(e){if(!e)return;let n=document.createElement("script");n.id="cooee-app-script",n.innerHTML=e,document.head.appendChild(n)}static injectRawCSS(e,n=document.head){if(!e)return;let r=document.createElement("style");r.textContent=e,n.appendChild(r)}static injectSwiperCSS(e=document.head){this.injectStylesheet(this.SWIPER_CSS,e)}static injectStylesheet(e,n=document.head){if(!e)return;let r=document.createElement("link");r.rel="stylesheet",r.href=e,e===this.SWIPER_CSS&&(r.crossOrigin="anonymous",r.onload=i=>{let s=i.currentTarget?.sheet?.cssRules;if(s){for(let c of s)if(c.type==CSSRule.FONT_FACE_RULE){let u=e.split("/"),d=u.slice(0,u.length-1).join("/"),g=c.cssText;g=g.replace(/url\s*\(\s*['"]?(?!((\/)|((?:https?:)?\/\/)|(?:data:?:)))([^'")]+)['"]?\s*\)/g,`url("${d}/$4")`);let p=document.createElement("style");p.appendChild(document.createTextNode(g)),document.head.appendChild(p)}}}),n.appendChild(r)}static async loadSwiperScript(){window.CooeeSDK.Swiper||(window.CooeeSDK.Swiper=(await import("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.mjs")).Swiper)}};var un=class t{cooeeEvent=new at;cooeeCTA=new at;elementRef=Z(Ct);_engagementTrigger=Wt(null);_triggerContext=Wt(null);constructor(){this.elementRef.nativeElement.update=this.update.bind(this)}get classes(){let e=["letscooee-widget"],n=this._engagementTrigger();return e.push(`widget-${n?.shortID}`),e}get triggerContext(){return this._triggerContext()}set triggerContext(e){this._triggerContext.set(e),this._engagementTrigger.set(e.triggerData),this.engagementTriggerReceived(e.triggerData)}get engagementTrigger(){return this._engagementTrigger()}ngOnInit(){Et.debug("Init",this.constructor.name);let e=this.elementRef.nativeElement.shadowRoot;e&&(Yt.injectStylesheet(xn.styleURL,e),Yt.injectRawCSS(window.CooeeSDK.config.website.commonCSS,e))}ngOnDestroy(){Et.debug("Destroying",this.constructor.name)}sendEventToRenderer(e){this.cooeeEvent.emit(e)}executeCTAViaRenderer(e){this.cooeeCTA.emit(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Le({type:t,selectors:[["ng-component"]],hostVars:2,hostBindings:function(n,r){n&2&&Fl(r.classes)},inputs:{triggerContext:"triggerContext"},outputs:{cooeeEvent:"cooeeEvent",cooeeCTA:"cooeeCTA"},decls:0,vars:0,template:function(n,r){},encapsulation:2})};var Kh=(t,e,n)=>({"--option-color":t,"background-color":e,color:n}),fu=(t,e)=>e.id;function Xh(t,e){if(t&1&&(W(0,"span",6),Ae(1),z()),t&2){let n=q().$implicit;B(),ln(n.displayName||n.name)}}function qh(t,e){if(t&1){let n=ze();gt(0),W(1,"button",5),Me("click",function(){let i=Ne(n).$implicit,o=q().$implicit,s=q();return Re(s.onOptionChange(o,i))}),Oe(2,Xh,2,1,"span",6),z()}if(t&2){let n=e.$implicit,r=q().$implicit,i=Ke(1),o=q(),s=n.name;B(),ri("color-type",i)("selected",o.selectedOptions()[r.name]===s),pe("disabled",n.disabled)("title",s)("ngStyle",Bl(9,Kh,i?s:"",i?s:"",i?"transparent":"")),Cn("data-value",s),B(),Te(i?-1:2)}}function Zh(t,e){if(t&1&&(W(0,"div"),gt(1),W(2,"div",1),Ae(3),z(),W(4,"div",2),Ae(5),z(),W(6,"div",3),tt(7,qh,3,13,"button",4,fu),z()()),t&2){let n=e.$implicit,r=q();kl("option-group ",n.name.toLowerCase(),""),B(),yt(n.name.toLowerCase().includes("color")),B(2),Tt("",n.name,":"),B(2),ln(r.selectedOptions()[n.name]),B(2),nt(n.optionValues)}}var _r=class t extends un{selectedVariant=new at;item=Hi.required();selectedOptions=Wt({});options=Yi(()=>{let e=this.item();if(!e.options||e.vars.length===1)return[];if(window.cooeeManipulateProductOptions)try{window.cooeeManipulateProductOptions(e)}catch(n){Et.error(n)}return e.options});matchedVariant=Yi(()=>{let e=this.item(),n=this.selectedOptions();return e.vars.find(r=>e.options.every(i=>n[i.name]===r.selectedOptions.find(o=>o.name===i.name)?.value))});constructor(){super(),Ms(()=>{let n=this.matchedVariant();n&&(this.item().setSelectedVariant(n),this.selectedVariant.emit(n))});let e=Ms(()=>{let n=this.item();if(!n?.options)return;let r=O({},this.selectedOptions());n.options.forEach(i=>{let o=n.vars[0]?.selectedOptions.find(s=>s.name===i.name)?.value;o&&(r[i.name]=o)}),this.selectedOptions.set(r),e.destroy()})}onOptionChange(e,n){let r=O({},this.selectedOptions());r[e.name]=n.name,this.selectedOptions.set(r)}engagementTriggerReceived(){}update(){}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Le({type:t,selectors:[["cooee-item-options-picker"]],inputs:{item:[1,"item"]},outputs:{selectedVariant:"selectedVariant"},features:[St],decls:2,vars:0,consts:[[3,"class"],[1,"name"],[1,"selected-value"],[1,"option-values"],[1,"option-value",3,"disabled","color-type","selected","title","ngStyle"],[1,"option-value",3,"click","disabled","title","ngStyle"],[1,"title"]],template:function(n,r){n&1&&tt(0,Zh,9,6,"div",0,fu),n&2&&nt(r.options())},dependencies:[zl,Wl,du],styles:[`.option-group{display:flex;gap:4px;align-items:center}.option-group+.option-group{margin-top:8px}.option-values{display:flex;flex-wrap:nowrap;overflow-x:auto;padding:6px;gap:4px}.selected-value{display:none}.option-value{padding:5px 10px;border:1px solid #ccc;cursor:pointer;border-radius:4px;min-width:32px;min-height:32px;text-align:center;position:relative;--selected-color: var(--option-color, rgb(var(--lc-color-button, 0 0 0)))}.option-value.selected{box-shadow:#fff 0 0 0 2px,var(--selected-color) 0 0 0 4px}
|
|
11
|
+
`],encapsulation:3})};var Hs=function(t){return t.SHOPIFY_CHECKOUT="shopify_checkout",t.THIRD_PARTY_CHECKOUT="third_party_checkout",t.CART_PAGE="cart_page",t.CART_DRAWER="cart_drawer",t}(Hs||{});var Ut=function(t){return t[t.NONE=0]="NONE",t[t.REJECT_POPUP=1]="REJECT_POPUP",t[t.ACCEPT_POPUP=2]="ACCEPT_POPUP",t[t.GO_TO_URL=4]="GO_TO_URL",t[t.SHARE=5]="SHARE",t[t.KEY_VALUE=100]="KEY_VALUE",t[t.GO_TO_PRODUCT=101]="GO_TO_PRODUCT",t[t.ADD_TO_CART=102]="ADD_TO_CART",t[t.COPY_COUPON_CODE=103]="COPY_COUPON_CODE",t[t.GO_TO_COLLECTION=104]="GO_TO_COLLECTION",t[t.OPEN_CART=105]="OPEN_CART",t[t.SUBMIT_FORM=106]="SUBMIT_FORM",t[t.INITIATE_CHECKOUT=107]="INITIATE_CHECKOUT",t[t.ADD_BUNDLE=108]="ADD_BUNDLE",t[t.UPGRADE_TO_SUBSCRIPTION=109]="UPGRADE_TO_SUBSCRIPTION",t}(Ut||{});var si=function(t){return t.FREE_SHIPPING="FREE_SHIPPING",t.DISCOUNT="DISCOUNT",t.FREE_AUTO_GIFT="FREE_AUTO_GIFT",t.FREE_GIFT_SELECT="FREE_GIFT_SELECT",t.UI_ONLY="UI_ONLY",t}(si||{});var vr=class{id;mID;vID;vName;imageURL;name;link;quantity;price;finalPrice;constructor(e){this.id=e.id,this.mID=e.mID,this.vID=e.vID,this.vName=e.vName,this.imageURL=e.imageURL,this.name=e.name,this.link=e.link,this.quantity=e.quantity,this.price=e.price,this.finalPrice=e.finalPrice??e.price}};var js=(n=>(n.CART_AMOUNT="CART_AMOUNT",n.ITEM_COUNT="ITEM_COUNT",n))(js||{});var yr=class{gaEnabled;gaMeasurementID;pixelPush;website;currencyCount;money;storefrontToken;skipItemAttribute;currency;static get(){return window.CooeeSDK.config}update(e){return e??={},this.gaEnabled=e.gaEnabled,this.gaMeasurementID=e.gaMeasurementID,this.pixelPush=e.pixelPush,this.website=e.website??{},this.currencyCount=e.currencyCount??0,this.money=e.money,this.currency=e.currency,this.storefrontToken=e.storefrontToken,this.skipItemAttribute=e.skipItemAttribute,this}};var de=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var Ce=globalThis;var dn="9.42.0";function qn(){return Zn(Ce),Ce}function Zn(t){let e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||dn,e[dn]=e[dn]||{}}function On(t,e,n=Ce){let r=n.__SENTRY__=n.__SENTRY__||{},i=r[dn]=r[dn]||{};return i[t]||(i[t]=e())}var $s=["debug","info","warn","error","log","assert","trace"],Jh="Sentry Logger ",Er={};function kn(t){if(!("console"in Ce))return t();let e=Ce.console,n={},r=Object.keys(Er);r.forEach(i=>{let o=Er[i];n[i]=e[i],e[i]=o});try{return t()}finally{r.forEach(i=>{e[i]=n[i]})}}function Qh(){Ws().enabled=!0}function em(){Ws().enabled=!1}function pu(){return Ws().enabled}function tm(...t){Gs("log",...t)}function nm(...t){Gs("warn",...t)}function rm(...t){Gs("error",...t)}function Gs(t,...e){de&&pu()&&kn(()=>{Ce.console[t](`${Jh}[${t}]:`,...e)})}function Ws(){return de?On("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var ne={enable:Qh,disable:em,isEnabled:pu,log:tm,warn:nm,error:rm};var fn="?",hu=/\(error: (.*)\)/,mu=/captureMessage|captureException/;function zs(...t){let e=t.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{let o=[],s=n.split(`
|
|
12
12
|
`);for(let c=r;c<s.length;c++){let u=s[c];if(u.length>1024)continue;let d=hu.test(u)?u.replace(hu,"$1"):u;if(!d.match(/\S*Error: /)){for(let g of e){let p=g(d);if(p){o.push(p);break}}if(o.length>=50+i)break}}return gu(o.slice(i))}}function gu(t){if(!t.length)return[];let e=Array.from(t);return/sentryWrapped/.test(Ji(e).function||"")&&e.pop(),e.reverse(),mu.test(Ji(e).function||"")&&(e.pop(),mu.test(Ji(e).function||"")&&e.pop()),e.slice(0,50).map(n=>we(O({},n),{filename:n.filename||Ji(e).filename,function:n.function||fn}))}function Ji(t){return t[t.length-1]||{}}var Ys="<anonymous>";function Kt(t){try{return!t||typeof t!="function"?Ys:t.name||Ys}catch{return Ys}}function Qi(t){let e=t.exception;if(e){let n=[];try{return e.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}var eo={},_u={};function xt(t,e){eo[t]=eo[t]||[],eo[t].push(e)}function Ot(t,e){if(!_u[t]){_u[t]=!0;try{e()}catch(n){de&&ne.error(`Error while instrumenting ${t}`,n)}}}function lt(t,e){let n=t&&eo[t];if(n)for(let r of n)try{r(e)}catch(i){de&&ne.error(`Error while triggering instrumentation handler.
|
|
13
13
|
Type: ${t}
|
|
14
14
|
Name: ${Kt(r)}
|
|
15
|
-
Error:`,i)}}var Ks=null;function Xs(t){let e="error";xt(e,t),Ot(e,im)}function im(){Ks=Ce.onerror,Ce.onerror=function(t,e,n,r,i){return lt("error",{column:r,error:i,line:n,msg:t,url:e}),Ks?Ks.apply(this,arguments):!1},Ce.onerror.__SENTRY_INSTRUMENTED__=!0}var qs=null;function Zs(t){let e="unhandledrejection";xt(e,t),Ot(e,om)}function om(){qs=Ce.onunhandledrejection,Ce.onunhandledrejection=function(t){return lt("unhandledrejection",t),qs?qs.apply(this,arguments):!0},Ce.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var vu=Object.prototype.toString;function Qn(t){switch(vu.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return sn(t,Error)}}function br(t,e){return vu.call(t)===`[object ${e}]`}function to(t){return br(t,"ErrorEvent")}function no(t){return br(t,"DOMError")}function Js(t){return br(t,"DOMException")}function At(t){return br(t,"String")}function wr(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function er(t){return t===null||wr(t)||typeof t!="object"&&typeof t!="function"}function An(t){return br(t,"Object")}function tr(t){return typeof Event<"u"&&sn(t,Event)}function Qs(t){return typeof Element<"u"&&sn(t,Element)}function ea(t){return br(t,"RegExp")}function Dn(t){return!!(t?.then&&typeof t.then=="function")}function ta(t){return An(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function sn(t,e){try{return t instanceof e}catch{return!1}}function si(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue))}function yu(t){return typeof Request<"u"&&sn(t,Request)}var na=Ce,sm=80;function ai(t,e={}){if(!t)return"<unknown>";try{let n=t,r=5,i=[],o=0,s=0,c=" > ",u=c.length,d,g=Array.isArray(e)?e:e.keyAttrs,p=!Array.isArray(e)&&e.maxStringLength||sm;for(;n&&o++<r&&(d=am(n,g),!(d==="html"||o>1&&s+i.length*u+d.length>=p));)i.push(d),s+=d.length,n=n.parentNode;return i.reverse().join(c)}catch{return"<unknown>"}}function am(t,e){let n=t,r=[];if(!n?.tagName)return"";if(na.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());let i=e?.length?e.filter(s=>n.getAttribute(s)).map(s=>[s,n.getAttribute(s)]):null;if(i?.length)i.forEach(s=>{r.push(`[${s[0]}="${s[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let s=n.className;if(s&&At(s)){let c=s.split(/\s+/);for(let u of c)r.push(`.${u}`)}}let o=["aria-label","type","name","title","alt"];for(let s of o){let c=n.getAttribute(s);c&&r.push(`[${s}="${c}"]`)}return r.join("")}function ci(){try{return na.document.location.href}catch{return""}}function ra(t){if(!na.HTMLElement)return null;let e=t,n=5;for(let r=0;r<n;r++){if(!e)return null;if(e instanceof HTMLElement){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}e=e.parentNode}return null}function Vn(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function ro(t,e){if(!Array.isArray(t))return"";let n=[];for(let r=0;r<t.length;r++){let i=t[r];try{si(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(e)}function Eu(t,e,n=!1){return At(t)?ea(e)?e.test(t):At(e)?n?t===e:t.includes(e):!1:!1}function Cr(t,e=[],n=!1){return e.some(r=>Eu(t,r,n))}function ut(t,e,n){if(!(e in t))return;let r=t[e];if(typeof r!="function")return;let i=n(r);typeof i=="function"&&io(i,r);try{t[e]=i}catch{de&&ne.log(`Failed to replace method "${e}" in object`,t)}}function Ht(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{de&&ne.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function io(t,e){try{let n=e.prototype||{};t.prototype=e.prototype=n,Ht(t,"__sentry_original__",e)}catch{}}function nr(t){return t.__sentry_original__}function oo(t){if(Qn(t))return O({message:t.message,name:t.name,stack:t.stack},wu(t));if(tr(t)){let e=O({type:t.type,target:bu(t.target),currentTarget:bu(t.currentTarget)},wu(t));return typeof CustomEvent<"u"&&sn(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function bu(t){try{return Qs(t)?ai(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function wu(t){if(typeof t=="object"&&t!==null){let e={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}else return{}}function ia(t,e=40){let n=Object.keys(oo(t));n.sort();let r=n[0];if(!r)return"[object has no keys]";if(r.length>=e)return Vn(r,e);for(let i=n.length;i>0;i--){let o=n.slice(0,i).join(", ");if(!(o.length>e))return i===n.length?o:Vn(o,e)}return""}function cm(){let t=Ce;return t.crypto||t.msCrypto}function dt(t=cm()){let e=()=>Math.random()*16;try{if(t?.randomUUID)return t.randomUUID().replace(/-/g,"");t?.getRandomValues&&(e=()=>{let n=new Uint8Array(1);return t.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(e()&15)>>n/4).toString(16))}function Cu(t){return t.exception?.values?.[0]}function pn(t){let{message:e,event_id:n}=t;if(e)return e;let r=Cu(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Sr(t,e,n){let r=t.exception=t.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=e||""),o.type||(o.type=n||"Error")}function hn(t,e){let n=Cu(t);if(!n)return;let r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism=O(O(O({},r),i),e),e&&"data"in e){let o=O(O({},i?.data),e.data);n.mechanism.data=o}}function so(t){if(lm(t))return!0;try{Ht(t,"__sentry_captured__",!0)}catch{}return!1}function lm(t){try{return t.__sentry_captured__}catch{}}var Tu=1e3;function mn(){return Date.now()/Tu}function um(){let{performance:t}=Ce;if(!t?.now||!t.timeOrigin)return mn;let e=t.timeOrigin;return()=>(e+t.now())/Tu}var Su;function Lt(){return(Su??(Su=um()))()}function Iu(t){let e=Lt(),n={sid:dt(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>dm(n)};return t&&Nn(n,t),n}function Nn(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||Lt(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:dt()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{let n=t.timestamp-t.started;t.duration=n>=0?n:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}function xu(t,e){let n={};e?n={status:e}:t.status==="ok"&&(n={status:"exited"}),Nn(t,n)}function dm(t){return{sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did=="number"||typeof t.did=="string"?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}}}function Bn(t,e,n=2){if(!e||typeof e!="object"||n<=0)return e;if(t&&Object.keys(e).length===0)return t;let r=O({},t);for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=Bn(r[i],e[i],n-1));return r}function oa(){return dt()}function ao(){return dt().substring(16)}var sa="_sentrySpan";function aa(t,e){e?Ht(t,sa,e):delete t[sa]}function ca(t){return t[sa]}var fm=100,bt=class t{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:oa(),sampleRand:Math.random()}}clone(){let e=new t;return e._breadcrumbs=[...this._breadcrumbs],e._tags=O({},this._tags),e._extra=O({},this._extra),e._contexts=O({},this._contexts),this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._attachments=[...this._attachments],e._sdkProcessingMetadata=O({},this._sdkProcessingMetadata),e._propagationContext=O({},this._propagationContext),e._client=this._client,e._lastEventId=this._lastEventId,aa(e,ca(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Nn(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(e){return this._tags=O(O({},this._tags),e),this._notifyScopeListeners(),this}setTag(e,n){return this._tags=we(O({},this._tags),{[e]:n}),this._notifyScopeListeners(),this}setExtras(e){return this._extra=O(O({},this._extra),e),this._notifyScopeListeners(),this}setExtra(e,n){return this._extra=we(O({},this._extra),{[e]:n}),this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,n){return n===null?delete this._contexts[e]:this._contexts[e]=n,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;let n=typeof e=="function"?e(this):e,r=n instanceof t?n.getScopeData():An(n)?e:void 0,{tags:i,extra:o,user:s,contexts:c,level:u,fingerprint:d=[],propagationContext:g}=r||{};return this._tags=O(O({},this._tags),i),this._extra=O(O({},this._extra),o),this._contexts=O(O({},this._contexts),c),s&&Object.keys(s).length&&(this._user=s),u&&(this._level=u),d.length&&(this._fingerprint=d),g&&(this._propagationContext=g),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,aa(this,void 0),this._attachments=[],this.setPropagationContext({traceId:oa(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(e,n){let r=typeof n=="number"?n:fm;if(r<=0)return this;let i=we(O({timestamp:mn()},e),{message:e.message?Vn(e.message,2048):e.message});return this._breadcrumbs.push(i),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:ca(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Bn(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){let r=n?.event_id||dt();if(!this._client)return de&&ne.warn("No client configured on scope - will not capture exception!"),r;let i=new Error("Sentry syntheticException");return this._client.captureException(e,we(O({originalException:e,syntheticException:i},n),{event_id:r}),this),r}captureMessage(e,n,r){let i=r?.event_id||dt();if(!this._client)return de&&ne.warn("No client configured on scope - will not capture message!"),i;let o=new Error(e);return this._client.captureMessage(e,n,we(O({originalException:e,syntheticException:o},r),{event_id:i}),this),i}captureEvent(e,n){let r=n?.event_id||dt();return this._client?(this._client.captureEvent(e,we(O({},n),{event_id:r}),this),r):(de&&ne.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}};function Ou(){return On("defaultCurrentScope",()=>new bt)}function Au(){return On("defaultIsolationScope",()=>new bt)}var la=class{constructor(e,n){let r;e?r=e:r=new bt;let i;n?i=n:i=new bt,this._stack=[{scope:r}],this._isolationScope=i}withScope(e){let n=this._pushScope(),r;try{r=e(n)}catch(i){throw this._popScope(),i}return Dn(r)?r.then(i=>(this._popScope(),i),i=>{throw this._popScope(),i}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function Tr(){let t=Zn(),e=Jn(t);return e.stack=e.stack||new la(Ou(),Au())}function pm(t){return Tr().withScope(t)}function hm(t,e){let n=Tr();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function Du(t){return Tr().withScope(()=>t(Tr().getIsolationScope()))}function Nu(){return{withIsolationScope:Du,withScope:pm,withSetScope:hm,withSetIsolationScope:(t,e)=>Du(e),getCurrentScope:()=>Tr().getScope(),getIsolationScope:()=>Tr().getIsolationScope()}}function co(t){let e=Jn(t);return e.acs?e.acs:Nu()}function gn(){let t=Zn();return co(t).getCurrentScope()}function _n(){let t=Zn();return co(t).getIsolationScope()}function lo(){return On("globalScope",()=>new bt)}function li(...t){let e=Zn(),n=co(e);if(t.length===2){let[r,i]=t;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(t[0])}function Ye(){return gn().getClient()}function ua(t){let e=t.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:i}=e,o={trace_id:n,span_id:i||ao()};return r&&(o.parent_span_id=r),o}var uo="sentry.source",da="sentry.sample_rate",Ru="sentry.previous_trace_sample_rate",fa="sentry.op",pa="sentry.origin";var ha="sentry.profile_id",ma="sentry.exclusive_time";var mm="_sentryScope",gm="_sentryIsolationScope";function fo(t){return{scope:t[mm],isolationScope:t[gm]}}var _m="sentry-",vm=/^sentry-/;function Pu(t){let e=ym(t);if(!e)return;let n=Object.entries(e).reduce((r,[i,o])=>{if(i.match(vm)){let s=i.slice(_m.length);r[s]=o}return r},{});if(Object.keys(n).length>0)return n}function ym(t){if(!(!t||!At(t)&&!Array.isArray(t)))return Array.isArray(t)?t.reduce((e,n)=>{let r=Mu(n);return Object.entries(r).forEach(([i,o])=>{e[i]=o}),e},{}):Mu(t)}function Mu(t){return t.split(",").map(e=>e.split("=").map(n=>{try{return decodeURIComponent(n.trim())}catch{return}})).reduce((e,[n,r])=>(n&&r&&(e[n]=r),e),{})}function Lu(t){if(typeof t=="boolean")return Number(t);let e=typeof t=="string"?parseFloat(t):t;if(!(typeof e!="number"||isNaN(e)||e<0||e>1))return e}var Bu=1,Fu=!1;function ga(t){let{spanId:e,traceId:n,isRemote:r}=t.spanContext(),i=r?e:Ir(t).parent_span_id,o=fo(t).scope,s=r?o?.getPropagationContext().propagationSpanId||ao():e;return{parent_span_id:i,span_id:s,trace_id:n}}function Em(t){if(t&&t.length>0)return t.map(s=>{var c=s,{context:u}=c,d=u,{spanId:e,traceId:n,traceFlags:r}=d,i=ml(d,["spanId","traceId","traceFlags"]),{attributes:o}=c;return O({span_id:e,trace_id:n,sampled:r===Bu,attributes:o},i)})}function ku(t){return typeof t=="number"?Vu(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Vu(t.getTime()):Lt()}function Vu(t){return t>9999999999?t/1e3:t}function Ir(t){if(wm(t))return t.getSpanJSON();let{spanId:e,traceId:n}=t.spanContext();if(bm(t)){let{attributes:r,startTime:i,name:o,endTime:s,status:c,links:u}=t,d="parentSpanId"in t?t.parentSpanId:"parentSpanContext"in t?t.parentSpanContext?.spanId:void 0;return{span_id:e,trace_id:n,data:r,description:o,parent_span_id:d,start_timestamp:ku(i),timestamp:ku(s)||void 0,status:Cm(c),op:r[fa],origin:r[pa],links:Em(u)}}return{span_id:e,trace_id:n,start_timestamp:0,data:{}}}function bm(t){let e=t;return!!e.attributes&&!!e.startTime&&!!e.name&&!!e.endTime&&!!e.status}function wm(t){return typeof t.getSpanJSON=="function"}function Uu(t){let{traceFlags:e}=t.spanContext();return e===Bu}function Cm(t){if(!(!t||t.code===0))return t.code===1?"ok":t.message||"unknown_error"}var Sm="_sentryRootSpan";function ui(t){return t[Sm]||t}function _a(){Fu||(kn(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),Fu=!0)}function Hu(t){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let e=t||Ye()?.getOptions();return!!e&&(e.tracesSampleRate!=null||!!e.tracesSampler)}var xr="production";var Tm=/^o(\d+)\./,Im=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function xm(t){return t==="http"||t==="https"}function Un(t,e=!1){let{host:n,path:r,pass:i,port:o,projectId:s,protocol:c,publicKey:u}=t;return`${c}://${u}${e&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${s}`}function Om(t){let e=Im.exec(t);if(!e){kn(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});return}let[n,r,i="",o="",s="",c=""]=e.slice(1),u="",d=c,g=d.split("/");if(g.length>1&&(u=g.slice(0,-1).join("/"),d=g.pop()),d){let p=d.match(/^\d+/);p&&(d=p[0])}return ju({host:o,pass:i,path:u,projectId:d,port:s,protocol:n,publicKey:r})}function ju(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function Am(t){if(!de)return!0;let{port:e,projectId:n,protocol:r}=t;return["protocol","publicKey","host","projectId"].find(s=>t[s]?!1:(ne.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:n.match(/^\d+$/)?xm(r)?e&&isNaN(parseInt(e,10))?(ne.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(ne.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(ne.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function $u(t){return t.match(Tm)?.[1]}function Gu(t){let e=typeof t=="string"?Om(t):ju(t);if(!(!e||!Am(e)))return e}var Dm="_frozenDsc";function Wu(t,e){let n=e.getOptions(),{publicKey:r,host:i}=e.getDsn()||{},o;n.orgId?o=String(n.orgId):i&&(o=$u(i));let s={environment:n.environment||xr,release:n.release,public_key:r,trace_id:t,org_id:o};return e.emit("createDsc",s),s}function Yu(t,e){let n=e.getPropagationContext();return n.dsc||Wu(n.traceId,t)}function va(t){let e=Ye();if(!e)return{};let n=ui(t),r=Ir(n),i=r.data,o=n.spanContext().traceState,s=o?.get("sentry.sample_rate")??i[da]??i[Ru];function c(N){return(typeof s=="number"||typeof s=="string")&&(N.sample_rate=`${s}`),N}let u=n[Dm];if(u)return c(u);let d=o?.get("sentry.dsc"),g=d&&Pu(d);if(g)return c(g);let p=Wu(t.spanContext().traceId,e),E=i[uo],w=r.description;return E!=="url"&&w&&(p.transaction=w),Hu()&&(p.sampled=String(Uu(n)),p.sample_rand=o?.get("sentry.sample_rand")??fo(n).scope?.getPropagationContext().sampleRand.toString()),c(p),e.emit("createDsc",p,n),p}function Xt(t,e=100,n=1/0){try{return ya("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function po(t,e=3,n=100*1024){let r=Xt(t,e);return Pm(r)>n?po(t,e-1,n):r}function ya(t,e,n=1/0,r=1/0,i=Lm()){let[o,s]=i;if(e==null||["boolean","string"].includes(typeof e)||typeof e=="number"&&Number.isFinite(e))return e;let c=Nm(t,e);if(!c.startsWith("[object "))return c;if(e.__sentry_skip_normalization__)return e;let u=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:n;if(u===0)return c.replace("object ","");if(o(e))return"[Circular ~]";let d=e;if(d&&typeof d.toJSON=="function")try{let w=d.toJSON();return ya("",w,u-1,r,i)}catch{}let g=Array.isArray(e)?[]:{},p=0,E=oo(e);for(let w in E){if(!Object.prototype.hasOwnProperty.call(E,w))continue;if(p>=r){g[w]="[MaxProperties ~]";break}let N=E[w];g[w]=ya(w,N,u-1,r,i),p++}return s(e),g}function Nm(t,e){try{if(t==="domain"&&e&&typeof e=="object"&&e._events)return"[Domain]";if(t==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&e===global)return"[Global]";if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(si(e))return"[VueViewModel]";if(ta(e))return"[SyntheticEvent]";if(typeof e=="number"&&!Number.isFinite(e))return`[${e}]`;if(typeof e=="function")return`[Function: ${Kt(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;let n=Rm(e);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Rm(t){let e=Object.getPrototypeOf(t);return e?.constructor?e.constructor.name:"null prototype"}function Mm(t){return~-encodeURI(t).split(/%..|./).length}function Pm(t){return Mm(JSON.stringify(t))}function Lm(){let t=new WeakSet;function e(r){return t.has(r)?!0:(t.add(r),!1)}function n(r){t.delete(r)}return[e,n]}function Rn(t,e=[]){return[t,e]}function zu(t,e){let[n,r]=t;return[n,[...r,e]]}function ba(t,e){let n=t[1];for(let r of n){let i=r[0].type;if(e(r,i))return!0}return!1}function Ea(t){let e=Jn(Ce);return e.encodePolyfill?e.encodePolyfill(t):new TextEncoder().encode(t)}function Ku(t){let[e,n]=t,r=JSON.stringify(e);function i(o){typeof r=="string"?r=typeof o=="string"?r+o:[Ea(r),o]:r.push(typeof o=="string"?Ea(o):o)}for(let o of n){let[s,c]=o;if(i(`
|
|
15
|
+
Error:`,i)}}var Ks=null;function Xs(t){let e="error";xt(e,t),Ot(e,im)}function im(){Ks=Ce.onerror,Ce.onerror=function(t,e,n,r,i){return lt("error",{column:r,error:i,line:n,msg:t,url:e}),Ks?Ks.apply(this,arguments):!1},Ce.onerror.__SENTRY_INSTRUMENTED__=!0}var qs=null;function Zs(t){let e="unhandledrejection";xt(e,t),Ot(e,om)}function om(){qs=Ce.onunhandledrejection,Ce.onunhandledrejection=function(t){return lt("unhandledrejection",t),qs?qs.apply(this,arguments):!0},Ce.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var vu=Object.prototype.toString;function Jn(t){switch(vu.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return on(t,Error)}}function br(t,e){return vu.call(t)===`[object ${e}]`}function to(t){return br(t,"ErrorEvent")}function no(t){return br(t,"DOMError")}function Js(t){return br(t,"DOMException")}function At(t){return br(t,"String")}function wr(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function Qn(t){return t===null||wr(t)||typeof t!="object"&&typeof t!="function"}function An(t){return br(t,"Object")}function er(t){return typeof Event<"u"&&on(t,Event)}function Qs(t){return typeof Element<"u"&&on(t,Element)}function ea(t){return br(t,"RegExp")}function Dn(t){return!!(t?.then&&typeof t.then=="function")}function ta(t){return An(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function on(t,e){try{return t instanceof e}catch{return!1}}function ai(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue))}function yu(t){return typeof Request<"u"&&on(t,Request)}var na=Ce,sm=80;function ci(t,e={}){if(!t)return"<unknown>";try{let n=t,r=5,i=[],o=0,s=0,c=" > ",u=c.length,d,g=Array.isArray(e)?e:e.keyAttrs,p=!Array.isArray(e)&&e.maxStringLength||sm;for(;n&&o++<r&&(d=am(n,g),!(d==="html"||o>1&&s+i.length*u+d.length>=p));)i.push(d),s+=d.length,n=n.parentNode;return i.reverse().join(c)}catch{return"<unknown>"}}function am(t,e){let n=t,r=[];if(!n?.tagName)return"";if(na.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());let i=e?.length?e.filter(s=>n.getAttribute(s)).map(s=>[s,n.getAttribute(s)]):null;if(i?.length)i.forEach(s=>{r.push(`[${s[0]}="${s[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let s=n.className;if(s&&At(s)){let c=s.split(/\s+/);for(let u of c)r.push(`.${u}`)}}let o=["aria-label","type","name","title","alt"];for(let s of o){let c=n.getAttribute(s);c&&r.push(`[${s}="${c}"]`)}return r.join("")}function li(){try{return na.document.location.href}catch{return""}}function ra(t){if(!na.HTMLElement)return null;let e=t,n=5;for(let r=0;r<n;r++){if(!e)return null;if(e instanceof HTMLElement){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}e=e.parentNode}return null}function Vn(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function ro(t,e){if(!Array.isArray(t))return"";let n=[];for(let r=0;r<t.length;r++){let i=t[r];try{ai(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(e)}function Eu(t,e,n=!1){return At(t)?ea(e)?e.test(t):At(e)?n?t===e:t.includes(e):!1:!1}function Cr(t,e=[],n=!1){return e.some(r=>Eu(t,r,n))}function ut(t,e,n){if(!(e in t))return;let r=t[e];if(typeof r!="function")return;let i=n(r);typeof i=="function"&&io(i,r);try{t[e]=i}catch{de&&ne.log(`Failed to replace method "${e}" in object`,t)}}function Ht(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{de&&ne.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function io(t,e){try{let n=e.prototype||{};t.prototype=e.prototype=n,Ht(t,"__sentry_original__",e)}catch{}}function tr(t){return t.__sentry_original__}function oo(t){if(Jn(t))return O({message:t.message,name:t.name,stack:t.stack},wu(t));if(er(t)){let e=O({type:t.type,target:bu(t.target),currentTarget:bu(t.currentTarget)},wu(t));return typeof CustomEvent<"u"&&on(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function bu(t){try{return Qs(t)?ci(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function wu(t){if(typeof t=="object"&&t!==null){let e={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}else return{}}function ia(t,e=40){let n=Object.keys(oo(t));n.sort();let r=n[0];if(!r)return"[object has no keys]";if(r.length>=e)return Vn(r,e);for(let i=n.length;i>0;i--){let o=n.slice(0,i).join(", ");if(!(o.length>e))return i===n.length?o:Vn(o,e)}return""}function cm(){let t=Ce;return t.crypto||t.msCrypto}function dt(t=cm()){let e=()=>Math.random()*16;try{if(t?.randomUUID)return t.randomUUID().replace(/-/g,"");t?.getRandomValues&&(e=()=>{let n=new Uint8Array(1);return t.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(e()&15)>>n/4).toString(16))}function Cu(t){return t.exception?.values?.[0]}function pn(t){let{message:e,event_id:n}=t;if(e)return e;let r=Cu(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Sr(t,e,n){let r=t.exception=t.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=e||""),o.type||(o.type=n||"Error")}function hn(t,e){let n=Cu(t);if(!n)return;let r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism=O(O(O({},r),i),e),e&&"data"in e){let o=O(O({},i?.data),e.data);n.mechanism.data=o}}function so(t){if(lm(t))return!0;try{Ht(t,"__sentry_captured__",!0)}catch{}return!1}function lm(t){try{return t.__sentry_captured__}catch{}}var Tu=1e3;function mn(){return Date.now()/Tu}function um(){let{performance:t}=Ce;if(!t?.now||!t.timeOrigin)return mn;let e=t.timeOrigin;return()=>(e+t.now())/Tu}var Su;function Lt(){return(Su??(Su=um()))()}function Iu(t){let e=Lt(),n={sid:dt(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>dm(n)};return t&&Nn(n,t),n}function Nn(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||Lt(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:dt()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{let n=t.timestamp-t.started;t.duration=n>=0?n:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}function xu(t,e){let n={};e?n={status:e}:t.status==="ok"&&(n={status:"exited"}),Nn(t,n)}function dm(t){return{sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did=="number"||typeof t.did=="string"?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}}}function Bn(t,e,n=2){if(!e||typeof e!="object"||n<=0)return e;if(t&&Object.keys(e).length===0)return t;let r=O({},t);for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=Bn(r[i],e[i],n-1));return r}function oa(){return dt()}function ao(){return dt().substring(16)}var sa="_sentrySpan";function aa(t,e){e?Ht(t,sa,e):delete t[sa]}function ca(t){return t[sa]}var fm=100,bt=class t{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:oa(),sampleRand:Math.random()}}clone(){let e=new t;return e._breadcrumbs=[...this._breadcrumbs],e._tags=O({},this._tags),e._extra=O({},this._extra),e._contexts=O({},this._contexts),this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._attachments=[...this._attachments],e._sdkProcessingMetadata=O({},this._sdkProcessingMetadata),e._propagationContext=O({},this._propagationContext),e._client=this._client,e._lastEventId=this._lastEventId,aa(e,ca(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Nn(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(e){return this._tags=O(O({},this._tags),e),this._notifyScopeListeners(),this}setTag(e,n){return this._tags=we(O({},this._tags),{[e]:n}),this._notifyScopeListeners(),this}setExtras(e){return this._extra=O(O({},this._extra),e),this._notifyScopeListeners(),this}setExtra(e,n){return this._extra=we(O({},this._extra),{[e]:n}),this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,n){return n===null?delete this._contexts[e]:this._contexts[e]=n,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;let n=typeof e=="function"?e(this):e,r=n instanceof t?n.getScopeData():An(n)?e:void 0,{tags:i,extra:o,user:s,contexts:c,level:u,fingerprint:d=[],propagationContext:g}=r||{};return this._tags=O(O({},this._tags),i),this._extra=O(O({},this._extra),o),this._contexts=O(O({},this._contexts),c),s&&Object.keys(s).length&&(this._user=s),u&&(this._level=u),d.length&&(this._fingerprint=d),g&&(this._propagationContext=g),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,aa(this,void 0),this._attachments=[],this.setPropagationContext({traceId:oa(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(e,n){let r=typeof n=="number"?n:fm;if(r<=0)return this;let i=we(O({timestamp:mn()},e),{message:e.message?Vn(e.message,2048):e.message});return this._breadcrumbs.push(i),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:ca(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Bn(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){let r=n?.event_id||dt();if(!this._client)return de&&ne.warn("No client configured on scope - will not capture exception!"),r;let i=new Error("Sentry syntheticException");return this._client.captureException(e,we(O({originalException:e,syntheticException:i},n),{event_id:r}),this),r}captureMessage(e,n,r){let i=r?.event_id||dt();if(!this._client)return de&&ne.warn("No client configured on scope - will not capture message!"),i;let o=new Error(e);return this._client.captureMessage(e,n,we(O({originalException:e,syntheticException:o},r),{event_id:i}),this),i}captureEvent(e,n){let r=n?.event_id||dt();return this._client?(this._client.captureEvent(e,we(O({},n),{event_id:r}),this),r):(de&&ne.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}};function Ou(){return On("defaultCurrentScope",()=>new bt)}function Au(){return On("defaultIsolationScope",()=>new bt)}var la=class{constructor(e,n){let r;e?r=e:r=new bt;let i;n?i=n:i=new bt,this._stack=[{scope:r}],this._isolationScope=i}withScope(e){let n=this._pushScope(),r;try{r=e(n)}catch(i){throw this._popScope(),i}return Dn(r)?r.then(i=>(this._popScope(),i),i=>{throw this._popScope(),i}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function Tr(){let t=qn(),e=Zn(t);return e.stack=e.stack||new la(Ou(),Au())}function pm(t){return Tr().withScope(t)}function hm(t,e){let n=Tr();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function Du(t){return Tr().withScope(()=>t(Tr().getIsolationScope()))}function Nu(){return{withIsolationScope:Du,withScope:pm,withSetScope:hm,withSetIsolationScope:(t,e)=>Du(e),getCurrentScope:()=>Tr().getScope(),getIsolationScope:()=>Tr().getIsolationScope()}}function co(t){let e=Zn(t);return e.acs?e.acs:Nu()}function gn(){let t=qn();return co(t).getCurrentScope()}function _n(){let t=qn();return co(t).getIsolationScope()}function lo(){return On("globalScope",()=>new bt)}function ui(...t){let e=qn(),n=co(e);if(t.length===2){let[r,i]=t;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(t[0])}function We(){return gn().getClient()}function ua(t){let e=t.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:i}=e,o={trace_id:n,span_id:i||ao()};return r&&(o.parent_span_id=r),o}var uo="sentry.source",da="sentry.sample_rate",Ru="sentry.previous_trace_sample_rate",fa="sentry.op",pa="sentry.origin";var ha="sentry.profile_id",ma="sentry.exclusive_time";var mm="_sentryScope",gm="_sentryIsolationScope";function fo(t){return{scope:t[mm],isolationScope:t[gm]}}var _m="sentry-",vm=/^sentry-/;function Pu(t){let e=ym(t);if(!e)return;let n=Object.entries(e).reduce((r,[i,o])=>{if(i.match(vm)){let s=i.slice(_m.length);r[s]=o}return r},{});if(Object.keys(n).length>0)return n}function ym(t){if(!(!t||!At(t)&&!Array.isArray(t)))return Array.isArray(t)?t.reduce((e,n)=>{let r=Mu(n);return Object.entries(r).forEach(([i,o])=>{e[i]=o}),e},{}):Mu(t)}function Mu(t){return t.split(",").map(e=>e.split("=").map(n=>{try{return decodeURIComponent(n.trim())}catch{return}})).reduce((e,[n,r])=>(n&&r&&(e[n]=r),e),{})}function Lu(t){if(typeof t=="boolean")return Number(t);let e=typeof t=="string"?parseFloat(t):t;if(!(typeof e!="number"||isNaN(e)||e<0||e>1))return e}var Bu=1,Fu=!1;function ga(t){let{spanId:e,traceId:n,isRemote:r}=t.spanContext(),i=r?e:Ir(t).parent_span_id,o=fo(t).scope,s=r?o?.getPropagationContext().propagationSpanId||ao():e;return{parent_span_id:i,span_id:s,trace_id:n}}function Em(t){if(t&&t.length>0)return t.map(s=>{var c=s,{context:u}=c,d=u,{spanId:e,traceId:n,traceFlags:r}=d,i=ml(d,["spanId","traceId","traceFlags"]),{attributes:o}=c;return O({span_id:e,trace_id:n,sampled:r===Bu,attributes:o},i)})}function ku(t){return typeof t=="number"?Vu(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Vu(t.getTime()):Lt()}function Vu(t){return t>9999999999?t/1e3:t}function Ir(t){if(wm(t))return t.getSpanJSON();let{spanId:e,traceId:n}=t.spanContext();if(bm(t)){let{attributes:r,startTime:i,name:o,endTime:s,status:c,links:u}=t,d="parentSpanId"in t?t.parentSpanId:"parentSpanContext"in t?t.parentSpanContext?.spanId:void 0;return{span_id:e,trace_id:n,data:r,description:o,parent_span_id:d,start_timestamp:ku(i),timestamp:ku(s)||void 0,status:Cm(c),op:r[fa],origin:r[pa],links:Em(u)}}return{span_id:e,trace_id:n,start_timestamp:0,data:{}}}function bm(t){let e=t;return!!e.attributes&&!!e.startTime&&!!e.name&&!!e.endTime&&!!e.status}function wm(t){return typeof t.getSpanJSON=="function"}function Uu(t){let{traceFlags:e}=t.spanContext();return e===Bu}function Cm(t){if(!(!t||t.code===0))return t.code===1?"ok":t.message||"unknown_error"}var Sm="_sentryRootSpan";function di(t){return t[Sm]||t}function _a(){Fu||(kn(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),Fu=!0)}function Hu(t){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let e=t||We()?.getOptions();return!!e&&(e.tracesSampleRate!=null||!!e.tracesSampler)}var xr="production";var Tm=/^o(\d+)\./,Im=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function xm(t){return t==="http"||t==="https"}function Un(t,e=!1){let{host:n,path:r,pass:i,port:o,projectId:s,protocol:c,publicKey:u}=t;return`${c}://${u}${e&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${s}`}function Om(t){let e=Im.exec(t);if(!e){kn(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});return}let[n,r,i="",o="",s="",c=""]=e.slice(1),u="",d=c,g=d.split("/");if(g.length>1&&(u=g.slice(0,-1).join("/"),d=g.pop()),d){let p=d.match(/^\d+/);p&&(d=p[0])}return ju({host:o,pass:i,path:u,projectId:d,port:s,protocol:n,publicKey:r})}function ju(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function Am(t){if(!de)return!0;let{port:e,projectId:n,protocol:r}=t;return["protocol","publicKey","host","projectId"].find(s=>t[s]?!1:(ne.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:n.match(/^\d+$/)?xm(r)?e&&isNaN(parseInt(e,10))?(ne.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(ne.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(ne.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function $u(t){return t.match(Tm)?.[1]}function Gu(t){let e=typeof t=="string"?Om(t):ju(t);if(!(!e||!Am(e)))return e}var Dm="_frozenDsc";function Wu(t,e){let n=e.getOptions(),{publicKey:r,host:i}=e.getDsn()||{},o;n.orgId?o=String(n.orgId):i&&(o=$u(i));let s={environment:n.environment||xr,release:n.release,public_key:r,trace_id:t,org_id:o};return e.emit("createDsc",s),s}function Yu(t,e){let n=e.getPropagationContext();return n.dsc||Wu(n.traceId,t)}function va(t){let e=We();if(!e)return{};let n=di(t),r=Ir(n),i=r.data,o=n.spanContext().traceState,s=o?.get("sentry.sample_rate")??i[da]??i[Ru];function c(N){return(typeof s=="number"||typeof s=="string")&&(N.sample_rate=`${s}`),N}let u=n[Dm];if(u)return c(u);let d=o?.get("sentry.dsc"),g=d&&Pu(d);if(g)return c(g);let p=Wu(t.spanContext().traceId,e),E=i[uo],w=r.description;return E!=="url"&&w&&(p.transaction=w),Hu()&&(p.sampled=String(Uu(n)),p.sample_rand=o?.get("sentry.sample_rand")??fo(n).scope?.getPropagationContext().sampleRand.toString()),c(p),e.emit("createDsc",p,n),p}function Xt(t,e=100,n=1/0){try{return ya("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function po(t,e=3,n=100*1024){let r=Xt(t,e);return Pm(r)>n?po(t,e-1,n):r}function ya(t,e,n=1/0,r=1/0,i=Lm()){let[o,s]=i;if(e==null||["boolean","string"].includes(typeof e)||typeof e=="number"&&Number.isFinite(e))return e;let c=Nm(t,e);if(!c.startsWith("[object "))return c;if(e.__sentry_skip_normalization__)return e;let u=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:n;if(u===0)return c.replace("object ","");if(o(e))return"[Circular ~]";let d=e;if(d&&typeof d.toJSON=="function")try{let w=d.toJSON();return ya("",w,u-1,r,i)}catch{}let g=Array.isArray(e)?[]:{},p=0,E=oo(e);for(let w in E){if(!Object.prototype.hasOwnProperty.call(E,w))continue;if(p>=r){g[w]="[MaxProperties ~]";break}let N=E[w];g[w]=ya(w,N,u-1,r,i),p++}return s(e),g}function Nm(t,e){try{if(t==="domain"&&e&&typeof e=="object"&&e._events)return"[Domain]";if(t==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&e===global)return"[Global]";if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(ai(e))return"[VueViewModel]";if(ta(e))return"[SyntheticEvent]";if(typeof e=="number"&&!Number.isFinite(e))return`[${e}]`;if(typeof e=="function")return`[Function: ${Kt(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;let n=Rm(e);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Rm(t){let e=Object.getPrototypeOf(t);return e?.constructor?e.constructor.name:"null prototype"}function Mm(t){return~-encodeURI(t).split(/%..|./).length}function Pm(t){return Mm(JSON.stringify(t))}function Lm(){let t=new WeakSet;function e(r){return t.has(r)?!0:(t.add(r),!1)}function n(r){t.delete(r)}return[e,n]}function Rn(t,e=[]){return[t,e]}function zu(t,e){let[n,r]=t;return[n,[...r,e]]}function ba(t,e){let n=t[1];for(let r of n){let i=r[0].type;if(e(r,i))return!0}return!1}function Ea(t){let e=Zn(Ce);return e.encodePolyfill?e.encodePolyfill(t):new TextEncoder().encode(t)}function Ku(t){let[e,n]=t,r=JSON.stringify(e);function i(o){typeof r=="string"?r=typeof o=="string"?r+o:[Ea(r),o]:r.push(typeof o=="string"?Ea(o):o)}for(let o of n){let[s,c]=o;if(i(`
|
|
16
16
|
${JSON.stringify(s)}
|
|
17
|
-
`),typeof c=="string"||c instanceof Uint8Array)i(c);else{let u;try{u=JSON.stringify(c)}catch{u=JSON.stringify(Xt(c))}i(u)}}return typeof r=="string"?r:Fm(r)}function Fm(t){let e=t.reduce((i,o)=>i+o.length,0),n=new Uint8Array(e),r=0;for(let i of t)n.set(i,r),r+=i.length;return n}function Xu(t){let e=typeof t.data=="string"?Ea(t.data):t.data;return[{type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType},e]}var km={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item"};function wa(t){return km[t]}function Ca(t){if(!t?.sdk)return;let{name:e,version:n}=t.sdk;return{name:e,version:n}}function qu(t,e,n,r){let i=t.sdkProcessingMetadata?.dynamicSamplingContext;return O(O(O({event_id:t.event_id,sent_at:new Date().toISOString()},e&&{sdk:e}),!!n&&r&&{dsn:Un(r)}),i&&{trace:i})}function Vm(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function Zu(t,e,n,r){let i=Ca(n),o=O(O({sent_at:new Date().toISOString()},i&&{sdk:i}),!!r&&e&&{dsn:Un(e)}),s="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return Rn(o,[s])}function Ju(t,e,n,r){let i=Ca(n),o=t.type&&t.type!=="replay_event"?t.type:"event";Vm(t,n?.sdk);let s=qu(t,i,r,e);return delete t.sdkProcessingMetadata,Rn(s,[[{type:o},t]])}var Sa=0,Qu=1,ed=2;function qt(t){return new an(e=>{e(t)})}function Hn(t){return new an((e,n)=>{n(t)})}var an=class t{constructor(e){this._state=Sa,this._handlers=[],this._runExecutor(e)}then(e,n){return new t((r,i)=>{this._handlers.push([!1,o=>{if(!e)r(o);else try{r(e(o))}catch(s){i(s)}},o=>{if(!n)i(o);else try{r(n(o))}catch(s){i(s)}}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new t((n,r)=>{let i,o;return this.then(s=>{o=!1,i=s,e&&e()},s=>{o=!0,i=s,e&&e()}).then(()=>{if(o){r(i);return}n(i)})})}_executeHandlers(){if(this._state===Sa)return;let e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===Qu&&n[1](this._value),this._state===ed&&n[2](this._value),n[0]=!0)})}_runExecutor(e){let n=(o,s)=>{if(this._state===Sa){if(Dn(s)){s.then(r,i);return}this._state=o,this._value=s,this._executeHandlers()}},r=o=>{n(Qu,o)},i=o=>{n(ed,o)};try{e(r,i)}catch(o){i(o)}}};function ho(t,e,n,r=0){return new an((i,o)=>{let s=t[r];if(e===null||typeof s!="function")i(e);else{let c=s(O({},e),n);de&&s.id&&c===null&&ne.log(`Event processor "${s.id}" dropped event`),Dn(c)?c.then(u=>ho(t,u,n,r+1).then(i)).then(null,o):ho(t,c,n,r+1).then(i).then(null,o)}})}function td(t,e){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=e;Bm(t,e),r&&jm(t,r),$m(t,n),Um(t,i),Hm(t,o)}function Ta(t,e){let{extra:n,tags:r,user:i,contexts:o,level:s,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:d,eventProcessors:g,attachments:p,propagationContext:E,transactionName:w,span:N}=e;mo(t,"extra",n),mo(t,"tags",r),mo(t,"user",i),mo(t,"contexts",o),t.sdkProcessingMetadata=Bn(t.sdkProcessingMetadata,c,2),s&&(t.level=s),w&&(t.transactionName=w),N&&(t.span=N),u.length&&(t.breadcrumbs=[...t.breadcrumbs,...u]),d.length&&(t.fingerprint=[...t.fingerprint,...d]),g.length&&(t.eventProcessors=[...t.eventProcessors,...g]),p.length&&(t.attachments=[...t.attachments,...p]),t.propagationContext=O(O({},t.propagationContext),E)}function mo(t,e,n){t[e]=Bn(t[e],n,1)}function Bm(t,e){let{extra:n,tags:r,user:i,contexts:o,level:s,transactionName:c}=e;Object.keys(n).length&&(t.extra=O(O({},n),t.extra)),Object.keys(r).length&&(t.tags=O(O({},r),t.tags)),Object.keys(i).length&&(t.user=O(O({},i),t.user)),Object.keys(o).length&&(t.contexts=O(O({},o),t.contexts)),s&&(t.level=s),c&&t.type!=="transaction"&&(t.transaction=c)}function Um(t,e){let n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}function Hm(t,e){t.sdkProcessingMetadata=O(O({},t.sdkProcessingMetadata),e)}function jm(t,e){t.contexts=O({trace:ga(e)},t.contexts),t.sdkProcessingMetadata=O({dynamicSamplingContext:va(e)},t.sdkProcessingMetadata);let n=ui(e),r=Ir(n).description;r&&!t.transaction&&t.type==="transaction"&&(t.transaction=r)}function $m(t,e){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint.length||delete t.fingerprint}var go,nd,_o;function rd(t){let e=Ce._sentryDebugIds;if(!e)return{};let n=Object.keys(e);return _o&&n.length===nd||(nd=n.length,_o=n.reduce((r,i)=>{go||(go={});let o=go[i];if(o)r[o[0]]=o[1];else{let s=t(i);for(let c=s.length-1;c>=0;c--){let d=s[c]?.filename,g=e[i];if(d&&g){r[d]=g,go[i]=[d,g];break}}}return r},{})),_o}function id(t,e,n,r,i,o){let{normalizeDepth:s=3,normalizeMaxBreadth:c=1e3}=t,u=we(O({},e),{event_id:e.event_id||n.event_id||dt(),timestamp:e.timestamp||mn()}),d=n.integrations||t.integrations.map(L=>L.name);Gm(u,t),zm(u,d),i&&i.emit("applyFrameMetadata",e),e.type===void 0&&Wm(u,t.stackParser);let g=Xm(r,n.captureContext);n.mechanism&&hn(u,n.mechanism);let p=i?i.getEventProcessors():[],E=lo().getScopeData();if(o){let L=o.getScopeData();Ta(E,L)}if(g){let L=g.getScopeData();Ta(E,L)}let w=[...n.attachments||[],...E.attachments];w.length&&(n.attachments=w),td(u,E);let N=[...p,...E.eventProcessors];return ho(N,u,n).then(L=>(L&&Ym(L),typeof s=="number"&&s>0?Km(L,s,c):L))}function Gm(t,e){let{environment:n,release:r,dist:i,maxValueLength:o=250}=e;t.environment=t.environment||n||xr,!t.release&&r&&(t.release=r),!t.dist&&i&&(t.dist=i);let s=t.request;s?.url&&(s.url=Vn(s.url,o))}function Wm(t,e){let n=rd(e);t.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(i=>{i.filename&&(i.debug_id=n[i.filename])})})}function Ym(t){let e={};if(t.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(i=>{i.debug_id&&(i.abs_path?e[i.abs_path]=i.debug_id:i.filename&&(e[i.filename]=i.debug_id),delete i.debug_id)})}),Object.keys(e).length===0)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];let n=t.debug_meta.images;Object.entries(e).forEach(([r,i])=>{n.push({type:"sourcemap",code_file:r,debug_id:i})})}function zm(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function Km(t,e,n){if(!t)return null;let r=O(O(O(O(O({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(i=>O(O({},i),i.data&&{data:Xt(i.data,e,n)}))}),t.user&&{user:Xt(t.user,e,n)}),t.contexts&&{contexts:Xt(t.contexts,e,n)}),t.extra&&{extra:Xt(t.extra,e,n)});return t.contexts?.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=Xt(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map(i=>O(O({},i),i.data&&{data:Xt(i.data,e,n)}))),t.contexts?.flags&&r.contexts&&(r.contexts.flags=Xt(t.contexts.flags,3,n)),r}function Xm(t,e){if(!e)return t;let n=t?t.clone():new bt;return n.update(e),n}function od(t){if(t)return qm(t)?{captureContext:t}:Jm(t)?{captureContext:t}:t}function qm(t){return t instanceof bt||typeof t=="function"}var Zm=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Jm(t){return Object.keys(t).some(e=>Zm.includes(e))}function vo(t,e){return gn().captureException(t,od(e))}function di(t,e){return gn().captureEvent(t,e)}function fi(t){let e=_n(),n=gn(),{userAgent:r}=Ce.navigator||{},i=Iu(O(O({user:n.getUser()||e.getUser()},r&&{userAgent:r}),t)),o=e.getSession();return o?.status==="ok"&&Nn(o,{status:"exited"}),yo(),e.setSession(i),i}function yo(){let t=_n(),n=gn().getSession()||t.getSession();n&&xu(n),ad(),t.setSession()}function ad(){let t=_n(),e=Ye(),n=t.getSession();n&&e&&e.captureSession(n)}function pi(t=!1){if(t){yo();return}ad()}var Qm="7";function eg(t){let e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function tg(t){return`${eg(t)}${t.projectId}/envelope/`}function ng(t,e){let n={sentry_version:Qm};return t.publicKey&&(n.sentry_key=t.publicKey),e&&(n.sentry_client=`${e.name}/${e.version}`),new URLSearchParams(n).toString()}function cd(t,e,n){return e||`${tg(t)}?${ng(t,n)}`}var ld=[];function ud(t,e){let n={};return e.forEach(r=>{r&&xa(t,r,n)}),n}function Ia(t,e){for(let n of e)n?.afterAllSetup&&n.afterAllSetup(t)}function xa(t,e,n){if(n[e.name]){de&&ne.log(`Integration skipped because it was already installed: ${e.name}`);return}if(n[e.name]=e,ld.indexOf(e.name)===-1&&typeof e.setupOnce=="function"&&(e.setupOnce(),ld.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(t),typeof e.preprocessEvent=="function"){let r=e.preprocessEvent.bind(e);t.on("preprocessEvent",(i,o)=>r(i,o,t))}if(typeof e.processEvent=="function"){let r=e.processEvent.bind(e),i=Object.assign((o,s)=>r(o,s,t),{id:e.name});t.addEventProcessor(i)}de&&ne.log(`Integration installed: ${e.name}`)}function dd(t,e,n){let r=[{type:"client_report"},{timestamp:n||mn(),discarded_events:t}];return Rn(e?{dsn:e}:{},[r])}function Eo(t){let e=[];t.message&&e.push(t.message);try{let n=t.exception.values[t.exception.values.length-1];n?.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`))}catch{}return e}function fd(t){let{trace_id:e,parent_span_id:n,span_id:r,status:i,origin:o,data:s,op:c}=t.contexts?.trace??{};return{data:s??{},description:t.transaction,op:c,parent_span_id:n,span_id:r??"",start_timestamp:t.start_timestamp??0,status:i,timestamp:t.timestamp,trace_id:e??"",origin:o,profile_id:s?.[ha],exclusive_time:s?.[ma],measurements:t.measurements,is_segment:!0}}function pd(t){return{type:"transaction",timestamp:t.timestamp,start_timestamp:t.start_timestamp,transaction:t.description,contexts:{trace:{trace_id:t.trace_id,span_id:t.span_id,parent_span_id:t.parent_span_id,op:t.op,status:t.status,origin:t.origin,data:O(O(O({},t.data),t.profile_id&&{[ha]:t.profile_id}),t.exclusive_time&&{[ma]:t.exclusive_time})}},measurements:t.measurements}}var hd="Not capturing exception because it's already been captured.",md="Discarded session because of missing or non-string release",vd=Symbol.for("SentryInternalError"),yd=Symbol.for("SentryDoNotSendEventError");function bo(t){return{message:t,[vd]:!0}}function Oa(t){return{message:t,[yd]:!0}}function gd(t){return!!t&&typeof t=="object"&&vd in t}function _d(t){return!!t&&typeof t=="object"&&yd in t}var hi=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Gu(e.dsn):de&&ne.warn("No DSN provided, client will not send events."),this._dsn){let n=cd(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport(we(O({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},e.transportOptions),{url:n}))}}captureException(e,n,r){let i=dt();if(so(e))return de&&ne.log(hd),i;let o=O({event_id:i},n);return this._process(this.eventFromException(e,o).then(s=>this._captureEvent(s,o,r))),o.event_id}captureMessage(e,n,r,i){let o=O({event_id:dt()},r),s=wr(e)?e:String(e),c=er(e)?this.eventFromMessage(s,n,o):this.eventFromException(e,o);return this._process(c.then(u=>this._captureEvent(u,o,i))),o.event_id}captureEvent(e,n,r){let i=dt();if(n?.originalException&&so(n.originalException))return de&&ne.log(hd),i;let o=O({event_id:i},n),s=e.sdkProcessingMetadata||{},c=s.capturedSpanScope,u=s.capturedSpanIsolationScope;return this._process(this._captureEvent(e,o,c||r,u)),o.event_id}captureSession(e){this.sendSession(e),Nn(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(e).then(r=>n.flush(e).then(i=>r&&i))):qt(!0)}close(e){return this.flush(e).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let n=this._integrations[e.name];xa(this,e,this._integrations),n||Ia(this,[e])}sendEvent(e,n={}){this.emit("beforeSendEvent",e,n);let r=Ju(e,this._dsn,this._options._metadata,this._options.tunnel);for(let o of n.attachments||[])r=zu(r,Xu(o));let i=this.sendEnvelope(r);i&&i.then(o=>this.emit("afterSendEvent",e,o),null)}sendSession(e){let{release:n,environment:r=xr}=this._options;if("aggregates"in e){let o=e.attrs||{};if(!o.release&&!n){de&&ne.warn(md);return}o.release=o.release||n,o.environment=o.environment||r,e.attrs=o}else{if(!e.release&&!n){de&&ne.warn(md);return}e.release=e.release||n,e.environment=e.environment||r}this.emit("beforeSendSession",e);let i=Zu(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(i)}recordDroppedEvent(e,n,r=1){if(this._options.sendClientReports){let i=`${e}:${n}`;de&&ne.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}on(e,n){let r=this._hooks[e]=this._hooks[e]||[];return r.push(n),()=>{let i=r.indexOf(n);i>-1&&r.splice(i,1)}}emit(e,...n){let r=this._hooks[e];r&&r.forEach(i=>i(...n))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,n=>(de&&ne.error("Error while sending envelope:",n),n)):(de&&ne.error("Transport disabled"),qt({}))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=ud(this,e),Ia(this,e)}_updateSessionFromEvent(e,n){let r=n.level==="fatal",i=!1,o=n.exception?.values;if(o){i=!0;for(let u of o)if(u.mechanism?.handled===!1){r=!0;break}}let s=e.status==="ok";(s&&e.errors===0||s&&r)&&(Nn(e,we(O({},r&&{status:"crashed"}),{errors:e.errors||Number(i||r)})),this.captureSession(e))}_isClientDoneProcessing(e){return new an(n=>{let r=0,i=1,o=setInterval(()=>{this._numProcessing==0?(clearInterval(o),n(!0)):(r+=i,e&&r>=e&&(clearInterval(o),n(!1)))},i)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,n,r,i){let o=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s?.length&&(n.integrations=s),this.emit("preprocessEvent",e,n),e.type||i.setLastEventId(e.event_id||n.event_id),id(o,e,n,r,this,i).then(c=>{if(c===null)return c;this.emit("postprocessEvent",c,n),c.contexts=O({trace:ua(r)},c.contexts);let u=Yu(this,r);return c.sdkProcessingMetadata=O({dynamicSamplingContext:u},c.sdkProcessingMetadata),c})}_captureEvent(e,n={},r=gn(),i=_n()){return de&&Aa(e)&&ne.log(`Captured error event \`${Eo(e)[0]||"<unknown>"}\``),this._processEvent(e,n,r,i).then(o=>o.event_id,o=>{de&&(_d(o)?ne.log(o.message):gd(o)?ne.warn(o.message):ne.warn(o))})}_processEvent(e,n,r,i){let o=this.getOptions(),{sampleRate:s}=o,c=Ed(e),u=Aa(e),d=e.type||"error",g=`before send for type \`${d}\``,p=typeof s>"u"?void 0:Lu(s);if(u&&typeof p=="number"&&Math.random()>p)return this.recordDroppedEvent("sample_rate","error"),Hn(Oa(`Discarding event because it's not included in the random sample (sampling rate = ${s})`));let E=d==="replay_event"?"replay":d;return this._prepareEvent(e,n,r,i).then(w=>{if(w===null)throw this.recordDroppedEvent("event_processor",E),Oa("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return w;let M=og(this,o,w,n);return ig(M,g)}).then(w=>{if(w===null){if(this.recordDroppedEvent("before_send",E),c){let j=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",j)}throw Oa(`${g} returned \`null\`, will not send event.`)}let N=r.getSession()||i.getSession();if(u&&N&&this._updateSessionFromEvent(N,w),c){let L=w.sdkProcessingMetadata?.spanCountBeforeProcessing||0,j=w.spans?w.spans.length:0,X=L-j;X>0&&this.recordDroppedEvent("before_send","span",X)}let M=w.transaction_info;if(c&&M&&w.transaction!==e.transaction){let L="custom";w.transaction_info=we(O({},M),{source:L})}return this.sendEvent(w,n),w}).then(null,w=>{throw _d(w)||gd(w)?w:(this.captureException(w,{data:{__sentry__:!0},originalException:w}),bo(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
18
|
-
Reason: ${w}`))})}_process(e){this._numProcessing++,e.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([n,r])=>{let[i,o]=n.split(":");return{reason:i,category:o,quantity:r}})}_flushOutcomes(){de&&ne.log("Flushing outcomes...");let e=this._clearOutcomes();if(e.length===0){de&&ne.log("No outcomes to send");return}if(!this._dsn){de&&ne.log("No dsn provided, will not send outcomes");return}de&&ne.log("Sending outcomes:",e);let n=dd(e,this._options.tunnel&&Un(this._dsn));this.sendEnvelope(n)}};function ig(t,e){let n=`${e} must return \`null\` or a valid event.`;if(Dn(t))return t.then(r=>{if(!An(r)&&r!==null)throw bo(n);return r},r=>{throw bo(`${e} rejected with ${r}`)});if(!An(t)&&t!==null)throw bo(n);return t}function og(t,e,n,r){let{beforeSend:i,beforeSendTransaction:o,beforeSendSpan:s}=e,c=n;if(Aa(c)&&i)return i(c,r);if(Ed(c)){if(s){let u=s(fd(c));if(u?c=Bn(n,pd(u)):_a(),c.spans){let d=[];for(let g of c.spans){let p=s(g);p?d.push(p):(_a(),d.push(g))}c.spans=d}}if(o){if(c.spans){let u=c.spans.length;c.sdkProcessingMetadata=we(O({},n.sdkProcessingMetadata),{spanCountBeforeProcessing:u})}return o(c,r)}}return c}function Aa(t){return t.type===void 0}function Ed(t){return t.type==="transaction"}function sg(t){return[{type:"log",item_count:t.length,content_type:"application/vnd.sentry.items.log+json"},{items:t}]}function bd(t,e,n,r){let i={};return e?.sdk&&(i.sdk={name:e.sdk.name,version:e.sdk.version}),n&&r&&(i.dsn=Un(r)),Rn(i,[sg(t)])}function
|
|
17
|
+
`),typeof c=="string"||c instanceof Uint8Array)i(c);else{let u;try{u=JSON.stringify(c)}catch{u=JSON.stringify(Xt(c))}i(u)}}return typeof r=="string"?r:Fm(r)}function Fm(t){let e=t.reduce((i,o)=>i+o.length,0),n=new Uint8Array(e),r=0;for(let i of t)n.set(i,r),r+=i.length;return n}function Xu(t){let e=typeof t.data=="string"?Ea(t.data):t.data;return[{type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType},e]}var km={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item"};function wa(t){return km[t]}function Ca(t){if(!t?.sdk)return;let{name:e,version:n}=t.sdk;return{name:e,version:n}}function qu(t,e,n,r){let i=t.sdkProcessingMetadata?.dynamicSamplingContext;return O(O(O({event_id:t.event_id,sent_at:new Date().toISOString()},e&&{sdk:e}),!!n&&r&&{dsn:Un(r)}),i&&{trace:i})}function Vm(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function Zu(t,e,n,r){let i=Ca(n),o=O(O({sent_at:new Date().toISOString()},i&&{sdk:i}),!!r&&e&&{dsn:Un(e)}),s="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return Rn(o,[s])}function Ju(t,e,n,r){let i=Ca(n),o=t.type&&t.type!=="replay_event"?t.type:"event";Vm(t,n?.sdk);let s=qu(t,i,r,e);return delete t.sdkProcessingMetadata,Rn(s,[[{type:o},t]])}var Sa=0,Qu=1,ed=2;function qt(t){return new sn(e=>{e(t)})}function Hn(t){return new sn((e,n)=>{n(t)})}var sn=class t{constructor(e){this._state=Sa,this._handlers=[],this._runExecutor(e)}then(e,n){return new t((r,i)=>{this._handlers.push([!1,o=>{if(!e)r(o);else try{r(e(o))}catch(s){i(s)}},o=>{if(!n)i(o);else try{r(n(o))}catch(s){i(s)}}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new t((n,r)=>{let i,o;return this.then(s=>{o=!1,i=s,e&&e()},s=>{o=!0,i=s,e&&e()}).then(()=>{if(o){r(i);return}n(i)})})}_executeHandlers(){if(this._state===Sa)return;let e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===Qu&&n[1](this._value),this._state===ed&&n[2](this._value),n[0]=!0)})}_runExecutor(e){let n=(o,s)=>{if(this._state===Sa){if(Dn(s)){s.then(r,i);return}this._state=o,this._value=s,this._executeHandlers()}},r=o=>{n(Qu,o)},i=o=>{n(ed,o)};try{e(r,i)}catch(o){i(o)}}};function ho(t,e,n,r=0){return new sn((i,o)=>{let s=t[r];if(e===null||typeof s!="function")i(e);else{let c=s(O({},e),n);de&&s.id&&c===null&&ne.log(`Event processor "${s.id}" dropped event`),Dn(c)?c.then(u=>ho(t,u,n,r+1).then(i)).then(null,o):ho(t,c,n,r+1).then(i).then(null,o)}})}function td(t,e){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=e;Bm(t,e),r&&jm(t,r),$m(t,n),Um(t,i),Hm(t,o)}function Ta(t,e){let{extra:n,tags:r,user:i,contexts:o,level:s,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:d,eventProcessors:g,attachments:p,propagationContext:E,transactionName:w,span:N}=e;mo(t,"extra",n),mo(t,"tags",r),mo(t,"user",i),mo(t,"contexts",o),t.sdkProcessingMetadata=Bn(t.sdkProcessingMetadata,c,2),s&&(t.level=s),w&&(t.transactionName=w),N&&(t.span=N),u.length&&(t.breadcrumbs=[...t.breadcrumbs,...u]),d.length&&(t.fingerprint=[...t.fingerprint,...d]),g.length&&(t.eventProcessors=[...t.eventProcessors,...g]),p.length&&(t.attachments=[...t.attachments,...p]),t.propagationContext=O(O({},t.propagationContext),E)}function mo(t,e,n){t[e]=Bn(t[e],n,1)}function Bm(t,e){let{extra:n,tags:r,user:i,contexts:o,level:s,transactionName:c}=e;Object.keys(n).length&&(t.extra=O(O({},n),t.extra)),Object.keys(r).length&&(t.tags=O(O({},r),t.tags)),Object.keys(i).length&&(t.user=O(O({},i),t.user)),Object.keys(o).length&&(t.contexts=O(O({},o),t.contexts)),s&&(t.level=s),c&&t.type!=="transaction"&&(t.transaction=c)}function Um(t,e){let n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}function Hm(t,e){t.sdkProcessingMetadata=O(O({},t.sdkProcessingMetadata),e)}function jm(t,e){t.contexts=O({trace:ga(e)},t.contexts),t.sdkProcessingMetadata=O({dynamicSamplingContext:va(e)},t.sdkProcessingMetadata);let n=di(e),r=Ir(n).description;r&&!t.transaction&&t.type==="transaction"&&(t.transaction=r)}function $m(t,e){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint.length||delete t.fingerprint}var go,nd,_o;function rd(t){let e=Ce._sentryDebugIds;if(!e)return{};let n=Object.keys(e);return _o&&n.length===nd||(nd=n.length,_o=n.reduce((r,i)=>{go||(go={});let o=go[i];if(o)r[o[0]]=o[1];else{let s=t(i);for(let c=s.length-1;c>=0;c--){let d=s[c]?.filename,g=e[i];if(d&&g){r[d]=g,go[i]=[d,g];break}}}return r},{})),_o}function id(t,e,n,r,i,o){let{normalizeDepth:s=3,normalizeMaxBreadth:c=1e3}=t,u=we(O({},e),{event_id:e.event_id||n.event_id||dt(),timestamp:e.timestamp||mn()}),d=n.integrations||t.integrations.map(L=>L.name);Gm(u,t),zm(u,d),i&&i.emit("applyFrameMetadata",e),e.type===void 0&&Wm(u,t.stackParser);let g=Xm(r,n.captureContext);n.mechanism&&hn(u,n.mechanism);let p=i?i.getEventProcessors():[],E=lo().getScopeData();if(o){let L=o.getScopeData();Ta(E,L)}if(g){let L=g.getScopeData();Ta(E,L)}let w=[...n.attachments||[],...E.attachments];w.length&&(n.attachments=w),td(u,E);let N=[...p,...E.eventProcessors];return ho(N,u,n).then(L=>(L&&Ym(L),typeof s=="number"&&s>0?Km(L,s,c):L))}function Gm(t,e){let{environment:n,release:r,dist:i,maxValueLength:o=250}=e;t.environment=t.environment||n||xr,!t.release&&r&&(t.release=r),!t.dist&&i&&(t.dist=i);let s=t.request;s?.url&&(s.url=Vn(s.url,o))}function Wm(t,e){let n=rd(e);t.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(i=>{i.filename&&(i.debug_id=n[i.filename])})})}function Ym(t){let e={};if(t.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(i=>{i.debug_id&&(i.abs_path?e[i.abs_path]=i.debug_id:i.filename&&(e[i.filename]=i.debug_id),delete i.debug_id)})}),Object.keys(e).length===0)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];let n=t.debug_meta.images;Object.entries(e).forEach(([r,i])=>{n.push({type:"sourcemap",code_file:r,debug_id:i})})}function zm(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function Km(t,e,n){if(!t)return null;let r=O(O(O(O(O({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(i=>O(O({},i),i.data&&{data:Xt(i.data,e,n)}))}),t.user&&{user:Xt(t.user,e,n)}),t.contexts&&{contexts:Xt(t.contexts,e,n)}),t.extra&&{extra:Xt(t.extra,e,n)});return t.contexts?.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=Xt(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map(i=>O(O({},i),i.data&&{data:Xt(i.data,e,n)}))),t.contexts?.flags&&r.contexts&&(r.contexts.flags=Xt(t.contexts.flags,3,n)),r}function Xm(t,e){if(!e)return t;let n=t?t.clone():new bt;return n.update(e),n}function od(t){if(t)return qm(t)?{captureContext:t}:Jm(t)?{captureContext:t}:t}function qm(t){return t instanceof bt||typeof t=="function"}var Zm=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Jm(t){return Object.keys(t).some(e=>Zm.includes(e))}function vo(t,e){return gn().captureException(t,od(e))}function fi(t,e){return gn().captureEvent(t,e)}function pi(t){let e=_n(),n=gn(),{userAgent:r}=Ce.navigator||{},i=Iu(O(O({user:n.getUser()||e.getUser()},r&&{userAgent:r}),t)),o=e.getSession();return o?.status==="ok"&&Nn(o,{status:"exited"}),yo(),e.setSession(i),i}function yo(){let t=_n(),n=gn().getSession()||t.getSession();n&&xu(n),ad(),t.setSession()}function ad(){let t=_n(),e=We(),n=t.getSession();n&&e&&e.captureSession(n)}function hi(t=!1){if(t){yo();return}ad()}var Qm="7";function eg(t){let e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function tg(t){return`${eg(t)}${t.projectId}/envelope/`}function ng(t,e){let n={sentry_version:Qm};return t.publicKey&&(n.sentry_key=t.publicKey),e&&(n.sentry_client=`${e.name}/${e.version}`),new URLSearchParams(n).toString()}function cd(t,e,n){return e||`${tg(t)}?${ng(t,n)}`}var ld=[];function ud(t,e){let n={};return e.forEach(r=>{r&&xa(t,r,n)}),n}function Ia(t,e){for(let n of e)n?.afterAllSetup&&n.afterAllSetup(t)}function xa(t,e,n){if(n[e.name]){de&&ne.log(`Integration skipped because it was already installed: ${e.name}`);return}if(n[e.name]=e,ld.indexOf(e.name)===-1&&typeof e.setupOnce=="function"&&(e.setupOnce(),ld.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(t),typeof e.preprocessEvent=="function"){let r=e.preprocessEvent.bind(e);t.on("preprocessEvent",(i,o)=>r(i,o,t))}if(typeof e.processEvent=="function"){let r=e.processEvent.bind(e),i=Object.assign((o,s)=>r(o,s,t),{id:e.name});t.addEventProcessor(i)}de&&ne.log(`Integration installed: ${e.name}`)}function dd(t,e,n){let r=[{type:"client_report"},{timestamp:n||mn(),discarded_events:t}];return Rn(e?{dsn:e}:{},[r])}function Eo(t){let e=[];t.message&&e.push(t.message);try{let n=t.exception.values[t.exception.values.length-1];n?.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`))}catch{}return e}function fd(t){let{trace_id:e,parent_span_id:n,span_id:r,status:i,origin:o,data:s,op:c}=t.contexts?.trace??{};return{data:s??{},description:t.transaction,op:c,parent_span_id:n,span_id:r??"",start_timestamp:t.start_timestamp??0,status:i,timestamp:t.timestamp,trace_id:e??"",origin:o,profile_id:s?.[ha],exclusive_time:s?.[ma],measurements:t.measurements,is_segment:!0}}function pd(t){return{type:"transaction",timestamp:t.timestamp,start_timestamp:t.start_timestamp,transaction:t.description,contexts:{trace:{trace_id:t.trace_id,span_id:t.span_id,parent_span_id:t.parent_span_id,op:t.op,status:t.status,origin:t.origin,data:O(O(O({},t.data),t.profile_id&&{[ha]:t.profile_id}),t.exclusive_time&&{[ma]:t.exclusive_time})}},measurements:t.measurements}}var hd="Not capturing exception because it's already been captured.",md="Discarded session because of missing or non-string release",vd=Symbol.for("SentryInternalError"),yd=Symbol.for("SentryDoNotSendEventError");function bo(t){return{message:t,[vd]:!0}}function Oa(t){return{message:t,[yd]:!0}}function gd(t){return!!t&&typeof t=="object"&&vd in t}function _d(t){return!!t&&typeof t=="object"&&yd in t}var mi=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Gu(e.dsn):de&&ne.warn("No DSN provided, client will not send events."),this._dsn){let n=cd(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport(we(O({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},e.transportOptions),{url:n}))}}captureException(e,n,r){let i=dt();if(so(e))return de&&ne.log(hd),i;let o=O({event_id:i},n);return this._process(this.eventFromException(e,o).then(s=>this._captureEvent(s,o,r))),o.event_id}captureMessage(e,n,r,i){let o=O({event_id:dt()},r),s=wr(e)?e:String(e),c=Qn(e)?this.eventFromMessage(s,n,o):this.eventFromException(e,o);return this._process(c.then(u=>this._captureEvent(u,o,i))),o.event_id}captureEvent(e,n,r){let i=dt();if(n?.originalException&&so(n.originalException))return de&&ne.log(hd),i;let o=O({event_id:i},n),s=e.sdkProcessingMetadata||{},c=s.capturedSpanScope,u=s.capturedSpanIsolationScope;return this._process(this._captureEvent(e,o,c||r,u)),o.event_id}captureSession(e){this.sendSession(e),Nn(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(e).then(r=>n.flush(e).then(i=>r&&i))):qt(!0)}close(e){return this.flush(e).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let n=this._integrations[e.name];xa(this,e,this._integrations),n||Ia(this,[e])}sendEvent(e,n={}){this.emit("beforeSendEvent",e,n);let r=Ju(e,this._dsn,this._options._metadata,this._options.tunnel);for(let o of n.attachments||[])r=zu(r,Xu(o));let i=this.sendEnvelope(r);i&&i.then(o=>this.emit("afterSendEvent",e,o),null)}sendSession(e){let{release:n,environment:r=xr}=this._options;if("aggregates"in e){let o=e.attrs||{};if(!o.release&&!n){de&&ne.warn(md);return}o.release=o.release||n,o.environment=o.environment||r,e.attrs=o}else{if(!e.release&&!n){de&&ne.warn(md);return}e.release=e.release||n,e.environment=e.environment||r}this.emit("beforeSendSession",e);let i=Zu(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(i)}recordDroppedEvent(e,n,r=1){if(this._options.sendClientReports){let i=`${e}:${n}`;de&&ne.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}on(e,n){let r=this._hooks[e]=this._hooks[e]||[];return r.push(n),()=>{let i=r.indexOf(n);i>-1&&r.splice(i,1)}}emit(e,...n){let r=this._hooks[e];r&&r.forEach(i=>i(...n))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,n=>(de&&ne.error("Error while sending envelope:",n),n)):(de&&ne.error("Transport disabled"),qt({}))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=ud(this,e),Ia(this,e)}_updateSessionFromEvent(e,n){let r=n.level==="fatal",i=!1,o=n.exception?.values;if(o){i=!0;for(let u of o)if(u.mechanism?.handled===!1){r=!0;break}}let s=e.status==="ok";(s&&e.errors===0||s&&r)&&(Nn(e,we(O({},r&&{status:"crashed"}),{errors:e.errors||Number(i||r)})),this.captureSession(e))}_isClientDoneProcessing(e){return new sn(n=>{let r=0,i=1,o=setInterval(()=>{this._numProcessing==0?(clearInterval(o),n(!0)):(r+=i,e&&r>=e&&(clearInterval(o),n(!1)))},i)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,n,r,i){let o=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s?.length&&(n.integrations=s),this.emit("preprocessEvent",e,n),e.type||i.setLastEventId(e.event_id||n.event_id),id(o,e,n,r,this,i).then(c=>{if(c===null)return c;this.emit("postprocessEvent",c,n),c.contexts=O({trace:ua(r)},c.contexts);let u=Yu(this,r);return c.sdkProcessingMetadata=O({dynamicSamplingContext:u},c.sdkProcessingMetadata),c})}_captureEvent(e,n={},r=gn(),i=_n()){return de&&Aa(e)&&ne.log(`Captured error event \`${Eo(e)[0]||"<unknown>"}\``),this._processEvent(e,n,r,i).then(o=>o.event_id,o=>{de&&(_d(o)?ne.log(o.message):gd(o)?ne.warn(o.message):ne.warn(o))})}_processEvent(e,n,r,i){let o=this.getOptions(),{sampleRate:s}=o,c=Ed(e),u=Aa(e),d=e.type||"error",g=`before send for type \`${d}\``,p=typeof s>"u"?void 0:Lu(s);if(u&&typeof p=="number"&&Math.random()>p)return this.recordDroppedEvent("sample_rate","error"),Hn(Oa(`Discarding event because it's not included in the random sample (sampling rate = ${s})`));let E=d==="replay_event"?"replay":d;return this._prepareEvent(e,n,r,i).then(w=>{if(w===null)throw this.recordDroppedEvent("event_processor",E),Oa("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return w;let M=og(this,o,w,n);return ig(M,g)}).then(w=>{if(w===null){if(this.recordDroppedEvent("before_send",E),c){let j=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",j)}throw Oa(`${g} returned \`null\`, will not send event.`)}let N=r.getSession()||i.getSession();if(u&&N&&this._updateSessionFromEvent(N,w),c){let L=w.sdkProcessingMetadata?.spanCountBeforeProcessing||0,j=w.spans?w.spans.length:0,K=L-j;K>0&&this.recordDroppedEvent("before_send","span",K)}let M=w.transaction_info;if(c&&M&&w.transaction!==e.transaction){let L="custom";w.transaction_info=we(O({},M),{source:L})}return this.sendEvent(w,n),w}).then(null,w=>{throw _d(w)||gd(w)?w:(this.captureException(w,{data:{__sentry__:!0},originalException:w}),bo(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
18
|
+
Reason: ${w}`))})}_process(e){this._numProcessing++,e.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([n,r])=>{let[i,o]=n.split(":");return{reason:i,category:o,quantity:r}})}_flushOutcomes(){de&&ne.log("Flushing outcomes...");let e=this._clearOutcomes();if(e.length===0){de&&ne.log("No outcomes to send");return}if(!this._dsn){de&&ne.log("No dsn provided, will not send outcomes");return}de&&ne.log("Sending outcomes:",e);let n=dd(e,this._options.tunnel&&Un(this._dsn));this.sendEnvelope(n)}};function ig(t,e){let n=`${e} must return \`null\` or a valid event.`;if(Dn(t))return t.then(r=>{if(!An(r)&&r!==null)throw bo(n);return r},r=>{throw bo(`${e} rejected with ${r}`)});if(!An(t)&&t!==null)throw bo(n);return t}function og(t,e,n,r){let{beforeSend:i,beforeSendTransaction:o,beforeSendSpan:s}=e,c=n;if(Aa(c)&&i)return i(c,r);if(Ed(c)){if(s){let u=s(fd(c));if(u?c=Bn(n,pd(u)):_a(),c.spans){let d=[];for(let g of c.spans){let p=s(g);p?d.push(p):(_a(),d.push(g))}c.spans=d}}if(o){if(c.spans){let u=c.spans.length;c.sdkProcessingMetadata=we(O({},n.sdkProcessingMetadata),{spanCountBeforeProcessing:u})}return o(c,r)}}return c}function Aa(t){return t.type===void 0}function Ed(t){return t.type==="transaction"}function sg(t){return[{type:"log",item_count:t.length,content_type:"application/vnd.sentry.items.log+json"},{items:t}]}function bd(t,e,n,r){let i={};return e?.sdk&&(i.sdk={name:e.sdk.name,version:e.sdk.version}),n&&r&&(i.dsn=Un(r)),Rn(i,[sg(t)])}function gi(t,e){let n=e??ag(t)??[];if(n.length===0)return;let r=t.getOptions(),i=bd(n,r._metadata,r.tunnel,t.getDsn());wd().set(t,[]),t.emit("flushLogs"),t.sendEnvelope(i)}function ag(t){return wd().get(t)}function wd(){return On("clientToLogBufferMap",()=>new WeakMap)}var Da=Symbol.for("SentryBufferFullError");function Cd(t){let e=[];function n(){return t===void 0||e.length<t}function r(s){return e.splice(e.indexOf(s),1)[0]||Promise.resolve(void 0)}function i(s){if(!n())return Hn(Da);let c=s();return e.indexOf(c)===-1&&e.push(c),c.then(()=>r(c)).then(null,()=>r(c).then(null,()=>{})),c}function o(s){return new sn((c,u)=>{let d=e.length;if(!d)return c(!0);let g=setTimeout(()=>{s&&s>0&&c(!1)},s);e.forEach(p=>{qt(p).then(()=>{--d||(clearTimeout(g),c(!0))},u)})})}return{$:e,add:i,drain:o}}function cg(t,e=Date.now()){let n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${t}`);return isNaN(r)?6e4:r-e}function lg(t,e){return t[e]||t.all||0}function Sd(t,e,n=Date.now()){return lg(t,e)>n}function Td(t,{statusCode:e,headers:n},r=Date.now()){let i=O({},t),o=n?.["x-sentry-rate-limits"],s=n?.["retry-after"];if(o)for(let c of o.trim().split(",")){let[u,d,,,g]=c.split(":",5),p=parseInt(u,10),E=(isNaN(p)?60:p)*1e3;if(!d)i.all=r+E;else for(let w of d.split(";"))w==="metric_bucket"?(!g||g.split(";").includes("custom"))&&(i[w]=r+E):i[w]=r+E}else s?i.all=r+cg(s,r):e===429&&(i.all=r+60*1e3);return i}var ug=64;function wo(t,e,n=Cd(t.bufferSize||ug)){let r={},i=s=>n.drain(s);function o(s){let c=[];if(ba(s,(p,E)=>{let w=wa(E);Sd(r,w)?t.recordDroppedEvent("ratelimit_backoff",w):c.push(p)}),c.length===0)return qt({});let u=Rn(s[0],c),d=p=>{ba(u,(E,w)=>{t.recordDroppedEvent(p,wa(w))})},g=()=>e({body:Ku(u)}).then(p=>(p.statusCode!==void 0&&(p.statusCode<200||p.statusCode>=300)&&de&&ne.warn(`Sentry responded with status code ${p.statusCode} to sent event.`),r=Td(r,p),p),p=>{throw d("network_error"),de&&ne.error("Encountered error running transport request:",p),p});return n.add(g).then(p=>p,p=>{if(p===Da)return de&&ne.error("Skipped sending event because buffer is full."),d("queue_overflow"),qt({});throw p})}return{send:o,flush:i}}function Na(t){t.user?.ip_address===void 0&&(t.user=we(O({},t.user),{ip_address:"{{auto}}"}))}function Ra(t){"aggregates"in t?t.attrs?.ip_address===void 0&&(t.attrs=we(O({},t.attrs),{ip_address:"{{auto}}"})):t.ipAddress===void 0&&(t.ipAddress="{{auto}}")}function Ma(t,e,n=[e],r="npm"){let i=t._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${e}`,packages:n.map(o=>({name:`${r}:@sentry/${o}`,version:dn})),version:dn}),t._metadata=i}var dg=100;function vn(t,e){let n=We(),r=_n();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:o=dg}=n.getOptions();if(o<=0)return;let s=mn(),c=O({timestamp:s},t),u=i?kn(()=>i(c,e)):c;u!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",u,e),r.addBreadcrumb(u,o))}var Id,fg="FunctionToString",xd=new WeakMap,pg=()=>({name:fg,setupOnce(){Id=Function.prototype.toString;try{Function.prototype.toString=function(...t){let e=tr(this),n=xd.has(We())&&e!==void 0?e:this;return Id.apply(n,t)}}catch{}},setup(t){xd.set(t,!0)}}),Co=pg;var hg=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],mg="EventFilters",Pa=(t={})=>{let e;return{name:mg,setup(n){let r=n.getOptions();e=Od(t,r)},processEvent(n,r,i){if(!e){let o=i.getOptions();e=Od(t,o)}return gg(n,e)?null:n}}},To=(t={})=>we(O({},Pa(t)),{name:"InboundFilters"});function Od(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:hg],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]]}}function gg(t,e){if(t.type){if(t.type==="transaction"&&vg(t,e.ignoreTransactions))return de&&ne.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
19
19
|
Event: ${pn(t)}`),!0}else{if(_g(t,e.ignoreErrors))return de&&ne.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
20
20
|
Event: ${pn(t)}`),!0;if(wg(t))return de&&ne.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
21
21
|
Event: ${pn(t)}`),!0;if(yg(t,e.denyUrls))return de&&ne.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
22
22
|
Event: ${pn(t)}.
|
|
23
23
|
Url: ${So(t)}`),!0;if(!Eg(t,e.allowUrls))return de&&ne.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
24
24
|
Event: ${pn(t)}.
|
|
25
|
-
Url: ${So(t)}`),!0}return!1}function _g(t,e){return e?.length?Eo(t).some(n=>Cr(n,e)):!1}function vg(t,e){if(!e?.length)return!1;let n=t.transaction;return n?Cr(n,e):!1}function yg(t,e){if(!e?.length)return!1;let n=So(t);return n?Cr(n,e):!1}function Eg(t,e){if(!e?.length)return!0;let n=So(t);return n?Cr(n,e):!0}function bg(t=[]){for(let e=t.length-1;e>=0;e--){let n=t[e];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function So(t){try{let n=[...t.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?bg(n):null}catch{return de&&ne.error(`Cannot extract url for event ${pn(t)}`),null}}function wg(t){return t.exception?.values?.length?!t.message&&!t.exception.values.some(e=>e.stacktrace||e.type&&e.type!=="Error"||e.value):!1}function Fa(t,e,n,r,i,o){if(!i.exception?.values||!o||!sn(o.originalException,Error))return;let s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;s&&(i.exception.values=La(t,e,r,o.originalException,n,i.exception.values,s,0))}function La(t,e,n,r,i,o,s,c){if(o.length>=n+1)return o;let u=[...o];if(sn(r[i],Error)){Ad(s,c);let d=t(e,r[i]),g=u.length;Dd(d,i,g,c),u=La(t,e,n,r[i],i,[d,...u],d,g)}return Array.isArray(r.errors)&&r.errors.forEach((d,g)=>{if(sn(d,Error)){Ad(s,c);let p=t(e,d),E=u.length;Dd(p,`errors[${g}]`,E,c),u=La(t,e,n,d,i,[p,...u],p,E)}}),u}function Ad(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=we(O(O({},t.mechanism),t.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:e})}function Dd(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=we(O({},t.mechanism),{type:"chained",source:e,exception_id:n,parent_id:r})}function ka(t){let e="console";xt(e,t),Ot(e,Cg)}function Cg(){"console"in Ce&&$s.forEach(function(t){t in Ce.console&&ut(Ce.console,t,function(e){return Er[t]=e,function(...n){lt("console",{args:n,level:t}),Er[t]?.apply(Ce.console,n)}})})}function Va(t){return t==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}var Sg="Dedupe",Tg=()=>{let t;return{name:Sg,processEvent(e){if(e.type)return e;try{if(Ig(e,t))return de&&ne.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}},Io=Tg;function Ig(t,e){return e?!!(xg(t,e)||Og(t,e)):!1}function xg(t,e){let n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Md(t,e)||!Rd(t,e))}function Og(t,e){let n=Nd(e),r=Nd(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Md(t,e)||!Rd(t,e))}function Rd(t,e){let n=Qi(t),r=Qi(e);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let i=0;i<r.length;i++){let o=r[i],s=n[i];if(o.filename!==s.filename||o.lineno!==s.lineno||o.colno!==s.colno||o.function!==s.function)return!1}return!0}function Md(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Nd(t){return t.exception?.values?.[0]}function gi(t){if(!t)return{};let e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};let n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}function xo(t){if(t!==void 0)return t>=400&&t<500?"warning":t>=500?"error":void 0}var _i=Ce;function Ba(){return"history"in _i&&!!_i.history}function Ag(){if(!("fetch"in _i))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function vi(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Ua(){if(typeof EdgeRuntime=="string")return!0;if(!Ag())return!1;if(vi(_i.fetch))return!0;let t=!1,e=_i.document;if(e&&typeof e.createElement=="function")try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow?.fetch&&(t=vi(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){de&&ne.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}function ja(t,e){let n="fetch";xt(n,t),Ot(n,()=>Dg(void 0,e))}function Dg(t,e=!1){e&&!Ua()||ut(Ce,"fetch",function(n){return function(...r){let i=new Error,{method:o,url:s}=Ng(r),c={args:r,fetchData:{method:o,url:s},startTimestamp:Lt()*1e3,virtualError:i,headers:Rg(r)};return t||lt("fetch",O({},c)),n.apply(Ce,r).then(async u=>(t?t(u):lt("fetch",we(O({},c),{endTimestamp:Lt()*1e3,response:u})),u),u=>{if(lt("fetch",we(O({},c),{endTimestamp:Lt()*1e3,error:u})),Qn(u)&&u.stack===void 0&&(u.stack=i.stack,Ht(u,"framesToPop",1)),u instanceof TypeError&&(u.message==="Failed to fetch"||u.message==="Load failed"||u.message==="NetworkError when attempting to fetch resource."))try{let d=new URL(c.fetchData.url);u.message=`${u.message} (${d.host})`}catch{}throw u})}})}function Ha(t,e){return!!t&&typeof t=="object"&&!!t[e]}function Pd(t){return typeof t=="string"?t:t?Ha(t,"url")?t.url:t.toString?t.toString():"":""}function Ng(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){let[n,r]=t;return{url:Pd(n),method:Ha(r,"method")?String(r.method).toUpperCase():"GET"}}let e=t[0];return{url:Pd(e),method:Ha(e,"method")?String(e.method).toUpperCase():"GET"}}function Rg(t){let[e,n]=t;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(yu(e))return new Headers(e.headers)}catch{}}function $a(){return"npm"}var et=Ce,Ga=0;function Wa(){return Ga>0}function zg(){Ga++,setTimeout(()=>{Ga--})}function rr(t,e={}){function n(i){return typeof i=="function"}if(!n(t))return t;try{let i=t.__sentry_wrapped__;if(i)return typeof i=="function"?i:t;if(nr(t))return t}catch{return t}let r=function(...i){try{let o=i.map(s=>rr(s,e));return t.apply(this,o)}catch(o){throw zg(),li(s=>{s.addEventProcessor(c=>(e.mechanism&&(Sr(c,void 0,void 0),hn(c,e.mechanism)),c.extra=we(O({},c.extra),{arguments:i}),c)),vo(o)}),o}};try{for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}catch{}io(r,t),Ht(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}function Ld(){let t=ci(),{referrer:e}=et.document||{},{userAgent:n}=et.navigator||{},r=O(O({},e&&{Referer:e}),n&&{"User-Agent":n});return{url:t,headers:r}}function Oo(t,e){let n=Ka(t,e),r={type:Jg(e),value:Qg(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Kg(t,e,n,r){let o=Ye()?.getOptions().normalizeDepth,s=n_(e),c={__serialized__:po(e,o)};if(s)return{exception:{values:[Oo(t,s)]},extra:c};let u={exception:{values:[{type:tr(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:e_(e,{isUnhandledRejection:r})}]},extra:c};if(n){let d=Ka(t,n);d.length&&(u.exception.values[0].stacktrace={frames:d})}return u}function Ya(t,e){return{exception:{values:[Oo(t,e)]}}}function Ka(t,e){let n=e.stacktrace||e.stack||"",r=qg(e),i=Zg(e);try{return t(n,r,i)}catch{}return[]}var Xg=/Minified React error #\d+;/i;function qg(t){return t&&Xg.test(t.message)?1:0}function Zg(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function Fd(t){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?t instanceof WebAssembly.Exception:!1}function Jg(t){let e=t?.name;return!e&&Fd(t)?t.message&&Array.isArray(t.message)&&t.message.length==2?t.message[0]:"WebAssembly.Exception":e}function Qg(t){let e=t?.message;return Fd(t)?Array.isArray(t.message)&&t.message.length==2?t.message[1]:"wasm exception":e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function kd(t,e,n,r){let i=n?.syntheticException||void 0,o=Ao(t,e,i,r);return hn(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),qt(o)}function Vd(t,e,n="info",r,i){let o=r?.syntheticException||void 0,s=za(t,e,o,i);return s.level=n,r?.event_id&&(s.event_id=r.event_id),qt(s)}function Ao(t,e,n,r,i){let o;if(to(e)&&e.error)return Ya(t,e.error);if(no(e)||Js(e)){let s=e;if("stack"in e)o=Ya(t,e);else{let c=s.name||(no(s)?"DOMError":"DOMException"),u=s.message?`${c}: ${s.message}`:c;o=za(t,u,n,r),Sr(o,u)}return"code"in s&&(o.tags=we(O({},o.tags),{"DOMException.code":`${s.code}`})),o}return Qn(e)?Ya(t,e):An(e)||tr(e)?(o=Kg(t,e,n,i),hn(o,{synthetic:!0}),o):(o=za(t,e,n,r),Sr(o,`${e}`,void 0),hn(o,{synthetic:!0}),o)}function za(t,e,n,r){let i={};if(r&&n){let o=Ka(t,n);o.length&&(i.exception={values:[{value:e,stacktrace:{frames:o}}]}),hn(i,{synthetic:!0})}if(wr(e)){let{__sentry_template_string__:o,__sentry_template_values__:s}=e;return i.logentry={message:o,params:s},i}return i.message=e,i}function e_(t,{isUnhandledRejection:e}){let n=ia(t),r=e?"promise rejection":"exception";return to(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:tr(t)?`Event \`${t_(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function t_(t){try{let e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function n_(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let n=t[e];if(n instanceof Error)return n}}var r_=5e3,yi=class extends hi{constructor(e){let n=i_(e),r=et.SENTRY_SDK_SOURCE||$a();Ma(n,"browser",["browser"],r),super(n);let{sendDefaultPii:i,sendClientReports:o,enableLogs:s,_experiments:c}=this._options,u=s??c?.enableLogs;et.document&&(o||u)&&et.document.addEventListener("visibilitychange",()=>{et.document.visibilityState==="hidden"&&(o&&this._flushOutcomes(),u&&mi(this))}),u&&(this.on("flush",()=>{mi(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{mi(this)},r_)})),i&&(this.on("postprocessEvent",Na),this.on("beforeSendSession",Ra))}eventFromException(e,n){return kd(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return Vd(this._options.stackParser,e,n,r,this._options.attachStacktrace)}_prepareEvent(e,n,r,i){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r,i)}};function i_(t){return O({release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:et.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0},t)}var Bd=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var ft=Ce;var o_=1e3,Ud,Xa,qa;function Za(t){let e="dom";xt(e,t),Ot(e,s_)}function s_(){if(!ft.document)return;let t=lt.bind(null,"dom"),e=Hd(t,!0);ft.document.addEventListener("click",e,!1),ft.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{let i=ft[n]?.prototype;i?.hasOwnProperty?.("addEventListener")&&(ut(i,"addEventListener",function(o){return function(s,c,u){if(s==="click"||s=="keypress")try{let d=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},g=d[s]=d[s]||{refCount:0};if(!g.handler){let p=Hd(t);g.handler=p,o.call(this,s,p,u)}g.refCount++}catch{}return o.call(this,s,c,u)}}),ut(i,"removeEventListener",function(o){return function(s,c,u){if(s==="click"||s=="keypress")try{let d=this.__sentry_instrumentation_handlers__||{},g=d[s];g&&(g.refCount--,g.refCount<=0&&(o.call(this,s,g.handler,u),g.handler=void 0,delete d[s]),Object.keys(d).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return o.call(this,s,c,u)}}))})}function a_(t){if(t.type!==Xa)return!1;try{if(!t.target||t.target._sentryId!==qa)return!1}catch{}return!0}function c_(t,e){return t!=="keypress"?!1:e?.tagName?!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable):!0}function Hd(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;let r=l_(n);if(c_(n.type,r))return;Ht(n,"_sentryCaptured",!0),r&&!r._sentryId&&Ht(r,"_sentryId",dt());let i=n.type==="keypress"?"input":n.type;a_(n)||(t({event:n,name:i,global:e}),Xa=n.type,qa=r?r._sentryId:void 0),clearTimeout(Ud),Ud=ft.setTimeout(()=>{qa=void 0,Xa=void 0},o_)}}function l_(t){try{return t.target}catch{return null}}var Do;function Ei(t){let e="history";xt(e,t),Ot(e,u_)}function u_(){if(ft.addEventListener("popstate",()=>{let e=ft.location.href,n=Do;if(Do=e,n===e)return;lt("history",{from:n,to:e})}),!Ba())return;function t(e){return function(...n){let r=n.length>2?n[2]:void 0;if(r){let i=Do,o=d_(String(r));if(Do=o,i===o)return e.apply(this,n);lt("history",{from:i,to:o})}return e.apply(this,n)}}ut(ft.history,"pushState",t),ut(ft.history,"replaceState",t)}function d_(t){try{return new URL(t,ft.location.origin).toString()}catch{return t}}var No={};function Ja(t){let e=No[t];if(e)return e;let n=ft[t];if(vi(n))return No[t]=n.bind(ft);let r=ft.document;if(r&&typeof r.createElement=="function")try{let i=r.createElement("iframe");i.hidden=!0,r.head.appendChild(i);let o=i.contentWindow;o?.[t]&&(n=o[t]),r.head.removeChild(i)}catch(i){Bd&&ne.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,i)}return n&&(No[t]=n.bind(ft))}function Ro(t){No[t]=void 0}var ir="__sentry_xhr_v3__";function Qa(t){let e="xhr";xt(e,t),Ot(e,f_)}function f_(){if(!ft.XMLHttpRequest)return;let t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(e,n,r){let i=new Error,o=Lt()*1e3,s=At(r[0])?r[0].toUpperCase():void 0,c=p_(r[1]);if(!s||!c)return e.apply(n,r);n[ir]={method:s,url:c,request_headers:{}},s==="POST"&&c.match(/sentry_key/)&&(n.__sentry_own_request__=!0);let u=()=>{let d=n[ir];if(d&&n.readyState===4){try{d.status_code=n.status}catch{}let g={endTimestamp:Lt()*1e3,startTimestamp:o,xhr:n,virtualError:i};lt("xhr",g)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(d,g,p){return u(),d.apply(g,p)}}):n.addEventListener("readystatechange",u),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(d,g,p){let[E,w]=p,N=g[ir];return N&&At(E)&&At(w)&&(N.request_headers[E.toLowerCase()]=w),d.apply(g,p)}}),e.apply(n,r)}}),t.send=new Proxy(t.send,{apply(e,n,r){let i=n[ir];if(!i)return e.apply(n,r);r[0]!==void 0&&(i.body=r[0]);let o={startTimestamp:Lt()*1e3,xhr:n};return lt("xhr",o),e.apply(n,r)}})}function p_(t){if(At(t))return t;try{return t.toString()}catch{}}function ec(t,e=Ja("fetch")){let n=0,r=0;function i(o){let s=o.body.length;n+=s,r++;let c=O({body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:t.headers,keepalive:n<=6e4&&r<15},t.fetchOptions);if(!e)return Ro("fetch"),Hn("No fetch implementation available");try{return e(t.url,c).then(u=>(n-=s,r--,{statusCode:u.status,headers:{"x-sentry-rate-limits":u.headers.get("X-Sentry-Rate-Limits"),"retry-after":u.headers.get("Retry-After")}}))}catch(u){return Ro("fetch"),n-=s,r--,Hn(u)}}return wo(t,i)}var h_=30;var m_=50;function tc(t,e,n,r){let i={filename:t,function:e==="<anonymous>"?fn:e,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var g_=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,__=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,v_=/\((\S*)(?::(\d+))(?::(\d+))\)/,y_=t=>{let e=g_.exec(t);if(e){let[,r,i,o]=e;return tc(r,fn,+i,+o)}let n=__.exec(t);if(n){if(n[2]&&n[2].indexOf("eval")===0){let s=v_.exec(n[2]);s&&(n[2]=s[1],n[3]=s[2],n[4]=s[3])}let[i,o]=Wd(n[1]||fn,n[2]);return tc(o,i,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},jd=[h_,y_],E_=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,b_=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,w_=t=>{let e=E_.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let o=b_.exec(e[3]);o&&(e[1]=e[1]||"eval",e[3]=o[1],e[4]=o[2],e[5]="")}let r=e[3],i=e[1]||fn;return[i,r]=Wd(i,r),tc(r,i,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},$d=[m_,w_];var Gd=[jd,$d],nc=zs(...Gd),Wd=(t,e)=>{let n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:fn,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};var Or=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var Mo=1024,C_="Breadcrumbs",S_=(t={})=>{let e=O({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t);return{name:C_,setup(n){e.console&&ka(x_(n)),e.dom&&Za(I_(n,e.dom)),e.xhr&&Qa(O_(n)),e.fetch&&ja(A_(n)),e.history&&Ei(D_(n)),e.sentry&&n.on("beforeSendEvent",T_(n))}}},Yd=S_;function T_(t){return function(n){Ye()===t&&vn({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:pn(n)},{event:n})}}function I_(t,e){return function(r){if(Ye()!==t)return;let i,o,s=typeof e=="object"?e.serializeAttribute:void 0,c=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;c&&c>Mo&&(Or&&ne.warn(`\`dom.maxStringLength\` cannot exceed ${Mo}, but a value of ${c} was configured. Sentry will use ${Mo} instead.`),c=Mo),typeof s=="string"&&(s=[s]);try{let d=r.event,g=N_(d)?d.target:d;i=ai(g,{keyAttrs:s,maxStringLength:c}),o=ra(g)}catch{i="<unknown>"}if(i.length===0)return;let u={category:`ui.${r.name}`,message:i};o&&(u.data={"ui.component_name":o}),vn(u,{event:r.event,name:r.name,global:r.global})}}function x_(t){return function(n){if(Ye()!==t)return;let r={category:"console",data:{arguments:n.args,logger:"console"},level:Va(n.level),message:ro(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${ro(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;vn(r,{input:n.args,level:n.level})}}function O_(t){return function(n){if(Ye()!==t)return;let{startTimestamp:r,endTimestamp:i}=n,o=n.xhr[ir];if(!r||!i||!o)return;let{method:s,url:c,status_code:u,body:d}=o,g={method:s,url:c,status_code:u},p={xhr:n.xhr,input:d,startTimestamp:r,endTimestamp:i},E={category:"xhr",data:g,type:"http",level:xo(u)};t.emit("beforeOutgoingRequestBreadcrumb",E,p),vn(E,p)}}function A_(t){return function(n){if(Ye()!==t)return;let{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){let o=n.fetchData,s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i},c={category:"fetch",data:o,level:"error",type:"http"};t.emit("beforeOutgoingRequestBreadcrumb",c,s),vn(c,s)}else{let o=n.response,s=we(O({},n.fetchData),{status_code:o?.status});n.fetchData.request_body_size,n.fetchData.response_body_size,o?.status;let c={input:n.args,response:o,startTimestamp:r,endTimestamp:i},u={category:"fetch",data:s,type:"http",level:xo(s.status_code)};t.emit("beforeOutgoingRequestBreadcrumb",u,c),vn(u,c)}}}function D_(t){return function(n){if(Ye()!==t)return;let r=n.from,i=n.to,o=gi(et.location.href),s=r?gi(r):void 0,c=gi(i);s?.path||(s=o),o.protocol===c.protocol&&o.host===c.host&&(i=c.relative),o.protocol===s.protocol&&o.host===s.host&&(r=s.relative),vn({category:"navigation",data:{from:r,to:i}})}}function N_(t){return!!t&&!!t.target}var R_=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],M_="BrowserApiErrors",P_=(t={})=>{let e=O({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1},t);return{name:M_,setupOnce(){e.setTimeout&&ut(et,"setTimeout",zd),e.setInterval&&ut(et,"setInterval",zd),e.requestAnimationFrame&&ut(et,"requestAnimationFrame",L_),e.XMLHttpRequest&&"XMLHttpRequest"in et&&ut(XMLHttpRequest.prototype,"send",F_);let n=e.eventTarget;n&&(Array.isArray(n)?n:R_).forEach(i=>k_(i,e))}}},Kd=P_;function zd(t){return function(...e){let n=e[0];return e[0]=rr(n,{mechanism:{data:{function:Kt(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function L_(t){return function(e){return t.apply(this,[rr(e,{mechanism:{data:{function:"requestAnimationFrame",handler:Kt(t)},handled:!1,type:"instrument"}})])}}function F_(t){return function(...e){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&ut(n,i,function(o){let s={mechanism:{data:{function:i,handler:Kt(o)},handled:!1,type:"instrument"}},c=nr(o);return c&&(s.mechanism.data.handler=Kt(c)),rr(o,s)})}),t.apply(this,e)}}function k_(t,e){let r=et[t]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(ut(r,"addEventListener",function(i){return function(o,s,c){try{V_(s)&&(s.handleEvent=rr(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Kt(s),target:t},handled:!1,type:"instrument"}}))}catch{}return e.unregisterOriginalCallbacks&&B_(this,o,s),i.apply(this,[o,rr(s,{mechanism:{data:{function:"addEventListener",handler:Kt(s),target:t},handled:!1,type:"instrument"}}),c])}}),ut(r,"removeEventListener",function(i){return function(o,s,c){try{let u=s.__sentry_wrapped__;u&&i.call(this,o,u,c)}catch{}return i.call(this,o,s,c)}}))}function V_(t){return typeof t.handleEvent=="function"}function B_(t,e,n){t&&typeof t=="object"&&"removeEventListener"in t&&typeof t.removeEventListener=="function"&&t.removeEventListener(e,n)}var Xd=()=>({name:"BrowserSession",setupOnce(){if(typeof et.document>"u"){Or&&ne.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}fi({ignoreDuration:!0}),pi(),Ei(({from:t,to:e})=>{t!==void 0&&t!==e&&(fi({ignoreDuration:!0}),pi())})}});var U_="GlobalHandlers",H_=(t={})=>{let e=O({onerror:!0,onunhandledrejection:!0},t);return{name:U_,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(j_(n),qd("onerror")),e.onunhandledrejection&&($_(n),qd("onunhandledrejection"))}}},Zd=H_;function j_(t){Xs(e=>{let{stackParser:n,attachStacktrace:r}=Jd();if(Ye()!==t||Wa())return;let{msg:i,url:o,line:s,column:c,error:u}=e,d=Y_(Ao(n,u||i,void 0,r,!1),o,s,c);d.level="error",di(d,{originalException:u,mechanism:{handled:!1,type:"onerror"}})})}function $_(t){Zs(e=>{let{stackParser:n,attachStacktrace:r}=Jd();if(Ye()!==t||Wa())return;let i=G_(e),o=er(i)?W_(i):Ao(n,i,void 0,r,!0);o.level="error",di(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function G_(t){if(er(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return t}function W_(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function Y_(t,e,n,r){let i=t.exception=t.exception||{},o=i.values=i.values||[],s=o[0]=o[0]||{},c=s.stacktrace=s.stacktrace||{},u=c.frames=c.frames||[],d=r,g=n,p=At(e)&&e.length>0?e:ci();return u.length===0&&u.push({colno:d,filename:p,function:fn,in_app:!0,lineno:g}),t}function qd(t){Or&&ne.log(`Global Handler attached: ${t}`)}function Jd(){return Ye()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var Qd=()=>({name:"HttpContext",preprocessEvent(t){if(!et.navigator&&!et.location&&!et.document)return;let e=Ld(),n=O(O({},e.headers),t.request?.headers);t.request=we(O(O({},e),t.request),{headers:n})}});var z_="cause",K_=5,X_="LinkedErrors",q_=(t={})=>{let e=t.limit||K_,n=t.key||z_;return{name:X_,preprocessEvent(r,i,o){let s=o.getOptions();Fa(Oo,s.stackParser,n,e,r,i)}}},ef=q_;function rc(t){return[To(),Co(),Kd(),Yd(),Zd(),ef(),Io(),Qd(),Xd()]}var Lo=class t{static INSTANCE;contexts={};tags;client;user;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new t),this.INSTANCE}captureError(e,n,r){Et.error(`${n}:`,e);let i=this.getNewScope(r);i.setTag("operation",n),i.captureException(e)}captureMessage(e,n,r){this.getNewScope(r).captureMessage(e,n??"error")}setGlobalContext(e,n){this.contexts[e]=O({context:n},this.contexts[e])}setUser(e){this.user=e}setTags(e){this.tags=e}getNewScope(e){e??={};let{extra:n,tags:r}=e,i=new bt;if(i.setClient(this.client),i.setUser(this.user),e.triggerContext&&!e.engagementTrigger&&(e.engagementTrigger=e.triggerContext.triggerData),e.engagementTrigger){let o=e.engagementTrigger;i.setTags({"engagement.id":o.engagementID,"engagement.short_id":o.shortID,"engagement.objective":o.objective,"engagement.delivery_type":o.onsiteDeliveryType,"engagement.content_id":o.contentID,"engagement.variation":o.variation,"engagement.currency":o.currency})}return n&&i.setExtras(n),this.tags&&i.setTags(this.tags),r&&i.setTags(r),Object.keys(this.contexts).forEach(o=>{i.setContext(o,this.contexts[o])}),i.setTag("language",navigator.language),i.setTag("timezone",tf()),this.addShopifyTags(i),i}addShopifyTags(e){window.Shopify&&(e.setTag("shopify.shop",window.Shopify.shop),e.setTag("shopify.currency",window.Shopify.currency?.active),e.setTag("shopify.locale",window.Shopify.locale),e.setTag("theme.schema_name",window.Shopify.theme?.schema_name),e.setTag("theme.schema_version",window.Shopify.theme?.schema_version))}init(){let e=rc({}).filter(n=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(n.name));this.client=new yi({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:ec,stackParser:nc,integrations:e,environment:xn.mode,release:`web-sdk@${Xe.SDK_VERSION}`,debug:xn.debug}),this.client.init()}};var Ar=class{static ID="id";static SESSION_LANDING_PAGE="landing";static SESSION_LAST_USED_TIME="lastUsedTime";static SESSION_SYNCED="synced";static APP_CONFIG="conf";static DEVICE_ID="did";static SDK_TOKEN="token";static FIRST_SEEN="firstSeen";static SESSION_NUMBER="sessionNumber";static GA_CLIENT_ID="gacid";static CURRENT_CART="cart";static MUTED="muted"};var oc=Fi(rf());function Fo(t){return oc.default.createInstance({name:"lc",storeName:t,driver:oc.default.LOCALSTORAGE})}var Dr=class{static storage;static async get(e,n){return await this.storage?.getItem(e)??n}static set(e,n){return this.storage?.setItem(e,n)}static remove(e){return this.storage?.removeItem(e)}static clear(){return this.storage?.clear()}static getForage(){return this.storage}};var sc=class extends Dr{static storeName="ses";static{this.storage=Fo(this.storeName)}};var Nr=class extends Dr{static storeName="usr";static{this.storage=Fo(this.storeName)}};var ko=class{static format(e,n){let r=/{{\s*(\w+)\s*}}/;return n.replace(r,(i,o)=>{switch(o){case"amount":return this.formatWithDelimiters(e,2);case"amount_no_decimals":return this.formatWithDelimiters(e,0);case"amount_with_comma_separator":return this.formatWithDelimiters(e,2,".",",");case"amount_no_decimals_with_comma_separator":return this.formatWithDelimiters(e,0,".",",");case"amount_with_apostrophe_separator":return this.formatWithDelimiters(e,2,"'",".");case"amount_no_decimals_with_space_separator":return this.formatWithDelimiters(e,0," ");case"amount_with_space_separator":return this.formatWithDelimiters(e,2," ",",");case"amount_with_period_and_space_separator":return this.formatWithDelimiters(e,2," ",".");default:return i}})}static formatWithDelimiters(e,n=2,r=",",i="."){if(isNaN(e)||e==null)return"0";let s=(e/100).toFixed(n).split("."),c=s[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+r),u=s[1]?i+s[1]:"";return c+u}};var Vo=class{isCartDirty=!0;cartEngagements;isGoKwikPopupOpen;previewIDs;previewVariant;pageName;moneyFormat;jsLoadTime=new Date;shopCurrencyCode;locale;activeExperiment;inInactive=!1;lastEnterActive=new Date;lastEnterInactive=null;currentItem;_currencyCode;get currencyCode(){return this._currencyCode}set currencyCode(e){this._currencyCode=e}static get(){return window.CooeeSDK.runtimeData}isInactive(){return this.inInactive}async setInactive(){return this.inInactive?0:(this.inInactive=!0,this.lastEnterInactive=new Date,Math.max((this.lastEnterInactive.getTime()-this.lastEnterActive.getTime())/1e3,0))}setActive(){return this.inInactive?(this.inInactive=!1,this.lastEnterActive=new Date,Math.max((this.lastEnterActive.getTime()-this.lastEnterInactive.getTime())/1e3,0)):0}isFirstActive(){return this.lastEnterInactive==null}getCurrentItem(){return this.currentItem}setCurrentItem(e){this.currentItem=new vr(e)}};function or(t,e){if(t==0&&e)return"Free";let n=Vo.get(),r=yr.get(),i=n.shopCurrencyCode||r.currency,o=n.currencyCode;o||Et.warn("Currency code is not set in RuntimeData");let s=r.money?.format??n.moneyFormat,c;if(s&&i===o)c=ko.format(t*100,s);else{let u;try{u=new Intl.NumberFormat(Z_(),{style:"currency",currency:o||i,minimumFractionDigits:0,maximumFractionDigits:2})}catch(d){return Lo.getInstance().captureError(d,"format-currency",{extra:{currentCurrency:o,shopCurrency:i}}),""}c=u.format(t),c=c.replace("\u20B9","Rs. "),r.money?.showCurrency&&o!=="INR"&&(c=c.concat(` ${o}`))}return c}function Z_(){return navigator.languages!==void 0?navigator.languages[0].split("-")[0]:navigator.language??"en"}var Bo;function tf(){if(Bo)return Bo;try{return Bo=Intl.DateTimeFormat().resolvedOptions().timeZone,Bo}catch{return""}}var yn=class t{transform(e){return e==null?null:or(e)}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=ji({name:"cooeeCurrency",type:t,pure:!0})};var of=(()=>{class t{static entityMap={'"':"""};static escapeHtml(n){return String(n).replace(/"/g,r=>t.entityMap[r])}}return t})();var J_=Object.prototype.toString,Mr=Array.isArray||function(e){return J_.call(e)==="[object Array]"};function cc(t){return typeof t=="function"}function Q_(t){return Mr(t)?"array":typeof t}function ac(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function sf(t,e){return t!=null&&typeof t=="object"&&e in t}function ev(t,e){return t!=null&&typeof t!="object"&&t.hasOwnProperty&&t.hasOwnProperty(e)}var tv=RegExp.prototype.test;function nv(t,e){return tv.call(t,e)}var rv=/\S/;function iv(t){return!nv(rv,t)}var ov={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function sv(t){return String(t).replace(/[&<>"'`=\/]/g,function(n){return ov[n]})}var av=/\s*/,cv=/\s+/,af=/\s*=/,lv=/\s*\}/,uv=/#|\^|\/|>|\{|&|=|!/;function dv(t,e){if(!t)return[];var n=!1,r=[],i=[],o=[],s=!1,c=!1,u="",d=0;function g(){if(s&&!c)for(;o.length;)delete i[o.pop()];else o=[];s=!1,c=!1}var p,E,w;function N(te){if(typeof te=="string"&&(te=te.split(cv,2)),!Mr(te)||te.length!==2)throw new Error("Invalid tags: "+te);p=new RegExp(ac(te[0])+"\\s*"),E=new RegExp("\\s*"+ac(te[1])),w=new RegExp("\\s*"+ac("}"+te[1]))}N(e||Zt.tags);for(var M=new wi(t),L,j,X,se,q,Ee;!M.eos();){if(L=M.pos,X=M.scanUntil(p),X)for(var U=0,pe=X.length;U<pe;++U)se=X.charAt(U),iv(se)?(o.push(i.length),u+=se):(c=!0,n=!0,u+=" "),i.push(["text",se,L,L+1]),L+=1,se===`
|
|
26
|
-
`&&(g(),u="",d=0,n=!1);if(!M.scan(p))break;if(s=!0,j=M.scan(uv)||"name",M.scan(av),j==="="?(
|
|
25
|
+
Url: ${So(t)}`),!0}return!1}function _g(t,e){return e?.length?Eo(t).some(n=>Cr(n,e)):!1}function vg(t,e){if(!e?.length)return!1;let n=t.transaction;return n?Cr(n,e):!1}function yg(t,e){if(!e?.length)return!1;let n=So(t);return n?Cr(n,e):!1}function Eg(t,e){if(!e?.length)return!0;let n=So(t);return n?Cr(n,e):!0}function bg(t=[]){for(let e=t.length-1;e>=0;e--){let n=t[e];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function So(t){try{let n=[...t.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?bg(n):null}catch{return de&&ne.error(`Cannot extract url for event ${pn(t)}`),null}}function wg(t){return t.exception?.values?.length?!t.message&&!t.exception.values.some(e=>e.stacktrace||e.type&&e.type!=="Error"||e.value):!1}function Fa(t,e,n,r,i,o){if(!i.exception?.values||!o||!on(o.originalException,Error))return;let s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;s&&(i.exception.values=La(t,e,r,o.originalException,n,i.exception.values,s,0))}function La(t,e,n,r,i,o,s,c){if(o.length>=n+1)return o;let u=[...o];if(on(r[i],Error)){Ad(s,c);let d=t(e,r[i]),g=u.length;Dd(d,i,g,c),u=La(t,e,n,r[i],i,[d,...u],d,g)}return Array.isArray(r.errors)&&r.errors.forEach((d,g)=>{if(on(d,Error)){Ad(s,c);let p=t(e,d),E=u.length;Dd(p,`errors[${g}]`,E,c),u=La(t,e,n,d,i,[p,...u],p,E)}}),u}function Ad(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=we(O(O({},t.mechanism),t.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:e})}function Dd(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=we(O({},t.mechanism),{type:"chained",source:e,exception_id:n,parent_id:r})}function ka(t){let e="console";xt(e,t),Ot(e,Cg)}function Cg(){"console"in Ce&&$s.forEach(function(t){t in Ce.console&&ut(Ce.console,t,function(e){return Er[t]=e,function(...n){lt("console",{args:n,level:t}),Er[t]?.apply(Ce.console,n)}})})}function Va(t){return t==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}var Sg="Dedupe",Tg=()=>{let t;return{name:Sg,processEvent(e){if(e.type)return e;try{if(Ig(e,t))return de&&ne.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}},Io=Tg;function Ig(t,e){return e?!!(xg(t,e)||Og(t,e)):!1}function xg(t,e){let n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Md(t,e)||!Rd(t,e))}function Og(t,e){let n=Nd(e),r=Nd(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Md(t,e)||!Rd(t,e))}function Rd(t,e){let n=Qi(t),r=Qi(e);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let i=0;i<r.length;i++){let o=r[i],s=n[i];if(o.filename!==s.filename||o.lineno!==s.lineno||o.colno!==s.colno||o.function!==s.function)return!1}return!0}function Md(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Nd(t){return t.exception?.values?.[0]}function _i(t){if(!t)return{};let e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};let n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}function xo(t){if(t!==void 0)return t>=400&&t<500?"warning":t>=500?"error":void 0}var vi=Ce;function Ba(){return"history"in vi&&!!vi.history}function Ag(){if(!("fetch"in vi))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function yi(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Ua(){if(typeof EdgeRuntime=="string")return!0;if(!Ag())return!1;if(yi(vi.fetch))return!0;let t=!1,e=vi.document;if(e&&typeof e.createElement=="function")try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow?.fetch&&(t=yi(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){de&&ne.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}function ja(t,e){let n="fetch";xt(n,t),Ot(n,()=>Dg(void 0,e))}function Dg(t,e=!1){e&&!Ua()||ut(Ce,"fetch",function(n){return function(...r){let i=new Error,{method:o,url:s}=Ng(r),c={args:r,fetchData:{method:o,url:s},startTimestamp:Lt()*1e3,virtualError:i,headers:Rg(r)};return t||lt("fetch",O({},c)),n.apply(Ce,r).then(async u=>(t?t(u):lt("fetch",we(O({},c),{endTimestamp:Lt()*1e3,response:u})),u),u=>{if(lt("fetch",we(O({},c),{endTimestamp:Lt()*1e3,error:u})),Jn(u)&&u.stack===void 0&&(u.stack=i.stack,Ht(u,"framesToPop",1)),u instanceof TypeError&&(u.message==="Failed to fetch"||u.message==="Load failed"||u.message==="NetworkError when attempting to fetch resource."))try{let d=new URL(c.fetchData.url);u.message=`${u.message} (${d.host})`}catch{}throw u})}})}function Ha(t,e){return!!t&&typeof t=="object"&&!!t[e]}function Pd(t){return typeof t=="string"?t:t?Ha(t,"url")?t.url:t.toString?t.toString():"":""}function Ng(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){let[n,r]=t;return{url:Pd(n),method:Ha(r,"method")?String(r.method).toUpperCase():"GET"}}let e=t[0];return{url:Pd(e),method:Ha(e,"method")?String(e.method).toUpperCase():"GET"}}function Rg(t){let[e,n]=t;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(yu(e))return new Headers(e.headers)}catch{}}function $a(){return"npm"}var Je=Ce,Ga=0;function Wa(){return Ga>0}function zg(){Ga++,setTimeout(()=>{Ga--})}function nr(t,e={}){function n(i){return typeof i=="function"}if(!n(t))return t;try{let i=t.__sentry_wrapped__;if(i)return typeof i=="function"?i:t;if(tr(t))return t}catch{return t}let r=function(...i){try{let o=i.map(s=>nr(s,e));return t.apply(this,o)}catch(o){throw zg(),ui(s=>{s.addEventProcessor(c=>(e.mechanism&&(Sr(c,void 0,void 0),hn(c,e.mechanism)),c.extra=we(O({},c.extra),{arguments:i}),c)),vo(o)}),o}};try{for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}catch{}io(r,t),Ht(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}function Ld(){let t=li(),{referrer:e}=Je.document||{},{userAgent:n}=Je.navigator||{},r=O(O({},e&&{Referer:e}),n&&{"User-Agent":n});return{url:t,headers:r}}function Oo(t,e){let n=Ka(t,e),r={type:Jg(e),value:Qg(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Kg(t,e,n,r){let o=We()?.getOptions().normalizeDepth,s=n_(e),c={__serialized__:po(e,o)};if(s)return{exception:{values:[Oo(t,s)]},extra:c};let u={exception:{values:[{type:er(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:e_(e,{isUnhandledRejection:r})}]},extra:c};if(n){let d=Ka(t,n);d.length&&(u.exception.values[0].stacktrace={frames:d})}return u}function Ya(t,e){return{exception:{values:[Oo(t,e)]}}}function Ka(t,e){let n=e.stacktrace||e.stack||"",r=qg(e),i=Zg(e);try{return t(n,r,i)}catch{}return[]}var Xg=/Minified React error #\d+;/i;function qg(t){return t&&Xg.test(t.message)?1:0}function Zg(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function Fd(t){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?t instanceof WebAssembly.Exception:!1}function Jg(t){let e=t?.name;return!e&&Fd(t)?t.message&&Array.isArray(t.message)&&t.message.length==2?t.message[0]:"WebAssembly.Exception":e}function Qg(t){let e=t?.message;return Fd(t)?Array.isArray(t.message)&&t.message.length==2?t.message[1]:"wasm exception":e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function kd(t,e,n,r){let i=n?.syntheticException||void 0,o=Ao(t,e,i,r);return hn(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),qt(o)}function Vd(t,e,n="info",r,i){let o=r?.syntheticException||void 0,s=za(t,e,o,i);return s.level=n,r?.event_id&&(s.event_id=r.event_id),qt(s)}function Ao(t,e,n,r,i){let o;if(to(e)&&e.error)return Ya(t,e.error);if(no(e)||Js(e)){let s=e;if("stack"in e)o=Ya(t,e);else{let c=s.name||(no(s)?"DOMError":"DOMException"),u=s.message?`${c}: ${s.message}`:c;o=za(t,u,n,r),Sr(o,u)}return"code"in s&&(o.tags=we(O({},o.tags),{"DOMException.code":`${s.code}`})),o}return Jn(e)?Ya(t,e):An(e)||er(e)?(o=Kg(t,e,n,i),hn(o,{synthetic:!0}),o):(o=za(t,e,n,r),Sr(o,`${e}`,void 0),hn(o,{synthetic:!0}),o)}function za(t,e,n,r){let i={};if(r&&n){let o=Ka(t,n);o.length&&(i.exception={values:[{value:e,stacktrace:{frames:o}}]}),hn(i,{synthetic:!0})}if(wr(e)){let{__sentry_template_string__:o,__sentry_template_values__:s}=e;return i.logentry={message:o,params:s},i}return i.message=e,i}function e_(t,{isUnhandledRejection:e}){let n=ia(t),r=e?"promise rejection":"exception";return to(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:er(t)?`Event \`${t_(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function t_(t){try{let e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function n_(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let n=t[e];if(n instanceof Error)return n}}var r_=5e3,Ei=class extends mi{constructor(e){let n=i_(e),r=Je.SENTRY_SDK_SOURCE||$a();Ma(n,"browser",["browser"],r),super(n);let{sendDefaultPii:i,sendClientReports:o,enableLogs:s,_experiments:c}=this._options,u=s??c?.enableLogs;Je.document&&(o||u)&&Je.document.addEventListener("visibilitychange",()=>{Je.document.visibilityState==="hidden"&&(o&&this._flushOutcomes(),u&&gi(this))}),u&&(this.on("flush",()=>{gi(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{gi(this)},r_)})),i&&(this.on("postprocessEvent",Na),this.on("beforeSendSession",Ra))}eventFromException(e,n){return kd(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return Vd(this._options.stackParser,e,n,r,this._options.attachStacktrace)}_prepareEvent(e,n,r,i){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r,i)}};function i_(t){return O({release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:Je.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0},t)}var Bd=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var ft=Ce;var o_=1e3,Ud,Xa,qa;function Za(t){let e="dom";xt(e,t),Ot(e,s_)}function s_(){if(!ft.document)return;let t=lt.bind(null,"dom"),e=Hd(t,!0);ft.document.addEventListener("click",e,!1),ft.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{let i=ft[n]?.prototype;i?.hasOwnProperty?.("addEventListener")&&(ut(i,"addEventListener",function(o){return function(s,c,u){if(s==="click"||s=="keypress")try{let d=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},g=d[s]=d[s]||{refCount:0};if(!g.handler){let p=Hd(t);g.handler=p,o.call(this,s,p,u)}g.refCount++}catch{}return o.call(this,s,c,u)}}),ut(i,"removeEventListener",function(o){return function(s,c,u){if(s==="click"||s=="keypress")try{let d=this.__sentry_instrumentation_handlers__||{},g=d[s];g&&(g.refCount--,g.refCount<=0&&(o.call(this,s,g.handler,u),g.handler=void 0,delete d[s]),Object.keys(d).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return o.call(this,s,c,u)}}))})}function a_(t){if(t.type!==Xa)return!1;try{if(!t.target||t.target._sentryId!==qa)return!1}catch{}return!0}function c_(t,e){return t!=="keypress"?!1:e?.tagName?!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable):!0}function Hd(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;let r=l_(n);if(c_(n.type,r))return;Ht(n,"_sentryCaptured",!0),r&&!r._sentryId&&Ht(r,"_sentryId",dt());let i=n.type==="keypress"?"input":n.type;a_(n)||(t({event:n,name:i,global:e}),Xa=n.type,qa=r?r._sentryId:void 0),clearTimeout(Ud),Ud=ft.setTimeout(()=>{qa=void 0,Xa=void 0},o_)}}function l_(t){try{return t.target}catch{return null}}var Do;function bi(t){let e="history";xt(e,t),Ot(e,u_)}function u_(){if(ft.addEventListener("popstate",()=>{let e=ft.location.href,n=Do;if(Do=e,n===e)return;lt("history",{from:n,to:e})}),!Ba())return;function t(e){return function(...n){let r=n.length>2?n[2]:void 0;if(r){let i=Do,o=d_(String(r));if(Do=o,i===o)return e.apply(this,n);lt("history",{from:i,to:o})}return e.apply(this,n)}}ut(ft.history,"pushState",t),ut(ft.history,"replaceState",t)}function d_(t){try{return new URL(t,ft.location.origin).toString()}catch{return t}}var No={};function Ja(t){let e=No[t];if(e)return e;let n=ft[t];if(yi(n))return No[t]=n.bind(ft);let r=ft.document;if(r&&typeof r.createElement=="function")try{let i=r.createElement("iframe");i.hidden=!0,r.head.appendChild(i);let o=i.contentWindow;o?.[t]&&(n=o[t]),r.head.removeChild(i)}catch(i){Bd&&ne.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,i)}return n&&(No[t]=n.bind(ft))}function Ro(t){No[t]=void 0}var rr="__sentry_xhr_v3__";function Qa(t){let e="xhr";xt(e,t),Ot(e,f_)}function f_(){if(!ft.XMLHttpRequest)return;let t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(e,n,r){let i=new Error,o=Lt()*1e3,s=At(r[0])?r[0].toUpperCase():void 0,c=p_(r[1]);if(!s||!c)return e.apply(n,r);n[rr]={method:s,url:c,request_headers:{}},s==="POST"&&c.match(/sentry_key/)&&(n.__sentry_own_request__=!0);let u=()=>{let d=n[rr];if(d&&n.readyState===4){try{d.status_code=n.status}catch{}let g={endTimestamp:Lt()*1e3,startTimestamp:o,xhr:n,virtualError:i};lt("xhr",g)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(d,g,p){return u(),d.apply(g,p)}}):n.addEventListener("readystatechange",u),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(d,g,p){let[E,w]=p,N=g[rr];return N&&At(E)&&At(w)&&(N.request_headers[E.toLowerCase()]=w),d.apply(g,p)}}),e.apply(n,r)}}),t.send=new Proxy(t.send,{apply(e,n,r){let i=n[rr];if(!i)return e.apply(n,r);r[0]!==void 0&&(i.body=r[0]);let o={startTimestamp:Lt()*1e3,xhr:n};return lt("xhr",o),e.apply(n,r)}})}function p_(t){if(At(t))return t;try{return t.toString()}catch{}}function ec(t,e=Ja("fetch")){let n=0,r=0;function i(o){let s=o.body.length;n+=s,r++;let c=O({body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:t.headers,keepalive:n<=6e4&&r<15},t.fetchOptions);if(!e)return Ro("fetch"),Hn("No fetch implementation available");try{return e(t.url,c).then(u=>(n-=s,r--,{statusCode:u.status,headers:{"x-sentry-rate-limits":u.headers.get("X-Sentry-Rate-Limits"),"retry-after":u.headers.get("Retry-After")}}))}catch(u){return Ro("fetch"),n-=s,r--,Hn(u)}}return wo(t,i)}var h_=30;var m_=50;function tc(t,e,n,r){let i={filename:t,function:e==="<anonymous>"?fn:e,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var g_=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,__=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,v_=/\((\S*)(?::(\d+))(?::(\d+))\)/,y_=t=>{let e=g_.exec(t);if(e){let[,r,i,o]=e;return tc(r,fn,+i,+o)}let n=__.exec(t);if(n){if(n[2]&&n[2].indexOf("eval")===0){let s=v_.exec(n[2]);s&&(n[2]=s[1],n[3]=s[2],n[4]=s[3])}let[i,o]=Wd(n[1]||fn,n[2]);return tc(o,i,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},jd=[h_,y_],E_=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,b_=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,w_=t=>{let e=E_.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let o=b_.exec(e[3]);o&&(e[1]=e[1]||"eval",e[3]=o[1],e[4]=o[2],e[5]="")}let r=e[3],i=e[1]||fn;return[i,r]=Wd(i,r),tc(r,i,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},$d=[m_,w_];var Gd=[jd,$d],nc=zs(...Gd),Wd=(t,e)=>{let n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:fn,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};var Or=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var Mo=1024,C_="Breadcrumbs",S_=(t={})=>{let e=O({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t);return{name:C_,setup(n){e.console&&ka(x_(n)),e.dom&&Za(I_(n,e.dom)),e.xhr&&Qa(O_(n)),e.fetch&&ja(A_(n)),e.history&&bi(D_(n)),e.sentry&&n.on("beforeSendEvent",T_(n))}}},Yd=S_;function T_(t){return function(n){We()===t&&vn({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:pn(n)},{event:n})}}function I_(t,e){return function(r){if(We()!==t)return;let i,o,s=typeof e=="object"?e.serializeAttribute:void 0,c=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;c&&c>Mo&&(Or&&ne.warn(`\`dom.maxStringLength\` cannot exceed ${Mo}, but a value of ${c} was configured. Sentry will use ${Mo} instead.`),c=Mo),typeof s=="string"&&(s=[s]);try{let d=r.event,g=N_(d)?d.target:d;i=ci(g,{keyAttrs:s,maxStringLength:c}),o=ra(g)}catch{i="<unknown>"}if(i.length===0)return;let u={category:`ui.${r.name}`,message:i};o&&(u.data={"ui.component_name":o}),vn(u,{event:r.event,name:r.name,global:r.global})}}function x_(t){return function(n){if(We()!==t)return;let r={category:"console",data:{arguments:n.args,logger:"console"},level:Va(n.level),message:ro(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${ro(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;vn(r,{input:n.args,level:n.level})}}function O_(t){return function(n){if(We()!==t)return;let{startTimestamp:r,endTimestamp:i}=n,o=n.xhr[rr];if(!r||!i||!o)return;let{method:s,url:c,status_code:u,body:d}=o,g={method:s,url:c,status_code:u},p={xhr:n.xhr,input:d,startTimestamp:r,endTimestamp:i},E={category:"xhr",data:g,type:"http",level:xo(u)};t.emit("beforeOutgoingRequestBreadcrumb",E,p),vn(E,p)}}function A_(t){return function(n){if(We()!==t)return;let{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){let o=n.fetchData,s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i},c={category:"fetch",data:o,level:"error",type:"http"};t.emit("beforeOutgoingRequestBreadcrumb",c,s),vn(c,s)}else{let o=n.response,s=we(O({},n.fetchData),{status_code:o?.status});n.fetchData.request_body_size,n.fetchData.response_body_size,o?.status;let c={input:n.args,response:o,startTimestamp:r,endTimestamp:i},u={category:"fetch",data:s,type:"http",level:xo(s.status_code)};t.emit("beforeOutgoingRequestBreadcrumb",u,c),vn(u,c)}}}function D_(t){return function(n){if(We()!==t)return;let r=n.from,i=n.to,o=_i(Je.location.href),s=r?_i(r):void 0,c=_i(i);s?.path||(s=o),o.protocol===c.protocol&&o.host===c.host&&(i=c.relative),o.protocol===s.protocol&&o.host===s.host&&(r=s.relative),vn({category:"navigation",data:{from:r,to:i}})}}function N_(t){return!!t&&!!t.target}var R_=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],M_="BrowserApiErrors",P_=(t={})=>{let e=O({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1},t);return{name:M_,setupOnce(){e.setTimeout&&ut(Je,"setTimeout",zd),e.setInterval&&ut(Je,"setInterval",zd),e.requestAnimationFrame&&ut(Je,"requestAnimationFrame",L_),e.XMLHttpRequest&&"XMLHttpRequest"in Je&&ut(XMLHttpRequest.prototype,"send",F_);let n=e.eventTarget;n&&(Array.isArray(n)?n:R_).forEach(i=>k_(i,e))}}},Kd=P_;function zd(t){return function(...e){let n=e[0];return e[0]=nr(n,{mechanism:{data:{function:Kt(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function L_(t){return function(e){return t.apply(this,[nr(e,{mechanism:{data:{function:"requestAnimationFrame",handler:Kt(t)},handled:!1,type:"instrument"}})])}}function F_(t){return function(...e){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&ut(n,i,function(o){let s={mechanism:{data:{function:i,handler:Kt(o)},handled:!1,type:"instrument"}},c=tr(o);return c&&(s.mechanism.data.handler=Kt(c)),nr(o,s)})}),t.apply(this,e)}}function k_(t,e){let r=Je[t]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(ut(r,"addEventListener",function(i){return function(o,s,c){try{V_(s)&&(s.handleEvent=nr(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Kt(s),target:t},handled:!1,type:"instrument"}}))}catch{}return e.unregisterOriginalCallbacks&&B_(this,o,s),i.apply(this,[o,nr(s,{mechanism:{data:{function:"addEventListener",handler:Kt(s),target:t},handled:!1,type:"instrument"}}),c])}}),ut(r,"removeEventListener",function(i){return function(o,s,c){try{let u=s.__sentry_wrapped__;u&&i.call(this,o,u,c)}catch{}return i.call(this,o,s,c)}}))}function V_(t){return typeof t.handleEvent=="function"}function B_(t,e,n){t&&typeof t=="object"&&"removeEventListener"in t&&typeof t.removeEventListener=="function"&&t.removeEventListener(e,n)}var Xd=()=>({name:"BrowserSession",setupOnce(){if(typeof Je.document>"u"){Or&&ne.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}pi({ignoreDuration:!0}),hi(),bi(({from:t,to:e})=>{t!==void 0&&t!==e&&(pi({ignoreDuration:!0}),hi())})}});var U_="GlobalHandlers",H_=(t={})=>{let e=O({onerror:!0,onunhandledrejection:!0},t);return{name:U_,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(j_(n),qd("onerror")),e.onunhandledrejection&&($_(n),qd("onunhandledrejection"))}}},Zd=H_;function j_(t){Xs(e=>{let{stackParser:n,attachStacktrace:r}=Jd();if(We()!==t||Wa())return;let{msg:i,url:o,line:s,column:c,error:u}=e,d=Y_(Ao(n,u||i,void 0,r,!1),o,s,c);d.level="error",fi(d,{originalException:u,mechanism:{handled:!1,type:"onerror"}})})}function $_(t){Zs(e=>{let{stackParser:n,attachStacktrace:r}=Jd();if(We()!==t||Wa())return;let i=G_(e),o=Qn(i)?W_(i):Ao(n,i,void 0,r,!0);o.level="error",fi(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function G_(t){if(Qn(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return t}function W_(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function Y_(t,e,n,r){let i=t.exception=t.exception||{},o=i.values=i.values||[],s=o[0]=o[0]||{},c=s.stacktrace=s.stacktrace||{},u=c.frames=c.frames||[],d=r,g=n,p=At(e)&&e.length>0?e:li();return u.length===0&&u.push({colno:d,filename:p,function:fn,in_app:!0,lineno:g}),t}function qd(t){Or&&ne.log(`Global Handler attached: ${t}`)}function Jd(){return We()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var Qd=()=>({name:"HttpContext",preprocessEvent(t){if(!Je.navigator&&!Je.location&&!Je.document)return;let e=Ld(),n=O(O({},e.headers),t.request?.headers);t.request=we(O(O({},e),t.request),{headers:n})}});var z_="cause",K_=5,X_="LinkedErrors",q_=(t={})=>{let e=t.limit||K_,n=t.key||z_;return{name:X_,preprocessEvent(r,i,o){let s=o.getOptions();Fa(Oo,s.stackParser,n,e,r,i)}}},ef=q_;function rc(t){return[To(),Co(),Kd(),Yd(),Zd(),ef(),Io(),Qd(),Xd()]}var Lo=class t{static INSTANCE;contexts={};tags;client;user;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new t),this.INSTANCE}captureError(e,n,r){Et.error(`${n}:`,e);let i=this.getNewScope(r);i.setTag("operation",n),i.captureException(e)}captureMessage(e,n,r){this.getNewScope(r).captureMessage(e,n??"error")}setGlobalContext(e,n){this.contexts[e]=O({context:n},this.contexts[e])}setUser(e){this.user=e}setTags(e){this.tags=e}getNewScope(e){e??={};let{extra:n,tags:r}=e,i=new bt;if(i.setClient(this.client),i.setUser(this.user),e.triggerContext&&!e.engagementTrigger&&(e.engagementTrigger=e.triggerContext.triggerData),e.engagementTrigger){let o=e.engagementTrigger;i.setTags({"engagement.id":o.engagementID,"engagement.short_id":o.shortID,"engagement.objective":o.objective,"engagement.delivery_type":o.onsiteDeliveryType,"engagement.content_id":o.contentID,"engagement.variation":o.variation,"engagement.currency":o.currency})}return n&&i.setExtras(n),this.tags&&i.setTags(this.tags),r&&i.setTags(r),Object.keys(this.contexts).forEach(o=>{i.setContext(o,this.contexts[o])}),i.setTag("language",navigator.language),i.setTag("timezone",tf()),this.addShopifyTags(i),i}addShopifyTags(e){window.Shopify&&(e.setTag("shopify.shop",window.Shopify.shop),e.setTag("shopify.currency",window.Shopify.currency?.active),e.setTag("shopify.locale",window.Shopify.locale),e.setTag("theme.schema_name",window.Shopify.theme?.schema_name),e.setTag("theme.schema_version",window.Shopify.theme?.schema_version))}init(){let e=rc({}).filter(n=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(n.name));this.client=new Ei({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:ec,stackParser:nc,integrations:e,environment:xn.mode,release:`web-sdk@${Xe.SDK_VERSION}`,debug:xn.debug}),this.client.init()}};var Ar=class{static ID="id";static SESSION_LANDING_PAGE="landing";static SESSION_LAST_USED_TIME="lastUsedTime";static SESSION_SYNCED="synced";static APP_CONFIG="conf";static DEVICE_ID="did";static SDK_TOKEN="token";static FIRST_SEEN="firstSeen";static SESSION_NUMBER="sessionNumber";static GA_CLIENT_ID="gacid";static CURRENT_CART="cart";static MUTED="muted"};var oc=ki(rf());function Fo(t){return oc.default.createInstance({name:"lc",storeName:t,driver:oc.default.LOCALSTORAGE})}var Dr=class{static storage;static async get(e,n){return await this.storage?.getItem(e)??n}static set(e,n){return this.storage?.setItem(e,n)}static remove(e){return this.storage?.removeItem(e)}static clear(){return this.storage?.clear()}static getForage(){return this.storage}};var sc=class extends Dr{static storeName="ses";static{this.storage=Fo(this.storeName)}};var Nr=class extends Dr{static storeName="usr";static{this.storage=Fo(this.storeName)}};var ko=class{static format(e,n){let r=/{{\s*(\w+)\s*}}/;return n.replace(r,(i,o)=>{switch(o){case"amount":return this.formatWithDelimiters(e,2);case"amount_no_decimals":return this.formatWithDelimiters(e,0);case"amount_with_comma_separator":return this.formatWithDelimiters(e,2,".",",");case"amount_no_decimals_with_comma_separator":return this.formatWithDelimiters(e,0,".",",");case"amount_with_apostrophe_separator":return this.formatWithDelimiters(e,2,"'",".");case"amount_no_decimals_with_space_separator":return this.formatWithDelimiters(e,0," ");case"amount_with_space_separator":return this.formatWithDelimiters(e,2," ",",");case"amount_with_period_and_space_separator":return this.formatWithDelimiters(e,2," ",".");default:return i}})}static formatWithDelimiters(e,n=2,r=",",i="."){if(isNaN(e)||e==null)return"0";let s=(e/100).toFixed(n).split("."),c=s[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+r),u=s[1]?i+s[1]:"";return c+u}};var Vo=class{isCartDirty=!0;cartEngagements;isGoKwikPopupOpen;previewIDs;previewVariant;pageName;moneyFormat;jsLoadTime=new Date;shopCurrencyCode;locale;activeExperiment;inInactive=!1;lastEnterActive=new Date;lastEnterInactive=null;currentItem;_currencyCode;get currencyCode(){return this._currencyCode}set currencyCode(e){this._currencyCode=e}static get(){return window.CooeeSDK.runtimeData}isInactive(){return this.inInactive}async setInactive(){return this.inInactive?0:(this.inInactive=!0,this.lastEnterInactive=new Date,Math.max((this.lastEnterInactive.getTime()-this.lastEnterActive.getTime())/1e3,0))}setActive(){return this.inInactive?(this.inInactive=!1,this.lastEnterActive=new Date,Math.max((this.lastEnterActive.getTime()-this.lastEnterInactive.getTime())/1e3,0)):0}isFirstActive(){return this.lastEnterInactive==null}getCurrentItem(){return this.currentItem}setCurrentItem(e){this.currentItem=new vr(e)}};function ir(t,e){if(t==0&&e)return"Free";let n=Vo.get(),r=yr.get(),i=n.shopCurrencyCode||r.currency,o=n.currencyCode;o||Et.warn("Currency code is not set in RuntimeData");let s=r.money?.format??n.moneyFormat,c;if(s&&i===o)c=ko.format(t*100,s);else{let u;try{u=new Intl.NumberFormat(Z_(),{style:"currency",currency:o||i,minimumFractionDigits:0,maximumFractionDigits:2})}catch(d){return Lo.getInstance().captureError(d,"format-currency",{extra:{currentCurrency:o,shopCurrency:i}}),""}c=u.format(t),c=c.replace("\u20B9","Rs. "),r.money?.showCurrency&&o!=="INR"&&(c=c.concat(` ${o}`))}return c}function Z_(){return navigator.languages!==void 0?navigator.languages[0].split("-")[0]:navigator.language??"en"}var Bo;function tf(){if(Bo)return Bo;try{return Bo=Intl.DateTimeFormat().resolvedOptions().timeZone,Bo}catch{return""}}var yn=class t{transform(e){return e==null?null:ir(e)}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=$i({name:"cooeeCurrency",type:t,pure:!0})};var of=(()=>{class t{static entityMap={'"':"""};static escapeHtml(n){return String(n).replace(/"/g,r=>t.entityMap[r])}}return t})();var J_=Object.prototype.toString,Mr=Array.isArray||function(e){return J_.call(e)==="[object Array]"};function cc(t){return typeof t=="function"}function Q_(t){return Mr(t)?"array":typeof t}function ac(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function sf(t,e){return t!=null&&typeof t=="object"&&e in t}function ev(t,e){return t!=null&&typeof t!="object"&&t.hasOwnProperty&&t.hasOwnProperty(e)}var tv=RegExp.prototype.test;function nv(t,e){return tv.call(t,e)}var rv=/\S/;function iv(t){return!nv(rv,t)}var ov={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function sv(t){return String(t).replace(/[&<>"'`=\/]/g,function(n){return ov[n]})}var av=/\s*/,cv=/\s+/,af=/\s*=/,lv=/\s*\}/,uv=/#|\^|\/|>|\{|&|=|!/;function dv(t,e){if(!t)return[];var n=!1,r=[],i=[],o=[],s=!1,c=!1,u="",d=0;function g(){if(s&&!c)for(;o.length;)delete i[o.pop()];else o=[];s=!1,c=!1}var p,E,w;function N(te){if(typeof te=="string"&&(te=te.split(cv,2)),!Mr(te)||te.length!==2)throw new Error("Invalid tags: "+te);p=new RegExp(ac(te[0])+"\\s*"),E=new RegExp("\\s*"+ac(te[1])),w=new RegExp("\\s*"+ac("}"+te[1]))}N(e||Zt.tags);for(var M=new Ci(t),L,j,K,se,X,Ee;!M.eos();){if(L=M.pos,K=M.scanUntil(p),K)for(var U=0,he=K.length;U<he;++U)se=K.charAt(U),iv(se)?(o.push(i.length),u+=se):(c=!0,n=!0,u+=" "),i.push(["text",se,L,L+1]),L+=1,se===`
|
|
26
|
+
`&&(g(),u="",d=0,n=!1);if(!M.scan(p))break;if(s=!0,j=M.scan(uv)||"name",M.scan(av),j==="="?(K=M.scanUntil(af),M.scan(af),M.scanUntil(E)):j==="{"?(K=M.scanUntil(w),M.scan(lv),M.scanUntil(E),j="&"):K=M.scanUntil(E),!M.scan(E))throw new Error("Unclosed tag at "+M.pos);if(j==">"?X=[j,K,L,M.pos,u,d,n]:X=[j,K,L,M.pos],d++,i.push(X),j==="#"||j==="^")r.push(X);else if(j==="/"){if(Ee=r.pop(),!Ee)throw new Error('Unopened section "'+K+'" at '+L);if(Ee[1]!==K)throw new Error('Unclosed section "'+Ee[1]+'" at '+L)}else j==="name"||j==="{"||j==="&"?c=!0:j==="="&&N(K)}if(g(),Ee=r.pop(),Ee)throw new Error('Unclosed section "'+Ee[1]+'" at '+M.pos);return pv(fv(i))}function fv(t){for(var e=[],n,r,i=0,o=t.length;i<o;++i)n=t[i],n&&(n[0]==="text"&&r&&r[0]==="text"?(r[1]+=n[1],r[3]=n[3]):(e.push(n),r=n));return e}function pv(t){for(var e=[],n=e,r=[],i,o,s=0,c=t.length;s<c;++s)switch(i=t[s],i[0]){case"#":case"^":n.push(i),r.push(i),n=i[4]=[];break;case"/":o=r.pop(),o[5]=i[2],n=r.length>0?r[r.length-1][4]:e;break;default:n.push(i)}return e}function Ci(t){this.string=t,this.tail=t,this.pos=0}Ci.prototype.eos=function(){return this.tail===""};Ci.prototype.scan=function(e){var n=this.tail.match(e);if(!n||n.index!==0)return"";var r=n[0];return this.tail=this.tail.substring(r.length),this.pos+=r.length,r};Ci.prototype.scanUntil=function(e){var n=this.tail.search(e),r;switch(n){case-1:r=this.tail,this.tail="";break;case 0:r="";break;default:r=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=r.length,r};function Rr(t,e){this.view=t,this.cache={".":this.view},this.parent=e}Rr.prototype.push=function(e){return new Rr(e,this)};Rr.prototype.lookup=function(e){var n=this.cache,r;if(n.hasOwnProperty(e))r=n[e];else{for(var i=this,o,s,c,u=!1;i;){if(e.indexOf(".")>0)for(o=i.view,s=e.split("."),c=0;o!=null&&c<s.length;)c===s.length-1&&(u=sf(o,s[c])||ev(o,s[c])),o=o[s[c++]];else o=i.view[e],u=sf(i.view,e);if(u){r=o;break}i=i.parent}n[e]=r}return cc(r)&&(r=r.call(this.view)),r};function Dt(){this.templateCache={_cache:{},set:function(e,n){this._cache[e]=n},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}Dt.prototype.clearCache=function(){typeof this.templateCache<"u"&&this.templateCache.clear()};Dt.prototype.parse=function(e,n){var r=this.templateCache,i=e+":"+(n||Zt.tags).join(":"),o=typeof r<"u",s=o?r.get(i):void 0;return s==null&&(s=dv(e,n),o&&r.set(i,s)),s};Dt.prototype.render=function(e,n,r,i){var o=this.getConfigTags(i),s=this.parse(e,o),c=n instanceof Rr?n:new Rr(n,void 0);return this.renderTokens(s,c,r,e,i)};Dt.prototype.renderTokens=function(e,n,r,i,o){for(var s="",c,u,d,g=0,p=e.length;g<p;++g)d=void 0,c=e[g],u=c[0],u==="#"?d=this.renderSection(c,n,r,i,o):u==="^"?d=this.renderInverted(c,n,r,i,o):u===">"?d=this.renderPartial(c,n,r,o):u==="&"?d=this.unescapedValue(c,n):u==="name"?d=this.escapedValue(c,n,o):u==="text"&&(d=this.rawValue(c)),d!==void 0&&(s+=d);return s};Dt.prototype.renderSection=function(e,n,r,i,o){var s=this,c="",u=n.lookup(e[1]);function d(E){return s.render(E,n,r,o)}if(u){if(Mr(u))for(var g=0,p=u.length;g<p;++g)c+=this.renderTokens(e[4],n.push(u[g]),r,i,o);else if(typeof u=="object"||typeof u=="string"||typeof u=="number")c+=this.renderTokens(e[4],n.push(u),r,i,o);else if(cc(u)){if(typeof i!="string")throw new Error("Cannot use higher-order sections without the original template");u=u.call(n.view,i.slice(e[3],e[5]),d),u!=null&&(c+=u)}else c+=this.renderTokens(e[4],n,r,i,o);return c}};Dt.prototype.renderInverted=function(e,n,r,i,o){var s=n.lookup(e[1]);if(!s||Mr(s)&&s.length===0)return this.renderTokens(e[4],n,r,i,o)};Dt.prototype.indentPartial=function(e,n,r){for(var i=n.replace(/[^ \t]/g,""),o=e.split(`
|
|
27
27
|
`),s=0;s<o.length;s++)o[s].length&&(s>0||!r)&&(o[s]=i+o[s]);return o.join(`
|
|
28
|
-
`)};Dt.prototype.renderPartial=function(e,n,r,i){if(r){var o=this.getConfigTags(i),s=cc(r)?r(e[1]):r[e[1]];if(s!=null){var c=e[6],u=e[5],d=e[4],g=s;u==0&&d&&(g=this.indentPartial(s,d,c));var p=this.parse(g,o);return this.renderTokens(p,n,r,g,i)}}};Dt.prototype.unescapedValue=function(e,n){var r=n.lookup(e[1]);if(r!=null)return r};Dt.prototype.escapedValue=function(e,n,r){var i=this.getConfigEscape(r)||Zt.escape,o=n.lookup(e[1]);if(o!=null)return typeof o=="number"&&i===Zt.escape?String(o):i(o)};Dt.prototype.rawValue=function(e){return e[1]};Dt.prototype.getConfigTags=function(e){return Mr(e)?e:e&&typeof e=="object"?e.tags:void 0};Dt.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!Mr(e))return e.escape};var Zt={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(t){
|
|
29
|
-
`);try{v=new Worker(URL.createObjectURL(new Blob([re])))}catch(oe){return typeof console!==void 0&&typeof console.warn=="function"&&console.warn("\u{1F38A} Could not load worker",oe),null}J(v)}return v}}(),w={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function N(v,y){return y?y(v):v}function M(v){return v!=null}function L(v,y,H){return N(v&&M(v[y])?v[y]:w[y],H)}function j(v){return v<0?0:Math.floor(v)}function X(v,y){return Math.floor(Math.random()*(y-v))+v}function se(v){return parseInt(v,16)}function q(v){return v.map(Ee)}function Ee(v){var y=String(v).replace(/[^0-9a-f]/gi,"");return y.length<6&&(y=y[0]+y[0]+y[1]+y[1]+y[2]+y[2]),{r:se(y.substring(0,2)),g:se(y.substring(2,4)),b:se(y.substring(4,6))}}function U(v){var y=L(v,"origin",Object);return y.x=L(y,"x",Number),y.y=L(y,"y",Number),y}function pe(v){v.width=document.documentElement.clientWidth,v.height=document.documentElement.clientHeight}function te(v){var y=v.getBoundingClientRect();v.width=y.width,v.height=y.height}function ye(v){var y=document.createElement("canvas");return y.style.position="fixed",y.style.top="0px",y.style.left="0px",y.style.pointerEvents="none",y.style.zIndex=v,y}function ke(v,y,H,J,re,oe,ue,Q,ae){v.save(),v.translate(y,H),v.rotate(oe),v.scale(J,re),v.arc(0,0,1,ue,Q,ae),v.restore()}function De(v){var y=v.angle*(Math.PI/180),H=v.spread*(Math.PI/180);return{x:v.x,y:v.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:v.startVelocity*.5+Math.random()*v.startVelocity,angle2D:-y+(.5*H-Math.random()*H),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,color:v.color,shape:v.shape,tick:0,totalTicks:v.ticks,decay:v.decay,drift:v.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:v.gravity*3,ovalScalar:.6,scalar:v.scalar,flat:v.flat}}function Pe(v,y){y.x+=Math.cos(y.angle2D)*y.velocity+y.drift,y.y+=Math.sin(y.angle2D)*y.velocity+y.gravity,y.velocity*=y.decay,y.flat?(y.wobble=0,y.wobbleX=y.x+10*y.scalar,y.wobbleY=y.y+10*y.scalar,y.tiltSin=0,y.tiltCos=0,y.random=1):(y.wobble+=y.wobbleSpeed,y.wobbleX=y.x+10*y.scalar*Math.cos(y.wobble),y.wobbleY=y.y+10*y.scalar*Math.sin(y.wobble),y.tiltAngle+=.1,y.tiltSin=Math.sin(y.tiltAngle),y.tiltCos=Math.cos(y.tiltAngle),y.random=Math.random()+2);var H=y.tick++/y.totalTicks,J=y.x+y.random*y.tiltCos,re=y.y+y.random*y.tiltSin,oe=y.wobbleX+y.random*y.tiltCos,ue=y.wobbleY+y.random*y.tiltSin;if(v.fillStyle="rgba("+y.color.r+", "+y.color.g+", "+y.color.b+", "+(1-H)+")",v.beginPath(),s&&y.shape.type==="path"&&typeof y.shape.path=="string"&&Array.isArray(y.shape.matrix))v.fill(x(y.shape.path,y.shape.matrix,y.x,y.y,Math.abs(oe-J)*.1,Math.abs(ue-re)*.1,Math.PI/10*y.wobble));else if(y.shape.type==="bitmap"){var Q=Math.PI/10*y.wobble,ae=Math.abs(oe-J)*.1,ee=Math.abs(ue-re)*.1,fe=y.shape.bitmap.width*y.scalar,ce=y.shape.bitmap.height*y.scalar,he=new DOMMatrix([Math.cos(Q)*ae,Math.sin(Q)*ae,-Math.sin(Q)*ee,Math.cos(Q)*ee,y.x,y.y]);he.multiplySelf(new DOMMatrix(y.shape.matrix));var me=v.createPattern(g.transform(y.shape.bitmap),"no-repeat");me.setTransform(he),v.globalAlpha=1-H,v.fillStyle=me,v.fillRect(y.x-fe/2,y.y-ce/2,fe,ce),v.globalAlpha=1}else if(y.shape==="circle")v.ellipse?v.ellipse(y.x,y.y,Math.abs(oe-J)*y.ovalScalar,Math.abs(ue-re)*y.ovalScalar,Math.PI/10*y.wobble,0,2*Math.PI):ke(v,y.x,y.y,Math.abs(oe-J)*y.ovalScalar,Math.abs(ue-re)*y.ovalScalar,Math.PI/10*y.wobble,0,2*Math.PI);else if(y.shape==="star")for(var _e=Math.PI/2*3,h=4*y.scalar,a=8*y.scalar,l=y.x,_=y.y,T=5,D=Math.PI/T;T--;)l=y.x+Math.cos(_e)*a,_=y.y+Math.sin(_e)*a,v.lineTo(l,_),_e+=D,l=y.x+Math.cos(_e)*h,_=y.y+Math.sin(_e)*h,v.lineTo(l,_),_e+=D;else v.moveTo(Math.floor(y.x),Math.floor(y.y)),v.lineTo(Math.floor(y.wobbleX),Math.floor(re)),v.lineTo(Math.floor(oe),Math.floor(ue)),v.lineTo(Math.floor(J),Math.floor(y.wobbleY));return v.closePath(),v.fill(),y.tick<y.totalTicks}function Ge(v,y,H,J,re){var oe=y.slice(),ue=v.getContext("2d"),Q,ae,ee=d(function(fe){function ce(){Q=ae=null,ue.clearRect(0,0,J.width,J.height),g.clear(),re(),fe()}function he(){r&&!(J.width===i.width&&J.height===i.height)&&(J.width=v.width=i.width,J.height=v.height=i.height),!J.width&&!J.height&&(H(v),J.width=v.width,J.height=v.height),ue.clearRect(0,0,J.width,J.height),oe=oe.filter(function(me){return Pe(ue,me)}),oe.length?Q=p.frame(he):ce()}Q=p.frame(he),ae=ce});return{addFettis:function(fe){return oe=oe.concat(fe),ee},canvas:v,promise:ee,reset:function(){Q&&p.cancel(Q),ae&&ae()}}}function ze(v,y){var H=!v,J=!!L(y||{},"resize"),re=!1,oe=L(y,"disableForReducedMotion",Boolean),ue=o&&!!L(y||{},"useWorker"),Q=ue?E():null,ae=H?pe:te,ee=v&&Q?!!v.__confetti_initialized:!1,fe=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,ce;function he(_e,h,a){for(var l=L(_e,"particleCount",j),_=L(_e,"angle",Number),T=L(_e,"spread",Number),D=L(_e,"startVelocity",Number),k=L(_e,"decay",Number),ve=L(_e,"gravity",Number),Ie=L(_e,"drift",Number),be=L(_e,"colors",q),Ve=L(_e,"ticks",Number),Be=L(_e,"shapes"),qe=L(_e,"scalar"),Ft=!!L(_e,"flat"),$t=U(_e),wn=l,wt=[],kt=v.width*$t.x,Pi=v.height*$t.y;wn--;)wt.push(De({x:kt,y:Pi,angle:_,spread:T,startVelocity:D,color:be[wn%be.length],shape:Be[X(0,Be.length)],ticks:Ve,decay:k,gravity:ve,drift:Ie,scalar:qe,flat:Ft}));return ce?ce.addFettis(wt):(ce=Ge(v,wt,ae,h,a),ce.promise)}function me(_e){var h=oe||L(_e,"disableForReducedMotion",Boolean),a=L(_e,"zIndex",Number);if(h&&fe)return d(function(D){D()});H&&ce?v=ce.canvas:H&&!v&&(v=ye(a),document.body.appendChild(v)),J&&!ee&&ae(v);var l={width:v.width,height:v.height};Q&&!ee&&Q.init(v),ee=!0,Q&&(v.__confetti_initialized=!0);function _(){if(Q){var D={getBoundingClientRect:function(){if(!H)return v.getBoundingClientRect()}};ae(D),Q.postMessage({resize:{width:D.width,height:D.height}});return}l.width=l.height=null}function T(){ce=null,J&&(re=!1,e.removeEventListener("resize",_)),H&&v&&(document.body.contains(v)&&document.body.removeChild(v),v=null,ee=!1)}return J&&!re&&(re=!0,e.addEventListener("resize",_,!1)),Q?Q.fire(_e,l,T):he(_e,l,T)}return me.reset=function(){Q&&Q.reset(),ce&&ce.reset()},me}var ht;function A(){return ht||(ht=ze(null,{useWorker:!0,resize:!0})),ht}function x(v,y,H,J,re,oe,ue){var Q=new Path2D(v),ae=new Path2D;ae.addPath(Q,new DOMMatrix(y));var ee=new Path2D;return ee.addPath(ae,new DOMMatrix([Math.cos(ue)*re,Math.sin(ue)*re,-Math.sin(ue)*oe,Math.cos(ue)*oe,H,J])),ee}function F(v){if(!s)throw new Error("path confetti are not supported in this browser");var y,H;typeof v=="string"?y=v:(y=v.path,H=v.matrix);var J=new Path2D(y),re=document.createElement("canvas"),oe=re.getContext("2d");if(!H){for(var ue=1e3,Q=ue,ae=ue,ee=0,fe=0,ce,he,me=0;me<ue;me+=2)for(var _e=0;_e<ue;_e+=2)oe.isPointInPath(J,me,_e,"nonzero")&&(Q=Math.min(Q,me),ae=Math.min(ae,_e),ee=Math.max(ee,me),fe=Math.max(fe,_e));ce=ee-Q,he=fe-ae;var h=10,a=Math.min(h/ce,h/he);H=[a,0,0,a,-Math.round(ce/2+Q)*a,-Math.round(he/2+ae)*a]}return{type:"path",path:y,matrix:H}}function P(v){var y,H=1,J="#000000",re='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';typeof v=="string"?y=v:(y=v.text,H="scalar"in v?v.scalar:H,re="fontFamily"in v?v.fontFamily:re,J="color"in v?v.color:J);var oe=10*H,ue=""+oe+"px "+re,Q=new OffscreenCanvas(oe,oe),ae=Q.getContext("2d");ae.font=ue;var ee=ae.measureText(y),fe=Math.ceil(ee.actualBoundingBoxRight+ee.actualBoundingBoxLeft),ce=Math.ceil(ee.actualBoundingBoxAscent+ee.actualBoundingBoxDescent),he=2,me=ee.actualBoundingBoxLeft+he,_e=ee.actualBoundingBoxAscent+he;fe+=he+he,ce+=he+he,Q=new OffscreenCanvas(fe,ce),ae=Q.getContext("2d"),ae.font=ue,ae.fillStyle=J,ae.fillText(y,me,_e);var h=1/H;return{type:"bitmap",bitmap:Q.transferToImageBitmap(),matrix:[h,0,0,h,-fe*h/2,-ce*h/2]}}n.exports=function(){return A().apply(this,arguments)},n.exports.reset=function(){A().reset()},n.exports.create=ze,n.exports.shapeFromPath=F,n.exports.shapeFromText=P})(function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}(),uc,!1);var cf=uc.exports,hA=uc.exports.create;var Ho=class{static DEFAULTS={scalar:1.4,zIndex:1e4,shapes:["circle","circle","square"],colors:["#f51c8f","#2179e2","#d52dc8","#01a9d9","#78ff44","#fdff6a"]};static async basic(){await this.fire({particleCount:100,spread:70,origin:{y:.6}})}static async leftRight(e=100){let n=[],r=Date.now()+2e3,i=()=>{n.push(this.fire({angle:60,spread:55,origin:{x:0}}),this.fire({angle:120,spread:55,origin:{x:1}})),Date.now()<r&&e>0&&(requestAnimationFrame(i),e--)};i(),await Promise.all(n)}static async realistic(){await Promise.all([this.realisticFire(.25,{spread:26,startVelocity:55}),this.realisticFire(.2,{spread:60}),this.realisticFire(.35,{spread:100,decay:.91,scalar:.8}),this.realisticFire(.1,{spread:120,startVelocity:25,decay:.92,scalar:1.2}),this.realisticFire(.1,{spread:120,startVelocity:45})])}static async fire(e){Object.assign(e,this.DEFAULTS,e),e.particleCount=e.particleCount??this.DEFAULTS.colors.length,await cf(e)}static async realisticFire(e,n){let i={origin:{y:.7}};await this.fire(Object.assign({},i,n,{particleCount:Math.floor(200*e)}))}};var hv=(t,e)=>e.minValue;function mv(t,e){if(t&1&&(Se(0,"div",7),Qe(1,"safeHtml")),t&2){let n=K().$implicit;ge("innerHTML",rt(1,1,n.minValue+" Products"),Pt)}}function gv(t,e){if(t&1&&(Se(0,"div",7),Qe(1,"cooeeCurrency"),Qe(2,"safeHtml")),t&2){let n=K().$implicit;ge("innerHTML",rt(2,3,rt(1,1,n.minValue)),Pt)}}function _v(t,e){if(t&1&&(W(0,"li",6)(1,"div"),Oe(2,mv,2,3,"div",7)(3,gv,3,5,"div",7),Se(4,"img",8),W(5,"div",9),Ae(6),z()()()),t&2){let n=e.$implicit,r=K(2);ni("left",n.calculatedAlignment+"%"),V(2),Te((r.progressBarConfig==null?null:r.progressBarConfig.rewardBasis)===r.RewardBasis.ITEM_COUNT?2:3),V(2),ge("src",r.getIconURL(n),ct),V(2),rn(n.label)}}function vv(t,e){if(t&1&&(gt(0)(1),Se(2,"div",0),Qe(3,"cooeeDynamicVariables"),Qe(4,"safeHtml"),W(5,"div",1)(6,"ul",2)(7,"div",3),Se(8,"div",4),z(),Ze(9,_v,7,5,"li",5,hv),z()()),t&2){let n=K(),r=n.calculatedState(),i=r.nextMilestone?r.nextMilestone.reachingText:r.lastMilestone.reachedText;V(2),ge("innerHTML",rt(4,6,Ul(3,3,i,n.localDynamicVariables())),Pt),V(6),ni("width",r.cartValuePercentage+"%"),V(),Je(r.milestones)}}var jo=class t extends un{cart;localDynamicVariables=Wt({});calculatedState=Wt({});progressBarConfig;RewardBasis=js;constructor(){super()}engagementTriggerReceived(e){this.progressBarConfig=e.progressBarConfig}ngOnInit(){super.ngOnInit(),this.calculateMilestonesSilently()}update(){this.calculateMilestonesSilently()}getIconURL(e){return e.rewardType===oi.FREE_SHIPPING?"https://img.icons8.com/ios-filled/50/FFFFFF/free-shipping.png":e.rewardType===oi.DISCOUNT?"https://img.icons8.com/ios-glyphs/30/FFFFFF/sale-price-tag.png":e.rewardType===oi.FREE_AUTO_GIFT?"https://img.icons8.com/ios-filled/50/FFFFFF/gift--v1.png":""}calculateMilestonesSilently(){this.calculateMilestones().catch(e=>Et.error(e))}async calculateMilestones(){let e=this.engagementTrigger,n=this.progressBarConfig;if(!n?.milestones?.length){Et.warn("Milestones not available in progress bar config",e);return}let r=await this.cart.getNormalisedCart(),i=n.milestones.at(-1),o=n?.reachedAmountOrCount??r.originalAmount,s=n.totalProgress??0;Et.debug("Cart value:",o,`, percentage: ${s}%`),this.celebrate(e,o);let c={milestonesReady:!0,cartValuePercentage:s,milestones:n.milestones},u=n.milestones.find(d=>!d.reached);if(u){let d=or(u.minValue-o);if(n.rewardBasis==="ITEM_COUNT"){let g=u.minValue-o;d=`${g} ${g===1?"product":"products"}`}this.localDynamicVariables.set({amount_left:d}),c.nextMilestone=u,this.calculatedState.set(c);return}c.lastMilestone=i,this.calculatedState.set(c)}celebrate(e,n){let o=[...e.progressBarConfig.milestones].reverse().find(u=>u.minValue<n);if(!o)return;let s=`lc/en/${e.shortID}/${o.minValue}`;sessionStorage.getItem(s)||(sessionStorage.setItem(s,"1"),this.progressBarConfig?.noConfetti||Ho.realistic())}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Le({type:t,selectors:[["cooee-progressbar"]],inputs:{cart:"cart"},features:[St],decls:1,vars:1,consts:[[1,"heading",3,"innerHTML"],[1,"milestone-container"],[1,"milestone-list"],[1,"untracked-path"],[1,"tracked-path"],[1,"milestone-list-item",3,"left"],[1,"milestone-list-item"],[1,"milestone-value",3,"innerHTML"],["width","20","height","20","alt","milestone icon",1,"milestone-icon",3,"src"],[1,"milestone-label"]],template:function(n,r){n&1&&Oe(0,vv,11,8),n&2&&Te(r.calculatedState().milestonesReady?0:-1)},dependencies:[Uo,Fn,yn],styles:[`:host{display:block;padding:10px;background:linear-gradient(0deg,rgba(var(--lc-color-primary),.1) 0%,transparent 100%)}.milestone-container{width:95%;margin:8px 0}.heading{font-weight:500;text-align:center;font-size:12px}.milestone-list{display:flex;align-items:center;position:relative;font-size:10px;font-weight:500}.untracked-path{width:100%;background-color:#e5e7eb;height:4px;position:absolute}.tracked-path{background-color:rgb(var(--lc-color-primary));height:100%;display:block;transition:width .5s ease-in-out}.milestone-list{padding:0;margin:0}.milestone-list-item{position:relative;display:flex;flex-direction:column;align-items:center;height:75px}.milestone-list-item>div{display:flex;flex-direction:column;align-items:center;justify-content:space-between;position:absolute;height:100%;width:100px}.milestone-icon{padding:5px;border-radius:1000px;background-color:rgb(var(--lc-color-primary))}
|
|
30
|
-
`],encapsulation:3})};var lf=
|
|
31
|
-
`),n=e.length===1?null:setInterval(()=>{this.featureSlider.update(r=>we(O({},r),{previousIndex:r.currentIndex,currentIndex:(r.currentIndex+1)%r.features.length}))},3e3);this.featureSlider.set({intervalRef:n,currentIndex:0,features:e})}replaceVariables(e){return e?(0,lf.render)(e,this.currentItem.getTemplateVariables()):""}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Le({type:t,selectors:[["cooee-sticky-atc"]],features:[St],decls:7,vars:3,consts:[[1,"lc-wrapper"],[1,"lc-prices"],[1,"lc-button-wrapper"],["type","button",1,"lc-button","lc-button-atc",3,"click"],[1,"lc-features"],[1,"lc-sale-price"],[1,"lc-additional-text"],[1,"lc-compare-price"],[1,"lc-discount-label"],[1,"lc-feature",3,"ngClass"]],template:function(n,r){if(n&1){let i=We();W(0,"div",0),Oe(1,wv,5,3,"div",1),W(2,"div",2)(3,"button",3),Me("click",function(){return Ne(i),Re(r.addToCart())}),Ae(4,"Add To Cart"),z(),gt(5),Oe(6,Sv,3,0,"div",4),z()()}if(n&2){V(),Te(r.selectedVariant()&&r.stickyATCConfig.showProductInfo?1:-1),V(4);let i=yt(r.featureSlider());V(),Te(i.features.length?6:-1)}},dependencies:[Ln],styles:["[_nghost-%COMP%]{display:flex;justify-content:center;padding:10px;background-color:#fff;width:100%;box-shadow:4px 0 10px #0006;line-height:normal}.lc-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:8px;max-width:1100px;width:100%}.lc-prices[_ngcontent-%COMP%]{flex:1 1 100%;display:flex;flex-wrap:wrap;align-items:center;gap:6px}@media (min-width: 768px){.lc-prices[_ngcontent-%COMP%]{gap:8px}}.lc-sale-price[_ngcontent-%COMP%]{font-size:24px;font-weight:600}.lc-compare-price[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:red;text-decoration:line-through}.lc-discount-label[_ngcontent-%COMP%]{font-size:12px;font-weight:500;color:green}.lc-button-wrapper[_ngcontent-%COMP%]{flex:1 1 100%;display:flex;flex-direction:column;gap:4px;align-items:center}.lc-button[_ngcontent-%COMP%]{background-color:#000;color:#fff;opacity:1;cursor:pointer;pointer-events:auto;border-radius:4px;min-width:150px;width:100%;padding:8px}.lc-additional-text[_ngcontent-%COMP%], .lc-feature[_ngcontent-%COMP%]{font-size:12px;color:#666}.lc-features[_ngcontent-%COMP%]{position:relative;overflow:hidden;height:16px;text-align:center;width:100%}.lc-features[_ngcontent-%COMP%] .lc-feature[_ngcontent-%COMP%]{position:absolute;width:100%;opacity:0;transform:translateY(100%);transition:transform .5s ease,opacity .5s ease}.lc-features[_ngcontent-%COMP%] .lc-feature.enter[_ngcontent-%COMP%]{opacity:1;transform:translateY(0);z-index:2}.lc-features[_ngcontent-%COMP%] .lc-feature.exit[_ngcontent-%COMP%]{opacity:0;transform:translateY(-100%);z-index:1}"]})};var hf,je,mf,mc,sr,uf,gf,_f,vf,gc,fc,pc,Tv,hc={},yf=[],Iv=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Yo=Array.isArray;function Mn(t,e){for(var n in e)t[n]=e[n];return t}function _c(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function dc(t,e,n,r,i){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++mf,__i:-1,__u:0};return i==null&&je.vnode!=null&&je.vnode(o),o}function vc(t){return t.children}function Pr(t,e){this.props=t,this.context=e}function Lr(t,e){if(e==null)return t.__?Lr(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?Lr(t):null}function Ef(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return Ef(t)}}function df(t){(!t.__d&&(t.__d=!0)&&sr.push(t)&&!Wo.__r++||uf!=je.debounceRendering)&&((uf=je.debounceRendering)||gf)(Wo)}function Wo(){for(var t,e,n,r,i,o,s,c=1;sr.length;)sr.length>c&&sr.sort(_f),t=sr.shift(),c=sr.length,t.__d&&(n=void 0,i=(r=(e=t).__v).__e,o=[],s=[],e.__P&&((n=Mn({},r)).__v=r.__v+1,je.vnode&&je.vnode(n),Cf(e.__P,n,r,e.__n,e.__P.namespaceURI,32&r.__u?[i]:null,o,i??Lr(r),!!(32&r.__u),s),n.__v=r.__v,n.__.__k[n.__i]=n,Av(o,n,s),n.__e!=i&&Ef(n)));Wo.__r=0}function bf(t,e,n,r,i,o,s,c,u,d,g){var p,E,w,N,M,L,j=r&&r.__k||yf,X=e.length;for(u=xv(n,e,j,u,X),p=0;p<X;p++)(w=n.__k[p])!=null&&(E=w.__i==-1?hc:j[w.__i]||hc,w.__i=p,L=Cf(t,w,E,i,o,s,c,u,d,g),N=w.__e,w.ref&&E.ref!=w.ref&&(E.ref&&yc(E.ref,null,w),g.push(w.ref,w.__c||N,w)),M==null&&N!=null&&(M=N),4&w.__u||E.__k===w.__k?u=wf(w,u,t):typeof w.type=="function"&&L!==void 0?u=L:N&&(u=N.nextSibling),w.__u&=-7);return n.__e=M,u}function xv(t,e,n,r,i){var o,s,c,u,d,g=n.length,p=g,E=0;for(t.__k=new Array(i),o=0;o<i;o++)(s=e[o])!=null&&typeof s!="boolean"&&typeof s!="function"?(u=o+E,(s=t.__k[o]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?dc(null,s,null,null,null):Yo(s)?dc(vc,{children:s},null,null,null):s.constructor==null&&s.__b>0?dc(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=t,s.__b=t.__b+1,c=null,(d=s.__i=Ov(s,n,u,p))!=-1&&(p--,(c=n[d])&&(c.__u|=2)),c==null||c.__v==null?(d==-1&&(i>g?E--:i<g&&E++),typeof s.type!="function"&&(s.__u|=4)):d!=u&&(d==u-1?E--:d==u+1?E++:(d>u?E--:E++,s.__u|=4))):t.__k[o]=null;if(p)for(o=0;o<g;o++)(c=n[o])!=null&&(2&c.__u)==0&&(c.__e==r&&(r=Lr(c)),Tf(c,c));return r}function wf(t,e,n){var r,i;if(typeof t.type=="function"){for(r=t.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=t,e=wf(r[i],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=Lr(t)),n.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Ov(t,e,n,r){var i,o,s=t.key,c=t.type,u=e[n];if(u===null&&t.key==null||u&&s==u.key&&c==u.type&&(2&u.__u)==0)return n;if(r>(u!=null&&(2&u.__u)==0?1:0))for(i=n-1,o=n+1;i>=0||o<e.length;){if(i>=0){if((u=e[i])&&(2&u.__u)==0&&s==u.key&&c==u.type)return i;i--}if(o<e.length){if((u=e[o])&&(2&u.__u)==0&&s==u.key&&c==u.type)return o;o++}}return-1}function ff(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Iv.test(e)?n:n+"px"}function Go(t,e,n,r,i){var o,s;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||ff(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||ff(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(vf,"$1")),s=e.toLowerCase(),e=s in t||e=="onFocusOut"||e=="onFocusIn"?s.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=gc,t.addEventListener(e,o?pc:fc,o)):t.removeEventListener(e,o?pc:fc,o);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function pf(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=gc++;else if(e.t<n.u)return;return n(je.event?je.event(e):e)}}}function Cf(t,e,n,r,i,o,s,c,u,d){var g,p,E,w,N,M,L,j,X,se,q,Ee,U,pe,te,ye,ke,De=e.type;if(e.constructor!=null)return null;128&n.__u&&(u=!!(32&n.__u),o=[c=e.__e=n.__e]),(g=je.__b)&&g(e);e:if(typeof De=="function")try{if(j=e.props,X="prototype"in De&&De.prototype.render,se=(g=De.contextType)&&r[g.__c],q=g?se?se.props.value:g.__:r,n.__c?L=(p=e.__c=n.__c).__=p.__E:(X?e.__c=p=new De(j,q):(e.__c=p=new Pr(j,q),p.constructor=De,p.render=Nv),se&&se.sub(p),p.props=j,p.state||(p.state={}),p.context=q,p.__n=r,E=p.__d=!0,p.__h=[],p._sb=[]),X&&p.__s==null&&(p.__s=p.state),X&&De.getDerivedStateFromProps!=null&&(p.__s==p.state&&(p.__s=Mn({},p.__s)),Mn(p.__s,De.getDerivedStateFromProps(j,p.__s))),w=p.props,N=p.state,p.__v=e,E)X&&De.getDerivedStateFromProps==null&&p.componentWillMount!=null&&p.componentWillMount(),X&&p.componentDidMount!=null&&p.__h.push(p.componentDidMount);else{if(X&&De.getDerivedStateFromProps==null&&j!==w&&p.componentWillReceiveProps!=null&&p.componentWillReceiveProps(j,q),!p.__e&&p.shouldComponentUpdate!=null&&p.shouldComponentUpdate(j,p.__s,q)===!1||e.__v==n.__v){for(e.__v!=n.__v&&(p.props=j,p.state=p.__s,p.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(Pe){Pe&&(Pe.__=e)}),Ee=0;Ee<p._sb.length;Ee++)p.__h.push(p._sb[Ee]);p._sb=[],p.__h.length&&s.push(p);break e}p.componentWillUpdate!=null&&p.componentWillUpdate(j,p.__s,q),X&&p.componentDidUpdate!=null&&p.__h.push(function(){p.componentDidUpdate(w,N,M)})}if(p.context=q,p.props=j,p.__P=t,p.__e=!1,U=je.__r,pe=0,X){for(p.state=p.__s,p.__d=!1,U&&U(e),g=p.render(p.props,p.state,p.context),te=0;te<p._sb.length;te++)p.__h.push(p._sb[te]);p._sb=[]}else do p.__d=!1,U&&U(e),g=p.render(p.props,p.state,p.context),p.state=p.__s;while(p.__d&&++pe<25);p.state=p.__s,p.getChildContext!=null&&(r=Mn(Mn({},r),p.getChildContext())),X&&!E&&p.getSnapshotBeforeUpdate!=null&&(M=p.getSnapshotBeforeUpdate(w,N)),ye=g,g!=null&&g.type===vc&&g.key==null&&(ye=Sf(g.props.children)),c=bf(t,Yo(ye)?ye:[ye],e,n,r,i,o,s,c,u,d),p.base=e.__e,e.__u&=-161,p.__h.length&&s.push(p),L&&(p.__E=p.__=null)}catch(Pe){if(e.__v=null,u||o!=null)if(Pe.then){for(e.__u|=u?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;o[o.indexOf(c)]=null,e.__e=c}else for(ke=o.length;ke--;)_c(o[ke]);else e.__e=n.__e,e.__k=n.__k;je.__e(Pe,e,n)}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):c=e.__e=Dv(n.__e,e,n,r,i,o,s,u,d);return(g=je.diffed)&&g(e),128&e.__u?void 0:c}function Av(t,e,n){for(var r=0;r<n.length;r++)yc(n[r],n[++r],n[++r]);je.__c&&je.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(o){o.call(i)})}catch(o){je.__e(o,i.__v)}})}function Sf(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:Yo(t)?t.map(Sf):Mn({},t)}function Dv(t,e,n,r,i,o,s,c,u){var d,g,p,E,w,N,M,L=n.props,j=e.props,X=e.type;if(X=="svg"?i="http://www.w3.org/2000/svg":X=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(d=0;d<o.length;d++)if((w=o[d])&&"setAttribute"in w==!!X&&(X?w.localName==X:w.nodeType==3)){t=w,o[d]=null;break}}if(t==null){if(X==null)return document.createTextNode(j);t=document.createElementNS(i,X,j.is&&j),c&&(je.__m&&je.__m(e,o),c=!1),o=null}if(X==null)L===j||c&&t.data==j||(t.data=j);else{if(o=o&&hf.call(t.childNodes),L=n.props||hc,!c&&o!=null)for(L={},d=0;d<t.attributes.length;d++)L[(w=t.attributes[d]).name]=w.value;for(d in L)if(w=L[d],d!="children"){if(d=="dangerouslySetInnerHTML")p=w;else if(!(d in j)){if(d=="value"&&"defaultValue"in j||d=="checked"&&"defaultChecked"in j)continue;Go(t,d,null,w,i)}}for(d in j)w=j[d],d=="children"?E=w:d=="dangerouslySetInnerHTML"?g=w:d=="value"?N=w:d=="checked"?M=w:c&&typeof w!="function"||L[d]===w||Go(t,d,w,L[d],i);if(g)c||p&&(g.__html==p.__html||g.__html==t.innerHTML)||(t.innerHTML=g.__html),e.__k=[];else if(p&&(t.innerHTML=""),bf(e.type=="template"?t.content:t,Yo(E)?E:[E],e,n,r,X=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&Lr(n,0),c,u),o!=null)for(d=o.length;d--;)_c(o[d]);c||(d="value",X=="progress"&&N==null?t.removeAttribute("value"):N!=null&&(N!==t[d]||X=="progress"&&!N||X=="option"&&N!=L[d])&&Go(t,d,N,L[d],i),d="checked",M!=null&&M!=t[d]&&Go(t,d,M,L[d],i))}return t}function yc(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(i){je.__e(i,n)}}function Tf(t,e,n){var r,i;if(je.unmount&&je.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||yc(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){je.__e(o,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&Tf(r[i],e,n||typeof t.type!="function");n||_c(t.__e),t.__c=t.__=t.__e=void 0}function Nv(t,e,n){return this.constructor(t,n)}hf=yf.slice,je={__e:function(t,e,n,r){for(var i,o,s;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(t)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),s=i.__d),s)return i.__E=i}catch(c){t=c}throw t}},mf=0,mc=function(t){return t!=null&&t.constructor==null},Pr.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Mn({},this.state),typeof t=="function"&&(t=t(Mn({},n),this.props)),t&&Mn(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),df(this))},Pr.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),df(this))},Pr.prototype.render=vc,sr=[],gf=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,_f=function(t,e){return t.__v.__b-e.__v.__b},Wo.__r=0,vf=/(PointerCapture)$|Capture$/i,gc=0,fc=pf(!1),pc=pf(!0),Tv=0;var bc,jt,Ec,If,xf=0,Lf=[],pt=je,Of=pt.__b,Af=pt.__r,Df=pt.diffed,Nf=pt.__c,Rf=pt.unmount,Mf=pt.__;function Rv(t,e){pt.__h&&pt.__h(jt,t,xf||e),xf=0;var n=jt.__H||(jt.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function Cc(t,e){var n=Rv(bc++,7);return Lv(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function Mv(){for(var t;t=Lf.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(zo),t.__H.__h.forEach(wc),t.__H.__h=[]}catch(e){t.__H.__h=[],pt.__e(e,t.__v)}}pt.__b=function(t){jt=null,Of&&Of(t)},pt.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Mf&&Mf(t,e)},pt.__r=function(t){Af&&Af(t),bc=0;var e=(jt=t.__c).__H;e&&(Ec===jt?(e.__h=[],jt.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach(zo),e.__h.forEach(wc),e.__h=[],bc=0)),Ec=jt},pt.diffed=function(t){Df&&Df(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Lf.push(e)!==1&&If===pt.requestAnimationFrame||((If=pt.requestAnimationFrame)||Pv)(Mv)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Ec=jt=null},pt.__c=function(t,e){e.some(function(n){try{n.__h.forEach(zo),n.__h=n.__h.filter(function(r){return!r.__||wc(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],pt.__e(r,n.__v)}}),Nf&&Nf(t,e)},pt.unmount=function(t){Rf&&Rf(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{zo(r)}catch(i){e=i}}),n.__H=void 0,e&&pt.__e(e,n.__v))};var Pf=typeof requestAnimationFrame=="function";function Pv(t){var e,n=function(){clearTimeout(r),Pf&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);Pf&&(e=requestAnimationFrame(n))}function zo(t){var e=jt,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),jt=e}function wc(t){var e=jt;t.__c=t.__(),jt=e}function Lv(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}var Fv=Symbol.for("preact-signals");function Tc(){if(Fr>1)Fr--;else{for(var t,e=!1;Ci!==void 0;){var n=Ci;for(Ci=void 0,Sc++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&kf(n))try{n.c()}catch(i){e||(t=i,e=!0)}n=r}}if(Sc=0,Fr--,e)throw t}}var $e=void 0;var Ci=void 0,Fr=0,Sc=0,Ko=0;function Ff(t){if($e!==void 0){var e=t.n;if(e===void 0||e.t!==$e)return e={i:0,S:t,p:$e.s,n:void 0,t:$e,e:void 0,x:void 0,r:e},$e.s!==void 0&&($e.s.n=e),$e.s=e,t.n=e,32&$e.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=$e.s,e.n=void 0,$e.s.n=e,$e.s=e),e}}function _t(t){this.v=t,this.i=0,this.n=void 0,this.t=void 0}_t.prototype.brand=Fv;_t.prototype.h=function(){return!0};_t.prototype.S=function(t){this.t!==t&&t.e===void 0&&(t.x=this.t,this.t!==void 0&&(this.t.e=t),this.t=t)};_t.prototype.U=function(t){if(this.t!==void 0){var e=t.e,n=t.x;e!==void 0&&(e.x=n,t.e=void 0),n!==void 0&&(n.e=e,t.x=void 0),t===this.t&&(this.t=n)}};_t.prototype.subscribe=function(t){var e=this;return Xo(function(){var n=e.value,r=$e;$e=void 0;try{t(n)}finally{$e=r}})};_t.prototype.valueOf=function(){return this.value};_t.prototype.toString=function(){return this.value+""};_t.prototype.toJSON=function(){return this.value};_t.prototype.peek=function(){var t=$e;$e=void 0;try{return this.value}finally{$e=t}};Object.defineProperty(_t.prototype,"value",{get:function(){var t=Ff(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(Sc>100)throw new Error("Cycle detected");this.v=t,this.i++,Ko++,Fr++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{Tc()}}}});function Si(t){return new _t(t)}function kf(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function Vf(t){for(var e=t.s;e!==void 0;e=e.n){var n=e.S.n;if(n!==void 0&&(e.r=n),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function Bf(t){for(var e=t.s,n=void 0;e!==void 0;){var r=e.p;e.i===-1?(e.S.U(e),r!==void 0&&(r.n=e.n),e.n!==void 0&&(e.n.p=r)):n=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=r}t.s=n}function kr(t){_t.call(this,void 0),this.x=t,this.s=void 0,this.g=Ko-1,this.f=4}(kr.prototype=new _t).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Ko))return!0;if(this.g=Ko,this.f|=1,this.i>0&&!kf(this))return this.f&=-2,!0;var t=$e;try{Vf(this),$e=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return $e=t,Bf(this),this.f&=-2,!0};kr.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}_t.prototype.S.call(this,t)};kr.prototype.U=function(t){if(this.t!==void 0&&(_t.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}};kr.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}};Object.defineProperty(kr.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=Ff(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function Uf(t){return new kr(t)}function Hf(t){var e=t.u;if(t.u=void 0,typeof e=="function"){Fr++;var n=$e;$e=void 0;try{e()}catch(r){throw t.f&=-2,t.f|=8,Ic(t),r}finally{$e=n,Tc()}}}function Ic(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,Hf(t)}function kv(t){if($e!==this)throw new Error("Out-of-order effect");Bf(this),$e=t,this.f&=-2,8&this.f&&Ic(this),Tc()}function Ti(t){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Ti.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.u=e)}finally{t()}};Ti.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Hf(this),Vf(this),Fr++;var t=$e;return $e=this,kv.bind(this,t)};Ti.prototype.N=function(){2&this.f||(this.f|=2,this.o=Ci,Ci=this)};Ti.prototype.d=function(){this.f|=8,1&this.f||Ic(this)};function Xo(t){var e=new Ti(t);try{e.c()}catch(n){throw e.d(),n}return e.d.bind(e)}var Oc,xc;function Vr(t,e){je[t]=e.bind(null,je[t]||function(){})}function qo(t){xc&&xc(),xc=t&&t.S()}function jf(t){var e=this,n=t.data,r=Bv(n);r.value=n;var i=Cc(function(){for(var o=e.__v;o=o.__;)if(o.__c){o.__c.__$f|=4;break}return e.__$u.c=function(){var s,c=e.__$u.S(),u=i.value;c(),mc(u)||((s=e.base)==null?void 0:s.nodeType)!==3?(e.__$f|=1,e.setState({})):e.base.data=u},Uf(function(){var s=r.value.value;return s===0?0:s===!0?"":s||""})},[]);return i.value}jf.displayName="_st";Object.defineProperties(_t.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:jf},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});Vr("__b",function(t,e){if(typeof e.type=="string"){var n,r=e.props;for(var i in r)if(i!=="children"){var o=r[i];o instanceof _t&&(n||(e.__np=n={}),n[i]=o,r[i]=o.peek())}}t(e)});Vr("__r",function(t,e){qo();var n,r=e.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(i){var o;return Xo(function(){o=this}),o.c=function(){r.__$f|=1,r.setState({})},o}())),Oc=r,qo(n),t(e)});Vr("__e",function(t,e,n,r){qo(),Oc=void 0,t(e,n,r)});Vr("diffed",function(t,e){qo(),Oc=void 0;var n;if(typeof e.type=="string"&&(n=e.__e)){var r=e.__np,i=e.props;if(r){var o=n.U;if(o)for(var s in o){var c=o[s];c!==void 0&&!(s in r)&&(c.d(),o[s]=void 0)}else n.U=o={};for(var u in r){var d=o[u],g=r[u];d===void 0?(d=Vv(n,u,g,i),o[u]=d):d.o(g,i)}}}t(e)});function Vv(t,e,n,r){var i=e in t&&t.ownerSVGElement===void 0,o=Si(n);return{o:function(s,c){o.value=s,r=c},d:Xo(function(){var s=o.value.value;r[e]!==s&&(r[e]=s,i?t[e]=s:s?t.setAttribute(e,s):t.removeAttribute(e))})}}Vr("unmount",function(t,e){if(typeof e.type=="string"){var n=e.__e;if(n){var r=n.U;if(r){n.U=void 0;for(var i in r){var o=r[i];o&&o.d()}}}}else{var s=e.__c;if(s){var c=s.__$u;c&&(s.__$u=void 0,c.d())}}t(e)});Vr("__h",function(t,e,n,r){(r<3||r===9)&&(e.__$f|=2),t(e,n,r)});Pr.prototype.shouldComponentUpdate=function(t,e){var n=this.__$u,r=n&&n.s!==void 0;for(var i in e)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){if(!(r||2&this.__$f||4&this.__$f)||1&this.__$f)return!0}else if(!(r||4&this.__$f)||3&this.__$f)return!0;for(var o in t)if(o!=="__source"&&t[o]!==this.props[o])return!0;for(var s in this.props)if(!(s in t))return!0;return!1};function Bv(t){return Cc(function(){return Si(t)},[])}var Ac=(i=>(i.SIMPLE="SIMPLE",i.SWIPER="SWIPER",i.STORY="STORY",i.FLOATING_POPUP="FLOATING_POPUP",i))(Ac||{}),Dc=(r=>(r.ON="ON",r.OFF="OFF",r.ON_HOVER="ON_HOVER",r))(Dc||{}),Ii=(r=>(r.FIRST_ITEM="FIRST_ITEM",r.CARD="CARD",r.NONE="NONE",r))(Ii||{});function Uv(t,e){return e={exports:{}},t(e,e.exports),e.exports}var Hv=Wv,jv=zv,$v=qv,bn=[],Qt=[],Gv=typeof Uint8Array<"u"?Uint8Array:Array,Nc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(ar=0,$f=Nc.length;ar<$f;++ar)bn[ar]=Nc[ar],Qt[Nc.charCodeAt(ar)]=ar;var ar,$f;Qt[45]=62;Qt[95]=63;function op(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function Wv(t){var e=op(t),n=e[0],r=e[1];return(n+r)*3/4-r}function Yv(t,e,n){return(e+n)*3/4-n}function zv(t){var e,n=op(t),r=n[0],i=n[1],o=new Gv(Yv(t,r,i)),s=0,c=i>0?r-4:r,u;for(u=0;u<c;u+=4)e=Qt[t.charCodeAt(u)]<<18|Qt[t.charCodeAt(u+1)]<<12|Qt[t.charCodeAt(u+2)]<<6|Qt[t.charCodeAt(u+3)],o[s++]=e>>16&255,o[s++]=e>>8&255,o[s++]=e&255;return i===2&&(e=Qt[t.charCodeAt(u)]<<2|Qt[t.charCodeAt(u+1)]>>4,o[s++]=e&255),i===1&&(e=Qt[t.charCodeAt(u)]<<10|Qt[t.charCodeAt(u+1)]<<4|Qt[t.charCodeAt(u+2)]>>2,o[s++]=e>>8&255,o[s++]=e&255),o}function Kv(t){return bn[t>>18&63]+bn[t>>12&63]+bn[t>>6&63]+bn[t&63]}function Xv(t,e,n){for(var r,i=[],o=e;o<n;o+=3)r=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(t[o+2]&255),i.push(Kv(r));return i.join("")}function qv(t){for(var e,n=t.length,r=n%3,i=[],o=16383,s=0,c=n-r;s<c;s+=o)i.push(Xv(t,s,s+o>c?c:s+o));return r===1?(e=t[n-1],i.push(bn[e>>2]+bn[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],i.push(bn[e>>10]+bn[e>>4&63]+bn[e<<2&63]+"=")),i.join("")}var Rc={byteLength:Hv,toByteArray:jv,fromByteArray:$v};var Zv=function(e,n,r,i,o){var s,c,u=o*8-i-1,d=(1<<u)-1,g=d>>1,p=-7,E=r?o-1:0,w=r?-1:1,N=e[n+E];for(E+=w,s=N&(1<<-p)-1,N>>=-p,p+=u;p>0;s=s*256+e[n+E],E+=w,p-=8);for(c=s&(1<<-p)-1,s>>=-p,p+=i;p>0;c=c*256+e[n+E],E+=w,p-=8);if(s===0)s=1-g;else{if(s===d)return c?NaN:(N?-1:1)*(1/0);c=c+Math.pow(2,i),s=s-g}return(N?-1:1)*c*Math.pow(2,s-i)},Jv=function(e,n,r,i,o,s){var c,u,d,g=s*8-o-1,p=(1<<g)-1,E=p>>1,w=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,N=i?0:s-1,M=i?1:-1,L=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(u=isNaN(n)?1:0,c=p):(c=Math.floor(Math.log(n)/Math.LN2),n*(d=Math.pow(2,-c))<1&&(c--,d*=2),c+E>=1?n+=w/d:n+=w*Math.pow(2,1-E),n*d>=2&&(c++,d/=2),c+E>=p?(u=0,c=p):c+E>=1?(u=(n*d-1)*Math.pow(2,o),c=c+E):(u=n*Math.pow(2,E-1)*Math.pow(2,o),c=0));o>=8;e[r+N]=u&255,N+=M,u/=256,o-=8);for(c=c<<o|u,g+=o;g>0;e[r+N]=c&255,N+=M,c/=256,g-=8);e[r+N-M]|=L*128},Br={read:Zv,write:Jv},Qo=Uv(function(t,e){var n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=j,e.INSPECT_MAX_BYTES=50;var r=2147483647;e.kMaxLength=r,s.TYPED_ARRAY_SUPPORT=i(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{var h=new Uint8Array(1),a={foo:function(){return 42}};return Object.setPrototypeOf(a,Uint8Array.prototype),Object.setPrototypeOf(h,a),h.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(h){if(h>r)throw new RangeError('The value "'+h+'" is invalid for option "size"');var a=new Uint8Array(h);return Object.setPrototypeOf(a,s.prototype),a}function s(h,a,l){if(typeof h=="number"){if(typeof a=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return g(h)}return c(h,a,l)}s.poolSize=8192;function c(h,a,l){if(typeof h=="string")return p(h,a);if(ArrayBuffer.isView(h))return w(h);if(h==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(h));if(he(h,ArrayBuffer)||h&&he(h.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(he(h,SharedArrayBuffer)||h&&he(h.buffer,SharedArrayBuffer)))return N(h,a,l);if(typeof h=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var _=h.valueOf&&h.valueOf();if(_!=null&&_!==h)return s.from(_,a,l);var T=M(h);if(T)return T;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof h[Symbol.toPrimitive]=="function")return s.from(h[Symbol.toPrimitive]("string"),a,l);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(h))}s.from=function(h,a,l){return c(h,a,l)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function u(h){if(typeof h!="number")throw new TypeError('"size" argument must be of type number');if(h<0)throw new RangeError('The value "'+h+'" is invalid for option "size"')}function d(h,a,l){return u(h),h<=0?o(h):a!==void 0?typeof l=="string"?o(h).fill(a,l):o(h).fill(a):o(h)}s.alloc=function(h,a,l){return d(h,a,l)};function g(h){return u(h),o(h<0?0:L(h)|0)}s.allocUnsafe=function(h){return g(h)},s.allocUnsafeSlow=function(h){return g(h)};function p(h,a){if((typeof a!="string"||a==="")&&(a="utf8"),!s.isEncoding(a))throw new TypeError("Unknown encoding: "+a);var l=X(h,a)|0,_=o(l),T=_.write(h,a);return T!==l&&(_=_.slice(0,T)),_}function E(h){for(var a=h.length<0?0:L(h.length)|0,l=o(a),_=0;_<a;_+=1)l[_]=h[_]&255;return l}function w(h){if(he(h,Uint8Array)){var a=new Uint8Array(h);return N(a.buffer,a.byteOffset,a.byteLength)}return E(h)}function N(h,a,l){if(a<0||h.byteLength<a)throw new RangeError('"offset" is outside of buffer bounds');if(h.byteLength<a+(l||0))throw new RangeError('"length" is outside of buffer bounds');var _;return a===void 0&&l===void 0?_=new Uint8Array(h):l===void 0?_=new Uint8Array(h,a):_=new Uint8Array(h,a,l),Object.setPrototypeOf(_,s.prototype),_}function M(h){if(s.isBuffer(h)){var a=L(h.length)|0,l=o(a);return l.length===0||h.copy(l,0,0,a),l}if(h.length!==void 0)return typeof h.length!="number"||me(h.length)?o(0):E(h);if(h.type==="Buffer"&&Array.isArray(h.data))return E(h.data)}function L(h){if(h>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return h|0}function j(h){return+h!=h&&(h=0),s.alloc(+h)}s.isBuffer=function(a){return a!=null&&a._isBuffer===!0&&a!==s.prototype},s.compare=function(a,l){if(he(a,Uint8Array)&&(a=s.from(a,a.offset,a.byteLength)),he(l,Uint8Array)&&(l=s.from(l,l.offset,l.byteLength)),!s.isBuffer(a)||!s.isBuffer(l))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(a===l)return 0;for(var _=a.length,T=l.length,D=0,k=Math.min(_,T);D<k;++D)if(a[D]!==l[D]){_=a[D],T=l[D];break}return _<T?-1:T<_?1:0},s.isEncoding=function(a){switch(String(a).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(a,l){if(!Array.isArray(a))throw new TypeError('"list" argument must be an Array of Buffers');if(a.length===0)return s.alloc(0);var _;if(l===void 0)for(l=0,_=0;_<a.length;++_)l+=a[_].length;var T=s.allocUnsafe(l),D=0;for(_=0;_<a.length;++_){var k=a[_];if(he(k,Uint8Array))D+k.length>T.length?s.from(k).copy(T,D):Uint8Array.prototype.set.call(T,k,D);else if(s.isBuffer(k))k.copy(T,D);else throw new TypeError('"list" argument must be an Array of Buffers');D+=k.length}return T};function X(h,a){if(s.isBuffer(h))return h.length;if(ArrayBuffer.isView(h)||he(h,ArrayBuffer))return h.byteLength;if(typeof h!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(h));var l=h.length,_=arguments.length>2&&arguments[2]===!0;if(!_&&l===0)return 0;for(var T=!1;;)switch(a){case"ascii":case"latin1":case"binary":return l;case"utf8":case"utf-8":return Q(h).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l*2;case"hex":return l>>>1;case"base64":return fe(h).length;default:if(T)return _?-1:Q(h).length;a=(""+a).toLowerCase(),T=!0}}s.byteLength=X;function se(h,a,l){var _=!1;if((a===void 0||a<0)&&(a=0),a>this.length||((l===void 0||l>this.length)&&(l=this.length),l<=0)||(l>>>=0,a>>>=0,l<=a))return"";for(h||(h="utf8");;)switch(h){case"hex":return F(this,a,l);case"utf8":case"utf-8":return Ge(this,a,l);case"ascii":return A(this,a,l);case"latin1":case"binary":return x(this,a,l);case"base64":return Pe(this,a,l);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,a,l);default:if(_)throw new TypeError("Unknown encoding: "+h);h=(h+"").toLowerCase(),_=!0}}s.prototype._isBuffer=!0;function q(h,a,l){var _=h[a];h[a]=h[l],h[l]=_}s.prototype.swap16=function(){var a=this.length;if(a%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var l=0;l<a;l+=2)q(this,l,l+1);return this},s.prototype.swap32=function(){var a=this.length;if(a%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var l=0;l<a;l+=4)q(this,l,l+3),q(this,l+1,l+2);return this},s.prototype.swap64=function(){var a=this.length;if(a%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var l=0;l<a;l+=8)q(this,l,l+7),q(this,l+1,l+6),q(this,l+2,l+5),q(this,l+3,l+4);return this},s.prototype.toString=function(){var a=this.length;return a===0?"":arguments.length===0?Ge(this,0,a):se.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(a){if(!s.isBuffer(a))throw new TypeError("Argument must be a Buffer");return this===a?!0:s.compare(this,a)===0},s.prototype.inspect=function(){var a="",l=e.INSPECT_MAX_BYTES;return a=this.toString("hex",0,l).replace(/(.{2})/g,"$1 ").trim(),this.length>l&&(a+=" ... "),"<Buffer "+a+">"},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(a,l,_,T,D){if(he(a,Uint8Array)&&(a=s.from(a,a.offset,a.byteLength)),!s.isBuffer(a))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(a));if(l===void 0&&(l=0),_===void 0&&(_=a?a.length:0),T===void 0&&(T=0),D===void 0&&(D=this.length),l<0||_>a.length||T<0||D>this.length)throw new RangeError("out of range index");if(T>=D&&l>=_)return 0;if(T>=D)return-1;if(l>=_)return 1;if(l>>>=0,_>>>=0,T>>>=0,D>>>=0,this===a)return 0;for(var k=D-T,ve=_-l,Ie=Math.min(k,ve),be=this.slice(T,D),Ve=a.slice(l,_),Be=0;Be<Ie;++Be)if(be[Be]!==Ve[Be]){k=be[Be],ve=Ve[Be];break}return k<ve?-1:ve<k?1:0};function Ee(h,a,l,_,T){if(h.length===0)return-1;if(typeof l=="string"?(_=l,l=0):l>2147483647?l=2147483647:l<-2147483648&&(l=-2147483648),l=+l,me(l)&&(l=T?0:h.length-1),l<0&&(l=h.length+l),l>=h.length){if(T)return-1;l=h.length-1}else if(l<0)if(T)l=0;else return-1;if(typeof a=="string"&&(a=s.from(a,_)),s.isBuffer(a))return a.length===0?-1:U(h,a,l,_,T);if(typeof a=="number")return a=a&255,typeof Uint8Array.prototype.indexOf=="function"?T?Uint8Array.prototype.indexOf.call(h,a,l):Uint8Array.prototype.lastIndexOf.call(h,a,l):U(h,[a],l,_,T);throw new TypeError("val must be string, number or Buffer")}function U(h,a,l,_,T){var D=1,k=h.length,ve=a.length;if(_!==void 0&&(_=String(_).toLowerCase(),_==="ucs2"||_==="ucs-2"||_==="utf16le"||_==="utf-16le")){if(h.length<2||a.length<2)return-1;D=2,k/=2,ve/=2,l/=2}function Ie(Ft,$t){return D===1?Ft[$t]:Ft.readUInt16BE($t*D)}var be;if(T){var Ve=-1;for(be=l;be<k;be++)if(Ie(h,be)===Ie(a,Ve===-1?0:be-Ve)){if(Ve===-1&&(Ve=be),be-Ve+1===ve)return Ve*D}else Ve!==-1&&(be-=be-Ve),Ve=-1}else for(l+ve>k&&(l=k-ve),be=l;be>=0;be--){for(var Be=!0,qe=0;qe<ve;qe++)if(Ie(h,be+qe)!==Ie(a,qe)){Be=!1;break}if(Be)return be}return-1}s.prototype.includes=function(a,l,_){return this.indexOf(a,l,_)!==-1},s.prototype.indexOf=function(a,l,_){return Ee(this,a,l,_,!0)},s.prototype.lastIndexOf=function(a,l,_){return Ee(this,a,l,_,!1)};function pe(h,a,l,_){l=Number(l)||0;var T=h.length-l;_?(_=Number(_),_>T&&(_=T)):_=T;var D=a.length;_>D/2&&(_=D/2);for(var k=0;k<_;++k){var ve=parseInt(a.substr(k*2,2),16);if(me(ve))return k;h[l+k]=ve}return k}function te(h,a,l,_){return ce(Q(a,h.length-l),h,l,_)}function ye(h,a,l,_){return ce(ae(a),h,l,_)}function ke(h,a,l,_){return ce(fe(a),h,l,_)}function De(h,a,l,_){return ce(ee(a,h.length-l),h,l,_)}s.prototype.write=function(a,l,_,T){if(l===void 0)T="utf8",_=this.length,l=0;else if(_===void 0&&typeof l=="string")T=l,_=this.length,l=0;else if(isFinite(l))l=l>>>0,isFinite(_)?(_=_>>>0,T===void 0&&(T="utf8")):(T=_,_=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var D=this.length-l;if((_===void 0||_>D)&&(_=D),a.length>0&&(_<0||l<0)||l>this.length)throw new RangeError("Attempt to write outside buffer bounds");T||(T="utf8");for(var k=!1;;)switch(T){case"hex":return pe(this,a,l,_);case"utf8":case"utf-8":return te(this,a,l,_);case"ascii":case"latin1":case"binary":return ye(this,a,l,_);case"base64":return ke(this,a,l,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return De(this,a,l,_);default:if(k)throw new TypeError("Unknown encoding: "+T);T=(""+T).toLowerCase(),k=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Pe(h,a,l){return a===0&&l===h.length?Rc.fromByteArray(h):Rc.fromByteArray(h.slice(a,l))}function Ge(h,a,l){l=Math.min(h.length,l);for(var _=[],T=a;T<l;){var D=h[T],k=null,ve=D>239?4:D>223?3:D>191?2:1;if(T+ve<=l){var Ie,be,Ve,Be;switch(ve){case 1:D<128&&(k=D);break;case 2:Ie=h[T+1],(Ie&192)===128&&(Be=(D&31)<<6|Ie&63,Be>127&&(k=Be));break;case 3:Ie=h[T+1],be=h[T+2],(Ie&192)===128&&(be&192)===128&&(Be=(D&15)<<12|(Ie&63)<<6|be&63,Be>2047&&(Be<55296||Be>57343)&&(k=Be));break;case 4:Ie=h[T+1],be=h[T+2],Ve=h[T+3],(Ie&192)===128&&(be&192)===128&&(Ve&192)===128&&(Be=(D&15)<<18|(Ie&63)<<12|(be&63)<<6|Ve&63,Be>65535&&Be<1114112&&(k=Be))}}k===null?(k=65533,ve=1):k>65535&&(k-=65536,_.push(k>>>10&1023|55296),k=56320|k&1023),_.push(k),T+=ve}return ht(_)}var ze=4096;function ht(h){var a=h.length;if(a<=ze)return String.fromCharCode.apply(String,h);for(var l="",_=0;_<a;)l+=String.fromCharCode.apply(String,h.slice(_,_+=ze));return l}function A(h,a,l){var _="";l=Math.min(h.length,l);for(var T=a;T<l;++T)_+=String.fromCharCode(h[T]&127);return _}function x(h,a,l){var _="";l=Math.min(h.length,l);for(var T=a;T<l;++T)_+=String.fromCharCode(h[T]);return _}function F(h,a,l){var _=h.length;(!a||a<0)&&(a=0),(!l||l<0||l>_)&&(l=_);for(var T="",D=a;D<l;++D)T+=_e[h[D]];return T}function P(h,a,l){for(var _=h.slice(a,l),T="",D=0;D<_.length-1;D+=2)T+=String.fromCharCode(_[D]+_[D+1]*256);return T}s.prototype.slice=function(a,l){var _=this.length;a=~~a,l=l===void 0?_:~~l,a<0?(a+=_,a<0&&(a=0)):a>_&&(a=_),l<0?(l+=_,l<0&&(l=0)):l>_&&(l=_),l<a&&(l=a);var T=this.subarray(a,l);return Object.setPrototypeOf(T,s.prototype),T};function v(h,a,l){if(h%1!==0||h<0)throw new RangeError("offset is not uint");if(h+a>l)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(a,l,_){a=a>>>0,l=l>>>0,_||v(a,l,this.length);for(var T=this[a],D=1,k=0;++k<l&&(D*=256);)T+=this[a+k]*D;return T},s.prototype.readUintBE=s.prototype.readUIntBE=function(a,l,_){a=a>>>0,l=l>>>0,_||v(a,l,this.length);for(var T=this[a+--l],D=1;l>0&&(D*=256);)T+=this[a+--l]*D;return T},s.prototype.readUint8=s.prototype.readUInt8=function(a,l){return a=a>>>0,l||v(a,1,this.length),this[a]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(a,l){return a=a>>>0,l||v(a,2,this.length),this[a]|this[a+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(a,l){return a=a>>>0,l||v(a,2,this.length),this[a]<<8|this[a+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(a,l){return a=a>>>0,l||v(a,4,this.length),(this[a]|this[a+1]<<8|this[a+2]<<16)+this[a+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(a,l){return a=a>>>0,l||v(a,4,this.length),this[a]*16777216+(this[a+1]<<16|this[a+2]<<8|this[a+3])},s.prototype.readIntLE=function(a,l,_){a=a>>>0,l=l>>>0,_||v(a,l,this.length);for(var T=this[a],D=1,k=0;++k<l&&(D*=256);)T+=this[a+k]*D;return D*=128,T>=D&&(T-=Math.pow(2,8*l)),T},s.prototype.readIntBE=function(a,l,_){a=a>>>0,l=l>>>0,_||v(a,l,this.length);for(var T=l,D=1,k=this[a+--T];T>0&&(D*=256);)k+=this[a+--T]*D;return D*=128,k>=D&&(k-=Math.pow(2,8*l)),k},s.prototype.readInt8=function(a,l){return a=a>>>0,l||v(a,1,this.length),this[a]&128?(255-this[a]+1)*-1:this[a]},s.prototype.readInt16LE=function(a,l){a=a>>>0,l||v(a,2,this.length);var _=this[a]|this[a+1]<<8;return _&32768?_|4294901760:_},s.prototype.readInt16BE=function(a,l){a=a>>>0,l||v(a,2,this.length);var _=this[a+1]|this[a]<<8;return _&32768?_|4294901760:_},s.prototype.readInt32LE=function(a,l){return a=a>>>0,l||v(a,4,this.length),this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24},s.prototype.readInt32BE=function(a,l){return a=a>>>0,l||v(a,4,this.length),this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]},s.prototype.readFloatLE=function(a,l){return a=a>>>0,l||v(a,4,this.length),Br.read(this,a,!0,23,4)},s.prototype.readFloatBE=function(a,l){return a=a>>>0,l||v(a,4,this.length),Br.read(this,a,!1,23,4)},s.prototype.readDoubleLE=function(a,l){return a=a>>>0,l||v(a,8,this.length),Br.read(this,a,!0,52,8)},s.prototype.readDoubleBE=function(a,l){return a=a>>>0,l||v(a,8,this.length),Br.read(this,a,!1,52,8)};function y(h,a,l,_,T,D){if(!s.isBuffer(h))throw new TypeError('"buffer" argument must be a Buffer instance');if(a>T||a<D)throw new RangeError('"value" argument is out of bounds');if(l+_>h.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(a,l,_,T){if(a=+a,l=l>>>0,_=_>>>0,!T){var D=Math.pow(2,8*_)-1;y(this,a,l,_,D,0)}var k=1,ve=0;for(this[l]=a&255;++ve<_&&(k*=256);)this[l+ve]=a/k&255;return l+_},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(a,l,_,T){if(a=+a,l=l>>>0,_=_>>>0,!T){var D=Math.pow(2,8*_)-1;y(this,a,l,_,D,0)}var k=_-1,ve=1;for(this[l+k]=a&255;--k>=0&&(ve*=256);)this[l+k]=a/ve&255;return l+_},s.prototype.writeUint8=s.prototype.writeUInt8=function(a,l,_){return a=+a,l=l>>>0,_||y(this,a,l,1,255,0),this[l]=a&255,l+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(a,l,_){return a=+a,l=l>>>0,_||y(this,a,l,2,65535,0),this[l]=a&255,this[l+1]=a>>>8,l+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(a,l,_){return a=+a,l=l>>>0,_||y(this,a,l,2,65535,0),this[l]=a>>>8,this[l+1]=a&255,l+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(a,l,_){return a=+a,l=l>>>0,_||y(this,a,l,4,4294967295,0),this[l+3]=a>>>24,this[l+2]=a>>>16,this[l+1]=a>>>8,this[l]=a&255,l+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(a,l,_){return a=+a,l=l>>>0,_||y(this,a,l,4,4294967295,0),this[l]=a>>>24,this[l+1]=a>>>16,this[l+2]=a>>>8,this[l+3]=a&255,l+4},s.prototype.writeIntLE=function(a,l,_,T){if(a=+a,l=l>>>0,!T){var D=Math.pow(2,8*_-1);y(this,a,l,_,D-1,-D)}var k=0,ve=1,Ie=0;for(this[l]=a&255;++k<_&&(ve*=256);)a<0&&Ie===0&&this[l+k-1]!==0&&(Ie=1),this[l+k]=(a/ve>>0)-Ie&255;return l+_},s.prototype.writeIntBE=function(a,l,_,T){if(a=+a,l=l>>>0,!T){var D=Math.pow(2,8*_-1);y(this,a,l,_,D-1,-D)}var k=_-1,ve=1,Ie=0;for(this[l+k]=a&255;--k>=0&&(ve*=256);)a<0&&Ie===0&&this[l+k+1]!==0&&(Ie=1),this[l+k]=(a/ve>>0)-Ie&255;return l+_},s.prototype.writeInt8=function(a,l,_){return a=+a,l=l>>>0,_||y(this,a,l,1,127,-128),a<0&&(a=255+a+1),this[l]=a&255,l+1},s.prototype.writeInt16LE=function(a,l,_){return a=+a,l=l>>>0,_||y(this,a,l,2,32767,-32768),this[l]=a&255,this[l+1]=a>>>8,l+2},s.prototype.writeInt16BE=function(a,l,_){return a=+a,l=l>>>0,_||y(this,a,l,2,32767,-32768),this[l]=a>>>8,this[l+1]=a&255,l+2},s.prototype.writeInt32LE=function(a,l,_){return a=+a,l=l>>>0,_||y(this,a,l,4,2147483647,-2147483648),this[l]=a&255,this[l+1]=a>>>8,this[l+2]=a>>>16,this[l+3]=a>>>24,l+4},s.prototype.writeInt32BE=function(a,l,_){return a=+a,l=l>>>0,_||y(this,a,l,4,2147483647,-2147483648),a<0&&(a=4294967295+a+1),this[l]=a>>>24,this[l+1]=a>>>16,this[l+2]=a>>>8,this[l+3]=a&255,l+4};function H(h,a,l,_,T,D){if(l+_>h.length)throw new RangeError("Index out of range");if(l<0)throw new RangeError("Index out of range")}function J(h,a,l,_,T){return a=+a,l=l>>>0,T||H(h,a,l,4),Br.write(h,a,l,_,23,4),l+4}s.prototype.writeFloatLE=function(a,l,_){return J(this,a,l,!0,_)},s.prototype.writeFloatBE=function(a,l,_){return J(this,a,l,!1,_)};function re(h,a,l,_,T){return a=+a,l=l>>>0,T||H(h,a,l,8),Br.write(h,a,l,_,52,8),l+8}s.prototype.writeDoubleLE=function(a,l,_){return re(this,a,l,!0,_)},s.prototype.writeDoubleBE=function(a,l,_){return re(this,a,l,!1,_)},s.prototype.copy=function(a,l,_,T){if(!s.isBuffer(a))throw new TypeError("argument should be a Buffer");if(_||(_=0),!T&&T!==0&&(T=this.length),l>=a.length&&(l=a.length),l||(l=0),T>0&&T<_&&(T=_),T===_||a.length===0||this.length===0)return 0;if(l<0)throw new RangeError("targetStart out of bounds");if(_<0||_>=this.length)throw new RangeError("Index out of range");if(T<0)throw new RangeError("sourceEnd out of bounds");T>this.length&&(T=this.length),a.length-l<T-_&&(T=a.length-l+_);var D=T-_;return this===a&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(l,_,T):Uint8Array.prototype.set.call(a,this.subarray(_,T),l),D},s.prototype.fill=function(a,l,_,T){if(typeof a=="string"){if(typeof l=="string"?(T=l,l=0,_=this.length):typeof _=="string"&&(T=_,_=this.length),T!==void 0&&typeof T!="string")throw new TypeError("encoding must be a string");if(typeof T=="string"&&!s.isEncoding(T))throw new TypeError("Unknown encoding: "+T);if(a.length===1){var D=a.charCodeAt(0);(T==="utf8"&&D<128||T==="latin1")&&(a=D)}}else typeof a=="number"?a=a&255:typeof a=="boolean"&&(a=Number(a));if(l<0||this.length<l||this.length<_)throw new RangeError("Out of range index");if(_<=l)return this;l=l>>>0,_=_===void 0?this.length:_>>>0,a||(a=0);var k;if(typeof a=="number")for(k=l;k<_;++k)this[k]=a;else{var ve=s.isBuffer(a)?a:s.from(a,T),Ie=ve.length;if(Ie===0)throw new TypeError('The value "'+a+'" is invalid for argument "value"');for(k=0;k<_-l;++k)this[k+l]=ve[k%Ie]}return this};var oe=/[^+/0-9A-Za-z-_]/g;function ue(h){if(h=h.split("=")[0],h=h.trim().replace(oe,""),h.length<2)return"";for(;h.length%4!==0;)h=h+"=";return h}function Q(h,a){a=a||1/0;for(var l,_=h.length,T=null,D=[],k=0;k<_;++k){if(l=h.charCodeAt(k),l>55295&&l<57344){if(!T){if(l>56319){(a-=3)>-1&&D.push(239,191,189);continue}else if(k+1===_){(a-=3)>-1&&D.push(239,191,189);continue}T=l;continue}if(l<56320){(a-=3)>-1&&D.push(239,191,189),T=l;continue}l=(T-55296<<10|l-56320)+65536}else T&&(a-=3)>-1&&D.push(239,191,189);if(T=null,l<128){if((a-=1)<0)break;D.push(l)}else if(l<2048){if((a-=2)<0)break;D.push(l>>6|192,l&63|128)}else if(l<65536){if((a-=3)<0)break;D.push(l>>12|224,l>>6&63|128,l&63|128)}else if(l<1114112){if((a-=4)<0)break;D.push(l>>18|240,l>>12&63|128,l>>6&63|128,l&63|128)}else throw new Error("Invalid code point")}return D}function ae(h){for(var a=[],l=0;l<h.length;++l)a.push(h.charCodeAt(l)&255);return a}function ee(h,a){for(var l,_,T,D=[],k=0;k<h.length&&!((a-=2)<0);++k)l=h.charCodeAt(k),_=l>>8,T=l%256,D.push(T),D.push(_);return D}function fe(h){return Rc.toByteArray(ue(h))}function ce(h,a,l,_){for(var T=0;T<_&&!(T+l>=a.length||T>=h.length);++T)a[T+l]=h[T];return T}function he(h,a){return h instanceof a||h!=null&&h.constructor!=null&&h.constructor.name!=null&&h.constructor.name===a.name}function me(h){return h!==h}var _e=function(){for(var h="0123456789abcdef",a=new Array(256),l=0;l<16;++l)for(var _=l*16,T=0;T<16;++T)a[_+T]=h[l]+h[T];return a}()}),Fe=Qo.Buffer;Qo.SlowBuffer;Qo.INSPECT_MAX_BYTES;Qo.kMaxLength;var kc=function(e,n){return kc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},kc(e,n)};function es(t,e){kc(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var lr=function(t){es(e,t);function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return Object.defineProperty(e.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),e}(Error),tt=function(t){es(e,t);function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return Object.defineProperty(e.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),e}(TypeError);function Zo(t){return t&&t.Math==Math&&t}function sp(){return Zo(typeof globalThis=="object"&&globalThis)||Zo(typeof window=="object"&&window)||Zo(typeof self=="object"&&self)||Zo(typeof global=="object"&&global)||Function("return this")()}function Qv(){var t=sp();return typeof t.navigator=="object"&&t.navigator.product==="ReactNative"}var ey=function(e){var n=Qv()?"BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.":"BSON: No cryptographic implementation for random bytes present, falling back to a less secure implementation.";console.warn(n);for(var r=Fe.alloc(e),i=0;i<e;++i)r[i]=Math.floor(Math.random()*256);return r},ty=function(){{if(typeof window<"u"){var t=window.crypto||window.msCrypto;if(t&&t.getRandomValues)return function(e){return t.getRandomValues(Fe.alloc(e))}}return typeof global<"u"&&global.crypto&&global.crypto.getRandomValues?function(e){return global.crypto.getRandomValues(Fe.alloc(e))}:ey}},ap=ty();function ny(t){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(t))}function Bc(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}function ry(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function iy(t){return Di(t)&&Object.prototype.toString.call(t)==="[object Date]"}function Di(t){return typeof t=="object"&&t!==null}function ts(t,e){var n=!1;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return n||(console.warn(e),n=!0),t.apply(this,i)}return r}function Jo(t){if(ArrayBuffer.isView(t))return Fe.from(t.buffer,t.byteOffset,t.byteLength);if(ny(t))return Fe.from(t);throw new tt("Must use either Buffer or TypedArray")}var oy=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15})$/i,cp=function(t){return typeof t=="string"&&oy.test(t)},Vc=function(t){if(!cp(t))throw new tt('UUID string representations must be a 32 or 36 character hex string (dashes excluded/included). Format: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" or "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".');var e=t.replace(/-/g,"");return Fe.from(e,"hex")},Gf=function(t,e){return e===void 0&&(e=!0),e?t.toString("hex",0,4)+"-"+t.toString("hex",4,6)+"-"+t.toString("hex",6,8)+"-"+t.toString("hex",8,10)+"-"+t.toString("hex",10,16):t.toString("hex")};var TD=Math.pow(2,63)-1,ID=-Math.pow(2,63),sy=Math.pow(2,53),ay=-Math.pow(2,53);var lp=4;var ur=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);if(e!=null&&typeof e!="string"&&!ArrayBuffer.isView(e)&&!(e instanceof ArrayBuffer)&&!Array.isArray(e))throw new tt("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=n??t.BSON_BINARY_SUBTYPE_DEFAULT,e==null?(this.buffer=Fe.alloc(t.BUFFER_SIZE),this.position=0):(typeof e=="string"?this.buffer=Fe.from(e,"binary"):Array.isArray(e)?this.buffer=Fe.from(e):this.buffer=Jo(e),this.position=this.buffer.byteLength)}return t.prototype.put=function(e){if(typeof e=="string"&&e.length!==1)throw new tt("only accepts single character String");if(typeof e!="number"&&e.length!==1)throw new tt("only accepts single character Uint8Array or Array");var n;if(typeof e=="string"?n=e.charCodeAt(0):typeof e=="number"?n=e:n=e[0],n<0||n>255)throw new tt("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=n;else{var r=Fe.alloc(t.BUFFER_SIZE+this.buffer.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r,this.buffer[this.position++]=n}},t.prototype.write=function(e,n){if(n=typeof n=="number"?n:this.position,this.buffer.length<n+e.length){var r=Fe.alloc(this.buffer.length+e.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r}ArrayBuffer.isView(e)?(this.buffer.set(Jo(e),n),this.position=n+e.byteLength>this.position?n+e.length:this.position):typeof e=="string"&&(this.buffer.write(e,n,e.length,"binary"),this.position=n+e.length>this.position?n+e.length:this.position)},t.prototype.read=function(e,n){return n=n&&n>0?n:this.position,this.buffer.slice(e,e+n)},t.prototype.value=function(e){return e=!!e,e&&this.buffer.length===this.position?this.buffer:e?this.buffer.slice(0,this.position):this.buffer.toString("binary",0,this.position)},t.prototype.length=function(){return this.position},t.prototype.toJSON=function(){return this.buffer.toString("base64")},t.prototype.toString=function(e){return this.buffer.toString(e)},t.prototype.toExtendedJSON=function(e){e=e||{};var n=this.buffer.toString("base64"),r=Number(this.sub_type).toString(16);return e.legacy?{$binary:n,$type:r.length===1?"0"+r:r}:{$binary:{base64:n,subType:r.length===1?"0"+r:r}}},t.prototype.toUUID=function(){if(this.sub_type===t.SUBTYPE_UUID)return new Wf(this.buffer.slice(0,this.position));throw new lr('Binary sub_type "'.concat(this.sub_type,'" is not supported for converting to UUID. Only "').concat(t.SUBTYPE_UUID,'" is currently supported.'))},t.fromExtendedJSON=function(e,n){n=n||{};var r,i;if("$binary"in e?n.legacy&&typeof e.$binary=="string"&&"$type"in e?(i=e.$type?parseInt(e.$type,16):0,r=Fe.from(e.$binary,"base64")):typeof e.$binary!="string"&&(i=e.$binary.subType?parseInt(e.$binary.subType,16):0,r=Fe.from(e.$binary.base64,"base64")):"$uuid"in e&&(i=4,r=Vc(e.$uuid)),!r)throw new tt("Unexpected Binary Extended JSON format ".concat(JSON.stringify(e)));return i===lp?new Wf(r):new t(r,i)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.value(!0);return'new Binary(Buffer.from("'.concat(e.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},t.BSON_BINARY_SUBTYPE_DEFAULT=0,t.BUFFER_SIZE=256,t.SUBTYPE_DEFAULT=0,t.SUBTYPE_FUNCTION=1,t.SUBTYPE_BYTE_ARRAY=2,t.SUBTYPE_UUID_OLD=3,t.SUBTYPE_UUID=4,t.SUBTYPE_MD5=5,t.SUBTYPE_ENCRYPTED=6,t.SUBTYPE_COLUMN=7,t.SUBTYPE_USER_DEFINED=128,t}();Object.defineProperty(ur.prototype,"_bsontype",{value:"Binary"});var Mc=16,Wf=function(t){es(e,t);function e(n){var r=this,i,o;if(n==null)i=e.generate();else if(n instanceof e)i=Fe.from(n.buffer),o=n.__id;else if(ArrayBuffer.isView(n)&&n.byteLength===Mc)i=Jo(n);else if(typeof n=="string")i=Vc(n);else throw new tt("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");return r=t.call(this,i,lp)||this,r.__id=o,r}return Object.defineProperty(e.prototype,"id",{get:function(){return this.buffer},set:function(n){this.buffer=n,e.cacheHexString&&(this.__id=Gf(n))},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(n){if(n===void 0&&(n=!0),e.cacheHexString&&this.__id)return this.__id;var r=Gf(this.id,n);return e.cacheHexString&&(this.__id=r),r},e.prototype.toString=function(n){return n?this.id.toString(n):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(n){if(!n)return!1;if(n instanceof e)return n.id.equals(this.id);try{return new e(n).id.equals(this.id)}catch{return!1}},e.prototype.toBinary=function(){return new ur(this.id,ur.SUBTYPE_UUID)},e.generate=function(){var n=ap(Mc);return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Fe.from(n)},e.isValid=function(n){return n?n instanceof e?!0:typeof n=="string"?cp(n):Bc(n)?n.length!==Mc?!1:(n[6]&240)===64&&(n[8]&128)===128:!1:!1},e.createFromHexString=function(n){var r=Vc(n);return new e(r)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},e}(ur),ns=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);this.code=e,this.scope=n}return t.prototype.toJSON=function(){return{code:this.code,scope:this.scope}},t.prototype.toExtendedJSON=function(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}},t.fromExtendedJSON=function(e){return new t(e.$code,e.$scope)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.toJSON();return'new Code("'.concat(String(e.code),'"').concat(e.scope?", ".concat(JSON.stringify(e.scope)):"",")")},t}();Object.defineProperty(ns.prototype,"_bsontype",{value:"Code"});function cy(t){return Di(t)&&t.$id!=null&&typeof t.$ref=="string"&&(t.$db==null||typeof t.$db=="string")}var Oi=function(){function t(e,n,r,i){if(!(this instanceof t))return new t(e,n,r,i);var o=e.split(".");o.length===2&&(r=o.shift(),e=o.shift()),this.collection=e,this.oid=n,this.db=r,this.fields=i||{}}return Object.defineProperty(t.prototype,"namespace",{get:function(){return this.collection},set:function(e){this.collection=e},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){var e=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return this.db!=null&&(e.$db=this.db),e},t.prototype.toExtendedJSON=function(e){e=e||{};var n={$ref:this.collection,$id:this.oid};return e.legacy||(this.db&&(n.$db=this.db),n=Object.assign(n,this.fields)),n},t.fromExtendedJSON=function(e){var n=Object.assign({},e);return delete n.$ref,delete n.$id,delete n.$db,new t(e.$ref,e.$id,e.$db,n)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.oid===void 0||this.oid.toString===void 0?this.oid:this.oid.toString();return'new DBRef("'.concat(this.namespace,'", new ObjectId("').concat(String(e),'")').concat(this.db?', "'.concat(this.db,'"'):"",")")},t}();Object.defineProperty(Oi.prototype,"_bsontype",{value:"DBRef"});var Jt=void 0;try{Jt=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}var Yf=65536,ly=1<<24,Hr=Yf*Yf,up=Hr*Hr,zf=up/2,Kf={},Xf={},le=function(){function t(e,n,r){if(e===void 0&&(e=0),!(this instanceof t))return new t(e,n,r);typeof e=="bigint"?Object.assign(this,t.fromBigInt(e,!!n)):typeof e=="string"?Object.assign(this,t.fromString(e,!!n)):(this.low=e|0,this.high=n|0,this.unsigned=!!r),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return t.fromBits=function(e,n,r){return new t(e,n,r)},t.fromInt=function(e,n){var r,i,o;return n?(e>>>=0,(o=0<=e&&e<256)&&(i=Xf[e],i)?i:(r=t.fromBits(e,(e|0)<0?-1:0,!0),o&&(Xf[e]=r),r)):(e|=0,(o=-128<=e&&e<128)&&(i=Kf[e],i)?i:(r=t.fromBits(e,e<0?-1:0,!1),o&&(Kf[e]=r),r))},t.fromNumber=function(e,n){if(isNaN(e))return n?t.UZERO:t.ZERO;if(n){if(e<0)return t.UZERO;if(e>=up)return t.MAX_UNSIGNED_VALUE}else{if(e<=-zf)return t.MIN_VALUE;if(e+1>=zf)return t.MAX_VALUE}return e<0?t.fromNumber(-e,n).neg():t.fromBits(e%Hr|0,e/Hr|0,n)},t.fromBigInt=function(e,n){return t.fromString(e.toString(),n)},t.fromString=function(e,n,r){if(e.length===0)throw Error("empty string");if(e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return t.ZERO;if(typeof n=="number"?(r=n,n=!1):n=!!n,r=r||10,r<2||36<r)throw RangeError("radix");var i;if((i=e.indexOf("-"))>0)throw Error("interior hyphen");if(i===0)return t.fromString(e.substring(1),n,r).neg();for(var o=t.fromNumber(Math.pow(r,8)),s=t.ZERO,c=0;c<e.length;c+=8){var u=Math.min(8,e.length-c),d=parseInt(e.substring(c,c+u),r);if(u<8){var g=t.fromNumber(Math.pow(r,u));s=s.mul(g).add(t.fromNumber(d))}else s=s.mul(o),s=s.add(t.fromNumber(d))}return s.unsigned=n,s},t.fromBytes=function(e,n,r){return r?t.fromBytesLE(e,n):t.fromBytesBE(e,n)},t.fromBytesLE=function(e,n){return new t(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,n)},t.fromBytesBE=function(e,n){return new t(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],n)},t.isLong=function(e){return Di(e)&&e.__isLong__===!0},t.fromValue=function(e,n){return typeof e=="number"?t.fromNumber(e,n):typeof e=="string"?t.fromString(e,n):t.fromBits(e.low,e.high,typeof n=="boolean"?n:e.unsigned)},t.prototype.add=function(e){t.isLong(e)||(e=t.fromValue(e));var n=this.high>>>16,r=this.high&65535,i=this.low>>>16,o=this.low&65535,s=e.high>>>16,c=e.high&65535,u=e.low>>>16,d=e.low&65535,g=0,p=0,E=0,w=0;return w+=o+d,E+=w>>>16,w&=65535,E+=i+u,p+=E>>>16,E&=65535,p+=r+c,g+=p>>>16,p&=65535,g+=n+s,g&=65535,t.fromBits(E<<16|w,g<<16|p,this.unsigned)},t.prototype.and=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low&e.low,this.high&e.high,this.unsigned)},t.prototype.compare=function(e){if(t.isLong(e)||(e=t.fromValue(e)),this.eq(e))return 0;var n=this.isNegative(),r=e.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},t.prototype.comp=function(e){return this.compare(e)},t.prototype.divide=function(e){if(t.isLong(e)||(e=t.fromValue(e)),e.isZero())throw Error("division by zero");if(Jt){if(!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1)return this;var n=(this.unsigned?Jt.div_u:Jt.div_s)(this.low,this.high,e.low,e.high);return t.fromBits(n,Jt.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?t.UZERO:t.ZERO;var r,i,o;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return t.UZERO;if(e.gt(this.shru(1)))return t.UONE;o=t.UZERO}else{if(this.eq(t.MIN_VALUE)){if(e.eq(t.ONE)||e.eq(t.NEG_ONE))return t.MIN_VALUE;if(e.eq(t.MIN_VALUE))return t.ONE;var s=this.shr(1);return r=s.div(e).shl(1),r.eq(t.ZERO)?e.isNegative()?t.ONE:t.NEG_ONE:(i=this.sub(e.mul(r)),o=r.add(i.div(e)),o)}else if(e.eq(t.MIN_VALUE))return this.unsigned?t.UZERO:t.ZERO;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();o=t.ZERO}for(i=this;i.gte(e);){r=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));for(var c=Math.ceil(Math.log(r)/Math.LN2),u=c<=48?1:Math.pow(2,c-48),d=t.fromNumber(r),g=d.mul(e);g.isNegative()||g.gt(i);)r-=u,d=t.fromNumber(r,this.unsigned),g=d.mul(e);d.isZero()&&(d=t.ONE),o=o.add(d),i=i.sub(g)}return o},t.prototype.div=function(e){return this.divide(e)},t.prototype.equals=function(e){return t.isLong(e)||(e=t.fromValue(e)),this.unsigned!==e.unsigned&&this.high>>>31===1&&e.high>>>31===1?!1:this.high===e.high&&this.low===e.low},t.prototype.eq=function(e){return this.equals(e)},t.prototype.getHighBits=function(){return this.high},t.prototype.getHighBitsUnsigned=function(){return this.high>>>0},t.prototype.getLowBits=function(){return this.low},t.prototype.getLowBitsUnsigned=function(){return this.low>>>0},t.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(t.MIN_VALUE)?64:this.neg().getNumBitsAbs();var e=this.high!==0?this.high:this.low,n;for(n=31;n>0&&(e&1<<n)===0;n--);return this.high!==0?n+33:n+1},t.prototype.greaterThan=function(e){return this.comp(e)>0},t.prototype.gt=function(e){return this.greaterThan(e)},t.prototype.greaterThanOrEqual=function(e){return this.comp(e)>=0},t.prototype.gte=function(e){return this.greaterThanOrEqual(e)},t.prototype.ge=function(e){return this.greaterThanOrEqual(e)},t.prototype.isEven=function(){return(this.low&1)===0},t.prototype.isNegative=function(){return!this.unsigned&&this.high<0},t.prototype.isOdd=function(){return(this.low&1)===1},t.prototype.isPositive=function(){return this.unsigned||this.high>=0},t.prototype.isZero=function(){return this.high===0&&this.low===0},t.prototype.lessThan=function(e){return this.comp(e)<0},t.prototype.lt=function(e){return this.lessThan(e)},t.prototype.lessThanOrEqual=function(e){return this.comp(e)<=0},t.prototype.lte=function(e){return this.lessThanOrEqual(e)},t.prototype.modulo=function(e){if(t.isLong(e)||(e=t.fromValue(e)),Jt){var n=(this.unsigned?Jt.rem_u:Jt.rem_s)(this.low,this.high,e.low,e.high);return t.fromBits(n,Jt.get_high(),this.unsigned)}return this.sub(this.div(e).mul(e))},t.prototype.mod=function(e){return this.modulo(e)},t.prototype.rem=function(e){return this.modulo(e)},t.prototype.multiply=function(e){if(this.isZero())return t.ZERO;if(t.isLong(e)||(e=t.fromValue(e)),Jt){var n=Jt.mul(this.low,this.high,e.low,e.high);return t.fromBits(n,Jt.get_high(),this.unsigned)}if(e.isZero())return t.ZERO;if(this.eq(t.MIN_VALUE))return e.isOdd()?t.MIN_VALUE:t.ZERO;if(e.eq(t.MIN_VALUE))return this.isOdd()?t.MIN_VALUE:t.ZERO;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(t.TWO_PWR_24)&&e.lt(t.TWO_PWR_24))return t.fromNumber(this.toNumber()*e.toNumber(),this.unsigned);var r=this.high>>>16,i=this.high&65535,o=this.low>>>16,s=this.low&65535,c=e.high>>>16,u=e.high&65535,d=e.low>>>16,g=e.low&65535,p=0,E=0,w=0,N=0;return N+=s*g,w+=N>>>16,N&=65535,w+=o*g,E+=w>>>16,w&=65535,w+=s*d,E+=w>>>16,w&=65535,E+=i*g,p+=E>>>16,E&=65535,E+=o*d,p+=E>>>16,E&=65535,E+=s*u,p+=E>>>16,E&=65535,p+=r*g+i*d+o*u+s*c,p&=65535,t.fromBits(w<<16|N,p<<16|E,this.unsigned)},t.prototype.mul=function(e){return this.multiply(e)},t.prototype.negate=function(){return!this.unsigned&&this.eq(t.MIN_VALUE)?t.MIN_VALUE:this.not().add(t.ONE)},t.prototype.neg=function(){return this.negate()},t.prototype.not=function(){return t.fromBits(~this.low,~this.high,this.unsigned)},t.prototype.notEquals=function(e){return!this.equals(e)},t.prototype.neq=function(e){return this.notEquals(e)},t.prototype.ne=function(e){return this.notEquals(e)},t.prototype.or=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low|e.low,this.high|e.high,this.unsigned)},t.prototype.shiftLeft=function(e){return t.isLong(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?t.fromBits(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):t.fromBits(0,this.low<<e-32,this.unsigned)},t.prototype.shl=function(e){return this.shiftLeft(e)},t.prototype.shiftRight=function(e){return t.isLong(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?t.fromBits(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):t.fromBits(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},t.prototype.shr=function(e){return this.shiftRight(e)},t.prototype.shiftRightUnsigned=function(e){if(t.isLong(e)&&(e=e.toInt()),e&=63,e===0)return this;var n=this.high;if(e<32){var r=this.low;return t.fromBits(r>>>e|n<<32-e,n>>>e,this.unsigned)}else return e===32?t.fromBits(n,0,this.unsigned):t.fromBits(n>>>e-32,0,this.unsigned)},t.prototype.shr_u=function(e){return this.shiftRightUnsigned(e)},t.prototype.shru=function(e){return this.shiftRightUnsigned(e)},t.prototype.subtract=function(e){return t.isLong(e)||(e=t.fromValue(e)),this.add(e.neg())},t.prototype.sub=function(e){return this.subtract(e)},t.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},t.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*Hr+(this.low>>>0):this.high*Hr+(this.low>>>0)},t.prototype.toBigInt=function(){return BigInt(this.toString())},t.prototype.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},t.prototype.toBytesLE=function(){var e=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,e&255,e>>>8&255,e>>>16&255,e>>>24]},t.prototype.toBytesBE=function(){var e=this.high,n=this.low;return[e>>>24,e>>>16&255,e>>>8&255,e&255,n>>>24,n>>>16&255,n>>>8&255,n&255]},t.prototype.toSigned=function(){return this.unsigned?t.fromBits(this.low,this.high,!1):this},t.prototype.toString=function(e){if(e=e||10,e<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(t.MIN_VALUE)){var n=t.fromNumber(e),r=this.div(n),i=r.mul(n).sub(this);return r.toString(e)+i.toInt().toString(e)}else return"-"+this.neg().toString(e);for(var o=t.fromNumber(Math.pow(e,6),this.unsigned),s=this,c="";;){var u=s.div(o),d=s.sub(u.mul(o)).toInt()>>>0,g=d.toString(e);if(s=u,s.isZero())return g+c;for(;g.length<6;)g="0"+g;c=""+g+c}},t.prototype.toUnsigned=function(){return this.unsigned?this:t.fromBits(this.low,this.high,!0)},t.prototype.xor=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low^e.low,this.high^e.high,this.unsigned)},t.prototype.eqz=function(){return this.isZero()},t.prototype.le=function(e){return this.lessThanOrEqual(e)},t.prototype.toExtendedJSON=function(e){return e&&e.relaxed?this.toNumber():{$numberLong:this.toString()}},t.fromExtendedJSON=function(e,n){var r=t.fromString(e.$numberLong);return n&&n.relaxed?r.toNumber():r},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new Long("'.concat(this.toString(),'"').concat(this.unsigned?", true":"",")")},t.TWO_PWR_24=t.fromInt(ly),t.MAX_UNSIGNED_VALUE=t.fromBits(-1,-1,!0),t.ZERO=t.fromInt(0),t.UZERO=t.fromInt(0,!0),t.ONE=t.fromInt(1),t.UONE=t.fromInt(1,!0),t.NEG_ONE=t.fromInt(-1),t.MAX_VALUE=t.fromBits(-1,2147483647,!1),t.MIN_VALUE=t.fromBits(0,-2147483648,!1),t}();Object.defineProperty(le.prototype,"__isLong__",{value:!0});Object.defineProperty(le.prototype,"_bsontype",{value:"Long"});var uy=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,dy=/^(\+|-)?(Infinity|inf)$/i,fy=/^(\+|-)?NaN$/i,xi=6111,Pc=-6176,qf=6176,py=34,Lc=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Zf=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Jf=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),hy=/^([-+])?(\d+)?$/,my=31,Qf=16383,gy=30,_y=31;function ep(t){return!isNaN(parseInt(t,10))}function vy(t){var e=le.fromNumber(1e9),n=le.fromNumber(0);if(!t.parts[0]&&!t.parts[1]&&!t.parts[2]&&!t.parts[3])return{quotient:t,rem:n};for(var r=0;r<=3;r++)n=n.shiftLeft(32),n=n.add(new le(t.parts[r],0)),t.parts[r]=n.div(e).low,n=n.modulo(e);return{quotient:t,rem:n}}function yy(t,e){if(!t&&!e)return{high:le.fromNumber(0),low:le.fromNumber(0)};var n=t.shiftRightUnsigned(32),r=new le(t.getLowBits(),0),i=e.shiftRightUnsigned(32),o=new le(e.getLowBits(),0),s=n.multiply(i),c=n.multiply(o),u=r.multiply(i),d=r.multiply(o);return s=s.add(c.shiftRightUnsigned(32)),c=new le(c.getLowBits(),0).add(u).add(d.shiftRightUnsigned(32)),s=s.add(c.shiftRightUnsigned(32)),d=c.shiftLeft(32).add(new le(d.getLowBits(),0)),{high:s,low:d}}function Ey(t,e){var n=t.high>>>0,r=e.high>>>0;if(n<r)return!0;if(n===r){var i=t.low>>>0,o=e.low>>>0;if(i<o)return!0}return!1}function Ur(t,e){throw new tt('"'.concat(t,'" is not a valid Decimal128 string - ').concat(e))}var Uc=function(){function t(e){if(!(this instanceof t))return new t(e);if(typeof e=="string")this.bytes=t.fromString(e).bytes;else if(Bc(e)){if(e.byteLength!==16)throw new tt("Decimal128 must take a Buffer of 16 bytes");this.bytes=e}else throw new tt("Decimal128 must take a Buffer or string")}return t.fromString=function(e){var n=!1,r=!1,i=!1,o=0,s=0,c=0,u=0,d=0,g=[0],p=0,E=0,w=0,N=0,M=0,L=0,j=new le(0,0),X=new le(0,0),se=0,q=0;if(e.length>=7e3)throw new tt(""+e+" not a valid Decimal128 string");var Ee=e.match(uy),U=e.match(dy),pe=e.match(fy);if(!Ee&&!U&&!pe||e.length===0)throw new tt(""+e+" not a valid Decimal128 string");if(Ee){var te=Ee[2],ye=Ee[4],ke=Ee[5],De=Ee[6];ye&&De===void 0&&Ur(e,"missing exponent power"),ye&&te===void 0&&Ur(e,"missing exponent base"),ye===void 0&&(ke||De)&&Ur(e,"missing e before exponent")}if((e[q]==="+"||e[q]==="-")&&(n=e[q++]==="-"),!ep(e[q])&&e[q]!=="."){if(e[q]==="i"||e[q]==="I")return new t(Fe.from(n?Zf:Jf));if(e[q]==="N")return new t(Fe.from(Lc))}for(;ep(e[q])||e[q]===".";){if(e[q]==="."){r&&Ur(e,"contains multiple periods"),r=!0,q=q+1;continue}p<34&&(e[q]!=="0"||i)&&(i||(d=s),i=!0,g[E++]=parseInt(e[q],10),p=p+1),i&&(c=c+1),r&&(u=u+1),s=s+1,q=q+1}if(r&&!s)throw new tt(""+e+" not a valid Decimal128 string");if(e[q]==="e"||e[q]==="E"){var Pe=e.substr(++q).match(hy);if(!Pe||!Pe[2])return new t(Fe.from(Lc));M=parseInt(Pe[0],10),q=q+Pe[0].length}if(e[q])return new t(Fe.from(Lc));if(w=0,!p)w=0,N=0,g[0]=0,c=1,p=1,o=0;else if(N=p-1,o=c,o!==1)for(;g[d+o-1]===0;)o=o-1;for(M<=u&&u-M>16384?M=Pc:M=M-u;M>xi;){if(N=N+1,N-w>py){var Ge=g.join("");if(Ge.match(/^0+$/)){M=xi;break}Ur(e,"overflow")}M=M-1}for(;M<Pc||p<c;){if(N===0&&o<p){M=Pc,o=0;break}if(p<c?c=c-1:N=N-1,M<xi)M=M+1;else{var Ge=g.join("");if(Ge.match(/^0+$/)){M=xi;break}Ur(e,"overflow")}}if(N-w+1<o){var ze=s;r&&(d=d+1,ze=ze+1),n&&(d=d+1,ze=ze+1);var ht=parseInt(e[d+N+1],10),A=0;if(ht>=5&&(A=1,ht===5)){for(A=g[N]%2===1?1:0,L=d+N+2;L<ze;L++)if(parseInt(e[L],10)){A=1;break}}if(A){for(var x=N;x>=0;x--)if(++g[x]>9&&(g[x]=0,x===0))if(M<xi)M=M+1,g[x]=1;else return new t(Fe.from(n?Zf:Jf))}}if(j=le.fromNumber(0),X=le.fromNumber(0),o===0)j=le.fromNumber(0),X=le.fromNumber(0);else if(N-w<17){var x=w;for(X=le.fromNumber(g[x++]),j=new le(0,0);x<=N;x++)X=X.multiply(le.fromNumber(10)),X=X.add(le.fromNumber(g[x]))}else{var x=w;for(j=le.fromNumber(g[x++]);x<=N-17;x++)j=j.multiply(le.fromNumber(10)),j=j.add(le.fromNumber(g[x]));for(X=le.fromNumber(g[x++]);x<=N;x++)X=X.multiply(le.fromNumber(10)),X=X.add(le.fromNumber(g[x]))}var F=yy(j,le.fromString("100000000000000000"));F.low=F.low.add(X),Ey(F.low,X)&&(F.high=F.high.add(le.fromNumber(1))),se=M+qf;var P={low:le.fromNumber(0),high:le.fromNumber(0)};F.high.shiftRightUnsigned(49).and(le.fromNumber(1)).equals(le.fromNumber(1))?(P.high=P.high.or(le.fromNumber(3).shiftLeft(61)),P.high=P.high.or(le.fromNumber(se).and(le.fromNumber(16383).shiftLeft(47))),P.high=P.high.or(F.high.and(le.fromNumber(0x7fffffffffff)))):(P.high=P.high.or(le.fromNumber(se&16383).shiftLeft(49)),P.high=P.high.or(F.high.and(le.fromNumber(562949953421311)))),P.low=F.low,n&&(P.high=P.high.or(le.fromString("9223372036854775808")));var v=Fe.alloc(16);return q=0,v[q++]=P.low.low&255,v[q++]=P.low.low>>8&255,v[q++]=P.low.low>>16&255,v[q++]=P.low.low>>24&255,v[q++]=P.low.high&255,v[q++]=P.low.high>>8&255,v[q++]=P.low.high>>16&255,v[q++]=P.low.high>>24&255,v[q++]=P.high.low&255,v[q++]=P.high.low>>8&255,v[q++]=P.high.low>>16&255,v[q++]=P.high.low>>24&255,v[q++]=P.high.high&255,v[q++]=P.high.high>>8&255,v[q++]=P.high.high>>16&255,v[q++]=P.high.high>>24&255,new t(v)},t.prototype.toString=function(){for(var e,n=0,r=new Array(36),i=0;i<r.length;i++)r[i]=0;var o=0,s=!1,c,u={parts:[0,0,0,0]},d,g,p=[];o=0;var E=this.bytes,w=E[o++]|E[o++]<<8|E[o++]<<16|E[o++]<<24,N=E[o++]|E[o++]<<8|E[o++]<<16|E[o++]<<24,M=E[o++]|E[o++]<<8|E[o++]<<16|E[o++]<<24,L=E[o++]|E[o++]<<8|E[o++]<<16|E[o++]<<24;o=0;var j={low:new le(w,N),high:new le(M,L)};j.high.lessThan(le.ZERO)&&p.push("-");var X=L>>26&my;if(X>>3===3){if(X===gy)return p.join("")+"Infinity";if(X===_y)return"NaN";e=L>>15&Qf,c=8+(L>>14&1)}else c=L>>14&7,e=L>>17&Qf;var se=e-qf;if(u.parts[0]=(L&16383)+((c&15)<<14),u.parts[1]=M,u.parts[2]=N,u.parts[3]=w,u.parts[0]===0&&u.parts[1]===0&&u.parts[2]===0&&u.parts[3]===0)s=!0;else for(g=3;g>=0;g--){var q=0,Ee=vy(u);if(u=Ee.quotient,q=Ee.rem.low,!!q)for(d=8;d>=0;d--)r[g*9+d]=q%10,q=Math.floor(q/10)}if(s)n=1,r[o]=0;else for(n=36;!r[o];)n=n-1,o=o+1;var U=n-1+se;if(U>=34||U<=-7||se>0){if(n>34)return p.push("".concat(0)),se>0?p.push("E+".concat(se)):se<0&&p.push("E".concat(se)),p.join("");p.push("".concat(r[o++])),n=n-1,n&&p.push(".");for(var i=0;i<n;i++)p.push("".concat(r[o++]));p.push("E"),U>0?p.push("+".concat(U)):p.push("".concat(U))}else if(se>=0)for(var i=0;i<n;i++)p.push("".concat(r[o++]));else{var pe=n+se;if(pe>0)for(var i=0;i<pe;i++)p.push("".concat(r[o++]));else p.push("0");for(p.push(".");pe++<0;)p.push("0");for(var i=0;i<n-Math.max(pe-1,0);i++)p.push("".concat(r[o++]))}return p.join("")},t.prototype.toJSON=function(){return{$numberDecimal:this.toString()}},t.prototype.toExtendedJSON=function(){return{$numberDecimal:this.toString()}},t.fromExtendedJSON=function(e){return t.fromString(e.$numberDecimal)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new Decimal128("'.concat(this.toString(),'")')},t}();Object.defineProperty(Uc.prototype,"_bsontype",{value:"Decimal128"});var rs=function(){function t(e){if(!(this instanceof t))return new t(e);e instanceof Number&&(e=e.valueOf()),this.value=+e}return t.prototype.valueOf=function(){return this.value},t.prototype.toJSON=function(){return this.value},t.prototype.toString=function(e){return this.value.toString(e)},t.prototype.toExtendedJSON=function(e){return e&&(e.legacy||e.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-".concat(this.value.toFixed(1))}:{$numberDouble:Number.isInteger(this.value)?this.value.toFixed(1):this.value.toString()}},t.fromExtendedJSON=function(e,n){var r=parseFloat(e.$numberDouble);return n&&n.relaxed?r:new t(r)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.toExtendedJSON();return"new Double(".concat(e.$numberDouble,")")},t}();Object.defineProperty(rs.prototype,"_bsontype",{value:"Double"});var is=function(){function t(e){if(!(this instanceof t))return new t(e);e instanceof Number&&(e=e.valueOf()),this.value=+e|0}return t.prototype.valueOf=function(){return this.value},t.prototype.toString=function(e){return this.value.toString(e)},t.prototype.toJSON=function(){return this.value},t.prototype.toExtendedJSON=function(e){return e&&(e.relaxed||e.legacy)?this.value:{$numberInt:this.value.toString()}},t.fromExtendedJSON=function(e,n){return n&&n.relaxed?parseInt(e.$numberInt,10):new t(e.$numberInt)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new Int32(".concat(this.valueOf(),")")},t}();Object.defineProperty(is.prototype,"_bsontype",{value:"Int32"});var Hc=function(){function t(){if(!(this instanceof t))return new t}return t.prototype.toExtendedJSON=function(){return{$maxKey:1}},t.fromExtendedJSON=function(){return new t},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new MaxKey()"},t}();Object.defineProperty(Hc.prototype,"_bsontype",{value:"MaxKey"});var jc=function(){function t(){if(!(this instanceof t))return new t}return t.prototype.toExtendedJSON=function(){return{$minKey:1}},t.fromExtendedJSON=function(){return new t},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new MinKey()"},t}();Object.defineProperty(jc.prototype,"_bsontype",{value:"MinKey"});var by=new RegExp("^[0-9a-fA-F]{24}$"),cr=null,En=Symbol("id"),Nt=function(){function t(e){if(!(this instanceof t))return new t(e);var n;if(typeof e=="object"&&e&&"id"in e){if(typeof e.id!="string"&&!ArrayBuffer.isView(e.id))throw new tt("Argument passed in must have an id that is of type string or Buffer");"toHexString"in e&&typeof e.toHexString=="function"?n=Fe.from(e.toHexString(),"hex"):n=e.id}else n=e;if(n==null||typeof n=="number")this[En]=t.generate(typeof n=="number"?n:void 0);else if(ArrayBuffer.isView(n)&&n.byteLength===12)this[En]=n instanceof Fe?n:Jo(n);else if(typeof n=="string")if(n.length===12){var r=Fe.from(n);if(r.byteLength===12)this[En]=r;else throw new tt("Argument passed in must be a string of 12 bytes")}else if(n.length===24&&by.test(n))this[En]=Fe.from(n,"hex");else throw new tt("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");else throw new tt("Argument passed in does not match the accepted types");t.cacheHexString&&(this.__id=this.id.toString("hex"))}return Object.defineProperty(t.prototype,"id",{get:function(){return this[En]},set:function(e){this[En]=e,t.cacheHexString&&(this.__id=e.toString("hex"))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"generationTime",{get:function(){return this.id.readInt32BE(0)},set:function(e){this.id.writeUInt32BE(e,0)},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(){if(t.cacheHexString&&this.__id)return this.__id;var e=this.id.toString("hex");return t.cacheHexString&&!this.__id&&(this.__id=e),e},t.getInc=function(){return t.index=(t.index+1)%16777215},t.generate=function(e){typeof e!="number"&&(e=Math.floor(Date.now()/1e3));var n=t.getInc(),r=Fe.alloc(12);return r.writeUInt32BE(e,0),cr===null&&(cr=ap(5)),r[4]=cr[0],r[5]=cr[1],r[6]=cr[2],r[7]=cr[3],r[8]=cr[4],r[11]=n&255,r[10]=n>>8&255,r[9]=n>>16&255,r},t.prototype.toString=function(e){return e?this.id.toString(e):this.toHexString()},t.prototype.toJSON=function(){return this.toHexString()},t.prototype.equals=function(e){if(e==null)return!1;if(e instanceof t)return this[En][11]===e[En][11]&&this[En].equals(e[En]);if(typeof e=="string"&&t.isValid(e)&&e.length===12&&Bc(this.id))return e===Fe.prototype.toString.call(this.id,"latin1");if(typeof e=="string"&&t.isValid(e)&&e.length===24)return e.toLowerCase()===this.toHexString();if(typeof e=="string"&&t.isValid(e)&&e.length===12)return Fe.from(e).equals(this.id);if(typeof e=="object"&&"toHexString"in e&&typeof e.toHexString=="function"){var n=e.toHexString(),r=this.toHexString().toLowerCase();return typeof n=="string"&&n.toLowerCase()===r}return!1},t.prototype.getTimestamp=function(){var e=new Date,n=this.id.readUInt32BE(0);return e.setTime(Math.floor(n)*1e3),e},t.createPk=function(){return new t},t.createFromTime=function(e){var n=Fe.from([0,0,0,0,0,0,0,0,0,0,0,0]);return n.writeUInt32BE(e,0),new t(n)},t.createFromHexString=function(e){if(typeof e>"u"||e!=null&&e.length!==24)throw new tt("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new t(Fe.from(e,"hex"))},t.isValid=function(e){if(e==null)return!1;try{return new t(e),!0}catch{return!1}},t.prototype.toExtendedJSON=function(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}},t.fromExtendedJSON=function(e){return new t(e.$oid)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new ObjectId("'.concat(this.toHexString(),'")')},t.index=Math.floor(Math.random()*16777215),t}();Object.defineProperty(Nt.prototype,"generate",{value:ts(function(t){return Nt.generate(t)},"Please use the static `ObjectId.generate(time)` instead")});Object.defineProperty(Nt.prototype,"getInc",{value:ts(function(){return Nt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Nt.prototype,"get_inc",{value:ts(function(){return Nt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Nt,"get_inc",{value:ts(function(){return Nt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Nt.prototype,"_bsontype",{value:"ObjectID"});function wy(t){return t.split("").sort().join("")}var Ai=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);if(this.pattern=e,this.options=wy(n??""),this.pattern.indexOf("\0")!==-1)throw new lr("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(this.options.indexOf("\0")!==-1)throw new lr("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var r=0;r<this.options.length;r++)if(!(this.options[r]==="i"||this.options[r]==="m"||this.options[r]==="x"||this.options[r]==="l"||this.options[r]==="s"||this.options[r]==="u"))throw new lr("The regular expression option [".concat(this.options[r],"] is not supported"))}return t.parseOptions=function(e){return e?e.split("").sort().join(""):""},t.prototype.toExtendedJSON=function(e){return e=e||{},e.legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}},t.fromExtendedJSON=function(e){if("$regex"in e)if(typeof e.$regex!="string"){if(e.$regex._bsontype==="BSONRegExp")return e}else return new t(e.$regex,t.parseOptions(e.$options));if("$regularExpression"in e)return new t(e.$regularExpression.pattern,t.parseOptions(e.$regularExpression.options));throw new tt("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(e)))},t}();Object.defineProperty(Ai.prototype,"_bsontype",{value:"BSONRegExp"});var $c=function(){function t(e){if(!(this instanceof t))return new t(e);this.value=e}return t.prototype.valueOf=function(){return this.value},t.prototype.toString=function(){return this.value},t.prototype.inspect=function(){return'new BSONSymbol("'.concat(this.value,'")')},t.prototype.toJSON=function(){return this.value},t.prototype.toExtendedJSON=function(){return{$symbol:this.value}},t.fromExtendedJSON=function(e){return new t(e.$symbol)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t}();Object.defineProperty($c.prototype,"_bsontype",{value:"Symbol"});var Cy=le,dp=function(t){es(e,t);function e(n,r){var i=this;return i instanceof e?(le.isLong(n)?i=t.call(this,n.low,n.high,!0)||this:Di(n)&&typeof n.t<"u"&&typeof n.i<"u"?i=t.call(this,n.i,n.t,!0)||this:i=t.call(this,n,r,!0)||this,Object.defineProperty(i,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),i):new e(n,r)}return e.prototype.toJSON=function(){return{$timestamp:this.toString()}},e.fromInt=function(n){return new e(le.fromInt(n,!0))},e.fromNumber=function(n){return new e(le.fromNumber(n,!0))},e.fromBits=function(n,r){return new e(n,r)},e.fromString=function(n,r){return new e(le.fromString(n,!0,r))},e.prototype.toExtendedJSON=function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}},e.fromExtendedJSON=function(n){return new e(n.$timestamp)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new Timestamp({ t: ".concat(this.getHighBits(),", i: ").concat(this.getLowBits()," })")},e.MAX_VALUE=le.MAX_UNSIGNED_VALUE,e}(Cy);function Sy(t){return Di(t)&&Reflect.has(t,"_bsontype")&&typeof t._bsontype=="string"}var fp=2147483647,pp=-2147483648,hp=9223372036854776e3,mp=-9223372036854776e3,Ty={$oid:Nt,$binary:ur,$uuid:ur,$symbol:$c,$numberInt:is,$numberDecimal:Uc,$numberDouble:rs,$numberLong:le,$minKey:jc,$maxKey:Hc,$regex:Ai,$regularExpression:Ai,$timestamp:dp};function gp(t,e){if(e===void 0&&(e={}),typeof t=="number"){if(e.relaxed||e.legacy)return t;if(Math.floor(t)===t){if(t>=pp&&t<=fp)return new is(t);if(t>=mp&&t<=hp)return le.fromNumber(t)}return new rs(t)}if(t==null||typeof t!="object")return t;if(t.$undefined)return null;for(var n=Object.keys(t).filter(function(p){return p.startsWith("$")&&t[p]!=null}),r=0;r<n.length;r++){var i=Ty[n[r]];if(i)return i.fromExtendedJSON(t,e)}if(t.$date!=null){var o=t.$date,s=new Date;return e.legacy?typeof o=="number"?s.setTime(o):typeof o=="string"&&s.setTime(Date.parse(o)):typeof o=="string"?s.setTime(Date.parse(o)):le.isLong(o)?s.setTime(o.toNumber()):typeof o=="number"&&e.relaxed&&s.setTime(o),s}if(t.$code!=null){var c=Object.assign({},t);return t.$scope&&(c.$scope=gp(t.$scope)),ns.fromExtendedJSON(t)}if(cy(t)||t.$dbPointer){var u=t.$ref?t:t.$dbPointer;if(u instanceof Oi)return u;var d=Object.keys(u).filter(function(p){return p.startsWith("$")}),g=!0;if(d.forEach(function(p){["$ref","$id","$db"].indexOf(p)===-1&&(g=!1)}),g)return Oi.fromExtendedJSON(u)}return t}function Iy(t,e){return t.map(function(n,r){e.seenObjects.push({propertyName:"index ".concat(r),obj:null});try{return jn(n,e)}finally{e.seenObjects.pop()}})}function tp(t){var e=t.toISOString();return t.getUTCMilliseconds()!==0?e:e.slice(0,-5)+"Z"}function jn(t,e){if((typeof t=="object"||typeof t=="function")&&t!==null){var n=e.seenObjects.findIndex(function(j){return j.obj===t});if(n!==-1){var r=e.seenObjects.map(function(j){return j.propertyName}),i=r.slice(0,n).map(function(j){return"".concat(j," -> ")}).join(""),o=r[n],s=" -> "+r.slice(n+1,r.length-1).map(function(j){return"".concat(j," -> ")}).join(""),c=r[r.length-1],u=" ".repeat(i.length+o.length/2),d="-".repeat(s.length+(o.length+c.length)/2-1);throw new tt(`Converting circular structure to EJSON:
|
|
28
|
+
`)};Dt.prototype.renderPartial=function(e,n,r,i){if(r){var o=this.getConfigTags(i),s=cc(r)?r(e[1]):r[e[1]];if(s!=null){var c=e[6],u=e[5],d=e[4],g=s;u==0&&d&&(g=this.indentPartial(s,d,c));var p=this.parse(g,o);return this.renderTokens(p,n,r,g,i)}}};Dt.prototype.unescapedValue=function(e,n){var r=n.lookup(e[1]);if(r!=null)return r};Dt.prototype.escapedValue=function(e,n,r){var i=this.getConfigEscape(r)||Zt.escape,o=n.lookup(e[1]);if(o!=null)return typeof o=="number"&&i===Zt.escape?String(o):i(o)};Dt.prototype.rawValue=function(e){return e[1]};Dt.prototype.getConfigTags=function(e){return Mr(e)?e:e&&typeof e=="object"?e.tags:void 0};Dt.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!Mr(e))return e.escape};var Zt={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(t){wi.templateCache=t},get templateCache(){return wi.templateCache}},wi=new Dt;Zt.clearCache=function(){return wi.clearCache()};Zt.parse=function(e,n){return wi.parse(e,n)};Zt.render=function(e,n,r,i){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+Q_(e)+'" was given as the first argument for mustache#render(template, view, partials)');return wi.render(e,n,r,i)};Zt.escape=sv;Zt.Scanner=Ci;Zt.Context=Rr;Zt.Writer=Dt;var lc=Zt;lc.escape=of.escapeHtml;var Uo=class t{transform(e,n){return e?lc.render(e,O({},n)):null}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=$i({name:"cooeeDynamicVariables",type:t,pure:!0})};var uc={};(function t(e,n,r,i){var o=!!(e.Worker&&e.Blob&&e.Promise&&e.OffscreenCanvas&&e.OffscreenCanvasRenderingContext2D&&e.HTMLCanvasElement&&e.HTMLCanvasElement.prototype.transferControlToOffscreen&&e.URL&&e.URL.createObjectURL),s=typeof Path2D=="function"&&typeof DOMMatrix=="function",c=function(){if(!e.OffscreenCanvas)return!1;var v=new OffscreenCanvas(1,1),y=v.getContext("2d");y.fillRect(0,0,1,1);var H=v.transferToImageBitmap();try{y.createPattern(H,"no-repeat")}catch{return!1}return!0}();function u(){}function d(v){var y=n.exports.Promise,H=y!==void 0?y:e.Promise;return typeof H=="function"?new H(v):(v(u,u),null)}var g=function(v,y){return{transform:function(H){if(v)return H;if(y.has(H))return y.get(H);var J=new OffscreenCanvas(H.width,H.height),re=J.getContext("2d");return re.drawImage(H,0,0),y.set(H,J),J},clear:function(){y.clear()}}}(c,new Map),p=function(){var v=Math.floor(16.666666666666668),y,H,J={},re=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(y=function(oe){var ue=Math.random();return J[ue]=requestAnimationFrame(function Q(ae){re===ae||re+v-1<ae?(re=ae,delete J[ue],oe()):J[ue]=requestAnimationFrame(Q)}),ue},H=function(oe){J[oe]&&cancelAnimationFrame(J[oe])}):(y=function(oe){return setTimeout(oe,v)},H=function(oe){return clearTimeout(oe)}),{frame:y,cancel:H}}(),E=function(){var v,y,H={};function J(re){function oe(ue,Q){re.postMessage({options:ue||{},callback:Q})}re.init=function(Q){var ae=Q.transferControlToOffscreen();re.postMessage({canvas:ae},[ae])},re.fire=function(Q,ae,ee){if(y)return oe(Q,null),y;var fe=Math.random().toString(36).slice(2);return y=d(function(ce){function me(ge){ge.data.callback===fe&&(delete H[fe],re.removeEventListener("message",me),y=null,g.clear(),ee(),ce())}re.addEventListener("message",me),oe(Q,fe),H[fe]=me.bind(null,{data:{callback:fe}})}),y},re.reset=function(){re.postMessage({reset:!0});for(var Q in H)H[Q](),delete H[Q]}}return function(){if(v)return v;if(!r&&o){var re=["var CONFETTI, SIZE = {}, module = {};","("+t.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {"," if (msg.data.options) {"," CONFETTI(msg.data.options).then(function () {"," if (msg.data.callback) {"," postMessage({ callback: msg.data.callback });"," }"," });"," } else if (msg.data.reset) {"," CONFETTI && CONFETTI.reset();"," } else if (msg.data.resize) {"," SIZE.width = msg.data.resize.width;"," SIZE.height = msg.data.resize.height;"," } else if (msg.data.canvas) {"," SIZE.width = msg.data.canvas.width;"," SIZE.height = msg.data.canvas.height;"," CONFETTI = module.exports.create(msg.data.canvas);"," }","}"].join(`
|
|
29
|
+
`);try{v=new Worker(URL.createObjectURL(new Blob([re])))}catch(oe){return typeof console!==void 0&&typeof console.warn=="function"&&console.warn("\u{1F38A} Could not load worker",oe),null}J(v)}return v}}(),w={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function N(v,y){return y?y(v):v}function M(v){return v!=null}function L(v,y,H){return N(v&&M(v[y])?v[y]:w[y],H)}function j(v){return v<0?0:Math.floor(v)}function K(v,y){return Math.floor(Math.random()*(y-v))+v}function se(v){return parseInt(v,16)}function X(v){return v.map(Ee)}function Ee(v){var y=String(v).replace(/[^0-9a-f]/gi,"");return y.length<6&&(y=y[0]+y[0]+y[1]+y[1]+y[2]+y[2]),{r:se(y.substring(0,2)),g:se(y.substring(2,4)),b:se(y.substring(4,6))}}function U(v){var y=L(v,"origin",Object);return y.x=L(y,"x",Number),y.y=L(y,"y",Number),y}function he(v){v.width=document.documentElement.clientWidth,v.height=document.documentElement.clientHeight}function te(v){var y=v.getBoundingClientRect();v.width=y.width,v.height=y.height}function ye(v){var y=document.createElement("canvas");return y.style.position="fixed",y.style.top="0px",y.style.left="0px",y.style.pointerEvents="none",y.style.zIndex=v,y}function ke(v,y,H,J,re,oe,ue,Q,ae){v.save(),v.translate(y,H),v.rotate(oe),v.scale(J,re),v.arc(0,0,1,ue,Q,ae),v.restore()}function De(v){var y=v.angle*(Math.PI/180),H=v.spread*(Math.PI/180);return{x:v.x,y:v.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:v.startVelocity*.5+Math.random()*v.startVelocity,angle2D:-y+(.5*H-Math.random()*H),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,color:v.color,shape:v.shape,tick:0,totalTicks:v.ticks,decay:v.decay,drift:v.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:v.gravity*3,ovalScalar:.6,scalar:v.scalar,flat:v.flat}}function Pe(v,y){y.x+=Math.cos(y.angle2D)*y.velocity+y.drift,y.y+=Math.sin(y.angle2D)*y.velocity+y.gravity,y.velocity*=y.decay,y.flat?(y.wobble=0,y.wobbleX=y.x+10*y.scalar,y.wobbleY=y.y+10*y.scalar,y.tiltSin=0,y.tiltCos=0,y.random=1):(y.wobble+=y.wobbleSpeed,y.wobbleX=y.x+10*y.scalar*Math.cos(y.wobble),y.wobbleY=y.y+10*y.scalar*Math.sin(y.wobble),y.tiltAngle+=.1,y.tiltSin=Math.sin(y.tiltAngle),y.tiltCos=Math.cos(y.tiltAngle),y.random=Math.random()+2);var H=y.tick++/y.totalTicks,J=y.x+y.random*y.tiltCos,re=y.y+y.random*y.tiltSin,oe=y.wobbleX+y.random*y.tiltCos,ue=y.wobbleY+y.random*y.tiltSin;if(v.fillStyle="rgba("+y.color.r+", "+y.color.g+", "+y.color.b+", "+(1-H)+")",v.beginPath(),s&&y.shape.type==="path"&&typeof y.shape.path=="string"&&Array.isArray(y.shape.matrix))v.fill(x(y.shape.path,y.shape.matrix,y.x,y.y,Math.abs(oe-J)*.1,Math.abs(ue-re)*.1,Math.PI/10*y.wobble));else if(y.shape.type==="bitmap"){var Q=Math.PI/10*y.wobble,ae=Math.abs(oe-J)*.1,ee=Math.abs(ue-re)*.1,fe=y.shape.bitmap.width*y.scalar,ce=y.shape.bitmap.height*y.scalar,me=new DOMMatrix([Math.cos(Q)*ae,Math.sin(Q)*ae,-Math.sin(Q)*ee,Math.cos(Q)*ee,y.x,y.y]);me.multiplySelf(new DOMMatrix(y.shape.matrix));var ge=v.createPattern(g.transform(y.shape.bitmap),"no-repeat");ge.setTransform(me),v.globalAlpha=1-H,v.fillStyle=ge,v.fillRect(y.x-fe/2,y.y-ce/2,fe,ce),v.globalAlpha=1}else if(y.shape==="circle")v.ellipse?v.ellipse(y.x,y.y,Math.abs(oe-J)*y.ovalScalar,Math.abs(ue-re)*y.ovalScalar,Math.PI/10*y.wobble,0,2*Math.PI):ke(v,y.x,y.y,Math.abs(oe-J)*y.ovalScalar,Math.abs(ue-re)*y.ovalScalar,Math.PI/10*y.wobble,0,2*Math.PI);else if(y.shape==="star")for(var _e=Math.PI/2*3,h=4*y.scalar,a=8*y.scalar,l=y.x,_=y.y,T=5,D=Math.PI/T;T--;)l=y.x+Math.cos(_e)*a,_=y.y+Math.sin(_e)*a,v.lineTo(l,_),_e+=D,l=y.x+Math.cos(_e)*h,_=y.y+Math.sin(_e)*h,v.lineTo(l,_),_e+=D;else v.moveTo(Math.floor(y.x),Math.floor(y.y)),v.lineTo(Math.floor(y.wobbleX),Math.floor(re)),v.lineTo(Math.floor(oe),Math.floor(ue)),v.lineTo(Math.floor(J),Math.floor(y.wobbleY));return v.closePath(),v.fill(),y.tick<y.totalTicks}function Ge(v,y,H,J,re){var oe=y.slice(),ue=v.getContext("2d"),Q,ae,ee=d(function(fe){function ce(){Q=ae=null,ue.clearRect(0,0,J.width,J.height),g.clear(),re(),fe()}function me(){r&&!(J.width===i.width&&J.height===i.height)&&(J.width=v.width=i.width,J.height=v.height=i.height),!J.width&&!J.height&&(H(v),J.width=v.width,J.height=v.height),ue.clearRect(0,0,J.width,J.height),oe=oe.filter(function(ge){return Pe(ue,ge)}),oe.length?Q=p.frame(me):ce()}Q=p.frame(me),ae=ce});return{addFettis:function(fe){return oe=oe.concat(fe),ee},canvas:v,promise:ee,reset:function(){Q&&p.cancel(Q),ae&&ae()}}}function Ye(v,y){var H=!v,J=!!L(y||{},"resize"),re=!1,oe=L(y,"disableForReducedMotion",Boolean),ue=o&&!!L(y||{},"useWorker"),Q=ue?E():null,ae=H?he:te,ee=v&&Q?!!v.__confetti_initialized:!1,fe=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,ce;function me(_e,h,a){for(var l=L(_e,"particleCount",j),_=L(_e,"angle",Number),T=L(_e,"spread",Number),D=L(_e,"startVelocity",Number),k=L(_e,"decay",Number),ve=L(_e,"gravity",Number),Ie=L(_e,"drift",Number),be=L(_e,"colors",X),Ve=L(_e,"ticks",Number),Be=L(_e,"shapes"),qe=L(_e,"scalar"),Ft=!!L(_e,"flat"),$t=U(_e),wn=l,wt=[],kt=v.width*$t.x,Li=v.height*$t.y;wn--;)wt.push(De({x:kt,y:Li,angle:_,spread:T,startVelocity:D,color:be[wn%be.length],shape:Be[K(0,Be.length)],ticks:Ve,decay:k,gravity:ve,drift:Ie,scalar:qe,flat:Ft}));return ce?ce.addFettis(wt):(ce=Ge(v,wt,ae,h,a),ce.promise)}function ge(_e){var h=oe||L(_e,"disableForReducedMotion",Boolean),a=L(_e,"zIndex",Number);if(h&&fe)return d(function(D){D()});H&&ce?v=ce.canvas:H&&!v&&(v=ye(a),document.body.appendChild(v)),J&&!ee&&ae(v);var l={width:v.width,height:v.height};Q&&!ee&&Q.init(v),ee=!0,Q&&(v.__confetti_initialized=!0);function _(){if(Q){var D={getBoundingClientRect:function(){if(!H)return v.getBoundingClientRect()}};ae(D),Q.postMessage({resize:{width:D.width,height:D.height}});return}l.width=l.height=null}function T(){ce=null,J&&(re=!1,e.removeEventListener("resize",_)),H&&v&&(document.body.contains(v)&&document.body.removeChild(v),v=null,ee=!1)}return J&&!re&&(re=!0,e.addEventListener("resize",_,!1)),Q?Q.fire(_e,l,T):me(_e,l,T)}return ge.reset=function(){Q&&Q.reset(),ce&&ce.reset()},ge}var ht;function A(){return ht||(ht=Ye(null,{useWorker:!0,resize:!0})),ht}function x(v,y,H,J,re,oe,ue){var Q=new Path2D(v),ae=new Path2D;ae.addPath(Q,new DOMMatrix(y));var ee=new Path2D;return ee.addPath(ae,new DOMMatrix([Math.cos(ue)*re,Math.sin(ue)*re,-Math.sin(ue)*oe,Math.cos(ue)*oe,H,J])),ee}function F(v){if(!s)throw new Error("path confetti are not supported in this browser");var y,H;typeof v=="string"?y=v:(y=v.path,H=v.matrix);var J=new Path2D(y),re=document.createElement("canvas"),oe=re.getContext("2d");if(!H){for(var ue=1e3,Q=ue,ae=ue,ee=0,fe=0,ce,me,ge=0;ge<ue;ge+=2)for(var _e=0;_e<ue;_e+=2)oe.isPointInPath(J,ge,_e,"nonzero")&&(Q=Math.min(Q,ge),ae=Math.min(ae,_e),ee=Math.max(ee,ge),fe=Math.max(fe,_e));ce=ee-Q,me=fe-ae;var h=10,a=Math.min(h/ce,h/me);H=[a,0,0,a,-Math.round(ce/2+Q)*a,-Math.round(me/2+ae)*a]}return{type:"path",path:y,matrix:H}}function P(v){var y,H=1,J="#000000",re='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';typeof v=="string"?y=v:(y=v.text,H="scalar"in v?v.scalar:H,re="fontFamily"in v?v.fontFamily:re,J="color"in v?v.color:J);var oe=10*H,ue=""+oe+"px "+re,Q=new OffscreenCanvas(oe,oe),ae=Q.getContext("2d");ae.font=ue;var ee=ae.measureText(y),fe=Math.ceil(ee.actualBoundingBoxRight+ee.actualBoundingBoxLeft),ce=Math.ceil(ee.actualBoundingBoxAscent+ee.actualBoundingBoxDescent),me=2,ge=ee.actualBoundingBoxLeft+me,_e=ee.actualBoundingBoxAscent+me;fe+=me+me,ce+=me+me,Q=new OffscreenCanvas(fe,ce),ae=Q.getContext("2d"),ae.font=ue,ae.fillStyle=J,ae.fillText(y,ge,_e);var h=1/H;return{type:"bitmap",bitmap:Q.transferToImageBitmap(),matrix:[h,0,0,h,-fe*h/2,-ce*h/2]}}n.exports=function(){return A().apply(this,arguments)},n.exports.reset=function(){A().reset()},n.exports.create=Ye,n.exports.shapeFromPath=F,n.exports.shapeFromText=P})(function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}(),uc,!1);var cf=uc.exports,fA=uc.exports.create;var Ho=class{static DEFAULTS={scalar:1.4,zIndex:1e4,shapes:["circle","circle","square"],colors:["#f51c8f","#2179e2","#d52dc8","#01a9d9","#78ff44","#fdff6a"]};static async basic(){await this.fire({particleCount:100,spread:70,origin:{y:.6}})}static async leftRight(e=100){let n=[],r=Date.now()+2e3,i=()=>{n.push(this.fire({angle:60,spread:55,origin:{x:0}}),this.fire({angle:120,spread:55,origin:{x:1}})),Date.now()<r&&e>0&&(requestAnimationFrame(i),e--)};i(),await Promise.all(n)}static async realistic(){await Promise.all([this.realisticFire(.25,{spread:26,startVelocity:55}),this.realisticFire(.2,{spread:60}),this.realisticFire(.35,{spread:100,decay:.91,scalar:.8}),this.realisticFire(.1,{spread:120,startVelocity:25,decay:.92,scalar:1.2}),this.realisticFire(.1,{spread:120,startVelocity:45})])}static async fire(e){Object.assign(e,this.DEFAULTS,e),e.particleCount=e.particleCount??this.DEFAULTS.colors.length,await cf(e)}static async realisticFire(e,n){let i={origin:{y:.7}};await this.fire(Object.assign({},i,n,{particleCount:Math.floor(200*e)}))}};var hv=(t,e)=>e.minValue;function mv(t,e){if(t&1&&(Se(0,"div",7),Ze(1,"safeHtml")),t&2){let n=q().$implicit;pe("innerHTML",rt(1,1,n.minValue+" Products"),Pt)}}function gv(t,e){if(t&1&&(Se(0,"div",7),Ze(1,"cooeeCurrency"),Ze(2,"safeHtml")),t&2){let n=q().$implicit;pe("innerHTML",rt(2,3,rt(1,1,n.minValue)),Pt)}}function _v(t,e){if(t&1&&(W(0,"li",6)(1,"div"),Oe(2,mv,2,3,"div",7)(3,gv,3,5,"div",7),Se(4,"img",8),W(5,"div",9),Ae(6),z()()()),t&2){let n=e.$implicit,r=q(2);ni("left",n.calculatedAlignment+"%"),B(2),Te((r.progressBarConfig==null?null:r.progressBarConfig.rewardBasis)===r.RewardBasis.ITEM_COUNT?2:3),B(2),pe("src",r.getIconURL(n),ct),B(2),ln(n.label)}}function vv(t,e){if(t&1&&(gt(0)(1),Se(2,"div",0),Ze(3,"cooeeDynamicVariables"),Ze(4,"safeHtml"),W(5,"div",1)(6,"ul",2)(7,"div",3),Se(8,"div",4),z(),tt(9,_v,7,5,"li",5,hv),z()()),t&2){let n=q(),r=n.calculatedState(),i=r.nextMilestone?r.nextMilestone.reachingText:r.lastMilestone.reachedText;B(2),pe("innerHTML",rt(4,6,Ul(3,3,i,n.localDynamicVariables())),Pt),B(6),ni("width",r.cartValuePercentage+"%"),B(),nt(r.milestones)}}var jo=class t extends un{cart;localDynamicVariables=Wt({});calculatedState=Wt({});progressBarConfig;RewardBasis=js;constructor(){super()}engagementTriggerReceived(e){this.progressBarConfig=e.progressBarConfig}ngOnInit(){super.ngOnInit(),this.calculateMilestonesSilently()}update(){this.calculateMilestonesSilently()}getIconURL(e){return e.rewardType===si.FREE_SHIPPING?"https://img.icons8.com/ios-filled/50/FFFFFF/free-shipping.png":e.rewardType===si.DISCOUNT?"https://img.icons8.com/ios-glyphs/30/FFFFFF/sale-price-tag.png":e.rewardType===si.FREE_AUTO_GIFT?"https://img.icons8.com/ios-filled/50/FFFFFF/gift--v1.png":""}calculateMilestonesSilently(){this.calculateMilestones().catch(e=>Et.error(e))}async calculateMilestones(){let e=this.engagementTrigger,n=this.progressBarConfig;if(!n?.milestones?.length){Et.warn("Milestones not available in progress bar config",e);return}let r=await this.cart.getNormalisedCart(),i=n.milestones.at(-1),o=n?.reachedAmountOrCount??r.originalAmount,s=n.totalProgress??0;Et.debug("Cart value:",o,`, percentage: ${s}%`),this.celebrate(e,o);let c={milestonesReady:!0,cartValuePercentage:s,milestones:n.milestones},u=n.milestones.find(d=>!d.reached);if(u){let d=ir(u.minValue-o);if(n.rewardBasis==="ITEM_COUNT"){let g=u.minValue-o;d=`${g} ${g===1?"product":"products"}`}this.localDynamicVariables.set({amount_left:d}),c.nextMilestone=u,this.calculatedState.set(c);return}c.lastMilestone=i,this.calculatedState.set(c)}celebrate(e,n){let o=[...e.progressBarConfig.milestones].reverse().find(u=>u.minValue<n);if(!o)return;let s=`lc/en/${e.shortID}/${o.minValue}`;sessionStorage.getItem(s)||(sessionStorage.setItem(s,"1"),this.progressBarConfig?.noConfetti||Ho.realistic())}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Le({type:t,selectors:[["cooee-progressbar"]],inputs:{cart:"cart"},features:[St],decls:1,vars:1,consts:[[1,"heading",3,"innerHTML"],[1,"milestone-container"],[1,"milestone-list"],[1,"untracked-path"],[1,"tracked-path"],[1,"milestone-list-item",3,"left"],[1,"milestone-list-item"],[1,"milestone-value",3,"innerHTML"],["width","20","height","20","alt","milestone icon",1,"milestone-icon",3,"src"],[1,"milestone-label"]],template:function(n,r){n&1&&Oe(0,vv,11,8),n&2&&Te(r.calculatedState().milestonesReady?0:-1)},dependencies:[Uo,Fn,yn],styles:[`:host{display:block;padding:10px;background:linear-gradient(0deg,rgba(var(--lc-color-primary),.1) 0%,transparent 100%)}.milestone-container{width:95%;margin:8px 0}.heading{font-weight:500;text-align:center;font-size:12px}.milestone-list{display:flex;align-items:center;position:relative;font-size:10px;font-weight:500}.untracked-path{width:100%;background-color:#e5e7eb;height:4px;position:absolute}.tracked-path{background-color:rgb(var(--lc-color-primary));height:100%;display:block;transition:width .5s ease-in-out}.milestone-list{padding:0;margin:0}.milestone-list-item{position:relative;display:flex;flex-direction:column;align-items:center;height:75px}.milestone-list-item>div{display:flex;flex-direction:column;align-items:center;justify-content:space-between;position:absolute;height:100%;width:100px}.milestone-icon{padding:5px;border-radius:1000px;background-color:rgb(var(--lc-color-primary))}
|
|
30
|
+
`],encapsulation:3})};var lf=ki(Us());var yv=(t,e)=>({enter:t,exit:e});function Ev(t,e){if(t&1&&(W(0,"div",7),Ae(1),z(),W(2,"div",8),Ae(3),z()),t&2){let n=q(2);B(),Tt(" ",n.getCurrency(n.selectedVariant().price.cmp)," "),B(2),Tt(" ",n.getDiscountPercentage(n.selectedVariant().price),"% off ")}}function bv(t,e){if(t&1&&(W(0,"div",6),Ae(1),z()),t&2){let n=q(2);B(),Tt(" ",n.stickyATCConfig.leftText," ")}}function wv(t,e){if(t&1&&(W(0,"div",1)(1,"div",5),Ae(2),z(),Oe(3,Ev,4,2)(4,bv,2,1,"div",6),z()),t&2){let n=q();B(2),Tt(" ",n.getCurrency(n.selectedVariant().price.d)," "),B(),Te(n.selectedVariant().price.cmp?3:-1),B(),Te(n.stickyATCConfig.leftText?4:-1)}}function Cv(t,e){if(t&1&&(W(0,"div",9),Ae(1),z()),t&2){let n=e.$implicit,r=e.$index;q(2);let i=Ke(5);pe("ngClass",Vl(2,yv,r===i.currentIndex,r===i.previousIndex)),B(),Tt(" ",n," ")}}function Sv(t,e){if(t&1&&(W(0,"div",4),tt(1,Cv,2,5,"div",9,cn),z()),t&2){q();let n=Ke(5);B(),nt(n.features)}}var $o=class t extends un{currentItem;stickyATCConfig;selectedVariant=Wt(void 0);featureSlider=Wt({features:[],currentIndex:0});constructor(){super()}engagementTriggerReceived(e){this.stickyATCConfig=e.stickyATCConfig??{},this.currentItem=e.items[0],this.selectedVariant.set(this.currentItem.vars[0]),this.stickyATCConfig.leftText=this.replaceVariables(this.stickyATCConfig.leftText),this.stickyATCConfig.rightText=this.replaceVariables(this.stickyATCConfig.rightText),this.startFeatureRotation()}update(){}getCurrency(e){return ir(e)}getDiscountPercentage(e){return((e.cmp-e.d)/e.cmp*100).toFixed(0)}async addToCart(){this.executeCTAViaRenderer({clickAction:{at:102},item:this.currentItem})}startFeatureRotation(){if(!this.stickyATCConfig.rightText)return;let e=this.stickyATCConfig.rightText.split(`
|
|
31
|
+
`),n=e.length===1?null:setInterval(()=>{this.featureSlider.update(r=>we(O({},r),{previousIndex:r.currentIndex,currentIndex:(r.currentIndex+1)%r.features.length}))},3e3);this.featureSlider.set({intervalRef:n,currentIndex:0,features:e})}replaceVariables(e){return e?(0,lf.render)(e,this.currentItem.getTemplateVariables()):""}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Le({type:t,selectors:[["cooee-sticky-atc"]],features:[St],decls:7,vars:3,consts:[[1,"lc-wrapper"],[1,"lc-prices"],[1,"lc-button-wrapper"],["type","button",1,"lc-button","lc-button-atc",3,"click"],[1,"lc-features"],[1,"lc-sale-price"],[1,"lc-additional-text"],[1,"lc-compare-price"],[1,"lc-discount-label"],[1,"lc-feature",3,"ngClass"]],template:function(n,r){if(n&1){let i=ze();W(0,"div",0),Oe(1,wv,5,3,"div",1),W(2,"div",2)(3,"button",3),Me("click",function(){return Ne(i),Re(r.addToCart())}),Ae(4,"Add To Cart"),z(),gt(5),Oe(6,Sv,3,0,"div",4),z()()}if(n&2){B(),Te(r.selectedVariant()&&r.stickyATCConfig.showProductInfo?1:-1),B(4);let i=yt(r.featureSlider());B(),Te(i.features.length?6:-1)}},dependencies:[Ln],styles:["[_nghost-%COMP%]{display:flex;justify-content:center;padding:10px;background-color:#fff;width:100%;box-shadow:4px 0 10px #0006;line-height:normal}.lc-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:8px;max-width:1100px;width:100%}.lc-prices[_ngcontent-%COMP%]{flex:1 1 100%;display:flex;flex-wrap:wrap;align-items:center;gap:6px}@media (min-width: 768px){.lc-prices[_ngcontent-%COMP%]{gap:8px}}.lc-sale-price[_ngcontent-%COMP%]{font-size:24px;font-weight:600}.lc-compare-price[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:red;text-decoration:line-through}.lc-discount-label[_ngcontent-%COMP%]{font-size:12px;font-weight:500;color:green}.lc-button-wrapper[_ngcontent-%COMP%]{flex:1 1 100%;display:flex;flex-direction:column;gap:4px;align-items:center}.lc-button[_ngcontent-%COMP%]{background-color:#000;color:#fff;opacity:1;cursor:pointer;pointer-events:auto;border-radius:4px;min-width:150px;width:100%;padding:8px}.lc-additional-text[_ngcontent-%COMP%], .lc-feature[_ngcontent-%COMP%]{font-size:12px;color:#666}.lc-features[_ngcontent-%COMP%]{position:relative;overflow:hidden;height:16px;text-align:center;width:100%}.lc-features[_ngcontent-%COMP%] .lc-feature[_ngcontent-%COMP%]{position:absolute;width:100%;opacity:0;transform:translateY(100%);transition:transform .5s ease,opacity .5s ease}.lc-features[_ngcontent-%COMP%] .lc-feature.enter[_ngcontent-%COMP%]{opacity:1;transform:translateY(0);z-index:2}.lc-features[_ngcontent-%COMP%] .lc-feature.exit[_ngcontent-%COMP%]{opacity:0;transform:translateY(-100%);z-index:1}"]})};var hf,je,mf,mc,or,uf,gf,_f,vf,gc,fc,pc,Tv,hc={},yf=[],Iv=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Yo=Array.isArray;function Mn(t,e){for(var n in e)t[n]=e[n];return t}function _c(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function dc(t,e,n,r,i){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++mf,__i:-1,__u:0};return i==null&&je.vnode!=null&&je.vnode(o),o}function vc(t){return t.children}function Pr(t,e){this.props=t,this.context=e}function Lr(t,e){if(e==null)return t.__?Lr(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?Lr(t):null}function Ef(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return Ef(t)}}function df(t){(!t.__d&&(t.__d=!0)&&or.push(t)&&!Wo.__r++||uf!=je.debounceRendering)&&((uf=je.debounceRendering)||gf)(Wo)}function Wo(){for(var t,e,n,r,i,o,s,c=1;or.length;)or.length>c&&or.sort(_f),t=or.shift(),c=or.length,t.__d&&(n=void 0,i=(r=(e=t).__v).__e,o=[],s=[],e.__P&&((n=Mn({},r)).__v=r.__v+1,je.vnode&&je.vnode(n),Cf(e.__P,n,r,e.__n,e.__P.namespaceURI,32&r.__u?[i]:null,o,i??Lr(r),!!(32&r.__u),s),n.__v=r.__v,n.__.__k[n.__i]=n,Av(o,n,s),n.__e!=i&&Ef(n)));Wo.__r=0}function bf(t,e,n,r,i,o,s,c,u,d,g){var p,E,w,N,M,L,j=r&&r.__k||yf,K=e.length;for(u=xv(n,e,j,u,K),p=0;p<K;p++)(w=n.__k[p])!=null&&(E=w.__i==-1?hc:j[w.__i]||hc,w.__i=p,L=Cf(t,w,E,i,o,s,c,u,d,g),N=w.__e,w.ref&&E.ref!=w.ref&&(E.ref&&yc(E.ref,null,w),g.push(w.ref,w.__c||N,w)),M==null&&N!=null&&(M=N),4&w.__u||E.__k===w.__k?u=wf(w,u,t):typeof w.type=="function"&&L!==void 0?u=L:N&&(u=N.nextSibling),w.__u&=-7);return n.__e=M,u}function xv(t,e,n,r,i){var o,s,c,u,d,g=n.length,p=g,E=0;for(t.__k=new Array(i),o=0;o<i;o++)(s=e[o])!=null&&typeof s!="boolean"&&typeof s!="function"?(u=o+E,(s=t.__k[o]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?dc(null,s,null,null,null):Yo(s)?dc(vc,{children:s},null,null,null):s.constructor==null&&s.__b>0?dc(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=t,s.__b=t.__b+1,c=null,(d=s.__i=Ov(s,n,u,p))!=-1&&(p--,(c=n[d])&&(c.__u|=2)),c==null||c.__v==null?(d==-1&&(i>g?E--:i<g&&E++),typeof s.type!="function"&&(s.__u|=4)):d!=u&&(d==u-1?E--:d==u+1?E++:(d>u?E--:E++,s.__u|=4))):t.__k[o]=null;if(p)for(o=0;o<g;o++)(c=n[o])!=null&&(2&c.__u)==0&&(c.__e==r&&(r=Lr(c)),Tf(c,c));return r}function wf(t,e,n){var r,i;if(typeof t.type=="function"){for(r=t.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=t,e=wf(r[i],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=Lr(t)),n.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Ov(t,e,n,r){var i,o,s=t.key,c=t.type,u=e[n];if(u===null&&t.key==null||u&&s==u.key&&c==u.type&&(2&u.__u)==0)return n;if(r>(u!=null&&(2&u.__u)==0?1:0))for(i=n-1,o=n+1;i>=0||o<e.length;){if(i>=0){if((u=e[i])&&(2&u.__u)==0&&s==u.key&&c==u.type)return i;i--}if(o<e.length){if((u=e[o])&&(2&u.__u)==0&&s==u.key&&c==u.type)return o;o++}}return-1}function ff(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Iv.test(e)?n:n+"px"}function Go(t,e,n,r,i){var o,s;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||ff(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||ff(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(vf,"$1")),s=e.toLowerCase(),e=s in t||e=="onFocusOut"||e=="onFocusIn"?s.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=gc,t.addEventListener(e,o?pc:fc,o)):t.removeEventListener(e,o?pc:fc,o);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function pf(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=gc++;else if(e.t<n.u)return;return n(je.event?je.event(e):e)}}}function Cf(t,e,n,r,i,o,s,c,u,d){var g,p,E,w,N,M,L,j,K,se,X,Ee,U,he,te,ye,ke,De=e.type;if(e.constructor!=null)return null;128&n.__u&&(u=!!(32&n.__u),o=[c=e.__e=n.__e]),(g=je.__b)&&g(e);e:if(typeof De=="function")try{if(j=e.props,K="prototype"in De&&De.prototype.render,se=(g=De.contextType)&&r[g.__c],X=g?se?se.props.value:g.__:r,n.__c?L=(p=e.__c=n.__c).__=p.__E:(K?e.__c=p=new De(j,X):(e.__c=p=new Pr(j,X),p.constructor=De,p.render=Nv),se&&se.sub(p),p.props=j,p.state||(p.state={}),p.context=X,p.__n=r,E=p.__d=!0,p.__h=[],p._sb=[]),K&&p.__s==null&&(p.__s=p.state),K&&De.getDerivedStateFromProps!=null&&(p.__s==p.state&&(p.__s=Mn({},p.__s)),Mn(p.__s,De.getDerivedStateFromProps(j,p.__s))),w=p.props,N=p.state,p.__v=e,E)K&&De.getDerivedStateFromProps==null&&p.componentWillMount!=null&&p.componentWillMount(),K&&p.componentDidMount!=null&&p.__h.push(p.componentDidMount);else{if(K&&De.getDerivedStateFromProps==null&&j!==w&&p.componentWillReceiveProps!=null&&p.componentWillReceiveProps(j,X),!p.__e&&p.shouldComponentUpdate!=null&&p.shouldComponentUpdate(j,p.__s,X)===!1||e.__v==n.__v){for(e.__v!=n.__v&&(p.props=j,p.state=p.__s,p.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(Pe){Pe&&(Pe.__=e)}),Ee=0;Ee<p._sb.length;Ee++)p.__h.push(p._sb[Ee]);p._sb=[],p.__h.length&&s.push(p);break e}p.componentWillUpdate!=null&&p.componentWillUpdate(j,p.__s,X),K&&p.componentDidUpdate!=null&&p.__h.push(function(){p.componentDidUpdate(w,N,M)})}if(p.context=X,p.props=j,p.__P=t,p.__e=!1,U=je.__r,he=0,K){for(p.state=p.__s,p.__d=!1,U&&U(e),g=p.render(p.props,p.state,p.context),te=0;te<p._sb.length;te++)p.__h.push(p._sb[te]);p._sb=[]}else do p.__d=!1,U&&U(e),g=p.render(p.props,p.state,p.context),p.state=p.__s;while(p.__d&&++he<25);p.state=p.__s,p.getChildContext!=null&&(r=Mn(Mn({},r),p.getChildContext())),K&&!E&&p.getSnapshotBeforeUpdate!=null&&(M=p.getSnapshotBeforeUpdate(w,N)),ye=g,g!=null&&g.type===vc&&g.key==null&&(ye=Sf(g.props.children)),c=bf(t,Yo(ye)?ye:[ye],e,n,r,i,o,s,c,u,d),p.base=e.__e,e.__u&=-161,p.__h.length&&s.push(p),L&&(p.__E=p.__=null)}catch(Pe){if(e.__v=null,u||o!=null)if(Pe.then){for(e.__u|=u?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;o[o.indexOf(c)]=null,e.__e=c}else for(ke=o.length;ke--;)_c(o[ke]);else e.__e=n.__e,e.__k=n.__k;je.__e(Pe,e,n)}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):c=e.__e=Dv(n.__e,e,n,r,i,o,s,u,d);return(g=je.diffed)&&g(e),128&e.__u?void 0:c}function Av(t,e,n){for(var r=0;r<n.length;r++)yc(n[r],n[++r],n[++r]);je.__c&&je.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(o){o.call(i)})}catch(o){je.__e(o,i.__v)}})}function Sf(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:Yo(t)?t.map(Sf):Mn({},t)}function Dv(t,e,n,r,i,o,s,c,u){var d,g,p,E,w,N,M,L=n.props,j=e.props,K=e.type;if(K=="svg"?i="http://www.w3.org/2000/svg":K=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(d=0;d<o.length;d++)if((w=o[d])&&"setAttribute"in w==!!K&&(K?w.localName==K:w.nodeType==3)){t=w,o[d]=null;break}}if(t==null){if(K==null)return document.createTextNode(j);t=document.createElementNS(i,K,j.is&&j),c&&(je.__m&&je.__m(e,o),c=!1),o=null}if(K==null)L===j||c&&t.data==j||(t.data=j);else{if(o=o&&hf.call(t.childNodes),L=n.props||hc,!c&&o!=null)for(L={},d=0;d<t.attributes.length;d++)L[(w=t.attributes[d]).name]=w.value;for(d in L)if(w=L[d],d!="children"){if(d=="dangerouslySetInnerHTML")p=w;else if(!(d in j)){if(d=="value"&&"defaultValue"in j||d=="checked"&&"defaultChecked"in j)continue;Go(t,d,null,w,i)}}for(d in j)w=j[d],d=="children"?E=w:d=="dangerouslySetInnerHTML"?g=w:d=="value"?N=w:d=="checked"?M=w:c&&typeof w!="function"||L[d]===w||Go(t,d,w,L[d],i);if(g)c||p&&(g.__html==p.__html||g.__html==t.innerHTML)||(t.innerHTML=g.__html),e.__k=[];else if(p&&(t.innerHTML=""),bf(e.type=="template"?t.content:t,Yo(E)?E:[E],e,n,r,K=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&Lr(n,0),c,u),o!=null)for(d=o.length;d--;)_c(o[d]);c||(d="value",K=="progress"&&N==null?t.removeAttribute("value"):N!=null&&(N!==t[d]||K=="progress"&&!N||K=="option"&&N!=L[d])&&Go(t,d,N,L[d],i),d="checked",M!=null&&M!=t[d]&&Go(t,d,M,L[d],i))}return t}function yc(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(i){je.__e(i,n)}}function Tf(t,e,n){var r,i;if(je.unmount&&je.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||yc(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){je.__e(o,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&Tf(r[i],e,n||typeof t.type!="function");n||_c(t.__e),t.__c=t.__=t.__e=void 0}function Nv(t,e,n){return this.constructor(t,n)}hf=yf.slice,je={__e:function(t,e,n,r){for(var i,o,s;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(t)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),s=i.__d),s)return i.__E=i}catch(c){t=c}throw t}},mf=0,mc=function(t){return t!=null&&t.constructor==null},Pr.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Mn({},this.state),typeof t=="function"&&(t=t(Mn({},n),this.props)),t&&Mn(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),df(this))},Pr.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),df(this))},Pr.prototype.render=vc,or=[],gf=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,_f=function(t,e){return t.__v.__b-e.__v.__b},Wo.__r=0,vf=/(PointerCapture)$|Capture$/i,gc=0,fc=pf(!1),pc=pf(!0),Tv=0;var bc,jt,Ec,If,xf=0,Lf=[],pt=je,Of=pt.__b,Af=pt.__r,Df=pt.diffed,Nf=pt.__c,Rf=pt.unmount,Mf=pt.__;function Rv(t,e){pt.__h&&pt.__h(jt,t,xf||e),xf=0;var n=jt.__H||(jt.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function Cc(t,e){var n=Rv(bc++,7);return Lv(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function Mv(){for(var t;t=Lf.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(zo),t.__H.__h.forEach(wc),t.__H.__h=[]}catch(e){t.__H.__h=[],pt.__e(e,t.__v)}}pt.__b=function(t){jt=null,Of&&Of(t)},pt.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Mf&&Mf(t,e)},pt.__r=function(t){Af&&Af(t),bc=0;var e=(jt=t.__c).__H;e&&(Ec===jt?(e.__h=[],jt.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach(zo),e.__h.forEach(wc),e.__h=[],bc=0)),Ec=jt},pt.diffed=function(t){Df&&Df(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Lf.push(e)!==1&&If===pt.requestAnimationFrame||((If=pt.requestAnimationFrame)||Pv)(Mv)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Ec=jt=null},pt.__c=function(t,e){e.some(function(n){try{n.__h.forEach(zo),n.__h=n.__h.filter(function(r){return!r.__||wc(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],pt.__e(r,n.__v)}}),Nf&&Nf(t,e)},pt.unmount=function(t){Rf&&Rf(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{zo(r)}catch(i){e=i}}),n.__H=void 0,e&&pt.__e(e,n.__v))};var Pf=typeof requestAnimationFrame=="function";function Pv(t){var e,n=function(){clearTimeout(r),Pf&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);Pf&&(e=requestAnimationFrame(n))}function zo(t){var e=jt,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),jt=e}function wc(t){var e=jt;t.__c=t.__(),jt=e}function Lv(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}var Fv=Symbol.for("preact-signals");function Tc(){if(Fr>1)Fr--;else{for(var t,e=!1;Si!==void 0;){var n=Si;for(Si=void 0,Sc++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&kf(n))try{n.c()}catch(i){e||(t=i,e=!0)}n=r}}if(Sc=0,Fr--,e)throw t}}var $e=void 0;var Si=void 0,Fr=0,Sc=0,Ko=0;function Ff(t){if($e!==void 0){var e=t.n;if(e===void 0||e.t!==$e)return e={i:0,S:t,p:$e.s,n:void 0,t:$e,e:void 0,x:void 0,r:e},$e.s!==void 0&&($e.s.n=e),$e.s=e,t.n=e,32&$e.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=$e.s,e.n=void 0,$e.s.n=e,$e.s=e),e}}function _t(t){this.v=t,this.i=0,this.n=void 0,this.t=void 0}_t.prototype.brand=Fv;_t.prototype.h=function(){return!0};_t.prototype.S=function(t){this.t!==t&&t.e===void 0&&(t.x=this.t,this.t!==void 0&&(this.t.e=t),this.t=t)};_t.prototype.U=function(t){if(this.t!==void 0){var e=t.e,n=t.x;e!==void 0&&(e.x=n,t.e=void 0),n!==void 0&&(n.e=e,t.x=void 0),t===this.t&&(this.t=n)}};_t.prototype.subscribe=function(t){var e=this;return Xo(function(){var n=e.value,r=$e;$e=void 0;try{t(n)}finally{$e=r}})};_t.prototype.valueOf=function(){return this.value};_t.prototype.toString=function(){return this.value+""};_t.prototype.toJSON=function(){return this.value};_t.prototype.peek=function(){var t=$e;$e=void 0;try{return this.value}finally{$e=t}};Object.defineProperty(_t.prototype,"value",{get:function(){var t=Ff(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(Sc>100)throw new Error("Cycle detected");this.v=t,this.i++,Ko++,Fr++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{Tc()}}}});function Ti(t){return new _t(t)}function kf(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function Vf(t){for(var e=t.s;e!==void 0;e=e.n){var n=e.S.n;if(n!==void 0&&(e.r=n),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function Bf(t){for(var e=t.s,n=void 0;e!==void 0;){var r=e.p;e.i===-1?(e.S.U(e),r!==void 0&&(r.n=e.n),e.n!==void 0&&(e.n.p=r)):n=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=r}t.s=n}function kr(t){_t.call(this,void 0),this.x=t,this.s=void 0,this.g=Ko-1,this.f=4}(kr.prototype=new _t).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Ko))return!0;if(this.g=Ko,this.f|=1,this.i>0&&!kf(this))return this.f&=-2,!0;var t=$e;try{Vf(this),$e=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return $e=t,Bf(this),this.f&=-2,!0};kr.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}_t.prototype.S.call(this,t)};kr.prototype.U=function(t){if(this.t!==void 0&&(_t.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}};kr.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}};Object.defineProperty(kr.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=Ff(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function Uf(t){return new kr(t)}function Hf(t){var e=t.u;if(t.u=void 0,typeof e=="function"){Fr++;var n=$e;$e=void 0;try{e()}catch(r){throw t.f&=-2,t.f|=8,Ic(t),r}finally{$e=n,Tc()}}}function Ic(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,Hf(t)}function kv(t){if($e!==this)throw new Error("Out-of-order effect");Bf(this),$e=t,this.f&=-2,8&this.f&&Ic(this),Tc()}function Ii(t){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Ii.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.u=e)}finally{t()}};Ii.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Hf(this),Vf(this),Fr++;var t=$e;return $e=this,kv.bind(this,t)};Ii.prototype.N=function(){2&this.f||(this.f|=2,this.o=Si,Si=this)};Ii.prototype.d=function(){this.f|=8,1&this.f||Ic(this)};function Xo(t){var e=new Ii(t);try{e.c()}catch(n){throw e.d(),n}return e.d.bind(e)}var Oc,xc;function Vr(t,e){je[t]=e.bind(null,je[t]||function(){})}function qo(t){xc&&xc(),xc=t&&t.S()}function jf(t){var e=this,n=t.data,r=Bv(n);r.value=n;var i=Cc(function(){for(var o=e.__v;o=o.__;)if(o.__c){o.__c.__$f|=4;break}return e.__$u.c=function(){var s,c=e.__$u.S(),u=i.value;c(),mc(u)||((s=e.base)==null?void 0:s.nodeType)!==3?(e.__$f|=1,e.setState({})):e.base.data=u},Uf(function(){var s=r.value.value;return s===0?0:s===!0?"":s||""})},[]);return i.value}jf.displayName="_st";Object.defineProperties(_t.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:jf},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});Vr("__b",function(t,e){if(typeof e.type=="string"){var n,r=e.props;for(var i in r)if(i!=="children"){var o=r[i];o instanceof _t&&(n||(e.__np=n={}),n[i]=o,r[i]=o.peek())}}t(e)});Vr("__r",function(t,e){qo();var n,r=e.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(i){var o;return Xo(function(){o=this}),o.c=function(){r.__$f|=1,r.setState({})},o}())),Oc=r,qo(n),t(e)});Vr("__e",function(t,e,n,r){qo(),Oc=void 0,t(e,n,r)});Vr("diffed",function(t,e){qo(),Oc=void 0;var n;if(typeof e.type=="string"&&(n=e.__e)){var r=e.__np,i=e.props;if(r){var o=n.U;if(o)for(var s in o){var c=o[s];c!==void 0&&!(s in r)&&(c.d(),o[s]=void 0)}else n.U=o={};for(var u in r){var d=o[u],g=r[u];d===void 0?(d=Vv(n,u,g,i),o[u]=d):d.o(g,i)}}}t(e)});function Vv(t,e,n,r){var i=e in t&&t.ownerSVGElement===void 0,o=Ti(n);return{o:function(s,c){o.value=s,r=c},d:Xo(function(){var s=o.value.value;r[e]!==s&&(r[e]=s,i?t[e]=s:s?t.setAttribute(e,s):t.removeAttribute(e))})}}Vr("unmount",function(t,e){if(typeof e.type=="string"){var n=e.__e;if(n){var r=n.U;if(r){n.U=void 0;for(var i in r){var o=r[i];o&&o.d()}}}}else{var s=e.__c;if(s){var c=s.__$u;c&&(s.__$u=void 0,c.d())}}t(e)});Vr("__h",function(t,e,n,r){(r<3||r===9)&&(e.__$f|=2),t(e,n,r)});Pr.prototype.shouldComponentUpdate=function(t,e){var n=this.__$u,r=n&&n.s!==void 0;for(var i in e)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){if(!(r||2&this.__$f||4&this.__$f)||1&this.__$f)return!0}else if(!(r||4&this.__$f)||3&this.__$f)return!0;for(var o in t)if(o!=="__source"&&t[o]!==this.props[o])return!0;for(var s in this.props)if(!(s in t))return!0;return!1};function Bv(t){return Cc(function(){return Ti(t)},[])}var Ac=(i=>(i.SIMPLE="SIMPLE",i.SWIPER="SWIPER",i.STORY="STORY",i.FLOATING_POPUP="FLOATING_POPUP",i))(Ac||{}),Dc=(r=>(r.ON="ON",r.OFF="OFF",r.ON_HOVER="ON_HOVER",r))(Dc||{}),xi=(r=>(r.FIRST_ITEM="FIRST_ITEM",r.CARD="CARD",r.NONE="NONE",r))(xi||{});function Uv(t,e){return e={exports:{}},t(e,e.exports),e.exports}var Hv=Wv,jv=zv,$v=qv,bn=[],Qt=[],Gv=typeof Uint8Array<"u"?Uint8Array:Array,Nc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(sr=0,$f=Nc.length;sr<$f;++sr)bn[sr]=Nc[sr],Qt[Nc.charCodeAt(sr)]=sr;var sr,$f;Qt[45]=62;Qt[95]=63;function op(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function Wv(t){var e=op(t),n=e[0],r=e[1];return(n+r)*3/4-r}function Yv(t,e,n){return(e+n)*3/4-n}function zv(t){var e,n=op(t),r=n[0],i=n[1],o=new Gv(Yv(t,r,i)),s=0,c=i>0?r-4:r,u;for(u=0;u<c;u+=4)e=Qt[t.charCodeAt(u)]<<18|Qt[t.charCodeAt(u+1)]<<12|Qt[t.charCodeAt(u+2)]<<6|Qt[t.charCodeAt(u+3)],o[s++]=e>>16&255,o[s++]=e>>8&255,o[s++]=e&255;return i===2&&(e=Qt[t.charCodeAt(u)]<<2|Qt[t.charCodeAt(u+1)]>>4,o[s++]=e&255),i===1&&(e=Qt[t.charCodeAt(u)]<<10|Qt[t.charCodeAt(u+1)]<<4|Qt[t.charCodeAt(u+2)]>>2,o[s++]=e>>8&255,o[s++]=e&255),o}function Kv(t){return bn[t>>18&63]+bn[t>>12&63]+bn[t>>6&63]+bn[t&63]}function Xv(t,e,n){for(var r,i=[],o=e;o<n;o+=3)r=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(t[o+2]&255),i.push(Kv(r));return i.join("")}function qv(t){for(var e,n=t.length,r=n%3,i=[],o=16383,s=0,c=n-r;s<c;s+=o)i.push(Xv(t,s,s+o>c?c:s+o));return r===1?(e=t[n-1],i.push(bn[e>>2]+bn[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],i.push(bn[e>>10]+bn[e>>4&63]+bn[e<<2&63]+"=")),i.join("")}var Rc={byteLength:Hv,toByteArray:jv,fromByteArray:$v};var Zv=function(e,n,r,i,o){var s,c,u=o*8-i-1,d=(1<<u)-1,g=d>>1,p=-7,E=r?o-1:0,w=r?-1:1,N=e[n+E];for(E+=w,s=N&(1<<-p)-1,N>>=-p,p+=u;p>0;s=s*256+e[n+E],E+=w,p-=8);for(c=s&(1<<-p)-1,s>>=-p,p+=i;p>0;c=c*256+e[n+E],E+=w,p-=8);if(s===0)s=1-g;else{if(s===d)return c?NaN:(N?-1:1)*(1/0);c=c+Math.pow(2,i),s=s-g}return(N?-1:1)*c*Math.pow(2,s-i)},Jv=function(e,n,r,i,o,s){var c,u,d,g=s*8-o-1,p=(1<<g)-1,E=p>>1,w=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,N=i?0:s-1,M=i?1:-1,L=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(u=isNaN(n)?1:0,c=p):(c=Math.floor(Math.log(n)/Math.LN2),n*(d=Math.pow(2,-c))<1&&(c--,d*=2),c+E>=1?n+=w/d:n+=w*Math.pow(2,1-E),n*d>=2&&(c++,d/=2),c+E>=p?(u=0,c=p):c+E>=1?(u=(n*d-1)*Math.pow(2,o),c=c+E):(u=n*Math.pow(2,E-1)*Math.pow(2,o),c=0));o>=8;e[r+N]=u&255,N+=M,u/=256,o-=8);for(c=c<<o|u,g+=o;g>0;e[r+N]=c&255,N+=M,c/=256,g-=8);e[r+N-M]|=L*128},Br={read:Zv,write:Jv},Qo=Uv(function(t,e){var n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=j,e.INSPECT_MAX_BYTES=50;var r=2147483647;e.kMaxLength=r,s.TYPED_ARRAY_SUPPORT=i(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{var h=new Uint8Array(1),a={foo:function(){return 42}};return Object.setPrototypeOf(a,Uint8Array.prototype),Object.setPrototypeOf(h,a),h.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(h){if(h>r)throw new RangeError('The value "'+h+'" is invalid for option "size"');var a=new Uint8Array(h);return Object.setPrototypeOf(a,s.prototype),a}function s(h,a,l){if(typeof h=="number"){if(typeof a=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return g(h)}return c(h,a,l)}s.poolSize=8192;function c(h,a,l){if(typeof h=="string")return p(h,a);if(ArrayBuffer.isView(h))return w(h);if(h==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(h));if(me(h,ArrayBuffer)||h&&me(h.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(me(h,SharedArrayBuffer)||h&&me(h.buffer,SharedArrayBuffer)))return N(h,a,l);if(typeof h=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var _=h.valueOf&&h.valueOf();if(_!=null&&_!==h)return s.from(_,a,l);var T=M(h);if(T)return T;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof h[Symbol.toPrimitive]=="function")return s.from(h[Symbol.toPrimitive]("string"),a,l);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(h))}s.from=function(h,a,l){return c(h,a,l)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function u(h){if(typeof h!="number")throw new TypeError('"size" argument must be of type number');if(h<0)throw new RangeError('The value "'+h+'" is invalid for option "size"')}function d(h,a,l){return u(h),h<=0?o(h):a!==void 0?typeof l=="string"?o(h).fill(a,l):o(h).fill(a):o(h)}s.alloc=function(h,a,l){return d(h,a,l)};function g(h){return u(h),o(h<0?0:L(h)|0)}s.allocUnsafe=function(h){return g(h)},s.allocUnsafeSlow=function(h){return g(h)};function p(h,a){if((typeof a!="string"||a==="")&&(a="utf8"),!s.isEncoding(a))throw new TypeError("Unknown encoding: "+a);var l=K(h,a)|0,_=o(l),T=_.write(h,a);return T!==l&&(_=_.slice(0,T)),_}function E(h){for(var a=h.length<0?0:L(h.length)|0,l=o(a),_=0;_<a;_+=1)l[_]=h[_]&255;return l}function w(h){if(me(h,Uint8Array)){var a=new Uint8Array(h);return N(a.buffer,a.byteOffset,a.byteLength)}return E(h)}function N(h,a,l){if(a<0||h.byteLength<a)throw new RangeError('"offset" is outside of buffer bounds');if(h.byteLength<a+(l||0))throw new RangeError('"length" is outside of buffer bounds');var _;return a===void 0&&l===void 0?_=new Uint8Array(h):l===void 0?_=new Uint8Array(h,a):_=new Uint8Array(h,a,l),Object.setPrototypeOf(_,s.prototype),_}function M(h){if(s.isBuffer(h)){var a=L(h.length)|0,l=o(a);return l.length===0||h.copy(l,0,0,a),l}if(h.length!==void 0)return typeof h.length!="number"||ge(h.length)?o(0):E(h);if(h.type==="Buffer"&&Array.isArray(h.data))return E(h.data)}function L(h){if(h>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return h|0}function j(h){return+h!=h&&(h=0),s.alloc(+h)}s.isBuffer=function(a){return a!=null&&a._isBuffer===!0&&a!==s.prototype},s.compare=function(a,l){if(me(a,Uint8Array)&&(a=s.from(a,a.offset,a.byteLength)),me(l,Uint8Array)&&(l=s.from(l,l.offset,l.byteLength)),!s.isBuffer(a)||!s.isBuffer(l))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(a===l)return 0;for(var _=a.length,T=l.length,D=0,k=Math.min(_,T);D<k;++D)if(a[D]!==l[D]){_=a[D],T=l[D];break}return _<T?-1:T<_?1:0},s.isEncoding=function(a){switch(String(a).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(a,l){if(!Array.isArray(a))throw new TypeError('"list" argument must be an Array of Buffers');if(a.length===0)return s.alloc(0);var _;if(l===void 0)for(l=0,_=0;_<a.length;++_)l+=a[_].length;var T=s.allocUnsafe(l),D=0;for(_=0;_<a.length;++_){var k=a[_];if(me(k,Uint8Array))D+k.length>T.length?s.from(k).copy(T,D):Uint8Array.prototype.set.call(T,k,D);else if(s.isBuffer(k))k.copy(T,D);else throw new TypeError('"list" argument must be an Array of Buffers');D+=k.length}return T};function K(h,a){if(s.isBuffer(h))return h.length;if(ArrayBuffer.isView(h)||me(h,ArrayBuffer))return h.byteLength;if(typeof h!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(h));var l=h.length,_=arguments.length>2&&arguments[2]===!0;if(!_&&l===0)return 0;for(var T=!1;;)switch(a){case"ascii":case"latin1":case"binary":return l;case"utf8":case"utf-8":return Q(h).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l*2;case"hex":return l>>>1;case"base64":return fe(h).length;default:if(T)return _?-1:Q(h).length;a=(""+a).toLowerCase(),T=!0}}s.byteLength=K;function se(h,a,l){var _=!1;if((a===void 0||a<0)&&(a=0),a>this.length||((l===void 0||l>this.length)&&(l=this.length),l<=0)||(l>>>=0,a>>>=0,l<=a))return"";for(h||(h="utf8");;)switch(h){case"hex":return F(this,a,l);case"utf8":case"utf-8":return Ge(this,a,l);case"ascii":return A(this,a,l);case"latin1":case"binary":return x(this,a,l);case"base64":return Pe(this,a,l);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,a,l);default:if(_)throw new TypeError("Unknown encoding: "+h);h=(h+"").toLowerCase(),_=!0}}s.prototype._isBuffer=!0;function X(h,a,l){var _=h[a];h[a]=h[l],h[l]=_}s.prototype.swap16=function(){var a=this.length;if(a%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var l=0;l<a;l+=2)X(this,l,l+1);return this},s.prototype.swap32=function(){var a=this.length;if(a%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var l=0;l<a;l+=4)X(this,l,l+3),X(this,l+1,l+2);return this},s.prototype.swap64=function(){var a=this.length;if(a%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var l=0;l<a;l+=8)X(this,l,l+7),X(this,l+1,l+6),X(this,l+2,l+5),X(this,l+3,l+4);return this},s.prototype.toString=function(){var a=this.length;return a===0?"":arguments.length===0?Ge(this,0,a):se.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(a){if(!s.isBuffer(a))throw new TypeError("Argument must be a Buffer");return this===a?!0:s.compare(this,a)===0},s.prototype.inspect=function(){var a="",l=e.INSPECT_MAX_BYTES;return a=this.toString("hex",0,l).replace(/(.{2})/g,"$1 ").trim(),this.length>l&&(a+=" ... "),"<Buffer "+a+">"},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(a,l,_,T,D){if(me(a,Uint8Array)&&(a=s.from(a,a.offset,a.byteLength)),!s.isBuffer(a))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(a));if(l===void 0&&(l=0),_===void 0&&(_=a?a.length:0),T===void 0&&(T=0),D===void 0&&(D=this.length),l<0||_>a.length||T<0||D>this.length)throw new RangeError("out of range index");if(T>=D&&l>=_)return 0;if(T>=D)return-1;if(l>=_)return 1;if(l>>>=0,_>>>=0,T>>>=0,D>>>=0,this===a)return 0;for(var k=D-T,ve=_-l,Ie=Math.min(k,ve),be=this.slice(T,D),Ve=a.slice(l,_),Be=0;Be<Ie;++Be)if(be[Be]!==Ve[Be]){k=be[Be],ve=Ve[Be];break}return k<ve?-1:ve<k?1:0};function Ee(h,a,l,_,T){if(h.length===0)return-1;if(typeof l=="string"?(_=l,l=0):l>2147483647?l=2147483647:l<-2147483648&&(l=-2147483648),l=+l,ge(l)&&(l=T?0:h.length-1),l<0&&(l=h.length+l),l>=h.length){if(T)return-1;l=h.length-1}else if(l<0)if(T)l=0;else return-1;if(typeof a=="string"&&(a=s.from(a,_)),s.isBuffer(a))return a.length===0?-1:U(h,a,l,_,T);if(typeof a=="number")return a=a&255,typeof Uint8Array.prototype.indexOf=="function"?T?Uint8Array.prototype.indexOf.call(h,a,l):Uint8Array.prototype.lastIndexOf.call(h,a,l):U(h,[a],l,_,T);throw new TypeError("val must be string, number or Buffer")}function U(h,a,l,_,T){var D=1,k=h.length,ve=a.length;if(_!==void 0&&(_=String(_).toLowerCase(),_==="ucs2"||_==="ucs-2"||_==="utf16le"||_==="utf-16le")){if(h.length<2||a.length<2)return-1;D=2,k/=2,ve/=2,l/=2}function Ie(Ft,$t){return D===1?Ft[$t]:Ft.readUInt16BE($t*D)}var be;if(T){var Ve=-1;for(be=l;be<k;be++)if(Ie(h,be)===Ie(a,Ve===-1?0:be-Ve)){if(Ve===-1&&(Ve=be),be-Ve+1===ve)return Ve*D}else Ve!==-1&&(be-=be-Ve),Ve=-1}else for(l+ve>k&&(l=k-ve),be=l;be>=0;be--){for(var Be=!0,qe=0;qe<ve;qe++)if(Ie(h,be+qe)!==Ie(a,qe)){Be=!1;break}if(Be)return be}return-1}s.prototype.includes=function(a,l,_){return this.indexOf(a,l,_)!==-1},s.prototype.indexOf=function(a,l,_){return Ee(this,a,l,_,!0)},s.prototype.lastIndexOf=function(a,l,_){return Ee(this,a,l,_,!1)};function he(h,a,l,_){l=Number(l)||0;var T=h.length-l;_?(_=Number(_),_>T&&(_=T)):_=T;var D=a.length;_>D/2&&(_=D/2);for(var k=0;k<_;++k){var ve=parseInt(a.substr(k*2,2),16);if(ge(ve))return k;h[l+k]=ve}return k}function te(h,a,l,_){return ce(Q(a,h.length-l),h,l,_)}function ye(h,a,l,_){return ce(ae(a),h,l,_)}function ke(h,a,l,_){return ce(fe(a),h,l,_)}function De(h,a,l,_){return ce(ee(a,h.length-l),h,l,_)}s.prototype.write=function(a,l,_,T){if(l===void 0)T="utf8",_=this.length,l=0;else if(_===void 0&&typeof l=="string")T=l,_=this.length,l=0;else if(isFinite(l))l=l>>>0,isFinite(_)?(_=_>>>0,T===void 0&&(T="utf8")):(T=_,_=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var D=this.length-l;if((_===void 0||_>D)&&(_=D),a.length>0&&(_<0||l<0)||l>this.length)throw new RangeError("Attempt to write outside buffer bounds");T||(T="utf8");for(var k=!1;;)switch(T){case"hex":return he(this,a,l,_);case"utf8":case"utf-8":return te(this,a,l,_);case"ascii":case"latin1":case"binary":return ye(this,a,l,_);case"base64":return ke(this,a,l,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return De(this,a,l,_);default:if(k)throw new TypeError("Unknown encoding: "+T);T=(""+T).toLowerCase(),k=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Pe(h,a,l){return a===0&&l===h.length?Rc.fromByteArray(h):Rc.fromByteArray(h.slice(a,l))}function Ge(h,a,l){l=Math.min(h.length,l);for(var _=[],T=a;T<l;){var D=h[T],k=null,ve=D>239?4:D>223?3:D>191?2:1;if(T+ve<=l){var Ie,be,Ve,Be;switch(ve){case 1:D<128&&(k=D);break;case 2:Ie=h[T+1],(Ie&192)===128&&(Be=(D&31)<<6|Ie&63,Be>127&&(k=Be));break;case 3:Ie=h[T+1],be=h[T+2],(Ie&192)===128&&(be&192)===128&&(Be=(D&15)<<12|(Ie&63)<<6|be&63,Be>2047&&(Be<55296||Be>57343)&&(k=Be));break;case 4:Ie=h[T+1],be=h[T+2],Ve=h[T+3],(Ie&192)===128&&(be&192)===128&&(Ve&192)===128&&(Be=(D&15)<<18|(Ie&63)<<12|(be&63)<<6|Ve&63,Be>65535&&Be<1114112&&(k=Be))}}k===null?(k=65533,ve=1):k>65535&&(k-=65536,_.push(k>>>10&1023|55296),k=56320|k&1023),_.push(k),T+=ve}return ht(_)}var Ye=4096;function ht(h){var a=h.length;if(a<=Ye)return String.fromCharCode.apply(String,h);for(var l="",_=0;_<a;)l+=String.fromCharCode.apply(String,h.slice(_,_+=Ye));return l}function A(h,a,l){var _="";l=Math.min(h.length,l);for(var T=a;T<l;++T)_+=String.fromCharCode(h[T]&127);return _}function x(h,a,l){var _="";l=Math.min(h.length,l);for(var T=a;T<l;++T)_+=String.fromCharCode(h[T]);return _}function F(h,a,l){var _=h.length;(!a||a<0)&&(a=0),(!l||l<0||l>_)&&(l=_);for(var T="",D=a;D<l;++D)T+=_e[h[D]];return T}function P(h,a,l){for(var _=h.slice(a,l),T="",D=0;D<_.length-1;D+=2)T+=String.fromCharCode(_[D]+_[D+1]*256);return T}s.prototype.slice=function(a,l){var _=this.length;a=~~a,l=l===void 0?_:~~l,a<0?(a+=_,a<0&&(a=0)):a>_&&(a=_),l<0?(l+=_,l<0&&(l=0)):l>_&&(l=_),l<a&&(l=a);var T=this.subarray(a,l);return Object.setPrototypeOf(T,s.prototype),T};function v(h,a,l){if(h%1!==0||h<0)throw new RangeError("offset is not uint");if(h+a>l)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(a,l,_){a=a>>>0,l=l>>>0,_||v(a,l,this.length);for(var T=this[a],D=1,k=0;++k<l&&(D*=256);)T+=this[a+k]*D;return T},s.prototype.readUintBE=s.prototype.readUIntBE=function(a,l,_){a=a>>>0,l=l>>>0,_||v(a,l,this.length);for(var T=this[a+--l],D=1;l>0&&(D*=256);)T+=this[a+--l]*D;return T},s.prototype.readUint8=s.prototype.readUInt8=function(a,l){return a=a>>>0,l||v(a,1,this.length),this[a]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(a,l){return a=a>>>0,l||v(a,2,this.length),this[a]|this[a+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(a,l){return a=a>>>0,l||v(a,2,this.length),this[a]<<8|this[a+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(a,l){return a=a>>>0,l||v(a,4,this.length),(this[a]|this[a+1]<<8|this[a+2]<<16)+this[a+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(a,l){return a=a>>>0,l||v(a,4,this.length),this[a]*16777216+(this[a+1]<<16|this[a+2]<<8|this[a+3])},s.prototype.readIntLE=function(a,l,_){a=a>>>0,l=l>>>0,_||v(a,l,this.length);for(var T=this[a],D=1,k=0;++k<l&&(D*=256);)T+=this[a+k]*D;return D*=128,T>=D&&(T-=Math.pow(2,8*l)),T},s.prototype.readIntBE=function(a,l,_){a=a>>>0,l=l>>>0,_||v(a,l,this.length);for(var T=l,D=1,k=this[a+--T];T>0&&(D*=256);)k+=this[a+--T]*D;return D*=128,k>=D&&(k-=Math.pow(2,8*l)),k},s.prototype.readInt8=function(a,l){return a=a>>>0,l||v(a,1,this.length),this[a]&128?(255-this[a]+1)*-1:this[a]},s.prototype.readInt16LE=function(a,l){a=a>>>0,l||v(a,2,this.length);var _=this[a]|this[a+1]<<8;return _&32768?_|4294901760:_},s.prototype.readInt16BE=function(a,l){a=a>>>0,l||v(a,2,this.length);var _=this[a+1]|this[a]<<8;return _&32768?_|4294901760:_},s.prototype.readInt32LE=function(a,l){return a=a>>>0,l||v(a,4,this.length),this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24},s.prototype.readInt32BE=function(a,l){return a=a>>>0,l||v(a,4,this.length),this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]},s.prototype.readFloatLE=function(a,l){return a=a>>>0,l||v(a,4,this.length),Br.read(this,a,!0,23,4)},s.prototype.readFloatBE=function(a,l){return a=a>>>0,l||v(a,4,this.length),Br.read(this,a,!1,23,4)},s.prototype.readDoubleLE=function(a,l){return a=a>>>0,l||v(a,8,this.length),Br.read(this,a,!0,52,8)},s.prototype.readDoubleBE=function(a,l){return a=a>>>0,l||v(a,8,this.length),Br.read(this,a,!1,52,8)};function y(h,a,l,_,T,D){if(!s.isBuffer(h))throw new TypeError('"buffer" argument must be a Buffer instance');if(a>T||a<D)throw new RangeError('"value" argument is out of bounds');if(l+_>h.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(a,l,_,T){if(a=+a,l=l>>>0,_=_>>>0,!T){var D=Math.pow(2,8*_)-1;y(this,a,l,_,D,0)}var k=1,ve=0;for(this[l]=a&255;++ve<_&&(k*=256);)this[l+ve]=a/k&255;return l+_},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(a,l,_,T){if(a=+a,l=l>>>0,_=_>>>0,!T){var D=Math.pow(2,8*_)-1;y(this,a,l,_,D,0)}var k=_-1,ve=1;for(this[l+k]=a&255;--k>=0&&(ve*=256);)this[l+k]=a/ve&255;return l+_},s.prototype.writeUint8=s.prototype.writeUInt8=function(a,l,_){return a=+a,l=l>>>0,_||y(this,a,l,1,255,0),this[l]=a&255,l+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(a,l,_){return a=+a,l=l>>>0,_||y(this,a,l,2,65535,0),this[l]=a&255,this[l+1]=a>>>8,l+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(a,l,_){return a=+a,l=l>>>0,_||y(this,a,l,2,65535,0),this[l]=a>>>8,this[l+1]=a&255,l+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(a,l,_){return a=+a,l=l>>>0,_||y(this,a,l,4,4294967295,0),this[l+3]=a>>>24,this[l+2]=a>>>16,this[l+1]=a>>>8,this[l]=a&255,l+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(a,l,_){return a=+a,l=l>>>0,_||y(this,a,l,4,4294967295,0),this[l]=a>>>24,this[l+1]=a>>>16,this[l+2]=a>>>8,this[l+3]=a&255,l+4},s.prototype.writeIntLE=function(a,l,_,T){if(a=+a,l=l>>>0,!T){var D=Math.pow(2,8*_-1);y(this,a,l,_,D-1,-D)}var k=0,ve=1,Ie=0;for(this[l]=a&255;++k<_&&(ve*=256);)a<0&&Ie===0&&this[l+k-1]!==0&&(Ie=1),this[l+k]=(a/ve>>0)-Ie&255;return l+_},s.prototype.writeIntBE=function(a,l,_,T){if(a=+a,l=l>>>0,!T){var D=Math.pow(2,8*_-1);y(this,a,l,_,D-1,-D)}var k=_-1,ve=1,Ie=0;for(this[l+k]=a&255;--k>=0&&(ve*=256);)a<0&&Ie===0&&this[l+k+1]!==0&&(Ie=1),this[l+k]=(a/ve>>0)-Ie&255;return l+_},s.prototype.writeInt8=function(a,l,_){return a=+a,l=l>>>0,_||y(this,a,l,1,127,-128),a<0&&(a=255+a+1),this[l]=a&255,l+1},s.prototype.writeInt16LE=function(a,l,_){return a=+a,l=l>>>0,_||y(this,a,l,2,32767,-32768),this[l]=a&255,this[l+1]=a>>>8,l+2},s.prototype.writeInt16BE=function(a,l,_){return a=+a,l=l>>>0,_||y(this,a,l,2,32767,-32768),this[l]=a>>>8,this[l+1]=a&255,l+2},s.prototype.writeInt32LE=function(a,l,_){return a=+a,l=l>>>0,_||y(this,a,l,4,2147483647,-2147483648),this[l]=a&255,this[l+1]=a>>>8,this[l+2]=a>>>16,this[l+3]=a>>>24,l+4},s.prototype.writeInt32BE=function(a,l,_){return a=+a,l=l>>>0,_||y(this,a,l,4,2147483647,-2147483648),a<0&&(a=4294967295+a+1),this[l]=a>>>24,this[l+1]=a>>>16,this[l+2]=a>>>8,this[l+3]=a&255,l+4};function H(h,a,l,_,T,D){if(l+_>h.length)throw new RangeError("Index out of range");if(l<0)throw new RangeError("Index out of range")}function J(h,a,l,_,T){return a=+a,l=l>>>0,T||H(h,a,l,4),Br.write(h,a,l,_,23,4),l+4}s.prototype.writeFloatLE=function(a,l,_){return J(this,a,l,!0,_)},s.prototype.writeFloatBE=function(a,l,_){return J(this,a,l,!1,_)};function re(h,a,l,_,T){return a=+a,l=l>>>0,T||H(h,a,l,8),Br.write(h,a,l,_,52,8),l+8}s.prototype.writeDoubleLE=function(a,l,_){return re(this,a,l,!0,_)},s.prototype.writeDoubleBE=function(a,l,_){return re(this,a,l,!1,_)},s.prototype.copy=function(a,l,_,T){if(!s.isBuffer(a))throw new TypeError("argument should be a Buffer");if(_||(_=0),!T&&T!==0&&(T=this.length),l>=a.length&&(l=a.length),l||(l=0),T>0&&T<_&&(T=_),T===_||a.length===0||this.length===0)return 0;if(l<0)throw new RangeError("targetStart out of bounds");if(_<0||_>=this.length)throw new RangeError("Index out of range");if(T<0)throw new RangeError("sourceEnd out of bounds");T>this.length&&(T=this.length),a.length-l<T-_&&(T=a.length-l+_);var D=T-_;return this===a&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(l,_,T):Uint8Array.prototype.set.call(a,this.subarray(_,T),l),D},s.prototype.fill=function(a,l,_,T){if(typeof a=="string"){if(typeof l=="string"?(T=l,l=0,_=this.length):typeof _=="string"&&(T=_,_=this.length),T!==void 0&&typeof T!="string")throw new TypeError("encoding must be a string");if(typeof T=="string"&&!s.isEncoding(T))throw new TypeError("Unknown encoding: "+T);if(a.length===1){var D=a.charCodeAt(0);(T==="utf8"&&D<128||T==="latin1")&&(a=D)}}else typeof a=="number"?a=a&255:typeof a=="boolean"&&(a=Number(a));if(l<0||this.length<l||this.length<_)throw new RangeError("Out of range index");if(_<=l)return this;l=l>>>0,_=_===void 0?this.length:_>>>0,a||(a=0);var k;if(typeof a=="number")for(k=l;k<_;++k)this[k]=a;else{var ve=s.isBuffer(a)?a:s.from(a,T),Ie=ve.length;if(Ie===0)throw new TypeError('The value "'+a+'" is invalid for argument "value"');for(k=0;k<_-l;++k)this[k+l]=ve[k%Ie]}return this};var oe=/[^+/0-9A-Za-z-_]/g;function ue(h){if(h=h.split("=")[0],h=h.trim().replace(oe,""),h.length<2)return"";for(;h.length%4!==0;)h=h+"=";return h}function Q(h,a){a=a||1/0;for(var l,_=h.length,T=null,D=[],k=0;k<_;++k){if(l=h.charCodeAt(k),l>55295&&l<57344){if(!T){if(l>56319){(a-=3)>-1&&D.push(239,191,189);continue}else if(k+1===_){(a-=3)>-1&&D.push(239,191,189);continue}T=l;continue}if(l<56320){(a-=3)>-1&&D.push(239,191,189),T=l;continue}l=(T-55296<<10|l-56320)+65536}else T&&(a-=3)>-1&&D.push(239,191,189);if(T=null,l<128){if((a-=1)<0)break;D.push(l)}else if(l<2048){if((a-=2)<0)break;D.push(l>>6|192,l&63|128)}else if(l<65536){if((a-=3)<0)break;D.push(l>>12|224,l>>6&63|128,l&63|128)}else if(l<1114112){if((a-=4)<0)break;D.push(l>>18|240,l>>12&63|128,l>>6&63|128,l&63|128)}else throw new Error("Invalid code point")}return D}function ae(h){for(var a=[],l=0;l<h.length;++l)a.push(h.charCodeAt(l)&255);return a}function ee(h,a){for(var l,_,T,D=[],k=0;k<h.length&&!((a-=2)<0);++k)l=h.charCodeAt(k),_=l>>8,T=l%256,D.push(T),D.push(_);return D}function fe(h){return Rc.toByteArray(ue(h))}function ce(h,a,l,_){for(var T=0;T<_&&!(T+l>=a.length||T>=h.length);++T)a[T+l]=h[T];return T}function me(h,a){return h instanceof a||h!=null&&h.constructor!=null&&h.constructor.name!=null&&h.constructor.name===a.name}function ge(h){return h!==h}var _e=function(){for(var h="0123456789abcdef",a=new Array(256),l=0;l<16;++l)for(var _=l*16,T=0;T<16;++T)a[_+T]=h[l]+h[T];return a}()}),Fe=Qo.Buffer;Qo.SlowBuffer;Qo.INSPECT_MAX_BYTES;Qo.kMaxLength;var kc=function(e,n){return kc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},kc(e,n)};function es(t,e){kc(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var cr=function(t){es(e,t);function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return Object.defineProperty(e.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),e}(Error),Qe=function(t){es(e,t);function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return Object.defineProperty(e.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),e}(TypeError);function Zo(t){return t&&t.Math==Math&&t}function sp(){return Zo(typeof globalThis=="object"&&globalThis)||Zo(typeof window=="object"&&window)||Zo(typeof self=="object"&&self)||Zo(typeof global=="object"&&global)||Function("return this")()}function Qv(){var t=sp();return typeof t.navigator=="object"&&t.navigator.product==="ReactNative"}var ey=function(e){var n=Qv()?"BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.":"BSON: No cryptographic implementation for random bytes present, falling back to a less secure implementation.";console.warn(n);for(var r=Fe.alloc(e),i=0;i<e;++i)r[i]=Math.floor(Math.random()*256);return r},ty=function(){{if(typeof window<"u"){var t=window.crypto||window.msCrypto;if(t&&t.getRandomValues)return function(e){return t.getRandomValues(Fe.alloc(e))}}return typeof global<"u"&&global.crypto&&global.crypto.getRandomValues?function(e){return global.crypto.getRandomValues(Fe.alloc(e))}:ey}},ap=ty();function ny(t){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(t))}function Bc(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}function ry(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function iy(t){return Ni(t)&&Object.prototype.toString.call(t)==="[object Date]"}function Ni(t){return typeof t=="object"&&t!==null}function ts(t,e){var n=!1;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return n||(console.warn(e),n=!0),t.apply(this,i)}return r}function Jo(t){if(ArrayBuffer.isView(t))return Fe.from(t.buffer,t.byteOffset,t.byteLength);if(ny(t))return Fe.from(t);throw new Qe("Must use either Buffer or TypedArray")}var oy=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15})$/i,cp=function(t){return typeof t=="string"&&oy.test(t)},Vc=function(t){if(!cp(t))throw new Qe('UUID string representations must be a 32 or 36 character hex string (dashes excluded/included). Format: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" or "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".');var e=t.replace(/-/g,"");return Fe.from(e,"hex")},Gf=function(t,e){return e===void 0&&(e=!0),e?t.toString("hex",0,4)+"-"+t.toString("hex",4,6)+"-"+t.toString("hex",6,8)+"-"+t.toString("hex",8,10)+"-"+t.toString("hex",10,16):t.toString("hex")};var CD=Math.pow(2,63)-1,SD=-Math.pow(2,63),sy=Math.pow(2,53),ay=-Math.pow(2,53);var lp=4;var lr=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);if(e!=null&&typeof e!="string"&&!ArrayBuffer.isView(e)&&!(e instanceof ArrayBuffer)&&!Array.isArray(e))throw new Qe("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=n??t.BSON_BINARY_SUBTYPE_DEFAULT,e==null?(this.buffer=Fe.alloc(t.BUFFER_SIZE),this.position=0):(typeof e=="string"?this.buffer=Fe.from(e,"binary"):Array.isArray(e)?this.buffer=Fe.from(e):this.buffer=Jo(e),this.position=this.buffer.byteLength)}return t.prototype.put=function(e){if(typeof e=="string"&&e.length!==1)throw new Qe("only accepts single character String");if(typeof e!="number"&&e.length!==1)throw new Qe("only accepts single character Uint8Array or Array");var n;if(typeof e=="string"?n=e.charCodeAt(0):typeof e=="number"?n=e:n=e[0],n<0||n>255)throw new Qe("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=n;else{var r=Fe.alloc(t.BUFFER_SIZE+this.buffer.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r,this.buffer[this.position++]=n}},t.prototype.write=function(e,n){if(n=typeof n=="number"?n:this.position,this.buffer.length<n+e.length){var r=Fe.alloc(this.buffer.length+e.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r}ArrayBuffer.isView(e)?(this.buffer.set(Jo(e),n),this.position=n+e.byteLength>this.position?n+e.length:this.position):typeof e=="string"&&(this.buffer.write(e,n,e.length,"binary"),this.position=n+e.length>this.position?n+e.length:this.position)},t.prototype.read=function(e,n){return n=n&&n>0?n:this.position,this.buffer.slice(e,e+n)},t.prototype.value=function(e){return e=!!e,e&&this.buffer.length===this.position?this.buffer:e?this.buffer.slice(0,this.position):this.buffer.toString("binary",0,this.position)},t.prototype.length=function(){return this.position},t.prototype.toJSON=function(){return this.buffer.toString("base64")},t.prototype.toString=function(e){return this.buffer.toString(e)},t.prototype.toExtendedJSON=function(e){e=e||{};var n=this.buffer.toString("base64"),r=Number(this.sub_type).toString(16);return e.legacy?{$binary:n,$type:r.length===1?"0"+r:r}:{$binary:{base64:n,subType:r.length===1?"0"+r:r}}},t.prototype.toUUID=function(){if(this.sub_type===t.SUBTYPE_UUID)return new Wf(this.buffer.slice(0,this.position));throw new cr('Binary sub_type "'.concat(this.sub_type,'" is not supported for converting to UUID. Only "').concat(t.SUBTYPE_UUID,'" is currently supported.'))},t.fromExtendedJSON=function(e,n){n=n||{};var r,i;if("$binary"in e?n.legacy&&typeof e.$binary=="string"&&"$type"in e?(i=e.$type?parseInt(e.$type,16):0,r=Fe.from(e.$binary,"base64")):typeof e.$binary!="string"&&(i=e.$binary.subType?parseInt(e.$binary.subType,16):0,r=Fe.from(e.$binary.base64,"base64")):"$uuid"in e&&(i=4,r=Vc(e.$uuid)),!r)throw new Qe("Unexpected Binary Extended JSON format ".concat(JSON.stringify(e)));return i===lp?new Wf(r):new t(r,i)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.value(!0);return'new Binary(Buffer.from("'.concat(e.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},t.BSON_BINARY_SUBTYPE_DEFAULT=0,t.BUFFER_SIZE=256,t.SUBTYPE_DEFAULT=0,t.SUBTYPE_FUNCTION=1,t.SUBTYPE_BYTE_ARRAY=2,t.SUBTYPE_UUID_OLD=3,t.SUBTYPE_UUID=4,t.SUBTYPE_MD5=5,t.SUBTYPE_ENCRYPTED=6,t.SUBTYPE_COLUMN=7,t.SUBTYPE_USER_DEFINED=128,t}();Object.defineProperty(lr.prototype,"_bsontype",{value:"Binary"});var Mc=16,Wf=function(t){es(e,t);function e(n){var r=this,i,o;if(n==null)i=e.generate();else if(n instanceof e)i=Fe.from(n.buffer),o=n.__id;else if(ArrayBuffer.isView(n)&&n.byteLength===Mc)i=Jo(n);else if(typeof n=="string")i=Vc(n);else throw new Qe("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");return r=t.call(this,i,lp)||this,r.__id=o,r}return Object.defineProperty(e.prototype,"id",{get:function(){return this.buffer},set:function(n){this.buffer=n,e.cacheHexString&&(this.__id=Gf(n))},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(n){if(n===void 0&&(n=!0),e.cacheHexString&&this.__id)return this.__id;var r=Gf(this.id,n);return e.cacheHexString&&(this.__id=r),r},e.prototype.toString=function(n){return n?this.id.toString(n):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(n){if(!n)return!1;if(n instanceof e)return n.id.equals(this.id);try{return new e(n).id.equals(this.id)}catch{return!1}},e.prototype.toBinary=function(){return new lr(this.id,lr.SUBTYPE_UUID)},e.generate=function(){var n=ap(Mc);return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Fe.from(n)},e.isValid=function(n){return n?n instanceof e?!0:typeof n=="string"?cp(n):Bc(n)?n.length!==Mc?!1:(n[6]&240)===64&&(n[8]&128)===128:!1:!1},e.createFromHexString=function(n){var r=Vc(n);return new e(r)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},e}(lr),ns=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);this.code=e,this.scope=n}return t.prototype.toJSON=function(){return{code:this.code,scope:this.scope}},t.prototype.toExtendedJSON=function(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}},t.fromExtendedJSON=function(e){return new t(e.$code,e.$scope)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.toJSON();return'new Code("'.concat(String(e.code),'"').concat(e.scope?", ".concat(JSON.stringify(e.scope)):"",")")},t}();Object.defineProperty(ns.prototype,"_bsontype",{value:"Code"});function cy(t){return Ni(t)&&t.$id!=null&&typeof t.$ref=="string"&&(t.$db==null||typeof t.$db=="string")}var Ai=function(){function t(e,n,r,i){if(!(this instanceof t))return new t(e,n,r,i);var o=e.split(".");o.length===2&&(r=o.shift(),e=o.shift()),this.collection=e,this.oid=n,this.db=r,this.fields=i||{}}return Object.defineProperty(t.prototype,"namespace",{get:function(){return this.collection},set:function(e){this.collection=e},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){var e=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return this.db!=null&&(e.$db=this.db),e},t.prototype.toExtendedJSON=function(e){e=e||{};var n={$ref:this.collection,$id:this.oid};return e.legacy||(this.db&&(n.$db=this.db),n=Object.assign(n,this.fields)),n},t.fromExtendedJSON=function(e){var n=Object.assign({},e);return delete n.$ref,delete n.$id,delete n.$db,new t(e.$ref,e.$id,e.$db,n)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.oid===void 0||this.oid.toString===void 0?this.oid:this.oid.toString();return'new DBRef("'.concat(this.namespace,'", new ObjectId("').concat(String(e),'")').concat(this.db?', "'.concat(this.db,'"'):"",")")},t}();Object.defineProperty(Ai.prototype,"_bsontype",{value:"DBRef"});var Jt=void 0;try{Jt=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}var Yf=65536,ly=1<<24,Hr=Yf*Yf,up=Hr*Hr,zf=up/2,Kf={},Xf={},le=function(){function t(e,n,r){if(e===void 0&&(e=0),!(this instanceof t))return new t(e,n,r);typeof e=="bigint"?Object.assign(this,t.fromBigInt(e,!!n)):typeof e=="string"?Object.assign(this,t.fromString(e,!!n)):(this.low=e|0,this.high=n|0,this.unsigned=!!r),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return t.fromBits=function(e,n,r){return new t(e,n,r)},t.fromInt=function(e,n){var r,i,o;return n?(e>>>=0,(o=0<=e&&e<256)&&(i=Xf[e],i)?i:(r=t.fromBits(e,(e|0)<0?-1:0,!0),o&&(Xf[e]=r),r)):(e|=0,(o=-128<=e&&e<128)&&(i=Kf[e],i)?i:(r=t.fromBits(e,e<0?-1:0,!1),o&&(Kf[e]=r),r))},t.fromNumber=function(e,n){if(isNaN(e))return n?t.UZERO:t.ZERO;if(n){if(e<0)return t.UZERO;if(e>=up)return t.MAX_UNSIGNED_VALUE}else{if(e<=-zf)return t.MIN_VALUE;if(e+1>=zf)return t.MAX_VALUE}return e<0?t.fromNumber(-e,n).neg():t.fromBits(e%Hr|0,e/Hr|0,n)},t.fromBigInt=function(e,n){return t.fromString(e.toString(),n)},t.fromString=function(e,n,r){if(e.length===0)throw Error("empty string");if(e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return t.ZERO;if(typeof n=="number"?(r=n,n=!1):n=!!n,r=r||10,r<2||36<r)throw RangeError("radix");var i;if((i=e.indexOf("-"))>0)throw Error("interior hyphen");if(i===0)return t.fromString(e.substring(1),n,r).neg();for(var o=t.fromNumber(Math.pow(r,8)),s=t.ZERO,c=0;c<e.length;c+=8){var u=Math.min(8,e.length-c),d=parseInt(e.substring(c,c+u),r);if(u<8){var g=t.fromNumber(Math.pow(r,u));s=s.mul(g).add(t.fromNumber(d))}else s=s.mul(o),s=s.add(t.fromNumber(d))}return s.unsigned=n,s},t.fromBytes=function(e,n,r){return r?t.fromBytesLE(e,n):t.fromBytesBE(e,n)},t.fromBytesLE=function(e,n){return new t(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,n)},t.fromBytesBE=function(e,n){return new t(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],n)},t.isLong=function(e){return Ni(e)&&e.__isLong__===!0},t.fromValue=function(e,n){return typeof e=="number"?t.fromNumber(e,n):typeof e=="string"?t.fromString(e,n):t.fromBits(e.low,e.high,typeof n=="boolean"?n:e.unsigned)},t.prototype.add=function(e){t.isLong(e)||(e=t.fromValue(e));var n=this.high>>>16,r=this.high&65535,i=this.low>>>16,o=this.low&65535,s=e.high>>>16,c=e.high&65535,u=e.low>>>16,d=e.low&65535,g=0,p=0,E=0,w=0;return w+=o+d,E+=w>>>16,w&=65535,E+=i+u,p+=E>>>16,E&=65535,p+=r+c,g+=p>>>16,p&=65535,g+=n+s,g&=65535,t.fromBits(E<<16|w,g<<16|p,this.unsigned)},t.prototype.and=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low&e.low,this.high&e.high,this.unsigned)},t.prototype.compare=function(e){if(t.isLong(e)||(e=t.fromValue(e)),this.eq(e))return 0;var n=this.isNegative(),r=e.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},t.prototype.comp=function(e){return this.compare(e)},t.prototype.divide=function(e){if(t.isLong(e)||(e=t.fromValue(e)),e.isZero())throw Error("division by zero");if(Jt){if(!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1)return this;var n=(this.unsigned?Jt.div_u:Jt.div_s)(this.low,this.high,e.low,e.high);return t.fromBits(n,Jt.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?t.UZERO:t.ZERO;var r,i,o;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return t.UZERO;if(e.gt(this.shru(1)))return t.UONE;o=t.UZERO}else{if(this.eq(t.MIN_VALUE)){if(e.eq(t.ONE)||e.eq(t.NEG_ONE))return t.MIN_VALUE;if(e.eq(t.MIN_VALUE))return t.ONE;var s=this.shr(1);return r=s.div(e).shl(1),r.eq(t.ZERO)?e.isNegative()?t.ONE:t.NEG_ONE:(i=this.sub(e.mul(r)),o=r.add(i.div(e)),o)}else if(e.eq(t.MIN_VALUE))return this.unsigned?t.UZERO:t.ZERO;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();o=t.ZERO}for(i=this;i.gte(e);){r=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));for(var c=Math.ceil(Math.log(r)/Math.LN2),u=c<=48?1:Math.pow(2,c-48),d=t.fromNumber(r),g=d.mul(e);g.isNegative()||g.gt(i);)r-=u,d=t.fromNumber(r,this.unsigned),g=d.mul(e);d.isZero()&&(d=t.ONE),o=o.add(d),i=i.sub(g)}return o},t.prototype.div=function(e){return this.divide(e)},t.prototype.equals=function(e){return t.isLong(e)||(e=t.fromValue(e)),this.unsigned!==e.unsigned&&this.high>>>31===1&&e.high>>>31===1?!1:this.high===e.high&&this.low===e.low},t.prototype.eq=function(e){return this.equals(e)},t.prototype.getHighBits=function(){return this.high},t.prototype.getHighBitsUnsigned=function(){return this.high>>>0},t.prototype.getLowBits=function(){return this.low},t.prototype.getLowBitsUnsigned=function(){return this.low>>>0},t.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(t.MIN_VALUE)?64:this.neg().getNumBitsAbs();var e=this.high!==0?this.high:this.low,n;for(n=31;n>0&&(e&1<<n)===0;n--);return this.high!==0?n+33:n+1},t.prototype.greaterThan=function(e){return this.comp(e)>0},t.prototype.gt=function(e){return this.greaterThan(e)},t.prototype.greaterThanOrEqual=function(e){return this.comp(e)>=0},t.prototype.gte=function(e){return this.greaterThanOrEqual(e)},t.prototype.ge=function(e){return this.greaterThanOrEqual(e)},t.prototype.isEven=function(){return(this.low&1)===0},t.prototype.isNegative=function(){return!this.unsigned&&this.high<0},t.prototype.isOdd=function(){return(this.low&1)===1},t.prototype.isPositive=function(){return this.unsigned||this.high>=0},t.prototype.isZero=function(){return this.high===0&&this.low===0},t.prototype.lessThan=function(e){return this.comp(e)<0},t.prototype.lt=function(e){return this.lessThan(e)},t.prototype.lessThanOrEqual=function(e){return this.comp(e)<=0},t.prototype.lte=function(e){return this.lessThanOrEqual(e)},t.prototype.modulo=function(e){if(t.isLong(e)||(e=t.fromValue(e)),Jt){var n=(this.unsigned?Jt.rem_u:Jt.rem_s)(this.low,this.high,e.low,e.high);return t.fromBits(n,Jt.get_high(),this.unsigned)}return this.sub(this.div(e).mul(e))},t.prototype.mod=function(e){return this.modulo(e)},t.prototype.rem=function(e){return this.modulo(e)},t.prototype.multiply=function(e){if(this.isZero())return t.ZERO;if(t.isLong(e)||(e=t.fromValue(e)),Jt){var n=Jt.mul(this.low,this.high,e.low,e.high);return t.fromBits(n,Jt.get_high(),this.unsigned)}if(e.isZero())return t.ZERO;if(this.eq(t.MIN_VALUE))return e.isOdd()?t.MIN_VALUE:t.ZERO;if(e.eq(t.MIN_VALUE))return this.isOdd()?t.MIN_VALUE:t.ZERO;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(t.TWO_PWR_24)&&e.lt(t.TWO_PWR_24))return t.fromNumber(this.toNumber()*e.toNumber(),this.unsigned);var r=this.high>>>16,i=this.high&65535,o=this.low>>>16,s=this.low&65535,c=e.high>>>16,u=e.high&65535,d=e.low>>>16,g=e.low&65535,p=0,E=0,w=0,N=0;return N+=s*g,w+=N>>>16,N&=65535,w+=o*g,E+=w>>>16,w&=65535,w+=s*d,E+=w>>>16,w&=65535,E+=i*g,p+=E>>>16,E&=65535,E+=o*d,p+=E>>>16,E&=65535,E+=s*u,p+=E>>>16,E&=65535,p+=r*g+i*d+o*u+s*c,p&=65535,t.fromBits(w<<16|N,p<<16|E,this.unsigned)},t.prototype.mul=function(e){return this.multiply(e)},t.prototype.negate=function(){return!this.unsigned&&this.eq(t.MIN_VALUE)?t.MIN_VALUE:this.not().add(t.ONE)},t.prototype.neg=function(){return this.negate()},t.prototype.not=function(){return t.fromBits(~this.low,~this.high,this.unsigned)},t.prototype.notEquals=function(e){return!this.equals(e)},t.prototype.neq=function(e){return this.notEquals(e)},t.prototype.ne=function(e){return this.notEquals(e)},t.prototype.or=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low|e.low,this.high|e.high,this.unsigned)},t.prototype.shiftLeft=function(e){return t.isLong(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?t.fromBits(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):t.fromBits(0,this.low<<e-32,this.unsigned)},t.prototype.shl=function(e){return this.shiftLeft(e)},t.prototype.shiftRight=function(e){return t.isLong(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?t.fromBits(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):t.fromBits(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},t.prototype.shr=function(e){return this.shiftRight(e)},t.prototype.shiftRightUnsigned=function(e){if(t.isLong(e)&&(e=e.toInt()),e&=63,e===0)return this;var n=this.high;if(e<32){var r=this.low;return t.fromBits(r>>>e|n<<32-e,n>>>e,this.unsigned)}else return e===32?t.fromBits(n,0,this.unsigned):t.fromBits(n>>>e-32,0,this.unsigned)},t.prototype.shr_u=function(e){return this.shiftRightUnsigned(e)},t.prototype.shru=function(e){return this.shiftRightUnsigned(e)},t.prototype.subtract=function(e){return t.isLong(e)||(e=t.fromValue(e)),this.add(e.neg())},t.prototype.sub=function(e){return this.subtract(e)},t.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},t.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*Hr+(this.low>>>0):this.high*Hr+(this.low>>>0)},t.prototype.toBigInt=function(){return BigInt(this.toString())},t.prototype.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},t.prototype.toBytesLE=function(){var e=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,e&255,e>>>8&255,e>>>16&255,e>>>24]},t.prototype.toBytesBE=function(){var e=this.high,n=this.low;return[e>>>24,e>>>16&255,e>>>8&255,e&255,n>>>24,n>>>16&255,n>>>8&255,n&255]},t.prototype.toSigned=function(){return this.unsigned?t.fromBits(this.low,this.high,!1):this},t.prototype.toString=function(e){if(e=e||10,e<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(t.MIN_VALUE)){var n=t.fromNumber(e),r=this.div(n),i=r.mul(n).sub(this);return r.toString(e)+i.toInt().toString(e)}else return"-"+this.neg().toString(e);for(var o=t.fromNumber(Math.pow(e,6),this.unsigned),s=this,c="";;){var u=s.div(o),d=s.sub(u.mul(o)).toInt()>>>0,g=d.toString(e);if(s=u,s.isZero())return g+c;for(;g.length<6;)g="0"+g;c=""+g+c}},t.prototype.toUnsigned=function(){return this.unsigned?this:t.fromBits(this.low,this.high,!0)},t.prototype.xor=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low^e.low,this.high^e.high,this.unsigned)},t.prototype.eqz=function(){return this.isZero()},t.prototype.le=function(e){return this.lessThanOrEqual(e)},t.prototype.toExtendedJSON=function(e){return e&&e.relaxed?this.toNumber():{$numberLong:this.toString()}},t.fromExtendedJSON=function(e,n){var r=t.fromString(e.$numberLong);return n&&n.relaxed?r.toNumber():r},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new Long("'.concat(this.toString(),'"').concat(this.unsigned?", true":"",")")},t.TWO_PWR_24=t.fromInt(ly),t.MAX_UNSIGNED_VALUE=t.fromBits(-1,-1,!0),t.ZERO=t.fromInt(0),t.UZERO=t.fromInt(0,!0),t.ONE=t.fromInt(1),t.UONE=t.fromInt(1,!0),t.NEG_ONE=t.fromInt(-1),t.MAX_VALUE=t.fromBits(-1,2147483647,!1),t.MIN_VALUE=t.fromBits(0,-2147483648,!1),t}();Object.defineProperty(le.prototype,"__isLong__",{value:!0});Object.defineProperty(le.prototype,"_bsontype",{value:"Long"});var uy=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,dy=/^(\+|-)?(Infinity|inf)$/i,fy=/^(\+|-)?NaN$/i,Oi=6111,Pc=-6176,qf=6176,py=34,Lc=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Zf=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Jf=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),hy=/^([-+])?(\d+)?$/,my=31,Qf=16383,gy=30,_y=31;function ep(t){return!isNaN(parseInt(t,10))}function vy(t){var e=le.fromNumber(1e9),n=le.fromNumber(0);if(!t.parts[0]&&!t.parts[1]&&!t.parts[2]&&!t.parts[3])return{quotient:t,rem:n};for(var r=0;r<=3;r++)n=n.shiftLeft(32),n=n.add(new le(t.parts[r],0)),t.parts[r]=n.div(e).low,n=n.modulo(e);return{quotient:t,rem:n}}function yy(t,e){if(!t&&!e)return{high:le.fromNumber(0),low:le.fromNumber(0)};var n=t.shiftRightUnsigned(32),r=new le(t.getLowBits(),0),i=e.shiftRightUnsigned(32),o=new le(e.getLowBits(),0),s=n.multiply(i),c=n.multiply(o),u=r.multiply(i),d=r.multiply(o);return s=s.add(c.shiftRightUnsigned(32)),c=new le(c.getLowBits(),0).add(u).add(d.shiftRightUnsigned(32)),s=s.add(c.shiftRightUnsigned(32)),d=c.shiftLeft(32).add(new le(d.getLowBits(),0)),{high:s,low:d}}function Ey(t,e){var n=t.high>>>0,r=e.high>>>0;if(n<r)return!0;if(n===r){var i=t.low>>>0,o=e.low>>>0;if(i<o)return!0}return!1}function Ur(t,e){throw new Qe('"'.concat(t,'" is not a valid Decimal128 string - ').concat(e))}var Uc=function(){function t(e){if(!(this instanceof t))return new t(e);if(typeof e=="string")this.bytes=t.fromString(e).bytes;else if(Bc(e)){if(e.byteLength!==16)throw new Qe("Decimal128 must take a Buffer of 16 bytes");this.bytes=e}else throw new Qe("Decimal128 must take a Buffer or string")}return t.fromString=function(e){var n=!1,r=!1,i=!1,o=0,s=0,c=0,u=0,d=0,g=[0],p=0,E=0,w=0,N=0,M=0,L=0,j=new le(0,0),K=new le(0,0),se=0,X=0;if(e.length>=7e3)throw new Qe(""+e+" not a valid Decimal128 string");var Ee=e.match(uy),U=e.match(dy),he=e.match(fy);if(!Ee&&!U&&!he||e.length===0)throw new Qe(""+e+" not a valid Decimal128 string");if(Ee){var te=Ee[2],ye=Ee[4],ke=Ee[5],De=Ee[6];ye&&De===void 0&&Ur(e,"missing exponent power"),ye&&te===void 0&&Ur(e,"missing exponent base"),ye===void 0&&(ke||De)&&Ur(e,"missing e before exponent")}if((e[X]==="+"||e[X]==="-")&&(n=e[X++]==="-"),!ep(e[X])&&e[X]!=="."){if(e[X]==="i"||e[X]==="I")return new t(Fe.from(n?Zf:Jf));if(e[X]==="N")return new t(Fe.from(Lc))}for(;ep(e[X])||e[X]===".";){if(e[X]==="."){r&&Ur(e,"contains multiple periods"),r=!0,X=X+1;continue}p<34&&(e[X]!=="0"||i)&&(i||(d=s),i=!0,g[E++]=parseInt(e[X],10),p=p+1),i&&(c=c+1),r&&(u=u+1),s=s+1,X=X+1}if(r&&!s)throw new Qe(""+e+" not a valid Decimal128 string");if(e[X]==="e"||e[X]==="E"){var Pe=e.substr(++X).match(hy);if(!Pe||!Pe[2])return new t(Fe.from(Lc));M=parseInt(Pe[0],10),X=X+Pe[0].length}if(e[X])return new t(Fe.from(Lc));if(w=0,!p)w=0,N=0,g[0]=0,c=1,p=1,o=0;else if(N=p-1,o=c,o!==1)for(;g[d+o-1]===0;)o=o-1;for(M<=u&&u-M>16384?M=Pc:M=M-u;M>Oi;){if(N=N+1,N-w>py){var Ge=g.join("");if(Ge.match(/^0+$/)){M=Oi;break}Ur(e,"overflow")}M=M-1}for(;M<Pc||p<c;){if(N===0&&o<p){M=Pc,o=0;break}if(p<c?c=c-1:N=N-1,M<Oi)M=M+1;else{var Ge=g.join("");if(Ge.match(/^0+$/)){M=Oi;break}Ur(e,"overflow")}}if(N-w+1<o){var Ye=s;r&&(d=d+1,Ye=Ye+1),n&&(d=d+1,Ye=Ye+1);var ht=parseInt(e[d+N+1],10),A=0;if(ht>=5&&(A=1,ht===5)){for(A=g[N]%2===1?1:0,L=d+N+2;L<Ye;L++)if(parseInt(e[L],10)){A=1;break}}if(A){for(var x=N;x>=0;x--)if(++g[x]>9&&(g[x]=0,x===0))if(M<Oi)M=M+1,g[x]=1;else return new t(Fe.from(n?Zf:Jf))}}if(j=le.fromNumber(0),K=le.fromNumber(0),o===0)j=le.fromNumber(0),K=le.fromNumber(0);else if(N-w<17){var x=w;for(K=le.fromNumber(g[x++]),j=new le(0,0);x<=N;x++)K=K.multiply(le.fromNumber(10)),K=K.add(le.fromNumber(g[x]))}else{var x=w;for(j=le.fromNumber(g[x++]);x<=N-17;x++)j=j.multiply(le.fromNumber(10)),j=j.add(le.fromNumber(g[x]));for(K=le.fromNumber(g[x++]);x<=N;x++)K=K.multiply(le.fromNumber(10)),K=K.add(le.fromNumber(g[x]))}var F=yy(j,le.fromString("100000000000000000"));F.low=F.low.add(K),Ey(F.low,K)&&(F.high=F.high.add(le.fromNumber(1))),se=M+qf;var P={low:le.fromNumber(0),high:le.fromNumber(0)};F.high.shiftRightUnsigned(49).and(le.fromNumber(1)).equals(le.fromNumber(1))?(P.high=P.high.or(le.fromNumber(3).shiftLeft(61)),P.high=P.high.or(le.fromNumber(se).and(le.fromNumber(16383).shiftLeft(47))),P.high=P.high.or(F.high.and(le.fromNumber(0x7fffffffffff)))):(P.high=P.high.or(le.fromNumber(se&16383).shiftLeft(49)),P.high=P.high.or(F.high.and(le.fromNumber(562949953421311)))),P.low=F.low,n&&(P.high=P.high.or(le.fromString("9223372036854775808")));var v=Fe.alloc(16);return X=0,v[X++]=P.low.low&255,v[X++]=P.low.low>>8&255,v[X++]=P.low.low>>16&255,v[X++]=P.low.low>>24&255,v[X++]=P.low.high&255,v[X++]=P.low.high>>8&255,v[X++]=P.low.high>>16&255,v[X++]=P.low.high>>24&255,v[X++]=P.high.low&255,v[X++]=P.high.low>>8&255,v[X++]=P.high.low>>16&255,v[X++]=P.high.low>>24&255,v[X++]=P.high.high&255,v[X++]=P.high.high>>8&255,v[X++]=P.high.high>>16&255,v[X++]=P.high.high>>24&255,new t(v)},t.prototype.toString=function(){for(var e,n=0,r=new Array(36),i=0;i<r.length;i++)r[i]=0;var o=0,s=!1,c,u={parts:[0,0,0,0]},d,g,p=[];o=0;var E=this.bytes,w=E[o++]|E[o++]<<8|E[o++]<<16|E[o++]<<24,N=E[o++]|E[o++]<<8|E[o++]<<16|E[o++]<<24,M=E[o++]|E[o++]<<8|E[o++]<<16|E[o++]<<24,L=E[o++]|E[o++]<<8|E[o++]<<16|E[o++]<<24;o=0;var j={low:new le(w,N),high:new le(M,L)};j.high.lessThan(le.ZERO)&&p.push("-");var K=L>>26&my;if(K>>3===3){if(K===gy)return p.join("")+"Infinity";if(K===_y)return"NaN";e=L>>15&Qf,c=8+(L>>14&1)}else c=L>>14&7,e=L>>17&Qf;var se=e-qf;if(u.parts[0]=(L&16383)+((c&15)<<14),u.parts[1]=M,u.parts[2]=N,u.parts[3]=w,u.parts[0]===0&&u.parts[1]===0&&u.parts[2]===0&&u.parts[3]===0)s=!0;else for(g=3;g>=0;g--){var X=0,Ee=vy(u);if(u=Ee.quotient,X=Ee.rem.low,!!X)for(d=8;d>=0;d--)r[g*9+d]=X%10,X=Math.floor(X/10)}if(s)n=1,r[o]=0;else for(n=36;!r[o];)n=n-1,o=o+1;var U=n-1+se;if(U>=34||U<=-7||se>0){if(n>34)return p.push("".concat(0)),se>0?p.push("E+".concat(se)):se<0&&p.push("E".concat(se)),p.join("");p.push("".concat(r[o++])),n=n-1,n&&p.push(".");for(var i=0;i<n;i++)p.push("".concat(r[o++]));p.push("E"),U>0?p.push("+".concat(U)):p.push("".concat(U))}else if(se>=0)for(var i=0;i<n;i++)p.push("".concat(r[o++]));else{var he=n+se;if(he>0)for(var i=0;i<he;i++)p.push("".concat(r[o++]));else p.push("0");for(p.push(".");he++<0;)p.push("0");for(var i=0;i<n-Math.max(he-1,0);i++)p.push("".concat(r[o++]))}return p.join("")},t.prototype.toJSON=function(){return{$numberDecimal:this.toString()}},t.prototype.toExtendedJSON=function(){return{$numberDecimal:this.toString()}},t.fromExtendedJSON=function(e){return t.fromString(e.$numberDecimal)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new Decimal128("'.concat(this.toString(),'")')},t}();Object.defineProperty(Uc.prototype,"_bsontype",{value:"Decimal128"});var rs=function(){function t(e){if(!(this instanceof t))return new t(e);e instanceof Number&&(e=e.valueOf()),this.value=+e}return t.prototype.valueOf=function(){return this.value},t.prototype.toJSON=function(){return this.value},t.prototype.toString=function(e){return this.value.toString(e)},t.prototype.toExtendedJSON=function(e){return e&&(e.legacy||e.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-".concat(this.value.toFixed(1))}:{$numberDouble:Number.isInteger(this.value)?this.value.toFixed(1):this.value.toString()}},t.fromExtendedJSON=function(e,n){var r=parseFloat(e.$numberDouble);return n&&n.relaxed?r:new t(r)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.toExtendedJSON();return"new Double(".concat(e.$numberDouble,")")},t}();Object.defineProperty(rs.prototype,"_bsontype",{value:"Double"});var is=function(){function t(e){if(!(this instanceof t))return new t(e);e instanceof Number&&(e=e.valueOf()),this.value=+e|0}return t.prototype.valueOf=function(){return this.value},t.prototype.toString=function(e){return this.value.toString(e)},t.prototype.toJSON=function(){return this.value},t.prototype.toExtendedJSON=function(e){return e&&(e.relaxed||e.legacy)?this.value:{$numberInt:this.value.toString()}},t.fromExtendedJSON=function(e,n){return n&&n.relaxed?parseInt(e.$numberInt,10):new t(e.$numberInt)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new Int32(".concat(this.valueOf(),")")},t}();Object.defineProperty(is.prototype,"_bsontype",{value:"Int32"});var Hc=function(){function t(){if(!(this instanceof t))return new t}return t.prototype.toExtendedJSON=function(){return{$maxKey:1}},t.fromExtendedJSON=function(){return new t},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new MaxKey()"},t}();Object.defineProperty(Hc.prototype,"_bsontype",{value:"MaxKey"});var jc=function(){function t(){if(!(this instanceof t))return new t}return t.prototype.toExtendedJSON=function(){return{$minKey:1}},t.fromExtendedJSON=function(){return new t},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new MinKey()"},t}();Object.defineProperty(jc.prototype,"_bsontype",{value:"MinKey"});var by=new RegExp("^[0-9a-fA-F]{24}$"),ar=null,En=Symbol("id"),Nt=function(){function t(e){if(!(this instanceof t))return new t(e);var n;if(typeof e=="object"&&e&&"id"in e){if(typeof e.id!="string"&&!ArrayBuffer.isView(e.id))throw new Qe("Argument passed in must have an id that is of type string or Buffer");"toHexString"in e&&typeof e.toHexString=="function"?n=Fe.from(e.toHexString(),"hex"):n=e.id}else n=e;if(n==null||typeof n=="number")this[En]=t.generate(typeof n=="number"?n:void 0);else if(ArrayBuffer.isView(n)&&n.byteLength===12)this[En]=n instanceof Fe?n:Jo(n);else if(typeof n=="string")if(n.length===12){var r=Fe.from(n);if(r.byteLength===12)this[En]=r;else throw new Qe("Argument passed in must be a string of 12 bytes")}else if(n.length===24&&by.test(n))this[En]=Fe.from(n,"hex");else throw new Qe("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");else throw new Qe("Argument passed in does not match the accepted types");t.cacheHexString&&(this.__id=this.id.toString("hex"))}return Object.defineProperty(t.prototype,"id",{get:function(){return this[En]},set:function(e){this[En]=e,t.cacheHexString&&(this.__id=e.toString("hex"))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"generationTime",{get:function(){return this.id.readInt32BE(0)},set:function(e){this.id.writeUInt32BE(e,0)},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(){if(t.cacheHexString&&this.__id)return this.__id;var e=this.id.toString("hex");return t.cacheHexString&&!this.__id&&(this.__id=e),e},t.getInc=function(){return t.index=(t.index+1)%16777215},t.generate=function(e){typeof e!="number"&&(e=Math.floor(Date.now()/1e3));var n=t.getInc(),r=Fe.alloc(12);return r.writeUInt32BE(e,0),ar===null&&(ar=ap(5)),r[4]=ar[0],r[5]=ar[1],r[6]=ar[2],r[7]=ar[3],r[8]=ar[4],r[11]=n&255,r[10]=n>>8&255,r[9]=n>>16&255,r},t.prototype.toString=function(e){return e?this.id.toString(e):this.toHexString()},t.prototype.toJSON=function(){return this.toHexString()},t.prototype.equals=function(e){if(e==null)return!1;if(e instanceof t)return this[En][11]===e[En][11]&&this[En].equals(e[En]);if(typeof e=="string"&&t.isValid(e)&&e.length===12&&Bc(this.id))return e===Fe.prototype.toString.call(this.id,"latin1");if(typeof e=="string"&&t.isValid(e)&&e.length===24)return e.toLowerCase()===this.toHexString();if(typeof e=="string"&&t.isValid(e)&&e.length===12)return Fe.from(e).equals(this.id);if(typeof e=="object"&&"toHexString"in e&&typeof e.toHexString=="function"){var n=e.toHexString(),r=this.toHexString().toLowerCase();return typeof n=="string"&&n.toLowerCase()===r}return!1},t.prototype.getTimestamp=function(){var e=new Date,n=this.id.readUInt32BE(0);return e.setTime(Math.floor(n)*1e3),e},t.createPk=function(){return new t},t.createFromTime=function(e){var n=Fe.from([0,0,0,0,0,0,0,0,0,0,0,0]);return n.writeUInt32BE(e,0),new t(n)},t.createFromHexString=function(e){if(typeof e>"u"||e!=null&&e.length!==24)throw new Qe("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new t(Fe.from(e,"hex"))},t.isValid=function(e){if(e==null)return!1;try{return new t(e),!0}catch{return!1}},t.prototype.toExtendedJSON=function(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}},t.fromExtendedJSON=function(e){return new t(e.$oid)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new ObjectId("'.concat(this.toHexString(),'")')},t.index=Math.floor(Math.random()*16777215),t}();Object.defineProperty(Nt.prototype,"generate",{value:ts(function(t){return Nt.generate(t)},"Please use the static `ObjectId.generate(time)` instead")});Object.defineProperty(Nt.prototype,"getInc",{value:ts(function(){return Nt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Nt.prototype,"get_inc",{value:ts(function(){return Nt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Nt,"get_inc",{value:ts(function(){return Nt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Nt.prototype,"_bsontype",{value:"ObjectID"});function wy(t){return t.split("").sort().join("")}var Di=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);if(this.pattern=e,this.options=wy(n??""),this.pattern.indexOf("\0")!==-1)throw new cr("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(this.options.indexOf("\0")!==-1)throw new cr("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var r=0;r<this.options.length;r++)if(!(this.options[r]==="i"||this.options[r]==="m"||this.options[r]==="x"||this.options[r]==="l"||this.options[r]==="s"||this.options[r]==="u"))throw new cr("The regular expression option [".concat(this.options[r],"] is not supported"))}return t.parseOptions=function(e){return e?e.split("").sort().join(""):""},t.prototype.toExtendedJSON=function(e){return e=e||{},e.legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}},t.fromExtendedJSON=function(e){if("$regex"in e)if(typeof e.$regex!="string"){if(e.$regex._bsontype==="BSONRegExp")return e}else return new t(e.$regex,t.parseOptions(e.$options));if("$regularExpression"in e)return new t(e.$regularExpression.pattern,t.parseOptions(e.$regularExpression.options));throw new Qe("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(e)))},t}();Object.defineProperty(Di.prototype,"_bsontype",{value:"BSONRegExp"});var $c=function(){function t(e){if(!(this instanceof t))return new t(e);this.value=e}return t.prototype.valueOf=function(){return this.value},t.prototype.toString=function(){return this.value},t.prototype.inspect=function(){return'new BSONSymbol("'.concat(this.value,'")')},t.prototype.toJSON=function(){return this.value},t.prototype.toExtendedJSON=function(){return{$symbol:this.value}},t.fromExtendedJSON=function(e){return new t(e.$symbol)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t}();Object.defineProperty($c.prototype,"_bsontype",{value:"Symbol"});var Cy=le,dp=function(t){es(e,t);function e(n,r){var i=this;return i instanceof e?(le.isLong(n)?i=t.call(this,n.low,n.high,!0)||this:Ni(n)&&typeof n.t<"u"&&typeof n.i<"u"?i=t.call(this,n.i,n.t,!0)||this:i=t.call(this,n,r,!0)||this,Object.defineProperty(i,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),i):new e(n,r)}return e.prototype.toJSON=function(){return{$timestamp:this.toString()}},e.fromInt=function(n){return new e(le.fromInt(n,!0))},e.fromNumber=function(n){return new e(le.fromNumber(n,!0))},e.fromBits=function(n,r){return new e(n,r)},e.fromString=function(n,r){return new e(le.fromString(n,!0,r))},e.prototype.toExtendedJSON=function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}},e.fromExtendedJSON=function(n){return new e(n.$timestamp)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new Timestamp({ t: ".concat(this.getHighBits(),", i: ").concat(this.getLowBits()," })")},e.MAX_VALUE=le.MAX_UNSIGNED_VALUE,e}(Cy);function Sy(t){return Ni(t)&&Reflect.has(t,"_bsontype")&&typeof t._bsontype=="string"}var fp=2147483647,pp=-2147483648,hp=9223372036854776e3,mp=-9223372036854776e3,Ty={$oid:Nt,$binary:lr,$uuid:lr,$symbol:$c,$numberInt:is,$numberDecimal:Uc,$numberDouble:rs,$numberLong:le,$minKey:jc,$maxKey:Hc,$regex:Di,$regularExpression:Di,$timestamp:dp};function gp(t,e){if(e===void 0&&(e={}),typeof t=="number"){if(e.relaxed||e.legacy)return t;if(Math.floor(t)===t){if(t>=pp&&t<=fp)return new is(t);if(t>=mp&&t<=hp)return le.fromNumber(t)}return new rs(t)}if(t==null||typeof t!="object")return t;if(t.$undefined)return null;for(var n=Object.keys(t).filter(function(p){return p.startsWith("$")&&t[p]!=null}),r=0;r<n.length;r++){var i=Ty[n[r]];if(i)return i.fromExtendedJSON(t,e)}if(t.$date!=null){var o=t.$date,s=new Date;return e.legacy?typeof o=="number"?s.setTime(o):typeof o=="string"&&s.setTime(Date.parse(o)):typeof o=="string"?s.setTime(Date.parse(o)):le.isLong(o)?s.setTime(o.toNumber()):typeof o=="number"&&e.relaxed&&s.setTime(o),s}if(t.$code!=null){var c=Object.assign({},t);return t.$scope&&(c.$scope=gp(t.$scope)),ns.fromExtendedJSON(t)}if(cy(t)||t.$dbPointer){var u=t.$ref?t:t.$dbPointer;if(u instanceof Ai)return u;var d=Object.keys(u).filter(function(p){return p.startsWith("$")}),g=!0;if(d.forEach(function(p){["$ref","$id","$db"].indexOf(p)===-1&&(g=!1)}),g)return Ai.fromExtendedJSON(u)}return t}function Iy(t,e){return t.map(function(n,r){e.seenObjects.push({propertyName:"index ".concat(r),obj:null});try{return jn(n,e)}finally{e.seenObjects.pop()}})}function tp(t){var e=t.toISOString();return t.getUTCMilliseconds()!==0?e:e.slice(0,-5)+"Z"}function jn(t,e){if((typeof t=="object"||typeof t=="function")&&t!==null){var n=e.seenObjects.findIndex(function(j){return j.obj===t});if(n!==-1){var r=e.seenObjects.map(function(j){return j.propertyName}),i=r.slice(0,n).map(function(j){return"".concat(j," -> ")}).join(""),o=r[n],s=" -> "+r.slice(n+1,r.length-1).map(function(j){return"".concat(j," -> ")}).join(""),c=r[r.length-1],u=" ".repeat(i.length+o.length/2),d="-".repeat(s.length+(o.length+c.length)/2-1);throw new Qe(`Converting circular structure to EJSON:
|
|
32
32
|
`+" ".concat(i).concat(o).concat(s).concat(c,`
|
|
33
|
-
`)+" ".concat(u,"\\").concat(d,"/"))}e.seenObjects[e.seenObjects.length-1].obj=t}if(Array.isArray(t))return Iy(t,e);if(t===void 0)return null;if(t instanceof Date||iy(t)){var g=t.getTime(),p=g>-1&&g<2534023188e5;return e.legacy?e.relaxed&&p?{$date:t.getTime()}:{$date:tp(t)}:e.relaxed&&p?{$date:tp(t)}:{$date:{$numberLong:t.getTime().toString()}}}if(typeof t=="number"&&(!e.relaxed||!isFinite(t))){if(Math.floor(t)===t){var E=t>=pp&&t<=fp,w=t>=mp&&t<=hp;if(E)return{$numberInt:t.toString()};if(w)return{$numberLong:t.toString()}}return{$numberDouble:t.toString()}}if(t instanceof RegExp||ry(t)){var N=t.flags;if(N===void 0){var M=t.toString().match(/[gimuy]*$/);M&&(N=M[0])}var L=new Ai(t.source,N);return L.toExtendedJSON(e)}return t!=null&&typeof t=="object"?Oy(t,e):t}var xy={Binary:function(t){return new ur(t.value(),t.sub_type)},Code:function(t){return new ns(t.code,t.scope)},DBRef:function(t){return new Oi(t.collection||t.namespace,t.oid,t.db,t.fields)},Decimal128:function(t){return new Uc(t.bytes)},Double:function(t){return new rs(t.value)},Int32:function(t){return new is(t.value)},Long:function(t){return le.fromBits(t.low!=null?t.low:t.low_,t.low!=null?t.high:t.high_,t.low!=null?t.unsigned:t.unsigned_)},MaxKey:function(){return new Hc},MinKey:function(){return new jc},ObjectID:function(t){return new Nt(t)},ObjectId:function(t){return new Nt(t)},BSONRegExp:function(t){return new Ai(t.pattern,t.options)},Symbol:function(t){return new $c(t.value)},Timestamp:function(t){return dp.fromBits(t.low,t.high)}};function Oy(t,e){if(t==null||typeof t!="object")throw new lr("not an object instance");var n=t._bsontype;if(typeof n>"u"){var r={};for(var i in t){e.seenObjects.push({propertyName:i,obj:null});try{var o=jn(t[i],e);i==="__proto__"?Object.defineProperty(r,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):r[i]=o}finally{e.seenObjects.pop()}}return r}else if(Sy(t)){var s=t;if(typeof s.toExtendedJSON!="function"){var c=xy[t._bsontype];if(!c)throw new tt("Unrecognized or invalid _bsontype: "+t._bsontype);s=c(s)}return n==="Code"&&s.scope?s=new ns(s.code,jn(s.scope,e)):n==="DBRef"&&s.oid&&(s=new Oi(jn(s.collection,e),jn(s.oid,e),jn(s.db,e),jn(s.fields,e))),s.toExtendedJSON(e)}else throw new lr("_bsontype must be a string, but was: "+typeof n)}var np;(function(t){function e(o,s){var c=Object.assign({},{relaxed:!0,legacy:!1},s);return typeof c.relaxed=="boolean"&&(c.strict=!c.relaxed),typeof c.strict=="boolean"&&(c.relaxed=!c.strict),JSON.parse(o,function(u,d){if(u.indexOf("\0")!==-1)throw new lr("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(u)));return gp(d,c)})}t.parse=e;function n(o,s,c,u){c!=null&&typeof c=="object"&&(u=c,c=0),s!=null&&typeof s=="object"&&!Array.isArray(s)&&(u=s,s=void 0,c=0);var d=Object.assign({relaxed:!0,legacy:!1},u,{seenObjects:[{propertyName:"(root)",obj:null}]}),g=jn(o,d);return JSON.stringify(g,s,c)}t.stringify=n;function r(o,s){return s=s||{},JSON.parse(n(o,s))}t.serialize=r;function i(o,s){return s=s||{},e(JSON.stringify(o),s)}t.deserialize=i})(np||(np={}));var rp,ip=sp();ip.Map?rp=ip.Map:rp=function(){function t(e){e===void 0&&(e=[]),this._keys=[],this._values={};for(var n=0;n<e.length;n++)if(e[n]!=null){var r=e[n],i=r[0],o=r[1];this._keys.push(i),this._values[i]={v:o,i:this._keys.length-1}}}return t.prototype.clear=function(){this._keys=[],this._values={}},t.prototype.delete=function(e){var n=this._values[e];return n==null?!1:(delete this._values[e],this._keys.splice(n.i,1),!0)},t.prototype.entries=function(){var e=this,n=0;return{next:function(){var r=e._keys[n++];return{value:r!==void 0?[r,e._values[r].v]:void 0,done:r===void 0}}}},t.prototype.forEach=function(e,n){n=n||this;for(var r=0;r<this._keys.length;r++){var i=this._keys[r];e.call(n,this._values[i].v,i,n)}},t.prototype.get=function(e){return this._values[e]?this._values[e].v:void 0},t.prototype.has=function(e){return this._values[e]!=null},t.prototype.keys=function(){var e=this,n=0;return{next:function(){var r=e._keys[n++];return{value:r!==void 0?r:void 0,done:r===void 0}}}},t.prototype.set=function(e,n){return this._values[e]?(this._values[e].v=n,this):(this._keys.push(e),this._values[e]={v:n,i:this._keys.length-1},this)},t.prototype.values=function(){var e=this,n=0;return{next:function(){var r=e._keys[n++];return{value:r!==void 0?e._values[r].v:void 0,done:r===void 0}}}},Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),t}();var xD=le.fromNumber(sy),OD=le.fromNumber(ay);var Fc=new Uint8Array(8),AD=new DataView(Fc.buffer,Fc.byteOffset,Fc.byteLength);var Ay=1024*1024*17,DD=Fe.alloc(Ay);var os=class{triggerID;nudgeID;engagementID;contentID;shortID;contentType;variation;props;objective;onsiteDeliveryType;holdout;constructor(e){e=e||{},this.triggerID=e.id||e.triggerID,this.nudgeID=e.nudgeID,this.shortID=e.shortID,this.contentType=e.contentType,this.engagementID=e.engagementID,this.contentID=e.contentID,this.variation=e.variation,this.props=e.props,this.objective=e.objective,this.onsiteDeliveryType=e.onsiteDeliveryType,this.holdout=e.holdout}};var jr=class{constructor(e,n={},r,i){this.name=e;this.properties=n;this.id=i?new Nt(i):new Nt,this.occurred=new Date,r&&(this.trigger=new os(r)),this.newEvent=!i}trigger;items;videos;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber;locale};function Dy(t,e){t&1&&(Vt(),Se(0,"path",3))}function Ny(t,e){t&1&&(Vt(),Se(0,"path",4))}var $r=class t{muted;videoEl;toggled=new at;toggleMute(e){e.stopPropagation(),e.preventDefault(),this.muted=!this.muted,this.videoEl.muted=this.muted,this.toggled.emit(this.muted),this.muted||this.videoEl.play()}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Le({type:t,selectors:[["cooee-mute-toggle"]],inputs:{muted:"muted",videoEl:"videoEl"},outputs:{toggled:"toggled"},decls:5,vars:1,consts:[["type","button",1,"lc:bg-black/50",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M4.34 2.93L2.93 4.34 7.29 8.7 7 9H3v6h4l5 5v-6.59l4.18 4.18c-.65.49-1.38.88-2.18 1.11v2.06c1.34-.3 2.57-.92 3.61-1.75l2.05 2.05 1.41-1.41L4.34 2.93zM10 15.17L7.83 13H5v-2h2.83l.88-.88L10 11.41v3.76zM19 12c0 .82-.15 1.61-.41 2.34l1.53 1.53c.56-1.17.88-2.48.88-3.87 0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zm-7-8l-1.88 1.88L12 7.76zm4.5 8c0-1.77-1.02-3.29-2.5-4.03v1.79l2.48 2.48c.01-.08.02-.16.02-.24z"],["d","M3 9v6h4l5 5V4L7 9H3zm7-.17v6.34L7.83 13H5v-2h2.83L10 8.83zM16.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77 0-4.28-2.99-7.86-7-8.77z"]],template:function(n,r){n&1&&(W(0,"button",0),Me("click",function(o){return r.toggleMute(o)}),Vt(),W(1,"svg",1),Se(2,"path",2),Oe(3,Dy,1,0,":svg:path",3)(4,Ny,1,0,":svg:path",4),z()()),n&2&&(V(3),Te(r.muted?3:4))},styles:["button[_ngcontent-%COMP%]{width:40px;height:40px;display:flex;justify-content:center;align-items:center;border:none;cursor:pointer;border-radius:100%}"]})};var Ry=t=>({"lc:cursor-grab":t}),My=(t,e)=>e.url;function Py(t,e){if(t&1&&Se(0,"source",11),t&2){let n=e.$implicit;Sn("type",n.mimeType),ge("src",n.url,ct)}}var ss=class t{constructor(e){this.elementRef=e}video;closeClicked=new at;videoClicked=new at;isDragging=!1;ngOnInit(){let e=this.elementRef.nativeElement.parentElement.parentElement;e.style.zIndex="2147483647"}close(){this.closeClicked.emit()}onVideoClick(){if(this.isDragging){this.isDragging=!1;return}this.videoClicked.emit()}static \u0275fac=function(n){return new(n||t)(tn(Ct))};static \u0275cmp=Le({type:t,selectors:[["cooee-draggable-video-popup"]],inputs:{video:"video"},outputs:{closeClicked:"closeClicked",videoClicked:"videoClicked"},decls:14,vars:5,consts:[["role","button","tabindex","0","cdkDrag","",1,"lc-popup-inner","lc:shadow-2xl","lc:rounded-lg","lc:flex","lc:justify-center","lc:items-center",3,"click","keyup","cdkDragMoved","ngClass","cdkDragBoundary"],[1,"lc-close-button","lc:absolute","lc:-top-3.5","lc:-right-3.5","lc:bg-black/50","lc:rounded-full","lc:w-8","lc:h-8","lc:border-none","lc:z-10","lc:flex","lc:justify-center","lc:items-center",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"],[1,"lc-play-button"],[1,"lc-icon"],["viewBox","0 0 28.31 30"],["d","M19.15,1.29A1.24,1.24,0,0,0,17.82.15a1.36,1.36,0,0,0-.35.07,3.2,3.2,0,0,0-.65.46l-5.06,4.6a1.24,1.24,0,0,0,0,1.75l0,0a1.22,1.22,0,0,0,.89.39,1.25,1.25,0,0,0,.85-.32l3-2.78.17-.13v8l2.44,2.62ZM26.79,26.6l-7.64-7.93-2.5-2.58-6-6.34L8.9,8,5.23,4.15a1.17,1.17,0,0,0-1.66,0h0a1.18,1.18,0,0,0,0,1.66h0L6.1,8.47H3.32a2.94,2.94,0,0,0-2.45,3v7.16a3,3,0,0,0,2.86,3.08H8.07a.44.44,0,0,1,.33.13C9.7,23,11,24.19,12.26,25.36L17,29.7a1.24,1.24,0,0,0,2.17-1V22.21l5.95,6.15a1.2,1.2,0,0,0,1.67,0,1.17,1.17,0,0,0,.08-1.66Zm-10.14-.67-.18-.11L9.75,19.67a1.72,1.72,0,0,0-1.16-.45H4c-.48,0-.59-.11-.59-.61V11.55c0-.49,0-.6.59-.6H8.29l8.29,8.55ZM29.09,15.07A9.9,9.9,0,0,1,26.33,22l-.11.13a1.24,1.24,0,0,1-2-.28,1.29,1.29,0,0,1,.24-1.52h0a6.77,6.77,0,0,0,1.32-1.89,7.41,7.41,0,0,0-1.37-8.55,1.24,1.24,0,0,1-.08-1.75,1.33,1.33,0,0,1,.41-.29,1.19,1.19,0,0,1,1.34.2A8.88,8.88,0,0,1,28,10.36a10,10,0,0,1,1.17,4.17A3.35,3.35,0,0,1,29.09,15.07Z","transform","translate(-0.86 -0.14)","fill","#191919"],[1,"lc-text"],["loop","","preload","auto","playsinline","","autoplay","",1,"lc:rounded-lg","lc:w-full",3,"muted"],[3,"src","type"]],template:function(n,r){n&1&&(W(0,"div",0),Me("click",function(){return r.onVideoClick()})("keyup",function(){return r.onVideoClick()})("cdkDragMoved",function(){return r.isDragging=!0}),W(1,"button",1),Me("click",function(o){return o.stopPropagation(),r.close()}),Vt(),W(2,"svg",2),Se(3,"path",3)(4,"path",4),z()(),Gn(),W(5,"div",5)(6,"div",6),Vt(),W(7,"svg",7),Se(8,"path",8),z()(),Gn(),W(9,"div",9),Ae(10,"Tap to unmute"),z()(),W(11,"video",10),Ze(12,Py,1,2,"source",11,My),z()()),n&2&&(ge("ngClass",Gi(3,Ry,r.isDragging))("cdkDragBoundary","body"),V(11),ge("muted",!0),V(),Je(r.video.sources))},dependencies:[Ln,eu],styles:["[_nghost-%COMP%]{position:fixed;display:block;right:24px;bottom:24px;max-width:150px}.lc-play-button[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(1);transition:all .1s ease-in-out;z-index:999;flex-wrap:wrap;width:100%;max-width:130px;border-radius:5px;padding:5px 10px;background-color:#97979761;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.lc-play-button[_ngcontent-%COMP%] .lc-icon[_ngcontent-%COMP%]{width:14px;height:14px}.lc-play-button[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:#fff}.lc-play-button[_ngcontent-%COMP%] .lc-text[_ngcontent-%COMP%]{font-size:11px;line-height:1;color:#fff;font-weight:400;margin-left:5px;text-align:center}"]})};var Ni=class{_attachedHost;attach(e){return this._attachedHost=e,e.attach(this)}detach(){let e=this._attachedHost;e!=null&&(this._attachedHost=null,e.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(e){this._attachedHost=e}},Gr=class extends Ni{component;viewContainerRef;injector;componentFactoryResolver;projectableNodes;constructor(e,n,r,i,o){super(),this.component=e,this.viewContainerRef=n,this.injector=r,this.projectableNodes=o}},Wr=class extends Ni{templateRef;viewContainerRef;context;injector;constructor(e,n,r,i){super(),this.templateRef=e,this.viewContainerRef=n,this.context=r,this.injector=i}get origin(){return this.templateRef.elementRef}attach(e,n=this.context){return this.context=n,super.attach(e)}detach(){return this.context=void 0,super.detach()}},Gc=class extends Ni{element;constructor(e){super(),this.element=e instanceof Ct?e.nativeElement:e}},Yr=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(e){if(e instanceof Gr)return this._attachedPortal=e,this.attachComponentPortal(e);if(e instanceof Wr)return this._attachedPortal=e,this.attachTemplatePortal(e);if(this.attachDomPortal&&e instanceof Gc)return this._attachedPortal=e,this.attachDomPortal(e)}attachDomPortal=null;detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(e){this._disposeFn=e}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}};var as=class extends Yr{outletElement;_appRef;_defaultInjector;_document;constructor(e,n,r,i,o){super(),this.outletElement=e,this._appRef=r,this._defaultInjector=i,this._document=o}attachComponentPortal(e){let n;if(e.viewContainerRef){let r=e.injector||e.viewContainerRef.injector,i=r.get(Ds,null,{optional:!0})||void 0;n=e.viewContainerRef.createComponent(e.component,{index:e.viewContainerRef.length,injector:r,ngModuleRef:i,projectableNodes:e.projectableNodes||void 0}),this.setDisposeFn(()=>n.destroy())}else{let r=this._appRef,i=e.injector||this._defaultInjector||Rt.NULL,o=i.get(Bi,r.injector);n=$l(e.component,{elementInjector:i,environmentInjector:o,projectableNodes:e.projectableNodes||void 0}),r.attachView(n.hostView),this.setDisposeFn(()=>{r.viewCount>0&&r.detachView(n.hostView),n.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(n)),this._attachedPortal=e,n}attachTemplatePortal(e){let n=e.viewContainerRef,r=n.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return r.rootNodes.forEach(i=>this.outletElement.appendChild(i)),r.detectChanges(),this.setDisposeFn(()=>{let i=n.indexOf(r);i!==-1&&n.remove(i)}),this._attachedPortal=e,r}attachDomPortal=e=>{let n=e.element;n.parentNode;let r=this._document.createComment("dom-portal");n.parentNode.insertBefore(r,n),this.outletElement.appendChild(n),this._attachedPortal=e,super.setDisposeFn(()=>{r.parentNode&&r.parentNode.replaceChild(n,r)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(e){return e.hostView.rootNodes[0]}};var Wc=(()=>{class t extends Yr{_moduleRef=Z(Ds,{optional:!0});_document=Z(It);_viewContainerRef=Z(As);_isInitialized=!1;_attachedRef;constructor(){super()}get portal(){return this._attachedPortal}set portal(n){this.hasAttached()&&!n&&!this._isInitialized||(this.hasAttached()&&super.detach(),n&&super.attach(n),this._attachedPortal=n||null)}attached=new at;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(n){n.setAttachedHost(this);let r=n.viewContainerRef!=null?n.viewContainerRef:this._viewContainerRef,i=r.createComponent(n.component,{index:r.length,injector:n.injector||r.injector,projectableNodes:n.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0});return r!==this._viewContainerRef&&this._getRootNode().appendChild(i.hostView.rootNodes[0]),super.setDisposeFn(()=>i.destroy()),this._attachedPortal=n,this._attachedRef=i,this.attached.emit(i),i}attachTemplatePortal(n){n.setAttachedHost(this);let r=this._viewContainerRef.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=n,this._attachedRef=r,this.attached.emit(r),r}attachDomPortal=n=>{let r=n.element;r.parentNode;let i=this._document.createComment("dom-portal");n.setAttachedHost(this),r.parentNode.insertBefore(i,r),this._getRootNode().appendChild(r),this._attachedPortal=n,super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(r,i)})};_getRootNode(){let n=this._viewContainerRef.element.nativeElement;return n.nodeType===n.ELEMENT_NODE?n:n.parentNode}static \u0275fac=function(r){return new(r||t)};static \u0275dir=_r({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[St]})}return t})();var Ri;function Ly(){if(Ri==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Ri=!0}))}finally{Ri=Ri||!1}return Ri}function _p(t){return Ly()?t:!!t.capture}var Fy=new en("cdk-input-modality-detector-options"),ky={ignoreKeys:[18,17,224,91,16]},vp=650,Yc={passive:!0,capture:!0},Vy=(()=>{class t{_platform=Z(on);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new vl(null);_options;_lastTouchMs=0;_onKeydown=n=>{this._options?.ignoreKeys?.some(r=>r===n.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=Tn(n))};_onMousedown=n=>{Date.now()-this._lastTouchMs<vp||(this._modality.next(ql(n)?"keyboard":"mouse"),this._mostRecentTarget=Tn(n))};_onTouchstart=n=>{if(Zl(n)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Tn(n)};constructor(){let n=Z(Mt),r=Z(It),i=Z(Fy,{optional:!0});if(this._options=O(O({},ky),i),this.modalityDetected=this._modality.pipe(Il(1)),this.modalityChanged=this.modalityDetected.pipe(Tl()),this._platform.isBrowser){let o=Z(gr).createRenderer(null,null);this._listenerCleanups=n.runOutsideAngular(()=>[In(o,r,"keydown",this._onKeydown,Yc),In(o,r,"mousedown",this._onMousedown,Yc),In(o,r,"touchstart",this._onTouchstart,Yc)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(n=>n())}static \u0275fac=function(r){return new(r||t)};static \u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ls=function(t){return t[t.IMMEDIATE=0]="IMMEDIATE",t[t.EVENTUAL=1]="EVENTUAL",t}(ls||{}),By=new en("cdk-focus-monitor-default-options"),cs=_p({passive:!0,capture:!0}),yp=(()=>{class t{_ngZone=Z(Mt);_platform=Z(on);_inputModalityDetector=Z(Vy);_origin=null;_lastFocusOrigin;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=Z(It,{optional:!0});_stopInputModalityDetector=new mt;constructor(){let n=Z(By,{optional:!0});this._detectionMode=n?.detectionMode||ls.IMMEDIATE}_rootNodeFocusAndBlurListener=n=>{let r=Tn(n);for(let i=r;i;i=i.parentElement)n.type==="focus"?this._onFocus(n,i):this._onBlur(n,i)};monitor(n,r=!1){let i=zi(n);if(!this._platform.isBrowser||i.nodeType!==1)return ki();let o=Xl(i)||this._getDocument(),s=this._elementInfo.get(i);if(s)return r&&(s.checkChildren=!0),s.subject;let c={checkChildren:r,subject:new mt,rootNode:o};return this._elementInfo.set(i,c),this._registerGlobalListeners(c),c.subject}stopMonitoring(n){let r=zi(n),i=this._elementInfo.get(r);i&&(i.subject.complete(),this._setClasses(r),this._elementInfo.delete(r),this._removeGlobalListeners(i))}focusVia(n,r,i){let o=zi(n),s=this._getDocument().activeElement;o===s?this._getClosestElementsInfo(o).forEach(([c,u])=>this._originChanged(c,r,u)):(this._setOrigin(r),typeof o.focus=="function"&&o.focus(i))}ngOnDestroy(){this._elementInfo.forEach((n,r)=>this.stopMonitoring(r))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(n){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(n)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:n&&this._isLastInteractionFromInputLabel(n)?"mouse":"program"}_shouldBeAttributedToTouch(n){return this._detectionMode===ls.EVENTUAL||!!n?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(n,r){n.classList.toggle("cdk-focused",!!r),n.classList.toggle("cdk-touch-focused",r==="touch"),n.classList.toggle("cdk-keyboard-focused",r==="keyboard"),n.classList.toggle("cdk-mouse-focused",r==="mouse"),n.classList.toggle("cdk-program-focused",r==="program")}_setOrigin(n,r=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=n,this._originFromTouchInteraction=n==="touch"&&r,this._detectionMode===ls.IMMEDIATE){clearTimeout(this._originTimeoutId);let i=this._originFromTouchInteraction?vp:1;this._originTimeoutId=setTimeout(()=>this._origin=null,i)}})}_onFocus(n,r){let i=this._elementInfo.get(r),o=Tn(n);!i||!i.checkChildren&&r!==o||this._originChanged(r,this._getFocusOrigin(o),i)}_onBlur(n,r){let i=this._elementInfo.get(r);!i||i.checkChildren&&n.relatedTarget instanceof Node&&r.contains(n.relatedTarget)||(this._setClasses(r),this._emitOrigin(i,null))}_emitOrigin(n,r){n.subject.observers.length&&this._ngZone.run(()=>n.subject.next(r))}_registerGlobalListeners(n){if(!this._platform.isBrowser)return;let r=n.rootNode,i=this._rootNodeFocusListenerCount.get(r)||0;i||this._ngZone.runOutsideAngular(()=>{r.addEventListener("focus",this._rootNodeFocusAndBlurListener,cs),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,cs)}),this._rootNodeFocusListenerCount.set(r,i+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(hr(this._stopInputModalityDetector)).subscribe(o=>{this._setOrigin(o,!0)}))}_removeGlobalListeners(n){let r=n.rootNode;if(this._rootNodeFocusListenerCount.has(r)){let i=this._rootNodeFocusListenerCount.get(r);i>1?this._rootNodeFocusListenerCount.set(r,i-1):(r.removeEventListener("focus",this._rootNodeFocusAndBlurListener,cs),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,cs),this._rootNodeFocusListenerCount.delete(r))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(n,r,i){this._setClasses(n,r),this._emitOrigin(i,r),this._lastFocusOrigin=r}_getClosestElementsInfo(n){let r=[];return this._elementInfo.forEach((i,o)=>{(o===n||i.checkChildren&&o.contains(n))&&r.push([o,i])}),r}_isLastInteractionFromInputLabel(n){let{_mostRecentTarget:r,mostRecentModality:i}=this._inputModalityDetector;if(i!=="mouse"||!r||r===n||n.nodeName!=="INPUT"&&n.nodeName!=="TEXTAREA"||n.disabled)return!1;let o=n.labels;if(o){for(let s=0;s<o.length;s++)if(o[s].contains(r))return!0}return!1}static \u0275fac=function(r){return new(r||t)};static \u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Ep=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Le({type:t,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(r,i){},styles:[`.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}
|
|
34
|
-
`],encapsulation:2,changeDetection:0})}return t})();var Kc=(()=>{class t{_platform=Z(on);constructor(){}isDisabled(n){return n.hasAttribute("disabled")}isVisible(n){return Hy(n)&&getComputedStyle(n).visibility==="visible"}isTabbable(n){if(!this._platform.isBrowser)return!1;let r=Uy(Xy(n));if(r&&(bp(r)===-1||!this.isVisible(r)))return!1;let i=n.nodeName.toLowerCase(),o=bp(n);return n.hasAttribute("contenteditable")?o!==-1:i==="iframe"||i==="object"||this._platform.WEBKIT&&this._platform.IOS&&!zy(n)?!1:i==="audio"?n.hasAttribute("controls")?o!==-1:!1:i==="video"?o===-1?!1:o!==null?!0:this._platform.FIREFOX||n.hasAttribute("controls"):n.tabIndex>=0}isFocusable(n,r){return Ky(n)&&!this.isDisabled(n)&&(r?.ignoreVisibility||this.isVisible(n))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Uy(t){try{return t.frameElement}catch{return null}}function Hy(t){return!!(t.offsetWidth||t.offsetHeight||typeof t.getClientRects=="function"&&t.getClientRects().length)}function jy(t){let e=t.nodeName.toLowerCase();return e==="input"||e==="select"||e==="button"||e==="textarea"}function $y(t){return Wy(t)&&t.type=="hidden"}function Gy(t){return Yy(t)&&t.hasAttribute("href")}function Wy(t){return t.nodeName.toLowerCase()=="input"}function Yy(t){return t.nodeName.toLowerCase()=="a"}function wp(t){if(!t.hasAttribute("tabindex")||t.tabIndex===void 0)return!1;let e=t.getAttribute("tabindex");return!!(e&&!isNaN(parseInt(e,10)))}function bp(t){if(!wp(t))return null;let e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}function zy(t){let e=t.nodeName.toLowerCase(),n=e==="input"&&t.type;return n==="text"||n==="password"||e==="select"||e==="textarea"}function Ky(t){return $y(t)?!1:jy(t)||Gy(t)||t.hasAttribute("contenteditable")||wp(t)}function Xy(t){return t.ownerDocument&&t.ownerDocument.defaultView||window}var zc=class{_element;_checker;_ngZone;_document;_injector;_startAnchor;_endAnchor;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}_enabled=!0;constructor(e,n,r,i,o=!1,s){this._element=e,this._checker=n,this._ngZone=r,this._document=i,this._injector=s,o||this.attachAnchors()}destroy(){let e=this._startAnchor,n=this._endAnchor;e&&(e.removeEventListener("focus",this.startAnchorListener),e.remove()),n&&(n.removeEventListener("focus",this.endAnchorListener),n.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(e){return new Promise(n=>{this._executeOnStable(()=>n(this.focusInitialElement(e)))})}focusFirstTabbableElementWhenReady(e){return new Promise(n=>{this._executeOnStable(()=>n(this.focusFirstTabbableElement(e)))})}focusLastTabbableElementWhenReady(e){return new Promise(n=>{this._executeOnStable(()=>n(this.focusLastTabbableElement(e)))})}_getRegionBoundary(e){let n=this._element.querySelectorAll(`[cdk-focus-region-${e}], [cdkFocusRegion${e}], [cdk-focus-${e}]`);return e=="start"?n.length?n[0]:this._getFirstTabbableElement(this._element):n.length?n[n.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(e){let n=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(n){if(!this._checker.isFocusable(n)){let r=this._getFirstTabbableElement(n);return r?.focus(e),!!r}return n.focus(e),!0}return this.focusFirstTabbableElement(e)}focusFirstTabbableElement(e){let n=this._getRegionBoundary("start");return n&&n.focus(e),!!n}focusLastTabbableElement(e){let n=this._getRegionBoundary("end");return n&&n.focus(e),!!n}hasAttached(){return this._hasAttached}_getFirstTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let n=e.children;for(let r=0;r<n.length;r++){let i=n[r].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(n[r]):null;if(i)return i}return null}_getLastTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let n=e.children;for(let r=n.length-1;r>=0;r--){let i=n[r].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(n[r]):null;if(i)return i}return null}_createAnchor(){let e=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,e),e.classList.add("cdk-visually-hidden"),e.classList.add("cdk-focus-trap-anchor"),e.setAttribute("aria-hidden","true"),e}_toggleAnchorTabIndex(e,n){e?n.setAttribute("tabindex","0"):n.removeAttribute("tabindex")}toggleAnchors(e){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}_executeOnStable(e){this._injector?mr(e,{injector:this._injector}):setTimeout(e)}},Cp=(()=>{class t{_checker=Z(Kc);_ngZone=Z(Mt);_document=Z(It);_injector=Z(Rt);constructor(){Z(ri).load(Ep)}create(n,r=!1){return new zc(n,this._checker,this._ngZone,this._document,r,this._injector)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Xc(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function ot(t){return t==null?"":typeof t=="string"?t:`${t}px`}function Sp(t,...e){return e.length?e.some(n=>t[n]):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}var Tp=Jl(),qc=class{_viewportRuler;_previousHTMLStyles={top:"",left:""};_previousScrollPosition;_isEnabled=!1;_document;constructor(e,n){this._viewportRuler=e,this._document=n}attach(){}enable(){if(this._canBeEnabled()){let e=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=e.style.left||"",this._previousHTMLStyles.top=e.style.top||"",e.style.left=ot(-this._previousScrollPosition.left),e.style.top=ot(-this._previousScrollPosition.top),e.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let e=this._document.documentElement,n=this._document.body,r=e.style,i=n.style,o=r.scrollBehavior||"",s=i.scrollBehavior||"";this._isEnabled=!1,r.left=this._previousHTMLStyles.left,r.top=this._previousHTMLStyles.top,e.classList.remove("cdk-global-scrollblock"),Tp&&(r.scrollBehavior=i.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),Tp&&(r.scrollBehavior=o,i.scrollBehavior=s)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let n=this._document.documentElement,r=this._viewportRuler.getViewportSize();return n.scrollHeight>r.height||n.scrollWidth>r.width}};var Zc=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(e,n,r,i){this._scrollDispatcher=e,this._ngZone=n,this._viewportRuler=r,this._config=i}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(this._scrollSubscription)return;let e=this._scrollDispatcher.scrolled(0).pipe(Sl(n=>!n||!this._overlayRef.overlayElement.contains(n.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(()=>{let n=this._viewportRuler.getViewportScrollPosition().top;Math.abs(n-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}_detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}},us=class{enable(){}disable(){}attach(){}};function Jc(t,e){return e.some(n=>{let r=t.bottom<n.top,i=t.top>n.bottom,o=t.right<n.left,s=t.left>n.right;return r||i||o||s})}function Ip(t,e){return e.some(n=>{let r=t.top<n.top,i=t.bottom>n.bottom,o=t.left<n.left,s=t.right>n.right;return r||i||o||s})}var Qc=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(e,n,r,i){this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=r,this._config=i}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(!this._scrollSubscription){let e=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(e).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let n=this._overlayRef.overlayElement.getBoundingClientRect(),{width:r,height:i}=this._viewportRuler.getViewportSize();Jc(n,[{width:r,height:i,bottom:i,right:r,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},Zy=(()=>{class t{_scrollDispatcher=Z(Ql);_viewportRuler=Z(Ps);_ngZone=Z(Mt);_document=Z(It);constructor(){}noop=()=>new us;close=n=>new Zc(this._scrollDispatcher,this._ngZone,this._viewportRuler,n);block=()=>new qc(this._viewportRuler,this._document);reposition=n=>new Qc(this._scrollDispatcher,this._viewportRuler,this._ngZone,n);static \u0275fac=function(r){return new(r||t)};static \u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Mi=class{positionStrategy;scrollStrategy=new us;panelClass="";hasBackdrop=!1;backdropClass="cdk-overlay-dark-backdrop";width;height;minWidth;minHeight;maxWidth;maxHeight;direction;disposeOnNavigation=!1;constructor(e){if(e){let n=Object.keys(e);for(let r of n)e[r]!==void 0&&(this[r]=e[r])}}};var el=class{connectionPair;scrollableViewProperties;constructor(e,n){this.connectionPair=e,this.scrollableViewProperties=n}};var Rp=(()=>{class t{_attachedOverlays=[];_document=Z(It);_isAttached;constructor(){}ngOnDestroy(){this.detach()}add(n){this.remove(n),this._attachedOverlays.push(n)}remove(n){let r=this._attachedOverlays.indexOf(n);r>-1&&this._attachedOverlays.splice(r,1),this._attachedOverlays.length===0&&this.detach()}static \u0275fac=function(r){return new(r||t)};static \u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Jy=(()=>{class t extends Rp{_ngZone=Z(Mt);_renderer=Z(gr).createRenderer(null,null);_cleanupKeydown;add(n){super.add(n),this._isAttached||(this._ngZone.runOutsideAngular(()=>{this._cleanupKeydown=this._renderer.listen("body","keydown",this._keydownListener)}),this._isAttached=!0)}detach(){this._isAttached&&(this._cleanupKeydown?.(),this._isAttached=!1)}_keydownListener=n=>{let r=this._attachedOverlays;for(let i=r.length-1;i>-1;i--)if(r[i]._keydownEvents.observers.length>0){this._ngZone.run(()=>r[i]._keydownEvents.next(n));break}};static \u0275fac=(()=>{let n;return function(i){return(n||(n=ti(t)))(i||t)}})();static \u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Qy=(()=>{class t extends Rp{_platform=Z(on);_ngZone=Z(Mt);_renderer=Z(gr).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget;_cleanups;add(n){if(super.add(n),!this._isAttached){let r=this._document.body,i={capture:!0};this._cleanups=this._ngZone.runOutsideAngular(()=>[In(this._renderer,r,"pointerdown",this._pointerDownListener,i),In(this._renderer,r,"click",this._clickListener,i),In(this._renderer,r,"auxclick",this._clickListener,i),In(this._renderer,r,"contextmenu",this._clickListener,i)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=r.style.cursor,r.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){this._isAttached&&(this._cleanups?.forEach(n=>n()),this._cleanups=void 0,this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}_pointerDownListener=n=>{this._pointerDownEventTarget=Tn(n)};_clickListener=n=>{let r=Tn(n),i=n.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:r;this._pointerDownEventTarget=null;let o=this._attachedOverlays.slice();for(let s=o.length-1;s>-1;s--){let c=o[s];if(c._outsidePointerEvents.observers.length<1||!c.hasAttached())continue;if(xp(c.overlayElement,r)||xp(c.overlayElement,i))break;let u=c._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>u.next(n)):u.next(n)}};static \u0275fac=(()=>{let n;return function(i){return(n||(n=ti(t)))(i||t)}})();static \u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function xp(t,e){let n=typeof ShadowRoot<"u"&&ShadowRoot,r=e;for(;r;){if(r===t)return!0;r=n&&r instanceof ShadowRoot?r.host:r.parentNode}return!1}var Mp=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Le({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(r,i){},styles:[`.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed}@layer cdk-overlay{.cdk-overlay-container{z-index:1000}}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute}@layer cdk-overlay{.cdk-global-overlay-wrapper{z-index:1000}}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%}@layer cdk-overlay{.cdk-overlay-pane{z-index:1000}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0}@layer cdk-overlay{.cdk-overlay-backdrop{z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}}@media(prefers-reduced-motion){.cdk-overlay-backdrop{transition-duration:1ms}}.cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}@layer cdk-overlay{.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px}@layer cdk-overlay{.cdk-overlay-connected-position-bounding-box{z-index:1000}}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}
|
|
35
|
-
`],encapsulation:2,changeDetection:0})}return t})(),ds=(()=>{class t{_platform=Z(on);_containerElement;_document=Z(It);_styleLoader=Z(ri);constructor(){}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let n="cdk-overlay-container";if(this._platform.isBrowser||Xc()){let i=this._document.querySelectorAll(`.${n}[platform="server"], .${n}[platform="test"]`);for(let o=0;o<i.length;o++)i[o].remove()}let r=this._document.createElement("div");r.classList.add(n),Xc()?r.setAttribute("platform","test"):this._platform.isBrowser||r.setAttribute("platform","server"),this._document.body.appendChild(r),this._containerElement=r}_loadStyles(){this._styleLoader.load(Mp)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),tl=class{_renderer;_ngZone;element;_cleanupClick;_cleanupTransitionEnd;_fallbackTimeout;constructor(e,n,r,i){this._renderer=n,this._ngZone=r,this.element=e.createElement("div"),this.element.classList.add("cdk-overlay-backdrop"),this._cleanupClick=n.listen(this.element,"click",i)}detach(){this._ngZone.runOutsideAngular(()=>{let e=this.element;clearTimeout(this._fallbackTimeout),this._cleanupTransitionEnd?.(),this._cleanupTransitionEnd=this._renderer.listen(e,"transitionend",this.dispose),this._fallbackTimeout=setTimeout(this.dispose,500),e.style.pointerEvents="none",e.classList.remove("cdk-overlay-backdrop-showing")})}dispose=()=>{clearTimeout(this._fallbackTimeout),this._cleanupClick?.(),this._cleanupTransitionEnd?.(),this._cleanupClick=this._cleanupTransitionEnd=this._fallbackTimeout=void 0,this.element.remove()}},zr=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new mt;_attachments=new mt;_detachments=new mt;_positionStrategy;_scrollStrategy;_locationChanges=ei.EMPTY;_backdropRef=null;_previousHostParent;_keydownEvents=new mt;_outsidePointerEvents=new mt;_renders=new mt;_afterRenderRef;_afterNextRenderRef;constructor(e,n,r,i,o,s,c,u,d,g=!1,p,E){this._portalOutlet=e,this._host=n,this._pane=r,this._config=i,this._ngZone=o,this._keyboardDispatcher=s,this._document=c,this._location=u,this._outsideClickDispatcher=d,this._animationsDisabled=g,this._injector=p,this._renderer=E,i.scrollStrategy&&(this._scrollStrategy=i.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=i.positionStrategy,this._afterRenderRef=Rs(()=>Ll(()=>{this._renders.next()},{injector:this._injector}))}get overlayElement(){return this._pane}get backdropElement(){return this._backdropRef?.element||null}get hostElement(){return this._host}attach(e){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let n=this._portalOutlet.attach(e);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=mr(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof n?.onDestroy=="function"&&n.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),n}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let e=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),e}dispose(){let e=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._backdropRef?.dispose(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=this._backdropRef=null,e&&this._detachments.next(),this._detachments.complete(),this._afterRenderRef.destroy(),this._renders.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(e){e!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=e,this.hasAttached()&&(e.attach(this),this.updatePosition()))}updateSize(e){this._config=O(O({},this._config),e),this._updateElementSize()}setDirection(e){this._config=we(O({},this._config),{direction:e}),this._updateElementDirection()}addPanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!0)}removePanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!1)}getDirection(){let e=this._config.direction;return e?typeof e=="string"?e:e.value:"ltr"}updateScrollStrategy(e){e!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=e,this.hasAttached()&&(e.attach(this),e.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let e=this._pane.style;e.width=ot(this._config.width),e.height=ot(this._config.height),e.minWidth=ot(this._config.minWidth),e.minHeight=ot(this._config.minHeight),e.maxWidth=ot(this._config.maxWidth),e.maxHeight=ot(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){let e="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new tl(this._document,this._renderer,this._ngZone,n=>{this._backdropClick.next(n)}),this._animationsDisabled&&this._backdropRef.element.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropRef.element,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropRef.element,this._host),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this._backdropRef?.element.classList.add(e))}):this._backdropRef.element.classList.add(e)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){this._animationsDisabled?(this._backdropRef?.dispose(),this._backdropRef=null):this._backdropRef?.detach()}_toggleClasses(e,n,r){let i=Ls(n||[]).filter(o=>!!o);i.length&&(r?e.classList.add(...i):e.classList.remove(...i))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let e=this._renders.pipe(hr(Vi(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),e.unsubscribe())})})}_disposeScrollStrategy(){let e=this._scrollStrategy;e?.disable(),e?.detach?.()}},Op="cdk-overlay-connected-position-bounding-box",e0=/([A-Za-z%]+)$/,nl=class{_viewportRuler;_document;_platform;_overlayContainer;_overlayRef;_isInitialRender;_lastBoundingBoxSize={width:0,height:0};_isPushed=!1;_canPush=!0;_growAfterOpen=!1;_hasFlexibleDimensions=!0;_positionLocked=!1;_originRect;_overlayRect;_viewportRect;_containerRect;_viewportMargin=0;_scrollables=[];_preferredPositions=[];_origin;_pane;_isDisposed;_boundingBox;_lastPosition;_lastScrollVisibility;_positionChanges=new mt;_resizeSubscription=ei.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount;positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(e,n,r,i,o){this._viewportRuler=n,this._document=r,this._platform=i,this._overlayContainer=o,this.setOrigin(e)}attach(e){this._overlayRef&&this._overlayRef,this._validatePositions(),e.hostElement.classList.add(Op),this._overlayRef=e,this._boundingBox=e.hostElement,this._pane=e.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._originRect,n=this._overlayRect,r=this._viewportRect,i=this._containerRect,o=[],s;for(let c of this._preferredPositions){let u=this._getOriginPoint(e,i,c),d=this._getOverlayPoint(u,n,c),g=this._getOverlayFit(d,n,r,c);if(g.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(c,u);return}if(this._canFitWithFlexibleDimensions(g,d,r)){o.push({position:c,origin:u,overlayRect:n,boundingBoxRect:this._calculateBoundingBoxRect(u,c)});continue}(!s||s.overlayFit.visibleArea<g.visibleArea)&&(s={overlayFit:g,overlayPoint:d,originPoint:u,position:c,overlayRect:n})}if(o.length){let c=null,u=-1;for(let d of o){let g=d.boundingBoxRect.width*d.boundingBoxRect.height*(d.position.weight||1);g>u&&(u=g,c=d)}this._isPushed=!1,this._applyPosition(c.position,c.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(s.position,s.originPoint);return}this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&dr(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(Op),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let e=this._lastPosition;if(e){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let n=this._getOriginPoint(this._originRect,this._containerRect,e);this._applyPosition(e,n)}else this.apply()}withScrollableContainers(e){return this._scrollables=e,this}withPositions(e){return this._preferredPositions=e,e.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(e){return this._viewportMargin=e,this}withFlexibleDimensions(e=!0){return this._hasFlexibleDimensions=e,this}withGrowAfterOpen(e=!0){return this._growAfterOpen=e,this}withPush(e=!0){return this._canPush=e,this}withLockedPosition(e=!0){return this._positionLocked=e,this}setOrigin(e){return this._origin=e,this}withDefaultOffsetX(e){return this._offsetX=e,this}withDefaultOffsetY(e){return this._offsetY=e,this}withTransformOriginOn(e){return this._transformOriginSelector=e,this}_getOriginPoint(e,n,r){let i;if(r.originX=="center")i=e.left+e.width/2;else{let s=this._isRtl()?e.right:e.left,c=this._isRtl()?e.left:e.right;i=r.originX=="start"?s:c}n.left<0&&(i-=n.left);let o;return r.originY=="center"?o=e.top+e.height/2:o=r.originY=="top"?e.top:e.bottom,n.top<0&&(o-=n.top),{x:i,y:o}}_getOverlayPoint(e,n,r){let i;r.overlayX=="center"?i=-n.width/2:r.overlayX==="start"?i=this._isRtl()?-n.width:0:i=this._isRtl()?0:-n.width;let o;return r.overlayY=="center"?o=-n.height/2:o=r.overlayY=="top"?0:-n.height,{x:e.x+i,y:e.y+o}}_getOverlayFit(e,n,r,i){let o=Dp(n),{x:s,y:c}=e,u=this._getOffset(i,"x"),d=this._getOffset(i,"y");u&&(s+=u),d&&(c+=d);let g=0-s,p=s+o.width-r.width,E=0-c,w=c+o.height-r.height,N=this._subtractOverflows(o.width,g,p),M=this._subtractOverflows(o.height,E,w),L=N*M;return{visibleArea:L,isCompletelyWithinViewport:o.width*o.height===L,fitsInViewportVertically:M===o.height,fitsInViewportHorizontally:N==o.width}}_canFitWithFlexibleDimensions(e,n,r){if(this._hasFlexibleDimensions){let i=r.bottom-n.y,o=r.right-n.x,s=Ap(this._overlayRef.getConfig().minHeight),c=Ap(this._overlayRef.getConfig().minWidth),u=e.fitsInViewportVertically||s!=null&&s<=i,d=e.fitsInViewportHorizontally||c!=null&&c<=o;return u&&d}return!1}_pushOverlayOnScreen(e,n,r){if(this._previousPushAmount&&this._positionLocked)return{x:e.x+this._previousPushAmount.x,y:e.y+this._previousPushAmount.y};let i=Dp(n),o=this._viewportRect,s=Math.max(e.x+i.width-o.width,0),c=Math.max(e.y+i.height-o.height,0),u=Math.max(o.top-r.top-e.y,0),d=Math.max(o.left-r.left-e.x,0),g=0,p=0;return i.width<=o.width?g=d||-s:g=e.x<this._viewportMargin?o.left-r.left-e.x:0,i.height<=o.height?p=u||-c:p=e.y<this._viewportMargin?o.top-r.top-e.y:0,this._previousPushAmount={x:g,y:p},{x:e.x+g,y:e.y+p}}_applyPosition(e,n){if(this._setTransformOrigin(e),this._setOverlayElementStyles(n,e),this._setBoundingBoxStyles(n,e),e.panelClass&&this._addPanelClasses(e.panelClass),this._positionChanges.observers.length){let r=this._getScrollVisibility();if(e!==this._lastPosition||!this._lastScrollVisibility||!t0(this._lastScrollVisibility,r)){let i=new el(e,r);this._positionChanges.next(i)}this._lastScrollVisibility=r}this._lastPosition=e,this._isInitialRender=!1}_setTransformOrigin(e){if(!this._transformOriginSelector)return;let n=this._boundingBox.querySelectorAll(this._transformOriginSelector),r,i=e.overlayY;e.overlayX==="center"?r="center":this._isRtl()?r=e.overlayX==="start"?"right":"left":r=e.overlayX==="start"?"left":"right";for(let o=0;o<n.length;o++)n[o].style.transformOrigin=`${r} ${i}`}_calculateBoundingBoxRect(e,n){let r=this._viewportRect,i=this._isRtl(),o,s,c;if(n.overlayY==="top")s=e.y,o=r.height-s+this._viewportMargin;else if(n.overlayY==="bottom")c=r.height-e.y+this._viewportMargin*2,o=r.height-c+this._viewportMargin;else{let w=Math.min(r.bottom-e.y+r.top,e.y),N=this._lastBoundingBoxSize.height;o=w*2,s=e.y-w,o>N&&!this._isInitialRender&&!this._growAfterOpen&&(s=e.y-N/2)}let u=n.overlayX==="start"&&!i||n.overlayX==="end"&&i,d=n.overlayX==="end"&&!i||n.overlayX==="start"&&i,g,p,E;if(d)E=r.width-e.x+this._viewportMargin*2,g=e.x-this._viewportMargin;else if(u)p=e.x,g=r.right-e.x;else{let w=Math.min(r.right-e.x+r.left,e.x),N=this._lastBoundingBoxSize.width;g=w*2,p=e.x-w,g>N&&!this._isInitialRender&&!this._growAfterOpen&&(p=e.x-N/2)}return{top:s,left:p,bottom:c,right:E,width:g,height:o}}_setBoundingBoxStyles(e,n){let r=this._calculateBoundingBoxRect(e,n);!this._isInitialRender&&!this._growAfterOpen&&(r.height=Math.min(r.height,this._lastBoundingBoxSize.height),r.width=Math.min(r.width,this._lastBoundingBoxSize.width));let i={};if(this._hasExactPosition())i.top=i.left="0",i.bottom=i.right=i.maxHeight=i.maxWidth="",i.width=i.height="100%";else{let o=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;i.height=ot(r.height),i.top=ot(r.top),i.bottom=ot(r.bottom),i.width=ot(r.width),i.left=ot(r.left),i.right=ot(r.right),n.overlayX==="center"?i.alignItems="center":i.alignItems=n.overlayX==="end"?"flex-end":"flex-start",n.overlayY==="center"?i.justifyContent="center":i.justifyContent=n.overlayY==="bottom"?"flex-end":"flex-start",o&&(i.maxHeight=ot(o)),s&&(i.maxWidth=ot(s))}this._lastBoundingBoxSize=r,dr(this._boundingBox.style,i)}_resetBoundingBoxStyles(){dr(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){dr(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(e,n){let r={},i=this._hasExactPosition(),o=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(i){let g=this._viewportRuler.getViewportScrollPosition();dr(r,this._getExactOverlayY(n,e,g)),dr(r,this._getExactOverlayX(n,e,g))}else r.position="static";let c="",u=this._getOffset(n,"x"),d=this._getOffset(n,"y");u&&(c+=`translateX(${u}px) `),d&&(c+=`translateY(${d}px)`),r.transform=c.trim(),s.maxHeight&&(i?r.maxHeight=ot(s.maxHeight):o&&(r.maxHeight="")),s.maxWidth&&(i?r.maxWidth=ot(s.maxWidth):o&&(r.maxWidth="")),dr(this._pane.style,r)}_getExactOverlayY(e,n,r){let i={top:"",bottom:""},o=this._getOverlayPoint(n,this._overlayRect,e);if(this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,r)),e.overlayY==="bottom"){let s=this._document.documentElement.clientHeight;i.bottom=`${s-(o.y+this._overlayRect.height)}px`}else i.top=ot(o.y);return i}_getExactOverlayX(e,n,r){let i={left:"",right:""},o=this._getOverlayPoint(n,this._overlayRect,e);this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,r));let s;if(this._isRtl()?s=e.overlayX==="end"?"left":"right":s=e.overlayX==="end"?"right":"left",s==="right"){let c=this._document.documentElement.clientWidth;i.right=`${c-(o.x+this._overlayRect.width)}px`}else i.left=ot(o.x);return i}_getScrollVisibility(){let e=this._getOriginRect(),n=this._pane.getBoundingClientRect(),r=this._scrollables.map(i=>i.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:Ip(e,r),isOriginOutsideView:Jc(e,r),isOverlayClipped:Ip(n,r),isOverlayOutsideView:Jc(n,r)}}_subtractOverflows(e,...n){return n.reduce((r,i)=>r-Math.max(i,0),e)}_getNarrowedViewportRect(){let e=this._document.documentElement.clientWidth,n=this._document.documentElement.clientHeight,r=this._viewportRuler.getViewportScrollPosition();return{top:r.top+this._viewportMargin,left:r.left+this._viewportMargin,right:r.left+e-this._viewportMargin,bottom:r.top+n-this._viewportMargin,width:e-2*this._viewportMargin,height:n-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(e,n){return n==="x"?e.offsetX==null?this._offsetX:e.offsetX:e.offsetY==null?this._offsetY:e.offsetY}_validatePositions(){}_addPanelClasses(e){this._pane&&Ls(e).forEach(n=>{n!==""&&this._appliedPanelClasses.indexOf(n)===-1&&(this._appliedPanelClasses.push(n),this._pane.classList.add(n))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(e=>{this._pane.classList.remove(e)}),this._appliedPanelClasses=[])}_getOriginRect(){let e=this._origin;if(e instanceof Ct)return e.nativeElement.getBoundingClientRect();if(e instanceof Element)return e.getBoundingClientRect();let n=e.width||0,r=e.height||0;return{top:e.y,bottom:e.y+r,left:e.x,right:e.x+n,height:r,width:n}}};function dr(t,e){for(let n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function Ap(t){if(typeof t!="number"&&t!=null){let[e,n]=t.split(e0);return!n||n==="px"?parseFloat(e):null}return t||null}function Dp(t){return{top:Math.floor(t.top),right:Math.floor(t.right),bottom:Math.floor(t.bottom),left:Math.floor(t.left),width:Math.floor(t.width),height:Math.floor(t.height)}}function t0(t,e){return t===e?!0:t.isOriginClipped===e.isOriginClipped&&t.isOriginOutsideView===e.isOriginOutsideView&&t.isOverlayClipped===e.isOverlayClipped&&t.isOverlayOutsideView===e.isOverlayOutsideView}var Np="cdk-global-overlay-wrapper",rl=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(e){let n=e.getConfig();this._overlayRef=e,this._width&&!n.width&&e.updateSize({width:this._width}),this._height&&!n.height&&e.updateSize({height:this._height}),e.hostElement.classList.add(Np),this._isDisposed=!1}top(e=""){return this._bottomOffset="",this._topOffset=e,this._alignItems="flex-start",this}left(e=""){return this._xOffset=e,this._xPosition="left",this}bottom(e=""){return this._topOffset="",this._bottomOffset=e,this._alignItems="flex-end",this}right(e=""){return this._xOffset=e,this._xPosition="right",this}start(e=""){return this._xOffset=e,this._xPosition="start",this}end(e=""){return this._xOffset=e,this._xPosition="end",this}width(e=""){return this._overlayRef?this._overlayRef.updateSize({width:e}):this._width=e,this}height(e=""){return this._overlayRef?this._overlayRef.updateSize({height:e}):this._height=e,this}centerHorizontally(e=""){return this.left(e),this._xPosition="center",this}centerVertically(e=""){return this.top(e),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let e=this._overlayRef.overlayElement.style,n=this._overlayRef.hostElement.style,r=this._overlayRef.getConfig(),{width:i,height:o,maxWidth:s,maxHeight:c}=r,u=(i==="100%"||i==="100vw")&&(!s||s==="100%"||s==="100vw"),d=(o==="100%"||o==="100vh")&&(!c||c==="100%"||c==="100vh"),g=this._xPosition,p=this._xOffset,E=this._overlayRef.getConfig().direction==="rtl",w="",N="",M="";u?M="flex-start":g==="center"?(M="center",E?N=p:w=p):E?g==="left"||g==="end"?(M="flex-end",w=p):(g==="right"||g==="start")&&(M="flex-start",N=p):g==="left"||g==="start"?(M="flex-start",w=p):(g==="right"||g==="end")&&(M="flex-end",N=p),e.position=this._cssPosition,e.marginLeft=u?"0":w,e.marginTop=d?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=u?"0":N,n.justifyContent=M,n.alignItems=d?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let e=this._overlayRef.overlayElement.style,n=this._overlayRef.hostElement,r=n.style;n.classList.remove(Np),r.justifyContent=r.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}},n0=(()=>{class t{_viewportRuler=Z(Ps);_document=Z(It);_platform=Z(on);_overlayContainer=Z(ds);constructor(){}global(){return new rl}flexibleConnectedTo(n){return new nl(n,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),il=(()=>{class t{scrollStrategies=Z(Zy);_overlayContainer=Z(ds);_positionBuilder=Z(n0);_keyboardDispatcher=Z(Jy);_injector=Z(Rt);_ngZone=Z(Mt);_document=Z(It);_directionality=Z(ii);_location=Z(Gl);_outsideClickDispatcher=Z(Qy);_animationsModuleType=Z(Pl,{optional:!0});_idGenerator=Z(Ki);_renderer=Z(gr).createRenderer(null,null);_appRef;_styleLoader=Z(ri);constructor(){}create(n){this._styleLoader.load(Mp);let r=this._createHostElement(),i=this._createPaneElement(r),o=this._createPortalOutlet(i),s=new Mi(n);return s.direction=s.direction||this._directionality.value,new zr(o,r,i,s,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations",this._injector.get(Bi),this._renderer)}position(){return this._positionBuilder}_createPaneElement(n){let r=this._document.createElement("div");return r.id=this._idGenerator.getId("cdk-overlay-"),r.classList.add("cdk-overlay-pane"),n.appendChild(r),r}_createHostElement(){let n=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalOutlet(n){return this._appRef||(this._appRef=this._injector.get($i)),new as(n,null,this._appRef,this._injector,this._document)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function r0(t,e){}var Kr=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;width="";height="";minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;closeOnNavigation=!0;closeOnDestroy=!0;closeOnOverlayDetachments=!0;componentFactoryResolver;providers;container;templateContext};var i0=(()=>{class t extends Yr{_elementRef=Z(Ct);_focusTrapFactory=Z(Cp);_config;_interactivityChecker=Z(Kc);_ngZone=Z(Mt);_overlayRef=Z(zr);_focusMonitor=Z(yp);_renderer=Z(Os);_platform=Z(on);_document=Z(It,{optional:!0});_portalOutlet;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_changeDetectorRef=Z(qn);_injector=Z(Rt);_isDestroyed=!1;constructor(){super(),this._config=Z(Kr,{optional:!0})||new Kr,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(n){this._ariaLabelledByQueue.push(n),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(n){let r=this._ariaLabelledByQueue.indexOf(n);r>-1&&(this._ariaLabelledByQueue.splice(r,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachComponentPortal(n);return this._contentAttached(),r}attachTemplatePortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachTemplatePortal(n);return this._contentAttached(),r}attachDomPortal=n=>{this._portalOutlet.hasAttached();let r=this._portalOutlet.attachDomPortal(n);return this._contentAttached(),r};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(n,r){this._interactivityChecker.isFocusable(n)||(n.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let i=()=>{o(),s(),n.removeAttribute("tabindex")},o=this._renderer.listen(n,"blur",i),s=this._renderer.listen(n,"mousedown",i)})),n.focus(r)}_focusByCssSelector(n,r){let i=this._elementRef.nativeElement.querySelector(n);i&&this._forceFocus(i,r)}_trapFocus(n){this._isDestroyed||mr(()=>{let r=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||r.focus(n);break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement(n)||this._focusDialogContainer(n);break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',n);break;default:this._focusByCssSelector(this._config.autoFocus,n);break}},{injector:this._injector})}_restoreFocus(){let n=this._config.restoreFocus,r=null;if(typeof n=="string"?r=this._document.querySelector(n):typeof n=="boolean"?r=n?this._elementFocusedBeforeDialogWasOpened:null:n&&(r=n),this._config.restoreFocus&&r&&typeof r.focus=="function"){let i=Yi(),o=this._elementRef.nativeElement;(!i||i===this._document.body||i===o||o.contains(i))&&(this._focusMonitor?(this._focusMonitor.focusVia(r,this._closeInteractionType),this._closeInteractionType=null):r.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(n){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus(n)}_containsFocus(){let n=this._elementRef.nativeElement,r=Yi();return n===r||n.contains(r)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Yi()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Le({type:t,selectors:[["cdk-dialog-container"]],viewQuery:function(r,i){if(r&1&&zn(Wc,7),r&2){let o;Kn(o=Xn())&&(i._portalOutlet=o.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(r,i){r&2&&Cn("id",i._config.id||null)("role",i._config.role)("aria-modal",i._config.ariaModal)("aria-labelledby",i._config.ariaLabel?null:i._ariaLabelledByQueue[0])("aria-label",i._config.ariaLabel)("aria-describedby",i._config.ariaDescribedBy||null)},features:[St],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(r,i){r&1&&Oe(0,r0,0,0,"ng-template",0)},dependencies:[Wc],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}
|
|
36
|
-
`],encapsulation:2})}return t})(),
|
|
33
|
+
`)+" ".concat(u,"\\").concat(d,"/"))}e.seenObjects[e.seenObjects.length-1].obj=t}if(Array.isArray(t))return Iy(t,e);if(t===void 0)return null;if(t instanceof Date||iy(t)){var g=t.getTime(),p=g>-1&&g<2534023188e5;return e.legacy?e.relaxed&&p?{$date:t.getTime()}:{$date:tp(t)}:e.relaxed&&p?{$date:tp(t)}:{$date:{$numberLong:t.getTime().toString()}}}if(typeof t=="number"&&(!e.relaxed||!isFinite(t))){if(Math.floor(t)===t){var E=t>=pp&&t<=fp,w=t>=mp&&t<=hp;if(E)return{$numberInt:t.toString()};if(w)return{$numberLong:t.toString()}}return{$numberDouble:t.toString()}}if(t instanceof RegExp||ry(t)){var N=t.flags;if(N===void 0){var M=t.toString().match(/[gimuy]*$/);M&&(N=M[0])}var L=new Di(t.source,N);return L.toExtendedJSON(e)}return t!=null&&typeof t=="object"?Oy(t,e):t}var xy={Binary:function(t){return new lr(t.value(),t.sub_type)},Code:function(t){return new ns(t.code,t.scope)},DBRef:function(t){return new Ai(t.collection||t.namespace,t.oid,t.db,t.fields)},Decimal128:function(t){return new Uc(t.bytes)},Double:function(t){return new rs(t.value)},Int32:function(t){return new is(t.value)},Long:function(t){return le.fromBits(t.low!=null?t.low:t.low_,t.low!=null?t.high:t.high_,t.low!=null?t.unsigned:t.unsigned_)},MaxKey:function(){return new Hc},MinKey:function(){return new jc},ObjectID:function(t){return new Nt(t)},ObjectId:function(t){return new Nt(t)},BSONRegExp:function(t){return new Di(t.pattern,t.options)},Symbol:function(t){return new $c(t.value)},Timestamp:function(t){return dp.fromBits(t.low,t.high)}};function Oy(t,e){if(t==null||typeof t!="object")throw new cr("not an object instance");var n=t._bsontype;if(typeof n>"u"){var r={};for(var i in t){e.seenObjects.push({propertyName:i,obj:null});try{var o=jn(t[i],e);i==="__proto__"?Object.defineProperty(r,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):r[i]=o}finally{e.seenObjects.pop()}}return r}else if(Sy(t)){var s=t;if(typeof s.toExtendedJSON!="function"){var c=xy[t._bsontype];if(!c)throw new Qe("Unrecognized or invalid _bsontype: "+t._bsontype);s=c(s)}return n==="Code"&&s.scope?s=new ns(s.code,jn(s.scope,e)):n==="DBRef"&&s.oid&&(s=new Ai(jn(s.collection,e),jn(s.oid,e),jn(s.db,e),jn(s.fields,e))),s.toExtendedJSON(e)}else throw new cr("_bsontype must be a string, but was: "+typeof n)}var np;(function(t){function e(o,s){var c=Object.assign({},{relaxed:!0,legacy:!1},s);return typeof c.relaxed=="boolean"&&(c.strict=!c.relaxed),typeof c.strict=="boolean"&&(c.relaxed=!c.strict),JSON.parse(o,function(u,d){if(u.indexOf("\0")!==-1)throw new cr("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(u)));return gp(d,c)})}t.parse=e;function n(o,s,c,u){c!=null&&typeof c=="object"&&(u=c,c=0),s!=null&&typeof s=="object"&&!Array.isArray(s)&&(u=s,s=void 0,c=0);var d=Object.assign({relaxed:!0,legacy:!1},u,{seenObjects:[{propertyName:"(root)",obj:null}]}),g=jn(o,d);return JSON.stringify(g,s,c)}t.stringify=n;function r(o,s){return s=s||{},JSON.parse(n(o,s))}t.serialize=r;function i(o,s){return s=s||{},e(JSON.stringify(o),s)}t.deserialize=i})(np||(np={}));var rp,ip=sp();ip.Map?rp=ip.Map:rp=function(){function t(e){e===void 0&&(e=[]),this._keys=[],this._values={};for(var n=0;n<e.length;n++)if(e[n]!=null){var r=e[n],i=r[0],o=r[1];this._keys.push(i),this._values[i]={v:o,i:this._keys.length-1}}}return t.prototype.clear=function(){this._keys=[],this._values={}},t.prototype.delete=function(e){var n=this._values[e];return n==null?!1:(delete this._values[e],this._keys.splice(n.i,1),!0)},t.prototype.entries=function(){var e=this,n=0;return{next:function(){var r=e._keys[n++];return{value:r!==void 0?[r,e._values[r].v]:void 0,done:r===void 0}}}},t.prototype.forEach=function(e,n){n=n||this;for(var r=0;r<this._keys.length;r++){var i=this._keys[r];e.call(n,this._values[i].v,i,n)}},t.prototype.get=function(e){return this._values[e]?this._values[e].v:void 0},t.prototype.has=function(e){return this._values[e]!=null},t.prototype.keys=function(){var e=this,n=0;return{next:function(){var r=e._keys[n++];return{value:r!==void 0?r:void 0,done:r===void 0}}}},t.prototype.set=function(e,n){return this._values[e]?(this._values[e].v=n,this):(this._keys.push(e),this._values[e]={v:n,i:this._keys.length-1},this)},t.prototype.values=function(){var e=this,n=0;return{next:function(){var r=e._keys[n++];return{value:r!==void 0?e._values[r].v:void 0,done:r===void 0}}}},Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),t}();var TD=le.fromNumber(sy),ID=le.fromNumber(ay);var Fc=new Uint8Array(8),xD=new DataView(Fc.buffer,Fc.byteOffset,Fc.byteLength);var Ay=1024*1024*17,OD=Fe.alloc(Ay);var os=class{triggerID;nudgeID;engagementID;contentID;shortID;contentType;variation;props;objective;onsiteDeliveryType;holdout;constructor(e){e=e||{},this.triggerID=e.id||e.triggerID,this.nudgeID=e.nudgeID,this.shortID=e.shortID,this.contentType=e.contentType,this.engagementID=e.engagementID,this.contentID=e.contentID,this.variation=e.variation,this.props=e.props,this.objective=e.objective,this.onsiteDeliveryType=e.onsiteDeliveryType,this.holdout=e.holdout}};var jr=class{constructor(e,n={},r,i){this.name=e;this.properties=n;this.id=i?new Nt(i):new Nt,this.occurred=new Date,r&&(this.trigger=new os(r)),this.newEvent=!i}trigger;items;videos;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber;locale};function Dy(t,e){t&1&&(Vt(),Se(0,"path",3))}function Ny(t,e){t&1&&(Vt(),Se(0,"path",4))}var $r=class t{muted;videoEl;toggled=new at;toggleMute(e){e.stopPropagation(),e.preventDefault(),this.muted=!this.muted,this.videoEl.muted=this.muted,this.toggled.emit(this.muted),this.muted||this.videoEl.play()}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Le({type:t,selectors:[["cooee-mute-toggle"]],inputs:{muted:"muted",videoEl:"videoEl"},outputs:{toggled:"toggled"},decls:5,vars:1,consts:[["type","button",1,"lc:bg-black/50",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M4.34 2.93L2.93 4.34 7.29 8.7 7 9H3v6h4l5 5v-6.59l4.18 4.18c-.65.49-1.38.88-2.18 1.11v2.06c1.34-.3 2.57-.92 3.61-1.75l2.05 2.05 1.41-1.41L4.34 2.93zM10 15.17L7.83 13H5v-2h2.83l.88-.88L10 11.41v3.76zM19 12c0 .82-.15 1.61-.41 2.34l1.53 1.53c.56-1.17.88-2.48.88-3.87 0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zm-7-8l-1.88 1.88L12 7.76zm4.5 8c0-1.77-1.02-3.29-2.5-4.03v1.79l2.48 2.48c.01-.08.02-.16.02-.24z"],["d","M3 9v6h4l5 5V4L7 9H3zm7-.17v6.34L7.83 13H5v-2h2.83L10 8.83zM16.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77 0-4.28-2.99-7.86-7-8.77z"]],template:function(n,r){n&1&&(W(0,"button",0),Me("click",function(o){return r.toggleMute(o)}),Vt(),W(1,"svg",1),Se(2,"path",2),Oe(3,Dy,1,0,":svg:path",3)(4,Ny,1,0,":svg:path",4),z()()),n&2&&(B(3),Te(r.muted?3:4))},styles:["button[_ngcontent-%COMP%]{width:40px;height:40px;display:flex;justify-content:center;align-items:center;border:none;cursor:pointer;border-radius:100%}"]})};var Ry=t=>({"lc:cursor-grab":t}),My=(t,e)=>e.url;function Py(t,e){if(t&1&&Se(0,"source",11),t&2){let n=e.$implicit;Sn("type",n.mimeType),pe("src",n.url,ct)}}var ss=class t{constructor(e){this.elementRef=e}video;closeClicked=new at;videoClicked=new at;isDragging=!1;ngOnInit(){let e=this.elementRef.nativeElement.parentElement.parentElement;e.style.zIndex="2147483647"}close(){this.closeClicked.emit()}onVideoClick(){if(this.isDragging){this.isDragging=!1;return}this.videoClicked.emit()}static \u0275fac=function(n){return new(n||t)(tn(Ct))};static \u0275cmp=Le({type:t,selectors:[["cooee-draggable-video-popup"]],inputs:{video:"video"},outputs:{closeClicked:"closeClicked",videoClicked:"videoClicked"},decls:14,vars:5,consts:[["role","button","tabindex","0","cdkDrag","",1,"lc-popup-inner","lc:shadow-2xl","lc:rounded-lg","lc:flex","lc:justify-center","lc:items-center",3,"click","keyup","cdkDragMoved","ngClass","cdkDragBoundary"],[1,"lc-close-button","lc:absolute","lc:-top-3.5","lc:-right-3.5","lc:bg-black/50","lc:rounded-full","lc:w-8","lc:h-8","lc:border-none","lc:z-10","lc:flex","lc:justify-center","lc:items-center",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"],[1,"lc-play-button"],[1,"lc-icon"],["viewBox","0 0 28.31 30"],["d","M19.15,1.29A1.24,1.24,0,0,0,17.82.15a1.36,1.36,0,0,0-.35.07,3.2,3.2,0,0,0-.65.46l-5.06,4.6a1.24,1.24,0,0,0,0,1.75l0,0a1.22,1.22,0,0,0,.89.39,1.25,1.25,0,0,0,.85-.32l3-2.78.17-.13v8l2.44,2.62ZM26.79,26.6l-7.64-7.93-2.5-2.58-6-6.34L8.9,8,5.23,4.15a1.17,1.17,0,0,0-1.66,0h0a1.18,1.18,0,0,0,0,1.66h0L6.1,8.47H3.32a2.94,2.94,0,0,0-2.45,3v7.16a3,3,0,0,0,2.86,3.08H8.07a.44.44,0,0,1,.33.13C9.7,23,11,24.19,12.26,25.36L17,29.7a1.24,1.24,0,0,0,2.17-1V22.21l5.95,6.15a1.2,1.2,0,0,0,1.67,0,1.17,1.17,0,0,0,.08-1.66Zm-10.14-.67-.18-.11L9.75,19.67a1.72,1.72,0,0,0-1.16-.45H4c-.48,0-.59-.11-.59-.61V11.55c0-.49,0-.6.59-.6H8.29l8.29,8.55ZM29.09,15.07A9.9,9.9,0,0,1,26.33,22l-.11.13a1.24,1.24,0,0,1-2-.28,1.29,1.29,0,0,1,.24-1.52h0a6.77,6.77,0,0,0,1.32-1.89,7.41,7.41,0,0,0-1.37-8.55,1.24,1.24,0,0,1-.08-1.75,1.33,1.33,0,0,1,.41-.29,1.19,1.19,0,0,1,1.34.2A8.88,8.88,0,0,1,28,10.36a10,10,0,0,1,1.17,4.17A3.35,3.35,0,0,1,29.09,15.07Z","transform","translate(-0.86 -0.14)","fill","#191919"],[1,"lc-text"],["loop","","preload","auto","playsinline","","autoplay","",1,"lc:rounded-lg","lc:w-full",3,"muted"],[3,"src","type"]],template:function(n,r){n&1&&(W(0,"div",0),Me("click",function(){return r.onVideoClick()})("keyup",function(){return r.onVideoClick()})("cdkDragMoved",function(){return r.isDragging=!0}),W(1,"button",1),Me("click",function(o){return o.stopPropagation(),r.close()}),Vt(),W(2,"svg",2),Se(3,"path",3)(4,"path",4),z()(),Gn(),W(5,"div",5)(6,"div",6),Vt(),W(7,"svg",7),Se(8,"path",8),z()(),Gn(),W(9,"div",9),Ae(10,"Tap to unmute"),z()(),W(11,"video",10),tt(12,Py,1,2,"source",11,My),z()()),n&2&&(pe("ngClass",Wi(3,Ry,r.isDragging))("cdkDragBoundary","body"),B(11),pe("muted",!0),B(),nt(r.video.sources))},dependencies:[Ln,eu],styles:["[_nghost-%COMP%]{position:fixed;display:block;right:24px;bottom:24px;max-width:150px}.lc-play-button[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(1);transition:all .1s ease-in-out;z-index:999;flex-wrap:wrap;width:100%;max-width:130px;border-radius:5px;padding:5px 10px;background-color:#97979761;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.lc-play-button[_ngcontent-%COMP%] .lc-icon[_ngcontent-%COMP%]{width:14px;height:14px}.lc-play-button[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:#fff}.lc-play-button[_ngcontent-%COMP%] .lc-text[_ngcontent-%COMP%]{font-size:11px;line-height:1;color:#fff;font-weight:400;margin-left:5px;text-align:center}"]})};var Ri=class{_attachedHost;attach(e){return this._attachedHost=e,e.attach(this)}detach(){let e=this._attachedHost;e!=null&&(this._attachedHost=null,e.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(e){this._attachedHost=e}},Gr=class extends Ri{component;viewContainerRef;injector;componentFactoryResolver;projectableNodes;constructor(e,n,r,i,o){super(),this.component=e,this.viewContainerRef=n,this.injector=r,this.projectableNodes=o}},Wr=class extends Ri{templateRef;viewContainerRef;context;injector;constructor(e,n,r,i){super(),this.templateRef=e,this.viewContainerRef=n,this.context=r,this.injector=i}get origin(){return this.templateRef.elementRef}attach(e,n=this.context){return this.context=n,super.attach(e)}detach(){return this.context=void 0,super.detach()}},Gc=class extends Ri{element;constructor(e){super(),this.element=e instanceof Ct?e.nativeElement:e}},Yr=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(e){if(e instanceof Gr)return this._attachedPortal=e,this.attachComponentPortal(e);if(e instanceof Wr)return this._attachedPortal=e,this.attachTemplatePortal(e);if(this.attachDomPortal&&e instanceof Gc)return this._attachedPortal=e,this.attachDomPortal(e)}attachDomPortal=null;detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(e){this._disposeFn=e}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}};var as=class extends Yr{outletElement;_appRef;_defaultInjector;_document;constructor(e,n,r,i,o){super(),this.outletElement=e,this._appRef=r,this._defaultInjector=i,this._document=o}attachComponentPortal(e){let n;if(e.viewContainerRef){let r=e.injector||e.viewContainerRef.injector,i=r.get(Ds,null,{optional:!0})||void 0;n=e.viewContainerRef.createComponent(e.component,{index:e.viewContainerRef.length,injector:r,ngModuleRef:i,projectableNodes:e.projectableNodes||void 0}),this.setDisposeFn(()=>n.destroy())}else{let r=this._appRef,i=e.injector||this._defaultInjector||Rt.NULL,o=i.get(Ui,r.injector);n=$l(e.component,{elementInjector:i,environmentInjector:o,projectableNodes:e.projectableNodes||void 0}),r.attachView(n.hostView),this.setDisposeFn(()=>{r.viewCount>0&&r.detachView(n.hostView),n.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(n)),this._attachedPortal=e,n}attachTemplatePortal(e){let n=e.viewContainerRef,r=n.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return r.rootNodes.forEach(i=>this.outletElement.appendChild(i)),r.detectChanges(),this.setDisposeFn(()=>{let i=n.indexOf(r);i!==-1&&n.remove(i)}),this._attachedPortal=e,r}attachDomPortal=e=>{let n=e.element;n.parentNode;let r=this._document.createComment("dom-portal");n.parentNode.insertBefore(r,n),this.outletElement.appendChild(n),this._attachedPortal=e,super.setDisposeFn(()=>{r.parentNode&&r.parentNode.replaceChild(n,r)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(e){return e.hostView.rootNodes[0]}};var Wc=(()=>{class t extends Yr{_moduleRef=Z(Ds,{optional:!0});_document=Z(It);_viewContainerRef=Z(As);_isInitialized=!1;_attachedRef;constructor(){super()}get portal(){return this._attachedPortal}set portal(n){this.hasAttached()&&!n&&!this._isInitialized||(this.hasAttached()&&super.detach(),n&&super.attach(n),this._attachedPortal=n||null)}attached=new at;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(n){n.setAttachedHost(this);let r=n.viewContainerRef!=null?n.viewContainerRef:this._viewContainerRef,i=r.createComponent(n.component,{index:r.length,injector:n.injector||r.injector,projectableNodes:n.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0});return r!==this._viewContainerRef&&this._getRootNode().appendChild(i.hostView.rootNodes[0]),super.setDisposeFn(()=>i.destroy()),this._attachedPortal=n,this._attachedRef=i,this.attached.emit(i),i}attachTemplatePortal(n){n.setAttachedHost(this);let r=this._viewContainerRef.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=n,this._attachedRef=r,this.attached.emit(r),r}attachDomPortal=n=>{let r=n.element;r.parentNode;let i=this._document.createComment("dom-portal");n.setAttachedHost(this),r.parentNode.insertBefore(i,r),this._getRootNode().appendChild(r),this._attachedPortal=n,super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(r,i)})};_getRootNode(){let n=this._viewContainerRef.element.nativeElement;return n.nodeType===n.ELEMENT_NODE?n:n.parentNode}static \u0275fac=function(r){return new(r||t)};static \u0275dir=gr({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[St]})}return t})();var Mi;function Ly(){if(Mi==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Mi=!0}))}finally{Mi=Mi||!1}return Mi}function _p(t){return Ly()?t:!!t.capture}var Fy=new en("cdk-input-modality-detector-options"),ky={ignoreKeys:[18,17,224,91,16]},vp=650,Yc={passive:!0,capture:!0},Vy=(()=>{class t{_platform=Z(rn);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new vl(null);_options;_lastTouchMs=0;_onKeydown=n=>{this._options?.ignoreKeys?.some(r=>r===n.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=Tn(n))};_onMousedown=n=>{Date.now()-this._lastTouchMs<vp||(this._modality.next(ql(n)?"keyboard":"mouse"),this._mostRecentTarget=Tn(n))};_onTouchstart=n=>{if(Zl(n)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Tn(n)};constructor(){let n=Z(Mt),r=Z(It),i=Z(Fy,{optional:!0});if(this._options=O(O({},ky),i),this.modalityDetected=this._modality.pipe(Il(1)),this.modalityChanged=this.modalityDetected.pipe(Tl()),this._platform.isBrowser){let o=Z(mr).createRenderer(null,null);this._listenerCleanups=n.runOutsideAngular(()=>[In(o,r,"keydown",this._onKeydown,Yc),In(o,r,"mousedown",this._onMousedown,Yc),In(o,r,"touchstart",this._onTouchstart,Yc)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(n=>n())}static \u0275fac=function(r){return new(r||t)};static \u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ls=function(t){return t[t.IMMEDIATE=0]="IMMEDIATE",t[t.EVENTUAL=1]="EVENTUAL",t}(ls||{}),By=new en("cdk-focus-monitor-default-options"),cs=_p({passive:!0,capture:!0}),yp=(()=>{class t{_ngZone=Z(Mt);_platform=Z(rn);_inputModalityDetector=Z(Vy);_origin=null;_lastFocusOrigin;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=Z(It,{optional:!0});_stopInputModalityDetector=new mt;constructor(){let n=Z(By,{optional:!0});this._detectionMode=n?.detectionMode||ls.IMMEDIATE}_rootNodeFocusAndBlurListener=n=>{let r=Tn(n);for(let i=r;i;i=i.parentElement)n.type==="focus"?this._onFocus(n,i):this._onBlur(n,i)};monitor(n,r=!1){let i=Ki(n);if(!this._platform.isBrowser||i.nodeType!==1)return Vi();let o=Xl(i)||this._getDocument(),s=this._elementInfo.get(i);if(s)return r&&(s.checkChildren=!0),s.subject;let c={checkChildren:r,subject:new mt,rootNode:o};return this._elementInfo.set(i,c),this._registerGlobalListeners(c),c.subject}stopMonitoring(n){let r=Ki(n),i=this._elementInfo.get(r);i&&(i.subject.complete(),this._setClasses(r),this._elementInfo.delete(r),this._removeGlobalListeners(i))}focusVia(n,r,i){let o=Ki(n),s=this._getDocument().activeElement;o===s?this._getClosestElementsInfo(o).forEach(([c,u])=>this._originChanged(c,r,u)):(this._setOrigin(r),typeof o.focus=="function"&&o.focus(i))}ngOnDestroy(){this._elementInfo.forEach((n,r)=>this.stopMonitoring(r))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(n){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(n)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:n&&this._isLastInteractionFromInputLabel(n)?"mouse":"program"}_shouldBeAttributedToTouch(n){return this._detectionMode===ls.EVENTUAL||!!n?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(n,r){n.classList.toggle("cdk-focused",!!r),n.classList.toggle("cdk-touch-focused",r==="touch"),n.classList.toggle("cdk-keyboard-focused",r==="keyboard"),n.classList.toggle("cdk-mouse-focused",r==="mouse"),n.classList.toggle("cdk-program-focused",r==="program")}_setOrigin(n,r=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=n,this._originFromTouchInteraction=n==="touch"&&r,this._detectionMode===ls.IMMEDIATE){clearTimeout(this._originTimeoutId);let i=this._originFromTouchInteraction?vp:1;this._originTimeoutId=setTimeout(()=>this._origin=null,i)}})}_onFocus(n,r){let i=this._elementInfo.get(r),o=Tn(n);!i||!i.checkChildren&&r!==o||this._originChanged(r,this._getFocusOrigin(o),i)}_onBlur(n,r){let i=this._elementInfo.get(r);!i||i.checkChildren&&n.relatedTarget instanceof Node&&r.contains(n.relatedTarget)||(this._setClasses(r),this._emitOrigin(i,null))}_emitOrigin(n,r){n.subject.observers.length&&this._ngZone.run(()=>n.subject.next(r))}_registerGlobalListeners(n){if(!this._platform.isBrowser)return;let r=n.rootNode,i=this._rootNodeFocusListenerCount.get(r)||0;i||this._ngZone.runOutsideAngular(()=>{r.addEventListener("focus",this._rootNodeFocusAndBlurListener,cs),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,cs)}),this._rootNodeFocusListenerCount.set(r,i+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(pr(this._stopInputModalityDetector)).subscribe(o=>{this._setOrigin(o,!0)}))}_removeGlobalListeners(n){let r=n.rootNode;if(this._rootNodeFocusListenerCount.has(r)){let i=this._rootNodeFocusListenerCount.get(r);i>1?this._rootNodeFocusListenerCount.set(r,i-1):(r.removeEventListener("focus",this._rootNodeFocusAndBlurListener,cs),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,cs),this._rootNodeFocusListenerCount.delete(r))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(n,r,i){this._setClasses(n,r),this._emitOrigin(i,r),this._lastFocusOrigin=r}_getClosestElementsInfo(n){let r=[];return this._elementInfo.forEach((i,o)=>{(o===n||i.checkChildren&&o.contains(n))&&r.push([o,i])}),r}_isLastInteractionFromInputLabel(n){let{_mostRecentTarget:r,mostRecentModality:i}=this._inputModalityDetector;if(i!=="mouse"||!r||r===n||n.nodeName!=="INPUT"&&n.nodeName!=="TEXTAREA"||n.disabled)return!1;let o=n.labels;if(o){for(let s=0;s<o.length;s++)if(o[s].contains(r))return!0}return!1}static \u0275fac=function(r){return new(r||t)};static \u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Ep=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Le({type:t,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(r,i){},styles:[`.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}
|
|
34
|
+
`],encapsulation:2,changeDetection:0})}return t})();var Kc=(()=>{class t{_platform=Z(rn);constructor(){}isDisabled(n){return n.hasAttribute("disabled")}isVisible(n){return Hy(n)&&getComputedStyle(n).visibility==="visible"}isTabbable(n){if(!this._platform.isBrowser)return!1;let r=Uy(Xy(n));if(r&&(bp(r)===-1||!this.isVisible(r)))return!1;let i=n.nodeName.toLowerCase(),o=bp(n);return n.hasAttribute("contenteditable")?o!==-1:i==="iframe"||i==="object"||this._platform.WEBKIT&&this._platform.IOS&&!zy(n)?!1:i==="audio"?n.hasAttribute("controls")?o!==-1:!1:i==="video"?o===-1?!1:o!==null?!0:this._platform.FIREFOX||n.hasAttribute("controls"):n.tabIndex>=0}isFocusable(n,r){return Ky(n)&&!this.isDisabled(n)&&(r?.ignoreVisibility||this.isVisible(n))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Uy(t){try{return t.frameElement}catch{return null}}function Hy(t){return!!(t.offsetWidth||t.offsetHeight||typeof t.getClientRects=="function"&&t.getClientRects().length)}function jy(t){let e=t.nodeName.toLowerCase();return e==="input"||e==="select"||e==="button"||e==="textarea"}function $y(t){return Wy(t)&&t.type=="hidden"}function Gy(t){return Yy(t)&&t.hasAttribute("href")}function Wy(t){return t.nodeName.toLowerCase()=="input"}function Yy(t){return t.nodeName.toLowerCase()=="a"}function wp(t){if(!t.hasAttribute("tabindex")||t.tabIndex===void 0)return!1;let e=t.getAttribute("tabindex");return!!(e&&!isNaN(parseInt(e,10)))}function bp(t){if(!wp(t))return null;let e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}function zy(t){let e=t.nodeName.toLowerCase(),n=e==="input"&&t.type;return n==="text"||n==="password"||e==="select"||e==="textarea"}function Ky(t){return $y(t)?!1:jy(t)||Gy(t)||t.hasAttribute("contenteditable")||wp(t)}function Xy(t){return t.ownerDocument&&t.ownerDocument.defaultView||window}var zc=class{_element;_checker;_ngZone;_document;_injector;_startAnchor;_endAnchor;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}_enabled=!0;constructor(e,n,r,i,o=!1,s){this._element=e,this._checker=n,this._ngZone=r,this._document=i,this._injector=s,o||this.attachAnchors()}destroy(){let e=this._startAnchor,n=this._endAnchor;e&&(e.removeEventListener("focus",this.startAnchorListener),e.remove()),n&&(n.removeEventListener("focus",this.endAnchorListener),n.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(e){return new Promise(n=>{this._executeOnStable(()=>n(this.focusInitialElement(e)))})}focusFirstTabbableElementWhenReady(e){return new Promise(n=>{this._executeOnStable(()=>n(this.focusFirstTabbableElement(e)))})}focusLastTabbableElementWhenReady(e){return new Promise(n=>{this._executeOnStable(()=>n(this.focusLastTabbableElement(e)))})}_getRegionBoundary(e){let n=this._element.querySelectorAll(`[cdk-focus-region-${e}], [cdkFocusRegion${e}], [cdk-focus-${e}]`);return e=="start"?n.length?n[0]:this._getFirstTabbableElement(this._element):n.length?n[n.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(e){let n=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(n){if(!this._checker.isFocusable(n)){let r=this._getFirstTabbableElement(n);return r?.focus(e),!!r}return n.focus(e),!0}return this.focusFirstTabbableElement(e)}focusFirstTabbableElement(e){let n=this._getRegionBoundary("start");return n&&n.focus(e),!!n}focusLastTabbableElement(e){let n=this._getRegionBoundary("end");return n&&n.focus(e),!!n}hasAttached(){return this._hasAttached}_getFirstTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let n=e.children;for(let r=0;r<n.length;r++){let i=n[r].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(n[r]):null;if(i)return i}return null}_getLastTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let n=e.children;for(let r=n.length-1;r>=0;r--){let i=n[r].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(n[r]):null;if(i)return i}return null}_createAnchor(){let e=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,e),e.classList.add("cdk-visually-hidden"),e.classList.add("cdk-focus-trap-anchor"),e.setAttribute("aria-hidden","true"),e}_toggleAnchorTabIndex(e,n){e?n.setAttribute("tabindex","0"):n.removeAttribute("tabindex")}toggleAnchors(e){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}_executeOnStable(e){this._injector?hr(e,{injector:this._injector}):setTimeout(e)}},Cp=(()=>{class t{_checker=Z(Kc);_ngZone=Z(Mt);_document=Z(It);_injector=Z(Rt);constructor(){Z(ii).load(Ep)}create(n,r=!1){return new zc(n,this._checker,this._ngZone,this._document,r,this._injector)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Xc(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function ot(t){return t==null?"":typeof t=="string"?t:`${t}px`}function Sp(t,...e){return e.length?e.some(n=>t[n]):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}var Tp=Jl(),qc=class{_viewportRuler;_previousHTMLStyles={top:"",left:""};_previousScrollPosition;_isEnabled=!1;_document;constructor(e,n){this._viewportRuler=e,this._document=n}attach(){}enable(){if(this._canBeEnabled()){let e=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=e.style.left||"",this._previousHTMLStyles.top=e.style.top||"",e.style.left=ot(-this._previousScrollPosition.left),e.style.top=ot(-this._previousScrollPosition.top),e.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let e=this._document.documentElement,n=this._document.body,r=e.style,i=n.style,o=r.scrollBehavior||"",s=i.scrollBehavior||"";this._isEnabled=!1,r.left=this._previousHTMLStyles.left,r.top=this._previousHTMLStyles.top,e.classList.remove("cdk-global-scrollblock"),Tp&&(r.scrollBehavior=i.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),Tp&&(r.scrollBehavior=o,i.scrollBehavior=s)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let n=this._document.documentElement,r=this._viewportRuler.getViewportSize();return n.scrollHeight>r.height||n.scrollWidth>r.width}};var Zc=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(e,n,r,i){this._scrollDispatcher=e,this._ngZone=n,this._viewportRuler=r,this._config=i}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(this._scrollSubscription)return;let e=this._scrollDispatcher.scrolled(0).pipe(Sl(n=>!n||!this._overlayRef.overlayElement.contains(n.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(()=>{let n=this._viewportRuler.getViewportScrollPosition().top;Math.abs(n-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}_detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}},us=class{enable(){}disable(){}attach(){}};function Jc(t,e){return e.some(n=>{let r=t.bottom<n.top,i=t.top>n.bottom,o=t.right<n.left,s=t.left>n.right;return r||i||o||s})}function Ip(t,e){return e.some(n=>{let r=t.top<n.top,i=t.bottom>n.bottom,o=t.left<n.left,s=t.right>n.right;return r||i||o||s})}var Qc=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(e,n,r,i){this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=r,this._config=i}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(!this._scrollSubscription){let e=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(e).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let n=this._overlayRef.overlayElement.getBoundingClientRect(),{width:r,height:i}=this._viewportRuler.getViewportSize();Jc(n,[{width:r,height:i,bottom:i,right:r,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},Zy=(()=>{class t{_scrollDispatcher=Z(Ql);_viewportRuler=Z(Ps);_ngZone=Z(Mt);_document=Z(It);constructor(){}noop=()=>new us;close=n=>new Zc(this._scrollDispatcher,this._ngZone,this._viewportRuler,n);block=()=>new qc(this._viewportRuler,this._document);reposition=n=>new Qc(this._scrollDispatcher,this._viewportRuler,this._ngZone,n);static \u0275fac=function(r){return new(r||t)};static \u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Pi=class{positionStrategy;scrollStrategy=new us;panelClass="";hasBackdrop=!1;backdropClass="cdk-overlay-dark-backdrop";width;height;minWidth;minHeight;maxWidth;maxHeight;direction;disposeOnNavigation=!1;constructor(e){if(e){let n=Object.keys(e);for(let r of n)e[r]!==void 0&&(this[r]=e[r])}}};var el=class{connectionPair;scrollableViewProperties;constructor(e,n){this.connectionPair=e,this.scrollableViewProperties=n}};var Rp=(()=>{class t{_attachedOverlays=[];_document=Z(It);_isAttached;constructor(){}ngOnDestroy(){this.detach()}add(n){this.remove(n),this._attachedOverlays.push(n)}remove(n){let r=this._attachedOverlays.indexOf(n);r>-1&&this._attachedOverlays.splice(r,1),this._attachedOverlays.length===0&&this.detach()}static \u0275fac=function(r){return new(r||t)};static \u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Jy=(()=>{class t extends Rp{_ngZone=Z(Mt);_renderer=Z(mr).createRenderer(null,null);_cleanupKeydown;add(n){super.add(n),this._isAttached||(this._ngZone.runOutsideAngular(()=>{this._cleanupKeydown=this._renderer.listen("body","keydown",this._keydownListener)}),this._isAttached=!0)}detach(){this._isAttached&&(this._cleanupKeydown?.(),this._isAttached=!1)}_keydownListener=n=>{let r=this._attachedOverlays;for(let i=r.length-1;i>-1;i--)if(r[i]._keydownEvents.observers.length>0){this._ngZone.run(()=>r[i]._keydownEvents.next(n));break}};static \u0275fac=(()=>{let n;return function(i){return(n||(n=ti(t)))(i||t)}})();static \u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Qy=(()=>{class t extends Rp{_platform=Z(rn);_ngZone=Z(Mt);_renderer=Z(mr).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget;_cleanups;add(n){if(super.add(n),!this._isAttached){let r=this._document.body,i={capture:!0};this._cleanups=this._ngZone.runOutsideAngular(()=>[In(this._renderer,r,"pointerdown",this._pointerDownListener,i),In(this._renderer,r,"click",this._clickListener,i),In(this._renderer,r,"auxclick",this._clickListener,i),In(this._renderer,r,"contextmenu",this._clickListener,i)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=r.style.cursor,r.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){this._isAttached&&(this._cleanups?.forEach(n=>n()),this._cleanups=void 0,this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}_pointerDownListener=n=>{this._pointerDownEventTarget=Tn(n)};_clickListener=n=>{let r=Tn(n),i=n.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:r;this._pointerDownEventTarget=null;let o=this._attachedOverlays.slice();for(let s=o.length-1;s>-1;s--){let c=o[s];if(c._outsidePointerEvents.observers.length<1||!c.hasAttached())continue;if(xp(c.overlayElement,r)||xp(c.overlayElement,i))break;let u=c._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>u.next(n)):u.next(n)}};static \u0275fac=(()=>{let n;return function(i){return(n||(n=ti(t)))(i||t)}})();static \u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function xp(t,e){let n=typeof ShadowRoot<"u"&&ShadowRoot,r=e;for(;r;){if(r===t)return!0;r=n&&r instanceof ShadowRoot?r.host:r.parentNode}return!1}var Mp=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Le({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(r,i){},styles:[`.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed}@layer cdk-overlay{.cdk-overlay-container{z-index:1000}}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute}@layer cdk-overlay{.cdk-global-overlay-wrapper{z-index:1000}}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%}@layer cdk-overlay{.cdk-overlay-pane{z-index:1000}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0}@layer cdk-overlay{.cdk-overlay-backdrop{z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}}@media(prefers-reduced-motion){.cdk-overlay-backdrop{transition-duration:1ms}}.cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}@layer cdk-overlay{.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px}@layer cdk-overlay{.cdk-overlay-connected-position-bounding-box{z-index:1000}}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}
|
|
35
|
+
`],encapsulation:2,changeDetection:0})}return t})(),ds=(()=>{class t{_platform=Z(rn);_containerElement;_document=Z(It);_styleLoader=Z(ii);constructor(){}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let n="cdk-overlay-container";if(this._platform.isBrowser||Xc()){let i=this._document.querySelectorAll(`.${n}[platform="server"], .${n}[platform="test"]`);for(let o=0;o<i.length;o++)i[o].remove()}let r=this._document.createElement("div");r.classList.add(n),Xc()?r.setAttribute("platform","test"):this._platform.isBrowser||r.setAttribute("platform","server"),this._document.body.appendChild(r),this._containerElement=r}_loadStyles(){this._styleLoader.load(Mp)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),tl=class{_renderer;_ngZone;element;_cleanupClick;_cleanupTransitionEnd;_fallbackTimeout;constructor(e,n,r,i){this._renderer=n,this._ngZone=r,this.element=e.createElement("div"),this.element.classList.add("cdk-overlay-backdrop"),this._cleanupClick=n.listen(this.element,"click",i)}detach(){this._ngZone.runOutsideAngular(()=>{let e=this.element;clearTimeout(this._fallbackTimeout),this._cleanupTransitionEnd?.(),this._cleanupTransitionEnd=this._renderer.listen(e,"transitionend",this.dispose),this._fallbackTimeout=setTimeout(this.dispose,500),e.style.pointerEvents="none",e.classList.remove("cdk-overlay-backdrop-showing")})}dispose=()=>{clearTimeout(this._fallbackTimeout),this._cleanupClick?.(),this._cleanupTransitionEnd?.(),this._cleanupClick=this._cleanupTransitionEnd=this._fallbackTimeout=void 0,this.element.remove()}},zr=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new mt;_attachments=new mt;_detachments=new mt;_positionStrategy;_scrollStrategy;_locationChanges=ei.EMPTY;_backdropRef=null;_previousHostParent;_keydownEvents=new mt;_outsidePointerEvents=new mt;_renders=new mt;_afterRenderRef;_afterNextRenderRef;constructor(e,n,r,i,o,s,c,u,d,g=!1,p,E){this._portalOutlet=e,this._host=n,this._pane=r,this._config=i,this._ngZone=o,this._keyboardDispatcher=s,this._document=c,this._location=u,this._outsideClickDispatcher=d,this._animationsDisabled=g,this._injector=p,this._renderer=E,i.scrollStrategy&&(this._scrollStrategy=i.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=i.positionStrategy,this._afterRenderRef=Rs(()=>Ll(()=>{this._renders.next()},{injector:this._injector}))}get overlayElement(){return this._pane}get backdropElement(){return this._backdropRef?.element||null}get hostElement(){return this._host}attach(e){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let n=this._portalOutlet.attach(e);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=hr(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof n?.onDestroy=="function"&&n.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),n}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let e=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),e}dispose(){let e=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._backdropRef?.dispose(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=this._backdropRef=null,e&&this._detachments.next(),this._detachments.complete(),this._afterRenderRef.destroy(),this._renders.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(e){e!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=e,this.hasAttached()&&(e.attach(this),this.updatePosition()))}updateSize(e){this._config=O(O({},this._config),e),this._updateElementSize()}setDirection(e){this._config=we(O({},this._config),{direction:e}),this._updateElementDirection()}addPanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!0)}removePanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!1)}getDirection(){let e=this._config.direction;return e?typeof e=="string"?e:e.value:"ltr"}updateScrollStrategy(e){e!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=e,this.hasAttached()&&(e.attach(this),e.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let e=this._pane.style;e.width=ot(this._config.width),e.height=ot(this._config.height),e.minWidth=ot(this._config.minWidth),e.minHeight=ot(this._config.minHeight),e.maxWidth=ot(this._config.maxWidth),e.maxHeight=ot(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){let e="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new tl(this._document,this._renderer,this._ngZone,n=>{this._backdropClick.next(n)}),this._animationsDisabled&&this._backdropRef.element.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropRef.element,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropRef.element,this._host),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this._backdropRef?.element.classList.add(e))}):this._backdropRef.element.classList.add(e)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){this._animationsDisabled?(this._backdropRef?.dispose(),this._backdropRef=null):this._backdropRef?.detach()}_toggleClasses(e,n,r){let i=Ls(n||[]).filter(o=>!!o);i.length&&(r?e.classList.add(...i):e.classList.remove(...i))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let e=this._renders.pipe(pr(Bi(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),e.unsubscribe())})})}_disposeScrollStrategy(){let e=this._scrollStrategy;e?.disable(),e?.detach?.()}},Op="cdk-overlay-connected-position-bounding-box",e0=/([A-Za-z%]+)$/,nl=class{_viewportRuler;_document;_platform;_overlayContainer;_overlayRef;_isInitialRender;_lastBoundingBoxSize={width:0,height:0};_isPushed=!1;_canPush=!0;_growAfterOpen=!1;_hasFlexibleDimensions=!0;_positionLocked=!1;_originRect;_overlayRect;_viewportRect;_containerRect;_viewportMargin=0;_scrollables=[];_preferredPositions=[];_origin;_pane;_isDisposed;_boundingBox;_lastPosition;_lastScrollVisibility;_positionChanges=new mt;_resizeSubscription=ei.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount;positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(e,n,r,i,o){this._viewportRuler=n,this._document=r,this._platform=i,this._overlayContainer=o,this.setOrigin(e)}attach(e){this._overlayRef&&this._overlayRef,this._validatePositions(),e.hostElement.classList.add(Op),this._overlayRef=e,this._boundingBox=e.hostElement,this._pane=e.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._originRect,n=this._overlayRect,r=this._viewportRect,i=this._containerRect,o=[],s;for(let c of this._preferredPositions){let u=this._getOriginPoint(e,i,c),d=this._getOverlayPoint(u,n,c),g=this._getOverlayFit(d,n,r,c);if(g.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(c,u);return}if(this._canFitWithFlexibleDimensions(g,d,r)){o.push({position:c,origin:u,overlayRect:n,boundingBoxRect:this._calculateBoundingBoxRect(u,c)});continue}(!s||s.overlayFit.visibleArea<g.visibleArea)&&(s={overlayFit:g,overlayPoint:d,originPoint:u,position:c,overlayRect:n})}if(o.length){let c=null,u=-1;for(let d of o){let g=d.boundingBoxRect.width*d.boundingBoxRect.height*(d.position.weight||1);g>u&&(u=g,c=d)}this._isPushed=!1,this._applyPosition(c.position,c.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(s.position,s.originPoint);return}this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&ur(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(Op),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let e=this._lastPosition;if(e){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let n=this._getOriginPoint(this._originRect,this._containerRect,e);this._applyPosition(e,n)}else this.apply()}withScrollableContainers(e){return this._scrollables=e,this}withPositions(e){return this._preferredPositions=e,e.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(e){return this._viewportMargin=e,this}withFlexibleDimensions(e=!0){return this._hasFlexibleDimensions=e,this}withGrowAfterOpen(e=!0){return this._growAfterOpen=e,this}withPush(e=!0){return this._canPush=e,this}withLockedPosition(e=!0){return this._positionLocked=e,this}setOrigin(e){return this._origin=e,this}withDefaultOffsetX(e){return this._offsetX=e,this}withDefaultOffsetY(e){return this._offsetY=e,this}withTransformOriginOn(e){return this._transformOriginSelector=e,this}_getOriginPoint(e,n,r){let i;if(r.originX=="center")i=e.left+e.width/2;else{let s=this._isRtl()?e.right:e.left,c=this._isRtl()?e.left:e.right;i=r.originX=="start"?s:c}n.left<0&&(i-=n.left);let o;return r.originY=="center"?o=e.top+e.height/2:o=r.originY=="top"?e.top:e.bottom,n.top<0&&(o-=n.top),{x:i,y:o}}_getOverlayPoint(e,n,r){let i;r.overlayX=="center"?i=-n.width/2:r.overlayX==="start"?i=this._isRtl()?-n.width:0:i=this._isRtl()?0:-n.width;let o;return r.overlayY=="center"?o=-n.height/2:o=r.overlayY=="top"?0:-n.height,{x:e.x+i,y:e.y+o}}_getOverlayFit(e,n,r,i){let o=Dp(n),{x:s,y:c}=e,u=this._getOffset(i,"x"),d=this._getOffset(i,"y");u&&(s+=u),d&&(c+=d);let g=0-s,p=s+o.width-r.width,E=0-c,w=c+o.height-r.height,N=this._subtractOverflows(o.width,g,p),M=this._subtractOverflows(o.height,E,w),L=N*M;return{visibleArea:L,isCompletelyWithinViewport:o.width*o.height===L,fitsInViewportVertically:M===o.height,fitsInViewportHorizontally:N==o.width}}_canFitWithFlexibleDimensions(e,n,r){if(this._hasFlexibleDimensions){let i=r.bottom-n.y,o=r.right-n.x,s=Ap(this._overlayRef.getConfig().minHeight),c=Ap(this._overlayRef.getConfig().minWidth),u=e.fitsInViewportVertically||s!=null&&s<=i,d=e.fitsInViewportHorizontally||c!=null&&c<=o;return u&&d}return!1}_pushOverlayOnScreen(e,n,r){if(this._previousPushAmount&&this._positionLocked)return{x:e.x+this._previousPushAmount.x,y:e.y+this._previousPushAmount.y};let i=Dp(n),o=this._viewportRect,s=Math.max(e.x+i.width-o.width,0),c=Math.max(e.y+i.height-o.height,0),u=Math.max(o.top-r.top-e.y,0),d=Math.max(o.left-r.left-e.x,0),g=0,p=0;return i.width<=o.width?g=d||-s:g=e.x<this._viewportMargin?o.left-r.left-e.x:0,i.height<=o.height?p=u||-c:p=e.y<this._viewportMargin?o.top-r.top-e.y:0,this._previousPushAmount={x:g,y:p},{x:e.x+g,y:e.y+p}}_applyPosition(e,n){if(this._setTransformOrigin(e),this._setOverlayElementStyles(n,e),this._setBoundingBoxStyles(n,e),e.panelClass&&this._addPanelClasses(e.panelClass),this._positionChanges.observers.length){let r=this._getScrollVisibility();if(e!==this._lastPosition||!this._lastScrollVisibility||!t0(this._lastScrollVisibility,r)){let i=new el(e,r);this._positionChanges.next(i)}this._lastScrollVisibility=r}this._lastPosition=e,this._isInitialRender=!1}_setTransformOrigin(e){if(!this._transformOriginSelector)return;let n=this._boundingBox.querySelectorAll(this._transformOriginSelector),r,i=e.overlayY;e.overlayX==="center"?r="center":this._isRtl()?r=e.overlayX==="start"?"right":"left":r=e.overlayX==="start"?"left":"right";for(let o=0;o<n.length;o++)n[o].style.transformOrigin=`${r} ${i}`}_calculateBoundingBoxRect(e,n){let r=this._viewportRect,i=this._isRtl(),o,s,c;if(n.overlayY==="top")s=e.y,o=r.height-s+this._viewportMargin;else if(n.overlayY==="bottom")c=r.height-e.y+this._viewportMargin*2,o=r.height-c+this._viewportMargin;else{let w=Math.min(r.bottom-e.y+r.top,e.y),N=this._lastBoundingBoxSize.height;o=w*2,s=e.y-w,o>N&&!this._isInitialRender&&!this._growAfterOpen&&(s=e.y-N/2)}let u=n.overlayX==="start"&&!i||n.overlayX==="end"&&i,d=n.overlayX==="end"&&!i||n.overlayX==="start"&&i,g,p,E;if(d)E=r.width-e.x+this._viewportMargin*2,g=e.x-this._viewportMargin;else if(u)p=e.x,g=r.right-e.x;else{let w=Math.min(r.right-e.x+r.left,e.x),N=this._lastBoundingBoxSize.width;g=w*2,p=e.x-w,g>N&&!this._isInitialRender&&!this._growAfterOpen&&(p=e.x-N/2)}return{top:s,left:p,bottom:c,right:E,width:g,height:o}}_setBoundingBoxStyles(e,n){let r=this._calculateBoundingBoxRect(e,n);!this._isInitialRender&&!this._growAfterOpen&&(r.height=Math.min(r.height,this._lastBoundingBoxSize.height),r.width=Math.min(r.width,this._lastBoundingBoxSize.width));let i={};if(this._hasExactPosition())i.top=i.left="0",i.bottom=i.right=i.maxHeight=i.maxWidth="",i.width=i.height="100%";else{let o=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;i.height=ot(r.height),i.top=ot(r.top),i.bottom=ot(r.bottom),i.width=ot(r.width),i.left=ot(r.left),i.right=ot(r.right),n.overlayX==="center"?i.alignItems="center":i.alignItems=n.overlayX==="end"?"flex-end":"flex-start",n.overlayY==="center"?i.justifyContent="center":i.justifyContent=n.overlayY==="bottom"?"flex-end":"flex-start",o&&(i.maxHeight=ot(o)),s&&(i.maxWidth=ot(s))}this._lastBoundingBoxSize=r,ur(this._boundingBox.style,i)}_resetBoundingBoxStyles(){ur(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){ur(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(e,n){let r={},i=this._hasExactPosition(),o=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(i){let g=this._viewportRuler.getViewportScrollPosition();ur(r,this._getExactOverlayY(n,e,g)),ur(r,this._getExactOverlayX(n,e,g))}else r.position="static";let c="",u=this._getOffset(n,"x"),d=this._getOffset(n,"y");u&&(c+=`translateX(${u}px) `),d&&(c+=`translateY(${d}px)`),r.transform=c.trim(),s.maxHeight&&(i?r.maxHeight=ot(s.maxHeight):o&&(r.maxHeight="")),s.maxWidth&&(i?r.maxWidth=ot(s.maxWidth):o&&(r.maxWidth="")),ur(this._pane.style,r)}_getExactOverlayY(e,n,r){let i={top:"",bottom:""},o=this._getOverlayPoint(n,this._overlayRect,e);if(this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,r)),e.overlayY==="bottom"){let s=this._document.documentElement.clientHeight;i.bottom=`${s-(o.y+this._overlayRect.height)}px`}else i.top=ot(o.y);return i}_getExactOverlayX(e,n,r){let i={left:"",right:""},o=this._getOverlayPoint(n,this._overlayRect,e);this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,r));let s;if(this._isRtl()?s=e.overlayX==="end"?"left":"right":s=e.overlayX==="end"?"right":"left",s==="right"){let c=this._document.documentElement.clientWidth;i.right=`${c-(o.x+this._overlayRect.width)}px`}else i.left=ot(o.x);return i}_getScrollVisibility(){let e=this._getOriginRect(),n=this._pane.getBoundingClientRect(),r=this._scrollables.map(i=>i.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:Ip(e,r),isOriginOutsideView:Jc(e,r),isOverlayClipped:Ip(n,r),isOverlayOutsideView:Jc(n,r)}}_subtractOverflows(e,...n){return n.reduce((r,i)=>r-Math.max(i,0),e)}_getNarrowedViewportRect(){let e=this._document.documentElement.clientWidth,n=this._document.documentElement.clientHeight,r=this._viewportRuler.getViewportScrollPosition();return{top:r.top+this._viewportMargin,left:r.left+this._viewportMargin,right:r.left+e-this._viewportMargin,bottom:r.top+n-this._viewportMargin,width:e-2*this._viewportMargin,height:n-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(e,n){return n==="x"?e.offsetX==null?this._offsetX:e.offsetX:e.offsetY==null?this._offsetY:e.offsetY}_validatePositions(){}_addPanelClasses(e){this._pane&&Ls(e).forEach(n=>{n!==""&&this._appliedPanelClasses.indexOf(n)===-1&&(this._appliedPanelClasses.push(n),this._pane.classList.add(n))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(e=>{this._pane.classList.remove(e)}),this._appliedPanelClasses=[])}_getOriginRect(){let e=this._origin;if(e instanceof Ct)return e.nativeElement.getBoundingClientRect();if(e instanceof Element)return e.getBoundingClientRect();let n=e.width||0,r=e.height||0;return{top:e.y,bottom:e.y+r,left:e.x,right:e.x+n,height:r,width:n}}};function ur(t,e){for(let n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function Ap(t){if(typeof t!="number"&&t!=null){let[e,n]=t.split(e0);return!n||n==="px"?parseFloat(e):null}return t||null}function Dp(t){return{top:Math.floor(t.top),right:Math.floor(t.right),bottom:Math.floor(t.bottom),left:Math.floor(t.left),width:Math.floor(t.width),height:Math.floor(t.height)}}function t0(t,e){return t===e?!0:t.isOriginClipped===e.isOriginClipped&&t.isOriginOutsideView===e.isOriginOutsideView&&t.isOverlayClipped===e.isOverlayClipped&&t.isOverlayOutsideView===e.isOverlayOutsideView}var Np="cdk-global-overlay-wrapper",rl=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(e){let n=e.getConfig();this._overlayRef=e,this._width&&!n.width&&e.updateSize({width:this._width}),this._height&&!n.height&&e.updateSize({height:this._height}),e.hostElement.classList.add(Np),this._isDisposed=!1}top(e=""){return this._bottomOffset="",this._topOffset=e,this._alignItems="flex-start",this}left(e=""){return this._xOffset=e,this._xPosition="left",this}bottom(e=""){return this._topOffset="",this._bottomOffset=e,this._alignItems="flex-end",this}right(e=""){return this._xOffset=e,this._xPosition="right",this}start(e=""){return this._xOffset=e,this._xPosition="start",this}end(e=""){return this._xOffset=e,this._xPosition="end",this}width(e=""){return this._overlayRef?this._overlayRef.updateSize({width:e}):this._width=e,this}height(e=""){return this._overlayRef?this._overlayRef.updateSize({height:e}):this._height=e,this}centerHorizontally(e=""){return this.left(e),this._xPosition="center",this}centerVertically(e=""){return this.top(e),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let e=this._overlayRef.overlayElement.style,n=this._overlayRef.hostElement.style,r=this._overlayRef.getConfig(),{width:i,height:o,maxWidth:s,maxHeight:c}=r,u=(i==="100%"||i==="100vw")&&(!s||s==="100%"||s==="100vw"),d=(o==="100%"||o==="100vh")&&(!c||c==="100%"||c==="100vh"),g=this._xPosition,p=this._xOffset,E=this._overlayRef.getConfig().direction==="rtl",w="",N="",M="";u?M="flex-start":g==="center"?(M="center",E?N=p:w=p):E?g==="left"||g==="end"?(M="flex-end",w=p):(g==="right"||g==="start")&&(M="flex-start",N=p):g==="left"||g==="start"?(M="flex-start",w=p):(g==="right"||g==="end")&&(M="flex-end",N=p),e.position=this._cssPosition,e.marginLeft=u?"0":w,e.marginTop=d?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=u?"0":N,n.justifyContent=M,n.alignItems=d?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let e=this._overlayRef.overlayElement.style,n=this._overlayRef.hostElement,r=n.style;n.classList.remove(Np),r.justifyContent=r.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}},n0=(()=>{class t{_viewportRuler=Z(Ps);_document=Z(It);_platform=Z(rn);_overlayContainer=Z(ds);constructor(){}global(){return new rl}flexibleConnectedTo(n){return new nl(n,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),il=(()=>{class t{scrollStrategies=Z(Zy);_overlayContainer=Z(ds);_positionBuilder=Z(n0);_keyboardDispatcher=Z(Jy);_injector=Z(Rt);_ngZone=Z(Mt);_document=Z(It);_directionality=Z(oi);_location=Z(Gl);_outsideClickDispatcher=Z(Qy);_animationsModuleType=Z(Pl,{optional:!0});_idGenerator=Z(Xi);_renderer=Z(mr).createRenderer(null,null);_appRef;_styleLoader=Z(ii);constructor(){}create(n){this._styleLoader.load(Mp);let r=this._createHostElement(),i=this._createPaneElement(r),o=this._createPortalOutlet(i),s=new Pi(n);return s.direction=s.direction||this._directionality.value,new zr(o,r,i,s,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations",this._injector.get(Ui),this._renderer)}position(){return this._positionBuilder}_createPaneElement(n){let r=this._document.createElement("div");return r.id=this._idGenerator.getId("cdk-overlay-"),r.classList.add("cdk-overlay-pane"),n.appendChild(r),r}_createHostElement(){let n=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalOutlet(n){return this._appRef||(this._appRef=this._injector.get(Gi)),new as(n,null,this._appRef,this._injector,this._document)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function r0(t,e){}var Kr=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;width="";height="";minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;closeOnNavigation=!0;closeOnDestroy=!0;closeOnOverlayDetachments=!0;componentFactoryResolver;providers;container;templateContext};var i0=(()=>{class t extends Yr{_elementRef=Z(Ct);_focusTrapFactory=Z(Cp);_config;_interactivityChecker=Z(Kc);_ngZone=Z(Mt);_overlayRef=Z(zr);_focusMonitor=Z(yp);_renderer=Z(Os);_platform=Z(rn);_document=Z(It,{optional:!0});_portalOutlet;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_changeDetectorRef=Z(Xn);_injector=Z(Rt);_isDestroyed=!1;constructor(){super(),this._config=Z(Kr,{optional:!0})||new Kr,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(n){this._ariaLabelledByQueue.push(n),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(n){let r=this._ariaLabelledByQueue.indexOf(n);r>-1&&(this._ariaLabelledByQueue.splice(r,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachComponentPortal(n);return this._contentAttached(),r}attachTemplatePortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachTemplatePortal(n);return this._contentAttached(),r}attachDomPortal=n=>{this._portalOutlet.hasAttached();let r=this._portalOutlet.attachDomPortal(n);return this._contentAttached(),r};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(n,r){this._interactivityChecker.isFocusable(n)||(n.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let i=()=>{o(),s(),n.removeAttribute("tabindex")},o=this._renderer.listen(n,"blur",i),s=this._renderer.listen(n,"mousedown",i)})),n.focus(r)}_focusByCssSelector(n,r){let i=this._elementRef.nativeElement.querySelector(n);i&&this._forceFocus(i,r)}_trapFocus(n){this._isDestroyed||hr(()=>{let r=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||r.focus(n);break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement(n)||this._focusDialogContainer(n);break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',n);break;default:this._focusByCssSelector(this._config.autoFocus,n);break}},{injector:this._injector})}_restoreFocus(){let n=this._config.restoreFocus,r=null;if(typeof n=="string"?r=this._document.querySelector(n):typeof n=="boolean"?r=n?this._elementFocusedBeforeDialogWasOpened:null:n&&(r=n),this._config.restoreFocus&&r&&typeof r.focus=="function"){let i=zi(),o=this._elementRef.nativeElement;(!i||i===this._document.body||i===o||o.contains(i))&&(this._focusMonitor?(this._focusMonitor.focusVia(r,this._closeInteractionType),this._closeInteractionType=null):r.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(n){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus(n)}_containsFocus(){let n=this._elementRef.nativeElement,r=zi();return n===r||n.contains(r)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=zi()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Le({type:t,selectors:[["cdk-dialog-container"]],viewQuery:function(r,i){if(r&1&&Yn(Wc,7),r&2){let o;zn(o=Kn())&&(i._portalOutlet=o.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(r,i){r&2&&Cn("id",i._config.id||null)("role",i._config.role)("aria-modal",i._config.ariaModal)("aria-labelledby",i._config.ariaLabel?null:i._ariaLabelledByQueue[0])("aria-label",i._config.ariaLabel)("aria-describedby",i._config.ariaDescribedBy||null)},features:[St],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(r,i){r&1&&Oe(0,r0,0,0,"ng-template",0)},dependencies:[Wc],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}
|
|
36
|
+
`],encapsulation:2})}return t})(),dr=class{overlayRef;config;componentInstance;componentRef;containerInstance;disableClose;closed=new mt;backdropClick;keydownEvents;outsidePointerEvents;id;_detachSubscription;constructor(e,n){this.overlayRef=e,this.config=n,this.disableClose=n.disableClose,this.backdropClick=e.backdropClick(),this.keydownEvents=e.keydownEvents(),this.outsidePointerEvents=e.outsidePointerEvents(),this.id=n.id,this.keydownEvents.subscribe(r=>{r.keyCode===27&&!this.disableClose&&!Sp(r)&&(r.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=e.detachments().subscribe(()=>{n.closeOnOverlayDetachments!==!1&&this.close()})}close(e,n){if(this.containerInstance){let r=this.closed;this.containerInstance._closeInteractionType=n?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),r.next(e),r.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(e="",n=""){return this.overlayRef.updateSize({width:e,height:n}),this}addPanelClass(e){return this.overlayRef.addPanelClass(e),this}removePanelClass(e){return this.overlayRef.removePanelClass(e),this}},o0=new en("DialogScrollStrategy",{providedIn:"root",factory:()=>{let t=Z(il);return()=>t.scrollStrategies.block()}}),sl=new en("DialogData"),s0=new en("DefaultDialogConfig");var Pp=(()=>{class t{_overlay=Z(il);_injector=Z(Rt);_defaultOptions=Z(s0,{optional:!0});_parentDialog=Z(t,{optional:!0,skipSelf:!0});_overlayContainer=Z(ds);_idGenerator=Z(Xi);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new mt;_afterOpenedAtThisLevel=new mt;_ariaHiddenElements=new Map;_scrollStrategy=Z(o0);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=wl(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(xl(void 0)));constructor(){}open(n,r){let i=this._defaultOptions||new Kr;r=O(O({},i),r),r.id=r.id||this._idGenerator.getId("cdk-dialog-"),r.id&&this.getDialogById(r.id);let o=this._getOverlayConfig(r),s=this._overlay.create(o),c=new dr(s,r),u=this._attachContainer(s,c,r);return c.containerInstance=u,this._attachDialogContent(n,c,u,r),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(c),c.closed.subscribe(()=>this._removeOpenDialog(c,!0)),this.afterOpened.next(c),c}closeAll(){ol(this.openDialogs,n=>n.close())}getDialogById(n){return this.openDialogs.find(r=>r.id===n)}ngOnDestroy(){ol(this._openDialogsAtThisLevel,n=>{n.config.closeOnDestroy===!1&&this._removeOpenDialog(n,!1)}),ol(this._openDialogsAtThisLevel,n=>n.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(n){let r=new Pi({positionStrategy:n.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:n.scrollStrategy||this._scrollStrategy(),panelClass:n.panelClass,hasBackdrop:n.hasBackdrop,direction:n.direction,minWidth:n.minWidth,minHeight:n.minHeight,maxWidth:n.maxWidth,maxHeight:n.maxHeight,width:n.width,height:n.height,disposeOnNavigation:n.closeOnNavigation});return n.backdropClass&&(r.backdropClass=n.backdropClass),r}_attachContainer(n,r,i){let o=i.injector||i.viewContainerRef?.injector,s=[{provide:Kr,useValue:i},{provide:dr,useValue:r},{provide:zr,useValue:n}],c;i.container?typeof i.container=="function"?c=i.container:(c=i.container.type,s.push(...i.container.providers(i))):c=i0;let u=new Gr(c,i.viewContainerRef,Rt.create({parent:o||this._injector,providers:s}));return n.attach(u).instance}_attachDialogContent(n,r,i,o){if(n instanceof ji){let s=this._createInjector(o,r,i,void 0),c={$implicit:o.data,dialogRef:r};o.templateContext&&(c=O(O({},c),typeof o.templateContext=="function"?o.templateContext():o.templateContext)),i.attachTemplatePortal(new Wr(n,null,c,s))}else{let s=this._createInjector(o,r,i,this._injector),c=i.attachComponentPortal(new Gr(n,o.viewContainerRef,s));r.componentRef=c,r.componentInstance=c.instance}}_createInjector(n,r,i,o){let s=n.injector||n.viewContainerRef?.injector,c=[{provide:sl,useValue:n.data},{provide:dr,useValue:r}];return n.providers&&(typeof n.providers=="function"?c.push(...n.providers(r,n,i)):c.push(...n.providers)),n.direction&&(!s||!s.get(oi,null,{optional:!0}))&&c.push({provide:oi,useValue:{value:n.direction,change:Vi()}}),Rt.create({parent:s||o,providers:c})}_removeOpenDialog(n,r){let i=this.openDialogs.indexOf(n);i>-1&&(this.openDialogs.splice(i,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((o,s)=>{o?s.setAttribute("aria-hidden",o):s.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),r&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){let n=this._overlayContainer.getContainerElement();if(n.parentElement){let r=n.parentElement.children;for(let i=r.length-1;i>-1;i--){let o=r[i];o!==n&&o.nodeName!=="SCRIPT"&&o.nodeName!=="STYLE"&&!o.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(o,o.getAttribute("aria-hidden")),o.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let n=this._parentDialog;return n?n._getAfterAllClosed():this._afterAllClosedAtThisLevel}static \u0275fac=function(r){return new(r||t)};static \u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function ol(t,e){let n=t.length;for(;n--;)e(t[n])}var fs=class{lastWidth;lastHeight;resizeTimeout=null;debounceDelay=200;onResizeCallback;constructor(e){this.onResizeCallback=e,this.lastWidth=window.innerWidth,this.lastHeight=window.innerHeight,window.addEventListener("resize",this.debouncedResize),window.addEventListener("orientationchange",this.handleImmediateResize)}destroy(){window.removeEventListener("resize",this.debouncedResize),window.removeEventListener("orientationchange",this.handleImmediateResize)}handleImmediateResize=()=>{this.triggerResize()};debouncedResize=()=>{this.resizeTimeout!==null&&clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(()=>{this.triggerResize()},this.debounceDelay)};triggerResize(){let e=window.innerWidth,n=window.innerHeight;(n!==this.lastHeight||e!==this.lastWidth)&&(this.onResizeCallback(),this.lastWidth=e,this.lastHeight=n)}};var a0=Dl;function c0(t){return!!t[a0]}var l0=Symbol("__destroy"),Bp=Symbol("__decoratorApplied");function Up(t){return typeof t=="string"?Symbol(`__destroy__${t}`):l0}function u0(t){t.prototype[Bp]=!0}function Hp(t,e){t[e]||(t[e]=new mt)}function jp(t,e){t[e]&&(t[e].next(),t[e].complete(),t[e]=null)}function $p(t){t instanceof ei&&t.unsubscribe()}function d0(t){Array.isArray(t)&&t.forEach($p)}function Gp(t,e){return function(){if(t&&t.call(this),jp(this,Up()),e.arrayName&&d0(this[e.arrayName]),e.checkProperties)for(let n in this)e.blackList?.includes(n)||$p(this[n])}}function f0(t,e){t.prototype.ngOnDestroy=Gp(t.prototype.ngOnDestroy,e)}function p0(t,e){let n=t.\u0275pipe;n.onDestroy=Gp(n.onDestroy,e)}function Wp(t={}){return e=>{c0(e)?p0(e,t):f0(e,t),u0(e)}}var Fp=7,kp=Symbol("CheckerHasBeenSet");function h0(t,e){t[kp]||m0()||(Vp(()=>bl(Promise.resolve()).pipe(Is(()=>{let n;try{n=Ml(t)}catch{n=null}let r=n?.lView;if(r==null)return El;let i=r[Fp]||(r[Fp]=[]),o=new mt;return i.push(function(){Vp(()=>{o.next(),o.complete()})}),o}),Is(()=>Promise.resolve())).subscribe(()=>{(e.observed??e.observers.length>0)&&console.warn(g0(t))})),t[kp]=!0)}function m0(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"}function Vp(t){let e=Al.Zone;return!!e&&typeof e.root?.run=="function"?e.root.run(t):t()}function g0(t){return`
|
|
37
37
|
The ${t.constructor.name} still has subscriptions that haven't been unsubscribed.
|
|
38
38
|
This may happen if the class extends another class decorated with @UntilDestroy().
|
|
39
39
|
The child class implements its own ngOnDestroy() method but doesn't call super.ngOnDestroy().
|
|
@@ -70,5 +70,5 @@ Url: ${So(t)}`),!0}return!1}function _g(t,e){return e?.length?Eo(t).some(n=>Cr(n
|
|
|
70
70
|
super.ngOnDestroy();
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
`}var al=!1;function _0(t,e,n){let r=t[e];if(al&&typeof r!="function")throw new Error(`${t.constructor.name} is using untilDestroyed but doesn't implement ${e}`);Hp(t,n),t[e]=function(){r.apply(this,arguments),jp(this,n),t[e]=r}}function Yp(t,e){return n=>{let r=Up(e);typeof e=="string"?_0(t,e,r):(al&&v0(t),Hp(t,r));let i=t[r];return al&&h0(t,i),n.pipe(hr(i))}}function v0(t){let e=Object.getPrototypeOf(t);if(!(Bp in e))throw new Error("untilDestroyed operator cannot be used inside directives or components or providers that are not decorated with UntilDestroy decorator")}var ps=class t{engagementTrigger;isMobile=window.CooeeSDK.uaParser.getDevice().type==="mobile";ngOnInit(){this.engagementTrigger=this.triggerContext?.triggerData}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Le({type:t,selectors:[["cooee-base-video"]],inputs:{triggerContext:"triggerContext"},decls:0,vars:0,template:function(n,r){},encapsulation:2})};var y0=t=>({active:t}),E0=(t,e)=>e.mID;function b0(t,e){if(t&1&&Se(0,"img",9),t&2){let n=e.$implicit,r=K(2);ge("src",n.url,ct)("alt",r.selectedItem.name)}}function w0(t,e){if(t&1&&Ze(0,b0,1,2,"img",9,ln),t&2){let n=K();Je(n.selectedItem.imgs)}}function C0(t,e){if(t&1&&Se(0,"img",9),t&2){let n=K();ge("src",n.selectedItem.imageURL,ct)("alt",n.selectedItem.name)}}function S0(t,e){if(t&1&&(Se(0,"span",16),Qe(1,"cooeeCurrency"),Qe(2,"safeHtml")),t&2){K(2);let n=Ke(15);ge("innerHTML",rt(2,3,rt(1,1,n.d)),Pt)}}function T0(t,e){if(t&1&&(Se(0,"span",17),Qe(1,"cooeeCurrency"),Qe(2,"safeHtml")),t&2){K(2);let n=Ke(15);ge("innerHTML",rt(2,3,rt(1,1,n.cmp)),Pt)}}function I0(t,e){if(t&1&&(W(0,"div",12),Oe(1,S0,3,5,"span",16)(2,T0,3,5,"span",17),z()),t&2){K();let n=Ke(15);V(),Te(n.d?1:-1),V(),Te(n.cmp?2:-1)}}function x0(t,e){if(t&1){let n=We();W(0,"a",20),Me("click",function(i){let o=Ne(n).$implicit;return K(2).changeItem(o),i.stopPropagation(),Re(i.preventDefault())}),Se(1,"img",21),z()}if(t&2){let n=e.$implicit,r=K(2);V(),ge("src",n.imageURL,ct)("alt",n.name)("ngClass",Gi(3,y0,n.mID===r.selectedItem.mID+""))}}function O0(t,e){if(t&1&&(W(0,"span",18),Ae(1,"Selected Product"),z(),W(2,"div",8),Ze(3,x0,2,5,"a",19,ln),z()),t&2){let n=K();V(3),Je(n.items)}}function A0(t,e){if(t&1){let n=We();W(0,"a",25),Me("click",function(i){let o=Ne(n).$implicit,s=K(2);return Re(s.changeVariant(i,o))}),W(1,"span",26),Ae(2),z()()}if(t&2){let n=e.$implicit,r=K(2);Yn("lc-selected-variant",(r.selectedVariant==null?null:r.selectedVariant.mID)===n.mID),V(2),rn(n.name)}}function D0(t,e){if(t&1&&(W(0,"span",22),Ae(1,"Select Variant"),z(),W(2,"div",23),Ze(3,A0,3,3,"a",24,E0),z()),t&2){let n=K();V(3),Je(n.selectedItem.vars)}}function N0(t,e){if(t&1&&(W(0,"div",27),Ae(1,"Description"),z(),Se(2,"div",28),Qe(3,"safeHtml")),t&2){let n=K();V(2),ge("innerHTML",rt(3,1,n.selectedItem.desc),Pt)}}function R0(t,e){t&1&&Ae(0," Open Cart ")}function M0(t,e){t&1&&Ae(0," Add To Cart ")}var hs=class t{selectedItem;items;closeModel=new at;performCTA=new at;atcClicked=!1;selectedVariant=null;ClickActionType=Ut;ngOnInit(){this.updateSelectedVariant()}closeDialog(){this.closeModel.emit()}clickAddToCart(e){this.performCTA.emit({item:e,cta:this.atcClicked?Ut.OPEN_CART:Ut.ADD_TO_CART}),this.atcClicked=!0}async changeItem(e){this.selectedItem=e,this.updateSelectedVariant()}changeVariant(e,n){e.stopPropagation(),e.preventDefault(),this.selectedVariant=n,this.selectedItem.selectedOrFirstVariant.value=this.selectedVariant}updateSelectedVariant(){this.selectedVariant=this.selectedItem.selectedOrFirstVariant.value}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Le({type:t,selectors:[["cooee-product-modal"]],inputs:{selectedItem:"selectedItem",items:"items"},outputs:{closeModel:"closeModel",performCTA:"performCTA"},decls:26,vars:8,consts:[[1,"lc-card-wrapper"],[1,"lc-card-header"],[1,"lc-header"],[1,"lc-close-button",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","fill","#000"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"],[1,"lc-card-content"],[1,"lc-image-strip"],[1,"w-28","h-28","object-contain",3,"src","alt"],[1,"lc-inner-body"],[1,"lc-item-name"],[1,"lc-prices"],[1,"lc-card-footer"],[1,"lc-cta-button",3,"click"],[1,"lc-more-info-button",3,"click"],[1,"lc-item-price",3,"innerHTML"],[1,"lc-item-cmp-price",3,"innerHTML"],[1,"lc-selected-product-title"],["href","#"],["href","#",3,"click"],[1,"product-selector",3,"src","alt","ngClass"],[1,"lc-selected-variant-title"],[1,"lc-variant-list"],["href","#",1,"lc-variant",3,"lc-selected-variant"],["href","#",1,"lc-variant",3,"click"],[1,"truncate","max-w-[200px]"],[1,"lc-description-title"],[1,"lc-description",3,"innerHTML"]],template:function(n,r){if(n&1){let i=We();W(0,"div",0)(1,"div",1)(2,"div",2),Ae(3,"Shop Now"),z(),W(4,"button",3),Me("click",function(){return Ne(i),Re(r.closeDialog())}),Vt(),W(5,"svg",4),Se(6,"path",5)(7,"path",6),z()()(),Gn(),W(8,"div",7)(9,"div",8),Oe(10,w0,2,0)(11,C0,1,2,"img",9),z(),W(12,"div",10)(13,"div",11),Ae(14),z(),gt(15),Oe(16,I0,3,2,"div",12)(17,O0,5,0)(18,D0,5,0)(19,N0,4,3),z()(),W(20,"div",13)(21,"button",14),Me("click",function(){return Ne(i),Re(r.clickAddToCart(r.selectedItem))}),Oe(22,R0,1,0)(23,M0,1,0),z(),W(24,"button",15),Me("click",function(){return Ne(i),Re(r.performCTA.emit({item:r.selectedItem,cta:r.ClickActionType.GO_TO_PRODUCT}))}),Ae(25," More Info "),z()()()}if(n&2){V(10),Te(r.selectedItem.imgs!=null&&r.selectedItem.imgs.length?10:11),V(4),rn(r.selectedItem.name),V();let i=yt(r.selectedVariant==null?null:r.selectedVariant.price);V(),Te(i?16:-1),V(),Te(r.items.length>1?17:-1),V(),Te(r.selectedItem.vars[0]!=null&&r.selectedItem.vars[0].name!=="Default Title"?18:-1),V(),Te(r.selectedItem.desc?19:-1),V(3),Te(r.atcClicked?22:23)}},dependencies:[Fn,yn,Ln],styles:["[_nghost-%COMP%]{display:block;background:#fff}.lc-card-wrapper[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;height:100%;overflow:auto}.lc-card-header[_ngcontent-%COMP%]{display:var(--header-display, flex);flex-direction:row;justify-content:space-between;align-items:center;padding:8px 16px;border-bottom:1px solid var(--lc-color-gray-300)}.lc-header[_ngcontent-%COMP%]{font-size:24px;font-weight:500;color:#000}.lc-close-button[_ngcontent-%COMP%]{background:transparent;border:none;width:36px;height:36px}.lc-close-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{fill:#000000b3}.lc-card-content[_ngcontent-%COMP%]{flex:1;overflow-y:auto;overscroll-behavior:contain}.lc-inner-body[_ngcontent-%COMP%]{padding:16px;display:flex;flex-direction:column;gap:8px}.lc-image-strip[_ngcontent-%COMP%]{width:100%;display:flex;overflow-x:auto;gap:.5rem;flex-wrap:nowrap}.lc-image-strip[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:auto;height:200px}.lc-image-strip[_ngcontent-%COMP%] .product-selector[_ngcontent-%COMP%]{height:100px;flex-shrink:0;padding:2px}.lc-image-strip[_ngcontent-%COMP%] .product-selector.active[_ngcontent-%COMP%]{border:red solid 1px}.lc-item-name[_ngcontent-%COMP%]{font-size:20px;font-weight:600;line-height:normal;color:rgb(var(--lc-color-text))}.lc-item-price[_ngcontent-%COMP%]{font-size:18px;font-weight:500;color:rgb(var(--lc-color-text))}.lc-item-cmp-price[_ngcontent-%COMP%]{font-size:18px;font-weight:500;color:rgba(var(--lc-color-text),.75);margin-left:10px;text-decoration:line-through;display:none}.lc-variant-list[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem;padding-top:.5rem;width:100%}.lc-variant[_ngcontent-%COMP%]{padding:4px 8px;border-radius:4px;background-color:#f3f4f6;color:#1f2937;font-size:12px;cursor:pointer;border:1px solid #e5e7eb;display:flex;align-items:center;gap:4px;text-decoration:none}.lc-selected-variant[_ngcontent-%COMP%]{border:1px solid black;color:#000}.lc-description-title[_ngcontent-%COMP%], .lc-selected-product-title[_ngcontent-%COMP%], .lc-selected-variant-title[_ngcontent-%COMP%]{font-size:18px;font-weight:600;margin-top:8px;line-height:normal;color:#000}.lc-description[_ngcontent-%COMP%]{line-height:normal;color:#000}.lc-card-footer[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;padding:12px;background-color:#0000004d;box-shadow:0 4px 6px #52525b4d;gap:12px}.lc-cta-button[_ngcontent-%COMP%], .lc-more-info-button[_ngcontent-%COMP%]{width:50%;padding:12px;border:none;border-radius:.5rem;font-weight:600;display:flex;justify-content:center;cursor:pointer;font-size:16px}.lc-cta-button[_ngcontent-%COMP%]{background-color:#000;color:#fff}.lc-more-info-button[_ngcontent-%COMP%]{background-color:#fff;color:#000}"]})};var ms=class t{width;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Le({type:t,selectors:[["cooee-video-progress-bar"]],inputs:{width:"width"},decls:5,vars:2,consts:[[1,"lc:absolute","lc:top-1","lc:w-full","lc:z-10"],[1,"lc:px-2"],[1,"lc:h-1","lc:w-full","lc:bg-gray-700","lc:mb-2"],[1,"lc:h-1","lc:bg-pink-500"]],template:function(n,r){n&1&&(W(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),Se(4,"div"),z()()()()),n&2&&(V(3),ni("width",r.width,"%"))},encapsulation:2})};function P0(t,e){if(t&1&&(Se(0,"span",7),Qe(1,"cooeeCurrency"),Qe(2,"safeHtml")),t&2){K();let n=Ke(7);ge("innerHTML",rt(2,3,rt(1,1,n.cmp)),Pt)}}function L0(t,e){t&1&&Ae(0," Open Cart ")}function F0(t,e){t&1&&Ae(0," Add To Cart ")}var gs=class t{item;performCTA=new at;atcClicked=!1;clickAddToCart(e){e.stopPropagation(),this.performCTA.emit({item:this.item,cta:this.atcClicked?Ut.OPEN_CART:Ut.ADD_TO_CART}),this.atcClicked=!0}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Le({type:t,selectors:[["cooee-product-card"]],inputs:{item:"item"},outputs:{performCTA:"performCTA"},decls:15,vars:13,consts:[[1,"lc-item-card"],[1,"lc-card-content"],[1,"lc-item-image",3,"alt","src"],[1,"lc-product-details"],[1,"lc-item-name"],[1,"lc-prices"],[1,"lc-item-price",3,"innerHTML"],[1,"lc-item-cmp-price",3,"innerHTML"],[1,"lc-cta-button",3,"click"]],template:function(n,r){if(n&1){let i=We();W(0,"div",0)(1,"div",1),Se(2,"img",2),W(3,"div",3)(4,"div",4),Ae(5),z(),W(6,"div",5),gt(7),Se(8,"span",6),Qe(9,"cooeeCurrency"),Qe(10,"safeHtml"),Oe(11,P0,3,5,"span",7),z()()(),W(12,"button",8),Me("click",function(s){return Ne(i),Re(r.clickAddToCart(s))}),Oe(13,L0,1,0)(14,F0,1,0),z()()}if(n&2){V(2),Sn("alt",r.item.name),ge("src",r.item.imageURL,ct),V(3),Tt(" ",r.item.name," "),V(2);let i=yt(r.item.selectedOrFirstVariant.value.price);V(),ge("innerHTML",rt(10,11,rt(9,9,i.d)),Pt),V(3),Te(i.cmp?11:-1),V(),Yn("atc-clicked",r.atcClicked),V(),Te(r.atcClicked?13:14)}},dependencies:[yn,Fn],styles:["[_nghost-%COMP%]{display:block;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background-color:#ffffff80;border-radius:7px;cursor:pointer}.lc-item-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;padding:8px}.lc-card-content[_ngcontent-%COMP%]{display:flex;gap:8px;width:100%;align-items:start}.lc-item-image[_ngcontent-%COMP%]{width:70px;height:70px;object-fit:cover;box-sizing:border-box;border-radius:7px}.lc-product-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:3.5px;font-size:10.5px}.lc-item-name[_ngcontent-%COMP%]{font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:16px;line-height:normal;color:rgb(var(--lc-color-text))}.lc-item-price[_ngcontent-%COMP%]{font-size:16px;line-height:normal;color:rgb(var(--lc-color-text))}.lc-item-cmp-price[_ngcontent-%COMP%]{font-size:16px;line-height:normal;color:rgba(var(--lc-color-text),.75);margin-left:10px;text-decoration:line-through;display:none}.lc-cta-button[_ngcontent-%COMP%]{padding:12px 8px;border:none;border-radius:8px;width:100%;background:#000;text-align:center;font-weight:500;cursor:pointer;color:#fff;font-size:16px}.lc-cta-button.atc-clicked[_ngcontent-%COMP%]{background:#000}"]})};function k0(t,e){if(t&1&&(W(0,"span",1),Ae(1),z()),t&2){K();let n=Ke(0);V(),rn(n.heading)}}function V0(t,e){if(t&1&&(W(0,"span",2),Ae(1),z()),t&2){K();let n=Ke(0);V(),rn(n.subHeading)}}var Xr=class t{card=Ui.required();linkClicked=Rl();linkAfterSanity(){return this.card()?.buttonLink?.startsWith("https")?this.card().buttonLink:null}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Le({type:t,selectors:[["cooee-video-card"]],inputs:{card:[1,"card"]},outputs:{linkClicked:"linkClicked"},decls:6,vars:6,consts:[[1,"video-card-details"],[1,"heading"],[1,"subheading"],["rel","noopener noreferrer",1,"cta-button",3,"click","href","target"]],template:function(n,r){if(n&1){let i=We();gt(0),W(1,"div",0),Oe(2,k0,2,1,"span",1)(3,V0,2,1,"span",2),W(4,"a",3),Me("click",function(){return Ne(i),Re(r.linkClicked.emit())}),Ae(5),z()()}if(n&2){let i=yt(r.card());V(2),Te(i!=null&&i.heading?2:-1),V(),Te(i!=null&&i.subHeading?3:-1),V(),ge("href",r.linkAfterSanity(),ct)("target",i.newTab?"_blank":"_self"),V(),Tt(" ",i==null?null:i.buttonTitle," ")}},styles:["[_nghost-%COMP%]{display:block}.video-card-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:3.75px;font-size:14px;line-height:normal}.video-card-details[_ngcontent-%COMP%] .cta-button[_ngcontent-%COMP%]{text-align:center;background-color:#fff;border-radius:var(--lc-button-radius);padding:7.5px 15px;font-weight:500;cursor:pointer;color:var(--lc-color-button);font-size:12px;border:0;text-decoration:none}.video-card-details[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%], .video-card-details[_ngcontent-%COMP%] .subheading[_ngcontent-%COMP%]{text-align:start;color:#000;font-weight:600;overflow:hidden}.video-card-details[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%]{font-size:18px}.video-card-details[_ngcontent-%COMP%] .subheading[_ngcontent-%COMP%]{font-size:16px}"],changeDetection:0})};var B0=["swiperContainer"],U0=["videoEl"],H0=(t,e)=>e.url,j0=(t,e)=>e.mID;function $0(t,e){if(t&1&&Se(0,"source",14),t&2){let n=e.$implicit;Sn("type",n.mimeType),ge("src",n.url,ct)}}function G0(t,e){t&1&&Ns(0)}function W0(t,e){if(t&1){let n=We();Se(0,"cooee-video-progress-bar",17),W(1,"div",18)(2,"cooee-mute-toggle",19),Me("toggled",function(){Ne(n);let i=K(2);return Re(i.toggleMute())}),z(),Oe(3,G0,1,0,"ng-container",10),z()}if(t&2){let n=K().$index,r=nn(4),i=K(),o=nn(11);ge("width",i.videoProgress[n]||0),V(2),ge("muted",i.muted)("videoEl",r),V(),ge("ngTemplateOutlet",o)}}function Y0(t,e){if(t&1){let n=We();W(0,"cooee-product-card",23),Me("performCTA",function(i){Ne(n);let o=K(3).$implicit,s=K();return Re(s.performClickToAction(i,o))})("click",function(){let i=Ne(n).$implicit,o=K(3).$implicit,s=K();return Re(s.productCardClicked(i,o))}),z()}if(t&2){let n=e.$implicit;ge("item",n)}}function z0(t,e){if(t&1&&(W(0,"div",20),Ze(1,Y0,1,1,"cooee-product-card",22,j0),z()),t&2){let n=K(2).$implicit;V(),Je(n.items)}}function K0(t,e){if(t&1&&Se(0,"cooee-video-card",21),t&2){let n=K(2).$implicit;ge("card",n.card)}}function X0(t,e){if(t&1&&(W(0,"div",15),Oe(1,z0,3,0,"div",20)(2,K0,1,1,"cooee-video-card",21),z()),t&2){let n=K().$implicit,r=K();V(),Te(n.items.length&&r.footerContent===r.VideoConfigFooterContent.FIRST_ITEM?1:n.card&&r.footerContent===r.VideoConfigFooterContent.CARD?2:-1)}}function q0(t,e){if(t&1){let n=We();W(0,"cooee-product-modal",24),Me("performCTA",function(i){Ne(n);let o=K(2);return Re(o.performClickToAction(i,o.selectedVideo))})("closeModel",function(){Ne(n);let i=K(2);return Re(i.productModalClosed())}),z()}if(t&2){let n=K(2);ge("selectedItem",n.selectedItem)("items",n.selectedVideo.items)}}function Z0(t,e){if(t&1){let n=We();W(0,"div",6)(1,"div",11)(2,"div",12)(3,"video",13,2),Me("timeupdate",function(i){let o=Ne(n).$index,s=K();return Re(s.updateProgress(i,o))})("click",function(){let i=Ne(n).$index,o=K();return Re(o.currentIndex===i&&o.toggleMute())})("ended",function(){Ne(n);let i=nn(4),o=K();return Re(o.onVideoEnded(i))}),Ze(5,$0,1,2,"source",14,H0),z(),Oe(7,W0,4,4)(8,X0,3,1,"div",15),z(),Oe(9,q0,1,2,"cooee-product-modal",16),z()()}if(t&2){let n=e.$implicit,r=e.$index,i=K();V(3),ge("ngClass",i.viewTemplateClassName)("autoplay",i.currentIndex===r)("muted",i.muted)("poster",n.thumbnail,ct),Cn("data-video-id",n.id),V(2),Je(n.sources),V(2),Te(i.currentIndex===r?7:-1),V(),Te(i.currentIndex===r?8:-1),V(),Te(i.selectedItem&&i.currentIndex===r?9:-1)}}function J0(t,e){t&1&&Ns(0)}function Q0(t,e){if(t&1){let n=We();W(0,"button",25),Me("click",function(){Ne(n);let i=K();return Re(i.close())}),Vt(),W(1,"svg",26),Se(2,"path",27)(3,"path",28),z()()}}var cn=class extends ps{constructor(n,r,i,o){super();this.cdr=n;this.elementRef=r;this.dialogRef=i;this.data=o;this.videos=o.videos,this.currentIndex=o.currentIndex,this.triggerContext=o.triggerContext}videos=[];currentIndex=0;swiperContainerRef;videoElements;VideoConfigFooterContent=Ii;muted=!1;videoProgress=[];selectedItem=null;selectedVideo;swiperInstance;detailPopupTemplate;footerContent;viewTemplateClassName="lc-video-only-view";resizeDebouncer=new fs(this.onResize.bind(this));onResize(){this.swiperInstance?.destroy?.(),this.reInitSwiper()}ngOnInit(){super.ngOnInit();let n=this.engagementTrigger?.content?.videoConfig;this.detailPopupTemplate=n?.detailPopup.template??"VIDEO_ONLY_VIEW",this.footerContent=n?.footerContent??"FIRST_ITEM";let r=this.elementRef.nativeElement.shadowRoot,i=yr.get().website.commonCSS;switch(Yt.injectRawCSS(i,r),Yt.injectStylesheet(xn.styleURL,r),Yt.injectSwiperCSS(r),this.detailPopupTemplate){case"PRODUCT_DETAIL_VIEW":this.selectItemForDetailView(),this.viewTemplateClassName="lc-product-detail-view";break;case"VIDEO_ONLY_VIEW":this.viewTemplateClassName="lc-video-only-view";break}}ngAfterViewInit(){Cl(this.getCurrentVideoElement(),"loadeddata").pipe(Yp(this)).subscribe(()=>{this.initSwiper()})}ngOnDestroy(){this.swiperInstance?.destroy?.(),this.resizeDebouncer.destroy()}close(n=this.videos[this.currentIndex],r=this.currentIndex){let i=this.getCurrentVideoElement();this.dialogRef.close({lastVideo:n,lastVideoIndex:r,lastVideoDuration:i?.currentTime})}performClickToAction(n,r){this.data.onCTAPerformed({cta:n.cta,item:n.item,video:r})}getCurrentVideoElement(){return this.videoElements.get(this.currentIndex)?.nativeElement}moveToNextVideo(){this.swiperInstance.slideTo(this.currentIndex+1)}productModalClosed(){this.selectedItem=null,this.selectedVideo=void 0,this.swiperInstance.enable()}pauseAll(){this.videoElements.forEach(n=>n.nativeElement.pause())}async toggleMute(){this.muted=!this.muted,this.videoElements.forEach(i=>i.nativeElement.muted=this.muted);let r=[this.muted?Xe.EVENT_VIDEO_MUTED:Xe.EVENT_VIDEO_UNMUTED,{current:this.currentVideoProps()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(r),await Nr.set(Ar.MUTED,this.muted),this.cdr.detectChanges()}playActiveVideo(){this.pauseAll();let n=this.getCurrentVideoElement();n&&(n.currentTime=1,n.play().then(async()=>{this.muted=await Nr.get(Ar.MUTED,!1),n.muted=this.muted}))}onVideoEnded(n){if(this.currentIndex<this.videos.length-1)this.selectedItem?(n.currentTime=0,n.play()):this.moveToNextVideo();else{let r=this.getPreviousVideoDataForEvent(),i=[Xe.EVENT_LAST_VIDEO_ENDED,{previous:r},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(i),n.currentTime=0,n.play()}}updateProgress(n,r){let i=n.target;this.videoProgress[r]=i.currentTime/i.duration*100,this.cdr.detectChanges()}onSlideChange(n){let r=this.getPreviousVideoDataForEvent();this.currentIndex=n.realIndex,this.playActiveVideo(),this.detailPopupTemplate==="PRODUCT_DETAIL_VIEW"?this.selectItemForDetailView():(this.selectedItem=null,delete this.selectedVideo);let i=this.currentVideoProps(),o={previous:r,current:i},s=[Xe.EVENT_VIDEO_CHANGE,o,{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(s)}productCardClicked(n,r){let i={videoID:r.id,videoIndex:this.currentIndex},o=[Xe.EVENT_MORE_ITEM_INFO_CLICKED,{current:i},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(o),this.selectedItem=n,this.selectedVideo=r,this.swiperInstance.disable()}reInitSwiper(){this.initSwiper(),this.selectedItem&&this.swiperInstance.disable()}initSwiper(){let n=this.isMobile?1:"auto",r=0;this.detailPopupTemplate==="PRODUCT_DETAIL_VIEW"&&(n="auto",r=10),this.swiperInstance=new window.CooeeSDK.Swiper(this.swiperContainerRef.nativeElement,{direction:this.isMobile?"vertical":"horizontal",effect:this.isMobile?"slide":"coverflow",slidesPerView:n,initialSlide:this.currentIndex,centeredSlides:!0,spaceBetween:r,coverflowEffect:{rotate:0,stretch:0,depth:400,modifier:1,slideShadows:!1},navigation:{nextEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-next"),prevEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-prev")}}),this.swiperInstance.on("slideChange",i=>{this.onSlideChange(i),this.cdr.detectChanges()}),this.playActiveVideo()}currentVideoProps(){return{videoID:this.videos[this.currentIndex].id,videoIndex:this.currentIndex}}getPreviousVideoDataForEvent(){let n=this.currentVideoProps(),r=this.videoElements.find(o=>o.nativeElement.dataset.videoId===this.videos[this.currentIndex].id)?.nativeElement;n.playedTillMS=Math.ceil(r?.currentTime*1e3);let i=r?.duration*1e3;return n.playedTillPercent=+(n.playedTillMS/i).toFixed(4),n}selectItemForDetailView(){this.selectedVideo=this.videos[this.currentIndex],this.selectedItem=this.isMobile?null:this.selectedVideo?.items?.[0]??null}};Ts(cn,"\u0275fac",function(r){return new(r||cn)(tn(qn),tn(Ct),tn(fr),tn(sl))}),Ts(cn,"\u0275cmp",Le({type:cn,selectors:[["cooee-video-swiper-dialog"]],viewQuery:function(r,i){if(r&1&&(zn(B0,5),zn(U0,5)),r&2){let o;Kn(o=Xn())&&(i.swiperContainerRef=o.first),Kn(o=Xn())&&(i.videoElements=o)}},inputs:{videos:"videos",currentIndex:"currentIndex"},features:[St],decls:12,vars:2,consts:[["swiperContainer",""],["closeButtonTemplate",""],["videoEl",""],[1,"lc-shadow-inner",3,"ngClass"],[1,"swiper-container"],[1,"swiper-wrapper"],[1,"swiper-slide"],[1,"swiper-button-prev"],[1,"swiper-button-next"],[1,"lc-desktop-controls"],[4,"ngTemplateOutlet"],[1,"lc-video-modal-row"],[1,"lc-video-container"],["playsinline","","preload","metadata",1,"lc-video-el",3,"timeupdate","click","ended","ngClass","autoplay","muted","poster"],[3,"src","type"],[1,"lc-card-container"],[3,"selectedItem","items"],[3,"width"],[1,"lc-video-controls"],[3,"toggled","muted","videoEl"],[1,"lc-card-scroll"],[3,"card"],[3,"item"],[3,"performCTA","click","item"],[3,"performCTA","closeModel","selectedItem","items"],[1,"lc-close-button",3,"click"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 24","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"]],template:function(r,i){if(r&1&&(W(0,"div",3)(1,"div",4,0)(3,"div",5),Ze(4,Z0,10,8,"div",6,ln),z(),Se(6,"div",7)(7,"div",8),z(),W(8,"div",9),Oe(9,J0,1,0,"ng-container",10),z()(),Oe(10,Q0,4,0,"ng-template",null,1,Hl)),r&2){let o=nn(11);ge("ngClass",i.viewTemplateClassName),V(4),Je(i.videos),V(5),ge("ngTemplateOutlet",o)}},dependencies:[gs,hs,$r,ms,Yl,Ln,Xr],styles:[`:host{display:flex}.lc-shadow-inner{position:relative;width:100vw;height:100vh;display:flex}@media (min-width: 768px){.lc-shadow-inner{background-color:color-mix(in oklab,#000 70%,transparent);justify-content:center;align-items:center}}.swiper-container{--swiper-navigation-size: 50px;--swiper-navigation-color: white;width:100dvw;height:100dvh}.lc-product-detail-view .swiper-container{align-items:center}@media (min-width: 768px){.swiper-container{width:100%;height:100%;max-width:90vw;max-height:90vh}}.swiper-wrapper{max-height:100%}.lc-product-detail-view .swiper-wrapper{align-items:center}@media (max-width: 768px){.swiper-button-prev,.swiper-button-next{display:none!important}}.swiper-slide{position:relative;display:flex;align-items:center;visibility:hidden}.lc-product-detail-view .swiper-slide{width:40vw!important;height:70vh!important}@media (min-width: 768px){.lc-product-detail-view .swiper-slide{min-width:650px!important}}@media (max-width: 768px){.lc-product-detail-view .swiper-slide{width:100%!important;height:100%!important}}@media (min-width: 768px){.lc-video-only-view .swiper-slide{width:fit-content!important}}@media (min-width: 768px){.swiper-slide{border-radius:12px;overflow:hidden}}.swiper-slide.swiper-slide-active,.swiper-slide.swiper-slide-prev,.swiper-slide.swiper-slide-next{visibility:visible}video{height:100%}.lc-product-detail-view video{width:100%;object-fit:cover;z-index:-1}.lc-desktop-controls{position:absolute;top:2rem;right:4rem;z-index:10;display:flex;gap:.5rem}@media (max-width: 768px){.lc-desktop-controls{display:none}}.lc-video-controls{position:absolute;top:1rem;z-index:10;right:.5rem;display:flex;gap:.25rem}.lc-video-controls .lc-close-button{display:block}@media (min-width: 768px){.lc-video-controls .lc-close-button{display:none}}.lc-close-button{border:none;display:flex;justify-content:center;align-items:center;width:40px;height:40px;background:#00000080;border-radius:100%}.lc-close-button svg{width:100%;height:100%}@media (min-width: 768px){.lc-close-button{width:48px;height:48px}}.lc-product-detail-view .lc-video-container{height:100%;position:relative}@media (min-width: 768px){.lc-product-detail-view .lc-video-container{width:50%}}.lc-video-only-view .lc-video-container{height:100%}.lc-card-container{position:absolute;bottom:12px;z-index:10;width:100%;padding-inline:12px;box-sizing:border-box}.lc-product-detail-view .lc-card-container{display:none}@media (max-width: 768px){.lc-product-detail-view .lc-card-container{display:block}}.lc-card-scroll{display:flex;overflow-x:auto;gap:12px;width:100%;scrollbar-width:none}.lc-card-scroll::-webkit-scrollbar{display:none}.lc-card-scroll cooee-product-card{flex:0 0 auto;width:80%;max-width:300px}.lc-card-scroll:has(>cooee-product-card:only-child) cooee-product-card{width:100%;max-width:none}.lc-product-detail-view .lc-video-modal-row{display:flex;justify-content:center;height:100%;width:100%}.lc-video-only-view .lc-video-modal-row{display:block;height:100%}.lc-product-detail-view cooee-product-modal{--header-display: none;width:50%;flex:1}@media (max-width: 768px){.lc-product-detail-view cooee-product-modal{--header-display: flex;width:100%;height:70dvh;position:absolute;bottom:0;z-index:2147483646}}.lc-video-only-view cooee-product-modal{width:100%;height:70dvh;z-index:2147483646;bottom:0;position:absolute}
|
|
74
|
-
`],encapsulation:3})),cn=gl([Wp()],cn);var eE=["videoEl"],zp=(t,e)=>e.url;function tE(t,e){if(t&1&&(W(0,"div",1),Ae(1),z()),t&2){let n=K();V(),Tt(" ",n.videoConfig.heading," ")}}function nE(t,e){if(t&1&&Se(0,"source",7),t&2){let n=e.$implicit;Sn("type",n.mimeType),ge("src",n.url,ct)}}function rE(t,e){if(t&1){let n=We();W(0,"cooee-mute-toggle",13),Me("toggled",function(i){Ne(n),K();let o=nn(7),s=K(2);return Re(s.onMuteToggled(i,o))}),z()}if(t&2){K();let n=nn(7);ge("muted",n.muted)("videoEl",n)}}function iE(t,e){if(t&1&&(Se(0,"span",19),Qe(1,"cooeeCurrency"),Qe(2,"safeHtml")),t&2){K();let n=Ke(6);ge("innerHTML",rt(2,3,rt(1,1,n.cmp)),Pt)}}function oE(t,e){if(t&1&&(W(0,"div",10),Se(1,"img",14),W(2,"div",15)(3,"span",16),Ae(4),z(),W(5,"div",17),gt(6),Se(7,"span",18),Qe(8,"cooeeCurrency"),Qe(9,"safeHtml"),Oe(10,iE,3,5,"span",19),z()()()),t&2){K();let n=Ke(0);V(),ge("src",n.imageURL,ct)("alt",n.name),V(3),Tt(" ",n.name," "),V(2);let r=yt(n.selectedOrFirstVariant.value.price);V(),ge("innerHTML",rt(9,8,rt(8,6,r.d)),Pt),V(3),Te(r.cmp?10:-1)}}function sE(t,e){if(t&1){let n=We();W(0,"button",20),Me("click",function(){Ne(n);let i=K().$implicit,o=Ke(0),s=K(2);return Re(s.addToCartClicked(i,o))}),Ae(1," Add to cart "),z()}}function aE(t,e){if(t&1){let n=We();W(0,"cooee-video-card",21),Me("linkClicked",function(){Ne(n);let i=K().$implicit,o=K(2);return Re(o.sendTriggerClicked(i))}),z()}if(t&2){K();let n=Ke(1);ge("card",n)}}function cE(t,e){if(t&1){let n=We();gt(0)(1)(2)(3),W(4,"div",4)(5,"a",5),Me("click",function(i){let o=Ne(n),s=o.$implicit,c=o.$index,u=nn(7),d=K(2);return Re(d.onVideoTap(i,s,c,u))}),W(6,"video",6,0),Me("mouseenter",function(){Ne(n);let i=nn(7);K(2);let o=Ke(2);return Re(o&&i.play())})("mouseleave",function(){Ne(n);let i=nn(7);K(2);let o=Ke(2);return Re(o&&i.pause())}),Ze(8,nE,1,2,"source",7,zp),z(),W(10,"div",8),Oe(11,rE,1,2,"cooee-mute-toggle",9),z(),Oe(12,oE,11,10,"div",10),z(),Oe(13,sE,2,0,"button",11)(14,aE,1,1,"cooee-video-card",12),z()}if(t&2){let n=e.$implicit,r=K(2),i=Ke(1),o=yt(n.items[0]);V();let s=yt(n.card),c=o&&r.videoConfig.footerContent==r.VideoConfigFooterContent.FIRST_ITEM,u=s&&r.videoConfig.footerContent==r.VideoConfigFooterContent.CARD;V(5),ge("poster",n.thumbnail,ct)("muted",!0),Cn("autoplay",i||null),V(2),Je(n.sources),V(3),Te(r.videoConfig.showMuteButton?11:-1),V(),Te(c?12:-1),V(),Te(c?13:u?14:-1)}}function lE(t,e){if(t&1&&(W(0,"div",2),Ze(1,cE,15,8,"div",4,ln),z()),t&2){let n=K();V(),Je(n.videos)}}function uE(t,e){if(t&1&&Se(0,"source",7),t&2){let n=e.$implicit;Sn("type",n.mimeType),ge("src",n.url,ct)}}function dE(t,e){if(t&1){let n=We();W(0,"div",22),Vt(),W(1,"svg",23),Se(2,"circle",24)(3,"circle",25),z(),Gn(),W(4,"div",26)(5,"video",27),Me("click",function(i){let o=Ne(n),s=o.$implicit,c=o.$index,u=K(2);return Re(u.onVideoTap(i,s,c))}),Ze(6,uE,1,2,"source",7,zp),z()()()}if(t&2){let n=e.$implicit;V(5),ge("muted",!0),V(),Je(n.sources)}}function fE(t,e){if(t&1&&(W(0,"div",3),Ze(1,dE,8,1,"div",22,ln),z()),t&2){let n=K();V(),Je(n.videos)}}function pE(t,e){if(t&1){let n=We();W(0,"cooee-draggable-video-popup",29),Me("videoClicked",function(){Ne(n),K();let i=Ke(0),o=K();return Re(o.onPopupVideoClicked(i,0))})("closeClicked",function(){Ne(n);let i=K(2);return Re(i.onPopupVideoClosed())}),z()}if(t&2){K();let n=Ke(0);ge("video",n)}}function hE(t,e){if(t&1&&(gt(0),Oe(1,pE,1,1,"cooee-draggable-video-popup",28)),t&2){let n=K();yt(n.videos[0]),V(),Te(n.hidePopupVideo?-1:1)}}var _s=class t extends un{constructor(n,r){super();this.dialog=n;this.cdr=r}videoElements;videos;VideoConfigTemplate=Ac;VideoConfigFooterContent=Ii;VideoConfigAutoPlay=Dc;isMobile=window.CooeeSDK.uaParser.getDevice().type==="mobile";hidePopupVideo;videoConfig;dialogRef=null;ngOnInit(){super.ngOnInit(),Yt.loadSwiperScript()}ngAfterViewInit(){this.playFirstVideo()}engagementTriggerReceived(n){this.videoConfig=n.content?.videoConfig,this.videos=this.videoConfig.videos}sendTriggerClicked(n,r){let i=new jr(Xe.EVENT_TRIGGER_CLICKED,{},this.triggerContext?.triggerData);i.videos=[n.id],r&&(i.items=[r]),this.sendEventToRenderer(i)}onVideoTap(n,r,i,o){n?.stopPropagation(),n?.preventDefault();let s=r.items?.[0];if(this.sendTriggerClicked(r,s?.toEmbed()),this.videoConfig.footerContent==="NONE"){o&&(o.muted=!1,o.play(),this.onMuteToggled(!1,o));return}Yt.loadSwiperScript().then(()=>this.openDialog(r,i))}async performCTA(n){let r,i=this.triggerContext;if(n.cta===Ut.ADD_TO_CART)r=Xe.EVENT_ADD_TO_CART_CLICKED;else if(n.cta===Ut.GO_TO_PRODUCT)r=Xe.EVENT_VIEW_ITEM_CLICKED;else if(n.cta===Ut.OPEN_CART)r=Xe.EVENT_OPEN_CART_CLICKED,i.triggerData.redirectBehaviour=Hs.CART_DRAWER;else{Et.warn(`Unsupported CTA type: ${n.cta}`);return}let o={at:n.cta},s={videoID:n.video.id};this.sendEvent(r,{current:s},n.video,n.item),this.executeCTAViaRenderer({clickAction:o,embeddedItem:n.item.toEmbed()})}addToCartClicked(n,r){this.performCTA({cta:Ut.ADD_TO_CART,item:r,video:n})}onPopupVideoClicked(n,r){this.hidePopupVideo=!0,this.onVideoTap(null,n,r),this.dialogRef?.closed.subscribe(()=>{this.hidePopupVideo=!1,this.cdr.detectChanges()})}onPopupVideoClosed(){this.hidePopupVideo=!0;let n=(new Date().getTime()-this.triggerContext.startTime.getTime())/1e3;this.sendEvent(Xe.EVENT_TRIGGER_CLOSED,{duration:n})}update(){}onMuteToggled(n,r){n||this.videoElements.forEach(i=>{i.nativeElement!==r&&(i.nativeElement.muted=!0,i.nativeElement.pause())})}playFirstVideo(){this.videoConfig.autoPlay==="ON_HOVER"&&this.isMobile&&this.videoElements.first?.nativeElement.play()}sendEvent(n,r,i,o){let s=new jr(n,r,this.engagementTrigger);i&&(s.videos=[i.id]),o&&(s.items=[o.toEmbed()]),this.sendEventToRenderer(s)}openDialog(n,r){let i={videos:this.videos,currentIndex:r,triggerContext:this.triggerContext,onCTAPerformed:s=>this.performCTA(s)};this.dialogRef&&this.dialogRef.close(),this.dialogRef=this.dialog.open(cn,{width:"100vw",height:"100vh",data:i});let o={videoID:n.id,videoIndex:r};this.sendEvent(Xe.EVENT_VIDEO_DIALOG_OPENED,{current:o},n),this.dialogRef.closed.subscribe(s=>{if(!s)return;let c=s.lastVideoDuration*1e3,u={videoID:s.lastVideo.id,videoIndex:s.lastVideoIndex,playedTillMS:c,playedTillPercent:c/n.durationMS},d=new jr(Xe.EVENT_VIDEO_DIALOG_CLOSED,{current:u},this.triggerContext?.triggerData);d.videos=[s.lastVideo.id],this.sendEventToRenderer(d),this.dialogRef=null})}static \u0275fac=function(r){return new(r||t)(tn(Pp),tn(qn))};static \u0275cmp=Le({type:t,selectors:[["cooee-shoppable-videos"]],viewQuery:function(r,i){if(r&1&&zn(eE,5),r&2){let o;Kn(o=Xn())&&(i.videoElements=o)}},features:[St],decls:7,vars:4,consts:[["videoEl",""],["id","lc-heading-text",1,"lc-heading-text"],[1,"lc-video-list"],[1,"lc-video-stories"],[1,"lc-video-card"],["href","",1,"lc-video-wrapper",3,"click"],["width","100%","playsinline","","loop","","preload","metadata",3,"mouseenter","mouseleave","poster","muted"],[3,"src","type"],[1,"lc-video-controls"],[3,"muted","videoEl"],["id","lc-single-product",1,"lc-single-product"],["id","lc-cta-button","type","button",1,"lc-cta-button"],[3,"card"],[3,"toggled","muted","videoEl"],[1,"lc-item-image",3,"src","alt"],[1,"lc-item-details"],[1,"lc-item-name"],[1,"lc-prices"],[1,"lc-item-price",3,"innerHTML"],[1,"lc-item-cmp-price",3,"innerHTML"],["id","lc-cta-button","type","button",1,"lc-cta-button",3,"click"],[3,"linkClicked","card"],[1,"lc-video-story"],["viewBox","0 0 100 100"],["cx","50","cy","50","r","48","fill","none","stroke-width","4"],["id","lc-video-story-circle","cx","50","cy","50","r","48","fill","none","stroke-width","4","stroke-linecap","round","stroke-dasharray","301.6","stroke-dashoffset","301.6"],[1,"story-video-container"],["autoplay","","loop","",3,"click","muted"],[3,"video"],[3,"videoClicked","closeClicked","video"]],template:function(r,i){if(r&1&&(gt(0)(1)(2),Oe(3,tE,2,1,"div",1)(4,lE,3,0,"div",2)(5,fE,3,0,"div",3)(6,hE,2,2)),r&2){let o=i.videoConfig.template;V(),yt(!i.videoConfig.autoPlay||i.videoConfig.autoPlay===i.VideoConfigAutoPlay.ON),V(),yt(i.videoConfig.autoPlay===i.VideoConfigAutoPlay.ON_HOVER),V(),Te(i.videoConfig.heading?3:-1),V(),Te(o===i.VideoConfigTemplate.SIMPLE||o===i.VideoConfigTemplate.SWIPER?4:o===i.VideoConfigTemplate.STORY?5:o===i.VideoConfigTemplate.FLOATING_POPUP?6:-1)}},dependencies:[yn,ss,Fn,$r,Xr],styles:["[_nghost-%COMP%]{display:block}.lc-heading-text[_ngcontent-%COMP%]{margin-bottom:.5rem;font-size:1.125rem;text-align:center;font-weight:700}.lc-video-list[_ngcontent-%COMP%]{display:flex;overflow-x:auto;gap:24px;margin:8px;align-items:center;scroll-snap-type:x mandatory;scroll-behavior:smooth}@media (min-width: 768px){.lc-video-list[_ngcontent-%COMP%]{justify-content:center}}.lc-video-wrapper[_ngcontent-%COMP%]{position:relative;border-radius:.5rem}.lc-video-wrapper[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{border-radius:.5rem;transition:transform .3s}.lc-video-wrapper[_ngcontent-%COMP%] video[_ngcontent-%COMP%]:hover{transform:scale(1.1)}.lc-video-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2.5px;scroll-snap-align:center;min-width:200px;max-width:300px}.lc-cta-button[_ngcontent-%COMP%]{cursor:pointer;background:rgb(var(--lc-color-button));color:rgb(var(--lc-color-button-text));border-radius:var(--lc-button-radius);width:100%;height:auto;text-align:center;z-index:4;padding:1rem}.lc-video-stories[_ngcontent-%COMP%]{display:flex;overflow:auto;margin:.75rem;gap:.75rem;justify-content:center;align-items:center}.lc-video-controls[_ngcontent-%COMP%]{position:absolute;bottom:8px;z-index:10;right:8px;display:flex;gap:8px}.lc-single-product[_ngcontent-%COMP%]{display:flex;margin:.25rem 0;gap:.25rem;align-items:center}.lc-single-product[_ngcontent-%COMP%] .lc-item-image[_ngcontent-%COMP%]{width:50px;height:50px;border-radius:.5rem;display:none}.lc-single-product[_ngcontent-%COMP%] .lc-item-details[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;gap:.25rem;font-size:14px;line-height:normal}.lc-single-product[_ngcontent-%COMP%] .lc-item-details[_ngcontent-%COMP%] .lc-item-name[_ngcontent-%COMP%]{color:rgb(var(--lc-color-text));font-weight:600;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.lc-single-product[_ngcontent-%COMP%] .lc-item-details[_ngcontent-%COMP%] .lc-item-price[_ngcontent-%COMP%]{color:rgb(var(--lc-color-text))}.lc-single-product[_ngcontent-%COMP%] .lc-item-details[_ngcontent-%COMP%] .lc-item-cmp-price[_ngcontent-%COMP%]{color:rgba(var(--lc-color-text),.75);text-decoration:line-through;margin-left:10px;display:none}.lc-video-story[_ngcontent-%COMP%]{position:relative;width:5rem;height:5rem;cursor:pointer}.lc-video-story[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.lc-video-story[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] circle[_ngcontent-%COMP%]:first-child{stroke:#d1d5db}.lc-video-story[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] circle[_ngcontent-%COMP%]:last-child{stroke:#3b82f6}.lc-video-story[_ngcontent-%COMP%] .story-video-container[_ngcontent-%COMP%]{width:100%;height:100%;border-radius:9999px;overflow:hidden}.lc-video-story[_ngcontent-%COMP%] .story-video-container[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;border-radius:9999px}"]})};ou("CooeeWidgetSDK");(async()=>{let t=await Kl(au),e=(n,r)=>{let i=tu(n,{injector:t.injector});customElements.define(r,i)};e($o,"cooee-sticky-atc"),e(jo,"cooee-progressbar"),e(_s,"cooee-shoppable-videos"),e(Zi,"cooee-product-options-picker"),sessionStorage.cooeeDebug&&import("./chunk-6234HXDT.js").then(n=>{e(n.DebuggerComponent,"cooee-debugger")}),qr.filters.define("default",function(n){return n??""}),qr.defaultConfig.defaultFilter="default",qr.defaultConfig.useWith=!0,qr.defaultConfig.autoTrim="slurp"})();
|
|
73
|
+
`}var al=!1;function _0(t,e,n){let r=t[e];if(al&&typeof r!="function")throw new Error(`${t.constructor.name} is using untilDestroyed but doesn't implement ${e}`);Hp(t,n),t[e]=function(){r.apply(this,arguments),jp(this,n),t[e]=r}}function Yp(t,e){return n=>{let r=Up(e);typeof e=="string"?_0(t,e,r):(al&&v0(t),Hp(t,r));let i=t[r];return al&&h0(t,i),n.pipe(pr(i))}}function v0(t){let e=Object.getPrototypeOf(t);if(!(Bp in e))throw new Error("untilDestroyed operator cannot be used inside directives or components or providers that are not decorated with UntilDestroy decorator")}var ps=class t{engagementTrigger;isMobile=window.CooeeSDK.uaParser.getDevice().type==="mobile";ngOnInit(){this.engagementTrigger=this.triggerContext?.triggerData}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Le({type:t,selectors:[["cooee-base-video"]],inputs:{triggerContext:"triggerContext"},decls:0,vars:0,template:function(n,r){},encapsulation:2})};var y0=t=>({active:t});function E0(t,e){if(t&1&&Se(0,"img",9),t&2){let n=e.$implicit,r=q(2);pe("src",n.url,ct)("alt",r.selectedItem.name)}}function b0(t,e){if(t&1&&tt(0,E0,1,2,"img",9,cn),t&2){let n=q();nt(n.selectedItem.imgs)}}function w0(t,e){if(t&1&&Se(0,"img",9),t&2){let n=q();pe("src",n.selectedItem.imageURL,ct)("alt",n.selectedItem.name)}}function C0(t,e){if(t&1&&(Se(0,"span",16),Ze(1,"cooeeCurrency"),Ze(2,"safeHtml")),t&2){q(2);let n=Ke(15);pe("innerHTML",rt(2,3,rt(1,1,n.d)),Pt)}}function S0(t,e){if(t&1&&(Se(0,"span",17),Ze(1,"cooeeCurrency"),Ze(2,"safeHtml")),t&2){q(2);let n=Ke(15);pe("innerHTML",rt(2,3,rt(1,1,n.cmp)),Pt)}}function T0(t,e){if(t&1&&(W(0,"div",12),Oe(1,C0,3,5,"span",16)(2,S0,3,5,"span",17),z()),t&2){q();let n=Ke(15);B(),Te(n.d?1:-1),B(),Te(n.cmp?2:-1)}}function I0(t,e){if(t&1){let n=ze();W(0,"a",20),Me("click",function(i){let o=Ne(n).$implicit;return q(2).changeItem(o),i.stopPropagation(),Re(i.preventDefault())}),Se(1,"img",21),z()}if(t&2){let n=e.$implicit,r=q(2);B(),pe("src",n.imageURL,ct)("alt",n.name)("ngClass",Wi(3,y0,n.mID===r.selectedItem.mID+""))}}function x0(t,e){if(t&1&&(W(0,"span",18),Ae(1,"Selected Product"),z(),W(2,"div",8),tt(3,I0,2,5,"a",19,cn),z()),t&2){let n=q();B(3),nt(n.items)}}function O0(t,e){if(t&1&&(W(0,"span",22),Ae(1,"Select Variant"),z(),Se(2,"cooee-item-options-picker",23)),t&2){let n=q();B(2),pe("item",n.selectedItem)}}function A0(t,e){if(t&1&&(W(0,"div",24),Ae(1,"Description"),z(),Se(2,"div",25),Ze(3,"safeHtml")),t&2){let n=q();B(2),pe("innerHTML",rt(3,1,n.selectedItem.desc),Pt)}}function D0(t,e){t&1&&Ae(0," Open Cart ")}function N0(t,e){t&1&&Ae(0," Add To Cart ")}var hs=class t{selectedItem;items;closeModel=new at;performCTA=new at;atcClicked=!1;selectedVariant=null;ClickActionType=Ut;ngOnInit(){this.updateSelectedVariant()}closeDialog(){this.closeModel.emit()}clickAddToCart(e){this.performCTA.emit({item:e,cta:this.atcClicked?Ut.OPEN_CART:Ut.ADD_TO_CART}),this.atcClicked=!0}async changeItem(e){this.selectedItem=e,this.updateSelectedVariant()}changeVariant(e,n){e.stopPropagation(),e.preventDefault(),this.selectedVariant=n,this.selectedItem.selectedOrFirstVariant.value=this.selectedVariant}updateSelectedVariant(){this.selectedVariant=this.selectedItem.selectedOrFirstVariant.value}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Le({type:t,selectors:[["cooee-product-modal"]],inputs:{selectedItem:"selectedItem",items:"items"},outputs:{closeModel:"closeModel",performCTA:"performCTA"},decls:26,vars:8,consts:[[1,"lc-card-wrapper"],[1,"lc-card-header"],[1,"lc-header"],[1,"lc-close-button",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","fill","#000"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"],[1,"lc-card-content"],[1,"lc-image-strip"],[1,"w-28","h-28","object-contain",3,"src","alt"],[1,"lc-inner-body"],[1,"lc-item-name"],[1,"lc-prices"],[1,"lc-card-footer"],[1,"lc-cta-button",3,"click"],[1,"lc-more-info-button",3,"click"],[1,"lc-item-price",3,"innerHTML"],[1,"lc-item-cmp-price",3,"innerHTML"],[1,"lc-selected-product-title"],["href","#"],["href","#",3,"click"],[1,"product-selector",3,"src","alt","ngClass"],[1,"lc-selected-variant-title"],[3,"item"],[1,"lc-description-title"],[1,"lc-description",3,"innerHTML"]],template:function(n,r){if(n&1){let i=ze();W(0,"div",0)(1,"div",1)(2,"div",2),Ae(3,"Shop Now"),z(),W(4,"button",3),Me("click",function(){return Ne(i),Re(r.closeDialog())}),Vt(),W(5,"svg",4),Se(6,"path",5)(7,"path",6),z()()(),Gn(),W(8,"div",7)(9,"div",8),Oe(10,b0,2,0)(11,w0,1,2,"img",9),z(),W(12,"div",10)(13,"div",11),Ae(14),z(),gt(15),Oe(16,T0,3,2,"div",12)(17,x0,5,0)(18,O0,3,1)(19,A0,4,3),z()(),W(20,"div",13)(21,"button",14),Me("click",function(){return Ne(i),Re(r.clickAddToCart(r.selectedItem))}),Oe(22,D0,1,0)(23,N0,1,0),z(),W(24,"button",15),Me("click",function(){return Ne(i),Re(r.performCTA.emit({item:r.selectedItem,cta:r.ClickActionType.GO_TO_PRODUCT}))}),Ae(25," More Info "),z()()()}if(n&2){B(10),Te(r.selectedItem.imgs!=null&&r.selectedItem.imgs.length?10:11),B(4),ln(r.selectedItem.name),B();let i=yt(r.selectedVariant==null?null:r.selectedVariant.price);B(),Te(i?16:-1),B(),Te(r.items.length>1?17:-1),B(),Te(r.selectedItem.vars[0]!=null&&r.selectedItem.vars[0].name!=="Default Title"?18:-1),B(),Te(r.selectedItem.desc?19:-1),B(3),Te(r.atcClicked?22:23)}},dependencies:[Fn,yn,Ln,_r],styles:["[_nghost-%COMP%]{display:block;background:#fff}.lc-card-wrapper[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;height:100%;overflow:auto}.lc-card-header[_ngcontent-%COMP%]{display:var(--header-display, flex);flex-direction:row;justify-content:space-between;align-items:center;padding:8px 16px;border-bottom:1px solid var(--lc-color-gray-300)}.lc-header[_ngcontent-%COMP%]{font-size:24px;font-weight:500;color:#000}.lc-close-button[_ngcontent-%COMP%]{background:transparent;border:none;width:36px;height:36px}.lc-close-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{fill:#000000b3}.lc-card-content[_ngcontent-%COMP%]{flex:1;overflow-y:auto;overscroll-behavior:contain}.lc-inner-body[_ngcontent-%COMP%]{padding:16px;display:flex;flex-direction:column;gap:8px}.lc-image-strip[_ngcontent-%COMP%]{width:100%;display:flex;overflow-x:auto;gap:.5rem;flex-wrap:nowrap}.lc-image-strip[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:auto;height:200px}.lc-image-strip[_ngcontent-%COMP%] .product-selector[_ngcontent-%COMP%]{height:100px;flex-shrink:0;padding:2px}.lc-image-strip[_ngcontent-%COMP%] .product-selector.active[_ngcontent-%COMP%]{border:red solid 1px}.lc-item-name[_ngcontent-%COMP%]{font-size:20px;font-weight:600;line-height:normal;color:rgb(var(--lc-color-text))}.lc-item-price[_ngcontent-%COMP%]{font-size:18px;font-weight:500;color:rgb(var(--lc-color-text))}.lc-item-cmp-price[_ngcontent-%COMP%]{font-size:18px;font-weight:500;color:rgba(var(--lc-color-text),.75);margin-left:10px;text-decoration:line-through;display:none}.lc-description-title[_ngcontent-%COMP%], .lc-selected-product-title[_ngcontent-%COMP%], .lc-selected-variant-title[_ngcontent-%COMP%]{font-size:18px;font-weight:600;margin-top:8px;line-height:normal;color:#000}.lc-description[_ngcontent-%COMP%]{line-height:normal;color:#000}.lc-card-footer[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;padding:12px;background-color:#0000004d;box-shadow:0 4px 6px #52525b4d;gap:12px}.lc-cta-button[_ngcontent-%COMP%], .lc-more-info-button[_ngcontent-%COMP%]{width:50%;padding:12px;border:none;border-radius:.5rem;font-weight:600;display:flex;justify-content:center;cursor:pointer;font-size:16px}.lc-cta-button[_ngcontent-%COMP%]{background-color:#000;color:#fff}.lc-more-info-button[_ngcontent-%COMP%]{background-color:#fff;color:#000}"]})};var ms=class t{width;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Le({type:t,selectors:[["cooee-video-progress-bar"]],inputs:{width:"width"},decls:5,vars:2,consts:[[1,"lc:absolute","lc:top-1","lc:w-full","lc:z-10"],[1,"lc:px-2"],[1,"lc:h-1","lc:w-full","lc:bg-gray-700","lc:mb-2"],[1,"lc:h-1","lc:bg-pink-500"]],template:function(n,r){n&1&&(W(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),Se(4,"div"),z()()()()),n&2&&(B(3),ni("width",r.width,"%"))},encapsulation:2})};function R0(t,e){if(t&1&&(Se(0,"span",7),Ze(1,"cooeeCurrency"),Ze(2,"safeHtml")),t&2){q();let n=Ke(7);pe("innerHTML",rt(2,3,rt(1,1,n.cmp)),Pt)}}function M0(t,e){t&1&&Ae(0," Open Cart ")}function P0(t,e){t&1&&Ae(0," Add To Cart ")}var gs=class t{item;performCTA=new at;atcClicked=!1;clickAddToCart(e){e.stopPropagation(),this.performCTA.emit({item:this.item,cta:this.atcClicked?Ut.OPEN_CART:Ut.ADD_TO_CART}),this.atcClicked=!0}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Le({type:t,selectors:[["cooee-product-card"]],inputs:{item:"item"},outputs:{performCTA:"performCTA"},decls:15,vars:13,consts:[[1,"lc-item-card"],[1,"lc-card-content"],[1,"lc-item-image",3,"alt","src"],[1,"lc-product-details"],[1,"lc-item-name"],[1,"lc-prices"],[1,"lc-item-price",3,"innerHTML"],[1,"lc-item-cmp-price",3,"innerHTML"],[1,"lc-cta-button",3,"click"]],template:function(n,r){if(n&1){let i=ze();W(0,"div",0)(1,"div",1),Se(2,"img",2),W(3,"div",3)(4,"div",4),Ae(5),z(),W(6,"div",5),gt(7),Se(8,"span",6),Ze(9,"cooeeCurrency"),Ze(10,"safeHtml"),Oe(11,R0,3,5,"span",7),z()()(),W(12,"button",8),Me("click",function(s){return Ne(i),Re(r.clickAddToCart(s))}),Oe(13,M0,1,0)(14,P0,1,0),z()()}if(n&2){B(2),Sn("alt",r.item.name),pe("src",r.item.imageURL,ct),B(3),Tt(" ",r.item.name," "),B(2);let i=yt(r.item.selectedOrFirstVariant.value.price);B(),pe("innerHTML",rt(10,11,rt(9,9,i.d)),Pt),B(3),Te(i.cmp?11:-1),B(),ri("atc-clicked",r.atcClicked),B(),Te(r.atcClicked?13:14)}},dependencies:[yn,Fn],styles:["[_nghost-%COMP%]{display:block;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background-color:#ffffff80;border-radius:7px;cursor:pointer}.lc-item-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;padding:8px}.lc-card-content[_ngcontent-%COMP%]{display:flex;gap:8px;width:100%;align-items:start}.lc-item-image[_ngcontent-%COMP%]{width:70px;height:70px;object-fit:cover;box-sizing:border-box;border-radius:7px}.lc-product-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:3.5px;font-size:10.5px}.lc-item-name[_ngcontent-%COMP%]{font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:16px;line-height:normal;color:rgb(var(--lc-color-text))}.lc-item-price[_ngcontent-%COMP%]{font-size:16px;line-height:normal;color:rgb(var(--lc-color-text))}.lc-item-cmp-price[_ngcontent-%COMP%]{font-size:16px;line-height:normal;color:rgba(var(--lc-color-text),.75);margin-left:10px;text-decoration:line-through;display:none}.lc-cta-button[_ngcontent-%COMP%]{padding:12px 8px;border:none;border-radius:8px;width:100%;background:#000;text-align:center;font-weight:500;cursor:pointer;color:#fff;font-size:16px}.lc-cta-button.atc-clicked[_ngcontent-%COMP%]{background:#000}"]})};function L0(t,e){if(t&1&&(W(0,"span",1),Ae(1),z()),t&2){q();let n=Ke(0);B(),ln(n.heading)}}function F0(t,e){if(t&1&&(W(0,"span",2),Ae(1),z()),t&2){q();let n=Ke(0);B(),ln(n.subHeading)}}var Xr=class t{card=Hi.required();linkClicked=Rl();linkAfterSanity(){return this.card()?.buttonLink?.startsWith("https")?this.card().buttonLink:null}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Le({type:t,selectors:[["cooee-video-card"]],inputs:{card:[1,"card"]},outputs:{linkClicked:"linkClicked"},decls:6,vars:6,consts:[[1,"video-card-details"],[1,"heading"],[1,"subheading"],["rel","noopener noreferrer",1,"cta-button",3,"click","href","target"]],template:function(n,r){if(n&1){let i=ze();gt(0),W(1,"div",0),Oe(2,L0,2,1,"span",1)(3,F0,2,1,"span",2),W(4,"a",3),Me("click",function(){return Ne(i),Re(r.linkClicked.emit())}),Ae(5),z()()}if(n&2){let i=yt(r.card());B(2),Te(i!=null&&i.heading?2:-1),B(),Te(i!=null&&i.subHeading?3:-1),B(),pe("href",r.linkAfterSanity(),ct)("target",i.newTab?"_blank":"_self"),B(),Tt(" ",i==null?null:i.buttonTitle," ")}},styles:["[_nghost-%COMP%]{display:block}.video-card-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:3.75px;font-size:14px;line-height:normal}.video-card-details[_ngcontent-%COMP%] .cta-button[_ngcontent-%COMP%]{text-align:center;background-color:#fff;border-radius:var(--lc-button-radius);padding:7.5px 15px;font-weight:500;cursor:pointer;color:var(--lc-color-button);font-size:12px;border:0;text-decoration:none}.video-card-details[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%], .video-card-details[_ngcontent-%COMP%] .subheading[_ngcontent-%COMP%]{text-align:start;color:#000;font-weight:600;overflow:hidden}.video-card-details[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%]{font-size:18px}.video-card-details[_ngcontent-%COMP%] .subheading[_ngcontent-%COMP%]{font-size:16px}"],changeDetection:0})};var k0=["swiperContainer"],V0=["videoEl"],B0=(t,e)=>e.url,U0=(t,e)=>e.mID;function H0(t,e){if(t&1&&Se(0,"source",14),t&2){let n=e.$implicit;Sn("type",n.mimeType),pe("src",n.url,ct)}}function j0(t,e){t&1&&Ns(0)}function $0(t,e){if(t&1){let n=ze();Se(0,"cooee-video-progress-bar",17),W(1,"div",18)(2,"cooee-mute-toggle",19),Me("toggled",function(){Ne(n);let i=q(2);return Re(i.toggleMute())}),z(),Oe(3,j0,1,0,"ng-container",10),z()}if(t&2){let n=q().$index,r=nn(4),i=q(),o=nn(11);pe("width",i.videoProgress[n]||0),B(2),pe("muted",i.muted)("videoEl",r),B(),pe("ngTemplateOutlet",o)}}function G0(t,e){if(t&1){let n=ze();W(0,"cooee-product-card",23),Me("performCTA",function(i){Ne(n);let o=q(3).$implicit,s=q();return Re(s.performClickToAction(i,o))})("click",function(){let i=Ne(n).$implicit,o=q(3).$implicit,s=q();return Re(s.productCardClicked(i,o))}),z()}if(t&2){let n=e.$implicit;pe("item",n)}}function W0(t,e){if(t&1&&(W(0,"div",20),tt(1,G0,1,1,"cooee-product-card",22,U0),z()),t&2){let n=q(2).$implicit;B(),nt(n.items)}}function Y0(t,e){if(t&1&&Se(0,"cooee-video-card",21),t&2){let n=q(2).$implicit;pe("card",n.card)}}function z0(t,e){if(t&1&&(W(0,"div",15),Oe(1,W0,3,0,"div",20)(2,Y0,1,1,"cooee-video-card",21),z()),t&2){let n=q().$implicit,r=q();B(),Te(n.items.length&&r.footerContent===r.VideoConfigFooterContent.FIRST_ITEM?1:n.card&&r.footerContent===r.VideoConfigFooterContent.CARD?2:-1)}}function K0(t,e){if(t&1){let n=ze();W(0,"cooee-product-modal",24),Me("performCTA",function(i){Ne(n);let o=q(2);return Re(o.performClickToAction(i,o.selectedVideo))})("closeModel",function(){Ne(n);let i=q(2);return Re(i.productModalClosed())}),z()}if(t&2){let n=q(2);pe("selectedItem",n.selectedItem)("items",n.selectedVideo.items)}}function X0(t,e){if(t&1){let n=ze();W(0,"div",6)(1,"div",11)(2,"div",12)(3,"video",13,2),Me("timeupdate",function(i){let o=Ne(n).$index,s=q();return Re(s.updateProgress(i,o))})("click",function(){let i=Ne(n).$index,o=q();return Re(o.currentIndex===i&&o.toggleMute())})("ended",function(){Ne(n);let i=nn(4),o=q();return Re(o.onVideoEnded(i))}),tt(5,H0,1,2,"source",14,B0),z(),Oe(7,$0,4,4)(8,z0,3,1,"div",15),z(),Oe(9,K0,1,2,"cooee-product-modal",16),z()()}if(t&2){let n=e.$implicit,r=e.$index,i=q();B(3),pe("ngClass",i.viewTemplateClassName)("autoplay",i.currentIndex===r)("muted",i.muted)("poster",n.thumbnail,ct),Cn("data-video-id",n.id),B(2),nt(n.sources),B(2),Te(i.currentIndex===r?7:-1),B(),Te(i.currentIndex===r?8:-1),B(),Te(i.selectedItem&&i.currentIndex===r?9:-1)}}function q0(t,e){t&1&&Ns(0)}function Z0(t,e){if(t&1){let n=ze();W(0,"button",25),Me("click",function(){Ne(n);let i=q();return Re(i.close())}),Vt(),W(1,"svg",26),Se(2,"path",27)(3,"path",28),z()()}}var an=class extends ps{constructor(n,r,i,o){super();this.cdr=n;this.elementRef=r;this.dialogRef=i;this.data=o;this.videos=o.videos,this.currentIndex=o.currentIndex,this.triggerContext=o.triggerContext}videos=[];currentIndex=0;swiperContainerRef;videoElements;VideoConfigFooterContent=xi;muted=!1;videoProgress=[];selectedItem=null;selectedVideo;swiperInstance;detailPopupTemplate;footerContent;viewTemplateClassName="lc-video-only-view";resizeDebouncer=new fs(this.onResize.bind(this));onResize(){this.swiperInstance?.destroy?.(),this.reInitSwiper()}ngOnInit(){super.ngOnInit();let n=this.engagementTrigger?.content?.videoConfig;this.detailPopupTemplate=n?.detailPopup.template??"VIDEO_ONLY_VIEW",this.footerContent=n?.footerContent??"FIRST_ITEM";let r=this.elementRef.nativeElement.shadowRoot,i=yr.get().website.commonCSS;switch(Yt.injectRawCSS(i,r),Yt.injectStylesheet(xn.styleURL,r),Yt.injectSwiperCSS(r),this.detailPopupTemplate){case"PRODUCT_DETAIL_VIEW":this.selectItemForDetailView(),this.viewTemplateClassName="lc-product-detail-view";break;case"VIDEO_ONLY_VIEW":this.viewTemplateClassName="lc-video-only-view";break}}ngAfterViewInit(){Cl(this.getCurrentVideoElement(),"loadeddata").pipe(Yp(this)).subscribe(()=>{this.initSwiper()})}ngOnDestroy(){this.swiperInstance?.destroy?.(),this.resizeDebouncer.destroy()}close(n=this.videos[this.currentIndex],r=this.currentIndex){let i=this.getCurrentVideoElement();this.dialogRef.close({lastVideo:n,lastVideoIndex:r,lastVideoDuration:i?.currentTime})}performClickToAction(n,r){this.data.onCTAPerformed({cta:n.cta,item:n.item,video:r})}getCurrentVideoElement(){return this.videoElements.get(this.currentIndex)?.nativeElement}moveToNextVideo(){this.swiperInstance.slideTo(this.currentIndex+1)}productModalClosed(){this.selectedItem=null,this.selectedVideo=void 0,this.swiperInstance.enable()}pauseAll(){this.videoElements.forEach(n=>n.nativeElement.pause())}async toggleMute(){this.muted=!this.muted,this.videoElements.forEach(i=>i.nativeElement.muted=this.muted);let r=[this.muted?Xe.EVENT_VIDEO_MUTED:Xe.EVENT_VIDEO_UNMUTED,{current:this.currentVideoProps()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(r),await Nr.set(Ar.MUTED,this.muted),this.cdr.detectChanges()}playActiveVideo(){this.pauseAll();let n=this.getCurrentVideoElement();n&&(n.currentTime=1,n.play().then(async()=>{this.muted=await Nr.get(Ar.MUTED,!1),n.muted=this.muted}))}onVideoEnded(n){if(this.currentIndex<this.videos.length-1)this.selectedItem?(n.currentTime=0,n.play()):this.moveToNextVideo();else{let r=this.getPreviousVideoDataForEvent(),i=[Xe.EVENT_LAST_VIDEO_ENDED,{previous:r},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(i),n.currentTime=0,n.play()}}updateProgress(n,r){let i=n.target;this.videoProgress[r]=i.currentTime/i.duration*100,this.cdr.detectChanges()}onSlideChange(n){let r=this.getPreviousVideoDataForEvent();this.currentIndex=n.realIndex,this.playActiveVideo(),this.detailPopupTemplate==="PRODUCT_DETAIL_VIEW"?this.selectItemForDetailView():(this.selectedItem=null,delete this.selectedVideo);let i=this.currentVideoProps(),o={previous:r,current:i},s=[Xe.EVENT_VIDEO_CHANGE,o,{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(s)}productCardClicked(n,r){let i={videoID:r.id,videoIndex:this.currentIndex},o=[Xe.EVENT_MORE_ITEM_INFO_CLICKED,{current:i},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(o),this.selectedItem=n,this.selectedVideo=r,this.swiperInstance.disable()}reInitSwiper(){this.initSwiper(),this.selectedItem&&this.swiperInstance.disable()}initSwiper(){let n=this.isMobile?1:"auto",r=0;this.detailPopupTemplate==="PRODUCT_DETAIL_VIEW"&&(n="auto",r=10),this.swiperInstance=new window.CooeeSDK.Swiper(this.swiperContainerRef.nativeElement,{direction:this.isMobile?"vertical":"horizontal",effect:this.isMobile?"slide":"coverflow",slidesPerView:n,initialSlide:this.currentIndex,centeredSlides:!0,spaceBetween:r,coverflowEffect:{rotate:0,stretch:0,depth:400,modifier:1,slideShadows:!1},navigation:{nextEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-next"),prevEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-prev")}}),this.swiperInstance.on("slideChange",i=>{this.onSlideChange(i),this.cdr.detectChanges()}),this.playActiveVideo()}currentVideoProps(){return{videoID:this.videos[this.currentIndex].id,videoIndex:this.currentIndex}}getPreviousVideoDataForEvent(){let n=this.currentVideoProps(),r=this.videoElements.find(o=>o.nativeElement.dataset.videoId===this.videos[this.currentIndex].id)?.nativeElement;n.playedTillMS=Math.ceil(r?.currentTime*1e3);let i=r?.duration*1e3;return n.playedTillPercent=+(n.playedTillMS/i).toFixed(4),n}selectItemForDetailView(){this.selectedVideo=this.videos[this.currentIndex],this.selectedItem=this.isMobile?null:this.selectedVideo?.items?.[0]??null}};Ts(an,"\u0275fac",function(r){return new(r||an)(tn(Xn),tn(Ct),tn(dr),tn(sl))}),Ts(an,"\u0275cmp",Le({type:an,selectors:[["cooee-video-swiper-dialog"]],viewQuery:function(r,i){if(r&1&&(Yn(k0,5),Yn(V0,5)),r&2){let o;zn(o=Kn())&&(i.swiperContainerRef=o.first),zn(o=Kn())&&(i.videoElements=o)}},inputs:{videos:"videos",currentIndex:"currentIndex"},features:[St],decls:12,vars:2,consts:[["swiperContainer",""],["closeButtonTemplate",""],["videoEl",""],[1,"lc-shadow-inner",3,"ngClass"],[1,"swiper-container"],[1,"swiper-wrapper"],[1,"swiper-slide"],[1,"swiper-button-prev"],[1,"swiper-button-next"],[1,"lc-desktop-controls"],[4,"ngTemplateOutlet"],[1,"lc-video-modal-row"],[1,"lc-video-container"],["playsinline","","preload","metadata",1,"lc-video-el",3,"timeupdate","click","ended","ngClass","autoplay","muted","poster"],[3,"src","type"],[1,"lc-card-container"],[3,"selectedItem","items"],[3,"width"],[1,"lc-video-controls"],[3,"toggled","muted","videoEl"],[1,"lc-card-scroll"],[3,"card"],[3,"item"],[3,"performCTA","click","item"],[3,"performCTA","closeModel","selectedItem","items"],[1,"lc-close-button",3,"click"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 24","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"]],template:function(r,i){if(r&1&&(W(0,"div",3)(1,"div",4,0)(3,"div",5),tt(4,X0,10,8,"div",6,cn),z(),Se(6,"div",7)(7,"div",8),z(),W(8,"div",9),Oe(9,q0,1,0,"ng-container",10),z()(),Oe(10,Z0,4,0,"ng-template",null,1,Hl)),r&2){let o=nn(11);pe("ngClass",i.viewTemplateClassName),B(4),nt(i.videos),B(5),pe("ngTemplateOutlet",o)}},dependencies:[gs,hs,$r,ms,Yl,Ln,Xr],styles:[`:host{display:flex}.lc-shadow-inner{position:relative;width:100vw;height:100vh;display:flex}@media (min-width: 768px){.lc-shadow-inner{background-color:color-mix(in oklab,#000 70%,transparent);justify-content:center;align-items:center}}.swiper-container{--swiper-navigation-size: 50px;--swiper-navigation-color: white;width:100dvw;height:100dvh}.lc-product-detail-view .swiper-container{align-items:center}@media (min-width: 768px){.swiper-container{width:100%;height:100%;max-width:90vw;max-height:90vh}}.swiper-wrapper{max-height:100%}.lc-product-detail-view .swiper-wrapper{align-items:center}@media (max-width: 768px){.swiper-button-prev,.swiper-button-next{display:none!important}}.swiper-slide{position:relative;display:flex;align-items:center;visibility:hidden}.lc-product-detail-view .swiper-slide{width:40vw!important;height:70vh!important}@media (min-width: 768px){.lc-product-detail-view .swiper-slide{min-width:650px!important}}@media (max-width: 768px){.lc-product-detail-view .swiper-slide{width:100%!important;height:100%!important}}@media (min-width: 768px){.lc-video-only-view .swiper-slide{width:fit-content!important}}@media (min-width: 768px){.swiper-slide{border-radius:12px;overflow:hidden}}.swiper-slide.swiper-slide-active,.swiper-slide.swiper-slide-prev,.swiper-slide.swiper-slide-next{visibility:visible}video{height:100%}.lc-product-detail-view video{width:100%;object-fit:cover;z-index:-1}.lc-desktop-controls{position:absolute;top:2rem;right:4rem;z-index:10;display:flex;gap:.5rem}@media (max-width: 768px){.lc-desktop-controls{display:none}}.lc-video-controls{position:absolute;top:1rem;z-index:10;right:.5rem;display:flex;gap:.25rem}.lc-video-controls .lc-close-button{display:block}@media (min-width: 768px){.lc-video-controls .lc-close-button{display:none}}.lc-close-button{border:none;display:flex;justify-content:center;align-items:center;width:40px;height:40px;background:#00000080;border-radius:100%}.lc-close-button svg{width:100%;height:100%}@media (min-width: 768px){.lc-close-button{width:48px;height:48px}}.lc-product-detail-view .lc-video-container{height:100%;position:relative}@media (min-width: 768px){.lc-product-detail-view .lc-video-container{width:50%}}.lc-video-only-view .lc-video-container{height:100%}.lc-card-container{position:absolute;bottom:12px;z-index:10;width:100%;padding-inline:12px;box-sizing:border-box}.lc-product-detail-view .lc-card-container{display:none}@media (max-width: 768px){.lc-product-detail-view .lc-card-container{display:block}}.lc-card-scroll{display:flex;overflow-x:auto;gap:12px;width:100%;scrollbar-width:none}.lc-card-scroll::-webkit-scrollbar{display:none}.lc-card-scroll cooee-product-card{flex:0 0 auto;width:80%;max-width:300px}.lc-card-scroll:has(>cooee-product-card:only-child) cooee-product-card{width:100%;max-width:none}.lc-product-detail-view .lc-video-modal-row{display:flex;justify-content:center;height:100%;width:100%}.lc-video-only-view .lc-video-modal-row{display:block;height:100%}.lc-product-detail-view cooee-product-modal{--header-display: none;width:50%;flex:1}@media (max-width: 768px){.lc-product-detail-view cooee-product-modal{--header-display: flex;width:100%;height:70dvh;position:absolute;bottom:0;z-index:2147483646}}.lc-video-only-view cooee-product-modal{width:100%;height:70dvh;z-index:2147483646;bottom:0;position:absolute}
|
|
74
|
+
`],encapsulation:3})),an=gl([Wp()],an);var J0=["videoEl"],zp=(t,e)=>e.url;function Q0(t,e){if(t&1&&(W(0,"div",1),Ae(1),z()),t&2){let n=q();B(),Tt(" ",n.videoConfig.heading," ")}}function eE(t,e){if(t&1&&Se(0,"source",7),t&2){let n=e.$implicit;Sn("type",n.mimeType),pe("src",n.url,ct)}}function tE(t,e){if(t&1){let n=ze();W(0,"cooee-mute-toggle",13),Me("toggled",function(i){Ne(n),q();let o=nn(7),s=q(2);return Re(s.onMuteToggled(i,o))}),z()}if(t&2){q();let n=nn(7);pe("muted",n.muted)("videoEl",n)}}function nE(t,e){if(t&1&&(Se(0,"span",19),Ze(1,"cooeeCurrency"),Ze(2,"safeHtml")),t&2){q();let n=Ke(6);pe("innerHTML",rt(2,3,rt(1,1,n.cmp)),Pt)}}function rE(t,e){if(t&1&&(W(0,"div",10),Se(1,"img",14),W(2,"div",15)(3,"span",16),Ae(4),z(),W(5,"div",17),gt(6),Se(7,"span",18),Ze(8,"cooeeCurrency"),Ze(9,"safeHtml"),Oe(10,nE,3,5,"span",19),z()()()),t&2){q();let n=Ke(0);B(),pe("src",n.imageURL,ct)("alt",n.name),B(3),Tt(" ",n.name," "),B(2);let r=yt(n.selectedOrFirstVariant.value.price);B(),pe("innerHTML",rt(9,8,rt(8,6,r.d)),Pt),B(3),Te(r.cmp?10:-1)}}function iE(t,e){if(t&1){let n=ze();W(0,"button",20),Me("click",function(){Ne(n);let i=q().$implicit,o=Ke(0),s=q(2);return Re(s.addToCartClicked(i,o))}),Ae(1," Add to cart "),z()}}function oE(t,e){if(t&1){let n=ze();W(0,"cooee-video-card",21),Me("linkClicked",function(){Ne(n);let i=q().$implicit,o=q(2);return Re(o.sendTriggerClicked(i))}),z()}if(t&2){q();let n=Ke(1);pe("card",n)}}function sE(t,e){if(t&1){let n=ze();gt(0)(1)(2)(3),W(4,"div",4)(5,"a",5),Me("click",function(i){let o=Ne(n),s=o.$implicit,c=o.$index,u=nn(7),d=q(2);return Re(d.onVideoTap(i,s,c,u))}),W(6,"video",6,0),Me("mouseenter",function(){Ne(n);let i=nn(7);q(2);let o=Ke(2);return Re(o&&i.play())})("mouseleave",function(){Ne(n);let i=nn(7);q(2);let o=Ke(2);return Re(o&&i.pause())}),tt(8,eE,1,2,"source",7,zp),z(),W(10,"div",8),Oe(11,tE,1,2,"cooee-mute-toggle",9),z(),Oe(12,rE,11,10,"div",10),z(),Oe(13,iE,2,0,"button",11)(14,oE,1,1,"cooee-video-card",12),z()}if(t&2){let n=e.$implicit,r=q(2),i=Ke(1),o=yt(n.items[0]);B();let s=yt(n.card),c=o&&r.videoConfig.footerContent==r.VideoConfigFooterContent.FIRST_ITEM,u=s&&r.videoConfig.footerContent==r.VideoConfigFooterContent.CARD;B(5),pe("poster",n.thumbnail,ct)("muted",!0),Cn("autoplay",i||null),B(2),nt(n.sources),B(3),Te(r.videoConfig.showMuteButton?11:-1),B(),Te(c?12:-1),B(),Te(c?13:u?14:-1)}}function aE(t,e){if(t&1&&(W(0,"div",2),tt(1,sE,15,8,"div",4,cn),z()),t&2){let n=q();B(),nt(n.videos)}}function cE(t,e){if(t&1&&Se(0,"source",7),t&2){let n=e.$implicit;Sn("type",n.mimeType),pe("src",n.url,ct)}}function lE(t,e){if(t&1){let n=ze();W(0,"div",22),Vt(),W(1,"svg",23),Se(2,"circle",24)(3,"circle",25),z(),Gn(),W(4,"div",26)(5,"video",27),Me("click",function(i){let o=Ne(n),s=o.$implicit,c=o.$index,u=q(2);return Re(u.onVideoTap(i,s,c))}),tt(6,cE,1,2,"source",7,zp),z()()()}if(t&2){let n=e.$implicit;B(5),pe("muted",!0),B(),nt(n.sources)}}function uE(t,e){if(t&1&&(W(0,"div",3),tt(1,lE,8,1,"div",22,cn),z()),t&2){let n=q();B(),nt(n.videos)}}function dE(t,e){if(t&1){let n=ze();W(0,"cooee-draggable-video-popup",29),Me("videoClicked",function(){Ne(n),q();let i=Ke(0),o=q();return Re(o.onPopupVideoClicked(i,0))})("closeClicked",function(){Ne(n);let i=q(2);return Re(i.onPopupVideoClosed())}),z()}if(t&2){q();let n=Ke(0);pe("video",n)}}function fE(t,e){if(t&1&&(gt(0),Oe(1,dE,1,1,"cooee-draggable-video-popup",28)),t&2){let n=q();yt(n.videos[0]),B(),Te(n.hidePopupVideo?-1:1)}}var _s=class t extends un{constructor(n,r){super();this.dialog=n;this.cdr=r}videoElements;videos;VideoConfigTemplate=Ac;VideoConfigFooterContent=xi;VideoConfigAutoPlay=Dc;isMobile=window.CooeeSDK.uaParser.getDevice().type==="mobile";hidePopupVideo;videoConfig;dialogRef=null;ngOnInit(){super.ngOnInit(),Yt.loadSwiperScript()}ngAfterViewInit(){this.playFirstVideo()}engagementTriggerReceived(n){this.videoConfig=n.content?.videoConfig,this.videos=this.videoConfig.videos}sendTriggerClicked(n,r){let i=new jr(Xe.EVENT_TRIGGER_CLICKED,{},this.triggerContext?.triggerData);i.videos=[n.id],r&&(i.items=[r]),this.sendEventToRenderer(i)}onVideoTap(n,r,i,o){n?.stopPropagation(),n?.preventDefault();let s=r.items?.[0];if(this.sendTriggerClicked(r,s?.toEmbed()),this.videoConfig.footerContent==="NONE"){o&&(o.muted=!1,o.play(),this.onMuteToggled(!1,o));return}Yt.loadSwiperScript().then(()=>this.openDialog(r,i))}async performCTA(n){let r,i=this.triggerContext;if(n.cta===Ut.ADD_TO_CART)r=Xe.EVENT_ADD_TO_CART_CLICKED;else if(n.cta===Ut.GO_TO_PRODUCT)r=Xe.EVENT_VIEW_ITEM_CLICKED;else if(n.cta===Ut.OPEN_CART)r=Xe.EVENT_OPEN_CART_CLICKED,i.triggerData.redirectBehaviour=Hs.CART_DRAWER;else{Et.warn(`Unsupported CTA type: ${n.cta}`);return}let o={at:n.cta},s={videoID:n.video.id};this.sendEvent(r,{current:s},n.video,n.item),this.executeCTAViaRenderer({clickAction:o,embeddedItem:n.item.toEmbed()})}addToCartClicked(n,r){this.performCTA({cta:Ut.ADD_TO_CART,item:r,video:n})}onPopupVideoClicked(n,r){this.hidePopupVideo=!0,this.onVideoTap(null,n,r),this.dialogRef?.closed.subscribe(()=>{this.hidePopupVideo=!1,this.cdr.detectChanges()})}onPopupVideoClosed(){this.hidePopupVideo=!0;let n=(new Date().getTime()-this.triggerContext.startTime.getTime())/1e3;this.sendEvent(Xe.EVENT_TRIGGER_CLOSED,{duration:n})}update(){}onMuteToggled(n,r){n||this.videoElements.forEach(i=>{i.nativeElement!==r&&(i.nativeElement.muted=!0,i.nativeElement.pause())})}playFirstVideo(){this.videoConfig.autoPlay==="ON_HOVER"&&this.isMobile&&this.videoElements.first?.nativeElement.play()}sendEvent(n,r,i,o){let s=new jr(n,r,this.engagementTrigger);i&&(s.videos=[i.id]),o&&(s.items=[o.toEmbed()]),this.sendEventToRenderer(s)}openDialog(n,r){let i={videos:this.videos,currentIndex:r,triggerContext:this.triggerContext,onCTAPerformed:s=>this.performCTA(s)};this.dialogRef&&this.dialogRef.close(),this.dialogRef=this.dialog.open(an,{width:"100vw",height:"100vh",data:i});let o={videoID:n.id,videoIndex:r};this.sendEvent(Xe.EVENT_VIDEO_DIALOG_OPENED,{current:o},n),this.dialogRef.closed.subscribe(s=>{if(!s)return;let c=s.lastVideoDuration*1e3,u={videoID:s.lastVideo.id,videoIndex:s.lastVideoIndex,playedTillMS:c,playedTillPercent:c/n.durationMS},d=new jr(Xe.EVENT_VIDEO_DIALOG_CLOSED,{current:u},this.triggerContext?.triggerData);d.videos=[s.lastVideo.id],this.sendEventToRenderer(d),this.dialogRef=null})}static \u0275fac=function(r){return new(r||t)(tn(Pp),tn(Xn))};static \u0275cmp=Le({type:t,selectors:[["cooee-shoppable-videos"]],viewQuery:function(r,i){if(r&1&&Yn(J0,5),r&2){let o;zn(o=Kn())&&(i.videoElements=o)}},features:[St],decls:7,vars:4,consts:[["videoEl",""],["id","lc-heading-text",1,"lc-heading-text"],[1,"lc-video-list"],[1,"lc-video-stories"],[1,"lc-video-card"],["href","",1,"lc-video-wrapper",3,"click"],["width","100%","playsinline","","loop","","preload","metadata",3,"mouseenter","mouseleave","poster","muted"],[3,"src","type"],[1,"lc-video-controls"],[3,"muted","videoEl"],["id","lc-single-product",1,"lc-single-product"],["id","lc-cta-button","type","button",1,"lc-cta-button"],[3,"card"],[3,"toggled","muted","videoEl"],[1,"lc-item-image",3,"src","alt"],[1,"lc-item-details"],[1,"lc-item-name"],[1,"lc-prices"],[1,"lc-item-price",3,"innerHTML"],[1,"lc-item-cmp-price",3,"innerHTML"],["id","lc-cta-button","type","button",1,"lc-cta-button",3,"click"],[3,"linkClicked","card"],[1,"lc-video-story"],["viewBox","0 0 100 100"],["cx","50","cy","50","r","48","fill","none","stroke-width","4"],["id","lc-video-story-circle","cx","50","cy","50","r","48","fill","none","stroke-width","4","stroke-linecap","round","stroke-dasharray","301.6","stroke-dashoffset","301.6"],[1,"story-video-container"],["autoplay","","loop","",3,"click","muted"],[3,"video"],[3,"videoClicked","closeClicked","video"]],template:function(r,i){if(r&1&&(gt(0)(1)(2),Oe(3,Q0,2,1,"div",1)(4,aE,3,0,"div",2)(5,uE,3,0,"div",3)(6,fE,2,2)),r&2){let o=i.videoConfig.template;B(),yt(!i.videoConfig.autoPlay||i.videoConfig.autoPlay===i.VideoConfigAutoPlay.ON),B(),yt(i.videoConfig.autoPlay===i.VideoConfigAutoPlay.ON_HOVER),B(),Te(i.videoConfig.heading?3:-1),B(),Te(o===i.VideoConfigTemplate.SIMPLE||o===i.VideoConfigTemplate.SWIPER?4:o===i.VideoConfigTemplate.STORY?5:o===i.VideoConfigTemplate.FLOATING_POPUP?6:-1)}},dependencies:[yn,ss,Fn,$r,Xr],styles:["[_nghost-%COMP%]{display:block}.lc-heading-text[_ngcontent-%COMP%]{margin-bottom:.5rem;font-size:1.125rem;text-align:center;font-weight:700}.lc-video-list[_ngcontent-%COMP%]{display:flex;overflow-x:auto;gap:24px;margin:8px;align-items:center;scroll-snap-type:x mandatory;scroll-behavior:smooth}@media (min-width: 768px){.lc-video-list[_ngcontent-%COMP%]{justify-content:center}}.lc-video-wrapper[_ngcontent-%COMP%]{position:relative;border-radius:.5rem}.lc-video-wrapper[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{border-radius:.5rem;transition:transform .3s}.lc-video-wrapper[_ngcontent-%COMP%] video[_ngcontent-%COMP%]:hover{transform:scale(1.1)}.lc-video-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2.5px;scroll-snap-align:center;min-width:200px;max-width:300px}.lc-cta-button[_ngcontent-%COMP%]{cursor:pointer;background:rgb(var(--lc-color-button));color:rgb(var(--lc-color-button-text));border-radius:var(--lc-button-radius);width:100%;height:auto;text-align:center;z-index:4;padding:1rem}.lc-video-stories[_ngcontent-%COMP%]{display:flex;overflow:auto;margin:.75rem;gap:.75rem;justify-content:center;align-items:center}.lc-video-controls[_ngcontent-%COMP%]{position:absolute;bottom:8px;z-index:10;right:8px;display:flex;gap:8px}.lc-single-product[_ngcontent-%COMP%]{display:flex;margin:.25rem 0;gap:.25rem;align-items:center}.lc-single-product[_ngcontent-%COMP%] .lc-item-image[_ngcontent-%COMP%]{width:50px;height:50px;border-radius:.5rem;display:none}.lc-single-product[_ngcontent-%COMP%] .lc-item-details[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;gap:.25rem;font-size:14px;line-height:normal}.lc-single-product[_ngcontent-%COMP%] .lc-item-details[_ngcontent-%COMP%] .lc-item-name[_ngcontent-%COMP%]{color:rgb(var(--lc-color-text));font-weight:600;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.lc-single-product[_ngcontent-%COMP%] .lc-item-details[_ngcontent-%COMP%] .lc-item-price[_ngcontent-%COMP%]{color:rgb(var(--lc-color-text))}.lc-single-product[_ngcontent-%COMP%] .lc-item-details[_ngcontent-%COMP%] .lc-item-cmp-price[_ngcontent-%COMP%]{color:rgba(var(--lc-color-text),.75);text-decoration:line-through;margin-left:10px;display:none}.lc-video-story[_ngcontent-%COMP%]{position:relative;width:5rem;height:5rem;cursor:pointer}.lc-video-story[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.lc-video-story[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] circle[_ngcontent-%COMP%]:first-child{stroke:#d1d5db}.lc-video-story[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] circle[_ngcontent-%COMP%]:last-child{stroke:#3b82f6}.lc-video-story[_ngcontent-%COMP%] .story-video-container[_ngcontent-%COMP%]{width:100%;height:100%;border-radius:9999px;overflow:hidden}.lc-video-story[_ngcontent-%COMP%] .story-video-container[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;border-radius:9999px}"]})};ou("CooeeWidgetSDK");(async()=>{let t=await Kl(au),e=(n,r)=>{let i=tu(n,{injector:t.injector});customElements.define(r,i)};e($o,"cooee-sticky-atc"),e(jo,"cooee-progressbar"),e(_s,"cooee-shoppable-videos"),e(_r,"cooee-product-options-picker"),sessionStorage.cooeeDebug&&import("./chunk-6234HXDT.js").then(n=>{e(n.DebuggerComponent,"cooee-debugger")}),qr.filters.define("default",function(n){return n??""}),qr.defaultConfig.defaultFilter="default",qr.defaultConfig.useWith=!0,qr.defaultConfig.autoTrim="slurp"})();
|