@letscooee/web-sdk 9.12.7 → 9.12.9
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/widget.min.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import{$ as
|
|
1
|
+
import{$ as xs,$a as Ll,A as gt,Aa as Ds,B as jn,Ba as Ye,C as tn,Ca as Ae,D as Cl,Da as Z,E as q,Ea as On,F as Fi,Fa as Yn,G as Me,Ga as zn,H as Pe,Ha as Kn,I as Vt,Ia as on,J as $n,Ja as xe,K as ti,Ka as sn,L as Pt,La as xt,M as Sl,Ma as vt,N as ot,Na as Yt,O as kt,Oa as pt,P as xl,Pa as ji,Q as Vi,Qa as Nl,R as Ct,Ra as Rl,S as Wt,Sa as yt,T as Il,Ta as It,U as Tl,Ua as Ml,V as Ol,Va as Pl,W as gr,Wa as kl,X as nn,Xa as Xn,Y as st,Ya as As,Z as H,Za as $i,_ as Bi,_a as Ns,a as D,aa as _r,ab as Tt,b as Te,ba as Is,bb as Fl,c as Qr,ca as rn,cb as Vn,d as ws,da as Ts,db as Vl,e as Pi,ea as Os,eb as Bl,f as ll,fa as Re,g as Cs,ga as Gn,gb as Ul,h as ei,ha as vr,hb as Hl,i as ul,ia as Ui,ib as Bn,j as ft,ja as St,jb as jl,k as dl,kb as Gi,l as fl,la as Oe,lb as Dn,m as pl,ma as Hi,mb as $l,n as hl,na as Tn,nb as Gl,o as ki,oa as ve,ob as Wi,p as Ss,pa as ni,pb as An,q as ml,qa as Wn,qb as ri,r as gl,ra as Dl,rb as an,s as Li,sa as Al,sb as ii,t as _l,ta as Ie,tb as Wl,u as vl,ua as pn,ub as Yl,v as yl,va as Ze,vb as Rs,w as El,wa as Je,wb as Yi,x as bl,xa as W,xb as Ms,y as mr,ya as z,yb as zl,z as wl,za as Se}from"./chunk-HGWRAOKM.js";var Zl=ws((ql,zi)=>{"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(C,O){O.name&&C.unshift("["+O.name+"]")};var g={},p=function(E,C){Function.prototype.apply.call(E,console,C)};return typeof console>"u"?function(){}:function(E,C){E=Array.prototype.slice.call(E);var O=console.log,M;C.level===e.TIME?(M=(C.name?"["+C.name+"] ":"")+E[0],E[1]==="start"?console.time?console.time(M):g[M]=new Date().getTime():console.timeEnd?console.timeEnd(M):p(O,[M+": "+(new Date().getTime()-g[M])+"ms"])):(C.level===e.WARN&&console.warn?O=console.warn:C.level===e.ERROR&&console.error?O=console.error:C.level===e.INFO&&console.info?O=console.info:C.level===e.DEBUG&&console.debug?O=console.debug:C.level===e.TRACE&&console.trace&&(O=console.trace),d.formatter(E,C),p(O,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 zi<"u"&&zi.exports?zi.exports=e:(e._prevLogger=t.Logger,e.noConflict=function(){return t.Logger=e._prevLogger,e},t.Logger=e)})(ql)});var Vs=ws((Ki,Ql)=>{"use strict";(function(t,e){typeof Ki=="object"&&typeof Ql<"u"?e(Ki):typeof define=="function"&&define.amd?define(["exports"],e):e((t=typeof globalThis<"u"?globalThis:t||self).Sqrl={})})(Ki,function(t){"use strict";function e(A){var T,L,P=new Error(A);return T=P,L=e.prototype,Object.setPrototypeOf?Object.setPrototypeOf(T,L):T.__proto__=L,P}function n(A,T,L){var P=T.slice(0,L).split(/\n/),v=P.length,y=P[v-1].length+1;throw e(A+=" at line "+v+" col "+y+`:
|
|
2
2
|
|
|
3
|
-
`+T.split(/\n/)[
|
|
4
|
-
`+Array(
|
|
5
|
-
`).replace(/^\s+|\s+$/gm,"")),u.lastIndex=0,d.lastIndex=0,g.lastIndex=0;var
|
|
6
|
-
`)}}return
|
|
3
|
+
`+T.split(/\n/)[v-1]+`
|
|
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,T){return Object.prototype.hasOwnProperty.call(A,T)}function s(A,T,L){for(var P in T)o(T,P)&&(T[P]==null||typeof T[P]!="object"||P!=="storage"&&P!=="prefixes"||L?A[P]=T[P]:A[P]=s({},T[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 C(A,T){T.rmWhitespace&&(A=A.replace(/[\r\n]+/g,`
|
|
5
|
+
`).replace(/^\s+|\s+$/gm,"")),u.lastIndex=0,d.lastIndex=0,g.lastIndex=0;var L=T.prefixes,P=[L.h,L.b,L.i,L.r,L.c,L.e].reduce(function(ae,ee){return ae&&ee?ae+"|"+E(ee):ee?E(ee):ae},""),v=new RegExp("([|()]|=>)|('|\"|`|\\/\\*)|\\s*((\\/)?(-|_)?"+E(T.tags[1])+")","g"),y=new RegExp("([^]*?)"+E(T.tags[0])+"(-|_)?\\s*("+P+")?\\s*","g"),U=0,J=!1;function ne(ae,ee){var de,ce={f:[]},pe=0,he="c";function me(_e){var we=A.slice(U,_e),be=we.trim();if(he==="f")be==="safe"?ce.raw=!0:T.async&&c.test(be)?(be=be.replace(c,""),ce.f.push([be,"",!0])):ce.f.push([be,""]);else if(he==="fp")ce.f[ce.f.length-1][1]+=be;else if(he==="err"){if(be){var Fe=we.search(/\S/);n("invalid syntax",A,U+Fe)}}else ce[he]=be;U=_e+1}for(ee==="h"||ee==="b"||ee==="c"?he="n":ee==="r"&&(ce.raw=!0,ee="i"),v.lastIndex=U;(de=v.exec(A))!==null;){var h=de[1],a=de[2],l=de[3],_=de[4],x=de[5],N=de.index;if(h)h==="("?(pe===0&&(he==="n"?(me(N),he="p"):he==="f"&&(me(N),he="fp")),pe++):h===")"?--pe===0&&he!=="c"&&(me(N),he="err"):pe===0&&h==="|"?(me(N),he="f"):h==="=>"&&(me(N),U+=1,he="res");else if(a)if(a==="/*"){var F=A.indexOf("*/",v.lastIndex);F===-1&&n("unclosed comment",A,de.index),v.lastIndex=F+2}else a==="'"?(d.lastIndex=de.index,d.exec(A)?v.lastIndex=d.lastIndex:n("unclosed string",A,de.index)):a==='"'?(g.lastIndex=de.index,g.exec(A)?v.lastIndex=g.lastIndex:n("unclosed string",A,de.index)):a==="`"&&(u.lastIndex=de.index,u.exec(A)?v.lastIndex=u.lastIndex:n("unclosed string",A,de.index));else if(l)return me(N),U=N+de[0].length,y.lastIndex=U,J=x,_&&ee==="h"&&(ee="s"),ce.t=ee,ce}return n("unclosed tag",A,ae),ce}var ie=function ae(ee,de){ee.b=[],ee.d=[];var ce,pe=!1,he=[];function me(Fe,Ve){Fe&&(Fe=function(qe,Lt,$t,In){var wt,Ft;return typeof Lt.autoTrim=="string"?wt=Ft=Lt.autoTrim:Array.isArray(Lt.autoTrim)&&(wt=Lt.autoTrim[1],Ft=Lt.autoTrim[0]),($t||$t===!1)&&(wt=$t),(In||In===!1)&&(Ft=In),wt==="slurp"&&Ft==="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)/,"")),Ft==="_"||Ft==="slurp"?qe=String.prototype.trimRight?qe.trimRight():qe.replace(/[\s\uFEFF\xA0]+$/,""):Ft!=="-"&&Ft!=="nl"||(qe=qe.replace(/(?:\n|\r|\r\n)$/,"")),qe)}(Fe,T,J,Ve))&&(Fe=Fe.replace(/\\|'/g,"\\$&").replace(/\r\n|\n|\r/g,"\\n"),he.push(Fe))}for(;(ce=y.exec(A))!==null;){var h,a=ce[1],l=ce[2],_=ce[3]||"";for(var x in L)if(L[x]===_){h=x;break}me(a,l),U=ce.index+ce[0].length,h||n("unrecognized tag type: "+_,A,U);var N=ne(ce.index,h),F=N.t;if(F==="h"){var _e=N.n||"";T.async&&c.test(_e)&&(N.a=!0,N.n=_e.replace(c,"")),N=ae(N),he.push(N)}else if(F==="c"){if(ee.n===N.n)return pe?(pe.d=he,ee.b.push(pe)):ee.d=he,ee;n("Helper start and end don't match",A,ce.index+ce[0].length)}else if(F==="b"){pe?(pe.d=he,ee.b.push(pe)):ee.d=he;var we=N.n||"";T.async&&c.test(we)&&(N.a=!0,N.n=we.replace(c,"")),pe=N,he=[]}else if(F==="s"){var be=N.n||"";T.async&&c.test(be)&&(N.a=!0,N.n=be.replace(c,"")),he.push(N)}else he.push(N)}if(!de)throw e('unclosed helper "'+ee.n+'"');return me(A.slice(U,A.length),!1),ee.d=he,ee}({f:[]},!0);if(T.plugins)for(var ue=0;ue<T.plugins.length;ue++){var Q=T.plugins[ue];Q.processAST&&(ie.d=Q.processAST(ie.d,T))}return ie.d}function O(A,T){var L=C(A,T),P="var tR='';"+(T.useWith?"with("+T.varName+"||{}){":"")+oe(L,T)+"if(cb){cb(null,tR)} return tR"+(T.useWith?"}":"");if(T.plugins)for(var v=0;v<T.plugins.length;v++){var y=T.plugins[v];y.processFnString&&(P=y.processFnString(P,T))}return P}function M(A,T){for(var L=0;L<T.length;L++){var P=T[L][0],v=T[L][1];A=(T[L][2]?"await ":"")+"c.l('F','"+P+"')("+A,v&&(A+=","+v),A+=")"}return A}function k(A,T,L,P,v,y){var U="{exec:"+(v?"async ":"")+K(L,T,A)+",params:["+P+"]";return y&&(U+=",name:'"+y+"'"),v&&(U+=",async:true"),U+="}"}function j(A,T){for(var L="[",P=0;P<A.length;P++){var v=A[P];L+=k(T,v.res||"",v.d,v.p||"",v.a,v.n),P<A.length&&(L+=",")}return L+="]"}function K(A,T,L){return"function("+T+"){var tR='';"+oe(A,L)+"return tR}"}function oe(A,T){for(var L=0,P=A.length,v="";L<P;L++){var y=A[L];if(typeof y=="string")v+="tR+='"+y+"';";else{var U=y.t,J=y.c||"",ne=y.f,ie=y.n||"",ue=y.p||"",Q=y.res||"",ae=y.b,ee=!!y.a;if(U==="i"){T.defaultFilter&&(J="c.l('F','"+T.defaultFilter+"')("+J+")");var de=M(J,ne);!y.raw&&T.autoEscape&&(de="c.l('F','e')("+de+")"),v+="tR+="+de+";"}else if(U==="h")if(T.storage.nativeHelpers.get(ie))v+=T.storage.nativeHelpers.get(ie)(y,T);else{var ce=(ee?"await ":"")+"c.l('H','"+ie+"')("+k(T,Q,y.d,ue,ee);ce+=ae?","+j(ae,T):",[]",v+="tR+="+M(ce+=",c)",ne)+";"}else U==="s"?v+="tR+="+M((ee?"await ":"")+"c.l('H','"+ie+"')({params:["+ue+"]},[],c)",ne)+";":U==="e"&&(v+=J+`
|
|
6
|
+
`)}}return v}var X=function(){function A(T){this.cache=T}return A.prototype.define=function(T,L){this.cache[T]=L},A.prototype.get=function(T){return this.cache[T]},A.prototype.remove=function(T){delete this.cache[T]},A.prototype.reset=function(){this.cache={}},A.prototype.load=function(T){s(this.cache,T,!0)},A}();function Ee(A,T,L,P){if(T&&T.length>0)throw e((P?"Native":"")+"Helper '"+A+"' doesn't accept blocks");if(L&&L.length>0)throw e((P?"Native":"")+"Helper '"+A+"' doesn't accept filters")}var B={"&":"&","<":"<",">":">",'"':""","'":"'"};function fe(A){return B[A]}var te=new X({}),ye=new X({each:function(A,T){var L="",P=A.params[0];if(Ee("each",T,!1),A.async)return new Promise(function(y){(function U(J,ne,ie,ue,Q){ie(J[ne],ne).then(function(ae){ue+=ae,ne===J.length-1?Q(ue):U(J,ne+1,ie,ue,Q)})})(P,0,A.exec,L,y)});for(var v=0;v<P.length;v++)L+=A.exec(P[v],v);return L},foreach:function(A,T){var L=A.params[0];if(Ee("foreach",T,!1),A.async)return new Promise(function(y){(function U(J,ne,ie,ue,Q,ae){ue(ne[ie],J[ne[ie]]).then(function(ee){Q+=ee,ie===ne.length-1?ae(Q):U(J,ne,ie+1,ue,Q,ae)})})(L,Object.keys(L),0,A.exec,"",y)});var P="";for(var v in L)o(L,v)&&(P+=A.exec(v,L[v]));return P},include:function(A,T,L){Ee("include",T,!1);var P=L.storage.templates.get(A.params[0]);if(!P)throw e('Could not fetch template "'+A.params[0]+'"');return P(A.params[1],L)},extends:function(A,T,L){var P=A.params[1]||{};P.content=A.exec();for(var v=0;v<T.length;v++){var y=T[v];P[y.name]=y.exec()}var U=L.storage.templates.get(A.params[0]);if(!U)throw e('Could not fetch template "'+A.params[0]+'"');return U(P,L)},useScope:function(A,T){return Ee("useScope",T,!1),A.exec(A.params[0])}}),Le=new X({if:function(A,T){Ee("if",!1,A.f,!0);var L="if("+A.p+"){"+oe(A.d,T)+"}";if(A.b)for(var P=0;P<A.b.length;P++){var v=A.b[P];v.n==="else"?L+="else{"+oe(v.d,T)+"}":v.n==="elif"&&(L+="else if("+v.p+"){"+oe(v.d,T)+"}")}return L},try:function(A,T){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 L="try{"+oe(A.d,T)+"}",P=A.b[0];return L+="catch"+(P.res?"("+P.res+")":"")+"{"+oe(P.d,T)+"}"},block:function(A,T){return Ee("block",A.b,A.f,!0),"if(!"+T.varName+"["+A.p+"]){tR+=("+K(A.d,"",T)+")()}else{tR+="+T.varName+"["+A.p+"]}"}}),De=new X({e:function(A){var T=String(A);return/[&<>"']/.test(T)?T.replace(/[&<>"']/g,fe):T}}),Ne={varName:"it",autoTrim:[!1,"nl"],autoEscape:!0,defaultFilter:!1,tags:["{{","}}"],l:function(A,T){if(A==="H"){var L=this.storage.helpers.get(T);if(L)return L;throw e("Can't find helper '"+T+"'")}if(A==="F"){var P=this.storage.filters.get(T);if(P)return P;throw e("Can't find filter '"+T+"'")}},async:!1,storage:{helpers:ye,nativeHelpers:Le,filters:De,templates:te},prefixes:{h:"@",b:"#",i:"",r:"*",c:"/",e:"!"},cache:!1,plugins:[],useWith:!1};function Ge(A,T){var L={};return s(L,Ne),T&&s(L,T),A&&s(L,A),L.l.bind(L),L}function We(A,T){var L,P=Ge(T||{}),v=Function;if(P.async){if(!i)throw e("This environment doesn't support async/await");v=i}if(P.varName&&(L=P.varName,/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(L)===!1))throw e("options.varName must be a valid JS identifier");try{return new v(P.varName,"c","cb",O(A,P))}catch(y){throw y instanceof SyntaxError?e(`Bad template syntax
|
|
7
7
|
|
|
8
|
-
`+
|
|
9
|
-
`+Array(
|
|
10
|
-
`+O(A,P)):v}}function ut(A,T){var k;return T.cache&&T.name&&T.storage.templates.get(T.name)?T.storage.templates.get(T.name):(k=typeof A=="function"?A:We(A,T),T.cache&&T.name&&T.storage.templates.define(T.name,k),k)}Oe.l.bind(Oe),t.compile=We,t.compileScope=oe,t.compileScopeIntoFunction=Y,t.compileToString=O,t.defaultConfig=Oe,t.filters=xe,t.getConfig=Ge,t.helpers=Ee,t.nativeHelpers=Me,t.parse=C,t.render=function(A,T,k,P){var y=Ge(k||{});if(!y.async)return ut(A,y)(T,y);if(!P){if(typeof r=="function")return new r(function(v,U){try{v(ut(A,y)(T,y))}catch(Z){U(Z)}});throw e("Please provide a callback function, this env doesn't support Promises")}try{ut(A,y)(T,y,P)}catch(v){return P(v)}},t.templates=te,Object.defineProperty(t,"__esModule",{value:!0})})});var Td=ys((xd,Ka)=>{"use strict";(function(t){if(typeof xd=="object"&&typeof Ka<"u")Ka.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 Jr=="function"&&Jr;if(!p&&E)return E(g,!0);if(u)return u(g,!0);var C=new Error("Cannot find module '"+g+"'");throw C.code="MODULE_NOT_FOUND",C}var O=o[g]={exports:{}};i[g][0].call(O.exports,function(M){var L=i[g][1][M];return c(L||M)},O,O.exports,r,i,o,s)}return o[g].exports}for(var u=typeof Jr=="function"&&Jr,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 H=s.document.createElement("script");H.onreadystatechange=function(){M(),H.onreadystatechange=null,H.parentNode.removeChild(H),H=null},s.document.documentElement.appendChild(H)}:u=function(){setTimeout(M,0)};var C,O=[];function M(){C=!0;for(var H,Y,oe=O.length;oe;){for(Y=O,O=[],H=-1;++H<oe;)Y[H]();oe=O.length}C=!1}i.exports=L;function L(H){O.push(H)===1&&!C&&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(B){if(typeof B!="function")throw new TypeError("resolver must be a function");this.state=p,this.queue=[],this.outcome=void 0,B!==c&&L(this,B)}E.prototype.catch=function(B){return this.then(null,B)},E.prototype.then=function(B,fe){if(typeof B!="function"&&this.state===g||typeof fe!="function"&&this.state===d)return this;var te=new this.constructor(c);if(this.state!==p){var Ee=this.state===g?B:fe;O(te,Ee,this.outcome)}else this.queue.push(new C(te,B,fe));return te};function C(B,fe,te){this.promise=B,typeof fe=="function"&&(this.onFulfilled=fe,this.callFulfilled=this.otherCallFulfilled),typeof te=="function"&&(this.onRejected=te,this.callRejected=this.otherCallRejected)}C.prototype.callFulfilled=function(B){u.resolve(this.promise,B)},C.prototype.otherCallFulfilled=function(B){O(this.promise,this.onFulfilled,B)},C.prototype.callRejected=function(B){u.reject(this.promise,B)},C.prototype.otherCallRejected=function(B){O(this.promise,this.onRejected,B)};function O(B,fe,te){s(function(){var Ee;try{Ee=fe(te)}catch(Me){return u.reject(B,Me)}Ee===B?u.reject(B,new TypeError("Cannot resolve promise with itself")):u.resolve(B,Ee)})}u.resolve=function(B,fe){var te=H(M,fe);if(te.status==="error")return u.reject(B,te.value);var Ee=te.value;if(Ee)L(B,Ee);else{B.state=g,B.outcome=fe;for(var Me=-1,xe=B.queue.length;++Me<xe;)B.queue[Me].callFulfilled(fe)}return B},u.reject=function(B,fe){B.state=d,B.outcome=fe;for(var te=-1,Ee=B.queue.length;++te<Ee;)B.queue[te].callRejected(fe);return B};function M(B){var fe=B&&B.then;if(B&&(typeof B=="object"||typeof B=="function")&&typeof fe=="function")return function(){fe.apply(B,arguments)}}function L(B,fe){var te=!1;function Ee(Ge){te||(te=!0,u.reject(B,Ge))}function Me(Ge){te||(te=!0,u.resolve(B,Ge))}function xe(){fe(Me,Ee)}var Oe=H(xe);Oe.status==="error"&&Ee(Oe.value)}function H(B,fe){var te={};try{te.value=B(fe),te.status="success"}catch(Ee){te.status="error",te.value=Ee}return te}E.resolve=Y;function Y(B){return B instanceof this?B:u.resolve(new this(c),B)}E.reject=oe;function oe(B){var fe=new this(c);return u.reject(fe,B)}E.all=z;function z(B){var fe=this;if(Object.prototype.toString.call(B)!=="[object Array]")return this.reject(new TypeError("must be an array"));var te=B.length,Ee=!1;if(!te)return this.resolve([]);for(var Me=new Array(te),xe=0,Oe=-1,Ge=new this(c);++Oe<te;)We(B[Oe],Oe);return Ge;function We(ut,A){fe.resolve(ut).then(T,function(k){Ee||(Ee=!0,u.reject(Ge,k))});function T(k){Me[A]=k,++xe===te&&!Ee&&(Ee=!0,u.resolve(Ge,Me))}}}E.race=ye;function ye(B){var fe=this;if(Object.prototype.toString.call(B)!=="[object Array]")return this.reject(new TypeError("must be an array"));var te=B.length,Ee=!1;if(!te)return this.resolve([]);for(var Me=-1,xe=new this(c);++Me<te;)Oe(B[Me]);return xe;function Oe(Ge){fe.resolve(Ge).then(function(We){Ee||(Ee=!0,u.resolve(xe,We))},function(We){Ee||(Ee=!0,u.reject(xe,We))})}}},{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(w){if(w.name!=="TypeError")throw w;for(var m=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,S=new m,x=0;x<f.length;x+=1)S.append(f[x]);return S.getBlob(b.type)}}typeof Promise>"u"&&r(3);var E=Promise;function C(f,b){b&&f.then(function(m){b(null,m)},function(m){b(m)})}function O(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 H="local-forage-detect-blob-support",Y=void 0,oe={},z=Object.prototype.toString,ye="readonly",B="readwrite";function fe(f){for(var b=f.length,m=new ArrayBuffer(b),S=new Uint8Array(m),x=0;x<b;x++)S[x]=f.charCodeAt(x);return m}function te(f){return new E(function(b){var m=f.transaction(H,B),S=p([""]);m.objectStore(H).put(S,"key"),m.onabort=function(x){x.preventDefault(),x.stopPropagation(),b(!1)},m.oncomplete=function(){var x=navigator.userAgent.match(/Chrome\/(\d+)/),w=navigator.userAgent.match(/Edge\//);b(w||!x||parseInt(x[1],10)>=43)}}).catch(function(){return!1})}function Ee(f){return typeof Y=="boolean"?E.resolve(Y):te(f).then(function(b){return Y=b,Y})}function Me(f){var b=oe[f.name],m={};m.promise=new E(function(S,x){m.resolve=S,m.reject=x}),b.deferredOperations.push(m),b.dbReady?b.dbReady=b.dbReady.then(function(){return m.promise}):b.dbReady=m.promise}function xe(f){var b=oe[f.name],m=b.deferredOperations.pop();if(m)return m.resolve(),m.promise}function Oe(f,b){var m=oe[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(oe[f.name]=oe[f.name]||Z(),f.db)if(b)Me(f),f.db.close();else return m(f.db);var x=[f.name];b&&x.push(f.version);var w=d.open.apply(d,x);b&&(w.onupgradeneeded=function(R){var V=w.result;try{V.createObjectStore(f.storeName),R.oldVersion<=1&&V.createObjectStore(H)}catch(j){if(j.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 j}}),w.onerror=function(R){R.preventDefault(),S(w.error)},w.onsuccess=function(){var R=w.result;R.onversionchange=function(V){V.target.close()},m(R),xe(f)}})}function We(f){return Ge(f,!1)}function ut(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,x=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),x||m){if(m){var w=f.db.version+1;w>f.version&&(f.version=w)}return!0}return!1}function T(f){return new E(function(b,m){var S=new FileReader;S.onerror=m,S.onloadend=function(x){var w=btoa(x.target.result||"");b({__local_forage_encoded_blob:!0,data:w,type:f.type})},S.readAsBinaryString(f)})}function k(f){var b=fe(atob(f.data));return p([b],{type:f.type})}function P(f){return f&&f.__local_forage_encoded_blob}function y(f){var b=this,m=b._initReady().then(function(){var S=oe[b._dbInfo.name];if(S&&S.dbReady)return S.dbReady});return O(m,f,f),m}function v(f){Me(f);for(var b=oe[f.name],m=b.forages,S=0;S<m.length;S++){var x=m[S];x._dbInfo.db&&(x._dbInfo.db.close(),x._dbInfo.db=null)}return f.db=null,We(f).then(function(w){return f.db=w,A(f)?ut(f):w}).then(function(w){f.db=b.db=w;for(var R=0;R<m.length;R++)m[R]._dbInfo.db=w}).catch(function(w){throw Oe(f,w),w})}function U(f,b,m,S){S===void 0&&(S=1);try{var x=f.db.transaction(f.storeName,b);m(null,x)}catch(w){if(S>0&&(!f.db||w.name==="InvalidStateError"||w.name==="NotFoundError"))return E.resolve().then(function(){if(!f.db||w.name==="NotFoundError"&&!f.db.objectStoreNames.contains(f.storeName)&&f.version<=f.db.version)return f.db&&(f.version=f.db.version+1),ut(f)}).then(function(){return v(f).then(function(){U(f,b,m,S-1)})}).catch(m);m(w)}}function Z(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function ne(f){var b=this,m={db:null};if(f)for(var S in f)m[S]=f[S];var x=oe[m.name];x||(x=Z(),oe[m.name]=x),x.forages.push(b),b._initReady||(b._initReady=b.ready,b.ready=y);var w=[];function R(){return E.resolve()}for(var V=0;V<x.forages.length;V++){var j=x.forages[V];j!==b&&w.push(j._initReady().catch(R))}var $=x.forages.slice(0);return E.all(w).then(function(){return m.db=x.db,We(m)}).then(function(G){return m.db=G,A(m,b._defaultConfig.version)?ut(m):G}).then(function(G){m.db=x.db=G,b._dbInfo=m;for(var re=0;re<$.length;re++){var Ce=$[re];Ce!==b&&(Ce._dbInfo.db=m.db,Ce._dbInfo.version=m.version)}})}function ie(f,b){var m=this;f=M(f);var S=new E(function(x,w){m.ready().then(function(){U(m._dbInfo,ye,function(R,V){if(R)return w(R);try{var j=V.objectStore(m._dbInfo.storeName),$=j.get(f);$.onsuccess=function(){var G=$.result;G===void 0&&(G=null),P(G)&&(G=k(G)),x(G)},$.onerror=function(){w($.error)}}catch(G){w(G)}})}).catch(w)});return C(S,b),S}function ue(f,b){var m=this,S=new E(function(x,w){m.ready().then(function(){U(m._dbInfo,ye,function(R,V){if(R)return w(R);try{var j=V.objectStore(m._dbInfo.storeName),$=j.openCursor(),G=1;$.onsuccess=function(){var re=$.result;if(re){var Ce=re.value;P(Ce)&&(Ce=k(Ce));var ke=f(Ce,re.key,G++);ke!==void 0?x(ke):re.continue()}else x()},$.onerror=function(){w($.error)}}catch(re){w(re)}})}).catch(w)});return C(S,b),S}function Q(f,b,m){var S=this;f=M(f);var x=new E(function(w,R){var V;S.ready().then(function(){return V=S._dbInfo,z.call(b)==="[object Blob]"?Ee(V.db).then(function(j){return j?b:T(b)}):b}).then(function(j){U(S._dbInfo,B,function($,G){if($)return R($);try{var re=G.objectStore(S._dbInfo.storeName);j===null&&(j=void 0);var Ce=re.put(j,f);G.oncomplete=function(){j===void 0&&(j=null),w(j)},G.onabort=G.onerror=function(){var ke=Ce.error?Ce.error:Ce.transaction.error;R(ke)}}catch(ke){R(ke)}})}).catch(R)});return C(x,m),x}function ae(f,b){var m=this;f=M(f);var S=new E(function(x,w){m.ready().then(function(){U(m._dbInfo,B,function(R,V){if(R)return w(R);try{var j=V.objectStore(m._dbInfo.storeName),$=j.delete(f);V.oncomplete=function(){x()},V.onerror=function(){w($.error)},V.onabort=function(){var G=$.error?$.error:$.transaction.error;w(G)}}catch(G){w(G)}})}).catch(w)});return C(S,b),S}function ee(f){var b=this,m=new E(function(S,x){b.ready().then(function(){U(b._dbInfo,B,function(w,R){if(w)return x(w);try{var V=R.objectStore(b._dbInfo.storeName),j=V.clear();R.oncomplete=function(){S()},R.onabort=R.onerror=function(){var $=j.error?j.error:j.transaction.error;x($)}}catch($){x($)}})}).catch(x)});return C(m,f),m}function de(f){var b=this,m=new E(function(S,x){b.ready().then(function(){U(b._dbInfo,ye,function(w,R){if(w)return x(w);try{var V=R.objectStore(b._dbInfo.storeName),j=V.count();j.onsuccess=function(){S(j.result)},j.onerror=function(){x(j.error)}}catch($){x($)}})}).catch(x)});return C(m,f),m}function ce(f,b){var m=this,S=new E(function(x,w){if(f<0){x(null);return}m.ready().then(function(){U(m._dbInfo,ye,function(R,V){if(R)return w(R);try{var j=V.objectStore(m._dbInfo.storeName),$=!1,G=j.openKeyCursor();G.onsuccess=function(){var re=G.result;if(!re){x(null);return}f===0||$?x(re.key):($=!0,re.advance(f))},G.onerror=function(){w(G.error)}}catch(re){w(re)}})}).catch(w)});return C(S,b),S}function pe(f){var b=this,m=new E(function(S,x){b.ready().then(function(){U(b._dbInfo,ye,function(w,R){if(w)return x(w);try{var V=R.objectStore(b._dbInfo.storeName),j=V.openKeyCursor(),$=[];j.onsuccess=function(){var G=j.result;if(!G){S($);return}$.push(G.key),G.continue()},j.onerror=function(){x(j.error)}}catch(G){x(G)}})}).catch(x)});return C(m,f),m}function he(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,x;if(!f.name)x=E.reject("Invalid arguments");else{var w=f.name===m.name&&S._dbInfo.db,R=w?E.resolve(S._dbInfo.db):We(f).then(function(V){var j=oe[f.name],$=j.forages;j.db=V;for(var G=0;G<$.length;G++)$[G]._dbInfo.db=V;return V});f.storeName?x=R.then(function(V){if(V.objectStoreNames.contains(f.storeName)){var j=V.version+1;Me(f);var $=oe[f.name],G=$.forages;V.close();for(var re=0;re<G.length;re++){var Ce=G[re];Ce._dbInfo.db=null,Ce._dbInfo.version=j}var ke=new E(function(Ve,rt){var Qe=d.open(f.name,j);Qe.onerror=function(Gt){var Zr=Qe.result;Zr.close(),rt(Gt)},Qe.onupgradeneeded=function(){var Gt=Qe.result;Gt.deleteObjectStore(f.storeName)},Qe.onsuccess=function(){var Gt=Qe.result;Gt.close(),Ve(Gt)}});return ke.then(function(Ve){$.db=Ve;for(var rt=0;rt<G.length;rt++){var Qe=G[rt];Qe._dbInfo.db=Ve,xe(Qe._dbInfo)}}).catch(function(Ve){throw(Oe(f,Ve)||E.resolve()).catch(function(){}),Ve})}}):x=R.then(function(V){Me(f);var j=oe[f.name],$=j.forages;V.close();for(var G=0;G<$.length;G++){var re=$[G];re._dbInfo.db=null}var Ce=new E(function(ke,Ve){var rt=d.deleteDatabase(f.name);rt.onerror=function(){var Qe=rt.result;Qe&&Qe.close(),Ve(rt.error)},rt.onblocked=function(){console.warn('dropInstance blocked for database "'+f.name+'" until all open connections are closed')},rt.onsuccess=function(){var Qe=rt.result;Qe&&Qe.close(),ke(Qe)}});return Ce.then(function(ke){j.db=ke;for(var Ve=0;Ve<$.length;Ve++){var rt=$[Ve];xe(rt._dbInfo)}}).catch(function(ke){throw(Oe(f,ke)||E.resolve()).catch(function(){}),ke})})}return C(x,b),x}var me={_driver:"asyncStorage",_initStorage:ne,_support:g(),iterate:ue,getItem:ie,setItem:Q,removeItem:ae,clear:ee,length:de,key:ce,keys:pe,dropInstance:he};function h(){return typeof openDatabase=="function"}var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l="~~local_forage_type~",_=/^~~local_forage_type~([^~]+)~/,I="__lfsc__:",N=I.length,F="arbf",_e="blob",we="si08",ve="ui08",Pe="uic8",Le="si16",Xe="si32",Lt="ur16",$t="ui32",Sn="fl32",Et="fl64",kt=N+F.length,Ai=Object.prototype.toString;function tl(f){var b=f.length*.75,m=f.length,S,x=0,w,R,V,j;f[f.length-1]==="="&&(b--,f[f.length-2]==="="&&b--);var $=new ArrayBuffer(b),G=new Uint8Array($);for(S=0;S<m;S+=4)w=a.indexOf(f[S]),R=a.indexOf(f[S+1]),V=a.indexOf(f[S+2]),j=a.indexOf(f[S+3]),G[x++]=w<<2|R>>4,G[x++]=(R&15)<<4|V>>2,G[x++]=(V&3)<<6|j&63;return $}function fs(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 gp(f,b){var m="";if(f&&(m=Ai.call(f)),f&&(m==="[object ArrayBuffer]"||f.buffer&&Ai.call(f.buffer)==="[object ArrayBuffer]")){var S,x=I;f instanceof ArrayBuffer?(S=f,x+=F):(S=f.buffer,m==="[object Int8Array]"?x+=we:m==="[object Uint8Array]"?x+=ve:m==="[object Uint8ClampedArray]"?x+=Pe:m==="[object Int16Array]"?x+=Le:m==="[object Uint16Array]"?x+=Lt:m==="[object Int32Array]"?x+=Xe:m==="[object Uint32Array]"?x+=$t:m==="[object Float32Array]"?x+=Sn:m==="[object Float64Array]"?x+=Et:b(new Error("Failed to get type for BinaryArray"))),b(x+fs(S))}else if(m==="[object Blob]"){var w=new FileReader;w.onload=function(){var R=l+f.type+"~"+fs(this.result);b(I+_e+R)},w.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 _p(f){if(f.substring(0,N)!==I)return JSON.parse(f);var b=f.substring(kt),m=f.substring(N,kt),S;if(m===_e&&_.test(b)){var x=b.match(_);S=x[1],b=b.substring(x[0].length)}var w=tl(b);switch(m){case F:return w;case _e:return p([w],{type:S});case we:return new Int8Array(w);case ve:return new Uint8Array(w);case Pe:return new Uint8ClampedArray(w);case Le:return new Int16Array(w);case Lt:return new Uint16Array(w);case Xe:return new Int32Array(w);case $t:return new Uint32Array(w);case Sn:return new Float32Array(w);case Et:return new Float64Array(w);default:throw new Error("Unkown type: "+m)}}var ps={serialize:gp,deserialize:_p,stringToBuffer:tl,bufferToString:fs};function nl(f,b,m,S){f.executeSql("CREATE TABLE IF NOT EXISTS "+b.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],m,S)}function yp(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 x=new E(function(w,R){try{m.db=openDatabase(m.name,String(m.version),m.description,m.size)}catch(V){return R(V)}m.db.transaction(function(V){nl(V,m,function(){b._dbInfo=m,w()},function(j,$){R($)})},R)});return m.serializer=ps,x}function Ln(f,b,m,S,x,w){f.executeSql(m,S,x,function(R,V){V.code===V.SYNTAX_ERR?R.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[b.storeName],function(j,$){$.rows.length?w(j,V):nl(j,b,function(){j.executeSql(m,S,x,w)},w)},w):w(R,V)},w)}function vp(f,b){var m=this;f=M(f);var S=new E(function(x,w){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(V){Ln(V,R,"SELECT * FROM "+R.storeName+" WHERE key = ? LIMIT 1",[f],function(j,$){var G=$.rows.length?$.rows.item(0).value:null;G&&(G=R.serializer.deserialize(G)),x(G)},function(j,$){w($)})})}).catch(w)});return C(S,b),S}function Ep(f,b){var m=this,S=new E(function(x,w){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(V){Ln(V,R,"SELECT * FROM "+R.storeName,[],function(j,$){for(var G=$.rows,re=G.length,Ce=0;Ce<re;Ce++){var ke=G.item(Ce),Ve=ke.value;if(Ve&&(Ve=R.serializer.deserialize(Ve)),Ve=f(Ve,ke.key,Ce+1),Ve!==void 0){x(Ve);return}}x()},function(j,$){w($)})})}).catch(w)});return C(S,b),S}function rl(f,b,m,S){var x=this;f=M(f);var w=new E(function(R,V){x.ready().then(function(){b===void 0&&(b=null);var j=b,$=x._dbInfo;$.serializer.serialize(b,function(G,re){re?V(re):$.db.transaction(function(Ce){Ln(Ce,$,"INSERT OR REPLACE INTO "+$.storeName+" (key, value) VALUES (?, ?)",[f,G],function(){R(j)},function(ke,Ve){V(Ve)})},function(Ce){if(Ce.code===Ce.QUOTA_ERR){if(S>0){R(rl.apply(x,[f,j,m,S-1]));return}V(Ce)}})})}).catch(V)});return C(w,m),w}function bp(f,b,m){return rl.apply(this,[f,b,m,1])}function wp(f,b){var m=this;f=M(f);var S=new E(function(x,w){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(V){Ln(V,R,"DELETE FROM "+R.storeName+" WHERE key = ?",[f],function(){x()},function(j,$){w($)})})}).catch(w)});return C(S,b),S}function Cp(f){var b=this,m=new E(function(S,x){b.ready().then(function(){var w=b._dbInfo;w.db.transaction(function(R){Ln(R,w,"DELETE FROM "+w.storeName,[],function(){S()},function(V,j){x(j)})})}).catch(x)});return C(m,f),m}function Sp(f){var b=this,m=new E(function(S,x){b.ready().then(function(){var w=b._dbInfo;w.db.transaction(function(R){Ln(R,w,"SELECT COUNT(key) as c FROM "+w.storeName,[],function(V,j){var $=j.rows.item(0).c;S($)},function(V,j){x(j)})})}).catch(x)});return C(m,f),m}function Ip(f,b){var m=this,S=new E(function(x,w){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(V){Ln(V,R,"SELECT key FROM "+R.storeName+" WHERE id = ? LIMIT 1",[f+1],function(j,$){var G=$.rows.length?$.rows.item(0).key:null;x(G)},function(j,$){w($)})})}).catch(w)});return C(S,b),S}function xp(f){var b=this,m=new E(function(S,x){b.ready().then(function(){var w=b._dbInfo;w.db.transaction(function(R){Ln(R,w,"SELECT key FROM "+w.storeName,[],function(V,j){for(var $=[],G=0;G<j.rows.length;G++)$.push(j.rows.item(G).key);S($)},function(V,j){x(j)})})}).catch(x)});return C(m,f),m}function Tp(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(x,w){for(var R=[],V=0;V<w.rows.length;V++)R.push(w.rows.item(V).name);b({db:f,storeNames:R})},function(x,w){m(w)})},function(S){m(S)})})}function Op(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,x;return f.name?x=new E(function(w){var R;f.name===m.name?R=S._dbInfo.db:R=openDatabase(f.name,"","",0),f.storeName?w({db:R,storeNames:[f.storeName]}):w(Tp(R))}).then(function(w){return new E(function(R,V){w.db.transaction(function(j){function $(ke){return new E(function(Ve,rt){j.executeSql("DROP TABLE IF EXISTS "+ke,[],function(){Ve()},function(Qe,Gt){rt(Gt)})})}for(var G=[],re=0,Ce=w.storeNames.length;re<Ce;re++)G.push($(w.storeNames[re]));E.all(G).then(function(){R()}).catch(function(ke){V(ke)})},function(j){V(j)})})}):x=E.reject("Invalid arguments"),C(x,b),x}var Dp={_driver:"webSQLStorage",_initStorage:yp,_support:h(),iterate:Ep,getItem:vp,setItem:bp,removeItem:wp,clear:Cp,length:Sp,key:Ip,keys:xp,dropInstance:Op};function Ap(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function il(f,b){var m=f.name+"/";return f.storeName!==b.storeName&&(m+=f.storeName+"/"),m}function Np(){var f="_localforage_support_test";try{return localStorage.setItem(f,!0),localStorage.removeItem(f),!1}catch{return!0}}function Rp(){return!Np()||localStorage.length>0}function Mp(f){var b=this,m={};if(f)for(var S in f)m[S]=f[S];return m.keyPrefix=il(f,b._defaultConfig),Rp()?(b._dbInfo=m,m.serializer=ps,E.resolve()):E.reject()}function Pp(f){var b=this,m=b.ready().then(function(){for(var S=b._dbInfo.keyPrefix,x=localStorage.length-1;x>=0;x--){var w=localStorage.key(x);w.indexOf(S)===0&&localStorage.removeItem(w)}});return C(m,f),m}function Lp(f,b){var m=this;f=M(f);var S=m.ready().then(function(){var x=m._dbInfo,w=localStorage.getItem(x.keyPrefix+f);return w&&(w=x.serializer.deserialize(w)),w});return C(S,b),S}function kp(f,b){var m=this,S=m.ready().then(function(){for(var x=m._dbInfo,w=x.keyPrefix,R=w.length,V=localStorage.length,j=1,$=0;$<V;$++){var G=localStorage.key($);if(G.indexOf(w)===0){var re=localStorage.getItem(G);if(re&&(re=x.serializer.deserialize(re)),re=f(re,G.substring(R),j++),re!==void 0)return re}}});return C(S,b),S}function Fp(f,b){var m=this,S=m.ready().then(function(){var x=m._dbInfo,w;try{w=localStorage.key(f)}catch{w=null}return w&&(w=w.substring(x.keyPrefix.length)),w});return C(S,b),S}function Vp(f){var b=this,m=b.ready().then(function(){for(var S=b._dbInfo,x=localStorage.length,w=[],R=0;R<x;R++){var V=localStorage.key(R);V.indexOf(S.keyPrefix)===0&&w.push(V.substring(S.keyPrefix.length))}return w});return C(m,f),m}function Bp(f){var b=this,m=b.keys().then(function(S){return S.length});return C(m,f),m}function Up(f,b){var m=this;f=M(f);var S=m.ready().then(function(){var x=m._dbInfo;localStorage.removeItem(x.keyPrefix+f)});return C(S,b),S}function Hp(f,b,m){var S=this;f=M(f);var x=S.ready().then(function(){b===void 0&&(b=null);var w=b;return new E(function(R,V){var j=S._dbInfo;j.serializer.serialize(b,function($,G){if(G)V(G);else try{localStorage.setItem(j.keyPrefix+f,$),R(w)}catch(re){(re.name==="QuotaExceededError"||re.name==="NS_ERROR_DOM_QUOTA_REACHED")&&V(re),V(re)}})})});return C(x,m),x}function jp(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,x;return f.name?x=new E(function(w){f.storeName?w(il(f,S._defaultConfig)):w(f.name+"/")}).then(function(w){for(var R=localStorage.length-1;R>=0;R--){var V=localStorage.key(R);V.indexOf(w)===0&&localStorage.removeItem(V)}}):x=E.reject("Invalid arguments"),C(x,b),x}var $p={_driver:"localStorageWrapper",_initStorage:Mp,_support:Ap(),iterate:kp,getItem:Lp,setItem:Hp,removeItem:Up,clear:Pp,length:Bp,key:Fp,keys:Vp,dropInstance:jp},Gp=function(b,m){return b===m||typeof b=="number"&&typeof m=="number"&&isNaN(b)&&isNaN(m)},Wp=function(b,m){for(var S=b.length,x=0;x<S;){if(Gp(b[x],m))return!0;x++}return!1},ol=Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"},qr={},sl={},hr={INDEXEDDB:me,WEBSQL:Dp,LOCALSTORAGE:$p},Yp=[hr.INDEXEDDB._driver,hr.WEBSQL._driver,hr.LOCALSTORAGE._driver],Ni=["dropInstance"],hs=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Ni),zp={description:"",driver:Yp.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Kp(f,b){f[b]=function(){var m=arguments;return f.ready().then(function(){return f[b].apply(f,m)})}}function ms(){for(var f=1;f<arguments.length;f++){var b=arguments[f];if(b)for(var m in b)b.hasOwnProperty(m)&&(ol(b[m])?arguments[0][m]=b[m].slice():arguments[0][m]=b[m])}return arguments[0]}var Xp=function(){function f(b){c(this,f);for(var m in hr)if(hr.hasOwnProperty(m)){var S=hr[m],x=S._driver;this[m]=x,qr[x]||this.defineDriver(S)}this._defaultConfig=ms({},zp),this._config=ms({},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,x){var w=new E(function(R,V){try{var j=m._driver,$=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!m._driver){V($);return}for(var G=hs.concat("_initStorage"),re=0,Ce=G.length;re<Ce;re++){var ke=G[re],Ve=!Wp(Ni,ke);if((Ve||m[ke])&&typeof m[ke]!="function"){V($);return}}var rt=function(){for(var Zr=function(Jp){return function(){var Qp=new Error("Method "+Jp+" is not implemented by the current driver"),al=E.reject(Qp);return C(al,arguments[arguments.length-1]),al}},gs=0,Zp=Ni.length;gs<Zp;gs++){var _s=Ni[gs];m[_s]||(m[_s]=Zr(_s))}};rt();var Qe=function(Zr){qr[j]&&console.info("Redefining LocalForage driver: "+j),qr[j]=m,sl[j]=Zr,R()};"_support"in m?m._support&&typeof m._support=="function"?m._support().then(Qe,V):Qe(!!m._support):Qe(!0)}catch(Gt){V(Gt)}});return O(w,S,x),w},f.prototype.driver=function(){return this._driver||null},f.prototype.getDriver=function(m,S,x){var w=qr[m]?E.resolve(qr[m]):E.reject(new Error("Driver not found."));return O(w,S,x),w},f.prototype.getSerializer=function(m){var S=E.resolve(ps);return O(S,m),S},f.prototype.ready=function(m){var S=this,x=S._driverSet.then(function(){return S._ready===null&&(S._ready=S._initDriver()),S._ready});return O(x,m,m),x},f.prototype.setDriver=function(m,S,x){var w=this;ol(m)||(m=[m]);var R=this._getSupportedDrivers(m);function V(){w._config.driver=w.driver()}function j(re){return w._extend(re),V(),w._ready=w._initStorage(w._config),w._ready}function $(re){return function(){var Ce=0;function ke(){for(;Ce<re.length;){var Ve=re[Ce];return Ce++,w._dbInfo=null,w._ready=null,w.getDriver(Ve).then(j).catch(ke)}V();var rt=new Error("No available storage method found.");return w._driverSet=E.reject(rt),w._driverSet}return ke()}}var G=this._driverSet!==null?this._driverSet.catch(function(){return E.resolve()}):E.resolve();return this._driverSet=G.then(function(){var re=R[0];return w._dbInfo=null,w._ready=null,w.getDriver(re).then(function(Ce){w._driver=Ce._driver,V(),w._wrapLibraryMethodsWithReady(),w._initDriver=$(R)})}).catch(function(){V();var re=new Error("No available storage method found.");return w._driverSet=E.reject(re),w._driverSet}),O(this._driverSet,S,x),this._driverSet},f.prototype.supports=function(m){return!!sl[m]},f.prototype._extend=function(m){ms(this,m)},f.prototype._getSupportedDrivers=function(m){for(var S=[],x=0,w=m.length;x<w;x++){var R=m[x];this.supports(R)&&S.push(R)}return S},f.prototype._wrapLibraryMethodsWithReady=function(){for(var m=0,S=hs.length;m<S;m++)Kp(this,hs[m])},f.prototype.createInstance=function(m){return new f(m)},f}(),qp=new Xp;i.exports=qp},{3:3}]},{},[4])(4)})});var th={schedule(t,e){let n=setTimeout(t,e);return()=>clearTimeout(n)}};function nh(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function rh(t){return!!t&&t.nodeType===Node.ELEMENT_NODE}var As;function ih(t,e){if(!As){let n=Element.prototype;As=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}return t.nodeType===Node.ELEMENT_NODE?As.call(t,e):!1}function oh(t){let e={};return t.forEach(({propName:n,templateName:r,transform:i})=>{e[nh(r)]=[n,i]}),e}function sh(t,e){return e.get(bs).resolveComponentFactory(t).inputs}function ah(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=ch(c,e,i);u!==-1&&r[u].push(c)}return r}function ch(t,e,n){let r=n;return rh(t)&&e.some((i,o)=>i!=="*"&&ih(t,i)?(r=o,!0):!1),r}var lh=10,Ns=class{componentFactory;inputMap=new Map;constructor(e,n){this.componentFactory=n.get(bs).resolveComponentFactory(e);for(let r of this.componentFactory.inputs)this.inputMap.set(r.propName,r.templateName)}create(e){return new Rs(this.componentFactory,e,this.inputMap)}},Rs=class{componentFactory;injector;inputMap;eventEmitters=new dl(1);events=this.eventEmitters.pipe(El(e=>Pi(...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(Rt),this.appRef=this.injector.get(Vi),this.cdScheduler=n.get(Cl),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=th.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},lh))})}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=Nt.create({providers:[],parent:this.injector}),r=ah(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 ll(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()}},Ms=class extends HTMLElement{ngElementEventsSubscription=null};function zl(t,e){let n=sh(t,e.injector),r=e.strategyFactory||new Ns(t,e.injector),i=oh(n);class o extends Ms{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 Kl="9.12.7";var Ye=class t{static SDK_VERSION=Kl;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 An={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${Ye.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${Ye.SDK_VERSION}/dist/widget.min.js`};var Bt=Ri(ql());var gt=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 Zl(t=Ye.LOG_PREFIX){Bt.default.useDefaults({formatter:function(n){n.unshift(`${t} (v${Ye.SDK_VERSION}):`)}});let e=dh();(e==="1"||e==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?Bt.default.setLevel(Bt.default[localStorage.cooeeLogLevel]):Bt.default.setLevel(An.debug?Bt.default.TRACE:Bt.default.OFF)}function dh(){return new URL(location.href).searchParams?.get("cooee-debug")}var Xr=Ri(Ps());var Ql={providers:[Pl()]};var ph={"[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"},j0=Ie(D({},ph),{"[class.ng-submitted]":"isSubmitted"});var hh=new Qt("",{providedIn:"root",factory:()=>nu}),nu="always";var mh=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=Gn({type:t});static \u0275inj=jn({})}return t})();var ru=(()=>{class t{static withConfig(n){return{ngModule:t,providers:[{provide:hh,useValue:n.callSetDisabledState??nu}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=Gn({type:t});static \u0275inj=jn({imports:[mh]})}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 fn=class t{cooeeEvent=new it;cooeeCTA=new it;elementRef=K(bt);_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(){gt.debug("Init",this.constructor.name);let e=this.elementRef.nativeElement.shadowRoot;e&&(Yt.injectStylesheet(An.styleURL,e),Yt.injectRawCSS(window.CooeeSDK.config.website.commonCSS,e))}ngOnDestroy(){gt.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=Fe({type:t,selectors:[["ng-component"]],hostVars:2,hostBindings:function(n,r){n&2&&Ol(r.classes)},inputs:{triggerContext:"triggerContext"},outputs:{cooeeEvent:"cooeeEvent",cooeeCTA:"cooeeCTA"},decls:0,vars:0,template:function(n,r){},encapsulation:2})};var gh=(t,e,n)=>({"--option-color":t,"background-color":e,color:n}),iu=(t,e)=>e.id;function _h(t,e){if(t&1&&(X(0,"span",6),Te(1),q()),t&2){let n=J().$implicit;W(),kn(n.displayName||n.name)}}function yh(t,e){if(t&1){let n=et();Mt(0),X(1,"button",5),Ne("click",function(){let i=Ue(n).$implicit,o=J().$implicit,s=J();return He(s.onOptionChange(o,i))}),De(2,_h,2,1,"span",6),q()}if(t&2){let n=e.$implicit,r=J().$implicit,i=Pt(1),o=J(),s=n.name;W(),Wn("color-type",i)("selected",o.selectedOptions()[r.name]===s),be("disabled",n.disabled)("title",s)("ngStyle",Nl(9,gh,i?s:"",i?s:"",i?"transparent":"")),In("data-value",s),W(),Ae(i?-1:2)}}function vh(t,e){if(t&1&&(X(0,"div"),Mt(1),X(2,"div",1),Te(3),q(),X(4,"div",2),Te(5),q(),X(6,"div",3),qe(7,yh,3,13,"button",4,iu),q()()),t&2){let n=e.$implicit,r=J();Dl("option-group ",n.name.toLowerCase(),""),W(),Tn(n.name.toLowerCase().includes("color")),W(2),Vt("",n.name,":"),W(2),kn(r.selectedOptions()[n.name]),W(2),Ze(n.optionValues)}}var Yi=class t extends fn{selectedVariant=new it;item=Sl.required();selectedOptions=Wt({});options=Ui(()=>{let e=this.item();if(!e.options||e.vars.length===1)return[];if(window.cooeeManipulateProductOptions)try{window.cooeeManipulateProductOptions(e)}catch(n){gt.error(n)}return e.options});matchedVariant=Ui(()=>{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(),Ts(()=>{let n=this.matchedVariant();n&&(this.item().setSelectedVariant(n),this.selectedVariant.emit(n))});let e=Ts(()=>{let n=this.item();if(!n?.options)return;let r=D({},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=D({},this.selectedOptions());r[e.name]=n.name,this.selectedOptions.set(r)}engagementTriggerReceived(){}update(){}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Fe({type:t,selectors:[["cooee-item-options-picker"]],inputs:{item:[1,"item"]},outputs:{selectedVariant:"selectedVariant"},features:[wt],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&&qe(0,vh,9,6,"div",0,iu),n&2&&Ze(r.options())},dependencies:[Bl,Fl,ru],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
|
|
12
|
-
`);for(let c=r;c<s.length;c++){let u=s[c];if(u.length>1024)continue;let d=
|
|
8
|
+
`+y.message+`
|
|
9
|
+
`+Array(y.message.length+1).join("=")+`
|
|
10
|
+
`+O(A,P)):y}}function dt(A,T){var L;return T.cache&&T.name&&T.storage.templates.get(T.name)?T.storage.templates.get(T.name):(L=typeof A=="function"?A:We(A,T),T.cache&&T.name&&T.storage.templates.define(T.name,L),L)}Ne.l.bind(Ne),t.compile=We,t.compileScope=oe,t.compileScopeIntoFunction=K,t.compileToString=O,t.defaultConfig=Ne,t.filters=De,t.getConfig=Ge,t.helpers=ye,t.nativeHelpers=Le,t.parse=C,t.render=function(A,T,L,P){var v=Ge(L||{});if(!v.async)return dt(A,v)(T,v);if(!P){if(typeof r=="function")return new r(function(y,U){try{y(dt(A,v)(T,v))}catch(J){U(J)}});throw e("Please provide a callback function, this env doesn't support Promises")}try{dt(A,v)(T,v,P)}catch(y){return P(y)}},t.templates=te,Object.defineProperty(t,"__esModule",{value:!0})})});var Od=ws((Td,Ja)=>{"use strict";(function(t){if(typeof Td=="object"&&typeof Ja<"u")Ja.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 C=new Error("Cannot find module '"+g+"'");throw C.code="MODULE_NOT_FOUND",C}var O=o[g]={exports:{}};i[g][0].call(O.exports,function(M){var k=i[g][1][M];return c(k||M)},O,O.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 C,O=[];function M(){C=!0;for(var j,K,oe=O.length;oe;){for(K=O,O=[],j=-1;++j<oe;)K[j]();oe=O.length}C=!1}i.exports=k;function k(j){O.push(j)===1&&!C&&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(B){if(typeof B!="function")throw new TypeError("resolver must be a function");this.state=p,this.queue=[],this.outcome=void 0,B!==c&&k(this,B)}E.prototype.catch=function(B){return this.then(null,B)},E.prototype.then=function(B,fe){if(typeof B!="function"&&this.state===g||typeof fe!="function"&&this.state===d)return this;var te=new this.constructor(c);if(this.state!==p){var ye=this.state===g?B:fe;O(te,ye,this.outcome)}else this.queue.push(new C(te,B,fe));return te};function C(B,fe,te){this.promise=B,typeof fe=="function"&&(this.onFulfilled=fe,this.callFulfilled=this.otherCallFulfilled),typeof te=="function"&&(this.onRejected=te,this.callRejected=this.otherCallRejected)}C.prototype.callFulfilled=function(B){u.resolve(this.promise,B)},C.prototype.otherCallFulfilled=function(B){O(this.promise,this.onFulfilled,B)},C.prototype.callRejected=function(B){u.reject(this.promise,B)},C.prototype.otherCallRejected=function(B){O(this.promise,this.onRejected,B)};function O(B,fe,te){s(function(){var ye;try{ye=fe(te)}catch(Le){return u.reject(B,Le)}ye===B?u.reject(B,new TypeError("Cannot resolve promise with itself")):u.resolve(B,ye)})}u.resolve=function(B,fe){var te=j(M,fe);if(te.status==="error")return u.reject(B,te.value);var ye=te.value;if(ye)k(B,ye);else{B.state=g,B.outcome=fe;for(var Le=-1,De=B.queue.length;++Le<De;)B.queue[Le].callFulfilled(fe)}return B},u.reject=function(B,fe){B.state=d,B.outcome=fe;for(var te=-1,ye=B.queue.length;++te<ye;)B.queue[te].callRejected(fe);return B};function M(B){var fe=B&&B.then;if(B&&(typeof B=="object"||typeof B=="function")&&typeof fe=="function")return function(){fe.apply(B,arguments)}}function k(B,fe){var te=!1;function ye(Ge){te||(te=!0,u.reject(B,Ge))}function Le(Ge){te||(te=!0,u.resolve(B,Ge))}function De(){fe(Le,ye)}var Ne=j(De);Ne.status==="error"&&ye(Ne.value)}function j(B,fe){var te={};try{te.value=B(fe),te.status="success"}catch(ye){te.status="error",te.value=ye}return te}E.resolve=K;function K(B){return B instanceof this?B:u.resolve(new this(c),B)}E.reject=oe;function oe(B){var fe=new this(c);return u.reject(fe,B)}E.all=X;function X(B){var fe=this;if(Object.prototype.toString.call(B)!=="[object Array]")return this.reject(new TypeError("must be an array"));var te=B.length,ye=!1;if(!te)return this.resolve([]);for(var Le=new Array(te),De=0,Ne=-1,Ge=new this(c);++Ne<te;)We(B[Ne],Ne);return Ge;function We(dt,A){fe.resolve(dt).then(T,function(L){ye||(ye=!0,u.reject(Ge,L))});function T(L){Le[A]=L,++De===te&&!ye&&(ye=!0,u.resolve(Ge,Le))}}}E.race=Ee;function Ee(B){var fe=this;if(Object.prototype.toString.call(B)!=="[object Array]")return this.reject(new TypeError("must be an array"));var te=B.length,ye=!1;if(!te)return this.resolve([]);for(var Le=-1,De=new this(c);++Le<te;)Ne(B[Le]);return De;function Ne(Ge){fe.resolve(Ge).then(function(We){ye||(ye=!0,u.resolve(De,We))},function(We){ye||(ye=!0,u.reject(De,We))})}}},{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(w){if(w.name!=="TypeError")throw w;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 C(f,b){b&&f.then(function(m){b(null,m)},function(m){b(m)})}function O(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 k(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var j="local-forage-detect-blob-support",K=void 0,oe={},X=Object.prototype.toString,Ee="readonly",B="readwrite";function fe(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,B),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+)/),w=navigator.userAgent.match(/Edge\//);b(w||!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 Le(f){var b=oe[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=oe[f.name],m=b.deferredOperations.pop();if(m)return m.resolve(),m.promise}function Ne(f,b){var m=oe[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(oe[f.name]=oe[f.name]||J(),f.db)if(b)Le(f),f.db.close();else return m(f.db);var I=[f.name];b&&I.push(f.version);var w=d.open.apply(d,I);b&&(w.onupgradeneeded=function(R){var V=w.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 $}}),w.onerror=function(R){R.preventDefault(),S(w.error)},w.onsuccess=function(){var R=w.result;R.onversionchange=function(V){V.target.close()},m(R),De(f)}})}function We(f){return Ge(f,!1)}function dt(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 w=f.db.version+1;w>f.version&&(f.version=w)}return!0}return!1}function T(f){return new E(function(b,m){var S=new FileReader;S.onerror=m,S.onloadend=function(I){var w=btoa(I.target.result||"");b({__local_forage_encoded_blob:!0,data:w,type:f.type})},S.readAsBinaryString(f)})}function L(f){var b=fe(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=oe[b._dbInfo.name];if(S&&S.dbReady)return S.dbReady});return O(m,f,f),m}function y(f){Le(f);for(var b=oe[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,We(f).then(function(w){return f.db=w,A(f)?dt(f):w}).then(function(w){f.db=b.db=w;for(var R=0;R<m.length;R++)m[R]._dbInfo.db=w}).catch(function(w){throw Ne(f,w),w})}function U(f,b,m,S){S===void 0&&(S=1);try{var I=f.db.transaction(f.storeName,b);m(null,I)}catch(w){if(S>0&&(!f.db||w.name==="InvalidStateError"||w.name==="NotFoundError"))return E.resolve().then(function(){if(!f.db||w.name==="NotFoundError"&&!f.db.objectStoreNames.contains(f.storeName)&&f.version<=f.db.version)return f.db&&(f.version=f.db.version+1),dt(f)}).then(function(){return y(f).then(function(){U(f,b,m,S-1)})}).catch(m);m(w)}}function J(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function ne(f){var b=this,m={db:null};if(f)for(var S in f)m[S]=f[S];var I=oe[m.name];I||(I=J(),oe[m.name]=I),I.forages.push(b),b._initReady||(b._initReady=b.ready,b.ready=v);var w=[];function R(){return E.resolve()}for(var V=0;V<I.forages.length;V++){var $=I.forages[V];$!==b&&w.push($._initReady().catch(R))}var G=I.forages.slice(0);return E.all(w).then(function(){return m.db=I.db,We(m)}).then(function(Y){return m.db=Y,A(m,b._defaultConfig.version)?dt(m):Y}).then(function(Y){m.db=I.db=Y,b._dbInfo=m;for(var re=0;re<G.length;re++){var Ce=G[re];Ce!==b&&(Ce._dbInfo.db=m.db,Ce._dbInfo.version=m.version)}})}function ie(f,b){var m=this;f=M(f);var S=new E(function(I,w){m.ready().then(function(){U(m._dbInfo,Ee,function(R,V){if(R)return w(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=L(Y)),I(Y)},G.onerror=function(){w(G.error)}}catch(Y){w(Y)}})}).catch(w)});return C(S,b),S}function ue(f,b){var m=this,S=new E(function(I,w){m.ready().then(function(){U(m._dbInfo,Ee,function(R,V){if(R)return w(R);try{var $=V.objectStore(m._dbInfo.storeName),G=$.openCursor(),Y=1;G.onsuccess=function(){var re=G.result;if(re){var Ce=re.value;P(Ce)&&(Ce=L(Ce));var Be=f(Ce,re.key,Y++);Be!==void 0?I(Be):re.continue()}else I()},G.onerror=function(){w(G.error)}}catch(re){w(re)}})}).catch(w)});return C(S,b),S}function Q(f,b,m){var S=this;f=M(f);var I=new E(function(w,R){var V;S.ready().then(function(){return V=S._dbInfo,X.call(b)==="[object Blob]"?ye(V.db).then(function($){return $?b:T(b)}):b}).then(function($){U(S._dbInfo,B,function(G,Y){if(G)return R(G);try{var re=Y.objectStore(S._dbInfo.storeName);$===null&&($=void 0);var Ce=re.put($,f);Y.oncomplete=function(){$===void 0&&($=null),w($)},Y.onabort=Y.onerror=function(){var Be=Ce.error?Ce.error:Ce.transaction.error;R(Be)}}catch(Be){R(Be)}})}).catch(R)});return C(I,m),I}function ae(f,b){var m=this;f=M(f);var S=new E(function(I,w){m.ready().then(function(){U(m._dbInfo,B,function(R,V){if(R)return w(R);try{var $=V.objectStore(m._dbInfo.storeName),G=$.delete(f);V.oncomplete=function(){I()},V.onerror=function(){w(G.error)},V.onabort=function(){var Y=G.error?G.error:G.transaction.error;w(Y)}}catch(Y){w(Y)}})}).catch(w)});return C(S,b),S}function ee(f){var b=this,m=new E(function(S,I){b.ready().then(function(){U(b._dbInfo,B,function(w,R){if(w)return I(w);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 C(m,f),m}function de(f){var b=this,m=new E(function(S,I){b.ready().then(function(){U(b._dbInfo,Ee,function(w,R){if(w)return I(w);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 C(m,f),m}function ce(f,b){var m=this,S=new E(function(I,w){if(f<0){I(null);return}m.ready().then(function(){U(m._dbInfo,Ee,function(R,V){if(R)return w(R);try{var $=V.objectStore(m._dbInfo.storeName),G=!1,Y=$.openKeyCursor();Y.onsuccess=function(){var re=Y.result;if(!re){I(null);return}f===0||G?I(re.key):(G=!0,re.advance(f))},Y.onerror=function(){w(Y.error)}}catch(re){w(re)}})}).catch(w)});return C(S,b),S}function pe(f){var b=this,m=new E(function(S,I){b.ready().then(function(){U(b._dbInfo,Ee,function(w,R){if(w)return I(w);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 C(m,f),m}function he(f,b){b=k.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 w=f.name===m.name&&S._dbInfo.db,R=w?E.resolve(S._dbInfo.db):We(f).then(function(V){var $=oe[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;Le(f);var G=oe[f.name],Y=G.forages;V.close();for(var re=0;re<Y.length;re++){var Ce=Y[re];Ce._dbInfo.db=null,Ce._dbInfo.version=$}var Be=new E(function(Ue,it){var et=d.open(f.name,$);et.onerror=function(Gt){var Jr=et.result;Jr.close(),it(Gt)},et.onupgradeneeded=function(){var Gt=et.result;Gt.deleteObjectStore(f.storeName)},et.onsuccess=function(){var Gt=et.result;Gt.close(),Ue(Gt)}});return Be.then(function(Ue){G.db=Ue;for(var it=0;it<Y.length;it++){var et=Y[it];et._dbInfo.db=Ue,De(et._dbInfo)}}).catch(function(Ue){throw(Ne(f,Ue)||E.resolve()).catch(function(){}),Ue})}}):I=R.then(function(V){Le(f);var $=oe[f.name],G=$.forages;V.close();for(var Y=0;Y<G.length;Y++){var re=G[Y];re._dbInfo.db=null}var Ce=new E(function(Be,Ue){var it=d.deleteDatabase(f.name);it.onerror=function(){var et=it.result;et&&et.close(),Ue(it.error)},it.onblocked=function(){console.warn('dropInstance blocked for database "'+f.name+'" until all open connections are closed')},it.onsuccess=function(){var et=it.result;et&&et.close(),Be(et)}});return Ce.then(function(Be){$.db=Be;for(var Ue=0;Ue<G.length;Ue++){var it=G[Ue];De(it._dbInfo)}}).catch(function(Be){throw(Ne(f,Be)||E.resolve()).catch(function(){}),Be})})}return C(I,b),I}var me={_driver:"asyncStorage",_initStorage:ne,_support:g(),iterate:ue,getItem:ie,setItem:Q,removeItem:ae,clear:ee,length:de,key:ce,keys:pe,dropInstance:he};function h(){return typeof openDatabase=="function"}var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l="~~local_forage_type~",_=/^~~local_forage_type~([^~]+)~/,x="__lfsc__:",N=x.length,F="arbf",_e="blob",we="si08",be="ui08",Fe="uic8",Ve="si16",qe="si32",Lt="ur16",$t="ui32",In="fl32",wt="fl64",Ft=N+F.length,Ri=Object.prototype.toString;function nl(f){var b=f.length*.75,m=f.length,S,I=0,w,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)w=a.indexOf(f[S]),R=a.indexOf(f[S+1]),V=a.indexOf(f[S+2]),$=a.indexOf(f[S+3]),Y[I++]=w<<2|R>>4,Y[I++]=(R&15)<<4|V>>2,Y[I++]=(V&3)<<6|$&63;return G}function gs(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 yp(f,b){var m="";if(f&&(m=Ri.call(f)),f&&(m==="[object ArrayBuffer]"||f.buffer&&Ri.call(f.buffer)==="[object ArrayBuffer]")){var S,I=x;f instanceof ArrayBuffer?(S=f,I+=F):(S=f.buffer,m==="[object Int8Array]"?I+=we:m==="[object Uint8Array]"?I+=be:m==="[object Uint8ClampedArray]"?I+=Fe:m==="[object Int16Array]"?I+=Ve:m==="[object Uint16Array]"?I+=Lt:m==="[object Int32Array]"?I+=qe:m==="[object Uint32Array]"?I+=$t:m==="[object Float32Array]"?I+=In:m==="[object Float64Array]"?I+=wt:b(new Error("Failed to get type for BinaryArray"))),b(I+gs(S))}else if(m==="[object Blob]"){var w=new FileReader;w.onload=function(){var R=l+f.type+"~"+gs(this.result);b(x+_e+R)},w.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 Ep(f){if(f.substring(0,N)!==x)return JSON.parse(f);var b=f.substring(Ft),m=f.substring(N,Ft),S;if(m===_e&&_.test(b)){var I=b.match(_);S=I[1],b=b.substring(I[0].length)}var w=nl(b);switch(m){case F:return w;case _e:return p([w],{type:S});case we:return new Int8Array(w);case be:return new Uint8Array(w);case Fe:return new Uint8ClampedArray(w);case Ve:return new Int16Array(w);case Lt:return new Uint16Array(w);case qe:return new Int32Array(w);case $t:return new Uint32Array(w);case In:return new Float32Array(w);case wt:return new Float64Array(w);default:throw new Error("Unkown type: "+m)}}var _s={serialize:yp,deserialize:Ep,stringToBuffer:nl,bufferToString:gs};function rl(f,b,m,S){f.executeSql("CREATE TABLE IF NOT EXISTS "+b.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],m,S)}function bp(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(w,R){try{m.db=openDatabase(m.name,String(m.version),m.description,m.size)}catch(V){return R(V)}m.db.transaction(function(V){rl(V,m,function(){b._dbInfo=m,w()},function($,G){R(G)})},R)});return m.serializer=_s,I}function Fn(f,b,m,S,I,w){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?w($,V):rl($,b,function(){$.executeSql(m,S,I,w)},w)},w):w(R,V)},w)}function wp(f,b){var m=this;f=M(f);var S=new E(function(I,w){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(V){Fn(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){w(G)})})}).catch(w)});return C(S,b),S}function Cp(f,b){var m=this,S=new E(function(I,w){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(V){Fn(V,R,"SELECT * FROM "+R.storeName,[],function($,G){for(var Y=G.rows,re=Y.length,Ce=0;Ce<re;Ce++){var Be=Y.item(Ce),Ue=Be.value;if(Ue&&(Ue=R.serializer.deserialize(Ue)),Ue=f(Ue,Be.key,Ce+1),Ue!==void 0){I(Ue);return}}I()},function($,G){w(G)})})}).catch(w)});return C(S,b),S}function il(f,b,m,S){var I=this;f=M(f);var w=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,re){re?V(re):G.db.transaction(function(Ce){Fn(Ce,G,"INSERT OR REPLACE INTO "+G.storeName+" (key, value) VALUES (?, ?)",[f,Y],function(){R($)},function(Be,Ue){V(Ue)})},function(Ce){if(Ce.code===Ce.QUOTA_ERR){if(S>0){R(il.apply(I,[f,$,m,S-1]));return}V(Ce)}})})}).catch(V)});return C(w,m),w}function Sp(f,b,m){return il.apply(this,[f,b,m,1])}function xp(f,b){var m=this;f=M(f);var S=new E(function(I,w){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(V){Fn(V,R,"DELETE FROM "+R.storeName+" WHERE key = ?",[f],function(){I()},function($,G){w(G)})})}).catch(w)});return C(S,b),S}function Ip(f){var b=this,m=new E(function(S,I){b.ready().then(function(){var w=b._dbInfo;w.db.transaction(function(R){Fn(R,w,"DELETE FROM "+w.storeName,[],function(){S()},function(V,$){I($)})})}).catch(I)});return C(m,f),m}function Tp(f){var b=this,m=new E(function(S,I){b.ready().then(function(){var w=b._dbInfo;w.db.transaction(function(R){Fn(R,w,"SELECT COUNT(key) as c FROM "+w.storeName,[],function(V,$){var G=$.rows.item(0).c;S(G)},function(V,$){I($)})})}).catch(I)});return C(m,f),m}function Op(f,b){var m=this,S=new E(function(I,w){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(V){Fn(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){w(G)})})}).catch(w)});return C(S,b),S}function Dp(f){var b=this,m=new E(function(S,I){b.ready().then(function(){var w=b._dbInfo;w.db.transaction(function(R){Fn(R,w,"SELECT key FROM "+w.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 C(m,f),m}function Ap(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,w){for(var R=[],V=0;V<w.rows.length;V++)R.push(w.rows.item(V).name);b({db:f,storeNames:R})},function(I,w){m(w)})},function(S){m(S)})})}function Np(f,b){b=k.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(w){var R;f.name===m.name?R=S._dbInfo.db:R=openDatabase(f.name,"","",0),f.storeName?w({db:R,storeNames:[f.storeName]}):w(Ap(R))}).then(function(w){return new E(function(R,V){w.db.transaction(function($){function G(Be){return new E(function(Ue,it){$.executeSql("DROP TABLE IF EXISTS "+Be,[],function(){Ue()},function(et,Gt){it(Gt)})})}for(var Y=[],re=0,Ce=w.storeNames.length;re<Ce;re++)Y.push(G(w.storeNames[re]));E.all(Y).then(function(){R()}).catch(function(Be){V(Be)})},function($){V($)})})}):I=E.reject("Invalid arguments"),C(I,b),I}var Rp={_driver:"webSQLStorage",_initStorage:bp,_support:h(),iterate:Cp,getItem:wp,setItem:Sp,removeItem:xp,clear:Ip,length:Tp,key:Op,keys:Dp,dropInstance:Np};function Mp(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function ol(f,b){var m=f.name+"/";return f.storeName!==b.storeName&&(m+=f.storeName+"/"),m}function Pp(){var f="_localforage_support_test";try{return localStorage.setItem(f,!0),localStorage.removeItem(f),!1}catch{return!0}}function kp(){return!Pp()||localStorage.length>0}function Lp(f){var b=this,m={};if(f)for(var S in f)m[S]=f[S];return m.keyPrefix=ol(f,b._defaultConfig),kp()?(b._dbInfo=m,m.serializer=_s,E.resolve()):E.reject()}function Fp(f){var b=this,m=b.ready().then(function(){for(var S=b._dbInfo.keyPrefix,I=localStorage.length-1;I>=0;I--){var w=localStorage.key(I);w.indexOf(S)===0&&localStorage.removeItem(w)}});return C(m,f),m}function Vp(f,b){var m=this;f=M(f);var S=m.ready().then(function(){var I=m._dbInfo,w=localStorage.getItem(I.keyPrefix+f);return w&&(w=I.serializer.deserialize(w)),w});return C(S,b),S}function Bp(f,b){var m=this,S=m.ready().then(function(){for(var I=m._dbInfo,w=I.keyPrefix,R=w.length,V=localStorage.length,$=1,G=0;G<V;G++){var Y=localStorage.key(G);if(Y.indexOf(w)===0){var re=localStorage.getItem(Y);if(re&&(re=I.serializer.deserialize(re)),re=f(re,Y.substring(R),$++),re!==void 0)return re}}});return C(S,b),S}function Up(f,b){var m=this,S=m.ready().then(function(){var I=m._dbInfo,w;try{w=localStorage.key(f)}catch{w=null}return w&&(w=w.substring(I.keyPrefix.length)),w});return C(S,b),S}function Hp(f){var b=this,m=b.ready().then(function(){for(var S=b._dbInfo,I=localStorage.length,w=[],R=0;R<I;R++){var V=localStorage.key(R);V.indexOf(S.keyPrefix)===0&&w.push(V.substring(S.keyPrefix.length))}return w});return C(m,f),m}function jp(f){var b=this,m=b.keys().then(function(S){return S.length});return C(m,f),m}function $p(f,b){var m=this;f=M(f);var S=m.ready().then(function(){var I=m._dbInfo;localStorage.removeItem(I.keyPrefix+f)});return C(S,b),S}function Gp(f,b,m){var S=this;f=M(f);var I=S.ready().then(function(){b===void 0&&(b=null);var w=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(w)}catch(re){(re.name==="QuotaExceededError"||re.name==="NS_ERROR_DOM_QUOTA_REACHED")&&V(re),V(re)}})})});return C(I,m),I}function Wp(f,b){if(b=k.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(w){f.storeName?w(ol(f,S._defaultConfig)):w(f.name+"/")}).then(function(w){for(var R=localStorage.length-1;R>=0;R--){var V=localStorage.key(R);V.indexOf(w)===0&&localStorage.removeItem(V)}}):I=E.reject("Invalid arguments"),C(I,b),I}var Yp={_driver:"localStorageWrapper",_initStorage:Lp,_support:Mp(),iterate:Bp,getItem:Vp,setItem:Gp,removeItem:$p,clear:Fp,length:jp,key:Up,keys:Hp,dropInstance:Wp},zp=function(b,m){return b===m||typeof b=="number"&&typeof m=="number"&&isNaN(b)&&isNaN(m)},Kp=function(b,m){for(var S=b.length,I=0;I<S;){if(zp(b[I],m))return!0;I++}return!1},sl=Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"},Zr={},al={},hr={INDEXEDDB:me,WEBSQL:Rp,LOCALSTORAGE:Yp},Xp=[hr.INDEXEDDB._driver,hr.WEBSQL._driver,hr.LOCALSTORAGE._driver],Mi=["dropInstance"],vs=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Mi),qp={description:"",driver:Xp.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Zp(f,b){f[b]=function(){var m=arguments;return f.ready().then(function(){return f[b].apply(f,m)})}}function ys(){for(var f=1;f<arguments.length;f++){var b=arguments[f];if(b)for(var m in b)b.hasOwnProperty(m)&&(sl(b[m])?arguments[0][m]=b[m].slice():arguments[0][m]=b[m])}return arguments[0]}var Jp=function(){function f(b){c(this,f);for(var m in hr)if(hr.hasOwnProperty(m)){var S=hr[m],I=S._driver;this[m]=I,Zr[I]||this.defineDriver(S)}this._defaultConfig=ys({},qp),this._config=ys({},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 w=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=vs.concat("_initStorage"),re=0,Ce=Y.length;re<Ce;re++){var Be=Y[re],Ue=!Kp(Mi,Be);if((Ue||m[Be])&&typeof m[Be]!="function"){V(G);return}}var it=function(){for(var Jr=function(th){return function(){var nh=new Error("Method "+th+" is not implemented by the current driver"),cl=E.reject(nh);return C(cl,arguments[arguments.length-1]),cl}},Es=0,eh=Mi.length;Es<eh;Es++){var bs=Mi[Es];m[bs]||(m[bs]=Jr(bs))}};it();var et=function(Jr){Zr[$]&&console.info("Redefining LocalForage driver: "+$),Zr[$]=m,al[$]=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 O(w,S,I),w},f.prototype.driver=function(){return this._driver||null},f.prototype.getDriver=function(m,S,I){var w=Zr[m]?E.resolve(Zr[m]):E.reject(new Error("Driver not found."));return O(w,S,I),w},f.prototype.getSerializer=function(m){var S=E.resolve(_s);return O(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 O(I,m,m),I},f.prototype.setDriver=function(m,S,I){var w=this;sl(m)||(m=[m]);var R=this._getSupportedDrivers(m);function V(){w._config.driver=w.driver()}function $(re){return w._extend(re),V(),w._ready=w._initStorage(w._config),w._ready}function G(re){return function(){var Ce=0;function Be(){for(;Ce<re.length;){var Ue=re[Ce];return Ce++,w._dbInfo=null,w._ready=null,w.getDriver(Ue).then($).catch(Be)}V();var it=new Error("No available storage method found.");return w._driverSet=E.reject(it),w._driverSet}return Be()}}var Y=this._driverSet!==null?this._driverSet.catch(function(){return E.resolve()}):E.resolve();return this._driverSet=Y.then(function(){var re=R[0];return w._dbInfo=null,w._ready=null,w.getDriver(re).then(function(Ce){w._driver=Ce._driver,V(),w._wrapLibraryMethodsWithReady(),w._initDriver=G(R)})}).catch(function(){V();var re=new Error("No available storage method found.");return w._driverSet=E.reject(re),w._driverSet}),O(this._driverSet,S,I),this._driverSet},f.prototype.supports=function(m){return!!al[m]},f.prototype._extend=function(m){ys(this,m)},f.prototype._getSupportedDrivers=function(m){for(var S=[],I=0,w=m.length;I<w;I++){var R=m[I];this.supports(R)&&S.push(R)}return S},f.prototype._wrapLibraryMethodsWithReady=function(){for(var m=0,S=vs.length;m<S;m++)Zp(this,vs[m])},f.prototype.createInstance=function(m){return new f(m)},f}(),Qp=new Jp;i.exports=Qp},{3:3}]},{},[4])(4)})});var ih={schedule(t,e){let n=setTimeout(t,e);return()=>clearTimeout(n)}};function oh(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function sh(t){return!!t&&t.nodeType===Node.ELEMENT_NODE}var Ps;function ah(t,e){if(!Ps){let n=Element.prototype;Ps=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}return t.nodeType===Node.ELEMENT_NODE?Ps.call(t,e):!1}function ch(t){let e={};return t.forEach(({propName:n,templateName:r,transform:i})=>{e[oh(r)]=[n,i]}),e}function lh(t,e){return e.get(xs).resolveComponentFactory(t).inputs}function uh(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=dh(c,e,i);u!==-1&&r[u].push(c)}return r}function dh(t,e,n){let r=n;return sh(t)&&e.some((i,o)=>i!=="*"&&ah(t,i)?(r=o,!0):!1),r}var fh=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 Ls(this.componentFactory,e,this.inputMap)}},Ls=class{componentFactory;injector;inputMap;eventEmitters=new fl(1);events=this.eventEmitters.pipe(bl(e=>Li(...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(kt),this.appRef=this.injector.get(Hi),this.cdScheduler=n.get(Sl),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=ih.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},fh))})}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=Pt.create({providers:[],parent:this.injector}),r=uh(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 ul(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()}},Fs=class extends HTMLElement{ngElementEventsSubscription=null};function Kl(t,e){let n=lh(t,e.injector),r=e.strategyFactory||new ks(t,e.injector),i=ch(n);class o extends Fs{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 Xl="9.12.9";var ze=class t{static SDK_VERSION=Xl;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 Nn={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${ze.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${ze.SDK_VERSION}/dist/widget.min.js`};var Bt=Pi(Zl());var _t=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 Jl(t=ze.LOG_PREFIX){Bt.default.useDefaults({formatter:function(n){n.unshift(`${t} (v${ze.SDK_VERSION}):`)}});let e=hh();(e==="1"||e==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?Bt.default.setLevel(Bt.default[localStorage.cooeeLogLevel]):Bt.default.setLevel(Nn.debug?Bt.default.TRACE:Bt.default.OFF)}function hh(){return new URL(location.href).searchParams?.get("cooee-debug")}var qr=Pi(Vs());var eu={providers:[kl()]};var gh={"[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"},q0=Te(D({},gh),{"[class.ng-submitted]":"isSubmitted"});var _h=new tn("",{providedIn:"root",factory:()=>ru}),ru="always";var vh=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=Gn({type:t});static \u0275inj=jn({})}return t})();var iu=(()=>{class t{static withConfig(n){return{ngModule:t,providers:[{provide:_h,useValue:n.callSetDisabledState??ru}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=Gn({type:t});static \u0275inj=jn({imports:[vh]})}return t})();var zt=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 hn=class t{cooeeEvent=new ot;cooeeCTA=new ot;elementRef=q(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(){_t.debug("Init",this.constructor.name);let e=this.elementRef.nativeElement.shadowRoot;e&&(zt.injectStylesheet(Nn.styleURL,e),zt.injectRawCSS(window.CooeeSDK.config.website.commonCSS,e))}ngOnDestroy(){_t.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=Re({type:t,selectors:[["ng-component"]],hostVars:2,hostBindings:function(n,r){n&2&&Dl(r.classes)},inputs:{triggerContext:"triggerContext"},outputs:{cooeeEvent:"cooeeEvent",cooeeCTA:"cooeeCTA"},decls:0,vars:0,template:function(n,r){},encapsulation:2})};var yh=(t,e,n)=>({"--option-color":t,"background-color":e,color:n}),ou=(t,e)=>e.id;function Eh(t,e){if(t&1&&(W(0,"span",6),xe(1),z()),t&2){let n=Z().$implicit;H(),sn(n.displayName||n.name)}}function bh(t,e){if(t&1){let n=Ye();vt(0),W(1,"button",5),Ae("click",function(){let i=Me(n).$implicit,o=Z().$implicit,s=Z();return Pe(s.onOptionChange(o,i))}),Oe(2,Eh,2,1,"span",6),z()}if(t&2){let n=e.$implicit,r=Z().$implicit,i=pt(1),o=Z(),s=n.name;H(),Wn("color-type",i)("selected",o.selectedOptions()[r.name]===s),ve("disabled",n.disabled)("title",s)("ngStyle",Rl(9,yh,i?s:"",i?s:"",i?"transparent":"")),Tn("data-value",s),H(),Ie(i?-1:2)}}function wh(t,e){if(t&1&&(W(0,"div"),vt(1),W(2,"div",1),xe(3),z(),W(4,"div",2),xe(5),z(),W(6,"div",3),Ze(7,bh,3,13,"button",4,ou),z()()),t&2){let n=e.$implicit,r=Z();Al("option-group ",n.name.toLowerCase(),""),H(),Yt(n.name.toLowerCase().includes("color")),H(2),xt("",n.name,":"),H(2),sn(r.selectedOptions()[n.name]),H(2),Je(n.optionValues)}}var Xi=class t extends hn{selectedVariant=new ot;item=Vi.required();selectedOptions=Wt({});options=$i(()=>{let e=this.item();if(!e.options||e.vars.length===1)return[];if(window.cooeeManipulateProductOptions)try{window.cooeeManipulateProductOptions(e)}catch(n){_t.error(n)}return e.options});matchedVariant=$i(()=>{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(),Ns(()=>{let n=this.matchedVariant();n&&(this.item().setSelectedVariant(n),this.selectedVariant.emit(n))});let e=Ns(()=>{let n=this.item();if(!n?.options)return;let r=D({},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=D({},this.selectedOptions());r[e.name]=n.name,this.selectedOptions.set(r)}engagementTriggerReceived(){}update(){}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Re({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,wh,9,6,"div",0,ou),n&2&&Je(r.options())},dependencies:[Ul,Vl,iu],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 Bs=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}(Bs||{});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 oi=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}(oi||{});var yr=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 Us=(n=>(n.CART_AMOUNT="CART_AMOUNT",n.ITEM_COUNT="ITEM_COUNT",n))(Us||{});var Er=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 su=Object.prototype.toString;function qn(t){switch(su.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return mn(t,Error)}}function br(t,e){return su.call(t)===`[object ${e}]`}function qi(t){return br(t,"ErrorEvent")}function Zi(t){return br(t,"DOMError")}function Hs(t){return br(t,"DOMException")}function Ot(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 Zn(t){return t===null||wr(t)||typeof t!="object"&&typeof t!="function"}function cn(t){return br(t,"Object")}function Jn(t){return typeof Event<"u"&&mn(t,Event)}function js(t){return typeof Element<"u"&&mn(t,Element)}function $s(t){return br(t,"RegExp")}function Rn(t){return!!(t&&t.then&&typeof t.then=="function")}function Gs(t){return cn(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function mn(t,e){try{return t instanceof e}catch{return!1}}function si(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue))}function gn(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function Ji(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 au(t,e,n=!1){return Ot(t)?$s(e)?e.test(t):Ot(e)?n?t===e:t.includes(e):!1:!1}function Cr(t,e=[],n=!1){return e.some(r=>au(t,r,n))}function Ys(t,e,n=250,r,i,o,s){if(!o.exception||!o.exception.values||!s||!mn(s.originalException,Error))return;let c=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;c&&(o.exception.values=Ch(Ws(t,e,i,s.originalException,r,o.exception.values,c,0),n))}function Ws(t,e,n,r,i,o,s,c){if(o.length>=n+1)return o;let u=[...o];if(mn(r[i],Error)){cu(s,c);let d=t(e,r[i]),g=u.length;lu(d,i,g,c),u=Ws(t,e,n,r[i],i,[d,...u],d,g)}return Array.isArray(r.errors)&&r.errors.forEach((d,g)=>{if(mn(d,Error)){cu(s,c);let p=t(e,d),E=u.length;lu(p,`errors[${g}]`,E,c),u=Ws(t,e,n,d,i,[p,...u],p,E)}}),u}function cu(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=Te(D(D({},t.mechanism),t.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:e})}function lu(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=Te(D({},t.mechanism),{type:"chained",source:e,exception_id:n,parent_id:r})}function Ch(t,e){return t.map(n=>(n.value&&(n.value=gn(n.value,e)),n))}var Xt="8.18.0";var ge=globalThis;function Sr(t,e,n){let r=n||ge,i=r.__SENTRY__=r.__SENTRY__||{},o=i[Xt]=i[Xt]||{};return o[t]||(o[t]=e())}var zs=ge,Sh=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||Sh;for(;n&&o++<r&&(d=xh(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 xh(t,e){let n=t,r=[];if(!n||!n.tagName)return"";if(zs.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&&e.length?e.filter(s=>n.getAttribute(s)).map(s=>[s,n.getAttribute(s)]):null;if(i&&i.length)i.forEach(s=>{r.push(`[${s[0]}="${s[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let s=n.className;if(s&&Ot(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 Ks(){try{return zs.document.location.href}catch{return""}}function Xs(t){if(!zs.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}var _n=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var Ih="Sentry Logger ",ci=["debug","info","warn","error","log","assert","trace"],xr={};function Ir(t){if(!("console"in ge))return t();let e=ge.console,n={},r=Object.keys(xr);r.forEach(i=>{let o=xr[i];n[i]=e[i],e[i]=o});try{return t()}finally{r.forEach(i=>{e[i]=n[i]})}}function Th(){let t=!1,e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return _n?ci.forEach(n=>{e[n]=(...r)=>{t&&Ir(()=>{ge.console[n](`${Ih}[${n}]:`,...r)})}}):ci.forEach(n=>{e[n]=()=>{}}),e}var se=Th();var Oh=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Dh(t){return t==="http"||t==="https"}function vn(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 uu(t){let e=Oh.exec(t);if(!e){Ir(()=>{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 du({host:o,pass:i,path:u,projectId:d,port:s,protocol:n,publicKey:r})}function du(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function Ah(t){if(!_n)return!0;let{port:e,projectId:n,protocol:r}=t;return["protocol","publicKey","host","projectId"].find(s=>t[s]?!1:(se.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:n.match(/^\d+$/)?Dh(r)?e&&isNaN(parseInt(e,10))?(se.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(se.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(se.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Qi(t){let e=typeof t=="string"?uu(t):du(t);if(!(!e||!Ah(e)))return e}var Et=class extends Error{constructor(e,n="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}};function Ke(t,e,n){if(!(e in t))return;let r=t[e],i=n(r);typeof i=="function"&&eo(i,r),t[e]=i}function Dt(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{_n&&se.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function eo(t,e){try{let n=e.prototype||{};t.prototype=e.prototype=n,Dt(t,"__sentry_original__",e)}catch{}}function Qn(t){return t.__sentry_original__}function Zs(t){return Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function to(t){if(qn(t))return D({message:t.message,name:t.name,stack:t.stack},pu(t));if(Jn(t)){let e=D({type:t.type,target:fu(t.target),currentTarget:fu(t.currentTarget)},pu(t));return typeof CustomEvent<"u"&&mn(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function fu(t){try{return js(t)?ai(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function pu(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 Js(t,e=40){let n=Object.keys(to(t));n.sort();let r=n[0];if(!r)return"[object has no keys]";if(r.length>=e)return gn(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:gn(o,e)}return""}function ct(t){return qs(t,new Map)}function qs(t,e){if(Nh(t)){let n=e.get(t);if(n!==void 0)return n;let r={};e.set(t,r);for(let i of Object.keys(t))typeof t[i]<"u"&&(r[i]=qs(t[i],e));return r}if(Array.isArray(t)){let n=e.get(t);if(n!==void 0)return n;let r=[];return e.set(t,r),t.forEach(i=>{r.push(qs(i,e))}),r}return t}function Nh(t){if(!cn(t))return!1;try{let e=Object.getPrototypeOf(t).constructor.name;return!e||e==="Object"}catch{return!0}}var yn="?",hu=/\(error: (.*)\)/,mu=/captureMessage|captureException/;function ea(...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
|
+
`);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(no(e).function||"")&&e.pop(),e.reverse(),mu.test(no(e).function||"")&&(e.pop(),mu.test(no(e).function||"")&&e.pop()),e.slice(0,50).map(n=>Te(D({},n),{filename:n.filename||no(e).filename,function:n.function||yn}))}function no(t){return t[t.length-1]||{}}var Qs="<anonymous>";function qt(t){try{return!t||typeof t!="function"?Qs:t.name||Qs}catch{return Qs}}function ro(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 io={},_u={};function At(t,e){io[t]=io[t]||[],io[t].push(e)}function Nt(t,e){_u[t]||(e(),_u[t]=!0)}function lt(t,e){let n=t&&io[t];if(n)for(let r of n)try{r(e)}catch(i){_n&&se.error(`Error while triggering instrumentation handler.
|
|
13
13
|
Type: ${t}
|
|
14
|
-
Name: ${
|
|
15
|
-
Error:`,i)}}function
|
|
14
|
+
Name: ${qt(r)}
|
|
15
|
+
Error:`,i)}}function ta(t){let e="console";At(e,t),Nt(e,Rh)}function Rh(){"console"in ge&&ci.forEach(function(t){t in ge.console&&Ke(ge.console,t,function(e){return xr[t]=e,function(...n){lt("console",{args:n,level:t});let i=xr[t];i&&i.apply(ge.console,n)}})})}var na=ge;function vu(){if(!("fetch"in na))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function li(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function ra(){if(typeof EdgeRuntime=="string")return!0;if(!vu())return!1;if(li(na.fetch))return!0;let t=!1,e=na.document;if(e&&typeof e.createElement=="function")try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=li(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){_n&&se.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}var yu=1e3;function En(){return Date.now()/yu}function Mh(){let{performance:t}=ge;if(!t||!t.now)return En;let e=Date.now()-t.now(),n=t.timeOrigin==null?e:t.timeOrigin;return()=>(n+t.now())/yu}var Ht=Mh(),ui,Ph=(()=>{let{performance:t}=ge;if(!t||!t.now){ui="none";return}let e=3600*1e3,n=t.now(),r=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,o=i<e,s=t.timing&&t.timing.navigationStart,u=typeof s=="number"?Math.abs(s+n-r):e,d=u<e;return o||d?i<=u?(ui="timeOrigin",t.timeOrigin):(ui="navigationStart",s):(ui="dateNow",r)})();function oa(t){let e="fetch";At(e,t),Nt(e,kh)}function kh(){ra()&&Ke(ge,"fetch",function(t){return function(...e){let{method:n,url:r}=Lh(e),i={args:e,fetchData:{method:n,url:r},startTimestamp:Ht()*1e3};lt("fetch",D({},i));let o=new Error().stack;return t.apply(ge,e).then(s=>{let c=Te(D({},i),{endTimestamp:Ht()*1e3,response:s});return lt("fetch",c),s},s=>{let c=Te(D({},i),{endTimestamp:Ht()*1e3,error:s});throw lt("fetch",c),qn(s)&&s.stack===void 0&&(s.stack=o,Dt(s,"framesToPop",1)),s})}})}function ia(t,e){return!!t&&typeof t=="object"&&!!t[e]}function Eu(t){return typeof t=="string"?t:t?ia(t,"url")?t.url:t.toString?t.toString():"":""}function Lh(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){let[n,r]=t;return{url:Eu(n),method:ia(r,"method")?String(r.method).toUpperCase():"GET"}}let e=t[0];return{url:Eu(e),method:ia(e,"method")?String(e.method).toUpperCase():"GET"}}var oo=null;function sa(t){let e="error";At(e,t),Nt(e,Fh)}function Fh(){oo=ge.onerror,ge.onerror=function(t,e,n,r,i){return lt("error",{column:r,error:i,line:n,msg:t,url:e}),oo&&!oo.__SENTRY_LOADER__?oo.apply(this,arguments):!1},ge.onerror.__SENTRY_INSTRUMENTED__=!0}var so=null;function aa(t){let e="unhandledrejection";At(e,t),Nt(e,Vh)}function Vh(){so=ge.onunhandledrejection,ge.onunhandledrejection=function(t){return lt("unhandledrejection",t),so&&!so.__SENTRY_LOADER__?so.apply(this,arguments):!0},ge.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function ca(){return"npm"}function bu(){let t=typeof WeakSet=="function",e=t?new WeakSet:[];function n(i){if(t)return e.has(i)?!0:(e.add(i),!1);for(let o=0;o<e.length;o++)if(e[o]===i)return!0;return e.push(i),!1}function r(i){if(t)e.delete(i);else for(let o=0;o<e.length;o++)if(e[o]===i){e.splice(o,1);break}}return[n,r]}function ht(){let t=ge,e=t.crypto||t.msCrypto,n=()=>Math.random()*16;try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(n=()=>{let r=new Uint8Array(1);return e.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function wu(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function ln(t){let{message:e,event_id:n}=t;if(e)return e;let r=wu(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Tr(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 Mn(t,e){let n=wu(t);if(!n)return;let r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism=D(D(D({},r),i),e),e&&"data"in e){let o=D(D({},i&&i.data),e.data);n.mechanism.data=o}}function ao(t){if(t&&t.__sentry_captured__)return!0;try{Dt(t,"__sentry_captured__",!0)}catch{}return!1}function co(t){return Array.isArray(t)?t:[t]}function un(t,e=100,n=1/0){try{return la("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function lo(t,e=3,n=100*1024){let r=un(t,e);return jh(r)>n?lo(t,e-1,n):r}function la(t,e,n=1/0,r=1/0,i=bu()){let[o,s]=i;if(e==null||["number","boolean","string"].includes(typeof e)&&!Number.isNaN(e))return e;let c=Bh(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 C=d.toJSON();return la("",C,u-1,r,i)}catch{}let g=Array.isArray(e)?[]:{},p=0,E=to(e);for(let C in E){if(!Object.prototype.hasOwnProperty.call(E,C))continue;if(p>=r){g[C]="[MaxProperties ~]";break}let O=E[C];g[C]=la(C,O,u-1,r,i),p++}return s(e),g}function Bh(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(Gs(e))return"[SyntheticEvent]";if(typeof e=="number"&&e!==e)return"[NaN]";if(typeof e=="function")return`[Function: ${qt(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;let n=Uh(e);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Uh(t){let e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}function Hh(t){return~-encodeURI(t).split(/%..|./).length}function jh(t){return Hh(JSON.stringify(t))}var Pn;(function(t){t[t.PENDING=0]="PENDING";let n=1;t[t.RESOLVED=n]="RESOLVED";let r=2;t[t.REJECTED=r]="REJECTED"})(Pn||(Pn={}));function Zt(t){return new dn(e=>{e(t)})}function Un(t){return new dn((e,n)=>{n(t)})}var dn=class t{constructor(e){t.prototype.__init.call(this),t.prototype.__init2.call(this),t.prototype.__init3.call(this),t.prototype.__init4.call(this),this._state=Pn.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}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)})})}__init(){this._resolve=e=>{this._setResult(Pn.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(Pn.REJECTED,e)}}__init3(){this._setResult=(e,n)=>{if(this._state===Pn.PENDING){if(Rn(n)){n.then(this._resolve,this._reject);return}this._state=e,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Pn.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===Pn.RESOLVED&&n[1](this._value),this._state===Pn.REJECTED&&n[2](this._value),n[0]=!0)})}}};function ua(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 Un(new Et("Not adding Promise because buffer limit was reached."));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 dn((c,u)=>{let d=e.length;if(!d)return c(!0);let g=setTimeout(()=>{s&&s>0&&c(!1)},s);e.forEach(p=>{Zt(p).then(()=>{--d||(clearTimeout(g),c(!0))},u)})})}return{$:e,add:i,drain:o}}function di(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}}var Cu=["fatal","error","warning","log","info","debug"];function da(t){return t==="warn"?"warning":Cu.includes(t)?t:"log"}var xu="sentry-",Iu=/^sentry-/;function fa(t){let e=Tu(t);if(!e)return;let n=Object.entries(e).reduce((r,[i,o])=>{if(i.match(Iu)){let s=i.slice(xu.length);r[s]=o}return r},{});if(Object.keys(n).length>0)return n}function Tu(t){if(!(!t||!Ot(t)&&!Array.isArray(t)))return Array.isArray(t)?t.reduce((e,n)=>{let r=Su(n);return Object.entries(r).forEach(([i,o])=>{e[i]=o}),e},{}):Su(t)}function Su(t){return t.split(",").map(e=>e.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((e,[n,r])=>(n&&r&&(e[n]=r),e),{})}function bn(t,e=[]){return[t,e]}function ha(t,e){let[n,r]=t;return[n,[...r,e]]}function uo(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 pa(t){return ge.__SENTRY__&&ge.__SENTRY__.encodePolyfill?ge.__SENTRY__.encodePolyfill(t):new TextEncoder().encode(t)}function ma(t){let[e,n]=t,r=JSON.stringify(e);function i(o){typeof r=="string"?r=typeof o=="string"?r+o:[pa(r),o]:r.push(typeof o=="string"?pa(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(cn(c))}i(u)}}return typeof r=="string"?r:Uh(r)}function Uh(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 fa(t){let e=typeof t.data=="string"?la(t.data):t.data;return[at({type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),e]}var Hh={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",statsd:"metric_bucket"};function co(t){return Hh[t]}function lo(t){if(!t||!t.sdk)return;let{name:e,version:n}=t.sdk;return{name:e,version:n}}function pa(t,e,n,r){let i=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return D(D(D({event_id:t.event_id,sent_at:new Date().toISOString()},e&&{sdk:e}),!!n&&r&&{dsn:gn(r)}),i&&{trace:at(D({},i))})}function ha(t,e,n){let r=[{type:"client_report"},{timestamp:n||yn(),discarded_events:t}];return vn(e?{dsn:e}:{},[r])}function Tu(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 Ou(t,e){return t[e]||t.all||0}function ma(t,e,n=Date.now()){return Ou(t,e)>n}function ga(t,{statusCode:e,headers:n},r=Date.now()){let i=D({},t),o=n&&n["x-sentry-rate-limits"],s=n&&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 C of d.split(";"))C==="metric_bucket"?(!g||g.split(";").includes("custom"))&&(i[C]=r+E):i[C]=r+E}else s?i.all=r+Tu(s,r):e===429&&(i.all=r+60*1e3);return i}function uo(){return{traceId:pt(),spanId:pt().substring(16)}}var fo=ge;function _a(){let t=fo.chrome,e=t&&t.app&&t.app.runtime,n="history"in fo&&!!fo.history.pushState&&!!fo.history.replaceState;return!e&&n}var Be=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function er(){return di(ge),ge}function di(t){let e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||zt,e[zt]=e[zt]||{}}function fi(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||Ht(),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:pt()),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)}var ya="_sentrySpan";function va(t,e){e?xt(t,ya,e):delete t[ya]}function Ea(t){return t[ya]}var Gh=100,ba=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=uo()}clone(){let e=new t;return e._breadcrumbs=[...this._breadcrumbs],e._tags=D({},this._tags),e._extra=D({},this._extra),e._contexts=D({},this._contexts),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._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata=D({},this._sdkProcessingMetadata),e._propagationContext=D({},this._propagationContext),e._client=this._client,e._lastEventId=this._lastEventId,va(e,Ea(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&&fi(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags=D(D({},this._tags),e),this._notifyScopeListeners(),this}setTag(e,n){return this._tags=Ie(D({},this._tags),{[e]:n}),this._notifyScopeListeners(),this}setExtras(e){return this._extra=D(D({},this._extra),e),this._notifyScopeListeners(),this}setExtra(e,n){return this._extra=Ie(D({},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,i]=n instanceof vt?[n.getScopeData(),n.getRequestSession()]:sn(n)?[e,e.requestSession]:[],{tags:o,extra:s,user:c,contexts:u,level:d,fingerprint:g=[],propagationContext:p}=r||{};return this._tags=D(D({},this._tags),o),this._extra=D(D({},this._extra),s),this._contexts=D(D({},this._contexts),u),c&&Object.keys(c).length&&(this._user=c),d&&(this._level=d),g.length&&(this._fingerprint=g),p&&(this._propagationContext=p),i&&(this._requestSession=i),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._requestSession=void 0,this._session=void 0,va(this,void 0),this._attachments=[],this._propagationContext=uo(),this._notifyScopeListeners(),this}addBreadcrumb(e,n){let r=typeof n=="number"?n:Gh;if(r<=0)return this;let i=D({timestamp:yn()},e),o=this._breadcrumbs;return o.push(i),this._breadcrumbs=o.length>r?o.slice(-r):o,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:Ea(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=D(D({},this._sdkProcessingMetadata),e),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){let r=n&&n.event_id?n.event_id:pt();if(!this._client)return se.warn("No client configured on scope - will not capture exception!"),r;let i=new Error("Sentry syntheticException");return this._client.captureException(e,Ie(D({originalException:e,syntheticException:i},n),{event_id:r}),this),r}captureMessage(e,n,r){let i=r&&r.event_id?r.event_id:pt();if(!this._client)return se.warn("No client configured on scope - will not capture message!"),i;let o=new Error(e);return this._client.captureMessage(e,n,Ie(D({originalException:e,syntheticException:o},r),{event_id:i}),this),i}captureEvent(e,n){let r=n&&n.event_id?n.event_id:pt();return this._client?(this._client.captureEvent(e,Ie(D({},n),{event_id:r}),this),r):(se.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)}},vt=ba;function Du(){return Sr("defaultCurrentScope",()=>new vt)}function Au(){return Sr("defaultIsolationScope",()=>new vt)}var wa=class{constructor(e,n){let r;e?r=e:r=new vt;let i;n?i=n:i=new vt,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 Nn(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 Or(){let t=er(),e=di(t);return e.stack=e.stack||new wa(Du(),Au())}function Wh(t){return Or().withScope(t)}function Yh(t,e){let n=Or();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function Nu(t){return Or().withScope(()=>t(Or().getIsolationScope()))}function Ru(){return{withIsolationScope:Nu,withScope:Wh,withSetScope:Yh,withSetIsolationScope:(t,e)=>Nu(e),getCurrentScope:()=>Or().getScope(),getIsolationScope:()=>Or().getIsolationScope()}}function po(t){let e=di(t);return e.acs?e.acs:Ru()}function tr(){let t=er();return po(t).getCurrentScope()}function nr(){let t=er();return po(t).getIsolationScope()}function ho(){return Sr("globalScope",()=>new vt)}function mo(...t){let e=er(),n=po(e);if(t.length===2){let[r,i]=t;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(t[0])}function Ke(){return tr().getClient()}var zh="_sentryMetrics";function Mu(t){let e=t[zh];if(!e)return;let n={};for(let[,[r,i]]of e)(n[r]||(n[r]=[])).push(at(i));return n}var Ca="sentry.source",Sa="sentry.sample_rate",Ia="sentry.op",xa="sentry.origin";var Kh=1;function ku(t){let{spanId:e,traceId:n}=t.spanContext(),{parent_span_id:r}=rr(t);return at({parent_span_id:r,span_id:e,trace_id:n})}function Pu(t){return typeof t=="number"?Lu(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Lu(t.getTime()):Ht()}function Lu(t){return t>9999999999?t/1e3:t}function rr(t){if(qh(t))return t.getSpanJSON();try{let{spanId:e,traceId:n}=t.spanContext();if(Xh(t)){let{attributes:r,startTime:i,name:o,endTime:s,parentSpanId:c,status:u}=t;return at({span_id:e,trace_id:n,data:r,description:o,parent_span_id:c,start_timestamp:Pu(i),timestamp:Pu(s)||void 0,status:Zh(u),op:r[Ia],origin:r[xa],_metrics_summary:Mu(t)})}return{span_id:e,trace_id:n}}catch{return{}}}function Xh(t){let e=t;return!!e.attributes&&!!e.startTime&&!!e.name&&!!e.endTime&&!!e.status}function qh(t){return typeof t.getSpanJSON=="function"}function Fu(t){let{traceFlags:e}=t.spanContext();return e===Kh}function Zh(t){if(!(!t||t.code===0))return t.code===1?"ok":t.message||"unknown_error"}var Jh="_sentryRootSpan";function pi(t){return t[Jh]||t}var go="production";var Qh="_frozenDsc";function Ta(t,e){let n=e.getOptions(),{publicKey:r}=e.getDsn()||{},i=at({environment:n.environment||go,release:n.release,public_key:r,trace_id:t});return e.emit("createDsc",i),i}function Vu(t){let e=Ke();if(!e)return{};let n=Ta(rr(t).trace_id||"",e),r=pi(t),i=r[Qh];if(i)return i;let o=r.spanContext().traceState,s=o&&o.get("sentry.dsc"),c=s&&ca(s);if(c)return c;let u=rr(r),d=u.data||{},g=d[Sa];g!=null&&(n.sample_rate=`${g}`);let p=d[Ca],E=u.description;return p!=="url"&&E&&(n.transaction=E),n.sampled=String(Fu(r)),e.emit("createDsc",n,r),n}function Bu(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){Be&&se.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`);return}return e}function em(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 Uu(t,e,n,r){let i=lo(n),o=D(D({sent_at:new Date().toISOString()},i&&{sdk:i}),!!r&&e&&{dsn:gn(e)}),s="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return vn(o,[s])}function Hu(t,e,n,r){let i=lo(n),o=t.type&&t.type!=="replay_event"?t.type:"event";em(t,n&&n.sdk);let s=pa(t,i,r,e);return delete t.sdkProcessingMetadata,vn(s,[[{type:o},t]])}function _o(t,e,n,r=0){return new ln((i,o)=>{let s=t[r];if(e===null||typeof s!="function")i(e);else{let c=s(D({},e),n);Be&&s.id&&c===null&&se.log(`Event processor "${s.id}" dropped event`),Nn(c)?c.then(u=>_o(t,u,n,r+1).then(i)).then(null,o):_o(t,c,n,r+1).then(i).then(null,o)}})}function ju(t,e){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=e;tm(t,e),r&&im(t,r),om(t,n),nm(t,i),rm(t,o)}function Oa(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:C,span:O}=e;hi(t,"extra",n),hi(t,"tags",r),hi(t,"user",i),hi(t,"contexts",o),hi(t,"sdkProcessingMetadata",c),s&&(t.level=s),C&&(t.transactionName=C),O&&(t.span=O),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=D(D({},t.propagationContext),E)}function hi(t,e,n){if(n&&Object.keys(n).length){t[e]=D({},t[e]);for(let r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[e][r]=n[r])}}function tm(t,e){let{extra:n,tags:r,user:i,contexts:o,level:s,transactionName:c}=e,u=at(n);u&&Object.keys(u).length&&(t.extra=D(D({},u),t.extra));let d=at(r);d&&Object.keys(d).length&&(t.tags=D(D({},d),t.tags));let g=at(i);g&&Object.keys(g).length&&(t.user=D(D({},g),t.user));let p=at(o);p&&Object.keys(p).length&&(t.contexts=D(D({},p),t.contexts)),s&&(t.level=s),c&&t.type!=="transaction"&&(t.transaction=c)}function nm(t,e){let n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}function rm(t,e){t.sdkProcessingMetadata=D(D({},t.sdkProcessingMetadata),e)}function im(t,e){t.contexts=D({trace:ku(e)},t.contexts),t.sdkProcessingMetadata=D({dynamicSamplingContext:Vu(e)},t.sdkProcessingMetadata);let n=pi(e),r=rr(n).description;r&&!t.transaction&&t.type==="transaction"&&(t.transaction=r)}function om(t,e){t.fingerprint=t.fingerprint?oo(t.fingerprint):[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}function Gu(t,e,n,r,i,o){let{normalizeDepth:s=3,normalizeMaxBreadth:c=1e3}=t,u=Ie(D({},e),{event_id:e.event_id||n.event_id||pt(),timestamp:e.timestamp||yn()}),d=n.integrations||t.integrations.map(L=>L.name);sm(u,t),lm(u,d),i&&i.emit("applyFrameMetadata",e),e.type===void 0&&am(u,t.stackParser);let g=dm(r,n.captureContext);n.mechanism&&Rn(u,n.mechanism);let p=i?i.getEventProcessors():[],E=ho().getScopeData();if(o){let L=o.getScopeData();Oa(E,L)}if(g){let L=g.getScopeData();Oa(E,L)}let C=[...n.attachments||[],...E.attachments];C.length&&(n.attachments=C),ju(u,E);let O=[...p,...E.eventProcessors];return _o(O,u,n).then(L=>(L&&cm(L),typeof s=="number"&&s>0?um(L,s,c):L))}function sm(t,e){let{environment:n,release:r,dist:i,maxValueLength:o=250}=e;"environment"in t||(t.environment="environment"in e?n:go),t.release===void 0&&r!==void 0&&(t.release=r),t.dist===void 0&&i!==void 0&&(t.dist=i),t.message&&(t.message=hn(t.message,o));let s=t.exception&&t.exception.values&&t.exception.values[0];s&&s.value&&(s.value=hn(s.value,o));let c=t.request;c&&c.url&&(c.url=hn(c.url,o))}var $u=new WeakMap;function am(t,e){let n=ge._sentryDebugIds;if(!n)return;let r,i=$u.get(e);i?r=i:(r=new Map,$u.set(e,r));let o=Object.entries(n).reduce((s,[c,u])=>{let d,g=r.get(c);g?d=g:(d=e(c),r.set(c,d));for(let p=d.length-1;p>=0;p--){let E=d[p];if(E.filename){s[E.filename]=u;break}}return s},{});try{t.exception.values.forEach(s=>{s.stacktrace.frames.forEach(c=>{c.filename&&(c.debug_id=o[c.filename])})})}catch{}}function cm(t){let e={};try{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)})})}catch{}if(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 lm(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function um(t,e,n){if(!t)return null;let r=D(D(D(D(D({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(i=>D(D({},i),i.data&&{data:cn(i.data,e,n)}))}),t.user&&{user:cn(t.user,e,n)}),t.contexts&&{contexts:cn(t.contexts,e,n)}),t.extra&&{extra:cn(t.extra,e,n)});return t.contexts&&t.contexts.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=cn(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map(i=>D(D({},i),i.data&&{data:cn(i.data,e,n)}))),r}function dm(t,e){if(!e)return t;let n=t?t.clone():new vt;return n.update(e),n}function Wu(t){if(t)return fm(t)?{captureContext:t}:hm(t)?{captureContext:t}:t}function fm(t){return t instanceof vt||typeof t=="function"}var pm=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function hm(t){return Object.keys(t).some(e=>pm.includes(e))}function yo(t,e){return tr().captureException(t,Wu(e))}function mi(t,e){return tr().captureEvent(t,e)}var mm="7";function gm(t){let e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function _m(t){return`${gm(t)}${t.projectId}/envelope/`}function ym(t,e){return zs(D({sentry_key:t.publicKey,sentry_version:mm},e&&{sentry_client:`${e.name}/${e.version}`}))}function zu(t,e,n){return e||`${_m(t)}?${ym(t,n)}`}var Ku=[];function Xu(t,e){let n={};return e.forEach(r=>{r&&Aa(t,r,n)}),n}function Da(t,e){for(let n of e)n&&n.afterAllSetup&&n.afterAllSetup(t)}function Aa(t,e,n){if(n[e.name]){Be&&se.log(`Integration skipped because it was already installed: ${e.name}`);return}if(n[e.name]=e,Ku.indexOf(e.name)===-1&&typeof e.setupOnce=="function"&&(e.setupOnce(),Ku.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)}Be&&se.log(`Integration installed: ${e.name}`)}var qu="Not capturing exception because it's already been captured.",gi=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=qi(e.dsn):Be&&se.warn("No DSN provided, client will not send events."),this._dsn){let n=zu(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport(Ie(D({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},e.transportOptions),{url:n}))}}captureException(e,n,r){let i=pt();if(io(e))return Be&&se.log(qu),i;let o=D({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=D({event_id:pt()},r),s=wr(e)?e:String(e),c=Zn(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=pt();if(n&&n.originalException&&io(n.originalException))return Be&&se.log(qu),i;let o=D({event_id:i},n),c=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,o,c||r)),o.event_id}captureSession(e){typeof e.release!="string"?Be&&se.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),fi(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))):Xt(!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._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let n=this._integrations[e.name];Aa(this,e,this._integrations),n||Da(this,[e])}sendEvent(e,n={}){this.emit("beforeSendEvent",e,n);let r=Hu(e,this._dsn,this._options._metadata,this._options.tunnel);for(let o of n.attachments||[])r=ua(r,fa(o));let i=this.sendEnvelope(r);i&&i.then(o=>this.emit("afterSendEvent",e,o),null)}sendSession(e){let n=Uu(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(n)}recordDroppedEvent(e,n,r){if(this._options.sendClientReports){let i=`${e}:${n}`;Be&&se.log(`Adding outcome: "${i}"`),this._outcomes[i]=(this._outcomes[i]||0)+1}}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=>(Be&&se.error("Error while sending event:",n),n)):(Be&&se.error("Transport disabled"),Xt({}))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=Xu(this,e),Da(this,e)}_updateSessionFromEvent(e,n){let r=!1,i=!1,o=n.exception&&n.exception.values;if(o){i=!0;for(let u of o){let d=u.mechanism;if(d&&d.handled===!1){r=!0;break}}}let s=e.status==="ok";(s&&e.errors===0||s&&r)&&(fi(e,Ie(D({},r&&{status:"crashed"}),{errors:e.errors||Number(i||r)})),this.captureSession(e))}_isClientDoneProcessing(e){return new ln(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=nr()){let o=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s.length>0&&(n.integrations=s),this.emit("preprocessEvent",e,n),e.type||i.setLastEventId(e.event_id||n.event_id),Gu(o,e,n,r,this,i).then(c=>{if(c===null)return c;let u=D(D({},i.getPropagationContext()),r?r.getPropagationContext():void 0);if(!(c.contexts&&c.contexts.trace)&&u){let{traceId:g,spanId:p,parentSpanId:E,dsc:C}=u;c.contexts=D({trace:at({trace_id:g,span_id:p,parent_span_id:E})},c.contexts);let O=C||Ta(g,this);c.sdkProcessingMetadata=D({dynamicSamplingContext:O},c.sdkProcessingMetadata)}return c})}_captureEvent(e,n={},r){return this._processEvent(e,n,r).then(i=>i.event_id,i=>{if(Be){let o=i;o.logLevel==="log"?se.log(o.message):se.warn(o)}})}_processEvent(e,n,r){let i=this.getOptions(),{sampleRate:o}=i,s=Na(e),c=Zu(e),u=e.type||"error",d=`before send for type \`${u}\``,g=typeof o>"u"?void 0:Bu(o);if(c&&typeof g=="number"&&Math.random()>g)return this.recordDroppedEvent("sample_rate","error",e),Bn(new yt(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));let p=u==="replay_event"?"replay":u,C=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,n,r,C).then(O=>{if(O===null)throw this.recordDroppedEvent("event_processor",p,e),new yt("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return O;let L=Em(this,i,O,n);return vm(L,d)}).then(O=>{if(O===null){if(this.recordDroppedEvent("before_send",p,e),Na(e)){let Y=1+(e.spans||[]).length;this._outcomes.span=(this._outcomes.span||0)+Y}throw new yt(`${d} returned \`null\`, will not send event.`,"log")}let M=r&&r.getSession();!s&&M&&this._updateSessionFromEvent(M,O);let L=O.transaction_info;if(s&&L&&O.transaction!==e.transaction){let H="custom";O.transaction_info=Ie(D({},L),{source:H})}return this.sendEvent(O,n),O}).then(null,O=>{throw O instanceof yt?O:(this.captureException(O,{data:{__sentry__:!0},originalException:O}),new yt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
18
|
-
Reason: ${O}`))})}_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}})}};function
|
|
19
|
-
Event: ${
|
|
20
|
-
Event: ${
|
|
21
|
-
Event: ${
|
|
22
|
-
Event: ${
|
|
23
|
-
Event: ${
|
|
24
|
-
Url: ${
|
|
25
|
-
Event: ${
|
|
26
|
-
Url: ${bo(t)}`),!0)}function Am(t,e){return t.type||!e||!e.length?!1:Pm(t).some(n=>Cr(n,e))}function Nm(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;let n=t.transaction;return n?Cr(n,e):!1}function Rm(t,e){if(!e||!e.length)return!1;let n=bo(t);return n?Cr(n,e):!1}function Mm(t,e){if(!e||!e.length)return!0;let n=bo(t);return n?Cr(n,e):!0}function Pm(t){let e=[];t.message&&e.push(t.message);let n;try{n=t.exception.values[t.exception.values.length-1]}catch{}return n&&n.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`)),e}function Lm(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function km(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 bo(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?km(e):null}catch{return Be&&se.error(`Cannot extract url for event ${an(t)}`),null}}function Fm(t){return t.type||!t.exception||!t.exception.values||t.exception.values.length===0?!1:!t.message&&!t.exception.values.some(e=>e.stacktrace||e.type&&e.type!=="Error"||e.value)}var Vm="Dedupe",Bm=()=>{let t;return{name:Vm,processEvent(e){if(e.type)return e;try{if(Um(e,t))return Be&&se.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}},Co=Bm;function Um(t,e){return e?!!(Hm(t,e)||jm(t,e)):!1}function Hm(t,e){let n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!rd(t,e)||!nd(t,e))}function jm(t,e){let n=td(e),r=td(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!rd(t,e)||!nd(t,e))}function nd(t,e){let n=eo(t),r=eo(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 rd(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 td(t){return t.exception&&t.exception.values&&t.exception.values[0]}var tt=ge,Ma=0;function Pa(){return Ma>0}function tg(){Ma++,setTimeout(()=>{Ma--})}function ir(t,e={},n){if(typeof t!="function")return t;try{let i=t.__sentry_wrapped__;if(i)return i;if(Qn(t))return t}catch{return t}let r=function(){let i=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let o=i.map(s=>ir(s,e));return t.apply(this,o)}catch(o){throw tg(),mo(s=>{s.addEventProcessor(c=>(e.mechanism&&(Tr(c,void 0,void 0),Rn(c,e.mechanism)),c.extra=Ie(D({},c.extra),{arguments:i}),c)),yo(o)}),o}};try{for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}catch{}Zi(r,t),xt(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}var Pn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function So(t,e){let n=Fa(t,e),r={type:e&&e.name,value:sg(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function ng(t,e,n,r){let i=Ke(),o=i&&i.getOptions().normalizeDepth,s=lg(e),c={__serialized__:so(e,o)};if(s)return{exception:{values:[So(t,s)]},extra:c};let u={exception:{values:[{type:Jn(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:ag(e,{isUnhandledRejection:r})}]},extra:c};if(n){let d=Fa(t,n);d.length&&(u.exception.values[0].stacktrace={frames:d})}return u}function La(t,e){return{exception:{values:[So(t,e)]}}}function Fa(t,e){let n=e.stacktrace||e.stack||"",r=ig(e),i=og(e);try{return t(n,r,i)}catch{}return[]}var rg=/Minified React error #\d+;/i;function ig(t){return t&&rg.test(t.message)?1:0}function og(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function sg(t){let e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function ad(t,e,n,r){let i=n&&n.syntheticException||void 0,o=Io(t,e,i,r);return Rn(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),Xt(o)}function cd(t,e,n="info",r,i){let o=r&&r.syntheticException||void 0,s=ka(t,e,o,i);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),Xt(s)}function Io(t,e,n,r,i){let o;if(zi(e)&&e.error)return La(t,e.error);if(Ki(e)||Fs(e)){let s=e;if("stack"in e)o=La(t,e);else{let c=s.name||(Ki(s)?"DOMError":"DOMException"),u=s.message?`${c}: ${s.message}`:c;o=ka(t,u,n,r),Tr(o,u)}return"code"in s&&(o.tags=Ie(D({},o.tags),{"DOMException.code":`${s.code}`})),o}return qn(e)?La(t,e):sn(e)||Jn(e)?(o=ng(t,e,n,i),Rn(o,{synthetic:!0}),o):(o=ka(t,e,n,r),Tr(o,`${e}`,void 0),Rn(o,{synthetic:!0}),o)}function ka(t,e,n,r){let i={};if(r&&n){let o=Fa(t,n);o.length&&(i.exception={values:[{value:e,stacktrace:{frames:o}}]})}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 ag(t,{isUnhandledRejection:e}){let n=Ks(t),r=e?"promise rejection":"exception";return zi(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:Jn(t)?`Event \`${cg(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function cg(t){try{let e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function lg(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let n=t[e];if(n instanceof Error)return n}}function ld(t,{metadata:e,tunnel:n,dsn:r}){let i=D(D({event_id:t.event_id,sent_at:new Date().toISOString()},e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}}),!!n&&!!r&&{dsn:gn(r)}),o=ug(t);return vn(i,[o])}function ug(t){return[{type:"user_report"},t]}var _i=class extends gi{constructor(e){let n=D({parentSpanIsAlwaysRootSpan:!0},e),r=tt.SENTRY_SDK_SOURCE||ia();Ra(n,"browser",["browser"],r),super(n),n.sendClientReports&&tt.document&&tt.document.addEventListener("visibilitychange",()=>{tt.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,n){return ad(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return cd(this._options.stackParser,e,n,r,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){Pn&&se.warn("SDK not enabled, will not capture user feedback.");return}let n=ld(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(n)}_prepareEvent(e,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){Pn&&se.log("No outcomes to send");return}if(!this._dsn){Pn&&se.log("No dsn provided, will not send outcomes");return}Pn&&se.log("Sending outcomes:",e);let n=ha(e,this._options.tunnel&&gn(this._dsn));this.sendEnvelope(n)}};var ud=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var st=ge;var dg=1e3,dd,Va,Ba;function Ua(t){let e="dom";Tt(e,t),Ot(e,fg)}function fg(){if(!st.document)return;let t=ct.bind(null,"dom"),e=fd(t,!0);st.document.addEventListener("click",e,!1),st.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{let r=st[n]&&st[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(ze(r,"addEventListener",function(i){return function(o,s,c){if(o==="click"||o=="keypress")try{let u=this,d=u.__sentry_instrumentation_handlers__=u.__sentry_instrumentation_handlers__||{},g=d[o]=d[o]||{refCount:0};if(!g.handler){let p=fd(t);g.handler=p,i.call(this,o,p,c)}g.refCount++}catch{}return i.call(this,o,s,c)}}),ze(r,"removeEventListener",function(i){return function(o,s,c){if(o==="click"||o=="keypress")try{let u=this,d=u.__sentry_instrumentation_handlers__||{},g=d[o];g&&(g.refCount--,g.refCount<=0&&(i.call(this,o,g.handler,c),g.handler=void 0,delete d[o]),Object.keys(d).length===0&&delete u.__sentry_instrumentation_handlers__)}catch{}return i.call(this,o,s,c)}}))})}function pg(t){if(t.type!==Va)return!1;try{if(!t.target||t.target._sentryId!==Ba)return!1}catch{}return!0}function hg(t,e){return t!=="keypress"?!1:!e||!e.tagName?!0:!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)}function fd(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;let r=mg(n);if(hg(n.type,r))return;xt(n,"_sentryCaptured",!0),r&&!r._sentryId&&xt(r,"_sentryId",pt());let i=n.type==="keypress"?"input":n.type;pg(n)||(t({event:n,name:i,global:e}),Va=n.type,Ba=r?r._sentryId:void 0),clearTimeout(dd),dd=st.setTimeout(()=>{Ba=void 0,Va=void 0},dg)}}function mg(t){try{return t.target}catch{return null}}var xo;function Ha(t){let e="history";Tt(e,t),Ot(e,gg)}function gg(){if(!_a())return;let t=st.onpopstate;st.onpopstate=function(...n){let r=st.location.href,i=xo;if(xo=r,ct("history",{from:i,to:r}),t)try{return t.apply(this,n)}catch{}};function e(n){return function(...r){let i=r.length>2?r[2]:void 0;if(i){let o=xo,s=String(i);xo=s,ct("history",{from:o,to:s})}return n.apply(this,r)}}ze(st.history,"pushState",e),ze(st.history,"replaceState",e)}var To={};function ja(t){let e=To[t];if(e)return e;let n=st[t];if(ci(n))return To[t]=n.bind(st);let r=st.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&&o[t]&&(n=o[t]),r.head.removeChild(i)}catch(i){ud&&se.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,i)}return n&&(To[t]=n.bind(st))}function Oo(t){To[t]=void 0}var or="__sentry_xhr_v3__";function $a(t){let e="xhr";Tt(e,t),Ot(e,_g)}function _g(){if(!st.XMLHttpRequest)return;let t=XMLHttpRequest.prototype;ze(t,"open",function(e){return function(...n){let r=Ht()*1e3,i=It(n[0])?n[0].toUpperCase():void 0,o=yg(n[1]);if(!i||!o)return e.apply(this,n);this[or]={method:i,url:o,request_headers:{}},i==="POST"&&o.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let s=()=>{let c=this[or];if(c&&this.readyState===4){try{c.status_code=this.status}catch{}let u={endTimestamp:Ht()*1e3,startTimestamp:r,xhr:this};ct("xhr",u)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?ze(this,"onreadystatechange",function(c){return function(...u){return s(),c.apply(this,u)}}):this.addEventListener("readystatechange",s),ze(this,"setRequestHeader",function(c){return function(...u){let[d,g]=u,p=this[or];return p&&It(d)&&It(g)&&(p.request_headers[d.toLowerCase()]=g),c.apply(this,u)}}),e.apply(this,n)}}),ze(t,"send",function(e){return function(...n){let r=this[or];if(!r)return e.apply(this,n);n[0]!==void 0&&(r.body=n[0]);let i={startTimestamp:Ht()*1e3,xhr:this};return ct("xhr",i),e.apply(this,n)}})}function yg(t){if(It(t))return t;try{return t.toString()}catch{}}function Ga(t,e=ja("fetch")){let n=0,r=0;function i(o){let s=o.body.length;n+=s,r++;let c=D({body:o.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&r<15},t.fetchOptions);if(!e)return Oo("fetch"),Bn("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 Oo("fetch"),n-=s,r--,Bn(u)}}return vo(t,i)}var vg=30;var Eg=50;function Wa(t,e,n,r){let i={filename:t,function:e==="<anonymous>"?_n:e,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var bg=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,wg=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Cg=/\((\S*)(?::(\d+))(?::(\d+))\)/,Sg=t=>{let e=bg.exec(t);if(e){let[,r,i,o]=e;return Wa(r,_n,+i,+o)}let n=wg.exec(t);if(n){if(n[2]&&n[2].indexOf("eval")===0){let s=Cg.exec(n[2]);s&&(n[2]=s[1],n[3]=s[2],n[4]=s[3])}let[i,o]=gd(n[1]||_n,n[2]);return Wa(o,i,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},pd=[vg,Sg],Ig=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,xg=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Tg=t=>{let e=Ig.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let o=xg.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]||_n;return[i,r]=gd(i,r),Wa(r,i,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},hd=[Eg,Tg];var md=[pd,hd],Ya=qs(...md),gd=(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]:_n,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};var Do=1024,Dg="Breadcrumbs",Ag=(t={})=>{let e=D({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t);return{name:Dg,setup(n){e.console&&Zs(Mg(n)),e.dom&&Ua(Rg(n,e.dom)),e.xhr&&$a(Pg(n)),e.fetch&&ta(Lg(n)),e.history&&Ha(kg(n)),e.sentry&&n.on("beforeSendEvent",Ng(n))}}},_d=Ag;function Ng(t){return function(n){Ke()===t&&En({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:an(n)},{event:n})}}function Rg(t,e){return function(r){if(Ke()!==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>Do&&(Pn&&se.warn(`\`dom.maxStringLength\` cannot exceed ${Do}, but a value of ${c} was configured. Sentry will use ${Do} instead.`),c=Do),typeof s=="string"&&(s=[s]);try{let d=r.event,g=Fg(d)?d.target:d;i=si(g,{keyAttrs:s,maxStringLength:c}),o=Ws(g)}catch{i="<unknown>"}if(i.length===0)return;let u={category:`ui.${r.name}`,message:i};o&&(u.data={"ui.component_name":o}),En(u,{event:r.event,name:r.name,global:r.global})}}function Mg(t){return function(n){if(Ke()!==t)return;let r={category:"console",data:{arguments:n.args,logger:"console"},level:aa(n.level),message:Xi(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Xi(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;En(r,{input:n.args,level:n.level})}}function Pg(t){return function(n){if(Ke()!==t)return;let{startTimestamp:r,endTimestamp:i}=n,o=n.xhr[or];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};En({category:"xhr",data:g,type:"http"},p)}}function Lg(t){return function(n){if(Ke()!==t)return;let{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){let o=n.fetchData,s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i};En({category:"fetch",data:o,level:"error",type:"http"},s)}else{let o=n.response,s=Ie(D({},n.fetchData),{status_code:o&&o.status}),c={input:n.args,response:o,startTimestamp:r,endTimestamp:i};En({category:"fetch",data:s,type:"http"},c)}}}function kg(t){return function(n){if(Ke()!==t)return;let r=n.from,i=n.to,o=ui(tt.location.href),s=r?ui(r):void 0,c=ui(i);(!s||!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),En({category:"navigation",data:{from:r,to:i}})}}function Fg(t){return!!t&&!!t.target}var Vg=["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"],Bg="BrowserApiErrors",Ug=(t={})=>{let e=D({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t);return{name:Bg,setupOnce(){e.setTimeout&&ze(tt,"setTimeout",yd),e.setInterval&&ze(tt,"setInterval",yd),e.requestAnimationFrame&&ze(tt,"requestAnimationFrame",Hg),e.XMLHttpRequest&&"XMLHttpRequest"in tt&&ze(XMLHttpRequest.prototype,"send",jg);let n=e.eventTarget;n&&(Array.isArray(n)?n:Vg).forEach($g)}}},vd=Ug;function yd(t){return function(...e){let n=e[0];return e[0]=ir(n,{mechanism:{data:{function:Kt(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function Hg(t){return function(e){return t.apply(this,[ir(e,{mechanism:{data:{function:"requestAnimationFrame",handler:Kt(t)},handled:!1,type:"instrument"}})])}}function jg(t){return function(...e){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&ze(n,i,function(o){let s={mechanism:{data:{function:i,handler:Kt(o)},handled:!1,type:"instrument"}},c=Qn(o);return c&&(s.mechanism.data.handler=Kt(c)),ir(o,s)})}),t.apply(this,e)}}function $g(t){let e=tt,n=e[t]&&e[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(ze(n,"addEventListener",function(r){return function(i,o,s){try{typeof o.handleEvent=="function"&&(o.handleEvent=ir(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Kt(o),target:t},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[i,ir(o,{mechanism:{data:{function:"addEventListener",handler:Kt(o),target:t},handled:!1,type:"instrument"}}),s])}}),ze(n,"removeEventListener",function(r){return function(i,o,s){let c=o;try{let u=c&&c.__sentry_wrapped__;u&&r.call(this,i,u,s)}catch{}return r.call(this,i,c,s)}}))}var Gg="GlobalHandlers",Wg=(t={})=>{let e=D({onerror:!0,onunhandledrejection:!0},t);return{name:Gg,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(Yg(n),Ed("onerror")),e.onunhandledrejection&&(zg(n),Ed("onunhandledrejection"))}}},bd=Wg;function Yg(t){na(e=>{let{stackParser:n,attachStacktrace:r}=wd();if(Ke()!==t||Pa())return;let{msg:i,url:o,line:s,column:c,error:u}=e,d=qg(Io(n,u||i,void 0,r,!1),o,s,c);d.level="error",mi(d,{originalException:u,mechanism:{handled:!1,type:"onerror"}})})}function zg(t){ra(e=>{let{stackParser:n,attachStacktrace:r}=wd();if(Ke()!==t||Pa())return;let i=Kg(e),o=Zn(i)?Xg(i):Io(n,i,void 0,r,!0);o.level="error",mi(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function Kg(t){if(Zn(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 Xg(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function qg(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=isNaN(parseInt(r,10))?void 0:r,g=isNaN(parseInt(n,10))?void 0:n,p=It(e)&&e.length>0?e:Gs();return u.length===0&&u.push({colno:d,filename:p,function:_n,in_app:!0,lineno:g}),t}function Ed(t){Pn&&se.log(`Global Handler attached: ${t}`)}function wd(){let t=Ke();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var Cd=()=>({name:"HttpContext",preprocessEvent(t){if(!tt.navigator&&!tt.location&&!tt.document)return;let e=t.request&&t.request.url||tt.location&&tt.location.href,{referrer:n}=tt.document||{},{userAgent:r}=tt.navigator||{},i=D(D(D({},t.request&&t.request.headers),n&&{Referer:n}),r&&{"User-Agent":r}),o=Ie(D(D({},t.request),e&&{url:e}),{headers:i});t.request=o}});var Zg="cause",Jg=5,Qg="LinkedErrors",e_=(t={})=>{let e=t.limit||Jg,n=t.key||Zg;return{name:Qg,preprocessEvent(r,i,o){let s=o.getOptions();js(So,s.stackParser,s.maxValueLength,n,e,r,i)}}},Sd=e_;function za(t){return[wo(),Eo(),vd(),_d(),bd(),Sd(),Co(),Cd()]}var Ao=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){gt.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]=D({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 vt;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",Id()),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=za({}).filter(n=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(n.name));this.client=new _i({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:Ga,stackParser:Ya,integrations:e,environment:An.mode,release:`web-sdk@${Ye.SDK_VERSION}`,debug:An.debug}),this.client.init()}};var Dr=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 Xa=Ri(Td());function No(t){return Xa.default.createInstance({name:"lc",storeName:t,driver:Xa.default.LOCALSTORAGE})}var Ar=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 qa=class extends Ar{static storeName="ses";static{this.storage=No(this.storeName)}};var Nr=class extends Ar{static storeName="usr";static{this.storage=No(this.storeName)}};var Ro=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 Mo=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 sr(t,e){if(t==0&&e)return"Free";let n=Mo.get(),r=Er.get(),i=n.shopCurrencyCode||r.currency,o=n.currencyCode;o||gt.warn("Currency code is not set in RuntimeData");let s=r.money?.format??n.moneyFormat,c;if(s&&i===o)c=Ro.format(t*100,s);else{let u;try{u=new Intl.NumberFormat(t_(),{style:"currency",currency:o||i,minimumFractionDigits:0,maximumFractionDigits:2})}catch(d){return Ao.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 t_(){return navigator.languages!==void 0?navigator.languages[0].split("-")[0]:navigator.language??"en"}var Po;function Id(){if(Po)return Po;try{return Po=Intl.DateTimeFormat().resolvedOptions().timeZone,Po}catch{return""}}var bn=class t{transform(e){return e==null?null:sr(e)}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=Fi({name:"cooeeCurrency",type:t,pure:!0})};var Od=(()=>{class t{static entityMap={'"':"""};static escapeHtml(n){return String(n).replace(/"/g,r=>t.entityMap[r])}}return t})();var n_=Object.prototype.toString,Mr=Array.isArray||function(e){return n_.call(e)==="[object Array]"};function Ja(t){return typeof t=="function"}function r_(t){return Mr(t)?"array":typeof t}function Za(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Dd(t,e){return t!=null&&typeof t=="object"&&e in t}function i_(t,e){return t!=null&&typeof t!="object"&&t.hasOwnProperty&&t.hasOwnProperty(e)}var o_=RegExp.prototype.test;function s_(t,e){return o_.call(t,e)}var a_=/\S/;function c_(t){return!s_(a_,t)}var l_={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function u_(t){return String(t).replace(/[&<>"'`=\/]/g,function(n){return l_[n]})}var d_=/\s*/,f_=/\s+/,Ad=/\s*=/,p_=/\s*\}/,h_=/#|\^|\/|>|\{|&|=|!/;function m_(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,C;function O(te){if(typeof te=="string"&&(te=te.split(f_,2)),!Mr(te)||te.length!==2)throw new Error("Invalid tags: "+te);p=new RegExp(Za(te[0])+"\\s*"),E=new RegExp("\\s*"+Za(te[1])),C=new RegExp("\\s*"+Za("}"+te[1]))}O(e||qt.tags);for(var M=new vi(t),L,H,Y,oe,z,ye;!M.eos();){if(L=M.pos,Y=M.scanUntil(p),Y)for(var B=0,fe=Y.length;B<fe;++B)oe=Y.charAt(B),c_(oe)?(o.push(i.length),u+=oe):(c=!0,n=!0,u+=" "),i.push(["text",oe,L,L+1]),L+=1,oe===`
|
|
27
|
-
`&&(g(),u="",d=0,n=!1);if(!M.scan(p))break;if(s=!0,
|
|
17
|
+
`),typeof c=="string"||c instanceof Uint8Array)i(c);else{let u;try{u=JSON.stringify(c)}catch{u=JSON.stringify(un(c))}i(u)}}return typeof r=="string"?r:$h(r)}function $h(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 ga(t){let e=typeof t.data=="string"?pa(t.data):t.data;return[ct({type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),e]}var Gh={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",statsd:"metric_bucket"};function fo(t){return Gh[t]}function po(t){if(!t||!t.sdk)return;let{name:e,version:n}=t.sdk;return{name:e,version:n}}function _a(t,e,n,r){let i=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return D(D(D({event_id:t.event_id,sent_at:new Date().toISOString()},e&&{sdk:e}),!!n&&r&&{dsn:vn(r)}),i&&{trace:ct(D({},i))})}function va(t,e,n){let r=[{type:"client_report"},{timestamp:n||En(),discarded_events:t}];return bn(e?{dsn:e}:{},[r])}function Ou(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 Du(t,e){return t[e]||t.all||0}function ya(t,e,n=Date.now()){return Du(t,e)>n}function Ea(t,{statusCode:e,headers:n},r=Date.now()){let i=D({},t),o=n&&n["x-sentry-rate-limits"],s=n&&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 C of d.split(";"))C==="metric_bucket"?(!g||g.split(";").includes("custom"))&&(i[C]=r+E):i[C]=r+E}else s?i.all=r+Ou(s,r):e===429&&(i.all=r+60*1e3);return i}function ho(){return{traceId:ht(),spanId:ht().substring(16)}}var mo=ge;function ba(){let t=mo.chrome,e=t&&t.app&&t.app.runtime,n="history"in mo&&!!mo.history.pushState&&!!mo.history.replaceState;return!e&&n}var He=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function er(){return fi(ge),ge}function fi(t){let e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||Xt,e[Xt]=e[Xt]||{}}function pi(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||Ht(),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:ht()),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)}var wa="_sentrySpan";function Ca(t,e){e?Dt(t,wa,e):delete t[wa]}function Sa(t){return t[wa]}var zh=100,xa=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=ho()}clone(){let e=new t;return e._breadcrumbs=[...this._breadcrumbs],e._tags=D({},this._tags),e._extra=D({},this._extra),e._contexts=D({},this._contexts),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._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata=D({},this._sdkProcessingMetadata),e._propagationContext=D({},this._propagationContext),e._client=this._client,e._lastEventId=this._lastEventId,Ca(e,Sa(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&&pi(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags=D(D({},this._tags),e),this._notifyScopeListeners(),this}setTag(e,n){return this._tags=Te(D({},this._tags),{[e]:n}),this._notifyScopeListeners(),this}setExtras(e){return this._extra=D(D({},this._extra),e),this._notifyScopeListeners(),this}setExtra(e,n){return this._extra=Te(D({},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,i]=n instanceof bt?[n.getScopeData(),n.getRequestSession()]:cn(n)?[e,e.requestSession]:[],{tags:o,extra:s,user:c,contexts:u,level:d,fingerprint:g=[],propagationContext:p}=r||{};return this._tags=D(D({},this._tags),o),this._extra=D(D({},this._extra),s),this._contexts=D(D({},this._contexts),u),c&&Object.keys(c).length&&(this._user=c),d&&(this._level=d),g.length&&(this._fingerprint=g),p&&(this._propagationContext=p),i&&(this._requestSession=i),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._requestSession=void 0,this._session=void 0,Ca(this,void 0),this._attachments=[],this._propagationContext=ho(),this._notifyScopeListeners(),this}addBreadcrumb(e,n){let r=typeof n=="number"?n:zh;if(r<=0)return this;let i=D({timestamp:En()},e),o=this._breadcrumbs;return o.push(i),this._breadcrumbs=o.length>r?o.slice(-r):o,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:Sa(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=D(D({},this._sdkProcessingMetadata),e),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){let r=n&&n.event_id?n.event_id:ht();if(!this._client)return se.warn("No client configured on scope - will not capture exception!"),r;let i=new Error("Sentry syntheticException");return this._client.captureException(e,Te(D({originalException:e,syntheticException:i},n),{event_id:r}),this),r}captureMessage(e,n,r){let i=r&&r.event_id?r.event_id:ht();if(!this._client)return se.warn("No client configured on scope - will not capture message!"),i;let o=new Error(e);return this._client.captureMessage(e,n,Te(D({originalException:e,syntheticException:o},r),{event_id:i}),this),i}captureEvent(e,n){let r=n&&n.event_id?n.event_id:ht();return this._client?(this._client.captureEvent(e,Te(D({},n),{event_id:r}),this),r):(se.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)}},bt=xa;function Au(){return Sr("defaultCurrentScope",()=>new bt)}function Nu(){return Sr("defaultIsolationScope",()=>new bt)}var Ia=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 Rn(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 Or(){let t=er(),e=fi(t);return e.stack=e.stack||new Ia(Au(),Nu())}function Kh(t){return Or().withScope(t)}function Xh(t,e){let n=Or();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function Ru(t){return Or().withScope(()=>t(Or().getIsolationScope()))}function Mu(){return{withIsolationScope:Ru,withScope:Kh,withSetScope:Xh,withSetIsolationScope:(t,e)=>Ru(e),getCurrentScope:()=>Or().getScope(),getIsolationScope:()=>Or().getIsolationScope()}}function go(t){let e=fi(t);return e.acs?e.acs:Mu()}function tr(){let t=er();return go(t).getCurrentScope()}function nr(){let t=er();return go(t).getIsolationScope()}function _o(){return Sr("globalScope",()=>new bt)}function vo(...t){let e=er(),n=go(e);if(t.length===2){let[r,i]=t;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(t[0])}function Xe(){return tr().getClient()}var qh="_sentryMetrics";function Pu(t){let e=t[qh];if(!e)return;let n={};for(let[,[r,i]]of e)(n[r]||(n[r]=[])).push(ct(i));return n}var Ta="sentry.source",Oa="sentry.sample_rate",Da="sentry.op",Aa="sentry.origin";var Zh=1;function Fu(t){let{spanId:e,traceId:n}=t.spanContext(),{parent_span_id:r}=rr(t);return ct({parent_span_id:r,span_id:e,trace_id:n})}function ku(t){return typeof t=="number"?Lu(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Lu(t.getTime()):Ht()}function Lu(t){return t>9999999999?t/1e3:t}function rr(t){if(Qh(t))return t.getSpanJSON();try{let{spanId:e,traceId:n}=t.spanContext();if(Jh(t)){let{attributes:r,startTime:i,name:o,endTime:s,parentSpanId:c,status:u}=t;return ct({span_id:e,trace_id:n,data:r,description:o,parent_span_id:c,start_timestamp:ku(i),timestamp:ku(s)||void 0,status:em(u),op:r[Da],origin:r[Aa],_metrics_summary:Pu(t)})}return{span_id:e,trace_id:n}}catch{return{}}}function Jh(t){let e=t;return!!e.attributes&&!!e.startTime&&!!e.name&&!!e.endTime&&!!e.status}function Qh(t){return typeof t.getSpanJSON=="function"}function Vu(t){let{traceFlags:e}=t.spanContext();return e===Zh}function em(t){if(!(!t||t.code===0))return t.code===1?"ok":t.message||"unknown_error"}var tm="_sentryRootSpan";function hi(t){return t[tm]||t}var yo="production";var nm="_frozenDsc";function Na(t,e){let n=e.getOptions(),{publicKey:r}=e.getDsn()||{},i=ct({environment:n.environment||yo,release:n.release,public_key:r,trace_id:t});return e.emit("createDsc",i),i}function Bu(t){let e=Xe();if(!e)return{};let n=Na(rr(t).trace_id||"",e),r=hi(t),i=r[nm];if(i)return i;let o=r.spanContext().traceState,s=o&&o.get("sentry.dsc"),c=s&&fa(s);if(c)return c;let u=rr(r),d=u.data||{},g=d[Oa];g!=null&&(n.sample_rate=`${g}`);let p=d[Ta],E=u.description;return p!=="url"&&E&&(n.transaction=E),n.sampled=String(Vu(r)),e.emit("createDsc",n,r),n}function Uu(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){He&&se.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`);return}return e}function rm(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 Hu(t,e,n,r){let i=po(n),o=D(D({sent_at:new Date().toISOString()},i&&{sdk:i}),!!r&&e&&{dsn:vn(e)}),s="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return bn(o,[s])}function ju(t,e,n,r){let i=po(n),o=t.type&&t.type!=="replay_event"?t.type:"event";rm(t,n&&n.sdk);let s=_a(t,i,r,e);return delete t.sdkProcessingMetadata,bn(s,[[{type:o},t]])}function Eo(t,e,n,r=0){return new dn((i,o)=>{let s=t[r];if(e===null||typeof s!="function")i(e);else{let c=s(D({},e),n);He&&s.id&&c===null&&se.log(`Event processor "${s.id}" dropped event`),Rn(c)?c.then(u=>Eo(t,u,n,r+1).then(i)).then(null,o):Eo(t,c,n,r+1).then(i).then(null,o)}})}function $u(t,e){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=e;im(t,e),r&&am(t,r),cm(t,n),om(t,i),sm(t,o)}function Ra(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:C,span:O}=e;mi(t,"extra",n),mi(t,"tags",r),mi(t,"user",i),mi(t,"contexts",o),mi(t,"sdkProcessingMetadata",c),s&&(t.level=s),C&&(t.transactionName=C),O&&(t.span=O),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=D(D({},t.propagationContext),E)}function mi(t,e,n){if(n&&Object.keys(n).length){t[e]=D({},t[e]);for(let r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[e][r]=n[r])}}function im(t,e){let{extra:n,tags:r,user:i,contexts:o,level:s,transactionName:c}=e,u=ct(n);u&&Object.keys(u).length&&(t.extra=D(D({},u),t.extra));let d=ct(r);d&&Object.keys(d).length&&(t.tags=D(D({},d),t.tags));let g=ct(i);g&&Object.keys(g).length&&(t.user=D(D({},g),t.user));let p=ct(o);p&&Object.keys(p).length&&(t.contexts=D(D({},p),t.contexts)),s&&(t.level=s),c&&t.type!=="transaction"&&(t.transaction=c)}function om(t,e){let n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}function sm(t,e){t.sdkProcessingMetadata=D(D({},t.sdkProcessingMetadata),e)}function am(t,e){t.contexts=D({trace:Fu(e)},t.contexts),t.sdkProcessingMetadata=D({dynamicSamplingContext:Bu(e)},t.sdkProcessingMetadata);let n=hi(e),r=rr(n).description;r&&!t.transaction&&t.type==="transaction"&&(t.transaction=r)}function cm(t,e){t.fingerprint=t.fingerprint?co(t.fingerprint):[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}function Wu(t,e,n,r,i,o){let{normalizeDepth:s=3,normalizeMaxBreadth:c=1e3}=t,u=Te(D({},e),{event_id:e.event_id||n.event_id||ht(),timestamp:e.timestamp||En()}),d=n.integrations||t.integrations.map(k=>k.name);lm(u,t),fm(u,d),i&&i.emit("applyFrameMetadata",e),e.type===void 0&&um(u,t.stackParser);let g=hm(r,n.captureContext);n.mechanism&&Mn(u,n.mechanism);let p=i?i.getEventProcessors():[],E=_o().getScopeData();if(o){let k=o.getScopeData();Ra(E,k)}if(g){let k=g.getScopeData();Ra(E,k)}let C=[...n.attachments||[],...E.attachments];C.length&&(n.attachments=C),$u(u,E);let O=[...p,...E.eventProcessors];return Eo(O,u,n).then(k=>(k&&dm(k),typeof s=="number"&&s>0?pm(k,s,c):k))}function lm(t,e){let{environment:n,release:r,dist:i,maxValueLength:o=250}=e;"environment"in t||(t.environment="environment"in e?n:yo),t.release===void 0&&r!==void 0&&(t.release=r),t.dist===void 0&&i!==void 0&&(t.dist=i),t.message&&(t.message=gn(t.message,o));let s=t.exception&&t.exception.values&&t.exception.values[0];s&&s.value&&(s.value=gn(s.value,o));let c=t.request;c&&c.url&&(c.url=gn(c.url,o))}var Gu=new WeakMap;function um(t,e){let n=ge._sentryDebugIds;if(!n)return;let r,i=Gu.get(e);i?r=i:(r=new Map,Gu.set(e,r));let o=Object.entries(n).reduce((s,[c,u])=>{let d,g=r.get(c);g?d=g:(d=e(c),r.set(c,d));for(let p=d.length-1;p>=0;p--){let E=d[p];if(E.filename){s[E.filename]=u;break}}return s},{});try{t.exception.values.forEach(s=>{s.stacktrace.frames.forEach(c=>{c.filename&&(c.debug_id=o[c.filename])})})}catch{}}function dm(t){let e={};try{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)})})}catch{}if(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 fm(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function pm(t,e,n){if(!t)return null;let r=D(D(D(D(D({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(i=>D(D({},i),i.data&&{data:un(i.data,e,n)}))}),t.user&&{user:un(t.user,e,n)}),t.contexts&&{contexts:un(t.contexts,e,n)}),t.extra&&{extra:un(t.extra,e,n)});return t.contexts&&t.contexts.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=un(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map(i=>D(D({},i),i.data&&{data:un(i.data,e,n)}))),r}function hm(t,e){if(!e)return t;let n=t?t.clone():new bt;return n.update(e),n}function Yu(t){if(t)return mm(t)?{captureContext:t}:_m(t)?{captureContext:t}:t}function mm(t){return t instanceof bt||typeof t=="function"}var gm=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function _m(t){return Object.keys(t).some(e=>gm.includes(e))}function bo(t,e){return tr().captureException(t,Yu(e))}function gi(t,e){return tr().captureEvent(t,e)}var vm="7";function ym(t){let e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function Em(t){return`${ym(t)}${t.projectId}/envelope/`}function bm(t,e){return Zs(D({sentry_key:t.publicKey,sentry_version:vm},e&&{sentry_client:`${e.name}/${e.version}`}))}function Ku(t,e,n){return e||`${Em(t)}?${bm(t,n)}`}var Xu=[];function qu(t,e){let n={};return e.forEach(r=>{r&&Pa(t,r,n)}),n}function Ma(t,e){for(let n of e)n&&n.afterAllSetup&&n.afterAllSetup(t)}function Pa(t,e,n){if(n[e.name]){He&&se.log(`Integration skipped because it was already installed: ${e.name}`);return}if(n[e.name]=e,Xu.indexOf(e.name)===-1&&typeof e.setupOnce=="function"&&(e.setupOnce(),Xu.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)}He&&se.log(`Integration installed: ${e.name}`)}var Zu="Not capturing exception because it's already been captured.",_i=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Qi(e.dsn):He&&se.warn("No DSN provided, client will not send events."),this._dsn){let n=Ku(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport(Te(D({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},e.transportOptions),{url:n}))}}captureException(e,n,r){let i=ht();if(ao(e))return He&&se.log(Zu),i;let o=D({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=D({event_id:ht()},r),s=wr(e)?e:String(e),c=Zn(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=ht();if(n&&n.originalException&&ao(n.originalException))return He&&se.log(Zu),i;let o=D({event_id:i},n),c=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,o,c||r)),o.event_id}captureSession(e){typeof e.release!="string"?He&&se.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),pi(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))):Zt(!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._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let n=this._integrations[e.name];Pa(this,e,this._integrations),n||Ma(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=ha(r,ga(o));let i=this.sendEnvelope(r);i&&i.then(o=>this.emit("afterSendEvent",e,o),null)}sendSession(e){let n=Hu(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(n)}recordDroppedEvent(e,n,r){if(this._options.sendClientReports){let i=`${e}:${n}`;He&&se.log(`Adding outcome: "${i}"`),this._outcomes[i]=(this._outcomes[i]||0)+1}}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=>(He&&se.error("Error while sending event:",n),n)):(He&&se.error("Transport disabled"),Zt({}))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=qu(this,e),Ma(this,e)}_updateSessionFromEvent(e,n){let r=!1,i=!1,o=n.exception&&n.exception.values;if(o){i=!0;for(let u of o){let d=u.mechanism;if(d&&d.handled===!1){r=!0;break}}}let s=e.status==="ok";(s&&e.errors===0||s&&r)&&(pi(e,Te(D({},r&&{status:"crashed"}),{errors:e.errors||Number(i||r)})),this.captureSession(e))}_isClientDoneProcessing(e){return new dn(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=nr()){let o=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s.length>0&&(n.integrations=s),this.emit("preprocessEvent",e,n),e.type||i.setLastEventId(e.event_id||n.event_id),Wu(o,e,n,r,this,i).then(c=>{if(c===null)return c;let u=D(D({},i.getPropagationContext()),r?r.getPropagationContext():void 0);if(!(c.contexts&&c.contexts.trace)&&u){let{traceId:g,spanId:p,parentSpanId:E,dsc:C}=u;c.contexts=D({trace:ct({trace_id:g,span_id:p,parent_span_id:E})},c.contexts);let O=C||Na(g,this);c.sdkProcessingMetadata=D({dynamicSamplingContext:O},c.sdkProcessingMetadata)}return c})}_captureEvent(e,n={},r){return this._processEvent(e,n,r).then(i=>i.event_id,i=>{if(He){let o=i;o.logLevel==="log"?se.log(o.message):se.warn(o)}})}_processEvent(e,n,r){let i=this.getOptions(),{sampleRate:o}=i,s=ka(e),c=Ju(e),u=e.type||"error",d=`before send for type \`${u}\``,g=typeof o>"u"?void 0:Uu(o);if(c&&typeof g=="number"&&Math.random()>g)return this.recordDroppedEvent("sample_rate","error",e),Un(new Et(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));let p=u==="replay_event"?"replay":u,C=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,n,r,C).then(O=>{if(O===null)throw this.recordDroppedEvent("event_processor",p,e),new Et("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return O;let k=Cm(this,i,O,n);return wm(k,d)}).then(O=>{if(O===null){if(this.recordDroppedEvent("before_send",p,e),ka(e)){let K=1+(e.spans||[]).length;this._outcomes.span=(this._outcomes.span||0)+K}throw new Et(`${d} returned \`null\`, will not send event.`,"log")}let M=r&&r.getSession();!s&&M&&this._updateSessionFromEvent(M,O);let k=O.transaction_info;if(s&&k&&O.transaction!==e.transaction){let j="custom";O.transaction_info=Te(D({},k),{source:j})}return this.sendEvent(O,n),O}).then(null,O=>{throw O instanceof Et?O:(this.captureException(O,{data:{__sentry__:!0},originalException:O}),new Et(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
18
|
+
Reason: ${O}`))})}_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}})}};function wm(t,e){let n=`${e} must return \`null\` or a valid event.`;if(Rn(t))return t.then(r=>{if(!cn(r)&&r!==null)throw new Et(n);return r},r=>{throw new Et(`${e} rejected with ${r}`)});if(!cn(t)&&t!==null)throw new Et(n);return t}function Cm(t,e,n,r){let{beforeSend:i,beforeSendTransaction:o,beforeSendSpan:s}=e;if(Ju(n)&&i)return i(n,r);if(ka(n)){if(n.spans&&s){let c=[];for(let u of n.spans){let d=s(u);d?c.push(d):t.recordDroppedEvent("before_send","span")}n.spans=c}if(o)return o(n,r)}return n}function Ju(t){return t.type===void 0}function ka(t){return t.type==="transaction"}var Sm=64;function wo(t,e,n=ua(t.bufferSize||Sm)){let r={},i=s=>n.drain(s);function o(s){let c=[];if(uo(s,(p,E)=>{let C=fo(E);if(ya(r,C)){let O=Qu(p,E);t.recordDroppedEvent("ratelimit_backoff",C,O)}else c.push(p)}),c.length===0)return Zt({});let u=bn(s[0],c),d=p=>{uo(u,(E,C)=>{let O=Qu(E,C);t.recordDroppedEvent(p,fo(C),O)})},g=()=>e({body:ma(u)}).then(p=>(p.statusCode!==void 0&&(p.statusCode<200||p.statusCode>=300)&&He&&se.warn(`Sentry responded with status code ${p.statusCode} to sent event.`),r=Ea(r,p),p),p=>{throw d("network_error"),p});return n.add(g).then(p=>p,p=>{if(p instanceof Et)return He&&se.error("Skipped sending event because buffer is full."),d("queue_overflow"),Zt({});throw p})}return{send:o,flush:i}}function Qu(t,e){if(!(e!=="event"&&e!=="transaction"))return Array.isArray(t)?t[1]:void 0}function La(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:Xt})),version:Xt}),t._metadata=i}var xm=100;function wn(t,e){let n=Xe(),r=nr();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:o=xm}=n.getOptions();if(o<=0)return;let s=En(),c=D({timestamp:s},t),u=i?Ir(()=>i(c,e)):c;u!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",u,e),r.addBreadcrumb(u,o))}var ed,Im="FunctionToString",td=new WeakMap,Tm=()=>({name:Im,setupOnce(){ed=Function.prototype.toString;try{Function.prototype.toString=function(...t){let e=Qn(this),n=td.has(Xe())&&e!==void 0?e:this;return ed.apply(n,t)}}catch{}},setup(t){td.set(t,!0)}}),Co=Tm;var Om=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`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"],Dm="InboundFilters",Am=(t={})=>({name:Dm,processEvent(e,n,r){let i=r.getOptions(),o=Nm(t,i);return Rm(e,o)?null:e}}),xo=Am;function Nm(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:Om],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function Rm(t,e){return e.ignoreInternal&&Vm(t)?(He&&se.warn(`Event dropped due to being internal Sentry Error.
|
|
19
|
+
Event: ${ln(t)}`),!0):Mm(t,e.ignoreErrors)?(He&&se.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
20
|
+
Event: ${ln(t)}`),!0):Um(t)?(He&&se.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
21
|
+
Event: ${ln(t)}`),!0):Pm(t,e.ignoreTransactions)?(He&&se.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
22
|
+
Event: ${ln(t)}`),!0):km(t,e.denyUrls)?(He&&se.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
23
|
+
Event: ${ln(t)}.
|
|
24
|
+
Url: ${So(t)}`),!0):Lm(t,e.allowUrls)?!1:(He&&se.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
25
|
+
Event: ${ln(t)}.
|
|
26
|
+
Url: ${So(t)}`),!0)}function Mm(t,e){return t.type||!e||!e.length?!1:Fm(t).some(n=>Cr(n,e))}function Pm(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;let n=t.transaction;return n?Cr(n,e):!1}function km(t,e){if(!e||!e.length)return!1;let n=So(t);return n?Cr(n,e):!1}function Lm(t,e){if(!e||!e.length)return!0;let n=So(t);return n?Cr(n,e):!0}function Fm(t){let e=[];t.message&&e.push(t.message);let n;try{n=t.exception.values[t.exception.values.length-1]}catch{}return n&&n.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`)),e}function Vm(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function Bm(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 e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?Bm(e):null}catch{return He&&se.error(`Cannot extract url for event ${ln(t)}`),null}}function Um(t){return t.type||!t.exception||!t.exception.values||t.exception.values.length===0?!1:!t.message&&!t.exception.values.some(e=>e.stacktrace||e.type&&e.type!=="Error"||e.value)}var Hm="Dedupe",jm=()=>{let t;return{name:Hm,processEvent(e){if(e.type)return e;try{if($m(e,t))return He&&se.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}},Io=jm;function $m(t,e){return e?!!(Gm(t,e)||Wm(t,e)):!1}function Gm(t,e){let n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!id(t,e)||!rd(t,e))}function Wm(t,e){let n=nd(e),r=nd(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!id(t,e)||!rd(t,e))}function rd(t,e){let n=ro(t),r=ro(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 id(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&&t.exception.values&&t.exception.values[0]}var nt=ge,Fa=0;function Va(){return Fa>0}function ig(){Fa++,setTimeout(()=>{Fa--})}function ir(t,e={},n){if(typeof t!="function")return t;try{let i=t.__sentry_wrapped__;if(i)return i;if(Qn(t))return t}catch{return t}let r=function(){let i=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let o=i.map(s=>ir(s,e));return t.apply(this,o)}catch(o){throw ig(),vo(s=>{s.addEventProcessor(c=>(e.mechanism&&(Tr(c,void 0,void 0),Mn(c,e.mechanism)),c.extra=Te(D({},c.extra),{arguments:i}),c)),bo(o)}),o}};try{for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}catch{}eo(r,t),Dt(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}var kn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function To(t,e){let n=Ha(t,e),r={type:e&&e.name,value:lg(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function og(t,e,n,r){let i=Xe(),o=i&&i.getOptions().normalizeDepth,s=fg(e),c={__serialized__:lo(e,o)};if(s)return{exception:{values:[To(t,s)]},extra:c};let u={exception:{values:[{type:Jn(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:ug(e,{isUnhandledRejection:r})}]},extra:c};if(n){let d=Ha(t,n);d.length&&(u.exception.values[0].stacktrace={frames:d})}return u}function Ba(t,e){return{exception:{values:[To(t,e)]}}}function Ha(t,e){let n=e.stacktrace||e.stack||"",r=ag(e),i=cg(e);try{return t(n,r,i)}catch{}return[]}var sg=/Minified React error #\d+;/i;function ag(t){return t&&sg.test(t.message)?1:0}function cg(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function lg(t){let e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function cd(t,e,n,r){let i=n&&n.syntheticException||void 0,o=Oo(t,e,i,r);return Mn(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),Zt(o)}function ld(t,e,n="info",r,i){let o=r&&r.syntheticException||void 0,s=Ua(t,e,o,i);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),Zt(s)}function Oo(t,e,n,r,i){let o;if(qi(e)&&e.error)return Ba(t,e.error);if(Zi(e)||Hs(e)){let s=e;if("stack"in e)o=Ba(t,e);else{let c=s.name||(Zi(s)?"DOMError":"DOMException"),u=s.message?`${c}: ${s.message}`:c;o=Ua(t,u,n,r),Tr(o,u)}return"code"in s&&(o.tags=Te(D({},o.tags),{"DOMException.code":`${s.code}`})),o}return qn(e)?Ba(t,e):cn(e)||Jn(e)?(o=og(t,e,n,i),Mn(o,{synthetic:!0}),o):(o=Ua(t,e,n,r),Tr(o,`${e}`,void 0),Mn(o,{synthetic:!0}),o)}function Ua(t,e,n,r){let i={};if(r&&n){let o=Ha(t,n);o.length&&(i.exception={values:[{value:e,stacktrace:{frames:o}}]})}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 ug(t,{isUnhandledRejection:e}){let n=Js(t),r=e?"promise rejection":"exception";return qi(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:Jn(t)?`Event \`${dg(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function dg(t){try{let e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function fg(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let n=t[e];if(n instanceof Error)return n}}function ud(t,{metadata:e,tunnel:n,dsn:r}){let i=D(D({event_id:t.event_id,sent_at:new Date().toISOString()},e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}}),!!n&&!!r&&{dsn:vn(r)}),o=pg(t);return bn(i,[o])}function pg(t){return[{type:"user_report"},t]}var vi=class extends _i{constructor(e){let n=D({parentSpanIsAlwaysRootSpan:!0},e),r=nt.SENTRY_SDK_SOURCE||ca();La(n,"browser",["browser"],r),super(n),n.sendClientReports&&nt.document&&nt.document.addEventListener("visibilitychange",()=>{nt.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,n){return cd(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return ld(this._options.stackParser,e,n,r,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){kn&&se.warn("SDK not enabled, will not capture user feedback.");return}let n=ud(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(n)}_prepareEvent(e,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){kn&&se.log("No outcomes to send");return}if(!this._dsn){kn&&se.log("No dsn provided, will not send outcomes");return}kn&&se.log("Sending outcomes:",e);let n=va(e,this._options.tunnel&&vn(this._dsn));this.sendEnvelope(n)}};var dd=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var at=ge;var hg=1e3,fd,ja,$a;function Ga(t){let e="dom";At(e,t),Nt(e,mg)}function mg(){if(!at.document)return;let t=lt.bind(null,"dom"),e=pd(t,!0);at.document.addEventListener("click",e,!1),at.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{let r=at[n]&&at[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(Ke(r,"addEventListener",function(i){return function(o,s,c){if(o==="click"||o=="keypress")try{let u=this,d=u.__sentry_instrumentation_handlers__=u.__sentry_instrumentation_handlers__||{},g=d[o]=d[o]||{refCount:0};if(!g.handler){let p=pd(t);g.handler=p,i.call(this,o,p,c)}g.refCount++}catch{}return i.call(this,o,s,c)}}),Ke(r,"removeEventListener",function(i){return function(o,s,c){if(o==="click"||o=="keypress")try{let u=this,d=u.__sentry_instrumentation_handlers__||{},g=d[o];g&&(g.refCount--,g.refCount<=0&&(i.call(this,o,g.handler,c),g.handler=void 0,delete d[o]),Object.keys(d).length===0&&delete u.__sentry_instrumentation_handlers__)}catch{}return i.call(this,o,s,c)}}))})}function gg(t){if(t.type!==ja)return!1;try{if(!t.target||t.target._sentryId!==$a)return!1}catch{}return!0}function _g(t,e){return t!=="keypress"?!1:!e||!e.tagName?!0:!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)}function pd(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;let r=vg(n);if(_g(n.type,r))return;Dt(n,"_sentryCaptured",!0),r&&!r._sentryId&&Dt(r,"_sentryId",ht());let i=n.type==="keypress"?"input":n.type;gg(n)||(t({event:n,name:i,global:e}),ja=n.type,$a=r?r._sentryId:void 0),clearTimeout(fd),fd=at.setTimeout(()=>{$a=void 0,ja=void 0},hg)}}function vg(t){try{return t.target}catch{return null}}var Do;function Wa(t){let e="history";At(e,t),Nt(e,yg)}function yg(){if(!ba())return;let t=at.onpopstate;at.onpopstate=function(...n){let r=at.location.href,i=Do;if(Do=r,lt("history",{from:i,to:r}),t)try{return t.apply(this,n)}catch{}};function e(n){return function(...r){let i=r.length>2?r[2]:void 0;if(i){let o=Do,s=String(i);Do=s,lt("history",{from:o,to:s})}return n.apply(this,r)}}Ke(at.history,"pushState",e),Ke(at.history,"replaceState",e)}var Ao={};function Ya(t){let e=Ao[t];if(e)return e;let n=at[t];if(li(n))return Ao[t]=n.bind(at);let r=at.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&&o[t]&&(n=o[t]),r.head.removeChild(i)}catch(i){dd&&se.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,i)}return n&&(Ao[t]=n.bind(at))}function No(t){Ao[t]=void 0}var or="__sentry_xhr_v3__";function za(t){let e="xhr";At(e,t),Nt(e,Eg)}function Eg(){if(!at.XMLHttpRequest)return;let t=XMLHttpRequest.prototype;Ke(t,"open",function(e){return function(...n){let r=Ht()*1e3,i=Ot(n[0])?n[0].toUpperCase():void 0,o=bg(n[1]);if(!i||!o)return e.apply(this,n);this[or]={method:i,url:o,request_headers:{}},i==="POST"&&o.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let s=()=>{let c=this[or];if(c&&this.readyState===4){try{c.status_code=this.status}catch{}let u={endTimestamp:Ht()*1e3,startTimestamp:r,xhr:this};lt("xhr",u)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?Ke(this,"onreadystatechange",function(c){return function(...u){return s(),c.apply(this,u)}}):this.addEventListener("readystatechange",s),Ke(this,"setRequestHeader",function(c){return function(...u){let[d,g]=u,p=this[or];return p&&Ot(d)&&Ot(g)&&(p.request_headers[d.toLowerCase()]=g),c.apply(this,u)}}),e.apply(this,n)}}),Ke(t,"send",function(e){return function(...n){let r=this[or];if(!r)return e.apply(this,n);n[0]!==void 0&&(r.body=n[0]);let i={startTimestamp:Ht()*1e3,xhr:this};return lt("xhr",i),e.apply(this,n)}})}function bg(t){if(Ot(t))return t;try{return t.toString()}catch{}}function Ka(t,e=Ya("fetch")){let n=0,r=0;function i(o){let s=o.body.length;n+=s,r++;let c=D({body:o.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&r<15},t.fetchOptions);if(!e)return No("fetch"),Un("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 No("fetch"),n-=s,r--,Un(u)}}return wo(t,i)}var wg=30;var Cg=50;function Xa(t,e,n,r){let i={filename:t,function:e==="<anonymous>"?yn:e,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var Sg=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,xg=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ig=/\((\S*)(?::(\d+))(?::(\d+))\)/,Tg=t=>{let e=Sg.exec(t);if(e){let[,r,i,o]=e;return Xa(r,yn,+i,+o)}let n=xg.exec(t);if(n){if(n[2]&&n[2].indexOf("eval")===0){let s=Ig.exec(n[2]);s&&(n[2]=s[1],n[3]=s[2],n[4]=s[3])}let[i,o]=_d(n[1]||yn,n[2]);return Xa(o,i,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},hd=[wg,Tg],Og=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Dg=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ag=t=>{let e=Og.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let o=Dg.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]||yn;return[i,r]=_d(i,r),Xa(r,i,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},md=[Cg,Ag];var gd=[hd,md],qa=ea(...gd),_d=(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]:yn,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};var Ro=1024,Rg="Breadcrumbs",Mg=(t={})=>{let e=D({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t);return{name:Rg,setup(n){e.console&&ta(Lg(n)),e.dom&&Ga(kg(n,e.dom)),e.xhr&&za(Fg(n)),e.fetch&&oa(Vg(n)),e.history&&Wa(Bg(n)),e.sentry&&n.on("beforeSendEvent",Pg(n))}}},vd=Mg;function Pg(t){return function(n){Xe()===t&&wn({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:ln(n)},{event:n})}}function kg(t,e){return function(r){if(Xe()!==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>Ro&&(kn&&se.warn(`\`dom.maxStringLength\` cannot exceed ${Ro}, but a value of ${c} was configured. Sentry will use ${Ro} instead.`),c=Ro),typeof s=="string"&&(s=[s]);try{let d=r.event,g=Ug(d)?d.target:d;i=ai(g,{keyAttrs:s,maxStringLength:c}),o=Xs(g)}catch{i="<unknown>"}if(i.length===0)return;let u={category:`ui.${r.name}`,message:i};o&&(u.data={"ui.component_name":o}),wn(u,{event:r.event,name:r.name,global:r.global})}}function Lg(t){return function(n){if(Xe()!==t)return;let r={category:"console",data:{arguments:n.args,logger:"console"},level:da(n.level),message:Ji(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Ji(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;wn(r,{input:n.args,level:n.level})}}function Fg(t){return function(n){if(Xe()!==t)return;let{startTimestamp:r,endTimestamp:i}=n,o=n.xhr[or];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};wn({category:"xhr",data:g,type:"http"},p)}}function Vg(t){return function(n){if(Xe()!==t)return;let{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){let o=n.fetchData,s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i};wn({category:"fetch",data:o,level:"error",type:"http"},s)}else{let o=n.response,s=Te(D({},n.fetchData),{status_code:o&&o.status}),c={input:n.args,response:o,startTimestamp:r,endTimestamp:i};wn({category:"fetch",data:s,type:"http"},c)}}}function Bg(t){return function(n){if(Xe()!==t)return;let r=n.from,i=n.to,o=di(nt.location.href),s=r?di(r):void 0,c=di(i);(!s||!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),wn({category:"navigation",data:{from:r,to:i}})}}function Ug(t){return!!t&&!!t.target}var Hg=["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"],jg="BrowserApiErrors",$g=(t={})=>{let e=D({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t);return{name:jg,setupOnce(){e.setTimeout&&Ke(nt,"setTimeout",yd),e.setInterval&&Ke(nt,"setInterval",yd),e.requestAnimationFrame&&Ke(nt,"requestAnimationFrame",Gg),e.XMLHttpRequest&&"XMLHttpRequest"in nt&&Ke(XMLHttpRequest.prototype,"send",Wg);let n=e.eventTarget;n&&(Array.isArray(n)?n:Hg).forEach(Yg)}}},Ed=$g;function yd(t){return function(...e){let n=e[0];return e[0]=ir(n,{mechanism:{data:{function:qt(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function Gg(t){return function(e){return t.apply(this,[ir(e,{mechanism:{data:{function:"requestAnimationFrame",handler:qt(t)},handled:!1,type:"instrument"}})])}}function Wg(t){return function(...e){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&Ke(n,i,function(o){let s={mechanism:{data:{function:i,handler:qt(o)},handled:!1,type:"instrument"}},c=Qn(o);return c&&(s.mechanism.data.handler=qt(c)),ir(o,s)})}),t.apply(this,e)}}function Yg(t){let e=nt,n=e[t]&&e[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Ke(n,"addEventListener",function(r){return function(i,o,s){try{typeof o.handleEvent=="function"&&(o.handleEvent=ir(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:qt(o),target:t},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[i,ir(o,{mechanism:{data:{function:"addEventListener",handler:qt(o),target:t},handled:!1,type:"instrument"}}),s])}}),Ke(n,"removeEventListener",function(r){return function(i,o,s){let c=o;try{let u=c&&c.__sentry_wrapped__;u&&r.call(this,i,u,s)}catch{}return r.call(this,i,c,s)}}))}var zg="GlobalHandlers",Kg=(t={})=>{let e=D({onerror:!0,onunhandledrejection:!0},t);return{name:zg,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(Xg(n),bd("onerror")),e.onunhandledrejection&&(qg(n),bd("onunhandledrejection"))}}},wd=Kg;function Xg(t){sa(e=>{let{stackParser:n,attachStacktrace:r}=Cd();if(Xe()!==t||Va())return;let{msg:i,url:o,line:s,column:c,error:u}=e,d=Qg(Oo(n,u||i,void 0,r,!1),o,s,c);d.level="error",gi(d,{originalException:u,mechanism:{handled:!1,type:"onerror"}})})}function qg(t){aa(e=>{let{stackParser:n,attachStacktrace:r}=Cd();if(Xe()!==t||Va())return;let i=Zg(e),o=Zn(i)?Jg(i):Oo(n,i,void 0,r,!0);o.level="error",gi(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function Zg(t){if(Zn(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 Jg(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function Qg(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=isNaN(parseInt(r,10))?void 0:r,g=isNaN(parseInt(n,10))?void 0:n,p=Ot(e)&&e.length>0?e:Ks();return u.length===0&&u.push({colno:d,filename:p,function:yn,in_app:!0,lineno:g}),t}function bd(t){kn&&se.log(`Global Handler attached: ${t}`)}function Cd(){let t=Xe();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var Sd=()=>({name:"HttpContext",preprocessEvent(t){if(!nt.navigator&&!nt.location&&!nt.document)return;let e=t.request&&t.request.url||nt.location&&nt.location.href,{referrer:n}=nt.document||{},{userAgent:r}=nt.navigator||{},i=D(D(D({},t.request&&t.request.headers),n&&{Referer:n}),r&&{"User-Agent":r}),o=Te(D(D({},t.request),e&&{url:e}),{headers:i});t.request=o}});var e_="cause",t_=5,n_="LinkedErrors",r_=(t={})=>{let e=t.limit||t_,n=t.key||e_;return{name:n_,preprocessEvent(r,i,o){let s=o.getOptions();Ys(To,s.stackParser,s.maxValueLength,n,e,r,i)}}},xd=r_;function Za(t){return[xo(),Co(),Ed(),vd(),wd(),xd(),Io(),Sd()]}var Mo=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){_t.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]=D({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",Id()),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=Za({}).filter(n=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(n.name));this.client=new vi({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:Ka,stackParser:qa,integrations:e,environment:Nn.mode,release:`web-sdk@${ze.SDK_VERSION}`,debug:Nn.debug}),this.client.init()}};var Dr=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 Qa=Pi(Od());function Po(t){return Qa.default.createInstance({name:"lc",storeName:t,driver:Qa.default.LOCALSTORAGE})}var Ar=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 ec=class extends Ar{static storeName="ses";static{this.storage=Po(this.storeName)}};var Nr=class extends Ar{static storeName="usr";static{this.storage=Po(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 Lo=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 yr(e)}};function sr(t,e){if(t==0&&e)return"Free";let n=Lo.get(),r=Er.get(),i=n.shopCurrencyCode||r.currency,o=n.currencyCode;o||_t.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(i_(),{style:"currency",currency:o||i,minimumFractionDigits:0,maximumFractionDigits:2})}catch(d){return Mo.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 i_(){return navigator.languages!==void 0?navigator.languages[0].split("-")[0]:navigator.language??"en"}var Fo;function Id(){if(Fo)return Fo;try{return Fo=Intl.DateTimeFormat().resolvedOptions().timeZone,Fo}catch{return""}}var Cn=class t{transform(e){return e==null?null:sr(e)}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=Ui({name:"cooeeCurrency",type:t,pure:!0})};var Dd=(()=>{class t{static entityMap={'"':"""};static escapeHtml(n){return String(n).replace(/"/g,r=>t.entityMap[r])}}return t})();var o_=Object.prototype.toString,Mr=Array.isArray||function(e){return o_.call(e)==="[object Array]"};function nc(t){return typeof t=="function"}function s_(t){return Mr(t)?"array":typeof t}function tc(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Ad(t,e){return t!=null&&typeof t=="object"&&e in t}function a_(t,e){return t!=null&&typeof t!="object"&&t.hasOwnProperty&&t.hasOwnProperty(e)}var c_=RegExp.prototype.test;function l_(t,e){return c_.call(t,e)}var u_=/\S/;function d_(t){return!l_(u_,t)}var f_={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function p_(t){return String(t).replace(/[&<>"'`=\/]/g,function(n){return f_[n]})}var h_=/\s*/,m_=/\s+/,Nd=/\s*=/,g_=/\s*\}/,__=/#|\^|\/|>|\{|&|=|!/;function v_(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,C;function O(te){if(typeof te=="string"&&(te=te.split(m_,2)),!Mr(te)||te.length!==2)throw new Error("Invalid tags: "+te);p=new RegExp(tc(te[0])+"\\s*"),E=new RegExp("\\s*"+tc(te[1])),C=new RegExp("\\s*"+tc("}"+te[1]))}O(e||Jt.tags);for(var M=new Ei(t),k,j,K,oe,X,Ee;!M.eos();){if(k=M.pos,K=M.scanUntil(p),K)for(var B=0,fe=K.length;B<fe;++B)oe=K.charAt(B),d_(oe)?(o.push(i.length),u+=oe):(c=!0,n=!0,u+=" "),i.push(["text",oe,k,k+1]),k+=1,oe===`
|
|
27
|
+
`&&(g(),u="",d=0,n=!1);if(!M.scan(p))break;if(s=!0,j=M.scan(__)||"name",M.scan(h_),j==="="?(K=M.scanUntil(Nd),M.scan(Nd),M.scanUntil(E)):j==="{"?(K=M.scanUntil(C),M.scan(g_),M.scanUntil(E),j="&"):K=M.scanUntil(E),!M.scan(E))throw new Error("Unclosed tag at "+M.pos);if(j==">"?X=[j,K,k,M.pos,u,d,n]:X=[j,K,k,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 '+k);if(Ee[1]!==K)throw new Error('Unclosed section "'+Ee[1]+'" at '+k)}else j==="name"||j==="{"||j==="&"?c=!0:j==="="&&O(K)}if(g(),Ee=r.pop(),Ee)throw new Error('Unclosed section "'+Ee[1]+'" at '+M.pos);return E_(y_(i))}function y_(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 E_(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 Ei(t){this.string=t,this.tail=t,this.pos=0}Ei.prototype.eos=function(){return this.tail===""};Ei.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};Ei.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=Ad(o,s[c])||a_(o,s[c])),o=o[s[c++]];else o=i.view[e],u=Ad(i.view,e);if(u){r=o;break}i=i.parent}n[e]=r}return nc(r)&&(r=r.call(this.view)),r};function Rt(){this.templateCache={_cache:{},set:function(e,n){this._cache[e]=n},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}Rt.prototype.clearCache=function(){typeof this.templateCache<"u"&&this.templateCache.clear()};Rt.prototype.parse=function(e,n){var r=this.templateCache,i=e+":"+(n||Jt.tags).join(":"),o=typeof r<"u",s=o?r.get(i):void 0;return s==null&&(s=v_(e,n),o&&r.set(i,s)),s};Rt.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)};Rt.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};Rt.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(nc(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}};Rt.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)};Rt.prototype.indentPartial=function(e,n,r){for(var i=n.replace(/[^ \t]/g,""),o=e.split(`
|
|
28
28
|
`),s=0;s<o.length;s++)o[s].length&&(s>0||!r)&&(o[s]=i+o[s]);return o.join(`
|
|
29
|
-
`)};
|
|
30
|
-
`);try{y=new Worker(URL.createObjectURL(new Blob([ne])))}catch(ie){return typeof console!==void 0&&typeof console.warn=="function"&&console.warn("\u{1F38A} Could not load worker",ie),null}Z(y)}return y}}(),C={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 O(y,v){return v?v(y):y}function M(y){return y!=null}function L(y,v,U){return O(y&&M(y[v])?y[v]:C[v],U)}function H(y){return y<0?0:Math.floor(y)}function Y(y,v){return Math.floor(Math.random()*(v-y))+y}function oe(y){return parseInt(y,16)}function z(y){return y.map(ye)}function ye(y){var v=String(y).replace(/[^0-9a-f]/gi,"");return v.length<6&&(v=v[0]+v[0]+v[1]+v[1]+v[2]+v[2]),{r:oe(v.substring(0,2)),g:oe(v.substring(2,4)),b:oe(v.substring(4,6))}}function B(y){var v=L(y,"origin",Object);return v.x=L(v,"x",Number),v.y=L(v,"y",Number),v}function fe(y){y.width=document.documentElement.clientWidth,y.height=document.documentElement.clientHeight}function te(y){var v=y.getBoundingClientRect();y.width=v.width,y.height=v.height}function Ee(y){var v=document.createElement("canvas");return v.style.position="fixed",v.style.top="0px",v.style.left="0px",v.style.pointerEvents="none",v.style.zIndex=y,v}function Me(y,v,U,Z,ne,ie,ue,Q,ae){y.save(),y.translate(v,U),y.rotate(ie),y.scale(Z,ne),y.arc(0,0,1,ue,Q,ae),y.restore()}function xe(y){var v=y.angle*(Math.PI/180),U=y.spread*(Math.PI/180);return{x:y.x,y:y.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:y.startVelocity*.5+Math.random()*y.startVelocity,angle2D:-v+(.5*U-Math.random()*U),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,color:y.color,shape:y.shape,tick:0,totalTicks:y.ticks,decay:y.decay,drift:y.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:y.gravity*3,ovalScalar:.6,scalar:y.scalar,flat:y.flat}}function Oe(y,v){v.x+=Math.cos(v.angle2D)*v.velocity+v.drift,v.y+=Math.sin(v.angle2D)*v.velocity+v.gravity,v.velocity*=v.decay,v.flat?(v.wobble=0,v.wobbleX=v.x+10*v.scalar,v.wobbleY=v.y+10*v.scalar,v.tiltSin=0,v.tiltCos=0,v.random=1):(v.wobble+=v.wobbleSpeed,v.wobbleX=v.x+10*v.scalar*Math.cos(v.wobble),v.wobbleY=v.y+10*v.scalar*Math.sin(v.wobble),v.tiltAngle+=.1,v.tiltSin=Math.sin(v.tiltAngle),v.tiltCos=Math.cos(v.tiltAngle),v.random=Math.random()+2);var U=v.tick++/v.totalTicks,Z=v.x+v.random*v.tiltCos,ne=v.y+v.random*v.tiltSin,ie=v.wobbleX+v.random*v.tiltCos,ue=v.wobbleY+v.random*v.tiltSin;if(y.fillStyle="rgba("+v.color.r+", "+v.color.g+", "+v.color.b+", "+(1-U)+")",y.beginPath(),s&&v.shape.type==="path"&&typeof v.shape.path=="string"&&Array.isArray(v.shape.matrix))y.fill(T(v.shape.path,v.shape.matrix,v.x,v.y,Math.abs(ie-Z)*.1,Math.abs(ue-ne)*.1,Math.PI/10*v.wobble));else if(v.shape.type==="bitmap"){var Q=Math.PI/10*v.wobble,ae=Math.abs(ie-Z)*.1,ee=Math.abs(ue-ne)*.1,de=v.shape.bitmap.width*v.scalar,ce=v.shape.bitmap.height*v.scalar,pe=new DOMMatrix([Math.cos(Q)*ae,Math.sin(Q)*ae,-Math.sin(Q)*ee,Math.cos(Q)*ee,v.x,v.y]);pe.multiplySelf(new DOMMatrix(v.shape.matrix));var he=y.createPattern(g.transform(v.shape.bitmap),"no-repeat");he.setTransform(pe),y.globalAlpha=1-U,y.fillStyle=he,y.fillRect(v.x-de/2,v.y-ce/2,de,ce),y.globalAlpha=1}else if(v.shape==="circle")y.ellipse?y.ellipse(v.x,v.y,Math.abs(ie-Z)*v.ovalScalar,Math.abs(ue-ne)*v.ovalScalar,Math.PI/10*v.wobble,0,2*Math.PI):Me(y,v.x,v.y,Math.abs(ie-Z)*v.ovalScalar,Math.abs(ue-ne)*v.ovalScalar,Math.PI/10*v.wobble,0,2*Math.PI);else if(v.shape==="star")for(var me=Math.PI/2*3,h=4*v.scalar,a=8*v.scalar,l=v.x,_=v.y,I=5,N=Math.PI/I;I--;)l=v.x+Math.cos(me)*a,_=v.y+Math.sin(me)*a,y.lineTo(l,_),me+=N,l=v.x+Math.cos(me)*h,_=v.y+Math.sin(me)*h,y.lineTo(l,_),me+=N;else y.moveTo(Math.floor(v.x),Math.floor(v.y)),y.lineTo(Math.floor(v.wobbleX),Math.floor(ne)),y.lineTo(Math.floor(ie),Math.floor(ue)),y.lineTo(Math.floor(Z),Math.floor(v.wobbleY));return y.closePath(),y.fill(),v.tick<v.totalTicks}function Ge(y,v,U,Z,ne){var ie=v.slice(),ue=y.getContext("2d"),Q,ae,ee=d(function(de){function ce(){Q=ae=null,ue.clearRect(0,0,Z.width,Z.height),g.clear(),ne(),de()}function pe(){r&&!(Z.width===i.width&&Z.height===i.height)&&(Z.width=y.width=i.width,Z.height=y.height=i.height),!Z.width&&!Z.height&&(U(y),Z.width=y.width,Z.height=y.height),ue.clearRect(0,0,Z.width,Z.height),ie=ie.filter(function(he){return Oe(ue,he)}),ie.length?Q=p.frame(pe):ce()}Q=p.frame(pe),ae=ce});return{addFettis:function(de){return ie=ie.concat(de),ee},canvas:y,promise:ee,reset:function(){Q&&p.cancel(Q),ae&&ae()}}}function We(y,v){var U=!y,Z=!!L(v||{},"resize"),ne=!1,ie=L(v,"disableForReducedMotion",Boolean),ue=o&&!!L(v||{},"useWorker"),Q=ue?E():null,ae=U?fe:te,ee=y&&Q?!!y.__confetti_initialized:!1,de=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,ce;function pe(me,h,a){for(var l=L(me,"particleCount",H),_=L(me,"angle",Number),I=L(me,"spread",Number),N=L(me,"startVelocity",Number),F=L(me,"decay",Number),_e=L(me,"gravity",Number),we=L(me,"drift",Number),ve=L(me,"colors",z),Pe=L(me,"ticks",Number),Le=L(me,"shapes"),Xe=L(me,"scalar"),Lt=!!L(me,"flat"),$t=B(me),Sn=l,Et=[],kt=y.width*$t.x,Ai=y.height*$t.y;Sn--;)Et.push(xe({x:kt,y:Ai,angle:_,spread:I,startVelocity:N,color:ve[Sn%ve.length],shape:Le[Y(0,Le.length)],ticks:Pe,decay:F,gravity:_e,drift:we,scalar:Xe,flat:Lt}));return ce?ce.addFettis(Et):(ce=Ge(y,Et,ae,h,a),ce.promise)}function he(me){var h=ie||L(me,"disableForReducedMotion",Boolean),a=L(me,"zIndex",Number);if(h&&de)return d(function(N){N()});U&&ce?y=ce.canvas:U&&!y&&(y=Ee(a),document.body.appendChild(y)),Z&&!ee&&ae(y);var l={width:y.width,height:y.height};Q&&!ee&&Q.init(y),ee=!0,Q&&(y.__confetti_initialized=!0);function _(){if(Q){var N={getBoundingClientRect:function(){if(!U)return y.getBoundingClientRect()}};ae(N),Q.postMessage({resize:{width:N.width,height:N.height}});return}l.width=l.height=null}function I(){ce=null,Z&&(ne=!1,e.removeEventListener("resize",_)),U&&y&&(document.body.contains(y)&&document.body.removeChild(y),y=null,ee=!1)}return Z&&!ne&&(ne=!0,e.addEventListener("resize",_,!1)),Q?Q.fire(me,l,I):pe(me,l,I)}return he.reset=function(){Q&&Q.reset(),ce&&ce.reset()},he}var ut;function A(){return ut||(ut=We(null,{useWorker:!0,resize:!0})),ut}function T(y,v,U,Z,ne,ie,ue){var Q=new Path2D(y),ae=new Path2D;ae.addPath(Q,new DOMMatrix(v));var ee=new Path2D;return ee.addPath(ae,new DOMMatrix([Math.cos(ue)*ne,Math.sin(ue)*ne,-Math.sin(ue)*ie,Math.cos(ue)*ie,U,Z])),ee}function k(y){if(!s)throw new Error("path confetti are not supported in this browser");var v,U;typeof y=="string"?v=y:(v=y.path,U=y.matrix);var Z=new Path2D(v),ne=document.createElement("canvas"),ie=ne.getContext("2d");if(!U){for(var ue=1e3,Q=ue,ae=ue,ee=0,de=0,ce,pe,he=0;he<ue;he+=2)for(var me=0;me<ue;me+=2)ie.isPointInPath(Z,he,me,"nonzero")&&(Q=Math.min(Q,he),ae=Math.min(ae,me),ee=Math.max(ee,he),de=Math.max(de,me));ce=ee-Q,pe=de-ae;var h=10,a=Math.min(h/ce,h/pe);U=[a,0,0,a,-Math.round(ce/2+Q)*a,-Math.round(pe/2+ae)*a]}return{type:"path",path:v,matrix:U}}function P(y){var v,U=1,Z="#000000",ne='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';typeof y=="string"?v=y:(v=y.text,U="scalar"in y?y.scalar:U,ne="fontFamily"in y?y.fontFamily:ne,Z="color"in y?y.color:Z);var ie=10*U,ue=""+ie+"px "+ne,Q=new OffscreenCanvas(ie,ie),ae=Q.getContext("2d");ae.font=ue;var ee=ae.measureText(v),de=Math.ceil(ee.actualBoundingBoxRight+ee.actualBoundingBoxLeft),ce=Math.ceil(ee.actualBoundingBoxAscent+ee.actualBoundingBoxDescent),pe=2,he=ee.actualBoundingBoxLeft+pe,me=ee.actualBoundingBoxAscent+pe;de+=pe+pe,ce+=pe+pe,Q=new OffscreenCanvas(de,ce),ae=Q.getContext("2d"),ae.font=ue,ae.fillStyle=Z,ae.fillText(v,he,me);var h=1/U;return{type:"bitmap",bitmap:Q.transferToImageBitmap(),matrix:[h,0,0,h,-de*h/2,-ce*h/2]}}n.exports=function(){return A().apply(this,arguments)},n.exports.reset=function(){A().reset()},n.exports.create=We,n.exports.shapeFromPath=k,n.exports.shapeFromText=P})(function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}(),ec,!1);var Nd=ec.exports,bT=ec.exports.create;var ko=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 Nd(e)}static async realisticFire(e,n){let i={origin:{y:.7}};await this.fire(Object.assign({},i,n,{particleCount:Math.floor(200*e)}))}};var y_=(t,e)=>e.minValue;function v_(t,e){if(t&1&&(Se(0,"div",7),_t(1,"safeHtml")),t&2){let n=J().$implicit;be("innerHTML",Ct(1,1,n.minValue+" Products"),en)}}function E_(t,e){if(t&1&&(Se(0,"div",7),_t(1,"cooeeCurrency"),_t(2,"safeHtml")),t&2){let n=J().$implicit;be("innerHTML",Ct(2,3,Ct(1,1,n.minValue)),en)}}function b_(t,e){if(t&1&&(X(0,"li",6)(1,"div"),De(2,v_,2,3,"div",7)(3,E_,3,5,"div",7),Se(4,"img",8),X(5,"div",9),Te(6),q()()()),t&2){let n=e.$implicit,r=J(2);ti("left",n.calculatedAlignment+"%"),W(2),Ae((r.progressBarConfig==null?null:r.progressBarConfig.rewardBasis)===r.RewardBasis.ITEM_COUNT?2:3),W(2),be("src",r.getIconURL(n),ft),W(2),kn(n.label)}}function w_(t,e){if(t&1&&(Mt(0)(1),Se(2,"div",0),_t(3,"cooeeDynamicVariables"),_t(4,"safeHtml"),X(5,"div",1)(6,"ul",2)(7,"div",3),Se(8,"div",4),q(),qe(9,b_,7,5,"li",5,y_),q()()),t&2){let n=J(),r=n.calculatedState(),i=r.nextMilestone?r.nextMilestone.reachingText:r.lastMilestone.reachedText;W(2),be("innerHTML",Ct(4,6,Rl(3,3,i,n.localDynamicVariables())),en),W(6),ti("width",r.cartValuePercentage+"%"),W(),Ze(r.milestones)}}var Fo=class t extends fn{cart;localDynamicVariables=Wt({});calculatedState=Wt({});progressBarConfig;RewardBasis=ks;constructor(){super()}engagementTriggerReceived(e){this.progressBarConfig=e.progressBarConfig}ngOnInit(){super.ngOnInit(),this.calculateMilestonesSilently()}update(){this.calculateMilestonesSilently()}getIconURL(e){return e.rewardType===ii.FREE_SHIPPING?"https://img.icons8.com/ios-filled/50/FFFFFF/free-shipping.png":e.rewardType===ii.DISCOUNT?"https://img.icons8.com/ios-glyphs/30/FFFFFF/sale-price-tag.png":e.rewardType===ii.FREE_AUTO_GIFT?"https://img.icons8.com/ios-filled/50/FFFFFF/gift--v1.png":""}calculateMilestonesSilently(){this.calculateMilestones().catch(e=>gt.error(e))}async calculateMilestones(){let e=this.engagementTrigger,n=this.progressBarConfig;if(!n?.milestones?.length){gt.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;gt.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=sr(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||ko.realistic())}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Fe({type:t,selectors:[["cooee-progressbar"]],inputs:{cart:"cart"},features:[wt],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&&De(0,w_,11,8),n&2&&Ae(r.calculatedState().milestonesReady?0:-1)},dependencies:[Lo,Vn,bn],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))}
|
|
31
|
-
`],encapsulation:3})};var
|
|
32
|
-
`),n=e.length===1?null:setInterval(()=>{this.featureSlider.update(r=>Ie(D({},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,Rd.render)(e,this.currentItem.getTemplateVariables()):""}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Fe({type:t,selectors:[["cooee-sticky-atc"]],features:[wt],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=et();X(0,"div",0),De(1,x_,5,3,"div",1),X(2,"div",2)(3,"button",3),Ne("click",function(){return Ue(i),He(r.addToCart())}),Te(4,"Add To Cart"),q(),Mt(5),De(6,O_,3,0,"div",4),q()()}if(n&2){W(),Ae(r.selectedVariant()&&r.stickyATCConfig.showProductInfo?1:-1),W(4);let i=Tn(r.featureSlider());W(),Ae(i.features.length?6:-1)}},dependencies:[Fn],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 Fd,je,Vd,sc,ar,Md,Bd,nc,Ud,ac,rc,ic,D_,oc={},Hd=[],A_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,cc=Array.isArray;function Un(t,e){for(var n in e)t[n]=e[n];return t}function lc(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function tc(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??++Vd,__i:-1,__u:0};return i==null&&je.vnode!=null&&je.vnode(o),o}function uc(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 jd(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 jd(t)}}function Pd(t){(!t.__d&&(t.__d=!0)&&ar.push(t)&&!Uo.__r++||Md!==je.debounceRendering)&&((Md=je.debounceRendering)||Bd)(Uo)}function Uo(){var t,e,n,r,i,o,s,c;for(ar.sort(nc);t=ar.shift();)t.__d&&(e=ar.length,r=void 0,o=(i=(n=t).__v).__e,s=[],c=[],n.__P&&((r=Un({},i)).__v=i.__v+1,je.vnode&&je.vnode(r),Wd(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[o]:null,s,o??Lr(i),!!(32&i.__u),c),r.__v=i.__v,r.__.__k[r.__i]=r,M_(s,r,c),r.__e!=o&&jd(r)),ar.length>e&&ar.sort(nc));Uo.__r=0}function $d(t,e,n,r,i,o,s,c,u,d,g){var p,E,C,O,M,L,H=r&&r.__k||Hd,Y=e.length;for(u=N_(n,e,H,u,Y),p=0;p<Y;p++)(C=n.__k[p])!=null&&(E=C.__i===-1?oc:H[C.__i]||oc,C.__i=p,L=Wd(t,C,E,i,o,s,c,u,d,g),O=C.__e,C.ref&&E.ref!=C.ref&&(E.ref&&dc(E.ref,null,C),g.push(C.ref,C.__c||O,C)),M==null&&O!=null&&(M=O),4&C.__u||E.__k===C.__k?u=Gd(C,u,t):typeof C.type=="function"&&L!==void 0?u=L:O&&(u=O.nextSibling),C.__u&=-7);return n.__e=M,u}function N_(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?tc(null,s,null,null,null):cc(s)?tc(uc,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?tc(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=R_(s,n,u,p))!==-1&&(p--,(c=n[d])&&(c.__u|=2)),c==null||c.__v===null?(d==-1&&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)),Yd(c,c));return r}function Gd(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=Gd(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 R_(t,e,n,r){var i,o,s=t.key,c=t.type,u=e[n];if(u===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 Ld(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||A_.test(e)?n:n+"px"}function Bo(t,e,n,r,i){var o;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||Ld(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||Ld(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(Ud,"$1")),e=e.toLowerCase()in t||e=="onFocusOut"||e=="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=ac,t.addEventListener(e,o?ic:rc,o)):t.removeEventListener(e,o?ic:rc,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 kd(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=ac++;else if(e.t<n.u)return;return n(je.event?je.event(e):e)}}}function Wd(t,e,n,r,i,o,s,c,u,d){var g,p,E,C,O,M,L,H,Y,oe,z,ye,B,fe,te,Ee,Me,xe=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(u=!!(32&n.__u),o=[c=e.__e=n.__e]),(g=je.__b)&&g(e);e:if(typeof xe=="function")try{if(H=e.props,Y="prototype"in xe&&xe.prototype.render,oe=(g=xe.contextType)&&r[g.__c],z=g?oe?oe.props.value:g.__:r,n.__c?L=(p=e.__c=n.__c).__=p.__E:(Y?e.__c=p=new xe(H,z):(e.__c=p=new Pr(H,z),p.constructor=xe,p.render=L_),oe&&oe.sub(p),p.props=H,p.state||(p.state={}),p.context=z,p.__n=r,E=p.__d=!0,p.__h=[],p._sb=[]),Y&&p.__s==null&&(p.__s=p.state),Y&&xe.getDerivedStateFromProps!=null&&(p.__s==p.state&&(p.__s=Un({},p.__s)),Un(p.__s,xe.getDerivedStateFromProps(H,p.__s))),C=p.props,O=p.state,p.__v=e,E)Y&&xe.getDerivedStateFromProps==null&&p.componentWillMount!=null&&p.componentWillMount(),Y&&p.componentDidMount!=null&&p.__h.push(p.componentDidMount);else{if(Y&&xe.getDerivedStateFromProps==null&&H!==C&&p.componentWillReceiveProps!=null&&p.componentWillReceiveProps(H,z),!p.__e&&(p.shouldComponentUpdate!=null&&p.shouldComponentUpdate(H,p.__s,z)===!1||e.__v==n.__v)){for(e.__v!=n.__v&&(p.props=H,p.state=p.__s,p.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(Oe){Oe&&(Oe.__=e)}),ye=0;ye<p._sb.length;ye++)p.__h.push(p._sb[ye]);p._sb=[],p.__h.length&&s.push(p);break e}p.componentWillUpdate!=null&&p.componentWillUpdate(H,p.__s,z),Y&&p.componentDidUpdate!=null&&p.__h.push(function(){p.componentDidUpdate(C,O,M)})}if(p.context=z,p.props=H,p.__P=t,p.__e=!1,B=je.__r,fe=0,Y){for(p.state=p.__s,p.__d=!1,B&&B(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,B&&B(e),g=p.render(p.props,p.state,p.context),p.state=p.__s;while(p.__d&&++fe<25);p.state=p.__s,p.getChildContext!=null&&(r=Un(Un({},r),p.getChildContext())),Y&&!E&&p.getSnapshotBeforeUpdate!=null&&(M=p.getSnapshotBeforeUpdate(C,O)),c=$d(t,cc(Ee=g!=null&&g.type===uc&&g.key==null?g.props.children:g)?Ee:[Ee],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(Oe){if(e.__v=null,u||o!=null)if(Oe.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(Me=o.length;Me--;)lc(o[Me]);else e.__e=n.__e,e.__k=n.__k;je.__e(Oe,e,n)}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):c=e.__e=P_(n.__e,e,n,r,i,o,s,u,d);return(g=je.diffed)&&g(e),128&e.__u?void 0:c}function M_(t,e,n){for(var r=0;r<n.length;r++)dc(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 P_(t,e,n,r,i,o,s,c,u){var d,g,p,E,C,O,M,L=n.props,H=e.props,Y=e.type;if(Y=="svg"?i="http://www.w3.org/2000/svg":Y=="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((C=o[d])&&"setAttribute"in C==!!Y&&(Y?C.localName==Y:C.nodeType==3)){t=C,o[d]=null;break}}if(t==null){if(Y==null)return document.createTextNode(H);t=document.createElementNS(i,Y,H.is&&H),c&&(je.__m&&je.__m(e,o),c=!1),o=null}if(Y===null)L===H||c&&t.data===H||(t.data=H);else{if(o=o&&Fd.call(t.childNodes),L=n.props||oc,!c&&o!=null)for(L={},d=0;d<t.attributes.length;d++)L[(C=t.attributes[d]).name]=C.value;for(d in L)if(C=L[d],d!="children"){if(d=="dangerouslySetInnerHTML")p=C;else if(!(d in H)){if(d=="value"&&"defaultValue"in H||d=="checked"&&"defaultChecked"in H)continue;Bo(t,d,null,C,i)}}for(d in H)C=H[d],d=="children"?E=C:d=="dangerouslySetInnerHTML"?g=C:d=="value"?O=C:d=="checked"?M=C:c&&typeof C!="function"||L[d]===C||Bo(t,d,C,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=""),$d(t,cc(E)?E:[E],e,n,r,Y=="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--;)lc(o[d]);c||(d="value",Y=="progress"&&O==null?t.removeAttribute("value"):O!==void 0&&(O!==t[d]||Y=="progress"&&!O||Y=="option"&&O!==L[d])&&Bo(t,d,O,L[d],i),d="checked",M!==void 0&&M!==t[d]&&Bo(t,d,M,L[d],i))}return t}function dc(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 Yd(t,e,n){var r,i;if(je.unmount&&je.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||dc(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]&&Yd(r[i],e,n||typeof t.type!="function");n||lc(t.__e),t.__c=t.__=t.__e=void 0}function L_(t,e,n){return this.constructor(t,n)}Fd=Hd.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}},Vd=0,sc=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=Un({},this.state),typeof t=="function"&&(t=t(Un({},n),this.props)),t&&Un(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Pd(this))},Pr.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Pd(this))},Pr.prototype.render=uc,ar=[],Bd=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,nc=function(t,e){return t.__v.__b-e.__v.__b},Uo.__r=0,Ud=/(PointerCapture)$|Capture$/i,ac=0,rc=kd(!1),ic=kd(!0),D_=0;var pc,jt,fc,zd,Kd=0,nf=[],lt=je,Xd=lt.__b,qd=lt.__r,Zd=lt.diffed,Jd=lt.__c,Qd=lt.unmount,ef=lt.__;function k_(t,e){lt.__h&<.__h(jt,t,Kd||e),Kd=0;var n=jt.__H||(jt.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function mc(t,e){var n=k_(pc++,7);return B_(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function F_(){for(var t;t=nf.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Ho),t.__H.__h.forEach(hc),t.__H.__h=[]}catch(e){t.__H.__h=[],lt.__e(e,t.__v)}}lt.__b=function(t){jt=null,Xd&&Xd(t)},lt.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),ef&&ef(t,e)},lt.__r=function(t){qd&&qd(t),pc=0;var e=(jt=t.__c).__H;e&&(fc===jt?(e.__h=[],jt.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(e.__h.forEach(Ho),e.__h.forEach(hc),e.__h=[],pc=0)),fc=jt},lt.diffed=function(t){Zd&&Zd(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(nf.push(e)!==1&&zd===lt.requestAnimationFrame||((zd=lt.requestAnimationFrame)||V_)(F_)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),fc=jt=null},lt.__c=function(t,e){e.some(function(n){try{n.__h.forEach(Ho),n.__h=n.__h.filter(function(r){return!r.__||hc(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],lt.__e(r,n.__v)}}),Jd&&Jd(t,e)},lt.unmount=function(t){Qd&&Qd(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Ho(r)}catch(i){e=i}}),n.__H=void 0,e&<.__e(e,n.__v))};var tf=typeof requestAnimationFrame=="function";function V_(t){var e,n=function(){clearTimeout(r),tf&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);tf&&(e=requestAnimationFrame(n))}function Ho(t){var e=jt,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),jt=e}function hc(t){var e=jt;t.__c=t.__(),jt=e}function B_(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}var U_=Symbol.for("preact-signals");function _c(){if(kr>1)kr--;else{for(var t,e=!1;Ei!==void 0;){var n=Ei;for(Ei=void 0,gc++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&of(n))try{n.c()}catch(i){e||(t=i,e=!0)}n=r}}if(gc=0,kr--,e)throw t}}var $e=void 0;var Ei=void 0,kr=0,gc=0,jo=0;function rf(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 ht(t){this.v=t,this.i=0,this.n=void 0,this.t=void 0}ht.prototype.brand=U_;ht.prototype.h=function(){return!0};ht.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)};ht.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)}};ht.prototype.subscribe=function(t){var e=this;return $o(function(){var n=e.value,r=$e;$e=void 0;try{t(n)}finally{$e=r}})};ht.prototype.valueOf=function(){return this.value};ht.prototype.toString=function(){return this.value+""};ht.prototype.toJSON=function(){return this.value};ht.prototype.peek=function(){var t=$e;$e=void 0;try{return this.value}finally{$e=t}};Object.defineProperty(ht.prototype,"value",{get:function(){var t=rf(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(gc>100)throw new Error("Cycle detected");this.v=t,this.i++,jo++,kr++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{_c()}}}});function bi(t){return new ht(t)}function of(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 sf(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 af(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 Fr(t){ht.call(this,void 0),this.x=t,this.s=void 0,this.g=jo-1,this.f=4}(Fr.prototype=new ht).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===jo))return!0;if(this.g=jo,this.f|=1,this.i>0&&!of(this))return this.f&=-2,!0;var t=$e;try{sf(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,af(this),this.f&=-2,!0};Fr.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)}ht.prototype.S.call(this,t)};Fr.prototype.U=function(t){if(this.t!==void 0&&(ht.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)}};Fr.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(Fr.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=rf(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function cf(t){return new Fr(t)}function lf(t){var e=t.u;if(t.u=void 0,typeof e=="function"){kr++;var n=$e;$e=void 0;try{e()}catch(r){throw t.f&=-2,t.f|=8,yc(t),r}finally{$e=n,_c()}}}function yc(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,lf(t)}function H_(t){if($e!==this)throw new Error("Out-of-order effect");af(this),$e=t,this.f&=-2,8&this.f&&yc(this),_c()}function wi(t){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}wi.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()}};wi.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,lf(this),sf(this),kr++;var t=$e;return $e=this,H_.bind(this,t)};wi.prototype.N=function(){2&this.f||(this.f|=2,this.o=Ei,Ei=this)};wi.prototype.d=function(){this.f|=8,1&this.f||yc(this)};function $o(t){var e=new wi(t);try{e.c()}catch(n){throw e.d(),n}return e.d.bind(e)}var Ec,vc;function Vr(t,e){je[t]=e.bind(null,je[t]||function(){})}function Go(t){vc&&vc(),vc=t&&t.S()}function uf(t){var e=this,n=t.data,r=$_(n);r.value=n;var i=mc(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(),sc(u)||((s=e.base)==null?void 0:s.nodeType)!==3?(e.__$f|=1,e.setState({})):e.base.data=u},cf(function(){var s=r.value.value;return s===0?0:s===!0?"":s||""})},[]);return i.value}uf.displayName="_st";Object.defineProperties(ht.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:uf},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 ht&&(n||(e.__np=n={}),n[i]=o,r[i]=o.peek())}}t(e)});Vr("__r",function(t,e){Go();var n,r=e.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(i){var o;return $o(function(){o=this}),o.c=function(){r.__$f|=1,r.setState({})},o}())),Ec=r,Go(n),t(e)});Vr("__e",function(t,e,n,r){Go(),Ec=void 0,t(e,n,r)});Vr("diffed",function(t,e){Go(),Ec=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=j_(n,u,g,i),o[u]=d):d.o(g,i)}}}t(e)});function j_(t,e,n,r){var i=e in t&&t.ownerSVGElement===void 0,o=bi(n);return{o:function(s,c){o.value=s,r=c},d:$o(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 $_(t){return mc(function(){return bi(t)},[])}var bc=(i=>(i.SIMPLE="SIMPLE",i.SWIPER="SWIPER",i.STORY="STORY",i.FLOATING_POPUP="FLOATING_POPUP",i))(bc||{}),wc=(r=>(r.ON="ON",r.OFF="OFF",r.ON_HOVER="ON_HOVER",r))(wc||{}),Cc=(r=>(r.FIRST_ITEM="FIRST_ITEM",r.BADGE="BADGE",r.NONE="NONE",r))(Cc||{});function G_(t,e){return e={exports:{}},t(e,e.exports),e.exports}var W_=X_,Y_=Z_,z_=ey,Cn=[],Jt=[],K_=typeof Uint8Array<"u"?Uint8Array:Array,Sc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(cr=0,df=Sc.length;cr<df;++cr)Cn[cr]=Sc[cr],Jt[Sc.charCodeAt(cr)]=cr;var cr,df;Jt[45]=62;Jt[95]=63;function Tf(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 X_(t){var e=Tf(t),n=e[0],r=e[1];return(n+r)*3/4-r}function q_(t,e,n){return(e+n)*3/4-n}function Z_(t){var e,n=Tf(t),r=n[0],i=n[1],o=new K_(q_(t,r,i)),s=0,c=i>0?r-4:r,u;for(u=0;u<c;u+=4)e=Jt[t.charCodeAt(u)]<<18|Jt[t.charCodeAt(u+1)]<<12|Jt[t.charCodeAt(u+2)]<<6|Jt[t.charCodeAt(u+3)],o[s++]=e>>16&255,o[s++]=e>>8&255,o[s++]=e&255;return i===2&&(e=Jt[t.charCodeAt(u)]<<2|Jt[t.charCodeAt(u+1)]>>4,o[s++]=e&255),i===1&&(e=Jt[t.charCodeAt(u)]<<10|Jt[t.charCodeAt(u+1)]<<4|Jt[t.charCodeAt(u+2)]>>2,o[s++]=e>>8&255,o[s++]=e&255),o}function J_(t){return Cn[t>>18&63]+Cn[t>>12&63]+Cn[t>>6&63]+Cn[t&63]}function Q_(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(J_(r));return i.join("")}function ey(t){for(var e,n=t.length,r=n%3,i=[],o=16383,s=0,c=n-r;s<c;s+=o)i.push(Q_(t,s,s+o>c?c:s+o));return r===1?(e=t[n-1],i.push(Cn[e>>2]+Cn[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],i.push(Cn[e>>10]+Cn[e>>4&63]+Cn[e<<2&63]+"=")),i.join("")}var Ic={byteLength:W_,toByteArray:Y_,fromByteArray:z_};var ty=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,C=r?-1:1,O=e[n+E];for(E+=C,s=O&(1<<-p)-1,O>>=-p,p+=u;p>0;s=s*256+e[n+E],E+=C,p-=8);for(c=s&(1<<-p)-1,s>>=-p,p+=i;p>0;c=c*256+e[n+E],E+=C,p-=8);if(s===0)s=1-g;else{if(s===d)return c?NaN:(O?-1:1)*(1/0);c=c+Math.pow(2,i),s=s-g}return(O?-1:1)*c*Math.pow(2,s-i)},ny=function(e,n,r,i,o,s){var c,u,d,g=s*8-o-1,p=(1<<g)-1,E=p>>1,C=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,O=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+=C/d:n+=C*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+O]=u&255,O+=M,u/=256,o-=8);for(c=c<<o|u,g+=o;g>0;e[r+O]=c&255,O+=M,c/=256,g-=8);e[r+O-M]|=L*128},Br={read:ty,write:ny},zo=G_(function(t,e){var n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=H,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 C(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(pe(h,ArrayBuffer)||h&&pe(h.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(pe(h,SharedArrayBuffer)||h&&pe(h.buffer,SharedArrayBuffer)))return O(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 I=M(h);if(I)return I;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=Y(h,a)|0,_=o(l),I=_.write(h,a);return I!==l&&(_=_.slice(0,I)),_}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 C(h){if(pe(h,Uint8Array)){var a=new Uint8Array(h);return O(a.buffer,a.byteOffset,a.byteLength)}return E(h)}function O(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"||he(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 H(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(pe(a,Uint8Array)&&(a=s.from(a,a.offset,a.byteLength)),pe(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,I=l.length,N=0,F=Math.min(_,I);N<F;++N)if(a[N]!==l[N]){_=a[N],I=l[N];break}return _<I?-1:I<_?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 I=s.allocUnsafe(l),N=0;for(_=0;_<a.length;++_){var F=a[_];if(pe(F,Uint8Array))N+F.length>I.length?s.from(F).copy(I,N):Uint8Array.prototype.set.call(I,F,N);else if(s.isBuffer(F))F.copy(I,N);else throw new TypeError('"list" argument must be an Array of Buffers');N+=F.length}return I};function Y(h,a){if(s.isBuffer(h))return h.length;if(ArrayBuffer.isView(h)||pe(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 I=!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 de(h).length;default:if(I)return _?-1:Q(h).length;a=(""+a).toLowerCase(),I=!0}}s.byteLength=Y;function oe(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 k(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 T(this,a,l);case"base64":return Oe(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 z(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)z(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)z(this,l,l+3),z(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)z(this,l,l+7),z(this,l+1,l+6),z(this,l+2,l+5),z(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):oe.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,_,I,N){if(pe(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),I===void 0&&(I=0),N===void 0&&(N=this.length),l<0||_>a.length||I<0||N>this.length)throw new RangeError("out of range index");if(I>=N&&l>=_)return 0;if(I>=N)return-1;if(l>=_)return 1;if(l>>>=0,_>>>=0,I>>>=0,N>>>=0,this===a)return 0;for(var F=N-I,_e=_-l,we=Math.min(F,_e),ve=this.slice(I,N),Pe=a.slice(l,_),Le=0;Le<we;++Le)if(ve[Le]!==Pe[Le]){F=ve[Le],_e=Pe[Le];break}return F<_e?-1:_e<F?1:0};function ye(h,a,l,_,I){if(h.length===0)return-1;if(typeof l=="string"?(_=l,l=0):l>2147483647?l=2147483647:l<-2147483648&&(l=-2147483648),l=+l,he(l)&&(l=I?0:h.length-1),l<0&&(l=h.length+l),l>=h.length){if(I)return-1;l=h.length-1}else if(l<0)if(I)l=0;else return-1;if(typeof a=="string"&&(a=s.from(a,_)),s.isBuffer(a))return a.length===0?-1:B(h,a,l,_,I);if(typeof a=="number")return a=a&255,typeof Uint8Array.prototype.indexOf=="function"?I?Uint8Array.prototype.indexOf.call(h,a,l):Uint8Array.prototype.lastIndexOf.call(h,a,l):B(h,[a],l,_,I);throw new TypeError("val must be string, number or Buffer")}function B(h,a,l,_,I){var N=1,F=h.length,_e=a.length;if(_!==void 0&&(_=String(_).toLowerCase(),_==="ucs2"||_==="ucs-2"||_==="utf16le"||_==="utf-16le")){if(h.length<2||a.length<2)return-1;N=2,F/=2,_e/=2,l/=2}function we(Lt,$t){return N===1?Lt[$t]:Lt.readUInt16BE($t*N)}var ve;if(I){var Pe=-1;for(ve=l;ve<F;ve++)if(we(h,ve)===we(a,Pe===-1?0:ve-Pe)){if(Pe===-1&&(Pe=ve),ve-Pe+1===_e)return Pe*N}else Pe!==-1&&(ve-=ve-Pe),Pe=-1}else for(l+_e>F&&(l=F-_e),ve=l;ve>=0;ve--){for(var Le=!0,Xe=0;Xe<_e;Xe++)if(we(h,ve+Xe)!==we(a,Xe)){Le=!1;break}if(Le)return ve}return-1}s.prototype.includes=function(a,l,_){return this.indexOf(a,l,_)!==-1},s.prototype.indexOf=function(a,l,_){return ye(this,a,l,_,!0)},s.prototype.lastIndexOf=function(a,l,_){return ye(this,a,l,_,!1)};function fe(h,a,l,_){l=Number(l)||0;var I=h.length-l;_?(_=Number(_),_>I&&(_=I)):_=I;var N=a.length;_>N/2&&(_=N/2);for(var F=0;F<_;++F){var _e=parseInt(a.substr(F*2,2),16);if(he(_e))return F;h[l+F]=_e}return F}function te(h,a,l,_){return ce(Q(a,h.length-l),h,l,_)}function Ee(h,a,l,_){return ce(ae(a),h,l,_)}function Me(h,a,l,_){return ce(de(a),h,l,_)}function xe(h,a,l,_){return ce(ee(a,h.length-l),h,l,_)}s.prototype.write=function(a,l,_,I){if(l===void 0)I="utf8",_=this.length,l=0;else if(_===void 0&&typeof l=="string")I=l,_=this.length,l=0;else if(isFinite(l))l=l>>>0,isFinite(_)?(_=_>>>0,I===void 0&&(I="utf8")):(I=_,_=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var N=this.length-l;if((_===void 0||_>N)&&(_=N),a.length>0&&(_<0||l<0)||l>this.length)throw new RangeError("Attempt to write outside buffer bounds");I||(I="utf8");for(var F=!1;;)switch(I){case"hex":return fe(this,a,l,_);case"utf8":case"utf-8":return te(this,a,l,_);case"ascii":case"latin1":case"binary":return Ee(this,a,l,_);case"base64":return Me(this,a,l,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xe(this,a,l,_);default:if(F)throw new TypeError("Unknown encoding: "+I);I=(""+I).toLowerCase(),F=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Oe(h,a,l){return a===0&&l===h.length?Ic.fromByteArray(h):Ic.fromByteArray(h.slice(a,l))}function Ge(h,a,l){l=Math.min(h.length,l);for(var _=[],I=a;I<l;){var N=h[I],F=null,_e=N>239?4:N>223?3:N>191?2:1;if(I+_e<=l){var we,ve,Pe,Le;switch(_e){case 1:N<128&&(F=N);break;case 2:we=h[I+1],(we&192)===128&&(Le=(N&31)<<6|we&63,Le>127&&(F=Le));break;case 3:we=h[I+1],ve=h[I+2],(we&192)===128&&(ve&192)===128&&(Le=(N&15)<<12|(we&63)<<6|ve&63,Le>2047&&(Le<55296||Le>57343)&&(F=Le));break;case 4:we=h[I+1],ve=h[I+2],Pe=h[I+3],(we&192)===128&&(ve&192)===128&&(Pe&192)===128&&(Le=(N&15)<<18|(we&63)<<12|(ve&63)<<6|Pe&63,Le>65535&&Le<1114112&&(F=Le))}}F===null?(F=65533,_e=1):F>65535&&(F-=65536,_.push(F>>>10&1023|55296),F=56320|F&1023),_.push(F),I+=_e}return ut(_)}var We=4096;function ut(h){var a=h.length;if(a<=We)return String.fromCharCode.apply(String,h);for(var l="",_=0;_<a;)l+=String.fromCharCode.apply(String,h.slice(_,_+=We));return l}function A(h,a,l){var _="";l=Math.min(h.length,l);for(var I=a;I<l;++I)_+=String.fromCharCode(h[I]&127);return _}function T(h,a,l){var _="";l=Math.min(h.length,l);for(var I=a;I<l;++I)_+=String.fromCharCode(h[I]);return _}function k(h,a,l){var _=h.length;(!a||a<0)&&(a=0),(!l||l<0||l>_)&&(l=_);for(var I="",N=a;N<l;++N)I+=me[h[N]];return I}function P(h,a,l){for(var _=h.slice(a,l),I="",N=0;N<_.length-1;N+=2)I+=String.fromCharCode(_[N]+_[N+1]*256);return I}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 I=this.subarray(a,l);return Object.setPrototypeOf(I,s.prototype),I};function y(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,_||y(a,l,this.length);for(var I=this[a],N=1,F=0;++F<l&&(N*=256);)I+=this[a+F]*N;return I},s.prototype.readUintBE=s.prototype.readUIntBE=function(a,l,_){a=a>>>0,l=l>>>0,_||y(a,l,this.length);for(var I=this[a+--l],N=1;l>0&&(N*=256);)I+=this[a+--l]*N;return I},s.prototype.readUint8=s.prototype.readUInt8=function(a,l){return a=a>>>0,l||y(a,1,this.length),this[a]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(a,l){return a=a>>>0,l||y(a,2,this.length),this[a]|this[a+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(a,l){return a=a>>>0,l||y(a,2,this.length),this[a]<<8|this[a+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(a,l){return a=a>>>0,l||y(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||y(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,_||y(a,l,this.length);for(var I=this[a],N=1,F=0;++F<l&&(N*=256);)I+=this[a+F]*N;return N*=128,I>=N&&(I-=Math.pow(2,8*l)),I},s.prototype.readIntBE=function(a,l,_){a=a>>>0,l=l>>>0,_||y(a,l,this.length);for(var I=l,N=1,F=this[a+--I];I>0&&(N*=256);)F+=this[a+--I]*N;return N*=128,F>=N&&(F-=Math.pow(2,8*l)),F},s.prototype.readInt8=function(a,l){return a=a>>>0,l||y(a,1,this.length),this[a]&128?(255-this[a]+1)*-1:this[a]},s.prototype.readInt16LE=function(a,l){a=a>>>0,l||y(a,2,this.length);var _=this[a]|this[a+1]<<8;return _&32768?_|4294901760:_},s.prototype.readInt16BE=function(a,l){a=a>>>0,l||y(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||y(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||y(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||y(a,4,this.length),Br.read(this,a,!0,23,4)},s.prototype.readFloatBE=function(a,l){return a=a>>>0,l||y(a,4,this.length),Br.read(this,a,!1,23,4)},s.prototype.readDoubleLE=function(a,l){return a=a>>>0,l||y(a,8,this.length),Br.read(this,a,!0,52,8)},s.prototype.readDoubleBE=function(a,l){return a=a>>>0,l||y(a,8,this.length),Br.read(this,a,!1,52,8)};function v(h,a,l,_,I,N){if(!s.isBuffer(h))throw new TypeError('"buffer" argument must be a Buffer instance');if(a>I||a<N)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,_,I){if(a=+a,l=l>>>0,_=_>>>0,!I){var N=Math.pow(2,8*_)-1;v(this,a,l,_,N,0)}var F=1,_e=0;for(this[l]=a&255;++_e<_&&(F*=256);)this[l+_e]=a/F&255;return l+_},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(a,l,_,I){if(a=+a,l=l>>>0,_=_>>>0,!I){var N=Math.pow(2,8*_)-1;v(this,a,l,_,N,0)}var F=_-1,_e=1;for(this[l+F]=a&255;--F>=0&&(_e*=256);)this[l+F]=a/_e&255;return l+_},s.prototype.writeUint8=s.prototype.writeUInt8=function(a,l,_){return a=+a,l=l>>>0,_||v(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,_||v(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,_||v(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,_||v(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,_||v(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,_,I){if(a=+a,l=l>>>0,!I){var N=Math.pow(2,8*_-1);v(this,a,l,_,N-1,-N)}var F=0,_e=1,we=0;for(this[l]=a&255;++F<_&&(_e*=256);)a<0&&we===0&&this[l+F-1]!==0&&(we=1),this[l+F]=(a/_e>>0)-we&255;return l+_},s.prototype.writeIntBE=function(a,l,_,I){if(a=+a,l=l>>>0,!I){var N=Math.pow(2,8*_-1);v(this,a,l,_,N-1,-N)}var F=_-1,_e=1,we=0;for(this[l+F]=a&255;--F>=0&&(_e*=256);)a<0&&we===0&&this[l+F+1]!==0&&(we=1),this[l+F]=(a/_e>>0)-we&255;return l+_},s.prototype.writeInt8=function(a,l,_){return a=+a,l=l>>>0,_||v(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,_||v(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,_||v(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,_||v(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,_||v(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 U(h,a,l,_,I,N){if(l+_>h.length)throw new RangeError("Index out of range");if(l<0)throw new RangeError("Index out of range")}function Z(h,a,l,_,I){return a=+a,l=l>>>0,I||U(h,a,l,4),Br.write(h,a,l,_,23,4),l+4}s.prototype.writeFloatLE=function(a,l,_){return Z(this,a,l,!0,_)},s.prototype.writeFloatBE=function(a,l,_){return Z(this,a,l,!1,_)};function ne(h,a,l,_,I){return a=+a,l=l>>>0,I||U(h,a,l,8),Br.write(h,a,l,_,52,8),l+8}s.prototype.writeDoubleLE=function(a,l,_){return ne(this,a,l,!0,_)},s.prototype.writeDoubleBE=function(a,l,_){return ne(this,a,l,!1,_)},s.prototype.copy=function(a,l,_,I){if(!s.isBuffer(a))throw new TypeError("argument should be a Buffer");if(_||(_=0),!I&&I!==0&&(I=this.length),l>=a.length&&(l=a.length),l||(l=0),I>0&&I<_&&(I=_),I===_||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(I<0)throw new RangeError("sourceEnd out of bounds");I>this.length&&(I=this.length),a.length-l<I-_&&(I=a.length-l+_);var N=I-_;return this===a&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(l,_,I):Uint8Array.prototype.set.call(a,this.subarray(_,I),l),N},s.prototype.fill=function(a,l,_,I){if(typeof a=="string"){if(typeof l=="string"?(I=l,l=0,_=this.length):typeof _=="string"&&(I=_,_=this.length),I!==void 0&&typeof I!="string")throw new TypeError("encoding must be a string");if(typeof I=="string"&&!s.isEncoding(I))throw new TypeError("Unknown encoding: "+I);if(a.length===1){var N=a.charCodeAt(0);(I==="utf8"&&N<128||I==="latin1")&&(a=N)}}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 F;if(typeof a=="number")for(F=l;F<_;++F)this[F]=a;else{var _e=s.isBuffer(a)?a:s.from(a,I),we=_e.length;if(we===0)throw new TypeError('The value "'+a+'" is invalid for argument "value"');for(F=0;F<_-l;++F)this[F+l]=_e[F%we]}return this};var ie=/[^+/0-9A-Za-z-_]/g;function ue(h){if(h=h.split("=")[0],h=h.trim().replace(ie,""),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,I=null,N=[],F=0;F<_;++F){if(l=h.charCodeAt(F),l>55295&&l<57344){if(!I){if(l>56319){(a-=3)>-1&&N.push(239,191,189);continue}else if(F+1===_){(a-=3)>-1&&N.push(239,191,189);continue}I=l;continue}if(l<56320){(a-=3)>-1&&N.push(239,191,189),I=l;continue}l=(I-55296<<10|l-56320)+65536}else I&&(a-=3)>-1&&N.push(239,191,189);if(I=null,l<128){if((a-=1)<0)break;N.push(l)}else if(l<2048){if((a-=2)<0)break;N.push(l>>6|192,l&63|128)}else if(l<65536){if((a-=3)<0)break;N.push(l>>12|224,l>>6&63|128,l&63|128)}else if(l<1114112){if((a-=4)<0)break;N.push(l>>18|240,l>>12&63|128,l>>6&63|128,l&63|128)}else throw new Error("Invalid code point")}return N}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,_,I,N=[],F=0;F<h.length&&!((a-=2)<0);++F)l=h.charCodeAt(F),_=l>>8,I=l%256,N.push(I),N.push(_);return N}function de(h){return Ic.toByteArray(ue(h))}function ce(h,a,l,_){for(var I=0;I<_&&!(I+l>=a.length||I>=h.length);++I)a[I+l]=h[I];return I}function pe(h,a){return h instanceof a||h!=null&&h.constructor!=null&&h.constructor.name!=null&&h.constructor.name===a.name}function he(h){return h!==h}var me=function(){for(var h="0123456789abcdef",a=new Array(256),l=0;l<16;++l)for(var _=l*16,I=0;I<16;++I)a[_+I]=h[l]+h[I];return a}()}),Re=zo.Buffer;zo.SlowBuffer;zo.INSPECT_MAX_BYTES;zo.kMaxLength;var Ac=function(e,n){return Ac=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])},Ac(e,n)};function Ko(t,e){Ac(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var ur=function(t){Ko(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),Je=function(t){Ko(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 Wo(t){return t&&t.Math==Math&&t}function Of(){return Wo(typeof globalThis=="object"&&globalThis)||Wo(typeof window=="object"&&window)||Wo(typeof self=="object"&&self)||Wo(typeof global=="object"&&global)||Function("return this")()}function ry(){var t=Of();return typeof t.navigator=="object"&&t.navigator.product==="ReactNative"}var iy=function(e){var n=ry()?"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=Re.alloc(e),i=0;i<e;++i)r[i]=Math.floor(Math.random()*256);return r},oy=function(){{if(typeof window<"u"){var t=window.crypto||window.msCrypto;if(t&&t.getRandomValues)return function(e){return t.getRandomValues(Re.alloc(e))}}return typeof global<"u"&&global.crypto&&global.crypto.getRandomValues?function(e){return global.crypto.getRandomValues(Re.alloc(e))}:iy}},Df=oy();function sy(t){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(t))}function Rc(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}function ay(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function cy(t){return xi(t)&&Object.prototype.toString.call(t)==="[object Date]"}function xi(t){return typeof t=="object"&&t!==null}function Xo(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 Yo(t){if(ArrayBuffer.isView(t))return Re.from(t.buffer,t.byteOffset,t.byteLength);if(sy(t))return Re.from(t);throw new Je("Must use either Buffer or TypedArray")}var ly=/^(?:[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,Af=function(t){return typeof t=="string"&&ly.test(t)},Nc=function(t){if(!Af(t))throw new Je('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 Re.from(e,"hex")},ff=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 RO=Math.pow(2,63)-1,MO=-Math.pow(2,63),uy=Math.pow(2,53),dy=-Math.pow(2,53);var Nf=4;var dr=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 Je("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=Re.alloc(t.BUFFER_SIZE),this.position=0):(typeof e=="string"?this.buffer=Re.from(e,"binary"):Array.isArray(e)?this.buffer=Re.from(e):this.buffer=Yo(e),this.position=this.buffer.byteLength)}return t.prototype.put=function(e){if(typeof e=="string"&&e.length!==1)throw new Je("only accepts single character String");if(typeof e!="number"&&e.length!==1)throw new Je("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 Je("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=Re.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=Re.alloc(this.buffer.length+e.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r}ArrayBuffer.isView(e)?(this.buffer.set(Yo(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 pf(this.buffer.slice(0,this.position));throw new ur('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=Re.from(e.$binary,"base64")):typeof e.$binary!="string"&&(i=e.$binary.subType?parseInt(e.$binary.subType,16):0,r=Re.from(e.$binary.base64,"base64")):"$uuid"in e&&(i=4,r=Nc(e.$uuid)),!r)throw new Je("Unexpected Binary Extended JSON format ".concat(JSON.stringify(e)));return i===Nf?new pf(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(dr.prototype,"_bsontype",{value:"Binary"});var xc=16,pf=function(t){Ko(e,t);function e(n){var r=this,i,o;if(n==null)i=e.generate();else if(n instanceof e)i=Re.from(n.buffer),o=n.__id;else if(ArrayBuffer.isView(n)&&n.byteLength===xc)i=Yo(n);else if(typeof n=="string")i=Nc(n);else throw new Je("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,Nf)||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=ff(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=ff(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 dr(this.id,dr.SUBTYPE_UUID)},e.generate=function(){var n=Df(xc);return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Re.from(n)},e.isValid=function(n){return n?n instanceof e?!0:typeof n=="string"?Af(n):Rc(n)?n.length!==xc?!1:(n[6]&240)===64&&(n[8]&128)===128:!1:!1},e.createFromHexString=function(n){var r=Nc(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}(dr),qo=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(qo.prototype,"_bsontype",{value:"Code"});function fy(t){return xi(t)&&t.$id!=null&&typeof t.$ref=="string"&&(t.$db==null||typeof t.$db=="string")}var Si=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(Si.prototype,"_bsontype",{value:"DBRef"});var Zt=void 0;try{Zt=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 hf=65536,py=1<<24,Hr=hf*hf,Rf=Hr*Hr,mf=Rf/2,gf={},_f={},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=_f[e],i)?i:(r=t.fromBits(e,(e|0)<0?-1:0,!0),o&&(_f[e]=r),r)):(e|=0,(o=-128<=e&&e<128)&&(i=gf[e],i)?i:(r=t.fromBits(e,e<0?-1:0,!1),o&&(gf[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>=Rf)return t.MAX_UNSIGNED_VALUE}else{if(e<=-mf)return t.MIN_VALUE;if(e+1>=mf)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 xi(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,C=0;return C+=o+d,E+=C>>>16,C&=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|C,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(Zt){if(!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1)return this;var n=(this.unsigned?Zt.div_u:Zt.div_s)(this.low,this.high,e.low,e.high);return t.fromBits(n,Zt.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)),Zt){var n=(this.unsigned?Zt.rem_u:Zt.rem_s)(this.low,this.high,e.low,e.high);return t.fromBits(n,Zt.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)),Zt){var n=Zt.mul(this.low,this.high,e.low,e.high);return t.fromBits(n,Zt.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,C=0,O=0;return O+=s*g,C+=O>>>16,O&=65535,C+=o*g,E+=C>>>16,C&=65535,C+=s*d,E+=C>>>16,C&=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(C<<16|O,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(py),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 hy=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,my=/^(\+|-)?(Infinity|inf)$/i,gy=/^(\+|-)?NaN$/i,Ci=6111,Tc=-6176,yf=6176,_y=34,Oc=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),vf=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Ef=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),yy=/^([-+])?(\d+)?$/,vy=31,bf=16383,Ey=30,by=31;function wf(t){return!isNaN(parseInt(t,10))}function wy(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 Cy(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 Sy(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 Je('"'.concat(t,'" is not a valid Decimal128 string - ').concat(e))}var Mc=function(){function t(e){if(!(this instanceof t))return new t(e);if(typeof e=="string")this.bytes=t.fromString(e).bytes;else if(Rc(e)){if(e.byteLength!==16)throw new Je("Decimal128 must take a Buffer of 16 bytes");this.bytes=e}else throw new Je("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,C=0,O=0,M=0,L=0,H=new le(0,0),Y=new le(0,0),oe=0,z=0;if(e.length>=7e3)throw new Je(""+e+" not a valid Decimal128 string");var ye=e.match(hy),B=e.match(my),fe=e.match(gy);if(!ye&&!B&&!fe||e.length===0)throw new Je(""+e+" not a valid Decimal128 string");if(ye){var te=ye[2],Ee=ye[4],Me=ye[5],xe=ye[6];Ee&&xe===void 0&&Ur(e,"missing exponent power"),Ee&&te===void 0&&Ur(e,"missing exponent base"),Ee===void 0&&(Me||xe)&&Ur(e,"missing e before exponent")}if((e[z]==="+"||e[z]==="-")&&(n=e[z++]==="-"),!wf(e[z])&&e[z]!=="."){if(e[z]==="i"||e[z]==="I")return new t(Re.from(n?vf:Ef));if(e[z]==="N")return new t(Re.from(Oc))}for(;wf(e[z])||e[z]===".";){if(e[z]==="."){r&&Ur(e,"contains multiple periods"),r=!0,z=z+1;continue}p<34&&(e[z]!=="0"||i)&&(i||(d=s),i=!0,g[E++]=parseInt(e[z],10),p=p+1),i&&(c=c+1),r&&(u=u+1),s=s+1,z=z+1}if(r&&!s)throw new Je(""+e+" not a valid Decimal128 string");if(e[z]==="e"||e[z]==="E"){var Oe=e.substr(++z).match(yy);if(!Oe||!Oe[2])return new t(Re.from(Oc));M=parseInt(Oe[0],10),z=z+Oe[0].length}if(e[z])return new t(Re.from(Oc));if(C=0,!p)C=0,O=0,g[0]=0,c=1,p=1,o=0;else if(O=p-1,o=c,o!==1)for(;g[d+o-1]===0;)o=o-1;for(M<=u&&u-M>16384?M=Tc:M=M-u;M>Ci;){if(O=O+1,O-C>_y){var Ge=g.join("");if(Ge.match(/^0+$/)){M=Ci;break}Ur(e,"overflow")}M=M-1}for(;M<Tc||p<c;){if(O===0&&o<p){M=Tc,o=0;break}if(p<c?c=c-1:O=O-1,M<Ci)M=M+1;else{var Ge=g.join("");if(Ge.match(/^0+$/)){M=Ci;break}Ur(e,"overflow")}}if(O-C+1<o){var We=s;r&&(d=d+1,We=We+1),n&&(d=d+1,We=We+1);var ut=parseInt(e[d+O+1],10),A=0;if(ut>=5&&(A=1,ut===5)){for(A=g[O]%2===1?1:0,L=d+O+2;L<We;L++)if(parseInt(e[L],10)){A=1;break}}if(A){for(var T=O;T>=0;T--)if(++g[T]>9&&(g[T]=0,T===0))if(M<Ci)M=M+1,g[T]=1;else return new t(Re.from(n?vf:Ef))}}if(H=le.fromNumber(0),Y=le.fromNumber(0),o===0)H=le.fromNumber(0),Y=le.fromNumber(0);else if(O-C<17){var T=C;for(Y=le.fromNumber(g[T++]),H=new le(0,0);T<=O;T++)Y=Y.multiply(le.fromNumber(10)),Y=Y.add(le.fromNumber(g[T]))}else{var T=C;for(H=le.fromNumber(g[T++]);T<=O-17;T++)H=H.multiply(le.fromNumber(10)),H=H.add(le.fromNumber(g[T]));for(Y=le.fromNumber(g[T++]);T<=O;T++)Y=Y.multiply(le.fromNumber(10)),Y=Y.add(le.fromNumber(g[T]))}var k=Cy(H,le.fromString("100000000000000000"));k.low=k.low.add(Y),Sy(k.low,Y)&&(k.high=k.high.add(le.fromNumber(1))),oe=M+yf;var P={low:le.fromNumber(0),high:le.fromNumber(0)};k.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(oe).and(le.fromNumber(16383).shiftLeft(47))),P.high=P.high.or(k.high.and(le.fromNumber(0x7fffffffffff)))):(P.high=P.high.or(le.fromNumber(oe&16383).shiftLeft(49)),P.high=P.high.or(k.high.and(le.fromNumber(562949953421311)))),P.low=k.low,n&&(P.high=P.high.or(le.fromString("9223372036854775808")));var y=Re.alloc(16);return z=0,y[z++]=P.low.low&255,y[z++]=P.low.low>>8&255,y[z++]=P.low.low>>16&255,y[z++]=P.low.low>>24&255,y[z++]=P.low.high&255,y[z++]=P.low.high>>8&255,y[z++]=P.low.high>>16&255,y[z++]=P.low.high>>24&255,y[z++]=P.high.low&255,y[z++]=P.high.low>>8&255,y[z++]=P.high.low>>16&255,y[z++]=P.high.low>>24&255,y[z++]=P.high.high&255,y[z++]=P.high.high>>8&255,y[z++]=P.high.high>>16&255,y[z++]=P.high.high>>24&255,new t(y)},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,C=E[o++]|E[o++]<<8|E[o++]<<16|E[o++]<<24,O=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 H={low:new le(C,O),high:new le(M,L)};H.high.lessThan(le.ZERO)&&p.push("-");var Y=L>>26&vy;if(Y>>3===3){if(Y===Ey)return p.join("")+"Infinity";if(Y===by)return"NaN";e=L>>15&bf,c=8+(L>>14&1)}else c=L>>14&7,e=L>>17&bf;var oe=e-yf;if(u.parts[0]=(L&16383)+((c&15)<<14),u.parts[1]=M,u.parts[2]=O,u.parts[3]=C,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 z=0,ye=wy(u);if(u=ye.quotient,z=ye.rem.low,!!z)for(d=8;d>=0;d--)r[g*9+d]=z%10,z=Math.floor(z/10)}if(s)n=1,r[o]=0;else for(n=36;!r[o];)n=n-1,o=o+1;var B=n-1+oe;if(B>=34||B<=-7||oe>0){if(n>34)return p.push("".concat(0)),oe>0?p.push("E+".concat(oe)):oe<0&&p.push("E".concat(oe)),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"),B>0?p.push("+".concat(B)):p.push("".concat(B))}else if(oe>=0)for(var i=0;i<n;i++)p.push("".concat(r[o++]));else{var fe=n+oe;if(fe>0)for(var i=0;i<fe;i++)p.push("".concat(r[o++]));else p.push("0");for(p.push(".");fe++<0;)p.push("0");for(var i=0;i<n-Math.max(fe-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(Mc.prototype,"_bsontype",{value:"Decimal128"});var Zo=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(Zo.prototype,"_bsontype",{value:"Double"});var Jo=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(Jo.prototype,"_bsontype",{value:"Int32"});var Pc=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(Pc.prototype,"_bsontype",{value:"MaxKey"});var Lc=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(Lc.prototype,"_bsontype",{value:"MinKey"});var Iy=new RegExp("^[0-9a-fA-F]{24}$"),lr=null,wn=Symbol("id"),At=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 Je("Argument passed in must have an id that is of type string or Buffer");"toHexString"in e&&typeof e.toHexString=="function"?n=Re.from(e.toHexString(),"hex"):n=e.id}else n=e;if(n==null||typeof n=="number")this[wn]=t.generate(typeof n=="number"?n:void 0);else if(ArrayBuffer.isView(n)&&n.byteLength===12)this[wn]=n instanceof Re?n:Yo(n);else if(typeof n=="string")if(n.length===12){var r=Re.from(n);if(r.byteLength===12)this[wn]=r;else throw new Je("Argument passed in must be a string of 12 bytes")}else if(n.length===24&&Iy.test(n))this[wn]=Re.from(n,"hex");else throw new Je("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");else throw new Je("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[wn]},set:function(e){this[wn]=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=Re.alloc(12);return r.writeUInt32BE(e,0),lr===null&&(lr=Df(5)),r[4]=lr[0],r[5]=lr[1],r[6]=lr[2],r[7]=lr[3],r[8]=lr[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[wn][11]===e[wn][11]&&this[wn].equals(e[wn]);if(typeof e=="string"&&t.isValid(e)&&e.length===12&&Rc(this.id))return e===Re.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 Re.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=Re.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 Je("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new t(Re.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(At.prototype,"generate",{value:Xo(function(t){return At.generate(t)},"Please use the static `ObjectId.generate(time)` instead")});Object.defineProperty(At.prototype,"getInc",{value:Xo(function(){return At.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(At.prototype,"get_inc",{value:Xo(function(){return At.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(At,"get_inc",{value:Xo(function(){return At.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(At.prototype,"_bsontype",{value:"ObjectID"});function xy(t){return t.split("").sort().join("")}var Ii=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);if(this.pattern=e,this.options=xy(n??""),this.pattern.indexOf("\0")!==-1)throw new ur("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(this.options.indexOf("\0")!==-1)throw new ur("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 ur("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 Je("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(e)))},t}();Object.defineProperty(Ii.prototype,"_bsontype",{value:"BSONRegExp"});var kc=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(kc.prototype,"_bsontype",{value:"Symbol"});var Ty=le,Mf=function(t){Ko(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:xi(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}(Ty);function Oy(t){return xi(t)&&Reflect.has(t,"_bsontype")&&typeof t._bsontype=="string"}var Pf=2147483647,Lf=-2147483648,kf=9223372036854776e3,Ff=-9223372036854776e3,Dy={$oid:At,$binary:dr,$uuid:dr,$symbol:kc,$numberInt:Jo,$numberDecimal:Mc,$numberDouble:Zo,$numberLong:le,$minKey:Lc,$maxKey:Pc,$regex:Ii,$regularExpression:Ii,$timestamp:Mf};function Vf(t,e){if(e===void 0&&(e={}),typeof t=="number"){if(e.relaxed||e.legacy)return t;if(Math.floor(t)===t){if(t>=Lf&&t<=Pf)return new Jo(t);if(t>=Ff&&t<=kf)return le.fromNumber(t)}return new Zo(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=Dy[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=Vf(t.$scope)),qo.fromExtendedJSON(t)}if(fy(t)||t.$dbPointer){var u=t.$ref?t:t.$dbPointer;if(u instanceof Si)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 Si.fromExtendedJSON(u)}return t}function Ay(t,e){return t.map(function(n,r){e.seenObjects.push({propertyName:"index ".concat(r),obj:null});try{return Hn(n,e)}finally{e.seenObjects.pop()}})}function Cf(t){var e=t.toISOString();return t.getUTCMilliseconds()!==0?e:e.slice(0,-5)+"Z"}function Hn(t,e){if((typeof t=="object"||typeof t=="function")&&t!==null){var n=e.seenObjects.findIndex(function(H){return H.obj===t});if(n!==-1){var r=e.seenObjects.map(function(H){return H.propertyName}),i=r.slice(0,n).map(function(H){return"".concat(H," -> ")}).join(""),o=r[n],s=" -> "+r.slice(n+1,r.length-1).map(function(H){return"".concat(H," -> ")}).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 Je(`Converting circular structure to EJSON:
|
|
29
|
+
`)};Rt.prototype.renderPartial=function(e,n,r,i){if(r){var o=this.getConfigTags(i),s=nc(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)}}};Rt.prototype.unescapedValue=function(e,n){var r=n.lookup(e[1]);if(r!=null)return r};Rt.prototype.escapedValue=function(e,n,r){var i=this.getConfigEscape(r)||Jt.escape,o=n.lookup(e[1]);if(o!=null)return typeof o=="number"&&i===Jt.escape?String(o):i(o)};Rt.prototype.rawValue=function(e){return e[1]};Rt.prototype.getConfigTags=function(e){return Mr(e)?e:e&&typeof e=="object"?e.tags:void 0};Rt.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!Mr(e))return e.escape};var Jt={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){yi.templateCache=t},get templateCache(){return yi.templateCache}},yi=new Rt;Jt.clearCache=function(){return yi.clearCache()};Jt.parse=function(e,n){return yi.parse(e,n)};Jt.render=function(e,n,r,i){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+s_(e)+'" was given as the first argument for mustache#render(template, view, partials)');return yi.render(e,n,r,i)};Jt.escape=p_;Jt.Scanner=Ei;Jt.Context=Rr;Jt.Writer=Rt;var rc=Jt;rc.escape=Dd.escapeHtml;var Vo=class t{transform(e,n){return e?rc.render(e,D({},n)):null}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=Ui({name:"cooeeDynamicVariables",type:t,pure:!0})};var ic={};(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 U=v.transferToImageBitmap();try{y.createPattern(U,"no-repeat")}catch{return!1}return!0}();function u(){}function d(v){var y=n.exports.Promise,U=y!==void 0?y:e.Promise;return typeof U=="function"?new U(v):(v(u,u),null)}var g=function(v,y){return{transform:function(U){if(v)return U;if(y.has(U))return y.get(U);var J=new OffscreenCanvas(U.width,U.height),ne=J.getContext("2d");return ne.drawImage(U,0,0),y.set(U,J),J},clear:function(){y.clear()}}}(c,new Map),p=function(){var v=Math.floor(16.666666666666668),y,U,J={},ne=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(y=function(ie){var ue=Math.random();return J[ue]=requestAnimationFrame(function Q(ae){ne===ae||ne+v-1<ae?(ne=ae,delete J[ue],ie()):J[ue]=requestAnimationFrame(Q)}),ue},U=function(ie){J[ie]&&cancelAnimationFrame(J[ie])}):(y=function(ie){return setTimeout(ie,v)},U=function(ie){return clearTimeout(ie)}),{frame:y,cancel:U}}(),E=function(){var v,y,U={};function J(ne){function ie(ue,Q){ne.postMessage({options:ue||{},callback:Q})}ne.init=function(Q){var ae=Q.transferControlToOffscreen();ne.postMessage({canvas:ae},[ae])},ne.fire=function(Q,ae,ee){if(y)return ie(Q,null),y;var de=Math.random().toString(36).slice(2);return y=d(function(ce){function pe(he){he.data.callback===de&&(delete U[de],ne.removeEventListener("message",pe),y=null,g.clear(),ee(),ce())}ne.addEventListener("message",pe),ie(Q,de),U[de]=pe.bind(null,{data:{callback:de}})}),y},ne.reset=function(){ne.postMessage({reset:!0});for(var Q in U)U[Q](),delete U[Q]}}return function(){if(v)return v;if(!r&&o){var ne=["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(`
|
|
30
|
+
`);try{v=new Worker(URL.createObjectURL(new Blob([ne])))}catch(ie){return typeof console!==void 0&&typeof console.warn=="function"&&console.warn("\u{1F38A} Could not load worker",ie),null}J(v)}return v}}(),C={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 O(v,y){return y?y(v):v}function M(v){return v!=null}function k(v,y,U){return O(v&&M(v[y])?v[y]:C[y],U)}function j(v){return v<0?0:Math.floor(v)}function K(v,y){return Math.floor(Math.random()*(y-v))+v}function oe(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:oe(y.substring(0,2)),g:oe(y.substring(2,4)),b:oe(y.substring(4,6))}}function B(v){var y=k(v,"origin",Object);return y.x=k(y,"x",Number),y.y=k(y,"y",Number),y}function fe(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 Le(v,y,U,J,ne,ie,ue,Q,ae){v.save(),v.translate(y,U),v.rotate(ie),v.scale(J,ne),v.arc(0,0,1,ue,Q,ae),v.restore()}function De(v){var y=v.angle*(Math.PI/180),U=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*U-Math.random()*U),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 Ne(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 U=y.tick++/y.totalTicks,J=y.x+y.random*y.tiltCos,ne=y.y+y.random*y.tiltSin,ie=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-U)+")",v.beginPath(),s&&y.shape.type==="path"&&typeof y.shape.path=="string"&&Array.isArray(y.shape.matrix))v.fill(T(y.shape.path,y.shape.matrix,y.x,y.y,Math.abs(ie-J)*.1,Math.abs(ue-ne)*.1,Math.PI/10*y.wobble));else if(y.shape.type==="bitmap"){var Q=Math.PI/10*y.wobble,ae=Math.abs(ie-J)*.1,ee=Math.abs(ue-ne)*.1,de=y.shape.bitmap.width*y.scalar,ce=y.shape.bitmap.height*y.scalar,pe=new DOMMatrix([Math.cos(Q)*ae,Math.sin(Q)*ae,-Math.sin(Q)*ee,Math.cos(Q)*ee,y.x,y.y]);pe.multiplySelf(new DOMMatrix(y.shape.matrix));var he=v.createPattern(g.transform(y.shape.bitmap),"no-repeat");he.setTransform(pe),v.globalAlpha=1-U,v.fillStyle=he,v.fillRect(y.x-de/2,y.y-ce/2,de,ce),v.globalAlpha=1}else if(y.shape==="circle")v.ellipse?v.ellipse(y.x,y.y,Math.abs(ie-J)*y.ovalScalar,Math.abs(ue-ne)*y.ovalScalar,Math.PI/10*y.wobble,0,2*Math.PI):Le(v,y.x,y.y,Math.abs(ie-J)*y.ovalScalar,Math.abs(ue-ne)*y.ovalScalar,Math.PI/10*y.wobble,0,2*Math.PI);else if(y.shape==="star")for(var me=Math.PI/2*3,h=4*y.scalar,a=8*y.scalar,l=y.x,_=y.y,x=5,N=Math.PI/x;x--;)l=y.x+Math.cos(me)*a,_=y.y+Math.sin(me)*a,v.lineTo(l,_),me+=N,l=y.x+Math.cos(me)*h,_=y.y+Math.sin(me)*h,v.lineTo(l,_),me+=N;else v.moveTo(Math.floor(y.x),Math.floor(y.y)),v.lineTo(Math.floor(y.wobbleX),Math.floor(ne)),v.lineTo(Math.floor(ie),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,U,J,ne){var ie=y.slice(),ue=v.getContext("2d"),Q,ae,ee=d(function(de){function ce(){Q=ae=null,ue.clearRect(0,0,J.width,J.height),g.clear(),ne(),de()}function pe(){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&&(U(v),J.width=v.width,J.height=v.height),ue.clearRect(0,0,J.width,J.height),ie=ie.filter(function(he){return Ne(ue,he)}),ie.length?Q=p.frame(pe):ce()}Q=p.frame(pe),ae=ce});return{addFettis:function(de){return ie=ie.concat(de),ee},canvas:v,promise:ee,reset:function(){Q&&p.cancel(Q),ae&&ae()}}}function We(v,y){var U=!v,J=!!k(y||{},"resize"),ne=!1,ie=k(y,"disableForReducedMotion",Boolean),ue=o&&!!k(y||{},"useWorker"),Q=ue?E():null,ae=U?fe:te,ee=v&&Q?!!v.__confetti_initialized:!1,de=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,ce;function pe(me,h,a){for(var l=k(me,"particleCount",j),_=k(me,"angle",Number),x=k(me,"spread",Number),N=k(me,"startVelocity",Number),F=k(me,"decay",Number),_e=k(me,"gravity",Number),we=k(me,"drift",Number),be=k(me,"colors",X),Fe=k(me,"ticks",Number),Ve=k(me,"shapes"),qe=k(me,"scalar"),Lt=!!k(me,"flat"),$t=B(me),In=l,wt=[],Ft=v.width*$t.x,Ri=v.height*$t.y;In--;)wt.push(De({x:Ft,y:Ri,angle:_,spread:x,startVelocity:N,color:be[In%be.length],shape:Ve[K(0,Ve.length)],ticks:Fe,decay:F,gravity:_e,drift:we,scalar:qe,flat:Lt}));return ce?ce.addFettis(wt):(ce=Ge(v,wt,ae,h,a),ce.promise)}function he(me){var h=ie||k(me,"disableForReducedMotion",Boolean),a=k(me,"zIndex",Number);if(h&&de)return d(function(N){N()});U&&ce?v=ce.canvas:U&&!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 N={getBoundingClientRect:function(){if(!U)return v.getBoundingClientRect()}};ae(N),Q.postMessage({resize:{width:N.width,height:N.height}});return}l.width=l.height=null}function x(){ce=null,J&&(ne=!1,e.removeEventListener("resize",_)),U&&v&&(document.body.contains(v)&&document.body.removeChild(v),v=null,ee=!1)}return J&&!ne&&(ne=!0,e.addEventListener("resize",_,!1)),Q?Q.fire(me,l,x):pe(me,l,x)}return he.reset=function(){Q&&Q.reset(),ce&&ce.reset()},he}var dt;function A(){return dt||(dt=We(null,{useWorker:!0,resize:!0})),dt}function T(v,y,U,J,ne,ie,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)*ne,Math.sin(ue)*ne,-Math.sin(ue)*ie,Math.cos(ue)*ie,U,J])),ee}function L(v){if(!s)throw new Error("path confetti are not supported in this browser");var y,U;typeof v=="string"?y=v:(y=v.path,U=v.matrix);var J=new Path2D(y),ne=document.createElement("canvas"),ie=ne.getContext("2d");if(!U){for(var ue=1e3,Q=ue,ae=ue,ee=0,de=0,ce,pe,he=0;he<ue;he+=2)for(var me=0;me<ue;me+=2)ie.isPointInPath(J,he,me,"nonzero")&&(Q=Math.min(Q,he),ae=Math.min(ae,me),ee=Math.max(ee,he),de=Math.max(de,me));ce=ee-Q,pe=de-ae;var h=10,a=Math.min(h/ce,h/pe);U=[a,0,0,a,-Math.round(ce/2+Q)*a,-Math.round(pe/2+ae)*a]}return{type:"path",path:y,matrix:U}}function P(v){var y,U=1,J="#000000",ne='"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,U="scalar"in v?v.scalar:U,ne="fontFamily"in v?v.fontFamily:ne,J="color"in v?v.color:J);var ie=10*U,ue=""+ie+"px "+ne,Q=new OffscreenCanvas(ie,ie),ae=Q.getContext("2d");ae.font=ue;var ee=ae.measureText(y),de=Math.ceil(ee.actualBoundingBoxRight+ee.actualBoundingBoxLeft),ce=Math.ceil(ee.actualBoundingBoxAscent+ee.actualBoundingBoxDescent),pe=2,he=ee.actualBoundingBoxLeft+pe,me=ee.actualBoundingBoxAscent+pe;de+=pe+pe,ce+=pe+pe,Q=new OffscreenCanvas(de,ce),ae=Q.getContext("2d"),ae.font=ue,ae.fillStyle=J,ae.fillText(y,he,me);var h=1/U;return{type:"bitmap",bitmap:Q.transferToImageBitmap(),matrix:[h,0,0,h,-de*h/2,-ce*h/2]}}n.exports=function(){return A().apply(this,arguments)},n.exports.reset=function(){A().reset()},n.exports.create=We,n.exports.shapeFromPath=L,n.exports.shapeFromText=P})(function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}(),ic,!1);var Rd=ic.exports,DT=ic.exports.create;var Bo=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 Rd(e)}static async realisticFire(e,n){let i={origin:{y:.7}};await this.fire(Object.assign({},i,n,{particleCount:Math.floor(200*e)}))}};var b_=(t,e)=>e.minValue;function w_(t,e){if(t&1&&(Se(0,"div",7),yt(1,"safeHtml")),t&2){let n=Z().$implicit;ve("innerHTML",It(1,1,n.minValue+" Products"),nn)}}function C_(t,e){if(t&1&&(Se(0,"div",7),yt(1,"cooeeCurrency"),yt(2,"safeHtml")),t&2){let n=Z().$implicit;ve("innerHTML",It(2,3,It(1,1,n.minValue)),nn)}}function S_(t,e){if(t&1&&(W(0,"li",6)(1,"div"),Oe(2,w_,2,3,"div",7)(3,C_,3,5,"div",7),Se(4,"img",8),W(5,"div",9),xe(6),z()()()),t&2){let n=e.$implicit,r=Z(2);ni("left",n.calculatedAlignment+"%"),H(2),Ie((r.progressBarConfig==null?null:r.progressBarConfig.rewardBasis)===r.RewardBasis.ITEM_COUNT?2:3),H(2),ve("src",r.getIconURL(n),st),H(2),sn(n.label)}}function x_(t,e){if(t&1&&(vt(0)(1),Se(2,"div",0),yt(3,"cooeeDynamicVariables"),yt(4,"safeHtml"),W(5,"div",1)(6,"ul",2)(7,"div",3),Se(8,"div",4),z(),Ze(9,S_,7,5,"li",5,b_),z()()),t&2){let n=Z(),r=n.calculatedState(),i=r.nextMilestone?r.nextMilestone.reachingText:r.lastMilestone.reachedText;H(2),ve("innerHTML",It(4,6,Ml(3,3,i,n.localDynamicVariables())),nn),H(6),ni("width",r.cartValuePercentage+"%"),H(),Je(r.milestones)}}var Uo=class t extends hn{cart;localDynamicVariables=Wt({});calculatedState=Wt({});progressBarConfig;RewardBasis=Us;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=>_t.error(e))}async calculateMilestones(){let e=this.engagementTrigger,n=this.progressBarConfig;if(!n?.milestones?.length){_t.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;_t.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=sr(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||Bo.realistic())}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Re({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,x_,11,8),n&2&&Ie(r.calculatedState().milestonesReady?0:-1)},dependencies:[Vo,Bn,Cn],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))}
|
|
31
|
+
`],encapsulation:3})};var Md=Pi(Vs());var I_=(t,e)=>({enter:t,exit:e});function T_(t,e){if(t&1&&(W(0,"div",7),xe(1),z(),W(2,"div",8),xe(3),z()),t&2){let n=Z(2);H(),xt(" ",n.getCurrency(n.selectedVariant().price.cmp)," "),H(2),xt(" ",n.getDiscountPercentage(n.selectedVariant().price),"% off ")}}function O_(t,e){if(t&1&&(W(0,"div",6),xe(1),z()),t&2){let n=Z(2);H(),xt(" ",n.stickyATCConfig.leftText," ")}}function D_(t,e){if(t&1&&(W(0,"div",1)(1,"div",5),xe(2),z(),Oe(3,T_,4,2)(4,O_,2,1,"div",6),z()),t&2){let n=Z();H(2),xt(" ",n.getCurrency(n.selectedVariant().price.d)," "),H(),Ie(n.selectedVariant().price.cmp?3:-1),H(),Ie(n.stickyATCConfig.leftText?4:-1)}}function A_(t,e){if(t&1&&(W(0,"div",9),xe(1),z()),t&2){let n=e.$implicit,r=e.$index;Z(2);let i=pt(5);ve("ngClass",Nl(2,I_,r===i.currentIndex,r===i.previousIndex)),H(),xt(" ",n," ")}}function N_(t,e){if(t&1&&(W(0,"div",4),Ze(1,A_,2,5,"div",9,pn),z()),t&2){Z();let n=pt(5);H(),Je(n.features)}}var Ho=class t extends hn{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 sr(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(`
|
|
32
|
+
`),n=e.length===1?null:setInterval(()=>{this.featureSlider.update(r=>Te(D({},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,Md.render)(e,this.currentItem.getTemplateVariables()):""}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Re({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=Ye();W(0,"div",0),Oe(1,D_,5,3,"div",1),W(2,"div",2)(3,"button",3),Ae("click",function(){return Me(i),Pe(r.addToCart())}),xe(4,"Add To Cart"),z(),vt(5),Oe(6,N_,3,0,"div",4),z()()}if(n&2){H(),Ie(r.selectedVariant()&&r.stickyATCConfig.showProductInfo?1:-1),H(4);let i=Yt(r.featureSlider());H(),Ie(i.features.length?6:-1)}},dependencies:[Vn],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 Vd,je,Bd,lc,ar,Pd,Ud,Hd,jd,uc,sc,ac,R_,cc={},$d=[],M_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Go=Array.isArray;function Ln(t,e){for(var n in e)t[n]=e[n];return t}function dc(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function oc(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??++Bd,__i:-1,__u:0};return i==null&&je.vnode!=null&&je.vnode(o),o}function fc(t){return t.children}function Pr(t,e){this.props=t,this.context=e}function kr(t,e){if(e==null)return t.__?kr(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"?kr(t):null}function Gd(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 Gd(t)}}function kd(t){(!t.__d&&(t.__d=!0)&&ar.push(t)&&!$o.__r++||Pd!=je.debounceRendering)&&((Pd=je.debounceRendering)||Ud)($o)}function $o(){for(var t,e,n,r,i,o,s,c=1;ar.length;)ar.length>c&&ar.sort(Hd),t=ar.shift(),c=ar.length,t.__d&&(n=void 0,i=(r=(e=t).__v).__e,o=[],s=[],e.__P&&((n=Ln({},r)).__v=r.__v+1,je.vnode&&je.vnode(n),zd(e.__P,n,r,e.__n,e.__P.namespaceURI,32&r.__u?[i]:null,o,i??kr(r),!!(32&r.__u),s),n.__v=r.__v,n.__.__k[n.__i]=n,L_(o,n,s),n.__e!=i&&Gd(n)));$o.__r=0}function Wd(t,e,n,r,i,o,s,c,u,d,g){var p,E,C,O,M,k,j=r&&r.__k||$d,K=e.length;for(u=P_(n,e,j,u,K),p=0;p<K;p++)(C=n.__k[p])!=null&&(E=C.__i==-1?cc:j[C.__i]||cc,C.__i=p,k=zd(t,C,E,i,o,s,c,u,d,g),O=C.__e,C.ref&&E.ref!=C.ref&&(E.ref&&pc(E.ref,null,C),g.push(C.ref,C.__c||O,C)),M==null&&O!=null&&(M=O),4&C.__u||E.__k===C.__k?u=Yd(C,u,t):typeof C.type=="function"&&k!==void 0?u=k:O&&(u=O.nextSibling),C.__u&=-7);return n.__e=M,u}function P_(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?oc(null,s,null,null,null):Go(s)?oc(fc,{children:s},null,null,null):s.constructor==null&&s.__b>0?oc(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=k_(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=kr(c)),Xd(c,c));return r}function Yd(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=Yd(r[i],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=kr(t)),n.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function k_(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 Ld(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||M_.test(e)?n:n+"px"}function jo(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||Ld(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||Ld(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(jd,"$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=uc,t.addEventListener(e,o?ac:sc,o)):t.removeEventListener(e,o?ac:sc,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 Fd(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=uc++;else if(e.t<n.u)return;return n(je.event?je.event(e):e)}}}function zd(t,e,n,r,i,o,s,c,u,d){var g,p,E,C,O,M,k,j,K,oe,X,Ee,B,fe,te,ye,Le,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,oe=(g=De.contextType)&&r[g.__c],X=g?oe?oe.props.value:g.__:r,n.__c?k=(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=V_),oe&&oe.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=Ln({},p.__s)),Ln(p.__s,De.getDerivedStateFromProps(j,p.__s))),C=p.props,O=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!==C&&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(Ne){Ne&&(Ne.__=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(C,O,M)})}if(p.context=X,p.props=j,p.__P=t,p.__e=!1,B=je.__r,fe=0,K){for(p.state=p.__s,p.__d=!1,B&&B(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,B&&B(e),g=p.render(p.props,p.state,p.context),p.state=p.__s;while(p.__d&&++fe<25);p.state=p.__s,p.getChildContext!=null&&(r=Ln(Ln({},r),p.getChildContext())),K&&!E&&p.getSnapshotBeforeUpdate!=null&&(M=p.getSnapshotBeforeUpdate(C,O)),ye=g,g!=null&&g.type===fc&&g.key==null&&(ye=Kd(g.props.children)),c=Wd(t,Go(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),k&&(p.__E=p.__=null)}catch(Ne){if(e.__v=null,u||o!=null)if(Ne.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(Le=o.length;Le--;)dc(o[Le]);else e.__e=n.__e,e.__k=n.__k;je.__e(Ne,e,n)}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):c=e.__e=F_(n.__e,e,n,r,i,o,s,u,d);return(g=je.diffed)&&g(e),128&e.__u?void 0:c}function L_(t,e,n){for(var r=0;r<n.length;r++)pc(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 Kd(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:Go(t)?t.map(Kd):Ln({},t)}function F_(t,e,n,r,i,o,s,c,u){var d,g,p,E,C,O,M,k=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((C=o[d])&&"setAttribute"in C==!!K&&(K?C.localName==K:C.nodeType==3)){t=C,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)k===j||c&&t.data==j||(t.data=j);else{if(o=o&&Vd.call(t.childNodes),k=n.props||cc,!c&&o!=null)for(k={},d=0;d<t.attributes.length;d++)k[(C=t.attributes[d]).name]=C.value;for(d in k)if(C=k[d],d!="children"){if(d=="dangerouslySetInnerHTML")p=C;else if(!(d in j)){if(d=="value"&&"defaultValue"in j||d=="checked"&&"defaultChecked"in j)continue;jo(t,d,null,C,i)}}for(d in j)C=j[d],d=="children"?E=C:d=="dangerouslySetInnerHTML"?g=C:d=="value"?O=C:d=="checked"?M=C:c&&typeof C!="function"||k[d]===C||jo(t,d,C,k[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=""),Wd(e.type=="template"?t.content:t,Go(E)?E:[E],e,n,r,K=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&kr(n,0),c,u),o!=null)for(d=o.length;d--;)dc(o[d]);c||(d="value",K=="progress"&&O==null?t.removeAttribute("value"):O!=null&&(O!==t[d]||K=="progress"&&!O||K=="option"&&O!=k[d])&&jo(t,d,O,k[d],i),d="checked",M!=null&&M!=t[d]&&jo(t,d,M,k[d],i))}return t}function pc(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 Xd(t,e,n){var r,i;if(je.unmount&&je.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||pc(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]&&Xd(r[i],e,n||typeof t.type!="function");n||dc(t.__e),t.__c=t.__=t.__e=void 0}function V_(t,e,n){return this.constructor(t,n)}Vd=$d.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}},Bd=0,lc=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=Ln({},this.state),typeof t=="function"&&(t=t(Ln({},n),this.props)),t&&Ln(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),kd(this))},Pr.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),kd(this))},Pr.prototype.render=fc,ar=[],Ud=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Hd=function(t,e){return t.__v.__b-e.__v.__b},$o.__r=0,jd=/(PointerCapture)$|Capture$/i,uc=0,sc=Fd(!1),ac=Fd(!0),R_=0;var mc,jt,hc,qd,Zd=0,sf=[],ut=je,Jd=ut.__b,Qd=ut.__r,ef=ut.diffed,tf=ut.__c,nf=ut.unmount,rf=ut.__;function B_(t,e){ut.__h&&ut.__h(jt,t,Zd||e),Zd=0;var n=jt.__H||(jt.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function _c(t,e){var n=B_(mc++,7);return j_(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function U_(){for(var t;t=sf.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Wo),t.__H.__h.forEach(gc),t.__H.__h=[]}catch(e){t.__H.__h=[],ut.__e(e,t.__v)}}ut.__b=function(t){jt=null,Jd&&Jd(t)},ut.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),rf&&rf(t,e)},ut.__r=function(t){Qd&&Qd(t),mc=0;var e=(jt=t.__c).__H;e&&(hc===jt?(e.__h=[],jt.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach(Wo),e.__h.forEach(gc),e.__h=[],mc=0)),hc=jt},ut.diffed=function(t){ef&&ef(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(sf.push(e)!==1&&qd===ut.requestAnimationFrame||((qd=ut.requestAnimationFrame)||H_)(U_)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),hc=jt=null},ut.__c=function(t,e){e.some(function(n){try{n.__h.forEach(Wo),n.__h=n.__h.filter(function(r){return!r.__||gc(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],ut.__e(r,n.__v)}}),tf&&tf(t,e)},ut.unmount=function(t){nf&&nf(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Wo(r)}catch(i){e=i}}),n.__H=void 0,e&&ut.__e(e,n.__v))};var of=typeof requestAnimationFrame=="function";function H_(t){var e,n=function(){clearTimeout(r),of&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);of&&(e=requestAnimationFrame(n))}function Wo(t){var e=jt,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),jt=e}function gc(t){var e=jt;t.__c=t.__(),jt=e}function j_(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}var $_=Symbol.for("preact-signals");function yc(){if(Lr>1)Lr--;else{for(var t,e=!1;bi!==void 0;){var n=bi;for(bi=void 0,vc++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&cf(n))try{n.c()}catch(i){e||(t=i,e=!0)}n=r}}if(vc=0,Lr--,e)throw t}}var $e=void 0;var bi=void 0,Lr=0,vc=0,Yo=0;function af(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 mt(t){this.v=t,this.i=0,this.n=void 0,this.t=void 0}mt.prototype.brand=$_;mt.prototype.h=function(){return!0};mt.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)};mt.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)}};mt.prototype.subscribe=function(t){var e=this;return zo(function(){var n=e.value,r=$e;$e=void 0;try{t(n)}finally{$e=r}})};mt.prototype.valueOf=function(){return this.value};mt.prototype.toString=function(){return this.value+""};mt.prototype.toJSON=function(){return this.value};mt.prototype.peek=function(){var t=$e;$e=void 0;try{return this.value}finally{$e=t}};Object.defineProperty(mt.prototype,"value",{get:function(){var t=af(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(vc>100)throw new Error("Cycle detected");this.v=t,this.i++,Yo++,Lr++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{yc()}}}});function wi(t){return new mt(t)}function cf(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 lf(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 uf(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 Fr(t){mt.call(this,void 0),this.x=t,this.s=void 0,this.g=Yo-1,this.f=4}(Fr.prototype=new mt).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Yo))return!0;if(this.g=Yo,this.f|=1,this.i>0&&!cf(this))return this.f&=-2,!0;var t=$e;try{lf(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,uf(this),this.f&=-2,!0};Fr.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)}mt.prototype.S.call(this,t)};Fr.prototype.U=function(t){if(this.t!==void 0&&(mt.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)}};Fr.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(Fr.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=af(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function df(t){return new Fr(t)}function ff(t){var e=t.u;if(t.u=void 0,typeof e=="function"){Lr++;var n=$e;$e=void 0;try{e()}catch(r){throw t.f&=-2,t.f|=8,Ec(t),r}finally{$e=n,yc()}}}function Ec(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,ff(t)}function G_(t){if($e!==this)throw new Error("Out-of-order effect");uf(this),$e=t,this.f&=-2,8&this.f&&Ec(this),yc()}function Ci(t){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Ci.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()}};Ci.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,ff(this),lf(this),Lr++;var t=$e;return $e=this,G_.bind(this,t)};Ci.prototype.N=function(){2&this.f||(this.f|=2,this.o=bi,bi=this)};Ci.prototype.d=function(){this.f|=8,1&this.f||Ec(this)};function zo(t){var e=new Ci(t);try{e.c()}catch(n){throw e.d(),n}return e.d.bind(e)}var wc,bc;function Vr(t,e){je[t]=e.bind(null,je[t]||function(){})}function Ko(t){bc&&bc(),bc=t&&t.S()}function pf(t){var e=this,n=t.data,r=Y_(n);r.value=n;var i=_c(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(),lc(u)||((s=e.base)==null?void 0:s.nodeType)!==3?(e.__$f|=1,e.setState({})):e.base.data=u},df(function(){var s=r.value.value;return s===0?0:s===!0?"":s||""})},[]);return i.value}pf.displayName="_st";Object.defineProperties(mt.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:pf},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 mt&&(n||(e.__np=n={}),n[i]=o,r[i]=o.peek())}}t(e)});Vr("__r",function(t,e){Ko();var n,r=e.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(i){var o;return zo(function(){o=this}),o.c=function(){r.__$f|=1,r.setState({})},o}())),wc=r,Ko(n),t(e)});Vr("__e",function(t,e,n,r){Ko(),wc=void 0,t(e,n,r)});Vr("diffed",function(t,e){Ko(),wc=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=W_(n,u,g,i),o[u]=d):d.o(g,i)}}}t(e)});function W_(t,e,n,r){var i=e in t&&t.ownerSVGElement===void 0,o=wi(n);return{o:function(s,c){o.value=s,r=c},d:zo(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 Y_(t){return _c(function(){return wi(t)},[])}var Cc=(i=>(i.SIMPLE="SIMPLE",i.SWIPER="SWIPER",i.STORY="STORY",i.FLOATING_POPUP="FLOATING_POPUP",i))(Cc||{}),Sc=(r=>(r.ON="ON",r.OFF="OFF",r.ON_HOVER="ON_HOVER",r))(Sc||{}),Si=(r=>(r.FIRST_ITEM="FIRST_ITEM",r.CARD="CARD",r.NONE="NONE",r))(Si||{});function z_(t,e){return e={exports:{}},t(e,e.exports),e.exports}var K_=J_,X_=ev,q_=rv,xn=[],en=[],Z_=typeof Uint8Array<"u"?Uint8Array:Array,xc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(cr=0,hf=xc.length;cr<hf;++cr)xn[cr]=xc[cr],en[xc.charCodeAt(cr)]=cr;var cr,hf;en[45]=62;en[95]=63;function Af(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 J_(t){var e=Af(t),n=e[0],r=e[1];return(n+r)*3/4-r}function Q_(t,e,n){return(e+n)*3/4-n}function ev(t){var e,n=Af(t),r=n[0],i=n[1],o=new Z_(Q_(t,r,i)),s=0,c=i>0?r-4:r,u;for(u=0;u<c;u+=4)e=en[t.charCodeAt(u)]<<18|en[t.charCodeAt(u+1)]<<12|en[t.charCodeAt(u+2)]<<6|en[t.charCodeAt(u+3)],o[s++]=e>>16&255,o[s++]=e>>8&255,o[s++]=e&255;return i===2&&(e=en[t.charCodeAt(u)]<<2|en[t.charCodeAt(u+1)]>>4,o[s++]=e&255),i===1&&(e=en[t.charCodeAt(u)]<<10|en[t.charCodeAt(u+1)]<<4|en[t.charCodeAt(u+2)]>>2,o[s++]=e>>8&255,o[s++]=e&255),o}function tv(t){return xn[t>>18&63]+xn[t>>12&63]+xn[t>>6&63]+xn[t&63]}function nv(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(tv(r));return i.join("")}function rv(t){for(var e,n=t.length,r=n%3,i=[],o=16383,s=0,c=n-r;s<c;s+=o)i.push(nv(t,s,s+o>c?c:s+o));return r===1?(e=t[n-1],i.push(xn[e>>2]+xn[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],i.push(xn[e>>10]+xn[e>>4&63]+xn[e<<2&63]+"=")),i.join("")}var Ic={byteLength:K_,toByteArray:X_,fromByteArray:q_};var iv=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,C=r?-1:1,O=e[n+E];for(E+=C,s=O&(1<<-p)-1,O>>=-p,p+=u;p>0;s=s*256+e[n+E],E+=C,p-=8);for(c=s&(1<<-p)-1,s>>=-p,p+=i;p>0;c=c*256+e[n+E],E+=C,p-=8);if(s===0)s=1-g;else{if(s===d)return c?NaN:(O?-1:1)*(1/0);c=c+Math.pow(2,i),s=s-g}return(O?-1:1)*c*Math.pow(2,s-i)},ov=function(e,n,r,i,o,s){var c,u,d,g=s*8-o-1,p=(1<<g)-1,E=p>>1,C=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,O=i?0:s-1,M=i?1:-1,k=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+=C/d:n+=C*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+O]=u&255,O+=M,u/=256,o-=8);for(c=c<<o|u,g+=o;g>0;e[r+O]=c&255,O+=M,c/=256,g-=8);e[r+O-M]|=k*128},Br={read:iv,write:ov},Zo=z_(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 C(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(pe(h,ArrayBuffer)||h&&pe(h.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(pe(h,SharedArrayBuffer)||h&&pe(h.buffer,SharedArrayBuffer)))return O(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 x=M(h);if(x)return x;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:k(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),x=_.write(h,a);return x!==l&&(_=_.slice(0,x)),_}function E(h){for(var a=h.length<0?0:k(h.length)|0,l=o(a),_=0;_<a;_+=1)l[_]=h[_]&255;return l}function C(h){if(pe(h,Uint8Array)){var a=new Uint8Array(h);return O(a.buffer,a.byteOffset,a.byteLength)}return E(h)}function O(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=k(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"||he(h.length)?o(0):E(h);if(h.type==="Buffer"&&Array.isArray(h.data))return E(h.data)}function k(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(pe(a,Uint8Array)&&(a=s.from(a,a.offset,a.byteLength)),pe(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,x=l.length,N=0,F=Math.min(_,x);N<F;++N)if(a[N]!==l[N]){_=a[N],x=l[N];break}return _<x?-1:x<_?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 x=s.allocUnsafe(l),N=0;for(_=0;_<a.length;++_){var F=a[_];if(pe(F,Uint8Array))N+F.length>x.length?s.from(F).copy(x,N):Uint8Array.prototype.set.call(x,F,N);else if(s.isBuffer(F))F.copy(x,N);else throw new TypeError('"list" argument must be an Array of Buffers');N+=F.length}return x};function K(h,a){if(s.isBuffer(h))return h.length;if(ArrayBuffer.isView(h)||pe(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 x=!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 de(h).length;default:if(x)return _?-1:Q(h).length;a=(""+a).toLowerCase(),x=!0}}s.byteLength=K;function oe(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 L(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 T(this,a,l);case"base64":return Ne(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):oe.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,_,x,N){if(pe(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),x===void 0&&(x=0),N===void 0&&(N=this.length),l<0||_>a.length||x<0||N>this.length)throw new RangeError("out of range index");if(x>=N&&l>=_)return 0;if(x>=N)return-1;if(l>=_)return 1;if(l>>>=0,_>>>=0,x>>>=0,N>>>=0,this===a)return 0;for(var F=N-x,_e=_-l,we=Math.min(F,_e),be=this.slice(x,N),Fe=a.slice(l,_),Ve=0;Ve<we;++Ve)if(be[Ve]!==Fe[Ve]){F=be[Ve],_e=Fe[Ve];break}return F<_e?-1:_e<F?1:0};function Ee(h,a,l,_,x){if(h.length===0)return-1;if(typeof l=="string"?(_=l,l=0):l>2147483647?l=2147483647:l<-2147483648&&(l=-2147483648),l=+l,he(l)&&(l=x?0:h.length-1),l<0&&(l=h.length+l),l>=h.length){if(x)return-1;l=h.length-1}else if(l<0)if(x)l=0;else return-1;if(typeof a=="string"&&(a=s.from(a,_)),s.isBuffer(a))return a.length===0?-1:B(h,a,l,_,x);if(typeof a=="number")return a=a&255,typeof Uint8Array.prototype.indexOf=="function"?x?Uint8Array.prototype.indexOf.call(h,a,l):Uint8Array.prototype.lastIndexOf.call(h,a,l):B(h,[a],l,_,x);throw new TypeError("val must be string, number or Buffer")}function B(h,a,l,_,x){var N=1,F=h.length,_e=a.length;if(_!==void 0&&(_=String(_).toLowerCase(),_==="ucs2"||_==="ucs-2"||_==="utf16le"||_==="utf-16le")){if(h.length<2||a.length<2)return-1;N=2,F/=2,_e/=2,l/=2}function we(Lt,$t){return N===1?Lt[$t]:Lt.readUInt16BE($t*N)}var be;if(x){var Fe=-1;for(be=l;be<F;be++)if(we(h,be)===we(a,Fe===-1?0:be-Fe)){if(Fe===-1&&(Fe=be),be-Fe+1===_e)return Fe*N}else Fe!==-1&&(be-=be-Fe),Fe=-1}else for(l+_e>F&&(l=F-_e),be=l;be>=0;be--){for(var Ve=!0,qe=0;qe<_e;qe++)if(we(h,be+qe)!==we(a,qe)){Ve=!1;break}if(Ve)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 fe(h,a,l,_){l=Number(l)||0;var x=h.length-l;_?(_=Number(_),_>x&&(_=x)):_=x;var N=a.length;_>N/2&&(_=N/2);for(var F=0;F<_;++F){var _e=parseInt(a.substr(F*2,2),16);if(he(_e))return F;h[l+F]=_e}return F}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 Le(h,a,l,_){return ce(de(a),h,l,_)}function De(h,a,l,_){return ce(ee(a,h.length-l),h,l,_)}s.prototype.write=function(a,l,_,x){if(l===void 0)x="utf8",_=this.length,l=0;else if(_===void 0&&typeof l=="string")x=l,_=this.length,l=0;else if(isFinite(l))l=l>>>0,isFinite(_)?(_=_>>>0,x===void 0&&(x="utf8")):(x=_,_=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var N=this.length-l;if((_===void 0||_>N)&&(_=N),a.length>0&&(_<0||l<0)||l>this.length)throw new RangeError("Attempt to write outside buffer bounds");x||(x="utf8");for(var F=!1;;)switch(x){case"hex":return fe(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 Le(this,a,l,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return De(this,a,l,_);default:if(F)throw new TypeError("Unknown encoding: "+x);x=(""+x).toLowerCase(),F=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ne(h,a,l){return a===0&&l===h.length?Ic.fromByteArray(h):Ic.fromByteArray(h.slice(a,l))}function Ge(h,a,l){l=Math.min(h.length,l);for(var _=[],x=a;x<l;){var N=h[x],F=null,_e=N>239?4:N>223?3:N>191?2:1;if(x+_e<=l){var we,be,Fe,Ve;switch(_e){case 1:N<128&&(F=N);break;case 2:we=h[x+1],(we&192)===128&&(Ve=(N&31)<<6|we&63,Ve>127&&(F=Ve));break;case 3:we=h[x+1],be=h[x+2],(we&192)===128&&(be&192)===128&&(Ve=(N&15)<<12|(we&63)<<6|be&63,Ve>2047&&(Ve<55296||Ve>57343)&&(F=Ve));break;case 4:we=h[x+1],be=h[x+2],Fe=h[x+3],(we&192)===128&&(be&192)===128&&(Fe&192)===128&&(Ve=(N&15)<<18|(we&63)<<12|(be&63)<<6|Fe&63,Ve>65535&&Ve<1114112&&(F=Ve))}}F===null?(F=65533,_e=1):F>65535&&(F-=65536,_.push(F>>>10&1023|55296),F=56320|F&1023),_.push(F),x+=_e}return dt(_)}var We=4096;function dt(h){var a=h.length;if(a<=We)return String.fromCharCode.apply(String,h);for(var l="",_=0;_<a;)l+=String.fromCharCode.apply(String,h.slice(_,_+=We));return l}function A(h,a,l){var _="";l=Math.min(h.length,l);for(var x=a;x<l;++x)_+=String.fromCharCode(h[x]&127);return _}function T(h,a,l){var _="";l=Math.min(h.length,l);for(var x=a;x<l;++x)_+=String.fromCharCode(h[x]);return _}function L(h,a,l){var _=h.length;(!a||a<0)&&(a=0),(!l||l<0||l>_)&&(l=_);for(var x="",N=a;N<l;++N)x+=me[h[N]];return x}function P(h,a,l){for(var _=h.slice(a,l),x="",N=0;N<_.length-1;N+=2)x+=String.fromCharCode(_[N]+_[N+1]*256);return x}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 x=this.subarray(a,l);return Object.setPrototypeOf(x,s.prototype),x};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 x=this[a],N=1,F=0;++F<l&&(N*=256);)x+=this[a+F]*N;return x},s.prototype.readUintBE=s.prototype.readUIntBE=function(a,l,_){a=a>>>0,l=l>>>0,_||v(a,l,this.length);for(var x=this[a+--l],N=1;l>0&&(N*=256);)x+=this[a+--l]*N;return x},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 x=this[a],N=1,F=0;++F<l&&(N*=256);)x+=this[a+F]*N;return N*=128,x>=N&&(x-=Math.pow(2,8*l)),x},s.prototype.readIntBE=function(a,l,_){a=a>>>0,l=l>>>0,_||v(a,l,this.length);for(var x=l,N=1,F=this[a+--x];x>0&&(N*=256);)F+=this[a+--x]*N;return N*=128,F>=N&&(F-=Math.pow(2,8*l)),F},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,_,x,N){if(!s.isBuffer(h))throw new TypeError('"buffer" argument must be a Buffer instance');if(a>x||a<N)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,_,x){if(a=+a,l=l>>>0,_=_>>>0,!x){var N=Math.pow(2,8*_)-1;y(this,a,l,_,N,0)}var F=1,_e=0;for(this[l]=a&255;++_e<_&&(F*=256);)this[l+_e]=a/F&255;return l+_},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(a,l,_,x){if(a=+a,l=l>>>0,_=_>>>0,!x){var N=Math.pow(2,8*_)-1;y(this,a,l,_,N,0)}var F=_-1,_e=1;for(this[l+F]=a&255;--F>=0&&(_e*=256);)this[l+F]=a/_e&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,_,x){if(a=+a,l=l>>>0,!x){var N=Math.pow(2,8*_-1);y(this,a,l,_,N-1,-N)}var F=0,_e=1,we=0;for(this[l]=a&255;++F<_&&(_e*=256);)a<0&&we===0&&this[l+F-1]!==0&&(we=1),this[l+F]=(a/_e>>0)-we&255;return l+_},s.prototype.writeIntBE=function(a,l,_,x){if(a=+a,l=l>>>0,!x){var N=Math.pow(2,8*_-1);y(this,a,l,_,N-1,-N)}var F=_-1,_e=1,we=0;for(this[l+F]=a&255;--F>=0&&(_e*=256);)a<0&&we===0&&this[l+F+1]!==0&&(we=1),this[l+F]=(a/_e>>0)-we&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 U(h,a,l,_,x,N){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,_,x){return a=+a,l=l>>>0,x||U(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 ne(h,a,l,_,x){return a=+a,l=l>>>0,x||U(h,a,l,8),Br.write(h,a,l,_,52,8),l+8}s.prototype.writeDoubleLE=function(a,l,_){return ne(this,a,l,!0,_)},s.prototype.writeDoubleBE=function(a,l,_){return ne(this,a,l,!1,_)},s.prototype.copy=function(a,l,_,x){if(!s.isBuffer(a))throw new TypeError("argument should be a Buffer");if(_||(_=0),!x&&x!==0&&(x=this.length),l>=a.length&&(l=a.length),l||(l=0),x>0&&x<_&&(x=_),x===_||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(x<0)throw new RangeError("sourceEnd out of bounds");x>this.length&&(x=this.length),a.length-l<x-_&&(x=a.length-l+_);var N=x-_;return this===a&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(l,_,x):Uint8Array.prototype.set.call(a,this.subarray(_,x),l),N},s.prototype.fill=function(a,l,_,x){if(typeof a=="string"){if(typeof l=="string"?(x=l,l=0,_=this.length):typeof _=="string"&&(x=_,_=this.length),x!==void 0&&typeof x!="string")throw new TypeError("encoding must be a string");if(typeof x=="string"&&!s.isEncoding(x))throw new TypeError("Unknown encoding: "+x);if(a.length===1){var N=a.charCodeAt(0);(x==="utf8"&&N<128||x==="latin1")&&(a=N)}}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 F;if(typeof a=="number")for(F=l;F<_;++F)this[F]=a;else{var _e=s.isBuffer(a)?a:s.from(a,x),we=_e.length;if(we===0)throw new TypeError('The value "'+a+'" is invalid for argument "value"');for(F=0;F<_-l;++F)this[F+l]=_e[F%we]}return this};var ie=/[^+/0-9A-Za-z-_]/g;function ue(h){if(h=h.split("=")[0],h=h.trim().replace(ie,""),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,x=null,N=[],F=0;F<_;++F){if(l=h.charCodeAt(F),l>55295&&l<57344){if(!x){if(l>56319){(a-=3)>-1&&N.push(239,191,189);continue}else if(F+1===_){(a-=3)>-1&&N.push(239,191,189);continue}x=l;continue}if(l<56320){(a-=3)>-1&&N.push(239,191,189),x=l;continue}l=(x-55296<<10|l-56320)+65536}else x&&(a-=3)>-1&&N.push(239,191,189);if(x=null,l<128){if((a-=1)<0)break;N.push(l)}else if(l<2048){if((a-=2)<0)break;N.push(l>>6|192,l&63|128)}else if(l<65536){if((a-=3)<0)break;N.push(l>>12|224,l>>6&63|128,l&63|128)}else if(l<1114112){if((a-=4)<0)break;N.push(l>>18|240,l>>12&63|128,l>>6&63|128,l&63|128)}else throw new Error("Invalid code point")}return N}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,_,x,N=[],F=0;F<h.length&&!((a-=2)<0);++F)l=h.charCodeAt(F),_=l>>8,x=l%256,N.push(x),N.push(_);return N}function de(h){return Ic.toByteArray(ue(h))}function ce(h,a,l,_){for(var x=0;x<_&&!(x+l>=a.length||x>=h.length);++x)a[x+l]=h[x];return x}function pe(h,a){return h instanceof a||h!=null&&h.constructor!=null&&h.constructor.name!=null&&h.constructor.name===a.name}function he(h){return h!==h}var me=function(){for(var h="0123456789abcdef",a=new Array(256),l=0;l<16;++l)for(var _=l*16,x=0;x<16;++x)a[_+x]=h[l]+h[x];return a}()}),ke=Zo.Buffer;Zo.SlowBuffer;Zo.INSPECT_MAX_BYTES;Zo.kMaxLength;var Nc=function(e,n){return Nc=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])},Nc(e,n)};function Jo(t,e){Nc(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var ur=function(t){Jo(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){Jo(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 Xo(t){return t&&t.Math==Math&&t}function Nf(){return Xo(typeof globalThis=="object"&&globalThis)||Xo(typeof window=="object"&&window)||Xo(typeof self=="object"&&self)||Xo(typeof global=="object"&&global)||Function("return this")()}function sv(){var t=Nf();return typeof t.navigator=="object"&&t.navigator.product==="ReactNative"}var av=function(e){var n=sv()?"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=ke.alloc(e),i=0;i<e;++i)r[i]=Math.floor(Math.random()*256);return r},cv=function(){{if(typeof window<"u"){var t=window.crypto||window.msCrypto;if(t&&t.getRandomValues)return function(e){return t.getRandomValues(ke.alloc(e))}}return typeof global<"u"&&global.crypto&&global.crypto.getRandomValues?function(e){return global.crypto.getRandomValues(ke.alloc(e))}:av}},Rf=cv();function lv(t){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(t))}function Mc(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}function uv(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function dv(t){return Oi(t)&&Object.prototype.toString.call(t)==="[object Date]"}function Oi(t){return typeof t=="object"&&t!==null}function Qo(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 qo(t){if(ArrayBuffer.isView(t))return ke.from(t.buffer,t.byteOffset,t.byteLength);if(lv(t))return ke.from(t);throw new Qe("Must use either Buffer or TypedArray")}var fv=/^(?:[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,Mf=function(t){return typeof t=="string"&&fv.test(t)},Rc=function(t){if(!Mf(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 ke.from(e,"hex")},mf=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 UO=Math.pow(2,63)-1,HO=-Math.pow(2,63),pv=Math.pow(2,53),hv=-Math.pow(2,53);var Pf=4;var dr=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=ke.alloc(t.BUFFER_SIZE),this.position=0):(typeof e=="string"?this.buffer=ke.from(e,"binary"):Array.isArray(e)?this.buffer=ke.from(e):this.buffer=qo(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=ke.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=ke.alloc(this.buffer.length+e.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r}ArrayBuffer.isView(e)?(this.buffer.set(qo(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 gf(this.buffer.slice(0,this.position));throw new ur('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=ke.from(e.$binary,"base64")):typeof e.$binary!="string"&&(i=e.$binary.subType?parseInt(e.$binary.subType,16):0,r=ke.from(e.$binary.base64,"base64")):"$uuid"in e&&(i=4,r=Rc(e.$uuid)),!r)throw new Qe("Unexpected Binary Extended JSON format ".concat(JSON.stringify(e)));return i===Pf?new gf(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(dr.prototype,"_bsontype",{value:"Binary"});var Tc=16,gf=function(t){Jo(e,t);function e(n){var r=this,i,o;if(n==null)i=e.generate();else if(n instanceof e)i=ke.from(n.buffer),o=n.__id;else if(ArrayBuffer.isView(n)&&n.byteLength===Tc)i=qo(n);else if(typeof n=="string")i=Rc(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,Pf)||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=mf(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=mf(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 dr(this.id,dr.SUBTYPE_UUID)},e.generate=function(){var n=Rf(Tc);return n[6]=n[6]&15|64,n[8]=n[8]&63|128,ke.from(n)},e.isValid=function(n){return n?n instanceof e?!0:typeof n=="string"?Mf(n):Mc(n)?n.length!==Tc?!1:(n[6]&240)===64&&(n[8]&128)===128:!1:!1},e.createFromHexString=function(n){var r=Rc(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}(dr),es=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(es.prototype,"_bsontype",{value:"Code"});function mv(t){return Oi(t)&&t.$id!=null&&typeof t.$ref=="string"&&(t.$db==null||typeof t.$db=="string")}var Ii=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(Ii.prototype,"_bsontype",{value:"DBRef"});var Qt=void 0;try{Qt=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 _f=65536,gv=1<<24,Hr=_f*_f,kf=Hr*Hr,vf=kf/2,yf={},Ef={},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=Ef[e],i)?i:(r=t.fromBits(e,(e|0)<0?-1:0,!0),o&&(Ef[e]=r),r)):(e|=0,(o=-128<=e&&e<128)&&(i=yf[e],i)?i:(r=t.fromBits(e,e<0?-1:0,!1),o&&(yf[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>=kf)return t.MAX_UNSIGNED_VALUE}else{if(e<=-vf)return t.MIN_VALUE;if(e+1>=vf)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 Oi(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,C=0;return C+=o+d,E+=C>>>16,C&=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|C,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(Qt){if(!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1)return this;var n=(this.unsigned?Qt.div_u:Qt.div_s)(this.low,this.high,e.low,e.high);return t.fromBits(n,Qt.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)),Qt){var n=(this.unsigned?Qt.rem_u:Qt.rem_s)(this.low,this.high,e.low,e.high);return t.fromBits(n,Qt.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)),Qt){var n=Qt.mul(this.low,this.high,e.low,e.high);return t.fromBits(n,Qt.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,C=0,O=0;return O+=s*g,C+=O>>>16,O&=65535,C+=o*g,E+=C>>>16,C&=65535,C+=s*d,E+=C>>>16,C&=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(C<<16|O,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(gv),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 _v=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,vv=/^(\+|-)?(Infinity|inf)$/i,yv=/^(\+|-)?NaN$/i,xi=6111,Oc=-6176,bf=6176,Ev=34,Dc=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),wf=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Cf=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),bv=/^([-+])?(\d+)?$/,wv=31,Sf=16383,Cv=30,Sv=31;function xf(t){return!isNaN(parseInt(t,10))}function xv(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 Iv(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 Tv(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 Pc=function(){function t(e){if(!(this instanceof t))return new t(e);if(typeof e=="string")this.bytes=t.fromString(e).bytes;else if(Mc(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,C=0,O=0,M=0,k=0,j=new le(0,0),K=new le(0,0),oe=0,X=0;if(e.length>=7e3)throw new Qe(""+e+" not a valid Decimal128 string");var Ee=e.match(_v),B=e.match(vv),fe=e.match(yv);if(!Ee&&!B&&!fe||e.length===0)throw new Qe(""+e+" not a valid Decimal128 string");if(Ee){var te=Ee[2],ye=Ee[4],Le=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&&(Le||De)&&Ur(e,"missing e before exponent")}if((e[X]==="+"||e[X]==="-")&&(n=e[X++]==="-"),!xf(e[X])&&e[X]!=="."){if(e[X]==="i"||e[X]==="I")return new t(ke.from(n?wf:Cf));if(e[X]==="N")return new t(ke.from(Dc))}for(;xf(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 Ne=e.substr(++X).match(bv);if(!Ne||!Ne[2])return new t(ke.from(Dc));M=parseInt(Ne[0],10),X=X+Ne[0].length}if(e[X])return new t(ke.from(Dc));if(C=0,!p)C=0,O=0,g[0]=0,c=1,p=1,o=0;else if(O=p-1,o=c,o!==1)for(;g[d+o-1]===0;)o=o-1;for(M<=u&&u-M>16384?M=Oc:M=M-u;M>xi;){if(O=O+1,O-C>Ev){var Ge=g.join("");if(Ge.match(/^0+$/)){M=xi;break}Ur(e,"overflow")}M=M-1}for(;M<Oc||p<c;){if(O===0&&o<p){M=Oc,o=0;break}if(p<c?c=c-1:O=O-1,M<xi)M=M+1;else{var Ge=g.join("");if(Ge.match(/^0+$/)){M=xi;break}Ur(e,"overflow")}}if(O-C+1<o){var We=s;r&&(d=d+1,We=We+1),n&&(d=d+1,We=We+1);var dt=parseInt(e[d+O+1],10),A=0;if(dt>=5&&(A=1,dt===5)){for(A=g[O]%2===1?1:0,k=d+O+2;k<We;k++)if(parseInt(e[k],10)){A=1;break}}if(A){for(var T=O;T>=0;T--)if(++g[T]>9&&(g[T]=0,T===0))if(M<xi)M=M+1,g[T]=1;else return new t(ke.from(n?wf:Cf))}}if(j=le.fromNumber(0),K=le.fromNumber(0),o===0)j=le.fromNumber(0),K=le.fromNumber(0);else if(O-C<17){var T=C;for(K=le.fromNumber(g[T++]),j=new le(0,0);T<=O;T++)K=K.multiply(le.fromNumber(10)),K=K.add(le.fromNumber(g[T]))}else{var T=C;for(j=le.fromNumber(g[T++]);T<=O-17;T++)j=j.multiply(le.fromNumber(10)),j=j.add(le.fromNumber(g[T]));for(K=le.fromNumber(g[T++]);T<=O;T++)K=K.multiply(le.fromNumber(10)),K=K.add(le.fromNumber(g[T]))}var L=Iv(j,le.fromString("100000000000000000"));L.low=L.low.add(K),Tv(L.low,K)&&(L.high=L.high.add(le.fromNumber(1))),oe=M+bf;var P={low:le.fromNumber(0),high:le.fromNumber(0)};L.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(oe).and(le.fromNumber(16383).shiftLeft(47))),P.high=P.high.or(L.high.and(le.fromNumber(0x7fffffffffff)))):(P.high=P.high.or(le.fromNumber(oe&16383).shiftLeft(49)),P.high=P.high.or(L.high.and(le.fromNumber(562949953421311)))),P.low=L.low,n&&(P.high=P.high.or(le.fromString("9223372036854775808")));var v=ke.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,C=E[o++]|E[o++]<<8|E[o++]<<16|E[o++]<<24,O=E[o++]|E[o++]<<8|E[o++]<<16|E[o++]<<24,M=E[o++]|E[o++]<<8|E[o++]<<16|E[o++]<<24,k=E[o++]|E[o++]<<8|E[o++]<<16|E[o++]<<24;o=0;var j={low:new le(C,O),high:new le(M,k)};j.high.lessThan(le.ZERO)&&p.push("-");var K=k>>26&wv;if(K>>3===3){if(K===Cv)return p.join("")+"Infinity";if(K===Sv)return"NaN";e=k>>15&Sf,c=8+(k>>14&1)}else c=k>>14&7,e=k>>17&Sf;var oe=e-bf;if(u.parts[0]=(k&16383)+((c&15)<<14),u.parts[1]=M,u.parts[2]=O,u.parts[3]=C,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=xv(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 B=n-1+oe;if(B>=34||B<=-7||oe>0){if(n>34)return p.push("".concat(0)),oe>0?p.push("E+".concat(oe)):oe<0&&p.push("E".concat(oe)),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"),B>0?p.push("+".concat(B)):p.push("".concat(B))}else if(oe>=0)for(var i=0;i<n;i++)p.push("".concat(r[o++]));else{var fe=n+oe;if(fe>0)for(var i=0;i<fe;i++)p.push("".concat(r[o++]));else p.push("0");for(p.push(".");fe++<0;)p.push("0");for(var i=0;i<n-Math.max(fe-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(Pc.prototype,"_bsontype",{value:"Decimal128"});var ts=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(ts.prototype,"_bsontype",{value:"Double"});var ns=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(ns.prototype,"_bsontype",{value:"Int32"});var kc=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(kc.prototype,"_bsontype",{value:"MaxKey"});var Lc=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(Lc.prototype,"_bsontype",{value:"MinKey"});var Ov=new RegExp("^[0-9a-fA-F]{24}$"),lr=null,Sn=Symbol("id"),Mt=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=ke.from(e.toHexString(),"hex"):n=e.id}else n=e;if(n==null||typeof n=="number")this[Sn]=t.generate(typeof n=="number"?n:void 0);else if(ArrayBuffer.isView(n)&&n.byteLength===12)this[Sn]=n instanceof ke?n:qo(n);else if(typeof n=="string")if(n.length===12){var r=ke.from(n);if(r.byteLength===12)this[Sn]=r;else throw new Qe("Argument passed in must be a string of 12 bytes")}else if(n.length===24&&Ov.test(n))this[Sn]=ke.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[Sn]},set:function(e){this[Sn]=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=ke.alloc(12);return r.writeUInt32BE(e,0),lr===null&&(lr=Rf(5)),r[4]=lr[0],r[5]=lr[1],r[6]=lr[2],r[7]=lr[3],r[8]=lr[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[Sn][11]===e[Sn][11]&&this[Sn].equals(e[Sn]);if(typeof e=="string"&&t.isValid(e)&&e.length===12&&Mc(this.id))return e===ke.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 ke.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=ke.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(ke.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(Mt.prototype,"generate",{value:Qo(function(t){return Mt.generate(t)},"Please use the static `ObjectId.generate(time)` instead")});Object.defineProperty(Mt.prototype,"getInc",{value:Qo(function(){return Mt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Mt.prototype,"get_inc",{value:Qo(function(){return Mt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Mt,"get_inc",{value:Qo(function(){return Mt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Mt.prototype,"_bsontype",{value:"ObjectID"});function Dv(t){return t.split("").sort().join("")}var Ti=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);if(this.pattern=e,this.options=Dv(n??""),this.pattern.indexOf("\0")!==-1)throw new ur("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(this.options.indexOf("\0")!==-1)throw new ur("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 ur("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(Ti.prototype,"_bsontype",{value:"BSONRegExp"});var Fc=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(Fc.prototype,"_bsontype",{value:"Symbol"});var Av=le,Lf=function(t){Jo(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:Oi(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}(Av);function Nv(t){return Oi(t)&&Reflect.has(t,"_bsontype")&&typeof t._bsontype=="string"}var Ff=2147483647,Vf=-2147483648,Bf=9223372036854776e3,Uf=-9223372036854776e3,Rv={$oid:Mt,$binary:dr,$uuid:dr,$symbol:Fc,$numberInt:ns,$numberDecimal:Pc,$numberDouble:ts,$numberLong:le,$minKey:Lc,$maxKey:kc,$regex:Ti,$regularExpression:Ti,$timestamp:Lf};function Hf(t,e){if(e===void 0&&(e={}),typeof t=="number"){if(e.relaxed||e.legacy)return t;if(Math.floor(t)===t){if(t>=Vf&&t<=Ff)return new ns(t);if(t>=Uf&&t<=Bf)return le.fromNumber(t)}return new ts(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=Rv[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=Hf(t.$scope)),es.fromExtendedJSON(t)}if(mv(t)||t.$dbPointer){var u=t.$ref?t:t.$dbPointer;if(u instanceof Ii)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 Ii.fromExtendedJSON(u)}return t}function Mv(t,e){return t.map(function(n,r){e.seenObjects.push({propertyName:"index ".concat(r),obj:null});try{return Hn(n,e)}finally{e.seenObjects.pop()}})}function If(t){var e=t.toISOString();return t.getUTCMilliseconds()!==0?e:e.slice(0,-5)+"Z"}function Hn(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:
|
|
33
33
|
`+" ".concat(i).concat(o).concat(s).concat(c,`
|
|
34
|
-
`)+" ".concat(u,"\\").concat(d,"/"))}e.seenObjects[e.seenObjects.length-1].obj=t}if(Array.isArray(t))return Ay(t,e);if(t===void 0)return null;if(t instanceof Date||cy(t)){var g=t.getTime(),p=g>-1&&g<2534023188e5;return e.legacy?e.relaxed&&p?{$date:t.getTime()}:{$date:Cf(t)}:e.relaxed&&p?{$date:Cf(t)}:{$date:{$numberLong:t.getTime().toString()}}}if(typeof t=="number"&&(!e.relaxed||!isFinite(t))){if(Math.floor(t)===t){var E=t>=Lf&&t<=Pf,C=t>=Ff&&t<=kf;if(E)return{$numberInt:t.toString()};if(C)return{$numberLong:t.toString()}}return{$numberDouble:t.toString()}}if(t instanceof RegExp||ay(t)){var O=t.flags;if(O===void 0){var M=t.toString().match(/[gimuy]*$/);M&&(O=M[0])}var L=new Ii(t.source,O);return L.toExtendedJSON(e)}return t!=null&&typeof t=="object"?Ry(t,e):t}var Ny={Binary:function(t){return new dr(t.value(),t.sub_type)},Code:function(t){return new qo(t.code,t.scope)},DBRef:function(t){return new Si(t.collection||t.namespace,t.oid,t.db,t.fields)},Decimal128:function(t){return new Mc(t.bytes)},Double:function(t){return new Zo(t.value)},Int32:function(t){return new Jo(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 Pc},MinKey:function(){return new Lc},ObjectID:function(t){return new At(t)},ObjectId:function(t){return new At(t)},BSONRegExp:function(t){return new Ii(t.pattern,t.options)},Symbol:function(t){return new kc(t.value)},Timestamp:function(t){return Mf.fromBits(t.low,t.high)}};function Ry(t,e){if(t==null||typeof t!="object")throw new ur("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=Hn(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(Oy(t)){var s=t;if(typeof s.toExtendedJSON!="function"){var c=Ny[t._bsontype];if(!c)throw new Je("Unrecognized or invalid _bsontype: "+t._bsontype);s=c(s)}return n==="Code"&&s.scope?s=new qo(s.code,Hn(s.scope,e)):n==="DBRef"&&s.oid&&(s=new Si(Hn(s.collection,e),Hn(s.oid,e),Hn(s.db,e),Hn(s.fields,e))),s.toExtendedJSON(e)}else throw new ur("_bsontype must be a string, but was: "+typeof n)}var Sf;(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 ur("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(u)));return Vf(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=Hn(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})(Sf||(Sf={}));var If,xf=Of();xf.Map?If=xf.Map:If=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 PO=le.fromNumber(uy),LO=le.fromNumber(dy);var Dc=new Uint8Array(8),kO=new DataView(Dc.buffer,Dc.byteOffset,Dc.byteLength);var My=1024*1024*17,FO=Re.alloc(My);var Qo=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 At(i):new At,this.occurred=new Date,r&&(this.trigger=new Qo(r)),this.newEvent=!i}trigger;items;videos;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber;locale};function Py(t,e){t&1&&(Ft(),Se(0,"path",3))}function Ly(t,e){t&1&&(Ft(),Se(0,"path",4))}var $r=class t{muted;videoEl;toggled=new it;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=Fe({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&&(X(0,"button",0),Ne("click",function(o){return r.toggleMute(o)}),Ft(),X(1,"svg",1),Se(2,"path",2),De(3,Py,1,0,":svg:path",3)(4,Ly,1,0,":svg:path",4),q()()),n&2&&(W(3),Ae(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 ky=t=>({"lc:cursor-grab":t}),Fy=(t,e)=>e.url;function Vy(t,e){if(t&1&&Se(0,"source",11),t&2){let n=e.$implicit;xn("type",n.mimeType),be("src",n.url,ft)}}var es=class t{constructor(e){this.elementRef=e}video;closeClicked=new it;videoClicked=new it;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(bt))};static \u0275cmp=Fe({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&&(X(0,"div",0),Ne("click",function(){return r.onVideoClick()})("keyup",function(){return r.onVideoClick()})("cdkDragMoved",function(){return r.isDragging=!0}),X(1,"button",1),Ne("click",function(o){return o.stopPropagation(),r.close()}),Ft(),X(2,"svg",2),Se(3,"path",3)(4,"path",4),q()(),$n(),X(5,"div",5)(6,"div",6),Ft(),X(7,"svg",7),Se(8,"path",8),q()(),$n(),X(9,"div",9),Te(10,"Tap to unmute"),q()(),X(11,"video",10),qe(12,Vy,1,2,"source",11,Fy),q()()),n&2&&(be("ngClass",Bi(3,ky,r.isDragging))("cdkDragBoundary","body"),W(11),be("muted",!0),W(),Ze(r.video.sources))},dependencies:[Fn,Yl],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 Ti=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 Ti{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 Ti{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()}},Fc=class extends Ti{element;constructor(e){super(),this.element=e instanceof bt?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 Fc)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 ts=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(Ss,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||Nt.NULL,o=i.get(Li,r.injector);n=Ll(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 Vc=(()=>{class t extends Yr{_moduleRef=K(Ss,{optional:!0});_document=K(St);_viewContainerRef=K(Cs);_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 it;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=yr({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[wt]})}return t})();var Oi;function By(){if(Oi==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Oi=!0}))}finally{Oi=Oi||!1}return Oi}function Bf(t){return By()?t:!!t.capture}var Uy=new Qt("cdk-input-modality-detector-options"),Hy={ignoreKeys:[18,17,224,91,16]},Uf=650,Bc={passive:!0,capture:!0},jy=(()=>{class t{_platform=K(rn);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new ul(null);_options;_lastTouchMs=0;_onKeydown=n=>{this._options?.ignoreKeys?.some(r=>r===n.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=On(n))};_onMousedown=n=>{Date.now()-this._lastTouchMs<Uf||(this._modality.next(jl(n)?"keyboard":"mouse"),this._mostRecentTarget=On(n))};_onTouchstart=n=>{if($l(n)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=On(n)};constructor(){let n=K(Rt),r=K(St),i=K(Uy,{optional:!0});if(this._options=D(D({},Hy),i),this.modalityDetected=this._modality.pipe(yl(1)),this.modalityChanged=this.modalityDetected.pipe(_l()),this._platform.isBrowser){let o=K(_r).createRenderer(null,null);this._listenerCleanups=n.runOutsideAngular(()=>[Dn(o,r,"keydown",this._onKeydown,Bc),Dn(o,r,"mousedown",this._onMousedown,Bc),Dn(o,r,"touchstart",this._onTouchstart,Bc)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(n=>n())}static \u0275fac=function(r){return new(r||t)};static \u0275prov=mt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),rs=function(t){return t[t.IMMEDIATE=0]="IMMEDIATE",t[t.EVENTUAL=1]="EVENTUAL",t}(rs||{}),$y=new Qt("cdk-focus-monitor-default-options"),ns=Bf({passive:!0,capture:!0}),Hf=(()=>{class t{_ngZone=K(Rt);_platform=K(rn);_inputModalityDetector=K(jy);_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=K(St,{optional:!0});_stopInputModalityDetector=new dt;constructor(){let n=K($y,{optional:!0});this._detectionMode=n?.detectionMode||rs.IMMEDIATE}_rootNodeFocusAndBlurListener=n=>{let r=On(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=ji(n);if(!this._platform.isBrowser||i.nodeType!==1)return Mi();let o=Hl(i)||this._getDocument(),s=this._elementInfo.get(i);if(s)return r&&(s.checkChildren=!0),s.subject;let c={checkChildren:r,subject:new dt,rootNode:o};return this._elementInfo.set(i,c),this._registerGlobalListeners(c),c.subject}stopMonitoring(n){let r=ji(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=ji(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===rs.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===rs.IMMEDIATE){clearTimeout(this._originTimeoutId);let i=this._originFromTouchInteraction?Uf:1;this._originTimeoutId=setTimeout(()=>this._origin=null,i)}})}_onFocus(n,r){let i=this._elementInfo.get(r),o=On(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,ns),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,ns)}),this._rootNodeFocusListenerCount.set(r,i+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(mr(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,ns),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,ns),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=mt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var jf=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Fe({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}
|
|
35
|
-
`],encapsulation:2,changeDetection:0})}return t})();var Hc=(()=>{class t{_platform=K(rn);constructor(){}isDisabled(n){return n.hasAttribute("disabled")}isVisible(n){return Wy(n)&&getComputedStyle(n).visibility==="visible"}isTabbable(n){if(!this._platform.isBrowser)return!1;let r=Gy(Qy(n));if(r&&($f(r)===-1||!this.isVisible(r)))return!1;let i=n.nodeName.toLowerCase(),o=$f(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 Jy(n)&&!this.isDisabled(n)&&(r?.ignoreVisibility||this.isVisible(n))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=mt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Gy(t){try{return t.frameElement}catch{return null}}function Wy(t){return!!(t.offsetWidth||t.offsetHeight||typeof t.getClientRects=="function"&&t.getClientRects().length)}function Yy(t){let e=t.nodeName.toLowerCase();return e==="input"||e==="select"||e==="button"||e==="textarea"}function zy(t){return Xy(t)&&t.type=="hidden"}function Ky(t){return qy(t)&&t.hasAttribute("href")}function Xy(t){return t.nodeName.toLowerCase()=="input"}function qy(t){return t.nodeName.toLowerCase()=="a"}function Gf(t){if(!t.hasAttribute("tabindex")||t.tabIndex===void 0)return!1;let e=t.getAttribute("tabindex");return!!(e&&!isNaN(parseInt(e,10)))}function $f(t){if(!Gf(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 Jy(t){return zy(t)?!1:Yy(t)||Ky(t)||t.hasAttribute("contenteditable")||Gf(t)}function Qy(t){return t.ownerDocument&&t.ownerDocument.defaultView||window}var Uc=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?gr(e,{injector:this._injector}):setTimeout(e)}},Wf=(()=>{class t{_checker=K(Hc);_ngZone=K(Rt);_document=K(St);_injector=K(Nt);constructor(){K(ni).load(jf)}create(n,r=!1){return new Uc(n,this._checker,this._ngZone,this._document,r,this._injector)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=mt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function jc(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function nt(t){return t==null?"":typeof t=="string"?t:`${t}px`}function Yf(t,...e){return e.length?e.some(n=>t[n]):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}var zf=Gl(),$c=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=nt(-this._previousScrollPosition.left),e.style.top=nt(-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"),zf&&(r.scrollBehavior=i.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),zf&&(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 Gc=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(gl(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())}},is=class{enable(){}disable(){}attach(){}};function Wc(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 Kf(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 Yc=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();Wc(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}},tv=(()=>{class t{_scrollDispatcher=K(Wl);_viewportRuler=K(Os);_ngZone=K(Rt);_document=K(St);constructor(){}noop=()=>new is;close=n=>new Gc(this._scrollDispatcher,this._ngZone,this._viewportRuler,n);block=()=>new $c(this._viewportRuler,this._document);reposition=n=>new Yc(this._scrollDispatcher,this._viewportRuler,this._ngZone,n);static \u0275fac=function(r){return new(r||t)};static \u0275prov=mt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Di=class{positionStrategy;scrollStrategy=new is;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 zc=class{connectionPair;scrollableViewProperties;constructor(e,n){this.connectionPair=e,this.scrollableViewProperties=n}};var ep=(()=>{class t{_attachedOverlays=[];_document=K(St);_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=mt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),nv=(()=>{class t extends ep{_ngZone=K(Rt);_renderer=K(_r).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=ei(t)))(i||t)}})();static \u0275prov=mt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),rv=(()=>{class t extends ep{_platform=K(rn);_ngZone=K(Rt);_renderer=K(_r).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(()=>[Dn(this._renderer,r,"pointerdown",this._pointerDownListener,i),Dn(this._renderer,r,"click",this._clickListener,i),Dn(this._renderer,r,"auxclick",this._clickListener,i),Dn(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=On(n)};_clickListener=n=>{let r=On(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(Xf(c.overlayElement,r)||Xf(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=ei(t)))(i||t)}})();static \u0275prov=mt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Xf(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 tp=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Fe({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}
|
|
36
|
-
`],encapsulation:2,changeDetection:0})}return t})(),os=(()=>{class t{_platform=K(rn);_containerElement;_document=K(St);_styleLoader=K(ni);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||jc()){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),jc()?r.setAttribute("platform","test"):this._platform.isBrowser||r.setAttribute("platform","server"),this._document.body.appendChild(r),this._containerElement=r}_loadStyles(){this._styleLoader.load(tp)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=mt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Kc=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 dt;_attachments=new dt;_detachments=new dt;_positionStrategy;_scrollStrategy;_locationChanges=Qr.EMPTY;_backdropRef=null;_previousHostParent;_keydownEvents=new dt;_outsidePointerEvents=new dt;_renders=new dt;_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=xs(()=>Tl(()=>{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=gr(()=>{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=D(D({},this._config),e),this._updateElementSize()}setDirection(e){this._config=Ie(D({},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=nt(this._config.width),e.height=nt(this._config.height),e.minWidth=nt(this._config.minWidth),e.minHeight=nt(this._config.minHeight),e.maxWidth=nt(this._config.maxWidth),e.maxHeight=nt(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){let e="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new Kc(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=Ds(n||[]).filter(o=>!!o);i.length&&(r?e.classList.add(...i):e.classList.remove(...i))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let e=this._renders.pipe(mr(Pi(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?.()}},qf="cdk-overlay-connected-position-bounding-box",iv=/([A-Za-z%]+)$/,Xc=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 dt;_resizeSubscription=Qr.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(qf),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&&fr(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(qf),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=Jf(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,C=c+o.height-r.height,O=this._subtractOverflows(o.width,g,p),M=this._subtractOverflows(o.height,E,C),L=O*M;return{visibleArea:L,isCompletelyWithinViewport:o.width*o.height===L,fitsInViewportVertically:M===o.height,fitsInViewportHorizontally:O==o.width}}_canFitWithFlexibleDimensions(e,n,r){if(this._hasFlexibleDimensions){let i=r.bottom-n.y,o=r.right-n.x,s=Zf(this._overlayRef.getConfig().minHeight),c=Zf(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=Jf(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||!ov(this._lastScrollVisibility,r)){let i=new zc(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 C=Math.min(r.bottom-e.y+r.top,e.y),O=this._lastBoundingBoxSize.height;o=C*2,s=e.y-C,o>O&&!this._isInitialRender&&!this._growAfterOpen&&(s=e.y-O/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 C=Math.min(r.right-e.x+r.left,e.x),O=this._lastBoundingBoxSize.width;g=C*2,p=e.x-C,g>O&&!this._isInitialRender&&!this._growAfterOpen&&(p=e.x-O/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=nt(r.height),i.top=nt(r.top),i.bottom=nt(r.bottom),i.width=nt(r.width),i.left=nt(r.left),i.right=nt(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=nt(o)),s&&(i.maxWidth=nt(s))}this._lastBoundingBoxSize=r,fr(this._boundingBox.style,i)}_resetBoundingBoxStyles(){fr(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){fr(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();fr(r,this._getExactOverlayY(n,e,g)),fr(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=nt(s.maxHeight):o&&(r.maxHeight="")),s.maxWidth&&(i?r.maxWidth=nt(s.maxWidth):o&&(r.maxWidth="")),fr(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=nt(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=nt(o.x);return i}_getScrollVisibility(){let e=this._getOriginRect(),n=this._pane.getBoundingClientRect(),r=this._scrollables.map(i=>i.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:Kf(e,r),isOriginOutsideView:Wc(e,r),isOverlayClipped:Kf(n,r),isOverlayOutsideView:Wc(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&&Ds(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 bt)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 fr(t,e){for(let n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function Zf(t){if(typeof t!="number"&&t!=null){let[e,n]=t.split(iv);return!n||n==="px"?parseFloat(e):null}return t||null}function Jf(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 ov(t,e){return t===e?!0:t.isOriginClipped===e.isOriginClipped&&t.isOriginOutsideView===e.isOriginOutsideView&&t.isOverlayClipped===e.isOverlayClipped&&t.isOverlayOutsideView===e.isOverlayOutsideView}var Qf="cdk-global-overlay-wrapper",qc=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(Qf),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",C="",O="",M="";u?M="flex-start":g==="center"?(M="center",E?O=p:C=p):E?g==="left"||g==="end"?(M="flex-end",C=p):(g==="right"||g==="start")&&(M="flex-start",O=p):g==="left"||g==="start"?(M="flex-start",C=p):(g==="right"||g==="end")&&(M="flex-end",O=p),e.position=this._cssPosition,e.marginLeft=u?"0":C,e.marginTop=d?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=u?"0":O,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(Qf),r.justifyContent=r.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}},sv=(()=>{class t{_viewportRuler=K(Os);_document=K(St);_platform=K(rn);_overlayContainer=K(os);constructor(){}global(){return new qc}flexibleConnectedTo(n){return new Xc(n,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=mt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Zc=(()=>{class t{scrollStrategies=K(tv);_overlayContainer=K(os);_positionBuilder=K(sv);_keyboardDispatcher=K(nv);_injector=K(Nt);_ngZone=K(Rt);_document=K(St);_directionality=K(ri);_location=K(kl);_outsideClickDispatcher=K(rv);_animationsModuleType=K(xl,{optional:!0});_idGenerator=K($i);_renderer=K(_r).createRenderer(null,null);_appRef;_styleLoader=K(ni);constructor(){}create(n){this._styleLoader.load(tp);let r=this._createHostElement(),i=this._createPaneElement(r),o=this._createPortalOutlet(i),s=new Di(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(Li),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(Vi)),new ts(n,null,this._appRef,this._injector,this._document)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=mt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function av(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 cv=(()=>{class t extends Yr{_elementRef=K(bt);_focusTrapFactory=K(Wf);_config;_interactivityChecker=K(Hc);_ngZone=K(Rt);_overlayRef=K(zr);_focusMonitor=K(Hf);_renderer=K(ws);_platform=K(rn);_document=K(St,{optional:!0});_portalOutlet;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_changeDetectorRef=K(Xn);_injector=K(Nt);_isDestroyed=!1;constructor(){super(),this._config=K(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||gr(()=>{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=Hi(),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=Hi();return n===r||n.contains(r)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Hi()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Fe({type:t,selectors:[["cdk-dialog-container"]],viewQuery:function(r,i){if(r&1&&Yn(Vc,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&&In("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:[wt],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(r,i){r&1&&De(0,av,0,0,"ng-template",0)},dependencies:[Vc],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}
|
|
37
|
-
`],encapsulation:2})}return t})(),pr=class{overlayRef;config;componentInstance;componentRef;containerInstance;disableClose;closed=new
|
|
34
|
+
`)+" ".concat(u,"\\").concat(d,"/"))}e.seenObjects[e.seenObjects.length-1].obj=t}if(Array.isArray(t))return Mv(t,e);if(t===void 0)return null;if(t instanceof Date||dv(t)){var g=t.getTime(),p=g>-1&&g<2534023188e5;return e.legacy?e.relaxed&&p?{$date:t.getTime()}:{$date:If(t)}:e.relaxed&&p?{$date:If(t)}:{$date:{$numberLong:t.getTime().toString()}}}if(typeof t=="number"&&(!e.relaxed||!isFinite(t))){if(Math.floor(t)===t){var E=t>=Vf&&t<=Ff,C=t>=Uf&&t<=Bf;if(E)return{$numberInt:t.toString()};if(C)return{$numberLong:t.toString()}}return{$numberDouble:t.toString()}}if(t instanceof RegExp||uv(t)){var O=t.flags;if(O===void 0){var M=t.toString().match(/[gimuy]*$/);M&&(O=M[0])}var k=new Ti(t.source,O);return k.toExtendedJSON(e)}return t!=null&&typeof t=="object"?kv(t,e):t}var Pv={Binary:function(t){return new dr(t.value(),t.sub_type)},Code:function(t){return new es(t.code,t.scope)},DBRef:function(t){return new Ii(t.collection||t.namespace,t.oid,t.db,t.fields)},Decimal128:function(t){return new Pc(t.bytes)},Double:function(t){return new ts(t.value)},Int32:function(t){return new ns(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 kc},MinKey:function(){return new Lc},ObjectID:function(t){return new Mt(t)},ObjectId:function(t){return new Mt(t)},BSONRegExp:function(t){return new Ti(t.pattern,t.options)},Symbol:function(t){return new Fc(t.value)},Timestamp:function(t){return Lf.fromBits(t.low,t.high)}};function kv(t,e){if(t==null||typeof t!="object")throw new ur("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=Hn(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(Nv(t)){var s=t;if(typeof s.toExtendedJSON!="function"){var c=Pv[t._bsontype];if(!c)throw new Qe("Unrecognized or invalid _bsontype: "+t._bsontype);s=c(s)}return n==="Code"&&s.scope?s=new es(s.code,Hn(s.scope,e)):n==="DBRef"&&s.oid&&(s=new Ii(Hn(s.collection,e),Hn(s.oid,e),Hn(s.db,e),Hn(s.fields,e))),s.toExtendedJSON(e)}else throw new ur("_bsontype must be a string, but was: "+typeof n)}var Tf;(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 ur("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(u)));return Hf(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=Hn(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})(Tf||(Tf={}));var Of,Df=Nf();Df.Map?Of=Df.Map:Of=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 jO=le.fromNumber(pv),$O=le.fromNumber(hv);var Ac=new Uint8Array(8),GO=new DataView(Ac.buffer,Ac.byteOffset,Ac.byteLength);var Lv=1024*1024*17,WO=ke.alloc(Lv);var rs=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 Mt(i):new Mt,this.occurred=new Date,r&&(this.trigger=new rs(r)),this.newEvent=!i}trigger;items;videos;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber;locale};function Fv(t,e){t&1&&(Vt(),Se(0,"path",3))}function Vv(t,e){t&1&&(Vt(),Se(0,"path",4))}var $r=class t{muted;videoEl;toggled=new ot;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=Re({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),Ae("click",function(o){return r.toggleMute(o)}),Vt(),W(1,"svg",1),Se(2,"path",2),Oe(3,Fv,1,0,":svg:path",3)(4,Vv,1,0,":svg:path",4),z()()),n&2&&(H(3),Ie(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 Bv=t=>({"lc:cursor-grab":t}),Uv=(t,e)=>e.url;function Hv(t,e){if(t&1&&Se(0,"source",11),t&2){let n=e.$implicit;On("type",n.mimeType),ve("src",n.url,st)}}var is=class t{constructor(e){this.elementRef=e}video;closeClicked=new ot;videoClicked=new ot;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)(rn(Ct))};static \u0275cmp=Re({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),Ae("click",function(){return r.onVideoClick()})("keyup",function(){return r.onVideoClick()})("cdkDragMoved",function(){return r.isDragging=!0}),W(1,"button",1),Ae("click",function(o){return o.stopPropagation(),r.close()}),Vt(),W(2,"svg",2),Se(3,"path",3)(4,"path",4),z()(),$n(),W(5,"div",5)(6,"div",6),Vt(),W(7,"svg",7),Se(8,"path",8),z()(),$n(),W(9,"div",9),xe(10,"Tap to unmute"),z()(),W(11,"video",10),Ze(12,Hv,1,2,"source",11,Uv),z()()),n&2&&(ve("ngClass",ji(3,Bv,r.isDragging))("cdkDragBoundary","body"),H(11),ve("muted",!0),H(),Je(r.video.sources))},dependencies:[Vn,zl],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 Di=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 Di{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 Di{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()}},Vc=class extends Di{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 Vc)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 os=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(Os,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||Pt.NULL,o=i.get(Fi,r.injector);n=Ll(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 Bc=(()=>{class t extends Yr{_moduleRef=q(Os,{optional:!0});_document=q(Tt);_viewContainerRef=q(Ts);_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 ot;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=vr({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[St]})}return t})();var Ai;function jv(){if(Ai==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Ai=!0}))}finally{Ai=Ai||!1}return Ai}function jf(t){return jv()?t:!!t.capture}var $v=new tn("cdk-input-modality-detector-options"),Gv={ignoreKeys:[18,17,224,91,16]},$f=650,Uc={passive:!0,capture:!0},Wv=(()=>{class t{_platform=q(an);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new dl(null);_options;_lastTouchMs=0;_onKeydown=n=>{this._options?.ignoreKeys?.some(r=>r===n.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=Dn(n))};_onMousedown=n=>{Date.now()-this._lastTouchMs<$f||(this._modality.next($l(n)?"keyboard":"mouse"),this._mostRecentTarget=Dn(n))};_onTouchstart=n=>{if(Gl(n)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Dn(n)};constructor(){let n=q(kt),r=q(Tt),i=q($v,{optional:!0});if(this._options=D(D({},Gv),i),this.modalityDetected=this._modality.pipe(yl(1)),this.modalityChanged=this.modalityDetected.pipe(vl()),this._platform.isBrowser){let o=q(_r).createRenderer(null,null);this._listenerCleanups=n.runOutsideAngular(()=>[An(o,r,"keydown",this._onKeydown,Uc),An(o,r,"mousedown",this._onMousedown,Uc),An(o,r,"touchstart",this._onTouchstart,Uc)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(n=>n())}static \u0275fac=function(r){return new(r||t)};static \u0275prov=gt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),as=function(t){return t[t.IMMEDIATE=0]="IMMEDIATE",t[t.EVENTUAL=1]="EVENTUAL",t}(as||{}),Yv=new tn("cdk-focus-monitor-default-options"),ss=jf({passive:!0,capture:!0}),Gf=(()=>{class t{_ngZone=q(kt);_platform=q(an);_inputModalityDetector=q(Wv);_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=q(Tt,{optional:!0});_stopInputModalityDetector=new ft;constructor(){let n=q(Yv,{optional:!0});this._detectionMode=n?.detectionMode||as.IMMEDIATE}_rootNodeFocusAndBlurListener=n=>{let r=Dn(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=Wi(n);if(!this._platform.isBrowser||i.nodeType!==1)return ki();let o=jl(i)||this._getDocument(),s=this._elementInfo.get(i);if(s)return r&&(s.checkChildren=!0),s.subject;let c={checkChildren:r,subject:new ft,rootNode:o};return this._elementInfo.set(i,c),this._registerGlobalListeners(c),c.subject}stopMonitoring(n){let r=Wi(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=Wi(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===as.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===as.IMMEDIATE){clearTimeout(this._originTimeoutId);let i=this._originFromTouchInteraction?$f:1;this._originTimeoutId=setTimeout(()=>this._origin=null,i)}})}_onFocus(n,r){let i=this._elementInfo.get(r),o=Dn(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,ss),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,ss)}),this._rootNodeFocusListenerCount.set(r,i+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(mr(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,ss),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,ss),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=gt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Wf=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Re({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}
|
|
35
|
+
`],encapsulation:2,changeDetection:0})}return t})();var jc=(()=>{class t{_platform=q(an);constructor(){}isDisabled(n){return n.hasAttribute("disabled")}isVisible(n){return Kv(n)&&getComputedStyle(n).visibility==="visible"}isTabbable(n){if(!this._platform.isBrowser)return!1;let r=zv(ny(n));if(r&&(Yf(r)===-1||!this.isVisible(r)))return!1;let i=n.nodeName.toLowerCase(),o=Yf(n);return n.hasAttribute("contenteditable")?o!==-1:i==="iframe"||i==="object"||this._platform.WEBKIT&&this._platform.IOS&&!ey(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 ty(n)&&!this.isDisabled(n)&&(r?.ignoreVisibility||this.isVisible(n))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=gt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function zv(t){try{return t.frameElement}catch{return null}}function Kv(t){return!!(t.offsetWidth||t.offsetHeight||typeof t.getClientRects=="function"&&t.getClientRects().length)}function Xv(t){let e=t.nodeName.toLowerCase();return e==="input"||e==="select"||e==="button"||e==="textarea"}function qv(t){return Jv(t)&&t.type=="hidden"}function Zv(t){return Qv(t)&&t.hasAttribute("href")}function Jv(t){return t.nodeName.toLowerCase()=="input"}function Qv(t){return t.nodeName.toLowerCase()=="a"}function zf(t){if(!t.hasAttribute("tabindex")||t.tabIndex===void 0)return!1;let e=t.getAttribute("tabindex");return!!(e&&!isNaN(parseInt(e,10)))}function Yf(t){if(!zf(t))return null;let e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}function ey(t){let e=t.nodeName.toLowerCase(),n=e==="input"&&t.type;return n==="text"||n==="password"||e==="select"||e==="textarea"}function ty(t){return qv(t)?!1:Xv(t)||Zv(t)||t.hasAttribute("contenteditable")||zf(t)}function ny(t){return t.ownerDocument&&t.ownerDocument.defaultView||window}var Hc=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?gr(e,{injector:this._injector}):setTimeout(e)}},Kf=(()=>{class t{_checker=q(jc);_ngZone=q(kt);_document=q(Tt);_injector=q(Pt);constructor(){q(ri).load(Wf)}create(n,r=!1){return new Hc(n,this._checker,this._ngZone,this._document,r,this._injector)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=gt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function $c(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function rt(t){return t==null?"":typeof t=="string"?t:`${t}px`}function Xf(t,...e){return e.length?e.some(n=>t[n]):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}var qf=Wl(),Gc=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=rt(-this._previousScrollPosition.left),e.style.top=rt(-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"),qf&&(r.scrollBehavior=i.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),qf&&(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 Wc=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(_l(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())}},cs=class{enable(){}disable(){}attach(){}};function Yc(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 Zf(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 zc=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();Yc(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}},iy=(()=>{class t{_scrollDispatcher=q(Yl);_viewportRuler=q(Rs);_ngZone=q(kt);_document=q(Tt);constructor(){}noop=()=>new cs;close=n=>new Wc(this._scrollDispatcher,this._ngZone,this._viewportRuler,n);block=()=>new Gc(this._viewportRuler,this._document);reposition=n=>new zc(this._scrollDispatcher,this._viewportRuler,this._ngZone,n);static \u0275fac=function(r){return new(r||t)};static \u0275prov=gt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ni=class{positionStrategy;scrollStrategy=new cs;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 Kc=class{connectionPair;scrollableViewProperties;constructor(e,n){this.connectionPair=e,this.scrollableViewProperties=n}};var rp=(()=>{class t{_attachedOverlays=[];_document=q(Tt);_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=gt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),oy=(()=>{class t extends rp{_ngZone=q(kt);_renderer=q(_r).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=gt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),sy=(()=>{class t extends rp{_platform=q(an);_ngZone=q(kt);_renderer=q(_r).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(()=>[An(this._renderer,r,"pointerdown",this._pointerDownListener,i),An(this._renderer,r,"click",this._clickListener,i),An(this._renderer,r,"auxclick",this._clickListener,i),An(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=Dn(n)};_clickListener=n=>{let r=Dn(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(Jf(c.overlayElement,r)||Jf(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=gt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Jf(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 ip=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Re({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}
|
|
36
|
+
`],encapsulation:2,changeDetection:0})}return t})(),ls=(()=>{class t{_platform=q(an);_containerElement;_document=q(Tt);_styleLoader=q(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||$c()){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),$c()?r.setAttribute("platform","test"):this._platform.isBrowser||r.setAttribute("platform","server"),this._document.body.appendChild(r),this._containerElement=r}_loadStyles(){this._styleLoader.load(ip)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=gt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Xc=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 ft;_attachments=new ft;_detachments=new ft;_positionStrategy;_scrollStrategy;_locationChanges=ei.EMPTY;_backdropRef=null;_previousHostParent;_keydownEvents=new ft;_outsidePointerEvents=new ft;_renders=new ft;_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=As(()=>Ol(()=>{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=gr(()=>{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=D(D({},this._config),e),this._updateElementSize()}setDirection(e){this._config=Te(D({},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=rt(this._config.width),e.height=rt(this._config.height),e.minWidth=rt(this._config.minWidth),e.minHeight=rt(this._config.minHeight),e.maxWidth=rt(this._config.maxWidth),e.maxHeight=rt(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){let e="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new Xc(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=Ms(n||[]).filter(o=>!!o);i.length&&(r?e.classList.add(...i):e.classList.remove(...i))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let e=this._renders.pipe(mr(Li(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?.()}},Qf="cdk-overlay-connected-position-bounding-box",ay=/([A-Za-z%]+)$/,qc=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 ft;_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(Qf),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&&fr(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(Qf),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=tp(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,C=c+o.height-r.height,O=this._subtractOverflows(o.width,g,p),M=this._subtractOverflows(o.height,E,C),k=O*M;return{visibleArea:k,isCompletelyWithinViewport:o.width*o.height===k,fitsInViewportVertically:M===o.height,fitsInViewportHorizontally:O==o.width}}_canFitWithFlexibleDimensions(e,n,r){if(this._hasFlexibleDimensions){let i=r.bottom-n.y,o=r.right-n.x,s=ep(this._overlayRef.getConfig().minHeight),c=ep(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=tp(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||!cy(this._lastScrollVisibility,r)){let i=new Kc(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 C=Math.min(r.bottom-e.y+r.top,e.y),O=this._lastBoundingBoxSize.height;o=C*2,s=e.y-C,o>O&&!this._isInitialRender&&!this._growAfterOpen&&(s=e.y-O/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 C=Math.min(r.right-e.x+r.left,e.x),O=this._lastBoundingBoxSize.width;g=C*2,p=e.x-C,g>O&&!this._isInitialRender&&!this._growAfterOpen&&(p=e.x-O/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=rt(r.height),i.top=rt(r.top),i.bottom=rt(r.bottom),i.width=rt(r.width),i.left=rt(r.left),i.right=rt(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=rt(o)),s&&(i.maxWidth=rt(s))}this._lastBoundingBoxSize=r,fr(this._boundingBox.style,i)}_resetBoundingBoxStyles(){fr(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){fr(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();fr(r,this._getExactOverlayY(n,e,g)),fr(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=rt(s.maxHeight):o&&(r.maxHeight="")),s.maxWidth&&(i?r.maxWidth=rt(s.maxWidth):o&&(r.maxWidth="")),fr(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=rt(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=rt(o.x);return i}_getScrollVisibility(){let e=this._getOriginRect(),n=this._pane.getBoundingClientRect(),r=this._scrollables.map(i=>i.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:Zf(e,r),isOriginOutsideView:Yc(e,r),isOverlayClipped:Zf(n,r),isOverlayOutsideView:Yc(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&&Ms(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 fr(t,e){for(let n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function ep(t){if(typeof t!="number"&&t!=null){let[e,n]=t.split(ay);return!n||n==="px"?parseFloat(e):null}return t||null}function tp(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 cy(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",Zc=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",C="",O="",M="";u?M="flex-start":g==="center"?(M="center",E?O=p:C=p):E?g==="left"||g==="end"?(M="flex-end",C=p):(g==="right"||g==="start")&&(M="flex-start",O=p):g==="left"||g==="start"?(M="flex-start",C=p):(g==="right"||g==="end")&&(M="flex-end",O=p),e.position=this._cssPosition,e.marginLeft=u?"0":C,e.marginTop=d?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=u?"0":O,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}},ly=(()=>{class t{_viewportRuler=q(Rs);_document=q(Tt);_platform=q(an);_overlayContainer=q(ls);constructor(){}global(){return new Zc}flexibleConnectedTo(n){return new qc(n,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=gt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Jc=(()=>{class t{scrollStrategies=q(iy);_overlayContainer=q(ls);_positionBuilder=q(ly);_keyboardDispatcher=q(oy);_injector=q(Pt);_ngZone=q(kt);_document=q(Tt);_directionality=q(ii);_location=q(Fl);_outsideClickDispatcher=q(sy);_animationsModuleType=q(Tl,{optional:!0});_idGenerator=q(Yi);_renderer=q(_r).createRenderer(null,null);_appRef;_styleLoader=q(ri);constructor(){}create(n){this._styleLoader.load(ip);let r=this._createHostElement(),i=this._createPaneElement(r),o=this._createPortalOutlet(i),s=new Ni(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(Fi),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(Hi)),new os(n,null,this._appRef,this._injector,this._document)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=gt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function uy(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 dy=(()=>{class t extends Yr{_elementRef=q(Ct);_focusTrapFactory=q(Kf);_config;_interactivityChecker=q(jc);_ngZone=q(kt);_overlayRef=q(zr);_focusMonitor=q(Gf);_renderer=q(Is);_platform=q(an);_document=q(Tt,{optional:!0});_portalOutlet;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_changeDetectorRef=q(Xn);_injector=q(Pt);_isDestroyed=!1;constructor(){super(),this._config=q(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||gr(()=>{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=Gi(),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=Gi();return n===r||n.contains(r)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Gi()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Re({type:t,selectors:[["cdk-dialog-container"]],viewQuery:function(r,i){if(r&1&&Yn(Bc,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&&Tn("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,uy,0,0,"ng-template",0)},dependencies:[Bc],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}
|
|
37
|
+
`],encapsulation:2})}return t})(),pr=class{overlayRef;config;componentInstance;componentRef;containerInstance;disableClose;closed=new ft;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&&!Xf(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}},fy=new tn("DialogScrollStrategy",{providedIn:"root",factory:()=>{let t=q(Jc);return()=>t.scrollStrategies.block()}}),el=new tn("DialogData"),py=new tn("DefaultDialogConfig");var op=(()=>{class t{_overlay=q(Jc);_injector=q(Pt);_defaultOptions=q(py,{optional:!0});_parentDialog=q(t,{optional:!0,skipSelf:!0});_overlayContainer=q(ls);_idGenerator=q(Yi);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new ft;_afterOpenedAtThisLevel=new ft;_ariaHiddenElements=new Map;_scrollStrategy=q(fy);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=ml(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(El(void 0)));constructor(){}open(n,r){let i=this._defaultOptions||new Kr;r=D(D({},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 pr(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(){Qc(this.openDialogs,n=>n.close())}getDialogById(n){return this.openDialogs.find(r=>r.id===n)}ngOnDestroy(){Qc(this._openDialogsAtThisLevel,n=>{n.config.closeOnDestroy===!1&&this._removeOpenDialog(n,!1)}),Qc(this._openDialogsAtThisLevel,n=>n.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(n){let r=new Ni({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:pr,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=dy;let u=new Gr(c,i.viewContainerRef,Pt.create({parent:o||this._injector,providers:s}));return n.attach(u).instance}_attachDialogContent(n,r,i,o){if(n instanceof Bi){let s=this._createInjector(o,r,i,void 0),c={$implicit:o.data,dialogRef:r};o.templateContext&&(c=D(D({},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:el,useValue:n.data},{provide:pr,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(ii,null,{optional:!0}))&&c.push({provide:ii,useValue:{value:n.direction,change:ki()}}),Pt.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=gt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Qc(t,e){let n=t.length;for(;n--;)e(t[n])}var us=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 hy=Cl;function my(t){return!!t[hy]}var gy=Symbol("__destroy"),up=Symbol("__decoratorApplied");function dp(t){return typeof t=="string"?Symbol(`__destroy__${t}`):gy}function _y(t){t.prototype[up]=!0}function fp(t,e){t[e]||(t[e]=new ft)}function pp(t,e){t[e]&&(t[e].next(),t[e].complete(),t[e]=null)}function hp(t){t instanceof ei&&t.unsubscribe()}function vy(t){Array.isArray(t)&&t.forEach(hp)}function mp(t,e){return function(){if(t&&t.call(this),pp(this,dp()),e.arrayName&&vy(this[e.arrayName]),e.checkProperties)for(let n in this)e.blackList?.includes(n)||hp(this[n])}}function yy(t,e){t.prototype.ngOnDestroy=mp(t.prototype.ngOnDestroy,e)}function Ey(t,e){let n=t.\u0275pipe;n.onDestroy=mp(n.onDestroy,e)}function gp(t={}){return e=>{my(e)?Ey(e,t):yy(e,t),_y(e)}}var ap=7,cp=Symbol("CheckerHasBeenSet");function by(t,e){t[cp]||wy()||(lp(()=>hl(Promise.resolve()).pipe(Ss(()=>{let n;try{n=Il(t)}catch{n=null}let r=n?.lView;if(r==null)return pl;let i=r[ap]||(r[ap]=[]),o=new ft;return i.push(function(){lp(()=>{o.next(),o.complete()})}),o}),Ss(()=>Promise.resolve())).subscribe(()=>{(e.observed??e.observers.length>0)&&console.warn(Cy(t))})),t[cp]=!0)}function wy(){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 lp(t){let e=wl.Zone;return!!e&&typeof e.root?.run=="function"?e.root.run(t):t()}function Cy(t){return`
|
|
38
38
|
The ${t.constructor.name} still has subscriptions that haven't been unsubscribed.
|
|
39
39
|
This may happen if the class extends another class decorated with @UntilDestroy().
|
|
40
40
|
The child class implements its own ngOnDestroy() method but doesn't call super.ngOnDestroy().
|
|
@@ -71,5 +71,5 @@ Url: ${bo(t)}`),!0)}function Am(t,e){return t.type||!e||!e.length?!1:Pm(t).some(
|
|
|
71
71
|
super.ngOnDestroy();
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
`}var el=!1;function bv(t,e,n){let r=t[e];if(el&&typeof r!="function")throw new Error(`${t.constructor.name} is using untilDestroyed but doesn't implement ${e}`);lp(t,n),t[e]=function(){r.apply(this,arguments),up(this,n),t[e]=r}}function hp(t,e){return n=>{let r=cp(e);typeof e=="string"?bv(t,e,r):(el&&wv(t),lp(t,r));let i=t[r];return el&&yv(t,i),n.pipe(mr(i))}}function wv(t){let e=Object.getPrototypeOf(t);if(!(ap in e))throw new Error("untilDestroyed operator cannot be used inside directives or components or providers that are not decorated with UntilDestroy decorator")}var as=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=Fe({type:t,selectors:[["cooee-base-video"]],inputs:{triggerContext:"triggerContext"},decls:0,vars:0,template:function(n,r){},encapsulation:2})};var Cv=t=>({active:t}),Sv=(t,e)=>e.mID;function Iv(t,e){if(t&1&&Se(0,"img",9),t&2){let n=e.$implicit,r=J(2);be("src",n.url,ft)("alt",r.selectedItem.name)}}function xv(t,e){if(t&1&&qe(0,Iv,1,2,"img",9,dn),t&2){let n=J();Ze(n.selectedItem.imgs)}}function Tv(t,e){if(t&1&&Se(0,"img",9),t&2){let n=J();be("src",n.selectedItem.imageURL,ft)("alt",n.selectedItem.name)}}function Ov(t,e){if(t&1){let n=et();X(0,"a",18),Ne("click",function(i){let o=Ue(n).$implicit;return J(2).changeItem(o),i.stopPropagation(),He(i.preventDefault())}),Se(1,"img",19),q()}if(t&2){let n=e.$implicit,r=J(2);W(),be("src",n.imageURL,ft)("alt",n.name)("ngClass",Bi(3,Cv,n.mID===r.selectedItem.mID+""))}}function Dv(t,e){if(t&1&&(X(0,"span",16),Te(1,"Selected Product"),q(),X(2,"div",8),qe(3,Ov,2,5,"a",17,dn),q()),t&2){let n=J();W(3),Ze(n.items)}}function Av(t,e){if(t&1){let n=et();X(0,"a",23),Ne("click",function(i){let o=Ue(n).$implicit,s=J(2);return He(s.changeVariant(i,o))}),X(1,"span",24),Te(2),q()()}if(t&2){let n=e.$implicit,r=J(2);Wn("lc-selected-variant",(r.selectedVariant==null?null:r.selectedVariant.mID)===n.mID),W(2),kn(n.name)}}function Nv(t,e){if(t&1&&(X(0,"span",20),Te(1,"Select Variant"),q(),X(2,"div",21),qe(3,Av,3,3,"a",22,Sv),q()),t&2){let n=J();W(3),Ze(n.selectedItem.vars)}}function Rv(t,e){if(t&1&&(X(0,"div",25),Te(1,"Description"),q(),Se(2,"div",26),_t(3,"safeHtml")),t&2){let n=J();W(2),be("innerHTML",Ct(3,1,n.selectedItem.desc),en)}}function Mv(t,e){t&1&&Te(0," Open Cart ")}function Pv(t,e){t&1&&Te(0," Add To Cart ")}var cs=class t{selectedItem;items;closeModel=new it;performCTA=new it;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=Fe({type:t,selectors:[["cooee-product-modal"]],inputs:{selectedItem:"selectedItem",items:"items"},outputs:{closeModel:"closeModel",performCTA:"performCTA"},decls:27,vars:11,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-item-price",3,"innerHTML"],[1,"lc-card-footer"],[1,"lc-cta-button",3,"click"],[1,"lc-more-info-button",3,"click"],[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){n&1&&(X(0,"div",0)(1,"div",1)(2,"div",2),Te(3,"Shop Now"),q(),X(4,"button",3),Ne("click",function(){return r.closeDialog()}),Ft(),X(5,"svg",4),Se(6,"path",5)(7,"path",6),q()()(),$n(),X(8,"div",7)(9,"div",8),De(10,xv,2,0)(11,Tv,1,2,"img",9),q(),X(12,"div",10)(13,"div",11),Te(14),q(),Se(15,"span",12),_t(16,"cooeeCurrency"),_t(17,"safeHtml"),De(18,Dv,5,0)(19,Nv,5,0)(20,Rv,4,3),q()(),X(21,"div",13)(22,"button",14),Ne("click",function(){return r.clickAddToCart(r.selectedItem)}),De(23,Mv,1,0)(24,Pv,1,0),q(),X(25,"button",15),Ne("click",function(){return r.performCTA.emit({item:r.selectedItem,cta:r.ClickActionType.GO_TO_PRODUCT})}),Te(26," More Info "),q()()()),n&2&&(W(10),Ae(r.selectedItem.imgs!=null&&r.selectedItem.imgs.length?10:11),W(4),kn(r.selectedItem.name),W(),be("innerHTML",Ct(17,9,Ct(16,7,r.selectedVariant==null||r.selectedVariant.price==null?null:r.selectedVariant.price.d)),en),W(3),Ae(r.items.length>1?18:-1),W(),Ae(r.selectedItem.vars[0]!=null&&r.selectedItem.vars[0].name!=="Default Title"?19:-1),W(),Ae(r.selectedItem.desc?20:-1),W(3),Ae(r.atcClicked?23:24))},dependencies:[Vn,bn,Fn],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:#000}.lc-item-price[_ngcontent-%COMP%]{font-size:18px;font-weight:500;color:#000}.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 ls=class t{width;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Fe({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&&(X(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),Se(4,"div"),q()()()()),n&2&&(W(3),ti("width",r.width,"%"))},encapsulation:2})};function Lv(t,e){t&1&&Te(0," Open Cart ")}function kv(t,e){t&1&&Te(0," Add To Cart ")}var us=class t{item;performCTA=new it;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=Fe({type:t,selectors:[["cooee-product-card"]],inputs:{item:"item"},outputs:{performCTA:"performCTA"},decls:13,vars:11,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-item-price",3,"innerHTML"],[1,"lc-cta-button",3,"click"]],template:function(n,r){if(n&1){let i=et();X(0,"div",0)(1,"div",1),Se(2,"img",2),X(3,"div",3)(4,"div",4),Te(5),q(),Mt(6),Se(7,"div",5),_t(8,"cooeeCurrency"),_t(9,"safeHtml"),q()(),X(10,"button",6),Ne("click",function(s){return Ue(i),He(r.clickAddToCart(s))}),De(11,Lv,1,0)(12,kv,1,0),q()()}if(n&2){W(2),xn("alt",r.item.name),be("src",r.item.imageURL,ft),W(3),Vt(" ",r.item.name," ");let i=r.item.selectedOrFirstVariant.value.price.d;W(2),be("innerHTML",Ct(9,9,Ct(8,7,i)),en),W(3),Wn("atc-clicked",r.atcClicked),W(),Ae(r.atcClicked?11:12)}},dependencies:[bn,Vn],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:#000}.lc-item-price[_ngcontent-%COMP%]{font-size:16px;line-height:normal;color:#000}.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}"]})};var Vv=["swiperContainer"],Bv=["videoEl"],Uv=(t,e)=>e.url,Hv=(t,e)=>e.mID;function jv(t,e){if(t&1&&Se(0,"source",14),t&2){let n=e.$implicit;xn("type",n.mimeType),be("src",n.url,ft)}}function $v(t,e){t&1&&Is(0)}function Gv(t,e){if(t&1){let n=et();Se(0,"cooee-video-progress-bar",17),X(1,"div",18)(2,"cooee-mute-toggle",19),Ne("toggled",function(){Ue(n);let i=J(2);return He(i.toggleMute())}),q(),De(3,$v,1,0,"ng-container",10),q()}if(t&2){let n=J().$index,r=nn(4),i=J(),o=nn(11);be("width",i.videoProgress[n]||0),W(2),be("muted",i.muted)("videoEl",r),W(),be("ngTemplateOutlet",o)}}function Wv(t,e){if(t&1){let n=et();X(0,"cooee-product-card",22),Ne("performCTA",function(i){Ue(n);let o=J(2).$implicit,s=J();return He(s.performClickToAction(i,o))})("click",function(){let i=Ue(n).$implicit,o=J(2).$implicit,s=J();return He(s.productCardClicked(i,o))}),q()}if(t&2){let n=e.$implicit;be("item",n)}}function Yv(t,e){if(t&1&&(X(0,"div",15)(1,"div",20),qe(2,Wv,1,1,"cooee-product-card",21,Hv),q()()),t&2){let n=J().$implicit;W(2),Ze(n.items)}}function zv(t,e){if(t&1){let n=et();X(0,"cooee-product-modal",23),Ne("performCTA",function(i){Ue(n);let o=J(2);return He(o.performClickToAction(i,o.selectedVideo))})("closeModel",function(){Ue(n);let i=J(2);return He(i.productModalClosed())}),q()}if(t&2){let n=J(2);be("selectedItem",n.selectedItem)("items",n.selectedVideo.items)}}function Kv(t,e){if(t&1){let n=et();X(0,"div",6)(1,"div",11)(2,"div",12)(3,"video",13,2),Ne("timeupdate",function(i){let o=Ue(n).$index,s=J();return He(s.updateProgress(i,o))})("click",function(){let i=Ue(n).$index,o=J();return He(o.currentIndex===i&&o.toggleMute())})("ended",function(){Ue(n);let i=nn(4),o=J();return He(o.onVideoEnded(i))}),qe(5,jv,1,2,"source",14,Uv),q(),De(7,Gv,4,4)(8,Yv,4,0,"div",15),q(),De(9,zv,1,2,"cooee-product-modal",16),q()()}if(t&2){let n=e.$implicit,r=e.$index,i=J();W(3),be("ngClass",i.viewTemplateClassName)("autoplay",i.currentIndex===r)("muted",i.muted)("poster",n.thumbnail,ft),In("data-video-id",n.id),W(2),Ze(n.sources),W(2),Ae(i.currentIndex===r?7:-1),W(),Ae(n.items.length&&i.currentIndex===r?8:-1),W(),Ae(i.selectedItem&&i.currentIndex===r?9:-1)}}function Xv(t,e){t&1&&Is(0)}function qv(t,e){if(t&1){let n=et();X(0,"button",24),Ne("click",function(){Ue(n);let i=J();return He(i.close())}),Ft(),X(1,"svg",25),Se(2,"path",26)(3,"path",27),q()()}}var un=class extends as{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;muted=!1;videoProgress=[];selectedItem=null;selectedVideo;swiperInstance;detailPopupTemplate;viewTemplateClassName="lc-video-only-view";resizeDebouncer=new ss(this.onResize.bind(this));onResize(){this.swiperInstance?.destroy?.(),this.reInitSwiper()}ngOnInit(){super.ngOnInit(),this.detailPopupTemplate=this.engagementTrigger?.content?.videoConfig?.detailPopup.template??"VIDEO_ONLY_VIEW";let n=this.elementRef.nativeElement.shadowRoot,r=Er.get().website.commonCSS;switch(Yt.injectRawCSS(r,n),Yt.injectStylesheet(An.styleURL,n),Yt.injectSwiperCSS(n),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(){ml(this.getCurrentVideoElement(),"loadeddata").pipe(hp(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?Ye.EVENT_VIDEO_MUTED:Ye.EVENT_VIDEO_UNMUTED,{current:this.currentVideoProps()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(r),await Nr.set(Dr.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(Dr.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=[Ye.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=[Ye.EVENT_VIDEO_CHANGE,o,{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(s)}productCardClicked(n,r){let i={videoID:r.id,videoIndex:this.currentIndex},o=[Ye.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}};vs(un,"\u0275fac",function(r){return new(r||un)(tn(Xn),tn(bt),tn(pr),tn(Qc))}),vs(un,"\u0275cmp",Fe({type:un,selectors:[["cooee-video-swiper-dialog"]],viewQuery:function(r,i){if(r&1&&(Yn(Vv,5),Yn(Bv,5)),r&2){let o;zn(o=Kn())&&(i.swiperContainerRef=o.first),zn(o=Kn())&&(i.videoElements=o)}},inputs:{videos:"videos",currentIndex:"currentIndex"},features:[wt],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,"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&&(X(0,"div",3)(1,"div",4,0)(3,"div",5),qe(4,Kv,10,8,"div",6,dn),q(),Se(6,"div",7)(7,"div",8),q(),X(8,"div",9),De(9,Xv,1,0,"ng-container",10),q()(),De(10,qv,4,0,"ng-template",null,1,Ml)),r&2){let o=nn(11);be("ngClass",i.viewTemplateClassName),W(4),Ze(i.videos),W(5),be("ngTemplateOutlet",o)}},dependencies:[us,cs,$r,ls,Vl,Fn],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}
|
|
75
|
-
`],encapsulation:3})),un=cl([pp()],un);var Zv=["videoEl"],mp=(t,e)=>e.url;function Jv(t,e){if(t&1&&(X(0,"div",1),Te(1),q()),t&2){let n=J();W(),Vt(" ",n.videoConfig.heading," ")}}function Qv(t,e){if(t&1&&Se(0,"source",7),t&2){let n=e.$implicit;xn("type",n.mimeType),be("src",n.url,ft)}}function e0(t,e){if(t&1){let n=et();X(0,"cooee-mute-toggle",12),Ne("toggled",function(i){Ue(n),J();let o=nn(5),s=J(2);return He(s.onMuteToggled(i,o))}),q()}if(t&2){J();let n=nn(5);be("muted",n.muted)("videoEl",n)}}function t0(t,e){if(t&1&&Se(0,"img",13),t&2){J(2);let n=Pt(0);be("src",n.imageURL,ft)("alt",n.name)}}function n0(t,e){if(t&1&&(X(0,"div",10),De(1,t0,1,2,"img",13),X(2,"div",14)(3,"span",15),Te(4),q(),Mt(5),Se(6,"span",16),_t(7,"cooeeCurrency"),_t(8,"safeHtml"),q()()),t&2){J();let n=Pt(0),r=J(2);W(),Ae(r.showImage?1:-1),W(3),Vt(" ",n.name," ");let i=n.selectedOrFirstVariant.value.price.d;W(2),be("innerHTML",Ct(8,5,Ct(7,3,i)),en)}}function r0(t,e){if(t&1){let n=et();X(0,"button",17),Ne("click",function(){Ue(n);let i=J().$implicit,o=Pt(0),s=J(2);return He(s.addToCartClicked(i,o))}),Te(1," Add to cart "),q()}}function i0(t,e){if(t&1){let n=et();Mt(0)(1),X(2,"div",4)(3,"a",5),Ne("click",function(i){let o=Ue(n),s=o.$implicit,c=o.$index,u=nn(5),d=J(2);return He(d.onVideoTap(i,s,c,u))}),X(4,"video",6,0),Ne("mouseenter",function(){Ue(n);let i=nn(5);J(2);let o=Pt(2);return He(o&&i.play())})("mouseleave",function(){Ue(n);let i=nn(5);J(2);let o=Pt(2);return He(o&&i.pause())}),qe(6,Qv,1,2,"source",7,mp),q(),X(8,"div",8),De(9,e0,1,2,"cooee-mute-toggle",9),q(),De(10,n0,9,7,"div",10),q(),De(11,r0,2,0,"button",11),q()}if(t&2){let n=e.$implicit,r=J(2),i=Pt(1),s=Tn(n.items[0])&&r.videoConfig.footerContent==r.VideoConfigFooterContent.FIRST_ITEM;W(4),be("poster",n.thumbnail,ft)("muted",!0),In("autoplay",i||null),W(2),Ze(n.sources),W(3),Ae(r.videoConfig.showMuteButton?9:-1),W(),Ae(s?10:-1),W(),Ae(s?11:-1)}}function o0(t,e){if(t&1&&(X(0,"div",2),qe(1,i0,12,7,"div",4,dn),q()),t&2){let n=J();W(),Ze(n.videos)}}function s0(t,e){if(t&1&&Se(0,"source",7),t&2){let n=e.$implicit;xn("type",n.mimeType),be("src",n.url,ft)}}function a0(t,e){if(t&1){let n=et();X(0,"div",18),Ft(),X(1,"svg",19),Se(2,"circle",20)(3,"circle",21),q(),$n(),X(4,"div",22)(5,"video",23),Ne("click",function(i){let o=Ue(n),s=o.$implicit,c=o.$index,u=J(2);return He(u.onVideoTap(i,s,c))}),qe(6,s0,1,2,"source",7,mp),q()()()}if(t&2){let n=e.$implicit;W(5),be("muted",!0),W(),Ze(n.sources)}}function c0(t,e){if(t&1&&(X(0,"div",3),qe(1,a0,8,1,"div",18,dn),q()),t&2){let n=J();W(),Ze(n.videos)}}function l0(t,e){if(t&1){let n=et();X(0,"cooee-draggable-video-popup",25),Ne("videoClicked",function(){Ue(n),J();let i=Pt(0),o=J();return He(o.onPopupVideoClicked(i,0))})("closeClicked",function(){Ue(n);let i=J(2);return He(i.onPopupVideoClosed())}),q()}if(t&2){J();let n=Pt(0);be("video",n)}}function u0(t,e){if(t&1&&(Mt(0),De(1,l0,1,1,"cooee-draggable-video-popup",24)),t&2){let n=J();Tn(n.videos[0]),W(),Ae(n.hidePopupVideo?-1:1)}}var ds=class t extends fn{constructor(n,r){super();this.dialog=n;this.cdr=r}videoElements;videos;VideoConfigTemplate=bc;VideoConfigFooterContent=Cc;VideoConfigAutoPlay=wc;isMobile=window.CooeeSDK.uaParser.getDevice().type==="mobile";hidePopupVideo;videoConfig;showImage;dialogRef=null;ngOnInit(){super.ngOnInit(),Yt.loadSwiperScript(),this.showImage=this.videoConfig.detailPopup.template==="PRODUCT_DETAIL_VIEW"}ngAfterViewInit(){this.playFirstVideo()}engagementTriggerReceived(n){this.videoConfig=n.content?.videoConfig,this.videos=this.videoConfig.videos}sendTriggerClicked(n,r){let i=new jr(Ye.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!=="FIRST_ITEM"){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=Ye.EVENT_ADD_TO_CART_CLICKED;else if(n.cta===Ut.GO_TO_PRODUCT)r=Ye.EVENT_VIEW_ITEM_CLICKED;else if(n.cta===Ut.OPEN_CART)r=Ye.EVENT_OPEN_CART_CLICKED,i.triggerData.redirectBehaviour=Ls.CART_DRAWER;else{gt.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(Ye.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(un,{width:"100vw",height:"100vh",data:i});let o={videoID:n.id,videoIndex:r};this.sendEvent(Ye.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(Ye.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(np),tn(Xn))};static \u0275cmp=Fe({type:t,selectors:[["cooee-shoppable-videos"]],viewQuery:function(r,i){if(r&1&&Yn(Zv,5),r&2){let o;zn(o=Kn())&&(i.videoElements=o)}},features:[wt],decls:7,vars:4,consts:[["videoEl",""],["id","lc-heading-text",1,"lc-heading-text","lc:mb-2","lc:text-lg","lc:text-center","lc:font-bold"],[1,"lc-video-list"],[1,"lc-video-stories","lc:flex","lc:overflow-auto","lc:m-3","lc:gap-3","lc:justify-center","lc:items-center"],[1,"lc-video-card"],["href","",1,"lc-video-wrapper","lc:rounded-lg",3,"click"],["width","100%","playsinline","","loop","","preload","metadata",1,"lc:rounded-lg","lc:transition-transform","lc:duration-300",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","lc:w-full","lc:h-auto","lc:text-center","lc:z-4","lc:p-4"],[3,"toggled","muted","videoEl"],[1,"lc-item-image",3,"src","alt"],[1,"lc-item-details"],[1,"lc-item-name","lc:line-clamp-1"],[1,"lc-item-price",3,"innerHTML"],["id","lc-cta-button","type","button",1,"lc-cta-button","lc:w-full","lc:h-auto","lc:text-center","lc:z-4","lc:p-4",3,"click"],[1,"lc-video-story","lc:relative","lc:w-20","lc:h-20","lc:cursor-pointer"],["viewBox","0 0 100 100",1,"lc:absolute","lc:top-0","lc:left-0","lc:w-full","lc:h-full"],["cx","50","cy","50","r","48","fill","none","stroke-width","4",1,"lc:stroke-gray-300"],["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,"lc:stroke-blue-500"],[1,"lc:w-full","lc:h-full","lc:rounded-full","lc:overflow-hidden"],["autoplay","","loop","",1,"lc:w-full","lc:h-full","lc:object-cover","lc:rounded-full",3,"click","muted"],[3,"video"],[3,"videoClicked","closeClicked","video"]],template:function(r,i){if(r&1&&(Mt(0)(1)(2),De(3,Jv,2,1,"div",1)(4,o0,3,0,"div",2)(5,c0,3,0,"div",3)(6,u0,2,2)),r&2){let o=i.videoConfig.template;W(),Tn(!i.videoConfig.autoPlay||i.videoConfig.autoPlay===i.VideoConfigAutoPlay.ON),W(),Tn(i.videoConfig.autoPlay===i.VideoConfigAutoPlay.ON_HOVER),W(),Ae(i.videoConfig.heading?3:-1),W(),Ae(o===i.VideoConfigTemplate.SIMPLE||o===i.VideoConfigTemplate.SWIPER?4:o===i.VideoConfigTemplate.STORY?5:o===i.VideoConfigTemplate.FLOATING_POPUP?6:-1)}},dependencies:[bn,es,Vn,$r],styles:["[_nghost-%COMP%]{display:block}.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}.lc-video-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2.5px;scroll-snap-align:center;min-width:200px;max-width:300px}.lc-video-card[_ngcontent-%COMP%] video[_ngcontent-%COMP%]:hover{scale:1.1}.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)}.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}.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:#000;font-weight:600}.lc-single-product[_ngcontent-%COMP%] .lc-item-details[_ngcontent-%COMP%] .lc-item-price[_ngcontent-%COMP%]{color:#000}"]})};Zl("CooeeWidgetSDK");(async()=>{let t=await Ul(Ql),e=(n,r)=>{let i=zl(n,{injector:t.injector});customElements.define(r,i)};e(Vo,"cooee-sticky-atc"),e(Fo,"cooee-progressbar"),e(ds,"cooee-shoppable-videos"),e(Yi,"cooee-product-options-picker"),sessionStorage.cooeeDebug&&import("./chunk-UMNEGOTT.js").then(n=>{e(n.DebuggerComponent,"cooee-debugger")}),Xr.filters.define("default",function(n){return n??""}),Xr.defaultConfig.defaultFilter="default",Xr.defaultConfig.useWith=!0,Xr.defaultConfig.autoTrim="slurp"})();
|
|
74
|
+
`}var tl=!1;function Sy(t,e,n){let r=t[e];if(tl&&typeof r!="function")throw new Error(`${t.constructor.name} is using untilDestroyed but doesn't implement ${e}`);fp(t,n),t[e]=function(){r.apply(this,arguments),pp(this,n),t[e]=r}}function _p(t,e){return n=>{let r=dp(e);typeof e=="string"?Sy(t,e,r):(tl&&xy(t),fp(t,r));let i=t[r];return tl&&by(t,i),n.pipe(mr(i))}}function xy(t){let e=Object.getPrototypeOf(t);if(!(up in e))throw new Error("untilDestroyed operator cannot be used inside directives or components or providers that are not decorated with UntilDestroy decorator")}var ds=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=Re({type:t,selectors:[["cooee-base-video"]],inputs:{triggerContext:"triggerContext"},decls:0,vars:0,template:function(n,r){},encapsulation:2})};var Iy=t=>({active:t}),Ty=(t,e)=>e.mID;function Oy(t,e){if(t&1&&Se(0,"img",9),t&2){let n=e.$implicit,r=Z(2);ve("src",n.url,st)("alt",r.selectedItem.name)}}function Dy(t,e){if(t&1&&Ze(0,Oy,1,2,"img",9,pn),t&2){let n=Z();Je(n.selectedItem.imgs)}}function Ay(t,e){if(t&1&&Se(0,"img",9),t&2){let n=Z();ve("src",n.selectedItem.imageURL,st)("alt",n.selectedItem.name)}}function Ny(t,e){if(t&1){let n=Ye();W(0,"a",18),Ae("click",function(i){let o=Me(n).$implicit;return Z(2).changeItem(o),i.stopPropagation(),Pe(i.preventDefault())}),Se(1,"img",19),z()}if(t&2){let n=e.$implicit,r=Z(2);H(),ve("src",n.imageURL,st)("alt",n.name)("ngClass",ji(3,Iy,n.mID===r.selectedItem.mID+""))}}function Ry(t,e){if(t&1&&(W(0,"span",16),xe(1,"Selected Product"),z(),W(2,"div",8),Ze(3,Ny,2,5,"a",17,pn),z()),t&2){let n=Z();H(3),Je(n.items)}}function My(t,e){if(t&1){let n=Ye();W(0,"a",23),Ae("click",function(i){let o=Me(n).$implicit,s=Z(2);return Pe(s.changeVariant(i,o))}),W(1,"span",24),xe(2),z()()}if(t&2){let n=e.$implicit,r=Z(2);Wn("lc-selected-variant",(r.selectedVariant==null?null:r.selectedVariant.mID)===n.mID),H(2),sn(n.name)}}function Py(t,e){if(t&1&&(W(0,"span",20),xe(1,"Select Variant"),z(),W(2,"div",21),Ze(3,My,3,3,"a",22,Ty),z()),t&2){let n=Z();H(3),Je(n.selectedItem.vars)}}function ky(t,e){if(t&1&&(W(0,"div",25),xe(1,"Description"),z(),Se(2,"div",26),yt(3,"safeHtml")),t&2){let n=Z();H(2),ve("innerHTML",It(3,1,n.selectedItem.desc),nn)}}function Ly(t,e){t&1&&xe(0," Open Cart ")}function Fy(t,e){t&1&&xe(0," Add To Cart ")}var fs=class t{selectedItem;items;closeModel=new ot;performCTA=new ot;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=Re({type:t,selectors:[["cooee-product-modal"]],inputs:{selectedItem:"selectedItem",items:"items"},outputs:{closeModel:"closeModel",performCTA:"performCTA"},decls:27,vars:11,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-item-price",3,"innerHTML"],[1,"lc-card-footer"],[1,"lc-cta-button",3,"click"],[1,"lc-more-info-button",3,"click"],[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){n&1&&(W(0,"div",0)(1,"div",1)(2,"div",2),xe(3,"Shop Now"),z(),W(4,"button",3),Ae("click",function(){return r.closeDialog()}),Vt(),W(5,"svg",4),Se(6,"path",5)(7,"path",6),z()()(),$n(),W(8,"div",7)(9,"div",8),Oe(10,Dy,2,0)(11,Ay,1,2,"img",9),z(),W(12,"div",10)(13,"div",11),xe(14),z(),Se(15,"span",12),yt(16,"cooeeCurrency"),yt(17,"safeHtml"),Oe(18,Ry,5,0)(19,Py,5,0)(20,ky,4,3),z()(),W(21,"div",13)(22,"button",14),Ae("click",function(){return r.clickAddToCart(r.selectedItem)}),Oe(23,Ly,1,0)(24,Fy,1,0),z(),W(25,"button",15),Ae("click",function(){return r.performCTA.emit({item:r.selectedItem,cta:r.ClickActionType.GO_TO_PRODUCT})}),xe(26," More Info "),z()()()),n&2&&(H(10),Ie(r.selectedItem.imgs!=null&&r.selectedItem.imgs.length?10:11),H(4),sn(r.selectedItem.name),H(),ve("innerHTML",It(17,9,It(16,7,r.selectedVariant==null||r.selectedVariant.price==null?null:r.selectedVariant.price.d)),nn),H(3),Ie(r.items.length>1?18:-1),H(),Ie(r.selectedItem.vars[0]!=null&&r.selectedItem.vars[0].name!=="Default Title"?19:-1),H(),Ie(r.selectedItem.desc?20:-1),H(3),Ie(r.atcClicked?23:24))},dependencies:[Bn,Cn,Vn],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:#000}.lc-item-price[_ngcontent-%COMP%]{font-size:18px;font-weight:500;color:#000}.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 ps=class t{width;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Re({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&&(H(3),ni("width",r.width,"%"))},encapsulation:2})};function Vy(t,e){t&1&&xe(0," Open Cart ")}function By(t,e){t&1&&xe(0," Add To Cart ")}var hs=class t{item;performCTA=new ot;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=Re({type:t,selectors:[["cooee-product-card"]],inputs:{item:"item"},outputs:{performCTA:"performCTA"},decls:13,vars:11,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-item-price",3,"innerHTML"],[1,"lc-cta-button",3,"click"]],template:function(n,r){if(n&1){let i=Ye();W(0,"div",0)(1,"div",1),Se(2,"img",2),W(3,"div",3)(4,"div",4),xe(5),z(),vt(6),Se(7,"div",5),yt(8,"cooeeCurrency"),yt(9,"safeHtml"),z()(),W(10,"button",6),Ae("click",function(s){return Me(i),Pe(r.clickAddToCart(s))}),Oe(11,Vy,1,0)(12,By,1,0),z()()}if(n&2){H(2),On("alt",r.item.name),ve("src",r.item.imageURL,st),H(3),xt(" ",r.item.name," ");let i=r.item.selectedOrFirstVariant.value.price.d;H(2),ve("innerHTML",It(9,9,It(8,7,i)),nn),H(3),Wn("atc-clicked",r.atcClicked),H(),Ie(r.atcClicked?11:12)}},dependencies:[Cn,Bn],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:#000}.lc-item-price[_ngcontent-%COMP%]{font-size:16px;line-height:normal;color:#000}.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 Uy(t,e){if(t&1&&(W(0,"span",1),xe(1),z()),t&2){Z();let n=pt(0);H(),sn(n.heading)}}function Hy(t,e){if(t&1&&(W(0,"span",2),xe(1),z()),t&2){Z();let n=pt(0);H(),sn(n.subHeading)}}var Xr=class t{card=Vi.required();linkClicked=xl();linkAfterSanity(){return this.card()?.buttonLink?.startsWith("https")?this.card().buttonLink:null}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Re({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=Ye();vt(0),W(1,"div",0),Oe(2,Uy,2,1,"span",1)(3,Hy,2,1,"span",2),W(4,"a",3),Ae("click",function(){return Me(i),Pe(r.linkClicked.emit())}),xe(5),z()()}if(n&2){let i=Yt(r.card());H(2),Ie(i!=null&&i.heading?2:-1),H(),Ie(i!=null&&i.subHeading?3:-1),H(),ve("href",r.linkAfterSanity(),st)("target",i.newTab?"_blank":"_self"),H(),xt(" ",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 $y=["swiperContainer"],Gy=["videoEl"],Wy=(t,e)=>e.url,Yy=(t,e)=>e.mID;function zy(t,e){if(t&1&&Se(0,"source",14),t&2){let n=e.$implicit;On("type",n.mimeType),ve("src",n.url,st)}}function Ky(t,e){t&1&&Ds(0)}function Xy(t,e){if(t&1){let n=Ye();Se(0,"cooee-video-progress-bar",17),W(1,"div",18)(2,"cooee-mute-toggle",19),Ae("toggled",function(){Me(n);let i=Z(2);return Pe(i.toggleMute())}),z(),Oe(3,Ky,1,0,"ng-container",10),z()}if(t&2){let n=Z().$index,r=on(4),i=Z(),o=on(11);ve("width",i.videoProgress[n]||0),H(2),ve("muted",i.muted)("videoEl",r),H(),ve("ngTemplateOutlet",o)}}function qy(t,e){if(t&1){let n=Ye();W(0,"cooee-product-card",23),Ae("performCTA",function(i){Me(n);let o=Z(3).$implicit,s=Z();return Pe(s.performClickToAction(i,o))})("click",function(){let i=Me(n).$implicit,o=Z(3).$implicit,s=Z();return Pe(s.productCardClicked(i,o))}),z()}if(t&2){let n=e.$implicit;ve("item",n)}}function Zy(t,e){if(t&1&&(W(0,"div",20),Ze(1,qy,1,1,"cooee-product-card",22,Yy),z()),t&2){let n=Z(2).$implicit;H(),Je(n.items)}}function Jy(t,e){if(t&1&&Se(0,"cooee-video-card",21),t&2){let n=Z(2).$implicit;ve("card",n.card)}}function Qy(t,e){if(t&1&&(W(0,"div",15),Oe(1,Zy,3,0,"div",20)(2,Jy,1,1,"cooee-video-card",21),z()),t&2){let n=Z().$implicit,r=Z();H(),Ie(n.items.length&&r.footerContent===r.VideoConfigFooterContent.FIRST_ITEM?1:n.card&&r.footerContent===r.VideoConfigFooterContent.CARD?2:-1)}}function e0(t,e){if(t&1){let n=Ye();W(0,"cooee-product-modal",24),Ae("performCTA",function(i){Me(n);let o=Z(2);return Pe(o.performClickToAction(i,o.selectedVideo))})("closeModel",function(){Me(n);let i=Z(2);return Pe(i.productModalClosed())}),z()}if(t&2){let n=Z(2);ve("selectedItem",n.selectedItem)("items",n.selectedVideo.items)}}function t0(t,e){if(t&1){let n=Ye();W(0,"div",6)(1,"div",11)(2,"div",12)(3,"video",13,2),Ae("timeupdate",function(i){let o=Me(n).$index,s=Z();return Pe(s.updateProgress(i,o))})("click",function(){let i=Me(n).$index,o=Z();return Pe(o.currentIndex===i&&o.toggleMute())})("ended",function(){Me(n);let i=on(4),o=Z();return Pe(o.onVideoEnded(i))}),Ze(5,zy,1,2,"source",14,Wy),z(),Oe(7,Xy,4,4)(8,Qy,3,1,"div",15),z(),Oe(9,e0,1,2,"cooee-product-modal",16),z()()}if(t&2){let n=e.$implicit,r=e.$index,i=Z();H(3),ve("ngClass",i.viewTemplateClassName)("autoplay",i.currentIndex===r)("muted",i.muted)("poster",n.thumbnail,st),Tn("data-video-id",n.id),H(2),Je(n.sources),H(2),Ie(i.currentIndex===r?7:-1),H(),Ie(i.currentIndex===r?8:-1),H(),Ie(i.selectedItem&&i.currentIndex===r?9:-1)}}function n0(t,e){t&1&&Ds(0)}function r0(t,e){if(t&1){let n=Ye();W(0,"button",25),Ae("click",function(){Me(n);let i=Z();return Pe(i.close())}),Vt(),W(1,"svg",26),Se(2,"path",27)(3,"path",28),z()()}}var fn=class extends ds{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=Si;muted=!1;videoProgress=[];selectedItem=null;selectedVideo;swiperInstance;detailPopupTemplate;footerContent;viewTemplateClassName="lc-video-only-view";resizeDebouncer=new us(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=Er.get().website.commonCSS;switch(zt.injectRawCSS(i,r),zt.injectStylesheet(Nn.styleURL,r),zt.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(){gl(this.getCurrentVideoElement(),"loadeddata").pipe(_p(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?ze.EVENT_VIDEO_MUTED:ze.EVENT_VIDEO_UNMUTED,{current:this.currentVideoProps()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(r),await Nr.set(Dr.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(Dr.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=[ze.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=[ze.EVENT_VIDEO_CHANGE,o,{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(s)}productCardClicked(n,r){let i={videoID:r.id,videoIndex:this.currentIndex},o=[ze.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}};Cs(fn,"\u0275fac",function(r){return new(r||fn)(rn(Xn),rn(Ct),rn(pr),rn(el))}),Cs(fn,"\u0275cmp",Re({type:fn,selectors:[["cooee-video-swiper-dialog"]],viewQuery:function(r,i){if(r&1&&(Yn($y,5),Yn(Gy,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),Ze(4,t0,10,8,"div",6,pn),z(),Se(6,"div",7)(7,"div",8),z(),W(8,"div",9),Oe(9,n0,1,0,"ng-container",10),z()(),Oe(10,r0,4,0,"ng-template",null,1,Pl)),r&2){let o=on(11);ve("ngClass",i.viewTemplateClassName),H(4),Je(i.videos),H(5),ve("ngTemplateOutlet",o)}},dependencies:[hs,fs,$r,ps,Bl,Vn,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}
|
|
75
|
+
`],encapsulation:3})),fn=ll([gp()],fn);var i0=["videoEl"],vp=(t,e)=>e.url;function o0(t,e){if(t&1&&(W(0,"div",1),xe(1),z()),t&2){let n=Z();H(),xt(" ",n.videoConfig.heading," ")}}function s0(t,e){if(t&1&&Se(0,"source",7),t&2){let n=e.$implicit;On("type",n.mimeType),ve("src",n.url,st)}}function a0(t,e){if(t&1){let n=Ye();W(0,"cooee-mute-toggle",13),Ae("toggled",function(i){Me(n),Z();let o=on(7),s=Z(2);return Pe(s.onMuteToggled(i,o))}),z()}if(t&2){Z();let n=on(7);ve("muted",n.muted)("videoEl",n)}}function c0(t,e){if(t&1&&Se(0,"img",14),t&2){Z(2);let n=pt(0);ve("src",n.imageURL,st)("alt",n.name)}}function l0(t,e){if(t&1&&(W(0,"div",10),Oe(1,c0,1,2,"img",14),W(2,"div",15)(3,"span",16),xe(4),z(),vt(5),Se(6,"span",17),yt(7,"cooeeCurrency"),yt(8,"safeHtml"),z()()),t&2){Z();let n=pt(0),r=Z(2);H(),Ie(r.showImage?1:-1),H(3),xt(" ",n.name," ");let i=n.selectedOrFirstVariant.value.price.d;H(2),ve("innerHTML",It(8,5,It(7,3,i)),nn)}}function u0(t,e){if(t&1){let n=Ye();W(0,"button",18),Ae("click",function(){Me(n);let i=Z().$implicit,o=pt(0),s=Z(2);return Pe(s.addToCartClicked(i,o))}),xe(1," Add to cart "),z()}}function d0(t,e){if(t&1){let n=Ye();W(0,"cooee-video-card",19),Ae("linkClicked",function(){Me(n);let i=Z().$implicit,o=Z(2);return Pe(o.sendTriggerClicked(i))}),z()}if(t&2){Z();let n=pt(1);ve("card",n)}}function f0(t,e){if(t&1){let n=Ye();vt(0)(1)(2)(3),W(4,"div",4)(5,"a",5),Ae("click",function(i){let o=Me(n),s=o.$implicit,c=o.$index,u=on(7),d=Z(2);return Pe(d.onVideoTap(i,s,c,u))}),W(6,"video",6,0),Ae("mouseenter",function(){Me(n);let i=on(7);Z(2);let o=pt(2);return Pe(o&&i.play())})("mouseleave",function(){Me(n);let i=on(7);Z(2);let o=pt(2);return Pe(o&&i.pause())}),Ze(8,s0,1,2,"source",7,vp),z(),W(10,"div",8),Oe(11,a0,1,2,"cooee-mute-toggle",9),z(),Oe(12,l0,9,7,"div",10),z(),Oe(13,u0,2,0,"button",11)(14,d0,1,1,"cooee-video-card",12),z()}if(t&2){let n=e.$implicit,r=Z(2),i=pt(1),o=Yt(n.items[0]);H();let s=Yt(n.card),c=o&&r.videoConfig.footerContent==r.VideoConfigFooterContent.FIRST_ITEM,u=s&&r.videoConfig.footerContent==r.VideoConfigFooterContent.CARD;H(5),ve("poster",n.thumbnail,st)("muted",!0),Tn("autoplay",i||null),H(2),Je(n.sources),H(3),Ie(r.videoConfig.showMuteButton?11:-1),H(),Ie(c?12:-1),H(),Ie(c?13:u?14:-1)}}function p0(t,e){if(t&1&&(W(0,"div",2),Ze(1,f0,15,8,"div",4,pn),z()),t&2){let n=Z();H(),Je(n.videos)}}function h0(t,e){if(t&1&&Se(0,"source",7),t&2){let n=e.$implicit;On("type",n.mimeType),ve("src",n.url,st)}}function m0(t,e){if(t&1){let n=Ye();W(0,"div",20),Vt(),W(1,"svg",21),Se(2,"circle",22)(3,"circle",23),z(),$n(),W(4,"div",24)(5,"video",25),Ae("click",function(i){let o=Me(n),s=o.$implicit,c=o.$index,u=Z(2);return Pe(u.onVideoTap(i,s,c))}),Ze(6,h0,1,2,"source",7,vp),z()()()}if(t&2){let n=e.$implicit;H(5),ve("muted",!0),H(),Je(n.sources)}}function g0(t,e){if(t&1&&(W(0,"div",3),Ze(1,m0,8,1,"div",20,pn),z()),t&2){let n=Z();H(),Je(n.videos)}}function _0(t,e){if(t&1){let n=Ye();W(0,"cooee-draggable-video-popup",27),Ae("videoClicked",function(){Me(n),Z();let i=pt(0),o=Z();return Pe(o.onPopupVideoClicked(i,0))})("closeClicked",function(){Me(n);let i=Z(2);return Pe(i.onPopupVideoClosed())}),z()}if(t&2){Z();let n=pt(0);ve("video",n)}}function v0(t,e){if(t&1&&(vt(0),Oe(1,_0,1,1,"cooee-draggable-video-popup",26)),t&2){let n=Z();Yt(n.videos[0]),H(),Ie(n.hidePopupVideo?-1:1)}}var ms=class t extends hn{constructor(n,r){super();this.dialog=n;this.cdr=r}videoElements;videos;VideoConfigTemplate=Cc;VideoConfigFooterContent=Si;VideoConfigAutoPlay=Sc;isMobile=window.CooeeSDK.uaParser.getDevice().type==="mobile";hidePopupVideo;videoConfig;showImage;dialogRef=null;ngOnInit(){super.ngOnInit(),zt.loadSwiperScript(),this.showImage=this.videoConfig.detailPopup.template==="PRODUCT_DETAIL_VIEW"}ngAfterViewInit(){this.playFirstVideo()}engagementTriggerReceived(n){this.videoConfig=n.content?.videoConfig,this.videos=this.videoConfig.videos}sendTriggerClicked(n,r){let i=new jr(ze.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}zt.loadSwiperScript().then(()=>this.openDialog(r,i))}async performCTA(n){let r,i=this.triggerContext;if(n.cta===Ut.ADD_TO_CART)r=ze.EVENT_ADD_TO_CART_CLICKED;else if(n.cta===Ut.GO_TO_PRODUCT)r=ze.EVENT_VIEW_ITEM_CLICKED;else if(n.cta===Ut.OPEN_CART)r=ze.EVENT_OPEN_CART_CLICKED,i.triggerData.redirectBehaviour=Bs.CART_DRAWER;else{_t.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(ze.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(fn,{width:"100vw",height:"100vh",data:i});let o={videoID:n.id,videoIndex:r};this.sendEvent(ze.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(ze.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)(rn(op),rn(Xn))};static \u0275cmp=Re({type:t,selectors:[["cooee-shoppable-videos"]],viewQuery:function(r,i){if(r&1&&Yn(i0,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-item-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&&(vt(0)(1)(2),Oe(3,o0,2,1,"div",1)(4,p0,3,0,"div",2)(5,g0,3,0,"div",3)(6,v0,2,2)),r&2){let o=i.videoConfig.template;H(),Yt(!i.videoConfig.autoPlay||i.videoConfig.autoPlay===i.VideoConfigAutoPlay.ON),H(),Yt(i.videoConfig.autoPlay===i.VideoConfigAutoPlay.ON_HOVER),H(),Ie(i.videoConfig.heading?3:-1),H(),Ie(o===i.VideoConfigTemplate.SIMPLE||o===i.VideoConfigTemplate.SWIPER?4:o===i.VideoConfigTemplate.STORY?5:o===i.VideoConfigTemplate.FLOATING_POPUP?6:-1)}},dependencies:[Cn,is,Bn,$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}.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:#000;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:#000}.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}"]})};Jl("CooeeWidgetSDK");(async()=>{let t=await Hl(eu),e=(n,r)=>{let i=Kl(n,{injector:t.injector});customElements.define(r,i)};e(Ho,"cooee-sticky-atc"),e(Uo,"cooee-progressbar"),e(ms,"cooee-shoppable-videos"),e(Xi,"cooee-product-options-picker"),sessionStorage.cooeeDebug&&import("./chunk-JOXIDZEB.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"})();
|