@letscooee/web-sdk 9.6.0 → 9.6.1

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.
@@ -4,7 +4,7 @@ ${t.map((r,n)=>`${n+1}) ${r.toString()}`).join(`
4
4
  `);return n>=0?r.slice(0,n):r}function Ow(e,t){return e?t?`${e} ${t}`:e:t||""}var IN=Rt({__forward_ref__:Rt});function Sg(e){return e.__forward_ref__=Sg,e.toString=function(){return dr(this())},e}function Pn(e){return Sb(e)?e():e}function Sb(e){return typeof e=="function"&&e.hasOwnProperty(IN)&&e.__forward_ref__===Sg}function oe(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function Dg(e){return Pw(e,Db)||Pw(e,Ib)}function Pw(e,t){return e.hasOwnProperty(t)?e[t]:null}function TN(e){return e&&(e[Db]||e[Ib])||null}function kw(e){return e&&(e.hasOwnProperty(Lw)||e.hasOwnProperty(xN))?e[Lw]:null}var Db=Rt({\u0275prov:Rt}),Lw=Rt({\u0275inj:Rt}),Ib=Rt({ngInjectableDef:Rt}),xN=Rt({ngInjectorDef:Rt}),he=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(e,t){this._desc=e,this.\u0275prov=void 0,typeof t=="number"?this.__NG_ELEMENT_ID__=t:t!==void 0&&(this.\u0275prov=oe({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Tb(e){return e&&!!e.\u0275providers}var RN=Rt({\u0275cmp:Rt}),NN=Rt({\u0275dir:Rt}),AN=Rt({\u0275pipe:Rt}),Qu=Rt({\u0275fac:Rt}),Fc=Rt({__NG_ELEMENT_ID__:Rt}),Fw=Rt({__NG_ENV_ID__:Rt});function Jc(e){return typeof e=="string"?e:e==null?"":String(e)}function MN(e){return typeof e=="function"?e.name||e.toString():typeof e=="object"&&e!=null&&typeof e.type=="function"?e.type.name||e.type.toString():Jc(e)}function ON(e,t){throw new Oe(-200,e)}function Ig(e,t){throw new Oe(-201,!1)}var Je=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}(Je||{}),ym;function xb(){return ym}function Wn(e){let t=ym;return ym=e,t}function Rb(e,t,r){let n=Dg(e);if(n&&n.providedIn=="root")return n.value===void 0?n.value=n.factory():n.value;if(r&Je.Optional)return null;if(t!==void 0)return t;Ig(e,"Injector")}var PN={},Vc=PN,_m="__NG_DI_FLAG__",ed="ngTempTokenPath",kN="ngTokenPath",LN=/\n/gm,FN="\u0275",Bw="__source",ea;function BN(){return ea}function ro(e){let t=ea;return ea=e,t}function VN(e,t=Je.Default){if(ea===void 0)throw new Oe(-203,!1);return ea===null?Rb(e,void 0,t):ea.get(e,t&Je.Optional?null:void 0,t)}function et(e,t=Je.Default){return(xb()||VN)(Pn(e),t)}function O(e,t=Je.Default){return et(e,Cd(t))}function Cd(e){return typeof e>"u"||typeof e=="number"?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function Em(e){let t=[];for(let r=0;r<e.length;r++){let n=Pn(e[r]);if(Array.isArray(n)){if(n.length===0)throw new Oe(900,!1);let i,s=Je.Default;for(let o=0;o<n.length;o++){let a=n[o],l=UN(a);typeof l=="number"?l===-1?i=a.token:s|=l:i=a}t.push(et(i,s))}else t.push(et(n))}return t}function Nb(e,t){return e[_m]=t,e.prototype[_m]=t,e}function UN(e){return e[_m]}function HN(e,t,r,n){let i=e[ed];throw t[Bw]&&i.unshift(t[Bw]),e.message=jN(`
5
5
  `+e.message,i,r,n),e[kN]=i,e[ed]=null,e}function jN(e,t,r,n=null){e=e&&e.charAt(0)===`
6
6
  `&&e.charAt(1)==FN?e.slice(2):e;let i=dr(t);if(Array.isArray(t))i=t.map(dr).join(" -> ");else if(typeof t=="object"){let s=[];for(let o in t)if(t.hasOwnProperty(o)){let a=t[o];s.push(o+":"+(typeof a=="string"?JSON.stringify(a):dr(a)))}i=`{${s.join(", ")}}`}return`${r}${n?"("+n+")":""}[${i}]: ${e.replace(LN,`
7
- `)}`}var Tg=Nb(Cb("Optional"),8),$N=Nb(Cb("SkipSelf"),4);function Ho(e,t){return e.hasOwnProperty(Qu)?e[Qu]:null}function WN(e,t,r){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let i=e[n],s=t[n];if(r&&(i=r(i),s=r(s)),s!==i)return!1}return!0}function GN(e){return e.flat(Number.POSITIVE_INFINITY)}function xg(e,t){e.forEach(r=>Array.isArray(r)?xg(r,t):t(r))}function Ab(e,t,r){t>=e.length?e.push(r):e.splice(t,0,r)}function td(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function zN(e,t,r,n){let i=e.length;if(i==t)e.push(r,n);else if(i===1)e.push(n,e[0]),e[0]=r;else{for(i--,e.push(e[i-1],e[i]);i>t;){let s=i-2;e[i]=e[s],i--}e[t]=r,e[t+1]=n}}function qN(e,t,r){let n=Qc(e,t);return n>=0?e[n|1]=r:(n=~n,zN(e,n,t,r)),n}function im(e,t){let r=Qc(e,t);if(r>=0)return e[r|1]}function Qc(e,t){return YN(e,t,1)}function YN(e,t,r){let n=0,i=e.length>>r;for(;i!==n;){let s=n+(i-n>>1),o=e[s<<r];if(t===o)return s<<r;o>t?i=s:n=s+1}return~(i<<r)}var jo={},so=[],Uc=new he(""),Mb=new he("",-1),Ob=new he(""),nd=class{get(e,t=Vc){if(t===Vc){let r=new Error(`NullInjectorError: No provider for ${dr(e)}!`);throw r.name="NullInjectorError",r}return t}};function $o(e){return e[RN]||null}function Pb(e){return e[NN]||null}function kb(e){return e[AN]||null}function KN(e){let t=$o(e)||Pb(e)||kb(e);return t!==null&&t.standalone}function Lb(e){return{\u0275providers:e}}function ZN(...e){return{\u0275providers:Fb(!0,e),\u0275fromNgModule:!0}}function Fb(e,...t){let r=[],n=new Set,i,s=o=>{r.push(o)};return xg(t,o=>{let a=o;wm(a,s,[],n)&&(i||=[],i.push(a))}),i!==void 0&&Bb(i,s),r}function Bb(e,t){for(let r=0;r<e.length;r++){let{ngModule:n,providers:i}=e[r];Rg(i,s=>{t(s,n)})}}function wm(e,t,r,n){if(e=Pn(e),!e)return!1;let i=null,s=kw(e),o=!s&&$o(e);if(!s&&!o){let l=e.ngModule;if(s=kw(l),s)i=l;else return!1}else{if(o&&!o.standalone)return!1;i=e}let a=n.has(i);if(o){if(a)return!1;if(n.add(i),o.dependencies){let l=typeof o.dependencies=="function"?o.dependencies():o.dependencies;for(let c of l)wm(c,t,r,n)}}else if(s){if(s.imports!=null&&!a){n.add(i);let c;try{xg(s.imports,h=>{wm(h,t,r,n)&&(c||=[],c.push(h))})}finally{}c!==void 0&&Bb(c,t)}if(!a){let c=Ho(i)||(()=>new i);t({provide:i,useFactory:c,deps:so},i),t({provide:Ob,useValue:i,multi:!0},i),t({provide:Uc,useValue:()=>et(i),multi:!0},i)}let l=s.providers;if(l!=null&&!a){let c=e;Rg(l,h=>{t(h,c)})}}else return!1;return i!==e&&e.providers!==void 0}function Rg(e,t){for(let r of e)Tb(r)&&(r=r.\u0275providers),Array.isArray(r)?Rg(r,t):t(r)}var XN=Rt({provide:String,useValue:Rt});function Vb(e){return e!==null&&typeof e=="object"&&XN in e}function JN(e){return!!(e&&e.useExisting)}function QN(e){return!!(e&&e.useFactory)}function ra(e){return typeof e=="function"}function eA(e){return!!e.useClass}var Sd=new he(""),qu={},tA={},om;function Dd(){return om===void 0&&(om=new nd),om}var Gn=class{},Hc=class extends Gn{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,t,r,n){super(),this.parent=t,this.source=r,this.scopes=n,Cm(e,s=>this.processProvider(s)),this.records.set(Mb,Zs(void 0,this)),n.has("environment")&&this.records.set(Gn,Zs(void 0,this));let i=this.records.get(Sd);i!=null&&typeof i.value=="string"&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Ob,so,Je.Self))}destroy(){kc(this),this._destroyed=!0;let e=$e(null);try{for(let r of this._ngOnDestroyHooks)r.ngOnDestroy();let t=this._onDestroyHooks;this._onDestroyHooks=[];for(let r of t)r()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),$e(e)}}onDestroy(e){return kc(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){kc(this);let t=ro(this),r=Wn(void 0),n;try{return e()}finally{ro(t),Wn(r)}}get(e,t=Vc,r=Je.Default){if(kc(this),e.hasOwnProperty(Fw))return e[Fw](this);r=Cd(r);let n,i=ro(this),s=Wn(void 0);try{if(!(r&Je.SkipSelf)){let a=this.records.get(e);if(a===void 0){let l=sA(e)&&Dg(e);l&&this.injectableDefInScope(l)?a=Zs(bm(e),qu):a=null,this.records.set(e,a)}if(a!=null)return this.hydrate(e,a)}let o=r&Je.Self?Dd():this.parent;return t=r&Je.Optional&&t===Vc?null:t,o.get(e,t)}catch(o){if(o.name==="NullInjectorError"){if((o[ed]=o[ed]||[]).unshift(dr(e)),i)throw o;return HN(o,e,"R3InjectorError",this.source)}else throw o}finally{Wn(s),ro(i)}}resolveInjectorInitializers(){let e=$e(null),t=ro(this),r=Wn(void 0),n;try{let i=this.get(Uc,so,Je.Self);for(let s of i)s()}finally{ro(t),Wn(r),$e(e)}}toString(){let e=[],t=this.records;for(let r of t.keys())e.push(dr(r));return`R3Injector[${e.join(", ")}]`}processProvider(e){e=Pn(e);let t=ra(e)?e:Pn(e&&e.provide),r=rA(e);if(!ra(e)&&e.multi===!0){let n=this.records.get(t);n||(n=Zs(void 0,qu,!0),n.factory=()=>Em(n.multi),this.records.set(t,n)),t=e,n.multi.push(e)}this.records.set(t,r)}hydrate(e,t){let r=$e(null);try{return t.value===qu&&(t.value=tA,t.value=t.factory()),typeof t.value=="object"&&t.value&&oA(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{$e(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=Pn(e.providedIn);return typeof t=="string"?t==="any"||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(e){let t=this._onDestroyHooks.indexOf(e);t!==-1&&this._onDestroyHooks.splice(t,1)}};function bm(e){let t=Dg(e),r=t!==null?t.factory:Ho(e);if(r!==null)return r;if(e instanceof he)throw new Oe(204,!1);if(e instanceof Function)return nA(e);throw new Oe(204,!1)}function nA(e){if(e.length>0)throw new Oe(204,!1);let t=TN(e);return t!==null?()=>t.factory(e):()=>new e}function rA(e){if(Vb(e))return Zs(void 0,e.useValue);{let t=Ub(e);return Zs(t,qu)}}function Ub(e,t,r){let n;if(ra(e)){let i=Pn(e);return Ho(i)||bm(i)}else if(Vb(e))n=()=>Pn(e.useValue);else if(QN(e))n=()=>e.useFactory(...Em(e.deps||[]));else if(JN(e))n=()=>et(Pn(e.useExisting));else{let i=Pn(e&&(e.useClass||e.provide));if(iA(e))n=()=>new i(...Em(e.deps));else return Ho(i)||bm(i)}return n}function kc(e){if(e.destroyed)throw new Oe(205,!1)}function Zs(e,t,r=!1){return{factory:e,value:t,multi:r?[]:void 0}}function iA(e){return!!e.deps}function oA(e){return e!==null&&typeof e=="object"&&typeof e.ngOnDestroy=="function"}function sA(e){return typeof e=="function"||typeof e=="object"&&e instanceof he}function Cm(e,t){for(let r of e)Array.isArray(r)?Cm(r,t):r&&Tb(r)?Cm(r.\u0275providers,t):t(r)}function Hb(e,t){e instanceof Hc&&kc(e);let r,n=ro(e),i=Wn(void 0);try{return t()}finally{ro(n),Wn(i)}}function jb(){return xb()!==void 0||BN()!=null}function $b(e){if(!jb())throw new Oe(-203,!1)}function aA(e){return typeof e=="function"}var ki=0,Te=1,we=2,xn=3,Ar=4,Pr=5,jc=6,rd=7,nn=8,$c=9,xi=10,ln=11,Wc=12,Vw=13,ca=14,Mr=15,Wo=16,Xs=17,Ri=18,Id=19,Wb=20,io=21,sm=22,id=23,Jn=24,ta=25,wn=26,Gb=1,Go=7,od=8,ia=9,Tn=10;function oo(e){return Array.isArray(e)&&typeof e[Gb]=="object"}function Li(e){return Array.isArray(e)&&e[Gb]===!0}function zb(e){return(e.flags&4)!==0}function la(e){return e.componentOffset>-1}function Ng(e){return(e.flags&1)===1}function qr(e){return!!e.template}function sd(e){return(e[we]&512)!==0}function el(e){return(e[we]&256)===256}var Sm=class{previousValue;currentValue;firstChange;constructor(e,t,r){this.previousValue=e,this.currentValue=t,this.firstChange=r}isFirstChange(){return this.firstChange}};function qb(e,t,r,n){t!==null?t.applyValueToInputSignal(t,n):e[r]=n}var ua=(()=>{let e=()=>Yb;return e.ngInherit=!0,e})();function Yb(e){return e.type.prototype.ngOnChanges&&(e.setInput=lA),cA}function cA(){let e=Zb(this),t=e?.current;if(t){let r=e.previous;if(r===jo)e.previous=t;else for(let n in t)r[n]=t[n];e.current=null,this.ngOnChanges(t)}}function lA(e,t,r,n,i){let s=this.declaredInputs[n],o=Zb(e)||uA(e,{previous:jo,current:null}),a=o.current||(o.current={}),l=o.previous,c=l[s];a[s]=new Sm(c&&c.currentValue,r,l===jo),qb(e,t,i,r)}var Kb="__ngSimpleChanges__";function Zb(e){return e[Kb]||null}function uA(e,t){return e[Kb]=t}var Uw=null,vt=function(e,t=null,r){Uw?.(e,t,r)},Xb="svg",dA="math";function Yr(e){for(;Array.isArray(e);)e=e[ki];return e}function Jb(e,t){return Yr(t[e])}function Jr(e,t){return Yr(t[e.index])}function Ag(e,t){return e.data[t]}function Mg(e,t){return e[t]}function Kr(e,t){let r=t[e];return oo(r)?r:r[ki]}function fA(e){return(e[we]&4)===4}function Og(e){return(e[we]&128)===128}function pA(e){return Li(e[xn])}function oa(e,t){return t==null?null:e[t]}function Qb(e){e[Xs]=0}function Pg(e){e[we]&1024||(e[we]|=1024,Og(e)&&tl(e))}function hA(e,t){for(;e>0;)t=t[ca],e--;return t}function Td(e){return!!(e[we]&9216||e[Jn]?.dirty)}function Dm(e){e[xi].changeDetectionScheduler?.notify(8),e[we]&64&&(e[we]|=1024),Td(e)&&tl(e)}function tl(e){e[xi].changeDetectionScheduler?.notify(0);let t=zo(e);for(;t!==null&&!(t[we]&8192||(t[we]|=8192,!Og(t)));)t=zo(t)}function eC(e,t){if(el(e))throw new Oe(911,!1);e[io]===null&&(e[io]=[]),e[io].push(t)}function mA(e,t){if(e[io]===null)return;let r=e[io].indexOf(t);r!==-1&&e[io].splice(r,1)}function zo(e){let t=e[xn];return Li(t)?t[xn]:t}function tC(e){return e[rd]??=[]}function nC(e){return e.cleanup??=[]}function gA(e,t,r,n){let i=tC(t);i.push(r),e.firstCreatePass&&nC(e).push(n,i.length-1)}var Re={lFrame:uC(null),bindingsEnabled:!0,skipHydrationRootTNode:null},Im=!1;function vA(){return Re.lFrame.elementDepthCount}function yA(){Re.lFrame.elementDepthCount++}function _A(){Re.lFrame.elementDepthCount--}function rC(){return Re.bindingsEnabled}function EA(){return Re.skipHydrationRootTNode!==null}function wA(e){return Re.skipHydrationRootTNode===e}function bA(){Re.skipHydrationRootTNode=null}function Ge(){return Re.lFrame.lView}function dn(){return Re.lFrame.tView}function ze(e){return Re.lFrame.contextLView=e,e[nn]}function qe(e){return Re.lFrame.contextLView=null,e}function pr(){let e=iC();for(;e!==null&&e.type===64;)e=e.parent;return e}function iC(){return Re.lFrame.currentTNode}function CA(){let e=Re.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function da(e,t){let r=Re.lFrame;r.currentTNode=e,r.isParent=t}function oC(){return Re.lFrame.isParent}function SA(){Re.lFrame.isParent=!1}function DA(){return Re.lFrame.contextLView}function sC(){return Im}function Hw(e){let t=Im;return Im=e,t}function kg(){let e=Re.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function IA(e){return Re.lFrame.bindingIndex=e}function nl(){return Re.lFrame.bindingIndex++}function TA(e){let t=Re.lFrame,r=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,r}function xA(){return Re.lFrame.inI18n}function RA(e,t){let r=Re.lFrame;r.bindingIndex=r.bindingRootIndex=e,Tm(t)}function NA(){return Re.lFrame.currentDirectiveIndex}function Tm(e){Re.lFrame.currentDirectiveIndex=e}function AA(e){let t=Re.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function aC(){return Re.lFrame.currentQueryIndex}function Lg(e){Re.lFrame.currentQueryIndex=e}function MA(e){let t=e[Te];return t.type===2?t.declTNode:t.type===1?e[Pr]:null}function cC(e,t,r){if(r&Je.SkipSelf){let i=t,s=e;for(;(i=i.parent,i===null&&!(r&Je.Host))&&(i=MA(s),!(i===null||(s=s[ca],i.type&10))););if(i===null)return!1;t=i,e=s}let n=Re.lFrame=lC();return n.currentTNode=t,n.lView=e,!0}function Fg(e){let t=lC(),r=e[Te];Re.lFrame=t,t.currentTNode=r.firstChild,t.lView=e,t.tView=r,t.contextLView=e,t.bindingIndex=r.bindingStartIndex,t.inI18n=!1}function lC(){let e=Re.lFrame,t=e===null?null:e.child;return t===null?uC(e):t}function uC(e){let t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return e!==null&&(e.child=t),t}function dC(){let e=Re.lFrame;return Re.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var fC=dC;function Bg(){let e=dC();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function OA(e){return(Re.lFrame.contextLView=hA(e,Re.lFrame.contextLView))[nn]}function co(){return Re.lFrame.selectedIndex}function qo(e){Re.lFrame.selectedIndex=e}function Vg(){let e=Re.lFrame;return Ag(e.tView,e.selectedIndex)}function zn(){Re.lFrame.currentNamespace=Xb}function Fi(){PA()}function PA(){Re.lFrame.currentNamespace=null}function kA(){return Re.lFrame.currentNamespace}var pC=!0;function Ug(){return pC}function Hg(e){pC=e}function LA(e,t,r){let{ngOnChanges:n,ngOnInit:i,ngDoCheck:s}=t.type.prototype;if(n){let o=Yb(t);(r.preOrderHooks??=[]).push(e,o),(r.preOrderCheckHooks??=[]).push(e,o)}i&&(r.preOrderHooks??=[]).push(0-e,i),s&&((r.preOrderHooks??=[]).push(e,s),(r.preOrderCheckHooks??=[]).push(e,s))}function hC(e,t){for(let r=t.directiveStart,n=t.directiveEnd;r<n;r++){let i=e.data[r].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:o,ngAfterViewInit:a,ngAfterViewChecked:l,ngOnDestroy:c}=i;s&&(e.contentHooks??=[]).push(-r,s),o&&((e.contentHooks??=[]).push(r,o),(e.contentCheckHooks??=[]).push(r,o)),a&&(e.viewHooks??=[]).push(-r,a),l&&((e.viewHooks??=[]).push(r,l),(e.viewCheckHooks??=[]).push(r,l)),c!=null&&(e.destroyHooks??=[]).push(r,c)}}function Yu(e,t,r){mC(e,t,3,r)}function Ku(e,t,r,n){(e[we]&3)===r&&mC(e,t,r,n)}function am(e,t){let r=e[we];(r&3)===t&&(r&=16383,r+=1,e[we]=r)}function mC(e,t,r,n){let i=n!==void 0?e[Xs]&65535:0,s=n??-1,o=t.length-1,a=0;for(let l=i;l<o;l++)if(typeof t[l+1]=="number"){if(a=t[l],n!=null&&a>=n)break}else t[l]<0&&(e[Xs]+=65536),(a<s||s==-1)&&(FA(e,r,t,l),e[Xs]=(e[Xs]&4294901760)+l+2),l++}function jw(e,t){vt(4,e,t);let r=$e(null);try{t.call(e)}finally{$e(r),vt(5,e,t)}}function FA(e,t,r,n){let i=r[n]<0,s=r[n+1],o=i?-r[n]:r[n],a=e[o];i?e[we]>>14<e[Xs]>>16&&(e[we]&3)===t&&(e[we]+=16384,jw(a,s)):jw(a,s)}var na=-1,Yo=class{factory;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,t,r){this.factory=e,this.canSeeViewProviders=t,this.injectImpl=r}};function BA(e){return e instanceof Yo}function VA(e){return(e.flags&8)!==0}function UA(e){return(e.flags&16)!==0}function HA(e,t,r){let n=0;for(;n<r.length;){let i=r[n];if(typeof i=="number"){if(i!==0)break;n++;let s=r[n++],o=r[n++],a=r[n++];e.setAttribute(t,o,a,s)}else{let s=i,o=r[++n];$A(s)?e.setProperty(t,s,o):e.setAttribute(t,s,o),n++}}return n}function jA(e){return e===3||e===4||e===6}function $A(e){return e.charCodeAt(0)===64}function Gc(e,t){if(!(t===null||t.length===0))if(e===null||e.length===0)e=t.slice();else{let r=-1;for(let n=0;n<t.length;n++){let i=t[n];typeof i=="number"?r=i:r===0||(r===-1||r===2?$w(e,r,i,null,t[++n]):$w(e,r,i,null,null))}}return e}function $w(e,t,r,n,i){let s=0,o=e.length;if(t===-1)o=-1;else for(;s<e.length;){let a=e[s++];if(typeof a=="number"){if(a===t){o=-1;break}else if(a>t){o=s-1;break}}}for(;s<e.length;){let a=e[s];if(typeof a=="number")break;if(a===r){if(n===null){i!==null&&(e[s+1]=i);return}else if(n===e[s+1]){e[s+2]=i;return}}s++,n!==null&&s++,i!==null&&s++}o!==-1&&(e.splice(o,0,t),s=o+1),e.splice(s++,0,r),n!==null&&e.splice(s++,0,n),i!==null&&e.splice(s++,0,i)}var cm={},xm=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,r){r=Cd(r);let n=this.injector.get(e,cm,r);return n!==cm||t===cm?n:this.parentInjector.get(e,t,r)}};function gC(e){return e!==na}function ad(e){return e&32767}function WA(e){return e>>16}function cd(e,t){let r=WA(e),n=t;for(;r>0;)n=n[ca],r--;return n}var Rm=!0;function ld(e){let t=Rm;return Rm=e,t}var GA=256,vC=GA-1,yC=5,zA=0,zr={};function qA(e,t,r){let n;typeof r=="string"?n=r.charCodeAt(0)||0:r.hasOwnProperty(Fc)&&(n=r[Fc]),n==null&&(n=r[Fc]=zA++);let i=n&vC,s=1<<i;t.data[e+(i>>yC)]|=s}function ud(e,t){let r=_C(e,t);if(r!==-1)return r;let n=t[Te];n.firstCreatePass&&(e.injectorIndex=t.length,lm(n.data,e),lm(t,null),lm(n.blueprint,null));let i=jg(e,t),s=e.injectorIndex;if(gC(i)){let o=ad(i),a=cd(i,t),l=a[Te].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=i,s}function lm(e,t){e.push(0,0,0,0,0,0,0,0,t)}function _C(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function jg(e,t){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let r=0,n=null,i=t;for(;i!==null;){if(n=SC(i),n===null)return na;if(r++,i=i[ca],n.injectorIndex!==-1)return n.injectorIndex|r<<16}return na}function Nm(e,t,r){qA(e,t,r)}function EC(e,t,r){if(r&Je.Optional||e!==void 0)return e;Ig(t,"NodeInjector")}function wC(e,t,r,n){if(r&Je.Optional&&n===void 0&&(n=null),(r&(Je.Self|Je.Host))===0){let i=e[$c],s=Wn(void 0);try{return i?i.get(t,n,r&Je.Optional):Rb(t,n,r&Je.Optional)}finally{Wn(s)}}return EC(n,t,r)}function bC(e,t,r,n=Je.Default,i){if(e!==null){if(t[we]&2048&&!(n&Je.Self)){let o=XA(e,t,r,n,zr);if(o!==zr)return o}let s=CC(e,t,r,n,zr);if(s!==zr)return s}return wC(t,r,n,i)}function CC(e,t,r,n,i){let s=KA(r);if(typeof s=="function"){if(!cC(t,e,n))return n&Je.Host?EC(i,r,n):wC(t,r,n,i);try{let o;if(o=s(n),o==null&&!(n&Je.Optional))Ig(r);else return o}finally{fC()}}else if(typeof s=="number"){let o=null,a=_C(e,t),l=na,c=n&Je.Host?t[Mr][Pr]:null;for((a===-1||n&Je.SkipSelf)&&(l=a===-1?jg(e,t):t[a+8],l===na||!Gw(n,!1)?a=-1:(o=t[Te],a=ad(l),t=cd(l,t)));a!==-1;){let h=t[Te];if(Ww(s,a,h.data)){let d=YA(a,t,r,o,n,c);if(d!==zr)return d}l=t[a+8],l!==na&&Gw(n,t[Te].data[a+8]===c)&&Ww(s,a,t)?(o=h,a=ad(l),t=cd(l,t)):a=-1}}return i}function YA(e,t,r,n,i,s){let o=t[Te],a=o.data[e+8],l=n==null?la(a)&&Rm:n!=o&&(a.type&3)!==0,c=i&Je.Host&&s===a,h=Zu(a,o,r,l,c);return h!==null?zc(t,o,h,a):zr}function Zu(e,t,r,n,i){let s=e.providerIndexes,o=t.data,a=s&1048575,l=e.directiveStart,c=e.directiveEnd,h=s>>20,d=n?a:a+h,f=i?a+h:c;for(let g=d;g<f;g++){let m=o[g];if(g<l&&r===m||g>=l&&m.type===r)return g}if(i){let g=o[l];if(g&&qr(g)&&g.type===r)return l}return null}function zc(e,t,r,n){let i=e[r],s=t.data;if(BA(i)){let o=i;o.resolving&&ON(MN(s[r]));let a=ld(o.canSeeViewProviders);o.resolving=!0;let l,c=o.injectImpl?Wn(o.injectImpl):null,h=cC(e,n,Je.Default);try{i=e[r]=o.factory(void 0,s,e,n),t.firstCreatePass&&r>=n.directiveStart&&LA(r,s[r],t)}finally{c!==null&&Wn(c),ld(a),o.resolving=!1,fC()}}return i}function KA(e){if(typeof e=="string")return e.charCodeAt(0)||0;let t=e.hasOwnProperty(Fc)?e[Fc]:void 0;return typeof t=="number"?t>=0?t&vC:ZA:t}function Ww(e,t,r){let n=1<<e;return!!(r[t+(e>>yC)]&n)}function Gw(e,t){return!(e&Je.Self)&&!(e&Je.Host&&t)}var Uo=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,r){return bC(this._tNode,this._lView,e,Cd(r),t)}};function ZA(){return new Uo(pr(),Ge())}function xd(e){return bd(()=>{let t=e.prototype.constructor,r=t[Qu]||Am(t),n=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==n;){let s=i[Qu]||Am(i);if(s&&s!==r)return s;i=Object.getPrototypeOf(i)}return s=>new s})}function Am(e){return Sb(e)?()=>{let t=Am(Pn(e));return t&&t()}:Ho(e)}function XA(e,t,r,n,i){let s=e,o=t;for(;s!==null&&o!==null&&o[we]&2048&&!sd(o);){let a=CC(s,o,r,n|Je.Self,zr);if(a!==zr)return a;let l=s.parent;if(!l){let c=o[Wb];if(c){let h=c.get(r,zr,n);if(h!==zr)return h}l=SC(o),o=o[ca]}s=l}return i}function SC(e){let t=e[Te],r=t.type;return r===2?t.declTNode:r===1?e[Pr]:null}function zw(e,t=null,r=null,n){let i=JA(e,t,r,n);return i.resolveInjectorInitializers(),i}function JA(e,t=null,r=null,n,i=new Set){let s=[r||so,ZN(e)];return n=n||(typeof e=="object"?void 0:dr(e)),new Hc(s,t||Dd(),n||null,i)}var yt=class M0{static THROW_IF_NOT_FOUND=Vc;static NULL=new nd;static create(t,r){if(Array.isArray(t))return zw({name:""},r,t,"");{let n=t.name??"";return zw({name:n},t.parent,t.providers,n)}}static \u0275prov=oe({token:M0,providedIn:"any",factory:()=>et(Mb)});static __NG_ELEMENT_ID__=-1},QA=new he("");QA.__NG_ELEMENT_ID__=e=>{let t=pr();if(t===null)throw new Oe(204,!1);if(t.type&2)return t.value;if(e&Je.Optional)return null;throw new Oe(204,!1)};var DC=!1,$g=(()=>{class e{static __NG_ELEMENT_ID__=eM;static __NG_ENV_ID__=r=>r}return e})(),Mm=class extends $g{_lView;constructor(e){super(),this._lView=e}onDestroy(e){return eC(this._lView,e),()=>mA(this._lView,e)}};function eM(){return new Mm(Ge())}var Ni=class{},Rd=new he("",{providedIn:"root",factory:()=>!1}),IC=new he(""),Wg=new he(""),Nd=(()=>{class e{taskId=0;pendingTasks=new Set;get _hasPendingTasks(){return this.hasPendingTasks.value}hasPendingTasks=new xr(!1);add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let r=this.taskId++;return this.pendingTasks.add(r),r}has(r){return this.pendingTasks.has(r)}remove(r){this.pendingTasks.delete(r),this.pendingTasks.size===0&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static \u0275prov=oe({token:e,providedIn:"root",factory:()=>new e})}return e})(),Om=class extends ie{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,jb()&&(this.destroyRef=O($g,{optional:!0})??void 0,this.pendingTasks=O(Nd,{optional:!0})??void 0)}emit(e){let t=$e(null);try{super.next(e)}finally{$e(t)}}subscribe(e,t,r){let n=e,i=t||(()=>null),s=r;if(e&&typeof e=="object"){let a=e;n=a.next?.bind(a),i=a.error?.bind(a),s=a.complete?.bind(a)}this.__isAsync&&(i=this.wrapInTimeout(i),n&&(n=this.wrapInTimeout(n)),s&&(s=this.wrapInTimeout(s)));let o=super.subscribe({next:n,error:i,complete:s});return e instanceof mt&&e.add(o),o}wrapInTimeout(e){return t=>{let r=this.pendingTasks?.add();setTimeout(()=>{e(t),r!==void 0&&this.pendingTasks?.remove(r)})}}},We=Om;function dd(...e){}function TC(e){let t,r;function n(){e=dd;try{r!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(r),t!==void 0&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{e(),n()}),typeof requestAnimationFrame=="function"&&(r=requestAnimationFrame(()=>{e(),n()})),()=>n()}function qw(e){return queueMicrotask(()=>e()),()=>{e=dd}}var Gg="isAngularZone",fd=Gg+"_ID",tM=0,Ve=class Vh{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new We(!1);onMicrotaskEmpty=new We(!1);onStable=new We(!1);onError=new We(!1);constructor(t){let{enableLongStackTrace:r=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:i=!1,scheduleInRootZone:s=DC}=t;if(typeof Zone>"u")throw new Oe(908,!1);Zone.assertZonePatched();let o=this;o._nesting=0,o._outer=o._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(o._inner=o._inner.fork(new Zone.TaskTrackingZoneSpec)),r&&Zone.longStackTraceZoneSpec&&(o._inner=o._inner.fork(Zone.longStackTraceZoneSpec)),o.shouldCoalesceEventChangeDetection=!i&&n,o.shouldCoalesceRunChangeDetection=i,o.callbackScheduled=!1,o.scheduleInRootZone=s,iM(o)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(Gg)===!0}static assertInAngularZone(){if(!Vh.isInAngularZone())throw new Oe(909,!1)}static assertNotInAngularZone(){if(Vh.isInAngularZone())throw new Oe(909,!1)}run(t,r,n){return this._inner.run(t,r,n)}runTask(t,r,n,i){let s=this._inner,o=s.scheduleEventTask("NgZoneEvent: "+i,t,nM,dd,dd);try{return s.runTask(o,r,n)}finally{s.cancelTask(o)}}runGuarded(t,r,n){return this._inner.runGuarded(t,r,n)}runOutsideAngular(t){return this._outer.run(t)}},nM={};function zg(e){if(e._nesting==0&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function rM(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){TC(()=>{e.callbackScheduled=!1,Pm(e),e.isCheckStableRunning=!0,zg(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Pm(e)}function iM(e){let t=()=>{rM(e)},r=tM++;e._inner=e._inner.fork({name:"angular",properties:{[Gg]:!0,[fd]:r,[fd+r]:!0},onInvokeTask:(n,i,s,o,a,l)=>{if(oM(l))return n.invokeTask(s,o,a,l);try{return Yw(e),n.invokeTask(s,o,a,l)}finally{(e.shouldCoalesceEventChangeDetection&&o.type==="eventTask"||e.shouldCoalesceRunChangeDetection)&&t(),Kw(e)}},onInvoke:(n,i,s,o,a,l,c)=>{try{return Yw(e),n.invoke(s,o,a,l,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!sM(l)&&t(),Kw(e)}},onHasTask:(n,i,s,o)=>{n.hasTask(s,o),i===s&&(o.change=="microTask"?(e._hasPendingMicrotasks=o.microTask,Pm(e),zg(e)):o.change=="macroTask"&&(e.hasPendingMacrotasks=o.macroTask))},onHandleError:(n,i,s,o)=>(n.handleError(s,o),e.runOutsideAngular(()=>e.onError.emit(o)),!1)})}function Pm(e){e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0?e.hasPendingMicrotasks=!0:e.hasPendingMicrotasks=!1}function Yw(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Kw(e){e._nesting--,zg(e)}var pd=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new We;onMicrotaskEmpty=new We;onStable=new We;onError=new We;run(e,t,r){return e.apply(t,r)}runGuarded(e,t,r){return e.apply(t,r)}runOutsideAngular(e){return e()}runTask(e,t,r,n){return e.apply(t,r)}};function oM(e){return xC(e,"__ignore_ng_zone__")}function sM(e){return xC(e,"__scheduler_tick__")}function xC(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Ai=class{_console=console;handleError(e){this._console.error("ERROR",e)}},aM=new he("",{providedIn:"root",factory:()=>{let e=O(Ve),t=O(Ai);return r=>e.runOutsideAngular(()=>t.handleError(r))}});function cM(){return fa(pr(),Ge())}function fa(e,t){return new Nt(Jr(e,t))}var Nt=(()=>{class e{nativeElement;constructor(r){this.nativeElement=r}static __NG_ELEMENT_ID__=cM}return e})();function lM(e){return e instanceof Nt?e.nativeElement:e}function Bi(e,t){let r=nw(e),n=r[Ii];return t?.equal&&(n.equal=t.equal),r.set=i=>Gh(n,i),r.update=i=>rw(n,i),r.asReadonly=uM.bind(r),r}function uM(){let e=this[Ii];if(e.readonlyFn===void 0){let t=()=>this();t[Ii]=e,e.readonlyFn=t}return e.readonlyFn}function dM(){return this._results[Symbol.iterator]()}var km=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new ie}constructor(e=!1){this._emitDistinctChangesOnly=e}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){this.dirty=!1;let r=GN(e);(this._changesDetected=!WN(this._results,r,t))&&(this._results=r,this.length=r.length,this.last=r[this.length-1],this.first=r[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=dM};function RC(e){return(e.flags&128)===128}var NC=function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e}(NC||{}),AC=new Map,fM=0;function pM(){return fM++}function hM(e){AC.set(e[Id],e)}function Lm(e){AC.delete(e[Id])}var Zw="__ngContext__";function rl(e,t){oo(t)?(e[Zw]=t[Id],hM(t)):e[Zw]=t}function MC(e){return PC(e[Wc])}function OC(e){return PC(e[Ar])}function PC(e){for(;e!==null&&!Li(e);)e=e[Ar];return e}var Fm;function kC(e){Fm=e}function LC(){if(Fm!==void 0)return Fm;if(typeof document<"u")return document;throw new Oe(210,!1)}var il=new he("",{providedIn:"root",factory:()=>mM}),mM="ng",qg=new he(""),Xo=new he("",{providedIn:"platform",factory:()=>"unknown"}),FC=new he(""),Yg=new he("",{providedIn:"root",factory:()=>LC().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null}),gM="h",vM="b",BC=!1,yM=new he("",{providedIn:"root",factory:()=>BC}),Kg=function(e){return e[e.CHANGE_DETECTION=0]="CHANGE_DETECTION",e[e.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",e}(Kg||{}),pa=new he(""),Xw=new Set;function lo(e){Xw.has(e)||(Xw.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}var VC=(()=>{class e{view;node;constructor(r,n){this.view=r,this.node=n}static __NG_ELEMENT_ID__=_M}return e})();function _M(){return new VC(Ge(),pr())}var Js=function(e){return e[e.EarlyRead=0]="EarlyRead",e[e.Write=1]="Write",e[e.MixedReadWrite=2]="MixedReadWrite",e[e.Read=3]="Read",e}(Js||{}),UC=(()=>{class e{impl=null;execute(){this.impl?.execute()}static \u0275prov=oe({token:e,providedIn:"root",factory:()=>new e})}return e})(),EM=[Js.EarlyRead,Js.Write,Js.MixedReadWrite,Js.Read],wM=(()=>{class e{ngZone=O(Ve);scheduler=O(Ni);errorHandler=O(Ai,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){O(pa,{optional:!0})}execute(){let r=this.sequences.size>0;r&&vt(16),this.executing=!0;for(let n of EM)for(let i of this.sequences)if(!(i.erroredOrDestroyed||!i.hooks[n]))try{i.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let s=i.hooks[n];return s(i.pipelinedValue)},i.snapshot))}catch(s){i.erroredOrDestroyed=!0,this.errorHandler?.handleError(s)}this.executing=!1;for(let n of this.sequences)n.afterRun(),n.once&&(this.sequences.delete(n),n.destroy());for(let n of this.deferredRegistrations)this.sequences.add(n);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),r&&vt(17)}register(r){let{view:n}=r;n!==void 0?((n[ta]??=[]).push(r),tl(n),n[we]|=8192):this.executing?this.deferredRegistrations.add(r):this.addSequence(r)}addSequence(r){this.sequences.add(r),this.scheduler.notify(7)}unregister(r){this.executing&&this.sequences.has(r)?(r.erroredOrDestroyed=!0,r.pipelinedValue=void 0,r.once=!0):(this.sequences.delete(r),this.deferredRegistrations.delete(r))}maybeTrace(r,n){return n?n.run(Kg.AFTER_NEXT_RENDER,r):r()}static \u0275prov=oe({token:e,providedIn:"root",factory:()=>new e})}return e})(),Bm=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,t,r,n,i,s=null){this.impl=e,this.hooks=t,this.view=r,this.once=n,this.snapshot=s,this.unregisterOnDestroy=i?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let e=this.view?.[ta];e&&(this.view[ta]=e.filter(t=>t!==this))}};function Zg(e,t){!t?.injector&&$b(Zg);let r=t?.injector??O(yt);return lo("NgAfterRender"),HC(e,r,t,!1)}function Qr(e,t){!t?.injector&&$b(Qr);let r=t?.injector??O(yt);return lo("NgAfterNextRender"),HC(e,r,t,!0)}function bM(e,t){if(e instanceof Function){let r=[void 0,void 0,void 0,void 0];return r[t]=e,r}else return[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function HC(e,t,r,n){let i=t.get(UC);i.impl??=t.get(wM);let s=t.get(pa,null,{optional:!0}),o=r?.phase??Js.MixedReadWrite,a=r?.manualCleanup!==!0?t.get($g):null,l=t.get(VC,null,{optional:!0}),c=new Bm(i.impl,bM(e,o),l?.view,n,a,s?.snapshot(null));return i.impl.register(c),c}var CM=()=>null;function jC(e,t,r=!1){return CM(e,t,r)}function $C(e,t){let r=e.contentQueries;if(r!==null){let n=$e(null);try{for(let i=0;i<r.length;i+=2){let s=r[i],o=r[i+1];if(o!==-1){let a=e.data[o];Lg(s),a.contentQueries(2,t[o],o)}}}finally{$e(n)}}}function Vm(e,t,r){Lg(0);let n=$e(null);try{t(e,r)}finally{$e(n)}}function WC(e,t,r){if(zb(t)){let n=$e(null);try{let i=t.directiveStart,s=t.directiveEnd;for(let o=i;o<s;o++){let a=e.data[o];if(a.contentQueries){let l=r[o];a.contentQueries(1,l,o)}}}finally{$e(n)}}}var Zr=function(e){return e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",e}(Zr||{}),$u;function SM(){if($u===void 0&&($u=null,Bc.trustedTypes))try{$u=Bc.trustedTypes.createPolicy("angular",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return $u}function Ad(e){return SM()?.createHTML(e)||e}var Wu;function DM(){if(Wu===void 0&&(Wu=null,Bc.trustedTypes))try{Wu=Bc.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Wu}function Jw(e){return DM()?.createHTML(e)||e}var Mi=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${bb})`}},Um=class extends Mi{getTypeName(){return"HTML"}},Hm=class extends Mi{getTypeName(){return"Style"}},jm=class extends Mi{getTypeName(){return"Script"}},$m=class extends Mi{getTypeName(){return"URL"}},Wm=class extends Mi{getTypeName(){return"ResourceURL"}};function ei(e){return e instanceof Mi?e.changingThisBreaksApplicationSecurity:e}function uo(e,t){let r=IM(e);if(r!=null&&r!==t){if(r==="ResourceURL"&&t==="URL")return!0;throw new Error(`Required a safe ${t}, got a ${r} (see ${bb})`)}return r===t}function IM(e){return e instanceof Mi&&e.getTypeName()||null}function GC(e){return new Um(e)}function zC(e){return new Hm(e)}function qC(e){return new jm(e)}function YC(e){return new $m(e)}function KC(e){return new Wm(e)}function TM(e){let t=new zm(e);return xM()?new Gm(t):t}var Gm=class{inertDocumentHelper;constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{let t=new window.DOMParser().parseFromString(Ad(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.firstChild?.remove(),t)}catch{return null}}},zm=class{defaultDoc;inertDocument;constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){let t=this.inertDocument.createElement("template");return t.innerHTML=Ad(e),t}};function xM(){try{return!!new window.DOMParser().parseFromString(Ad(""),"text/html")}catch{return!1}}var RM=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Md(e){return e=String(e),e.match(RM)?e:"unsafe:"+e}function Vi(e){let t={};for(let r of e.split(","))t[r]=!0;return t}function ol(...e){let t={};for(let r of e)for(let n in r)r.hasOwnProperty(n)&&(t[n]=!0);return t}var ZC=Vi("area,br,col,hr,img,wbr"),XC=Vi("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),JC=Vi("rp,rt"),NM=ol(JC,XC),AM=ol(XC,Vi("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),MM=ol(JC,Vi("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Qw=ol(ZC,AM,MM,NM),QC=Vi("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),OM=Vi("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),PM=Vi("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),kM=ol(QC,OM,PM),LM=Vi("script,style,template"),qm=class{sanitizedSomething=!1;buf=[];sanitizeChildren(e){let t=e.firstChild,r=!0,n=[];for(;t;){if(t.nodeType===Node.ELEMENT_NODE?r=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,r&&t.firstChild){n.push(t),t=VM(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let i=BM(t);if(i){t=i;break}t=n.pop()}}return this.buf.join("")}startElement(e){let t=eb(e).toLowerCase();if(!Qw.hasOwnProperty(t))return this.sanitizedSomething=!0,!LM.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);let r=e.attributes;for(let n=0;n<r.length;n++){let i=r.item(n),s=i.name,o=s.toLowerCase();if(!kM.hasOwnProperty(o)){this.sanitizedSomething=!0;continue}let a=i.value;QC[o]&&(a=Md(a)),this.buf.push(" ",s,'="',tb(a),'"')}return this.buf.push(">"),!0}endElement(e){let t=eb(e).toLowerCase();Qw.hasOwnProperty(t)&&!ZC.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(tb(e))}};function FM(e,t){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function BM(e){let t=e.nextSibling;if(t&&e!==t.previousSibling)throw eS(t);return t}function VM(e){let t=e.firstChild;if(t&&FM(e,t))throw eS(t);return t}function eb(e){let t=e.nodeName;return typeof t=="string"?t:"FORM"}function eS(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}var UM=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,HM=/([^\#-~ |!])/g;function tb(e){return e.replace(/&/g,"&amp;").replace(UM,function(t){let r=t.charCodeAt(0),n=t.charCodeAt(1);return"&#"+((r-55296)*1024+(n-56320)+65536)+";"}).replace(HM,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}var Gu;function Xg(e,t){let r=null;try{Gu=Gu||TM(e);let n=t?String(t):"";r=Gu.getInertBodyElement(n);let i=5,s=n;do{if(i===0)throw new Error("Failed to sanitize html because the input is unstable");i--,n=s,s=r.innerHTML,r=Gu.getInertBodyElement(n)}while(n!==s);let o=new qm().sanitizeChildren(nb(r)||r);return Ad(o)}finally{if(r){let n=nb(r)||r;for(;n.firstChild;)n.firstChild.remove()}}}function nb(e){return"content"in e&&jM(e)?e.content:null}function jM(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName==="TEMPLATE"}var ti=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}(ti||{});function sl(e){let t=tS();return t?Jw(t.sanitize(ti.HTML,e)||""):uo(e,"HTML")?Jw(ei(e)):Xg(LC(),Jc(e))}function zt(e){let t=tS();return t?t.sanitize(ti.URL,e)||"":uo(e,"URL")?ei(e):Md(Jc(e))}function tS(){let e=Ge();return e&&e[xi].sanitizer}function nS(e){return e.ownerDocument.defaultView}function $M(e,t,r){let n=e.length;for(;;){let i=e.indexOf(t,r);if(i===-1)return i;if(i===0||e.charCodeAt(i-1)<=32){let s=t.length;if(i+s===n||e.charCodeAt(i+s)<=32)return i}r=i+1}}var rS="ng-template";function WM(e,t,r,n){let i=0;if(n){for(;i<t.length&&typeof t[i]=="string";i+=2)if(t[i]==="class"&&$M(t[i+1].toLowerCase(),r,0)!==-1)return!0}else if(Jg(e))return!1;if(i=t.indexOf(1,i),i>-1){let s;for(;++i<t.length&&typeof(s=t[i])=="string";)if(s.toLowerCase()===r)return!0}return!1}function Jg(e){return e.type===4&&e.value!==rS}function GM(e,t,r){let n=e.type===4&&!r?rS:e.value;return t===n}function zM(e,t,r){let n=4,i=e.attrs,s=i!==null?KM(i):0,o=!1;for(let a=0;a<t.length;a++){let l=t[a];if(typeof l=="number"){if(!o&&!Nr(n)&&!Nr(l))return!1;if(o&&Nr(l))continue;o=!1,n=l|n&1;continue}if(!o)if(n&4){if(n=2|n&1,l!==""&&!GM(e,l,r)||l===""&&t.length===1){if(Nr(n))return!1;o=!0}}else if(n&8){if(i===null||!WM(e,i,l,r)){if(Nr(n))return!1;o=!0}}else{let c=t[++a],h=qM(l,i,Jg(e),r);if(h===-1){if(Nr(n))return!1;o=!0;continue}if(c!==""){let d;if(h>s?d="":d=i[h+1].toLowerCase(),n&2&&c!==d){if(Nr(n))return!1;o=!0}}}}return Nr(n)||o}function Nr(e){return(e&1)===0}function qM(e,t,r,n){if(t===null)return-1;let i=0;if(n||!r){let s=!1;for(;i<t.length;){let o=t[i];if(o===e)return i;if(o===3||o===6)s=!0;else if(o===1||o===2){let a=t[++i];for(;typeof a=="string";)a=t[++i];continue}else{if(o===4)break;if(o===0){i+=4;continue}}i+=s?1:2}return-1}else return ZM(t,e)}function YM(e,t,r=!1){for(let n=0;n<t.length;n++)if(zM(e,t[n],r))return!0;return!1}function KM(e){for(let t=0;t<e.length;t++){let r=e[t];if(jA(r))return t}return e.length}function ZM(e,t){let r=e.indexOf(4);if(r>-1)for(r++;r<e.length;){let n=e[r];if(typeof n=="number")return-1;if(n===t)return r;r++}return-1}function rb(e,t){return e?":not("+t.trim()+")":t}function XM(e){let t=e[0],r=1,n=2,i="",s=!1;for(;r<e.length;){let o=e[r];if(typeof o=="string")if(n&2){let a=e[++r];i+="["+o+(a.length>0?'="'+a+'"':"")+"]"}else n&8?i+="."+o:n&4&&(i+=" "+o);else i!==""&&!Nr(o)&&(t+=rb(s,i),i=""),n=o,s=s||!Nr(n);r++}return i!==""&&(t+=rb(s,i)),t}function JM(e){return e.map(XM).join(",")}function QM(e){let t=[],r=[],n=1,i=2;for(;n<e.length;){let s=e[n];if(typeof s=="string")i===2?s!==""&&t.push(s,e[++n]):i===8&&r.push(s);else{if(!Nr(i))break;i=s}n++}return r.length&&t.push(1,...r),t}var Ui={};function eO(e,t){return e.createText(t)}function tO(e,t,r){e.setValue(t,r)}function iS(e,t,r){return e.createElement(t,r)}function hd(e,t,r,n,i){e.insertBefore(t,r,n,i)}function oS(e,t,r){e.appendChild(t,r)}function ib(e,t,r,n,i){n!==null?hd(e,t,r,n,i):oS(e,t,r)}function nO(e,t,r){e.removeChild(null,t,r)}function rO(e,t,r){e.setAttribute(t,"style",r)}function iO(e,t,r){r===""?e.removeAttribute(t,"class"):e.setAttribute(t,"class",r)}function sS(e,t,r){let{mergedAttrs:n,classes:i,styles:s}=r;n!==null&&HA(e,t,n),i!==null&&iO(e,t,i),s!==null&&rO(e,t,s)}function Qg(e,t,r,n,i,s,o,a,l,c,h){let d=wn+n,f=d+i,g=oO(d,f),m=typeof c=="function"?c():c;return g[Te]={type:e,blueprint:g,template:r,queries:null,viewQuery:a,declTNode:t,data:g.slice().fill(null,d),bindingStartIndex:d,expandoStartIndex:f,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:typeof s=="function"?s():s,pipeRegistry:typeof o=="function"?o():o,firstChild:null,schemas:l,consts:m,incompleteFirstPass:!1,ssrId:h}}function oO(e,t){let r=[];for(let n=0;n<t;n++)r.push(n<e?null:Ui);return r}function sO(e){let t=e.tView;return t===null||t.incompleteFirstPass?e.tView=Qg(1,null,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts,e.id):t}function ev(e,t,r,n,i,s,o,a,l,c,h){let d=t.blueprint.slice();return d[ki]=i,d[we]=n|4|128|8|64|1024,(c!==null||e&&e[we]&2048)&&(d[we]|=2048),Qb(d),d[xn]=d[ca]=e,d[nn]=r,d[xi]=o||e&&e[xi],d[ln]=a||e&&e[ln],d[$c]=l||e&&e[$c]||null,d[Pr]=s,d[Id]=pM(),d[jc]=h,d[Wb]=c,d[Mr]=t.type==2?e[Mr]:d,d}function aO(e,t,r){let n=Jr(t,e),i=sO(r),s=e[xi].rendererFactory,o=tv(e,ev(e,i,null,aS(r),n,t,null,s.createRenderer(n,r),null,null,null));return e[t.index]=o}function aS(e){let t=16;return e.signals?t=4096:e.onPush&&(t=64),t}function cS(e,t,r,n){if(r===0)return-1;let i=t.length;for(let s=0;s<r;s++)t.push(n),e.blueprint.push(n),e.data.push(null);return i}function tv(e,t){return e[Wc]?e[Vw][Ar]=t:e[Wc]=t,e[Vw]=t,t}function Y(e=1){lS(dn(),Ge(),co()+e,!1)}function lS(e,t,r,n){if(!n)if((t[we]&3)===3){let i=e.preOrderCheckHooks;i!==null&&Yu(t,i,r)}else{let i=e.preOrderHooks;i!==null&&Ku(t,i,0,r)}qo(r)}var Od=function(e){return e[e.None=0]="None",e[e.SignalBased=1]="SignalBased",e[e.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",e}(Od||{});function Ym(e,t,r,n){let i=$e(null);try{let[s,o,a]=e.inputs[r],l=null;(o&Od.SignalBased)!==0&&(l=t[s][Ii]),l!==null&&l.transformFn!==void 0?n=l.transformFn(n):a!==null&&(n=a.call(t,n)),e.setInput!==null?e.setInput(t,l,n,r,s):qb(t,l,s,n)}finally{$e(i)}}function uS(e,t,r,n,i){let s=co(),o=n&2;try{qo(-1),o&&t.length>wn&&lS(e,t,wn,!1),vt(o?2:0,i),r(n,i)}finally{qo(s),vt(o?3:1,i)}}function nv(e,t,r){pO(e,t,r),(r.flags&64)===64&&hO(e,t,r)}function dS(e,t,r=Jr){let n=t.localNames;if(n!==null){let i=t.index+1;for(let s=0;s<n.length;s+=2){let o=n[s+1],a=o===-1?r(t,e):e[o];e[i++]=a}}}function cO(e,t,r,n){let i=n.get(yM,BC)||r===Zr.ShadowDom,s=e.selectRootElement(t,i);return lO(s),s}function lO(e){uO(e)}var uO=()=>null;function dO(e){return e==="class"?"className":e==="for"?"htmlFor":e==="formaction"?"formAction":e==="innerHtml"?"innerHTML":e==="readonly"?"readOnly":e==="tabindex"?"tabIndex":e}function fS(e,t,r,n,i,s,o,a){if(!a&&rv(t,e,r,n,i)){la(t)&&fO(r,t.index);return}if(t.type&3){let l=Jr(t,r);n=dO(n),i=o!=null?o(i,t.value||"",n):i,s.setProperty(l,n,i)}else t.type&12}function fO(e,t){let r=Kr(t,e);r[we]&16||(r[we]|=64)}function pO(e,t,r){let n=r.directiveStart,i=r.directiveEnd;la(r)&&aO(t,r,e.data[n+r.componentOffset]),e.firstCreatePass||ud(r,t);let s=r.initialInputs;for(let o=n;o<i;o++){let a=e.data[o],l=zc(t,e,o,r);if(rl(l,t),s!==null&&yO(t,o-n,l,a,r,s),qr(a)){let c=Kr(r.index,t);c[nn]=zc(t,e,o,r)}}}function hO(e,t,r){let n=r.directiveStart,i=r.directiveEnd,s=r.index,o=NA();try{qo(s);for(let a=n;a<i;a++){let l=e.data[a],c=t[a];Tm(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&mO(l,c)}}finally{qo(-1),Tm(o)}}function mO(e,t){e.hostBindings!==null&&e.hostBindings(1,t)}function pS(e,t){let r=e.directiveRegistry,n=null;if(r)for(let i=0;i<r.length;i++){let s=r[i];YM(t,s.selectors,!1)&&(n??=[],qr(s)?n.unshift(s):n.push(s))}return n}function gO(e,t,r,n,i,s){let o=Jr(e,t);vO(t[ln],o,s,e.value,r,n,i)}function vO(e,t,r,n,i,s,o){if(s==null)e.removeAttribute(t,i,r);else{let a=o==null?Jc(s):o(s,n||"",i);e.setAttribute(t,i,a,r)}}function yO(e,t,r,n,i,s){let o=s[t];if(o!==null)for(let a=0;a<o.length;a+=2){let l=o[a],c=o[a+1];Ym(n,r,l,c)}}function hS(e,t){let r=e[$c],n=r?r.get(Ai,null):null;n&&n.handleError(t)}function rv(e,t,r,n,i){let s=e.inputs?.[n],o=e.hostDirectiveInputs?.[n],a=!1;if(o)for(let l=0;l<o.length;l+=2){let c=o[l],h=o[l+1],d=t.data[c];Ym(d,r[c],h,i),a=!0}if(s)for(let l of s){let c=r[l],h=t.data[l];Ym(h,c,n,i),a=!0}return a}function _O(e,t){let r=Kr(t,e),n=r[Te];EO(n,r);let i=r[ki];i!==null&&r[jc]===null&&(r[jc]=jC(i,r[$c])),vt(18),iv(n,r,r[nn]),vt(19,r[nn])}function EO(e,t){for(let r=t.length;r<e.blueprint.length;r++)t.push(e.blueprint[r])}function iv(e,t,r){Fg(t);try{let n=e.viewQuery;n!==null&&Vm(1,n,r);let i=e.template;i!==null&&uS(e,t,i,1,r),e.firstCreatePass&&(e.firstCreatePass=!1),t[Ri]?.finishViewCreation(e),e.staticContentQueries&&$C(e,t),e.staticViewQueries&&Vm(2,e.viewQuery,r);let s=e.components;s!==null&&wO(t,s)}catch(n){throw e.firstCreatePass&&(e.incompleteFirstPass=!0,e.firstCreatePass=!1),n}finally{t[we]&=-5,Bg()}}function wO(e,t){for(let r=0;r<t.length;r++)_O(e,t[r])}function Pd(e,t,r,n){let i=$e(null);try{let s=t.tView,o=e[we]&4096?4096:16,a=ev(e,s,r,o,null,t,null,null,n?.injector??null,n?.embeddedViewInjector??null,n?.dehydratedView??null),l=e[t.index];a[Wo]=l;let c=e[Ri];return c!==null&&(a[Ri]=c.createEmbeddedView(s)),iv(s,a,r),a}finally{$e(i)}}function qc(e,t){return!t||t.firstChild===null||RC(e)}var bO;function ov(e,t){return bO(e,t)}var Xr=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(Xr||{});function mS(e){return(e.flags&32)===32}function Qs(e,t,r,n,i){if(n!=null){let s,o=!1;Li(n)?s=n:oo(n)&&(o=!0,n=n[ki]);let a=Yr(n);e===0&&r!==null?i==null?oS(t,r,a):hd(t,r,a,i||null,!0):e===1&&r!==null?hd(t,r,a,i||null,!0):e===2?nO(t,a,o):e===3&&t.destroyNode(a),s!=null&&PO(t,e,s,r,i)}}function CO(e,t){gS(e,t),t[ki]=null,t[Pr]=null}function SO(e,t,r,n,i,s){n[ki]=i,n[Pr]=t,Ld(e,n,r,1,i,s)}function gS(e,t){t[xi].changeDetectionScheduler?.notify(9),Ld(e,t,t[ln],2,null,null)}function DO(e){let t=e[Wc];if(!t)return um(e[Te],e);for(;t;){let r=null;if(oo(t))r=t[Wc];else{let n=t[Tn];n&&(r=n)}if(!r){for(;t&&!t[Ar]&&t!==e;)oo(t)&&um(t[Te],t),t=t[xn];t===null&&(t=e),oo(t)&&um(t[Te],t),r=t&&t[Ar]}t=r}}function sv(e,t){let r=e[ia],n=r.indexOf(t);r.splice(n,1)}function kd(e,t){if(el(t))return;let r=t[ln];r.destroyNode&&Ld(e,t,r,3,null,null),DO(t)}function um(e,t){if(el(t))return;let r=$e(null);try{t[we]&=-129,t[we]|=256,t[Jn]&&Wh(t[Jn]),TO(e,t),IO(e,t),t[Te].type===1&&t[ln].destroy();let n=t[Wo];if(n!==null&&Li(t[xn])){n!==t[xn]&&sv(n,t);let i=t[Ri];i!==null&&i.detachView(e)}Lm(t)}finally{$e(r)}}function IO(e,t){let r=e.cleanup,n=t[rd];if(r!==null)for(let o=0;o<r.length-1;o+=2)if(typeof r[o]=="string"){let a=r[o+3];a>=0?n[a]():n[-a].unsubscribe(),o+=2}else{let a=n[r[o+1]];r[o].call(a)}n!==null&&(t[rd]=null);let i=t[io];if(i!==null){t[io]=null;for(let o=0;o<i.length;o++){let a=i[o];a()}}let s=t[id];if(s!==null){t[id]=null;for(let o of s)o.destroy()}}function TO(e,t){let r;if(e!=null&&(r=e.destroyHooks)!=null)for(let n=0;n<r.length;n+=2){let i=t[r[n]];if(!(i instanceof Yo)){let s=r[n+1];if(Array.isArray(s))for(let o=0;o<s.length;o+=2){let a=i[s[o]],l=s[o+1];vt(4,a,l);try{l.call(a)}finally{vt(5,a,l)}}else{vt(4,i,s);try{s.call(i)}finally{vt(5,i,s)}}}}}function xO(e,t,r){return RO(e,t.parent,r)}function RO(e,t,r){let n=t;for(;n!==null&&n.type&168;)t=n,n=t.parent;if(n===null)return r[ki];if(la(n)){let{encapsulation:i}=e.data[n.directiveStart+n.componentOffset];if(i===Zr.None||i===Zr.Emulated)return null}return Jr(n,r)}function NO(e,t,r){return MO(e,t,r)}function AO(e,t,r){return e.type&40?Jr(e,r):null}var MO=AO,ob;function av(e,t,r,n){let i=xO(e,n,t),s=t[ln],o=n.parent||t[Pr],a=NO(o,n,t);if(i!=null)if(Array.isArray(r))for(let l=0;l<r.length;l++)ib(s,i,r[l],a,!1);else ib(s,i,r,a,!1);ob!==void 0&&ob(s,n,t,r,i)}function Lc(e,t){if(t!==null){let r=t.type;if(r&3)return Jr(t,e);if(r&4)return Km(-1,e[t.index]);if(r&8){let n=t.child;if(n!==null)return Lc(e,n);{let i=e[t.index];return Li(i)?Km(-1,i):Yr(i)}}else{if(r&128)return Lc(e,t.next);if(r&32)return ov(t,e)()||Yr(e[t.index]);{let n=vS(e,t);if(n!==null){if(Array.isArray(n))return n[0];let i=zo(e[Mr]);return Lc(i,n)}else return Lc(e,t.next)}}}return null}function vS(e,t){if(t!==null){let r=e[Mr][Pr],n=t.projection;return r.projection[n]}return null}function Km(e,t){let r=Tn+e+1;if(r<t.length){let n=t[r],i=n[Te].firstChild;if(i!==null)return Lc(n,i)}return t[Go]}function cv(e,t,r,n,i,s,o){for(;r!=null;){if(r.type===128){r=r.next;continue}let a=n[r.index],l=r.type;if(o&&t===0&&(a&&rl(Yr(a),n),r.flags|=2),!mS(r))if(l&8)cv(e,t,r.child,n,i,s,!1),Qs(t,e,i,a,s);else if(l&32){let c=ov(r,n),h;for(;h=c();)Qs(t,e,i,h,s);Qs(t,e,i,a,s)}else l&16?OO(e,t,n,r,i,s):Qs(t,e,i,a,s);r=o?r.projectionNext:r.next}}function Ld(e,t,r,n,i,s){cv(r,n,e.firstChild,t,i,s,!1)}function OO(e,t,r,n,i,s){let o=r[Mr],a=o[Pr].projection[n.projection];if(Array.isArray(a))for(let l=0;l<a.length;l++){let c=a[l];Qs(t,e,i,c,s)}else{let l=a,c=o[xn];RC(n)&&(l.flags|=128),cv(e,t,l,c,i,s,!0)}}function PO(e,t,r,n,i){let s=r[Go],o=Yr(r);s!==o&&Qs(t,e,n,s,i);for(let a=Tn;a<r.length;a++){let l=r[a];Ld(l[Te],l,e,t,n,s)}}function kO(e,t,r,n,i){if(t)i?e.addClass(r,n):e.removeClass(r,n);else{let s=n.indexOf("-")===-1?void 0:Xr.DashCase;i==null?e.removeStyle(r,n,s):(typeof i=="string"&&i.endsWith("!important")&&(i=i.slice(0,-10),s|=Xr.Important),e.setStyle(r,n,i,s))}}function md(e,t,r,n,i=!1){for(;r!==null;){if(r.type===128){r=i?r.projectionNext:r.next;continue}let s=t[r.index];s!==null&&n.push(Yr(s)),Li(s)&&LO(s,n);let o=r.type;if(o&8)md(e,t,r.child,n);else if(o&32){let a=ov(r,t),l;for(;l=a();)n.push(l)}else if(o&16){let a=vS(t,r);if(Array.isArray(a))n.push(...a);else{let l=zo(t[Mr]);md(l[Te],l,a,n,!0)}}r=i?r.projectionNext:r.next}return n}function LO(e,t){for(let r=Tn;r<e.length;r++){let n=e[r],i=n[Te].firstChild;i!==null&&md(n[Te],n,i,t)}e[Go]!==e[ki]&&t.push(e[Go])}function yS(e){if(e[ta]!==null){for(let t of e[ta])t.impl.addSequence(t);e[ta].length=0}}var _S=[];function FO(e){return e[Jn]??BO(e)}function BO(e){let t=_S.pop()??Object.create(UO);return t.lView=e,t}function VO(e){e.lView[Jn]!==e&&(e.lView=null,_S.push(e))}var UO=re(w({},fu),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{tl(e.lView)},consumerOnSignalRead(){this.lView[Jn]=this}});function HO(e){let t=e[Jn]??Object.create(jO);return t.lView=e,t}var jO=re(w({},fu),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{let t=zo(e.lView);for(;t&&!ES(t[Te]);)t=zo(t);t&&Pg(t)},consumerOnSignalRead(){this.lView[Jn]=this}});function ES(e){return e.type!==2}function wS(e){if(e[id]===null)return;let t=!0;for(;t;){let r=!1;for(let n of e[id])n.dirty&&(r=!0,n.zone===null||Zone.current===n.zone?n.run():n.zone.run(()=>n.run()));t=r&&!!(e[we]&8192)}}var $O=100;function bS(e,t=!0,r=0){let n=e[xi].rendererFactory,i=!1;i||n.begin?.();try{WO(e,r)}catch(s){throw t&&hS(e,s),s}finally{i||n.end?.()}}function WO(e,t){let r=sC();try{Hw(!0),Zm(e,t);let n=0;for(;Td(e);){if(n===$O)throw new Oe(103,!1);n++,Zm(e,1)}}finally{Hw(r)}}function GO(e,t,r,n){if(el(t))return;let i=t[we],s=!1,o=!1;Fg(t);let a=!0,l=null,c=null;s||(ES(e)?(c=FO(t),l=jh(c)):GE()===null?(a=!1,c=HO(t),l=jh(c)):t[Jn]&&(Wh(t[Jn]),t[Jn]=null));try{Qb(t),IA(e.bindingStartIndex),r!==null&&uS(e,t,r,2,n);let h=(i&3)===3;if(!s)if(h){let g=e.preOrderCheckHooks;g!==null&&Yu(t,g,null)}else{let g=e.preOrderHooks;g!==null&&Ku(t,g,0,null),am(t,0)}if(o||zO(t),wS(t),CS(t,0),e.contentQueries!==null&&$C(e,t),!s)if(h){let g=e.contentCheckHooks;g!==null&&Yu(t,g)}else{let g=e.contentHooks;g!==null&&Ku(t,g,1),am(t,1)}YO(e,t);let d=e.components;d!==null&&DS(t,d,0);let f=e.viewQuery;if(f!==null&&Vm(2,f,n),!s)if(h){let g=e.viewCheckHooks;g!==null&&Yu(t,g)}else{let g=e.viewHooks;g!==null&&Ku(t,g,2),am(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[sm]){for(let g of t[sm])g();t[sm]=null}s||(yS(t),t[we]&=-73)}catch(h){throw s||tl(t),h}finally{c!==null&&(KE(c,l),a&&VO(c)),Bg()}}function CS(e,t){for(let r=MC(e);r!==null;r=OC(r))for(let n=Tn;n<r.length;n++){let i=r[n];SS(i,t)}}function zO(e){for(let t=MC(e);t!==null;t=OC(t)){if(!(t[we]&2))continue;let r=t[ia];for(let n=0;n<r.length;n++){let i=r[n];Pg(i)}}}function qO(e,t,r){vt(18);let n=Kr(t,e);SS(n,r),vt(19,n[nn])}function SS(e,t){Og(e)&&Zm(e,t)}function Zm(e,t){let r=e[Te],n=e[we],i=e[Jn],s=!!(t===0&&n&16);if(s||=!!(n&64&&t===0),s||=!!(n&1024),s||=!!(i?.dirty&&$h(i)),s||=!1,i&&(i.dirty=!1),e[we]&=-9217,s)GO(r,e,r.template,e[nn]);else if(n&8192){wS(e),CS(e,1);let o=r.components;o!==null&&DS(e,o,1),yS(e)}}function DS(e,t,r){for(let n=0;n<t.length;n++)qO(e,t[n],r)}function YO(e,t){let r=e.hostBindingOpCodes;if(r!==null)try{for(let n=0;n<r.length;n++){let i=r[n];if(i<0)qo(~i);else{let s=i,o=r[++n],a=r[++n];RA(o,s);let l=t[s];vt(24,l),a(2,l),vt(25,l)}}}finally{qo(-1)}}function lv(e,t){let r=sC()?64:1088;for(e[xi].changeDetectionScheduler?.notify(t);e;){e[we]|=r;let n=zo(e);if(sd(e)&&!n)return e;e=n}return null}function IS(e,t,r,n){return[e,!0,0,t,null,n,null,r,null,null]}function TS(e,t){let r=Tn+t;if(r<e.length)return e[r]}function Fd(e,t,r,n=!0){let i=t[Te];if(KO(i,t,e,r),n){let o=Km(r,e),a=t[ln],l=a.parentNode(e[Go]);l!==null&&SO(i,e[Pr],a,t,l,o)}let s=t[jc];s!==null&&s.firstChild!==null&&(s.firstChild=null)}function xS(e,t){let r=Yc(e,t);return r!==void 0&&kd(r[Te],r),r}function Yc(e,t){if(e.length<=Tn)return;let r=Tn+t,n=e[r];if(n){let i=n[Wo];i!==null&&i!==e&&sv(i,n),t>0&&(e[r-1][Ar]=n[Ar]);let s=td(e,Tn+t);CO(n[Te],n);let o=s[Ri];o!==null&&o.detachView(s[Te]),n[xn]=null,n[Ar]=null,n[we]&=-129}return n}function KO(e,t,r,n){let i=Tn+n,s=r.length;n>0&&(r[i-1][Ar]=t),n<s-Tn?(t[Ar]=r[i],Ab(r,Tn+n,t)):(r.push(t),t[Ar]=null),t[xn]=r;let o=t[Wo];o!==null&&r!==o&&RS(o,t);let a=t[Ri];a!==null&&a.insertView(e),Dm(t),t[we]|=128}function RS(e,t){let r=e[ia],n=t[xn];if(oo(n))e[we]|=2;else{let i=n[xn][Mr];t[Mr]!==i&&(e[we]|=2)}r===null?e[ia]=[t]:r.push(t)}var Ko=class{_lView;_cdRefInjectingView;notifyErrorHandler;_appRef=null;_attachedToViewContainer=!1;get rootNodes(){let e=this._lView,t=e[Te];return md(t,e,t.firstChild,[])}constructor(e,t,r=!0){this._lView=e,this._cdRefInjectingView=t,this.notifyErrorHandler=r}get context(){return this._lView[nn]}get dirty(){return!!(this._lView[we]&9280)||!!this._lView[Jn]?.dirty}set context(e){this._lView[nn]=e}get destroyed(){return el(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[xn];if(Li(e)){let t=e[od],r=t?t.indexOf(this):-1;r>-1&&(Yc(e,r),td(t,r))}this._attachedToViewContainer=!1}kd(this._lView[Te],this._lView)}onDestroy(e){eC(this._lView,e)}markForCheck(){lv(this._cdRefInjectingView||this._lView,4)}markForRefresh(){Pg(this._cdRefInjectingView||this._lView)}detach(){this._lView[we]&=-129}reattach(){Dm(this._lView),this._lView[we]|=128}detectChanges(){this._lView[we]|=1024,bS(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Oe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=sd(this._lView),t=this._lView[Wo];t!==null&&!e&&sv(t,this._lView),gS(this._lView[Te],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new Oe(902,!1);this._appRef=e;let t=sd(this._lView),r=this._lView[Wo];r!==null&&!t&&RS(r,this._lView),Dm(this._lView)}},Or=(()=>{class e{static __NG_ELEMENT_ID__=JO}return e})(),ZO=Or,XO=class extends ZO{_declarationLView;_declarationTContainer;elementRef;constructor(e,t,r){super(),this._declarationLView=e,this._declarationTContainer=t,this.elementRef=r}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,t){return this.createEmbeddedViewImpl(e,t)}createEmbeddedViewImpl(e,t,r){let n=Pd(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:r});return new Ko(n)}};function JO(){return uv(pr(),Ge())}function uv(e,t){return e.type&4?new XO(t,e,fa(e,t)):null}function Bd(e,t,r,n,i){let s=e.data[t];if(s===null)s=QO(e,t,r,n,i),xA()&&(s.flags|=32);else if(s.type&64){s.type=r,s.value=n,s.attrs=i;let o=CA();s.injectorIndex=o===null?-1:o.injectorIndex}return da(s,!0),s}function QO(e,t,r,n,i){let s=iC(),o=oC(),a=o?s:s&&s.parent,l=e.data[t]=tP(e,a,r,t,n,i);return eP(e,l,s,o),l}function eP(e,t,r,n){e.firstChild===null&&(e.firstChild=t),r!==null&&(n?r.child==null&&t.parent!==null&&(r.child=t):r.next===null&&(r.next=t,t.prev=r))}function tP(e,t,r,n,i,s){let o=t?t.injectorIndex:-1,a=0;return EA()&&(a|=128),{type:r,index:n,insertBeforeIndex:null,injectorIndex:o,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:i,attrs:s,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var TW=new RegExp(`^(\\d+)*(${vM}|${gM})*(.*)`),nP=()=>null;function Kc(e,t){return nP(e,t)}var Xm=class{},gd=class{},Jm=class{resolveComponentFactory(e){throw Error(`No component factory found for ${dr(e)}.`)}},ao=class{static NULL=new Jm},un=class{},Jo=(()=>{class e{destroyNode=null;static __NG_ELEMENT_ID__=()=>rP()}return e})();function rP(){let e=Ge(),t=pr(),r=Kr(t.index,e);return(oo(r)?r:e)[ln]}var iP=(()=>{class e{static \u0275prov=oe({token:e,providedIn:"root",factory:()=>null})}return e})();function sb(e,t,r){let n=r?e.styles:null,i=r?e.classes:null,s=0;if(t!==null)for(let o=0;o<t.length;o++){let a=t[o];if(typeof a=="number")s=a;else if(s==1)i=Ow(i,a);else if(s==2){let l=a,c=t[++o];n=Ow(n,l+": "+c+";")}}r?e.styles=n:e.stylesWithoutHost=n,r?e.classes=i:e.classesWithoutHost=i}function bt(e,t=Je.Default){let r=Ge();if(r===null)return et(e,t);let n=pr();return bC(n,r,Pn(e),t)}function NS(e,t,r,n,i){let s=n===null?null:{"":-1},o=i(e,r);if(o!==null){let a,l=null,c=null,h=sP(o);h===null?a=o:[a,l,c]=h,lP(e,t,r,a,s,l,c)}s!==null&&n!==null&&oP(r,n,s)}function oP(e,t,r){let n=e.localNames=[];for(let i=0;i<t.length;i+=2){let s=r[t[i+1]];if(s==null)throw new Oe(-301,!1);n.push(t[i],s)}}function sP(e){let t=null,r=!1;for(let o=0;o<e.length;o++){let a=e[o];if(o===0&&qr(a)&&(t=a),a.findHostDirectiveDefs!==null){r=!0;break}}if(!r)return null;let n=null,i=null,s=null;for(let o of e)o.findHostDirectiveDefs!==null&&(n??=[],i??=new Map,s??=new Map,aP(o,n,s,i)),o===t&&(n??=[],n.push(o));return n!==null?(n.push(...t===null?e:e.slice(1)),[n,i,s]):null}function aP(e,t,r,n){let i=t.length;e.findHostDirectiveDefs(e,t,n),r.set(e,[i,t.length-1])}function cP(e,t,r){t.componentOffset=r,(e.components??=[]).push(t.index)}function lP(e,t,r,n,i,s,o){let a=n.length,l=!1;for(let f=0;f<a;f++){let g=n[f];!l&&qr(g)&&(l=!0,cP(e,r,f)),Nm(ud(r,t),e,g.type)}mP(r,e.data.length,a);for(let f=0;f<a;f++){let g=n[f];g.providersResolver&&g.providersResolver(g)}let c=!1,h=!1,d=cS(e,t,a,null);a>0&&(r.directiveToIndex=new Map);for(let f=0;f<a;f++){let g=n[f];if(r.mergedAttrs=Gc(r.mergedAttrs,g.hostAttrs),dP(e,r,t,d,g),hP(d,g,i),o!==null&&o.has(g)){let[b,I]=o.get(g);r.directiveToIndex.set(g.type,[d,b+r.directiveStart,I+r.directiveStart])}else(s===null||!s.has(g))&&r.directiveToIndex.set(g.type,d);g.contentQueries!==null&&(r.flags|=4),(g.hostBindings!==null||g.hostAttrs!==null||g.hostVars!==0)&&(r.flags|=64);let m=g.type.prototype;!c&&(m.ngOnChanges||m.ngOnInit||m.ngDoCheck)&&((e.preOrderHooks??=[]).push(r.index),c=!0),!h&&(m.ngOnChanges||m.ngDoCheck)&&((e.preOrderCheckHooks??=[]).push(r.index),h=!0),d++}uP(e,r,s)}function uP(e,t,r){for(let n=t.directiveStart;n<t.directiveEnd;n++){let i=e.data[n];if(r===null||!r.has(i))ab(0,t,i,n),ab(1,t,i,n),lb(t,n,!1);else{let s=r.get(i);cb(0,t,s,n),cb(1,t,s,n),lb(t,n,!0)}}}function ab(e,t,r,n){let i=e===0?r.inputs:r.outputs;for(let s in i)if(i.hasOwnProperty(s)){let o;e===0?o=t.inputs??={}:o=t.outputs??={},o[s]??=[],o[s].push(n),AS(t,s)}}function cb(e,t,r,n){let i=e===0?r.inputs:r.outputs;for(let s in i)if(i.hasOwnProperty(s)){let o=i[s],a;e===0?a=t.hostDirectiveInputs??={}:a=t.hostDirectiveOutputs??={},a[o]??=[],a[o].push(n,s),AS(t,o)}}function AS(e,t){t==="class"?e.flags|=8:t==="style"&&(e.flags|=16)}function lb(e,t,r){let{attrs:n,inputs:i,hostDirectiveInputs:s}=e;if(n===null||!r&&i===null||r&&s===null||Jg(e)){e.initialInputs??=[],e.initialInputs.push(null);return}let o=null,a=0;for(;a<n.length;){let l=n[a];if(l===0){a+=4;continue}else if(l===5){a+=2;continue}else if(typeof l=="number")break;if(!r&&i.hasOwnProperty(l)){let c=i[l];for(let h of c)if(h===t){o??=[],o.push(l,n[a+1]);break}}else if(r&&s.hasOwnProperty(l)){let c=s[l];for(let h=0;h<c.length;h+=2)if(c[h]===t){o??=[],o.push(c[h+1],n[a+1]);break}}a+=2}e.initialInputs??=[],e.initialInputs.push(o)}function dP(e,t,r,n,i){e.data[n]=i;let s=i.factory||(i.factory=Ho(i.type,!0)),o=new Yo(s,qr(i),bt);e.blueprint[n]=o,r[n]=o,fP(e,t,n,cS(e,r,i.hostVars,Ui),i)}function fP(e,t,r,n,i){let s=i.hostBindings;if(s){let o=e.hostBindingOpCodes;o===null&&(o=e.hostBindingOpCodes=[]);let a=~t.index;pP(o)!=a&&o.push(a),o.push(r,n,s)}}function pP(e){let t=e.length;for(;t>0;){let r=e[--t];if(typeof r=="number"&&r<0)return r}return 0}function hP(e,t,r){if(r){if(t.exportAs)for(let n=0;n<t.exportAs.length;n++)r[t.exportAs[n]]=e;qr(t)&&(r[""]=e)}}function mP(e,t,r){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+r,e.providerIndexes=t}function MS(e,t,r,n,i,s,o,a){let l=t.consts,c=oa(l,o),h=Bd(t,e,2,n,c);return s&&NS(t,r,h,oa(l,a),i),h.mergedAttrs=Gc(h.mergedAttrs,h.attrs),h.attrs!==null&&sb(h,h.attrs,!1),h.mergedAttrs!==null&&sb(h,h.mergedAttrs,!0),t.queries!==null&&t.queries.elementStart(t,h),h}function OS(e,t){hC(e,t),zb(t)&&e.queries.elementEnd(t)}var Qm=class extends ao{ngModule;constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let t=$o(e);return new Zc(t,this.ngModule)}};function gP(e){return Object.keys(e).map(t=>{let[r,n,i]=e[t],s={propName:r,templateName:t,isSignal:(n&Od.SignalBased)!==0};return i&&(s.transform=i),s})}function vP(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function yP(e,t,r){let n=t instanceof Gn?t:t?.injector;return n&&e.getStandaloneInjector!==null&&(n=e.getStandaloneInjector(n)||n),n?new xm(r,n):r}function _P(e){let t=e.get(un,null);if(t===null)throw new Oe(407,!1);let r=e.get(iP,null),n=e.get(Ni,null);return{rendererFactory:t,sanitizer:r,changeDetectionScheduler:n}}function EP(e,t){let r=(e.selectors[0][0]||"div").toLowerCase();return iS(t,r,r==="svg"?Xb:r==="math"?dA:null)}var Zc=class extends gd{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;get inputs(){return gP(this.componentDef.inputs)}get outputs(){return vP(this.componentDef.outputs)}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=JM(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,r,n){vt(22);let i=$e(null);try{let s=this.componentDef,o=r?["ng-version","19.2.0"]:QM(this.componentDef.selectors[0]),a=Qg(0,null,null,1,0,null,null,null,null,[o],null),l=yP(s,n||this.ngModule,e),c=_P(l),h=c.rendererFactory.createRenderer(null,s),d=r?cO(h,r,s.encapsulation,l):EP(s,h),f=ev(null,a,null,512|aS(s),null,null,c,h,l,null,jC(d,l,!0));f[wn]=d,Fg(f);let g=null;try{let m=MS(wn,a,f,"#host",()=>[this.componentDef],!0,0);d&&(sS(h,d,m),rl(d,f)),nv(a,f,m),WC(a,m,f),OS(a,m),t!==void 0&&wP(m,this.ngContentSelectors,t),g=Kr(m.index,f),f[nn]=g[nn],iv(a,f,null)}catch(m){throw g!==null&&Lm(g),Lm(f),m}finally{vt(23),Bg()}return new eg(this.componentType,f)}finally{$e(i)}}},eg=class extends Xm{_rootLView;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t){super(),this._rootLView=t,this._tNode=Ag(t[Te],wn),this.location=fa(this._tNode,t),this.instance=Kr(this._tNode.index,t)[nn],this.hostView=this.changeDetectorRef=new Ko(t,void 0,!1),this.componentType=e}setInput(e,t){let r=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let n=this._rootLView,i=rv(r,n[Te],n,e,t);this.previousInputValues.set(e,t);let s=Kr(r.index,n);lv(s,1)}get injector(){return new Uo(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function wP(e,t,r){let n=e.projection=[];for(let i=0;i<t.length;i++){let s=r[i];n.push(s!=null&&s.length?Array.from(s):null)}}var ni=(()=>{class e{static __NG_ELEMENT_ID__=bP}return e})();function bP(){let e=pr();return kS(e,Ge())}var CP=ni,PS=class extends CP{_lContainer;_hostTNode;_hostLView;constructor(e,t,r){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=r}get element(){return fa(this._hostTNode,this._hostLView)}get injector(){return new Uo(this._hostTNode,this._hostLView)}get parentInjector(){let e=jg(this._hostTNode,this._hostLView);if(gC(e)){let t=cd(e,this._hostLView),r=ad(e),n=t[Te].data[r+8];return new Uo(n,t)}else return new Uo(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=ub(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-Tn}createEmbeddedView(e,t,r){let n,i;typeof r=="number"?n=r:r!=null&&(n=r.index,i=r.injector);let s=Kc(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,s);return this.insertImpl(o,n,qc(this._hostTNode,s)),o}createComponent(e,t,r,n,i){let s=e&&!aA(e),o;if(s)o=t;else{let g=t||{};o=g.index,r=g.injector,n=g.projectableNodes,i=g.environmentInjector||g.ngModuleRef}let a=s?e:new Zc($o(e)),l=r||this.parentInjector;if(!i&&a.ngModule==null){let g=(s?l:this.parentInjector).get(Gn,null);g&&(i=g)}let c=$o(a.componentType??{}),h=Kc(this._lContainer,c?.id??null),d=h?.firstChild??null,f=a.create(l,n,d,i);return this.insertImpl(f.hostView,o,qc(this._hostTNode,h)),f}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,r){let n=e._lView;if(pA(n)){let o=this.indexOf(e);if(o!==-1)this.detach(o);else{let a=n[xn],l=new PS(a,a[Pr],a[xn]);l.detach(l.indexOf(e))}}let i=this._adjustIndex(t),s=this._lContainer;return Fd(s,n,i,r),e.attachToViewContainerRef(),Ab(dm(s),i,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=ub(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),r=Yc(this._lContainer,t);r&&(td(dm(this._lContainer),t),kd(r[Te],r))}detach(e){let t=this._adjustIndex(e,-1),r=Yc(this._lContainer,t);return r&&td(dm(this._lContainer),t)!=null?new Ko(r):null}_adjustIndex(e,t=0){return e??this.length+t}};function ub(e){return e[od]}function dm(e){return e[od]||(e[od]=[])}function kS(e,t){let r,n=t[e.index];return Li(n)?r=n:(r=IS(n,t,null,e),t[e.index]=r,tv(t,r)),DP(r,t,e,n),new PS(r,e,t)}function SP(e,t){let r=e[ln],n=r.createComment(""),i=Jr(t,e),s=r.parentNode(i);return hd(r,s,n,r.nextSibling(i),!1),n}var DP=xP,IP=()=>!1;function TP(e,t,r){return IP(e,t,r)}function xP(e,t,r,n){if(e[Go])return;let i;r.type&8?i=Yr(n):i=SP(t,r),e[Go]=i}var tg=class V0{queryList;matches=null;constructor(t){this.queryList=t}clone(){return new V0(this.queryList)}setDirty(){this.queryList.setDirty()}},ng=class U0{queries;constructor(t=[]){this.queries=t}createEmbeddedView(t){let r=t.queries;if(r!==null){let n=t.contentQueries!==null?t.contentQueries[0]:r.length,i=[];for(let s=0;s<n;s++){let o=r.getByIndex(s),a=this.queries[o.indexInDeclarationView];i.push(a.clone())}return new U0(i)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}finishViewCreation(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let r=0;r<this.queries.length;r++)dv(t,r).matches!==null&&this.queries[r].setDirty()}},rg=class{flags;read;predicate;constructor(e,t,r=null){this.flags=t,this.read=r,typeof e=="string"?this.predicate=LP(e):this.predicate=e}},ig=class B0{queries;constructor(t=[]){this.queries=t}elementStart(t,r){for(let n=0;n<this.queries.length;n++)this.queries[n].elementStart(t,r)}elementEnd(t){for(let r=0;r<this.queries.length;r++)this.queries[r].elementEnd(t)}embeddedTView(t){let r=null;for(let n=0;n<this.length;n++){let i=r!==null?r.length:0,s=this.getByIndex(n).embeddedTView(t,i);s&&(s.indexInDeclarationView=n,r!==null?r.push(s):r=[s])}return r!==null?new B0(r):null}template(t,r){for(let n=0;n<this.queries.length;n++)this.queries[n].template(t,r)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}},og=class F0{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(t,r=-1){this.metadata=t,this._declarationNodeIndex=r}elementStart(t,r){this.isApplyingToNode(r)&&this.matchTNode(t,r)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,r){this.elementStart(t,r)}embeddedTView(t,r){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,r),new F0(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let r=this._declarationNodeIndex,n=t.parent;for(;n!==null&&n.type&8&&n.index!==r;)n=n.parent;return r===(n!==null?n.index:-1)}return this._appliesToNextNode}matchTNode(t,r){let n=this.metadata.predicate;if(Array.isArray(n))for(let i=0;i<n.length;i++){let s=n[i];this.matchTNodeWithReadOption(t,r,RP(r,s)),this.matchTNodeWithReadOption(t,r,Zu(r,t,s,!1,!1))}else n===Or?r.type&4&&this.matchTNodeWithReadOption(t,r,-1):this.matchTNodeWithReadOption(t,r,Zu(r,t,n,!1,!1))}matchTNodeWithReadOption(t,r,n){if(n!==null){let i=this.metadata.read;if(i!==null)if(i===Nt||i===ni||i===Or&&r.type&4)this.addMatch(r.index,-2);else{let s=Zu(r,t,i,!1,!1);s!==null&&this.addMatch(r.index,s)}else this.addMatch(r.index,n)}}addMatch(t,r){this.matches===null?this.matches=[t,r]:this.matches.push(t,r)}};function RP(e,t){let r=e.localNames;if(r!==null){for(let n=0;n<r.length;n+=2)if(r[n]===t)return r[n+1]}return null}function NP(e,t){return e.type&11?fa(e,t):e.type&4?uv(e,t):null}function AP(e,t,r,n){return r===-1?NP(t,e):r===-2?MP(e,t,n):zc(e,e[Te],r,t)}function MP(e,t,r){if(r===Nt)return fa(t,e);if(r===Or)return uv(t,e);if(r===ni)return kS(t,e)}function LS(e,t,r,n){let i=t[Ri].queries[n];if(i.matches===null){let s=e.data,o=r.matches,a=[];for(let l=0;o!==null&&l<o.length;l+=2){let c=o[l];if(c<0)a.push(null);else{let h=s[c];a.push(AP(t,h,o[l+1],r.metadata.read))}}i.matches=a}return i.matches}function sg(e,t,r,n){let i=e.queries.getByIndex(r),s=i.matches;if(s!==null){let o=LS(e,t,i,r);for(let a=0;a<s.length;a+=2){let l=s[a];if(l>0)n.push(o[a/2]);else{let c=s[a+1],h=t[-l];for(let d=Tn;d<h.length;d++){let f=h[d];f[Wo]===f[xn]&&sg(f[Te],f,c,n)}if(h[ia]!==null){let d=h[ia];for(let f=0;f<d.length;f++){let g=d[f];sg(g[Te],g,c,n)}}}}}return n}function OP(e,t){return e[Ri].queries[t].queryList}function PP(e,t,r){let n=new km((r&4)===4);return gA(e,t,n,n.destroy),(t[Ri]??=new ng).queries.push(new tg(n))-1}function kP(e,t,r){let n=dn();return n.firstCreatePass&&(FP(n,new rg(e,t,r),-1),(t&2)===2&&(n.staticViewQueries=!0)),PP(n,Ge(),t)}function LP(e){return e.split(",").map(t=>t.trim())}function FP(e,t,r){e.queries===null&&(e.queries=new ig),e.queries.track(new og(t,r))}function dv(e,t){return e.queries.getByIndex(t)}function BP(e,t){let r=e[Te],n=dv(r,t);return n.crossesNgTemplate?sg(r,e,t,[]):LS(r,e,n,t)}var Oi=class{},vd=class extends Oi{injector;componentFactoryResolver=new Qm(this);instance=null;constructor(e){super();let t=new Hc([...e.providers,{provide:Oi,useValue:this},{provide:ao,useValue:this.componentFactoryResolver}],e.parent||Dd(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function VP(e,t,r=null){return new vd({providers:e,parent:t,debugName:r,runEnvironmentInitializers:!0}).injector}var UP=(()=>{class e{_injector;cachedInjectors=new Map;constructor(r){this._injector=r}getOrCreateStandaloneInjector(r){if(!r.standalone)return null;if(!this.cachedInjectors.has(r)){let n=Fb(!1,r.type),i=n.length>0?VP([n],this._injector,`Standalone[${r.type.name}]`):null;this.cachedInjectors.set(r,i)}return this.cachedInjectors.get(r)}ngOnDestroy(){try{for(let r of this.cachedInjectors.values())r!==null&&r.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=oe({token:e,providedIn:"environment",factory:()=>new e(et(Gn))})}return e})();function ct(e){return bd(()=>{let t=FS(e),r=re(w({},t),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===NC.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?i=>i.get(UP).getOrCreateStandaloneInjector(r):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||Zr.Emulated,styles:e.styles||so,_:null,schemas:e.schemas||null,tView:null,id:""});t.standalone&&lo("NgStandalone"),BS(r);let n=e.dependencies;return r.directiveDefs=db(n,!1),r.pipeDefs=db(n,!0),r.id=GP(r),r})}function HP(e){return $o(e)||Pb(e)}function jP(e){return e!==null}function $P(e,t){if(e==null)return jo;let r={};for(let n in e)if(e.hasOwnProperty(n)){let i=e[n],s,o,a,l;Array.isArray(i)?(a=i[0],s=i[1],o=i[2]??s,l=i[3]||null):(s=i,o=i,a=Od.None,l=null),r[s]=[n,a,l],t[s]=o}return r}function WP(e){if(e==null)return jo;let t={};for(let r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function kr(e){return bd(()=>{let t=FS(e);return BS(t),t})}function Qo(e){return{type:e.type,name:e.name,factory:null,pure:e.pure!==!1,standalone:e.standalone??!0,onDestroy:e.type.prototype.ngOnDestroy||null}}function FS(e){let t={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputConfig:e.inputs||jo,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||so,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:$P(e.inputs,t),outputs:WP(e.outputs),debugInfo:null}}function BS(e){e.features?.forEach(t=>t(e))}function db(e,t){if(!e)return null;let r=t?kb:HP;return()=>(typeof e=="function"?e():e).map(n=>r(n)).filter(jP)}function GP(e){let t=0,r=typeof e.consts=="function"?"":e.consts,n=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,r,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery];for(let i of n.join("|"))t=Math.imul(31,t)+i.charCodeAt(0)<<0;return t+=2147483648,"c"+t}function zP(e){return Object.getPrototypeOf(e.prototype).constructor}function ri(e){let t=zP(e.type),r=!0,n=[e];for(;t;){let i;if(qr(e))i=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new Oe(903,!1);i=t.\u0275dir}if(i){if(r){n.push(i);let o=e;o.inputs=fm(e.inputs),o.declaredInputs=fm(e.declaredInputs),o.outputs=fm(e.outputs);let a=i.hostBindings;a&&XP(e,a);let l=i.viewQuery,c=i.contentQueries;if(l&&KP(e,l),c&&ZP(e,c),qP(e,i),DN(e.outputs,i.outputs),qr(i)&&i.data.animation){let h=e.data;h.animation=(h.animation||[]).concat(i.data.animation)}}let s=i.features;if(s)for(let o=0;o<s.length;o++){let a=s[o];a&&a.ngInherit&&a(e),a===ri&&(r=!1)}}t=Object.getPrototypeOf(t)}YP(n)}function qP(e,t){for(let r in t.inputs){if(!t.inputs.hasOwnProperty(r)||e.inputs.hasOwnProperty(r))continue;let n=t.inputs[r];n!==void 0&&(e.inputs[r]=n,e.declaredInputs[r]=t.declaredInputs[r])}}function YP(e){let t=0,r=null;for(let n=e.length-1;n>=0;n--){let i=e[n];i.hostVars=t+=i.hostVars,i.hostAttrs=Gc(i.hostAttrs,r=Gc(r,i.hostAttrs))}}function fm(e){return e===jo?{}:e===so?[]:e}function KP(e,t){let r=e.viewQuery;r?e.viewQuery=(n,i)=>{t(n,i),r(n,i)}:e.viewQuery=t}function ZP(e,t){let r=e.contentQueries;r?e.contentQueries=(n,i,s)=>{t(n,i,s),r(n,i,s)}:e.contentQueries=t}function XP(e,t){let r=e.hostBindings;r?e.hostBindings=(n,i)=>{t(n,i),r(n,i)}:e.hostBindings=t}function VS(e){return e!==null&&(typeof e=="function"||typeof e=="object")}function US(e,t,r){return e[t]=r}function Pi(e,t,r){let n=e[t];return Object.is(n,r)?!1:(e[t]=r,!0)}function JP(e,t,r,n){let i=Pi(e,t,r);return Pi(e,t+1,n)||i}function QP(e,t,r,n,i,s,o,a,l){let c=t.consts,h=Bd(t,e,4,o||null,a||null);rC()&&NS(t,r,h,oa(c,l),pS),h.mergedAttrs=Gc(h.mergedAttrs,h.attrs),hC(t,h);let d=h.tView=Qg(2,h,n,i,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c,null);return t.queries!==null&&(t.queries.template(t,h),d.queries=t.queries.embeddedTView(h)),h}function ag(e,t,r,n,i,s,o,a,l,c){let h=r+wn,d=t.firstCreatePass?QP(h,t,e,n,i,s,o,a,l):t.data[h];da(d,!1);let f=e1(t,e,d,r);Ug()&&av(t,e,f,d),rl(f,e);let g=IS(f,e,f,d);return e[h]=g,tv(e,g),TP(g,d,e),Ng(d)&&nv(t,e,d),l!=null&&dS(e,d,c),d}function At(e,t,r,n,i,s,o,a){let l=Ge(),c=dn(),h=oa(c.consts,s);return ag(l,c,e,t,r,n,i,h,o,a),At}var e1=t1;function t1(e,t,r,n){return Hg(!0),t[ln].createComment("")}var HS=new he(""),n1=(()=>{class e{static \u0275prov=oe({token:e,providedIn:"root",factory:()=>new cg})}return e})(),cg=class{queuedEffectCount=0;queues=new Map;schedule(e){this.enqueue(e)}remove(e){let t=e.zone,r=this.queues.get(t);r.has(e)&&(r.delete(e),this.queuedEffectCount--)}enqueue(e){let t=e.zone;this.queues.has(t)||this.queues.set(t,new Set);let r=this.queues.get(t);r.has(e)||(this.queuedEffectCount++,r.add(e))}flush(){for(;this.queuedEffectCount>0;)for(let[e,t]of this.queues)e===null?this.flushQueue(t):e.run(()=>this.flushQueue(t))}flushQueue(e){for(let t of e)e.delete(t),this.queuedEffectCount--,t.run()}};function fv(e){return!!e&&typeof e.then=="function"}function jS(e){return!!e&&typeof e.subscribe=="function"}var r1=new he(""),$S=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((r,n)=>{this.resolve=r,this.reject=n});appInits=O(r1,{optional:!0})??[];injector=O(yt);constructor(){}runInitializers(){if(this.initialized)return;let r=[];for(let i of this.appInits){let s=Hb(this.injector,i);if(fv(s))r.push(s);else if(jS(s)){let o=new Promise((a,l)=>{s.subscribe({complete:a,error:l})});r.push(o)}}let n=()=>{this.done=!0,this.resolve()};Promise.all(r).then(()=>{n()}).catch(i=>{this.reject(i)}),r.length===0&&n(),this.initialized=!0}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),i1=new he("");function o1(){tw(()=>{throw new Oe(600,!1)})}function s1(e){return e.isBoundToModule}var a1=10,fr=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=O(aM);afterRenderManager=O(UC);zonelessEnabled=O(Rd);rootEffectScheduler=O(n1);dirtyFlags=0;tracingSnapshot=null;externalTestViews=new Set;afterTick=new ie;get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];isStable=O(Nd).hasPendingTasks.pipe(ur(r=>!r));constructor(){O(pa,{optional:!0})}whenStable(){let r;return new Promise(n=>{r=this.isStable.subscribe({next:i=>{i&&n()}})}).finally(()=>{r.unsubscribe()})}_injector=O(Gn);_rendererFactory=null;get injector(){return this._injector}bootstrap(r,n){vt(10);let i=r instanceof gd;if(!this._injector.get($S).done){let d=!i&&KN(r),f=!1;throw new Oe(405,f)}let s;i?s=r:s=this._injector.get(ao).resolveComponentFactory(r),this.componentTypes.push(s.componentType);let o=s1(s)?void 0:this._injector.get(Oi),a=n||s.selector,l=s.create(yt.NULL,[],a,o),c=l.location.nativeElement,h=l.injector.get(HS,null);return h?.registerApplication(c),l.onDestroy(()=>{this.detachView(l.hostView),Xu(this.components,l),h?.unregisterApplication(c)}),this._loadComponent(l),vt(11,l),l}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){vt(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(Kg.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new Oe(101,!1);let r=$e(null);try{this._runningTick=!0,this.synchronize()}catch(n){this.internalErrorHandler(n)}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,$e(r),this.afterTick.next(),vt(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(un,null,{optional:!0}));let r=0;for(;this.dirtyFlags!==0&&r++<a1;)vt(14),this.synchronizeOnce(),vt(15)}synchronizeOnce(){if(this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush()),this.dirtyFlags&7){let r=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:n,notifyErrorHandler:i}of this.allViews)c1(n,i,r,this.zonelessEnabled);if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}else this._rendererFactory?.begin?.(),this._rendererFactory?.end?.();this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:r})=>Td(r))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(r){let n=r;this._views.push(n),n.attachToAppRef(this)}detachView(r){let n=r;Xu(this._views,n),n.detachFromAppRef()}_loadComponent(r){this.attachView(r.hostView),this.tick(),this.components.push(r),this._injector.get(i1,[]).forEach(n=>n(r))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(r=>r()),this._views.slice().forEach(r=>r.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(r){return this._destroyListeners.push(r),()=>Xu(this._destroyListeners,r)}destroy(){if(this._destroyed)throw new Oe(406,!1);let r=this._injector;r.destroy&&!r.destroyed&&r.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Xu(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}function c1(e,t,r,n){!r&&!Td(e)||bS(e,t,r&&!n?0:1)}function fo(e,t,r,n){let i=Ge(),s=nl();if(Pi(i,s,t)){let o=dn(),a=Vg();gO(a,i,e,t,r,n)}return fo}function WS(e,t,r,n){return Pi(e,nl(),r)?t+Jc(r)+n:Ui}function zu(e,t){return e<<17|t<<2}function Zo(e){return e>>17&32767}function l1(e){return(e&2)==2}function u1(e,t){return e&131071|t<<17}function lg(e){return e|2}function sa(e){return(e&131068)>>2}function pm(e,t){return e&-131069|t<<2}function d1(e){return(e&1)===1}function ug(e){return e|1}function f1(e,t,r,n,i,s){let o=s?t.classBindings:t.styleBindings,a=Zo(o),l=sa(o);e[n]=r;let c=!1,h;if(Array.isArray(r)){let d=r;h=d[1],(h===null||Qc(d,h)>0)&&(c=!0)}else h=r;if(i)if(l!==0){let d=Zo(e[a+1]);e[n+1]=zu(d,a),d!==0&&(e[d+1]=pm(e[d+1],n)),e[a+1]=u1(e[a+1],n)}else e[n+1]=zu(a,0),a!==0&&(e[a+1]=pm(e[a+1],n)),a=n;else e[n+1]=zu(l,0),a===0?a=n:e[l+1]=pm(e[l+1],n),l=n;c&&(e[n+1]=lg(e[n+1])),fb(e,h,n,!0),fb(e,h,n,!1),p1(t,h,e,n,s),o=zu(a,l),s?t.classBindings=o:t.styleBindings=o}function p1(e,t,r,n,i){let s=i?e.residualClasses:e.residualStyles;s!=null&&typeof t=="string"&&Qc(s,t)>=0&&(r[n+1]=ug(r[n+1]))}function fb(e,t,r,n){let i=e[r+1],s=t===null,o=n?Zo(i):sa(i),a=!1;for(;o!==0&&(a===!1||s);){let l=e[o],c=e[o+1];h1(l,t)&&(a=!0,e[o+1]=n?ug(c):lg(c)),o=n?Zo(c):sa(c)}a&&(e[r+1]=n?lg(i):ug(i))}function h1(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t=="string"?Qc(e,t)>=0:!1}function be(e,t,r){let n=Ge(),i=nl();if(Pi(n,i,t)){let s=dn(),o=Vg();fS(s,o,n,e,t,n[ln],r,!1)}return be}function pb(e,t,r,n,i){rv(t,e,r,i?"class":"style",n)}function po(e,t,r){return GS(e,t,r,!1),po}function ii(e,t){return GS(e,t,null,!0),ii}function GS(e,t,r,n){let i=Ge(),s=dn(),o=TA(2);if(s.firstUpdatePass&&g1(s,e,o,n),t!==Ui&&Pi(i,o,t)){let a=s.data[co()];w1(s,a,i,i[ln],e,i[o+1]=b1(t,r),n,o)}}function m1(e,t){return t>=e.expandoStartIndex}function g1(e,t,r,n){let i=e.data;if(i[r+1]===null){let s=i[co()],o=m1(e,r);C1(s,n)&&t===null&&!o&&(t=!1),t=v1(i,s,t,n),f1(i,s,t,r,o,n)}}function v1(e,t,r,n){let i=AA(e),s=n?t.residualClasses:t.residualStyles;if(i===null)(n?t.classBindings:t.styleBindings)===0&&(r=hm(null,e,t,r,n),r=Xc(r,t.attrs,n),s=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i)if(r=hm(i,e,t,r,n),s===null){let a=y1(e,t,n);a!==void 0&&Array.isArray(a)&&(a=hm(null,e,t,a[1],n),a=Xc(a,t.attrs,n),_1(e,t,n,a))}else s=E1(e,t,n)}return s!==void 0&&(n?t.residualClasses=s:t.residualStyles=s),r}function y1(e,t,r){let n=r?t.classBindings:t.styleBindings;if(sa(n)!==0)return e[Zo(n)]}function _1(e,t,r,n){let i=r?t.classBindings:t.styleBindings;e[Zo(i)]=n}function E1(e,t,r){let n,i=t.directiveEnd;for(let s=1+t.directiveStylingLast;s<i;s++){let o=e[s].hostAttrs;n=Xc(n,o,r)}return Xc(n,t.attrs,r)}function hm(e,t,r,n,i){let s=null,o=r.directiveEnd,a=r.directiveStylingLast;for(a===-1?a=r.directiveStart:a++;a<o&&(s=t[a],n=Xc(n,s.hostAttrs,i),s!==e);)a++;return e!==null&&(r.directiveStylingLast=a),n}function Xc(e,t,r){let n=r?1:2,i=-1;if(t!==null)for(let s=0;s<t.length;s++){let o=t[s];typeof o=="number"?i=o:i===n&&(Array.isArray(e)||(e=e===void 0?[]:["",e]),qN(e,o,r?!0:t[++s]))}return e===void 0?null:e}function w1(e,t,r,n,i,s,o,a){if(!(t.type&3))return;let l=e.data,c=l[a+1],h=d1(c)?hb(l,t,r,i,sa(c),o):void 0;if(!yd(h)){yd(s)||l1(c)&&(s=hb(l,null,r,i,a,o));let d=Jb(co(),r);kO(n,o,d,i,s)}}function hb(e,t,r,n,i,s){let o=t===null,a;for(;i>0;){let l=e[i],c=Array.isArray(l),h=c?l[1]:l,d=h===null,f=r[i+1];f===Ui&&(f=d?so:void 0);let g=d?im(f,n):h===n?f:void 0;if(c&&!yd(g)&&(g=im(l,n)),yd(g)&&(a=g,o))return a;let m=e[i+1];i=o?Zo(m):sa(m)}if(t!==null){let l=s?t.residualClasses:t.residualStyles;l!=null&&(a=im(l,n))}return a}function yd(e){return e!==void 0}function b1(e,t){return e==null||e===""||(typeof t=="string"?e=e+t:typeof e=="object"&&(e=dr(ei(e)))),e}function C1(e,t){return(e.flags&(t?8:16))!==0}var dg=class{destroy(e){}updateValue(e,t){}swap(e,t){let r=Math.min(e,t),n=Math.max(e,t),i=this.detach(n);if(n-r>1){let s=this.detach(r);this.attach(r,i),this.attach(n,s)}else this.attach(r,i)}move(e,t){this.attach(t,this.detach(e))}};function mm(e,t,r,n,i){return e===r&&Object.is(t,n)?1:Object.is(i(e,t),i(r,n))?-1:0}function S1(e,t,r){let n,i,s=0,o=e.length-1,a;if(Array.isArray(t)){let l=t.length-1;for(;s<=o&&s<=l;){let c=e.at(s),h=t[s],d=mm(s,c,s,h,r);if(d!==0){d<0&&e.updateValue(s,h),s++;continue}let f=e.at(o),g=t[l],m=mm(o,f,l,g,r);if(m!==0){m<0&&e.updateValue(o,g),o--,l--;continue}let b=r(s,c),I=r(o,f),A=r(s,h);if(Object.is(A,I)){let F=r(l,g);Object.is(F,b)?(e.swap(s,o),e.updateValue(o,g),l--,o--):e.move(o,s),e.updateValue(s,h),s++;continue}if(n??=new _d,i??=gb(e,s,o,r),fg(e,n,s,A))e.updateValue(s,h),s++,o++;else if(i.has(A))n.set(b,e.detach(s)),o--;else{let F=e.create(s,t[s]);e.attach(s,F),s++,o++}}for(;s<=l;)mb(e,n,r,s,t[s]),s++}else if(t!=null){let l=t[Symbol.iterator](),c=l.next();for(;!c.done&&s<=o;){let h=e.at(s),d=c.value,f=mm(s,h,s,d,r);if(f!==0)f<0&&e.updateValue(s,d),s++,c=l.next();else{n??=new _d,i??=gb(e,s,o,r);let g=r(s,d);if(fg(e,n,s,g))e.updateValue(s,d),s++,o++,c=l.next();else if(!i.has(g))e.attach(s,e.create(s,d)),s++,o++,c=l.next();else{let m=r(s,h);n.set(m,e.detach(s)),o--}}}for(;!c.done;)mb(e,n,r,e.length,c.value),c=l.next()}for(;s<=o;)e.destroy(e.detach(o--));n?.forEach(l=>{e.destroy(l)})}function fg(e,t,r,n){return t!==void 0&&t.has(n)?(e.attach(r,t.get(n)),t.delete(n),!0):!1}function mb(e,t,r,n,i){if(fg(e,t,n,r(n,i)))e.updateValue(n,i);else{let s=e.create(n,i);e.attach(n,s)}}function gb(e,t,r,n){let i=new Set;for(let s=t;s<=r;s++)i.add(n(s,e.at(s)));return i}var _d=class{kvMap=new Map;_vMap=void 0;has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let t=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(e,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,t){if(this.kvMap.has(e)){let r=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let n=this._vMap;for(;n.has(r);)r=n.get(r);n.set(r,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,r]of this.kvMap)if(e(r,t),this._vMap!==void 0){let n=this._vMap;for(;n.has(r);)r=n.get(r),e(r,t)}}};function Vt(e,t){lo("NgControlFlow");let r=Ge(),n=nl(),i=r[n]!==Ui?r[n]:-1,s=i!==-1?Ed(r,wn+i):void 0,o=0;if(Pi(r,n,e)){let a=$e(null);try{if(s!==void 0&&xS(s,o),e!==-1){let l=wn+e,c=Ed(r,l),h=gg(r[Te],l),d=Kc(c,h.tView.ssrId),f=Pd(r,h,t,{dehydratedView:d});Fd(c,f,o,qc(h,d))}}finally{$e(a)}}else if(s!==void 0){let a=TS(s,o);a!==void 0&&(a[nn]=t)}}var pg=class{lContainer;$implicit;$index;constructor(e,t,r){this.lContainer=e,this.$implicit=t,this.$index=r}get $count(){return this.lContainer.length-Tn}};function Lr(e,t){return t}var hg=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,r){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=r}};function Mt(e,t,r,n,i,s,o,a,l,c,h,d,f){lo("NgControlFlow");let g=Ge(),m=dn(),b=l!==void 0,I=Ge(),A=a?o.bind(I[Mr][nn]):o,F=new hg(b,A);I[wn+e]=F,ag(g,m,e+1,t,r,n,i,oa(m.consts,s)),b&&ag(g,m,e+2,l,c,h,d,oa(m.consts,f))}var mg=class extends dg{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,t,r){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=r}get length(){return this.lContainer.length-Tn}at(e){return this.getLView(e)[nn].$implicit}attach(e,t){let r=t[jc];this.needsIndexUpdate||=e!==this.length,Fd(this.lContainer,t,e,qc(this.templateTNode,r))}detach(e){return this.needsIndexUpdate||=e!==this.length-1,D1(this.lContainer,e)}create(e,t){let r=Kc(this.lContainer,this.templateTNode.tView.ssrId),n=Pd(this.hostLView,this.templateTNode,new pg(this.lContainer,t,e),{dehydratedView:r});return this.operationsCounter?.recordCreate(),n}destroy(e){kd(e[Te],e),this.operationsCounter?.recordDestroy()}updateValue(e,t){this.getLView(e)[nn].$implicit=t}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e<this.length;e++)this.getLView(e)[nn].$index=e}getLView(e){return I1(this.lContainer,e)}};function Ot(e){let t=$e(null),r=co();try{let n=Ge(),i=n[Te],s=n[r],o=r+1,a=Ed(n,o);if(s.liveCollection===void 0){let c=gg(i,o);s.liveCollection=new mg(a,n,c)}else s.liveCollection.reset();let l=s.liveCollection;if(S1(l,e,s.trackByFn),l.updateIndexes(),s.hasEmptyBlock){let c=nl(),h=l.length===0;if(Pi(n,c,h)){let d=r+2,f=Ed(n,d);if(h){let g=gg(i,d),m=Kc(f,g.tView.ssrId),b=Pd(n,g,void 0,{dehydratedView:m});Fd(f,b,0,qc(g,m))}else xS(f,0)}}}finally{$e(t)}}function Ed(e,t){return e[t]}function D1(e,t){return Yc(e,t)}function I1(e,t){return TS(e,t)}function gg(e,t){return Ag(e,t)}function K(e,t,r,n){let i=Ge(),s=dn(),o=wn+e,a=i[ln],l=s.firstCreatePass?MS(o,s,i,t,pS,rC(),r,n):s.data[o],c=T1(s,i,l,a,t,e);i[o]=c;let h=Ng(l);return da(l,!0),sS(a,c,l),!mS(l)&&Ug()&&av(s,i,c,l),(vA()===0||h)&&rl(c,i),yA(),h&&(nv(s,i,l),WC(s,l,i)),n!==null&&dS(i,l),K}function X(){let e=pr();oC()?SA():(e=e.parent,da(e,!1));let t=e;wA(t)&&bA(),_A();let r=dn();return r.firstCreatePass&&OS(r,t),t.classesWithoutHost!=null&&VA(t)&&pb(r,t,Ge(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&UA(t)&&pb(r,t,Ge(),t.stylesWithoutHost,!1),X}function Ne(e,t,r,n){return K(e,t,r,n),X(),Ne}var T1=(e,t,r,n,i,s)=>(Hg(!0),iS(n,i,kA()));function fn(){return Ge()}var wd="en-US",x1=wd;function R1(e){typeof e=="string"&&(x1=e.toLowerCase().replace(/_/g,"-"))}var N1=(e,t,r)=>{};function Qe(e,t,r,n){let i=Ge(),s=dn(),o=pr();return M1(s,i,i[ln],o,e,t,n),Qe}function A1(e,t,r,n){let i=e.cleanup;if(i!=null)for(let s=0;s<i.length-1;s+=2){let o=i[s];if(o===r&&i[s+1]===n){let a=t[rd],l=i[s+2];return a.length>l?a[l]:null}typeof o=="string"&&(s+=2)}return null}function M1(e,t,r,n,i,s,o){let a=Ng(n),l=e.firstCreatePass?nC(e):null,c=t[nn],h=tC(t),d=!0;if(n.type&3||o){let f=Jr(n,t),g=o?o(f):f,m=h.length,b=o?A=>o(Yr(A[n.index])):n.index,I=null;if(!o&&a&&(I=A1(e,t,i,n.index)),I!==null){let A=I.__ngLastListenerFn__||I;A.__ngNextListenerFn__=s,I.__ngLastListenerFn__=s,d=!1}else{s=_b(n,t,c,s),N1(f,i,s);let A=r.listen(g,i,s);h.push(s,A),l&&l.push(i,b,m,m+1)}}else s=_b(n,t,c,s);if(d){let f=n.outputs?.[i],g=n.hostDirectiveOutputs?.[i];if(g&&g.length)for(let m=0;m<g.length;m+=2){let b=g[m],I=g[m+1];vb(n,e,t,b,I,i,s,h,l)}if(f&&f.length)for(let m of f)vb(n,e,t,m,i,i,s,h,l)}}function vb(e,t,r,n,i,s,o,a,l){let c=r[n],h=t.data[n].outputs[i],d=c[h].subscribe(o),f=a.length;a.push(o,d),l&&l.push(s,e.index,f,-(f+1))}function yb(e,t,r,n){let i=$e(null);try{return vt(6,t,r),r(n)!==!1}catch(s){return hS(e,s),!1}finally{vt(7,t,r),$e(i)}}function _b(e,t,r,n){return function i(s){if(s===Function)return n;let o=la(e)?Kr(e.index,t):t;lv(o,5);let a=yb(t,r,n,s),l=i.__ngNextListenerFn__;for(;l;)a=yb(t,r,l,s)&&a,l=l.__ngNextListenerFn__;return a}}function q(e=1){return OA(e)}function bn(e,t,r){return Fr(e,"",t,"",r),bn}function Fr(e,t,r,n,i){let s=Ge(),o=WS(s,t,r,n);if(o!==Ui){let a=dn(),l=Vg();fS(a,l,s,e,o,s[ln],i,!1)}return Fr}function es(e,t,r){kP(e,t,r)}function ts(e){let t=Ge(),r=dn(),n=aC();Lg(n+1);let i=dv(r,n);if(e.dirty&&fA(t)===((i.metadata.flags&2)===2)){if(i.matches===null)e.reset([]);else{let s=BP(t,n);e.reset(s,lM),e.notifyOnChanges()}return!0}return!1}function ns(){return OP(Ge(),aC())}function pv(e,t,r,n){r>=e.data.length&&(e.data[r]=null,e.blueprint[r]=null),t[r]=n}function $t(e,t=""){let r=Ge(),n=dn(),i=e+wn,s=n.firstCreatePass?Bd(n,i,1,t,null):n.data[i],o=O1(n,r,s,t,e);r[i]=o,Ug()&&av(n,r,o,s),da(s,!1)}var O1=(e,t,r,n,i)=>(Hg(!0),eO(t[ln],n));function ha(e){return hr("",e,""),ha}function hr(e,t,r){let n=Ge(),i=WS(n,e,t,r);return i!==Ui&&P1(n,co(),i),hr}function P1(e,t,r){let n=Jb(t,e);tO(e[ln],n,r)}var zS={};function Br(e){let t=dn(),r=Ge(),n=e+wn,i=Bd(t,n,128,null,null);return da(i,!1),pv(t,r,n,zS),Br}function ho(e){lo("NgLet");let t=dn(),r=Ge(),n=co();return pv(t,r,n,e),e}function mr(e){let t=DA(),r=Mg(t,wn+e);if(r===zS)throw new Oe(314,!1);return r}function k1(e,t,r){let n=dn();if(n.firstCreatePass){let i=qr(e);vg(r,n.data,n.blueprint,i,!0),vg(t,n.data,n.blueprint,i,!1)}}function vg(e,t,r,n,i){if(e=Pn(e),Array.isArray(e))for(let s=0;s<e.length;s++)vg(e[s],t,r,n,i);else{let s=dn(),o=Ge(),a=pr(),l=ra(e)?e:Pn(e.provide),c=Ub(e),h=a.providerIndexes&1048575,d=a.directiveStart,f=a.providerIndexes>>20;if(ra(e)||!e.multi){let g=new Yo(c,i,bt),m=vm(l,t,i?h:h+f,d);m===-1?(Nm(ud(a,o),s,l),gm(s,e,t.length),t.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),r.push(g),o.push(g)):(r[m]=g,o[m]=g)}else{let g=vm(l,t,h+f,d),m=vm(l,t,h,h+f),b=g>=0&&r[g],I=m>=0&&r[m];if(i&&!I||!i&&!b){Nm(ud(a,o),s,l);let A=B1(i?F1:L1,r.length,i,n,c);!i&&I&&(r[m].providerFactory=A),gm(s,e,t.length,0),t.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),r.push(A),o.push(A)}else{let A=qS(r[i?m:g],c,!i&&n);gm(s,e,g>-1?g:m,A)}!i&&n&&I&&r[m].componentProviders++}}}function gm(e,t,r,n){let i=ra(t),s=eA(t);if(i||s){let o=(s?Pn(t.useClass):t).prototype.ngOnDestroy;if(o){let a=e.destroyHooks||(e.destroyHooks=[]);if(!i&&t.multi){let l=a.indexOf(r);l===-1?a.push(r,[n,o]):a[l+1].push(n,o)}else a.push(r,o)}}}function qS(e,t,r){return r&&e.componentProviders++,e.multi.push(t)-1}function vm(e,t,r,n){for(let i=r;i<n;i++)if(t[i]===e)return i;return-1}function L1(e,t,r,n){return yg(this.multi,[])}function F1(e,t,r,n){let i=this.multi,s;if(this.providerFactory){let o=this.providerFactory.componentProviders,a=zc(r,r[Te],this.providerFactory.index,n);s=a.slice(0,o),yg(i,s);for(let l=o;l<a.length;l++)s.push(a[l])}else s=[],yg(i,s);return s}function yg(e,t){for(let r=0;r<e.length;r++){let n=e[r];t.push(n())}return t}function B1(e,t,r,n,i){let s=new Yo(e,r,bt);return s.multi=[],s.index=t,s.componentProviders=0,qS(s,i,n&&!r),s}function Vd(e,t=[]){return r=>{r.providersResolver=(n,i)=>k1(n,i?i(e):e,t)}}function ma(e,t,r,n){return KS(Ge(),kg(),e,t,r,n)}function YS(e,t){let r=e[t];return r===Ui?void 0:r}function KS(e,t,r,n,i,s){let o=t+r;return Pi(e,o,i)?US(e,o+1,s?n.call(s,i):n(i)):YS(e,o+1)}function V1(e,t,r,n,i,s,o){let a=t+r;return JP(e,a,i,s)?US(e,a+2,o?n.call(o,i,s):n(i,s)):YS(e,a+2)}function Qn(e,t){let r=dn(),n,i=e+wn;r.firstCreatePass?(n=U1(t,r.pipeRegistry),r.data[i]=n,n.onDestroy&&(r.destroyHooks??=[]).push(i,n.onDestroy)):n=r.data[i];let s=n.factory||(n.factory=Ho(n.type,!0)),o,a=Wn(bt);try{let l=ld(!1),c=s();return ld(l),pv(r,Ge(),i,c),c}finally{Wn(a)}}function U1(e,t){if(t)for(let r=t.length-1;r>=0;r--){let n=t[r];if(e===n.name)return n}}function gr(e,t,r){let n=e+wn,i=Ge(),s=Mg(i,n);return XS(i,n)?KS(i,kg(),t,s.transform,r,s):s.transform(r)}function ZS(e,t,r,n){let i=e+wn,s=Ge(),o=Mg(s,i);return XS(s,i)?V1(s,kg(),t,o.transform,r,n,o):o.transform(r,n)}function XS(e,t){return e[Te].data[t].pure}var aa=class{full;major;minor;patch;constructor(e){this.full=e;let t=e.split(".");this.major=t[0],this.minor=t[1],this.patch=t.slice(2).join(".")}},hv=new aa("19.2.0"),H1=(()=>{class e{zone=O(Ve);changeDetectionScheduler=O(Ni);applicationRef=O(fr);_onMicrotaskEmptySubscription;initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function j1({ngZoneFactory:e,ignoreChangesOutsideZone:t,scheduleInRootZone:r}){return e??=()=>new Ve(re(w({},$1()),{scheduleInRootZone:r})),[{provide:Ve,useFactory:e},{provide:Uc,multi:!0,useFactory:()=>{let n=O(H1,{optional:!0});return()=>n.initialize()}},{provide:Uc,multi:!0,useFactory:()=>{let n=O(W1);return()=>{n.initialize()}}},t===!0?{provide:IC,useValue:!0}:[],{provide:Wg,useValue:r??DC}]}function $1(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}var W1=(()=>{class e{subscription=new mt;initialized=!1;zone=O(Ve);pendingTasks=O(Nd);initialize(){if(this.initialized)return;this.initialized=!0;let r=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(r=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{Ve.assertNotInAngularZone(),queueMicrotask(()=>{r!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(r),r=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Ve.assertInAngularZone(),r??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),JS=(()=>{class e{appRef=O(fr);taskService=O(Nd);ngZone=O(Ve);zonelessEnabled=O(Rd);tracing=O(pa,{optional:!0});disableScheduling=O(IC,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new mt;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(fd):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(O(Wg,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof pd||!this.zoneIsDefined)}notify(r){if(!this.zonelessEnabled&&r===5)return;let n=!1;switch(r){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2,n=!0;break}case 12:{this.appRef.dirtyFlags|=16,n=!0;break}case 13:{this.appRef.dirtyFlags|=2,n=!0;break}case 11:{n=!0;break}case 9:case 8:case 7:case 10:default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick(n))return;let i=this.useMicrotaskScheduler?qw:TC;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>i(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>i(()=>this.tick()))}shouldScheduleTick(r){return!(this.disableScheduling&&!r||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(fd+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let r=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(n){throw this.taskService.remove(r),n}finally{this.cleanup()}this.useMicrotaskScheduler=!0,qw(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(r)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let r=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(r)}}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function QS(){return lo("NgZoneless"),Lb([{provide:Ni,useExisting:JS},{provide:Ve,useClass:pd},{provide:Rd,useValue:!0},{provide:Wg,useValue:!1},[]])}function G1(){return typeof $localize<"u"&&$localize.locale||wd}var mv=new he("",{providedIn:"root",factory:()=>O(mv,Je.Optional|Je.SkipSelf)||G1()}),_g=new he(""),z1=new he("");function Pc(e){return!e.moduleRef}function q1(e){let t=Pc(e)?e.r3Injector:e.moduleRef.injector,r=t.get(Ve);return r.run(()=>{Pc(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let n=t.get(Ai,null),i;if(r.runOutsideAngular(()=>{i=r.onError.subscribe({next:s=>{n.handleError(s)}})}),Pc(e)){let s=()=>t.destroy(),o=e.platformInjector.get(_g);o.add(s),t.onDestroy(()=>{i.unsubscribe(),o.delete(s)})}else{let s=()=>e.moduleRef.destroy(),o=e.platformInjector.get(_g);o.add(s),e.moduleRef.onDestroy(()=>{Xu(e.allPlatformModules,e.moduleRef),i.unsubscribe(),o.delete(s)})}return K1(n,r,()=>{let s=t.get($S);return s.runInitializers(),s.donePromise.then(()=>{let o=t.get(mv,wd);if(R1(o||wd),!t.get(z1,!0))return Pc(e)?t.get(fr):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(Pc(e)){let a=t.get(fr);return e.rootComponent!==void 0&&a.bootstrap(e.rootComponent),a}else return Y1(e.moduleRef,e.allPlatformModules),e.moduleRef})})})}function Y1(e,t){let r=e.injector.get(fr);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(n=>r.bootstrap(n));else if(e.instance.ngDoBootstrap)e.instance.ngDoBootstrap(r);else throw new Oe(-403,!1);t.push(e)}function K1(e,t,r){try{let n=r();return fv(n)?n.catch(i=>{throw t.runOutsideAngular(()=>e.handleError(i)),i}):n}catch(n){throw t.runOutsideAngular(()=>e.handleError(n)),n}}var Ju=null;function Z1(e=[],t){return yt.create({name:t,providers:[{provide:Sd,useValue:"platform"},{provide:_g,useValue:new Set([()=>Ju=null])},...e]})}function X1(e=[]){if(Ju)return Ju;let t=Z1(e);return Ju=t,o1(),J1(t),t}function J1(e){let t=e.get(qg,null);Hb(e,()=>{t?.forEach(r=>r())})}var Vr=(()=>{class e{static __NG_ELEMENT_ID__=Q1}return e})();function Q1(e){return ek(pr(),Ge(),(e&16)===16)}function ek(e,t,r){if(la(e)&&!r){let n=Kr(e.index,t);return new Ko(n,n)}else if(e.type&175){let n=t[Mr];return new Ko(n,t)}return null}var Eg=class{constructor(){}supports(e){return e instanceof Map||VS(e)}create(){return new wg}},wg=class{_records=new Map;_mapHead=null;_appendAfter=null;_previousMapHead=null;_changesHead=null;_changesTail=null;_additionsHead=null;_additionsTail=null;_removalsHead=null;_removalsTail=null;get isDirty(){return this._additionsHead!==null||this._changesHead!==null||this._removalsHead!==null}forEachItem(e){let t;for(t=this._mapHead;t!==null;t=t._next)e(t)}forEachPreviousItem(e){let t;for(t=this._previousMapHead;t!==null;t=t._nextPrevious)e(t)}forEachChangedItem(e){let t;for(t=this._changesHead;t!==null;t=t._nextChanged)e(t)}forEachAddedItem(e){let t;for(t=this._additionsHead;t!==null;t=t._nextAdded)e(t)}forEachRemovedItem(e){let t;for(t=this._removalsHead;t!==null;t=t._nextRemoved)e(t)}diff(e){if(!e)e=new Map;else if(!(e instanceof Map||VS(e)))throw new Oe(900,!1);return this.check(e)?this:null}onDestroy(){}check(e){this._reset();let t=this._mapHead;if(this._appendAfter=null,this._forEach(e,(r,n)=>{if(t&&t.key===n)this._maybeAddToChanges(t,r),this._appendAfter=t,t=t._next;else{let i=this._getOrCreateRecordForKey(n,r);t=this._insertBeforeOrAppend(t,i)}}),t){t._prev&&(t._prev._next=null),this._removalsHead=t;for(let r=t;r!==null;r=r._nextRemoved)r===this._mapHead&&(this._mapHead=null),this._records.delete(r.key),r._nextRemoved=r._next,r.previousValue=r.currentValue,r.currentValue=null,r._prev=null,r._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,t){if(e){let r=e._prev;return t._next=e,t._prev=r,e._prev=t,r&&(r._next=t),e===this._mapHead&&(this._mapHead=t),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}_getOrCreateRecordForKey(e,t){if(this._records.has(e)){let n=this._records.get(e);this._maybeAddToChanges(n,t);let i=n._prev,s=n._next;return i&&(i._next=s),s&&(s._prev=i),n._next=null,n._prev=null,n}let r=new bg(e);return this._records.set(e,r),r.currentValue=t,this._addToAdditions(r),r}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;e!==null;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;e!==null;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;e!=null;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,t){Object.is(t,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=t,this._addToChanges(e))}_addToAdditions(e){this._additionsHead===null?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){this._changesHead===null?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,t){e instanceof Map?e.forEach(t):Object.keys(e).forEach(r=>t(e[r],r))}},bg=class{key;previousValue=null;currentValue=null;_nextPrevious=null;_next=null;_prev=null;_nextAdded=null;_nextRemoved=null;_nextChanged=null;constructor(e){this.key=e}};function Eb(){return new gv([new Eg])}var gv=(()=>{class e{static \u0275prov=oe({token:e,providedIn:"root",factory:Eb});factories;constructor(r){this.factories=r}static create(r,n){if(n){let i=n.factories.slice();r=r.concat(i)}return new e(r)}static extend(r){return{provide:e,useFactory:n=>e.create(r,n||Eb()),deps:[[e,new $N,new Tg]]}}find(r){let n=this.factories.find(i=>i.supports(r));if(n)return n;throw new Oe(901,!1)}}return e})();function e0(e){vt(8);try{let{rootComponent:t,appProviders:r,platformProviders:n}=e,i=X1(n),s=[j1({}),{provide:Ni,useExisting:JS},...r||[]],o=new vd({providers:s,parent:i,debugName:"",runEnvironmentInitializers:!1});return q1({r3Injector:o.injector,platformInjector:i,rootComponent:t})}catch(t){return Promise.reject(t)}finally{vt(9)}}function ga(e){return typeof e=="boolean"?e:e!=null&&e!=="false"}function vv(e,t=NaN){return!isNaN(parseFloat(e))&&!isNaN(Number(e))?Number(e):t}function yv(e){let t=$e(null);try{return e()}finally{$e(t)}}var wb=class{[Ii];constructor(e){this[Ii]=e}destroy(){this[Ii].destroy()}};function Ud(e,t){let r=$o(e),n=t.elementInjector||Dd();return new Zc(r).create(n,t.projectableNodes,t.hostElement,t.environmentInjector)}var tk={schedule(e,t){let r=setTimeout(e,t);return()=>clearTimeout(r)}};function nk(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function rk(e){return!!e&&e.nodeType===Node.ELEMENT_NODE}var _v;function ik(e,t){if(!_v){let r=Element.prototype;_v=r.matches||r.matchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector}return e.nodeType===Node.ELEMENT_NODE?_v.call(e,t):!1}function ok(e){let t={};return e.forEach(({propName:r,templateName:n,transform:i})=>{t[nk(n)]=[r,i]}),t}function sk(e,t){return t.get(ao).resolveComponentFactory(e).inputs}function ak(e,t){let r=e.childNodes,n=t.map(()=>[]),i=-1;t.some((s,o)=>s==="*"?(i=o,!0):!1);for(let s=0,o=r.length;s<o;++s){let a=r[s],l=ck(a,t,i);l!==-1&&n[l].push(a)}return n}function ck(e,t,r){let n=r;return rk(e)&&t.some((i,s)=>i!=="*"&&ik(e,i)?(n=s,!0):!1),n}var lk=10,Ev=class{componentFactory;inputMap=new Map;constructor(e,t){this.componentFactory=t.get(ao).resolveComponentFactory(e);for(let r of this.componentFactory.inputs)this.inputMap.set(r.propName,r.templateName)}create(e){return new wv(this.componentFactory,e,this.inputMap)}},wv=class{componentFactory;injector;inputMap;eventEmitters=new Po(1);events=this.eventEmitters.pipe(Ks(e=>no(...e)));componentRef=null;scheduledDestroyFn=null;initialInputValues=new Map;ngZone;elementZone;appRef;cdScheduler;constructor(e,t,r){this.componentFactory=e,this.injector=t,this.inputMap=r,this.ngZone=this.injector.get(Ve),this.appRef=this.injector.get(fr),this.cdScheduler=t.get(Ni),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=tk.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},lk))})}getInputValue(e){return this.runInZone(()=>this.componentRef===null?this.initialInputValues.get(e):this.componentRef.instance[e])}setInputValue(e,t){if(this.componentRef===null){this.initialInputValues.set(e,t);return}this.runInZone(()=>{this.componentRef.setInput(this.inputMap.get(e)??e,t),this.componentRef.hostView.dirty&&(this.componentRef.changeDetectorRef.markForRefresh(),this.cdScheduler.notify(6))})}initializeComponent(e){let t=yt.create({providers:[],parent:this.injector}),r=ak(e,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(t,r,e),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.appRef.attachView(this.componentRef.hostView),this.componentRef.hostView.detectChanges()}initializeInputs(){for(let[e,t]of this.initialInputValues)this.setInputValue(e,t);this.initialInputValues.clear()}initializeOutputs(e){let t=this.componentFactory.outputs.map(({propName:r,templateName:n})=>{let i=e.instance[r];return new ot(s=>{let o=i.subscribe(a=>s.next({name:n,value:a}));return()=>o.unsubscribe()})});this.eventEmitters.next(t)}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}},bv=class extends HTMLElement{ngElementEventsSubscription=null};function t0(e,t){let r=sk(e,t.injector),n=t.strategyFactory||new Ev(e,t.injector),i=ok(r);class s extends bv{injector;static observedAttributes=Object.keys(i);get ngElementStrategy(){if(!this._ngElementStrategy){let a=this._ngElementStrategy=n.create(this.injector||t.injector);r.forEach(({propName:l,transform:c})=>{if(!this.hasOwnProperty(l))return;let h=this[l];delete this[l],a.setInputValue(l,h,c)})}return this._ngElementStrategy}_ngElementStrategy;constructor(a){super(),this.injector=a}attributeChangedCallback(a,l,c,h){let[d,f]=i[a];this.ngElementStrategy.setInputValue(d,c,f)}connectedCallback(){let a=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),a=!0),this.ngElementStrategy.connect(this),a||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(a=>{let l=new CustomEvent(a.name,{detail:a.value});this.dispatchEvent(l)})}}return r.forEach(({propName:o,transform:a})=>{Object.defineProperty(s.prototype,o,{get(){return this.ngElementStrategy.getInputValue(o)},set(l){this.ngElementStrategy.setInputValue(o,l,a)},configurable:!0,enumerable:!0})}),s}var o0=null;function va(){return o0}function s0(e){o0??=e}var Hd=class{},nt=new he(""),a0=(()=>{class e{historyGo(r){throw new Error("")}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:()=>O(dk),providedIn:"platform"})}return e})(),dk=(()=>{class e extends a0{_location;_history;_doc=O(nt);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return va().getBaseHref(this._doc)}onPopState(r){let n=va().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",r,!1),()=>n.removeEventListener("popstate",r)}onHashChange(r){let n=va().getGlobalEventTarget(this._doc,"window");return n.addEventListener("hashchange",r,!1),()=>n.removeEventListener("hashchange",r)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(r){this._location.pathname=r}pushState(r,n,i){this._history.pushState(r,n,i)}replaceState(r,n,i){this._history.replaceState(r,n,i)}forward(){this._history.forward()}back(){this._history.back()}historyGo(r=0){this._history.go(r)}getState(){return this._history.state}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:()=>new e,providedIn:"platform"})}return e})();function c0(e,t){return e?t?e.endsWith("/")?t.startsWith("/")?e+t.slice(1):e+t:t.startsWith("/")?e+t:`${e}/${t}`:e:t}function n0(e){let t=e.search(/#|\?|$/);return e[t-1]==="/"?e.slice(0,t-1)+e.slice(t):e}function rs(e){return e&&e[0]!=="?"?`?${e}`:e}var Sv=(()=>{class e{historyGo(r){throw new Error("")}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:()=>O(pk),providedIn:"root"})}return e})(),fk=new he(""),pk=(()=>{class e extends Sv{_platformLocation;_baseHref;_removeListenerFns=[];constructor(r,n){super(),this._platformLocation=r,this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??O(nt).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(r){this._removeListenerFns.push(this._platformLocation.onPopState(r),this._platformLocation.onHashChange(r))}getBaseHref(){return this._baseHref}prepareExternalUrl(r){return c0(this._baseHref,r)}path(r=!1){let n=this._platformLocation.pathname+rs(this._platformLocation.search),i=this._platformLocation.hash;return i&&r?`${n}${i}`:n}pushState(r,n,i,s){let o=this.prepareExternalUrl(i+rs(s));this._platformLocation.pushState(r,n,o)}replaceState(r,n,i,s){let o=this.prepareExternalUrl(i+rs(s));this._platformLocation.replaceState(r,n,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(r=0){this._platformLocation.historyGo?.(r)}static \u0275fac=function(r){return new(r||e)(et(a0),et(fk,8))};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Dv=(()=>{class e{_subject=new ie;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(r){this._locationStrategy=r;let n=this._locationStrategy.getBaseHref();this._basePath=gk(n0(r0(n))),this._locationStrategy.onPopState(i=>{this._subject.next({url:this.path(!0),pop:!0,state:i.state,type:i.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(r=!1){return this.normalize(this._locationStrategy.path(r))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(r,n=""){return this.path()==this.normalize(r+rs(n))}normalize(r){return e.stripTrailingSlash(mk(this._basePath,r0(r)))}prepareExternalUrl(r){return r&&r[0]!=="/"&&(r="/"+r),this._locationStrategy.prepareExternalUrl(r)}go(r,n="",i=null){this._locationStrategy.pushState(i,"",r,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(r+rs(n)),i)}replaceState(r,n="",i=null){this._locationStrategy.replaceState(i,"",r,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(r+rs(n)),i)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(r=0){this._locationStrategy.historyGo?.(r)}onUrlChange(r){return this._urlChangeListeners.push(r),this._urlChangeSubscription??=this.subscribe(n=>{this._notifyUrlChangeListeners(n.url,n.state)}),()=>{let n=this._urlChangeListeners.indexOf(r);this._urlChangeListeners.splice(n,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(r="",n){this._urlChangeListeners.forEach(i=>i(r,n))}subscribe(r,n,i){return this._subject.subscribe({next:r,error:n??void 0,complete:i??void 0})}static normalizeQueryParams=rs;static joinWithSlash=c0;static stripTrailingSlash=n0;static \u0275fac=function(r){return new(r||e)(et(Sv))};static \u0275prov=oe({token:e,factory:()=>hk(),providedIn:"root"})}return e})();function hk(){return new Dv(et(Sv))}function mk(e,t){if(!e||!t.startsWith(e))return t;let r=t.substring(e.length);return r===""||["/",";","?","#"].includes(r[0])?r:t}function r0(e){return e.replace(/\/index.html$/,"")}function gk(e){if(new RegExp("^(https?:)?//").test(e)){let[,t]=e.split(/\/\/[^\/]+/);return t}return e}function l0(e,t){t=encodeURIComponent(t);for(let r of e.split(";")){let n=r.indexOf("="),[i,s]=n==-1?[r,""]:[r.slice(0,n),r.slice(n+1)];if(i.trim()===t)return decodeURIComponent(s)}return null}var Cv=/\s+/,i0=[],$d=(()=>{class e{_ngEl;_renderer;initialClasses=i0;rawClass;stateMap=new Map;constructor(r,n){this._ngEl=r,this._renderer=n}set klass(r){this.initialClasses=r!=null?r.trim().split(Cv):i0}set ngClass(r){this.rawClass=typeof r=="string"?r.trim().split(Cv):r}ngDoCheck(){for(let n of this.initialClasses)this._updateState(n,!0);let r=this.rawClass;if(Array.isArray(r)||r instanceof Set)for(let n of r)this._updateState(n,!0);else if(r!=null)for(let n of Object.keys(r))this._updateState(n,!!r[n]);this._applyStateDiff()}_updateState(r,n){let i=this.stateMap.get(r);i!==void 0?(i.enabled!==n&&(i.changed=!0,i.enabled=n),i.touched=!0):this.stateMap.set(r,{enabled:n,changed:!0,touched:!0})}_applyStateDiff(){for(let r of this.stateMap){let n=r[0],i=r[1];i.changed?(this._toggleClass(n,i.enabled),i.changed=!1):i.touched||(i.enabled&&this._toggleClass(n,!1),this.stateMap.delete(n)),i.touched=!1}}_toggleClass(r,n){r=r.trim(),r.length>0&&r.split(Cv).forEach(i=>{n?this._renderer.addClass(this._ngEl.nativeElement,i):this._renderer.removeClass(this._ngEl.nativeElement,i)})}static \u0275fac=function(r){return new(r||e)(bt(Nt),bt(Jo))};static \u0275dir=kr({type:e,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return e})(),u0=(()=>{class e{_ngEl;_differs;_renderer;_ngStyle=null;_differ=null;constructor(r,n,i){this._ngEl=r,this._differs=n,this._renderer=i}set ngStyle(r){this._ngStyle=r,!this._differ&&r&&(this._differ=this._differs.find(r).create())}ngDoCheck(){if(this._differ){let r=this._differ.diff(this._ngStyle);r&&this._applyChanges(r)}}_setStyle(r,n){let[i,s]=r.split("."),o=i.indexOf("-")===-1?void 0:Xr.DashCase;n!=null?this._renderer.setStyle(this._ngEl.nativeElement,i,s?`${n}${s}`:n,o):this._renderer.removeStyle(this._ngEl.nativeElement,i,o)}_applyChanges(r){r.forEachRemovedItem(n=>this._setStyle(n.key,null)),r.forEachAddedItem(n=>this._setStyle(n.key,n.currentValue)),r.forEachChangedItem(n=>this._setStyle(n.key,n.currentValue))}static \u0275fac=function(r){return new(r||e)(bt(Nt),bt(gv),bt(Jo))};static \u0275dir=kr({type:e,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}})}return e})(),Iv="browser",vk="server";function d0(e){return e===Iv}function Tv(e){return e===vk}var jd=class{},Rv=class extends Hd{supportsDOMEvents=!0},Nv=class j0 extends Rv{static makeCurrent(){s0(new j0)}onAndCancel(t,r,n,i){return t.addEventListener(r,n,i),()=>{t.removeEventListener(r,n,i)}}dispatchEvent(t,r){t.dispatchEvent(r)}remove(t){t.remove()}createElement(t,r){return r=r||this.getDefaultDocument(),r.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,r){return r==="window"?window:r==="document"?t:r==="body"?t.body:null}getBaseHref(t){let r=yk();return r==null?null:_k(r)}resetBaseElement(){al=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return l0(document.cookie,t)}},al=null;function yk(){return al=al||document.querySelector("base"),al?al.getAttribute("href"):null}function _k(e){return new URL(e,document.baseURI).pathname}var Ek=(()=>{class e{build(){return new XMLHttpRequest}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})(),Av=new he(""),v0=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;constructor(r,n){this._zone=n,r.forEach(i=>{i.manager=this}),this._plugins=r.slice().reverse()}addEventListener(r,n,i,s){return this._findPluginFor(n).addEventListener(r,n,i,s)}getZone(){return this._zone}_findPluginFor(r){let n=this._eventNameToPlugin.get(r);if(n)return n;if(n=this._plugins.find(i=>i.supports(r)),!n)throw new Oe(5101,!1);return this._eventNameToPlugin.set(r,n),n}static \u0275fac=function(r){return new(r||e)(et(Av),et(Ve))};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})(),Gd=class{_doc;constructor(e){this._doc=e}manager},Wd="ng-app-id";function f0(e){for(let t of e)t.remove()}function p0(e,t){let r=t.createElement("style");return r.textContent=e,r}function wk(e,t,r,n){let i=e.head?.querySelectorAll(`style[${Wd}="${t}"],link[${Wd}="${t}"]`);if(i)for(let s of i)s.removeAttribute(Wd),s instanceof HTMLLinkElement?n.set(s.href.slice(s.href.lastIndexOf("/")+1),{usage:0,elements:[s]}):s.textContent&&r.set(s.textContent,{usage:0,elements:[s]})}function Mv(e,t){let r=t.createElement("link");return r.setAttribute("rel","stylesheet"),r.setAttribute("href",e),r}var y0=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(r,n,i,s={}){this.doc=r,this.appId=n,this.nonce=i,this.isServer=Tv(s),wk(r,n,this.inline,this.external),this.hosts.add(r.head)}addStyles(r,n){for(let i of r)this.addUsage(i,this.inline,p0);n?.forEach(i=>this.addUsage(i,this.external,Mv))}removeStyles(r,n){for(let i of r)this.removeUsage(i,this.inline);n?.forEach(i=>this.removeUsage(i,this.external))}addUsage(r,n,i){let s=n.get(r);s?s.usage++:n.set(r,{usage:1,elements:[...this.hosts].map(o=>this.addElement(o,i(r,this.doc)))})}removeUsage(r,n){let i=n.get(r);i&&(i.usage--,i.usage<=0&&(f0(i.elements),n.delete(r)))}ngOnDestroy(){for(let[,{elements:r}]of[...this.inline,...this.external])f0(r);this.hosts.clear()}addHost(r){this.hosts.add(r);for(let[n,{elements:i}]of this.inline)i.push(this.addElement(r,p0(n,this.doc)));for(let[n,{elements:i}]of this.external)i.push(this.addElement(r,Mv(n,this.doc)))}removeHost(r){this.hosts.delete(r)}addElement(r,n){return this.nonce&&n.setAttribute("nonce",this.nonce),this.isServer&&n.setAttribute(Wd,this.appId),r.appendChild(n)}static \u0275fac=function(r){return new(r||e)(et(nt),et(il),et(Yg,8),et(Xo))};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})(),xv={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},Pv=/%COMP%/g,_0="%COMP%",bk=`_nghost-${_0}`,Ck=`_ngcontent-${_0}`,Sk=!0,Dk=new he("",{providedIn:"root",factory:()=>Sk});function Ik(e){return Ck.replace(Pv,e)}function Tk(e){return bk.replace(Pv,e)}function E0(e,t){return t.map(r=>r.replace(Pv,e))}var h0=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(r,n,i,s,o,a,l,c=null,h=null){this.eventManager=r,this.sharedStylesHost=n,this.appId=i,this.removeStylesOnCompDestroy=s,this.doc=o,this.platformId=a,this.ngZone=l,this.nonce=c,this.tracingService=h,this.platformIsServer=Tv(a),this.defaultRenderer=new cl(r,o,l,this.platformIsServer,this.tracingService)}createRenderer(r,n){if(!r||!n)return this.defaultRenderer;this.platformIsServer&&n.encapsulation===Zr.ShadowDom&&(n=re(w({},n),{encapsulation:Zr.Emulated}));let i=this.getOrCreateRenderer(r,n);return i instanceof zd?i.applyToHost(r):i instanceof ll&&i.applyStyles(),i}getOrCreateRenderer(r,n){let i=this.rendererByCompId,s=i.get(n.id);if(!s){let o=this.doc,a=this.ngZone,l=this.eventManager,c=this.sharedStylesHost,h=this.removeStylesOnCompDestroy,d=this.platformIsServer,f=this.tracingService;switch(n.encapsulation){case Zr.Emulated:s=new zd(l,c,n,this.appId,h,o,a,d,f);break;case Zr.ShadowDom:return new Ov(l,c,r,n,o,a,this.nonce,d,f);default:s=new ll(l,c,n,h,o,a,d,f);break}i.set(n.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(r){this.rendererByCompId.delete(r)}static \u0275fac=function(r){return new(r||e)(et(v0),et(y0),et(il),et(Dk),et(nt),et(Xo),et(Ve),et(Yg),et(pa,8))};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})(),cl=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,r,n,i){this.eventManager=e,this.doc=t,this.ngZone=r,this.platformIsServer=n,this.tracingService=i}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(xv[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(m0(e)?e.content:e).appendChild(t)}insertBefore(e,t,r){e&&(m0(e)?e.content:e).insertBefore(t,r)}removeChild(e,t){t.remove()}selectRootElement(e,t){let r=typeof e=="string"?this.doc.querySelector(e):e;if(!r)throw new Oe(-5104,!1);return t||(r.textContent=""),r}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,r,n){if(n){t=n+":"+t;let i=xv[n];i?e.setAttributeNS(i,t,r):e.setAttribute(t,r)}else e.setAttribute(t,r)}removeAttribute(e,t,r){if(r){let n=xv[r];n?e.removeAttributeNS(n,t):e.removeAttribute(`${r}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,r,n){n&(Xr.DashCase|Xr.Important)?e.style.setProperty(t,r,n&Xr.Important?"important":""):e.style[t]=r}removeStyle(e,t,r){r&Xr.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,r){e!=null&&(e[t]=r)}setValue(e,t){e.nodeValue=t}listen(e,t,r,n){if(typeof e=="string"&&(e=va().getGlobalEventTarget(this.doc,e),!e))throw new Error(`Unsupported event target ${e} for event ${t}`);let i=this.decoratePreventDefault(r);return this.tracingService!==null&&this.tracingService.wrapEventListener&&(i=this.tracingService.wrapEventListener(e,t,i)),this.eventManager.addEventListener(e,t,i,n)}decoratePreventDefault(e){return t=>{if(t==="__ngUnwrap__")return e;(this.platformIsServer?this.ngZone.runGuarded(()=>e(t)):e(t))===!1&&t.preventDefault()}}};function m0(e){return e.tagName==="TEMPLATE"&&e.content!==void 0}var Ov=class extends cl{sharedStylesHost;hostEl;shadowRoot;constructor(e,t,r,n,i,s,o,a,l){super(e,i,s,a,l),this.sharedStylesHost=t,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let c=n.styles;c=E0(n.id,c);for(let d of c){let f=document.createElement("style");o&&f.setAttribute("nonce",o),f.textContent=d,this.shadowRoot.appendChild(f)}let h=n.getExternalStyles?.();if(h)for(let d of h){let f=Mv(d,i);o&&f.setAttribute("nonce",o),this.shadowRoot.appendChild(f)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,r){return super.insertBefore(this.nodeOrShadowRoot(e),t,r)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},ll=class extends cl{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,r,n,i,s,o,a,l){super(e,i,s,o,a),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=n;let c=r.styles;this.styles=l?E0(l,c):c,this.styleUrls=r.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},zd=class extends ll{contentAttr;hostAttr;constructor(e,t,r,n,i,s,o,a,l){let c=n+"-"+r.id;super(e,t,r,i,s,o,a,l,c),this.contentAttr=Ik(c),this.hostAttr=Tk(c)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,t){let r=super.createElement(e,t);return super.setAttribute(r,this.contentAttr,""),r}},xk=(()=>{class e extends Gd{constructor(r){super(r)}supports(r){return!0}addEventListener(r,n,i,s){return r.addEventListener(n,i,s),()=>this.removeEventListener(r,n,i,s)}removeEventListener(r,n,i,s){return r.removeEventListener(n,i,s)}static \u0275fac=function(r){return new(r||e)(et(nt))};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})(),g0=["alt","control","meta","shift"],Rk={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Nk={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},Ak=(()=>{class e extends Gd{constructor(r){super(r)}supports(r){return e.parseEventName(r)!=null}addEventListener(r,n,i,s){let o=e.parseEventName(n),a=e.eventCallback(o.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>va().onAndCancel(r,o.domEventName,a,s))}static parseEventName(r){let n=r.toLowerCase().split("."),i=n.shift();if(n.length===0||!(i==="keydown"||i==="keyup"))return null;let s=e._normalizeKey(n.pop()),o="",a=n.indexOf("code");if(a>-1&&(n.splice(a,1),o="code."),g0.forEach(c=>{let h=n.indexOf(c);h>-1&&(n.splice(h,1),o+=c+".")}),o+=s,n.length!=0||s.length===0)return null;let l={};return l.domEventName=i,l.fullKey=o,l}static matchEventFullKeyCode(r,n){let i=Rk[r.key]||r.key,s="";return n.indexOf("code.")>-1&&(i=r.code,s="code."),i==null||!i?!1:(i=i.toLowerCase(),i===" "?i="space":i==="."&&(i="dot"),g0.forEach(o=>{if(o!==i){let a=Nk[o];a(r)&&(s+=o+".")}}),s+=i,s===n)}static eventCallback(r,n,i){return s=>{e.matchEventFullKeyCode(s,r)&&i.runGuarded(()=>n(s))}}static _normalizeKey(r){return r==="esc"?"escape":r}static \u0275fac=function(r){return new(r||e)(et(nt))};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})();function w0(e){return e0(Mk(e))}function Mk(e){return{appProviders:[...Fk,...e?.providers??[]],platformProviders:Lk}}function Ok(){Nv.makeCurrent()}function Pk(){return new Ai}function kk(){return kC(document),document}var Lk=[{provide:Xo,useValue:Iv},{provide:qg,useValue:Ok,multi:!0},{provide:nt,useFactory:kk,deps:[]}],Fk=[{provide:Sd,useValue:"root"},{provide:Ai,useFactory:Pk,deps:[]},{provide:Av,useClass:xk,multi:!0,deps:[nt]},{provide:Av,useClass:Ak,multi:!0,deps:[nt]},h0,y0,v0,{provide:un,useExisting:h0},{provide:jd,useClass:Ek,deps:[]},[]],kv=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:function(r){let n=null;return r?n=new(r||e):n=et(Bk),n},providedIn:"root"})}return e})(),Bk=(()=>{class e extends kv{_doc;constructor(r){super(),this._doc=r}sanitize(r,n){if(n==null)return null;switch(r){case ti.NONE:return n;case ti.HTML:return uo(n,"HTML")?ei(n):Xg(this._doc,String(n)).toString();case ti.STYLE:return uo(n,"Style")?ei(n):n;case ti.SCRIPT:if(uo(n,"Script"))return ei(n);throw new Oe(5200,!1);case ti.URL:return uo(n,"URL")?ei(n):Md(String(n));case ti.RESOURCE_URL:if(uo(n,"ResourceURL"))return ei(n);throw new Oe(5201,!1);default:throw new Oe(5202,!1)}}bypassSecurityTrustHtml(r){return GC(r)}bypassSecurityTrustStyle(r){return zC(r)}bypassSecurityTrustScript(r){return qC(r)}bypassSecurityTrustUrl(r){return YC(r)}bypassSecurityTrustResourceUrl(r){return KC(r)}static \u0275fac=function(r){return new(r||e)(et(nt))};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),b0="9.6.0",k=class Bh{static SDK_VERSION=b0;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_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 CTA_EVENT="letscooee:outbound:cta";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 t=Bh.SDK_VERSION.split(".").map(r=>r.padStart(2,"0")).join("");Bh.SDK_VERSION_CODE=parseInt(t,10)}},Rn={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${k.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${k.SDK_VERSION}/dist/widget.min.js`},er=Be(ss()),C=class{static log(...e){er.default.info(...e)}static debug(...e){er.default.debug(...e)}static error(...e){er.default.error(...e)}static warn(...e){er.default.warn(...e)}static info(...e){er.default.info(...e)}static trace(...e){er.default.trace(...e)}static configure(e=k.LOG_PREFIX){er.default.useDefaults({formatter:function(r){r.unshift(`${e} (v${k.SDK_VERSION}):`)}});let t=this.getDebugParam();(t==="1"||t==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?er.default.setLevel(er.default[localStorage.cooeeLogLevel]):er.default.setLevel(Rn.debug?er.default.TRACE:er.default.OFF)}static getDebugParam(){return new URL(location.href).searchParams?.get("cooee-debug")}static logBrand(){let e=`
7
+ `)}`}var Tg=Nb(Cb("Optional"),8),$N=Nb(Cb("SkipSelf"),4);function Ho(e,t){return e.hasOwnProperty(Qu)?e[Qu]:null}function WN(e,t,r){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let i=e[n],s=t[n];if(r&&(i=r(i),s=r(s)),s!==i)return!1}return!0}function GN(e){return e.flat(Number.POSITIVE_INFINITY)}function xg(e,t){e.forEach(r=>Array.isArray(r)?xg(r,t):t(r))}function Ab(e,t,r){t>=e.length?e.push(r):e.splice(t,0,r)}function td(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function zN(e,t,r,n){let i=e.length;if(i==t)e.push(r,n);else if(i===1)e.push(n,e[0]),e[0]=r;else{for(i--,e.push(e[i-1],e[i]);i>t;){let s=i-2;e[i]=e[s],i--}e[t]=r,e[t+1]=n}}function qN(e,t,r){let n=Qc(e,t);return n>=0?e[n|1]=r:(n=~n,zN(e,n,t,r)),n}function im(e,t){let r=Qc(e,t);if(r>=0)return e[r|1]}function Qc(e,t){return YN(e,t,1)}function YN(e,t,r){let n=0,i=e.length>>r;for(;i!==n;){let s=n+(i-n>>1),o=e[s<<r];if(t===o)return s<<r;o>t?i=s:n=s+1}return~(i<<r)}var jo={},so=[],Uc=new he(""),Mb=new he("",-1),Ob=new he(""),nd=class{get(e,t=Vc){if(t===Vc){let r=new Error(`NullInjectorError: No provider for ${dr(e)}!`);throw r.name="NullInjectorError",r}return t}};function $o(e){return e[RN]||null}function Pb(e){return e[NN]||null}function kb(e){return e[AN]||null}function KN(e){let t=$o(e)||Pb(e)||kb(e);return t!==null&&t.standalone}function Lb(e){return{\u0275providers:e}}function ZN(...e){return{\u0275providers:Fb(!0,e),\u0275fromNgModule:!0}}function Fb(e,...t){let r=[],n=new Set,i,s=o=>{r.push(o)};return xg(t,o=>{let a=o;wm(a,s,[],n)&&(i||=[],i.push(a))}),i!==void 0&&Bb(i,s),r}function Bb(e,t){for(let r=0;r<e.length;r++){let{ngModule:n,providers:i}=e[r];Rg(i,s=>{t(s,n)})}}function wm(e,t,r,n){if(e=Pn(e),!e)return!1;let i=null,s=kw(e),o=!s&&$o(e);if(!s&&!o){let l=e.ngModule;if(s=kw(l),s)i=l;else return!1}else{if(o&&!o.standalone)return!1;i=e}let a=n.has(i);if(o){if(a)return!1;if(n.add(i),o.dependencies){let l=typeof o.dependencies=="function"?o.dependencies():o.dependencies;for(let c of l)wm(c,t,r,n)}}else if(s){if(s.imports!=null&&!a){n.add(i);let c;try{xg(s.imports,h=>{wm(h,t,r,n)&&(c||=[],c.push(h))})}finally{}c!==void 0&&Bb(c,t)}if(!a){let c=Ho(i)||(()=>new i);t({provide:i,useFactory:c,deps:so},i),t({provide:Ob,useValue:i,multi:!0},i),t({provide:Uc,useValue:()=>et(i),multi:!0},i)}let l=s.providers;if(l!=null&&!a){let c=e;Rg(l,h=>{t(h,c)})}}else return!1;return i!==e&&e.providers!==void 0}function Rg(e,t){for(let r of e)Tb(r)&&(r=r.\u0275providers),Array.isArray(r)?Rg(r,t):t(r)}var XN=Rt({provide:String,useValue:Rt});function Vb(e){return e!==null&&typeof e=="object"&&XN in e}function JN(e){return!!(e&&e.useExisting)}function QN(e){return!!(e&&e.useFactory)}function ra(e){return typeof e=="function"}function eA(e){return!!e.useClass}var Sd=new he(""),qu={},tA={},om;function Dd(){return om===void 0&&(om=new nd),om}var Gn=class{},Hc=class extends Gn{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,t,r,n){super(),this.parent=t,this.source=r,this.scopes=n,Cm(e,s=>this.processProvider(s)),this.records.set(Mb,Zs(void 0,this)),n.has("environment")&&this.records.set(Gn,Zs(void 0,this));let i=this.records.get(Sd);i!=null&&typeof i.value=="string"&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Ob,so,Je.Self))}destroy(){kc(this),this._destroyed=!0;let e=$e(null);try{for(let r of this._ngOnDestroyHooks)r.ngOnDestroy();let t=this._onDestroyHooks;this._onDestroyHooks=[];for(let r of t)r()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),$e(e)}}onDestroy(e){return kc(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){kc(this);let t=ro(this),r=Wn(void 0),n;try{return e()}finally{ro(t),Wn(r)}}get(e,t=Vc,r=Je.Default){if(kc(this),e.hasOwnProperty(Fw))return e[Fw](this);r=Cd(r);let n,i=ro(this),s=Wn(void 0);try{if(!(r&Je.SkipSelf)){let a=this.records.get(e);if(a===void 0){let l=sA(e)&&Dg(e);l&&this.injectableDefInScope(l)?a=Zs(bm(e),qu):a=null,this.records.set(e,a)}if(a!=null)return this.hydrate(e,a)}let o=r&Je.Self?Dd():this.parent;return t=r&Je.Optional&&t===Vc?null:t,o.get(e,t)}catch(o){if(o.name==="NullInjectorError"){if((o[ed]=o[ed]||[]).unshift(dr(e)),i)throw o;return HN(o,e,"R3InjectorError",this.source)}else throw o}finally{Wn(s),ro(i)}}resolveInjectorInitializers(){let e=$e(null),t=ro(this),r=Wn(void 0),n;try{let i=this.get(Uc,so,Je.Self);for(let s of i)s()}finally{ro(t),Wn(r),$e(e)}}toString(){let e=[],t=this.records;for(let r of t.keys())e.push(dr(r));return`R3Injector[${e.join(", ")}]`}processProvider(e){e=Pn(e);let t=ra(e)?e:Pn(e&&e.provide),r=rA(e);if(!ra(e)&&e.multi===!0){let n=this.records.get(t);n||(n=Zs(void 0,qu,!0),n.factory=()=>Em(n.multi),this.records.set(t,n)),t=e,n.multi.push(e)}this.records.set(t,r)}hydrate(e,t){let r=$e(null);try{return t.value===qu&&(t.value=tA,t.value=t.factory()),typeof t.value=="object"&&t.value&&oA(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{$e(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=Pn(e.providedIn);return typeof t=="string"?t==="any"||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(e){let t=this._onDestroyHooks.indexOf(e);t!==-1&&this._onDestroyHooks.splice(t,1)}};function bm(e){let t=Dg(e),r=t!==null?t.factory:Ho(e);if(r!==null)return r;if(e instanceof he)throw new Oe(204,!1);if(e instanceof Function)return nA(e);throw new Oe(204,!1)}function nA(e){if(e.length>0)throw new Oe(204,!1);let t=TN(e);return t!==null?()=>t.factory(e):()=>new e}function rA(e){if(Vb(e))return Zs(void 0,e.useValue);{let t=Ub(e);return Zs(t,qu)}}function Ub(e,t,r){let n;if(ra(e)){let i=Pn(e);return Ho(i)||bm(i)}else if(Vb(e))n=()=>Pn(e.useValue);else if(QN(e))n=()=>e.useFactory(...Em(e.deps||[]));else if(JN(e))n=()=>et(Pn(e.useExisting));else{let i=Pn(e&&(e.useClass||e.provide));if(iA(e))n=()=>new i(...Em(e.deps));else return Ho(i)||bm(i)}return n}function kc(e){if(e.destroyed)throw new Oe(205,!1)}function Zs(e,t,r=!1){return{factory:e,value:t,multi:r?[]:void 0}}function iA(e){return!!e.deps}function oA(e){return e!==null&&typeof e=="object"&&typeof e.ngOnDestroy=="function"}function sA(e){return typeof e=="function"||typeof e=="object"&&e instanceof he}function Cm(e,t){for(let r of e)Array.isArray(r)?Cm(r,t):r&&Tb(r)?Cm(r.\u0275providers,t):t(r)}function Hb(e,t){e instanceof Hc&&kc(e);let r,n=ro(e),i=Wn(void 0);try{return t()}finally{ro(n),Wn(i)}}function jb(){return xb()!==void 0||BN()!=null}function $b(e){if(!jb())throw new Oe(-203,!1)}function aA(e){return typeof e=="function"}var ki=0,Te=1,we=2,xn=3,Ar=4,Pr=5,jc=6,rd=7,nn=8,$c=9,xi=10,ln=11,Wc=12,Vw=13,ca=14,Mr=15,Wo=16,Xs=17,Ri=18,Id=19,Wb=20,io=21,sm=22,id=23,Jn=24,ta=25,wn=26,Gb=1,Go=7,od=8,ia=9,Tn=10;function oo(e){return Array.isArray(e)&&typeof e[Gb]=="object"}function Li(e){return Array.isArray(e)&&e[Gb]===!0}function zb(e){return(e.flags&4)!==0}function la(e){return e.componentOffset>-1}function Ng(e){return(e.flags&1)===1}function qr(e){return!!e.template}function sd(e){return(e[we]&512)!==0}function el(e){return(e[we]&256)===256}var Sm=class{previousValue;currentValue;firstChange;constructor(e,t,r){this.previousValue=e,this.currentValue=t,this.firstChange=r}isFirstChange(){return this.firstChange}};function qb(e,t,r,n){t!==null?t.applyValueToInputSignal(t,n):e[r]=n}var ua=(()=>{let e=()=>Yb;return e.ngInherit=!0,e})();function Yb(e){return e.type.prototype.ngOnChanges&&(e.setInput=lA),cA}function cA(){let e=Zb(this),t=e?.current;if(t){let r=e.previous;if(r===jo)e.previous=t;else for(let n in t)r[n]=t[n];e.current=null,this.ngOnChanges(t)}}function lA(e,t,r,n,i){let s=this.declaredInputs[n],o=Zb(e)||uA(e,{previous:jo,current:null}),a=o.current||(o.current={}),l=o.previous,c=l[s];a[s]=new Sm(c&&c.currentValue,r,l===jo),qb(e,t,i,r)}var Kb="__ngSimpleChanges__";function Zb(e){return e[Kb]||null}function uA(e,t){return e[Kb]=t}var Uw=null,vt=function(e,t=null,r){Uw?.(e,t,r)},Xb="svg",dA="math";function Yr(e){for(;Array.isArray(e);)e=e[ki];return e}function Jb(e,t){return Yr(t[e])}function Jr(e,t){return Yr(t[e.index])}function Ag(e,t){return e.data[t]}function Mg(e,t){return e[t]}function Kr(e,t){let r=t[e];return oo(r)?r:r[ki]}function fA(e){return(e[we]&4)===4}function Og(e){return(e[we]&128)===128}function pA(e){return Li(e[xn])}function oa(e,t){return t==null?null:e[t]}function Qb(e){e[Xs]=0}function Pg(e){e[we]&1024||(e[we]|=1024,Og(e)&&tl(e))}function hA(e,t){for(;e>0;)t=t[ca],e--;return t}function Td(e){return!!(e[we]&9216||e[Jn]?.dirty)}function Dm(e){e[xi].changeDetectionScheduler?.notify(8),e[we]&64&&(e[we]|=1024),Td(e)&&tl(e)}function tl(e){e[xi].changeDetectionScheduler?.notify(0);let t=zo(e);for(;t!==null&&!(t[we]&8192||(t[we]|=8192,!Og(t)));)t=zo(t)}function eC(e,t){if(el(e))throw new Oe(911,!1);e[io]===null&&(e[io]=[]),e[io].push(t)}function mA(e,t){if(e[io]===null)return;let r=e[io].indexOf(t);r!==-1&&e[io].splice(r,1)}function zo(e){let t=e[xn];return Li(t)?t[xn]:t}function tC(e){return e[rd]??=[]}function nC(e){return e.cleanup??=[]}function gA(e,t,r,n){let i=tC(t);i.push(r),e.firstCreatePass&&nC(e).push(n,i.length-1)}var Re={lFrame:uC(null),bindingsEnabled:!0,skipHydrationRootTNode:null},Im=!1;function vA(){return Re.lFrame.elementDepthCount}function yA(){Re.lFrame.elementDepthCount++}function _A(){Re.lFrame.elementDepthCount--}function rC(){return Re.bindingsEnabled}function EA(){return Re.skipHydrationRootTNode!==null}function wA(e){return Re.skipHydrationRootTNode===e}function bA(){Re.skipHydrationRootTNode=null}function Ge(){return Re.lFrame.lView}function dn(){return Re.lFrame.tView}function ze(e){return Re.lFrame.contextLView=e,e[nn]}function qe(e){return Re.lFrame.contextLView=null,e}function pr(){let e=iC();for(;e!==null&&e.type===64;)e=e.parent;return e}function iC(){return Re.lFrame.currentTNode}function CA(){let e=Re.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function da(e,t){let r=Re.lFrame;r.currentTNode=e,r.isParent=t}function oC(){return Re.lFrame.isParent}function SA(){Re.lFrame.isParent=!1}function DA(){return Re.lFrame.contextLView}function sC(){return Im}function Hw(e){let t=Im;return Im=e,t}function kg(){let e=Re.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function IA(e){return Re.lFrame.bindingIndex=e}function nl(){return Re.lFrame.bindingIndex++}function TA(e){let t=Re.lFrame,r=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,r}function xA(){return Re.lFrame.inI18n}function RA(e,t){let r=Re.lFrame;r.bindingIndex=r.bindingRootIndex=e,Tm(t)}function NA(){return Re.lFrame.currentDirectiveIndex}function Tm(e){Re.lFrame.currentDirectiveIndex=e}function AA(e){let t=Re.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function aC(){return Re.lFrame.currentQueryIndex}function Lg(e){Re.lFrame.currentQueryIndex=e}function MA(e){let t=e[Te];return t.type===2?t.declTNode:t.type===1?e[Pr]:null}function cC(e,t,r){if(r&Je.SkipSelf){let i=t,s=e;for(;(i=i.parent,i===null&&!(r&Je.Host))&&(i=MA(s),!(i===null||(s=s[ca],i.type&10))););if(i===null)return!1;t=i,e=s}let n=Re.lFrame=lC();return n.currentTNode=t,n.lView=e,!0}function Fg(e){let t=lC(),r=e[Te];Re.lFrame=t,t.currentTNode=r.firstChild,t.lView=e,t.tView=r,t.contextLView=e,t.bindingIndex=r.bindingStartIndex,t.inI18n=!1}function lC(){let e=Re.lFrame,t=e===null?null:e.child;return t===null?uC(e):t}function uC(e){let t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return e!==null&&(e.child=t),t}function dC(){let e=Re.lFrame;return Re.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var fC=dC;function Bg(){let e=dC();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function OA(e){return(Re.lFrame.contextLView=hA(e,Re.lFrame.contextLView))[nn]}function co(){return Re.lFrame.selectedIndex}function qo(e){Re.lFrame.selectedIndex=e}function Vg(){let e=Re.lFrame;return Ag(e.tView,e.selectedIndex)}function zn(){Re.lFrame.currentNamespace=Xb}function Fi(){PA()}function PA(){Re.lFrame.currentNamespace=null}function kA(){return Re.lFrame.currentNamespace}var pC=!0;function Ug(){return pC}function Hg(e){pC=e}function LA(e,t,r){let{ngOnChanges:n,ngOnInit:i,ngDoCheck:s}=t.type.prototype;if(n){let o=Yb(t);(r.preOrderHooks??=[]).push(e,o),(r.preOrderCheckHooks??=[]).push(e,o)}i&&(r.preOrderHooks??=[]).push(0-e,i),s&&((r.preOrderHooks??=[]).push(e,s),(r.preOrderCheckHooks??=[]).push(e,s))}function hC(e,t){for(let r=t.directiveStart,n=t.directiveEnd;r<n;r++){let i=e.data[r].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:o,ngAfterViewInit:a,ngAfterViewChecked:l,ngOnDestroy:c}=i;s&&(e.contentHooks??=[]).push(-r,s),o&&((e.contentHooks??=[]).push(r,o),(e.contentCheckHooks??=[]).push(r,o)),a&&(e.viewHooks??=[]).push(-r,a),l&&((e.viewHooks??=[]).push(r,l),(e.viewCheckHooks??=[]).push(r,l)),c!=null&&(e.destroyHooks??=[]).push(r,c)}}function Yu(e,t,r){mC(e,t,3,r)}function Ku(e,t,r,n){(e[we]&3)===r&&mC(e,t,r,n)}function am(e,t){let r=e[we];(r&3)===t&&(r&=16383,r+=1,e[we]=r)}function mC(e,t,r,n){let i=n!==void 0?e[Xs]&65535:0,s=n??-1,o=t.length-1,a=0;for(let l=i;l<o;l++)if(typeof t[l+1]=="number"){if(a=t[l],n!=null&&a>=n)break}else t[l]<0&&(e[Xs]+=65536),(a<s||s==-1)&&(FA(e,r,t,l),e[Xs]=(e[Xs]&4294901760)+l+2),l++}function jw(e,t){vt(4,e,t);let r=$e(null);try{t.call(e)}finally{$e(r),vt(5,e,t)}}function FA(e,t,r,n){let i=r[n]<0,s=r[n+1],o=i?-r[n]:r[n],a=e[o];i?e[we]>>14<e[Xs]>>16&&(e[we]&3)===t&&(e[we]+=16384,jw(a,s)):jw(a,s)}var na=-1,Yo=class{factory;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,t,r){this.factory=e,this.canSeeViewProviders=t,this.injectImpl=r}};function BA(e){return e instanceof Yo}function VA(e){return(e.flags&8)!==0}function UA(e){return(e.flags&16)!==0}function HA(e,t,r){let n=0;for(;n<r.length;){let i=r[n];if(typeof i=="number"){if(i!==0)break;n++;let s=r[n++],o=r[n++],a=r[n++];e.setAttribute(t,o,a,s)}else{let s=i,o=r[++n];$A(s)?e.setProperty(t,s,o):e.setAttribute(t,s,o),n++}}return n}function jA(e){return e===3||e===4||e===6}function $A(e){return e.charCodeAt(0)===64}function Gc(e,t){if(!(t===null||t.length===0))if(e===null||e.length===0)e=t.slice();else{let r=-1;for(let n=0;n<t.length;n++){let i=t[n];typeof i=="number"?r=i:r===0||(r===-1||r===2?$w(e,r,i,null,t[++n]):$w(e,r,i,null,null))}}return e}function $w(e,t,r,n,i){let s=0,o=e.length;if(t===-1)o=-1;else for(;s<e.length;){let a=e[s++];if(typeof a=="number"){if(a===t){o=-1;break}else if(a>t){o=s-1;break}}}for(;s<e.length;){let a=e[s];if(typeof a=="number")break;if(a===r){if(n===null){i!==null&&(e[s+1]=i);return}else if(n===e[s+1]){e[s+2]=i;return}}s++,n!==null&&s++,i!==null&&s++}o!==-1&&(e.splice(o,0,t),s=o+1),e.splice(s++,0,r),n!==null&&e.splice(s++,0,n),i!==null&&e.splice(s++,0,i)}var cm={},xm=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,r){r=Cd(r);let n=this.injector.get(e,cm,r);return n!==cm||t===cm?n:this.parentInjector.get(e,t,r)}};function gC(e){return e!==na}function ad(e){return e&32767}function WA(e){return e>>16}function cd(e,t){let r=WA(e),n=t;for(;r>0;)n=n[ca],r--;return n}var Rm=!0;function ld(e){let t=Rm;return Rm=e,t}var GA=256,vC=GA-1,yC=5,zA=0,zr={};function qA(e,t,r){let n;typeof r=="string"?n=r.charCodeAt(0)||0:r.hasOwnProperty(Fc)&&(n=r[Fc]),n==null&&(n=r[Fc]=zA++);let i=n&vC,s=1<<i;t.data[e+(i>>yC)]|=s}function ud(e,t){let r=_C(e,t);if(r!==-1)return r;let n=t[Te];n.firstCreatePass&&(e.injectorIndex=t.length,lm(n.data,e),lm(t,null),lm(n.blueprint,null));let i=jg(e,t),s=e.injectorIndex;if(gC(i)){let o=ad(i),a=cd(i,t),l=a[Te].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=i,s}function lm(e,t){e.push(0,0,0,0,0,0,0,0,t)}function _C(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function jg(e,t){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let r=0,n=null,i=t;for(;i!==null;){if(n=SC(i),n===null)return na;if(r++,i=i[ca],n.injectorIndex!==-1)return n.injectorIndex|r<<16}return na}function Nm(e,t,r){qA(e,t,r)}function EC(e,t,r){if(r&Je.Optional||e!==void 0)return e;Ig(t,"NodeInjector")}function wC(e,t,r,n){if(r&Je.Optional&&n===void 0&&(n=null),(r&(Je.Self|Je.Host))===0){let i=e[$c],s=Wn(void 0);try{return i?i.get(t,n,r&Je.Optional):Rb(t,n,r&Je.Optional)}finally{Wn(s)}}return EC(n,t,r)}function bC(e,t,r,n=Je.Default,i){if(e!==null){if(t[we]&2048&&!(n&Je.Self)){let o=XA(e,t,r,n,zr);if(o!==zr)return o}let s=CC(e,t,r,n,zr);if(s!==zr)return s}return wC(t,r,n,i)}function CC(e,t,r,n,i){let s=KA(r);if(typeof s=="function"){if(!cC(t,e,n))return n&Je.Host?EC(i,r,n):wC(t,r,n,i);try{let o;if(o=s(n),o==null&&!(n&Je.Optional))Ig(r);else return o}finally{fC()}}else if(typeof s=="number"){let o=null,a=_C(e,t),l=na,c=n&Je.Host?t[Mr][Pr]:null;for((a===-1||n&Je.SkipSelf)&&(l=a===-1?jg(e,t):t[a+8],l===na||!Gw(n,!1)?a=-1:(o=t[Te],a=ad(l),t=cd(l,t)));a!==-1;){let h=t[Te];if(Ww(s,a,h.data)){let d=YA(a,t,r,o,n,c);if(d!==zr)return d}l=t[a+8],l!==na&&Gw(n,t[Te].data[a+8]===c)&&Ww(s,a,t)?(o=h,a=ad(l),t=cd(l,t)):a=-1}}return i}function YA(e,t,r,n,i,s){let o=t[Te],a=o.data[e+8],l=n==null?la(a)&&Rm:n!=o&&(a.type&3)!==0,c=i&Je.Host&&s===a,h=Zu(a,o,r,l,c);return h!==null?zc(t,o,h,a):zr}function Zu(e,t,r,n,i){let s=e.providerIndexes,o=t.data,a=s&1048575,l=e.directiveStart,c=e.directiveEnd,h=s>>20,d=n?a:a+h,f=i?a+h:c;for(let g=d;g<f;g++){let m=o[g];if(g<l&&r===m||g>=l&&m.type===r)return g}if(i){let g=o[l];if(g&&qr(g)&&g.type===r)return l}return null}function zc(e,t,r,n){let i=e[r],s=t.data;if(BA(i)){let o=i;o.resolving&&ON(MN(s[r]));let a=ld(o.canSeeViewProviders);o.resolving=!0;let l,c=o.injectImpl?Wn(o.injectImpl):null,h=cC(e,n,Je.Default);try{i=e[r]=o.factory(void 0,s,e,n),t.firstCreatePass&&r>=n.directiveStart&&LA(r,s[r],t)}finally{c!==null&&Wn(c),ld(a),o.resolving=!1,fC()}}return i}function KA(e){if(typeof e=="string")return e.charCodeAt(0)||0;let t=e.hasOwnProperty(Fc)?e[Fc]:void 0;return typeof t=="number"?t>=0?t&vC:ZA:t}function Ww(e,t,r){let n=1<<e;return!!(r[t+(e>>yC)]&n)}function Gw(e,t){return!(e&Je.Self)&&!(e&Je.Host&&t)}var Uo=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,r){return bC(this._tNode,this._lView,e,Cd(r),t)}};function ZA(){return new Uo(pr(),Ge())}function xd(e){return bd(()=>{let t=e.prototype.constructor,r=t[Qu]||Am(t),n=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==n;){let s=i[Qu]||Am(i);if(s&&s!==r)return s;i=Object.getPrototypeOf(i)}return s=>new s})}function Am(e){return Sb(e)?()=>{let t=Am(Pn(e));return t&&t()}:Ho(e)}function XA(e,t,r,n,i){let s=e,o=t;for(;s!==null&&o!==null&&o[we]&2048&&!sd(o);){let a=CC(s,o,r,n|Je.Self,zr);if(a!==zr)return a;let l=s.parent;if(!l){let c=o[Wb];if(c){let h=c.get(r,zr,n);if(h!==zr)return h}l=SC(o),o=o[ca]}s=l}return i}function SC(e){let t=e[Te],r=t.type;return r===2?t.declTNode:r===1?e[Pr]:null}function zw(e,t=null,r=null,n){let i=JA(e,t,r,n);return i.resolveInjectorInitializers(),i}function JA(e,t=null,r=null,n,i=new Set){let s=[r||so,ZN(e)];return n=n||(typeof e=="object"?void 0:dr(e)),new Hc(s,t||Dd(),n||null,i)}var yt=class M0{static THROW_IF_NOT_FOUND=Vc;static NULL=new nd;static create(t,r){if(Array.isArray(t))return zw({name:""},r,t,"");{let n=t.name??"";return zw({name:n},t.parent,t.providers,n)}}static \u0275prov=oe({token:M0,providedIn:"any",factory:()=>et(Mb)});static __NG_ELEMENT_ID__=-1},QA=new he("");QA.__NG_ELEMENT_ID__=e=>{let t=pr();if(t===null)throw new Oe(204,!1);if(t.type&2)return t.value;if(e&Je.Optional)return null;throw new Oe(204,!1)};var DC=!1,$g=(()=>{class e{static __NG_ELEMENT_ID__=eM;static __NG_ENV_ID__=r=>r}return e})(),Mm=class extends $g{_lView;constructor(e){super(),this._lView=e}onDestroy(e){return eC(this._lView,e),()=>mA(this._lView,e)}};function eM(){return new Mm(Ge())}var Ni=class{},Rd=new he("",{providedIn:"root",factory:()=>!1}),IC=new he(""),Wg=new he(""),Nd=(()=>{class e{taskId=0;pendingTasks=new Set;get _hasPendingTasks(){return this.hasPendingTasks.value}hasPendingTasks=new xr(!1);add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let r=this.taskId++;return this.pendingTasks.add(r),r}has(r){return this.pendingTasks.has(r)}remove(r){this.pendingTasks.delete(r),this.pendingTasks.size===0&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static \u0275prov=oe({token:e,providedIn:"root",factory:()=>new e})}return e})(),Om=class extends ie{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,jb()&&(this.destroyRef=O($g,{optional:!0})??void 0,this.pendingTasks=O(Nd,{optional:!0})??void 0)}emit(e){let t=$e(null);try{super.next(e)}finally{$e(t)}}subscribe(e,t,r){let n=e,i=t||(()=>null),s=r;if(e&&typeof e=="object"){let a=e;n=a.next?.bind(a),i=a.error?.bind(a),s=a.complete?.bind(a)}this.__isAsync&&(i=this.wrapInTimeout(i),n&&(n=this.wrapInTimeout(n)),s&&(s=this.wrapInTimeout(s)));let o=super.subscribe({next:n,error:i,complete:s});return e instanceof mt&&e.add(o),o}wrapInTimeout(e){return t=>{let r=this.pendingTasks?.add();setTimeout(()=>{e(t),r!==void 0&&this.pendingTasks?.remove(r)})}}},We=Om;function dd(...e){}function TC(e){let t,r;function n(){e=dd;try{r!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(r),t!==void 0&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{e(),n()}),typeof requestAnimationFrame=="function"&&(r=requestAnimationFrame(()=>{e(),n()})),()=>n()}function qw(e){return queueMicrotask(()=>e()),()=>{e=dd}}var Gg="isAngularZone",fd=Gg+"_ID",tM=0,Ve=class Vh{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new We(!1);onMicrotaskEmpty=new We(!1);onStable=new We(!1);onError=new We(!1);constructor(t){let{enableLongStackTrace:r=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:i=!1,scheduleInRootZone:s=DC}=t;if(typeof Zone>"u")throw new Oe(908,!1);Zone.assertZonePatched();let o=this;o._nesting=0,o._outer=o._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(o._inner=o._inner.fork(new Zone.TaskTrackingZoneSpec)),r&&Zone.longStackTraceZoneSpec&&(o._inner=o._inner.fork(Zone.longStackTraceZoneSpec)),o.shouldCoalesceEventChangeDetection=!i&&n,o.shouldCoalesceRunChangeDetection=i,o.callbackScheduled=!1,o.scheduleInRootZone=s,iM(o)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(Gg)===!0}static assertInAngularZone(){if(!Vh.isInAngularZone())throw new Oe(909,!1)}static assertNotInAngularZone(){if(Vh.isInAngularZone())throw new Oe(909,!1)}run(t,r,n){return this._inner.run(t,r,n)}runTask(t,r,n,i){let s=this._inner,o=s.scheduleEventTask("NgZoneEvent: "+i,t,nM,dd,dd);try{return s.runTask(o,r,n)}finally{s.cancelTask(o)}}runGuarded(t,r,n){return this._inner.runGuarded(t,r,n)}runOutsideAngular(t){return this._outer.run(t)}},nM={};function zg(e){if(e._nesting==0&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function rM(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){TC(()=>{e.callbackScheduled=!1,Pm(e),e.isCheckStableRunning=!0,zg(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Pm(e)}function iM(e){let t=()=>{rM(e)},r=tM++;e._inner=e._inner.fork({name:"angular",properties:{[Gg]:!0,[fd]:r,[fd+r]:!0},onInvokeTask:(n,i,s,o,a,l)=>{if(oM(l))return n.invokeTask(s,o,a,l);try{return Yw(e),n.invokeTask(s,o,a,l)}finally{(e.shouldCoalesceEventChangeDetection&&o.type==="eventTask"||e.shouldCoalesceRunChangeDetection)&&t(),Kw(e)}},onInvoke:(n,i,s,o,a,l,c)=>{try{return Yw(e),n.invoke(s,o,a,l,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!sM(l)&&t(),Kw(e)}},onHasTask:(n,i,s,o)=>{n.hasTask(s,o),i===s&&(o.change=="microTask"?(e._hasPendingMicrotasks=o.microTask,Pm(e),zg(e)):o.change=="macroTask"&&(e.hasPendingMacrotasks=o.macroTask))},onHandleError:(n,i,s,o)=>(n.handleError(s,o),e.runOutsideAngular(()=>e.onError.emit(o)),!1)})}function Pm(e){e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0?e.hasPendingMicrotasks=!0:e.hasPendingMicrotasks=!1}function Yw(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Kw(e){e._nesting--,zg(e)}var pd=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new We;onMicrotaskEmpty=new We;onStable=new We;onError=new We;run(e,t,r){return e.apply(t,r)}runGuarded(e,t,r){return e.apply(t,r)}runOutsideAngular(e){return e()}runTask(e,t,r,n){return e.apply(t,r)}};function oM(e){return xC(e,"__ignore_ng_zone__")}function sM(e){return xC(e,"__scheduler_tick__")}function xC(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Ai=class{_console=console;handleError(e){this._console.error("ERROR",e)}},aM=new he("",{providedIn:"root",factory:()=>{let e=O(Ve),t=O(Ai);return r=>e.runOutsideAngular(()=>t.handleError(r))}});function cM(){return fa(pr(),Ge())}function fa(e,t){return new Nt(Jr(e,t))}var Nt=(()=>{class e{nativeElement;constructor(r){this.nativeElement=r}static __NG_ELEMENT_ID__=cM}return e})();function lM(e){return e instanceof Nt?e.nativeElement:e}function Bi(e,t){let r=nw(e),n=r[Ii];return t?.equal&&(n.equal=t.equal),r.set=i=>Gh(n,i),r.update=i=>rw(n,i),r.asReadonly=uM.bind(r),r}function uM(){let e=this[Ii];if(e.readonlyFn===void 0){let t=()=>this();t[Ii]=e,e.readonlyFn=t}return e.readonlyFn}function dM(){return this._results[Symbol.iterator]()}var km=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new ie}constructor(e=!1){this._emitDistinctChangesOnly=e}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){this.dirty=!1;let r=GN(e);(this._changesDetected=!WN(this._results,r,t))&&(this._results=r,this.length=r.length,this.last=r[this.length-1],this.first=r[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=dM};function RC(e){return(e.flags&128)===128}var NC=function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e}(NC||{}),AC=new Map,fM=0;function pM(){return fM++}function hM(e){AC.set(e[Id],e)}function Lm(e){AC.delete(e[Id])}var Zw="__ngContext__";function rl(e,t){oo(t)?(e[Zw]=t[Id],hM(t)):e[Zw]=t}function MC(e){return PC(e[Wc])}function OC(e){return PC(e[Ar])}function PC(e){for(;e!==null&&!Li(e);)e=e[Ar];return e}var Fm;function kC(e){Fm=e}function LC(){if(Fm!==void 0)return Fm;if(typeof document<"u")return document;throw new Oe(210,!1)}var il=new he("",{providedIn:"root",factory:()=>mM}),mM="ng",qg=new he(""),Xo=new he("",{providedIn:"platform",factory:()=>"unknown"}),FC=new he(""),Yg=new he("",{providedIn:"root",factory:()=>LC().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null}),gM="h",vM="b",BC=!1,yM=new he("",{providedIn:"root",factory:()=>BC}),Kg=function(e){return e[e.CHANGE_DETECTION=0]="CHANGE_DETECTION",e[e.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",e}(Kg||{}),pa=new he(""),Xw=new Set;function lo(e){Xw.has(e)||(Xw.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}var VC=(()=>{class e{view;node;constructor(r,n){this.view=r,this.node=n}static __NG_ELEMENT_ID__=_M}return e})();function _M(){return new VC(Ge(),pr())}var Js=function(e){return e[e.EarlyRead=0]="EarlyRead",e[e.Write=1]="Write",e[e.MixedReadWrite=2]="MixedReadWrite",e[e.Read=3]="Read",e}(Js||{}),UC=(()=>{class e{impl=null;execute(){this.impl?.execute()}static \u0275prov=oe({token:e,providedIn:"root",factory:()=>new e})}return e})(),EM=[Js.EarlyRead,Js.Write,Js.MixedReadWrite,Js.Read],wM=(()=>{class e{ngZone=O(Ve);scheduler=O(Ni);errorHandler=O(Ai,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){O(pa,{optional:!0})}execute(){let r=this.sequences.size>0;r&&vt(16),this.executing=!0;for(let n of EM)for(let i of this.sequences)if(!(i.erroredOrDestroyed||!i.hooks[n]))try{i.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let s=i.hooks[n];return s(i.pipelinedValue)},i.snapshot))}catch(s){i.erroredOrDestroyed=!0,this.errorHandler?.handleError(s)}this.executing=!1;for(let n of this.sequences)n.afterRun(),n.once&&(this.sequences.delete(n),n.destroy());for(let n of this.deferredRegistrations)this.sequences.add(n);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),r&&vt(17)}register(r){let{view:n}=r;n!==void 0?((n[ta]??=[]).push(r),tl(n),n[we]|=8192):this.executing?this.deferredRegistrations.add(r):this.addSequence(r)}addSequence(r){this.sequences.add(r),this.scheduler.notify(7)}unregister(r){this.executing&&this.sequences.has(r)?(r.erroredOrDestroyed=!0,r.pipelinedValue=void 0,r.once=!0):(this.sequences.delete(r),this.deferredRegistrations.delete(r))}maybeTrace(r,n){return n?n.run(Kg.AFTER_NEXT_RENDER,r):r()}static \u0275prov=oe({token:e,providedIn:"root",factory:()=>new e})}return e})(),Bm=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,t,r,n,i,s=null){this.impl=e,this.hooks=t,this.view=r,this.once=n,this.snapshot=s,this.unregisterOnDestroy=i?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let e=this.view?.[ta];e&&(this.view[ta]=e.filter(t=>t!==this))}};function Zg(e,t){!t?.injector&&$b(Zg);let r=t?.injector??O(yt);return lo("NgAfterRender"),HC(e,r,t,!1)}function Qr(e,t){!t?.injector&&$b(Qr);let r=t?.injector??O(yt);return lo("NgAfterNextRender"),HC(e,r,t,!0)}function bM(e,t){if(e instanceof Function){let r=[void 0,void 0,void 0,void 0];return r[t]=e,r}else return[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function HC(e,t,r,n){let i=t.get(UC);i.impl??=t.get(wM);let s=t.get(pa,null,{optional:!0}),o=r?.phase??Js.MixedReadWrite,a=r?.manualCleanup!==!0?t.get($g):null,l=t.get(VC,null,{optional:!0}),c=new Bm(i.impl,bM(e,o),l?.view,n,a,s?.snapshot(null));return i.impl.register(c),c}var CM=()=>null;function jC(e,t,r=!1){return CM(e,t,r)}function $C(e,t){let r=e.contentQueries;if(r!==null){let n=$e(null);try{for(let i=0;i<r.length;i+=2){let s=r[i],o=r[i+1];if(o!==-1){let a=e.data[o];Lg(s),a.contentQueries(2,t[o],o)}}}finally{$e(n)}}}function Vm(e,t,r){Lg(0);let n=$e(null);try{t(e,r)}finally{$e(n)}}function WC(e,t,r){if(zb(t)){let n=$e(null);try{let i=t.directiveStart,s=t.directiveEnd;for(let o=i;o<s;o++){let a=e.data[o];if(a.contentQueries){let l=r[o];a.contentQueries(1,l,o)}}}finally{$e(n)}}}var Zr=function(e){return e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",e}(Zr||{}),$u;function SM(){if($u===void 0&&($u=null,Bc.trustedTypes))try{$u=Bc.trustedTypes.createPolicy("angular",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return $u}function Ad(e){return SM()?.createHTML(e)||e}var Wu;function DM(){if(Wu===void 0&&(Wu=null,Bc.trustedTypes))try{Wu=Bc.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Wu}function Jw(e){return DM()?.createHTML(e)||e}var Mi=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${bb})`}},Um=class extends Mi{getTypeName(){return"HTML"}},Hm=class extends Mi{getTypeName(){return"Style"}},jm=class extends Mi{getTypeName(){return"Script"}},$m=class extends Mi{getTypeName(){return"URL"}},Wm=class extends Mi{getTypeName(){return"ResourceURL"}};function ei(e){return e instanceof Mi?e.changingThisBreaksApplicationSecurity:e}function uo(e,t){let r=IM(e);if(r!=null&&r!==t){if(r==="ResourceURL"&&t==="URL")return!0;throw new Error(`Required a safe ${t}, got a ${r} (see ${bb})`)}return r===t}function IM(e){return e instanceof Mi&&e.getTypeName()||null}function GC(e){return new Um(e)}function zC(e){return new Hm(e)}function qC(e){return new jm(e)}function YC(e){return new $m(e)}function KC(e){return new Wm(e)}function TM(e){let t=new zm(e);return xM()?new Gm(t):t}var Gm=class{inertDocumentHelper;constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{let t=new window.DOMParser().parseFromString(Ad(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.firstChild?.remove(),t)}catch{return null}}},zm=class{defaultDoc;inertDocument;constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){let t=this.inertDocument.createElement("template");return t.innerHTML=Ad(e),t}};function xM(){try{return!!new window.DOMParser().parseFromString(Ad(""),"text/html")}catch{return!1}}var RM=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Md(e){return e=String(e),e.match(RM)?e:"unsafe:"+e}function Vi(e){let t={};for(let r of e.split(","))t[r]=!0;return t}function ol(...e){let t={};for(let r of e)for(let n in r)r.hasOwnProperty(n)&&(t[n]=!0);return t}var ZC=Vi("area,br,col,hr,img,wbr"),XC=Vi("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),JC=Vi("rp,rt"),NM=ol(JC,XC),AM=ol(XC,Vi("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),MM=ol(JC,Vi("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Qw=ol(ZC,AM,MM,NM),QC=Vi("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),OM=Vi("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),PM=Vi("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),kM=ol(QC,OM,PM),LM=Vi("script,style,template"),qm=class{sanitizedSomething=!1;buf=[];sanitizeChildren(e){let t=e.firstChild,r=!0,n=[];for(;t;){if(t.nodeType===Node.ELEMENT_NODE?r=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,r&&t.firstChild){n.push(t),t=VM(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let i=BM(t);if(i){t=i;break}t=n.pop()}}return this.buf.join("")}startElement(e){let t=eb(e).toLowerCase();if(!Qw.hasOwnProperty(t))return this.sanitizedSomething=!0,!LM.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);let r=e.attributes;for(let n=0;n<r.length;n++){let i=r.item(n),s=i.name,o=s.toLowerCase();if(!kM.hasOwnProperty(o)){this.sanitizedSomething=!0;continue}let a=i.value;QC[o]&&(a=Md(a)),this.buf.push(" ",s,'="',tb(a),'"')}return this.buf.push(">"),!0}endElement(e){let t=eb(e).toLowerCase();Qw.hasOwnProperty(t)&&!ZC.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(tb(e))}};function FM(e,t){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function BM(e){let t=e.nextSibling;if(t&&e!==t.previousSibling)throw eS(t);return t}function VM(e){let t=e.firstChild;if(t&&FM(e,t))throw eS(t);return t}function eb(e){let t=e.nodeName;return typeof t=="string"?t:"FORM"}function eS(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}var UM=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,HM=/([^\#-~ |!])/g;function tb(e){return e.replace(/&/g,"&amp;").replace(UM,function(t){let r=t.charCodeAt(0),n=t.charCodeAt(1);return"&#"+((r-55296)*1024+(n-56320)+65536)+";"}).replace(HM,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}var Gu;function Xg(e,t){let r=null;try{Gu=Gu||TM(e);let n=t?String(t):"";r=Gu.getInertBodyElement(n);let i=5,s=n;do{if(i===0)throw new Error("Failed to sanitize html because the input is unstable");i--,n=s,s=r.innerHTML,r=Gu.getInertBodyElement(n)}while(n!==s);let o=new qm().sanitizeChildren(nb(r)||r);return Ad(o)}finally{if(r){let n=nb(r)||r;for(;n.firstChild;)n.firstChild.remove()}}}function nb(e){return"content"in e&&jM(e)?e.content:null}function jM(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName==="TEMPLATE"}var ti=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}(ti||{});function sl(e){let t=tS();return t?Jw(t.sanitize(ti.HTML,e)||""):uo(e,"HTML")?Jw(ei(e)):Xg(LC(),Jc(e))}function zt(e){let t=tS();return t?t.sanitize(ti.URL,e)||"":uo(e,"URL")?ei(e):Md(Jc(e))}function tS(){let e=Ge();return e&&e[xi].sanitizer}function nS(e){return e.ownerDocument.defaultView}function $M(e,t,r){let n=e.length;for(;;){let i=e.indexOf(t,r);if(i===-1)return i;if(i===0||e.charCodeAt(i-1)<=32){let s=t.length;if(i+s===n||e.charCodeAt(i+s)<=32)return i}r=i+1}}var rS="ng-template";function WM(e,t,r,n){let i=0;if(n){for(;i<t.length&&typeof t[i]=="string";i+=2)if(t[i]==="class"&&$M(t[i+1].toLowerCase(),r,0)!==-1)return!0}else if(Jg(e))return!1;if(i=t.indexOf(1,i),i>-1){let s;for(;++i<t.length&&typeof(s=t[i])=="string";)if(s.toLowerCase()===r)return!0}return!1}function Jg(e){return e.type===4&&e.value!==rS}function GM(e,t,r){let n=e.type===4&&!r?rS:e.value;return t===n}function zM(e,t,r){let n=4,i=e.attrs,s=i!==null?KM(i):0,o=!1;for(let a=0;a<t.length;a++){let l=t[a];if(typeof l=="number"){if(!o&&!Nr(n)&&!Nr(l))return!1;if(o&&Nr(l))continue;o=!1,n=l|n&1;continue}if(!o)if(n&4){if(n=2|n&1,l!==""&&!GM(e,l,r)||l===""&&t.length===1){if(Nr(n))return!1;o=!0}}else if(n&8){if(i===null||!WM(e,i,l,r)){if(Nr(n))return!1;o=!0}}else{let c=t[++a],h=qM(l,i,Jg(e),r);if(h===-1){if(Nr(n))return!1;o=!0;continue}if(c!==""){let d;if(h>s?d="":d=i[h+1].toLowerCase(),n&2&&c!==d){if(Nr(n))return!1;o=!0}}}}return Nr(n)||o}function Nr(e){return(e&1)===0}function qM(e,t,r,n){if(t===null)return-1;let i=0;if(n||!r){let s=!1;for(;i<t.length;){let o=t[i];if(o===e)return i;if(o===3||o===6)s=!0;else if(o===1||o===2){let a=t[++i];for(;typeof a=="string";)a=t[++i];continue}else{if(o===4)break;if(o===0){i+=4;continue}}i+=s?1:2}return-1}else return ZM(t,e)}function YM(e,t,r=!1){for(let n=0;n<t.length;n++)if(zM(e,t[n],r))return!0;return!1}function KM(e){for(let t=0;t<e.length;t++){let r=e[t];if(jA(r))return t}return e.length}function ZM(e,t){let r=e.indexOf(4);if(r>-1)for(r++;r<e.length;){let n=e[r];if(typeof n=="number")return-1;if(n===t)return r;r++}return-1}function rb(e,t){return e?":not("+t.trim()+")":t}function XM(e){let t=e[0],r=1,n=2,i="",s=!1;for(;r<e.length;){let o=e[r];if(typeof o=="string")if(n&2){let a=e[++r];i+="["+o+(a.length>0?'="'+a+'"':"")+"]"}else n&8?i+="."+o:n&4&&(i+=" "+o);else i!==""&&!Nr(o)&&(t+=rb(s,i),i=""),n=o,s=s||!Nr(n);r++}return i!==""&&(t+=rb(s,i)),t}function JM(e){return e.map(XM).join(",")}function QM(e){let t=[],r=[],n=1,i=2;for(;n<e.length;){let s=e[n];if(typeof s=="string")i===2?s!==""&&t.push(s,e[++n]):i===8&&r.push(s);else{if(!Nr(i))break;i=s}n++}return r.length&&t.push(1,...r),t}var Ui={};function eO(e,t){return e.createText(t)}function tO(e,t,r){e.setValue(t,r)}function iS(e,t,r){return e.createElement(t,r)}function hd(e,t,r,n,i){e.insertBefore(t,r,n,i)}function oS(e,t,r){e.appendChild(t,r)}function ib(e,t,r,n,i){n!==null?hd(e,t,r,n,i):oS(e,t,r)}function nO(e,t,r){e.removeChild(null,t,r)}function rO(e,t,r){e.setAttribute(t,"style",r)}function iO(e,t,r){r===""?e.removeAttribute(t,"class"):e.setAttribute(t,"class",r)}function sS(e,t,r){let{mergedAttrs:n,classes:i,styles:s}=r;n!==null&&HA(e,t,n),i!==null&&iO(e,t,i),s!==null&&rO(e,t,s)}function Qg(e,t,r,n,i,s,o,a,l,c,h){let d=wn+n,f=d+i,g=oO(d,f),m=typeof c=="function"?c():c;return g[Te]={type:e,blueprint:g,template:r,queries:null,viewQuery:a,declTNode:t,data:g.slice().fill(null,d),bindingStartIndex:d,expandoStartIndex:f,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:typeof s=="function"?s():s,pipeRegistry:typeof o=="function"?o():o,firstChild:null,schemas:l,consts:m,incompleteFirstPass:!1,ssrId:h}}function oO(e,t){let r=[];for(let n=0;n<t;n++)r.push(n<e?null:Ui);return r}function sO(e){let t=e.tView;return t===null||t.incompleteFirstPass?e.tView=Qg(1,null,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts,e.id):t}function ev(e,t,r,n,i,s,o,a,l,c,h){let d=t.blueprint.slice();return d[ki]=i,d[we]=n|4|128|8|64|1024,(c!==null||e&&e[we]&2048)&&(d[we]|=2048),Qb(d),d[xn]=d[ca]=e,d[nn]=r,d[xi]=o||e&&e[xi],d[ln]=a||e&&e[ln],d[$c]=l||e&&e[$c]||null,d[Pr]=s,d[Id]=pM(),d[jc]=h,d[Wb]=c,d[Mr]=t.type==2?e[Mr]:d,d}function aO(e,t,r){let n=Jr(t,e),i=sO(r),s=e[xi].rendererFactory,o=tv(e,ev(e,i,null,aS(r),n,t,null,s.createRenderer(n,r),null,null,null));return e[t.index]=o}function aS(e){let t=16;return e.signals?t=4096:e.onPush&&(t=64),t}function cS(e,t,r,n){if(r===0)return-1;let i=t.length;for(let s=0;s<r;s++)t.push(n),e.blueprint.push(n),e.data.push(null);return i}function tv(e,t){return e[Wc]?e[Vw][Ar]=t:e[Wc]=t,e[Vw]=t,t}function Y(e=1){lS(dn(),Ge(),co()+e,!1)}function lS(e,t,r,n){if(!n)if((t[we]&3)===3){let i=e.preOrderCheckHooks;i!==null&&Yu(t,i,r)}else{let i=e.preOrderHooks;i!==null&&Ku(t,i,0,r)}qo(r)}var Od=function(e){return e[e.None=0]="None",e[e.SignalBased=1]="SignalBased",e[e.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",e}(Od||{});function Ym(e,t,r,n){let i=$e(null);try{let[s,o,a]=e.inputs[r],l=null;(o&Od.SignalBased)!==0&&(l=t[s][Ii]),l!==null&&l.transformFn!==void 0?n=l.transformFn(n):a!==null&&(n=a.call(t,n)),e.setInput!==null?e.setInput(t,l,n,r,s):qb(t,l,s,n)}finally{$e(i)}}function uS(e,t,r,n,i){let s=co(),o=n&2;try{qo(-1),o&&t.length>wn&&lS(e,t,wn,!1),vt(o?2:0,i),r(n,i)}finally{qo(s),vt(o?3:1,i)}}function nv(e,t,r){pO(e,t,r),(r.flags&64)===64&&hO(e,t,r)}function dS(e,t,r=Jr){let n=t.localNames;if(n!==null){let i=t.index+1;for(let s=0;s<n.length;s+=2){let o=n[s+1],a=o===-1?r(t,e):e[o];e[i++]=a}}}function cO(e,t,r,n){let i=n.get(yM,BC)||r===Zr.ShadowDom,s=e.selectRootElement(t,i);return lO(s),s}function lO(e){uO(e)}var uO=()=>null;function dO(e){return e==="class"?"className":e==="for"?"htmlFor":e==="formaction"?"formAction":e==="innerHtml"?"innerHTML":e==="readonly"?"readOnly":e==="tabindex"?"tabIndex":e}function fS(e,t,r,n,i,s,o,a){if(!a&&rv(t,e,r,n,i)){la(t)&&fO(r,t.index);return}if(t.type&3){let l=Jr(t,r);n=dO(n),i=o!=null?o(i,t.value||"",n):i,s.setProperty(l,n,i)}else t.type&12}function fO(e,t){let r=Kr(t,e);r[we]&16||(r[we]|=64)}function pO(e,t,r){let n=r.directiveStart,i=r.directiveEnd;la(r)&&aO(t,r,e.data[n+r.componentOffset]),e.firstCreatePass||ud(r,t);let s=r.initialInputs;for(let o=n;o<i;o++){let a=e.data[o],l=zc(t,e,o,r);if(rl(l,t),s!==null&&yO(t,o-n,l,a,r,s),qr(a)){let c=Kr(r.index,t);c[nn]=zc(t,e,o,r)}}}function hO(e,t,r){let n=r.directiveStart,i=r.directiveEnd,s=r.index,o=NA();try{qo(s);for(let a=n;a<i;a++){let l=e.data[a],c=t[a];Tm(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&mO(l,c)}}finally{qo(-1),Tm(o)}}function mO(e,t){e.hostBindings!==null&&e.hostBindings(1,t)}function pS(e,t){let r=e.directiveRegistry,n=null;if(r)for(let i=0;i<r.length;i++){let s=r[i];YM(t,s.selectors,!1)&&(n??=[],qr(s)?n.unshift(s):n.push(s))}return n}function gO(e,t,r,n,i,s){let o=Jr(e,t);vO(t[ln],o,s,e.value,r,n,i)}function vO(e,t,r,n,i,s,o){if(s==null)e.removeAttribute(t,i,r);else{let a=o==null?Jc(s):o(s,n||"",i);e.setAttribute(t,i,a,r)}}function yO(e,t,r,n,i,s){let o=s[t];if(o!==null)for(let a=0;a<o.length;a+=2){let l=o[a],c=o[a+1];Ym(n,r,l,c)}}function hS(e,t){let r=e[$c],n=r?r.get(Ai,null):null;n&&n.handleError(t)}function rv(e,t,r,n,i){let s=e.inputs?.[n],o=e.hostDirectiveInputs?.[n],a=!1;if(o)for(let l=0;l<o.length;l+=2){let c=o[l],h=o[l+1],d=t.data[c];Ym(d,r[c],h,i),a=!0}if(s)for(let l of s){let c=r[l],h=t.data[l];Ym(h,c,n,i),a=!0}return a}function _O(e,t){let r=Kr(t,e),n=r[Te];EO(n,r);let i=r[ki];i!==null&&r[jc]===null&&(r[jc]=jC(i,r[$c])),vt(18),iv(n,r,r[nn]),vt(19,r[nn])}function EO(e,t){for(let r=t.length;r<e.blueprint.length;r++)t.push(e.blueprint[r])}function iv(e,t,r){Fg(t);try{let n=e.viewQuery;n!==null&&Vm(1,n,r);let i=e.template;i!==null&&uS(e,t,i,1,r),e.firstCreatePass&&(e.firstCreatePass=!1),t[Ri]?.finishViewCreation(e),e.staticContentQueries&&$C(e,t),e.staticViewQueries&&Vm(2,e.viewQuery,r);let s=e.components;s!==null&&wO(t,s)}catch(n){throw e.firstCreatePass&&(e.incompleteFirstPass=!0,e.firstCreatePass=!1),n}finally{t[we]&=-5,Bg()}}function wO(e,t){for(let r=0;r<t.length;r++)_O(e,t[r])}function Pd(e,t,r,n){let i=$e(null);try{let s=t.tView,o=e[we]&4096?4096:16,a=ev(e,s,r,o,null,t,null,null,n?.injector??null,n?.embeddedViewInjector??null,n?.dehydratedView??null),l=e[t.index];a[Wo]=l;let c=e[Ri];return c!==null&&(a[Ri]=c.createEmbeddedView(s)),iv(s,a,r),a}finally{$e(i)}}function qc(e,t){return!t||t.firstChild===null||RC(e)}var bO;function ov(e,t){return bO(e,t)}var Xr=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(Xr||{});function mS(e){return(e.flags&32)===32}function Qs(e,t,r,n,i){if(n!=null){let s,o=!1;Li(n)?s=n:oo(n)&&(o=!0,n=n[ki]);let a=Yr(n);e===0&&r!==null?i==null?oS(t,r,a):hd(t,r,a,i||null,!0):e===1&&r!==null?hd(t,r,a,i||null,!0):e===2?nO(t,a,o):e===3&&t.destroyNode(a),s!=null&&PO(t,e,s,r,i)}}function CO(e,t){gS(e,t),t[ki]=null,t[Pr]=null}function SO(e,t,r,n,i,s){n[ki]=i,n[Pr]=t,Ld(e,n,r,1,i,s)}function gS(e,t){t[xi].changeDetectionScheduler?.notify(9),Ld(e,t,t[ln],2,null,null)}function DO(e){let t=e[Wc];if(!t)return um(e[Te],e);for(;t;){let r=null;if(oo(t))r=t[Wc];else{let n=t[Tn];n&&(r=n)}if(!r){for(;t&&!t[Ar]&&t!==e;)oo(t)&&um(t[Te],t),t=t[xn];t===null&&(t=e),oo(t)&&um(t[Te],t),r=t&&t[Ar]}t=r}}function sv(e,t){let r=e[ia],n=r.indexOf(t);r.splice(n,1)}function kd(e,t){if(el(t))return;let r=t[ln];r.destroyNode&&Ld(e,t,r,3,null,null),DO(t)}function um(e,t){if(el(t))return;let r=$e(null);try{t[we]&=-129,t[we]|=256,t[Jn]&&Wh(t[Jn]),TO(e,t),IO(e,t),t[Te].type===1&&t[ln].destroy();let n=t[Wo];if(n!==null&&Li(t[xn])){n!==t[xn]&&sv(n,t);let i=t[Ri];i!==null&&i.detachView(e)}Lm(t)}finally{$e(r)}}function IO(e,t){let r=e.cleanup,n=t[rd];if(r!==null)for(let o=0;o<r.length-1;o+=2)if(typeof r[o]=="string"){let a=r[o+3];a>=0?n[a]():n[-a].unsubscribe(),o+=2}else{let a=n[r[o+1]];r[o].call(a)}n!==null&&(t[rd]=null);let i=t[io];if(i!==null){t[io]=null;for(let o=0;o<i.length;o++){let a=i[o];a()}}let s=t[id];if(s!==null){t[id]=null;for(let o of s)o.destroy()}}function TO(e,t){let r;if(e!=null&&(r=e.destroyHooks)!=null)for(let n=0;n<r.length;n+=2){let i=t[r[n]];if(!(i instanceof Yo)){let s=r[n+1];if(Array.isArray(s))for(let o=0;o<s.length;o+=2){let a=i[s[o]],l=s[o+1];vt(4,a,l);try{l.call(a)}finally{vt(5,a,l)}}else{vt(4,i,s);try{s.call(i)}finally{vt(5,i,s)}}}}}function xO(e,t,r){return RO(e,t.parent,r)}function RO(e,t,r){let n=t;for(;n!==null&&n.type&168;)t=n,n=t.parent;if(n===null)return r[ki];if(la(n)){let{encapsulation:i}=e.data[n.directiveStart+n.componentOffset];if(i===Zr.None||i===Zr.Emulated)return null}return Jr(n,r)}function NO(e,t,r){return MO(e,t,r)}function AO(e,t,r){return e.type&40?Jr(e,r):null}var MO=AO,ob;function av(e,t,r,n){let i=xO(e,n,t),s=t[ln],o=n.parent||t[Pr],a=NO(o,n,t);if(i!=null)if(Array.isArray(r))for(let l=0;l<r.length;l++)ib(s,i,r[l],a,!1);else ib(s,i,r,a,!1);ob!==void 0&&ob(s,n,t,r,i)}function Lc(e,t){if(t!==null){let r=t.type;if(r&3)return Jr(t,e);if(r&4)return Km(-1,e[t.index]);if(r&8){let n=t.child;if(n!==null)return Lc(e,n);{let i=e[t.index];return Li(i)?Km(-1,i):Yr(i)}}else{if(r&128)return Lc(e,t.next);if(r&32)return ov(t,e)()||Yr(e[t.index]);{let n=vS(e,t);if(n!==null){if(Array.isArray(n))return n[0];let i=zo(e[Mr]);return Lc(i,n)}else return Lc(e,t.next)}}}return null}function vS(e,t){if(t!==null){let r=e[Mr][Pr],n=t.projection;return r.projection[n]}return null}function Km(e,t){let r=Tn+e+1;if(r<t.length){let n=t[r],i=n[Te].firstChild;if(i!==null)return Lc(n,i)}return t[Go]}function cv(e,t,r,n,i,s,o){for(;r!=null;){if(r.type===128){r=r.next;continue}let a=n[r.index],l=r.type;if(o&&t===0&&(a&&rl(Yr(a),n),r.flags|=2),!mS(r))if(l&8)cv(e,t,r.child,n,i,s,!1),Qs(t,e,i,a,s);else if(l&32){let c=ov(r,n),h;for(;h=c();)Qs(t,e,i,h,s);Qs(t,e,i,a,s)}else l&16?OO(e,t,n,r,i,s):Qs(t,e,i,a,s);r=o?r.projectionNext:r.next}}function Ld(e,t,r,n,i,s){cv(r,n,e.firstChild,t,i,s,!1)}function OO(e,t,r,n,i,s){let o=r[Mr],a=o[Pr].projection[n.projection];if(Array.isArray(a))for(let l=0;l<a.length;l++){let c=a[l];Qs(t,e,i,c,s)}else{let l=a,c=o[xn];RC(n)&&(l.flags|=128),cv(e,t,l,c,i,s,!0)}}function PO(e,t,r,n,i){let s=r[Go],o=Yr(r);s!==o&&Qs(t,e,n,s,i);for(let a=Tn;a<r.length;a++){let l=r[a];Ld(l[Te],l,e,t,n,s)}}function kO(e,t,r,n,i){if(t)i?e.addClass(r,n):e.removeClass(r,n);else{let s=n.indexOf("-")===-1?void 0:Xr.DashCase;i==null?e.removeStyle(r,n,s):(typeof i=="string"&&i.endsWith("!important")&&(i=i.slice(0,-10),s|=Xr.Important),e.setStyle(r,n,i,s))}}function md(e,t,r,n,i=!1){for(;r!==null;){if(r.type===128){r=i?r.projectionNext:r.next;continue}let s=t[r.index];s!==null&&n.push(Yr(s)),Li(s)&&LO(s,n);let o=r.type;if(o&8)md(e,t,r.child,n);else if(o&32){let a=ov(r,t),l;for(;l=a();)n.push(l)}else if(o&16){let a=vS(t,r);if(Array.isArray(a))n.push(...a);else{let l=zo(t[Mr]);md(l[Te],l,a,n,!0)}}r=i?r.projectionNext:r.next}return n}function LO(e,t){for(let r=Tn;r<e.length;r++){let n=e[r],i=n[Te].firstChild;i!==null&&md(n[Te],n,i,t)}e[Go]!==e[ki]&&t.push(e[Go])}function yS(e){if(e[ta]!==null){for(let t of e[ta])t.impl.addSequence(t);e[ta].length=0}}var _S=[];function FO(e){return e[Jn]??BO(e)}function BO(e){let t=_S.pop()??Object.create(UO);return t.lView=e,t}function VO(e){e.lView[Jn]!==e&&(e.lView=null,_S.push(e))}var UO=re(w({},fu),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{tl(e.lView)},consumerOnSignalRead(){this.lView[Jn]=this}});function HO(e){let t=e[Jn]??Object.create(jO);return t.lView=e,t}var jO=re(w({},fu),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{let t=zo(e.lView);for(;t&&!ES(t[Te]);)t=zo(t);t&&Pg(t)},consumerOnSignalRead(){this.lView[Jn]=this}});function ES(e){return e.type!==2}function wS(e){if(e[id]===null)return;let t=!0;for(;t;){let r=!1;for(let n of e[id])n.dirty&&(r=!0,n.zone===null||Zone.current===n.zone?n.run():n.zone.run(()=>n.run()));t=r&&!!(e[we]&8192)}}var $O=100;function bS(e,t=!0,r=0){let n=e[xi].rendererFactory,i=!1;i||n.begin?.();try{WO(e,r)}catch(s){throw t&&hS(e,s),s}finally{i||n.end?.()}}function WO(e,t){let r=sC();try{Hw(!0),Zm(e,t);let n=0;for(;Td(e);){if(n===$O)throw new Oe(103,!1);n++,Zm(e,1)}}finally{Hw(r)}}function GO(e,t,r,n){if(el(t))return;let i=t[we],s=!1,o=!1;Fg(t);let a=!0,l=null,c=null;s||(ES(e)?(c=FO(t),l=jh(c)):GE()===null?(a=!1,c=HO(t),l=jh(c)):t[Jn]&&(Wh(t[Jn]),t[Jn]=null));try{Qb(t),IA(e.bindingStartIndex),r!==null&&uS(e,t,r,2,n);let h=(i&3)===3;if(!s)if(h){let g=e.preOrderCheckHooks;g!==null&&Yu(t,g,null)}else{let g=e.preOrderHooks;g!==null&&Ku(t,g,0,null),am(t,0)}if(o||zO(t),wS(t),CS(t,0),e.contentQueries!==null&&$C(e,t),!s)if(h){let g=e.contentCheckHooks;g!==null&&Yu(t,g)}else{let g=e.contentHooks;g!==null&&Ku(t,g,1),am(t,1)}YO(e,t);let d=e.components;d!==null&&DS(t,d,0);let f=e.viewQuery;if(f!==null&&Vm(2,f,n),!s)if(h){let g=e.viewCheckHooks;g!==null&&Yu(t,g)}else{let g=e.viewHooks;g!==null&&Ku(t,g,2),am(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[sm]){for(let g of t[sm])g();t[sm]=null}s||(yS(t),t[we]&=-73)}catch(h){throw s||tl(t),h}finally{c!==null&&(KE(c,l),a&&VO(c)),Bg()}}function CS(e,t){for(let r=MC(e);r!==null;r=OC(r))for(let n=Tn;n<r.length;n++){let i=r[n];SS(i,t)}}function zO(e){for(let t=MC(e);t!==null;t=OC(t)){if(!(t[we]&2))continue;let r=t[ia];for(let n=0;n<r.length;n++){let i=r[n];Pg(i)}}}function qO(e,t,r){vt(18);let n=Kr(t,e);SS(n,r),vt(19,n[nn])}function SS(e,t){Og(e)&&Zm(e,t)}function Zm(e,t){let r=e[Te],n=e[we],i=e[Jn],s=!!(t===0&&n&16);if(s||=!!(n&64&&t===0),s||=!!(n&1024),s||=!!(i?.dirty&&$h(i)),s||=!1,i&&(i.dirty=!1),e[we]&=-9217,s)GO(r,e,r.template,e[nn]);else if(n&8192){wS(e),CS(e,1);let o=r.components;o!==null&&DS(e,o,1),yS(e)}}function DS(e,t,r){for(let n=0;n<t.length;n++)qO(e,t[n],r)}function YO(e,t){let r=e.hostBindingOpCodes;if(r!==null)try{for(let n=0;n<r.length;n++){let i=r[n];if(i<0)qo(~i);else{let s=i,o=r[++n],a=r[++n];RA(o,s);let l=t[s];vt(24,l),a(2,l),vt(25,l)}}}finally{qo(-1)}}function lv(e,t){let r=sC()?64:1088;for(e[xi].changeDetectionScheduler?.notify(t);e;){e[we]|=r;let n=zo(e);if(sd(e)&&!n)return e;e=n}return null}function IS(e,t,r,n){return[e,!0,0,t,null,n,null,r,null,null]}function TS(e,t){let r=Tn+t;if(r<e.length)return e[r]}function Fd(e,t,r,n=!0){let i=t[Te];if(KO(i,t,e,r),n){let o=Km(r,e),a=t[ln],l=a.parentNode(e[Go]);l!==null&&SO(i,e[Pr],a,t,l,o)}let s=t[jc];s!==null&&s.firstChild!==null&&(s.firstChild=null)}function xS(e,t){let r=Yc(e,t);return r!==void 0&&kd(r[Te],r),r}function Yc(e,t){if(e.length<=Tn)return;let r=Tn+t,n=e[r];if(n){let i=n[Wo];i!==null&&i!==e&&sv(i,n),t>0&&(e[r-1][Ar]=n[Ar]);let s=td(e,Tn+t);CO(n[Te],n);let o=s[Ri];o!==null&&o.detachView(s[Te]),n[xn]=null,n[Ar]=null,n[we]&=-129}return n}function KO(e,t,r,n){let i=Tn+n,s=r.length;n>0&&(r[i-1][Ar]=t),n<s-Tn?(t[Ar]=r[i],Ab(r,Tn+n,t)):(r.push(t),t[Ar]=null),t[xn]=r;let o=t[Wo];o!==null&&r!==o&&RS(o,t);let a=t[Ri];a!==null&&a.insertView(e),Dm(t),t[we]|=128}function RS(e,t){let r=e[ia],n=t[xn];if(oo(n))e[we]|=2;else{let i=n[xn][Mr];t[Mr]!==i&&(e[we]|=2)}r===null?e[ia]=[t]:r.push(t)}var Ko=class{_lView;_cdRefInjectingView;notifyErrorHandler;_appRef=null;_attachedToViewContainer=!1;get rootNodes(){let e=this._lView,t=e[Te];return md(t,e,t.firstChild,[])}constructor(e,t,r=!0){this._lView=e,this._cdRefInjectingView=t,this.notifyErrorHandler=r}get context(){return this._lView[nn]}get dirty(){return!!(this._lView[we]&9280)||!!this._lView[Jn]?.dirty}set context(e){this._lView[nn]=e}get destroyed(){return el(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[xn];if(Li(e)){let t=e[od],r=t?t.indexOf(this):-1;r>-1&&(Yc(e,r),td(t,r))}this._attachedToViewContainer=!1}kd(this._lView[Te],this._lView)}onDestroy(e){eC(this._lView,e)}markForCheck(){lv(this._cdRefInjectingView||this._lView,4)}markForRefresh(){Pg(this._cdRefInjectingView||this._lView)}detach(){this._lView[we]&=-129}reattach(){Dm(this._lView),this._lView[we]|=128}detectChanges(){this._lView[we]|=1024,bS(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Oe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=sd(this._lView),t=this._lView[Wo];t!==null&&!e&&sv(t,this._lView),gS(this._lView[Te],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new Oe(902,!1);this._appRef=e;let t=sd(this._lView),r=this._lView[Wo];r!==null&&!t&&RS(r,this._lView),Dm(this._lView)}},Or=(()=>{class e{static __NG_ELEMENT_ID__=JO}return e})(),ZO=Or,XO=class extends ZO{_declarationLView;_declarationTContainer;elementRef;constructor(e,t,r){super(),this._declarationLView=e,this._declarationTContainer=t,this.elementRef=r}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,t){return this.createEmbeddedViewImpl(e,t)}createEmbeddedViewImpl(e,t,r){let n=Pd(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:r});return new Ko(n)}};function JO(){return uv(pr(),Ge())}function uv(e,t){return e.type&4?new XO(t,e,fa(e,t)):null}function Bd(e,t,r,n,i){let s=e.data[t];if(s===null)s=QO(e,t,r,n,i),xA()&&(s.flags|=32);else if(s.type&64){s.type=r,s.value=n,s.attrs=i;let o=CA();s.injectorIndex=o===null?-1:o.injectorIndex}return da(s,!0),s}function QO(e,t,r,n,i){let s=iC(),o=oC(),a=o?s:s&&s.parent,l=e.data[t]=tP(e,a,r,t,n,i);return eP(e,l,s,o),l}function eP(e,t,r,n){e.firstChild===null&&(e.firstChild=t),r!==null&&(n?r.child==null&&t.parent!==null&&(r.child=t):r.next===null&&(r.next=t,t.prev=r))}function tP(e,t,r,n,i,s){let o=t?t.injectorIndex:-1,a=0;return EA()&&(a|=128),{type:r,index:n,insertBeforeIndex:null,injectorIndex:o,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:i,attrs:s,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var TW=new RegExp(`^(\\d+)*(${vM}|${gM})*(.*)`),nP=()=>null;function Kc(e,t){return nP(e,t)}var Xm=class{},gd=class{},Jm=class{resolveComponentFactory(e){throw Error(`No component factory found for ${dr(e)}.`)}},ao=class{static NULL=new Jm},un=class{},Jo=(()=>{class e{destroyNode=null;static __NG_ELEMENT_ID__=()=>rP()}return e})();function rP(){let e=Ge(),t=pr(),r=Kr(t.index,e);return(oo(r)?r:e)[ln]}var iP=(()=>{class e{static \u0275prov=oe({token:e,providedIn:"root",factory:()=>null})}return e})();function sb(e,t,r){let n=r?e.styles:null,i=r?e.classes:null,s=0;if(t!==null)for(let o=0;o<t.length;o++){let a=t[o];if(typeof a=="number")s=a;else if(s==1)i=Ow(i,a);else if(s==2){let l=a,c=t[++o];n=Ow(n,l+": "+c+";")}}r?e.styles=n:e.stylesWithoutHost=n,r?e.classes=i:e.classesWithoutHost=i}function bt(e,t=Je.Default){let r=Ge();if(r===null)return et(e,t);let n=pr();return bC(n,r,Pn(e),t)}function NS(e,t,r,n,i){let s=n===null?null:{"":-1},o=i(e,r);if(o!==null){let a,l=null,c=null,h=sP(o);h===null?a=o:[a,l,c]=h,lP(e,t,r,a,s,l,c)}s!==null&&n!==null&&oP(r,n,s)}function oP(e,t,r){let n=e.localNames=[];for(let i=0;i<t.length;i+=2){let s=r[t[i+1]];if(s==null)throw new Oe(-301,!1);n.push(t[i],s)}}function sP(e){let t=null,r=!1;for(let o=0;o<e.length;o++){let a=e[o];if(o===0&&qr(a)&&(t=a),a.findHostDirectiveDefs!==null){r=!0;break}}if(!r)return null;let n=null,i=null,s=null;for(let o of e)o.findHostDirectiveDefs!==null&&(n??=[],i??=new Map,s??=new Map,aP(o,n,s,i)),o===t&&(n??=[],n.push(o));return n!==null?(n.push(...t===null?e:e.slice(1)),[n,i,s]):null}function aP(e,t,r,n){let i=t.length;e.findHostDirectiveDefs(e,t,n),r.set(e,[i,t.length-1])}function cP(e,t,r){t.componentOffset=r,(e.components??=[]).push(t.index)}function lP(e,t,r,n,i,s,o){let a=n.length,l=!1;for(let f=0;f<a;f++){let g=n[f];!l&&qr(g)&&(l=!0,cP(e,r,f)),Nm(ud(r,t),e,g.type)}mP(r,e.data.length,a);for(let f=0;f<a;f++){let g=n[f];g.providersResolver&&g.providersResolver(g)}let c=!1,h=!1,d=cS(e,t,a,null);a>0&&(r.directiveToIndex=new Map);for(let f=0;f<a;f++){let g=n[f];if(r.mergedAttrs=Gc(r.mergedAttrs,g.hostAttrs),dP(e,r,t,d,g),hP(d,g,i),o!==null&&o.has(g)){let[b,I]=o.get(g);r.directiveToIndex.set(g.type,[d,b+r.directiveStart,I+r.directiveStart])}else(s===null||!s.has(g))&&r.directiveToIndex.set(g.type,d);g.contentQueries!==null&&(r.flags|=4),(g.hostBindings!==null||g.hostAttrs!==null||g.hostVars!==0)&&(r.flags|=64);let m=g.type.prototype;!c&&(m.ngOnChanges||m.ngOnInit||m.ngDoCheck)&&((e.preOrderHooks??=[]).push(r.index),c=!0),!h&&(m.ngOnChanges||m.ngDoCheck)&&((e.preOrderCheckHooks??=[]).push(r.index),h=!0),d++}uP(e,r,s)}function uP(e,t,r){for(let n=t.directiveStart;n<t.directiveEnd;n++){let i=e.data[n];if(r===null||!r.has(i))ab(0,t,i,n),ab(1,t,i,n),lb(t,n,!1);else{let s=r.get(i);cb(0,t,s,n),cb(1,t,s,n),lb(t,n,!0)}}}function ab(e,t,r,n){let i=e===0?r.inputs:r.outputs;for(let s in i)if(i.hasOwnProperty(s)){let o;e===0?o=t.inputs??={}:o=t.outputs??={},o[s]??=[],o[s].push(n),AS(t,s)}}function cb(e,t,r,n){let i=e===0?r.inputs:r.outputs;for(let s in i)if(i.hasOwnProperty(s)){let o=i[s],a;e===0?a=t.hostDirectiveInputs??={}:a=t.hostDirectiveOutputs??={},a[o]??=[],a[o].push(n,s),AS(t,o)}}function AS(e,t){t==="class"?e.flags|=8:t==="style"&&(e.flags|=16)}function lb(e,t,r){let{attrs:n,inputs:i,hostDirectiveInputs:s}=e;if(n===null||!r&&i===null||r&&s===null||Jg(e)){e.initialInputs??=[],e.initialInputs.push(null);return}let o=null,a=0;for(;a<n.length;){let l=n[a];if(l===0){a+=4;continue}else if(l===5){a+=2;continue}else if(typeof l=="number")break;if(!r&&i.hasOwnProperty(l)){let c=i[l];for(let h of c)if(h===t){o??=[],o.push(l,n[a+1]);break}}else if(r&&s.hasOwnProperty(l)){let c=s[l];for(let h=0;h<c.length;h+=2)if(c[h]===t){o??=[],o.push(c[h+1],n[a+1]);break}}a+=2}e.initialInputs??=[],e.initialInputs.push(o)}function dP(e,t,r,n,i){e.data[n]=i;let s=i.factory||(i.factory=Ho(i.type,!0)),o=new Yo(s,qr(i),bt);e.blueprint[n]=o,r[n]=o,fP(e,t,n,cS(e,r,i.hostVars,Ui),i)}function fP(e,t,r,n,i){let s=i.hostBindings;if(s){let o=e.hostBindingOpCodes;o===null&&(o=e.hostBindingOpCodes=[]);let a=~t.index;pP(o)!=a&&o.push(a),o.push(r,n,s)}}function pP(e){let t=e.length;for(;t>0;){let r=e[--t];if(typeof r=="number"&&r<0)return r}return 0}function hP(e,t,r){if(r){if(t.exportAs)for(let n=0;n<t.exportAs.length;n++)r[t.exportAs[n]]=e;qr(t)&&(r[""]=e)}}function mP(e,t,r){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+r,e.providerIndexes=t}function MS(e,t,r,n,i,s,o,a){let l=t.consts,c=oa(l,o),h=Bd(t,e,2,n,c);return s&&NS(t,r,h,oa(l,a),i),h.mergedAttrs=Gc(h.mergedAttrs,h.attrs),h.attrs!==null&&sb(h,h.attrs,!1),h.mergedAttrs!==null&&sb(h,h.mergedAttrs,!0),t.queries!==null&&t.queries.elementStart(t,h),h}function OS(e,t){hC(e,t),zb(t)&&e.queries.elementEnd(t)}var Qm=class extends ao{ngModule;constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let t=$o(e);return new Zc(t,this.ngModule)}};function gP(e){return Object.keys(e).map(t=>{let[r,n,i]=e[t],s={propName:r,templateName:t,isSignal:(n&Od.SignalBased)!==0};return i&&(s.transform=i),s})}function vP(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function yP(e,t,r){let n=t instanceof Gn?t:t?.injector;return n&&e.getStandaloneInjector!==null&&(n=e.getStandaloneInjector(n)||n),n?new xm(r,n):r}function _P(e){let t=e.get(un,null);if(t===null)throw new Oe(407,!1);let r=e.get(iP,null),n=e.get(Ni,null);return{rendererFactory:t,sanitizer:r,changeDetectionScheduler:n}}function EP(e,t){let r=(e.selectors[0][0]||"div").toLowerCase();return iS(t,r,r==="svg"?Xb:r==="math"?dA:null)}var Zc=class extends gd{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;get inputs(){return gP(this.componentDef.inputs)}get outputs(){return vP(this.componentDef.outputs)}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=JM(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,r,n){vt(22);let i=$e(null);try{let s=this.componentDef,o=r?["ng-version","19.2.0"]:QM(this.componentDef.selectors[0]),a=Qg(0,null,null,1,0,null,null,null,null,[o],null),l=yP(s,n||this.ngModule,e),c=_P(l),h=c.rendererFactory.createRenderer(null,s),d=r?cO(h,r,s.encapsulation,l):EP(s,h),f=ev(null,a,null,512|aS(s),null,null,c,h,l,null,jC(d,l,!0));f[wn]=d,Fg(f);let g=null;try{let m=MS(wn,a,f,"#host",()=>[this.componentDef],!0,0);d&&(sS(h,d,m),rl(d,f)),nv(a,f,m),WC(a,m,f),OS(a,m),t!==void 0&&wP(m,this.ngContentSelectors,t),g=Kr(m.index,f),f[nn]=g[nn],iv(a,f,null)}catch(m){throw g!==null&&Lm(g),Lm(f),m}finally{vt(23),Bg()}return new eg(this.componentType,f)}finally{$e(i)}}},eg=class extends Xm{_rootLView;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t){super(),this._rootLView=t,this._tNode=Ag(t[Te],wn),this.location=fa(this._tNode,t),this.instance=Kr(this._tNode.index,t)[nn],this.hostView=this.changeDetectorRef=new Ko(t,void 0,!1),this.componentType=e}setInput(e,t){let r=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let n=this._rootLView,i=rv(r,n[Te],n,e,t);this.previousInputValues.set(e,t);let s=Kr(r.index,n);lv(s,1)}get injector(){return new Uo(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function wP(e,t,r){let n=e.projection=[];for(let i=0;i<t.length;i++){let s=r[i];n.push(s!=null&&s.length?Array.from(s):null)}}var ni=(()=>{class e{static __NG_ELEMENT_ID__=bP}return e})();function bP(){let e=pr();return kS(e,Ge())}var CP=ni,PS=class extends CP{_lContainer;_hostTNode;_hostLView;constructor(e,t,r){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=r}get element(){return fa(this._hostTNode,this._hostLView)}get injector(){return new Uo(this._hostTNode,this._hostLView)}get parentInjector(){let e=jg(this._hostTNode,this._hostLView);if(gC(e)){let t=cd(e,this._hostLView),r=ad(e),n=t[Te].data[r+8];return new Uo(n,t)}else return new Uo(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=ub(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-Tn}createEmbeddedView(e,t,r){let n,i;typeof r=="number"?n=r:r!=null&&(n=r.index,i=r.injector);let s=Kc(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,s);return this.insertImpl(o,n,qc(this._hostTNode,s)),o}createComponent(e,t,r,n,i){let s=e&&!aA(e),o;if(s)o=t;else{let g=t||{};o=g.index,r=g.injector,n=g.projectableNodes,i=g.environmentInjector||g.ngModuleRef}let a=s?e:new Zc($o(e)),l=r||this.parentInjector;if(!i&&a.ngModule==null){let g=(s?l:this.parentInjector).get(Gn,null);g&&(i=g)}let c=$o(a.componentType??{}),h=Kc(this._lContainer,c?.id??null),d=h?.firstChild??null,f=a.create(l,n,d,i);return this.insertImpl(f.hostView,o,qc(this._hostTNode,h)),f}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,r){let n=e._lView;if(pA(n)){let o=this.indexOf(e);if(o!==-1)this.detach(o);else{let a=n[xn],l=new PS(a,a[Pr],a[xn]);l.detach(l.indexOf(e))}}let i=this._adjustIndex(t),s=this._lContainer;return Fd(s,n,i,r),e.attachToViewContainerRef(),Ab(dm(s),i,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=ub(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),r=Yc(this._lContainer,t);r&&(td(dm(this._lContainer),t),kd(r[Te],r))}detach(e){let t=this._adjustIndex(e,-1),r=Yc(this._lContainer,t);return r&&td(dm(this._lContainer),t)!=null?new Ko(r):null}_adjustIndex(e,t=0){return e??this.length+t}};function ub(e){return e[od]}function dm(e){return e[od]||(e[od]=[])}function kS(e,t){let r,n=t[e.index];return Li(n)?r=n:(r=IS(n,t,null,e),t[e.index]=r,tv(t,r)),DP(r,t,e,n),new PS(r,e,t)}function SP(e,t){let r=e[ln],n=r.createComment(""),i=Jr(t,e),s=r.parentNode(i);return hd(r,s,n,r.nextSibling(i),!1),n}var DP=xP,IP=()=>!1;function TP(e,t,r){return IP(e,t,r)}function xP(e,t,r,n){if(e[Go])return;let i;r.type&8?i=Yr(n):i=SP(t,r),e[Go]=i}var tg=class V0{queryList;matches=null;constructor(t){this.queryList=t}clone(){return new V0(this.queryList)}setDirty(){this.queryList.setDirty()}},ng=class U0{queries;constructor(t=[]){this.queries=t}createEmbeddedView(t){let r=t.queries;if(r!==null){let n=t.contentQueries!==null?t.contentQueries[0]:r.length,i=[];for(let s=0;s<n;s++){let o=r.getByIndex(s),a=this.queries[o.indexInDeclarationView];i.push(a.clone())}return new U0(i)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}finishViewCreation(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let r=0;r<this.queries.length;r++)dv(t,r).matches!==null&&this.queries[r].setDirty()}},rg=class{flags;read;predicate;constructor(e,t,r=null){this.flags=t,this.read=r,typeof e=="string"?this.predicate=LP(e):this.predicate=e}},ig=class B0{queries;constructor(t=[]){this.queries=t}elementStart(t,r){for(let n=0;n<this.queries.length;n++)this.queries[n].elementStart(t,r)}elementEnd(t){for(let r=0;r<this.queries.length;r++)this.queries[r].elementEnd(t)}embeddedTView(t){let r=null;for(let n=0;n<this.length;n++){let i=r!==null?r.length:0,s=this.getByIndex(n).embeddedTView(t,i);s&&(s.indexInDeclarationView=n,r!==null?r.push(s):r=[s])}return r!==null?new B0(r):null}template(t,r){for(let n=0;n<this.queries.length;n++)this.queries[n].template(t,r)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}},og=class F0{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(t,r=-1){this.metadata=t,this._declarationNodeIndex=r}elementStart(t,r){this.isApplyingToNode(r)&&this.matchTNode(t,r)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,r){this.elementStart(t,r)}embeddedTView(t,r){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,r),new F0(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let r=this._declarationNodeIndex,n=t.parent;for(;n!==null&&n.type&8&&n.index!==r;)n=n.parent;return r===(n!==null?n.index:-1)}return this._appliesToNextNode}matchTNode(t,r){let n=this.metadata.predicate;if(Array.isArray(n))for(let i=0;i<n.length;i++){let s=n[i];this.matchTNodeWithReadOption(t,r,RP(r,s)),this.matchTNodeWithReadOption(t,r,Zu(r,t,s,!1,!1))}else n===Or?r.type&4&&this.matchTNodeWithReadOption(t,r,-1):this.matchTNodeWithReadOption(t,r,Zu(r,t,n,!1,!1))}matchTNodeWithReadOption(t,r,n){if(n!==null){let i=this.metadata.read;if(i!==null)if(i===Nt||i===ni||i===Or&&r.type&4)this.addMatch(r.index,-2);else{let s=Zu(r,t,i,!1,!1);s!==null&&this.addMatch(r.index,s)}else this.addMatch(r.index,n)}}addMatch(t,r){this.matches===null?this.matches=[t,r]:this.matches.push(t,r)}};function RP(e,t){let r=e.localNames;if(r!==null){for(let n=0;n<r.length;n+=2)if(r[n]===t)return r[n+1]}return null}function NP(e,t){return e.type&11?fa(e,t):e.type&4?uv(e,t):null}function AP(e,t,r,n){return r===-1?NP(t,e):r===-2?MP(e,t,n):zc(e,e[Te],r,t)}function MP(e,t,r){if(r===Nt)return fa(t,e);if(r===Or)return uv(t,e);if(r===ni)return kS(t,e)}function LS(e,t,r,n){let i=t[Ri].queries[n];if(i.matches===null){let s=e.data,o=r.matches,a=[];for(let l=0;o!==null&&l<o.length;l+=2){let c=o[l];if(c<0)a.push(null);else{let h=s[c];a.push(AP(t,h,o[l+1],r.metadata.read))}}i.matches=a}return i.matches}function sg(e,t,r,n){let i=e.queries.getByIndex(r),s=i.matches;if(s!==null){let o=LS(e,t,i,r);for(let a=0;a<s.length;a+=2){let l=s[a];if(l>0)n.push(o[a/2]);else{let c=s[a+1],h=t[-l];for(let d=Tn;d<h.length;d++){let f=h[d];f[Wo]===f[xn]&&sg(f[Te],f,c,n)}if(h[ia]!==null){let d=h[ia];for(let f=0;f<d.length;f++){let g=d[f];sg(g[Te],g,c,n)}}}}}return n}function OP(e,t){return e[Ri].queries[t].queryList}function PP(e,t,r){let n=new km((r&4)===4);return gA(e,t,n,n.destroy),(t[Ri]??=new ng).queries.push(new tg(n))-1}function kP(e,t,r){let n=dn();return n.firstCreatePass&&(FP(n,new rg(e,t,r),-1),(t&2)===2&&(n.staticViewQueries=!0)),PP(n,Ge(),t)}function LP(e){return e.split(",").map(t=>t.trim())}function FP(e,t,r){e.queries===null&&(e.queries=new ig),e.queries.track(new og(t,r))}function dv(e,t){return e.queries.getByIndex(t)}function BP(e,t){let r=e[Te],n=dv(r,t);return n.crossesNgTemplate?sg(r,e,t,[]):LS(r,e,n,t)}var Oi=class{},vd=class extends Oi{injector;componentFactoryResolver=new Qm(this);instance=null;constructor(e){super();let t=new Hc([...e.providers,{provide:Oi,useValue:this},{provide:ao,useValue:this.componentFactoryResolver}],e.parent||Dd(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function VP(e,t,r=null){return new vd({providers:e,parent:t,debugName:r,runEnvironmentInitializers:!0}).injector}var UP=(()=>{class e{_injector;cachedInjectors=new Map;constructor(r){this._injector=r}getOrCreateStandaloneInjector(r){if(!r.standalone)return null;if(!this.cachedInjectors.has(r)){let n=Fb(!1,r.type),i=n.length>0?VP([n],this._injector,`Standalone[${r.type.name}]`):null;this.cachedInjectors.set(r,i)}return this.cachedInjectors.get(r)}ngOnDestroy(){try{for(let r of this.cachedInjectors.values())r!==null&&r.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=oe({token:e,providedIn:"environment",factory:()=>new e(et(Gn))})}return e})();function ct(e){return bd(()=>{let t=FS(e),r=re(w({},t),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===NC.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?i=>i.get(UP).getOrCreateStandaloneInjector(r):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||Zr.Emulated,styles:e.styles||so,_:null,schemas:e.schemas||null,tView:null,id:""});t.standalone&&lo("NgStandalone"),BS(r);let n=e.dependencies;return r.directiveDefs=db(n,!1),r.pipeDefs=db(n,!0),r.id=GP(r),r})}function HP(e){return $o(e)||Pb(e)}function jP(e){return e!==null}function $P(e,t){if(e==null)return jo;let r={};for(let n in e)if(e.hasOwnProperty(n)){let i=e[n],s,o,a,l;Array.isArray(i)?(a=i[0],s=i[1],o=i[2]??s,l=i[3]||null):(s=i,o=i,a=Od.None,l=null),r[s]=[n,a,l],t[s]=o}return r}function WP(e){if(e==null)return jo;let t={};for(let r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function kr(e){return bd(()=>{let t=FS(e);return BS(t),t})}function Qo(e){return{type:e.type,name:e.name,factory:null,pure:e.pure!==!1,standalone:e.standalone??!0,onDestroy:e.type.prototype.ngOnDestroy||null}}function FS(e){let t={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputConfig:e.inputs||jo,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||so,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:$P(e.inputs,t),outputs:WP(e.outputs),debugInfo:null}}function BS(e){e.features?.forEach(t=>t(e))}function db(e,t){if(!e)return null;let r=t?kb:HP;return()=>(typeof e=="function"?e():e).map(n=>r(n)).filter(jP)}function GP(e){let t=0,r=typeof e.consts=="function"?"":e.consts,n=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,r,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery];for(let i of n.join("|"))t=Math.imul(31,t)+i.charCodeAt(0)<<0;return t+=2147483648,"c"+t}function zP(e){return Object.getPrototypeOf(e.prototype).constructor}function ri(e){let t=zP(e.type),r=!0,n=[e];for(;t;){let i;if(qr(e))i=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new Oe(903,!1);i=t.\u0275dir}if(i){if(r){n.push(i);let o=e;o.inputs=fm(e.inputs),o.declaredInputs=fm(e.declaredInputs),o.outputs=fm(e.outputs);let a=i.hostBindings;a&&XP(e,a);let l=i.viewQuery,c=i.contentQueries;if(l&&KP(e,l),c&&ZP(e,c),qP(e,i),DN(e.outputs,i.outputs),qr(i)&&i.data.animation){let h=e.data;h.animation=(h.animation||[]).concat(i.data.animation)}}let s=i.features;if(s)for(let o=0;o<s.length;o++){let a=s[o];a&&a.ngInherit&&a(e),a===ri&&(r=!1)}}t=Object.getPrototypeOf(t)}YP(n)}function qP(e,t){for(let r in t.inputs){if(!t.inputs.hasOwnProperty(r)||e.inputs.hasOwnProperty(r))continue;let n=t.inputs[r];n!==void 0&&(e.inputs[r]=n,e.declaredInputs[r]=t.declaredInputs[r])}}function YP(e){let t=0,r=null;for(let n=e.length-1;n>=0;n--){let i=e[n];i.hostVars=t+=i.hostVars,i.hostAttrs=Gc(i.hostAttrs,r=Gc(r,i.hostAttrs))}}function fm(e){return e===jo?{}:e===so?[]:e}function KP(e,t){let r=e.viewQuery;r?e.viewQuery=(n,i)=>{t(n,i),r(n,i)}:e.viewQuery=t}function ZP(e,t){let r=e.contentQueries;r?e.contentQueries=(n,i,s)=>{t(n,i,s),r(n,i,s)}:e.contentQueries=t}function XP(e,t){let r=e.hostBindings;r?e.hostBindings=(n,i)=>{t(n,i),r(n,i)}:e.hostBindings=t}function VS(e){return e!==null&&(typeof e=="function"||typeof e=="object")}function US(e,t,r){return e[t]=r}function Pi(e,t,r){let n=e[t];return Object.is(n,r)?!1:(e[t]=r,!0)}function JP(e,t,r,n){let i=Pi(e,t,r);return Pi(e,t+1,n)||i}function QP(e,t,r,n,i,s,o,a,l){let c=t.consts,h=Bd(t,e,4,o||null,a||null);rC()&&NS(t,r,h,oa(c,l),pS),h.mergedAttrs=Gc(h.mergedAttrs,h.attrs),hC(t,h);let d=h.tView=Qg(2,h,n,i,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c,null);return t.queries!==null&&(t.queries.template(t,h),d.queries=t.queries.embeddedTView(h)),h}function ag(e,t,r,n,i,s,o,a,l,c){let h=r+wn,d=t.firstCreatePass?QP(h,t,e,n,i,s,o,a,l):t.data[h];da(d,!1);let f=e1(t,e,d,r);Ug()&&av(t,e,f,d),rl(f,e);let g=IS(f,e,f,d);return e[h]=g,tv(e,g),TP(g,d,e),Ng(d)&&nv(t,e,d),l!=null&&dS(e,d,c),d}function At(e,t,r,n,i,s,o,a){let l=Ge(),c=dn(),h=oa(c.consts,s);return ag(l,c,e,t,r,n,i,h,o,a),At}var e1=t1;function t1(e,t,r,n){return Hg(!0),t[ln].createComment("")}var HS=new he(""),n1=(()=>{class e{static \u0275prov=oe({token:e,providedIn:"root",factory:()=>new cg})}return e})(),cg=class{queuedEffectCount=0;queues=new Map;schedule(e){this.enqueue(e)}remove(e){let t=e.zone,r=this.queues.get(t);r.has(e)&&(r.delete(e),this.queuedEffectCount--)}enqueue(e){let t=e.zone;this.queues.has(t)||this.queues.set(t,new Set);let r=this.queues.get(t);r.has(e)||(this.queuedEffectCount++,r.add(e))}flush(){for(;this.queuedEffectCount>0;)for(let[e,t]of this.queues)e===null?this.flushQueue(t):e.run(()=>this.flushQueue(t))}flushQueue(e){for(let t of e)e.delete(t),this.queuedEffectCount--,t.run()}};function fv(e){return!!e&&typeof e.then=="function"}function jS(e){return!!e&&typeof e.subscribe=="function"}var r1=new he(""),$S=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((r,n)=>{this.resolve=r,this.reject=n});appInits=O(r1,{optional:!0})??[];injector=O(yt);constructor(){}runInitializers(){if(this.initialized)return;let r=[];for(let i of this.appInits){let s=Hb(this.injector,i);if(fv(s))r.push(s);else if(jS(s)){let o=new Promise((a,l)=>{s.subscribe({complete:a,error:l})});r.push(o)}}let n=()=>{this.done=!0,this.resolve()};Promise.all(r).then(()=>{n()}).catch(i=>{this.reject(i)}),r.length===0&&n(),this.initialized=!0}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),i1=new he("");function o1(){tw(()=>{throw new Oe(600,!1)})}function s1(e){return e.isBoundToModule}var a1=10,fr=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=O(aM);afterRenderManager=O(UC);zonelessEnabled=O(Rd);rootEffectScheduler=O(n1);dirtyFlags=0;tracingSnapshot=null;externalTestViews=new Set;afterTick=new ie;get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];isStable=O(Nd).hasPendingTasks.pipe(ur(r=>!r));constructor(){O(pa,{optional:!0})}whenStable(){let r;return new Promise(n=>{r=this.isStable.subscribe({next:i=>{i&&n()}})}).finally(()=>{r.unsubscribe()})}_injector=O(Gn);_rendererFactory=null;get injector(){return this._injector}bootstrap(r,n){vt(10);let i=r instanceof gd;if(!this._injector.get($S).done){let d=!i&&KN(r),f=!1;throw new Oe(405,f)}let s;i?s=r:s=this._injector.get(ao).resolveComponentFactory(r),this.componentTypes.push(s.componentType);let o=s1(s)?void 0:this._injector.get(Oi),a=n||s.selector,l=s.create(yt.NULL,[],a,o),c=l.location.nativeElement,h=l.injector.get(HS,null);return h?.registerApplication(c),l.onDestroy(()=>{this.detachView(l.hostView),Xu(this.components,l),h?.unregisterApplication(c)}),this._loadComponent(l),vt(11,l),l}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){vt(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(Kg.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new Oe(101,!1);let r=$e(null);try{this._runningTick=!0,this.synchronize()}catch(n){this.internalErrorHandler(n)}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,$e(r),this.afterTick.next(),vt(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(un,null,{optional:!0}));let r=0;for(;this.dirtyFlags!==0&&r++<a1;)vt(14),this.synchronizeOnce(),vt(15)}synchronizeOnce(){if(this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush()),this.dirtyFlags&7){let r=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:n,notifyErrorHandler:i}of this.allViews)c1(n,i,r,this.zonelessEnabled);if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}else this._rendererFactory?.begin?.(),this._rendererFactory?.end?.();this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:r})=>Td(r))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(r){let n=r;this._views.push(n),n.attachToAppRef(this)}detachView(r){let n=r;Xu(this._views,n),n.detachFromAppRef()}_loadComponent(r){this.attachView(r.hostView),this.tick(),this.components.push(r),this._injector.get(i1,[]).forEach(n=>n(r))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(r=>r()),this._views.slice().forEach(r=>r.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(r){return this._destroyListeners.push(r),()=>Xu(this._destroyListeners,r)}destroy(){if(this._destroyed)throw new Oe(406,!1);let r=this._injector;r.destroy&&!r.destroyed&&r.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Xu(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}function c1(e,t,r,n){!r&&!Td(e)||bS(e,t,r&&!n?0:1)}function fo(e,t,r,n){let i=Ge(),s=nl();if(Pi(i,s,t)){let o=dn(),a=Vg();gO(a,i,e,t,r,n)}return fo}function WS(e,t,r,n){return Pi(e,nl(),r)?t+Jc(r)+n:Ui}function zu(e,t){return e<<17|t<<2}function Zo(e){return e>>17&32767}function l1(e){return(e&2)==2}function u1(e,t){return e&131071|t<<17}function lg(e){return e|2}function sa(e){return(e&131068)>>2}function pm(e,t){return e&-131069|t<<2}function d1(e){return(e&1)===1}function ug(e){return e|1}function f1(e,t,r,n,i,s){let o=s?t.classBindings:t.styleBindings,a=Zo(o),l=sa(o);e[n]=r;let c=!1,h;if(Array.isArray(r)){let d=r;h=d[1],(h===null||Qc(d,h)>0)&&(c=!0)}else h=r;if(i)if(l!==0){let d=Zo(e[a+1]);e[n+1]=zu(d,a),d!==0&&(e[d+1]=pm(e[d+1],n)),e[a+1]=u1(e[a+1],n)}else e[n+1]=zu(a,0),a!==0&&(e[a+1]=pm(e[a+1],n)),a=n;else e[n+1]=zu(l,0),a===0?a=n:e[l+1]=pm(e[l+1],n),l=n;c&&(e[n+1]=lg(e[n+1])),fb(e,h,n,!0),fb(e,h,n,!1),p1(t,h,e,n,s),o=zu(a,l),s?t.classBindings=o:t.styleBindings=o}function p1(e,t,r,n,i){let s=i?e.residualClasses:e.residualStyles;s!=null&&typeof t=="string"&&Qc(s,t)>=0&&(r[n+1]=ug(r[n+1]))}function fb(e,t,r,n){let i=e[r+1],s=t===null,o=n?Zo(i):sa(i),a=!1;for(;o!==0&&(a===!1||s);){let l=e[o],c=e[o+1];h1(l,t)&&(a=!0,e[o+1]=n?ug(c):lg(c)),o=n?Zo(c):sa(c)}a&&(e[r+1]=n?lg(i):ug(i))}function h1(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t=="string"?Qc(e,t)>=0:!1}function be(e,t,r){let n=Ge(),i=nl();if(Pi(n,i,t)){let s=dn(),o=Vg();fS(s,o,n,e,t,n[ln],r,!1)}return be}function pb(e,t,r,n,i){rv(t,e,r,i?"class":"style",n)}function po(e,t,r){return GS(e,t,r,!1),po}function ii(e,t){return GS(e,t,null,!0),ii}function GS(e,t,r,n){let i=Ge(),s=dn(),o=TA(2);if(s.firstUpdatePass&&g1(s,e,o,n),t!==Ui&&Pi(i,o,t)){let a=s.data[co()];w1(s,a,i,i[ln],e,i[o+1]=b1(t,r),n,o)}}function m1(e,t){return t>=e.expandoStartIndex}function g1(e,t,r,n){let i=e.data;if(i[r+1]===null){let s=i[co()],o=m1(e,r);C1(s,n)&&t===null&&!o&&(t=!1),t=v1(i,s,t,n),f1(i,s,t,r,o,n)}}function v1(e,t,r,n){let i=AA(e),s=n?t.residualClasses:t.residualStyles;if(i===null)(n?t.classBindings:t.styleBindings)===0&&(r=hm(null,e,t,r,n),r=Xc(r,t.attrs,n),s=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i)if(r=hm(i,e,t,r,n),s===null){let a=y1(e,t,n);a!==void 0&&Array.isArray(a)&&(a=hm(null,e,t,a[1],n),a=Xc(a,t.attrs,n),_1(e,t,n,a))}else s=E1(e,t,n)}return s!==void 0&&(n?t.residualClasses=s:t.residualStyles=s),r}function y1(e,t,r){let n=r?t.classBindings:t.styleBindings;if(sa(n)!==0)return e[Zo(n)]}function _1(e,t,r,n){let i=r?t.classBindings:t.styleBindings;e[Zo(i)]=n}function E1(e,t,r){let n,i=t.directiveEnd;for(let s=1+t.directiveStylingLast;s<i;s++){let o=e[s].hostAttrs;n=Xc(n,o,r)}return Xc(n,t.attrs,r)}function hm(e,t,r,n,i){let s=null,o=r.directiveEnd,a=r.directiveStylingLast;for(a===-1?a=r.directiveStart:a++;a<o&&(s=t[a],n=Xc(n,s.hostAttrs,i),s!==e);)a++;return e!==null&&(r.directiveStylingLast=a),n}function Xc(e,t,r){let n=r?1:2,i=-1;if(t!==null)for(let s=0;s<t.length;s++){let o=t[s];typeof o=="number"?i=o:i===n&&(Array.isArray(e)||(e=e===void 0?[]:["",e]),qN(e,o,r?!0:t[++s]))}return e===void 0?null:e}function w1(e,t,r,n,i,s,o,a){if(!(t.type&3))return;let l=e.data,c=l[a+1],h=d1(c)?hb(l,t,r,i,sa(c),o):void 0;if(!yd(h)){yd(s)||l1(c)&&(s=hb(l,null,r,i,a,o));let d=Jb(co(),r);kO(n,o,d,i,s)}}function hb(e,t,r,n,i,s){let o=t===null,a;for(;i>0;){let l=e[i],c=Array.isArray(l),h=c?l[1]:l,d=h===null,f=r[i+1];f===Ui&&(f=d?so:void 0);let g=d?im(f,n):h===n?f:void 0;if(c&&!yd(g)&&(g=im(l,n)),yd(g)&&(a=g,o))return a;let m=e[i+1];i=o?Zo(m):sa(m)}if(t!==null){let l=s?t.residualClasses:t.residualStyles;l!=null&&(a=im(l,n))}return a}function yd(e){return e!==void 0}function b1(e,t){return e==null||e===""||(typeof t=="string"?e=e+t:typeof e=="object"&&(e=dr(ei(e)))),e}function C1(e,t){return(e.flags&(t?8:16))!==0}var dg=class{destroy(e){}updateValue(e,t){}swap(e,t){let r=Math.min(e,t),n=Math.max(e,t),i=this.detach(n);if(n-r>1){let s=this.detach(r);this.attach(r,i),this.attach(n,s)}else this.attach(r,i)}move(e,t){this.attach(t,this.detach(e))}};function mm(e,t,r,n,i){return e===r&&Object.is(t,n)?1:Object.is(i(e,t),i(r,n))?-1:0}function S1(e,t,r){let n,i,s=0,o=e.length-1,a;if(Array.isArray(t)){let l=t.length-1;for(;s<=o&&s<=l;){let c=e.at(s),h=t[s],d=mm(s,c,s,h,r);if(d!==0){d<0&&e.updateValue(s,h),s++;continue}let f=e.at(o),g=t[l],m=mm(o,f,l,g,r);if(m!==0){m<0&&e.updateValue(o,g),o--,l--;continue}let b=r(s,c),I=r(o,f),A=r(s,h);if(Object.is(A,I)){let F=r(l,g);Object.is(F,b)?(e.swap(s,o),e.updateValue(o,g),l--,o--):e.move(o,s),e.updateValue(s,h),s++;continue}if(n??=new _d,i??=gb(e,s,o,r),fg(e,n,s,A))e.updateValue(s,h),s++,o++;else if(i.has(A))n.set(b,e.detach(s)),o--;else{let F=e.create(s,t[s]);e.attach(s,F),s++,o++}}for(;s<=l;)mb(e,n,r,s,t[s]),s++}else if(t!=null){let l=t[Symbol.iterator](),c=l.next();for(;!c.done&&s<=o;){let h=e.at(s),d=c.value,f=mm(s,h,s,d,r);if(f!==0)f<0&&e.updateValue(s,d),s++,c=l.next();else{n??=new _d,i??=gb(e,s,o,r);let g=r(s,d);if(fg(e,n,s,g))e.updateValue(s,d),s++,o++,c=l.next();else if(!i.has(g))e.attach(s,e.create(s,d)),s++,o++,c=l.next();else{let m=r(s,h);n.set(m,e.detach(s)),o--}}}for(;!c.done;)mb(e,n,r,e.length,c.value),c=l.next()}for(;s<=o;)e.destroy(e.detach(o--));n?.forEach(l=>{e.destroy(l)})}function fg(e,t,r,n){return t!==void 0&&t.has(n)?(e.attach(r,t.get(n)),t.delete(n),!0):!1}function mb(e,t,r,n,i){if(fg(e,t,n,r(n,i)))e.updateValue(n,i);else{let s=e.create(n,i);e.attach(n,s)}}function gb(e,t,r,n){let i=new Set;for(let s=t;s<=r;s++)i.add(n(s,e.at(s)));return i}var _d=class{kvMap=new Map;_vMap=void 0;has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let t=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(e,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,t){if(this.kvMap.has(e)){let r=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let n=this._vMap;for(;n.has(r);)r=n.get(r);n.set(r,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,r]of this.kvMap)if(e(r,t),this._vMap!==void 0){let n=this._vMap;for(;n.has(r);)r=n.get(r),e(r,t)}}};function Vt(e,t){lo("NgControlFlow");let r=Ge(),n=nl(),i=r[n]!==Ui?r[n]:-1,s=i!==-1?Ed(r,wn+i):void 0,o=0;if(Pi(r,n,e)){let a=$e(null);try{if(s!==void 0&&xS(s,o),e!==-1){let l=wn+e,c=Ed(r,l),h=gg(r[Te],l),d=Kc(c,h.tView.ssrId),f=Pd(r,h,t,{dehydratedView:d});Fd(c,f,o,qc(h,d))}}finally{$e(a)}}else if(s!==void 0){let a=TS(s,o);a!==void 0&&(a[nn]=t)}}var pg=class{lContainer;$implicit;$index;constructor(e,t,r){this.lContainer=e,this.$implicit=t,this.$index=r}get $count(){return this.lContainer.length-Tn}};function Lr(e,t){return t}var hg=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,r){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=r}};function Mt(e,t,r,n,i,s,o,a,l,c,h,d,f){lo("NgControlFlow");let g=Ge(),m=dn(),b=l!==void 0,I=Ge(),A=a?o.bind(I[Mr][nn]):o,F=new hg(b,A);I[wn+e]=F,ag(g,m,e+1,t,r,n,i,oa(m.consts,s)),b&&ag(g,m,e+2,l,c,h,d,oa(m.consts,f))}var mg=class extends dg{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,t,r){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=r}get length(){return this.lContainer.length-Tn}at(e){return this.getLView(e)[nn].$implicit}attach(e,t){let r=t[jc];this.needsIndexUpdate||=e!==this.length,Fd(this.lContainer,t,e,qc(this.templateTNode,r))}detach(e){return this.needsIndexUpdate||=e!==this.length-1,D1(this.lContainer,e)}create(e,t){let r=Kc(this.lContainer,this.templateTNode.tView.ssrId),n=Pd(this.hostLView,this.templateTNode,new pg(this.lContainer,t,e),{dehydratedView:r});return this.operationsCounter?.recordCreate(),n}destroy(e){kd(e[Te],e),this.operationsCounter?.recordDestroy()}updateValue(e,t){this.getLView(e)[nn].$implicit=t}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e<this.length;e++)this.getLView(e)[nn].$index=e}getLView(e){return I1(this.lContainer,e)}};function Ot(e){let t=$e(null),r=co();try{let n=Ge(),i=n[Te],s=n[r],o=r+1,a=Ed(n,o);if(s.liveCollection===void 0){let c=gg(i,o);s.liveCollection=new mg(a,n,c)}else s.liveCollection.reset();let l=s.liveCollection;if(S1(l,e,s.trackByFn),l.updateIndexes(),s.hasEmptyBlock){let c=nl(),h=l.length===0;if(Pi(n,c,h)){let d=r+2,f=Ed(n,d);if(h){let g=gg(i,d),m=Kc(f,g.tView.ssrId),b=Pd(n,g,void 0,{dehydratedView:m});Fd(f,b,0,qc(g,m))}else xS(f,0)}}}finally{$e(t)}}function Ed(e,t){return e[t]}function D1(e,t){return Yc(e,t)}function I1(e,t){return TS(e,t)}function gg(e,t){return Ag(e,t)}function K(e,t,r,n){let i=Ge(),s=dn(),o=wn+e,a=i[ln],l=s.firstCreatePass?MS(o,s,i,t,pS,rC(),r,n):s.data[o],c=T1(s,i,l,a,t,e);i[o]=c;let h=Ng(l);return da(l,!0),sS(a,c,l),!mS(l)&&Ug()&&av(s,i,c,l),(vA()===0||h)&&rl(c,i),yA(),h&&(nv(s,i,l),WC(s,l,i)),n!==null&&dS(i,l),K}function X(){let e=pr();oC()?SA():(e=e.parent,da(e,!1));let t=e;wA(t)&&bA(),_A();let r=dn();return r.firstCreatePass&&OS(r,t),t.classesWithoutHost!=null&&VA(t)&&pb(r,t,Ge(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&UA(t)&&pb(r,t,Ge(),t.stylesWithoutHost,!1),X}function Ne(e,t,r,n){return K(e,t,r,n),X(),Ne}var T1=(e,t,r,n,i,s)=>(Hg(!0),iS(n,i,kA()));function fn(){return Ge()}var wd="en-US",x1=wd;function R1(e){typeof e=="string"&&(x1=e.toLowerCase().replace(/_/g,"-"))}var N1=(e,t,r)=>{};function Qe(e,t,r,n){let i=Ge(),s=dn(),o=pr();return M1(s,i,i[ln],o,e,t,n),Qe}function A1(e,t,r,n){let i=e.cleanup;if(i!=null)for(let s=0;s<i.length-1;s+=2){let o=i[s];if(o===r&&i[s+1]===n){let a=t[rd],l=i[s+2];return a.length>l?a[l]:null}typeof o=="string"&&(s+=2)}return null}function M1(e,t,r,n,i,s,o){let a=Ng(n),l=e.firstCreatePass?nC(e):null,c=t[nn],h=tC(t),d=!0;if(n.type&3||o){let f=Jr(n,t),g=o?o(f):f,m=h.length,b=o?A=>o(Yr(A[n.index])):n.index,I=null;if(!o&&a&&(I=A1(e,t,i,n.index)),I!==null){let A=I.__ngLastListenerFn__||I;A.__ngNextListenerFn__=s,I.__ngLastListenerFn__=s,d=!1}else{s=_b(n,t,c,s),N1(f,i,s);let A=r.listen(g,i,s);h.push(s,A),l&&l.push(i,b,m,m+1)}}else s=_b(n,t,c,s);if(d){let f=n.outputs?.[i],g=n.hostDirectiveOutputs?.[i];if(g&&g.length)for(let m=0;m<g.length;m+=2){let b=g[m],I=g[m+1];vb(n,e,t,b,I,i,s,h,l)}if(f&&f.length)for(let m of f)vb(n,e,t,m,i,i,s,h,l)}}function vb(e,t,r,n,i,s,o,a,l){let c=r[n],h=t.data[n].outputs[i],d=c[h].subscribe(o),f=a.length;a.push(o,d),l&&l.push(s,e.index,f,-(f+1))}function yb(e,t,r,n){let i=$e(null);try{return vt(6,t,r),r(n)!==!1}catch(s){return hS(e,s),!1}finally{vt(7,t,r),$e(i)}}function _b(e,t,r,n){return function i(s){if(s===Function)return n;let o=la(e)?Kr(e.index,t):t;lv(o,5);let a=yb(t,r,n,s),l=i.__ngNextListenerFn__;for(;l;)a=yb(t,r,l,s)&&a,l=l.__ngNextListenerFn__;return a}}function q(e=1){return OA(e)}function bn(e,t,r){return Fr(e,"",t,"",r),bn}function Fr(e,t,r,n,i){let s=Ge(),o=WS(s,t,r,n);if(o!==Ui){let a=dn(),l=Vg();fS(a,l,s,e,o,s[ln],i,!1)}return Fr}function es(e,t,r){kP(e,t,r)}function ts(e){let t=Ge(),r=dn(),n=aC();Lg(n+1);let i=dv(r,n);if(e.dirty&&fA(t)===((i.metadata.flags&2)===2)){if(i.matches===null)e.reset([]);else{let s=BP(t,n);e.reset(s,lM),e.notifyOnChanges()}return!0}return!1}function ns(){return OP(Ge(),aC())}function pv(e,t,r,n){r>=e.data.length&&(e.data[r]=null,e.blueprint[r]=null),t[r]=n}function $t(e,t=""){let r=Ge(),n=dn(),i=e+wn,s=n.firstCreatePass?Bd(n,i,1,t,null):n.data[i],o=O1(n,r,s,t,e);r[i]=o,Ug()&&av(n,r,o,s),da(s,!1)}var O1=(e,t,r,n,i)=>(Hg(!0),eO(t[ln],n));function ha(e){return hr("",e,""),ha}function hr(e,t,r){let n=Ge(),i=WS(n,e,t,r);return i!==Ui&&P1(n,co(),i),hr}function P1(e,t,r){let n=Jb(t,e);tO(e[ln],n,r)}var zS={};function Br(e){let t=dn(),r=Ge(),n=e+wn,i=Bd(t,n,128,null,null);return da(i,!1),pv(t,r,n,zS),Br}function ho(e){lo("NgLet");let t=dn(),r=Ge(),n=co();return pv(t,r,n,e),e}function mr(e){let t=DA(),r=Mg(t,wn+e);if(r===zS)throw new Oe(314,!1);return r}function k1(e,t,r){let n=dn();if(n.firstCreatePass){let i=qr(e);vg(r,n.data,n.blueprint,i,!0),vg(t,n.data,n.blueprint,i,!1)}}function vg(e,t,r,n,i){if(e=Pn(e),Array.isArray(e))for(let s=0;s<e.length;s++)vg(e[s],t,r,n,i);else{let s=dn(),o=Ge(),a=pr(),l=ra(e)?e:Pn(e.provide),c=Ub(e),h=a.providerIndexes&1048575,d=a.directiveStart,f=a.providerIndexes>>20;if(ra(e)||!e.multi){let g=new Yo(c,i,bt),m=vm(l,t,i?h:h+f,d);m===-1?(Nm(ud(a,o),s,l),gm(s,e,t.length),t.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),r.push(g),o.push(g)):(r[m]=g,o[m]=g)}else{let g=vm(l,t,h+f,d),m=vm(l,t,h,h+f),b=g>=0&&r[g],I=m>=0&&r[m];if(i&&!I||!i&&!b){Nm(ud(a,o),s,l);let A=B1(i?F1:L1,r.length,i,n,c);!i&&I&&(r[m].providerFactory=A),gm(s,e,t.length,0),t.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),r.push(A),o.push(A)}else{let A=qS(r[i?m:g],c,!i&&n);gm(s,e,g>-1?g:m,A)}!i&&n&&I&&r[m].componentProviders++}}}function gm(e,t,r,n){let i=ra(t),s=eA(t);if(i||s){let o=(s?Pn(t.useClass):t).prototype.ngOnDestroy;if(o){let a=e.destroyHooks||(e.destroyHooks=[]);if(!i&&t.multi){let l=a.indexOf(r);l===-1?a.push(r,[n,o]):a[l+1].push(n,o)}else a.push(r,o)}}}function qS(e,t,r){return r&&e.componentProviders++,e.multi.push(t)-1}function vm(e,t,r,n){for(let i=r;i<n;i++)if(t[i]===e)return i;return-1}function L1(e,t,r,n){return yg(this.multi,[])}function F1(e,t,r,n){let i=this.multi,s;if(this.providerFactory){let o=this.providerFactory.componentProviders,a=zc(r,r[Te],this.providerFactory.index,n);s=a.slice(0,o),yg(i,s);for(let l=o;l<a.length;l++)s.push(a[l])}else s=[],yg(i,s);return s}function yg(e,t){for(let r=0;r<e.length;r++){let n=e[r];t.push(n())}return t}function B1(e,t,r,n,i){let s=new Yo(e,r,bt);return s.multi=[],s.index=t,s.componentProviders=0,qS(s,i,n&&!r),s}function Vd(e,t=[]){return r=>{r.providersResolver=(n,i)=>k1(n,i?i(e):e,t)}}function ma(e,t,r,n){return KS(Ge(),kg(),e,t,r,n)}function YS(e,t){let r=e[t];return r===Ui?void 0:r}function KS(e,t,r,n,i,s){let o=t+r;return Pi(e,o,i)?US(e,o+1,s?n.call(s,i):n(i)):YS(e,o+1)}function V1(e,t,r,n,i,s,o){let a=t+r;return JP(e,a,i,s)?US(e,a+2,o?n.call(o,i,s):n(i,s)):YS(e,a+2)}function Qn(e,t){let r=dn(),n,i=e+wn;r.firstCreatePass?(n=U1(t,r.pipeRegistry),r.data[i]=n,n.onDestroy&&(r.destroyHooks??=[]).push(i,n.onDestroy)):n=r.data[i];let s=n.factory||(n.factory=Ho(n.type,!0)),o,a=Wn(bt);try{let l=ld(!1),c=s();return ld(l),pv(r,Ge(),i,c),c}finally{Wn(a)}}function U1(e,t){if(t)for(let r=t.length-1;r>=0;r--){let n=t[r];if(e===n.name)return n}}function gr(e,t,r){let n=e+wn,i=Ge(),s=Mg(i,n);return XS(i,n)?KS(i,kg(),t,s.transform,r,s):s.transform(r)}function ZS(e,t,r,n){let i=e+wn,s=Ge(),o=Mg(s,i);return XS(s,i)?V1(s,kg(),t,o.transform,r,n,o):o.transform(r,n)}function XS(e,t){return e[Te].data[t].pure}var aa=class{full;major;minor;patch;constructor(e){this.full=e;let t=e.split(".");this.major=t[0],this.minor=t[1],this.patch=t.slice(2).join(".")}},hv=new aa("19.2.0"),H1=(()=>{class e{zone=O(Ve);changeDetectionScheduler=O(Ni);applicationRef=O(fr);_onMicrotaskEmptySubscription;initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function j1({ngZoneFactory:e,ignoreChangesOutsideZone:t,scheduleInRootZone:r}){return e??=()=>new Ve(re(w({},$1()),{scheduleInRootZone:r})),[{provide:Ve,useFactory:e},{provide:Uc,multi:!0,useFactory:()=>{let n=O(H1,{optional:!0});return()=>n.initialize()}},{provide:Uc,multi:!0,useFactory:()=>{let n=O(W1);return()=>{n.initialize()}}},t===!0?{provide:IC,useValue:!0}:[],{provide:Wg,useValue:r??DC}]}function $1(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}var W1=(()=>{class e{subscription=new mt;initialized=!1;zone=O(Ve);pendingTasks=O(Nd);initialize(){if(this.initialized)return;this.initialized=!0;let r=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(r=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{Ve.assertNotInAngularZone(),queueMicrotask(()=>{r!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(r),r=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Ve.assertInAngularZone(),r??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),JS=(()=>{class e{appRef=O(fr);taskService=O(Nd);ngZone=O(Ve);zonelessEnabled=O(Rd);tracing=O(pa,{optional:!0});disableScheduling=O(IC,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new mt;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(fd):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(O(Wg,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof pd||!this.zoneIsDefined)}notify(r){if(!this.zonelessEnabled&&r===5)return;let n=!1;switch(r){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2,n=!0;break}case 12:{this.appRef.dirtyFlags|=16,n=!0;break}case 13:{this.appRef.dirtyFlags|=2,n=!0;break}case 11:{n=!0;break}case 9:case 8:case 7:case 10:default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick(n))return;let i=this.useMicrotaskScheduler?qw:TC;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>i(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>i(()=>this.tick()))}shouldScheduleTick(r){return!(this.disableScheduling&&!r||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(fd+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let r=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(n){throw this.taskService.remove(r),n}finally{this.cleanup()}this.useMicrotaskScheduler=!0,qw(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(r)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let r=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(r)}}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function QS(){return lo("NgZoneless"),Lb([{provide:Ni,useExisting:JS},{provide:Ve,useClass:pd},{provide:Rd,useValue:!0},{provide:Wg,useValue:!1},[]])}function G1(){return typeof $localize<"u"&&$localize.locale||wd}var mv=new he("",{providedIn:"root",factory:()=>O(mv,Je.Optional|Je.SkipSelf)||G1()}),_g=new he(""),z1=new he("");function Pc(e){return!e.moduleRef}function q1(e){let t=Pc(e)?e.r3Injector:e.moduleRef.injector,r=t.get(Ve);return r.run(()=>{Pc(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let n=t.get(Ai,null),i;if(r.runOutsideAngular(()=>{i=r.onError.subscribe({next:s=>{n.handleError(s)}})}),Pc(e)){let s=()=>t.destroy(),o=e.platformInjector.get(_g);o.add(s),t.onDestroy(()=>{i.unsubscribe(),o.delete(s)})}else{let s=()=>e.moduleRef.destroy(),o=e.platformInjector.get(_g);o.add(s),e.moduleRef.onDestroy(()=>{Xu(e.allPlatformModules,e.moduleRef),i.unsubscribe(),o.delete(s)})}return K1(n,r,()=>{let s=t.get($S);return s.runInitializers(),s.donePromise.then(()=>{let o=t.get(mv,wd);if(R1(o||wd),!t.get(z1,!0))return Pc(e)?t.get(fr):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(Pc(e)){let a=t.get(fr);return e.rootComponent!==void 0&&a.bootstrap(e.rootComponent),a}else return Y1(e.moduleRef,e.allPlatformModules),e.moduleRef})})})}function Y1(e,t){let r=e.injector.get(fr);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(n=>r.bootstrap(n));else if(e.instance.ngDoBootstrap)e.instance.ngDoBootstrap(r);else throw new Oe(-403,!1);t.push(e)}function K1(e,t,r){try{let n=r();return fv(n)?n.catch(i=>{throw t.runOutsideAngular(()=>e.handleError(i)),i}):n}catch(n){throw t.runOutsideAngular(()=>e.handleError(n)),n}}var Ju=null;function Z1(e=[],t){return yt.create({name:t,providers:[{provide:Sd,useValue:"platform"},{provide:_g,useValue:new Set([()=>Ju=null])},...e]})}function X1(e=[]){if(Ju)return Ju;let t=Z1(e);return Ju=t,o1(),J1(t),t}function J1(e){let t=e.get(qg,null);Hb(e,()=>{t?.forEach(r=>r())})}var Vr=(()=>{class e{static __NG_ELEMENT_ID__=Q1}return e})();function Q1(e){return ek(pr(),Ge(),(e&16)===16)}function ek(e,t,r){if(la(e)&&!r){let n=Kr(e.index,t);return new Ko(n,n)}else if(e.type&175){let n=t[Mr];return new Ko(n,t)}return null}var Eg=class{constructor(){}supports(e){return e instanceof Map||VS(e)}create(){return new wg}},wg=class{_records=new Map;_mapHead=null;_appendAfter=null;_previousMapHead=null;_changesHead=null;_changesTail=null;_additionsHead=null;_additionsTail=null;_removalsHead=null;_removalsTail=null;get isDirty(){return this._additionsHead!==null||this._changesHead!==null||this._removalsHead!==null}forEachItem(e){let t;for(t=this._mapHead;t!==null;t=t._next)e(t)}forEachPreviousItem(e){let t;for(t=this._previousMapHead;t!==null;t=t._nextPrevious)e(t)}forEachChangedItem(e){let t;for(t=this._changesHead;t!==null;t=t._nextChanged)e(t)}forEachAddedItem(e){let t;for(t=this._additionsHead;t!==null;t=t._nextAdded)e(t)}forEachRemovedItem(e){let t;for(t=this._removalsHead;t!==null;t=t._nextRemoved)e(t)}diff(e){if(!e)e=new Map;else if(!(e instanceof Map||VS(e)))throw new Oe(900,!1);return this.check(e)?this:null}onDestroy(){}check(e){this._reset();let t=this._mapHead;if(this._appendAfter=null,this._forEach(e,(r,n)=>{if(t&&t.key===n)this._maybeAddToChanges(t,r),this._appendAfter=t,t=t._next;else{let i=this._getOrCreateRecordForKey(n,r);t=this._insertBeforeOrAppend(t,i)}}),t){t._prev&&(t._prev._next=null),this._removalsHead=t;for(let r=t;r!==null;r=r._nextRemoved)r===this._mapHead&&(this._mapHead=null),this._records.delete(r.key),r._nextRemoved=r._next,r.previousValue=r.currentValue,r.currentValue=null,r._prev=null,r._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,t){if(e){let r=e._prev;return t._next=e,t._prev=r,e._prev=t,r&&(r._next=t),e===this._mapHead&&(this._mapHead=t),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}_getOrCreateRecordForKey(e,t){if(this._records.has(e)){let n=this._records.get(e);this._maybeAddToChanges(n,t);let i=n._prev,s=n._next;return i&&(i._next=s),s&&(s._prev=i),n._next=null,n._prev=null,n}let r=new bg(e);return this._records.set(e,r),r.currentValue=t,this._addToAdditions(r),r}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;e!==null;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;e!==null;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;e!=null;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,t){Object.is(t,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=t,this._addToChanges(e))}_addToAdditions(e){this._additionsHead===null?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){this._changesHead===null?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,t){e instanceof Map?e.forEach(t):Object.keys(e).forEach(r=>t(e[r],r))}},bg=class{key;previousValue=null;currentValue=null;_nextPrevious=null;_next=null;_prev=null;_nextAdded=null;_nextRemoved=null;_nextChanged=null;constructor(e){this.key=e}};function Eb(){return new gv([new Eg])}var gv=(()=>{class e{static \u0275prov=oe({token:e,providedIn:"root",factory:Eb});factories;constructor(r){this.factories=r}static create(r,n){if(n){let i=n.factories.slice();r=r.concat(i)}return new e(r)}static extend(r){return{provide:e,useFactory:n=>e.create(r,n||Eb()),deps:[[e,new $N,new Tg]]}}find(r){let n=this.factories.find(i=>i.supports(r));if(n)return n;throw new Oe(901,!1)}}return e})();function e0(e){vt(8);try{let{rootComponent:t,appProviders:r,platformProviders:n}=e,i=X1(n),s=[j1({}),{provide:Ni,useExisting:JS},...r||[]],o=new vd({providers:s,parent:i,debugName:"",runEnvironmentInitializers:!1});return q1({r3Injector:o.injector,platformInjector:i,rootComponent:t})}catch(t){return Promise.reject(t)}finally{vt(9)}}function ga(e){return typeof e=="boolean"?e:e!=null&&e!=="false"}function vv(e,t=NaN){return!isNaN(parseFloat(e))&&!isNaN(Number(e))?Number(e):t}function yv(e){let t=$e(null);try{return e()}finally{$e(t)}}var wb=class{[Ii];constructor(e){this[Ii]=e}destroy(){this[Ii].destroy()}};function Ud(e,t){let r=$o(e),n=t.elementInjector||Dd();return new Zc(r).create(n,t.projectableNodes,t.hostElement,t.environmentInjector)}var tk={schedule(e,t){let r=setTimeout(e,t);return()=>clearTimeout(r)}};function nk(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function rk(e){return!!e&&e.nodeType===Node.ELEMENT_NODE}var _v;function ik(e,t){if(!_v){let r=Element.prototype;_v=r.matches||r.matchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector}return e.nodeType===Node.ELEMENT_NODE?_v.call(e,t):!1}function ok(e){let t={};return e.forEach(({propName:r,templateName:n,transform:i})=>{t[nk(n)]=[r,i]}),t}function sk(e,t){return t.get(ao).resolveComponentFactory(e).inputs}function ak(e,t){let r=e.childNodes,n=t.map(()=>[]),i=-1;t.some((s,o)=>s==="*"?(i=o,!0):!1);for(let s=0,o=r.length;s<o;++s){let a=r[s],l=ck(a,t,i);l!==-1&&n[l].push(a)}return n}function ck(e,t,r){let n=r;return rk(e)&&t.some((i,s)=>i!=="*"&&ik(e,i)?(n=s,!0):!1),n}var lk=10,Ev=class{componentFactory;inputMap=new Map;constructor(e,t){this.componentFactory=t.get(ao).resolveComponentFactory(e);for(let r of this.componentFactory.inputs)this.inputMap.set(r.propName,r.templateName)}create(e){return new wv(this.componentFactory,e,this.inputMap)}},wv=class{componentFactory;injector;inputMap;eventEmitters=new Po(1);events=this.eventEmitters.pipe(Ks(e=>no(...e)));componentRef=null;scheduledDestroyFn=null;initialInputValues=new Map;ngZone;elementZone;appRef;cdScheduler;constructor(e,t,r){this.componentFactory=e,this.injector=t,this.inputMap=r,this.ngZone=this.injector.get(Ve),this.appRef=this.injector.get(fr),this.cdScheduler=t.get(Ni),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=tk.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},lk))})}getInputValue(e){return this.runInZone(()=>this.componentRef===null?this.initialInputValues.get(e):this.componentRef.instance[e])}setInputValue(e,t){if(this.componentRef===null){this.initialInputValues.set(e,t);return}this.runInZone(()=>{this.componentRef.setInput(this.inputMap.get(e)??e,t),this.componentRef.hostView.dirty&&(this.componentRef.changeDetectorRef.markForRefresh(),this.cdScheduler.notify(6))})}initializeComponent(e){let t=yt.create({providers:[],parent:this.injector}),r=ak(e,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(t,r,e),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.appRef.attachView(this.componentRef.hostView),this.componentRef.hostView.detectChanges()}initializeInputs(){for(let[e,t]of this.initialInputValues)this.setInputValue(e,t);this.initialInputValues.clear()}initializeOutputs(e){let t=this.componentFactory.outputs.map(({propName:r,templateName:n})=>{let i=e.instance[r];return new ot(s=>{let o=i.subscribe(a=>s.next({name:n,value:a}));return()=>o.unsubscribe()})});this.eventEmitters.next(t)}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}},bv=class extends HTMLElement{ngElementEventsSubscription=null};function t0(e,t){let r=sk(e,t.injector),n=t.strategyFactory||new Ev(e,t.injector),i=ok(r);class s extends bv{injector;static observedAttributes=Object.keys(i);get ngElementStrategy(){if(!this._ngElementStrategy){let a=this._ngElementStrategy=n.create(this.injector||t.injector);r.forEach(({propName:l,transform:c})=>{if(!this.hasOwnProperty(l))return;let h=this[l];delete this[l],a.setInputValue(l,h,c)})}return this._ngElementStrategy}_ngElementStrategy;constructor(a){super(),this.injector=a}attributeChangedCallback(a,l,c,h){let[d,f]=i[a];this.ngElementStrategy.setInputValue(d,c,f)}connectedCallback(){let a=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),a=!0),this.ngElementStrategy.connect(this),a||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(a=>{let l=new CustomEvent(a.name,{detail:a.value});this.dispatchEvent(l)})}}return r.forEach(({propName:o,transform:a})=>{Object.defineProperty(s.prototype,o,{get(){return this.ngElementStrategy.getInputValue(o)},set(l){this.ngElementStrategy.setInputValue(o,l,a)},configurable:!0,enumerable:!0})}),s}var o0=null;function va(){return o0}function s0(e){o0??=e}var Hd=class{},nt=new he(""),a0=(()=>{class e{historyGo(r){throw new Error("")}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:()=>O(dk),providedIn:"platform"})}return e})(),dk=(()=>{class e extends a0{_location;_history;_doc=O(nt);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return va().getBaseHref(this._doc)}onPopState(r){let n=va().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",r,!1),()=>n.removeEventListener("popstate",r)}onHashChange(r){let n=va().getGlobalEventTarget(this._doc,"window");return n.addEventListener("hashchange",r,!1),()=>n.removeEventListener("hashchange",r)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(r){this._location.pathname=r}pushState(r,n,i){this._history.pushState(r,n,i)}replaceState(r,n,i){this._history.replaceState(r,n,i)}forward(){this._history.forward()}back(){this._history.back()}historyGo(r=0){this._history.go(r)}getState(){return this._history.state}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:()=>new e,providedIn:"platform"})}return e})();function c0(e,t){return e?t?e.endsWith("/")?t.startsWith("/")?e+t.slice(1):e+t:t.startsWith("/")?e+t:`${e}/${t}`:e:t}function n0(e){let t=e.search(/#|\?|$/);return e[t-1]==="/"?e.slice(0,t-1)+e.slice(t):e}function rs(e){return e&&e[0]!=="?"?`?${e}`:e}var Sv=(()=>{class e{historyGo(r){throw new Error("")}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:()=>O(pk),providedIn:"root"})}return e})(),fk=new he(""),pk=(()=>{class e extends Sv{_platformLocation;_baseHref;_removeListenerFns=[];constructor(r,n){super(),this._platformLocation=r,this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??O(nt).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(r){this._removeListenerFns.push(this._platformLocation.onPopState(r),this._platformLocation.onHashChange(r))}getBaseHref(){return this._baseHref}prepareExternalUrl(r){return c0(this._baseHref,r)}path(r=!1){let n=this._platformLocation.pathname+rs(this._platformLocation.search),i=this._platformLocation.hash;return i&&r?`${n}${i}`:n}pushState(r,n,i,s){let o=this.prepareExternalUrl(i+rs(s));this._platformLocation.pushState(r,n,o)}replaceState(r,n,i,s){let o=this.prepareExternalUrl(i+rs(s));this._platformLocation.replaceState(r,n,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(r=0){this._platformLocation.historyGo?.(r)}static \u0275fac=function(r){return new(r||e)(et(a0),et(fk,8))};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Dv=(()=>{class e{_subject=new ie;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(r){this._locationStrategy=r;let n=this._locationStrategy.getBaseHref();this._basePath=gk(n0(r0(n))),this._locationStrategy.onPopState(i=>{this._subject.next({url:this.path(!0),pop:!0,state:i.state,type:i.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(r=!1){return this.normalize(this._locationStrategy.path(r))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(r,n=""){return this.path()==this.normalize(r+rs(n))}normalize(r){return e.stripTrailingSlash(mk(this._basePath,r0(r)))}prepareExternalUrl(r){return r&&r[0]!=="/"&&(r="/"+r),this._locationStrategy.prepareExternalUrl(r)}go(r,n="",i=null){this._locationStrategy.pushState(i,"",r,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(r+rs(n)),i)}replaceState(r,n="",i=null){this._locationStrategy.replaceState(i,"",r,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(r+rs(n)),i)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(r=0){this._locationStrategy.historyGo?.(r)}onUrlChange(r){return this._urlChangeListeners.push(r),this._urlChangeSubscription??=this.subscribe(n=>{this._notifyUrlChangeListeners(n.url,n.state)}),()=>{let n=this._urlChangeListeners.indexOf(r);this._urlChangeListeners.splice(n,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(r="",n){this._urlChangeListeners.forEach(i=>i(r,n))}subscribe(r,n,i){return this._subject.subscribe({next:r,error:n??void 0,complete:i??void 0})}static normalizeQueryParams=rs;static joinWithSlash=c0;static stripTrailingSlash=n0;static \u0275fac=function(r){return new(r||e)(et(Sv))};static \u0275prov=oe({token:e,factory:()=>hk(),providedIn:"root"})}return e})();function hk(){return new Dv(et(Sv))}function mk(e,t){if(!e||!t.startsWith(e))return t;let r=t.substring(e.length);return r===""||["/",";","?","#"].includes(r[0])?r:t}function r0(e){return e.replace(/\/index.html$/,"")}function gk(e){if(new RegExp("^(https?:)?//").test(e)){let[,t]=e.split(/\/\/[^\/]+/);return t}return e}function l0(e,t){t=encodeURIComponent(t);for(let r of e.split(";")){let n=r.indexOf("="),[i,s]=n==-1?[r,""]:[r.slice(0,n),r.slice(n+1)];if(i.trim()===t)return decodeURIComponent(s)}return null}var Cv=/\s+/,i0=[],$d=(()=>{class e{_ngEl;_renderer;initialClasses=i0;rawClass;stateMap=new Map;constructor(r,n){this._ngEl=r,this._renderer=n}set klass(r){this.initialClasses=r!=null?r.trim().split(Cv):i0}set ngClass(r){this.rawClass=typeof r=="string"?r.trim().split(Cv):r}ngDoCheck(){for(let n of this.initialClasses)this._updateState(n,!0);let r=this.rawClass;if(Array.isArray(r)||r instanceof Set)for(let n of r)this._updateState(n,!0);else if(r!=null)for(let n of Object.keys(r))this._updateState(n,!!r[n]);this._applyStateDiff()}_updateState(r,n){let i=this.stateMap.get(r);i!==void 0?(i.enabled!==n&&(i.changed=!0,i.enabled=n),i.touched=!0):this.stateMap.set(r,{enabled:n,changed:!0,touched:!0})}_applyStateDiff(){for(let r of this.stateMap){let n=r[0],i=r[1];i.changed?(this._toggleClass(n,i.enabled),i.changed=!1):i.touched||(i.enabled&&this._toggleClass(n,!1),this.stateMap.delete(n)),i.touched=!1}}_toggleClass(r,n){r=r.trim(),r.length>0&&r.split(Cv).forEach(i=>{n?this._renderer.addClass(this._ngEl.nativeElement,i):this._renderer.removeClass(this._ngEl.nativeElement,i)})}static \u0275fac=function(r){return new(r||e)(bt(Nt),bt(Jo))};static \u0275dir=kr({type:e,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return e})(),u0=(()=>{class e{_ngEl;_differs;_renderer;_ngStyle=null;_differ=null;constructor(r,n,i){this._ngEl=r,this._differs=n,this._renderer=i}set ngStyle(r){this._ngStyle=r,!this._differ&&r&&(this._differ=this._differs.find(r).create())}ngDoCheck(){if(this._differ){let r=this._differ.diff(this._ngStyle);r&&this._applyChanges(r)}}_setStyle(r,n){let[i,s]=r.split("."),o=i.indexOf("-")===-1?void 0:Xr.DashCase;n!=null?this._renderer.setStyle(this._ngEl.nativeElement,i,s?`${n}${s}`:n,o):this._renderer.removeStyle(this._ngEl.nativeElement,i,o)}_applyChanges(r){r.forEachRemovedItem(n=>this._setStyle(n.key,null)),r.forEachAddedItem(n=>this._setStyle(n.key,n.currentValue)),r.forEachChangedItem(n=>this._setStyle(n.key,n.currentValue))}static \u0275fac=function(r){return new(r||e)(bt(Nt),bt(gv),bt(Jo))};static \u0275dir=kr({type:e,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}})}return e})(),Iv="browser",vk="server";function d0(e){return e===Iv}function Tv(e){return e===vk}var jd=class{},Rv=class extends Hd{supportsDOMEvents=!0},Nv=class j0 extends Rv{static makeCurrent(){s0(new j0)}onAndCancel(t,r,n,i){return t.addEventListener(r,n,i),()=>{t.removeEventListener(r,n,i)}}dispatchEvent(t,r){t.dispatchEvent(r)}remove(t){t.remove()}createElement(t,r){return r=r||this.getDefaultDocument(),r.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,r){return r==="window"?window:r==="document"?t:r==="body"?t.body:null}getBaseHref(t){let r=yk();return r==null?null:_k(r)}resetBaseElement(){al=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return l0(document.cookie,t)}},al=null;function yk(){return al=al||document.querySelector("base"),al?al.getAttribute("href"):null}function _k(e){return new URL(e,document.baseURI).pathname}var Ek=(()=>{class e{build(){return new XMLHttpRequest}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})(),Av=new he(""),v0=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;constructor(r,n){this._zone=n,r.forEach(i=>{i.manager=this}),this._plugins=r.slice().reverse()}addEventListener(r,n,i,s){return this._findPluginFor(n).addEventListener(r,n,i,s)}getZone(){return this._zone}_findPluginFor(r){let n=this._eventNameToPlugin.get(r);if(n)return n;if(n=this._plugins.find(i=>i.supports(r)),!n)throw new Oe(5101,!1);return this._eventNameToPlugin.set(r,n),n}static \u0275fac=function(r){return new(r||e)(et(Av),et(Ve))};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})(),Gd=class{_doc;constructor(e){this._doc=e}manager},Wd="ng-app-id";function f0(e){for(let t of e)t.remove()}function p0(e,t){let r=t.createElement("style");return r.textContent=e,r}function wk(e,t,r,n){let i=e.head?.querySelectorAll(`style[${Wd}="${t}"],link[${Wd}="${t}"]`);if(i)for(let s of i)s.removeAttribute(Wd),s instanceof HTMLLinkElement?n.set(s.href.slice(s.href.lastIndexOf("/")+1),{usage:0,elements:[s]}):s.textContent&&r.set(s.textContent,{usage:0,elements:[s]})}function Mv(e,t){let r=t.createElement("link");return r.setAttribute("rel","stylesheet"),r.setAttribute("href",e),r}var y0=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(r,n,i,s={}){this.doc=r,this.appId=n,this.nonce=i,this.isServer=Tv(s),wk(r,n,this.inline,this.external),this.hosts.add(r.head)}addStyles(r,n){for(let i of r)this.addUsage(i,this.inline,p0);n?.forEach(i=>this.addUsage(i,this.external,Mv))}removeStyles(r,n){for(let i of r)this.removeUsage(i,this.inline);n?.forEach(i=>this.removeUsage(i,this.external))}addUsage(r,n,i){let s=n.get(r);s?s.usage++:n.set(r,{usage:1,elements:[...this.hosts].map(o=>this.addElement(o,i(r,this.doc)))})}removeUsage(r,n){let i=n.get(r);i&&(i.usage--,i.usage<=0&&(f0(i.elements),n.delete(r)))}ngOnDestroy(){for(let[,{elements:r}]of[...this.inline,...this.external])f0(r);this.hosts.clear()}addHost(r){this.hosts.add(r);for(let[n,{elements:i}]of this.inline)i.push(this.addElement(r,p0(n,this.doc)));for(let[n,{elements:i}]of this.external)i.push(this.addElement(r,Mv(n,this.doc)))}removeHost(r){this.hosts.delete(r)}addElement(r,n){return this.nonce&&n.setAttribute("nonce",this.nonce),this.isServer&&n.setAttribute(Wd,this.appId),r.appendChild(n)}static \u0275fac=function(r){return new(r||e)(et(nt),et(il),et(Yg,8),et(Xo))};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})(),xv={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},Pv=/%COMP%/g,_0="%COMP%",bk=`_nghost-${_0}`,Ck=`_ngcontent-${_0}`,Sk=!0,Dk=new he("",{providedIn:"root",factory:()=>Sk});function Ik(e){return Ck.replace(Pv,e)}function Tk(e){return bk.replace(Pv,e)}function E0(e,t){return t.map(r=>r.replace(Pv,e))}var h0=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(r,n,i,s,o,a,l,c=null,h=null){this.eventManager=r,this.sharedStylesHost=n,this.appId=i,this.removeStylesOnCompDestroy=s,this.doc=o,this.platformId=a,this.ngZone=l,this.nonce=c,this.tracingService=h,this.platformIsServer=Tv(a),this.defaultRenderer=new cl(r,o,l,this.platformIsServer,this.tracingService)}createRenderer(r,n){if(!r||!n)return this.defaultRenderer;this.platformIsServer&&n.encapsulation===Zr.ShadowDom&&(n=re(w({},n),{encapsulation:Zr.Emulated}));let i=this.getOrCreateRenderer(r,n);return i instanceof zd?i.applyToHost(r):i instanceof ll&&i.applyStyles(),i}getOrCreateRenderer(r,n){let i=this.rendererByCompId,s=i.get(n.id);if(!s){let o=this.doc,a=this.ngZone,l=this.eventManager,c=this.sharedStylesHost,h=this.removeStylesOnCompDestroy,d=this.platformIsServer,f=this.tracingService;switch(n.encapsulation){case Zr.Emulated:s=new zd(l,c,n,this.appId,h,o,a,d,f);break;case Zr.ShadowDom:return new Ov(l,c,r,n,o,a,this.nonce,d,f);default:s=new ll(l,c,n,h,o,a,d,f);break}i.set(n.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(r){this.rendererByCompId.delete(r)}static \u0275fac=function(r){return new(r||e)(et(v0),et(y0),et(il),et(Dk),et(nt),et(Xo),et(Ve),et(Yg),et(pa,8))};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})(),cl=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,r,n,i){this.eventManager=e,this.doc=t,this.ngZone=r,this.platformIsServer=n,this.tracingService=i}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(xv[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(m0(e)?e.content:e).appendChild(t)}insertBefore(e,t,r){e&&(m0(e)?e.content:e).insertBefore(t,r)}removeChild(e,t){t.remove()}selectRootElement(e,t){let r=typeof e=="string"?this.doc.querySelector(e):e;if(!r)throw new Oe(-5104,!1);return t||(r.textContent=""),r}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,r,n){if(n){t=n+":"+t;let i=xv[n];i?e.setAttributeNS(i,t,r):e.setAttribute(t,r)}else e.setAttribute(t,r)}removeAttribute(e,t,r){if(r){let n=xv[r];n?e.removeAttributeNS(n,t):e.removeAttribute(`${r}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,r,n){n&(Xr.DashCase|Xr.Important)?e.style.setProperty(t,r,n&Xr.Important?"important":""):e.style[t]=r}removeStyle(e,t,r){r&Xr.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,r){e!=null&&(e[t]=r)}setValue(e,t){e.nodeValue=t}listen(e,t,r,n){if(typeof e=="string"&&(e=va().getGlobalEventTarget(this.doc,e),!e))throw new Error(`Unsupported event target ${e} for event ${t}`);let i=this.decoratePreventDefault(r);return this.tracingService!==null&&this.tracingService.wrapEventListener&&(i=this.tracingService.wrapEventListener(e,t,i)),this.eventManager.addEventListener(e,t,i,n)}decoratePreventDefault(e){return t=>{if(t==="__ngUnwrap__")return e;(this.platformIsServer?this.ngZone.runGuarded(()=>e(t)):e(t))===!1&&t.preventDefault()}}};function m0(e){return e.tagName==="TEMPLATE"&&e.content!==void 0}var Ov=class extends cl{sharedStylesHost;hostEl;shadowRoot;constructor(e,t,r,n,i,s,o,a,l){super(e,i,s,a,l),this.sharedStylesHost=t,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let c=n.styles;c=E0(n.id,c);for(let d of c){let f=document.createElement("style");o&&f.setAttribute("nonce",o),f.textContent=d,this.shadowRoot.appendChild(f)}let h=n.getExternalStyles?.();if(h)for(let d of h){let f=Mv(d,i);o&&f.setAttribute("nonce",o),this.shadowRoot.appendChild(f)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,r){return super.insertBefore(this.nodeOrShadowRoot(e),t,r)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},ll=class extends cl{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,r,n,i,s,o,a,l){super(e,i,s,o,a),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=n;let c=r.styles;this.styles=l?E0(l,c):c,this.styleUrls=r.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},zd=class extends ll{contentAttr;hostAttr;constructor(e,t,r,n,i,s,o,a,l){let c=n+"-"+r.id;super(e,t,r,i,s,o,a,l,c),this.contentAttr=Ik(c),this.hostAttr=Tk(c)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,t){let r=super.createElement(e,t);return super.setAttribute(r,this.contentAttr,""),r}},xk=(()=>{class e extends Gd{constructor(r){super(r)}supports(r){return!0}addEventListener(r,n,i,s){return r.addEventListener(n,i,s),()=>this.removeEventListener(r,n,i,s)}removeEventListener(r,n,i,s){return r.removeEventListener(n,i,s)}static \u0275fac=function(r){return new(r||e)(et(nt))};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})(),g0=["alt","control","meta","shift"],Rk={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Nk={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},Ak=(()=>{class e extends Gd{constructor(r){super(r)}supports(r){return e.parseEventName(r)!=null}addEventListener(r,n,i,s){let o=e.parseEventName(n),a=e.eventCallback(o.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>va().onAndCancel(r,o.domEventName,a,s))}static parseEventName(r){let n=r.toLowerCase().split("."),i=n.shift();if(n.length===0||!(i==="keydown"||i==="keyup"))return null;let s=e._normalizeKey(n.pop()),o="",a=n.indexOf("code");if(a>-1&&(n.splice(a,1),o="code."),g0.forEach(c=>{let h=n.indexOf(c);h>-1&&(n.splice(h,1),o+=c+".")}),o+=s,n.length!=0||s.length===0)return null;let l={};return l.domEventName=i,l.fullKey=o,l}static matchEventFullKeyCode(r,n){let i=Rk[r.key]||r.key,s="";return n.indexOf("code.")>-1&&(i=r.code,s="code."),i==null||!i?!1:(i=i.toLowerCase(),i===" "?i="space":i==="."&&(i="dot"),g0.forEach(o=>{if(o!==i){let a=Nk[o];a(r)&&(s+=o+".")}}),s+=i,s===n)}static eventCallback(r,n,i){return s=>{e.matchEventFullKeyCode(s,r)&&i.runGuarded(()=>n(s))}}static _normalizeKey(r){return r==="esc"?"escape":r}static \u0275fac=function(r){return new(r||e)(et(nt))};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})();function w0(e){return e0(Mk(e))}function Mk(e){return{appProviders:[...Fk,...e?.providers??[]],platformProviders:Lk}}function Ok(){Nv.makeCurrent()}function Pk(){return new Ai}function kk(){return kC(document),document}var Lk=[{provide:Xo,useValue:Iv},{provide:qg,useValue:Ok,multi:!0},{provide:nt,useFactory:kk,deps:[]}],Fk=[{provide:Sd,useValue:"root"},{provide:Ai,useFactory:Pk,deps:[]},{provide:Av,useClass:xk,multi:!0,deps:[nt]},{provide:Av,useClass:Ak,multi:!0,deps:[nt]},h0,y0,v0,{provide:un,useExisting:h0},{provide:jd,useClass:Ek,deps:[]},[]],kv=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:function(r){let n=null;return r?n=new(r||e):n=et(Bk),n},providedIn:"root"})}return e})(),Bk=(()=>{class e extends kv{_doc;constructor(r){super(),this._doc=r}sanitize(r,n){if(n==null)return null;switch(r){case ti.NONE:return n;case ti.HTML:return uo(n,"HTML")?ei(n):Xg(this._doc,String(n)).toString();case ti.STYLE:return uo(n,"Style")?ei(n):n;case ti.SCRIPT:if(uo(n,"Script"))return ei(n);throw new Oe(5200,!1);case ti.URL:return uo(n,"URL")?ei(n):Md(String(n));case ti.RESOURCE_URL:if(uo(n,"ResourceURL"))return ei(n);throw new Oe(5201,!1);default:throw new Oe(5202,!1)}}bypassSecurityTrustHtml(r){return GC(r)}bypassSecurityTrustStyle(r){return zC(r)}bypassSecurityTrustScript(r){return qC(r)}bypassSecurityTrustUrl(r){return YC(r)}bypassSecurityTrustResourceUrl(r){return KC(r)}static \u0275fac=function(r){return new(r||e)(et(nt))};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),b0="9.6.1",k=class Bh{static SDK_VERSION=b0;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_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 CTA_EVENT="letscooee:outbound:cta";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 t=Bh.SDK_VERSION.split(".").map(r=>r.padStart(2,"0")).join("");Bh.SDK_VERSION_CODE=parseInt(t,10)}},Rn={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${k.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${k.SDK_VERSION}/dist/widget.min.js`},er=Be(ss()),C=class{static log(...e){er.default.info(...e)}static debug(...e){er.default.debug(...e)}static error(...e){er.default.error(...e)}static warn(...e){er.default.warn(...e)}static info(...e){er.default.info(...e)}static trace(...e){er.default.trace(...e)}static configure(e=k.LOG_PREFIX){er.default.useDefaults({formatter:function(r){r.unshift(`${e} (v${k.SDK_VERSION}):`)}});let t=this.getDebugParam();(t==="1"||t==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?er.default.setLevel(er.default[localStorage.cooeeLogLevel]):er.default.setLevel(Rn.debug?er.default.TRACE:er.default.OFF)}static getDebugParam(){return new URL(location.href).searchParams?.get("cooee-debug")}static logBrand(){let e=`
8
8
  display: inline-block;
9
9
  font-size: 14px;
10
10
  background: linear-gradient(90deg, #d52dc8 25%, #2179e2 82%);
@@ -19,7 +19,7 @@ ${t.map((r,n)=>`${n+1}) ${r.toString()}`).join(`
19
19
  `,t+=`
20
20
 
21
21
  `,t+=`Learn more: https://www.letscooee.com
22
- Cooee SDK: v${k.SDK_VERSION}`,console.group("%c Elevate your ecommerce experience with Cooee \u{1F680} ",e),console.log(`%c${t}`,"font-size: 13px; line-height: 1.8;"),console.groupEnd()}},S0={providers:[QS()]},Bf=Be(tr()),Pt=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}},Yd=class{static format(e,t){let r=/{{\s*(\w+)\s*}}/;return t.replace(r,(n,i)=>{switch(i){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 n}})}static formatWithDelimiters(e,t=2,r=",",n="."){if(isNaN(e)||e==null)return"0";let i=(e/100).toFixed(t).split("."),s=i[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+r),o=i[1]?n+i[1]:"";return s+o}},pn=class{id;mID;vID;vName;imageURL;name;link;quantity;price;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}},Pe=class{isCartDirty=!0;cartEngagements;isGoKwikPopupOpen;previewIDs;previewVariant;pageName;moneyFormat;jsLoadTime=new Date;shopCurrencyCode;locale;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 pn(e)}},CI=Be(Ea()),Fv=Be(nD());function wa(e){return Fv.default.createInstance({name:"lc",storeName:e,driver:Fv.default.LOCALSTORAGE})}var mo=class{static storage;static async get(e,t){return await this.storage?.getItem(e)??t}static set(e,t){return this.storage?.setItem(e,t)}static remove(e){return this.storage?.removeItem(e)}static clear(){return this.storage?.clear()}static getForage(){return this.storage}},st=class extends mo{static storeName="usr";static{this.storage=wa(this.storeName)}},ge=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"},hn=class extends mo{static storeName="ses";static{this.storage=wa(this.storeName)}},rD=Object.prototype.toString;function as(e){switch(rD.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return oi(e,Error)}}function ba(e,t){return rD.call(e)===`[object ${t}]`}function Zd(e){return ba(e,"ErrorEvent")}function Xd(e){return ba(e,"DOMError")}function Bv(e){return ba(e,"DOMException")}function kn(e){return ba(e,"String")}function Ca(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function cs(e){return e===null||Ca(e)||typeof e!="object"&&typeof e!="function"}function Ur(e){return ba(e,"Object")}function ls(e){return typeof Event<"u"&&oi(e,Event)}function Vv(e){return typeof Element<"u"&&oi(e,Element)}function Uv(e){return ba(e,"RegExp")}function Hi(e){return!!(e&&e.then&&typeof e.then=="function")}function Hv(e){return Ur(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function oi(e,t){try{return e instanceof t}catch{return!1}}function ul(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function si(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Jd(e,t){if(!Array.isArray(e))return"";let r=[];for(let n=0;n<e.length;n++){let i=e[n];try{ul(i)?r.push("[VueViewModel]"):r.push(String(i))}catch{r.push("[value cannot be serialized]")}}return r.join(t)}function iD(e,t,r=!1){return kn(e)?Uv(t)?t.test(e):kn(t)?r?e===t:e.includes(t):!1:!1}function Sa(e,t=[],r=!1){return t.some(n=>iD(e,n,r))}function $v(e,t,r=250,n,i,s,o){if(!s.exception||!s.exception.values||!o||!oi(o.originalException,Error))return;let a=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;a&&(s.exception.values=jk(jv(e,t,i,o.originalException,n,s.exception.values,a,0),r))}function jv(e,t,r,n,i,s,o,a){if(s.length>=r+1)return s;let l=[...s];if(oi(n[i],Error)){oD(o,a);let c=e(t,n[i]),h=l.length;sD(c,i,h,a),l=jv(e,t,r,n[i],i,[c,...l],c,h)}return Array.isArray(n.errors)&&n.errors.forEach((c,h)=>{if(oi(c,Error)){oD(o,a);let d=e(t,c),f=l.length;sD(d,`errors[${h}]`,f,a),l=jv(e,t,r,c,i,[d,...l],d,f)}}),l}function oD(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=re(w(w({},e.mechanism),e.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:t})}function sD(e,t,r,n){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=re(w({},e.mechanism),{type:"chained",source:t,exception_id:r,parent_id:n})}function jk(e,t){return e.map(r=>(r.value&&(r.value=si(r.value,t)),r))}var vr="8.18.0",_e=globalThis;function Da(e,t,r){let n=r||_e,i=n.__SENTRY__=n.__SENTRY__||{},s=i[vr]=i[vr]||{};return s[e]||(s[e]=t())}var Wv=_e,$k=80;function dl(e,t={}){if(!e)return"<unknown>";try{let r=e,n=5,i=[],s=0,o=0,a=" > ",l=a.length,c,h=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||$k;for(;r&&s++<n&&(c=Wk(r,h),!(c==="html"||s>1&&o+i.length*l+c.length>=d));)i.push(c),o+=c.length,r=r.parentNode;return i.reverse().join(a)}catch{return"<unknown>"}}function Wk(e,t){let r=e,n=[];if(!r||!r.tagName)return"";if(Wv.HTMLElement&&r instanceof HTMLElement&&r.dataset){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}n.push(r.tagName.toLowerCase());let i=t&&t.length?t.filter(o=>r.getAttribute(o)).map(o=>[o,r.getAttribute(o)]):null;if(i&&i.length)i.forEach(o=>{n.push(`[${o[0]}="${o[1]}"]`)});else{r.id&&n.push(`#${r.id}`);let o=r.className;if(o&&kn(o)){let a=o.split(/\s+/);for(let l of a)n.push(`.${l}`)}}let s=["aria-label","type","name","title","alt"];for(let o of s){let a=r.getAttribute(o);a&&n.push(`[${o}="${a}"]`)}return n.join("")}function Gv(){try{return Wv.document.location.href}catch{return""}}function zv(e){if(!Wv.HTMLElement)return null;let t=e,r=5;for(let n=0;n<r;n++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}var ai=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Gk="Sentry Logger ",fl=["debug","info","warn","error","log","assert","trace"],Ia={};function Ta(e){if(!("console"in _e))return e();let t=_e.console,r={},n=Object.keys(Ia);n.forEach(i=>{let s=Ia[i];r[i]=t[i],t[i]=s});try{return e()}finally{n.forEach(i=>{t[i]=r[i]})}}function zk(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return ai?fl.forEach(r=>{t[r]=(...n)=>{e&&Ta(()=>{_e.console[r](`${Gk}[${r}]:`,...n)})}}):fl.forEach(r=>{t[r]=()=>{}}),t}var se=zk(),qk=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Yk(e){return e==="http"||e==="https"}function ci(e,t=!1){let{host:r,path:n,pass:i,port:s,projectId:o,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&i?`:${i}`:""}@${r}${s?`:${s}`:""}/${n&&`${n}/`}${o}`}function aD(e){let t=qk.exec(e);if(!t){Ta(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[r,n,i="",s="",o="",a=""]=t.slice(1),l="",c=a,h=c.split("/");if(h.length>1&&(l=h.slice(0,-1).join("/"),c=h.pop()),c){let d=c.match(/^\d+/);d&&(c=d[0])}return cD({host:s,pass:i,path:l,projectId:c,port:o,protocol:r,publicKey:n})}function cD(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Kk(e){if(!ai)return!0;let{port:t,projectId:r,protocol:n}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(se.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:r.match(/^\d+$/)?Yk(n)?t&&isNaN(parseInt(t,10))?(se.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(se.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(se.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function Qd(e){let t=typeof e=="string"?aD(e):cD(e);if(!(!t||!Kk(t)))return t}var Nn=class extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}};function Lt(e,t,r){if(!(t in e))return;let n=e[t],i=r(n);typeof i=="function"&&ef(i,n),e[t]=i}function Ln(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{ai&&se.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function ef(e,t){try{let r=t.prototype||{};e.prototype=t.prototype=r,Ln(e,"__sentry_original__",t)}catch{}}function us(e){return e.__sentry_original__}function Yv(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function tf(e){if(as(e))return w({message:e.message,name:e.name,stack:e.stack},uD(e));if(ls(e)){let t=w({type:e.type,target:lD(e.target),currentTarget:lD(e.currentTarget)},uD(e));return typeof CustomEvent<"u"&&oi(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function lD(e){try{return Vv(e)?dl(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function uD(e){if(typeof e=="object"&&e!==null){let t={};for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}else return{}}function Kv(e,t=40){let r=Object.keys(tf(e));r.sort();let n=r[0];if(!n)return"[object has no keys]";if(n.length>=t)return si(n,t);for(let i=r.length;i>0;i--){let s=r.slice(0,i).join(", ");if(!(s.length>t))return i===r.length?s:si(s,t)}return""}function rn(e){return qv(e,new Map)}function qv(e,t){if(Zk(e)){let r=t.get(e);if(r!==void 0)return r;let n={};t.set(e,n);for(let i of Object.keys(e))typeof e[i]<"u"&&(n[i]=qv(e[i],t));return n}if(Array.isArray(e)){let r=t.get(e);if(r!==void 0)return r;let n=[];return t.set(e,n),e.forEach(i=>{n.push(qv(i,t))}),n}return e}function Zk(e){if(!Ur(e))return!1;try{let t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}var li="?",dD=/\(error: (.*)\)/,fD=/captureMessage|captureException/;function Xv(...e){let t=e.sort((r,n)=>r[0]-n[0]).map(r=>r[1]);return(r,n=0,i=0)=>{let s=[],o=r.split(`
22
+ Cooee SDK: v${k.SDK_VERSION}`,console.group("%c Elevate your ecommerce experience with Cooee \u{1F680} ",e),console.log(`%c${t}`,"font-size: 13px; line-height: 1.8;"),console.groupEnd()}},S0={providers:[QS()]},Bf=Be(tr()),Pt=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}},Yd=class{static format(e,t){let r=/{{\s*(\w+)\s*}}/;return t.replace(r,(n,i)=>{switch(i){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 n}})}static formatWithDelimiters(e,t=2,r=",",n="."){if(isNaN(e)||e==null)return"0";let i=(e/100).toFixed(t).split("."),s=i[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+r),o=i[1]?n+i[1]:"";return s+o}},pn=class{id;mID;vID;vName;imageURL;name;link;quantity;price;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}},Pe=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 pn(e)}},CI=Be(Ea()),Fv=Be(nD());function wa(e){return Fv.default.createInstance({name:"lc",storeName:e,driver:Fv.default.LOCALSTORAGE})}var mo=class{static storage;static async get(e,t){return await this.storage?.getItem(e)??t}static set(e,t){return this.storage?.setItem(e,t)}static remove(e){return this.storage?.removeItem(e)}static clear(){return this.storage?.clear()}static getForage(){return this.storage}},st=class extends mo{static storeName="usr";static{this.storage=wa(this.storeName)}},ge=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"},hn=class extends mo{static storeName="ses";static{this.storage=wa(this.storeName)}},rD=Object.prototype.toString;function as(e){switch(rD.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return oi(e,Error)}}function ba(e,t){return rD.call(e)===`[object ${t}]`}function Zd(e){return ba(e,"ErrorEvent")}function Xd(e){return ba(e,"DOMError")}function Bv(e){return ba(e,"DOMException")}function kn(e){return ba(e,"String")}function Ca(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function cs(e){return e===null||Ca(e)||typeof e!="object"&&typeof e!="function"}function Ur(e){return ba(e,"Object")}function ls(e){return typeof Event<"u"&&oi(e,Event)}function Vv(e){return typeof Element<"u"&&oi(e,Element)}function Uv(e){return ba(e,"RegExp")}function Hi(e){return!!(e&&e.then&&typeof e.then=="function")}function Hv(e){return Ur(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function oi(e,t){try{return e instanceof t}catch{return!1}}function ul(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function si(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Jd(e,t){if(!Array.isArray(e))return"";let r=[];for(let n=0;n<e.length;n++){let i=e[n];try{ul(i)?r.push("[VueViewModel]"):r.push(String(i))}catch{r.push("[value cannot be serialized]")}}return r.join(t)}function iD(e,t,r=!1){return kn(e)?Uv(t)?t.test(e):kn(t)?r?e===t:e.includes(t):!1:!1}function Sa(e,t=[],r=!1){return t.some(n=>iD(e,n,r))}function $v(e,t,r=250,n,i,s,o){if(!s.exception||!s.exception.values||!o||!oi(o.originalException,Error))return;let a=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;a&&(s.exception.values=jk(jv(e,t,i,o.originalException,n,s.exception.values,a,0),r))}function jv(e,t,r,n,i,s,o,a){if(s.length>=r+1)return s;let l=[...s];if(oi(n[i],Error)){oD(o,a);let c=e(t,n[i]),h=l.length;sD(c,i,h,a),l=jv(e,t,r,n[i],i,[c,...l],c,h)}return Array.isArray(n.errors)&&n.errors.forEach((c,h)=>{if(oi(c,Error)){oD(o,a);let d=e(t,c),f=l.length;sD(d,`errors[${h}]`,f,a),l=jv(e,t,r,c,i,[d,...l],d,f)}}),l}function oD(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=re(w(w({},e.mechanism),e.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:t})}function sD(e,t,r,n){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=re(w({},e.mechanism),{type:"chained",source:t,exception_id:r,parent_id:n})}function jk(e,t){return e.map(r=>(r.value&&(r.value=si(r.value,t)),r))}var vr="8.18.0",_e=globalThis;function Da(e,t,r){let n=r||_e,i=n.__SENTRY__=n.__SENTRY__||{},s=i[vr]=i[vr]||{};return s[e]||(s[e]=t())}var Wv=_e,$k=80;function dl(e,t={}){if(!e)return"<unknown>";try{let r=e,n=5,i=[],s=0,o=0,a=" > ",l=a.length,c,h=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||$k;for(;r&&s++<n&&(c=Wk(r,h),!(c==="html"||s>1&&o+i.length*l+c.length>=d));)i.push(c),o+=c.length,r=r.parentNode;return i.reverse().join(a)}catch{return"<unknown>"}}function Wk(e,t){let r=e,n=[];if(!r||!r.tagName)return"";if(Wv.HTMLElement&&r instanceof HTMLElement&&r.dataset){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}n.push(r.tagName.toLowerCase());let i=t&&t.length?t.filter(o=>r.getAttribute(o)).map(o=>[o,r.getAttribute(o)]):null;if(i&&i.length)i.forEach(o=>{n.push(`[${o[0]}="${o[1]}"]`)});else{r.id&&n.push(`#${r.id}`);let o=r.className;if(o&&kn(o)){let a=o.split(/\s+/);for(let l of a)n.push(`.${l}`)}}let s=["aria-label","type","name","title","alt"];for(let o of s){let a=r.getAttribute(o);a&&n.push(`[${o}="${a}"]`)}return n.join("")}function Gv(){try{return Wv.document.location.href}catch{return""}}function zv(e){if(!Wv.HTMLElement)return null;let t=e,r=5;for(let n=0;n<r;n++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}var ai=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Gk="Sentry Logger ",fl=["debug","info","warn","error","log","assert","trace"],Ia={};function Ta(e){if(!("console"in _e))return e();let t=_e.console,r={},n=Object.keys(Ia);n.forEach(i=>{let s=Ia[i];r[i]=t[i],t[i]=s});try{return e()}finally{n.forEach(i=>{t[i]=r[i]})}}function zk(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return ai?fl.forEach(r=>{t[r]=(...n)=>{e&&Ta(()=>{_e.console[r](`${Gk}[${r}]:`,...n)})}}):fl.forEach(r=>{t[r]=()=>{}}),t}var se=zk(),qk=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Yk(e){return e==="http"||e==="https"}function ci(e,t=!1){let{host:r,path:n,pass:i,port:s,projectId:o,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&i?`:${i}`:""}@${r}${s?`:${s}`:""}/${n&&`${n}/`}${o}`}function aD(e){let t=qk.exec(e);if(!t){Ta(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[r,n,i="",s="",o="",a=""]=t.slice(1),l="",c=a,h=c.split("/");if(h.length>1&&(l=h.slice(0,-1).join("/"),c=h.pop()),c){let d=c.match(/^\d+/);d&&(c=d[0])}return cD({host:s,pass:i,path:l,projectId:c,port:o,protocol:r,publicKey:n})}function cD(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Kk(e){if(!ai)return!0;let{port:t,projectId:r,protocol:n}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(se.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:r.match(/^\d+$/)?Yk(n)?t&&isNaN(parseInt(t,10))?(se.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(se.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(se.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function Qd(e){let t=typeof e=="string"?aD(e):cD(e);if(!(!t||!Kk(t)))return t}var Nn=class extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}};function Lt(e,t,r){if(!(t in e))return;let n=e[t],i=r(n);typeof i=="function"&&ef(i,n),e[t]=i}function Ln(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{ai&&se.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function ef(e,t){try{let r=t.prototype||{};e.prototype=t.prototype=r,Ln(e,"__sentry_original__",t)}catch{}}function us(e){return e.__sentry_original__}function Yv(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function tf(e){if(as(e))return w({message:e.message,name:e.name,stack:e.stack},uD(e));if(ls(e)){let t=w({type:e.type,target:lD(e.target),currentTarget:lD(e.currentTarget)},uD(e));return typeof CustomEvent<"u"&&oi(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function lD(e){try{return Vv(e)?dl(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function uD(e){if(typeof e=="object"&&e!==null){let t={};for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}else return{}}function Kv(e,t=40){let r=Object.keys(tf(e));r.sort();let n=r[0];if(!n)return"[object has no keys]";if(n.length>=t)return si(n,t);for(let i=r.length;i>0;i--){let s=r.slice(0,i).join(", ");if(!(s.length>t))return i===r.length?s:si(s,t)}return""}function rn(e){return qv(e,new Map)}function qv(e,t){if(Zk(e)){let r=t.get(e);if(r!==void 0)return r;let n={};t.set(e,n);for(let i of Object.keys(e))typeof e[i]<"u"&&(n[i]=qv(e[i],t));return n}if(Array.isArray(e)){let r=t.get(e);if(r!==void 0)return r;let n=[];return t.set(e,n),e.forEach(i=>{n.push(qv(i,t))}),n}return e}function Zk(e){if(!Ur(e))return!1;try{let t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}var li="?",dD=/\(error: (.*)\)/,fD=/captureMessage|captureException/;function Xv(...e){let t=e.sort((r,n)=>r[0]-n[0]).map(r=>r[1]);return(r,n=0,i=0)=>{let s=[],o=r.split(`
23
23
  `);for(let a=n;a<o.length;a++){let l=o[a];if(l.length>1024)continue;let c=dD.test(l)?l.replace(dD,"$1"):l;if(!c.match(/\S*Error: /)){for(let h of t){let d=h(c);if(d){s.push(d);break}}if(s.length>=50+i)break}}return pD(s.slice(i))}}function pD(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(nf(t).function||"")&&t.pop(),t.reverse(),fD.test(nf(t).function||"")&&(t.pop(),fD.test(nf(t).function||"")&&t.pop()),t.slice(0,50).map(r=>re(w({},r),{filename:r.filename||nf(t).filename,function:r.function||li}))}function nf(e){return e[e.length-1]||{}}var Zv="<anonymous>";function yr(e){try{return!e||typeof e!="function"?Zv:e.name||Zv}catch{return Zv}}function rf(e){let t=e.exception;if(t){let r=[];try{return t.values.forEach(n=>{n.stacktrace.frames&&r.push(...n.stacktrace.frames)}),r}catch{return}}}var of={},hD={};function Fn(e,t){of[e]=of[e]||[],of[e].push(t)}function Bn(e,t){hD[e]||(t(),hD[e]=!0)}function on(e,t){let r=e&&of[e];if(r)for(let n of r)try{n(t)}catch(i){ai&&se.error(`Error while triggering instrumentation handler.
24
24
  Type: ${e}
25
25
  Name: ${yr(n)}
@@ -34,7 +34,7 @@ Event: ${Hr(e)}`),!0):eF(e,t.denyUrls)?(gt&&se.warn(`Event dropped due to being
34
34
  Event: ${Hr(e)}.
35
35
  Url: ${Sf(e)}`),!0):tF(e,t.allowUrls)?!1:(gt&&se.warn(`Event dropped due to not being matched by \`allowUrls\` option.
36
36
  Event: ${Hr(e)}.
37
- Url: ${Sf(e)}`),!0)}function JL(e,t){return e.type||!t||!t.length?!1:nF(e).some(r=>Sa(r,t))}function QL(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;let r=e.transaction;return r?Sa(r,t):!1}function eF(e,t){if(!t||!t.length)return!1;let r=Sf(e);return r?Sa(r,t):!1}function tF(e,t){if(!t||!t.length)return!0;let r=Sf(e);return r?Sa(r,t):!0}function nF(e){let t=[];e.message&&t.push(e.message);let r;try{r=e.exception.values[e.exception.values.length-1]}catch{}return r&&r.value&&(t.push(r.value),r.type&&t.push(`${r.type}: ${r.value}`)),t}function rF(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function iF(e=[]){for(let t=e.length-1;t>=0;t--){let r=e[t];if(r&&r.filename!=="<anonymous>"&&r.filename!=="[native code]")return r.filename||null}return null}function Sf(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?iF(t):null}catch{return gt&&se.error(`Cannot extract url for event ${Hr(e)}`),null}}function oF(e){return e.type||!e.exception||!e.exception.values||e.exception.values.length===0?!1:!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value)}var sF="Dedupe",aF=()=>{let e;return{name:sF,processEvent(t){if(t.type)return t;try{if(cF(t,e))return gt&&se.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},If=aF;function cF(e,t){return t?!!(lF(e,t)||uF(e,t)):!1}function lF(e,t){let r=e.message,n=t.message;return!(!r&&!n||r&&!n||!r&&n||r!==n||!tI(e,t)||!eI(e,t))}function uF(e,t){let r=QD(t),n=QD(e);return!(!r||!n||r.type!==n.type||r.value!==n.value||!tI(e,t)||!eI(e,t))}function eI(e,t){let r=rf(e),n=rf(t);if(!r&&!n)return!0;if(r&&!n||!r&&n||(r=r,n=n,n.length!==r.length))return!1;for(let i=0;i<n.length;i++){let s=n[i],o=r[i];if(s.filename!==o.filename||s.lineno!==o.lineno||s.colno!==o.colno||s.function!==o.function)return!1}return!0}function tI(e,t){let r=e.fingerprint,n=t.fingerprint;if(!r&&!n)return!0;if(r&&!n||!r&&n)return!1;r=r,n=n;try{return r.join("")===n.join("")}catch{return!1}}function QD(e){return e.exception&&e.exception.values&&e.exception.values[0]}var qt=_e,Py=0;function ky(){return Py>0}function CF(){Py++,setTimeout(()=>{Py--})}function ms(e,t={},r){if(typeof e!="function")return e;try{let i=e.__sentry_wrapped__;if(i)return i;if(us(e))return e}catch{return e}let n=function(){let i=Array.prototype.slice.call(arguments);try{r&&typeof r=="function"&&r.apply(this,arguments);let s=i.map(o=>ms(o,t));return e.apply(this,s)}catch(s){throw CF(),yf(o=>{o.addEventProcessor(a=>(t.mechanism&&(xa(a,void 0,void 0),ji(a,t.mechanism)),a.extra=re(w({},a.extra),{arguments:i}),a)),wf(s)}),s}};try{for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}catch{}ef(n,e),Ln(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return e.name}})}catch{}return n}var Wi=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Tf(e,t){let r=By(e,t),n={type:t&&t.name,value:xF(t)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function SF(e,t,r,n){let i=Ut(),s=i&&i.getOptions().normalizeDepth,o=AF(t),a={__serialized__:uf(t,s)};if(o)return{exception:{values:[Tf(e,o)]},extra:a};let l={exception:{values:[{type:ls(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:RF(t,{isUnhandledRejection:n})}]},extra:a};if(r){let c=By(e,r);c.length&&(l.exception.values[0].stacktrace={frames:c})}return l}function Ly(e,t){return{exception:{values:[Tf(e,t)]}}}function By(e,t){let r=t.stacktrace||t.stack||"",n=IF(t),i=TF(t);try{return e(r,n,i)}catch{}return[]}var DF=/Minified React error #\d+;/i;function IF(e){return e&&DF.test(e.message)?1:0}function TF(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function xF(e){let t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function oI(e,t,r,n){let i=r&&r.syntheticException||void 0,s=xf(e,t,i,n);return ji(s),s.level="error",r&&r.event_id&&(s.event_id=r.event_id),_r(s)}function sI(e,t,r="info",n,i){let s=n&&n.syntheticException||void 0,o=Fy(e,t,s,i);return o.level=r,n&&n.event_id&&(o.event_id=n.event_id),_r(o)}function xf(e,t,r,n,i){let s;if(Zd(t)&&t.error)return Ly(e,t.error);if(Xd(t)||Bv(t)){let o=t;if("stack"in t)s=Ly(e,t);else{let a=o.name||(Xd(o)?"DOMError":"DOMException"),l=o.message?`${a}: ${o.message}`:a;s=Fy(e,l,r,n),xa(s,l)}return"code"in o&&(s.tags=re(w({},s.tags),{"DOMException.code":`${o.code}`})),s}return as(t)?Ly(e,t):Ur(t)||ls(t)?(s=SF(e,t,r,i),ji(s,{synthetic:!0}),s):(s=Fy(e,t,r,n),xa(s,`${t}`,void 0),ji(s,{synthetic:!0}),s)}function Fy(e,t,r,n){let i={};if(n&&r){let s=By(e,r);s.length&&(i.exception={values:[{value:t,stacktrace:{frames:s}}]})}if(Ca(t)){let{__sentry_template_string__:s,__sentry_template_values__:o}=t;return i.logentry={message:s,params:o},i}return i.message=t,i}function RF(e,{isUnhandledRejection:t}){let r=Kv(e),n=t?"promise rejection":"exception";return Zd(e)?`Event \`ErrorEvent\` captured as ${n} with message \`${e.message}\``:ls(e)?`Event \`${NF(e)}\` (type=${e.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}function NF(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function AF(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let r=e[t];if(r instanceof Error)return r}}function aI(e,{metadata:t,tunnel:r,dsn:n}){let i=w(w({event_id:e.event_id,sent_at:new Date().toISOString()},t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}}),!!r&&!!n&&{dsn:ci(n)}),s=MF(e);return di(i,[s])}function MF(e){return[{type:"user_report"},e]}var bl=class extends wl{constructor(e){let t=w({parentSpanIsAlwaysRootSpan:!0},e),r=qt.SENTRY_SDK_SOURCE||oy();Oy(t,"browser",["browser"],r),super(t),t.sendClientReports&&qt.document&&qt.document.addEventListener("visibilitychange",()=>{qt.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,t){return oI(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",r){return sI(this._options.stackParser,e,t,r,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){Wi&&se.warn("SDK not enabled, will not capture user feedback.");return}let t=aI(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(t)}_prepareEvent(e,t,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,r)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){Wi&&se.log("No outcomes to send");return}if(!this._dsn){Wi&&se.log("No dsn provided, will not send outcomes");return}Wi&&se.log("Sending outcomes:",e);let t=my(e,this._options.tunnel&&ci(this._dsn));this.sendEnvelope(t)}},cI=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Qt=_e,OF=1e3,lI,Vy,Uy;function Hy(e){let t="dom";Fn(t,e),Bn(t,PF)}function PF(){if(!Qt.document)return;let e=on.bind(null,"dom"),t=uI(e,!0);Qt.document.addEventListener("click",t,!1),Qt.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(r=>{let n=Qt[r]&&Qt[r].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Lt(n,"addEventListener",function(i){return function(s,o,a){if(s==="click"||s=="keypress")try{let l=this,c=l.__sentry_instrumentation_handlers__=l.__sentry_instrumentation_handlers__||{},h=c[s]=c[s]||{refCount:0};if(!h.handler){let d=uI(e);h.handler=d,i.call(this,s,d,a)}h.refCount++}catch{}return i.call(this,s,o,a)}}),Lt(n,"removeEventListener",function(i){return function(s,o,a){if(s==="click"||s=="keypress")try{let l=this,c=l.__sentry_instrumentation_handlers__||{},h=c[s];h&&(h.refCount--,h.refCount<=0&&(i.call(this,s,h.handler,a),h.handler=void 0,delete c[s]),Object.keys(c).length===0&&delete l.__sentry_instrumentation_handlers__)}catch{}return i.call(this,s,o,a)}}))})}function kF(e){if(e.type!==Vy)return!1;try{if(!e.target||e.target._sentryId!==Uy)return!1}catch{}return!0}function LF(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function uI(e,t=!1){return r=>{if(!r||r._sentryCaptured)return;let n=FF(r);if(LF(r.type,n))return;Ln(r,"_sentryCaptured",!0),n&&!n._sentryId&&Ln(n,"_sentryId",mn());let i=r.type==="keypress"?"input":r.type;kF(r)||(e({event:r,name:i,global:t}),Vy=r.type,Uy=n?n._sentryId:void 0),clearTimeout(lI),lI=Qt.setTimeout(()=>{Uy=void 0,Vy=void 0},OF)}}function FF(e){try{return e.target}catch{return null}}var Rf;function jy(e){let t="history";Fn(t,e),Bn(t,BF)}function BF(){if(!yy())return;let e=Qt.onpopstate;Qt.onpopstate=function(...r){let n=Qt.location.href,i=Rf;if(Rf=n,on("history",{from:i,to:n}),e)try{return e.apply(this,r)}catch{}};function t(r){return function(...n){let i=n.length>2?n[2]:void 0;if(i){let s=Rf,o=String(i);Rf=o,on("history",{from:s,to:o})}return r.apply(this,n)}}Lt(Qt.history,"pushState",t),Lt(Qt.history,"replaceState",t)}var Nf={};function $y(e){let t=Nf[e];if(t)return t;let r=Qt[e];if(pl(r))return Nf[e]=r.bind(Qt);let n=Qt.document;if(n&&typeof n.createElement=="function")try{let i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);let s=i.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(i)}catch(i){cI&&se.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,i)}return r&&(Nf[e]=r.bind(Qt))}function Af(e){Nf[e]=void 0}var gs="__sentry_xhr_v3__";function Wy(e){let t="xhr";Fn(t,e),Bn(t,VF)}function VF(){if(!Qt.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;Lt(e,"open",function(t){return function(...r){let n=nr()*1e3,i=kn(r[0])?r[0].toUpperCase():void 0,s=UF(r[1]);if(!i||!s)return t.apply(this,r);this[gs]={method:i,url:s,request_headers:{}},i==="POST"&&s.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let o=()=>{let a=this[gs];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}let l={endTimestamp:nr()*1e3,startTimestamp:n,xhr:this};on("xhr",l)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?Lt(this,"onreadystatechange",function(a){return function(...l){return o(),a.apply(this,l)}}):this.addEventListener("readystatechange",o),Lt(this,"setRequestHeader",function(a){return function(...l){let[c,h]=l,d=this[gs];return d&&kn(c)&&kn(h)&&(d.request_headers[c.toLowerCase()]=h),a.apply(this,l)}}),t.apply(this,r)}}),Lt(e,"send",function(t){return function(...r){let n=this[gs];if(!n)return t.apply(this,r);r[0]!==void 0&&(n.body=r[0]);let i={startTimestamp:nr()*1e3,xhr:this};return on("xhr",i),t.apply(this,r)}})}function UF(e){if(kn(e))return e;try{return e.toString()}catch{}}function Gy(e,t=$y("fetch")){let r=0,n=0;function i(s){let o=s.body.length;r+=o,n++;let a=w({body:s.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:r<=6e4&&n<15},e.fetchOptions);if(!t)return Af("fetch"),go("No fetch implementation available");try{return t(e.url,a).then(l=>(r-=o,n--,{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}))}catch(l){return Af("fetch"),r-=o,n--,go(l)}}return bf(e,i)}var HF=30,jF=50;function zy(e,t,r,n){let i={filename:e,function:t==="<anonymous>"?li:t,in_app:!0};return r!==void 0&&(i.lineno=r),n!==void 0&&(i.colno=n),i}var $F=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,WF=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,GF=/\((\S*)(?::(\d+))(?::(\d+))\)/,zF=e=>{let t=$F.exec(e);if(t){let[,n,i,s]=t;return zy(n,li,+i,+s)}let r=WF.exec(e);if(r){if(r[2]&&r[2].indexOf("eval")===0){let s=GF.exec(r[2]);s&&(r[2]=s[1],r[3]=s[2],r[4]=s[3])}let[n,i]=hI(r[1]||li,r[2]);return zy(i,n,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},dI=[HF,zF],qF=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,YF=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,KF=e=>{let t=qF.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let i=YF.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],n=t[1]||li;return[n,r]=hI(n,r),zy(r,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},fI=[jF,KF],pI=[dI,fI],qy=Xv(...pI),hI=(e,t)=>{let r=e.indexOf("safari-extension")!==-1,n=e.indexOf("safari-web-extension")!==-1;return r||n?[e.indexOf("@")!==-1?e.split("@")[0]:li,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Mf=1024,XF="Breadcrumbs",JF=(e={})=>{let t=w({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},e);return{name:XF,setup(r){t.console&&Jv(tB(r)),t.dom&&Hy(eB(r,t.dom)),t.xhr&&Wy(nB(r)),t.fetch&&ny(rB(r)),t.history&&jy(iB(r)),t.sentry&&r.on("beforeSendEvent",QF(r))}}},mI=JF;function QF(e){return function(t){Ut()===e&&fi({category:`sentry.${t.type==="transaction"?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:Hr(t)},{event:t})}}function eB(e,t){return function(r){if(Ut()!==e)return;let n,i,s=typeof t=="object"?t.serializeAttribute:void 0,o=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;o&&o>Mf&&(Wi&&se.warn(`\`dom.maxStringLength\` cannot exceed ${Mf}, but a value of ${o} was configured. Sentry will use ${Mf} instead.`),o=Mf),typeof s=="string"&&(s=[s]);try{let l=r.event,c=oB(l)?l.target:l;n=dl(c,{keyAttrs:s,maxStringLength:o}),i=zv(c)}catch{n="<unknown>"}if(n.length===0)return;let a={category:`ui.${r.name}`,message:n};i&&(a.data={"ui.component_name":i}),fi(a,{event:r.event,name:r.name,global:r.global})}}function tB(e){return function(t){if(Ut()!==e)return;let r={category:"console",data:{arguments:t.args,logger:"console"},level:cy(t.level),message:Jd(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)r.message=`Assertion failed: ${Jd(t.args.slice(1)," ")||"console.assert"}`,r.data.arguments=t.args.slice(1);else return;fi(r,{input:t.args,level:t.level})}}function nB(e){return function(t){if(Ut()!==e)return;let{startTimestamp:r,endTimestamp:n}=t,i=t.xhr[gs];if(!r||!n||!i)return;let{method:s,url:o,status_code:a,body:l}=i,c={method:s,url:o,status_code:a},h={xhr:t.xhr,input:l,startTimestamp:r,endTimestamp:n};fi({category:"xhr",data:c,type:"http"},h)}}function rB(e){return function(t){if(Ut()!==e)return;let{startTimestamp:r,endTimestamp:n}=t;if(n&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method==="POST"))if(t.error){let i=t.fetchData,s={data:t.error,input:t.args,startTimestamp:r,endTimestamp:n};fi({category:"fetch",data:i,level:"error",type:"http"},s)}else{let i=t.response,s=re(w({},t.fetchData),{status_code:i&&i.status}),o={input:t.args,response:i,startTimestamp:r,endTimestamp:n};fi({category:"fetch",data:s,type:"http"},o)}}}function iB(e){return function(t){if(Ut()!==e)return;let r=t.from,n=t.to,i=ml(qt.location.href),s=r?ml(r):void 0,o=ml(n);(!s||!s.path)&&(s=i),i.protocol===o.protocol&&i.host===o.host&&(n=o.relative),i.protocol===s.protocol&&i.host===s.host&&(r=s.relative),fi({category:"navigation",data:{from:r,to:n}})}}function oB(e){return!!e&&!!e.target}var sB=["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"],aB="BrowserApiErrors",cB=(e={})=>{let t=w({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},e);return{name:aB,setupOnce(){t.setTimeout&&Lt(qt,"setTimeout",gI),t.setInterval&&Lt(qt,"setInterval",gI),t.requestAnimationFrame&&Lt(qt,"requestAnimationFrame",lB),t.XMLHttpRequest&&"XMLHttpRequest"in qt&&Lt(XMLHttpRequest.prototype,"send",uB);let r=t.eventTarget;r&&(Array.isArray(r)?r:sB).forEach(dB)}}},vI=cB;function gI(e){return function(...t){let r=t[0];return t[0]=ms(r,{mechanism:{data:{function:yr(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function lB(e){return function(t){return e.apply(this,[ms(t,{mechanism:{data:{function:"requestAnimationFrame",handler:yr(e)},handled:!1,type:"instrument"}})])}}function uB(e){return function(...t){let r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(n=>{n in r&&typeof r[n]=="function"&&Lt(r,n,function(i){let s={mechanism:{data:{function:n,handler:yr(i)},handled:!1,type:"instrument"}},o=us(i);return o&&(s.mechanism.data.handler=yr(o)),ms(i,s)})}),e.apply(this,t)}}function dB(e){let t=qt,r=t[e]&&t[e].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(Lt(r,"addEventListener",function(n){return function(i,s,o){try{typeof s.handleEvent=="function"&&(s.handleEvent=ms(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:yr(s),target:e},handled:!1,type:"instrument"}}))}catch{}return n.apply(this,[i,ms(s,{mechanism:{data:{function:"addEventListener",handler:yr(s),target:e},handled:!1,type:"instrument"}}),o])}}),Lt(r,"removeEventListener",function(n){return function(i,s,o){let a=s;try{let l=a&&a.__sentry_wrapped__;l&&n.call(this,i,l,o)}catch{}return n.call(this,i,a,o)}}))}var fB="GlobalHandlers",pB=(e={})=>{let t=w({onerror:!0,onunhandledrejection:!0},e);return{name:fB,setupOnce(){Error.stackTraceLimit=50},setup(r){t.onerror&&(hB(r),yI("onerror")),t.onunhandledrejection&&(mB(r),yI("onunhandledrejection"))}}},_I=pB;function hB(e){ry(t=>{let{stackParser:r,attachStacktrace:n}=EI();if(Ut()!==e||ky())return;let{msg:i,url:s,line:o,column:a,error:l}=t,c=yB(xf(r,l||i,void 0,n,!1),s,o,a);c.level="error",El(c,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}function mB(e){iy(t=>{let{stackParser:r,attachStacktrace:n}=EI();if(Ut()!==e||ky())return;let i=gB(t),s=cs(i)?vB(i):xf(r,i,void 0,n,!0);s.level="error",El(s,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function gB(e){if(cs(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function vB(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function yB(e,t,r,n){let i=e.exception=e.exception||{},s=i.values=i.values||[],o=s[0]=s[0]||{},a=o.stacktrace=o.stacktrace||{},l=a.frames=a.frames||[],c=isNaN(parseInt(n,10))?void 0:n,h=isNaN(parseInt(r,10))?void 0:r,d=kn(t)&&t.length>0?t:Gv();return l.length===0&&l.push({colno:c,filename:d,function:li,in_app:!0,lineno:h}),e}function yI(e){Wi&&se.log(`Global Handler attached: ${e}`)}function EI(){let e=Ut();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var wI=()=>({name:"HttpContext",preprocessEvent(e){if(!qt.navigator&&!qt.location&&!qt.document)return;let t=e.request&&e.request.url||qt.location&&qt.location.href,{referrer:r}=qt.document||{},{userAgent:n}=qt.navigator||{},i=w(w(w({},e.request&&e.request.headers),r&&{Referer:r}),n&&{"User-Agent":n}),s=re(w(w({},e.request),t&&{url:t}),{headers:i});e.request=s}}),_B="cause",EB=5,wB="LinkedErrors",bB=(e={})=>{let t=e.limit||EB,r=e.key||_B;return{name:wB,preprocessEvent(n,i,s){let o=s.getOptions();$v(Tf,o.stackParser,o.maxValueLength,r,t,n,i)}}},bI=bB;function Yy(e){return[Df(),Cf(),vI(),mI(),_I(),bI(),If(),wI()]}var Ky=class extends Error{cause;constructor(e,t){super(e),this.cause=t}},Ct=class $0{static INSTANCE;contexts={};tags;client;user;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new $0),this.INSTANCE}captureException(t,r,n){C.error(t),this.getNewScope(r,n).captureException(t)}captureMessage(t,r,n,i){this.getNewScope(n,i).captureMessage(t,r??"error")}captureError(t,r,n,i){C.error(t,r);let s=this.getNewScope(n,i),o=new Ky(t,r);s.captureException(o)}setGlobalContext(t,r){this.contexts[t]=w({context:r},this.contexts[t])}setUser(t){this.user=t}setTags(t){this.tags=t}getNewScope(t,r){let n=new An;if(n.setClient(this.client),n.setUser(this.user),t?.triggerContext){let i=t.triggerContext;n.setExtras(i.triggerData.sentryContext()),delete t.triggerContext}return t&&n.setExtras(t),this.tags&&n.setTags(this.tags),r&&n.setTags(r),Object.keys(this.contexts).forEach(i=>{n.setContext(i,this.contexts[i])}),n.setTag("language",navigator.language),n.setTag("timezone",ue.getTimezone()),n}init(){let t=Yy({}).filter(r=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(r.name));this.client=new bl({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:Gy,stackParser:qy,integrations:t,environment:Rn.mode,release:`web-sdk@${k.SDK_VERSION}`,debug:Rn.debug}),this.client.init()}},ue=class{static tz;static isValidURL(e){try{return new URL(e)}catch{return}}static isNull(e){return!e||e==="null"||e==="undefined"}static removeFromArray(e,t){let r=e.indexOf(t);return r===-1?!1:(e.splice(r,1),!0)}static formatCurrency(e,t){if(e==0&&t)return"Free";let r=Pe.get(),n=Pt.get(),i=r.shopCurrencyCode||n.currency,s=r.currencyCode;s||C.warn("Currency code is not set in RuntimeData");let o=n.money?.format??r.moneyFormat,a;if(o&&i===s)a=Yd.format(e*100,o);else{let l;try{l=new Intl.NumberFormat(this.getLang(),{style:"currency",currency:s||i,minimumFractionDigits:0,maximumFractionDigits:2})}catch(c){return Ct.getInstance().captureException(c,{currentCurrency:s,shopCurrency:i}),""}a=l.format(e),a=a.replace("\u20B9","Rs. "),n.money?.showCurrency&&s!=="INR"&&(a=a.concat(` ${s}`))}return a}static formatNumber(e){return new Intl.NumberFormat(this.getLang(),{notation:"compact"}).format(e)}static getLang(){return navigator.languages!==void 0?navigator.languages[0].split("-")[0]:navigator.language??"en"}static getTimezone(){if(this.tz)return this.tz;try{return this.tz=Intl.DateTimeFormat().resolvedOptions().timeZone,this.tz}catch{return""}}static documentReady(e){document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",e)}static onDocumentLoaded(e){document.readyState==="complete"?e():document.addEventListener("readystatechange",()=>{document.readyState==="complete"&&e()})}static showSnackbar(e){let t=document.createElement("span");t.id="snackbar",t.innerText=e,document.body.appendChild(t),t.className="show",setTimeout(()=>{t.classList.remove("show"),document.body.removeChild(t)},3e3)}static async retrySelectorForElements(e,t=10,r=document){let n=0,i=document.querySelectorAll("nonexistent-tag");for(;n<t;){let s=Math.min(100*2**n,5e3);if(await CI.JSUtils.sleep(s),i=r.querySelectorAll(e),i.length)return C.debug(`Attempt ${n+1}: ${i.length} elements found with ${e}`),i;C.debug(`Attempt ${n+1}: Elements not found with ${e}. Retrying after ${s}ms.`),n++}return C.warn(`Max attempts reached. Element not found with ${e}.`),i}static async retrySelector(e,t=10,r=document){return(await this.retrySelectorForElements(e,t,r)).item(0)}static async getCartAttributes(){let e=await st.get(ge.DEVICE_ID),t=await hn.get(ge.ID,"");return[{key:"letscooee_did",value:e},{key:"letscooee_sid",value:t},{key:"__letscooee_time",value:new Date().toLocaleString()},{key:"__letscooee_via",value:"Buy Now"}]}static onNodesRemoved(e,t,r=document.body){let n=new MutationObserver(i=>{i.forEach(s=>{s.removedNodes.forEach(o=>{(o===e||o.contains(e))&&(t(),n.disconnect())})})});n.observe(r,{childList:!0})}};function Na(e,t,r){Object.defineProperty(e,t,{enumerable:!1,configurable:!1,writable:!1,value:r})}var pi=class Fh{transform(t){return t==null?null:ue.formatCurrency(t)}static \u0275fac=function(t){return new(t||Fh)};static \u0275pipe=Qo({name:"cooeeCurrency",type:Fh,pure:!0})},II=Be(kf()),CB=Object.prototype.toString,Ma=Array.isArray||function(e){return CB.call(e)==="[object Array]"};function Xy(e){return typeof e=="function"}function SB(e){return Ma(e)?"array":typeof e}function Zy(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function SI(e,t){return e!=null&&typeof e=="object"&&t in e}function DB(e,t){return e!=null&&typeof e!="object"&&e.hasOwnProperty&&e.hasOwnProperty(t)}var IB=RegExp.prototype.test;function TB(e,t){return IB.call(e,t)}var xB=/\S/;function RB(e){return!TB(xB,e)}var NB={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};function AB(e){return String(e).replace(/[&<>"'`=\/]/g,function(t){return NB[t]})}var MB=/\s*/,OB=/\s+/,DI=/\s*=/,PB=/\s*\}/,kB=/#|\^|\/|>|\{|&|=|!/;function LB(e,t){if(!e)return[];var r=!1,n=[],i=[],s=[],o=!1,a=!1,l="",c=0;function h(){if(o&&!a)for(;s.length;)delete i[s.pop()];else s=[];o=!1,a=!1}var d,f,g;function m(j){if(typeof j=="string"&&(j=j.split(OB,2)),!Ma(j)||j.length!==2)throw new Error("Invalid tags: "+j);d=new RegExp(Zy(j[0])+"\\s*"),f=new RegExp("\\s*"+Zy(j[1])),g=new RegExp("\\s*"+Zy("}"+j[1]))}m(t||Er.tags);for(var b=new Sl(e),I,A,F,V,M,J;!b.eos();){if(I=b.pos,F=b.scanUntil(d),F)for(var Le=0,dt=F.length;Le<dt;++Le)V=F.charAt(Le),RB(V)?(s.push(i.length),l+=V):(a=!0,r=!0,l+=" "),i.push(["text",V,I,I+1]),I+=1,V===`
37
+ Url: ${Sf(e)}`),!0)}function JL(e,t){return e.type||!t||!t.length?!1:nF(e).some(r=>Sa(r,t))}function QL(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;let r=e.transaction;return r?Sa(r,t):!1}function eF(e,t){if(!t||!t.length)return!1;let r=Sf(e);return r?Sa(r,t):!1}function tF(e,t){if(!t||!t.length)return!0;let r=Sf(e);return r?Sa(r,t):!0}function nF(e){let t=[];e.message&&t.push(e.message);let r;try{r=e.exception.values[e.exception.values.length-1]}catch{}return r&&r.value&&(t.push(r.value),r.type&&t.push(`${r.type}: ${r.value}`)),t}function rF(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function iF(e=[]){for(let t=e.length-1;t>=0;t--){let r=e[t];if(r&&r.filename!=="<anonymous>"&&r.filename!=="[native code]")return r.filename||null}return null}function Sf(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?iF(t):null}catch{return gt&&se.error(`Cannot extract url for event ${Hr(e)}`),null}}function oF(e){return e.type||!e.exception||!e.exception.values||e.exception.values.length===0?!1:!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value)}var sF="Dedupe",aF=()=>{let e;return{name:sF,processEvent(t){if(t.type)return t;try{if(cF(t,e))return gt&&se.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},If=aF;function cF(e,t){return t?!!(lF(e,t)||uF(e,t)):!1}function lF(e,t){let r=e.message,n=t.message;return!(!r&&!n||r&&!n||!r&&n||r!==n||!tI(e,t)||!eI(e,t))}function uF(e,t){let r=QD(t),n=QD(e);return!(!r||!n||r.type!==n.type||r.value!==n.value||!tI(e,t)||!eI(e,t))}function eI(e,t){let r=rf(e),n=rf(t);if(!r&&!n)return!0;if(r&&!n||!r&&n||(r=r,n=n,n.length!==r.length))return!1;for(let i=0;i<n.length;i++){let s=n[i],o=r[i];if(s.filename!==o.filename||s.lineno!==o.lineno||s.colno!==o.colno||s.function!==o.function)return!1}return!0}function tI(e,t){let r=e.fingerprint,n=t.fingerprint;if(!r&&!n)return!0;if(r&&!n||!r&&n)return!1;r=r,n=n;try{return r.join("")===n.join("")}catch{return!1}}function QD(e){return e.exception&&e.exception.values&&e.exception.values[0]}var qt=_e,Py=0;function ky(){return Py>0}function CF(){Py++,setTimeout(()=>{Py--})}function ms(e,t={},r){if(typeof e!="function")return e;try{let i=e.__sentry_wrapped__;if(i)return i;if(us(e))return e}catch{return e}let n=function(){let i=Array.prototype.slice.call(arguments);try{r&&typeof r=="function"&&r.apply(this,arguments);let s=i.map(o=>ms(o,t));return e.apply(this,s)}catch(s){throw CF(),yf(o=>{o.addEventProcessor(a=>(t.mechanism&&(xa(a,void 0,void 0),ji(a,t.mechanism)),a.extra=re(w({},a.extra),{arguments:i}),a)),wf(s)}),s}};try{for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}catch{}ef(n,e),Ln(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return e.name}})}catch{}return n}var Wi=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Tf(e,t){let r=By(e,t),n={type:t&&t.name,value:xF(t)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function SF(e,t,r,n){let i=Ut(),s=i&&i.getOptions().normalizeDepth,o=AF(t),a={__serialized__:uf(t,s)};if(o)return{exception:{values:[Tf(e,o)]},extra:a};let l={exception:{values:[{type:ls(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:RF(t,{isUnhandledRejection:n})}]},extra:a};if(r){let c=By(e,r);c.length&&(l.exception.values[0].stacktrace={frames:c})}return l}function Ly(e,t){return{exception:{values:[Tf(e,t)]}}}function By(e,t){let r=t.stacktrace||t.stack||"",n=IF(t),i=TF(t);try{return e(r,n,i)}catch{}return[]}var DF=/Minified React error #\d+;/i;function IF(e){return e&&DF.test(e.message)?1:0}function TF(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function xF(e){let t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function oI(e,t,r,n){let i=r&&r.syntheticException||void 0,s=xf(e,t,i,n);return ji(s),s.level="error",r&&r.event_id&&(s.event_id=r.event_id),_r(s)}function sI(e,t,r="info",n,i){let s=n&&n.syntheticException||void 0,o=Fy(e,t,s,i);return o.level=r,n&&n.event_id&&(o.event_id=n.event_id),_r(o)}function xf(e,t,r,n,i){let s;if(Zd(t)&&t.error)return Ly(e,t.error);if(Xd(t)||Bv(t)){let o=t;if("stack"in t)s=Ly(e,t);else{let a=o.name||(Xd(o)?"DOMError":"DOMException"),l=o.message?`${a}: ${o.message}`:a;s=Fy(e,l,r,n),xa(s,l)}return"code"in o&&(s.tags=re(w({},s.tags),{"DOMException.code":`${o.code}`})),s}return as(t)?Ly(e,t):Ur(t)||ls(t)?(s=SF(e,t,r,i),ji(s,{synthetic:!0}),s):(s=Fy(e,t,r,n),xa(s,`${t}`,void 0),ji(s,{synthetic:!0}),s)}function Fy(e,t,r,n){let i={};if(n&&r){let s=By(e,r);s.length&&(i.exception={values:[{value:t,stacktrace:{frames:s}}]})}if(Ca(t)){let{__sentry_template_string__:s,__sentry_template_values__:o}=t;return i.logentry={message:s,params:o},i}return i.message=t,i}function RF(e,{isUnhandledRejection:t}){let r=Kv(e),n=t?"promise rejection":"exception";return Zd(e)?`Event \`ErrorEvent\` captured as ${n} with message \`${e.message}\``:ls(e)?`Event \`${NF(e)}\` (type=${e.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}function NF(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function AF(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let r=e[t];if(r instanceof Error)return r}}function aI(e,{metadata:t,tunnel:r,dsn:n}){let i=w(w({event_id:e.event_id,sent_at:new Date().toISOString()},t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}}),!!r&&!!n&&{dsn:ci(n)}),s=MF(e);return di(i,[s])}function MF(e){return[{type:"user_report"},e]}var bl=class extends wl{constructor(e){let t=w({parentSpanIsAlwaysRootSpan:!0},e),r=qt.SENTRY_SDK_SOURCE||oy();Oy(t,"browser",["browser"],r),super(t),t.sendClientReports&&qt.document&&qt.document.addEventListener("visibilitychange",()=>{qt.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,t){return oI(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",r){return sI(this._options.stackParser,e,t,r,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){Wi&&se.warn("SDK not enabled, will not capture user feedback.");return}let t=aI(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(t)}_prepareEvent(e,t,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,r)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){Wi&&se.log("No outcomes to send");return}if(!this._dsn){Wi&&se.log("No dsn provided, will not send outcomes");return}Wi&&se.log("Sending outcomes:",e);let t=my(e,this._options.tunnel&&ci(this._dsn));this.sendEnvelope(t)}},cI=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Qt=_e,OF=1e3,lI,Vy,Uy;function Hy(e){let t="dom";Fn(t,e),Bn(t,PF)}function PF(){if(!Qt.document)return;let e=on.bind(null,"dom"),t=uI(e,!0);Qt.document.addEventListener("click",t,!1),Qt.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(r=>{let n=Qt[r]&&Qt[r].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Lt(n,"addEventListener",function(i){return function(s,o,a){if(s==="click"||s=="keypress")try{let l=this,c=l.__sentry_instrumentation_handlers__=l.__sentry_instrumentation_handlers__||{},h=c[s]=c[s]||{refCount:0};if(!h.handler){let d=uI(e);h.handler=d,i.call(this,s,d,a)}h.refCount++}catch{}return i.call(this,s,o,a)}}),Lt(n,"removeEventListener",function(i){return function(s,o,a){if(s==="click"||s=="keypress")try{let l=this,c=l.__sentry_instrumentation_handlers__||{},h=c[s];h&&(h.refCount--,h.refCount<=0&&(i.call(this,s,h.handler,a),h.handler=void 0,delete c[s]),Object.keys(c).length===0&&delete l.__sentry_instrumentation_handlers__)}catch{}return i.call(this,s,o,a)}}))})}function kF(e){if(e.type!==Vy)return!1;try{if(!e.target||e.target._sentryId!==Uy)return!1}catch{}return!0}function LF(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function uI(e,t=!1){return r=>{if(!r||r._sentryCaptured)return;let n=FF(r);if(LF(r.type,n))return;Ln(r,"_sentryCaptured",!0),n&&!n._sentryId&&Ln(n,"_sentryId",mn());let i=r.type==="keypress"?"input":r.type;kF(r)||(e({event:r,name:i,global:t}),Vy=r.type,Uy=n?n._sentryId:void 0),clearTimeout(lI),lI=Qt.setTimeout(()=>{Uy=void 0,Vy=void 0},OF)}}function FF(e){try{return e.target}catch{return null}}var Rf;function jy(e){let t="history";Fn(t,e),Bn(t,BF)}function BF(){if(!yy())return;let e=Qt.onpopstate;Qt.onpopstate=function(...r){let n=Qt.location.href,i=Rf;if(Rf=n,on("history",{from:i,to:n}),e)try{return e.apply(this,r)}catch{}};function t(r){return function(...n){let i=n.length>2?n[2]:void 0;if(i){let s=Rf,o=String(i);Rf=o,on("history",{from:s,to:o})}return r.apply(this,n)}}Lt(Qt.history,"pushState",t),Lt(Qt.history,"replaceState",t)}var Nf={};function $y(e){let t=Nf[e];if(t)return t;let r=Qt[e];if(pl(r))return Nf[e]=r.bind(Qt);let n=Qt.document;if(n&&typeof n.createElement=="function")try{let i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);let s=i.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(i)}catch(i){cI&&se.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,i)}return r&&(Nf[e]=r.bind(Qt))}function Af(e){Nf[e]=void 0}var gs="__sentry_xhr_v3__";function Wy(e){let t="xhr";Fn(t,e),Bn(t,VF)}function VF(){if(!Qt.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;Lt(e,"open",function(t){return function(...r){let n=nr()*1e3,i=kn(r[0])?r[0].toUpperCase():void 0,s=UF(r[1]);if(!i||!s)return t.apply(this,r);this[gs]={method:i,url:s,request_headers:{}},i==="POST"&&s.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let o=()=>{let a=this[gs];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}let l={endTimestamp:nr()*1e3,startTimestamp:n,xhr:this};on("xhr",l)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?Lt(this,"onreadystatechange",function(a){return function(...l){return o(),a.apply(this,l)}}):this.addEventListener("readystatechange",o),Lt(this,"setRequestHeader",function(a){return function(...l){let[c,h]=l,d=this[gs];return d&&kn(c)&&kn(h)&&(d.request_headers[c.toLowerCase()]=h),a.apply(this,l)}}),t.apply(this,r)}}),Lt(e,"send",function(t){return function(...r){let n=this[gs];if(!n)return t.apply(this,r);r[0]!==void 0&&(n.body=r[0]);let i={startTimestamp:nr()*1e3,xhr:this};return on("xhr",i),t.apply(this,r)}})}function UF(e){if(kn(e))return e;try{return e.toString()}catch{}}function Gy(e,t=$y("fetch")){let r=0,n=0;function i(s){let o=s.body.length;r+=o,n++;let a=w({body:s.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:r<=6e4&&n<15},e.fetchOptions);if(!t)return Af("fetch"),go("No fetch implementation available");try{return t(e.url,a).then(l=>(r-=o,n--,{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}))}catch(l){return Af("fetch"),r-=o,n--,go(l)}}return bf(e,i)}var HF=30,jF=50;function zy(e,t,r,n){let i={filename:e,function:t==="<anonymous>"?li:t,in_app:!0};return r!==void 0&&(i.lineno=r),n!==void 0&&(i.colno=n),i}var $F=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,WF=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,GF=/\((\S*)(?::(\d+))(?::(\d+))\)/,zF=e=>{let t=$F.exec(e);if(t){let[,n,i,s]=t;return zy(n,li,+i,+s)}let r=WF.exec(e);if(r){if(r[2]&&r[2].indexOf("eval")===0){let s=GF.exec(r[2]);s&&(r[2]=s[1],r[3]=s[2],r[4]=s[3])}let[n,i]=hI(r[1]||li,r[2]);return zy(i,n,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},dI=[HF,zF],qF=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,YF=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,KF=e=>{let t=qF.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let i=YF.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],n=t[1]||li;return[n,r]=hI(n,r),zy(r,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},fI=[jF,KF],pI=[dI,fI],qy=Xv(...pI),hI=(e,t)=>{let r=e.indexOf("safari-extension")!==-1,n=e.indexOf("safari-web-extension")!==-1;return r||n?[e.indexOf("@")!==-1?e.split("@")[0]:li,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Mf=1024,XF="Breadcrumbs",JF=(e={})=>{let t=w({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},e);return{name:XF,setup(r){t.console&&Jv(tB(r)),t.dom&&Hy(eB(r,t.dom)),t.xhr&&Wy(nB(r)),t.fetch&&ny(rB(r)),t.history&&jy(iB(r)),t.sentry&&r.on("beforeSendEvent",QF(r))}}},mI=JF;function QF(e){return function(t){Ut()===e&&fi({category:`sentry.${t.type==="transaction"?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:Hr(t)},{event:t})}}function eB(e,t){return function(r){if(Ut()!==e)return;let n,i,s=typeof t=="object"?t.serializeAttribute:void 0,o=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;o&&o>Mf&&(Wi&&se.warn(`\`dom.maxStringLength\` cannot exceed ${Mf}, but a value of ${o} was configured. Sentry will use ${Mf} instead.`),o=Mf),typeof s=="string"&&(s=[s]);try{let l=r.event,c=oB(l)?l.target:l;n=dl(c,{keyAttrs:s,maxStringLength:o}),i=zv(c)}catch{n="<unknown>"}if(n.length===0)return;let a={category:`ui.${r.name}`,message:n};i&&(a.data={"ui.component_name":i}),fi(a,{event:r.event,name:r.name,global:r.global})}}function tB(e){return function(t){if(Ut()!==e)return;let r={category:"console",data:{arguments:t.args,logger:"console"},level:cy(t.level),message:Jd(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)r.message=`Assertion failed: ${Jd(t.args.slice(1)," ")||"console.assert"}`,r.data.arguments=t.args.slice(1);else return;fi(r,{input:t.args,level:t.level})}}function nB(e){return function(t){if(Ut()!==e)return;let{startTimestamp:r,endTimestamp:n}=t,i=t.xhr[gs];if(!r||!n||!i)return;let{method:s,url:o,status_code:a,body:l}=i,c={method:s,url:o,status_code:a},h={xhr:t.xhr,input:l,startTimestamp:r,endTimestamp:n};fi({category:"xhr",data:c,type:"http"},h)}}function rB(e){return function(t){if(Ut()!==e)return;let{startTimestamp:r,endTimestamp:n}=t;if(n&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method==="POST"))if(t.error){let i=t.fetchData,s={data:t.error,input:t.args,startTimestamp:r,endTimestamp:n};fi({category:"fetch",data:i,level:"error",type:"http"},s)}else{let i=t.response,s=re(w({},t.fetchData),{status_code:i&&i.status}),o={input:t.args,response:i,startTimestamp:r,endTimestamp:n};fi({category:"fetch",data:s,type:"http"},o)}}}function iB(e){return function(t){if(Ut()!==e)return;let r=t.from,n=t.to,i=ml(qt.location.href),s=r?ml(r):void 0,o=ml(n);(!s||!s.path)&&(s=i),i.protocol===o.protocol&&i.host===o.host&&(n=o.relative),i.protocol===s.protocol&&i.host===s.host&&(r=s.relative),fi({category:"navigation",data:{from:r,to:n}})}}function oB(e){return!!e&&!!e.target}var sB=["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"],aB="BrowserApiErrors",cB=(e={})=>{let t=w({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},e);return{name:aB,setupOnce(){t.setTimeout&&Lt(qt,"setTimeout",gI),t.setInterval&&Lt(qt,"setInterval",gI),t.requestAnimationFrame&&Lt(qt,"requestAnimationFrame",lB),t.XMLHttpRequest&&"XMLHttpRequest"in qt&&Lt(XMLHttpRequest.prototype,"send",uB);let r=t.eventTarget;r&&(Array.isArray(r)?r:sB).forEach(dB)}}},vI=cB;function gI(e){return function(...t){let r=t[0];return t[0]=ms(r,{mechanism:{data:{function:yr(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function lB(e){return function(t){return e.apply(this,[ms(t,{mechanism:{data:{function:"requestAnimationFrame",handler:yr(e)},handled:!1,type:"instrument"}})])}}function uB(e){return function(...t){let r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(n=>{n in r&&typeof r[n]=="function"&&Lt(r,n,function(i){let s={mechanism:{data:{function:n,handler:yr(i)},handled:!1,type:"instrument"}},o=us(i);return o&&(s.mechanism.data.handler=yr(o)),ms(i,s)})}),e.apply(this,t)}}function dB(e){let t=qt,r=t[e]&&t[e].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(Lt(r,"addEventListener",function(n){return function(i,s,o){try{typeof s.handleEvent=="function"&&(s.handleEvent=ms(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:yr(s),target:e},handled:!1,type:"instrument"}}))}catch{}return n.apply(this,[i,ms(s,{mechanism:{data:{function:"addEventListener",handler:yr(s),target:e},handled:!1,type:"instrument"}}),o])}}),Lt(r,"removeEventListener",function(n){return function(i,s,o){let a=s;try{let l=a&&a.__sentry_wrapped__;l&&n.call(this,i,l,o)}catch{}return n.call(this,i,a,o)}}))}var fB="GlobalHandlers",pB=(e={})=>{let t=w({onerror:!0,onunhandledrejection:!0},e);return{name:fB,setupOnce(){Error.stackTraceLimit=50},setup(r){t.onerror&&(hB(r),yI("onerror")),t.onunhandledrejection&&(mB(r),yI("onunhandledrejection"))}}},_I=pB;function hB(e){ry(t=>{let{stackParser:r,attachStacktrace:n}=EI();if(Ut()!==e||ky())return;let{msg:i,url:s,line:o,column:a,error:l}=t,c=yB(xf(r,l||i,void 0,n,!1),s,o,a);c.level="error",El(c,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}function mB(e){iy(t=>{let{stackParser:r,attachStacktrace:n}=EI();if(Ut()!==e||ky())return;let i=gB(t),s=cs(i)?vB(i):xf(r,i,void 0,n,!0);s.level="error",El(s,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function gB(e){if(cs(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function vB(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function yB(e,t,r,n){let i=e.exception=e.exception||{},s=i.values=i.values||[],o=s[0]=s[0]||{},a=o.stacktrace=o.stacktrace||{},l=a.frames=a.frames||[],c=isNaN(parseInt(n,10))?void 0:n,h=isNaN(parseInt(r,10))?void 0:r,d=kn(t)&&t.length>0?t:Gv();return l.length===0&&l.push({colno:c,filename:d,function:li,in_app:!0,lineno:h}),e}function yI(e){Wi&&se.log(`Global Handler attached: ${e}`)}function EI(){let e=Ut();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var wI=()=>({name:"HttpContext",preprocessEvent(e){if(!qt.navigator&&!qt.location&&!qt.document)return;let t=e.request&&e.request.url||qt.location&&qt.location.href,{referrer:r}=qt.document||{},{userAgent:n}=qt.navigator||{},i=w(w(w({},e.request&&e.request.headers),r&&{Referer:r}),n&&{"User-Agent":n}),s=re(w(w({},e.request),t&&{url:t}),{headers:i});e.request=s}}),_B="cause",EB=5,wB="LinkedErrors",bB=(e={})=>{let t=e.limit||EB,r=e.key||_B;return{name:wB,preprocessEvent(n,i,s){let o=s.getOptions();$v(Tf,o.stackParser,o.maxValueLength,r,t,n,i)}}},bI=bB;function Yy(e){return[Df(),Cf(),vI(),mI(),_I(),bI(),If(),wI()]}var Ky=class extends Error{cause;constructor(e,t){super(e),this.cause=t}},Ct=class $0{static INSTANCE;contexts={};tags;client;user;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new $0),this.INSTANCE}captureException(t,r,n){C.error(t),this.getNewScope(r,n).captureException(t)}captureMessage(t,r,n,i){this.getNewScope(n,i).captureMessage(t,r??"error")}captureError(t,r,n,i){C.error(t,r);let s=this.getNewScope(n,i),o=new Ky(t,r);s.captureException(o)}setGlobalContext(t,r){this.contexts[t]=w({context:r},this.contexts[t])}setUser(t){this.user=t}setTags(t){this.tags=t}getNewScope(t,r){let n=new An;if(n.setClient(this.client),n.setUser(this.user),t?.triggerContext){let i=t.triggerContext;n.setExtras(i.triggerData.sentryContext()),delete t.triggerContext}return t&&n.setExtras(t),this.tags&&n.setTags(this.tags),r&&n.setTags(r),Object.keys(this.contexts).forEach(i=>{n.setContext(i,this.contexts[i])}),n.setTag("language",navigator.language),n.setTag("timezone",ue.getTimezone()),n}init(){let t=Yy({}).filter(r=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(r.name));this.client=new bl({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:Gy,stackParser:qy,integrations:t,environment:Rn.mode,release:`web-sdk@${k.SDK_VERSION}`,debug:Rn.debug}),this.client.init()}},ue=class{static tz;static isValidURL(e){try{return new URL(e)}catch{return}}static isNull(e){return!e||e==="null"||e==="undefined"}static removeFromArray(e,t){let r=e.indexOf(t);return r===-1?!1:(e.splice(r,1),!0)}static formatCurrency(e,t){if(e==0&&t)return"Free";let r=Pe.get(),n=Pt.get(),i=r.shopCurrencyCode||n.currency,s=r.currencyCode;s||C.warn("Currency code is not set in RuntimeData");let o=n.money?.format??r.moneyFormat,a;if(o&&i===s)a=Yd.format(e*100,o);else{let l;try{l=new Intl.NumberFormat(this.getLang(),{style:"currency",currency:s||i,minimumFractionDigits:0,maximumFractionDigits:2})}catch(c){return Ct.getInstance().captureException(c,{currentCurrency:s,shopCurrency:i}),""}a=l.format(e),a=a.replace("\u20B9","Rs. "),n.money?.showCurrency&&s!=="INR"&&(a=a.concat(` ${s}`))}return a}static formatNumber(e){return new Intl.NumberFormat(this.getLang(),{notation:"compact"}).format(e)}static getLang(){return navigator.languages!==void 0?navigator.languages[0].split("-")[0]:navigator.language??"en"}static getTimezone(){if(this.tz)return this.tz;try{return this.tz=Intl.DateTimeFormat().resolvedOptions().timeZone,this.tz}catch{return""}}static documentReady(e){document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",e)}static onDocumentLoaded(e){document.readyState==="complete"?e():document.addEventListener("readystatechange",()=>{document.readyState==="complete"&&e()})}static showSnackbar(e){let t=document.createElement("span");t.id="snackbar",t.innerText=e,document.body.appendChild(t),t.className="show",setTimeout(()=>{t.classList.remove("show"),document.body.removeChild(t)},3e3)}static async retrySelectorForElements(e,t=10,r=document){let n=0,i=document.querySelectorAll("nonexistent-tag");for(;n<t;){let s=Math.min(100*2**n,5e3);if(await CI.JSUtils.sleep(s),i=r.querySelectorAll(e),i.length)return C.debug(`Attempt ${n+1}: ${i.length} elements found with ${e}`),i;C.debug(`Attempt ${n+1}: Elements not found with ${e}. Retrying after ${s}ms.`),n++}return C.warn(`Max attempts reached. Element not found with ${e}.`),i}static async retrySelector(e,t=10,r=document){return(await this.retrySelectorForElements(e,t,r)).item(0)}static async retrySelectors(e,t=10,r=document){let n=await this.retrySelectorForElements(e,t,r);return Array.from(n)}static async getCartAttributes(){let e=await st.get(ge.DEVICE_ID),t=await hn.get(ge.ID,"");return[{key:"letscooee_did",value:e},{key:"letscooee_sid",value:t},{key:"__letscooee_time",value:new Date().toLocaleString()},{key:"__letscooee_via",value:"Buy Now"}]}static onNodesRemoved(e,t,r=document.body){let n=new MutationObserver(i=>{i.forEach(s=>{s.removedNodes.forEach(o=>{(o===e||o.contains(e))&&(t(),n.disconnect())})})});n.observe(r,{childList:!0})}};function Na(e,t,r){Object.defineProperty(e,t,{enumerable:!1,configurable:!1,writable:!1,value:r})}var pi=class Fh{transform(t){return t==null?null:ue.formatCurrency(t)}static \u0275fac=function(t){return new(t||Fh)};static \u0275pipe=Qo({name:"cooeeCurrency",type:Fh,pure:!0})},II=Be(kf()),CB=Object.prototype.toString,Ma=Array.isArray||function(e){return CB.call(e)==="[object Array]"};function Xy(e){return typeof e=="function"}function SB(e){return Ma(e)?"array":typeof e}function Zy(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function SI(e,t){return e!=null&&typeof e=="object"&&t in e}function DB(e,t){return e!=null&&typeof e!="object"&&e.hasOwnProperty&&e.hasOwnProperty(t)}var IB=RegExp.prototype.test;function TB(e,t){return IB.call(e,t)}var xB=/\S/;function RB(e){return!TB(xB,e)}var NB={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};function AB(e){return String(e).replace(/[&<>"'`=\/]/g,function(t){return NB[t]})}var MB=/\s*/,OB=/\s+/,DI=/\s*=/,PB=/\s*\}/,kB=/#|\^|\/|>|\{|&|=|!/;function LB(e,t){if(!e)return[];var r=!1,n=[],i=[],s=[],o=!1,a=!1,l="",c=0;function h(){if(o&&!a)for(;s.length;)delete i[s.pop()];else s=[];o=!1,a=!1}var d,f,g;function m(j){if(typeof j=="string"&&(j=j.split(OB,2)),!Ma(j)||j.length!==2)throw new Error("Invalid tags: "+j);d=new RegExp(Zy(j[0])+"\\s*"),f=new RegExp("\\s*"+Zy(j[1])),g=new RegExp("\\s*"+Zy("}"+j[1]))}m(t||Er.tags);for(var b=new Sl(e),I,A,F,V,M,J;!b.eos();){if(I=b.pos,F=b.scanUntil(d),F)for(var Le=0,dt=F.length;Le<dt;++Le)V=F.charAt(Le),RB(V)?(s.push(i.length),l+=V):(a=!0,r=!0,l+=" "),i.push(["text",V,I,I+1]),I+=1,V===`
38
38
  `&&(h(),l="",c=0,r=!1);if(!b.scan(d))break;if(o=!0,A=b.scan(kB)||"name",b.scan(MB),A==="="?(F=b.scanUntil(DI),b.scan(DI),b.scanUntil(f)):A==="{"?(F=b.scanUntil(g),b.scan(PB),b.scanUntil(f),A="&"):F=b.scanUntil(f),!b.scan(f))throw new Error("Unclosed tag at "+b.pos);if(A==">"?M=[A,F,I,b.pos,l,c,r]:M=[A,F,I,b.pos],c++,i.push(M),A==="#"||A==="^")n.push(M);else if(A==="/"){if(J=n.pop(),!J)throw new Error('Unopened section "'+F+'" at '+I);if(J[1]!==F)throw new Error('Unclosed section "'+J[1]+'" at '+I)}else A==="name"||A==="{"||A==="&"?a=!0:A==="="&&m(F)}if(h(),J=n.pop(),J)throw new Error('Unclosed section "'+J[1]+'" at '+b.pos);return BB(FB(i))}function FB(e){for(var t=[],r,n,i=0,s=e.length;i<s;++i)r=e[i],r&&(r[0]==="text"&&n&&n[0]==="text"?(n[1]+=r[1],n[3]=r[3]):(t.push(r),n=r));return t}function BB(e){for(var t=[],r=t,n=[],i,s,o=0,a=e.length;o<a;++o)switch(i=e[o],i[0]){case"#":case"^":r.push(i),n.push(i),r=i[4]=[];break;case"/":s=n.pop(),s[5]=i[2],r=n.length>0?n[n.length-1][4]:t;break;default:r.push(i)}return t}function Sl(e){this.string=e,this.tail=e,this.pos=0}Sl.prototype.eos=function(){return this.tail===""};Sl.prototype.scan=function(e){var t=this.tail.match(e);if(!t||t.index!==0)return"";var r=t[0];return this.tail=this.tail.substring(r.length),this.pos+=r.length,r};Sl.prototype.scanUntil=function(e){var t=this.tail.search(e),r;switch(t){case-1:r=this.tail,this.tail="";break;case 0:r="";break;default:r=this.tail.substring(0,t),this.tail=this.tail.substring(t)}return this.pos+=r.length,r};function Aa(e,t){this.view=e,this.cache={".":this.view},this.parent=t}Aa.prototype.push=function(e){return new Aa(e,this)};Aa.prototype.lookup=function(e){var t=this.cache,r;if(t.hasOwnProperty(e))r=t[e];else{for(var n=this,i,s,o,a=!1;n;){if(e.indexOf(".")>0)for(i=n.view,s=e.split("."),o=0;i!=null&&o<s.length;)o===s.length-1&&(a=SI(i,s[o])||DB(i,s[o])),i=i[s[o++]];else i=n.view[e],a=SI(n.view,e);if(a){r=i;break}n=n.parent}t[e]=r}return Xy(r)&&(r=r.call(this.view)),r};function Vn(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}Vn.prototype.clearCache=function(){typeof this.templateCache<"u"&&this.templateCache.clear()};Vn.prototype.parse=function(e,t){var r=this.templateCache,n=e+":"+(t||Er.tags).join(":"),i=typeof r<"u",s=i?r.get(n):void 0;return s==null&&(s=LB(e,t),i&&r.set(n,s)),s};Vn.prototype.render=function(e,t,r,n){var i=this.getConfigTags(n),s=this.parse(e,i),o=t instanceof Aa?t:new Aa(t,void 0);return this.renderTokens(s,o,r,e,n)};Vn.prototype.renderTokens=function(e,t,r,n,i){for(var s="",o,a,l,c=0,h=e.length;c<h;++c)l=void 0,o=e[c],a=o[0],a==="#"?l=this.renderSection(o,t,r,n,i):a==="^"?l=this.renderInverted(o,t,r,n,i):a===">"?l=this.renderPartial(o,t,r,i):a==="&"?l=this.unescapedValue(o,t):a==="name"?l=this.escapedValue(o,t,i):a==="text"&&(l=this.rawValue(o)),l!==void 0&&(s+=l);return s};Vn.prototype.renderSection=function(e,t,r,n,i){var s=this,o="",a=t.lookup(e[1]);function l(d){return s.render(d,t,r,i)}if(a){if(Ma(a))for(var c=0,h=a.length;c<h;++c)o+=this.renderTokens(e[4],t.push(a[c]),r,n,i);else if(typeof a=="object"||typeof a=="string"||typeof a=="number")o+=this.renderTokens(e[4],t.push(a),r,n,i);else if(Xy(a)){if(typeof n!="string")throw new Error("Cannot use higher-order sections without the original template");a=a.call(t.view,n.slice(e[3],e[5]),l),a!=null&&(o+=a)}else o+=this.renderTokens(e[4],t,r,n,i);return o}};Vn.prototype.renderInverted=function(e,t,r,n,i){var s=t.lookup(e[1]);if(!s||Ma(s)&&s.length===0)return this.renderTokens(e[4],t,r,n,i)};Vn.prototype.indentPartial=function(e,t,r){for(var n=t.replace(/[^ \t]/g,""),i=e.split(`
39
39
  `),s=0;s<i.length;s++)i[s].length&&(s>0||!r)&&(i[s]=n+i[s]);return i.join(`
40
40
  `)};Vn.prototype.renderPartial=function(e,t,r,n){if(r){var i=this.getConfigTags(n),s=Xy(r)?r(e[1]):r[e[1]];if(s!=null){var o=e[6],a=e[5],l=e[4],c=s;a==0&&l&&(c=this.indentPartial(s,l,o));var h=this.parse(c,i);return this.renderTokens(h,t,r,c,n)}}};Vn.prototype.unescapedValue=function(e,t){var r=t.lookup(e[1]);if(r!=null)return r};Vn.prototype.escapedValue=function(e,t,r){var n=this.getConfigEscape(r)||Er.escape,i=t.lookup(e[1]);if(i!=null)return typeof i=="number"&&n===Er.escape?String(i):n(i)};Vn.prototype.rawValue=function(e){return e[1]};Vn.prototype.getConfigTags=function(e){return Ma(e)?e:e&&typeof e=="object"?e.tags:void 0};Vn.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!Ma(e))return e.escape};var Er={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(e){Cl.templateCache=e},get templateCache(){return Cl.templateCache}},Cl=new Vn;Er.clearCache=function(){return Cl.clearCache()};Er.parse=function(e,t){return Cl.parse(e,t)};Er.render=function(e,t,r,n){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+SB(e)+'" was given as the first argument for mustache#render(template, view, partials)');return Cl.render(e,t,r,n)};Er.escape=AB;Er.Scanner=Sl;Er.Context=Aa;Er.Writer=Vn;var gn=Er;gn.escape=II.MustacheUtils.escapeHtml;var Lf=class qd{transform(t,r){return t?gn.render(t,w({},r)):null}static \u0275fac=function(t){return new(t||qd)};static \u0275pipe=Qo({name:"cooeeDynamicVariables",type:qd,pure:!0})},Jy={};(function e(t,r,n,i){var s=!!(t.Worker&&t.Blob&&t.Promise&&t.OffscreenCanvas&&t.OffscreenCanvasRenderingContext2D&&t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype.transferControlToOffscreen&&t.URL&&t.URL.createObjectURL),o=typeof Path2D=="function"&&typeof DOMMatrix=="function",a=function(){if(!t.OffscreenCanvas)return!1;var D=new OffscreenCanvas(1,1),x=D.getContext("2d");x.fillRect(0,0,1,1);var Z=D.transferToImageBitmap();try{x.createPattern(Z,"no-repeat")}catch{return!1}return!0}();function l(){}function c(D){var x=r.exports.Promise,Z=x!==void 0?x:t.Promise;return typeof Z=="function"?new Z(D):(D(l,l),null)}var h=function(D,x){return{transform:function(Z){if(D)return Z;if(x.has(Z))return x.get(Z);var ne=new OffscreenCanvas(Z.width,Z.height),ae=ne.getContext("2d");return ae.drawImage(Z,0,0),x.set(Z,ne),ne},clear:function(){x.clear()}}}(a,new Map),d=function(){var D=Math.floor(16.666666666666668),x,Z,ne={},ae=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(x=function(Ee){var ye=Math.random();return ne[ye]=requestAnimationFrame(function de(Ce){ae===Ce||ae+D-1<Ce?(ae=Ce,delete ne[ye],Ee()):ne[ye]=requestAnimationFrame(de)}),ye},Z=function(Ee){ne[Ee]&&cancelAnimationFrame(ne[Ee])}):(x=function(Ee){return setTimeout(Ee,D)},Z=function(Ee){return clearTimeout(Ee)}),{frame:x,cancel:Z}}(),f=function(){var D,x,Z={};function ne(ae){function Ee(ye,de){ae.postMessage({options:ye||{},callback:de})}ae.init=function(ye){var de=ye.transferControlToOffscreen();ae.postMessage({canvas:de},[de])},ae.fire=function(ye,de,Ce){if(x)return Ee(ye,null),x;var je=Math.random().toString(36).slice(2);return x=c(function(kt){function He(tt){tt.data.callback===je&&(delete Z[je],ae.removeEventListener("message",He),x=null,h.clear(),Ce(),kt())}ae.addEventListener("message",He),Ee(ye,je),Z[je]=He.bind(null,{data:{callback:je}})}),x},ae.reset=function(){ae.postMessage({reset:!0});for(var ye in Z)Z[ye](),delete Z[ye]}}return function(){if(D)return D;if(!n&&s){var ae=["var CONFETTI, SIZE = {}, module = {};","("+e.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(`
@@ -75,6 +75,6 @@ mutation cartDiscountCodesUpdate($cartId: ID!, $discountCodes: [String!]) {
75
75
  }
76
76
  }
77
77
  }
78
- `,xo=class{listen(){document.addEventListener(k.CTA_EVENT,async e=>{await this.processEvent(e)},!1)}async performAddToCart(e,t){if(!e.length)return;let r=e.map(a=>{let{vID:l,quantity:c}=this.getVIDAndQuantity(a);return{id:l?+l:+a.mID,quantity:c,properties:t.getPrivateAttributesForLineItem()}}),n=Tt.getCartURL("cart/add.js"),i={items:r},s=Kt.get();s.isMiniCart()?i.sections=["mini-cart"]:s.isShopifyDefaultDrawer()&&(i.sections=s.element.getSectionsToRender?.().map(a=>a.section??a.id));let o=JSON.stringify(i);try{let a=await fetch(n,{body:o,method:"post",headers:{"Content-Type":"application/json"}});if(a.status===200||a.status===302)return C.log(`Added ${e.length} items to Cart`),ue.showSnackbar("Product added to your cart"),a.json()}catch(a){C.error("Failed to add product in cart",a)}}async performUpdate(e,t){if(!px.JSUtils.hasKeys(t)){C.warn("No update fields provided");return}let r=Tt.getCartURL("cart/change.js"),n=w({id:e.key},t),i=JSON.stringify(n);try{let s=await fetch(r,{body:i,method:"post",headers:{"Content-Type":"application/json"}});(s.status===200||s.status===302)&&(C.log(`Updated ${e}`),Ye.getCurrent().update(s.json()))}catch(s){C.error("Failed to update item in cart",s,e)}}async performCopyCoupon(e){if(e)try{await navigator.clipboard.writeText(e),C.log(`Code-${e} copied`),ue.showSnackbar("Discount code copied")}catch(t){C.error("Failed to copy code",t)}}performGoToItem(e){if(!e?.link)return;let t=Tt.getProductSlug(e.link);t&&(location.pathname=Tt.getRootPrefix()+"products/"+t)}async upgradeToSubscription(e,t){if(!e){C.warn("Trying to upgrade to subscription with no item");return}let r=await Ye.getCurrent().getNormalisedCart(),n=e.selectedOrFirstVariant.value,i=r.items.findIndex(c=>c.vID===n.mID),s=n.selectedSellingPlan.value,o=Tt.getCartURL("cart/change.js"),a={line:i+1,selling_plan:s?.mID||null,properties:t.getPrivateAttributesForLineItem()},l=JSON.stringify(a);try{let c=await fetch(o,{body:l,method:"post",headers:{"Content-Type":"application/json"}});if(c.status===200||c.status===302){C.log(`Upgraded ${e} selling plan`),ue.showSnackbar("Line item updated");let h=await c.json();return Ye.getCurrent().update(h),h}}catch(c){C.error("Failed to update subscription for item in cart",c)}}async performCartCreate(e,t,r){let n=Pt.get().storefrontToken;if(!n)throw new Error("Storefront token not set for the store");if(!e?.vID){C.error("No variant ID found to perform Buy now",e);return}let i=t?[t]:[],s=[{merchandiseId:`gid://shopify/ProductVariant/${e.vID}`,quantity:1,attributes:r.getKVFormatPrivateAttributesForLineItem()}],o=await ue.getCartAttributes(),a=new Headers;a.append("Content-Type","application/json"),a.append("X-Shopify-Storefront-Access-Token",n);let l=JSON.stringify({query:iU,variables:{input:{lines:s,discountCodes:i,attributes:o}}});return(await Mn.getInstance().request(k.GRAPHQL_API_PATH,{method:"POST",headers:a,body:l})).data?.cartCreate?.cart?.checkoutUrl}async processEvent(e){let t=e?.detail;if(!t)return;let r=t.clickAction,n=t.items,i=t.triggerData;if(r.at){let s=r;if(C.log(`Performing ${JSON.stringify(s)} action`),s.at===101)n?.length&&this.performGoToItem(n[0]);else if(s.at===102)n?.length&&await this.performAddToCart(n,i);else if(s.at===103)await this.performCopyCoupon(i.discount.code);else if(s.at===105)Kt.get().open();else if(s.at===104){let o=t.collections;if(!o?.length)return;location.pathname=Tt.getRootPrefix()+"collections/"+o[0].handle}}r.applyDiscount&&i.discount?.code&&To.navigate(i.discount.code,i.redirectBehaviour)}getVIDAndQuantity(e){let t,r;if(e instanceof pn)t=e.vID,r=e.quantity??1;else{if(!e.vars?.length)return{};t=e.selectedOrFirstVariant.value.mID,r=1}return{vID:t,quantity:r}}},qp=class extends Ci{ctaListener=new xo;constructor(e){super(e),yi.get().subscriber(k.CART_UPDATE_BROADCAST).pipe(Ti(null)).subscribe(this.checkMilestone.bind(this))}update(e){super.update(e),this.widgetElement.update()}shouldStopRendering(){return!1}renderContainer(){if(this.widgetElement?.isConnected){this.addToRendered();return}let e=this.widgetElement=document.createElement("cooee-progressbar");e.className="cooee-root",e.cart=Ye.getCurrent(),e.engagementTrigger=this.engagementTrigger,e.setAttribute("engagement",this.engagementTrigger.shortID),this.rootContainer.appendChild(e),this.addToRendered()}async checkMilestone(){let e=await Ye.getCurrent().getNormalisedCart(),t=[...this.engagementTrigger.progressBarConfig.milestones];for(let r of t){if(e.amount<r.minValue)break;if(C.log("Current milestone",r),r.rewardType===hx.MilestoneRewardType.FREE_AUTO_GIFT){let n=r.items[0],i=e.items.find(s=>s.vID===n.vID||s.mID===n.mID);if(i)C.log(`Item(vID:${n.vID}) already present in the cart. Updating item's properties`),await this.ctaListener.performUpdate(i,{properties:this.engagementTrigger.getPrivateAttributesForLineItem()});else{let s=await this.ctaListener.performAddToCart([n],this.engagementTrigger);Kt.get().refreshUI(s,!1)}}}}async removeOtherFreeGifts(e){let t=(await Ye.getCurrent().getNormalisedCart()).items.filter(r=>r.vID!==e?.vID&&r.properties[k.CAMPAIGN_ATTRIBUTE]===this.engagementTrigger.shortID);if(t.length)for(let r of t)await this.ctaListener.performUpdate(r,{quantity:0})}},Yp=class extends Xn{constructor(e){super(e)}shouldStopRendering(){return!1}renderContainer(){if(this.widgetElement?.isConnected){this.addToRendered();return}let e=this.widgetElement=document.createElement("cooee-shoppable-videos");e.className="cooee-root",e.triggerContext=this.triggerContext,e.addEventListener("sendEvent",t=>{let r=t.detail;this.safeHTTPService.sendEvent(r)}),e.setAttribute("engagement",this.engagementTrigger.shortID),this.rootContainer.appendChild(e),this.addToRendered()}},mx=Be(Ea()),Kp=class extends Xn{constructor(e){super(e)}shouldStopRendering(){return!1}renderContainer(){let e=this.getParentElement(`inner-letscooee-${this.engagementTrigger.shortID}`);this.rootContainer.appendChild(e),document.addEventListener(k.ADD_BUNDLE_CTA_INBOUND_EVENT,this.inboundCTAListener.bind(this),!1)}async inboundCTAListener(e){let t=this.engagementTrigger,r=`Engagement(id: ${t.engagementID}, shortID: ${t.shortID})`,n=e.detail;if(!mx.JSUtils.hasKeys(n)){C.error(`No detail received for ${r}`);return}C.log("Detail received for BYOB",n);let i=n.campaignID??n.campaignId??n.campaign_id;if(i!==t.shortID&&i!==t.engagementID){C.warn(`Current ${r} is not BYOB. Received: ${i}`);return}let s=n.items;if(!s?.length)return;let o=s.map(a=>new pn({mID:a.product_id,vID:a.variant_id,quantity:a.quantity||1}));await new Do(this.triggerContext).execute({embeddedItems:o,clickAction:{at:108,applyDiscount:!0}})}},gc=class{runtimeData=Pe.get();processCartWidgetResponse(e){this.runtimeData.isCartDirty=!1,this.runtimeData.cartEngagements=e;let t=[...Ci.renderedEngagements];Ci.renderedEngagements.length=0;for(let r of e)C.log(`\u{1F4E3} ${r} received as cart embed`),!this.findAndUpdateCurrent(r,t)&&(C.log(`${r} is new`),r.isProgressBar()?new qp(r).renderSilently():r.isSubscriptionUpsell()?zp.renderCartUpsell(r):new Ci(r).renderSilently());this.removeOldWidgets(t)}processPageWidgetResponse(e){let t=[...Xn.renderedEngagements];Xn.renderedEngagements.length=0;for(let r of e)C.log(`\u{1F4E3} ${r} received as page embed`),!this.findAndUpdateCurrent(r,t)&&(C.log(`${r} is new`),r.isShoppableVideo()?new Yp(r).renderSilently():r.isBYOB()?new Kp(r).renderSilently():new Xn(r).renderSilently());this.removeOldWidgets(t)}findAndUpdateCurrent(e,t){let r=t.findIndex(n=>n.isSameTrigger(e));return r<0||e.isSubscriptionUpsell()?!1:(t[r].update(e),t[r].renderSilently(),t.splice(r,1),!0)}removeOldWidgets(e){for(let t of e)t.destroy()}},vc=class{runtimeData=Pe.get();httpService=xe.get(Mn);sessionManager=xe.get(Zt);constructor(){}async getWidgetProps(){let e={};e.engagementIDs=this.addAvailableEngagementShortIDs(),e.locale=this.runtimeData.locale,await this.addSessionContext(e),e.currentItem=this.runtimeData.getCurrentItem();try{e.cart=await Ye.getCurrent().getNormalisedCart()}catch(i){C.error("Error fetching Shopify cart before sending widget call",i)}let t=new URLSearchParams(location.search),r=t.get("cooee-preview");r?e.previewIDs=r.trim().split(",").filter(i=>Number.isInteger(+i)):this.runtimeData.previewIDs?.length&&(e.previewIDs=this.runtimeData.previewIDs);let n=t.get("cooee-variant");return n?e.previewVariant=n:this.runtimeData.previewVariant&&(e.previewVariant=this.runtimeData.previewVariant),e}async addSessionContext(e){let t=await this.sessionManager.checkSessionAndGetContext();e.sessionID=t[0],e.sessionNumber=t[1],e.landingPage=t[2],e.page=vi.parseFromCurrent()}addAvailableEngagementShortIDs(){let e=document.querySelectorAll(".letscooee-engagement"),t=[];return e.forEach(r=>{let n=r.dataset.engagementId;n&&+n&&t.push(n)}),t}},Wr=class Q0 extends vc{static INSTANCE;loadWidgetsSubject=new ie;constructor(){super(),this.loadWidgetsSubject.pipe(Rr(300)).subscribe(()=>{this.loadCartWidgets().catch(t=>C.error("Unable to initiate cart widgets",t)),this.loadPageWidgets().catch(t=>C.error("Unable to initiate page widgets",t))}),yi.get().subscriber(k.CART_UPDATE_BROADCAST).subscribe(()=>this.loadWidgetsSubject.next())}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Q0),this.INSTANCE}loadOrRenderWidgetsAfterCartChange(){this.runtimeData.isCartDirty?this.loadWidgetsSilently():this.renderCachedCartWidgets()}loadPageWidgetsSilently(){Zt.replaySubject.subscribe(async()=>{this.loadPageWidgets().catch(t=>C.error("Unable to initiate load page widgets",t))})}loadCartWidgetsSilently(){Zt.replaySubject.subscribe(async()=>{this.loadCartWidgets().catch(t=>C.error("Unable to initiate cart widgets",t))})}loadWidgetsSilently(){Zt.replaySubject.subscribe(async()=>{this.loadWidgetsSubject.next()})}async loadPageWidgets(){let t=await this.getWidgetProps();C.log("Load widgets",t),this.httpService.post("/v1/engagement/page-widgets",t).then(async r=>{let n=r.widgets.map(i=>new Hn(i));new gc().processPageWidgetResponse(n)}).catch(r=>{C.error("Error sending widget getter",r)})}async loadCartWidgets(){let t=await this.getWidgetProps();C.log("Load cart widgets",t),this.httpService.post("/v1/engagement/cart-widgets",t).then(async r=>{let n=r.widgets.map(i=>new Hn(i));new gc().processCartWidgetResponse(n)}).catch(r=>{C.error("Error sending widget getter",r)})}async getVariation(t){let r=await this.getWidgetProps();return this.httpService.post("/v1/engagement/get-variant",w(w({},t),r))}renderCachedCartWidgets(){new gc().processCartWidgetResponse(this.runtimeData.cartEngagements)}},Zp=class{eventAPIService;constructor(){this.eventAPIService=xe.get(Ro)}processResponse(e){for(let t of e)t.experiment?.cssSelector&&this.runExperiment(t)}async runExperiment(e){if(!e.experiment?.cssSelector){C.error("No CSS selector present in experiment",e.toString);return}let t;try{t=await ue.retrySelector(e.experiment.cssSelector)}catch{C.error("Fail to get CSS selector for experiment",e.toString());return}if(t){if(e.experiment.op==="SHOW")t.style.display="block";else if(e.experiment.op==="HIDE")t.style.display="none";else{C.error("Invalid experiment operation",e.toString);return}this.eventAPIService.trackExperiment({name:k.EVENT_EXPERIMENT_START,experiment:new yo(e)}).catch(r=>{C.error("Fail to track experiment",r)})}}},Ro=class kE extends vc{static INSTANCE;constructor(){super()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new kE),this.INSTANCE}loadExperimentSilently(){st.get(ge.SDK_TOKEN).then(t=>{t?this.loadExperiments().catch(r=>C.error("Unable to initiate experiment",r)):Zt.replaySubject.subscribe(async()=>{this.loadExperiments().catch(r=>C.error("Unable to initiate experiment",r))})})}async loadExperiments(){let t=await this.getWidgetProps();C.log("Load experiments",t),this.httpService.post("/v1/engagement/experiments",t).then(async r=>{let n=r.experiments.map(i=>new Hn(i));new Zp().processResponse(n)}).catch(r=>{C.error("Error sending experiment getter",r)})}async trackExperiment(t){await this.addSessionContext(t),await this.httpService.post("/v1/event/experiment",t)}},Xp=class{runtimeData=Pe.get();widgetAPIService=xe.get(Wr);experimentAPIService=xe.get(Ro);meddle(){let e=wt.globalRef;e.account=e.account??[],e.profile=e.profile??[],e.events=e.events??[],e.screen=e.screen??[],e.page=e.page??[],this.meddlePage(),this.meddleAccount(),this.meddleEvents(),this.meddleProfile(),this.meddleScreen(),this.exposeMethods()}exposeMethods(){let e=wt.globalRef;e.loadPageWidgets=()=>{this.widgetAPIService.loadPageWidgetsSilently()},e.loadCartWidgets=()=>{this.widgetAPIService.loadCartWidgetsSilently()},e.loadExperiments=()=>{this.experimentAPIService.loadExperimentSilently()},e.previewWidget=wt.previewWidget.bind(wt),e.previewPopup=wt.previewPopup.bind(wt)}overwritePush(e,t){Na(e,"push",t)}meddleAccount(){this.overwritePush(wt.globalRef.account,(...e)=>{this.processAccount(e[0])}),wt.globalRef.account.forEach(this.processAccount.bind(this))}meddleEvents(){this.overwritePush(wt.globalRef.events,(...e)=>{this.processEvent(e[0])}),wt.globalRef.events.forEach(this.processEvent.bind(this))}meddleProfile(){this.overwritePush(wt.globalRef.profile,(...e)=>{this.processProfile(e[0])}),wt.globalRef.profile.forEach(this.processProfile.bind(this))}meddleScreen(){this.overwritePush(wt.globalRef.screen,(...e)=>{this.processPageName(e[0])}),wt.globalRef.screen.forEach(this.processPageName.bind(this))}processAccount(e){e&&(e.appID&&wt.authenticate(e),e.flags&&Os.setFlags(e.flags))}processEvent(e){e&&(k.JS_LOAD_WHITELIST_EVENTS.includes(e[0])?wt.sendEvent(e[0],e[1],w({occurred:this.runtimeData.jsLoadTime},e[2])):wt.sendEvent(e[0],e[1],e[2]))}processProfile(e){e&&wt.updateProfile(e)}processPageName(e){e&&wt.setPageName(e)}meddlePage(){this.overwritePush(wt.globalRef.page,(...e)=>{this.processPage(e[0])}),wt.globalRef.page.forEach(this.processPage.bind(this))}processPage(e){e.currentItem&&this.runtimeData.setCurrentItem(e.currentItem),e.currency&&(this.runtimeData.currencyCode=e.currency),e.shopCurrency&&(this.runtimeData.shopCurrencyCode=e.shopCurrency),e.moneyFormat&&(this.runtimeData.moneyFormat=e.moneyFormat),e.jsLoad&&(this.runtimeData.jsLoadTime=e.jsLoad),e.locale&&(this.runtimeData.locale=e.locale),e.pageName&&wt.setPageName(e.pageName)}},yc=class{static SESSION_STORAGE=window.sessionStorage;static SESSION_STORAGE_KEY_PREFIX=k.COOEE.concat("-");static getString(e,t){return this.getItem(e)||t}static setString(e,t){this.setItem(e,t)}static remove(e){this.removeItem(e)}static getItem(e){return this.SESSION_STORAGE.getItem(this.SESSION_STORAGE_KEY_PREFIX.concat(e))}static setItem(e,t){this.SESSION_STORAGE.setItem(this.SESSION_STORAGE_KEY_PREFIX.concat(e),t)}static removeItem(e){this.SESSION_STORAGE.removeItem(this.SESSION_STORAGE_KEY_PREFIX.concat(e))}},_c=class uu{static INSTANCE;static DEBOUNCE_TIME=1e3;static THRESHOLD=10;safeHttpService=xe.get(Ue);_lastScreenOrScroll=new Date;lastPercent=0;constructor(){}set lastScreenOrScroll(t){this._lastScreenOrScroll=t}static getInstance(){return this.INSTANCE||(this.INSTANCE=new uu),this.INSTANCE}resetScrollID(t){yc.remove(k.SESSION_STORAGE_SCROLL_ID),this.lastScreenOrScroll=t??new Date}listen(){if(window.scrollY){let t=this.getPercentScrolledY();this.shouldSendScroll(t)&&this.sendScroll(t)}ue.onDocumentLoaded(()=>{this.observeWindowScroll()})}observeWindowScroll(){Bo(window,"scroll").pipe(Rr(uu.DEBOUNCE_TIME),ur(()=>{let t=this.getPercentScrolledY();if(t>100){C.warn("Received scroll percent is more than 100",t);return}if(this.shouldSendScroll(t))return t})).subscribe(t=>{this.sendScroll(t)})}shouldSendScroll(t){return Math.abs(this.lastPercent-t)>=uu.THRESHOLD||this.lastPercent!==t&&t===100}sendScroll(t){if(t==null)return;let r={percent:t,timeMS:new Date().getTime()-this._lastScreenOrScroll.getTime()};this.lastPercent=t;let n=yc.getString(k.SESSION_STORAGE_SCROLL_ID,""),i=new ke(k.EVENT_SCROLL,r,null,n);this.safeHttpService.sendEvent(i),yc.setString(k.SESSION_STORAGE_SCROLL_ID,i.id.toHexString()),this._lastScreenOrScroll=new Date(i.occurred)}getPercentScrolledY(){let t=window.document.body.scrollHeight,r=window.innerHeight;return Math.ceil((window.scrollY+r)/t*100)}},Jp=class LE{static ACTIVE_DURATION="aDur";static INACTIVE_DURATION="iaDur";apiService=xe.get(Ue);runtimeData=Pe.get();listen(){document.onvisibilitychange=()=>{document.visibilityState==="visible"?this.onVisible():document.visibilityState==="hidden"&&this.onHidden()}}async onVisible(){}async onHidden(){let t=await this.runtimeData.setInactive();if(t===0){C.info("Not sending background event as user was inactive on website");return}C.info(`Sending background event with ${t} seconds`);let r={};r[LE.ACTIVE_DURATION]=t,this.apiService.sendEvent(new ke(k.EVENT_APP_BACKGROUND,r))}},Qp=class{loadedFonts=[];async loadAllFonts(e){e.elems?.forEach(t=>{t instanceof bi&&this.loadFamily(t.typography?.fam)})}async loadFamily(e){if(!e?.fonts||this.loadedFonts.indexOf(e.name)>-1)return;let t=[];e.fonts.forEach(r=>{if(r.url){let n=new FontFace(k.COOEE+e.name,r.getURL(),r.getFontDescriptor());t.push(n.load())}}),this.loadedFonts.push(e.name),(await Promise.all(t)).forEach(r=>{document.fonts.add(r)})}},eh=class{static updateIdentity(e){if(!this.isInstalled())return;let t={};e.email&&(t.email=e.email),e.mobile&&(t.phone_number=e.mobile),C.debug("Sending email/mobile to Klaviyo"),window.klaviyo.push(["identify",t])}static isInstalled(){return window.klaviyo&&typeof window.klaviyo=="object"}},th=class{apiService;action;triggerContext;constructor(e,t){this.action=e,this.apiService=Ue.getInstance(),this.triggerContext=t}async execute(){let e=this.containsCTA()?k.EVENT_TRIGGER_CLICKED:k.EVENT_TRIGGER_CLOSED;switch(this.action.at!==106&&this.closeTriggerAndSendEvent(e),this.action.at){case 2:break;case 4:this.gotoURLAction();break;case 5:this.shareAction();break;case 106:this.collectFormData();break;case void 0:case 105:break;default:C.error("Received an invalid ClickActionType: ",this.action.at);return}}externalAction(){this.action.ext?.u&&window.open(this.action.ext.u,"_blank")?.focus()}gotoURLAction(){if(this.action.gu?.u){let e=this.action.gu.u;ue.isValidURL(e)||(e=`//${e}`),window.open(e,"_self")}}prompt(){let e=this.action.pmpt;e&&(e===2&&this.promptLocationPermission(),e===3&&this.promptPushNotificationPermission(),e===1&&this.promptCameraPermission())}closeTriggerAndSendEvent(e,t){this.triggerContext.closeInApp(e,t),this.dispatchEvent()}shareAction(){if(this.action.share){if(!navigator.share){C.warn("Navigator.share is not compatible with this browser");return}navigator.share({text:this.action.share.text,title:"Share"}).then(e=>console.log(e)).catch(e=>console.error(e))}}containsCTA(){return this.action.at&&this.action.at!==1?!0:!(this.isEmpty(this.action.custKV)&&this.isEmpty(this.action.up))}isEmpty(e){return e?Object.keys(e).length===0:!0}promptLocationPermission(){!navigator.geolocation||!navigator.permissions||navigator.geolocation.getCurrentPosition(e=>{this.apiService.updateDeviceProps({coords:[e.coords.latitude,e.coords.longitude]}),this.sendPermissionData()})}promptPushNotificationPermission(){if(!("Notification"in window)){C.warn("This browser does not support desktop notification");return}if(Notification.permission!=="default"){this.apiService.updateDeviceProps({pnPerm:Notification.permission});return}Notification.requestPermission().then(()=>{this.sendPermissionData()})}promptCameraPermission(){navigator.mediaDevices&&navigator.mediaDevices.getUserMedia({video:!0}).finally(()=>{this.sendPermissionData()})}checkPermission(e){return navigator.permissions.query({name:e}).then(t=>t.state.toString())}async checkAllPermission(){let e=await this.checkPermission("camera"),t=await this.checkPermission("geolocation"),r=Notification.permission;return{camera:e,location:t,notification:r}}sendPermissionData(){this.checkAllPermission().then(e=>{this.apiService.updateDeviceProps({perm:e})})}collectFormData(){let e={};for(let t of this.triggerContext.inputs){if(!t.isValid)return;let r=document.getElementById(t.id).value;t.type===51?e.email=r:t.type===52&&(e.mobile=r)}this.closeTriggerAndSendEvent(k.EVENT_FORM_SUBMITTED,{form:e}),ue.showSnackbar("Coupon applied on cart"),eh.updateIdentity(e)}dispatchEvent(){let e=this.triggerContext.triggerData,t={clickAction:this.action,items:this.triggerContext.selectedEmbeddedItems??e.embeddedItems??e.items,collections:e.collections,triggerData:e};document.dispatchEvent(new CustomEvent(k.CTA_EVENT,{detail:t}));let r={action:this.containsCTA()?k.CAMPAIGN_CLICKED_ACTIVITY:k.CAMPAIGN_CLOSED_ACTIVITY};document.dispatchEvent(new CustomEvent(k.POPUP_ACTIVITY_EVENT,{detail:r}))}},Dr=class{renderer=rr.get();parentHTMLEl;inappElement;inappHTMLEl;triggerContext;stylesConverter;scalingFactor;constructor(e,t,r){this.parentHTMLEl=e,this.inappElement=t,this.triggerContext=r,this.stylesConverter=new hc(this.renderer.getScalingFactor())}getHTMLElement(){return this.inappHTMLEl}insertElement(){this.renderer.appendChild(this.parentHTMLEl,this.inappHTMLEl)}processCommonBlocks(){this.processWidthAndHeight(),this.processPositionBlock(),this.processTransformBlock(),this.processTransparency(),this.processShadow(),this.registerAction();let e=re(w(w(w(w({},this.getDisplayStyles()),this.getSpaceStyles()),this.getBorderStyles()),this.getBackgroundStyles()),{boxSizing:"border-box",outline:"none"});this.renderer.setStyles(this.inappHTMLEl,e)}getDisplayStyles(){return{display:"block"}}processWidthAndHeight(){this.inappElement.w&&this.renderer.setStyle(this.inappHTMLEl,"width",this.stylesConverter.getSizePx(this.inappElement.w)),this.inappElement.h&&this.renderer.setStyle(this.inappHTMLEl,"height",this.stylesConverter.getSizePx(this.inappElement.h))}processPositionBlock(){let e={position:"absolute",left:this.stylesConverter.getSizePx(this.inappElement.x),top:this.stylesConverter.getSizePx(this.inappElement.y)};this.renderer.setStyles(this.inappHTMLEl,e)}getBorderStyles(){return this.stylesConverter.getBorderStyles(this.inappElement.br)}getSpaceStyles(){return this.stylesConverter.getSpaceStyles(this.inappElement.spc)}processTransparency(){let e=this.inappElement.alpha;if(!isNaN(e)){let t=(e/100).toFixed(2);this.renderer.setStyle(this.inappHTMLEl,"opacity",t)}}processShadow(){let e=this.inappElement.shd;e?this.renderer.setStyle(this.inappHTMLEl,"box-shadow",e.getStyle(this.scalingFactor)):this.renderer.setStyle(this.inappHTMLEl,"box-shadow","unset")}processTransformBlock(){let e=new Rs(this.inappElement.trf);e&&e.rotate&&this.renderer.setStyle(this.inappHTMLEl,"transform",`rotate(${e.rotate}deg)`)}registerAction(){let e=this.inappElement.clc;!e||Object.keys(e).length===0||(this.inappHTMLEl.addEventListener("click",t=>{t.stopPropagation(),new th(e,this.triggerContext).execute()}),this.renderer.setStyle(this.inappHTMLEl,"cursor","pointer"))}getBackgroundStyles(){return this.stylesConverter.getBackgroundStyles(this.inappElement.bg)}},Si=class extends Dr{constructor(e,t,r){super(e,t,r)}processCommonBlocks(){super.processCommonBlocks(),this.processFontBlock(),this.processAlignment()}processFontBlock(){let e={},t=this.inappElement.typography;return t&&(e.fontSize=this.stylesConverter.getSizePx(t.fs),e.fontFamily=k.COOEE+t.fam?.name,e.lineHeight=`${t.lh}`,e.letterSpacing=t.letterSpacing),this.stylesConverter.getColourStyles(this.inappElement.color,"color",e),this.renderer.setStyles(this.inappHTMLEl,e),e}processPart(e,t){let r=[];t.u&&r.push("underline"),t.st&&r.push("line-through"),r.length||r.push("normal"),this.renderer.setStyle(e,"font-weight",t.b?"bold":"normal"),this.renderer.setStyle(e,"font-style",t.i?"italic":"normal"),this.renderer.setStyle(e,"text-decoration",r.join(" ")),this.renderer.setStyle(e,"color",t.c??"inherit"),this.renderer.setStyle(e,"font-family","inherit")}processAlignment(){let e=this.inappElement.typography.ta,t=e?ec[e]?.toLowerCase():this.inappElement.typography.alignment;t||(t="start"),this.renderer.setStyle(this.inappHTMLEl,"text-align",t)}},nu=class extends Si{constructor(e,t,r){super(e,t,r),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.inappElement.parts?.forEach(e=>{let t=this.renderer.createElement("span");t.innerHTML=e.txt?.toString()?.replace(/\n/g,"<br />"),this.processPart(t,e),this.renderer.appendChild(this.inappHTMLEl,t)}),this.processCommonBlocks()}},ru=class extends Dr{constructor(e,t,r){super(e,t,r),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.processCommonBlocks()}},Fs=class extends Dr{constructor(e,t,r){super(e,t,r),this.inappHTMLEl=this.renderer.createElement("img"),this.insertElement()}render(){this.renderer.setAttribute(this.inappHTMLEl,"src",this.inappElement.src),this.renderer.setStyle(this.inappHTMLEl,"max-width","none"),this.renderer.setStyle(this.inappHTMLEl,"max-height","none"),this.renderer.setStyle(this.inappHTMLEl,"margin","0 auto"),this.processCommonBlocks()}},iu=class VE extends Dr{constructor(t,r,n){super(t,r,n),this.parent=t,this.inappHTMLEl=this.renderer.createElement("div")}static MAX_Z_INDEX="2147483647";render(){return this.parent||this.renderer.removeInApp(this.triggerContext),this.insertElement(),this.processCommonBlocks(),this.inappHTMLEl.classList.add(k.IN_APP_WRAPPER_NAME),this.inappHTMLEl.classList.add(this.triggerContext.rootClassName),this.renderer.setStyle(this.inappHTMLEl,"z-index",VE.MAX_Z_INDEX),this.inappHTMLEl}getBackgroundStyles(){return this.inappElement.cover?super.getBackgroundStyles():{}}processWidthAndHeight(){let t=this.inappElement.cont;if(this.inappElement.cover)this.renderer.isParentNotBody()?(this.renderer.setStyle(this.inappHTMLEl,"width","100%"),this.renderer.setStyle(this.inappHTMLEl,"height","100%")):(this.renderer.setStyle(this.inappHTMLEl,"width","100vw"),this.renderer.setStyle(this.inappHTMLEl,"height","100vh")),this.renderer.setStyle(this.inappHTMLEl,"top","0"),this.renderer.setStyle(this.inappHTMLEl,"left","0");else{let r=this.inappElement.spc,n=this.stylesConverter.getScaledSize(t.w)+r.getHorizontal(),i=this.stylesConverter.getScaledSize(t.h)+r.getVertical();this.renderer.setStyle(this.inappHTMLEl,"width",n+"px"),this.renderer.setStyle(this.inappHTMLEl,"height",i+"px")}}getSpaceStyles(){return{padding:this.inappElement.spc.getPaddingCSS()}}getDisplayStyles(){return w(w({display:"flex"},this.inappElement.getStylesForWrapper()),this.inappElement.getFlexStylesForContainer())}processPositionBlock(){if(this.renderer.isParentNotBody()){if(this.triggerContext.triggerData.ian?.isEmbedded()){this.renderer.setStyle(this.inappHTMLEl,"position","block");return}this.renderer.setStyle(this.inappHTMLEl,"position","absolute")}else this.renderer.setStyle(this.inappHTMLEl,"position","fixed")}getBorderStyles(){return{}}processTransparency(){}processTransformBlock(){}processShadow(){}},nh=class extends Dr{constructor(e,t,r){super(e,t,r),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){return this.processCommonBlocks(),this.renderer.setStyle(this.inappHTMLEl,"position","relative"),this.renderer.setStyle(this.inappHTMLEl,"overflow","hidden"),this.inappHTMLEl.classList.add(k.IN_APP_CONTAINER_NAME),this}},Ec=class extends Si{borderColor="";constructor(e,t,r){super(e,t,r),this.inappHTMLEl=this.renderer.createElement("input"),this.insertElement()}render(){let e=this.setInputType();this.renderer.setAttribute(this.inappHTMLEl,"placeholder",this.inappElement.placeholderText),this.renderer.setStyle(this.inappHTMLEl,"background","#ffffff00"),this.renderer.setStyle(this.inappHTMLEl,"outline","none"),this.inappHTMLEl.addEventListener("click",t=>{t.stopPropagation()}),this.processCommonBlocks(),this.addListener(this.inappHTMLEl,e),this.triggerContext.addInputField(e,this.inappElement.t)}},rh=class UE extends Ec{static EMAIL_REGEX=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;constructor(t,r,n){super(t,r,n)}setInputType(){let t=`coo-${this.inappElement.t}`;return this.renderer.setAttribute(this.inappHTMLEl,"type","email"),this.renderer.setAttribute(this.inappHTMLEl,"id",t),t}addListener(t,r){t.addEventListener("keydown",n=>{this.borderColor||(this.borderColor=this.inappHTMLEl.style.borderColor),t.value.match(UE.EMAIL_REGEX)?(this.renderer.setStyle(this.inappHTMLEl,"border-color",this.borderColor),this.triggerContext.updateValidation(r,!0)):(this.renderer.setStyle(this.inappHTMLEl,"border-color","red"),this.triggerContext.updateValidation(r,!1)),n.stopPropagation()})}},ih=class BE extends Ec{static MOBILE_REGEX=/^\d+$/;constructor(t,r,n){super(t,r,n)}setInputType(){let t=`coo-${this.inappElement.t}`;return this.renderer.setAttribute(this.inappHTMLEl,"type","tel"),this.renderer.setAttribute(this.inappHTMLEl,"id",t),t}addListener(t,r){t.addEventListener("keydown",n=>{this.borderColor||(this.borderColor=this.inappHTMLEl.style.borderColor),t.value.match(BE.MOBILE_REGEX)?(this.renderer.setStyle(this.inappHTMLEl,"border-color",this.borderColor),this.triggerContext.updateValidation(r,!0)):(this.renderer.setStyle(this.inappHTMLEl,"border-color","red"),this.triggerContext.updateValidation(r,!1)),n.stopPropagation()})}},oh=class Ji extends Si{static DAYS="Days";static HOURS="Hours";static MINUTES="Minutes";static SECONDS="Seconds";elements;spans=[];constructor(t,r,n){super(t,r,n),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.addTimerChildren(),this.processAndStartTimer(),this.processCommonBlocks();let t=re(w(w(w({flex:"1 1 0"},this.stylesConverter.getBackgroundStyles(this.inappElement.bg)),this.stylesConverter.getBorderStyles(this.inappElement.br)),this.stylesConverter.getSpaceStyles(this.inappElement.spc)),{marginLeft:this.stylesConverter.getSizePx(this.inappElement.gap),marginRight:this.stylesConverter.getSizePx(this.inappElement.gap)});this.addStylesToTimer(t)}getBackgroundStyles(){return{}}processFontBlock(){let t=super.processFontBlock();return this.stylesConverter.getColourStyles(this.inappElement.color,"color",t),this.addStylesToTimer(t),t}getSpaceStyles(){return{}}getBorderStyles(){return{}}getDisplayStyles(){return{display:"flex",flexWrap:"nowrap",justifyContent:"center"}}addStylesToTimer(t){this.elements.forEach(r=>this.renderer.setStyles(r,t))}addTimerChildren(){let t=this.inappElement.show;this.elements=[],t.day&&this.elements.push(this.getChild(Ji.DAYS)),t.hour&&this.elements.push(this.getChild(Ji.HOURS)),t.minute&&this.elements.push(this.getChild(Ji.MINUTES)),t.second&&this.elements.push(this.getChild(Ji.SECONDS)),this.elements.forEach(r=>this.inappHTMLEl.appendChild(r))}getChild(t){let r=this.renderer.createElement("div"),n=this.renderer.createElement("span"),i=this.renderer.createElement("span");return i.innerText=t,n.innerText="00",n.id=`lc-${t}`,this.renderer.setStyle(i,"font-size","0.5em"),this.renderer.setStyle(i,"text-align","center"),this.renderer.setStyle(i,"font-family","inherit"),this.renderer.setStyle(n,"text-align","center"),this.renderer.setStyle(n,"font-family","inherit"),this.inappElement.lblPos==="start"?(r.appendChild(i),r.appendChild(n)):(r.appendChild(n),r.appendChild(i)),this.renderer.setStyle(r,"display","flex"),this.renderer.setStyle(r,"flex-direction",this.inappElement.horizontal?"":"column"),this.renderer.setStyle(r,"justify-content","center"),this.renderer.setStyle(r,"align-items","center"),this.renderer.setStyle(r,"gap","5px"),this.spans.push(n),r}processAndStartTimer(){let t=this.inappElement.timer.start(this.inappElement.timerType,r=>{this.spans.forEach(n=>{n.id===`lc-${Ji.DAYS}`?n.innerText=String(r.days).padStart(2,"0"):n.id===`lc-${Ji.HOURS}`?n.innerText=String(r.hours).padStart(2,"0"):n.id===`lc-${Ji.MINUTES}`?n.innerText=String(r.minutes).padStart(2,"0"):n.id===`lc-${Ji.SECONDS}`&&(n.innerText=String(r.seconds).padStart(2,"0"))})});this.triggerContext.intervals.push(t)}},sh=class extends Si{constructor(e,t,r){super(e,t,r),this.inappHTMLEl=this.renderer.createElement("select"),this.insertElement()}render(){this.renderer.setStyle(this.inappHTMLEl,"background","#ffffff00"),this.renderer.setStyle(this.inappHTMLEl,"outline","none"),this.processCommonBlocks(),this.addListener(this.inappHTMLEl),this.addOptions()}addListener(e){this.triggerContext.selectedEmbeddedItems?.length||this.updateItems(this.triggerContext.triggerData.items[0].vars[0]),e.addEventListener("click",t=>{t.stopPropagation()}),e.addEventListener("change",()=>{let t=new wi(JSON.parse(e.value));this.updateItems(t)})}updateItems(e){let t=this.triggerContext.triggerData.items[0];this.triggerContext.selectedEmbeddedItems=[t.toEmbed(e)];let r=this.parentHTMLEl.querySelector("#coo-13");if(!r)return;let n=e.imgs[0]??t.imgs?.at(0);n?.url&&r.setAttribute("src",n.url)}addOptions(){let e=this.triggerContext.triggerData.items,t=this.inappHTMLEl;if(!e?.length){t.add(this.createOption(this.inappElement.placeholderText));return}let r=this.triggerContext.selectedEmbeddedItems?.at(0);e[0].vars.forEach(n=>{t.add(this.createOption(n.name??"Default",n,n.mID===r?.vID))})}createOption(e,t,r){let n=this.renderer.createElement("option");return n.text=e,n.value=JSON.stringify(t),r&&(n.selected=!0),t||(n.disabled=!0),n}},ah=class extends Fs{constructor(e,t,r){super(e,t,r)}render(){super.render(),this.inappHTMLEl.setAttribute("id",`coo-${this.inappElement.type}`)}},wc=class Ic{static ACTIVE_TRIGGER_DATA;renderer=rr.get();safeHTTP;parent;rootContainer;containerHTMLElement;ian;triggerContext;resizeListener;cartDrawerToggleSubscription;constructor(t){this.safeHTTP=Ue.getInstance(),this.resizeListener=()=>this.screenResized(),this.setParentContainer(t)}setParentContainer(t){this.parent=t??document.body,this.renderer.setParentContainer(this.parent)}render(t){this.renderEngagement(new Hn(t))}async renderEngagement(t){if(this.triggerContext=new fc(new Date,t),this.triggerContext.onClose(r=>{this.closeInApp(r)}),this.ian=t.ian,(this.renderer.isMobile()||t.previewType==="mobile")&&this.ian.overrideForMobileView(),this.ian.isEmbedded()){let r=document.querySelector(this.ian.getEmbeddedSelector());this.setParentContainer(r)}await this.preloadImages(t),t.shouldDelay()?window.setTimeout(()=>{this.withCartDrawerClosed()},t.getDelaySeconds()):this.withCartDrawerClosed()}withCartDrawerClosed(){if(!Kt.get().isOpen()||!this.renderer.isMobile()){this.startRenderingOnce();return}this.cartDrawerToggleSubscription=Kt.get().onToggle().subscribe(({open:t})=>{!t&&this.startRenderingOnce()})}startRenderingOnce(){if(!this.shouldSkipCampaign()){Ic.ACTIVE_TRIGGER_DATA=this.triggerContext.triggerData;try{this.startRendering()}catch(t){Ct.getInstance().captureException(t,{triggerData:JSON.stringify(this.triggerContext.triggerData)});return}this.sendTriggerDisplayed(),this.renderer.isMobile()||window.addEventListener("resize",this.resizeListener),this.cartDrawerToggleSubscription?.unsubscribe()}}shouldSkipCampaign(){let t=this.triggerContext.triggerData;if(!t.previewType&&Ic.ACTIVE_TRIGGER_DATA){let n={triggerShown:new yo(Ic.ACTIVE_TRIGGER_DATA??{})};return this.skipTrigger(t,n),!0}if(Pe.get().isGoKwikPopupOpen)return this.skipTrigger(t,{reason:"GoKwik popup is open"}),!0;let r=k.PAYMENT_MODAL_DETAILS.find(n=>!!document.querySelector(n.identifier));return r?(this.skipTrigger(t,{reason:`${r.gateway} modal is open`}),!0):!1}startRendering(){this.renderer.calculateScalingFactor(this.ian),this.rootContainer=new iu(this.parent,this.ian,this.triggerContext).render();try{this.renderContainer(this.triggerContext)}catch(t){throw C.error(t),t}}sendTriggerDisplayed(){let t={};this.triggerContext.triggerData.items?.length&&(t.promotedMIDs=this.triggerContext.triggerData.items?.map(i=>i.mID));let r=new ke(k.EVENT_TRIGGER_DISPLAYED,t,this.triggerContext.triggerData);this.safeHTTP.sendEvent(r);let n={action:k.CAMPAIGN_DISPLAYED_ACTIVITY};document.dispatchEvent(new CustomEvent(k.POPUP_ACTIVITY_EVENT,{detail:n}))}sendTriggerClosed(t){let r=t.eventName;delete t.eventName;let n=new ke(r,t,this.triggerContext.triggerData);n.name===k.EVENT_TRIGGER_CLICKED&&(n.items=this.triggerContext.selectedEmbeddedItems??this.triggerContext.triggerData.items?.map(i=>i.toEmbed())),this.safeHTTP.sendEvent(n)}addEnterAnimation(t){this.containerHTMLElement.animate(t.getEnterAnimation(),{duration:500})}renderElement(t,r,n){r instanceof ic?new rh(t,r,n).render():r instanceof oc?new ih(t,r,n).render():r instanceof Eo?new nu(t,r,n).render():r instanceof sc?new ah(t,r,n).render():r instanceof qi?new Fs(t,r,n).render():r instanceof Ns?new ru(t,r,n).render():r instanceof nc?new oh(t,r,n).render():r instanceof rc?new sh(t,r,n).render():C.error("Unsupported element type- "+r.type)}renderContainer(t){let r=this.ian?.cont;r&&(this.containerHTMLElement=new nh(this.rootContainer,r,t).render().getHTMLElement(),new Qp().loadAllFonts(this.ian),this.ian.elems?.forEach(async n=>{await this.renderElement(this.containerHTMLElement,n,t)}),this.addEnterAnimation(this.ian.anim))}closeInApp(t){let r=this.ian.anim.getExitAnimation();this.sendTriggerClosed(t),Ic.ACTIVE_TRIGGER_DATA=void 0;let n=this.containerHTMLElement.animate(r,{duration:500,easing:"ease-in-out"});n.onfinish=()=>{this.removeInApp(),window.removeEventListener("resize",this.resizeListener)}}screenResized(){this.removeInApp(),this.startRendering()}removeInApp(){rr.get().removeInApp(this.triggerContext)}skipTrigger(t,r){let n=new ke(k.EVENT_CAMPAIGN_REJECTED,r,t);this.safeHTTP.sendEvent(n)}async preloadImages(t){let r=t.ian;if(!r)return;let n=[];r.elems.forEach(i=>{let s=i.bg?.img?.src;if(s&&n.push(this.getPromise(s)),i.t===1){let o=i.src;if(!o)return;n.push(this.getPromise(o))}}),r.bg?.img?.src&&n.push(this.getPromise(r.bg.img.src)),r.cont.bg?.img?.src&&n.push(this.getPromise(r.cont.bg.img.src)),await Promise.all(n)}getPromise(t){return new Promise(r=>{let n=new Image;n.onload=r,n.src=t,n.style.display="none"})}},ch=class{compareCartItemSubject=new ie;constructor(){this.compareCartItemSubject.pipe(Rr(100)).subscribe(this.compareCartItems.bind(this))}listen(){this.compareCartItemSubject.next(),this.overwriteXMLHttpRequest(),this.overwriteFetchMethod()}overwriteXMLHttpRequest(){let e=this,t=window.XMLHttpRequest.prototype.send;window.XMLHttpRequest.prototype.send=function(){return this.addEventListener("load",function(){e.performEvent(this._url).catch(r=>C.error("Unable to process cart change in XMLHttpRequest",r))}),t.apply(this,arguments)},C.debug("Securely overwritten window.XMLHttpRequest.send method")}overwriteFetchMethod(){let e=this,t=window.fetch;window.fetch=function(r){return t.apply(window,arguments).then(n=>(e.performEvent(r.toString()).catch(i=>C.error("Unable to process cart change in fetch",i)),n))},C.debug("Securely overwritten window.fetch method")}async performEvent(e){this.isCartManipulationURL(e)&&(Pe.get().isCartDirty=!0,this.compareCartItemSubject.next())}isCartManipulationURL(e){return/\/cart\/(add|change|update|clear)/.test(e)}sendChangesAsEvents(e,t){let r=e?.items,n=t.items,i=[],s=[];if(C.debug(`Comparing cart change with old count ${r?.length} to new count ${n.length}`),n?.forEach(o=>{let a=r?.find(l=>l.vID===o.vID);if(a){if(a.quantity!==o.quantity){let l=a.quantity<o.quantity,c=Math.abs(a.quantity-o.quantity),h=re(w({},o),{quantity:c});l?i.push(h):s.push(h)}r&&ue.removeFromArray(r,a)}else i.push(o)}),r)for(let o of r)s.push(o);C.debug(`Cart delta: added: ${i.length}, removed: ${s.length}`),i.length&&this.sendEvent(k.EVENT_ADD_TO_CART,{items:i}),s.length&&e.token===t.token&&this.sendEvent(k.EVENT_REMOVE_FROM_CART,{items:s}),(s.length||i.length)&&yi.get().broadcast(k.CART_UPDATE_BROADCAST,{itemsAdded:i,itemsRemoved:s})}sendEvent(e,t){let r=new ke(e,t);xe.get(Ue).sendEvent(r)}async compareCartItems(){let e=await st.get(ge.CURRENT_CART,{}),t=await Ye.getCurrent().getNormalisedCart(!0);this.sendChangesAsEvents(e,t)}},lh=class{listen(){return this.overwriteFetchMethod(),this}overwriteFetchMethod(){let e=this,t=window.fetch;window.fetch=async function(r,n){try{await e.modifyRequest(r,n)}catch(i){Ct.getInstance().captureError("Failed to modify graphql request",i,{body:JSON.stringify(n?.body)})}return t(r,n)},C.debug("Securely overwritten window.fetch method for graphql query")}async modifyRequest(e,t){let r=typeof e=="string"?e:e instanceof Request?e.url:"";if(!(r.includes("graphql.json")&&t?.method==="POST")||!t.body)return;let n;if(typeof t.body=="string")try{n=JSON.parse(t.body)}catch{return}else n=t.body;C.debug("Intercepted fetch request of:",r),n?.query.includes("cartCreate")&&(t.body=await this.updatedBody(n),this.sendBuyNowEvent())}async updatedBody(e){let t=e.variables.input.attributes??[],r=await ue.getCartAttributes();return e.variables.input.attributes=[...t,...r],JSON.stringify(e)}sendBuyNowEvent(){let e=Pe.get().getCurrentItem();if(!e)return;let t=new ke(k.EVENT_BUY_NOW_CLICKED,{items:[e]});Ue.getInstance().sendEvent(t)}},bc=class{constructor(e,t){this.selectors=e,this.eventName=t,this.selectorString=e.join(",")}static INSTANCE;elements;selectorString;clickListenerCallback=e=>{let t=e.currentTarget,r=new ke(this.eventName,{class:t.className||void 0,tagName:t.tagName||void 0,id:t.id||void 0});Ue.getInstance().sendEvent(r),this.removeClickListener(this.clickListenerCallback)};listenSilently(){this.listen().catch(e=>C.error(e))}async listen(){this.elements=await ue.retrySelectorForElements(this.selectorString),this.elements.forEach(e=>{e.addEventListener("click",this.clickListenerCallback)})}removeClickListener(e){this.elements?.forEach(t=>{t.removeEventListener("click",e)})}},uh=class Pf extends bc{static selectors=[".product__thumbnail-list-inner > button","product-gallery-navigation > button",".product-media--thumb-container",".product-images-inner > img",".m-product-media",".swiper-button-control",".media__thumb",".slick-arrow",".productView-img-container.product-single__media",".product-gallery__thumbnail_item_inner"];constructor(){super(Pf.selectors,k.EVENT_ITEM_THUMBNAIL_CLICKED)}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Pf),this.INSTANCE}},dh=class Lv extends bc{static selectors=[".jdgm-widget.jdgm-preview-badge.jdgm-preview-badge--with-link.jdgm--done-setup","reviewsio-product-ratings",".ruk_rating_snippet.tracked:not(.hidden)","a > .loox-rating",".yotpo-reviews-star-ratings-widget",".yotpo.lp-hero__reviews",".pr-rating > a",".rivyoReviewWidget"];constructor(){super(Lv.selectors,k.EVENT_REVIEW_CLICKED)}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Lv),this.INSTANCE}},fh=class{selector=[".gokwik-checkout button","button.cart__checkout-button","button.cart__checkout","button#checkout","button#checkout2",'button[id*="checkout" i]','button[name*="checkout" i]','button[class*="checkout" i]'].join(",");listen(){ue.onDocumentLoaded(()=>{C.debug("Execution order:","document ready"),this.useLocationHash()})}useLocationHash(){let e=window.location.hash?.substring(1);if(e)if(e.includes(k.HASH_INITIATE_CHECKOUT)){document.dispatchEvent(new Event(k.THIRD_PARTY_CHECKOUT_EVENT));let t=document.querySelector(this.selector);if(!t){C.debug("No clickable cart checkout button found");return}C.debug("Clickable cart checkout button found",t),t.click()}else e.includes(k.HASH_OPEN_CART_DRAWER)&&Kt.get().open()}},ph=class{trackSilently(){this.track().catch(e=>Ct.getInstance().captureException(e))}async track(){let e=window.Shopify?.checkout,t=window.Shopify?.Checkout;if(!e&&!t)return;let r={};this.processSmallCheckout(e,r),this.processBigCheckout(t,r);let n=this.getTokenFromCurrentURLPath();if(n&&(r.urlToken=n),!Object.keys(r).length){C.warn("No processable data found in",e,t);return}r.referrer=document.referrer,r.url=location.href;let i=await xe.get(Zt).checkSessionAndGetContext();r.sessionID=i[0],this.trackOrder(r)}processSmallCheckout(e,t){e&&(e.order_id&&(t.orderID=e.order_id.toString()),e.token&&(t.checkoutToken=e.token.toString()),e.customer_id&&(t.customerID=e.customer_id.toString()))}processBigCheckout(e,t){e&&(e.token&&!t.checkoutToken&&(t.checkoutToken=e.token.toString()),e.cartToken&&(t.cartToken=e.cartToken.toString()))}trackOrder(e){C.info("Found order to be send",e),Ue.getInstance().trackOrder(e)}getTokenFromCurrentURLPath(){let e=new RegExp("[A-Fa-f0-9]{28,32}");return location.pathname?.split("/").find(t=>t.length&&e.test(t))}},ou=class{static attachCheckoutListener(){window.gokwikSdk&&window.gokwikSdk.on("checkout_initiated",async()=>{let e=await Ye.getCurrent().getNormalisedCart(),t={via:"GoKwik",items:e.items,cartToken:e.token,amount:{value:e.amount,currency:e.currency}},r=new ke(k.EVENT_CHECKOUT_STARTED,t);Ue.getInstance().sendEvent(r)})}},hh=class{async migrate(){}};gn.escape=gx.MustacheUtils.escapeHtml;var wt=class{static globalRef;static authenticated;static async initForMerchantWebsiteOnly(){window.cooeeSDKPreview||(this.initGlobalReference(),await new hh().migrate(),this.autoAuthenticate(),new Xp().meddle(),xe.get(Ro).loadExperimentSilently(),new Jp().listen(),new ph().trackSilently(),new xo().listen(),new ch().listen(),new lh().listen(),new fh().listen(),xe.get(_c).listen(),xe.get(dh).listenSilently(),xe.get(uh).listenSilently(),xe.get(Wr).loadPageWidgetsSilently(),this.attachGoKwikListeners(),this.storePreviewParams(),this.setupPreviewListeners(),Cr.watch())}static async initForAll(){this.injectWidgetAssets()}static initGlobalReference(){window.CooeeSDK||Na(window,"CooeeSDK",{}),this.globalRef=window.CooeeSDK,Na(this.globalRef,"config",new Pt),Na(this.globalRef,"runtimeData",new Pe),C.debug("Global reference initialised")}static injectWidgetAssets(){Sn.injectScriptURL(Rn.widgetURL,"cooee-widget-sdk"),Sn.injectStylesheet(Rn.styleURL)}static autoAuthenticate(){let e=Tt.getShopName();e&&this.authenticate({shopifyShop:e})}static authenticate(e){if(this.authenticated)return;let t=e.appID?.trim(),r=e.shopifyShop;if((ue.isNull(t)||t.length!==24)&&ue.isNull(r)){C.warn("Cooee App ID or Shop name is not configured");return}this.authenticated=!0,xe.get(Zt).init(e)}static sendEvent(e,t,r){for(let i in t)if(i.length>3&&i.toLowerCase().startsWith("ce "))throw new Error("Event property name cannot start with 'CE '");let n=new ke(e,t,r?.triggerData);r?.occurred&&(n.occurred=r.occurred),xe.get(Ue).sendEvent(n)}static updateProfile(e){for(let t in e)if(t.toLowerCase().startsWith("ce "))throw new Error("User property name cannot start with 'CE '");xe.get(Ue).updateProfile(e)}static setPageName(e){if(!e)return;let t=Pe.get(),r=t.pageName;if(e===r)return;if(t.pageName=e,e==="cart"&&xe.get(Wr).loadOrRenderWidgetsAfterCartChange(),k.BLACKLISTED_PAGE_NAMES.some(s=>e.includes(s))){xe.get(_c).resetScrollID();return}let n={};r&&(n.ps=r);let i=new ke(k.EVENT_SCREEN_VIEW,n);i.occurred=t.jsLoadTime,xe.get(Ue).sendEvent(i),xe.get(_c).resetScrollID(i.occurred)}static previewPopup(e,t){new wc(t).render(e)}static previewWidget(e){new Xn(new Hn(e)).render()}static setupPreviewListeners(){if(window.opener){try{window.opener.postMessage({action:"COOEE_READY_FOR_PREVIEW"},"*")}catch(e){C.error(e)}window.addEventListener("message",e=>{if(C.debug("Received event",e),!e.origin.includes("letscooee.com")&&!e.origin.includes("localhost"))return;let t=e.data;typeof t=="object"&&(t.action==="POPUP_PREVIEW"?(this.previewPopup(t.engagementTrigger),e.source?.postMessage({action:"PREVIEW_SUCCESSFUL"},e.origin)):t.action==="WIDGET_PREVIEW"&&(this.previewWidget(t.engagementTrigger),e.source?.postMessage({action:"PREVIEW_SUCCESSFUL"},e.origin)))})}}static attachGoKwikListeners(){let e=Pe.get();window.addEventListener("kp-modal:opened",()=>{e.isGoKwikPopupOpen=!0}),window.addEventListener("user-loggedin",t=>{let{token:r}=t.detail;r&&this.updateProfile({goKwikToken:r})}),window.gokwikSdk?ou.attachCheckoutListener():window.addEventListener("gokwikLoaded",ou.attachCheckoutListener)}static storePreviewParams(){let e=Pe.get(),t=new URLSearchParams(location.search),r=t.get("cooee-preview");r&&(e.previewIDs=r.trim().split(",").filter(i=>Number.isInteger(+i)));let n=t.get("cooee-variant");n&&(e.previewVariant=n)}},mh=class FE{static INSTANCE;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new FE),this.INSTANCE}init(){Fl.get(ge.APP_CONFIG,{}).then(t=>this.updateGlobalConfig(t))}async processAppConfigurations(t){C.log("Received app configuration",t),t.currencyCount=t.currencies?.length;let r=this.updateGlobalConfig(t);Fl.set(ge.APP_CONFIG,r).catch(n=>C.error(n)),dp.processConfiguration(),r.website&&(Sn.injectRawScript(r.website.commonJS),Sn.injectRawCSS(r.website.commonCSS)),Kt.get().onToggle().subscribe(async({open:n})=>{C.info("Cart drawer is now",n?"open":"closed"),n&&(xe.get(Wr).loadOrRenderWidgetsAfterCartChange(),await this.trackViewCartEvent())})}updateGlobalConfig(t){let r=wt.globalRef.config.update(t);return Kt.forceUpdate(),C.debug("App configurations",r),r}async trackViewCartEvent(){let t=await Ye.getCurrent().getNormalisedCart(),r={value:t.amount,currency:t.currency},n={items:t.items,amount:r,drawer:!0};Ue.getInstance().sendEvent(new ke(k.EVENT_VIEW_CART,n))}},vx=Be(V_()),gh=class P_{static META_REQUIRED_FIELDS=["ad_id"];static GOOGLE_REQUIRED_FIELDS=["gad_source","gclid"];source;adID;campaignID;adName;campaignName;constructor(t){this.adID=t.adID,this.campaignID=t.campaignID,this.source=t.source}static getAdParams(){let t;try{t=new vx.URLBuilder(location.href)}catch{return{}}let r={};if(this.META_REQUIRED_FIELDS.every(n=>Array.from(t.getParams().keys()).includes(n)))return r={source:"META",adID:t.getQueryParam("ad_id")?.trim(),campaignID:t.getQueryParam("campaign_id")?.trim()},new P_(r);if(this.GOOGLE_REQUIRED_FIELDS.every(n=>Array.from(t.getParams().keys()).includes(n)))return r={source:"GOOGLE"},new P_(r)}},Ps=class rI{static INSTANCE;httpAPIService=Mn.getInstance();coreService=mh.getInstance();sentryService=Ct.getInstance();sdkToken="";userID="";deviceID="";appID="";shopifyShop="";constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new rI),this.INSTANCE}init(t){this.appID=t.appID,this.shopifyShop=t.shopifyShop}async storeAndPopulateAuthData(t){t&&(t.userID&&(this.userID=t.userID,await st.set(ge.ID,t.userID)),t.deviceID&&(this.deviceID=t.deviceID,await st.set(ge.DEVICE_ID,t.deviceID)),t.sdkToken&&(this.sdkToken=t.sdkToken,await st.set(ge.SDK_TOKEN,t.sdkToken)),this.updateAPIClient())}async validateSession(t){await this.populateFirstSeen(),await this.populateUserDataFromStorage(),C.log("Validating session with server");let r=await this.getSessionValidateData(t);try{let n=await this.httpAPIService.validateSession(r);C.log("Validating session Response",n),await this.coreService.processAppConfigurations(n.appSettings),await this.storeAndPopulateAuthData(n)}catch(n){throw C.error(n),n}}async populateUserDataFromStorage(){if(this.sdkToken=await st.get(ge.SDK_TOKEN),!this.sdkToken){C.warn("No SDK token found in local storage");return}this.userID=await st.get(ge.ID),this.deviceID=await st.get(ge.DEVICE_ID),this.updateAPIClient()}updateAPIClient(){C.debug("SDK Token:",this.sdkToken),C.log("Device ID:",this.deviceID),C.log("User ID:",this.userID),Ka.trackDeviceID(this.deviceID),Cr.prepend(`Device ID: <strong>${this.deviceID}</strong>`),this.httpAPIService.setAPIToken(this.sdkToken),this.sentryService.setGlobalContext("Visitor Info",{device_id:this.deviceID,user_id:this.userID}),this.sentryService.setUser({id:this.deviceID})}async getSessionValidateData(t){let r=await new lp().get();r.host=location.origin;try{(await IT())?.isPrivate&&(r.private=!0)}catch(i){yx.default.error("Unable to detect private/incognito window",i)}let n=await st.get(ge.DEVICE_ID);return n||(n=new sn().toHexString(),await st.set(ge.DEVICE_ID,n)),re(w({deviceID:n,deviceProps:r,appID:this.appID,shopifyShop:this.shopifyShop},t),{sdk:k.SDK,page:vi.parseFromCurrent(),ad:gh.getAdParams(),occurred:this.getSessionStartTime(Pe.get().jsLoadTime),currentItem:Pe.get().getCurrentItem(),cart:await Ye.getCurrent().getNormalisedCart(),properties:{}})}async populateFirstSeen(){let t=await st.get(ge.FIRST_SEEN),r=t?new Date(t):new Date;t||await st.set(ge.FIRST_SEEN,r.toISOString()),this.httpAPIService.setFirstSeen(r),this.sentryService.setGlobalContext("Visitor Info",{first_seen:r.toISOString()})}getSessionStartTime(t){return(new Date().getTime()-t.getTime())/1e3>k.IDLE_TIME_IN_SECONDS?new Date:t}},Zt=class Tc{static replaySubject=new Po(1);static INSTANCE;sentryService=xe.get(Ct);lock=new Ya;constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Tc),this.INSTANCE}init(t){if(C.debug("Initialising SDK",t),ST(navigator.userAgent)){C.info("This seems to be a bot. Disabling SDK");return}Ps.getInstance().init(t),Tc.INSTANCE.checkForNewSession(!0).then(async()=>{Tc.replaySubject.next(!0),Tc.replaySubject.complete()}).catch(r=>C.error("Unable to perform device init",r))}getCurrentSessionID(){return hn.set(ge.SESSION_LAST_USED_TIME,new Date().getTime()),hn.get(ge.ID,"")}async checkSessionAndGetContext(){return await this.checkForNewSession(),this.getContext()}async getContext(){let t=await Promise.all([this.getCurrentSessionID(),this.getCurrentSessionNumber(),this.getLandingPage()]);return this.sentryService.setGlobalContext("Visitor Session",{id:t[0],number:t[1],landing_page:t[2]}),t}async checkForNewSession(t){await this.lock.acquire();let r=!1;if(await this.isNewSessionRequired()?(await this.startNewSession(),t=!0,r=!0):await this.notSynced()&&(r=!0),t){let n=await this.getContext();await Ps.getInstance().validateSession({sessionID:n[0],sessionNumber:n[1],landingPage:n[2],newSession:r}),await hn.set(ge.SESSION_SYNCED,!0)}this.lock.release()}async startNewSession(){C.debug("Starting new session"),await hn.clear(),C.debug("Cleared SessionStorage before starting new session");let t=new Date,r=new sn().toHexString();C.debug("New session ID to be used",r);let n=await st.get(ge.SESSION_NUMBER,0)+1;Cr.prepend(`New Session ID: <strong>${r}</strong> & number: ${n}`),await Promise.all([st.set(ge.SESSION_NUMBER,n),hn.set(ge.ID,r),hn.set(ge.SESSION_LAST_USED_TIME,t.getTime()),hn.set(ge.SESSION_LANDING_PAGE,vi.parseFromCurrent())])}getLandingPage(){return hn.get(ge.SESSION_LANDING_PAGE,{})}getCurrentSessionNumber(){return st.get(ge.SESSION_NUMBER,1)}async isNewSessionRequired(){if(!await hn.get(ge.ID))return!0;let t=await hn.get(ge.SESSION_LAST_USED_TIME,0);return t?(new Date().getTime()-t)/1e3>k.IDLE_TIME_IN_SECONDS:!0}async notSynced(){return!await hn.get(ge.SESSION_SYNCED,!1)}},wx=Be(tr()),_x=Be(tr()),Ex=Be(Ea()),vh=class{triggerData;safeHttpService=Ue.getInstance();render(e){e.contentSource===_x.EngagementContentSource.KLAVIYO&&(this.triggerData=e,window.addEventListener("klaviyoForms",this.handleKlaviyoEvents.bind(this)),window._klOnsite=window._klOnsite||[],window._klOnsite.push(["openForm",e.klaviyoFormID]))}handleKlaviyoEvents(e){if(e.type!=="klaviyoForms")return;let t=e.detail;if(t.formId!==this.triggerData.klaviyoFormID){C.warn("Received invalid trigger callback");return}switch(t.type){case"open":this.safeHttpService.sendEvent(new ke(k.EVENT_TRIGGER_DISPLAYED,{form:{id:t.formId}},this.triggerData));break;case"stepSubmit":{let r=this.getFormDetails(t);this.safeHttpService.sendEvent(new ke(k.EVENT_FORM_SUBMITTED,{form:r},this.triggerData)),this.safeHttpService.updateProfile(r);break}case"close":window.removeEventListener("klaviyoForms",this.handleKlaviyoEvents.bind(this)),this.safeHttpService.sendEvent(new ke(k.EVENT_TRIGGER_CLOSED,{form:{id:t.formId}},this.triggerData));break}}getFormDetails(e){let t={id:e.formId},r=e.metaData;if(Ex.JSUtils.hasKeys(r)){let n=["email","phone_number","first_name","last_name","$email","$phone_number","$first_name","$last_name"];Object.keys(r).forEach(o=>{n.includes(o)||(t[o]=r[o])}),t.email=r.$email??r.email,t.mobile=r.$phone_number??r.phone_number;let i=r.$first_name??r.first_name,s=r.$last_name??r.last_name;(i?.length||s?.length)&&(t.name=i+" "+s)}return t}},yh=class{static trackIntent(e){if(!this.isInstalled()){C.log("Facebook pixel not installed");return}if(!Pt.get().pixelPush){C.log("Facebook pixel push not enabled");return}let t=Ds[e.intent]?.toLowerCase(),r=e.segmentName;!t&&!r||(C.debug(`Sending ${t} intent and ${r} segment to Facebook Pixel`),window.fbq("trackCustom","CooeeIntent",{intent_value:t,segment_value:e.segmentName}))}static isInstalled(){return window.fbq&&typeof window.fbq=="function"}},_h=class nI{static INSTANCE;httpService=xe.get(Mn);sentryService=xe.get(Ct);sessionManager=xe.get(Zt);runtime=Pe.get();constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new nI),this.INSTANCE}sendSilently(t){this.send(t).catch(r=>C.error(`Failed to send ${t.name}`,r))}async send(t){if(C.debug(`Sending event ${t.name}`),Cr.prepend(`Sending event <strong>${t.name}</strong> with id ${t.id}`),this.shouldReject(t)){C.warn(`Rejecting event ${t.name}`);return}await Promise.all([this.addSessionContext(t),this.addShopifyContext(t)]),this.addShopifyAttributes(),t.name!==k.EVENT_APP_BACKGROUND&&this.runtime.setActive(),t.currentItem=this.runtime.getCurrentItem(),t.locale=this.runtime.locale,this.httpService.post("/v1/event/track",t).then(async r=>{C.log("\u2705 Event tracked:",t.name),Cr.prepend(`\u2705 Event <strong>${r.eventName}</strong> tracked`),this.processEventResponse(t,r)}).catch(r=>{C.error(`Error sending event ${t.name} to server`,r)})}shouldReject(t){return t.trigger?.triggerID==="test"||t.trigger?.triggerID==="preview"?(C.warn("Not sending event as this is a test trigger"),!0):!1}async addSessionContext(t){let r=await this.sessionManager.checkSessionAndGetContext();t.sessionID=r[0],t.sessionNumber=r[1],t.landingPage=r[2],t.page=vi.parseFromCurrent()}async addShopifyContext(t){if(Tt.isShopify())try{t.cart=await Ye.getCurrent().getNormalisedCart()}catch(r){C.error("Error fetching Shopify cart before sending the event",r)}}processEventResponse(t,r){this.renderWidgetIfAny(t,r).catch(n=>{C.error("Failed to display a campaign",n,t,r),this.sentryService.captureException(n,{event:t,response:r})}),this.utiliseIntentIfCalculated(r)}async renderWidgetIfAny(t,r){if(!r.triggerData){C.log(`Nothing to engage after ${t.name}`);return}C.log(`\u{1F4E3} Engagement(id=${r.triggerData.shortID}) will be shown`,r.triggerData);let n=new Hn(r.triggerData);n.occurred=t.occurred;let i;try{i=await pc.refreshItems(n)}catch(s){C.error("Failed to refresh the products",s);return}if(n.items=i,n.contentSource===wx.EngagementContentSource.KLAVIYO){new vh().render(n);return}new wc().renderEngagement(n).catch(s=>{C.error("Failed to render popup",s),this.sentryService.captureException(s,{event:t,triggerData:n})})}utiliseIntentIfCalculated(t){t.intent&&(Ka.trackIntent(t.intent),yh.trackIntent(t),Cr.prepend(`Intent is <strong>${Ds[t.intent]}</strong>`))}addShopifyAttributes(){Tt.isShopify()&&Ye.getCurrent().addCooeeAttributes().catch(t=>{C.error("Fail to add attributes in cart",t)})}},Ue=class iI{static INSTANCE;httpApiService=Mn.getInstance();eventAPIService=_h.getInstance();constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new iI),this.INSTANCE}sendEvent(t){C.debug(`Waiting for auth to send event ${t.name}`),Zt.replaySubject.subscribe(async()=>{this.eventAPIService.sendSilently(t)})}updateProfile(t){Zt.replaySubject.subscribe(()=>{this.httpApiService.updateUserData(t??{})})}trackOrder(t){Zt.replaySubject.subscribe(()=>{this.httpApiService.trackOrder(t)})}updateDeviceProps(t){Zt.replaySubject.subscribe(()=>{this.httpApiService.updateDeviceProps({props:t})})}generateDiscount(t){return this.httpApiService.generateDiscount(t)}},Do=class{constructor(e,t){this.triggerContext=e,this.element=t}safeHTTP=Ue.getInstance();async execute(e){let t=Pe.get().getCurrentItem(),r=e.clickAction||this.element?.clc;if(!r)return;let n=e.item,i=this.triggerContext,s=new xo,o=i.triggerData.redirectBehaviour,a=!!i.triggerData.discount.type&&!!r?.applyDiscount,l={selectedVariants:i.triggerData.nonMutableItems.map(b=>({itemMID:b.mID,mID:b.selectedOrFirstVariant.value.mID})),eID:i.triggerData.engagementID,cID:i.triggerData.contentID},c="",h=[],d=[];if(n?d=[n.toEmbed()]:e.embeddedItem&&(d=[e.embeddedItem]),r.at===108){let b=i.selectedItems;if(d=e.embeddedItems??b.map(I=>I.toEmbed()),i.shouldGiveFBTDiscount||e.embeddedItems?.length){let I;e.embeddedItems?I=e.embeddedItems.map(F=>({itemMID:F.mID,mID:F.vID,quantity:F.quantity})):I=b.map(F=>({itemMID:F.mID,mID:F.selectedOrFirstVariant.value.mID}));let A=i.triggerData.bundleFrom;i.triggerData.isBundleOnCartDrawer()&&A&&I.push({itemMID:A.mID,mID:A.selectedOrFirstVariant.value.mID,isPrimary:!0}),l.selectedVariants=I,i.triggerData.isBundleOnPDP()&&l.selectedVariants.forEach(F=>{F.mID===t.vID&&(F.isPrimary=!0)})}else l=void 0;h=e.embeddedItems??b}else if(r.at===107){let b=await Ye.getCurrent().getNormalisedCart();d=b.items,l.selectedVariants=b.items.map(I=>({itemMID:I.mID,mID:I.vID}))}else if(r.at===102)h=n?[n]:[e.embeddedItem];else if(r.at===101)c=n?Tt.getRootPrefix()+"products/"+n.slug:e.embeddedItem?.link;else if(r.at===4){let b=ue.isValidURL(r.gu?.u);b&&(c=b.href)}else if(r.at===109){let b=await s.upgradeToSubscription(n,i.triggerData);this.triggerContext.triggerData.skipSubscribedItems&&this.triggerContext.renderer.destroy(),Kt.get().refreshUI(b)}if(this.sendTriggerClicked(d,{from:"button"},e.video),C.debug({redirectPath:c,redirectBehaviour:o,hasDiscount:a}),!a&&c){location.href=c;return}let f,g=!1;try{f=await this.getOrGenerateDiscountCode(l),C.debug("Discount code (if any) to apply",f)}catch(b){if(!this.triggerContext.triggerData.isBYOB()){Cx.default.error("Unable to get a discount code",b);return}}if(f&&r.at===103)await s.performCopyCoupon(f);else if(r.at===110){let b=await s.performCartCreate(t,f,i.triggerData);b&&(location.href=b);return}try{f&&await To.applyWithStorefront(f)}catch(b){C.error(b),g=!0}let m;if(h?.length&&(m=await s.performAddToCart(h,i.triggerData)),g&&f){To.navigate(f,o,c);return}if(c){location.href=c;return}To.navigateWithoutDiscount(o,m)}sendTriggerClicked(e,t,r){let n=k.EVENT_TRIGGER_CLICKED,i=new ke(n,t,this.triggerContext.triggerData);i.items=e,r?.id&&(i.videos=[r.id]),this.safeHTTP.sendEvent(i)}async getOrGenerateDiscountCode(e){let t=this.triggerContext.triggerData.discount;if(!t?.type)return;let r="";if(t.type===bx.DiscountType.STATIC){if(!t.code)throw Ct.getInstance().captureMessage("No discount code found","warning",{triggerContext:this.triggerContext}),new Error("No discount code found");return t.code}if(e){if(r=await this.generateDiscount(e),!r)throw C.error("No discount code found",e),new Error("Discount code not found or generated");return r}}async generateDiscount(e){try{return(await this.safeHTTP.generateDiscount(e))?.code}catch(t){throw ue.showSnackbar("Failed to generate a discount code"),C.error("Error generating discount code",t,e),Ct.getInstance().captureMessage("Failed to generate discount code","error",{discountData:JSON.stringify(e),triggerContext:this.triggerContext,error:t}),t}}},Xi=class{static getBestSources(e){if(!e)return[];let t=[],r=e.filter(i=>i.format==="mp4").sort((i,s)=>s.width-i.width)[0];r&&t.push(r);let n=e.filter(i=>i.format==="m3u8").sort((i,s)=>s.width-i.width)[0];return n&&t.push(n),t}static async performCTA(e,t){let r={applyDiscount:!0};t.cta===No.ClickActionType.ADD_TO_CART?r={at:No.ClickActionType.ADD_TO_CART,applyDiscount:!0}:t.cta===No.ClickActionType.GO_TO_PRODUCT?r={at:No.ClickActionType.GO_TO_PRODUCT,applyDiscount:!0}:t.cta===No.ClickActionType.OPEN_CART&&(e.triggerData.redirectBehaviour=No.RedirectBehaviour.CART_DRAWER),await new Do(e).execute({clickAction:r,embeddedItem:new pn(t.item)})}},oU=["videoPlayers"],Cc=class L_{videoPlayers;videos=[];currentIndex=0;muted=!0;videoProgress=[];selectedItem=null;triggerContext;VideoUtils=Xi;engagementTrigger;ngOnInit(){this.engagementTrigger=this.triggerContext?.triggerData}pauseAll(){this.videoPlayers.forEach(t=>t.nativeElement.pause())}async toggleMute(){this.muted=!this.muted,this.videoPlayers.forEach(r=>r.nativeElement.muted=this.muted);let t=[this.muted?k.EVENT_VIDEO_MUTED:k.EVENT_VIDEO_UNMUTED,{current:this.currentVideoProps()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(t),await st.set(ge.MUTED,this.muted)}playActiveVideo(){this.pauseAll();let t=this.getCurrentVideoElement();t&&(t.currentTime=1,t.play().then(async()=>{this.muted=await st.get(ge.MUTED,!0),t.muted=this.muted}))}onVideoEnded(){if(this.currentIndex<this.videos.length-1)this.moveToNextVideo();else{let t=this.videoPlayers.last;if(t){let r=this.getPreviousVideoDataForEvent(),n=[k.EVENT_LAST_VIDEO_ENDED,{previous:r},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(n),t.nativeElement.currentTime=0,t.nativeElement.play()}}}updateProgress(t,r){let n=t.target;this.videoProgress[r]=n.currentTime/n.duration*100}onSlideChange(t){let r=this.getPreviousVideoDataForEvent();t(),this.playActiveVideo(),this.selectedItem=null;let n=this.currentVideoProps(),i={previous:r,current:n},s=[k.EVENT_VIDEO_CHANGE,i,{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(s)}productCardClicked(t,r){let n=[k.EVENT_MORE_ITEM_INFO_CLICKED,{item:t,video:r},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(n),this.selectedItem=t}currentVideoProps(){return{videoID:this.videos[this.currentIndex].id,videoIndex:this.currentIndex}}getPreviousVideoDataForEvent(){let t=this.currentVideoProps(),r=this.videoPlayers.find(i=>i.nativeElement.dataset.videoId===this.videos[this.currentIndex].id)?.nativeElement;t.playedTillMS=Math.ceil(r?.currentTime*1e3);let n=r?.duration*1e3;return t.playedTillPercent=+(t.playedTillMS/n).toFixed(4),t}static \u0275fac=function(t){return new(t||L_)};static \u0275cmp=ct({type:L_,selectors:[["cooee-base-video"]],viewQuery:function(t,r){if(t&1&&es(oU,5),t&2){let n;ts(n=ns())&&(r.videoPlayers=n)}},decls:0,vars:0,template:function(t,r){},encapsulation:2})},sU=["swiperContainer"],aU=e=>({"swiper-hide-slide":e}),Sx=(e,t)=>t.url;function cU(e,t){if(e&1&&Ne(0,"source",15),e&2){let r=t.$implicit;bn("type",r.mimeType),Fr("media","(max-width: ",r.width,"px)"),be("src",r.url,zt)}}function lU(e,t){if(e&1&&Ne(0,"source",16),e&2){let r=t.$implicit;bn("type",r.mimeType),be("src",r.url,zt)}}function uU(e,t){if(e&1){let r=fn();K(0,"video",14,1),Qe("timeupdate",function(n){ze(r);let i=q().$index,s=q();return qe(s.updateProgress(n,i))})("click",function(){ze(r);let n=q().$index,i=q();return qe(i.currentIndex===n&&i.toggleMute())})("ended",function(){ze(r);let n=q(2);return qe(n.onVideoEnded())}),Mt(2,cU,1,4,"source",15,Sx),Mt(4,lU,1,2,"source",16,Sx),X()}if(e&2){let r=q(),n=r.$implicit,i=r.$index,s=q();be("autoplay",s.currentIndex===i)("muted",s.muted),fo("data-video-id",n.id),Y(2),Ot(n.sources),Y(2),Ot(s.VideoUtils.getBestSources(n.sources))}}function dU(e,t){if(e&1){let r=fn();K(0,"div",18)(1,"cooee-product-modal",19),Qe("performCTA",function(n){ze(r);let i=q(2).$implicit,s=q();return qe(s.performClickToAction(n,i))})("closeModel",function(){ze(r);let n=q(3);return qe(n.selectedItem=null)}),X()()}if(e&2){let r=q(3);Y(),be("item",r.selectedItem)}}function fU(e,t){if(e&1){let r=fn();K(0,"div",20)(1,"cooee-mute-toggle",21),Qe("buttonClicked",function(){ze(r);let n=q(3);return qe(n.toggleMute())}),X()(),K(2,"cooee-product-card",22),Qe("performCTA",function(n){ze(r);let i=q(2).$implicit,s=q();return qe(s.performClickToAction(n,i))})("clicked",function(n){ze(r);let i=q(2).$implicit,s=q();return qe(s.productCardClicked(n,i))}),X()}if(e&2){let r=q(2).$implicit,n=q();Y(),be("muted",n.muted),Y(),be("items",r.items)}}function pU(e,t){if(e&1&&(Ne(0,"cooee-video-progress-bar",17),At(1,dU,2,1,"div",18)(2,fU,3,2)),e&2){let r=q().$index,n=q();be("width",n.videoProgress[r]||0),Y(),Vt(n.selectedItem?1:2)}}function hU(e,t){if(e&1&&(Br(0),K(1,"div",5),At(2,uU,6,3,"video",13)(3,pU,3,2),X()),e&2){let r=t.$index,n=q(),i=n.currentIndex===r||n.currentIndex-1===r||n.currentIndex+1===r;Y(),be("ngClass",ma(3,aU,!i)),Y(),Vt(i?2:-1),Y(),Vt(n.currentIndex===r?3:-1)}}var Eh=class F_ extends Cc{constructor(t){super(),this.cdr=t}videos=[];currentIndex=0;closeDialog=new We;performCTA=new We;swiperContainerRef;swiperInstance;ngAfterViewInit(){let t=this.swiperContainerRef.nativeElement.getRootNode();Sn.injectStylesheet(Rn.styleURL,t),Sn.injectStylesheet("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css",t),this.loadSwiperScript().then(()=>{this.initSwiper(),this.afterSwiperInit(),this.playActiveVideo()})}ngOnDestroy(){this.swiperInstance?.destroy?.()}close(t=this.videos[this.currentIndex],r=this.currentIndex){this.closeDialog.emit({lastVideo:t,lastVideoIndex:r})}performClickToAction(t,r){this.performCTA.emit({cta:t.cta,item:t.item,video:r})}getCurrentVideoElement(){return this.videoPlayers.get(Math.min(this.currentIndex,1))?.nativeElement}updateProgress(t,r){super.updateProgress(t,r),this.cdr.detectChanges()}async toggleMute(){await super.toggleMute(),this.cdr.detectChanges()}moveToNextVideo(){this.swiperInstance.slideTo(this.currentIndex+1)}loadSwiperScript(){return new Promise(t=>{let r="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js";if(Array.from(document.scripts).some(i=>i.src.includes(r))){t();return}let n=document.createElement("script");n.src=r,n.onload=()=>t(),document.body.appendChild(n)})}initSwiper(){this.swiperInstance=new window.Swiper(this.swiperContainerRef.nativeElement,{effect:"coverflow",slidesPerView:3,initialSlide:this.currentIndex,centeredSlides:!0,coverflowEffect:{rotate:0,stretch:0,depth:150,modifier:2,slideShadows:!0},navigation:{nextEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-next"),prevEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-prev")}}),this.swiperContainerRef.nativeElement.style.setProperty("--swiper-navigation-size","50px"),this.swiperContainerRef.nativeElement.style.setProperty("--swiper-navigation-color","white")}afterSwiperInit(){this.swiperInstance.on("slideChange",t=>{this.onSlideChange(()=>{this.currentIndex=t.realIndex,this.cdr.detectChanges()})})}static \u0275fac=function(t){return new(t||F_)(bt(Vr))};static \u0275cmp=ct({type:F_,selectors:[["cooee-video-swiper"]],viewQuery:function(t,r){if(t&1&&es(sU,5),t&2){let n;ts(n=ns())&&(r.swiperContainerRef=n.first)}},inputs:{videos:"videos",currentIndex:"currentIndex",triggerContext:"triggerContext"},outputs:{closeDialog:"closeDialog",performCTA:"performCTA"},features:[ri],decls:13,vars:0,consts:[["swiperContainer",""],["videoPlayers",""],[1,"lc:relative","lc:w-screen","lc:h-screen","lc:bg-black/70","lc:flex","lc:justify-center","lc:items-center"],[1,"swiper-container","lc:w-[70vw]","lc:h-[80vh]"],[1,"swiper-wrapper"],[1,"swiper-slide","lc:relative","lc:flex","lc:items-center",3,"ngClass"],[1,"swiper-button-prev","lc:text-white"],[1,"swiper-button-next","lc:text-white"],[1,"lc:absolute","lc:top-10","lc:right-20","lc:flex","lc:gap-2","lc:z-10"],["id","lc-close-button","tabindex","{0}",1,"lc:w-12","lc:h-12","lc:flex","lc:items-center","lc:justify-center","lc:cursor-pointer",3,"click","keydown"],["xmlns","http://www.w3.org/2000/svg","height","40px","viewBox","0 0 24 24","width","40px","fill","#FFFFFF"],["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:h-full","lc:w-full","lc:rounded-lg","lc:object-cover","lc:z-[-1]","lc:fixed",3,"autoplay","muted"],[1,"lc:h-full","lc:w-full","lc:rounded-lg","lc:object-cover","lc:z-[-1]","lc:fixed",3,"timeupdate","click","ended","autoplay","muted"],[3,"src","type","media"],[3,"src","type"],[3,"width"],[1,"lc:absolute","lc:bottom-0","lc:z-2147483646","lc:w-full"],[3,"performCTA","closeModel","item"],[1,"lc:absolute","lc:top-4","lc:right-4","lc:flex","lc:gap-2","lc:z-10"],[3,"buttonClicked","muted"],[3,"performCTA","clicked","items"]],template:function(t,r){if(t&1){let n=fn();K(0,"div",2)(1,"div",3,0)(3,"div",4),Mt(4,hU,4,5,"div",5,Lr),X(),Ne(6,"div",6)(7,"div",7),X(),K(8,"div",8)(9,"div",9),Qe("click",function(){return ze(n),qe(r.close())})("keydown",function(){return ze(n),qe(r.close())}),zn(),K(10,"svg",10),Ne(11,"path",11)(12,"path",12),X()()()()}t&2&&(Y(4),Ot(r.videos))},dependencies:[$a,Wa,Ga,za,$d],styles:[`.swiper-hide-slide{visibility:hidden!important}
78
+ `,xo=class{listen(){document.addEventListener(k.CTA_EVENT,async e=>{await this.processEvent(e)},!1)}async performAddToCart(e,t){if(!e.length)return;let r=e.map(a=>{let{vID:l,quantity:c}=this.getVIDAndQuantity(a);return{id:l?+l:+a.mID,quantity:c,properties:t.getPrivateAttributesForLineItem()}}),n=Tt.getCartURL("cart/add.js"),i={items:r},s=Kt.get();s.isMiniCart()?i.sections=["mini-cart"]:s.isShopifyDefaultDrawer()&&(i.sections=s.element.getSectionsToRender?.().map(a=>a.section??a.id));let o=JSON.stringify(i);try{let a=await fetch(n,{body:o,method:"post",headers:{"Content-Type":"application/json"}});if(a.status===200||a.status===302)return C.log(`Added ${e.length} items to Cart`),ue.showSnackbar("Product added to your cart"),a.json()}catch(a){C.error("Failed to add product in cart",a)}}async performUpdate(e,t){if(!px.JSUtils.hasKeys(t)){C.warn("No update fields provided");return}let r=Tt.getCartURL("cart/change.js"),n=w({id:e.key},t),i=JSON.stringify(n);try{let s=await fetch(r,{body:i,method:"post",headers:{"Content-Type":"application/json"}});(s.status===200||s.status===302)&&(C.log(`Updated ${e}`),Ye.getCurrent().update(s.json()))}catch(s){C.error("Failed to update item in cart",s,e)}}async performCopyCoupon(e){if(e)try{await navigator.clipboard.writeText(e),C.log(`Code-${e} copied`),ue.showSnackbar("Discount code copied")}catch(t){C.error("Failed to copy code",t)}}performGoToItem(e){if(!e?.link)return;let t=Tt.getProductSlug(e.link);t&&(location.pathname=Tt.getRootPrefix()+"products/"+t)}async upgradeToSubscription(e,t){if(!e){C.warn("Trying to upgrade to subscription with no item");return}let r=await Ye.getCurrent().getNormalisedCart(),n=e.selectedOrFirstVariant.value,i=r.items.findIndex(c=>c.vID===n.mID),s=n.selectedSellingPlan.value,o=Tt.getCartURL("cart/change.js"),a={line:i+1,selling_plan:s?.mID||null,properties:t.getPrivateAttributesForLineItem()},l=JSON.stringify(a);try{let c=await fetch(o,{body:l,method:"post",headers:{"Content-Type":"application/json"}});if(c.status===200||c.status===302){C.log(`Upgraded ${e} selling plan`),ue.showSnackbar("Line item updated");let h=await c.json();return Ye.getCurrent().update(h),h}}catch(c){C.error("Failed to update subscription for item in cart",c)}}async performCartCreate(e,t,r){let n=Pt.get().storefrontToken;if(!n)throw new Error("Storefront token not set for the store");if(!e?.vID){C.error("No variant ID found to perform Buy now",e);return}let i=t?[t]:[],s=[{merchandiseId:`gid://shopify/ProductVariant/${e.vID}`,quantity:1,attributes:r.getKVFormatPrivateAttributesForLineItem()}],o=await ue.getCartAttributes(),a=new Headers;a.append("Content-Type","application/json"),a.append("X-Shopify-Storefront-Access-Token",n);let l=JSON.stringify({query:iU,variables:{input:{lines:s,discountCodes:i,attributes:o}}});return(await Mn.getInstance().request(k.GRAPHQL_API_PATH,{method:"POST",headers:a,body:l})).data?.cartCreate?.cart?.checkoutUrl}async processEvent(e){let t=e?.detail;if(!t)return;let r=t.clickAction,n=t.items,i=t.triggerData;if(r.at){let s=r;if(C.log(`Performing ${JSON.stringify(s)} action`),s.at===101)n?.length&&this.performGoToItem(n[0]);else if(s.at===102)n?.length&&await this.performAddToCart(n,i);else if(s.at===103)await this.performCopyCoupon(i.discount.code);else if(s.at===105)Kt.get().open();else if(s.at===104){let o=t.collections;if(!o?.length)return;location.pathname=Tt.getRootPrefix()+"collections/"+o[0].handle}}r.applyDiscount&&i.discount?.code&&To.navigate(i.discount.code,i.redirectBehaviour)}getVIDAndQuantity(e){let t,r;if(e instanceof pn)t=e.vID,r=e.quantity??1;else{if(!e.vars?.length)return{};t=e.selectedOrFirstVariant.value.mID,r=1}return{vID:t,quantity:r}}},qp=class extends Ci{ctaListener=new xo;constructor(e){super(e),yi.get().subscriber(k.CART_UPDATE_BROADCAST).pipe(Ti(null)).subscribe(this.checkMilestone.bind(this))}update(e){super.update(e),this.widgetElement.update()}shouldStopRendering(){return!1}renderContainer(){if(this.widgetElement?.isConnected){this.addToRendered();return}let e=this.widgetElement=document.createElement("cooee-progressbar");e.className="cooee-root",e.cart=Ye.getCurrent(),e.engagementTrigger=this.engagementTrigger,e.setAttribute("engagement",this.engagementTrigger.shortID),this.rootContainer.appendChild(e),this.addToRendered()}async checkMilestone(){let e=await Ye.getCurrent().getNormalisedCart(),t=[...this.engagementTrigger.progressBarConfig.milestones];for(let r of t){if(e.amount<r.minValue)break;if(C.log("Current milestone",r),r.rewardType===hx.MilestoneRewardType.FREE_AUTO_GIFT){let n=r.items[0],i=e.items.find(s=>s.vID===n.vID||s.mID===n.mID);if(i)C.log(`Item(vID:${n.vID}) already present in the cart. Updating item's properties`),await this.ctaListener.performUpdate(i,{properties:this.engagementTrigger.getPrivateAttributesForLineItem()});else{let s=await this.ctaListener.performAddToCart([n],this.engagementTrigger);Kt.get().refreshUI(s,!1)}}}}async removeOtherFreeGifts(e){let t=(await Ye.getCurrent().getNormalisedCart()).items.filter(r=>r.vID!==e?.vID&&r.properties[k.CAMPAIGN_ATTRIBUTE]===this.engagementTrigger.shortID);if(t.length)for(let r of t)await this.ctaListener.performUpdate(r,{quantity:0})}},Yp=class extends Xn{constructor(e){super(e)}shouldStopRendering(){return!1}renderContainer(){if(this.widgetElement?.isConnected){this.addToRendered();return}let e=this.widgetElement=document.createElement("cooee-shoppable-videos");e.className="cooee-root",e.triggerContext=this.triggerContext,e.addEventListener("sendEvent",t=>{let r=t.detail;this.safeHTTPService.sendEvent(r)}),e.setAttribute("engagement",this.engagementTrigger.shortID),this.rootContainer.appendChild(e),this.addToRendered()}},mx=Be(Ea()),Kp=class extends Xn{constructor(e){super(e)}shouldStopRendering(){return!1}renderContainer(){let e=this.getParentElement(`inner-letscooee-${this.engagementTrigger.shortID}`);this.rootContainer.appendChild(e),document.addEventListener(k.ADD_BUNDLE_CTA_INBOUND_EVENT,this.inboundCTAListener.bind(this),!1)}async inboundCTAListener(e){let t=this.engagementTrigger,r=`Engagement(id: ${t.engagementID}, shortID: ${t.shortID})`,n=e.detail;if(!mx.JSUtils.hasKeys(n)){C.error(`No detail received for ${r}`);return}C.log("Detail received for BYOB",n);let i=n.campaignID??n.campaignId??n.campaign_id;if(i!==t.shortID&&i!==t.engagementID){C.warn(`Current ${r} is not BYOB. Received: ${i}`);return}let s=n.items;if(!s?.length)return;let o=s.map(a=>new pn({mID:a.product_id,vID:a.variant_id,quantity:a.quantity||1}));await new Do(this.triggerContext).execute({embeddedItems:o,clickAction:{at:108,applyDiscount:!0}})}},gc=class{runtimeData=Pe.get();processCartWidgetResponse(e){this.runtimeData.isCartDirty=!1,this.runtimeData.cartEngagements=e;let t=[...Ci.renderedEngagements];Ci.renderedEngagements.length=0;for(let r of e)C.log(`\u{1F4E3} ${r} received as cart embed`),!this.findAndUpdateCurrent(r,t)&&(C.log(`${r} is new`),r.isProgressBar()?new qp(r).renderSilently():r.isSubscriptionUpsell()?zp.renderCartUpsell(r):new Ci(r).renderSilently());this.removeOldWidgets(t)}processPageWidgetResponse(e){let t=[...Xn.renderedEngagements];Xn.renderedEngagements.length=0;for(let r of e)C.log(`\u{1F4E3} ${r} received as page embed`),!this.findAndUpdateCurrent(r,t)&&(C.log(`${r} is new`),r.isShoppableVideo()?new Yp(r).renderSilently():r.isBYOB()?new Kp(r).renderSilently():new Xn(r).renderSilently());this.removeOldWidgets(t)}findAndUpdateCurrent(e,t){let r=t.findIndex(n=>n.isSameTrigger(e));return r<0||e.isSubscriptionUpsell()?!1:(t[r].update(e),t[r].renderSilently(),t.splice(r,1),!0)}removeOldWidgets(e){for(let t of e)t.destroy()}},vc=class{runtimeData=Pe.get();httpService=xe.get(Mn);sessionManager=xe.get(Zt);constructor(){}async getWidgetProps(){let e={};e.engagementIDs=this.addAvailableEngagementShortIDs(),e.locale=this.runtimeData.locale,await this.addSessionContext(e),e.currentItem=this.runtimeData.getCurrentItem();try{e.cart=await Ye.getCurrent().getNormalisedCart()}catch(i){C.error("Error fetching Shopify cart before sending widget call",i)}let t=new URLSearchParams(location.search),r=t.get("cooee-preview");r?e.previewIDs=r.trim().split(",").filter(i=>Number.isInteger(+i)):this.runtimeData.previewIDs?.length&&(e.previewIDs=this.runtimeData.previewIDs);let n=t.get("cooee-variant");return n?e.previewVariant=n:this.runtimeData.previewVariant&&(e.previewVariant=this.runtimeData.previewVariant),e}async addSessionContext(e){let t=await this.sessionManager.checkSessionAndGetContext();e.sessionID=t[0],e.sessionNumber=t[1],e.landingPage=t[2],e.page=vi.parseFromCurrent()}addAvailableEngagementShortIDs(){let e=document.querySelectorAll(".letscooee-engagement"),t=[];return e.forEach(r=>{let n=r.dataset.engagementId;n&&+n&&t.push(n)}),t}},Wr=class Q0 extends vc{static INSTANCE;loadWidgetsSubject=new ie;constructor(){super(),this.loadWidgetsSubject.pipe(Rr(300)).subscribe(()=>{this.loadCartWidgets().catch(t=>C.error("Unable to initiate cart widgets",t)),this.loadPageWidgets().catch(t=>C.error("Unable to initiate page widgets",t))}),yi.get().subscriber(k.CART_UPDATE_BROADCAST).subscribe(()=>this.loadWidgetsSubject.next())}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Q0),this.INSTANCE}loadOrRenderWidgetsAfterCartChange(){this.runtimeData.isCartDirty?this.loadWidgetsSilently():this.renderCachedCartWidgets()}loadPageWidgetsSilently(){Zt.replaySubject.subscribe(async()=>{this.loadPageWidgets().catch(t=>C.error("Unable to initiate load page widgets",t))})}loadCartWidgetsSilently(){Zt.replaySubject.subscribe(async()=>{this.loadCartWidgets().catch(t=>C.error("Unable to initiate cart widgets",t))})}loadWidgetsSilently(){Zt.replaySubject.subscribe(async()=>{this.loadWidgetsSubject.next()})}async loadPageWidgets(){let t=await this.getWidgetProps();C.log("Load widgets",t),this.httpService.post("/v1/engagement/page-widgets",t).then(async r=>{let n=r.widgets.map(i=>new Hn(i));new gc().processPageWidgetResponse(n)}).catch(r=>{C.error("Error sending widget getter",r)})}async loadCartWidgets(){let t=await this.getWidgetProps();C.log("Load cart widgets",t),this.httpService.post("/v1/engagement/cart-widgets",t).then(async r=>{let n=r.widgets.map(i=>new Hn(i));new gc().processCartWidgetResponse(n)}).catch(r=>{C.error("Error sending widget getter",r)})}async getVariation(t){let r=await this.getWidgetProps();return this.httpService.post("/v1/engagement/get-variant",w(w({},t),r))}renderCachedCartWidgets(){new gc().processCartWidgetResponse(this.runtimeData.cartEngagements)}},Zp=class{eventAPIService;constructor(){this.eventAPIService=xe.get(Ro)}processResponse(e){for(let t of e)t.experiment?.cssSelector&&this.runExperiment(t)}async runExperiment(e){if(!e.experiment?.cssSelector){C.error("No CSS selector present in experiment",e.toString);return}let t;try{t=await ue.retrySelectors(e.experiment.cssSelector)}catch{C.error("Fail to get CSS selector for experiment",e.toString());return}if(t?.length){for(let r of t)if(e.experiment.op==="SHOW")r.style.display="block";else if(e.experiment.op==="HIDE")r.style.display="none";else{C.error("Invalid experiment operation",e.toString);return}this.eventAPIService.trackExperiment({name:k.EVENT_EXPERIMENT_START,experiment:new yo(e)}).catch(r=>{C.error("Fail to track experiment",r)})}}},Ro=class kE extends vc{static INSTANCE;constructor(){super()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new kE),this.INSTANCE}loadExperimentSilently(){st.get(ge.SDK_TOKEN).then(t=>{t?this.loadExperiments().catch(r=>C.error("Unable to initiate experiment",r)):Zt.replaySubject.subscribe(async()=>{this.loadExperiments().catch(r=>C.error("Unable to initiate experiment",r))})})}async loadExperiments(){if(!this.runtimeData.activeExperiment)return;let t=await this.getWidgetProps();C.log("Load experiments",t),this.httpService.post("/v1/engagement/experiments",t).then(async r=>{let n=r.experiments.map(i=>new Hn(i));new Zp().processResponse(n)}).catch(r=>{C.error("Error sending experiment getter",r)})}async trackExperiment(t){await this.addSessionContext(t),await this.httpService.post("/v1/event/experiment",t)}},Xp=class{runtimeData=Pe.get();widgetAPIService=xe.get(Wr);experimentAPIService=xe.get(Ro);meddle(){let e=wt.globalRef;e.account=e.account??[],e.profile=e.profile??[],e.events=e.events??[],e.screen=e.screen??[],e.page=e.page??[],this.meddlePage(),this.meddleAccount(),this.meddleEvents(),this.meddleProfile(),this.meddleScreen(),this.exposeMethods()}exposeMethods(){let e=wt.globalRef;e.loadPageWidgets=()=>{this.widgetAPIService.loadPageWidgetsSilently()},e.loadCartWidgets=()=>{this.widgetAPIService.loadCartWidgetsSilently()},e.loadExperiments=()=>{this.experimentAPIService.loadExperimentSilently()},e.previewWidget=wt.previewWidget.bind(wt),e.previewPopup=wt.previewPopup.bind(wt)}overwritePush(e,t){Na(e,"push",t)}meddleAccount(){this.overwritePush(wt.globalRef.account,(...e)=>{this.processAccount(e[0])}),wt.globalRef.account.forEach(this.processAccount.bind(this))}meddleEvents(){this.overwritePush(wt.globalRef.events,(...e)=>{this.processEvent(e[0])}),wt.globalRef.events.forEach(this.processEvent.bind(this))}meddleProfile(){this.overwritePush(wt.globalRef.profile,(...e)=>{this.processProfile(e[0])}),wt.globalRef.profile.forEach(this.processProfile.bind(this))}meddleScreen(){this.overwritePush(wt.globalRef.screen,(...e)=>{this.processPageName(e[0])}),wt.globalRef.screen.forEach(this.processPageName.bind(this))}processAccount(e){e&&(e.appID&&wt.authenticate(e),e.flags&&Os.setFlags(e.flags))}processEvent(e){e&&(k.JS_LOAD_WHITELIST_EVENTS.includes(e[0])?wt.sendEvent(e[0],e[1],w({occurred:this.runtimeData.jsLoadTime},e[2])):wt.sendEvent(e[0],e[1],e[2]))}processProfile(e){e&&wt.updateProfile(e)}processPageName(e){e&&wt.setPageName(e)}meddlePage(){this.overwritePush(wt.globalRef.page,(...e)=>{this.processPage(e[0])}),wt.globalRef.page.forEach(this.processPage.bind(this))}processPage(e){e.currentItem&&this.runtimeData.setCurrentItem(e.currentItem),e.currency&&(this.runtimeData.currencyCode=e.currency),e.shopCurrency&&(this.runtimeData.shopCurrencyCode=e.shopCurrency),e.moneyFormat&&(this.runtimeData.moneyFormat=e.moneyFormat),e.jsLoad&&(this.runtimeData.jsLoadTime=e.jsLoad),e.locale&&(this.runtimeData.locale=e.locale),e.pageName&&wt.setPageName(e.pageName),e.activeExperiment&&(this.runtimeData.activeExperiment=e.activeExperiment)}},yc=class{static SESSION_STORAGE=window.sessionStorage;static SESSION_STORAGE_KEY_PREFIX=k.COOEE.concat("-");static getString(e,t){return this.getItem(e)||t}static setString(e,t){this.setItem(e,t)}static remove(e){this.removeItem(e)}static getItem(e){return this.SESSION_STORAGE.getItem(this.SESSION_STORAGE_KEY_PREFIX.concat(e))}static setItem(e,t){this.SESSION_STORAGE.setItem(this.SESSION_STORAGE_KEY_PREFIX.concat(e),t)}static removeItem(e){this.SESSION_STORAGE.removeItem(this.SESSION_STORAGE_KEY_PREFIX.concat(e))}},_c=class uu{static INSTANCE;static DEBOUNCE_TIME=1e3;static THRESHOLD=10;safeHttpService=xe.get(Ue);_lastScreenOrScroll=new Date;lastPercent=0;constructor(){}set lastScreenOrScroll(t){this._lastScreenOrScroll=t}static getInstance(){return this.INSTANCE||(this.INSTANCE=new uu),this.INSTANCE}resetScrollID(t){yc.remove(k.SESSION_STORAGE_SCROLL_ID),this.lastScreenOrScroll=t??new Date}listen(){if(window.scrollY){let t=this.getPercentScrolledY();this.shouldSendScroll(t)&&this.sendScroll(t)}ue.onDocumentLoaded(()=>{this.observeWindowScroll()})}observeWindowScroll(){Bo(window,"scroll").pipe(Rr(uu.DEBOUNCE_TIME),ur(()=>{let t=this.getPercentScrolledY();if(t>100){C.warn("Received scroll percent is more than 100",t);return}if(this.shouldSendScroll(t))return t})).subscribe(t=>{this.sendScroll(t)})}shouldSendScroll(t){return Math.abs(this.lastPercent-t)>=uu.THRESHOLD||this.lastPercent!==t&&t===100}sendScroll(t){if(t==null)return;let r={percent:t,timeMS:new Date().getTime()-this._lastScreenOrScroll.getTime()};this.lastPercent=t;let n=yc.getString(k.SESSION_STORAGE_SCROLL_ID,""),i=new ke(k.EVENT_SCROLL,r,null,n);this.safeHttpService.sendEvent(i),yc.setString(k.SESSION_STORAGE_SCROLL_ID,i.id.toHexString()),this._lastScreenOrScroll=new Date(i.occurred)}getPercentScrolledY(){let t=window.document.body.scrollHeight,r=window.innerHeight;return Math.ceil((window.scrollY+r)/t*100)}},Jp=class LE{static ACTIVE_DURATION="aDur";static INACTIVE_DURATION="iaDur";apiService=xe.get(Ue);runtimeData=Pe.get();listen(){document.onvisibilitychange=()=>{document.visibilityState==="visible"?this.onVisible():document.visibilityState==="hidden"&&this.onHidden()}}async onVisible(){}async onHidden(){let t=await this.runtimeData.setInactive();if(t===0){C.info("Not sending background event as user was inactive on website");return}C.info(`Sending background event with ${t} seconds`);let r={};r[LE.ACTIVE_DURATION]=t,this.apiService.sendEvent(new ke(k.EVENT_APP_BACKGROUND,r))}},Qp=class{loadedFonts=[];async loadAllFonts(e){e.elems?.forEach(t=>{t instanceof bi&&this.loadFamily(t.typography?.fam)})}async loadFamily(e){if(!e?.fonts||this.loadedFonts.indexOf(e.name)>-1)return;let t=[];e.fonts.forEach(r=>{if(r.url){let n=new FontFace(k.COOEE+e.name,r.getURL(),r.getFontDescriptor());t.push(n.load())}}),this.loadedFonts.push(e.name),(await Promise.all(t)).forEach(r=>{document.fonts.add(r)})}},eh=class{static updateIdentity(e){if(!this.isInstalled())return;let t={};e.email&&(t.email=e.email),e.mobile&&(t.phone_number=e.mobile),C.debug("Sending email/mobile to Klaviyo"),window.klaviyo.push(["identify",t])}static isInstalled(){return window.klaviyo&&typeof window.klaviyo=="object"}},th=class{apiService;action;triggerContext;constructor(e,t){this.action=e,this.apiService=Ue.getInstance(),this.triggerContext=t}async execute(){let e=this.containsCTA()?k.EVENT_TRIGGER_CLICKED:k.EVENT_TRIGGER_CLOSED;switch(this.action.at!==106&&this.closeTriggerAndSendEvent(e),this.action.at){case 2:break;case 4:this.gotoURLAction();break;case 5:this.shareAction();break;case 106:this.collectFormData();break;case void 0:case 105:break;default:C.error("Received an invalid ClickActionType: ",this.action.at);return}}externalAction(){this.action.ext?.u&&window.open(this.action.ext.u,"_blank")?.focus()}gotoURLAction(){if(this.action.gu?.u){let e=this.action.gu.u;ue.isValidURL(e)||(e=`//${e}`),window.open(e,"_self")}}prompt(){let e=this.action.pmpt;e&&(e===2&&this.promptLocationPermission(),e===3&&this.promptPushNotificationPermission(),e===1&&this.promptCameraPermission())}closeTriggerAndSendEvent(e,t){this.triggerContext.closeInApp(e,t),this.dispatchEvent()}shareAction(){if(this.action.share){if(!navigator.share){C.warn("Navigator.share is not compatible with this browser");return}navigator.share({text:this.action.share.text,title:"Share"}).then(e=>console.log(e)).catch(e=>console.error(e))}}containsCTA(){return this.action.at&&this.action.at!==1?!0:!(this.isEmpty(this.action.custKV)&&this.isEmpty(this.action.up))}isEmpty(e){return e?Object.keys(e).length===0:!0}promptLocationPermission(){!navigator.geolocation||!navigator.permissions||navigator.geolocation.getCurrentPosition(e=>{this.apiService.updateDeviceProps({coords:[e.coords.latitude,e.coords.longitude]}),this.sendPermissionData()})}promptPushNotificationPermission(){if(!("Notification"in window)){C.warn("This browser does not support desktop notification");return}if(Notification.permission!=="default"){this.apiService.updateDeviceProps({pnPerm:Notification.permission});return}Notification.requestPermission().then(()=>{this.sendPermissionData()})}promptCameraPermission(){navigator.mediaDevices&&navigator.mediaDevices.getUserMedia({video:!0}).finally(()=>{this.sendPermissionData()})}checkPermission(e){return navigator.permissions.query({name:e}).then(t=>t.state.toString())}async checkAllPermission(){let e=await this.checkPermission("camera"),t=await this.checkPermission("geolocation"),r=Notification.permission;return{camera:e,location:t,notification:r}}sendPermissionData(){this.checkAllPermission().then(e=>{this.apiService.updateDeviceProps({perm:e})})}collectFormData(){let e={};for(let t of this.triggerContext.inputs){if(!t.isValid)return;let r=document.getElementById(t.id).value;t.type===51?e.email=r:t.type===52&&(e.mobile=r)}this.closeTriggerAndSendEvent(k.EVENT_FORM_SUBMITTED,{form:e}),ue.showSnackbar("Coupon applied on cart"),eh.updateIdentity(e)}dispatchEvent(){let e=this.triggerContext.triggerData,t={clickAction:this.action,items:this.triggerContext.selectedEmbeddedItems??e.embeddedItems??e.items,collections:e.collections,triggerData:e};document.dispatchEvent(new CustomEvent(k.CTA_EVENT,{detail:t}));let r={action:this.containsCTA()?k.CAMPAIGN_CLICKED_ACTIVITY:k.CAMPAIGN_CLOSED_ACTIVITY};document.dispatchEvent(new CustomEvent(k.POPUP_ACTIVITY_EVENT,{detail:r}))}},Dr=class{renderer=rr.get();parentHTMLEl;inappElement;inappHTMLEl;triggerContext;stylesConverter;scalingFactor;constructor(e,t,r){this.parentHTMLEl=e,this.inappElement=t,this.triggerContext=r,this.stylesConverter=new hc(this.renderer.getScalingFactor())}getHTMLElement(){return this.inappHTMLEl}insertElement(){this.renderer.appendChild(this.parentHTMLEl,this.inappHTMLEl)}processCommonBlocks(){this.processWidthAndHeight(),this.processPositionBlock(),this.processTransformBlock(),this.processTransparency(),this.processShadow(),this.registerAction();let e=re(w(w(w(w({},this.getDisplayStyles()),this.getSpaceStyles()),this.getBorderStyles()),this.getBackgroundStyles()),{boxSizing:"border-box",outline:"none"});this.renderer.setStyles(this.inappHTMLEl,e)}getDisplayStyles(){return{display:"block"}}processWidthAndHeight(){this.inappElement.w&&this.renderer.setStyle(this.inappHTMLEl,"width",this.stylesConverter.getSizePx(this.inappElement.w)),this.inappElement.h&&this.renderer.setStyle(this.inappHTMLEl,"height",this.stylesConverter.getSizePx(this.inappElement.h))}processPositionBlock(){let e={position:"absolute",left:this.stylesConverter.getSizePx(this.inappElement.x),top:this.stylesConverter.getSizePx(this.inappElement.y)};this.renderer.setStyles(this.inappHTMLEl,e)}getBorderStyles(){return this.stylesConverter.getBorderStyles(this.inappElement.br)}getSpaceStyles(){return this.stylesConverter.getSpaceStyles(this.inappElement.spc)}processTransparency(){let e=this.inappElement.alpha;if(!isNaN(e)){let t=(e/100).toFixed(2);this.renderer.setStyle(this.inappHTMLEl,"opacity",t)}}processShadow(){let e=this.inappElement.shd;e?this.renderer.setStyle(this.inappHTMLEl,"box-shadow",e.getStyle(this.scalingFactor)):this.renderer.setStyle(this.inappHTMLEl,"box-shadow","unset")}processTransformBlock(){let e=new Rs(this.inappElement.trf);e&&e.rotate&&this.renderer.setStyle(this.inappHTMLEl,"transform",`rotate(${e.rotate}deg)`)}registerAction(){let e=this.inappElement.clc;!e||Object.keys(e).length===0||(this.inappHTMLEl.addEventListener("click",t=>{t.stopPropagation(),new th(e,this.triggerContext).execute()}),this.renderer.setStyle(this.inappHTMLEl,"cursor","pointer"))}getBackgroundStyles(){return this.stylesConverter.getBackgroundStyles(this.inappElement.bg)}},Si=class extends Dr{constructor(e,t,r){super(e,t,r)}processCommonBlocks(){super.processCommonBlocks(),this.processFontBlock(),this.processAlignment()}processFontBlock(){let e={},t=this.inappElement.typography;return t&&(e.fontSize=this.stylesConverter.getSizePx(t.fs),e.fontFamily=k.COOEE+t.fam?.name,e.lineHeight=`${t.lh}`,e.letterSpacing=t.letterSpacing),this.stylesConverter.getColourStyles(this.inappElement.color,"color",e),this.renderer.setStyles(this.inappHTMLEl,e),e}processPart(e,t){let r=[];t.u&&r.push("underline"),t.st&&r.push("line-through"),r.length||r.push("normal"),this.renderer.setStyle(e,"font-weight",t.b?"bold":"normal"),this.renderer.setStyle(e,"font-style",t.i?"italic":"normal"),this.renderer.setStyle(e,"text-decoration",r.join(" ")),this.renderer.setStyle(e,"color",t.c??"inherit"),this.renderer.setStyle(e,"font-family","inherit")}processAlignment(){let e=this.inappElement.typography.ta,t=e?ec[e]?.toLowerCase():this.inappElement.typography.alignment;t||(t="start"),this.renderer.setStyle(this.inappHTMLEl,"text-align",t)}},nu=class extends Si{constructor(e,t,r){super(e,t,r),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.inappElement.parts?.forEach(e=>{let t=this.renderer.createElement("span");t.innerHTML=e.txt?.toString()?.replace(/\n/g,"<br />"),this.processPart(t,e),this.renderer.appendChild(this.inappHTMLEl,t)}),this.processCommonBlocks()}},ru=class extends Dr{constructor(e,t,r){super(e,t,r),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.processCommonBlocks()}},Fs=class extends Dr{constructor(e,t,r){super(e,t,r),this.inappHTMLEl=this.renderer.createElement("img"),this.insertElement()}render(){this.renderer.setAttribute(this.inappHTMLEl,"src",this.inappElement.src),this.renderer.setStyle(this.inappHTMLEl,"max-width","none"),this.renderer.setStyle(this.inappHTMLEl,"max-height","none"),this.renderer.setStyle(this.inappHTMLEl,"margin","0 auto"),this.processCommonBlocks()}},iu=class VE extends Dr{constructor(t,r,n){super(t,r,n),this.parent=t,this.inappHTMLEl=this.renderer.createElement("div")}static MAX_Z_INDEX="2147483647";render(){return this.parent||this.renderer.removeInApp(this.triggerContext),this.insertElement(),this.processCommonBlocks(),this.inappHTMLEl.classList.add(k.IN_APP_WRAPPER_NAME),this.inappHTMLEl.classList.add(this.triggerContext.rootClassName),this.renderer.setStyle(this.inappHTMLEl,"z-index",VE.MAX_Z_INDEX),this.inappHTMLEl}getBackgroundStyles(){return this.inappElement.cover?super.getBackgroundStyles():{}}processWidthAndHeight(){let t=this.inappElement.cont;if(this.inappElement.cover)this.renderer.isParentNotBody()?(this.renderer.setStyle(this.inappHTMLEl,"width","100%"),this.renderer.setStyle(this.inappHTMLEl,"height","100%")):(this.renderer.setStyle(this.inappHTMLEl,"width","100vw"),this.renderer.setStyle(this.inappHTMLEl,"height","100vh")),this.renderer.setStyle(this.inappHTMLEl,"top","0"),this.renderer.setStyle(this.inappHTMLEl,"left","0");else{let r=this.inappElement.spc,n=this.stylesConverter.getScaledSize(t.w)+r.getHorizontal(),i=this.stylesConverter.getScaledSize(t.h)+r.getVertical();this.renderer.setStyle(this.inappHTMLEl,"width",n+"px"),this.renderer.setStyle(this.inappHTMLEl,"height",i+"px")}}getSpaceStyles(){return{padding:this.inappElement.spc.getPaddingCSS()}}getDisplayStyles(){return w(w({display:"flex"},this.inappElement.getStylesForWrapper()),this.inappElement.getFlexStylesForContainer())}processPositionBlock(){if(this.renderer.isParentNotBody()){if(this.triggerContext.triggerData.ian?.isEmbedded()){this.renderer.setStyle(this.inappHTMLEl,"position","block");return}this.renderer.setStyle(this.inappHTMLEl,"position","absolute")}else this.renderer.setStyle(this.inappHTMLEl,"position","fixed")}getBorderStyles(){return{}}processTransparency(){}processTransformBlock(){}processShadow(){}},nh=class extends Dr{constructor(e,t,r){super(e,t,r),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){return this.processCommonBlocks(),this.renderer.setStyle(this.inappHTMLEl,"position","relative"),this.renderer.setStyle(this.inappHTMLEl,"overflow","hidden"),this.inappHTMLEl.classList.add(k.IN_APP_CONTAINER_NAME),this}},Ec=class extends Si{borderColor="";constructor(e,t,r){super(e,t,r),this.inappHTMLEl=this.renderer.createElement("input"),this.insertElement()}render(){let e=this.setInputType();this.renderer.setAttribute(this.inappHTMLEl,"placeholder",this.inappElement.placeholderText),this.renderer.setStyle(this.inappHTMLEl,"background","#ffffff00"),this.renderer.setStyle(this.inappHTMLEl,"outline","none"),this.inappHTMLEl.addEventListener("click",t=>{t.stopPropagation()}),this.processCommonBlocks(),this.addListener(this.inappHTMLEl,e),this.triggerContext.addInputField(e,this.inappElement.t)}},rh=class UE extends Ec{static EMAIL_REGEX=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;constructor(t,r,n){super(t,r,n)}setInputType(){let t=`coo-${this.inappElement.t}`;return this.renderer.setAttribute(this.inappHTMLEl,"type","email"),this.renderer.setAttribute(this.inappHTMLEl,"id",t),t}addListener(t,r){t.addEventListener("keydown",n=>{this.borderColor||(this.borderColor=this.inappHTMLEl.style.borderColor),t.value.match(UE.EMAIL_REGEX)?(this.renderer.setStyle(this.inappHTMLEl,"border-color",this.borderColor),this.triggerContext.updateValidation(r,!0)):(this.renderer.setStyle(this.inappHTMLEl,"border-color","red"),this.triggerContext.updateValidation(r,!1)),n.stopPropagation()})}},ih=class BE extends Ec{static MOBILE_REGEX=/^\d+$/;constructor(t,r,n){super(t,r,n)}setInputType(){let t=`coo-${this.inappElement.t}`;return this.renderer.setAttribute(this.inappHTMLEl,"type","tel"),this.renderer.setAttribute(this.inappHTMLEl,"id",t),t}addListener(t,r){t.addEventListener("keydown",n=>{this.borderColor||(this.borderColor=this.inappHTMLEl.style.borderColor),t.value.match(BE.MOBILE_REGEX)?(this.renderer.setStyle(this.inappHTMLEl,"border-color",this.borderColor),this.triggerContext.updateValidation(r,!0)):(this.renderer.setStyle(this.inappHTMLEl,"border-color","red"),this.triggerContext.updateValidation(r,!1)),n.stopPropagation()})}},oh=class Ji extends Si{static DAYS="Days";static HOURS="Hours";static MINUTES="Minutes";static SECONDS="Seconds";elements;spans=[];constructor(t,r,n){super(t,r,n),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.addTimerChildren(),this.processAndStartTimer(),this.processCommonBlocks();let t=re(w(w(w({flex:"1 1 0"},this.stylesConverter.getBackgroundStyles(this.inappElement.bg)),this.stylesConverter.getBorderStyles(this.inappElement.br)),this.stylesConverter.getSpaceStyles(this.inappElement.spc)),{marginLeft:this.stylesConverter.getSizePx(this.inappElement.gap),marginRight:this.stylesConverter.getSizePx(this.inappElement.gap)});this.addStylesToTimer(t)}getBackgroundStyles(){return{}}processFontBlock(){let t=super.processFontBlock();return this.stylesConverter.getColourStyles(this.inappElement.color,"color",t),this.addStylesToTimer(t),t}getSpaceStyles(){return{}}getBorderStyles(){return{}}getDisplayStyles(){return{display:"flex",flexWrap:"nowrap",justifyContent:"center"}}addStylesToTimer(t){this.elements.forEach(r=>this.renderer.setStyles(r,t))}addTimerChildren(){let t=this.inappElement.show;this.elements=[],t.day&&this.elements.push(this.getChild(Ji.DAYS)),t.hour&&this.elements.push(this.getChild(Ji.HOURS)),t.minute&&this.elements.push(this.getChild(Ji.MINUTES)),t.second&&this.elements.push(this.getChild(Ji.SECONDS)),this.elements.forEach(r=>this.inappHTMLEl.appendChild(r))}getChild(t){let r=this.renderer.createElement("div"),n=this.renderer.createElement("span"),i=this.renderer.createElement("span");return i.innerText=t,n.innerText="00",n.id=`lc-${t}`,this.renderer.setStyle(i,"font-size","0.5em"),this.renderer.setStyle(i,"text-align","center"),this.renderer.setStyle(i,"font-family","inherit"),this.renderer.setStyle(n,"text-align","center"),this.renderer.setStyle(n,"font-family","inherit"),this.inappElement.lblPos==="start"?(r.appendChild(i),r.appendChild(n)):(r.appendChild(n),r.appendChild(i)),this.renderer.setStyle(r,"display","flex"),this.renderer.setStyle(r,"flex-direction",this.inappElement.horizontal?"":"column"),this.renderer.setStyle(r,"justify-content","center"),this.renderer.setStyle(r,"align-items","center"),this.renderer.setStyle(r,"gap","5px"),this.spans.push(n),r}processAndStartTimer(){let t=this.inappElement.timer.start(this.inappElement.timerType,r=>{this.spans.forEach(n=>{n.id===`lc-${Ji.DAYS}`?n.innerText=String(r.days).padStart(2,"0"):n.id===`lc-${Ji.HOURS}`?n.innerText=String(r.hours).padStart(2,"0"):n.id===`lc-${Ji.MINUTES}`?n.innerText=String(r.minutes).padStart(2,"0"):n.id===`lc-${Ji.SECONDS}`&&(n.innerText=String(r.seconds).padStart(2,"0"))})});this.triggerContext.intervals.push(t)}},sh=class extends Si{constructor(e,t,r){super(e,t,r),this.inappHTMLEl=this.renderer.createElement("select"),this.insertElement()}render(){this.renderer.setStyle(this.inappHTMLEl,"background","#ffffff00"),this.renderer.setStyle(this.inappHTMLEl,"outline","none"),this.processCommonBlocks(),this.addListener(this.inappHTMLEl),this.addOptions()}addListener(e){this.triggerContext.selectedEmbeddedItems?.length||this.updateItems(this.triggerContext.triggerData.items[0].vars[0]),e.addEventListener("click",t=>{t.stopPropagation()}),e.addEventListener("change",()=>{let t=new wi(JSON.parse(e.value));this.updateItems(t)})}updateItems(e){let t=this.triggerContext.triggerData.items[0];this.triggerContext.selectedEmbeddedItems=[t.toEmbed(e)];let r=this.parentHTMLEl.querySelector("#coo-13");if(!r)return;let n=e.imgs[0]??t.imgs?.at(0);n?.url&&r.setAttribute("src",n.url)}addOptions(){let e=this.triggerContext.triggerData.items,t=this.inappHTMLEl;if(!e?.length){t.add(this.createOption(this.inappElement.placeholderText));return}let r=this.triggerContext.selectedEmbeddedItems?.at(0);e[0].vars.forEach(n=>{t.add(this.createOption(n.name??"Default",n,n.mID===r?.vID))})}createOption(e,t,r){let n=this.renderer.createElement("option");return n.text=e,n.value=JSON.stringify(t),r&&(n.selected=!0),t||(n.disabled=!0),n}},ah=class extends Fs{constructor(e,t,r){super(e,t,r)}render(){super.render(),this.inappHTMLEl.setAttribute("id",`coo-${this.inappElement.type}`)}},wc=class Ic{static ACTIVE_TRIGGER_DATA;renderer=rr.get();safeHTTP;parent;rootContainer;containerHTMLElement;ian;triggerContext;resizeListener;cartDrawerToggleSubscription;constructor(t){this.safeHTTP=Ue.getInstance(),this.resizeListener=()=>this.screenResized(),this.setParentContainer(t)}setParentContainer(t){this.parent=t??document.body,this.renderer.setParentContainer(this.parent)}render(t){this.renderEngagement(new Hn(t))}async renderEngagement(t){if(this.triggerContext=new fc(new Date,t),this.triggerContext.onClose(r=>{this.closeInApp(r)}),this.ian=t.ian,(this.renderer.isMobile()||t.previewType==="mobile")&&this.ian.overrideForMobileView(),this.ian.isEmbedded()){let r=document.querySelector(this.ian.getEmbeddedSelector());this.setParentContainer(r)}await this.preloadImages(t),t.shouldDelay()?window.setTimeout(()=>{this.withCartDrawerClosed()},t.getDelaySeconds()):this.withCartDrawerClosed()}withCartDrawerClosed(){if(!Kt.get().isOpen()||!this.renderer.isMobile()){this.startRenderingOnce();return}this.cartDrawerToggleSubscription=Kt.get().onToggle().subscribe(({open:t})=>{!t&&this.startRenderingOnce()})}startRenderingOnce(){if(!this.shouldSkipCampaign()){Ic.ACTIVE_TRIGGER_DATA=this.triggerContext.triggerData;try{this.startRendering()}catch(t){Ct.getInstance().captureException(t,{triggerData:JSON.stringify(this.triggerContext.triggerData)});return}this.sendTriggerDisplayed(),this.renderer.isMobile()||window.addEventListener("resize",this.resizeListener),this.cartDrawerToggleSubscription?.unsubscribe()}}shouldSkipCampaign(){let t=this.triggerContext.triggerData;if(!t.previewType&&Ic.ACTIVE_TRIGGER_DATA){let n={triggerShown:new yo(Ic.ACTIVE_TRIGGER_DATA??{})};return this.skipTrigger(t,n),!0}if(Pe.get().isGoKwikPopupOpen)return this.skipTrigger(t,{reason:"GoKwik popup is open"}),!0;let r=k.PAYMENT_MODAL_DETAILS.find(n=>!!document.querySelector(n.identifier));return r?(this.skipTrigger(t,{reason:`${r.gateway} modal is open`}),!0):!1}startRendering(){this.renderer.calculateScalingFactor(this.ian),this.rootContainer=new iu(this.parent,this.ian,this.triggerContext).render();try{this.renderContainer(this.triggerContext)}catch(t){throw C.error(t),t}}sendTriggerDisplayed(){let t={};this.triggerContext.triggerData.items?.length&&(t.promotedMIDs=this.triggerContext.triggerData.items?.map(i=>i.mID));let r=new ke(k.EVENT_TRIGGER_DISPLAYED,t,this.triggerContext.triggerData);this.safeHTTP.sendEvent(r);let n={action:k.CAMPAIGN_DISPLAYED_ACTIVITY};document.dispatchEvent(new CustomEvent(k.POPUP_ACTIVITY_EVENT,{detail:n}))}sendTriggerClosed(t){let r=t.eventName;delete t.eventName;let n=new ke(r,t,this.triggerContext.triggerData);n.name===k.EVENT_TRIGGER_CLICKED&&(n.items=this.triggerContext.selectedEmbeddedItems??this.triggerContext.triggerData.items?.map(i=>i.toEmbed())),this.safeHTTP.sendEvent(n)}addEnterAnimation(t){this.containerHTMLElement.animate(t.getEnterAnimation(),{duration:500})}renderElement(t,r,n){r instanceof ic?new rh(t,r,n).render():r instanceof oc?new ih(t,r,n).render():r instanceof Eo?new nu(t,r,n).render():r instanceof sc?new ah(t,r,n).render():r instanceof qi?new Fs(t,r,n).render():r instanceof Ns?new ru(t,r,n).render():r instanceof nc?new oh(t,r,n).render():r instanceof rc?new sh(t,r,n).render():C.error("Unsupported element type- "+r.type)}renderContainer(t){let r=this.ian?.cont;r&&(this.containerHTMLElement=new nh(this.rootContainer,r,t).render().getHTMLElement(),new Qp().loadAllFonts(this.ian),this.ian.elems?.forEach(async n=>{await this.renderElement(this.containerHTMLElement,n,t)}),this.addEnterAnimation(this.ian.anim))}closeInApp(t){let r=this.ian.anim.getExitAnimation();this.sendTriggerClosed(t),Ic.ACTIVE_TRIGGER_DATA=void 0;let n=this.containerHTMLElement.animate(r,{duration:500,easing:"ease-in-out"});n.onfinish=()=>{this.removeInApp(),window.removeEventListener("resize",this.resizeListener)}}screenResized(){this.removeInApp(),this.startRendering()}removeInApp(){rr.get().removeInApp(this.triggerContext)}skipTrigger(t,r){let n=new ke(k.EVENT_CAMPAIGN_REJECTED,r,t);this.safeHTTP.sendEvent(n)}async preloadImages(t){let r=t.ian;if(!r)return;let n=[];r.elems.forEach(i=>{let s=i.bg?.img?.src;if(s&&n.push(this.getPromise(s)),i.t===1){let o=i.src;if(!o)return;n.push(this.getPromise(o))}}),r.bg?.img?.src&&n.push(this.getPromise(r.bg.img.src)),r.cont.bg?.img?.src&&n.push(this.getPromise(r.cont.bg.img.src)),await Promise.all(n)}getPromise(t){return new Promise(r=>{let n=new Image;n.onload=r,n.src=t,n.style.display="none"})}},ch=class{compareCartItemSubject=new ie;constructor(){this.compareCartItemSubject.pipe(Rr(100)).subscribe(this.compareCartItems.bind(this))}listen(){this.compareCartItemSubject.next(),this.overwriteXMLHttpRequest(),this.overwriteFetchMethod()}overwriteXMLHttpRequest(){let e=this,t=window.XMLHttpRequest.prototype.send;window.XMLHttpRequest.prototype.send=function(){return this.addEventListener("load",function(){e.performEvent(this._url).catch(r=>C.error("Unable to process cart change in XMLHttpRequest",r))}),t.apply(this,arguments)},C.debug("Securely overwritten window.XMLHttpRequest.send method")}overwriteFetchMethod(){let e=this,t=window.fetch;window.fetch=function(r){return t.apply(window,arguments).then(n=>(e.performEvent(r.toString()).catch(i=>C.error("Unable to process cart change in fetch",i)),n))},C.debug("Securely overwritten window.fetch method")}async performEvent(e){this.isCartManipulationURL(e)&&(Pe.get().isCartDirty=!0,this.compareCartItemSubject.next())}isCartManipulationURL(e){return/\/cart\/(add|change|update|clear)/.test(e)}sendChangesAsEvents(e,t){let r=e?.items,n=t.items,i=[],s=[];if(C.debug(`Comparing cart change with old count ${r?.length} to new count ${n.length}`),n?.forEach(o=>{let a=r?.find(l=>l.vID===o.vID);if(a){if(a.quantity!==o.quantity){let l=a.quantity<o.quantity,c=Math.abs(a.quantity-o.quantity),h=re(w({},o),{quantity:c});l?i.push(h):s.push(h)}r&&ue.removeFromArray(r,a)}else i.push(o)}),r)for(let o of r)s.push(o);C.debug(`Cart delta: added: ${i.length}, removed: ${s.length}`),i.length&&this.sendEvent(k.EVENT_ADD_TO_CART,{items:i}),s.length&&e.token===t.token&&this.sendEvent(k.EVENT_REMOVE_FROM_CART,{items:s}),(s.length||i.length)&&yi.get().broadcast(k.CART_UPDATE_BROADCAST,{itemsAdded:i,itemsRemoved:s})}sendEvent(e,t){let r=new ke(e,t);xe.get(Ue).sendEvent(r)}async compareCartItems(){let e=await st.get(ge.CURRENT_CART,{}),t=await Ye.getCurrent().getNormalisedCart(!0);this.sendChangesAsEvents(e,t)}},lh=class{listen(){return this.overwriteFetchMethod(),this}overwriteFetchMethod(){let e=this,t=window.fetch;window.fetch=async function(r,n){try{await e.modifyRequest(r,n)}catch(i){Ct.getInstance().captureError("Failed to modify graphql request",i,{body:JSON.stringify(n?.body)})}return t(r,n)},C.debug("Securely overwritten window.fetch method for graphql query")}async modifyRequest(e,t){let r=typeof e=="string"?e:e instanceof Request?e.url:"";if(!(r.includes("graphql.json")&&t?.method==="POST")||!t.body)return;let n;if(typeof t.body=="string")try{n=JSON.parse(t.body)}catch{return}else n=t.body;C.debug("Intercepted fetch request of:",r),n?.query.includes("cartCreate")&&(t.body=await this.updatedBody(n),this.sendBuyNowEvent())}async updatedBody(e){let t=e.variables.input.attributes??[],r=await ue.getCartAttributes();return e.variables.input.attributes=[...t,...r],JSON.stringify(e)}sendBuyNowEvent(){let e=Pe.get().getCurrentItem();if(!e)return;let t=new ke(k.EVENT_BUY_NOW_CLICKED,{items:[e]});Ue.getInstance().sendEvent(t)}},bc=class{constructor(e,t){this.selectors=e,this.eventName=t,this.selectorString=e.join(",")}static INSTANCE;elements;selectorString;clickListenerCallback=e=>{let t=e.currentTarget,r=new ke(this.eventName,{class:t.className||void 0,tagName:t.tagName||void 0,id:t.id||void 0});Ue.getInstance().sendEvent(r),this.removeClickListener(this.clickListenerCallback)};listenSilently(){this.listen().catch(e=>C.error(e))}async listen(){this.elements=await ue.retrySelectorForElements(this.selectorString),this.elements.forEach(e=>{e.addEventListener("click",this.clickListenerCallback)})}removeClickListener(e){this.elements?.forEach(t=>{t.removeEventListener("click",e)})}},uh=class Pf extends bc{static selectors=[".product__thumbnail-list-inner > button","product-gallery-navigation > button",".product-media--thumb-container",".product-images-inner > img",".m-product-media",".swiper-button-control",".media__thumb",".slick-arrow",".productView-img-container.product-single__media",".product-gallery__thumbnail_item_inner"];constructor(){super(Pf.selectors,k.EVENT_ITEM_THUMBNAIL_CLICKED)}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Pf),this.INSTANCE}},dh=class Lv extends bc{static selectors=[".jdgm-widget.jdgm-preview-badge.jdgm-preview-badge--with-link.jdgm--done-setup","reviewsio-product-ratings",".ruk_rating_snippet.tracked:not(.hidden)","a > .loox-rating",".yotpo-reviews-star-ratings-widget",".yotpo.lp-hero__reviews",".pr-rating > a",".rivyoReviewWidget"];constructor(){super(Lv.selectors,k.EVENT_REVIEW_CLICKED)}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Lv),this.INSTANCE}},fh=class{selector=[".gokwik-checkout button","button.cart__checkout-button","button.cart__checkout","button#checkout","button#checkout2",'button[id*="checkout" i]','button[name*="checkout" i]','button[class*="checkout" i]'].join(",");listen(){ue.onDocumentLoaded(()=>{C.debug("Execution order:","document ready"),this.useLocationHash()})}useLocationHash(){let e=window.location.hash?.substring(1);if(e)if(e.includes(k.HASH_INITIATE_CHECKOUT)){document.dispatchEvent(new Event(k.THIRD_PARTY_CHECKOUT_EVENT));let t=document.querySelector(this.selector);if(!t){C.debug("No clickable cart checkout button found");return}C.debug("Clickable cart checkout button found",t),t.click()}else e.includes(k.HASH_OPEN_CART_DRAWER)&&Kt.get().open()}},ph=class{trackSilently(){this.track().catch(e=>Ct.getInstance().captureException(e))}async track(){let e=window.Shopify?.checkout,t=window.Shopify?.Checkout;if(!e&&!t)return;let r={};this.processSmallCheckout(e,r),this.processBigCheckout(t,r);let n=this.getTokenFromCurrentURLPath();if(n&&(r.urlToken=n),!Object.keys(r).length){C.warn("No processable data found in",e,t);return}r.referrer=document.referrer,r.url=location.href;let i=await xe.get(Zt).checkSessionAndGetContext();r.sessionID=i[0],this.trackOrder(r)}processSmallCheckout(e,t){e&&(e.order_id&&(t.orderID=e.order_id.toString()),e.token&&(t.checkoutToken=e.token.toString()),e.customer_id&&(t.customerID=e.customer_id.toString()))}processBigCheckout(e,t){e&&(e.token&&!t.checkoutToken&&(t.checkoutToken=e.token.toString()),e.cartToken&&(t.cartToken=e.cartToken.toString()))}trackOrder(e){C.info("Found order to be send",e),Ue.getInstance().trackOrder(e)}getTokenFromCurrentURLPath(){let e=new RegExp("[A-Fa-f0-9]{28,32}");return location.pathname?.split("/").find(t=>t.length&&e.test(t))}},ou=class{static attachCheckoutListener(){window.gokwikSdk&&window.gokwikSdk.on("checkout_initiated",async()=>{let e=await Ye.getCurrent().getNormalisedCart(),t={via:"GoKwik",items:e.items,cartToken:e.token,amount:{value:e.amount,currency:e.currency}},r=new ke(k.EVENT_CHECKOUT_STARTED,t);Ue.getInstance().sendEvent(r)})}},hh=class{async migrate(){}};gn.escape=gx.MustacheUtils.escapeHtml;var wt=class{static globalRef;static authenticated;static async initForMerchantWebsiteOnly(){window.cooeeSDKPreview||(this.initGlobalReference(),await new hh().migrate(),this.autoAuthenticate(),new Xp().meddle(),xe.get(Ro).loadExperimentSilently(),new Jp().listen(),new ph().trackSilently(),new xo().listen(),new ch().listen(),new lh().listen(),new fh().listen(),xe.get(_c).listen(),xe.get(dh).listenSilently(),xe.get(uh).listenSilently(),xe.get(Wr).loadPageWidgetsSilently(),this.attachGoKwikListeners(),this.storePreviewParams(),this.setupPreviewListeners(),Cr.watch())}static async initForAll(){this.injectWidgetAssets()}static initGlobalReference(){window.CooeeSDK||Na(window,"CooeeSDK",{}),this.globalRef=window.CooeeSDK,Na(this.globalRef,"config",new Pt),Na(this.globalRef,"runtimeData",new Pe),C.debug("Global reference initialised")}static injectWidgetAssets(){Sn.injectScriptURL(Rn.widgetURL,"cooee-widget-sdk"),Sn.injectStylesheet(Rn.styleURL)}static autoAuthenticate(){let e=Tt.getShopName();e&&this.authenticate({shopifyShop:e})}static authenticate(e){if(this.authenticated)return;let t=e.appID?.trim(),r=e.shopifyShop;if((ue.isNull(t)||t.length!==24)&&ue.isNull(r)){C.warn("Cooee App ID or Shop name is not configured");return}this.authenticated=!0,xe.get(Zt).init(e)}static sendEvent(e,t,r){for(let i in t)if(i.length>3&&i.toLowerCase().startsWith("ce "))throw new Error("Event property name cannot start with 'CE '");let n=new ke(e,t,r?.triggerData);r?.occurred&&(n.occurred=r.occurred),xe.get(Ue).sendEvent(n)}static updateProfile(e){for(let t in e)if(t.toLowerCase().startsWith("ce "))throw new Error("User property name cannot start with 'CE '");xe.get(Ue).updateProfile(e)}static setPageName(e){if(!e)return;let t=Pe.get(),r=t.pageName;if(e===r)return;if(t.pageName=e,e==="cart"&&xe.get(Wr).loadOrRenderWidgetsAfterCartChange(),k.BLACKLISTED_PAGE_NAMES.some(s=>e.includes(s))){xe.get(_c).resetScrollID();return}let n={};r&&(n.ps=r);let i=new ke(k.EVENT_SCREEN_VIEW,n);i.occurred=t.jsLoadTime,xe.get(Ue).sendEvent(i),xe.get(_c).resetScrollID(i.occurred)}static previewPopup(e,t){new wc(t).render(e)}static previewWidget(e){new Xn(new Hn(e)).render()}static setupPreviewListeners(){if(window.opener){try{window.opener.postMessage({action:"COOEE_READY_FOR_PREVIEW"},"*")}catch(e){C.error(e)}window.addEventListener("message",e=>{if(C.debug("Received event",e),!e.origin.includes("letscooee.com")&&!e.origin.includes("localhost"))return;let t=e.data;typeof t=="object"&&(t.action==="POPUP_PREVIEW"?(this.previewPopup(t.engagementTrigger),e.source?.postMessage({action:"PREVIEW_SUCCESSFUL"},e.origin)):t.action==="WIDGET_PREVIEW"&&(this.previewWidget(t.engagementTrigger),e.source?.postMessage({action:"PREVIEW_SUCCESSFUL"},e.origin)))})}}static attachGoKwikListeners(){let e=Pe.get();window.addEventListener("kp-modal:opened",()=>{e.isGoKwikPopupOpen=!0}),window.addEventListener("user-loggedin",t=>{let{token:r}=t.detail;r&&this.updateProfile({goKwikToken:r})}),window.gokwikSdk?ou.attachCheckoutListener():window.addEventListener("gokwikLoaded",ou.attachCheckoutListener)}static storePreviewParams(){let e=Pe.get(),t=new URLSearchParams(location.search),r=t.get("cooee-preview");r&&(e.previewIDs=r.trim().split(",").filter(i=>Number.isInteger(+i)));let n=t.get("cooee-variant");n&&(e.previewVariant=n)}},mh=class FE{static INSTANCE;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new FE),this.INSTANCE}init(){Fl.get(ge.APP_CONFIG,{}).then(t=>this.updateGlobalConfig(t))}async processAppConfigurations(t){C.log("Received app configuration",t),t.currencyCount=t.currencies?.length;let r=this.updateGlobalConfig(t);Fl.set(ge.APP_CONFIG,r).catch(n=>C.error(n)),dp.processConfiguration(),r.website&&(Sn.injectRawScript(r.website.commonJS),Sn.injectRawCSS(r.website.commonCSS)),Kt.get().onToggle().subscribe(async({open:n})=>{C.info("Cart drawer is now",n?"open":"closed"),n&&(xe.get(Wr).loadOrRenderWidgetsAfterCartChange(),await this.trackViewCartEvent())})}updateGlobalConfig(t){let r=wt.globalRef.config.update(t);return Kt.forceUpdate(),C.debug("App configurations",r),r}async trackViewCartEvent(){let t=await Ye.getCurrent().getNormalisedCart(),r={value:t.amount,currency:t.currency},n={items:t.items,amount:r,drawer:!0};Ue.getInstance().sendEvent(new ke(k.EVENT_VIEW_CART,n))}},vx=Be(V_()),gh=class P_{static META_REQUIRED_FIELDS=["ad_id"];static GOOGLE_REQUIRED_FIELDS=["gad_source","gclid"];source;adID;campaignID;adName;campaignName;constructor(t){this.adID=t.adID,this.campaignID=t.campaignID,this.source=t.source}static getAdParams(){let t;try{t=new vx.URLBuilder(location.href)}catch{return{}}let r={};if(this.META_REQUIRED_FIELDS.every(n=>Array.from(t.getParams().keys()).includes(n)))return r={source:"META",adID:t.getQueryParam("ad_id")?.trim(),campaignID:t.getQueryParam("campaign_id")?.trim()},new P_(r);if(this.GOOGLE_REQUIRED_FIELDS.every(n=>Array.from(t.getParams().keys()).includes(n)))return r={source:"GOOGLE"},new P_(r)}},Ps=class rI{static INSTANCE;httpAPIService=Mn.getInstance();coreService=mh.getInstance();sentryService=Ct.getInstance();sdkToken="";userID="";deviceID="";appID="";shopifyShop="";constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new rI),this.INSTANCE}init(t){this.appID=t.appID,this.shopifyShop=t.shopifyShop}async storeAndPopulateAuthData(t){t&&(t.userID&&(this.userID=t.userID,await st.set(ge.ID,t.userID)),t.deviceID&&(this.deviceID=t.deviceID,await st.set(ge.DEVICE_ID,t.deviceID)),t.sdkToken&&(this.sdkToken=t.sdkToken,await st.set(ge.SDK_TOKEN,t.sdkToken)),this.updateAPIClient())}async validateSession(t){await this.populateFirstSeen(),await this.populateUserDataFromStorage(),C.log("Validating session with server");let r=await this.getSessionValidateData(t);try{let n=await this.httpAPIService.validateSession(r);C.log("Validating session Response",n),await this.coreService.processAppConfigurations(n.appSettings),await this.storeAndPopulateAuthData(n)}catch(n){throw C.error(n),n}}async populateUserDataFromStorage(){if(this.sdkToken=await st.get(ge.SDK_TOKEN),!this.sdkToken){C.warn("No SDK token found in local storage");return}this.userID=await st.get(ge.ID),this.deviceID=await st.get(ge.DEVICE_ID),this.updateAPIClient()}updateAPIClient(){C.debug("SDK Token:",this.sdkToken),C.log("Device ID:",this.deviceID),C.log("User ID:",this.userID),Ka.trackDeviceID(this.deviceID),Cr.prepend(`Device ID: <strong>${this.deviceID}</strong>`),this.httpAPIService.setAPIToken(this.sdkToken),this.sentryService.setGlobalContext("Visitor Info",{device_id:this.deviceID,user_id:this.userID}),this.sentryService.setUser({id:this.deviceID})}async getSessionValidateData(t){let r=await new lp().get();r.host=location.origin;try{(await IT())?.isPrivate&&(r.private=!0)}catch(i){yx.default.error("Unable to detect private/incognito window",i)}let n=await st.get(ge.DEVICE_ID);return n||(n=new sn().toHexString(),await st.set(ge.DEVICE_ID,n)),re(w({deviceID:n,deviceProps:r,appID:this.appID,shopifyShop:this.shopifyShop},t),{sdk:k.SDK,page:vi.parseFromCurrent(),ad:gh.getAdParams(),occurred:this.getSessionStartTime(Pe.get().jsLoadTime),currentItem:Pe.get().getCurrentItem(),cart:await Ye.getCurrent().getNormalisedCart(),properties:{}})}async populateFirstSeen(){let t=await st.get(ge.FIRST_SEEN),r=t?new Date(t):new Date;t||await st.set(ge.FIRST_SEEN,r.toISOString()),this.httpAPIService.setFirstSeen(r),this.sentryService.setGlobalContext("Visitor Info",{first_seen:r.toISOString()})}getSessionStartTime(t){return(new Date().getTime()-t.getTime())/1e3>k.IDLE_TIME_IN_SECONDS?new Date:t}},Zt=class Tc{static replaySubject=new Po(1);static INSTANCE;sentryService=xe.get(Ct);lock=new Ya;constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Tc),this.INSTANCE}init(t){if(C.debug("Initialising SDK",t),ST(navigator.userAgent)){C.info("This seems to be a bot. Disabling SDK");return}Ps.getInstance().init(t),Tc.INSTANCE.checkForNewSession(!0).then(async()=>{Tc.replaySubject.next(!0),Tc.replaySubject.complete()}).catch(r=>C.error("Unable to perform device init",r))}getCurrentSessionID(){return hn.set(ge.SESSION_LAST_USED_TIME,new Date().getTime()),hn.get(ge.ID,"")}async checkSessionAndGetContext(){return await this.checkForNewSession(),this.getContext()}async getContext(){let t=await Promise.all([this.getCurrentSessionID(),this.getCurrentSessionNumber(),this.getLandingPage()]);return this.sentryService.setGlobalContext("Visitor Session",{id:t[0],number:t[1],landing_page:t[2]}),t}async checkForNewSession(t){await this.lock.acquire();let r=!1;if(await this.isNewSessionRequired()?(await this.startNewSession(),t=!0,r=!0):await this.notSynced()&&(r=!0),t){let n=await this.getContext();await Ps.getInstance().validateSession({sessionID:n[0],sessionNumber:n[1],landingPage:n[2],newSession:r}),await hn.set(ge.SESSION_SYNCED,!0)}this.lock.release()}async startNewSession(){C.debug("Starting new session"),await hn.clear(),C.debug("Cleared SessionStorage before starting new session");let t=new Date,r=new sn().toHexString();C.debug("New session ID to be used",r);let n=await st.get(ge.SESSION_NUMBER,0)+1;Cr.prepend(`New Session ID: <strong>${r}</strong> & number: ${n}`),await Promise.all([st.set(ge.SESSION_NUMBER,n),hn.set(ge.ID,r),hn.set(ge.SESSION_LAST_USED_TIME,t.getTime()),hn.set(ge.SESSION_LANDING_PAGE,vi.parseFromCurrent())])}getLandingPage(){return hn.get(ge.SESSION_LANDING_PAGE,{})}getCurrentSessionNumber(){return st.get(ge.SESSION_NUMBER,1)}async isNewSessionRequired(){if(!await hn.get(ge.ID))return!0;let t=await hn.get(ge.SESSION_LAST_USED_TIME,0);return t?(new Date().getTime()-t)/1e3>k.IDLE_TIME_IN_SECONDS:!0}async notSynced(){return!await hn.get(ge.SESSION_SYNCED,!1)}},wx=Be(tr()),_x=Be(tr()),Ex=Be(Ea()),vh=class{triggerData;safeHttpService=Ue.getInstance();render(e){e.contentSource===_x.EngagementContentSource.KLAVIYO&&(this.triggerData=e,window.addEventListener("klaviyoForms",this.handleKlaviyoEvents.bind(this)),window._klOnsite=window._klOnsite||[],window._klOnsite.push(["openForm",e.klaviyoFormID]))}handleKlaviyoEvents(e){if(e.type!=="klaviyoForms")return;let t=e.detail;if(t.formId!==this.triggerData.klaviyoFormID){C.warn("Received invalid trigger callback");return}switch(t.type){case"open":this.safeHttpService.sendEvent(new ke(k.EVENT_TRIGGER_DISPLAYED,{form:{id:t.formId}},this.triggerData));break;case"stepSubmit":{let r=this.getFormDetails(t);this.safeHttpService.sendEvent(new ke(k.EVENT_FORM_SUBMITTED,{form:r},this.triggerData)),this.safeHttpService.updateProfile(r);break}case"close":window.removeEventListener("klaviyoForms",this.handleKlaviyoEvents.bind(this)),this.safeHttpService.sendEvent(new ke(k.EVENT_TRIGGER_CLOSED,{form:{id:t.formId}},this.triggerData));break}}getFormDetails(e){let t={id:e.formId},r=e.metaData;if(Ex.JSUtils.hasKeys(r)){let n=["email","phone_number","first_name","last_name","$email","$phone_number","$first_name","$last_name"];Object.keys(r).forEach(o=>{n.includes(o)||(t[o]=r[o])}),t.email=r.$email??r.email,t.mobile=r.$phone_number??r.phone_number;let i=r.$first_name??r.first_name,s=r.$last_name??r.last_name;(i?.length||s?.length)&&(t.name=i+" "+s)}return t}},yh=class{static trackIntent(e){if(!this.isInstalled()){C.log("Facebook pixel not installed");return}if(!Pt.get().pixelPush){C.log("Facebook pixel push not enabled");return}let t=Ds[e.intent]?.toLowerCase(),r=e.segmentName;!t&&!r||(C.debug(`Sending ${t} intent and ${r} segment to Facebook Pixel`),window.fbq("trackCustom","CooeeIntent",{intent_value:t,segment_value:e.segmentName}))}static isInstalled(){return window.fbq&&typeof window.fbq=="function"}},_h=class nI{static INSTANCE;httpService=xe.get(Mn);sentryService=xe.get(Ct);sessionManager=xe.get(Zt);runtime=Pe.get();constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new nI),this.INSTANCE}sendSilently(t){this.send(t).catch(r=>C.error(`Failed to send ${t.name}`,r))}async send(t){if(C.debug(`Sending event ${t.name}`),Cr.prepend(`Sending event <strong>${t.name}</strong> with id ${t.id}`),this.shouldReject(t)){C.warn(`Rejecting event ${t.name}`);return}await Promise.all([this.addSessionContext(t),this.addShopifyContext(t)]),this.addShopifyAttributes(),t.name!==k.EVENT_APP_BACKGROUND&&this.runtime.setActive(),t.currentItem=this.runtime.getCurrentItem(),t.locale=this.runtime.locale,this.httpService.post("/v1/event/track",t).then(async r=>{C.log("\u2705 Event tracked:",t.name),Cr.prepend(`\u2705 Event <strong>${r.eventName}</strong> tracked`),this.processEventResponse(t,r)}).catch(r=>{C.error(`Error sending event ${t.name} to server`,r)})}shouldReject(t){return t.trigger?.triggerID==="test"||t.trigger?.triggerID==="preview"?(C.warn("Not sending event as this is a test trigger"),!0):!1}async addSessionContext(t){let r=await this.sessionManager.checkSessionAndGetContext();t.sessionID=r[0],t.sessionNumber=r[1],t.landingPage=r[2],t.page=vi.parseFromCurrent()}async addShopifyContext(t){if(Tt.isShopify())try{t.cart=await Ye.getCurrent().getNormalisedCart()}catch(r){C.error("Error fetching Shopify cart before sending the event",r)}}processEventResponse(t,r){this.renderWidgetIfAny(t,r).catch(n=>{C.error("Failed to display a campaign",n,t,r),this.sentryService.captureException(n,{event:t,response:r})}),this.utiliseIntentIfCalculated(r)}async renderWidgetIfAny(t,r){if(!r.triggerData){C.log(`Nothing to engage after ${t.name}`);return}C.log(`\u{1F4E3} Engagement(id=${r.triggerData.shortID}) will be shown`,r.triggerData);let n=new Hn(r.triggerData);n.occurred=t.occurred;let i;try{i=await pc.refreshItems(n)}catch(s){C.error("Failed to refresh the products",s);return}if(n.items=i,n.contentSource===wx.EngagementContentSource.KLAVIYO){new vh().render(n);return}new wc().renderEngagement(n).catch(s=>{C.error("Failed to render popup",s),this.sentryService.captureException(s,{event:t,triggerData:n})})}utiliseIntentIfCalculated(t){t.intent&&(Ka.trackIntent(t.intent),yh.trackIntent(t),Cr.prepend(`Intent is <strong>${Ds[t.intent]}</strong>`))}addShopifyAttributes(){Tt.isShopify()&&Ye.getCurrent().addCooeeAttributes().catch(t=>{C.error("Fail to add attributes in cart",t)})}},Ue=class iI{static INSTANCE;httpApiService=Mn.getInstance();eventAPIService=_h.getInstance();constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new iI),this.INSTANCE}sendEvent(t){C.debug(`Waiting for auth to send event ${t.name}`),Zt.replaySubject.subscribe(async()=>{this.eventAPIService.sendSilently(t)})}updateProfile(t){Zt.replaySubject.subscribe(()=>{this.httpApiService.updateUserData(t??{})})}trackOrder(t){Zt.replaySubject.subscribe(()=>{this.httpApiService.trackOrder(t)})}updateDeviceProps(t){Zt.replaySubject.subscribe(()=>{this.httpApiService.updateDeviceProps({props:t})})}generateDiscount(t){return this.httpApiService.generateDiscount(t)}},Do=class{constructor(e,t){this.triggerContext=e,this.element=t}safeHTTP=Ue.getInstance();async execute(e){let t=Pe.get().getCurrentItem(),r=e.clickAction||this.element?.clc;if(!r)return;let n=e.item,i=this.triggerContext,s=new xo,o=i.triggerData.redirectBehaviour,a=!!i.triggerData.discount.type&&!!r?.applyDiscount,l={selectedVariants:i.triggerData.nonMutableItems.map(b=>({itemMID:b.mID,mID:b.selectedOrFirstVariant.value.mID})),eID:i.triggerData.engagementID,cID:i.triggerData.contentID},c="",h=[],d=[];if(n?d=[n.toEmbed()]:e.embeddedItem&&(d=[e.embeddedItem]),r.at===108){let b=i.selectedItems;if(d=e.embeddedItems??b.map(I=>I.toEmbed()),i.shouldGiveFBTDiscount||e.embeddedItems?.length){let I;e.embeddedItems?I=e.embeddedItems.map(F=>({itemMID:F.mID,mID:F.vID,quantity:F.quantity})):I=b.map(F=>({itemMID:F.mID,mID:F.selectedOrFirstVariant.value.mID}));let A=i.triggerData.bundleFrom;i.triggerData.isBundleOnCartDrawer()&&A&&I.push({itemMID:A.mID,mID:A.selectedOrFirstVariant.value.mID,isPrimary:!0}),l.selectedVariants=I,i.triggerData.isBundleOnPDP()&&l.selectedVariants.forEach(F=>{F.mID===t.vID&&(F.isPrimary=!0)})}else l=void 0;h=e.embeddedItems??b}else if(r.at===107){let b=await Ye.getCurrent().getNormalisedCart();d=b.items,l.selectedVariants=b.items.map(I=>({itemMID:I.mID,mID:I.vID}))}else if(r.at===102)h=n?[n]:[e.embeddedItem];else if(r.at===101)c=n?Tt.getRootPrefix()+"products/"+n.slug:e.embeddedItem?.link;else if(r.at===4){let b=ue.isValidURL(r.gu?.u);b&&(c=b.href)}else if(r.at===109){let b=await s.upgradeToSubscription(n,i.triggerData);this.triggerContext.triggerData.skipSubscribedItems&&this.triggerContext.renderer.destroy(),Kt.get().refreshUI(b)}if(this.sendTriggerClicked(d,{from:"button"},e.video),C.debug({redirectPath:c,redirectBehaviour:o,hasDiscount:a}),!a&&c){location.href=c;return}let f,g=!1;try{f=await this.getOrGenerateDiscountCode(l),C.debug("Discount code (if any) to apply",f)}catch(b){if(!this.triggerContext.triggerData.isBYOB()){Cx.default.error("Unable to get a discount code",b);return}}if(f&&r.at===103)await s.performCopyCoupon(f);else if(r.at===110){let b=await s.performCartCreate(t,f,i.triggerData);b&&(location.href=b);return}try{f&&await To.applyWithStorefront(f)}catch(b){C.error(b),g=!0}let m;if(h?.length&&(m=await s.performAddToCart(h,i.triggerData)),g&&f){To.navigate(f,o,c);return}if(c){location.href=c;return}To.navigateWithoutDiscount(o,m)}sendTriggerClicked(e,t,r){let n=k.EVENT_TRIGGER_CLICKED,i=new ke(n,t,this.triggerContext.triggerData);i.items=e,r?.id&&(i.videos=[r.id]),this.safeHTTP.sendEvent(i)}async getOrGenerateDiscountCode(e){let t=this.triggerContext.triggerData.discount;if(!t?.type)return;let r="";if(t.type===bx.DiscountType.STATIC){if(!t.code)throw Ct.getInstance().captureMessage("No discount code found","warning",{triggerContext:this.triggerContext}),new Error("No discount code found");return t.code}if(e){if(r=await this.generateDiscount(e),!r)throw C.error("No discount code found",e),new Error("Discount code not found or generated");return r}}async generateDiscount(e){try{return(await this.safeHTTP.generateDiscount(e))?.code}catch(t){throw ue.showSnackbar("Failed to generate a discount code"),C.error("Error generating discount code",t,e),Ct.getInstance().captureMessage("Failed to generate discount code","error",{discountData:JSON.stringify(e),triggerContext:this.triggerContext,error:t}),t}}},Xi=class{static getBestSources(e){if(!e)return[];let t=[],r=e.filter(i=>i.format==="mp4").sort((i,s)=>s.width-i.width)[0];r&&t.push(r);let n=e.filter(i=>i.format==="m3u8").sort((i,s)=>s.width-i.width)[0];return n&&t.push(n),t}static async performCTA(e,t){let r={applyDiscount:!0};t.cta===No.ClickActionType.ADD_TO_CART?r={at:No.ClickActionType.ADD_TO_CART,applyDiscount:!0}:t.cta===No.ClickActionType.GO_TO_PRODUCT?r={at:No.ClickActionType.GO_TO_PRODUCT,applyDiscount:!0}:t.cta===No.ClickActionType.OPEN_CART&&(e.triggerData.redirectBehaviour=No.RedirectBehaviour.CART_DRAWER),await new Do(e).execute({clickAction:r,embeddedItem:new pn(t.item)})}},oU=["videoPlayers"],Cc=class L_{videoPlayers;videos=[];currentIndex=0;muted=!0;videoProgress=[];selectedItem=null;triggerContext;VideoUtils=Xi;engagementTrigger;ngOnInit(){this.engagementTrigger=this.triggerContext?.triggerData}pauseAll(){this.videoPlayers.forEach(t=>t.nativeElement.pause())}async toggleMute(){this.muted=!this.muted,this.videoPlayers.forEach(r=>r.nativeElement.muted=this.muted);let t=[this.muted?k.EVENT_VIDEO_MUTED:k.EVENT_VIDEO_UNMUTED,{current:this.currentVideoProps()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(t),await st.set(ge.MUTED,this.muted)}playActiveVideo(){this.pauseAll();let t=this.getCurrentVideoElement();t&&(t.currentTime=1,t.play().then(async()=>{this.muted=await st.get(ge.MUTED,!0),t.muted=this.muted}))}onVideoEnded(){if(this.currentIndex<this.videos.length-1)this.moveToNextVideo();else{let t=this.videoPlayers.last;if(t){let r=this.getPreviousVideoDataForEvent(),n=[k.EVENT_LAST_VIDEO_ENDED,{previous:r},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(n),t.nativeElement.currentTime=0,t.nativeElement.play()}}}updateProgress(t,r){let n=t.target;this.videoProgress[r]=n.currentTime/n.duration*100}onSlideChange(t){let r=this.getPreviousVideoDataForEvent();t(),this.playActiveVideo(),this.selectedItem=null;let n=this.currentVideoProps(),i={previous:r,current:n},s=[k.EVENT_VIDEO_CHANGE,i,{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(s)}productCardClicked(t,r){let n=[k.EVENT_MORE_ITEM_INFO_CLICKED,{item:t,video:r},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(n),this.selectedItem=t}currentVideoProps(){return{videoID:this.videos[this.currentIndex].id,videoIndex:this.currentIndex}}getPreviousVideoDataForEvent(){let t=this.currentVideoProps(),r=this.videoPlayers.find(i=>i.nativeElement.dataset.videoId===this.videos[this.currentIndex].id)?.nativeElement;t.playedTillMS=Math.ceil(r?.currentTime*1e3);let n=r?.duration*1e3;return t.playedTillPercent=+(t.playedTillMS/n).toFixed(4),t}static \u0275fac=function(t){return new(t||L_)};static \u0275cmp=ct({type:L_,selectors:[["cooee-base-video"]],viewQuery:function(t,r){if(t&1&&es(oU,5),t&2){let n;ts(n=ns())&&(r.videoPlayers=n)}},decls:0,vars:0,template:function(t,r){},encapsulation:2})},sU=["swiperContainer"],aU=e=>({"swiper-hide-slide":e}),Sx=(e,t)=>t.url;function cU(e,t){if(e&1&&Ne(0,"source",15),e&2){let r=t.$implicit;bn("type",r.mimeType),Fr("media","(max-width: ",r.width,"px)"),be("src",r.url,zt)}}function lU(e,t){if(e&1&&Ne(0,"source",16),e&2){let r=t.$implicit;bn("type",r.mimeType),be("src",r.url,zt)}}function uU(e,t){if(e&1){let r=fn();K(0,"video",14,1),Qe("timeupdate",function(n){ze(r);let i=q().$index,s=q();return qe(s.updateProgress(n,i))})("click",function(){ze(r);let n=q().$index,i=q();return qe(i.currentIndex===n&&i.toggleMute())})("ended",function(){ze(r);let n=q(2);return qe(n.onVideoEnded())}),Mt(2,cU,1,4,"source",15,Sx),Mt(4,lU,1,2,"source",16,Sx),X()}if(e&2){let r=q(),n=r.$implicit,i=r.$index,s=q();be("autoplay",s.currentIndex===i)("muted",s.muted),fo("data-video-id",n.id),Y(2),Ot(n.sources),Y(2),Ot(s.VideoUtils.getBestSources(n.sources))}}function dU(e,t){if(e&1){let r=fn();K(0,"div",18)(1,"cooee-product-modal",19),Qe("performCTA",function(n){ze(r);let i=q(2).$implicit,s=q();return qe(s.performClickToAction(n,i))})("closeModel",function(){ze(r);let n=q(3);return qe(n.selectedItem=null)}),X()()}if(e&2){let r=q(3);Y(),be("item",r.selectedItem)}}function fU(e,t){if(e&1){let r=fn();K(0,"div",20)(1,"cooee-mute-toggle",21),Qe("buttonClicked",function(){ze(r);let n=q(3);return qe(n.toggleMute())}),X()(),K(2,"cooee-product-card",22),Qe("performCTA",function(n){ze(r);let i=q(2).$implicit,s=q();return qe(s.performClickToAction(n,i))})("clicked",function(n){ze(r);let i=q(2).$implicit,s=q();return qe(s.productCardClicked(n,i))}),X()}if(e&2){let r=q(2).$implicit,n=q();Y(),be("muted",n.muted),Y(),be("items",r.items)}}function pU(e,t){if(e&1&&(Ne(0,"cooee-video-progress-bar",17),At(1,dU,2,1,"div",18)(2,fU,3,2)),e&2){let r=q().$index,n=q();be("width",n.videoProgress[r]||0),Y(),Vt(n.selectedItem?1:2)}}function hU(e,t){if(e&1&&(Br(0),K(1,"div",5),At(2,uU,6,3,"video",13)(3,pU,3,2),X()),e&2){let r=t.$index,n=q(),i=n.currentIndex===r||n.currentIndex-1===r||n.currentIndex+1===r;Y(),be("ngClass",ma(3,aU,!i)),Y(),Vt(i?2:-1),Y(),Vt(n.currentIndex===r?3:-1)}}var Eh=class F_ extends Cc{constructor(t){super(),this.cdr=t}videos=[];currentIndex=0;closeDialog=new We;performCTA=new We;swiperContainerRef;swiperInstance;ngAfterViewInit(){let t=this.swiperContainerRef.nativeElement.getRootNode();Sn.injectStylesheet(Rn.styleURL,t),Sn.injectStylesheet("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css",t),this.loadSwiperScript().then(()=>{this.initSwiper(),this.afterSwiperInit(),this.playActiveVideo()})}ngOnDestroy(){this.swiperInstance?.destroy?.()}close(t=this.videos[this.currentIndex],r=this.currentIndex){this.closeDialog.emit({lastVideo:t,lastVideoIndex:r})}performClickToAction(t,r){this.performCTA.emit({cta:t.cta,item:t.item,video:r})}getCurrentVideoElement(){return this.videoPlayers.get(Math.min(this.currentIndex,1))?.nativeElement}updateProgress(t,r){super.updateProgress(t,r),this.cdr.detectChanges()}async toggleMute(){await super.toggleMute(),this.cdr.detectChanges()}moveToNextVideo(){this.swiperInstance.slideTo(this.currentIndex+1)}loadSwiperScript(){return new Promise(t=>{let r="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js";if(Array.from(document.scripts).some(i=>i.src.includes(r))){t();return}let n=document.createElement("script");n.src=r,n.onload=()=>t(),document.body.appendChild(n)})}initSwiper(){this.swiperInstance=new window.Swiper(this.swiperContainerRef.nativeElement,{effect:"coverflow",slidesPerView:3,initialSlide:this.currentIndex,centeredSlides:!0,coverflowEffect:{rotate:0,stretch:0,depth:150,modifier:2,slideShadows:!0},navigation:{nextEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-next"),prevEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-prev")}}),this.swiperContainerRef.nativeElement.style.setProperty("--swiper-navigation-size","50px"),this.swiperContainerRef.nativeElement.style.setProperty("--swiper-navigation-color","white")}afterSwiperInit(){this.swiperInstance.on("slideChange",t=>{this.onSlideChange(()=>{this.currentIndex=t.realIndex,this.cdr.detectChanges()})})}static \u0275fac=function(t){return new(t||F_)(bt(Vr))};static \u0275cmp=ct({type:F_,selectors:[["cooee-video-swiper"]],viewQuery:function(t,r){if(t&1&&es(sU,5),t&2){let n;ts(n=ns())&&(r.swiperContainerRef=n.first)}},inputs:{videos:"videos",currentIndex:"currentIndex",triggerContext:"triggerContext"},outputs:{closeDialog:"closeDialog",performCTA:"performCTA"},features:[ri],decls:13,vars:0,consts:[["swiperContainer",""],["videoPlayers",""],[1,"lc:relative","lc:w-screen","lc:h-screen","lc:bg-black/70","lc:flex","lc:justify-center","lc:items-center"],[1,"swiper-container","lc:w-[70vw]","lc:h-[80vh]"],[1,"swiper-wrapper"],[1,"swiper-slide","lc:relative","lc:flex","lc:items-center",3,"ngClass"],[1,"swiper-button-prev","lc:text-white"],[1,"swiper-button-next","lc:text-white"],[1,"lc:absolute","lc:top-10","lc:right-20","lc:flex","lc:gap-2","lc:z-10"],["id","lc-close-button","tabindex","{0}",1,"lc:w-12","lc:h-12","lc:flex","lc:items-center","lc:justify-center","lc:cursor-pointer",3,"click","keydown"],["xmlns","http://www.w3.org/2000/svg","height","40px","viewBox","0 0 24 24","width","40px","fill","#FFFFFF"],["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:h-full","lc:w-full","lc:rounded-lg","lc:object-cover","lc:z-[-1]","lc:fixed",3,"autoplay","muted"],[1,"lc:h-full","lc:w-full","lc:rounded-lg","lc:object-cover","lc:z-[-1]","lc:fixed",3,"timeupdate","click","ended","autoplay","muted"],[3,"src","type","media"],[3,"src","type"],[3,"width"],[1,"lc:absolute","lc:bottom-0","lc:z-2147483646","lc:w-full"],[3,"performCTA","closeModel","item"],[1,"lc:absolute","lc:top-4","lc:right-4","lc:flex","lc:gap-2","lc:z-10"],[3,"buttonClicked","muted"],[3,"performCTA","clicked","items"]],template:function(t,r){if(t&1){let n=fn();K(0,"div",2)(1,"div",3,0)(3,"div",4),Mt(4,hU,4,5,"div",5,Lr),X(),Ne(6,"div",6)(7,"div",7),X(),K(8,"div",8)(9,"div",9),Qe("click",function(){return ze(n),qe(r.close())})("keydown",function(){return ze(n),qe(r.close())}),zn(),K(10,"svg",10),Ne(11,"path",11)(12,"path",12),X()()()()}t&2&&(Y(4),Ot(r.videos))},dependencies:[$a,Wa,Ga,za,$d],styles:[`.swiper-hide-slide{visibility:hidden!important}
79
79
  `],encapsulation:3})},wh=class W_{constructor(t,r){this.dialogRef=t,this.data=r}static \u0275fac=function(t){return new(t||W_)(bt(Gi),bt(Ol))};static \u0275cmp=ct({type:W_,selectors:[["cooee-desktop-video-carousel"]],decls:1,vars:3,consts:[[3,"closeDialog","performCTA","videos","currentIndex","triggerContext"]],template:function(t,r){t&1&&(K(0,"cooee-video-swiper",0),Qe("closeDialog",function(n){return r.dialogRef.close(n)})("performCTA",function(n){return r.data.onCTAPerformed(n)}),X()),t&2&&be("videos",r.data.videos)("currentIndex",r.data.currentIndex)("triggerContext",r.data.triggerContext)},dependencies:[Eh],encapsulation:2})},nR=Be($_()),mU=e=>({transform:e}),Dx=(e,t)=>t.url;function gU(e,t){if(e&1&&Ne(0,"source",5),e&2){let r=t.$implicit;bn("type",r.mimeType),Fr("media","(max-width: ",r.width,"px)"),be("src",r.url,zt)}}function vU(e,t){if(e&1&&Ne(0,"source",6),e&2){let r=t.$implicit;bn("type",r.mimeType),be("src",r.url,zt)}}function yU(e,t){if(e&1){let r=fn();K(0,"div",15)(1,"cooee-product-modal",17),Qe("performCTA",function(n){ze(r);let i=q(2);return qe(i.data.onCTAPerformed(n))})("closeModel",function(){ze(r);let n=q(2);return qe(n.selectedItem=null)}),X()()}if(e&2){let r=q(2);Y(),be("item",r.selectedItem)}}function _U(e,t){if(e&1){let r=fn();K(0,"cooee-product-card",18),Qe("performCTA",function(n){ze(r);let i=q(2);return qe(i.data.onCTAPerformed(n))})("clicked",function(n){ze(r);let i=q().$implicit,s=q();return qe(s.productCardClicked(n,i))}),X()}if(e&2){let r=q().$implicit;be("items",r.items)}}function EU(e,t){if(e&1){let r=fn();K(0,"div",3)(1,"video",4,0),Qe("timeupdate",function(n){let i=ze(r).$index,s=q();return qe(s.updateProgress(n,i))})("click",function(){let n=ze(r).$index,i=q();return qe(i.currentIndex===n&&i.toggleMute())})("ended",function(){ze(r);let n=q();return qe(n.onVideoEnded())}),Mt(3,gU,1,4,"source",5,Dx),Mt(5,vU,1,2,"source",6,Dx),X(),K(7,"div",7)(8,"button",8),Qe("click",function(){let n=ze(r),i=n.$implicit,s=n.$index,o=q();return qe(o.close(i,s))}),zn(),K(9,"svg",9),Ne(10,"path",10)(11,"path",11),X()()(),Fi(),K(12,"div",12)(13,"cooee-mute-toggle",13),Qe("buttonClicked",function(){ze(r);let n=q();return qe(n.toggleMute())}),X()(),Ne(14,"cooee-video-progress-bar",14),At(15,yU,2,1,"div",15)(16,_U,1,1,"cooee-product-card",16),X()}if(e&2){let r=t.$implicit,n=t.$index,i=q();Y(),be("muted",i.muted)("height","100%"),fo("data-video-id",r.id),Y(2),Ot(r.sources),Y(2),Ot(i.VideoUtils.getBestSources(r.sources)),Y(8),be("muted",i.muted),Y(),be("width",i.videoProgress[n]||0),Y(),Vt(i.selectedItem?15:16)}}var bh=class C0 extends Cc{constructor(t,r){super(),this.dialogRef=t,this.data=r,this.videos=r.videos,this.currentIndex=r.currentIndex,this.triggerContext=r.triggerContext}touchStartY=null;touchThreshold=50;onTouchStart(t){t.stopPropagation(),this.touchStartY=t.touches[0].clientY}onTouchEnd(t){if(t.stopPropagation(),this.touchStartY===null)return;let r=t.changedTouches[0].clientY,n=this.touchStartY-r;Math.abs(n)>this.touchThreshold&&this.onSlideChange(()=>{n>0?this.next():this.prev()}),this.touchStartY=null}ngAfterViewInit(){this.playActiveVideo()}next(){this.videos.length>0&&(this.currentIndex=(this.currentIndex+1)%this.videos.length)}prev(){this.videos.length>0&&(this.currentIndex=(this.currentIndex-1+this.videos.length)%this.videos.length)}getCurrentVideoElement(){return this.videoPlayers.get(this.currentIndex)?.nativeElement}moveToNextVideo(){this.onSlideChange(()=>{this.next()})}close(t,r){let n={lastVideo:t,lastVideoIndex:r};this.dialogRef.close(n)}static \u0275fac=function(t){return new(t||C0)(bt(Gi),bt(Ol))};static \u0275cmp=ct({type:C0,selectors:[["cooee-video-scroller"]],hostBindings:function(t,r){t&1&&Qe("touchstart",function(n){return r.onTouchStart(n)})("touchend",function(n){return r.onTouchEnd(n)})},features:[ri],decls:4,vars:3,consts:[["videoPlayers",""],[1,"lc:relative","lc:w-full","lc:h-screen","lc:overflow-hidden"],[1,"lc:flex","lc:md:flex-row","lc:flex-col","lc:w-full","lc:h-full","lc:transition-transform","lc:duration-1000","lc:ease-in-out",3,"ngStyle"],[1,"lc:w-full","lc:h-full","lc:flex-shrink-0","lc:relative"],["autoplay","",1,"lc:w-full","lc:h-full","lc:object-cover",3,"timeupdate","click","ended","muted","height"],[3,"src","type","media"],[3,"src","type"],[1,"lc:absolute","lc:top-4","lc:right-2","lc:flex","lc:gap-2","lc:z-10"],["id","lc-close-button",1,"lc:bg-black/50","lc:rounded-full","lc:w-12","lc:h-12","lc:flex","lc:items-center","lc:justify-center","lc:border-none",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:absolute","lc:top-4","lc:right-16","lc:flex","lc:gap-2","lc:z-10"],[3,"buttonClicked","muted"],[3,"width"],[1,"lc:absolute","lc:bottom-0","lc:z-2147483646","lc:w-full"],[3,"items"],[3,"performCTA","closeModel","item"],[3,"performCTA","clicked","items"]],template:function(t,r){t&1&&(K(0,"div",1)(1,"div",2),Mt(2,EU,17,6,"div",3,Lr),X()()),t&2&&(Y(),be("ngStyle",ma(1,mU,"translateY(-"+r.currentIndex*100+"vh)")),Y(),Ot(r.videos))},dependencies:[u0,$a,Wa,Ga,za],styles:["[_nghost-%COMP%]{display:block}"]})},lu=Be(Mx());function qx(e){let t=e.cloneNode(!0),r=t.querySelectorAll("[id]"),n=e.nodeName.toLowerCase();t.removeAttribute("id");for(let i=0;i<r.length;i++)r[i].removeAttribute("id");return n==="canvas"?kx(e,t):(n==="input"||n==="select"||n==="textarea")&&Px(e,t),Ox("canvas",e,t,kx),Ox("input, textarea, select",e,t,Px),t}function Ox(e,t,r,n){let i=t.querySelectorAll(e);if(i.length){let s=r.querySelectorAll(e);for(let o=0;o<i.length;o++)n(i[o],s[o])}}var bU=0;function Px(e,t){t.type!=="file"&&(t.value=e.value),t.type==="radio"&&t.name&&(t.name=`mat-clone-${t.name}-${bU++}`)}function kx(e,t){let r=t.getContext("2d");if(r)try{r.drawImage(e,0,0)}catch{}}function OE(e){let t=e.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height,x:t.x,y:t.y}}function xE(e,t,r){let{top:n,bottom:i,left:s,right:o}=e;return r>=n&&r<=i&&t>=s&&t<=o}function cu(e,t,r){e.top+=t,e.bottom=e.top+e.height,e.left+=r,e.right=e.left+e.width}function Lx(e,t,r,n){let{top:i,right:s,bottom:o,left:a,width:l,height:c}=e,h=l*t,d=c*t;return n>i-d&&n<o+d&&r>a-h&&r<s+h}var Th=class{_document;positions=new Map;constructor(e){this._document=e}clear(){this.positions.clear()}cache(e){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),e.forEach(t=>{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:OE(t)})})}handleScroll(e){let t=qn(e),r=this.positions.get(t);if(!r)return null;let n=r.scrollPosition,i,s;if(t===this._document){let l=this.getViewportScrollPosition();i=l.top,s=l.left}else i=t.scrollTop,s=t.scrollLeft;let o=n.top-i,a=n.left-s;return this.positions.forEach((l,c)=>{l.clientRect&&t!==c&&t.contains(c)&&cu(l.clientRect,o,a)}),n.top=i,n.left=s,{top:o,left:a}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function Yx(e,t){let r=e.rootNodes;if(r.length===1&&r[0].nodeType===t.ELEMENT_NODE)return r[0];let n=t.createElement("div");return r.forEach(i=>n.appendChild(i)),n}function PE(e,t,r){for(let n in t)if(t.hasOwnProperty(n)){let i=t[n];i?e.setProperty(n,i,r?.has(n)?"important":""):e.removeProperty(n)}return e}function Sc(e,t){let r=t?"":"none";PE(e.style,{"touch-action":t?"":"none","-webkit-user-drag":t?"":"none","-webkit-tap-highlight-color":t?"":"transparent","user-select":r,"-ms-user-select":r,"-webkit-user-select":r,"-moz-user-select":r})}function Fx(e,t,r){PE(e.style,{position:t?"":"fixed",top:t?"":"0",opacity:t?"":"0",left:t?"":"-999em"},r)}function xh(e,t){return t&&t!="none"?e+" "+t:e}function Bx(e,t){e.style.width=`${t.width}px`,e.style.height=`${t.height}px`,e.style.transform=Rh(t.left,t.top)}function Rh(e,t){return`translate3d(${Math.round(e)}px, ${Math.round(t)}px, 0)`}function Vx(e){let t=e.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(e)*t}function CU(e){let t=getComputedStyle(e),r=IE(t,"transition-property"),n=r.find(a=>a==="transform"||a==="all");if(!n)return 0;let i=r.indexOf(n),s=IE(t,"transition-duration"),o=IE(t,"transition-delay");return Vx(s[i])+Vx(o[i])}function IE(e,t){return e.getPropertyValue(t).split(",").map(r=>r.trim())}var SU=new Set(["position"]),RE=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView;_preview;get element(){return this._preview}constructor(e,t,r,n,i,s,o,a,l,c){this._document=e,this._rootElement=t,this._direction=r,this._initialDomRect=n,this._previewTemplate=i,this._previewClass=s,this._pickupPositionOnPage=o,this._initialTransform=a,this._zIndex=l,this._renderer=c}attach(e){this._preview=this._createPreview(),e.appendChild(this._preview),Ux(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(e){this._preview.style.transform=e}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(e){this._preview.classList.add(e)}getTransitionDuration(){return CU(this._preview)}addEventListener(e,t){return this._renderer.listen(this._preview,e,t)}_createPreview(){let e=this._previewTemplate,t=this._previewClass,r=e?e.template:null,n;if(r&&e){let i=e.matchSize?this._initialDomRect:null,s=e.viewContainer.createEmbeddedView(r,e.context);s.detectChanges(),n=Yx(s,this._document),this._previewEmbeddedView=s,e.matchSize?Bx(n,i):n.style.transform=Rh(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else n=qx(this._rootElement),Bx(n,this._initialDomRect),this._initialTransform&&(n.style.transform=this._initialTransform);return PE(n.style,{"pointer-events":"none",margin:Ux(n)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},SU),Sc(n,!1),n.classList.add("cdk-drag-preview"),n.setAttribute("popover","manual"),n.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(i=>n.classList.add(i)):n.classList.add(t)),n}};function Ux(e){return"showPopover"in e}var DU={passive:!0},Hx={passive:!1},IU={passive:!1,capture:!0},TU=800,jx=new Set(["position"]),NE=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview;_previewContainer;_placeholderRef;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_anchor;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=Bi(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new ie;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=mt.EMPTY;_pointerUpSubscription=mt.EMPTY;_scrollSubscription=mt.EMPTY;_resizeSubscription=mt.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef;_cachedShadowRoot;lockAxis;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(e){e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(t=>Sc(t,e)))}_disabled=!1;beforeStarted=new ie;started=new ie;released=new ie;ended=new ie;entered=new ie;exited=new ie;dropped=new ie;moved=this._moveEvents;data;constrainPosition;constructor(e,t,r,n,i,s,o){this._config=t,this._document=r,this._ngZone=n,this._viewportRuler=i,this._dragDropRegistry=s,this._renderer=o,this.withRootElement(e).withParent(t.parentDragRef||null),this._parentPositions=new Th(r),s.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(r=>Kn(r)),this._handles.forEach(r=>Sc(r,this.disabled)),this._toggleNativeDragInteractions();let t=new Set;return this._disabledHandles.forEach(r=>{this._handles.indexOf(r)>-1&&t.add(r)}),this._disabledHandles=t,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){let t=Kn(e);return t!==this._rootElement&&(this._removeRootElementListeners(),this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[Cn(this._renderer,t,"mousedown",this._pointerDown,Hx),Cn(this._renderer,t,"touchstart",this._pointerDown,DU),Cn(this._renderer,t,"dragstart",this._nativeDragStart,Hx)]),this._initialTransform=void 0,this._rootElement=t),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?Kn(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),Sc(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),Sc(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){let e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){let e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_pointerDown=e=>{if(this.beforeStarted.next(),this._handles.length){let t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&this._initializeDragSequence(t,e)}else this.disabled||this._initializeDragSequence(this._rootElement,e)};_pointerMove=e=>{let t=this._getPointerPositionOnPage(e);if(!this._hasStartedDragging()){let n=Math.abs(t.x-this._pickupPositionOnPage.x),i=Math.abs(t.y-this._pickupPositionOnPage.y);if(n+i>=this._config.dragStartThreshold){let s=Date.now()>=this._dragStartTime+this._getDragStartDelay(e),o=this._dropContainer;if(!s){this._endDragSequence(e);return}(!o||!o.isDragging()&&!o.isReceiving())&&(e.cancelable&&e.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(e)))}return}e.cancelable&&e.preventDefault();let r=this._getConstrainedPointerPosition(t);if(this._hasMoved=!0,this._lastKnownPointerPosition=t,this._updatePointerDirectionDelta(r),this._dropContainer)this._updateActiveDropContainer(r,t);else{let n=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,i=this._activeTransform;i.x=r.x-n.x+this._passiveTransform.x,i.y=r.y-n.y+this._passiveTransform.y,this._applyRootElementTransform(i.x,i.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:r,event:e,distance:this._getDragDistance(r),delta:this._pointerDirectionDelta})})};_pointerUp=e=>{this._endDragSequence(e)};_endDragSequence(e){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:e}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let t=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:e})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(e){su(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let t=this._getShadowRoot(),r=this._dropContainer;if(t&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=Cn(this._renderer,t,"selectstart",xU,IU)}),r){let n=this._rootElement,i=n.parentNode,s=this._placeholder=this._createPlaceholderElement(),o=this._anchor=this._anchor||this._document.createComment("");i.insertBefore(o,n),this._initialTransform=n.style.transform||"",this._preview=new RE(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(i,t)),Fx(n,!1,jx),this._document.body.appendChild(i.replaceChild(s,n)),this.started.next({source:this,event:e}),r.start(),this._initialContainer=r,this._initialIndex=r.getItemIndex(this)}else this.started.next({source:this,event:e}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(r?r.getScrollableParents():[])}_initializeDragSequence(e,t){this._parentDragRef&&t.stopPropagation();let r=this.isDragging(),n=su(t),i=!n&&t.button!==0,s=this._rootElement,o=qn(t),a=!n&&this._lastTouchEventTime&&this._lastTouchEventTime+TU>Date.now(),l=n?Zf(t):Kf(t);if(o&&o.draggable&&t.type==="mousedown"&&t.preventDefault(),r||i||a||l)return;if(this._handles.length){let d=s.style;this._rootElementTapHighlight=d.webkitTapHighlightColor||"",d.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(d=>this._updateOnScroll(d)),this._boundaryElement&&(this._boundaryRect=OE(this._boundaryElement));let c=this._previewTemplate;this._pickupPositionInElement=c&&c.template&&!c.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,e,t);let h=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:h.x,y:h.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(e){Fx(this._rootElement,!0,jx),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let t=this._dropContainer,r=t.getItemIndex(this),n=this._getPointerPositionOnPage(e),i=this._getDragDistance(n),s=t._isOverContainer(n.x,n.y);this.ended.next({source:this,distance:i,dropPoint:n,event:e}),this.dropped.next({item:this,currentIndex:r,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:i,dropPoint:n,event:e}),t.drop(this,r,this._initialIndex,this._initialContainer,s,i,n,e),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:t},{x:r,y:n}){let i=this._initialContainer._getSiblingContainerFromPosition(this,e,t);!i&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,t)&&(i=this._initialContainer),i&&i!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=i,this._dropContainer.enter(this,e,t,i===this._initialContainer&&i.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:i,currentIndex:i.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(r,n),this._dropContainer._sortItem(this,e,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(e,t):this._applyPreviewTransform(e-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let e=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);let t=this._preview.getTransitionDuration();return t===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(r=>{let n=o=>{(!o||this._preview&&qn(o)===this._preview.element&&o.propertyName==="transform")&&(s(),r(),clearTimeout(i))},i=setTimeout(n,t*1.5),s=this._preview.addEventListener("transitionend",n)}))}_createPlaceholderElement(){let e=this._placeholderTemplate,t=e?e.template:null,r;return t?(this._placeholderRef=e.viewContainer.createEmbeddedView(t,e.context),this._placeholderRef.detectChanges(),r=Yx(this._placeholderRef,this._document)):r=qx(this._rootElement),r.style.pointerEvents="none",r.classList.add("cdk-drag-placeholder"),r}_getPointerPositionInElement(e,t,r){let n=t===this._rootElement?null:t,i=n?n.getBoundingClientRect():e,s=su(r)?r.targetTouches[0]:r,o=this._getViewportScrollPosition(),a=s.pageX-i.left-o.left,l=s.pageY-i.top-o.top;return{x:i.left-e.left+a,y:i.top-e.top+l}}_getPointerPositionOnPage(e){let t=this._getViewportScrollPosition(),r=su(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,n=r.pageX-t.left,i=r.pageY-t.top;if(this._ownerSVGElement){let s=this._ownerSVGElement.getScreenCTM();if(s){let o=this._ownerSVGElement.createSVGPoint();return o.x=n,o.y=i,o.matrixTransform(s.inverse())}}return{x:n,y:i}}_getConstrainedPointerPosition(e){let t=this._dropContainer?this._dropContainer.lockAxis:null,{x:r,y:n}=this.constrainPosition?this.constrainPosition(e,this,this._initialDomRect,this._pickupPositionInElement):e;if(this.lockAxis==="x"||t==="x"?n=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||t==="y")&&(r=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:i,y:s}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,o=this._boundaryRect,{width:a,height:l}=this._getPreviewRect(),c=o.top+s,h=o.bottom-(l-s),d=o.left+i,f=o.right-(a-i);r=$x(r,d,f),n=$x(n,c,h)}return{x:r,y:n}}_updatePointerDirectionDelta(e){let{x:t,y:r}=e,n=this._pointerDirectionDelta,i=this._pointerPositionAtLastDirectionChange,s=Math.abs(t-i.x),o=Math.abs(r-i.y);return s>this._config.pointerDirectionChangeThreshold&&(n.x=t>i.x?1:-1,i.x=t),o>this._config.pointerDirectionChangeThreshold&&(n.y=r>i.y?1:-1,i.y=r),n}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,Sc(this._rootElement,e))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(e=>e()),this._rootElementCleanups=void 0}_applyRootElementTransform(e,t){let r=1/this.scale,n=Rh(e*r,t*r),i=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=i.transform&&i.transform!="none"?i.transform:""),i.transform=xh(n,this._initialTransform)}_applyPreviewTransform(e,t){let r=this._previewTemplate?.template?void 0:this._initialTransform,n=Rh(e,t);this._preview.setTransform(xh(n,r))}_getDragDistance(e){let t=this._pickupPositionOnPage;return t?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:t}=this._passiveTransform;if(e===0&&t===0||this.isDragging()||!this._boundaryElement)return;let r=this._rootElement.getBoundingClientRect(),n=this._boundaryElement.getBoundingClientRect();if(n.width===0&&n.height===0||r.width===0&&r.height===0)return;let i=n.left-r.left,s=r.right-n.right,o=n.top-r.top,a=r.bottom-n.bottom;n.width>r.width?(i>0&&(e+=i),s>0&&(e-=s)):e=0,n.height>r.height?(o>0&&(t+=o),a>0&&(t-=a)):t=0,(e!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:e})}_getDragStartDelay(e){let t=this.dragStartDelay;return typeof t=="number"?t:su(e)?t.touch:t?t.mouse:0}_updateOnScroll(e){let t=this._parentPositions.handleScroll(e);if(t){let r=qn(e);this._boundaryRect&&r!==this._boundaryElement&&r.contains(this._boundaryElement)&&cu(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=Ua(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,t){let r=this._previewContainer||"global";if(r==="parent")return e;if(r==="global"){let n=this._document;return t||n.fullscreenElement||n.webkitFullscreenElement||n.mozFullScreenElement||n.msFullscreenElement||n.body}return Kn(r)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=e=>{if(this._handles.length){let t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&e.preventDefault()}else this.disabled||e.preventDefault()};_getTargetHandle(e){return this._handles.find(t=>e.target&&(e.target===t||t.contains(e.target)))}};function $x(e,t,r){return Math.max(t,Math.min(r,e))}function su(e){return e.type[0]==="t"}function xU(e){e.preventDefault()}function Kx(e,t,r){let n=Wx(t,e.length-1),i=Wx(r,e.length-1);if(n===i)return;let s=e[n],o=i<n?-1:1;for(let a=n;a!==i;a+=o)e[a]=e[a+o];e[i]=s}function Wx(e,t){return Math.max(0,Math.min(t,e))}var Nh=class{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation="vertical";direction;constructor(e){this._dragDropRegistry=e}_previousSwap={drag:null,delta:0,overlaps:!1};start(e){this.withItems(e)}sort(e,t,r,n){let i=this._itemPositions,s=this._getItemIndexFromPointerPosition(e,t,r,n);if(s===-1&&i.length>0)return null;let o=this.orientation==="horizontal",a=i.findIndex(b=>b.drag===e),l=i[s],c=i[a].clientRect,h=l.clientRect,d=a>s?1:-1,f=this._getItemOffsetPx(c,h,d),g=this._getSiblingOffsetPx(a,i,d),m=i.slice();return Kx(i,a,s),i.forEach((b,I)=>{if(m[I]===b)return;let A=b.drag===e,F=A?f:g,V=A?e.getPlaceholderElement():b.drag.getRootElement();b.offset+=F;let M=Math.round(b.offset*(1/b.drag.scale));o?(V.style.transform=xh(`translate3d(${M}px, 0, 0)`,b.initialTransform),cu(b.clientRect,0,F)):(V.style.transform=xh(`translate3d(0, ${M}px, 0)`,b.initialTransform),cu(b.clientRect,F,0))}),this._previousSwap.overlaps=xE(h,t,r),this._previousSwap.drag=l.drag,this._previousSwap.delta=o?n.x:n.y,{previousIndex:a,currentIndex:s}}enter(e,t,r,n){let i=n==null||n<0?this._getItemIndexFromPointerPosition(e,t,r):n,s=this._activeDraggables,o=s.indexOf(e),a=e.getPlaceholderElement(),l=s[i];if(l===e&&(l=s[i+1]),!l&&(i==null||i===-1||i<s.length-1)&&this._shouldEnterAsFirstChild(t,r)&&(l=s[0]),o>-1&&s.splice(o,1),l&&!this._dragDropRegistry.isDragging(l)){let c=l.getRootElement();c.parentElement.insertBefore(a,c),s.splice(i,0,e)}else this._element.appendChild(a),s.push(e);a.style.transform="",this._cacheItemPositions()}withItems(e){this._activeDraggables=e.slice(),this._cacheItemPositions()}withSortPredicate(e){this._sortPredicate=e}reset(){this._activeDraggables?.forEach(e=>{let t=e.getRootElement();if(t){let r=this._itemPositions.find(n=>n.drag===e)?.initialTransform;t.style.transform=r||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(e){return(this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(t=>t.drag===e)}updateOnScroll(e,t){this._itemPositions.forEach(({clientRect:r})=>{cu(r,e,t)}),this._itemPositions.forEach(({drag:r})=>{this._dragDropRegistry.isDragging(r)&&r._sortFromLastPointerPosition()})}withElementContainer(e){this._element=e}_cacheItemPositions(){let e=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(t=>{let r=t.getVisibleElement();return{drag:t,offset:0,initialTransform:r.style.transform||"",clientRect:OE(r)}}).sort((t,r)=>e?t.clientRect.left-r.clientRect.left:t.clientRect.top-r.clientRect.top)}_getItemOffsetPx(e,t,r){let n=this.orientation==="horizontal",i=n?t.left-e.left:t.top-e.top;return r===-1&&(i+=n?t.width-e.width:t.height-e.height),i}_getSiblingOffsetPx(e,t,r){let n=this.orientation==="horizontal",i=t[e].clientRect,s=t[e+r*-1],o=i[n?"width":"height"]*r;if(s){let a=n?"left":"top",l=n?"right":"bottom";r===-1?o-=s.clientRect[a]-i[l]:o+=i[a]-s.clientRect[l]}return o}_shouldEnterAsFirstChild(e,t){if(!this._activeDraggables.length)return!1;let r=this._itemPositions,n=this.orientation==="horizontal";if(r[0].drag!==this._activeDraggables[0]){let i=r[r.length-1].clientRect;return n?e>=i.right:t>=i.bottom}else{let i=r[0].clientRect;return n?e<=i.left:t<=i.top}}_getItemIndexFromPointerPosition(e,t,r,n){let i=this.orientation==="horizontal",s=this._itemPositions.findIndex(({drag:o,clientRect:a})=>{if(o===e)return!1;if(n){let l=i?n.x:n.y;if(o===this._previousSwap.drag&&this._previousSwap.overlaps&&l===this._previousSwap.delta)return!1}return i?t>=Math.floor(a.left)&&t<Math.floor(a.right):r>=Math.floor(a.top)&&r<Math.floor(a.bottom)});return s===-1||!this._sortPredicate(s,e)?-1:s}},AE=class{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1};_relatedNodes=[];constructor(e,t){this._document=e,this._dragDropRegistry=t}start(e){let t=this._element.childNodes;this._relatedNodes=[];for(let r=0;r<t.length;r++){let n=t[r];this._relatedNodes.push([n,n.nextSibling])}this.withItems(e)}sort(e,t,r,n){let i=this._getItemIndexFromPointerPosition(e,t,r),s=this._previousSwap;if(i===-1||this._activeItems[i]===e)return null;let o=this._activeItems[i];if(s.drag===o&&s.overlaps&&s.deltaX===n.x&&s.deltaY===n.y)return null;let a=this.getItemIndex(e),l=e.getPlaceholderElement(),c=o.getRootElement();i>a?c.after(l):c.before(l),Kx(this._activeItems,a,i);let h=this._getRootNode().elementFromPoint(t,r);return s.deltaX=n.x,s.deltaY=n.y,s.drag=o,s.overlaps=c===h||c.contains(h),{previousIndex:a,currentIndex:i}}enter(e,t,r,n){let i=n==null||n<0?this._getItemIndexFromPointerPosition(e,t,r):n;i===-1&&(i=this._getClosestItemIndexToPointer(e,t,r));let s=this._activeItems[i],o=this._activeItems.indexOf(e);o>-1&&this._activeItems.splice(o,1),s&&!this._dragDropRegistry.isDragging(s)?(this._activeItems.splice(i,0,e),s.getRootElement().before(e.getPlaceholderElement())):(this._activeItems.push(e),this._element.appendChild(e.getPlaceholderElement()))}withItems(e){this._activeItems=e.slice()}withSortPredicate(e){this._sortPredicate=e}reset(){let e=this._element,t=this._previousSwap;for(let r=this._relatedNodes.length-1;r>-1;r--){let[n,i]=this._relatedNodes[r];n.parentNode===e&&n.nextSibling!==i&&(i===null?e.appendChild(n):i.parentNode===e&&e.insertBefore(n,i))}this._relatedNodes=[],this._activeItems=[],t.drag=null,t.deltaX=t.deltaY=0,t.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(e){return this._activeItems.indexOf(e)}updateOnScroll(){this._activeItems.forEach(e=>{this._dragDropRegistry.isDragging(e)&&e._sortFromLastPointerPosition()})}withElementContainer(e){e!==this._element&&(this._element=e,this._rootNode=void 0)}_getItemIndexFromPointerPosition(e,t,r){let n=this._getRootNode().elementFromPoint(Math.floor(t),Math.floor(r)),i=n?this._activeItems.findIndex(s=>{let o=s.getRootElement();return n===o||o.contains(n)}):-1;return i===-1||!this._sortPredicate(i,e)?-1:i}_getRootNode(){return this._rootNode||(this._rootNode=Ua(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(e,t,r){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let n=1/0,i=-1;for(let s=0;s<this._activeItems.length;s++){let o=this._activeItems[s];if(o!==e){let{x:a,y:l}=o.getRootElement().getBoundingClientRect(),c=Math.hypot(t-a,r-l);c<n&&(n=c,i=s)}}return i}},Gx=.05,Zx=.05,Ir=function(e){return e[e.NONE=0]="NONE",e[e.UP=1]="UP",e[e.DOWN=2]="DOWN",e}(Ir||{}),jn=function(e){return e[e.NONE=0]="NONE",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e}(jn||{}),ME=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis;autoScrollDisabled=!1;autoScrollStep=2;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new ie;entered=new ie;exited=new ie;dropped=new ie;sorted=new ie;receivingStarted=new ie;receivingStopped=new ie;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=mt.EMPTY;_verticalScrollDirection=Ir.NONE;_horizontalScrollDirection=jn.NONE;_scrollNode;_stopScrollTimers=new ie;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(e,t,r,n,i){this._dragDropRegistry=t,this._ngZone=n,this._viewportRuler=i;let s=this.element=Kn(e);this._document=r,this.withOrientation("vertical").withElementContainer(s),t.registerDropContainer(this),this._parentPositions=new Th(r)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(e,t,r,n){this._draggingStarted(),n==null&&this.sortingDisabled&&(n=this._draggables.indexOf(e)),this._sortStrategy.enter(e,t,r,n),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}exit(e){this._reset(),this.exited.next({item:e,container:this})}drop(e,t,r,n,i,s,o,a={}){this._reset(),this.dropped.next({item:e,currentIndex:t,previousIndex:r,container:this,previousContainer:n,isPointerOverContainer:i,distance:s,dropPoint:o,event:a})}withItems(e){let t=this._draggables;return this._draggables=e,e.forEach(r=>r._withDropContainer(this)),this.isDragging()&&(t.filter(r=>r.isDragging()).every(r=>e.indexOf(r)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(e){return this._direction=e,this._sortStrategy instanceof Nh&&(this._sortStrategy.direction=e),this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){if(e==="mixed")this._sortStrategy=new AE(this._document,this._dragDropRegistry);else{let t=new Nh(this._dragDropRegistry);t.direction=this._direction,t.orientation=e,this._sortStrategy=t}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((t,r)=>this.sortPredicate(t,r,this)),this}withScrollableParents(e){let t=this._container;return this._scrollableElements=e.indexOf(t)===-1?[t,...e]:e.slice(),this}withElementContainer(e){if(e===this._container)return this;let t=Kn(this.element),r=this._scrollableElements.indexOf(this._container),n=this._scrollableElements.indexOf(e);return r>-1&&this._scrollableElements.splice(r,1),n>-1&&this._scrollableElements.splice(n,1),this._sortStrategy&&this._sortStrategy.withElementContainer(e),this._cachedShadowRoot=null,this._scrollableElements.unshift(e),this._container=e,this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?this._sortStrategy.getItemIndex(e):this._draggables.indexOf(e)}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,t,r,n){if(this.sortingDisabled||!this._domRect||!Lx(this._domRect,Gx,t,r))return;let i=this._sortStrategy.sort(e,t,r,n);i&&this.sorted.next({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:e})}_startScrollingIfNecessary(e,t){if(this.autoScrollDisabled)return;let r,n=Ir.NONE,i=jn.NONE;if(this._parentPositions.positions.forEach((s,o)=>{o===this._document||!s.clientRect||r||Lx(s.clientRect,Gx,e,t)&&([n,i]=RU(o,s.clientRect,this._direction,e,t),(n||i)&&(r=o))}),!n&&!i){let{width:s,height:o}=this._viewportRuler.getViewportSize(),a={width:s,height:o,top:0,right:s,bottom:o,left:0};n=Xx(a,t),i=Jx(a,e),r=window}r&&(n!==this._verticalScrollDirection||i!==this._horizontalScrollDirection||r!==this._scrollNode)&&(this._verticalScrollDirection=n,this._horizontalScrollDirection=i,this._scrollNode=r,(n||i)&&r?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let e=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let e=this._container.style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(t=>t._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),em(0,Su).pipe(Gr(this._stopScrollTimers)).subscribe(()=>{let e=this._scrollNode,t=this.autoScrollStep;this._verticalScrollDirection===Ir.UP?e.scrollBy(0,-t):this._verticalScrollDirection===Ir.DOWN&&e.scrollBy(0,t),this._horizontalScrollDirection===jn.LEFT?e.scrollBy(-t,0):this._horizontalScrollDirection===jn.RIGHT&&e.scrollBy(t,0)})};_isOverContainer(e,t){return this._domRect!=null&&xE(this._domRect,e,t)}_getSiblingContainerFromPosition(e,t,r){return this._siblings.find(n=>n._canReceive(e,t,r))}_canReceive(e,t,r){if(!this._domRect||!xE(this._domRect,t,r)||!this.enterPredicate(e,this))return!1;let n=this._getShadowRoot().elementFromPoint(t,r);return n?n===this._container||this._container.contains(n):!1}_startReceiving(e,t){let r=this._activeSiblings;!r.has(e)&&t.every(n=>this.enterPredicate(n,this)||this._draggables.indexOf(n)>-1)&&(r.add(e),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:e,receiver:this,items:t}))}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:e,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){let t=this._parentPositions.handleScroll(e);t&&this._sortStrategy.updateOnScroll(t.top,t.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let e=Ua(this._container);this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let e=this._sortStrategy.getActiveItemsSnapshot().filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,e))}};function Xx(e,t){let{top:r,bottom:n,height:i}=e,s=i*Zx;return t>=r-s&&t<=r+s?Ir.UP:t>=n-s&&t<=n+s?Ir.DOWN:Ir.NONE}function Jx(e,t){let{left:r,right:n,width:i}=e,s=i*Zx;return t>=r-s&&t<=r+s?jn.LEFT:t>=n-s&&t<=n+s?jn.RIGHT:jn.NONE}function RU(e,t,r,n,i){let s=Xx(t,i),o=Jx(t,n),a=Ir.NONE,l=jn.NONE;if(s){let c=e.scrollTop;s===Ir.UP?c>0&&(a=Ir.UP):e.scrollHeight-c>e.clientHeight&&(a=Ir.DOWN)}if(o){let c=e.scrollLeft;r==="rtl"?o===jn.RIGHT?c<0&&(l=jn.RIGHT):e.scrollWidth+c>e.clientWidth&&(l=jn.LEFT):o===jn.LEFT?c>0&&(l=jn.LEFT):e.scrollWidth-c>e.clientWidth&&(l=jn.RIGHT)}return[a,l]}var au={capture:!0},TE={passive:!1,capture:!0},NU=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275cmp=ct({type:e,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(r,n){},styles:[`@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}
80
80
  `],encapsulation:2,changeDetection:0})}return e})(),Qx=(()=>{class e{_ngZone=O(Ve);_document=O(nt);_styleLoader=O(ws);_renderer=O(un).createRenderer(null,null);_cleanupDocumentTouchmove;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=Bi([]);_globalListeners;_draggingPredicate=r=>r.isDragging();_domNodesToDirectives=null;pointerMove=new ie;pointerUp=new ie;scroll=new ie;constructor(){}registerDropContainer(r){this._dropInstances.has(r)||this._dropInstances.add(r)}registerDragItem(r){this._dragInstances.add(r),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=Cn(this._renderer,this._document,"touchmove",this._persistentTouchmoveListener,TE)})}removeDropContainer(r){this._dropInstances.delete(r)}removeDragItem(r){this._dragInstances.delete(r),this.stopDragging(r),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.()}startDragging(r,n){if(!(this._activeDragInstances().indexOf(r)>-1)&&(this._styleLoader.load(NU),this._activeDragInstances.update(i=>[...i,r]),this._activeDragInstances().length===1)){let i=n.type.startsWith("touch"),s=a=>this.pointerUp.next(a),o=[["scroll",a=>this.scroll.next(a),au],["selectstart",this._preventDefaultWhileDragging,TE]];i?o.push(["touchend",s,au],["touchcancel",s,au]):o.push(["mouseup",s,au]),i||o.push(["mousemove",a=>this.pointerMove.next(a),TE]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=o.map(([a,l,c])=>Cn(this._renderer,this._document,a,l,c))})}}stopDragging(r){this._activeDragInstances.update(n=>{let i=n.indexOf(r);return i>-1?(n.splice(i,1),[...n]):n}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(r){return this._activeDragInstances().indexOf(r)>-1}scrolled(r){let n=[this.scroll];return r&&r!==this._document&&n.push(new ot(i=>this._ngZone.runOutsideAngular(()=>{let s=Cn(this._renderer,r,"scroll",o=>{this._activeDragInstances().length&&i.next(o)},au);return()=>{s()}}))),no(...n)}registerDirectiveNode(r,n){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(r,n)}removeDirectiveNode(r){this._domNodesToDirectives?.delete(r)}getDragDirectiveForNode(r){return this._domNodesToDirectives?.get(r)||null}ngOnDestroy(){this._dragInstances.forEach(r=>this.removeDragItem(r)),this._dropInstances.forEach(r=>this.removeDropContainer(r)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_preventDefaultWhileDragging=r=>{this._activeDragInstances().length>0&&r.preventDefault()};_persistentTouchmoveListener=r=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&r.preventDefault(),this.pointerMove.next(r))};_clearGlobalListeners(){this._globalListeners?.forEach(r=>r()),this._globalListeners=void 0}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),AU={dragStartThreshold:5,pointerDirectionChangeThreshold:5},MU=(()=>{class e{_document=O(nt);_ngZone=O(Ve);_viewportRuler=O(Al);_dragDropRegistry=O(Qx);_renderer=O(un).createRenderer(null,null);constructor(){}createDrag(r,n=AU){return new NE(r,n,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry,this._renderer)}createDropList(r){return new ME(r,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),zx=new he("CDK_DRAG_PARENT"),OU=new he("CdkDragHandle"),PU=new he("CDK_DRAG_CONFIG"),kU=new he("CdkDropList"),eR=(()=>{class e{element=O(Nt);dropContainer=O(kU,{optional:!0,skipSelf:!0});_ngZone=O(Ve);_viewContainerRef=O(ni);_dir=O(bs,{optional:!0});_changeDetectorRef=O(Vr);_selfHandle=O(OU,{optional:!0,self:!0});_parentDrag=O(zx,{optional:!0,skipSelf:!0});_dragDropRegistry=O(Qx);_destroyed=new ie;_handles=new xr([]);_previewTemplate;_placeholderTemplate;_dragRef;data;lockAxis;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!!(this.dropContainer&&this.dropContainer.disabled)}set disabled(r){this._disabled=r,this._dragRef.disabled=this._disabled}_disabled;constrainPosition;previewClass;previewContainer;scale=1;started=new We;released=new We;ended=new We;entered=new We;exited=new We;dropped=new We;moved=new ot(r=>{let n=this._dragRef.moved.pipe(ur(i=>({source:this,pointerPosition:i.pointerPosition,event:i.event,delta:i.delta,distance:i.distance}))).subscribe(r);return()=>{n.unsubscribe()}});_injector=O(yt);constructor(){let r=this.dropContainer,n=O(PU,{optional:!0}),i=O(MU);this._dragRef=i.createDrag(this.element,{dragStartThreshold:n&&n.dragStartThreshold!=null?n.dragStartThreshold:5,pointerDirectionChangeThreshold:n&&n.pointerDirectionChangeThreshold!=null?n.pointerDirectionChangeThreshold:5,zIndex:n?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),n&&this._assignDefaults(n),r&&(this._dragRef._withDropContainer(r._dropListRef),r.addItem(this),r._dropListRef.beforeStarted.pipe(Gr(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(r){this._dragRef.setFreeDragPosition(r)}ngAfterViewInit(){Qr(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(r){let n=r.rootElementSelector,i=r.freeDragPosition;n&&!n.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,i&&!i.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(r){let n=this._handles.getValue();n.push(r),this._handles.next(n)}_removeHandle(r){let n=this._handles.getValue(),i=n.indexOf(r);i>-1&&(n.splice(i,1),this._handles.next(n))}_setPreviewTemplate(r){this._previewTemplate=r}_resetPreviewTemplate(r){r===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(r){this._placeholderTemplate=r}_resetPlaceholderTemplate(r){r===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let r=this.element.nativeElement,n=r;this.rootElementSelector&&(n=r.closest!==void 0?r.closest(this.rootElementSelector):r.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(n||r)}_getBoundaryElement(){let r=this.boundaryElement;return r?typeof r=="string"?this.element.nativeElement.closest(r):Kn(r):null}_syncInputs(r){r.beforeStarted.subscribe(()=>{if(!r.isDragging()){let n=this._dir,i=this.dragStartDelay,s=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,o=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;r.disabled=this.disabled,r.lockAxis=this.lockAxis,r.scale=this.scale,r.dragStartDelay=typeof i=="object"&&i?i:g_(i),r.constrainPosition=this.constrainPosition,r.previewClass=this.previewClass,r.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(s).withPreviewTemplate(o).withPreviewContainer(this.previewContainer||"global"),n&&r.withDirection(n.value)}}),r.beforeStarted.pipe(tm(1)).subscribe(()=>{if(this._parentDrag){r.withParent(this._parentDrag._dragRef);return}let n=this.element.nativeElement.parentElement;for(;n;){let i=this._dragDropRegistry.getDragDirectiveForNode(n);if(i){r.withParent(i._dragRef);break}n=n.parentElement}})}_handleEvents(r){r.started.subscribe(n=>{this.started.emit({source:this,event:n.event}),this._changeDetectorRef.markForCheck()}),r.released.subscribe(n=>{this.released.emit({source:this,event:n.event})}),r.ended.subscribe(n=>{this.ended.emit({source:this,distance:n.distance,dropPoint:n.dropPoint,event:n.event}),this._changeDetectorRef.markForCheck()}),r.entered.subscribe(n=>{this.entered.emit({container:n.container.data,item:this,currentIndex:n.currentIndex})}),r.exited.subscribe(n=>{this.exited.emit({container:n.container.data,item:this})}),r.dropped.subscribe(n=>{this.dropped.emit({previousIndex:n.previousIndex,currentIndex:n.currentIndex,previousContainer:n.previousContainer.data,container:n.container.data,isPointerOverContainer:n.isPointerOverContainer,item:this,distance:n.distance,dropPoint:n.dropPoint,event:n.event})})}_assignDefaults(r){let{lockAxis:n,dragStartDelay:i,constrainPosition:s,previewClass:o,boundaryElement:a,draggingDisabled:l,rootElementSelector:c,previewContainer:h}=r;this.disabled=l??!1,this.dragStartDelay=i||0,n&&(this.lockAxis=n),s&&(this.constrainPosition=s),o&&(this.previewClass=o),a&&(this.boundaryElement=a),c&&(this.rootElementSelector=c),h&&(this.previewContainer=h)}_setupHandlesListener(){this._handles.pipe(rm(r=>{let n=r.map(i=>i.element);this._selfHandle&&this.rootElementSelector&&n.push(this.element),this._dragRef.withHandles(n)}),Ks(r=>no(...r.map(n=>n._stateChanges.pipe(Ti(n))))),Gr(this._destroyed)).subscribe(r=>{let n=this._dragRef,i=r.element.nativeElement;r.disabled?n.disableHandle(i):n.enableHandle(i)})}static \u0275fac=function(r){return new(r||e)};static \u0275dir=kr({type:e,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(r,n){r&2&&ii("cdk-drag-disabled",n.disabled)("cdk-drag-dragging",n._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",ga],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",vv]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[Vd([{provide:zx,useExisting:e}]),ua]})}return e})(),LU=e=>({"lc:cursor-grab":e}),tR=(e,t)=>t.url;function FU(e,t){if(e&1&&Ne(0,"source",9),e&2){let r=t.$implicit;bn("type",r.mimeType),Fr("media","(max-width: ",r.width,"px)"),be("src",r.url,zt)}}function BU(e,t){if(e&1&&Ne(0,"source",10),e&2){let r=t.$implicit;bn("type",r.mimeType),be("src",r.url,zt)}}var Ah=class I0{constructor(t){this.elementRef=t}video;closeClicked=new We;videoClicked=new We;isDragging=!1;VideoUtils=Xi;ngOnInit(){let t=this.elementRef.nativeElement.parentElement.parentElement;t.style.zIndex="2147483647"}close(){this.closeClicked.emit()}onVideoClick(){if(this.isDragging){this.isDragging=!1;return}this.videoClicked.emit()}static \u0275fac=function(t){return new(t||I0)(bt(Nt))};static \u0275cmp=ct({type:I0,selectors:[["cooee-draggable-video-popup"]],inputs:{video:"video"},outputs:{closeClicked:"closeClicked",videoClicked:"videoClicked"},decls:13,vars:5,consts:[["cdkDrag","",1,"lc:shadow-2xl","lc:fixed","lc:right-10","lc:bottom-10","lc:rounded-lg","lc:max-w-[100px]","lc:flex","lc:justify-center","lc:items-center",3,"cdkDragMoved","ngClass","cdkDragBoundary"],["id","lc-close-button",1,"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:absolute"],["xmlns","http://www.w3.org/2000/svg","height","80px","viewBox","0 0 24 24","width","80px","fill","#FFFFFF"],["d","M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18c.62-.39.62-1.29 0-1.69L9.54 5.98C8.87 5.55 8 6.03 8 6.82"],["autoplay","","loop","",1,"lc:rounded-lg","lc:w-full",3,"click","muted"],[3,"src","type","media"],[3,"src","type"]],template:function(t,r){t&1&&(K(0,"div",0),Qe("cdkDragMoved",function(){return r.isDragging=!0}),K(1,"button",1),Qe("click",function(){return r.close()}),zn(),K(2,"svg",2),Ne(3,"path",3)(4,"path",4),X()(),Fi(),K(5,"button",5),zn(),K(6,"svg",6),Ne(7,"path",7),X()(),Fi(),K(8,"video",8),Qe("click",function(){return r.onVideoClick()}),Mt(9,FU,1,4,"source",9,tR),Mt(11,BU,1,2,"source",10,tR),X()()),t&2&&(be("ngClass",ma(3,LU,r.isDragging))("cdkDragBoundary","body"),Y(8),be("muted",!0),Y(),Ot(r.video.sources),Y(2),Ot(r.VideoUtils.getBestSources(r.video.sources)))},dependencies:[$d,eR],encapsulation:2})},Mh=(e,t)=>t.url;function VU(e,t){if(e&1&&(K(0,"div",0),$t(1),X()),e&2){q();let r=mr(1);Y(),hr(" ",r," ")}}function UU(e,t){if(e&1&&Ne(0,"source",6),e&2){let r=t.$implicit;bn("type",r.mimeType),Fr("media","(max-width: ",r.width,"px)"),be("src",r.url,zt)}}function HU(e,t){if(e&1&&Ne(0,"source",7),e&2){let r=t.$implicit;bn("type",r.mimeType),be("src",r.url,zt)}}function jU(e,t){if(e&1&&(K(0,"div",8)(1,"span",10),$t(2),X(),K(3,"span",11),$t(4),Qn(5,"cooeeCurrency"),X()()),e&2){q();let r=mr(0);Y(2),hr(" ",r.name," "),Y(2),hr(" ",gr(5,2,r.price)," ")}}function $U(e,t){if(e&1){let r=fn();K(0,"div",12),Qe("click",function(){ze(r);let n=q().$implicit,i=mr(0),s=q(2);return qe(s.addToCartClicked(n,i))})("keydown",function(){ze(r);let n=q().$implicit,i=mr(0),s=q(2);return qe(s.addToCartClicked(n,i))}),$t(1," Add to cart "),X()}}function WU(e,t){if(e&1){let r=fn();Br(0),K(1,"div",3)(2,"div",4),Qe("click",function(){let n=ze(r),i=n.$implicit,s=n.$index,o=mr(0),a=q(2);return qe(a.onClick(i,o,s))})("keydown",function(){let n=ze(r),i=n.$implicit,s=n.$index,o=mr(0),a=q(2);return qe(a.onClick(i,o,s))}),K(3,"video",5),Mt(4,UU,1,4,"source",6,Mh),Mt(6,HU,1,2,"source",7,Mh),X(),At(8,jU,6,4,"div",8),X(),At(9,$U,2,0,"div",9),X()}if(e&2){let r=t.$implicit,n=q(2),i=mr(4);ho(r.items==null?null:r.items[0]),Y(3),be("muted",!0),Y(),Ot(r.sources),Y(2),Ot(n.VideoUtils.getBestSources(r.sources)),Y(2),Vt(i?8:-1),Y(),Vt(i?9:-1)}}function GU(e,t){if(e&1&&(K(0,"div",1),Mt(1,WU,10,4,"div",3,Lr),X()),e&2){let r=q();Y(),Ot(r.videos)}}function zU(e,t){if(e&1&&Ne(0,"source",6),e&2){let r=t.$implicit;bn("type",r.mimeType),Fr("media","(max-width: ",r.width,"px)"),be("src",r.url,zt)}}function qU(e,t){if(e&1&&Ne(0,"source",7),e&2){let r=t.$implicit;bn("type",r.mimeType),be("src",r.url,zt)}}function YU(e,t){if(e&1){let r=fn();Br(0),K(1,"div",13),zn(),K(2,"svg",14),Ne(3,"circle",15)(4,"circle",16),X(),Fi(),K(5,"div",17)(6,"video",18),Qe("click",function(){let n=ze(r),i=n.$implicit,s=n.$index,o=mr(0),a=q(2);return qe(a.onClick(i,o,s))}),Mt(7,zU,1,4,"source",6,Mh),Mt(9,qU,1,2,"source",7,Mh),X()()()}if(e&2){let r=t.$implicit,n=q(2);ho(r.items==null?null:r.items[0]),Y(6),be("muted",!0),Y(),Ot(r.sources),Y(2),Ot(n.VideoUtils.getBestSources(r.sources))}}function KU(e,t){if(e&1&&(K(0,"div",2),Mt(1,YU,11,2,"div",13,Lr),X()),e&2){let r=q();Y(),Ot(r.videos)}}function ZU(e,t){if(e&1){let r=fn();K(0,"cooee-draggable-video-popup",20),Qe("videoClicked",function(){ze(r),q();let n=mr(0),i=mr(1),s=mr(2),o=q();return qe(o.onPopupVideoClick(i,s,n))})("closeClicked",function(){ze(r);let n=q(2);return qe(n.onPopupVideoClosed())}),X()}if(e&2){let r=q(2);be("video",r.videos[0])}}function XU(e,t){if(e&1&&(Br(0)(1)(2),At(3,ZU,1,1,"cooee-draggable-video-popup",19)),e&2){let r=q(),n=ho(0);Y();let i=ho(r.videos[n]);Y(),ho(i.items[0]),Y(),Vt(r.hidePopupVideo?-1:3)}}var Oh=class T0{constructor(t,r){this.dialog=t,this.cdr=r}sendEvent=new We;videos;VideoUtils=Xi;VideoConfigSource=wE;VideoConfigTemplate=bE;hidePopupVideo;_triggerContext=Bi(null);dialogRef=null;currentDialogData=null;get triggerContext(){return this._triggerContext()}set triggerContext(t){this._triggerContext.set(t),this.videos=t.triggerData.content?.videoConfig?.videos}onResize(){!this.dialogRef||!this.currentDialogData||this.openDialog(this.currentDialogData.videos[0],this.currentDialogData.currentIndex,!0)}sendTriggerClicked(t,r){let n=new ke(k.EVENT_TRIGGER_CLICKED,{},this.triggerContext?.triggerData);n.videos=[t.id],n.items=[r],this.sendEvent.emit(n)}onClick(t,r,n){this.sendTriggerClicked(t,r),this.openDialog(t,n)}performCTA(t){let r;if(t.cta===lu.ClickActionType.ADD_TO_CART)r=k.EVENT_ADD_TO_CART_CLICKED;else if(t.cta===lu.ClickActionType.GO_TO_PRODUCT)r=k.EVENT_VIEW_ITEM_CLICKED;else if(t.cta===lu.ClickActionType.OPEN_CART)r=k.EVENT_OPEN_CART_CLICKED;else return;let n=new ke(r,{},this.triggerContext?.triggerData);n.videos=[t.video.id],n.items=[t.item],this.sendEvent.emit(n),Xi.performCTA(this.triggerContext,t)}addToCartClicked(t,r){this.performCTA({cta:lu.ClickActionType.ADD_TO_CART,item:r,video:t})}onPopupVideoClick(t,r,n){this.hidePopupVideo=!0,this.onClick(t,r,n),this.dialogRef?.closed.subscribe(()=>{this.hidePopupVideo=!1,this.cdr.detectChanges()})}onPopupVideoClosed(){this.hidePopupVideo=!0;let t=(new Date().getTime()-this.triggerContext.startTime.getTime())/1e3,r=new ke(k.EVENT_TRIGGER_CLOSED,{duration:t},this.triggerContext?.triggerData);this.sendEvent.emit(r)}isMobile(){return new nR.default().getDevice().type==="mobile"}openDialog(t,r,n=!1){let i=this.isMobile()?bh:wh,s={videos:this.videos,currentIndex:r,triggerContext:this.triggerContext,onCTAPerformed:o=>this.performCTA(o)};if(this.dialogRef&&this.dialogRef.close(),this.dialogRef=this.dialog.open(i,{width:"100vw",height:"100vh",data:s}),this.currentDialogData=s,this.dialogRef&&!n){let o={videoID:t.id,videoIndex:r},a=new ke(k.EVENT_VIDEO_DIALOG_OPENED,{current:o},this.triggerContext?.triggerData);a.videos=[t.id],this.sendEvent.emit(a)}this.dialogRef.closed.subscribe(o=>{if(!o)return;let a={videoID:o.lastVideo.id,videoIndex:o?.lastVideoIndex},l=new ke(k.EVENT_VIDEO_DIALOG_CLOSED,{current:a},this.triggerContext?.triggerData);l.videos=[o.lastVideo.id],this.sendEvent.emit(l),this.dialogRef=null,this.currentDialogData=null})}static \u0275fac=function(t){return new(t||T0)(bt(ET),bt(Vr))};static \u0275cmp=ct({type:T0,selectors:[["cooee-shoppable-videos"]],hostBindings:function(t,r){t&1&&Qe("resize",function(){return r.onResize()},!1,nS)},inputs:{triggerContext:"triggerContext"},outputs:{sendEvent:"sendEvent"},decls:9,vars:4,consts:[["id","lc-heading-text",1,"lc:mb-2","lc:text-lg","lc:text-center","lc:font-bold"],["id","lc-video-swiper",1,"lc:flex","lc:overflow-auto","lc:m-3","lc:gap-10","lc:justify-center","lc:items-center"],["id","lc-video-stories",1,"lc:flex","lc:overflow-auto","lc:m-3","lc:gap-3","lc:justify-center","lc:items-center"],[1,"lc-video-parent","lc:flex","lc:flex-col","lc:gap-1"],["id","lc-video","tabindex","{0}",1,"lc-video-card","lc:cursor-pointer","lc:rounded-lg","lc:min-w-[200px]",3,"click","keydown"],["width","100%","autoplay","","loop","",1,"lc:rounded-lg","lc:transition-transform","lc:duration-300",3,"muted"],[3,"src","type","media"],[3,"src","type"],["id","lc-single-product",1,"lc:w-full","lc:flex","lc:flex-col","lc:gap-1","lc:text-sm","lc:mt-1","lc:mb-1"],["id","lc-cta-button","tabindex","{0}",1,"lc:rounded","lc:w-full","lc:h-auto","lc:text-center","lc:font-normal","lc:cursor-pointer","lc:bg-black","lc:text-white","lc:z-4","lc:p-1"],["id","lc-item-name",1,"lc:font-semibold","lc:line-clamp-1"],["id","lc-item-price",1,"lc:font-medium"],["id","lc-cta-button","tabindex","{0}",1,"lc:rounded","lc:w-full","lc:h-auto","lc:text-center","lc:font-normal","lc:cursor-pointer","lc:bg-black","lc:text-white","lc:z-4","lc:p-1",3,"click","keydown"],["id","lc-video-story",1,"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","animate-progress"],[1,"lc:w-full","lc:h-full","lc:rounded-full","lc:overflow-hidden"],["id","lc-video","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(t,r){if(t&1&&(Br(0)(1),At(2,VU,2,1,"div",0),Br(3)(4)(5),At(6,GU,3,0,"div",1)(7,KU,3,0,"div",2)(8,XU,4,4)),t&2){let n=r.triggerContext==null||r.triggerContext.triggerData==null||r.triggerContext.triggerData.content==null?null:r.triggerContext.triggerData.content.videoConfig;Y();let i=ho(n==null?null:n.heading);Y(),Vt(i?2:-1);let s=n==null?null:n.source;Y(2),ho(s===r.VideoConfigSource.GALLERY);let o=n==null?null:n.template;Y(2),Vt(o===r.VideoConfigTemplate.SWIPER?6:o===r.VideoConfigTemplate.STORY?7:o===r.VideoConfigTemplate.FLOATING_POPUP?8:-1)}},dependencies:[pi,Ah],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:block}.lc-video-card[_ngcontent-%COMP%] > video[_ngcontent-%COMP%]:hover{scale:1.1}.animate-progress[_ngcontent-%COMP%]{stroke-dasharray:100 241.6;stroke-dashoffset:0;transition:stroke-dashoffset .3s;transform-origin:50% 50%;animation:_ngcontent-%COMP%_snake-rotate 2.5s linear infinite}@keyframes _ngcontent-%COMP%_snake-rotate{to{transform:rotate(360deg)}}']})};C.configure("CooeeWidgetSDK");(async()=>{let e=await w0(S0),t=(r,n)=>{let i=t0(r,{injector:e.injector});customElements.define(n,i)};t(Vf,"cooee-progressbar"),t(Oh,"cooee-shoppable-videos")})();})();