@kakarot2905/quizzie-module 0.1.0

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.
@@ -0,0 +1 @@
1
+ import{C as h,E as M,F,I as o,M as E,P as u,R as v,U as Z,Z as C,a as p,b as _,h as te,ha as c,i as ie,j as ne,n as P,o as d,pa as re,q as W,r as y,ra as se,sa as k,ta as X,u as A,w as q,x as l,z}from"./chunk-UNSARXTF.js";var ge=(()=>{class i{constructor(e,n){this._renderer=e,this._elementRef=n,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,n){this._renderer.setProperty(this._elementRef.nativeElement,e,n)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static{this.\u0275fac=function(n){return new(n||i)(o(E),o(M))}}static{this.\u0275dir=l({type:i})}}return i})(),H=(()=>{class i extends ge{static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=h(i)))(r||i)}})()}static{this.\u0275dir=l({type:i,features:[u]})}}return i})(),O=new y("");var Pe={provide:O,useExisting:d(()=>me),multi:!0};function ke(){let i=X()?X().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var Ge=new y(""),me=(()=>{class i extends ge{constructor(e,n,r){super(e,n),this._compositionMode=r,this._composing=!1,this._compositionMode==null&&(this._compositionMode=!ke())}writeValue(e){let n=e??"";this.setProperty("value",n)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static{this.\u0275fac=function(n){return new(n||i)(o(E),o(M),o(Ge,8))}}static{this.\u0275dir=l({type:i,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(n,r){n&1&&C("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)})},features:[c([Pe]),u]})}}return i})();function m(i){return i==null||(typeof i=="string"||Array.isArray(i))&&i.length===0}function _e(i){return i!=null&&typeof i.length=="number"}var g=new y(""),ye=new y(""),Te=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function je(i){return t=>{if(m(t.value)||m(i))return null;let e=parseFloat(t.value);return!isNaN(e)&&e<i?{min:{min:i,actual:t.value}}:null}}function Be(i){return t=>{if(m(t.value)||m(i))return null;let e=parseFloat(t.value);return!isNaN(e)&&e>i?{max:{max:i,actual:t.value}}:null}}function Re(i){return m(i.value)?{required:!0}:null}function Ue(i){return m(i.value)||Te.test(i.value)?null:{email:!0}}function He(i){return t=>m(t.value)||!_e(t.value)?null:t.value.length<i?{minlength:{requiredLength:i,actualLength:t.value.length}}:null}function Le(i){return t=>_e(t.value)&&t.value.length>i?{maxlength:{requiredLength:i,actualLength:t.value.length}}:null}function oe(i){return null}function ve(i){return i!=null}function Ce(i){return re(i)?te(i):i}function Ve(i){let t={};return i.forEach(e=>{t=e!=null?p(p({},t),e):t}),Object.keys(t).length===0?null:t}function De(i,t){return t.map(e=>e(i))}function $e(i){return!i.validate}function be(i){return i.map(t=>$e(t)?t:e=>t.validate(e))}function We(i){if(!i)return null;let t=i.filter(ve);return t.length==0?null:function(e){return Ve(De(e,t))}}function K(i){return i!=null?We(be(i)):null}function qe(i){if(!i)return null;let t=i.filter(ve);return t.length==0?null:function(e){let n=De(e,t).map(Ce);return ne(n).pipe(ie(Ve))}}function J(i){return i!=null?qe(be(i)):null}function ae(i,t){return i===null?[t]:Array.isArray(i)?[...i,t]:[i,t]}function ze(i){return i._rawValidators}function Ze(i){return i._rawAsyncValidators}function Y(i){return i?Array.isArray(i)?i:[i]:[]}function T(i,t){return Array.isArray(i)?i.includes(t):i===t}function le(i,t){let e=Y(t);return Y(i).forEach(r=>{T(e,r)||e.push(r)}),e}function ue(i,t){return Y(t).filter(e=>!T(i,e))}var j=class{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=K(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=J(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,e){return this.control?this.control.hasError(t,e):!1}getError(t,e){return this.control?this.control.getError(t,e):null}},D=class extends j{get formDirective(){return null}get path(){return null}},S=class extends j{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},B=class{constructor(t){this._cd=t}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}},Xe={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},ei=_(p({},Xe),{"[class.ng-submitted]":"isSubmitted"}),ti=(()=>{class i extends B{constructor(e){super(e)}static{this.\u0275fac=function(n){return new(n||i)(o(S,2))}}static{this.\u0275dir=l({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,r){n&2&&Z("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},features:[u]})}}return i})(),ii=(()=>{class i extends B{constructor(e){super(e)}static{this.\u0275fac=function(n){return new(n||i)(o(D,10))}}static{this.\u0275dir=l({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(n,r){n&2&&Z("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},features:[u]})}}return i})();var w="VALID",G="INVALID",V="PENDING",I="DISABLED";function Ae(i){return(L(i)?i.validators:i)||null}function Ye(i){return Array.isArray(i)?K(i):i||null}function Me(i,t){return(L(t)?t.asyncValidators:i)||null}function Ke(i){return Array.isArray(i)?J(i):i||null}function L(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}function Je(i,t,e){let n=i.controls;if(!(t?Object.keys(n):n).length)throw new P(1e3,"");if(!n[e])throw new P(1001,"")}function Qe(i,t,e){i._forEachChild((n,r)=>{if(e[r]===void 0)throw new P(1002,"")})}var R=class{constructor(t,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get valid(){return this.status===w}get invalid(){return this.status===G}get pending(){return this.status==V}get disabled(){return this.status===I}get enabled(){return this.status!==I}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(le(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(le(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(ue(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(ue(t,this._rawAsyncValidators))}hasValidator(t){return T(this._rawValidators,t)}hasAsyncValidator(t){return T(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status=V,t.emitEvent!==!1&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=I,this.errors=null,this._forEachChild(n=>{n.disable(_(p({},t),{onlySelf:!0}))}),this._updateValue(),t.emitEvent!==!1&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(_(p({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(n=>n(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=w,this._forEachChild(n=>{n.enable(_(p({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(_(p({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===w||this.status===V)&&this._runAsyncValidator(t.emitEvent)),t.emitEvent!==!1&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?I:w}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=V,this._hasOwnPendingAsyncValidator=!0;let e=Ce(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(n=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(n,{emitEvent:t})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==!1)}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((n,r)=>n&&n._find(r),this)}getError(t,e){let n=e?this.get(e):this;return n&&n.errors?n.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new F,this.statusChanges=new F}_calculateStatus(){return this._allControlsDisabled()?I:this.errors?G:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(V)?V:this._anyControlsHaveStatus(G)?G:w}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){L(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let e=this._parent&&this._parent.dirty;return!t&&!!e&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=Ye(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=Ke(this._rawAsyncValidators)}},U=class extends R{constructor(t,e,n){super(Ae(e),Me(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,n={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,n={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){Qe(this,!0,t),Object.keys(t).forEach(n=>{Je(this,!0,n),this.controls[n].setValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(n=>{let r=this.controls[n];r&&r.patchValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((n,r)=>{n.reset(t?t[r]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,n)=>(t[n]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,n)=>n._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let n=this.controls[e];n&&t(n,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,n]of Object.entries(this.controls))if(this.contains(e)&&t(n))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,n,r)=>((n.enabled||this.disabled)&&(e[r]=n.value),e))}_reduceChildren(t,e){let n=t;return this._forEachChild((r,s)=>{n=e(n,r,s)}),n}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var Q=new y("CallSetDisabledState",{providedIn:"root",factory:()=>ee}),ee="always";function et(i,t){return[...t.path,i]}function Fe(i,t,e=ee){Ee(i,t),t.valueAccessor.writeValue(i.value),(i.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(i.disabled),it(i,t),rt(i,t),nt(i,t),tt(i,t)}function de(i,t){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function tt(i,t){if(t.valueAccessor.setDisabledState){let e=n=>{t.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(e),t._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}function Ee(i,t){let e=ze(i);t.validator!==null?i.setValidators(ae(e,t.validator)):typeof e=="function"&&i.setValidators([e]);let n=Ze(i);t.asyncValidator!==null?i.setAsyncValidators(ae(n,t.asyncValidator)):typeof n=="function"&&i.setAsyncValidators([n]);let r=()=>i.updateValueAndValidity();de(t._rawValidators,r),de(t._rawAsyncValidators,r)}function it(i,t){t.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&we(i,t)})}function nt(i,t){t.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&we(i,t),i.updateOn!=="submit"&&i.markAsTouched()})}function we(i,t){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function rt(i,t){let e=(n,r)=>{t.valueAccessor.writeValue(n),r&&t.viewToModelUpdate(n)};i.registerOnChange(e),t._registerOnDestroy(()=>{i._unregisterOnChange(e)})}function st(i,t){i==null,Ee(i,t)}function ot(i,t){if(!i.hasOwnProperty("model"))return!1;let e=i.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function at(i){return Object.getPrototypeOf(i.constructor)===H}function lt(i,t){i._syncPendingControls(),t.forEach(e=>{let n=e.control;n.updateOn==="submit"&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function ut(i,t){if(!t)return null;Array.isArray(t);let e,n,r;return t.forEach(s=>{s.constructor===me?e=s:at(s)?n=s:r=s}),r||n||e||null}var dt={provide:D,useExisting:d(()=>ct)},N=Promise.resolve(),ct=(()=>{class i extends D{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new F,this.form=new U({},K(e),J(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){N.then(()=>{let n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),Fe(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){N.then(()=>{let n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){N.then(()=>{let n=this._findContainer(e.path),r=new U({});st(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){N.then(()=>{let n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){N.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,lt(this.form,this._directives),this.ngSubmit.emit(e),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submitted=!1}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static{this.\u0275fac=function(n){return new(n||i)(o(g,10),o(ye,10),o(Q,8))}}static{this.\u0275dir=l({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(n,r){n&1&&C("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{options:[A.None,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[c([dt]),u]})}}return i})();function ce(i,t){let e=i.indexOf(t);e>-1&&i.splice(e,1)}function he(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var ht=class extends R{constructor(t=null,e,n){super(Ae(e),Me(n,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),L(e)&&(e.nonNullable||e.initialValueIsDefault)&&(he(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(n=>n(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){ce(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){ce(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){he(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}};var ft={provide:S,useExisting:d(()=>pt)},fe=Promise.resolve(),pt=(()=>{class i extends S{constructor(e,n,r,s,a,f){super(),this._changeDetectorRef=a,this.callSetDisabledState=f,this.control=new ht,this._registered=!1,this.name="",this.update=new F,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=ut(this,s)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let n=e.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),ot(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){Fe(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){fe.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let n=e.isDisabled.currentValue,r=n!==0&&k(n);fe.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?et(e,this._parent):[e]}static{this.\u0275fac=function(n){return new(n||i)(o(D,9),o(g,10),o(ye,10),o(O,10),o(se,8),o(Q,8))}}static{this.\u0275dir=l({type:i,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[A.None,"disabled","isDisabled"],model:[A.None,"ngModel","model"],options:[A.None,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[c([ft]),u,z]})}}return i})(),ri=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=l({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]})}}return i})(),gt={provide:O,useExisting:d(()=>mt),multi:!0},mt=(()=>{class i extends H{writeValue(e){let n=e??"";this.setProperty("value",n)}registerOnChange(e){this.onChange=n=>{e(n==""?null:parseFloat(n))}}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=h(i)))(r||i)}})()}static{this.\u0275dir=l({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(n,r){n&1&&C("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},features:[c([gt]),u]})}}return i})();var _t={provide:O,useExisting:d(()=>Ne),multi:!0};function Ie(i,t){return i==null?`${t}`:(t&&typeof t=="object"&&(t="Object"),`${i}: ${t}`.slice(0,50))}function yt(i){return i.split(":")[0]}var Ne=(()=>{class i extends H{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;let n=this._getOptionId(e),r=Ie(n,e);this.setProperty("value",r)}registerOnChange(e){this.onChange=n=>{this.value=this._getOptionValue(n),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n),e))return n;return null}_getOptionValue(e){let n=yt(e);return this._optionMap.has(n)?this._optionMap.get(n):e}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=h(i)))(r||i)}})()}static{this.\u0275dir=l({type:i,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(n,r){n&1&&C("change",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},features:[c([_t]),u]})}}return i})(),si=(()=>{class i{constructor(e,n,r){this._element=e,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(e){this._select!=null&&(this._select._optionMap.set(this.id,e),this._setElementValue(Ie(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static{this.\u0275fac=function(n){return new(n||i)(o(M),o(E),o(Ne,9))}}static{this.\u0275dir=l({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}})}}return i})(),vt={provide:O,useExisting:d(()=>Se),multi:!0};function pe(i,t){return i==null?`${t}`:(typeof t=="string"&&(t=`'${t}'`),t&&typeof t=="object"&&(t="Object"),`${i}: ${t}`.slice(0,50))}function Ct(i){return i.split(":")[0]}var Se=(()=>{class i extends H{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;let n;if(Array.isArray(e)){let r=e.map(s=>this._getOptionId(s));n=(s,a)=>{s._setSelected(r.indexOf(a.toString())>-1)}}else n=(r,s)=>{r._setSelected(!1)};this._optionMap.forEach(n)}registerOnChange(e){this.onChange=n=>{let r=[],s=n.selectedOptions;if(s!==void 0){let a=s;for(let f=0;f<a.length;f++){let x=a[f],$=this._getOptionValue(x.value);r.push($)}}else{let a=n.options;for(let f=0;f<a.length;f++){let x=a[f];if(x.selected){let $=this._getOptionValue(x.value);r.push($)}}}this.value=r,e(r)}}_registerOption(e){let n=(this._idCounter++).toString();return this._optionMap.set(n,e),n}_getOptionId(e){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n)._value,e))return n;return null}_getOptionValue(e){let n=Ct(e);return this._optionMap.has(n)?this._optionMap.get(n)._value:e}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=h(i)))(r||i)}})()}static{this.\u0275dir=l({type:i,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(n,r){n&1&&C("change",function(a){return r.onChange(a.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},features:[c([vt]),u]})}}return i})(),oi=(()=>{class i{constructor(e,n,r){this._element=e,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){this._select!=null&&(this._value=e,this._setElementValue(pe(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(pe(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static{this.\u0275fac=function(n){return new(n||i)(o(M),o(E),o(Se,9))}}static{this.\u0275dir=l({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}})}}return i})();function Oe(i){return typeof i=="number"?i:parseInt(i,10)}function xe(i){return typeof i=="number"?i:parseFloat(i)}var b=(()=>{class i{constructor(){this._validator=oe}ngOnChanges(e){if(this.inputName in e){let n=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(n),this._validator=this._enabled?this.createValidator(n):oe,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=l({type:i,features:[z]})}}return i})(),Vt={provide:g,useExisting:d(()=>Dt),multi:!0},Dt=(()=>{class i extends b{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>xe(e),this.createValidator=e=>Be(e)}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=h(i)))(r||i)}})()}static{this.\u0275dir=l({type:i,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(n,r){n&2&&v("max",r._enabled?r.max:null)},inputs:{max:"max"},features:[c([Vt]),u]})}}return i})(),bt={provide:g,useExisting:d(()=>At),multi:!0},At=(()=>{class i extends b{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>xe(e),this.createValidator=e=>je(e)}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=h(i)))(r||i)}})()}static{this.\u0275dir=l({type:i,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(n,r){n&2&&v("min",r._enabled?r.min:null)},inputs:{min:"min"},features:[c([bt]),u]})}}return i})(),Mt={provide:g,useExisting:d(()=>Ft),multi:!0};var Ft=(()=>{class i extends b{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=k,this.createValidator=e=>Re}enabled(e){return e}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=h(i)))(r||i)}})()}static{this.\u0275dir=l({type:i,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(n,r){n&2&&v("required",r._enabled?"":null)},inputs:{required:"required"},features:[c([Mt]),u]})}}return i})();var Et={provide:g,useExisting:d(()=>wt),multi:!0},wt=(()=>{class i extends b{constructor(){super(...arguments),this.inputName="email",this.normalizeInput=k,this.createValidator=e=>Ue}enabled(e){return e}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=h(i)))(r||i)}})()}static{this.\u0275dir=l({type:i,selectors:[["","email","","formControlName",""],["","email","","formControl",""],["","email","","ngModel",""]],inputs:{email:"email"},features:[c([Et]),u]})}}return i})(),It={provide:g,useExisting:d(()=>Nt),multi:!0},Nt=(()=>{class i extends b{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>Oe(e),this.createValidator=e=>He(e)}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=h(i)))(r||i)}})()}static{this.\u0275dir=l({type:i,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(n,r){n&2&&v("minlength",r._enabled?r.minlength:null)},inputs:{minlength:"minlength"},features:[c([It]),u]})}}return i})(),St={provide:g,useExisting:d(()=>Ot),multi:!0},Ot=(()=>{class i extends b{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>Oe(e),this.createValidator=e=>Le(e)}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=h(i)))(r||i)}})()}static{this.\u0275dir=l({type:i,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(n,r){n&2&&v("maxlength",r._enabled?r.maxlength:null)},inputs:{maxlength:"maxlength"},features:[c([St]),u]})}}return i})();var xt=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=q({type:i})}static{this.\u0275inj=W({})}}return i})();var ai=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:Q,useValue:e.callSetDisabledState??ee}]}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=q({type:i})}static{this.\u0275inj=W({imports:[xt]})}}return i})();export{me as a,ti as b,ii as c,ct as d,pt as e,ri as f,mt as g,Ne as h,si as i,oi as j,Dt as k,At as l,Ft as m,wt as n,Nt as o,Ot as p,ai as q};
@@ -0,0 +1 @@
1
+ import{a as w,b as J,c as N,d as k,e as z,f as L,m as T,o as D,p as F,q as V}from"./chunk-VXET42KR.js";import{a as O}from"./chunk-BDRARPDM.js";import{a as W}from"./chunk-4S3ZLLNI.js";import{A as y,Aa as I,B as b,H as d,I as g,Ja as P,Ka as E,Q as c,S as l,V as e,W as n,Y as M,Z as f,_ as m,aa as o,ba as _,ea as x,fa as h,ga as C,ia as S,v,xa as j}from"./chunk-UNSARXTF.js";function A(i,s){if(i&1){let r=M();e(0,"div",7)(1,"label",8),o(2,"Your Name"),n(),e(3,"input",19),C("ngModelChange",function(t){y(r);let p=m();return h(p.displayName,t)||(p.displayName=t),b(t)}),n()()}if(i&2){let r=m();d(3),x("ngModel",r.displayName)}}function q(i,s){if(i&1&&(e(0,"div",20)(1,"span",21),o(2,"Joining as:"),n(),e(3,"span",22),o(4),n()()),i&2){let r=m();d(4),_(r.auth.currentUser==null?null:r.auth.currentUser.display_name)}}function U(i,s){if(i&1&&(e(0,"div",23),o(1),n()),i&2){let r=m();d(),_(r.error)}}function B(i,s){i&1&&(e(0,"span"),o(1,"\u{1F680} Join Quiz"),n())}function Q(i,s){i&1&&(e(0,"span"),o(1,"Joining..."),n())}function R(i,s){i&1&&(e(0,"div",24)(1,"div",25)(2,"span"),o(3,"or"),n()(),e(4,"a",26),o(5,"Sign In"),n(),e(6,"p",27),o(7," Want to create quizzes? "),e(8,"a",28),o(9,"Create an account"),n()()())}var ne=(()=>{class i{constructor(r,a,t){this.api=r,this.auth=a,this.router=t,this.joinCode="",this.displayName="",this.error="",this.loading=!1}onJoin(){this.loading=!0,this.error="";let r=this.auth.isLoggedIn?this.auth.currentUser.display_name:this.displayName;this.api.joinSession(this.joinCode,r).subscribe({next:a=>{this.loading=!1,sessionStorage.setItem("participant_id",a.participant.id),sessionStorage.setItem("session_id",a.participant.session_id),this.router.navigate(["/session",a.participant.session_id,"play"])},error:a=>{this.loading=!1,this.error=a.error?.error||a.error?.errors?.join(", ")||"Failed to join. Check the code and try again."}})}static{this.\u0275fac=function(a){return new(a||i)(g(W),g(O),g(P))}}static{this.\u0275cmp=v({type:i,selectors:[["app-join"]],standalone:!0,features:[S],decls:29,vars:8,consts:[[1,"join-page"],[1,"join-card","animate-scale-in"],[1,"join-header","text-center"],[1,"join-icon"],[1,"text-gradient"],[1,"text-secondary"],[3,"ngSubmit"],[1,"form-group"],[1,"form-label"],["type","text","name","joinCode","placeholder","Enter 6-letter code","maxlength","6","required","","autocomplete","off",1,"form-input","code-input",3,"ngModelChange","input","ngModel"],["class","form-group",4,"ngIf"],["class","logged-in-info",4,"ngIf"],["class","error-msg",4,"ngIf"],["type","submit",1,"btn","btn-primary","btn-lg","btn-full",3,"disabled"],[4,"ngIf"],["class","join-footer text-center",4,"ngIf"],[1,"decoration","deco-1"],[1,"decoration","deco-2"],[1,"decoration","deco-3"],["type","text","name","displayName","placeholder","How should we call you?","required","","minlength","2","maxlength","50",1,"form-input",3,"ngModelChange","ngModel"],[1,"logged-in-info"],[1,"info-label"],[1,"info-name"],[1,"error-msg"],[1,"join-footer","text-center"],[1,"divider"],["routerLink","/auth/login",1,"btn","btn-outline","btn-full"],[1,"signup-link"],["routerLink","/auth/register",1,"link"]],template:function(a,t){a&1&&(e(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),o(4,"\u26A1"),n(),e(5,"h1"),o(6,"Join a "),e(7,"span",4),o(8,"Quiz"),n()(),e(9,"p",5),o(10,"Enter the code shared by your host"),n()(),e(11,"form",6),f("ngSubmit",function(){return t.onJoin()}),e(12,"div",7)(13,"label",8),o(14,"Quiz Code"),n(),e(15,"input",9),C("ngModelChange",function(u){return h(t.joinCode,u)||(t.joinCode=u),u}),f("input",function(){return t.joinCode=t.joinCode.toUpperCase()}),n()(),c(16,A,4,1,"div",10)(17,q,5,1,"div",11)(18,U,2,1,"div",12),e(19,"button",13),c(20,B,2,0,"span",14)(21,Q,2,0,"span",14),n()(),c(22,R,10,0,"div",15),n(),e(23,"div",16),o(24,"\u{1F3AF}"),n(),e(25,"div",17),o(26,"\u{1F3C6}"),n(),e(27,"div",18),o(28,"\u2B50"),n()()),a&2&&(d(15),x("ngModel",t.joinCode),d(),l("ngIf",!t.auth.isLoggedIn),d(),l("ngIf",t.auth.isLoggedIn),d(),l("ngIf",t.error),d(),l("disabled",t.loading||!t.joinCode||!t.auth.isLoggedIn&&!t.displayName),d(),l("ngIf",!t.loading),d(),l("ngIf",t.loading),d(),l("ngIf",!t.auth.isLoggedIn))},dependencies:[I,j,V,L,w,J,N,T,D,F,z,k,E],styles:['.join-page[_ngcontent-%COMP%]{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;position:relative;overflow:hidden;background:radial-gradient(ellipse at 50% 30%,rgba(108,92,231,.15) 0%,transparent 60%),radial-gradient(ellipse at 20% 80%,rgba(0,206,201,.08) 0%,transparent 40%),radial-gradient(ellipse at 80% 70%,rgba(253,121,168,.06) 0%,transparent 40%)}.join-card[_ngcontent-%COMP%]{width:100%;max-width:460px;background:var(--bg-card);border:1px solid var(--border-light);border-radius:var(--radius-xl);padding:48px 40px;position:relative;z-index:1}.join-header[_ngcontent-%COMP%]{margin-bottom:36px}.join-icon[_ngcontent-%COMP%]{font-size:3.5rem;margin-bottom:12px}.text-secondary[_ngcontent-%COMP%]{color:var(--text-secondary);margin-top:8px}.code-input[_ngcontent-%COMP%]{text-align:center;font-family:Courier New,monospace;font-size:2rem!important;font-weight:800;letter-spacing:.3em;padding:18px!important;text-transform:uppercase}.logged-in-info[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:12px 16px;background:#6c5ce71a;border-radius:var(--radius-md);margin-bottom:20px}.info-label[_ngcontent-%COMP%]{color:var(--text-muted);font-size:.85rem}.info-name[_ngcontent-%COMP%]{color:var(--primary-light);font-weight:600}.error-msg[_ngcontent-%COMP%]{background:#ff6b6b1a;border:1px solid rgba(255,107,107,.3);color:var(--danger);padding:12px 16px;border-radius:var(--radius-md);margin-bottom:16px;font-size:.9rem}.join-footer[_ngcontent-%COMP%]{margin-top:24px}.divider[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px;margin:20px 0;color:var(--text-muted);font-size:.85rem}.divider[_ngcontent-%COMP%]:before, .divider[_ngcontent-%COMP%]:after{content:"";flex:1;height:1px;background:var(--border-light)}.signup-link[_ngcontent-%COMP%]{margin-top:16px;font-size:.85rem;color:var(--text-muted)}.link[_ngcontent-%COMP%]{color:var(--primary-light);text-decoration:none;font-weight:500}.link[_ngcontent-%COMP%]:hover{text-decoration:underline}.decoration[_ngcontent-%COMP%]{position:absolute;font-size:3rem;opacity:.15;animation:_ngcontent-%COMP%_float 6s ease-in-out infinite}.deco-1[_ngcontent-%COMP%]{top:10%;left:10%;animation-delay:0s}.deco-2[_ngcontent-%COMP%]{top:60%;right:8%;animation-delay:2s}.deco-3[_ngcontent-%COMP%]{bottom:15%;left:15%;animation-delay:4s}@keyframes _ngcontent-%COMP%_float{0%,to{transform:translateY(0)}50%{transform:translateY(-20px)}}']})}}return i})();export{ne as JoinComponent};
@@ -0,0 +1 @@
1
+ import{a as T,b as F,c as N,d as j,e as L,f as W,m as B,q as A}from"./chunk-VXET42KR.js";import{a as V}from"./chunk-BDRARPDM.js";import{a as R}from"./chunk-4S3ZLLNI.js";import{A as m,Aa as E,B as p,H as s,I as h,Ja as Q,Ka as I,Q as x,S as l,T as y,V as t,W as i,X as M,Y as b,Z as g,_ as d,aa as a,ba as _,ca as f,ea as v,fa as C,ga as z,ia as S,ka as q,ma as P,v as w,va as O,wa as k,xa as D}from"./chunk-UNSARXTF.js";var G=(o,u,e)=>({"badge-success":o,"badge-warning":u,"badge-danger":e}),H=o=>["/admin/quiz",o,"edit"];function J(o,u){if(o&1&&(t(0,"p",27),a(1),i()),o&2){let e=d().$implicit;s(),_(e.description)}}function Y(o,u){if(o&1){let e=b();t(0,"div",18)(1,"div",19)(2,"h3"),a(3),i(),t(4,"span",20),a(5),i()(),x(6,J,2,1,"p",21),t(7,"div",22)(8,"span"),a(9),i(),t(10,"span"),a(11),i()(),t(12,"div",23)(13,"a",24),a(14,"Edit"),i(),t(15,"button",25),g("click",function(){let n=m(e).$implicit,c=d(2);return p(c.startSession(n))}),a(16," \u25B6 Host Live "),i(),t(17,"button",26),g("click",function(){let n=m(e).$implicit,c=d(2);return p(c.deleteQuiz(n))}),a(18,"\u2715"),i()()()}if(o&2){let e=u.$implicit,r=u.index;y("animation-delay",r*80+"ms"),s(3),_(e.title),s(),l("ngClass",P(10,G,e.status==="published",e.status==="draft",e.status==="archived")),s(),_(e.status),s(),l("ngIf",e.description),s(3),f("\u{1F4DD} ",e.question_count," questions"),s(2),f("\u{1F511} ",e.join_code,""),s(2),l("routerLink",q(14,H,e.id)),s(2),l("disabled",e.status!=="published"||e.question_count===0)}}function $(o,u){if(o&1){let e=b();t(0,"div",28)(1,"h2"),a(2,"\u{1F3AF}"),i(),t(3,"h3"),a(4,"No quizzes yet"),i(),t(5,"p",3),a(6,"Create your first quiz to get started"),i(),t(7,"button",29),g("click",function(){m(e);let n=d(2);return p(n.showCreateModal=!0)}),a(8,"Create Quiz"),i()()}}function K(o,u){if(o&1&&(t(0,"div",15),x(1,Y,19,16,"div",16)(2,$,9,0,"div",17),i()),o&2){let e=d();s(),l("ngForOf",e.quizzes),s(),l("ngIf",e.quizzes.length===0)}}function U(o,u){o&1&&(t(0,"div",30),M(1,"div",31),t(2,"p"),a(3,"Loading quizzes..."),i()())}function X(o,u){if(o&1){let e=b();t(0,"div",32),g("click",function(){m(e);let n=d();return p(n.showCreateModal=!1)}),t(1,"div",33),g("click",function(n){return m(e),p(n.stopPropagation())}),t(2,"h2"),a(3,"Create New Quiz"),i(),t(4,"form",34),g("ngSubmit",function(){m(e);let n=d();return p(n.createQuiz())}),t(5,"div",35)(6,"label",36),a(7,"Title"),i(),t(8,"input",37),z("ngModelChange",function(n){m(e);let c=d();return C(c.newQuiz.title,n)||(c.newQuiz.title=n),p(n)}),i()(),t(9,"div",35)(10,"label",36),a(11,"Description (optional)"),i(),t(12,"textarea",38),z("ngModelChange",function(n){m(e);let c=d();return C(c.newQuiz.description,n)||(c.newQuiz.description=n),p(n)}),i()(),t(13,"div",39)(14,"button",40),g("click",function(){m(e);let n=d();return p(n.showCreateModal=!1)}),a(15,"Cancel"),i(),t(16,"button",41),a(17,"Create Quiz"),i()()()()()}if(o&2){let e=d();s(8),v("ngModel",e.newQuiz.title),s(4),v("ngModel",e.newQuiz.description),s(4),l("disabled",!e.newQuiz.title)}}var de=(()=>{class o{constructor(e,r,n){this.api=e,this.auth=r,this.router=n,this.quizzes=[],this.loading=!0,this.showCreateModal=!1,this.newQuiz={title:"",description:""}}ngOnInit(){this.loadQuizzes()}get publishedCount(){return this.quizzes.filter(e=>e.status==="published").length}get draftCount(){return this.quizzes.filter(e=>e.status==="draft").length}get totalQuestions(){return this.quizzes.reduce((e,r)=>e+r.question_count,0)}loadQuizzes(){this.loading=!0,this.api.getQuizzes().subscribe({next:e=>{this.quizzes=e.quizzes,this.loading=!1},error:()=>{this.loading=!1}})}createQuiz(){this.api.createQuiz(this.newQuiz).subscribe({next:e=>{this.showCreateModal=!1,this.newQuiz={title:"",description:""},this.router.navigate(["/admin/quiz",e.quiz.id,"edit"])}})}startSession(e){this.api.startSession(e.id).subscribe({next:r=>{this.router.navigate(["/admin/session",r.session.id,"host"])},error:r=>{alert(r.error?.error||"Failed to start session")}})}deleteQuiz(e){confirm(`Delete "${e.title}"? This cannot be undone.`)&&this.api.deleteQuiz(e.id).subscribe({next:()=>{this.quizzes=this.quizzes.filter(r=>r.id!==e.id)}})}static{this.\u0275fac=function(r){return new(r||o)(h(R),h(V),h(Q))}}static{this.\u0275cmp=w({type:o,selectors:[["app-dashboard"]],standalone:!0,features:[S],decls:34,vars:7,consts:[[1,"dashboard"],[1,"container"],[1,"dash-header","animate-fade-in"],[1,"text-secondary"],[1,"btn","btn-primary","btn-lg",3,"click"],[1,"stats-row","animate-slide-up"],[1,"stat-card"],[1,"stat-value","text-gradient"],[1,"stat-label"],[1,"stat-value",2,"color","var(--success)"],[1,"stat-value",2,"color","var(--accent-light)"],[1,"stat-value",2,"color","var(--secondary)"],["class","quiz-grid",4,"ngIf"],["class","loading-state",4,"ngIf"],["class","modal-overlay",3,"click",4,"ngIf"],[1,"quiz-grid"],["class","quiz-card card-glow animate-fade-in",3,"animation-delay",4,"ngFor","ngForOf"],["class","empty-state card",4,"ngIf"],[1,"quiz-card","card-glow","animate-fade-in"],[1,"quiz-card-header"],[1,"badge",3,"ngClass"],["class","quiz-desc",4,"ngIf"],[1,"quiz-meta"],[1,"quiz-actions"],[1,"btn","btn-outline","btn-sm",3,"routerLink"],[1,"btn","btn-primary","btn-sm",3,"click","disabled"],[1,"btn","btn-danger","btn-sm",3,"click"],[1,"quiz-desc"],[1,"empty-state","card"],[1,"btn","btn-primary",3,"click"],[1,"loading-state"],[1,"spinner"],[1,"modal-overlay",3,"click"],[1,"modal","animate-scale-in",3,"click"],[3,"ngSubmit"],[1,"form-group"],[1,"form-label"],["type","text","name","title","placeholder","e.g. JavaScript Fundamentals","required","",1,"form-input",3,"ngModelChange","ngModel"],["name","description","placeholder","Brief description of the quiz","rows","3",1,"form-input",3,"ngModelChange","ngModel"],[1,"modal-actions"],["type","button",1,"btn","btn-ghost",3,"click"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(r,n){r&1&&(t(0,"div",0)(1,"div",1)(2,"div",2)(3,"div")(4,"h1"),a(5,"Your Quizzes"),i(),t(6,"p",3),a(7,"Create, manage, and host live quiz sessions"),i()(),t(8,"button",4),g("click",function(){return n.showCreateModal=!0}),a(9," \uFF0B New Quiz "),i()(),t(10,"div",5)(11,"div",6)(12,"div",7),a(13),i(),t(14,"div",8),a(15,"Total Quizzes"),i()(),t(16,"div",6)(17,"div",9),a(18),i(),t(19,"div",8),a(20,"Published"),i()(),t(21,"div",6)(22,"div",10),a(23),i(),t(24,"div",8),a(25,"Drafts"),i()(),t(26,"div",6)(27,"div",11),a(28),i(),t(29,"div",8),a(30,"Total Questions"),i()()(),x(31,K,3,2,"div",12)(32,U,4,0,"div",13),i(),x(33,X,18,3,"div",14),i()),r&2&&(s(13),_(n.quizzes.length),s(5),_(n.publishedCount),s(5),_(n.draftCount),s(5),_(n.totalQuestions),s(3),l("ngIf",!n.loading),s(),l("ngIf",n.loading),s(),l("ngIf",n.showCreateModal))},dependencies:[E,O,k,D,I,A,W,T,F,N,B,L,j],styles:[".dashboard[_ngcontent-%COMP%]{padding:40px 0}.dash-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:32px}.dash-header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin-bottom:4px}.dash-header[_ngcontent-%COMP%] .text-secondary[_ngcontent-%COMP%]{color:var(--text-secondary)}.stats-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:40px}.stat-card[_ngcontent-%COMP%]{background:var(--bg-card);border:1px solid var(--border-light);border-radius:var(--radius-lg);padding:24px;text-align:center}.stat-value[_ngcontent-%COMP%]{font-size:2.5rem;font-weight:800;line-height:1;margin-bottom:8px}.stat-label[_ngcontent-%COMP%]{font-size:.85rem;color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em}.quiz-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(360px,1fr));gap:20px}.quiz-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.quiz-card-header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.quiz-card-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:1.15rem}.quiz-desc[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.9rem;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.quiz-meta[_ngcontent-%COMP%]{display:flex;gap:20px;font-size:.85rem;color:var(--text-muted)}.quiz-actions[_ngcontent-%COMP%]{display:flex;gap:8px;margin-top:8px}.empty-state[_ngcontent-%COMP%]{grid-column:1/-1;text-align:center;padding:60px 24px}.empty-state[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:3rem;margin-bottom:12px}.empty-state[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:8px}.empty-state[_ngcontent-%COMP%] .text-secondary[_ngcontent-%COMP%]{color:var(--text-secondary);margin-bottom:20px}.loading-state[_ngcontent-%COMP%]{text-align:center;padding:60px;color:var(--text-muted)}.spinner[_ngcontent-%COMP%]{width:40px;height:40px;border:3px solid var(--border-light);border-top-color:var(--primary);border-radius:50%;animation:_ngcontent-%COMP%_spin .8s linear infinite;margin:0 auto 16px}@keyframes _ngcontent-%COMP%_spin{to{transform:rotate(360deg)}}.modal-overlay[_ngcontent-%COMP%]{position:fixed;inset:0;background:#000000b3;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:2000;padding:24px}.modal[_ngcontent-%COMP%]{background:var(--bg-card);border:1px solid var(--border-light);border-radius:var(--radius-xl);padding:32px;width:100%;max-width:500px}.modal[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin-bottom:24px}.modal-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:12px;margin-top:24px}@media (max-width: 768px){.stats-row[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}.quiz-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}.dash-header[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start;gap:16px}}"]})}}return o})();export{de as DashboardComponent};
package/loader.js ADDED
@@ -0,0 +1,71 @@
1
+ const manifest = {
2
+ "elementTag": "quizzie-module",
3
+ "js": [
4
+ "polyfills.js",
5
+ "main.js",
6
+ "chunk-2IYKTL43.js",
7
+ "chunk-2O4WDLOC.js",
8
+ "chunk-4S3ZLLNI.js",
9
+ "chunk-6IVIMAVU.js",
10
+ "chunk-6ZHAJFTP.js",
11
+ "chunk-BDRARPDM.js",
12
+ "chunk-BXPDLLUD.js",
13
+ "chunk-IUANN3U7.js",
14
+ "chunk-KI2SGYIC.js",
15
+ "chunk-UNSARXTF.js",
16
+ "chunk-VXET42KR.js",
17
+ "chunk-VYECULB4.js",
18
+ "chunk-XTBN5JJS.js"
19
+ ],
20
+ "css": [
21
+ "styles.css"
22
+ ]
23
+ };
24
+
25
+ function appendOnce(tagName, key, attrs = {}) {
26
+ const selector = `${tagName}[data-quizzie=\"${key}\"]`;
27
+ if (document.querySelector(selector)) return;
28
+
29
+ const el = document.createElement(tagName);
30
+ el.setAttribute('data-quizzie', key);
31
+ Object.entries(attrs).forEach(([name, value]) => el.setAttribute(name, value));
32
+ document.head.appendChild(el);
33
+ }
34
+
35
+ function loadScript(src, key) {
36
+ return new Promise((resolve, reject) => {
37
+ if (document.querySelector(`script[data-quizzie=\"${key}\"]`)) {
38
+ resolve();
39
+ return;
40
+ }
41
+
42
+ const script = document.createElement('script');
43
+ script.src = src;
44
+ script.async = false;
45
+ script.type = 'text/javascript';
46
+ script.setAttribute('data-quizzie', key);
47
+ script.onload = () => resolve();
48
+ script.onerror = () => reject(new Error(`Failed to load script: ${src}`));
49
+ document.head.appendChild(script);
50
+ });
51
+ }
52
+
53
+ export async function loadQuizzieModule(options = {}) {
54
+ const baseUrl = (options.baseUrl || new URL('.', import.meta.url).href).replace(/\/$/, '');
55
+
56
+ manifest.css.forEach((file) => {
57
+ appendOnce('link', `css:${file}`, {
58
+ rel: 'stylesheet',
59
+ href: `${baseUrl}/${file}`
60
+ });
61
+ });
62
+
63
+ for (const file of manifest.js) {
64
+ await loadScript(`${baseUrl}/${file}`, `js:${file}`);
65
+ }
66
+
67
+ return customElements.whenDefined(manifest.elementTag);
68
+ }
69
+
70
+ export const elementTag = manifest.elementTag;
71
+ export { manifest };
package/main.js ADDED
@@ -0,0 +1 @@
1
+ import{a as J}from"./chunk-BDRARPDM.js";import{A as xt,Aa as an,B as $t,Ca as ln,D as Ut,Da as hn,Ea as cn,Fa as un,G as Qe,Ga as dn,H as he,I as xe,Ia as fn,J as Wt,Ja as de,K as $e,Ka as mn,L as Gt,La as pn,N as Ht,O as be,Q as Ue,S as We,U as Ge,V as z,W as Q,X as Zt,Y as Yt,Z as Xt,_ as He,a as ve,aa as x,ba as Jt,c as Lt,ca as en,d as zt,g as qt,i as Kt,ia as tn,k as jt,l as Vt,n as v,p as ae,qa as nn,ra as sn,s as le,t as X,ua as rn,v as Bt,xa as on,y as Qt}from"./chunk-UNSARXTF.js";var Te={schedule(s,e){let t=setTimeout(s,e);return()=>clearTimeout(t)},scheduleBeforeRender(s){if(typeof window>"u")return Te.schedule(s,0);if(typeof window.requestAnimationFrame>"u")return Te.schedule(s,16);let e=window.requestAnimationFrame(s);return()=>window.cancelAnimationFrame(e)}};function es(s){return s.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function ts(s){return!!s&&s.nodeType===Node.ELEMENT_NODE}function ns(s){return typeof s=="function"}var Ze;function ss(s,e){if(!Ze){let t=Element.prototype;Ze=t.matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}return s.nodeType===Node.ELEMENT_NODE?Ze.call(s,e):!1}function is(s,e){return s===e||s!==s&&e!==e}function rs(s){let e={};return s.forEach(({propName:t,templateName:n,transform:i})=>{e[es(n)]=[t,i]}),e}function os(s,e){return e.get($e).resolveComponentFactory(s).inputs}function as(s,e){let t=s.childNodes,n=e.map(()=>[]),i=-1;e.some((r,o)=>r==="*"?(i=o,!0):!1);for(let r=0,o=t.length;r<o;++r){let a=t[r],l=ls(a,e,i);l!==-1&&n[l].push(a)}return n}function ls(s,e,t){let n=t;return ts(s)&&e.some((i,r)=>i!=="*"&&ss(s,i)?(n=r,!0):!1),n}var hs=10,Ye=class{constructor(e,t){this.componentFactory=t.get($e).resolveComponentFactory(e)}create(e){return new Xe(this.componentFactory,e)}},Xe=class{constructor(e,t){this.componentFactory=e,this.injector=t,this.eventEmitters=new qt(1),this.events=this.eventEmitters.pipe(Vt(n=>jt(...n))),this.componentRef=null,this.viewChangeDetectorRef=null,this.inputChanges=null,this.hasInputChanges=!1,this.implementsOnChanges=!1,this.scheduledChangeDetectionFn=null,this.scheduledDestroyFn=null,this.initialInputValues=new Map,this.unchangedInputs=new Set(this.componentFactory.inputs.map(({propName:n})=>n)),this.ngZone=this.injector.get(be),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=Te.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null,this.viewChangeDetectorRef=null)},hs))})}getInputValue(e){return this.runInZone(()=>this.componentRef===null?this.initialInputValues.get(e):this.componentRef.instance[e])}setInputValue(e,t,n){this.runInZone(()=>{if(n&&(t=n.call(this.componentRef?.instance,t)),this.componentRef===null){this.initialInputValues.set(e,t);return}is(t,this.getInputValue(e))&&!(t===void 0&&this.unchangedInputs.has(e))||(this.recordInputChange(e,t),this.unchangedInputs.delete(e),this.hasInputChanges=!0,this.componentRef.instance[e]=t,this.scheduleDetectChanges())})}initializeComponent(e){let t=Ut.create({providers:[],parent:this.injector}),n=as(e,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(t,n,e),this.viewChangeDetectorRef=this.componentRef.injector.get(sn),this.implementsOnChanges=ns(this.componentRef.instance.ngOnChanges),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.detectChanges(),this.injector.get(nn).attachView(this.componentRef.hostView)}initializeInputs(){this.componentFactory.inputs.forEach(({propName:e,transform:t})=>{this.initialInputValues.has(e)&&this.setInputValue(e,this.initialInputValues.get(e),t)}),this.initialInputValues.clear()}initializeOutputs(e){let t=this.componentFactory.outputs.map(({propName:n,templateName:i})=>e.instance[n].pipe(Kt(o=>({name:i,value:o}))));this.eventEmitters.next(t)}callNgOnChanges(e){if(!this.implementsOnChanges||this.inputChanges===null)return;let t=this.inputChanges;this.inputChanges=null,e.instance.ngOnChanges(t)}markViewForCheck(e){this.hasInputChanges&&(this.hasInputChanges=!1,e.markForCheck())}scheduleDetectChanges(){this.scheduledChangeDetectionFn||(this.scheduledChangeDetectionFn=Te.scheduleBeforeRender(()=>{this.scheduledChangeDetectionFn=null,this.detectChanges()}))}recordInputChange(e,t){if(!this.implementsOnChanges)return;this.inputChanges===null&&(this.inputChanges={});let n=this.inputChanges[e];if(n){n.currentValue=t;return}let i=this.unchangedInputs.has(e),r=i?void 0:this.getInputValue(e);this.inputChanges[e]=new Qt(r,t,i)}detectChanges(){this.componentRef!==null&&(this.callNgOnChanges(this.componentRef),this.markViewForCheck(this.viewChangeDetectorRef),this.componentRef.changeDetectorRef.detectChanges())}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}},Je=class extends HTMLElement{constructor(){super(...arguments),this.ngElementEventsSubscription=null}};function gn(s,e){let t=os(s,e.injector),n=e.strategyFactory||new Ye(s,e.injector),i=rs(t);class r extends Je{static{this.observedAttributes=Object.keys(i)}get ngElementStrategy(){if(!this._ngElementStrategy){let a=this._ngElementStrategy=n.create(this.injector||e.injector);t.forEach(({propName:l,transform:h})=>{if(!this.hasOwnProperty(l))return;let c=this[l];delete this[l],a.setInputValue(l,c,h)})}return this._ngElementStrategy}constructor(a){super(),this.injector=a}attributeChangedCallback(a,l,h,c){let[u,_]=i[a];this.ngElementStrategy.setInputValue(u,h,_)}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 t.forEach(({propName:o,transform:a})=>{Object.defineProperty(r.prototype,o,{get(){return this.ngElementStrategy.getInputValue(o)},set(l){this.ngElementStrategy.setInputValue(o,l,a)},configurable:!0,enumerable:!0})}),r}var E=function(s){return s[s.State=0]="State",s[s.Transition=1]="Transition",s[s.Sequence=2]="Sequence",s[s.Group=3]="Group",s[s.Animate=4]="Animate",s[s.Keyframes=5]="Keyframes",s[s.Style=6]="Style",s[s.Trigger=7]="Trigger",s[s.Reference=8]="Reference",s[s.AnimateChild=9]="AnimateChild",s[s.AnimateRef=10]="AnimateRef",s[s.Query=11]="Query",s[s.Stagger=12]="Stagger",s}(E||{}),V="*";function yn(s,e=null){return{type:E.Sequence,steps:s,options:e}}function et(s){return{type:E.Style,styles:s,offset:null}}var W=class{constructor(e=0,t=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=e+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(e=>e()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(e){this._position=this.totalTime?e*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(e){let t=e=="start"?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}},fe=class{constructor(e){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=e;let t=0,n=0,i=0,r=this.players.length;r==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(o=>{o.onDone(()=>{++t==r&&this._onFinish()}),o.onDestroy(()=>{++n==r&&this._onDestroy()}),o.onStart(()=>{++i==r&&this._onStart()})}),this.totalTime=this.players.reduce((o,a)=>Math.max(o,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this.players.forEach(e=>e.init())}onStart(e){this._onStartFns.push(e)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(e=>e()),this._onStartFns=[])}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(e=>e.play())}pause(){this.players.forEach(e=>e.pause())}restart(){this.players.forEach(e=>e.restart())}finish(){this._onFinish(),this.players.forEach(e=>e.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(e=>e.destroy()),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this.players.forEach(e=>e.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(e){let t=e*this.totalTime;this.players.forEach(n=>{let i=n.totalTime?Math.min(1,t/n.totalTime):1;n.setPosition(i)})}getPosition(){let e=this.players.reduce((t,n)=>t===null||n.totalTime>t.totalTime?n:t,null);return e!=null?e.getPosition():0}beforeDestroy(){this.players.forEach(e=>{e.beforeDestroy&&e.beforeDestroy()})}triggerCallback(e){let t=e=="start"?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}},we="!";function _n(s){return new v(3e3,!1)}function cs(){return new v(3100,!1)}function us(){return new v(3101,!1)}function ds(s){return new v(3001,!1)}function fs(s){return new v(3003,!1)}function ms(s){return new v(3004,!1)}function ps(s,e){return new v(3005,!1)}function gs(){return new v(3006,!1)}function ys(){return new v(3007,!1)}function _s(s,e){return new v(3008,!1)}function Es(s){return new v(3002,!1)}function Ss(s,e,t,n,i){return new v(3010,!1)}function vs(){return new v(3011,!1)}function bs(){return new v(3012,!1)}function Ts(){return new v(3200,!1)}function ws(){return new v(3202,!1)}function As(){return new v(3013,!1)}function Cs(s){return new v(3014,!1)}function Ps(s){return new v(3015,!1)}function Ds(s){return new v(3016,!1)}function Ms(s,e){return new v(3404,!1)}function Ns(s){return new v(3502,!1)}function ks(s){return new v(3503,!1)}function Fs(){return new v(3300,!1)}function Rs(s){return new v(3504,!1)}function Is(s){return new v(3301,!1)}function Os(s,e){return new v(3302,!1)}function Ls(s){return new v(3303,!1)}function zs(s,e){return new v(3400,!1)}function qs(s){return new v(3401,!1)}function Ks(s){return new v(3402,!1)}function js(s,e){return new v(3505,!1)}function G(s){switch(s.length){case 0:return new W;case 1:return s[0];default:return new fe(s)}}function Fn(s,e,t=new Map,n=new Map){let i=[],r=[],o=-1,a=null;if(e.forEach(l=>{let h=l.get("offset"),c=h==o,u=c&&a||new Map;l.forEach((_,y)=>{let f=y,g=_;if(y!=="offset")switch(f=s.normalizePropertyName(f,i),g){case we:g=t.get(y);break;case V:g=n.get(y);break;default:g=s.normalizeStyleValue(y,f,g,i);break}u.set(f,g)}),c||r.push(u),a=u,o=h}),i.length)throw Ns(i);return r}function wt(s,e,t,n){switch(e){case"start":s.onStart(()=>n(t&&tt(t,"start",s)));break;case"done":s.onDone(()=>n(t&&tt(t,"done",s)));break;case"destroy":s.onDestroy(()=>n(t&&tt(t,"destroy",s)));break}}function tt(s,e,t){let n=t.totalTime,i=!!t.disabled,r=At(s.element,s.triggerName,s.fromState,s.toState,e||s.phaseName,n??s.totalTime,i),o=s._data;return o!=null&&(r._data=o),r}function At(s,e,t,n,i="",r=0,o){return{element:s,triggerName:e,fromState:t,toState:n,phaseName:i,totalTime:r,disabled:!!o}}function I(s,e,t){let n=s.get(e);return n||s.set(e,n=t),n}function En(s){let e=s.indexOf(":"),t=s.substring(1,e),n=s.slice(e+1);return[t,n]}var Vs=typeof document>"u"?null:document.documentElement;function Ct(s){let e=s.parentNode||s.host||null;return e===Vs?null:e}function Bs(s){return s.substring(1,6)=="ebkit"}var ee=null,Sn=!1;function Qs(s){ee||(ee=xs()||{},Sn=ee.style?"WebkitAppearance"in ee.style:!1);let e=!0;return ee.style&&!Bs(s)&&(e=s in ee.style,!e&&Sn&&(e="Webkit"+s.charAt(0).toUpperCase()+s.slice(1)in ee.style)),e}function xs(){return typeof document<"u"?document.body:null}function Rn(s,e){for(;e;){if(e===s)return!0;e=Ct(e)}return!1}function In(s,e,t){if(t)return Array.from(s.querySelectorAll(e));let n=s.querySelector(e);return n?[n]:[]}var Pt=(()=>{class s{validateStyleProperty(t){return Qs(t)}matchesElement(t,n){return!1}containsElement(t,n){return Rn(t,n)}getParentElement(t){return Ct(t)}query(t,n,i){return In(t,n,i)}computeStyle(t,n,i){return i||""}animate(t,n,i,r,o,a=[],l){return new W(i,r)}static{this.\u0275fac=function(n){return new(n||s)}}static{this.\u0275prov=ae({token:s,factory:s.\u0275fac})}}return s})(),se=class{static{this.NOOP=new Pt}},ie=class{};var $s=1e3,On="{{",Us="}}",Ln="ng-enter",at="ng-leave",Ae="ng-trigger",Ne=".ng-trigger",vn="ng-animating",lt=".ng-animating";function $(s){if(typeof s=="number")return s;let e=s.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:ht(parseFloat(e[1]),e[2])}function ht(s,e){switch(e){case"s":return s*$s;default:return s}}function ke(s,e,t){return s.hasOwnProperty("duration")?s:Ws(s,e,t)}function Ws(s,e,t){let n=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i,i,r=0,o="";if(typeof s=="string"){let a=s.match(n);if(a===null)return e.push(_n(s)),{duration:0,delay:0,easing:""};i=ht(parseFloat(a[1]),a[2]);let l=a[3];l!=null&&(r=ht(parseFloat(l),a[4]));let h=a[5];h&&(o=h)}else i=s;if(!t){let a=!1,l=e.length;i<0&&(e.push(cs()),a=!0),r<0&&(e.push(us()),a=!0),a&&e.splice(l,0,_n(s))}return{duration:i,delay:r,easing:o}}function Gs(s){return s.length?s[0]instanceof Map?s:s.map(e=>new Map(Object.entries(e))):[]}function B(s,e,t){e.forEach((n,i)=>{let r=Dt(i);t&&!t.has(i)&&t.set(i,s.style[r]),s.style[r]=n})}function ne(s,e){e.forEach((t,n)=>{let i=Dt(n);s.style[i]=""})}function me(s){return Array.isArray(s)?s.length==1?s[0]:yn(s):s}function Hs(s,e,t){let n=e.params||{},i=zn(s);i.length&&i.forEach(r=>{n.hasOwnProperty(r)||t.push(ds(r))})}var ct=new RegExp(`${On}\\s*(.+?)\\s*${Us}`,"g");function zn(s){let e=[];if(typeof s=="string"){let t;for(;t=ct.exec(s);)e.push(t[1]);ct.lastIndex=0}return e}function ge(s,e,t){let n=`${s}`,i=n.replace(ct,(r,o)=>{let a=e[o];return a==null&&(t.push(fs(o)),a=""),a.toString()});return i==n?s:i}var Zs=/-+([a-z0-9])/g;function Dt(s){return s.replace(Zs,(...e)=>e[1].toUpperCase())}function Ys(s,e){return s===0||e===0}function Xs(s,e,t){if(t.size&&e.length){let n=e[0],i=[];if(t.forEach((r,o)=>{n.has(o)||i.push(o),n.set(o,r)}),i.length)for(let r=1;r<e.length;r++){let o=e[r];i.forEach(a=>o.set(a,Mt(s,a)))}}return e}function R(s,e,t){switch(e.type){case E.Trigger:return s.visitTrigger(e,t);case E.State:return s.visitState(e,t);case E.Transition:return s.visitTransition(e,t);case E.Sequence:return s.visitSequence(e,t);case E.Group:return s.visitGroup(e,t);case E.Animate:return s.visitAnimate(e,t);case E.Keyframes:return s.visitKeyframes(e,t);case E.Style:return s.visitStyle(e,t);case E.Reference:return s.visitReference(e,t);case E.AnimateChild:return s.visitAnimateChild(e,t);case E.AnimateRef:return s.visitAnimateRef(e,t);case E.Query:return s.visitQuery(e,t);case E.Stagger:return s.visitStagger(e,t);default:throw ms(e.type)}}function Mt(s,e){return window.getComputedStyle(s)[e]}var Js=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),Fe=class extends ie{normalizePropertyName(e,t){return Dt(e)}normalizeStyleValue(e,t,n,i){let r="",o=n.toString().trim();if(Js.has(t)&&n!==0&&n!=="0")if(typeof n=="number")r="px";else{let a=n.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&i.push(ps(e,n))}return o+r}};var Re="*";function ei(s,e){let t=[];return typeof s=="string"?s.split(/\s*,\s*/).forEach(n=>ti(n,t,e)):t.push(s),t}function ti(s,e,t){if(s[0]==":"){let l=ni(s,t);if(typeof l=="function"){e.push(l);return}s=l}let n=s.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(n==null||n.length<4)return t.push(Ps(s)),e;let i=n[1],r=n[2],o=n[3];e.push(bn(i,o));let a=i==Re&&o==Re;r[0]=="<"&&!a&&e.push(bn(o,i))}function ni(s,e){switch(s){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,n)=>parseFloat(n)>parseFloat(t);case":decrement":return(t,n)=>parseFloat(n)<parseFloat(t);default:return e.push(Ds(s)),"* => *"}}var Ce=new Set(["true","1"]),Pe=new Set(["false","0"]);function bn(s,e){let t=Ce.has(s)||Pe.has(s),n=Ce.has(e)||Pe.has(e);return(i,r)=>{let o=s==Re||s==i,a=e==Re||e==r;return!o&&t&&typeof i=="boolean"&&(o=i?Ce.has(s):Pe.has(s)),!a&&n&&typeof r=="boolean"&&(a=r?Ce.has(e):Pe.has(e)),o&&a}}var qn=":self",si=new RegExp(`s*${qn}s*,?`,"g");function Kn(s,e,t,n){return new ut(s).build(e,t,n)}var Tn="",ut=class{constructor(e){this._driver=e}build(e,t,n){let i=new dt(t);return this._resetContextStyleTimingState(i),R(this,me(e),i)}_resetContextStyleTimingState(e){e.currentQuerySelector=Tn,e.collectedStyles=new Map,e.collectedStyles.set(Tn,new Map),e.currentTime=0}visitTrigger(e,t){let n=t.queryCount=0,i=t.depCount=0,r=[],o=[];return e.name.charAt(0)=="@"&&t.errors.push(gs()),e.definitions.forEach(a=>{if(this._resetContextStyleTimingState(t),a.type==E.State){let l=a,h=l.name;h.toString().split(/\s*,\s*/).forEach(c=>{l.name=c,r.push(this.visitState(l,t))}),l.name=h}else if(a.type==E.Transition){let l=this.visitTransition(a,t);n+=l.queryCount,i+=l.depCount,o.push(l)}else t.errors.push(ys())}),{type:E.Trigger,name:e.name,states:r,transitions:o,queryCount:n,depCount:i,options:null}}visitState(e,t){let n=this.visitStyle(e.styles,t),i=e.options&&e.options.params||null;if(n.containsDynamicStyles){let r=new Set,o=i||{};n.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{zn(l).forEach(h=>{o.hasOwnProperty(h)||r.add(h)})})}),r.size&&t.errors.push(_s(e.name,[...r.values()]))}return{type:E.State,name:e.name,style:n,options:i?{params:i}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;let n=R(this,me(e.animation),t),i=ei(e.expr,t.errors);return{type:E.Transition,matchers:i,animation:n,queryCount:t.queryCount,depCount:t.depCount,options:te(e.options)}}visitSequence(e,t){return{type:E.Sequence,steps:e.steps.map(n=>R(this,n,t)),options:te(e.options)}}visitGroup(e,t){let n=t.currentTime,i=0,r=e.steps.map(o=>{t.currentTime=n;let a=R(this,o,t);return i=Math.max(i,t.currentTime),a});return t.currentTime=i,{type:E.Group,steps:r,options:te(e.options)}}visitAnimate(e,t){let n=ai(e.timings,t.errors);t.currentAnimateTimings=n;let i,r=e.styles?e.styles:et({});if(r.type==E.Keyframes)i=this.visitKeyframes(r,t);else{let o=e.styles,a=!1;if(!o){a=!0;let h={};n.easing&&(h.easing=n.easing),o=et(h)}t.currentTime+=n.duration+n.delay;let l=this.visitStyle(o,t);l.isEmptyStep=a,i=l}return t.currentAnimateTimings=null,{type:E.Animate,timings:n,style:i,options:null}}visitStyle(e,t){let n=this._makeStyleAst(e,t);return this._validateStyleAst(n,t),n}_makeStyleAst(e,t){let n=[],i=Array.isArray(e.styles)?e.styles:[e.styles];for(let a of i)typeof a=="string"?a===V?n.push(a):t.errors.push(Es(a)):n.push(new Map(Object.entries(a)));let r=!1,o=null;return n.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(o=a.get("easing"),a.delete("easing")),!r)){for(let l of a.values())if(l.toString().indexOf(On)>=0){r=!0;break}}}),{type:E.Style,styles:n,easing:o,offset:e.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(e,t){let n=t.currentAnimateTimings,i=t.currentTime,r=t.currentTime;n&&r>0&&(r-=n.duration+n.delay),e.styles.forEach(o=>{typeof o!="string"&&o.forEach((a,l)=>{let h=t.collectedStyles.get(t.currentQuerySelector),c=h.get(l),u=!0;c&&(r!=i&&r>=c.startTime&&i<=c.endTime&&(t.errors.push(Ss(l,c.startTime,c.endTime,r,i)),u=!1),r=c.startTime),u&&h.set(l,{startTime:r,endTime:i}),t.options&&Hs(a,t.options,t.errors)})})}visitKeyframes(e,t){let n={type:E.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(vs()),n;let i=1,r=0,o=[],a=!1,l=!1,h=0,c=e.steps.map(w=>{let A=this._makeStyleAst(w,t),M=A.offset!=null?A.offset:oi(A.styles),P=0;return M!=null&&(r++,P=A.offset=M),l=l||P<0||P>1,a=a||P<h,h=P,o.push(P),A});l&&t.errors.push(bs()),a&&t.errors.push(Ts());let u=e.steps.length,_=0;r>0&&r<u?t.errors.push(ws()):r==0&&(_=i/(u-1));let y=u-1,f=t.currentTime,g=t.currentAnimateTimings,b=g.duration;return c.forEach((w,A)=>{let M=_>0?A==y?1:_*A:o[A],P=M*b;t.currentTime=f+g.delay+P,g.duration=P,this._validateStyleAst(w,t),w.offset=M,n.styles.push(w)}),n}visitReference(e,t){return{type:E.Reference,animation:R(this,me(e.animation),t),options:te(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:E.AnimateChild,options:te(e.options)}}visitAnimateRef(e,t){return{type:E.AnimateRef,animation:this.visitReference(e.animation,t),options:te(e.options)}}visitQuery(e,t){let n=t.currentQuerySelector,i=e.options||{};t.queryCount++,t.currentQuery=e;let[r,o]=ii(e.selector);t.currentQuerySelector=n.length?n+" "+r:r,I(t.collectedStyles,t.currentQuerySelector,new Map);let a=R(this,me(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=n,{type:E.Query,selector:r,limit:i.limit||0,optional:!!i.optional,includeSelf:o,animation:a,originalSelector:e.selector,options:te(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push(As());let n=e.timings==="full"?{duration:0,delay:0,easing:"full"}:ke(e.timings,t.errors,!0);return{type:E.Stagger,animation:R(this,me(e.animation),t),timings:n,options:null}}};function ii(s){let e=!!s.split(/\s*,\s*/).find(t=>t==qn);return e&&(s=s.replace(si,"")),s=s.replace(/@\*/g,Ne).replace(/@\w+/g,t=>Ne+"-"+t.slice(1)).replace(/:animating/g,lt),[s,e]}function ri(s){return s?ve({},s):null}var dt=class{constructor(e){this.errors=e,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}};function oi(s){if(typeof s=="string")return null;let e=null;if(Array.isArray(s))s.forEach(t=>{if(t instanceof Map&&t.has("offset")){let n=t;e=parseFloat(n.get("offset")),n.delete("offset")}});else if(s instanceof Map&&s.has("offset")){let t=s;e=parseFloat(t.get("offset")),t.delete("offset")}return e}function ai(s,e){if(s.hasOwnProperty("duration"))return s;if(typeof s=="number"){let r=ke(s,e).duration;return nt(r,0,"")}let t=s;if(t.split(/\s+/).some(r=>r.charAt(0)=="{"&&r.charAt(1)=="{")){let r=nt(0,0,"");return r.dynamic=!0,r.strValue=t,r}let i=ke(t,e);return nt(i.duration,i.delay,i.easing)}function te(s){return s?(s=ve({},s),s.params&&(s.params=ri(s.params))):s={},s}function nt(s,e,t){return{duration:s,delay:e,easing:t}}function Nt(s,e,t,n,i,r,o=null,a=!1){return{type:1,element:s,keyframes:e,preStyleProps:t,postStyleProps:n,duration:i,delay:r,totalTime:i+r,easing:o,subTimeline:a}}var ye=class{constructor(){this._map=new Map}get(e){return this._map.get(e)||[]}append(e,t){let n=this._map.get(e);n||this._map.set(e,n=[]),n.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}},li=1,hi=":enter",ci=new RegExp(hi,"g"),ui=":leave",di=new RegExp(ui,"g");function jn(s,e,t,n,i,r=new Map,o=new Map,a,l,h=[]){return new ft().buildKeyframes(s,e,t,n,i,r,o,a,l,h)}var ft=class{buildKeyframes(e,t,n,i,r,o,a,l,h,c=[]){h=h||new ye;let u=new mt(e,t,h,i,r,c,[]);u.options=l;let _=l.delay?$(l.delay):0;u.currentTimeline.delayNextStep(_),u.currentTimeline.setStyles([o],null,u.errors,l),R(this,n,u);let y=u.timelines.filter(f=>f.containsAnimation());if(y.length&&a.size){let f;for(let g=y.length-1;g>=0;g--){let b=y[g];if(b.element===t){f=b;break}}f&&!f.allowOnlyTimelineStyles()&&f.setStyles([a],null,u.errors,l)}return y.length?y.map(f=>f.buildKeyframes()):[Nt(t,[],[],[],0,_,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){let n=t.subInstructions.get(t.element);if(n){let i=t.createSubContext(e.options),r=t.currentTimeline.currentTime,o=this._visitSubInstructions(n,i,i.options);r!=o&&t.transformIntoNewTimeline(o)}t.previousNode=e}visitAnimateRef(e,t){let n=t.createSubContext(e.options);n.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],t,n),this.visitReference(e.animation,n),t.transformIntoNewTimeline(n.currentTimeline.currentTime),t.previousNode=e}_applyAnimationRefDelays(e,t,n){for(let i of e){let r=i?.delay;if(r){let o=typeof r=="number"?r:$(ge(r,i?.params??{},t.errors));n.delayNextStep(o)}}}_visitSubInstructions(e,t,n){let r=t.currentTimeline.currentTime,o=n.duration!=null?$(n.duration):null,a=n.delay!=null?$(n.delay):null;return o!==0&&e.forEach(l=>{let h=t.appendInstructionToTimeline(l,o,a);r=Math.max(r,h.duration+h.delay)}),r}visitReference(e,t){t.updateOptions(e.options,!0),R(this,e.animation,t),t.previousNode=e}visitSequence(e,t){let n=t.subContextCount,i=t,r=e.options;if(r&&(r.params||r.delay)&&(i=t.createSubContext(r),i.transformIntoNewTimeline(),r.delay!=null)){i.previousNode.type==E.Style&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=Ie);let o=$(r.delay);i.delayNextStep(o)}e.steps.length&&(e.steps.forEach(o=>R(this,o,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>n&&i.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){let n=[],i=t.currentTimeline.currentTime,r=e.options&&e.options.delay?$(e.options.delay):0;e.steps.forEach(o=>{let a=t.createSubContext(e.options);r&&a.delayNextStep(r),R(this,o,a),i=Math.max(i,a.currentTimeline.currentTime),n.push(a.currentTimeline)}),n.forEach(o=>t.currentTimeline.mergeTimelineCollectedStyles(o)),t.transformIntoNewTimeline(i),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){let n=e.strValue,i=t.params?ge(n,t.params,t.errors):n;return ke(i,t.errors)}else return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){let n=t.currentAnimateTimings=this._visitTiming(e.timings,t),i=t.currentTimeline;n.delay&&(t.incrementTime(n.delay),i.snapshotCurrentStyles());let r=e.style;r.type==E.Keyframes?this.visitKeyframes(r,t):(t.incrementTime(n.duration),this.visitStyle(r,t),i.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){let n=t.currentTimeline,i=t.currentAnimateTimings;!i&&n.hasCurrentStyleProperties()&&n.forwardFrame();let r=i&&i.easing||e.easing;e.isEmptyStep?n.applyEmptyStep(r):n.setStyles(e.styles,r,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){let n=t.currentAnimateTimings,i=t.currentTimeline.duration,r=n.duration,a=t.createSubContext().currentTimeline;a.easing=n.easing,e.styles.forEach(l=>{let h=l.offset||0;a.forwardTime(h*r),a.setStyles(l.styles,l.easing,t.errors,t.options),a.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(a),t.transformIntoNewTimeline(i+r),t.previousNode=e}visitQuery(e,t){let n=t.currentTimeline.currentTime,i=e.options||{},r=i.delay?$(i.delay):0;r&&(t.previousNode.type===E.Style||n==0&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=Ie);let o=n,a=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!i.optional,t.errors);t.currentQueryTotal=a.length;let l=null;a.forEach((h,c)=>{t.currentQueryIndex=c;let u=t.createSubContext(e.options,h);r&&u.delayNextStep(r),h===t.element&&(l=u.currentTimeline),R(this,e.animation,u),u.currentTimeline.applyStylesToKeyframe();let _=u.currentTimeline.currentTime;o=Math.max(o,_)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(o),l&&(t.currentTimeline.mergeTimelineCollectedStyles(l),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){let n=t.parentContext,i=t.currentTimeline,r=e.timings,o=Math.abs(r.duration),a=o*(t.currentQueryTotal-1),l=o*t.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":l=a-l;break;case"full":l=n.currentStaggerTime;break}let c=t.currentTimeline;l&&c.delayNextStep(l);let u=c.currentTime;R(this,e.animation,t),t.previousNode=e,n.currentStaggerTime=i.currentTime-u+(i.startTime-n.currentTimeline.startTime)}},Ie={},mt=class s{constructor(e,t,n,i,r,o,a,l){this._driver=e,this.element=t,this.subInstructions=n,this._enterClassName=i,this._leaveClassName=r,this.errors=o,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Ie,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new Oe(this._driver,t,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;let n=e,i=this.options;n.duration!=null&&(i.duration=$(n.duration)),n.delay!=null&&(i.delay=$(n.delay));let r=n.params;if(r){let o=i.params;o||(o=this.options.params={}),Object.keys(r).forEach(a=>{(!t||!o.hasOwnProperty(a))&&(o[a]=ge(r[a],o,this.errors))})}}_copyOptions(){let e={};if(this.options){let t=this.options.params;if(t){let n=e.params={};Object.keys(t).forEach(i=>{n[i]=t[i]})}}return e}createSubContext(e=null,t,n){let i=t||this.element,r=new s(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,n||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(e),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(e){return this.previousNode=Ie,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,n){let i={duration:t??e.duration,delay:this.currentTimeline.currentTime+(n??0)+e.delay,easing:""},r=new pt(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,i,e.stretchStartingKeyframe);return this.timelines.push(r),i}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,n,i,r,o){let a=[];if(i&&a.push(this.element),e.length>0){e=e.replace(ci,"."+this._enterClassName),e=e.replace(di,"."+this._leaveClassName);let l=n!=1,h=this._driver.query(this.element,e,l);n!==0&&(h=n<0?h.slice(h.length+n,h.length):h.slice(0,n)),a.push(...h)}return!r&&a.length==0&&o.push(Cs(t)),a}},Oe=class s{constructor(e,t,n,i){this._driver=e,this.element=t,this.startTime=n,this._elementTimelineStylesLookup=i,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){let t=this._keyframes.size===1&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new s(this._driver,e,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=li,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,t){this._localTimelineStyles.set(e,t),this._globalTimelineStyles.set(e,t),this._styleSummary.set(e,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[t,n]of this._globalTimelineStyles)this._backFill.set(t,n||V),this._currentKeyframe.set(t,V);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,n,i){t&&this._previousKeyframe.set("easing",t);let r=i&&i.params||{},o=fi(e,this._globalTimelineStyles);for(let[a,l]of o){let h=ge(l,r,n);this._pendingStyles.set(a,h),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??V),this._updateStyle(a,h)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((e,t)=>{this._currentKeyframe.set(t,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,e)}))}snapshotCurrentStyles(){for(let[e,t]of this._localTimelineStyles)this._pendingStyles.set(e,t),this._updateStyle(e,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((t,n)=>{let i=this._styleSummary.get(n);(!i||t.time>i.time)&&this._updateStyle(n,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,t=new Set,n=this._keyframes.size===1&&this.duration===0,i=[];this._keyframes.forEach((a,l)=>{let h=new Map([...this._backFill,...a]);h.forEach((c,u)=>{c===we?e.add(u):c===V&&t.add(u)}),n||h.set("offset",l/this.duration),i.push(h)});let r=[...e.values()],o=[...t.values()];if(n){let a=i[0],l=new Map(a);a.set("offset",0),l.set("offset",1),i=[a,l]}return Nt(this.element,i,r,o,this.duration,this.startTime,this.easing,!1)}},pt=class extends Oe{constructor(e,t,n,i,r,o,a=!1){super(e,t,o.delay),this.keyframes=n,this.preStyleProps=i,this.postStyleProps=r,this._stretchStartingKeyframe=a,this.timings={duration:o.duration,delay:o.delay,easing:o.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:n,easing:i}=this.timings;if(this._stretchStartingKeyframe&&t){let r=[],o=n+t,a=t/o,l=new Map(e[0]);l.set("offset",0),r.push(l);let h=new Map(e[0]);h.set("offset",wn(a)),r.push(h);let c=e.length-1;for(let u=1;u<=c;u++){let _=new Map(e[u]),y=_.get("offset"),f=t+y*n;_.set("offset",wn(f/o)),r.push(_)}n=o,t=0,i="",e=r}return Nt(this.element,e,this.preStyleProps,this.postStyleProps,n,t,i,!0)}};function wn(s,e=3){let t=Math.pow(10,e-1);return Math.round(s*t)/t}function fi(s,e){let t=new Map,n;return s.forEach(i=>{if(i==="*"){n??=e.keys();for(let r of n)t.set(r,V)}else for(let[r,o]of i)t.set(r,o)}),t}function An(s,e,t,n,i,r,o,a,l,h,c,u,_){return{type:0,element:s,triggerName:e,isRemovalTransition:i,fromState:t,fromStyles:r,toState:n,toStyles:o,timelines:a,queriedElements:l,preStyleProps:h,postStyleProps:c,totalTime:u,errors:_}}var st={},Le=class{constructor(e,t,n){this._triggerName=e,this.ast=t,this._stateStyles=n}match(e,t,n,i){return mi(this.ast.matchers,e,t,n,i)}buildStyles(e,t,n){let i=this._stateStyles.get("*");return e!==void 0&&(i=this._stateStyles.get(e?.toString())||i),i?i.buildStyles(t,n):new Map}build(e,t,n,i,r,o,a,l,h,c){let u=[],_=this.ast.options&&this.ast.options.params||st,y=a&&a.params||st,f=this.buildStyles(n,y,u),g=l&&l.params||st,b=this.buildStyles(i,g,u),w=new Set,A=new Map,M=new Map,P=i==="void",re={params:Vn(g,_),delay:this.ast.options?.delay},K=c?[]:jn(e,t,this.ast.animation,r,o,f,b,re,h,u),N=0;return K.forEach(k=>{N=Math.max(k.duration+k.delay,N)}),u.length?An(t,this._triggerName,n,i,P,f,b,[],[],A,M,N,u):(K.forEach(k=>{let H=k.element,oe=I(A,H,new Set);k.preStyleProps.forEach(Z=>oe.add(Z));let Ft=I(M,H,new Set);k.postStyleProps.forEach(Z=>Ft.add(Z)),H!==t&&w.add(H)}),An(t,this._triggerName,n,i,P,f,b,K,[...w.values()],A,M,N))}};function mi(s,e,t,n,i){return s.some(r=>r(e,t,n,i))}function Vn(s,e){let t=ve({},e);return Object.entries(s).forEach(([n,i])=>{i!=null&&(t[n]=i)}),t}var gt=class{constructor(e,t,n){this.styles=e,this.defaultParams=t,this.normalizer=n}buildStyles(e,t){let n=new Map,i=Vn(e,this.defaultParams);return this.styles.styles.forEach(r=>{typeof r!="string"&&r.forEach((o,a)=>{o&&(o=ge(o,i,t));let l=this.normalizer.normalizePropertyName(a,t);o=this.normalizer.normalizeStyleValue(a,l,o,t),n.set(a,o)})}),n}};function pi(s,e,t){return new yt(s,e,t)}var yt=class{constructor(e,t,n){this.name=e,this.ast=t,this._normalizer=n,this.transitionFactories=[],this.states=new Map,t.states.forEach(i=>{let r=i.options&&i.options.params||{};this.states.set(i.name,new gt(i.style,r,n))}),Cn(this.states,"true","1"),Cn(this.states,"false","0"),t.transitions.forEach(i=>{this.transitionFactories.push(new Le(e,i,this.states))}),this.fallbackTransition=gi(e,this.states,this._normalizer)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,n,i){return this.transitionFactories.find(o=>o.match(e,t,n,i))||null}matchStyles(e,t,n){return this.fallbackTransition.buildStyles(e,t,n)}};function gi(s,e,t){let n=[(o,a)=>!0],i={type:E.Sequence,steps:[],options:null},r={type:E.Transition,animation:i,matchers:n,options:null,queryCount:0,depCount:0};return new Le(s,r,e)}function Cn(s,e,t){s.has(e)?s.has(t)||s.set(t,s.get(e)):s.has(t)&&s.set(e,s.get(t))}var yi=new ye,_t=class{constructor(e,t,n){this.bodyNode=e,this._driver=t,this._normalizer=n,this._animations=new Map,this._playersById=new Map,this.players=[]}register(e,t){let n=[],i=[],r=Kn(this._driver,t,n,i);if(n.length)throw ks(n);i.length&&void 0,this._animations.set(e,r)}_buildPlayer(e,t,n){let i=e.element,r=Fn(this._normalizer,e.keyframes,t,n);return this._driver.animate(i,r,e.duration,e.delay,e.easing,[],!0)}create(e,t,n={}){let i=[],r=this._animations.get(e),o,a=new Map;if(r?(o=jn(this._driver,t,r,Ln,at,new Map,new Map,n,yi,i),o.forEach(c=>{let u=I(a,c.element,new Map);c.postStyleProps.forEach(_=>u.set(_,null))})):(i.push(Fs()),o=[]),i.length)throw Rs(i);a.forEach((c,u)=>{c.forEach((_,y)=>{c.set(y,this._driver.computeStyle(u,y,V))})});let l=o.map(c=>{let u=a.get(c.element);return this._buildPlayer(c,new Map,u)}),h=G(l);return this._playersById.set(e,h),h.onDestroy(()=>this.destroy(e)),this.players.push(h),h}destroy(e){let t=this._getPlayer(e);t.destroy(),this._playersById.delete(e);let n=this.players.indexOf(t);n>=0&&this.players.splice(n,1)}_getPlayer(e){let t=this._playersById.get(e);if(!t)throw Is(e);return t}listen(e,t,n,i){let r=At(t,"","","");return wt(this._getPlayer(e),n,r,i),()=>{}}command(e,t,n,i){if(n=="register"){this.register(e,i[0]);return}if(n=="create"){let o=i[0]||{};this.create(e,t,o);return}let r=this._getPlayer(e);switch(n){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(e);break}}},Pn="ng-animate-queued",_i=".ng-animate-queued",it="ng-animate-disabled",Ei=".ng-animate-disabled",Si="ng-star-inserted",vi=".ng-star-inserted",bi=[],Bn={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Ti={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},q="__ng_removed",_e=class{get params(){return this.options.params}constructor(e,t=""){this.namespaceId=t;let n=e&&e.hasOwnProperty("value"),i=n?e.value:e;if(this.value=Ai(i),n){let r=e,{value:o}=r,a=Lt(r,["value"]);this.options=a}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){let t=e.params;if(t){let n=this.options.params;Object.keys(t).forEach(i=>{n[i]==null&&(n[i]=t[i])})}}},pe="void",rt=new _e(pe),Et=class{constructor(e,t,n){this.id=e,this.hostElement=t,this._engine=n,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,L(t,this._hostClassName)}listen(e,t,n,i){if(!this._triggers.has(t))throw Os(n,t);if(n==null||n.length==0)throw Ls(t);if(!Ci(n))throw zs(n,t);let r=I(this._elementListeners,e,[]),o={name:t,phase:n,callback:i};r.push(o);let a=I(this._engine.statesByElement,e,new Map);return a.has(t)||(L(e,Ae),L(e,Ae+"-"+t),a.set(t,rt)),()=>{this._engine.afterFlush(()=>{let l=r.indexOf(o);l>=0&&r.splice(l,1),this._triggers.has(t)||a.delete(t)})}}register(e,t){return this._triggers.has(e)?!1:(this._triggers.set(e,t),!0)}_getTrigger(e){let t=this._triggers.get(e);if(!t)throw qs(e);return t}trigger(e,t,n,i=!0){let r=this._getTrigger(t),o=new Ee(this.id,t,e),a=this._engine.statesByElement.get(e);a||(L(e,Ae),L(e,Ae+"-"+t),this._engine.statesByElement.set(e,a=new Map));let l=a.get(t),h=new _e(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&h.absorbOptions(l.options),a.set(t,h),l||(l=rt),!(h.value===pe)&&l.value===h.value){if(!Mi(l.params,h.params)){let g=[],b=r.matchStyles(l.value,l.params,g),w=r.matchStyles(h.value,h.params,g);g.length?this._engine.reportError(g):this._engine.afterFlush(()=>{ne(e,b),B(e,w)})}return}let _=I(this._engine.playersByElement,e,[]);_.forEach(g=>{g.namespaceId==this.id&&g.triggerName==t&&g.queued&&g.destroy()});let y=r.matchTransition(l.value,h.value,e,h.params),f=!1;if(!y){if(!i)return;y=r.fallbackTransition,f=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:y,fromState:l,toState:h,player:o,isFallbackTransition:f}),f||(L(e,Pn),o.onStart(()=>{ce(e,Pn)})),o.onDone(()=>{let g=this.players.indexOf(o);g>=0&&this.players.splice(g,1);let b=this._engine.playersByElement.get(e);if(b){let w=b.indexOf(o);w>=0&&b.splice(w,1)}}),this.players.push(o),_.push(o),o}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(t=>t.delete(e)),this._elementListeners.forEach((t,n)=>{this._elementListeners.set(n,t.filter(i=>i.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);let t=this._engine.playersByElement.get(e);t&&(t.forEach(n=>n.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){let n=this._engine.driver.query(e,Ne,!0);n.forEach(i=>{if(i[q])return;let r=this._engine.fetchNamespacesByElement(i);r.size?r.forEach(o=>o.triggerLeaveAnimation(i,t,!1,!0)):this.clearElementCache(i)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(i=>this.clearElementCache(i)))}triggerLeaveAnimation(e,t,n,i){let r=this._engine.statesByElement.get(e),o=new Map;if(r){let a=[];if(r.forEach((l,h)=>{if(o.set(h,l.value),this._triggers.has(h)){let c=this.trigger(e,h,pe,i);c&&a.push(c)}}),a.length)return this._engine.markElementAsRemoved(this.id,e,!0,t,o),n&&G(a).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){let t=this._elementListeners.get(e),n=this._engine.statesByElement.get(e);if(t&&n){let i=new Set;t.forEach(r=>{let o=r.name;if(i.has(o))return;i.add(o);let l=this._triggers.get(o).fallbackTransition,h=n.get(o)||rt,c=new _e(pe),u=new Ee(this.id,o,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:o,transition:l,fromState:h,toState:c,player:u,isFallbackTransition:!0})})}}removeNode(e,t){let n=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let i=!1;if(n.totalAnimations){let r=n.players.length?n.playersByQueriedElement.get(e):[];if(r&&r.length)i=!0;else{let o=e;for(;o=o.parentNode;)if(n.statesByElement.get(o)){i=!0;break}}}if(this.prepareLeaveAnimationListeners(e),i)n.markElementAsRemoved(this.id,e,!1,t);else{let r=e[q];(!r||r===Bn)&&(n.afterFlush(()=>this.clearElementCache(e)),n.destroyInnerAnimations(e),n._onRemovalComplete(e,t))}}insertNode(e,t){L(e,this._hostClassName)}drainQueuedTransitions(e){let t=[];return this._queue.forEach(n=>{let i=n.player;if(i.destroyed)return;let r=n.element,o=this._elementListeners.get(r);o&&o.forEach(a=>{if(a.name==n.triggerName){let l=At(r,n.triggerName,n.fromState.value,n.toState.value);l._data=e,wt(n.player,a.phase,l,a.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):t.push(n)}),this._queue=[],t.sort((n,i)=>{let r=n.transition.ast.depCount,o=i.transition.ast.depCount;return r==0||o==0?r-o:this._engine.driver.containsElement(n.element,i.element)?1:-1})}destroy(e){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}},St=class{_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}constructor(e,t,n,i){this.bodyNode=e,this.driver=t,this._normalizer=n,this.scheduler=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,o)=>{}}get queuedPlayers(){let e=[];return this._namespaceList.forEach(t=>{t.players.forEach(n=>{n.queued&&e.push(n)})}),e}createNamespace(e,t){let n=new Et(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(n,t):(this.newHostElements.set(t,n),this.collectEnterElement(t)),this._namespaceLookup[e]=n}_balanceNamespaceList(e,t){let n=this._namespaceList,i=this.namespacesByHostElement;if(n.length-1>=0){let o=!1,a=this.driver.getParentElement(t);for(;a;){let l=i.get(a);if(l){let h=n.indexOf(l);n.splice(h+1,0,e),o=!0;break}a=this.driver.getParentElement(a)}o||n.unshift(e)}else n.push(e);return i.set(t,e),e}register(e,t){let n=this._namespaceLookup[e];return n||(n=this.createNamespace(e,t)),n}registerTrigger(e,t,n){let i=this._namespaceLookup[e];i&&i.register(t,n)&&this.totalAnimations++}destroy(e,t){e&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let n=this._fetchNamespace(e);this.namespacesByHostElement.delete(n.hostElement);let i=this._namespaceList.indexOf(n);i>=0&&this._namespaceList.splice(i,1),n.destroy(t),delete this._namespaceLookup[e]}))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){let t=new Set,n=this.statesByElement.get(e);if(n){for(let i of n.values())if(i.namespaceId){let r=this._fetchNamespace(i.namespaceId);r&&t.add(r)}}return t}trigger(e,t,n,i){if(De(t)){let r=this._fetchNamespace(e);if(r)return r.trigger(t,n,i),!0}return!1}insertNode(e,t,n,i){if(!De(t))return;let r=t[q];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;let o=this.collectedLeaveElements.indexOf(t);o>=0&&this.collectedLeaveElements.splice(o,1)}if(e){let o=this._fetchNamespace(e);o&&o.insertNode(t,n)}i&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),L(e,it)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),ce(e,it))}removeNode(e,t,n){if(De(t)){this.scheduler?.notify();let i=e?this._fetchNamespace(e):null;i?i.removeNode(t,n):this.markElementAsRemoved(e,t,!1,n);let r=this.namespacesByHostElement.get(t);r&&r.id!==e&&r.removeNode(t,n)}else this._onRemovalComplete(t,n)}markElementAsRemoved(e,t,n,i,r){this.collectedLeaveElements.push(t),t[q]={namespaceId:e,setForRemoval:i,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:r}}listen(e,t,n,i,r){return De(t)?this._fetchNamespace(e).listen(t,n,i,r):()=>{}}_buildInstruction(e,t,n,i,r){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,n,i,e.fromState.options,e.toState.options,t,r)}destroyInnerAnimations(e){let t=this.driver.query(e,Ne,!0);t.forEach(n=>this.destroyActiveAnimationsForElement(n)),this.playersByQueriedElement.size!=0&&(t=this.driver.query(e,lt,!0),t.forEach(n=>this.finishActiveQueriedAnimationOnElement(n)))}destroyActiveAnimationsForElement(e){let t=this.playersByElement.get(e);t&&t.forEach(n=>{n.queued?n.markedForDestroy=!0:n.destroy()})}finishActiveQueriedAnimationOnElement(e){let t=this.playersByQueriedElement.get(e);t&&t.forEach(n=>n.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return G(this.players).onDone(()=>e());e()})}processLeaveNode(e){let t=e[q];if(t&&t.setForRemoval){if(e[q]=Bn,t.namespaceId){this.destroyInnerAnimations(e);let n=this._fetchNamespace(t.namespaceId);n&&n.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}e.classList?.contains(it)&&this.markElementAsDisabled(e,!1),this.driver.query(e,Ei,!0).forEach(n=>{this.markElementAsDisabled(n,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((n,i)=>this._balanceNamespaceList(n,i)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;n<this.collectedEnterElements.length;n++){let i=this.collectedEnterElements[n];L(i,Si)}if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){let n=[];try{t=this._flushAnimations(n,e)}finally{for(let i=0;i<n.length;i++)n[i]()}}else for(let n=0;n<this.collectedLeaveElements.length;n++){let i=this.collectedLeaveElements[n];this.processLeaveNode(i)}if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(n=>n()),this._flushFns=[],this._whenQuietFns.length){let n=this._whenQuietFns;this._whenQuietFns=[],t.length?G(t).onDone(()=>{n.forEach(i=>i())}):n.forEach(i=>i())}}reportError(e){throw Ks(e)}_flushAnimations(e,t){let n=new ye,i=[],r=new Map,o=[],a=new Map,l=new Map,h=new Map,c=new Set;this.disabledNodes.forEach(d=>{c.add(d);let m=this.driver.query(d,_i,!0);for(let p=0;p<m.length;p++)c.add(m[p])});let u=this.bodyNode,_=Array.from(this.statesByElement.keys()),y=Nn(_,this.collectedEnterElements),f=new Map,g=0;y.forEach((d,m)=>{let p=Ln+g++;f.set(m,p),d.forEach(S=>L(S,p))});let b=[],w=new Set,A=new Set;for(let d=0;d<this.collectedLeaveElements.length;d++){let m=this.collectedLeaveElements[d],p=m[q];p&&p.setForRemoval&&(b.push(m),w.add(m),p.hasAnimation?this.driver.query(m,vi,!0).forEach(S=>w.add(S)):A.add(m))}let M=new Map,P=Nn(_,Array.from(w));P.forEach((d,m)=>{let p=at+g++;M.set(m,p),d.forEach(S=>L(S,p))}),e.push(()=>{y.forEach((d,m)=>{let p=f.get(m);d.forEach(S=>ce(S,p))}),P.forEach((d,m)=>{let p=M.get(m);d.forEach(S=>ce(S,p))}),b.forEach(d=>{this.processLeaveNode(d)})});let re=[],K=[];for(let d=this._namespaceList.length-1;d>=0;d--)this._namespaceList[d].drainQueuedTransitions(t).forEach(p=>{let S=p.player,C=p.element;if(re.push(S),this.collectedEnterElements.length){let D=C[q];if(D&&D.setForMove){if(D.previousTriggersValues&&D.previousTriggersValues.has(p.triggerName)){let Y=D.previousTriggersValues.get(p.triggerName),O=this.statesByElement.get(p.element);if(O&&O.has(p.triggerName)){let Se=O.get(p.triggerName);Se.value=Y,O.set(p.triggerName,Se)}}S.destroy();return}}let j=!u||!this.driver.containsElement(u,C),F=M.get(C),U=f.get(C),T=this._buildInstruction(p,n,U,F,j);if(T.errors&&T.errors.length){K.push(T);return}if(j){S.onStart(()=>ne(C,T.fromStyles)),S.onDestroy(()=>B(C,T.toStyles)),i.push(S);return}if(p.isFallbackTransition){S.onStart(()=>ne(C,T.fromStyles)),S.onDestroy(()=>B(C,T.toStyles)),i.push(S);return}let Ot=[];T.timelines.forEach(D=>{D.stretchStartingKeyframe=!0,this.disabledNodes.has(D.element)||Ot.push(D)}),T.timelines=Ot,n.append(C,T.timelines);let Jn={instruction:T,player:S,element:C};o.push(Jn),T.queriedElements.forEach(D=>I(a,D,[]).push(S)),T.preStyleProps.forEach((D,Y)=>{if(D.size){let O=l.get(Y);O||l.set(Y,O=new Set),D.forEach((Se,Be)=>O.add(Be))}}),T.postStyleProps.forEach((D,Y)=>{let O=h.get(Y);O||h.set(Y,O=new Set),D.forEach((Se,Be)=>O.add(Be))})});if(K.length){let d=[];K.forEach(m=>{d.push(js(m.triggerName,m.errors))}),re.forEach(m=>m.destroy()),this.reportError(d)}let N=new Map,k=new Map;o.forEach(d=>{let m=d.element;n.has(m)&&(k.set(m,m),this._beforeAnimationBuild(d.player.namespaceId,d.instruction,N))}),i.forEach(d=>{let m=d.element;this._getPreviousPlayers(m,!1,d.namespaceId,d.triggerName,null).forEach(S=>{I(N,m,[]).push(S),S.destroy()})});let H=b.filter(d=>kn(d,l,h)),oe=new Map;Mn(oe,this.driver,A,h,V).forEach(d=>{kn(d,l,h)&&H.push(d)});let Z=new Map;y.forEach((d,m)=>{Mn(Z,this.driver,new Set(d),l,we)}),H.forEach(d=>{let m=oe.get(d),p=Z.get(d);oe.set(d,new Map([...m?.entries()??[],...p?.entries()??[]]))});let Ve=[],Rt=[],It={};o.forEach(d=>{let{element:m,player:p,instruction:S}=d;if(n.has(m)){if(c.has(m)){p.onDestroy(()=>B(m,S.toStyles)),p.disabled=!0,p.overrideTotalTime(S.totalTime),i.push(p);return}let C=It;if(k.size>1){let F=m,U=[];for(;F=F.parentNode;){let T=k.get(F);if(T){C=T;break}U.push(F)}U.forEach(T=>k.set(T,C))}let j=this._buildAnimation(p.namespaceId,S,N,r,Z,oe);if(p.setRealPlayer(j),C===It)Ve.push(p);else{let F=this.playersByElement.get(C);F&&F.length&&(p.parentPlayer=G(F)),i.push(p)}}else ne(m,S.fromStyles),p.onDestroy(()=>B(m,S.toStyles)),Rt.push(p),c.has(m)&&i.push(p)}),Rt.forEach(d=>{let m=r.get(d.element);if(m&&m.length){let p=G(m);d.setRealPlayer(p)}}),i.forEach(d=>{d.parentPlayer?d.syncPlayerEvents(d.parentPlayer):d.destroy()});for(let d=0;d<b.length;d++){let m=b[d],p=m[q];if(ce(m,at),p&&p.hasAnimation)continue;let S=[];if(a.size){let j=a.get(m);j&&j.length&&S.push(...j);let F=this.driver.query(m,lt,!0);for(let U=0;U<F.length;U++){let T=a.get(F[U]);T&&T.length&&S.push(...T)}}let C=S.filter(j=>!j.destroyed);C.length?Pi(this,m,C):this.processLeaveNode(m)}return b.length=0,Ve.forEach(d=>{this.players.push(d),d.onDone(()=>{d.destroy();let m=this.players.indexOf(d);this.players.splice(m,1)}),d.play()}),Ve}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,n,i,r){let o=[];if(t){let a=this.playersByQueriedElement.get(e);a&&(o=a)}else{let a=this.playersByElement.get(e);if(a){let l=!r||r==pe;a.forEach(h=>{h.queued||!l&&h.triggerName!=i||o.push(h)})}}return(n||i)&&(o=o.filter(a=>!(n&&n!=a.namespaceId||i&&i!=a.triggerName))),o}_beforeAnimationBuild(e,t,n){let i=t.triggerName,r=t.element,o=t.isRemovalTransition?void 0:e,a=t.isRemovalTransition?void 0:i;for(let l of t.timelines){let h=l.element,c=h!==r,u=I(n,h,[]);this._getPreviousPlayers(h,c,o,a,t.toState).forEach(y=>{let f=y.getRealPlayer();f.beforeDestroy&&f.beforeDestroy(),y.destroy(),u.push(y)})}ne(r,t.fromStyles)}_buildAnimation(e,t,n,i,r,o){let a=t.triggerName,l=t.element,h=[],c=new Set,u=new Set,_=t.timelines.map(f=>{let g=f.element;c.add(g);let b=g[q];if(b&&b.removedBeforeQueried)return new W(f.duration,f.delay);let w=g!==l,A=Di((n.get(g)||bi).map(N=>N.getRealPlayer())).filter(N=>{let k=N;return k.element?k.element===g:!1}),M=r.get(g),P=o.get(g),re=Fn(this._normalizer,f.keyframes,M,P),K=this._buildPlayer(f,re,A);if(f.subTimeline&&i&&u.add(g),w){let N=new Ee(e,a,g);N.setRealPlayer(K),h.push(N)}return K});h.forEach(f=>{I(this.playersByQueriedElement,f.element,[]).push(f),f.onDone(()=>wi(this.playersByQueriedElement,f.element,f))}),c.forEach(f=>L(f,vn));let y=G(_);return y.onDestroy(()=>{c.forEach(f=>ce(f,vn)),B(l,t.toStyles)}),u.forEach(f=>{I(i,f,[]).push(y)}),y}_buildPlayer(e,t,n){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,n):new W(e.duration,e.delay)}},Ee=class{constructor(e,t,n){this.namespaceId=e,this.triggerName=t,this.element=n,this._player=new W,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((t,n)=>{t.forEach(i=>wt(e,n,void 0,i))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){let t=this._player;t.triggerCallback&&e.onStart(()=>t.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,t){I(this._queuedCallbacks,e,[]).push(t)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){let t=this._player;t.triggerCallback&&t.triggerCallback(e)}};function wi(s,e,t){let n=s.get(e);if(n){if(n.length){let i=n.indexOf(t);n.splice(i,1)}n.length==0&&s.delete(e)}return n}function Ai(s){return s??null}function De(s){return s&&s.nodeType===1}function Ci(s){return s=="start"||s=="done"}function Dn(s,e){let t=s.style.display;return s.style.display=e??"none",t}function Mn(s,e,t,n,i){let r=[];t.forEach(l=>r.push(Dn(l)));let o=[];n.forEach((l,h)=>{let c=new Map;l.forEach(u=>{let _=e.computeStyle(h,u,i);c.set(u,_),(!_||_.length==0)&&(h[q]=Ti,o.push(h))}),s.set(h,c)});let a=0;return t.forEach(l=>Dn(l,r[a++])),o}function Nn(s,e){let t=new Map;if(s.forEach(a=>t.set(a,[])),e.length==0)return t;let n=1,i=new Set(e),r=new Map;function o(a){if(!a)return n;let l=r.get(a);if(l)return l;let h=a.parentNode;return t.has(h)?l=h:i.has(h)?l=n:l=o(h),r.set(a,l),l}return e.forEach(a=>{let l=o(a);l!==n&&t.get(l).push(a)}),t}function L(s,e){s.classList?.add(e)}function ce(s,e){s.classList?.remove(e)}function Pi(s,e,t){G(t).onDone(()=>s.processLeaveNode(e))}function Di(s){let e=[];return Qn(s,e),e}function Qn(s,e){for(let t=0;t<s.length;t++){let n=s[t];n instanceof fe?Qn(n.players,e):e.push(n)}}function Mi(s,e){let t=Object.keys(s),n=Object.keys(e);if(t.length!=n.length)return!1;for(let i=0;i<t.length;i++){let r=t[i];if(!e.hasOwnProperty(r)||s[r]!==e[r])return!1}return!0}function kn(s,e,t){let n=t.get(s);if(!n)return!1;let i=e.get(s);return i?n.forEach(r=>i.add(r)):e.set(s,n),t.delete(s),!0}var ue=class{constructor(e,t,n,i){this._driver=t,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(r,o)=>{},this._transitionEngine=new St(e.body,t,n,i),this._timelineEngine=new _t(e.body,t,n),this._transitionEngine.onRemovalComplete=(r,o)=>this.onRemovalComplete(r,o)}registerTrigger(e,t,n,i,r){let o=e+"-"+i,a=this._triggerCache[o];if(!a){let l=[],h=[],c=Kn(this._driver,r,l,h);if(l.length)throw Ms(i,l);h.length&&void 0,a=pi(i,c,this._normalizer),this._triggerCache[o]=a}this._transitionEngine.registerTrigger(t,i,a)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,n,i){this._transitionEngine.insertNode(e,t,n,i)}onRemove(e,t,n){this._transitionEngine.removeNode(e,t,n)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,n,i){if(n.charAt(0)=="@"){let[r,o]=En(n),a=i;this._timelineEngine.command(r,t,o,a)}else this._transitionEngine.trigger(e,t,n,i)}listen(e,t,n,i,r){if(n.charAt(0)=="@"){let[o,a]=En(n);return this._timelineEngine.listen(o,t,a,r)}return this._transitionEngine.listen(e,t,n,i,r)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(e){this._transitionEngine.afterFlushAnimationsDone(e)}};function Ni(s,e){let t=null,n=null;return Array.isArray(e)&&e.length?(t=ot(e[0]),e.length>1&&(n=ot(e[e.length-1]))):e instanceof Map&&(t=ot(e)),t||n?new vt(s,t,n):null}var vt=class s{static{this.initialStylesByElement=new WeakMap}constructor(e,t,n){this._element=e,this._startStyles=t,this._endStyles=n,this._state=0;let i=s.initialStylesByElement.get(e);i||s.initialStylesByElement.set(e,i=new Map),this._initialStyles=i}start(){this._state<1&&(this._startStyles&&B(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(B(this._element,this._initialStyles),this._endStyles&&(B(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(s.initialStylesByElement.delete(this._element),this._startStyles&&(ne(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(ne(this._element,this._endStyles),this._endStyles=null),B(this._element,this._initialStyles),this._state=3)}};function ot(s){let e=null;return s.forEach((t,n)=>{ki(n)&&(e=e||new Map,e.set(n,t))}),e}function ki(s){return s==="display"||s==="position"}var ze=class{constructor(e,t,n,i){this.element=e,this.keyframes=t,this.options=n,this._specialStyles=i,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;let e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:new Map;let t=()=>this._onFinish();this.domPlayer.addEventListener("finish",t),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",t)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(e){let t=[];return e.forEach(n=>{t.push(Object.fromEntries(n))}),t}_triggerWebAnimation(e,t,n){return e.animate(this._convertKeyframesToObject(t),n)}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){this.domPlayer===void 0&&this.init(),this.domPlayer.currentTime=e*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((n,i)=>{i!=="offset"&&e.set(i,this._finished?n:Mt(this.element,i))}),this.currentSnapshot=e}triggerCallback(e){let t=e==="start"?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}},qe=class{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}matchesElement(e,t){return!1}containsElement(e,t){return Rn(e,t)}getParentElement(e){return Ct(e)}query(e,t,n){return In(e,t,n)}computeStyle(e,t,n){return Mt(e,t)}animate(e,t,n,i,r,o=[]){let a=i==0?"both":"forwards",l={duration:n,delay:i,fill:a};r&&(l.easing=r);let h=new Map,c=o.filter(y=>y instanceof ze);Ys(n,i)&&c.forEach(y=>{y.currentSnapshot.forEach((f,g)=>h.set(g,f))});let u=Gs(t).map(y=>new Map(y));u=Xs(e,u,h);let _=Ni(e,u);return new ze(e,u,l,_)}};var Me="@",xn="@.disabled",Ke=class{constructor(e,t,n,i){this.namespaceId=e,this.delegate=t,this.engine=n,this._onDestroy=i,this.\u0275type=0}get data(){return this.delegate.data}destroyNode(e){this.delegate.destroyNode?.(e)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(e,t){return this.delegate.createElement(e,t)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}insertBefore(e,t,n,i=!0){this.delegate.insertBefore(e,t,n),this.engine.onInsert(this.namespaceId,t,e,i)}removeChild(e,t,n){this.engine.onRemove(this.namespaceId,t,this.delegate)}selectRootElement(e,t){return this.delegate.selectRootElement(e,t)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,t,n,i){this.delegate.setAttribute(e,t,n,i)}removeAttribute(e,t,n){this.delegate.removeAttribute(e,t,n)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,n,i){this.delegate.setStyle(e,t,n,i)}removeStyle(e,t,n){this.delegate.removeStyle(e,t,n)}setProperty(e,t,n){t.charAt(0)==Me&&t==xn?this.disableAnimations(e,!!n):this.delegate.setProperty(e,t,n)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,n){return this.delegate.listen(e,t,n)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}},bt=class extends Ke{constructor(e,t,n,i,r){super(t,n,i,r),this.factory=e,this.namespaceId=t}setProperty(e,t,n){t.charAt(0)==Me?t.charAt(1)=="."&&t==xn?(n=n===void 0?!0:!!n,this.disableAnimations(e,n)):this.engine.process(this.namespaceId,e,t.slice(1),n):this.delegate.setProperty(e,t,n)}listen(e,t,n){if(t.charAt(0)==Me){let i=Fi(e),r=t.slice(1),o="";return r.charAt(0)!=Me&&([r,o]=Ri(r)),this.engine.listen(this.namespaceId,i,r,o,a=>{let l=a._data||-1;this.factory.scheduleListenerCallback(l,n,a)})}return this.delegate.listen(e,t,n)}};function Fi(s){switch(s){case"body":return document.body;case"document":return document;case"window":return window;default:return s}}function Ri(s){let e=s.indexOf("."),t=s.substring(0,e),n=s.slice(e+1);return[t,n]}var je=class{constructor(e,t,n){this.delegate=e,this.engine=t,this._zone=n,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,t.onRemovalComplete=(i,r)=>{let o=r?.parentNode(i);o&&r.removeChild(o,i)}}createRenderer(e,t){let n="",i=this.delegate.createRenderer(e,t);if(!e||!t?.data?.animation){let h=this._rendererCache,c=h.get(i);if(!c){let u=()=>h.delete(i);c=new Ke(n,i,this.engine,u),h.set(i,c)}return c}let r=t.id,o=t.id+"-"+this._currentId;this._currentId++,this.engine.register(o,e);let a=h=>{Array.isArray(h)?h.forEach(a):this.engine.registerTrigger(r,o,e,h.name,h)};return t.data.animation.forEach(a),new bt(this,o,i,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(e,t,n){if(e>=0&&e<this._microtaskId){this._zone.run(()=>t(n));return}let i=this._animationCallbacksBuffer;i.length==0&&queueMicrotask(()=>{this._zone.run(()=>{i.forEach(r=>{let[o,a]=r;o(a)}),this._animationCallbacksBuffer=[]})}),i.push([t,n])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}};var Oi=(()=>{class s extends ue{constructor(t,n,i){super(t,n,i,X(Wt,{optional:!0}))}ngOnDestroy(){this.flush()}static{this.\u0275fac=function(n){return new(n||s)(le(rn),le(se),le(ie))}}static{this.\u0275prov=ae({token:s,factory:s.\u0275fac})}}return s})();function Li(){return new Fe}function zi(s,e,t){return new je(s,e,t)}var $n=[{provide:ie,useFactory:Li},{provide:ue,useClass:Oi},{provide:Gt,useFactory:zi,deps:[un,ue,be]}],qi=[{provide:se,useFactory:()=>new qe},{provide:Qe,useValue:"BrowserAnimations"},...$n],hr=[{provide:se,useClass:Pt},{provide:Qe,useValue:"NoopAnimations"},...$n];function Un(){return Ht("NgEagerAnimations"),[...qi]}var Wn=()=>{let s=X(J),e=X(de);return s.isLoggedIn&&s.isAdmin?!0:(e.navigate(["/auth/login"]),!1)},kt=()=>{let s=X(J),e=X(de);return s.isLoggedIn?(s.isAdmin?e.navigate(["/admin/dashboard"]):e.navigate(["/join"]),!1):!0};var Gn=[{path:"",redirectTo:"/join",pathMatch:"full"},{path:"auth",children:[{path:"login",loadComponent:()=>import("./chunk-6IVIMAVU.js").then(s=>s.LoginComponent),canActivate:[kt]},{path:"register",loadComponent:()=>import("./chunk-2IYKTL43.js").then(s=>s.RegisterComponent),canActivate:[kt]}]},{path:"admin",canActivate:[Wn],children:[{path:"dashboard",loadComponent:()=>import("./chunk-XTBN5JJS.js").then(s=>s.DashboardComponent)},{path:"quiz/:id/edit",loadComponent:()=>import("./chunk-BXPDLLUD.js").then(s=>s.QuizBuilderComponent)},{path:"session/:id/host",loadComponent:()=>import("./chunk-IUANN3U7.js").then(s=>s.HostConsoleComponent)}]},{path:"join",loadComponent:()=>import("./chunk-VYECULB4.js").then(s=>s.JoinComponent)},{path:"session/:id/play",loadComponent:()=>import("./chunk-2O4WDLOC.js").then(s=>s.PlayComponent)},{path:"session/:id/results",loadComponent:()=>import("./chunk-KI2SGYIC.js").then(s=>s.ResultsComponent)},{path:"**",redirectTo:"/join"}];var Hn=(()=>{class s{constructor(t){this.authService=t}intercept(t,n){let i=this.authService.token;if(i){let r=t.clone({setHeaders:{Authorization:`Bearer ${i}`}});return n.handle(r)}return n.handle(t)}static{this.\u0275fac=function(n){return new(n||s)(le(J))}}static{this.\u0275prov=ae({token:s,factory:s.\u0275fac})}}return s})();var Zn={providers:[pn(Gn),hn(cn()),Un(),{provide:ln,useClass:Hn,multi:!0}]};function ji(s,e){s&1&&(z(0,"a",14),x(1,"Dashboard"),Q())}function Vi(s,e){if(s&1){let t=Yt();z(0,"nav",1)(1,"div",2)(2,"a",3)(3,"span",4),x(4,"\u26A1"),Q(),z(5,"span",5),x(6,"Commudle"),z(7,"span",6),x(8,"Quiz"),Q()()(),z(9,"div",7),Ue(10,ji,2,0,"a",8),z(11,"a",9),x(12,"Join Quiz"),Q(),z(13,"div",10)(14,"span",11),x(15),Q(),z(16,"span",12),x(17),Q(),z(18,"button",13),Xt("click",function(){xt(t);let i=He();return $t(i.logout())}),x(19,"Logout"),Q()()()()()}if(s&2){let t=He();he(10),We("ngIf",t.auth.isAdmin),he(5),Jt(t.auth.currentUser==null?null:t.auth.currentUser.display_name),he(),Ge("badge-primary",t.auth.isAdmin)("badge-success",!t.auth.isAdmin),he(),en(" ",t.auth.currentUser==null?null:t.auth.currentUser.role," ")}}var Yn=(()=>{class s{constructor(t,n){this.auth=t,this.router=n}logout(){this.auth.logout(),this.router.navigate(["/auth/login"])}static{this.\u0275fac=function(n){return new(n||s)(xe(J),xe(de))}}static{this.\u0275cmp=Bt({type:s,selectors:[["app-root"]],standalone:!0,features:[tn],decls:3,vars:3,consts:[["class","navbar",4,"ngIf"],[1,"navbar"],[1,"nav-content"],["routerLink","/",1,"nav-brand"],[1,"brand-icon"],[1,"brand-text"],[1,"text-gradient"],[1,"nav-links"],["routerLink","/admin/dashboard","class","nav-link",4,"ngIf"],["routerLink","/join",1,"nav-link"],[1,"nav-user"],[1,"nav-user-name"],[1,"nav-user-role","badge"],[1,"btn","btn-ghost","btn-sm",3,"click"],["routerLink","/admin/dashboard",1,"nav-link"]],template:function(n,i){n&1&&(Ue(0,Vi,20,7,"nav",0),z(1,"main"),Zt(2,"router-outlet"),Q()),n&2&&(We("ngIf",i.auth.isLoggedIn),he(),Ge("with-nav",i.auth.isLoggedIn))},dependencies:[fn,mn,an,on],styles:[".navbar[_ngcontent-%COMP%]{position:fixed;top:0;left:0;right:0;z-index:1000;background:#0a0a1ad9;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);border-bottom:1px solid var(--border-light);padding:0 24px;height:64px}.nav-content[_ngcontent-%COMP%]{max-width:1400px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;height:100%}.nav-brand[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--text-primary);font-weight:800;font-size:1.2rem}.brand-icon[_ngcontent-%COMP%]{font-size:1.5rem}.nav-links[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px}.nav-link[_ngcontent-%COMP%]{color:var(--text-secondary);text-decoration:none;font-weight:500;font-size:.9rem;padding:8px 16px;border-radius:var(--radius-md);transition:all var(--transition-fast)}.nav-link[_ngcontent-%COMP%]:hover{color:var(--text-primary);background:#ffffff0d}.nav-user[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;padding-left:16px;border-left:1px solid var(--border-light)}.nav-user-name[_ngcontent-%COMP%]{font-weight:500;font-size:.9rem}main[_ngcontent-%COMP%]{min-height:100vh}main.with-nav[_ngcontent-%COMP%]{padding-top:64px}@media (max-width: 768px){.nav-links[_ngcontent-%COMP%]{gap:8px}.nav-user-name[_ngcontent-%COMP%]{display:none}}"]})}}return s})();var Xn="quizzie-module";function Bi(){return zt(this,null,function*(){let s=yield dn(Zn),e=gn(Yn,{injector:s.injector});customElements.get(Xn)||customElements.define(Xn,e)})}Bi().catch(s=>console.error(s));
package/manifest.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "elementTag": "quizzie-module",
3
+ "js": [
4
+ "polyfills.js",
5
+ "main.js",
6
+ "chunk-2IYKTL43.js",
7
+ "chunk-2O4WDLOC.js",
8
+ "chunk-4S3ZLLNI.js",
9
+ "chunk-6IVIMAVU.js",
10
+ "chunk-6ZHAJFTP.js",
11
+ "chunk-BDRARPDM.js",
12
+ "chunk-BXPDLLUD.js",
13
+ "chunk-IUANN3U7.js",
14
+ "chunk-KI2SGYIC.js",
15
+ "chunk-UNSARXTF.js",
16
+ "chunk-VXET42KR.js",
17
+ "chunk-VYECULB4.js",
18
+ "chunk-XTBN5JJS.js"
19
+ ],
20
+ "css": [
21
+ "styles.css"
22
+ ]
23
+ }
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@kakarot2905/quizzie-module",
3
+ "version": "0.1.0",
4
+ "description": "Quizzie embeddable quiz module as a Web Component",
5
+ "type": "module",
6
+ "main": "./loader.js",
7
+ "module": "./loader.js",
8
+ "exports": {
9
+ ".": "./loader.js",
10
+ "./loader": "./loader.js",
11
+ "./manifest": "./manifest.json"
12
+ },
13
+ "files": [
14
+ "*.js",
15
+ "*.css",
16
+ "*.json",
17
+ "3rdpartylicenses.txt",
18
+ "README.md"
19
+ ],
20
+ "keywords": [
21
+ "quiz",
22
+ "web-component",
23
+ "angular-elements",
24
+ "quizzie"
25
+ ],
26
+ "license": "MIT",
27
+ "publishConfig": {
28
+ "access": "public"
29
+ }
30
+ }
package/polyfills.js ADDED
@@ -0,0 +1,2 @@
1
+ var ce=globalThis;function te(e){return(ce.__Zone_symbol_prefix||"__zone_symbol__")+e}function dt(){let e=ce.performance;function n(M){e&&e.mark&&e.mark(M)}function a(M,s){e&&e.measure&&e.measure(M,s)}n("Zone");class t{static{this.__symbol__=te}static assertZonePatched(){if(ce.Promise!==S.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let s=t.current;for(;s.parent;)s=s.parent;return s}static get current(){return b.zone}static get currentTask(){return D}static __load_patch(s,i,o=!1){if(S.hasOwnProperty(s)){let g=ce[te("forceDuplicateZoneCheck")]===!0;if(!o&&g)throw Error("Already loaded patch: "+s)}else if(!ce["__Zone_disable_"+s]){let g="Zone:"+s;n(g),S[s]=i(ce,t,w),a(g,g)}}get parent(){return this._parent}get name(){return this._name}constructor(s,i){this._parent=s,this._name=i?i.name||"unnamed":"<root>",this._properties=i&&i.properties||{},this._zoneDelegate=new f(this,this._parent&&this._parent._zoneDelegate,i)}get(s){let i=this.getZoneWith(s);if(i)return i._properties[s]}getZoneWith(s){let i=this;for(;i;){if(i._properties.hasOwnProperty(s))return i;i=i._parent}return null}fork(s){if(!s)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,s)}wrap(s,i){if(typeof s!="function")throw new Error("Expecting function got: "+s);let o=this._zoneDelegate.intercept(this,s,i),g=this;return function(){return g.runGuarded(o,this,arguments,i)}}run(s,i,o,g){b={parent:b,zone:this};try{return this._zoneDelegate.invoke(this,s,i,o,g)}finally{b=b.parent}}runGuarded(s,i=null,o,g){b={parent:b,zone:this};try{try{return this._zoneDelegate.invoke(this,s,i,o,g)}catch(V){if(this._zoneDelegate.handleError(this,V))throw V}}finally{b=b.parent}}runTask(s,i,o){if(s.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(s.zone||J).name+"; Execution: "+this.name+")");let g=s,{type:V,data:{isPeriodic:ee=!1,isRefreshable:Z=!1}={}}=s;if(s.state===q&&(V===z||V===y))return;let he=s.state!=A;he&&g._transitionTo(A,d);let _e=D;D=g,b={parent:b,zone:this};try{V==y&&s.data&&!ee&&!Z&&(s.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,g,i,o)}catch(Q){if(this._zoneDelegate.handleError(this,Q))throw Q}}finally{let Q=s.state;if(Q!==q&&Q!==X)if(V==z||ee||Z&&Q===k)he&&g._transitionTo(d,A,k);else{let Ee=g._zoneDelegates;this._updateTaskCount(g,-1),he&&g._transitionTo(q,A,q),Z&&(g._zoneDelegates=Ee)}b=b.parent,D=_e}}scheduleTask(s){if(s.zone&&s.zone!==this){let o=this;for(;o;){if(o===s.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${s.zone.name}`);o=o.parent}}s._transitionTo(k,q);let i=[];s._zoneDelegates=i,s._zone=this;try{s=this._zoneDelegate.scheduleTask(this,s)}catch(o){throw s._transitionTo(X,k,q),this._zoneDelegate.handleError(this,o),o}return s._zoneDelegates===i&&this._updateTaskCount(s,1),s.state==k&&s._transitionTo(d,k),s}scheduleMicroTask(s,i,o,g){return this.scheduleTask(new E(G,s,i,o,g,void 0))}scheduleMacroTask(s,i,o,g,V){return this.scheduleTask(new E(y,s,i,o,g,V))}scheduleEventTask(s,i,o,g,V){return this.scheduleTask(new E(z,s,i,o,g,V))}cancelTask(s){if(s.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(s.zone||J).name+"; Execution: "+this.name+")");if(!(s.state!==d&&s.state!==A)){s._transitionTo(x,d,A);try{this._zoneDelegate.cancelTask(this,s)}catch(i){throw s._transitionTo(X,x),this._zoneDelegate.handleError(this,i),i}return this._updateTaskCount(s,-1),s._transitionTo(q,x),s.runCount=-1,s}}_updateTaskCount(s,i){let o=s._zoneDelegates;i==-1&&(s._zoneDelegates=null);for(let g=0;g<o.length;g++)o[g]._updateTaskCount(s.type,i)}}let c={name:"",onHasTask:(M,s,i,o)=>M.hasTask(i,o),onScheduleTask:(M,s,i,o)=>M.scheduleTask(i,o),onInvokeTask:(M,s,i,o,g,V)=>M.invokeTask(i,o,g,V),onCancelTask:(M,s,i,o)=>M.cancelTask(i,o)};class f{get zone(){return this._zone}constructor(s,i,o){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this._zone=s,this._parentDelegate=i,this._forkZS=o&&(o&&o.onFork?o:i._forkZS),this._forkDlgt=o&&(o.onFork?i:i._forkDlgt),this._forkCurrZone=o&&(o.onFork?this._zone:i._forkCurrZone),this._interceptZS=o&&(o.onIntercept?o:i._interceptZS),this._interceptDlgt=o&&(o.onIntercept?i:i._interceptDlgt),this._interceptCurrZone=o&&(o.onIntercept?this._zone:i._interceptCurrZone),this._invokeZS=o&&(o.onInvoke?o:i._invokeZS),this._invokeDlgt=o&&(o.onInvoke?i:i._invokeDlgt),this._invokeCurrZone=o&&(o.onInvoke?this._zone:i._invokeCurrZone),this._handleErrorZS=o&&(o.onHandleError?o:i._handleErrorZS),this._handleErrorDlgt=o&&(o.onHandleError?i:i._handleErrorDlgt),this._handleErrorCurrZone=o&&(o.onHandleError?this._zone:i._handleErrorCurrZone),this._scheduleTaskZS=o&&(o.onScheduleTask?o:i._scheduleTaskZS),this._scheduleTaskDlgt=o&&(o.onScheduleTask?i:i._scheduleTaskDlgt),this._scheduleTaskCurrZone=o&&(o.onScheduleTask?this._zone:i._scheduleTaskCurrZone),this._invokeTaskZS=o&&(o.onInvokeTask?o:i._invokeTaskZS),this._invokeTaskDlgt=o&&(o.onInvokeTask?i:i._invokeTaskDlgt),this._invokeTaskCurrZone=o&&(o.onInvokeTask?this._zone:i._invokeTaskCurrZone),this._cancelTaskZS=o&&(o.onCancelTask?o:i._cancelTaskZS),this._cancelTaskDlgt=o&&(o.onCancelTask?i:i._cancelTaskDlgt),this._cancelTaskCurrZone=o&&(o.onCancelTask?this._zone:i._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;let g=o&&o.onHasTask,V=i&&i._hasTaskZS;(g||V)&&(this._hasTaskZS=g?o:c,this._hasTaskDlgt=i,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=this._zone,o.onScheduleTask||(this._scheduleTaskZS=c,this._scheduleTaskDlgt=i,this._scheduleTaskCurrZone=this._zone),o.onInvokeTask||(this._invokeTaskZS=c,this._invokeTaskDlgt=i,this._invokeTaskCurrZone=this._zone),o.onCancelTask||(this._cancelTaskZS=c,this._cancelTaskDlgt=i,this._cancelTaskCurrZone=this._zone))}fork(s,i){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,s,i):new t(s,i)}intercept(s,i,o){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,s,i,o):i}invoke(s,i,o,g,V){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,s,i,o,g,V):i.apply(o,g)}handleError(s,i){return this._handleErrorZS?this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,s,i):!0}scheduleTask(s,i){let o=i;if(this._scheduleTaskZS)this._hasTaskZS&&o._zoneDelegates.push(this._hasTaskDlgtOwner),o=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,s,i),o||(o=i);else if(i.scheduleFn)i.scheduleFn(i);else if(i.type==G)U(i);else throw new Error("Task is missing scheduleFn.");return o}invokeTask(s,i,o,g){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,s,i,o,g):i.callback.apply(o,g)}cancelTask(s,i){let o;if(this._cancelTaskZS)o=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,s,i);else{if(!i.cancelFn)throw Error("Task is not cancelable");o=i.cancelFn(i)}return o}hasTask(s,i){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,s,i)}catch(o){this.handleError(s,o)}}_updateTaskCount(s,i){let o=this._taskCounts,g=o[s],V=o[s]=g+i;if(V<0)throw new Error("More tasks executed then were scheduled.");if(g==0||V==0){let ee={microTask:o.microTask>0,macroTask:o.macroTask>0,eventTask:o.eventTask>0,change:s};this.hasTask(this._zone,ee)}}}class E{constructor(s,i,o,g,V,ee){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=s,this.source=i,this.data=g,this.scheduleFn=V,this.cancelFn=ee,!o)throw new Error("callback is not defined");this.callback=o;let Z=this;s===z&&g&&g.useG?this.invoke=E.invokeTask:this.invoke=function(){return E.invokeTask.call(ce,Z,this,arguments)}}static invokeTask(s,i,o){s||(s=this),K++;try{return s.runCount++,s.zone.runTask(s,i,o)}finally{K==1&&$(),K--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(q,k)}_transitionTo(s,i,o){if(this._state===i||this._state===o)this._state=s,s==q&&(this._zoneDelegates=null);else throw new Error(`${this.type} '${this.source}': can not transition to '${s}', expecting state '${i}'${o?" or '"+o+"'":""}, was '${this._state}'.`)}toString(){return this.data&&typeof this.data.handleId<"u"?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}let T=te("setTimeout"),p=te("Promise"),C=te("then"),_=[],P=!1,I;function H(M){if(I||ce[p]&&(I=ce[p].resolve(0)),I){let s=I[C];s||(s=I.then),s.call(I,M)}else ce[T](M,0)}function U(M){K===0&&_.length===0&&H($),M&&_.push(M)}function $(){if(!P){for(P=!0;_.length;){let M=_;_=[];for(let s=0;s<M.length;s++){let i=M[s];try{i.zone.runTask(i,null,null)}catch(o){w.onUnhandledError(o)}}}w.microtaskDrainDone(),P=!1}}let J={name:"NO ZONE"},q="notScheduled",k="scheduling",d="scheduled",A="running",x="canceling",X="unknown",G="microTask",y="macroTask",z="eventTask",S={},w={symbol:te,currentZoneFrame:()=>b,onUnhandledError:W,microtaskDrainDone:W,scheduleMicroTask:U,showUncaughtError:()=>!t[te("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:W,patchMethod:()=>W,bindArguments:()=>[],patchThen:()=>W,patchMacroTask:()=>W,patchEventPrototype:()=>W,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>W,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>W,wrapWithCurrentZone:()=>W,filterProperties:()=>[],attachOriginToPatched:()=>W,_redefineProperty:()=>W,patchCallbacks:()=>W,nativeScheduleMicroTask:H},b={parent:null,zone:new t(null,null)},D=null,K=0;function W(){}return a("Zone","Zone"),t}function _t(){let e=globalThis,n=e[te("forceDuplicateZoneCheck")]===!0;if(e.Zone&&(n||typeof e.Zone.__symbol__!="function"))throw new Error("Zone already loaded.");return e.Zone??=dt(),e.Zone}var be=Object.getOwnPropertyDescriptor,Ae=Object.defineProperty,je=Object.getPrototypeOf,Et=Object.create,Tt=Array.prototype.slice,He="addEventListener",xe="removeEventListener",Le=te(He),Ie=te(xe),ae="true",le="false",Pe=te("");function Ve(e,n){return Zone.current.wrap(e,n)}function Ge(e,n,a,t,c){return Zone.current.scheduleMacroTask(e,n,a,t,c)}var j=te,De=typeof window<"u",pe=De?window:void 0,Y=De&&pe||globalThis,gt="removeAttribute";function Fe(e,n){for(let a=e.length-1;a>=0;a--)typeof e[a]=="function"&&(e[a]=Ve(e[a],n+"_"+a));return e}function yt(e,n){let a=e.constructor.name;for(let t=0;t<n.length;t++){let c=n[t],f=e[c];if(f){let E=be(e,c);if(!tt(E))continue;e[c]=(T=>{let p=function(){return T.apply(this,Fe(arguments,a+"."+c))};return fe(p,T),p})(f)}}}function tt(e){return e?e.writable===!1?!1:!(typeof e.get=="function"&&typeof e.set>"u"):!0}var nt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,Se=!("nw"in Y)&&typeof Y.process<"u"&&Y.process.toString()==="[object process]",Be=!Se&&!nt&&!!(De&&pe.HTMLElement),rt=typeof Y.process<"u"&&Y.process.toString()==="[object process]"&&!nt&&!!(De&&pe.HTMLElement),Ce={},mt=j("enable_beforeunload"),Ye=function(e){if(e=e||Y.event,!e)return;let n=Ce[e.type];n||(n=Ce[e.type]=j("ON_PROPERTY"+e.type));let a=this||e.target||Y,t=a[n],c;if(Be&&a===pe&&e.type==="error"){let f=e;c=t&&t.call(this,f.message,f.filename,f.lineno,f.colno,f.error),c===!0&&e.preventDefault()}else c=t&&t.apply(this,arguments),e.type==="beforeunload"&&Y[mt]&&typeof c=="string"?e.returnValue=c:c!=null&&!c&&e.preventDefault();return c};function $e(e,n,a){let t=be(e,n);if(!t&&a&&be(a,n)&&(t={enumerable:!0,configurable:!0}),!t||!t.configurable)return;let c=j("on"+n+"patched");if(e.hasOwnProperty(c)&&e[c])return;delete t.writable,delete t.value;let f=t.get,E=t.set,T=n.slice(2),p=Ce[T];p||(p=Ce[T]=j("ON_PROPERTY"+T)),t.set=function(C){let _=this;if(!_&&e===Y&&(_=Y),!_)return;typeof _[p]=="function"&&_.removeEventListener(T,Ye),E&&E.call(_,null),_[p]=C,typeof C=="function"&&_.addEventListener(T,Ye,!1)},t.get=function(){let C=this;if(!C&&e===Y&&(C=Y),!C)return null;let _=C[p];if(_)return _;if(f){let P=f.call(this);if(P)return t.set.call(this,P),typeof C[gt]=="function"&&C.removeAttribute(n),P}return null},Ae(e,n,t),e[c]=!0}function ot(e,n,a){if(n)for(let t=0;t<n.length;t++)$e(e,"on"+n[t],a);else{let t=[];for(let c in e)c.slice(0,2)=="on"&&t.push(c);for(let c=0;c<t.length;c++)$e(e,t[c],a)}}var oe=j("originalInstance");function ve(e){let n=Y[e];if(!n)return;Y[j(e)]=n,Y[e]=function(){let c=Fe(arguments,e);switch(c.length){case 0:this[oe]=new n;break;case 1:this[oe]=new n(c[0]);break;case 2:this[oe]=new n(c[0],c[1]);break;case 3:this[oe]=new n(c[0],c[1],c[2]);break;case 4:this[oe]=new n(c[0],c[1],c[2],c[3]);break;default:throw new Error("Arg list too long.")}},fe(Y[e],n);let a=new n(function(){}),t;for(t in a)e==="XMLHttpRequest"&&t==="responseBlob"||function(c){typeof a[c]=="function"?Y[e].prototype[c]=function(){return this[oe][c].apply(this[oe],arguments)}:Ae(Y[e].prototype,c,{set:function(f){typeof f=="function"?(this[oe][c]=Ve(f,e+"."+c),fe(this[oe][c],f)):this[oe][c]=f},get:function(){return this[oe][c]}})}(t);for(t in n)t!=="prototype"&&n.hasOwnProperty(t)&&(Y[e][t]=n[t])}function ue(e,n,a){let t=e;for(;t&&!t.hasOwnProperty(n);)t=je(t);!t&&e[n]&&(t=e);let c=j(n),f=null;if(t&&(!(f=t[c])||!t.hasOwnProperty(c))){f=t[c]=t[n];let E=t&&be(t,n);if(tt(E)){let T=a(f,c,n);t[n]=function(){return T(this,arguments)},fe(t[n],f)}}return f}function pt(e,n,a){let t=null;function c(f){let E=f.data;return E.args[E.cbIdx]=function(){f.invoke.apply(this,arguments)},t.apply(E.target,E.args),f}t=ue(e,n,f=>function(E,T){let p=a(E,T);return p.cbIdx>=0&&typeof T[p.cbIdx]=="function"?Ge(p.name,T[p.cbIdx],p,c):f.apply(E,T)})}function fe(e,n){e[j("OriginalDelegate")]=n}var Je=!1,Me=!1;function kt(){try{let e=pe.navigator.userAgent;if(e.indexOf("MSIE ")!==-1||e.indexOf("Trident/")!==-1)return!0}catch{}return!1}function vt(){if(Je)return Me;Je=!0;try{let e=pe.navigator.userAgent;(e.indexOf("MSIE ")!==-1||e.indexOf("Trident/")!==-1||e.indexOf("Edge/")!==-1)&&(Me=!0)}catch{}return Me}function Ke(e){return typeof e=="function"}function Qe(e){return typeof e=="number"}var me=!1;if(typeof window<"u")try{let e=Object.defineProperty({},"passive",{get:function(){me=!0}});window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch{me=!1}var bt={useG:!0},ne={},st={},it=new RegExp("^"+Pe+"(\\w+)(true|false)$"),ct=j("propagationStopped");function at(e,n){let a=(n?n(e):e)+le,t=(n?n(e):e)+ae,c=Pe+a,f=Pe+t;ne[e]={},ne[e][le]=c,ne[e][ae]=f}function Pt(e,n,a,t){let c=t&&t.add||He,f=t&&t.rm||xe,E=t&&t.listeners||"eventListeners",T=t&&t.rmAll||"removeAllListeners",p=j(c),C="."+c+":",_="prependListener",P="."+_+":",I=function(k,d,A){if(k.isRemoved)return;let x=k.callback;typeof x=="object"&&x.handleEvent&&(k.callback=y=>x.handleEvent(y),k.originalDelegate=x);let X;try{k.invoke(k,d,[A])}catch(y){X=y}let G=k.options;if(G&&typeof G=="object"&&G.once){let y=k.originalDelegate?k.originalDelegate:k.callback;d[f].call(d,A.type,y,G)}return X};function H(k,d,A){if(d=d||e.event,!d)return;let x=k||d.target||e,X=x[ne[d.type][A?ae:le]];if(X){let G=[];if(X.length===1){let y=I(X[0],x,d);y&&G.push(y)}else{let y=X.slice();for(let z=0;z<y.length&&!(d&&d[ct]===!0);z++){let S=I(y[z],x,d);S&&G.push(S)}}if(G.length===1)throw G[0];for(let y=0;y<G.length;y++){let z=G[y];n.nativeScheduleMicroTask(()=>{throw z})}}}let U=function(k){return H(this,k,!1)},$=function(k){return H(this,k,!0)};function J(k,d){if(!k)return!1;let A=!0;d&&d.useG!==void 0&&(A=d.useG);let x=d&&d.vh,X=!0;d&&d.chkDup!==void 0&&(X=d.chkDup);let G=!1;d&&d.rt!==void 0&&(G=d.rt);let y=k;for(;y&&!y.hasOwnProperty(c);)y=je(y);if(!y&&k[c]&&(y=k),!y||y[p])return!1;let z=d&&d.eventNameToString,S={},w=y[p]=y[c],b=y[j(f)]=y[f],D=y[j(E)]=y[E],K=y[j(T)]=y[T],W;d&&d.prepend&&(W=y[j(d.prepend)]=y[d.prepend]);function M(r,u){return!me&&typeof r=="object"&&r?!!r.capture:!me||!u?r:typeof r=="boolean"?{capture:r,passive:!0}:r?typeof r=="object"&&r.passive!==!1?{...r,passive:!0}:r:{passive:!0}}let s=function(r){if(!S.isExisting)return w.call(S.target,S.eventName,S.capture?$:U,S.options)},i=function(r){if(!r.isRemoved){let u=ne[r.eventName],v;u&&(v=u[r.capture?ae:le]);let R=v&&r.target[v];if(R){for(let m=0;m<R.length;m++)if(R[m]===r){R.splice(m,1),r.isRemoved=!0,r.removeAbortListener&&(r.removeAbortListener(),r.removeAbortListener=null),R.length===0&&(r.allRemoved=!0,r.target[v]=null);break}}}if(r.allRemoved)return b.call(r.target,r.eventName,r.capture?$:U,r.options)},o=function(r){return w.call(S.target,S.eventName,r.invoke,S.options)},g=function(r){return W.call(S.target,S.eventName,r.invoke,S.options)},V=function(r){return b.call(r.target,r.eventName,r.invoke,r.options)},ee=A?s:o,Z=A?i:V,he=function(r,u){let v=typeof u;return v==="function"&&r.callback===u||v==="object"&&r.originalDelegate===u},_e=d&&d.diff?d.diff:he,Q=Zone[j("UNPATCHED_EVENTS")],Ee=e[j("PASSIVE_EVENTS")];function h(r){if(typeof r=="object"&&r!==null){let u={...r};return r.signal&&(u.signal=r.signal),u}return r}let l=function(r,u,v,R,m=!1,O=!1){return function(){let N=this||e,L=arguments[0];d&&d.transferEventName&&(L=d.transferEventName(L));let F=arguments[1];if(!F)return r.apply(this,arguments);if(Se&&L==="uncaughtException")return r.apply(this,arguments);let B=!1;if(typeof F!="function"){if(!F.handleEvent)return r.apply(this,arguments);B=!0}if(x&&!x(r,F,N,arguments))return;let de=me&&!!Ee&&Ee.indexOf(L)!==-1,se=h(M(arguments[2],de)),Te=se?.signal;if(Te?.aborted)return;if(Q){for(let ie=0;ie<Q.length;ie++)if(L===Q[ie])return de?r.call(N,L,F,se):r.apply(this,arguments)}let Oe=se?typeof se=="boolean"?!0:se.capture:!1,Ue=se&&typeof se=="object"?se.once:!1,ht=Zone.current,Ne=ne[L];Ne||(at(L,z),Ne=ne[L]);let ze=Ne[Oe?ae:le],ge=N[ze],We=!1;if(ge){if(We=!0,X){for(let ie=0;ie<ge.length;ie++)if(_e(ge[ie],F))return}}else ge=N[ze]=[];let we,qe=N.constructor.name,Xe=st[qe];Xe&&(we=Xe[L]),we||(we=qe+u+(z?z(L):L)),S.options=se,Ue&&(S.options.once=!1),S.target=N,S.capture=Oe,S.eventName=L,S.isExisting=We;let ke=A?bt:void 0;ke&&(ke.taskData=S),Te&&(S.options.signal=void 0);let re=ht.scheduleEventTask(we,F,ke,v,R);if(Te){S.options.signal=Te;let ie=()=>re.zone.cancelTask(re);r.call(Te,"abort",ie,{once:!0}),re.removeAbortListener=()=>Te.removeEventListener("abort",ie)}if(S.target=null,ke&&(ke.taskData=null),Ue&&(S.options.once=!0),!me&&typeof re.options=="boolean"||(re.options=se),re.target=N,re.capture=Oe,re.eventName=L,B&&(re.originalDelegate=F),O?ge.unshift(re):ge.push(re),m)return N}};return y[c]=l(w,C,ee,Z,G),W&&(y[_]=l(W,P,g,Z,G,!0)),y[f]=function(){let r=this||e,u=arguments[0];d&&d.transferEventName&&(u=d.transferEventName(u));let v=arguments[2],R=v?typeof v=="boolean"?!0:v.capture:!1,m=arguments[1];if(!m)return b.apply(this,arguments);if(x&&!x(b,m,r,arguments))return;let O=ne[u],N;O&&(N=O[R?ae:le]);let L=N&&r[N];if(L)for(let F=0;F<L.length;F++){let B=L[F];if(_e(B,m)){if(L.splice(F,1),B.isRemoved=!0,L.length===0&&(B.allRemoved=!0,r[N]=null,!R&&typeof u=="string")){let de=Pe+"ON_PROPERTY"+u;r[de]=null}return B.zone.cancelTask(B),G?r:void 0}}return b.apply(this,arguments)},y[E]=function(){let r=this||e,u=arguments[0];d&&d.transferEventName&&(u=d.transferEventName(u));let v=[],R=lt(r,z?z(u):u);for(let m=0;m<R.length;m++){let O=R[m],N=O.originalDelegate?O.originalDelegate:O.callback;v.push(N)}return v},y[T]=function(){let r=this||e,u=arguments[0];if(u){d&&d.transferEventName&&(u=d.transferEventName(u));let v=ne[u];if(v){let R=v[le],m=v[ae],O=r[R],N=r[m];if(O){let L=O.slice();for(let F=0;F<L.length;F++){let B=L[F],de=B.originalDelegate?B.originalDelegate:B.callback;this[f].call(this,u,de,B.options)}}if(N){let L=N.slice();for(let F=0;F<L.length;F++){let B=L[F],de=B.originalDelegate?B.originalDelegate:B.callback;this[f].call(this,u,de,B.options)}}}}else{let v=Object.keys(r);for(let R=0;R<v.length;R++){let m=v[R],O=it.exec(m),N=O&&O[1];N&&N!=="removeListener"&&this[T].call(this,N)}this[T].call(this,"removeListener")}if(G)return this},fe(y[c],w),fe(y[f],b),K&&fe(y[T],K),D&&fe(y[E],D),!0}let q=[];for(let k=0;k<a.length;k++)q[k]=J(a[k],t);return q}function lt(e,n){if(!n){let f=[];for(let E in e){let T=it.exec(E),p=T&&T[1];if(p&&(!n||p===n)){let C=e[E];if(C)for(let _=0;_<C.length;_++)f.push(C[_])}}return f}let a=ne[n];a||(at(n),a=ne[n]);let t=e[a[le]],c=e[a[ae]];return t?c?t.concat(c):t.slice():c?c.slice():[]}function wt(e,n){let a=e.Event;a&&a.prototype&&n.patchMethod(a.prototype,"stopImmediatePropagation",t=>function(c,f){c[ct]=!0,t&&t.apply(c,f)})}function Rt(e,n){n.patchMethod(e,"queueMicrotask",a=>function(t,c){Zone.current.scheduleMicroTask("queueMicrotask",c[0])})}var Re=j("zoneTask");function ye(e,n,a,t){let c=null,f=null;n+=t,a+=t;let E={};function T(C){let _=C.data;_.args[0]=function(){return C.invoke.apply(this,arguments)};let P=c.apply(e,_.args);return Qe(P)?_.handleId=P:(_.handle=P,_.isRefreshable=Ke(P.refresh)),C}function p(C){let{handle:_,handleId:P}=C.data;return f.call(e,_??P)}c=ue(e,n,C=>function(_,P){if(Ke(P[0])){let I={isRefreshable:!1,isPeriodic:t==="Interval",delay:t==="Timeout"||t==="Interval"?P[1]||0:void 0,args:P},H=P[0];P[0]=function(){try{return H.apply(this,arguments)}finally{let{handle:A,handleId:x,isPeriodic:X,isRefreshable:G}=I;!X&&!G&&(x?delete E[x]:A&&(A[Re]=null))}};let U=Ge(n,P[0],I,T,p);if(!U)return U;let{handleId:$,handle:J,isRefreshable:q,isPeriodic:k}=U.data;if($)E[$]=U;else if(J&&(J[Re]=U,q&&!k)){let d=J.refresh;J.refresh=function(){let{zone:A,state:x}=U;return x==="notScheduled"?(U._state="scheduled",A._updateTaskCount(U,1)):x==="running"&&(U._state="scheduling"),d.call(this)}}return J??$??U}else return C.apply(e,P)}),f=ue(e,a,C=>function(_,P){let I=P[0],H;Qe(I)?(H=E[I],delete E[I]):(H=I?.[Re],H?I[Re]=null:H=I),H?.type?H.cancelFn&&H.zone.cancelTask(H):C.apply(e,P)})}function Ct(e,n){let{isBrowser:a,isMix:t}=n.getGlobalObjects();if(!a&&!t||!e.customElements||!("customElements"in e))return;let c=["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback","formAssociatedCallback","formDisabledCallback","formResetCallback","formStateRestoreCallback"];n.patchCallbacks(n,e.customElements,"customElements","define",c)}function Dt(e,n){if(Zone[n.symbol("patchEventTarget")])return;let{eventNames:a,zoneSymbolEventNames:t,TRUE_STR:c,FALSE_STR:f,ZONE_SYMBOL_PREFIX:E}=n.getGlobalObjects();for(let p=0;p<a.length;p++){let C=a[p],_=C+f,P=C+c,I=E+_,H=E+P;t[C]={},t[C][f]=I,t[C][c]=H}let T=e.EventTarget;if(!(!T||!T.prototype))return n.patchEventTarget(e,n,[T&&T.prototype]),!0}function St(e,n){n.patchEventPrototype(e,n)}function ut(e,n,a){if(!a||a.length===0)return n;let t=a.filter(f=>f.target===e);if(!t||t.length===0)return n;let c=t[0].ignoreProperties;return n.filter(f=>c.indexOf(f)===-1)}function et(e,n,a,t){if(!e)return;let c=ut(e,n,a);ot(e,c,t)}function Ze(e){return Object.getOwnPropertyNames(e).filter(n=>n.startsWith("on")&&n.length>2).map(n=>n.substring(2))}function Ot(e,n){if(Se&&!rt||Zone[e.symbol("patchEvents")])return;let a=n.__Zone_ignore_on_properties,t=[];if(Be){let c=window;t=t.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);let f=kt()?[{target:c,ignoreProperties:["error"]}]:[];et(c,Ze(c),a&&a.concat(f),je(c))}t=t.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(let c=0;c<t.length;c++){let f=n[t[c]];f&&f.prototype&&et(f.prototype,Ze(f.prototype),a)}}function Nt(e){e.__load_patch("legacy",n=>{let a=n[e.__symbol__("legacyPatch")];a&&a()}),e.__load_patch("timers",n=>{let a="set",t="clear";ye(n,a,t,"Timeout"),ye(n,a,t,"Interval"),ye(n,a,t,"Immediate")}),e.__load_patch("requestAnimationFrame",n=>{ye(n,"request","cancel","AnimationFrame"),ye(n,"mozRequest","mozCancel","AnimationFrame"),ye(n,"webkitRequest","webkitCancel","AnimationFrame")}),e.__load_patch("blocking",(n,a)=>{let t=["alert","prompt","confirm"];for(let c=0;c<t.length;c++){let f=t[c];ue(n,f,(E,T,p)=>function(C,_){return a.current.run(E,n,_,p)})}}),e.__load_patch("EventTarget",(n,a,t)=>{St(n,t),Dt(n,t);let c=n.XMLHttpRequestEventTarget;c&&c.prototype&&t.patchEventTarget(n,t,[c.prototype])}),e.__load_patch("MutationObserver",(n,a,t)=>{ve("MutationObserver"),ve("WebKitMutationObserver")}),e.__load_patch("IntersectionObserver",(n,a,t)=>{ve("IntersectionObserver")}),e.__load_patch("FileReader",(n,a,t)=>{ve("FileReader")}),e.__load_patch("on_property",(n,a,t)=>{Ot(t,n)}),e.__load_patch("customElements",(n,a,t)=>{Ct(n,t)}),e.__load_patch("XHR",(n,a)=>{C(n);let t=j("xhrTask"),c=j("xhrSync"),f=j("xhrListener"),E=j("xhrScheduled"),T=j("xhrURL"),p=j("xhrErrorBeforeScheduled");function C(_){let P=_.XMLHttpRequest;if(!P)return;let I=P.prototype;function H(w){return w[t]}let U=I[Le],$=I[Ie];if(!U){let w=_.XMLHttpRequestEventTarget;if(w){let b=w.prototype;U=b[Le],$=b[Ie]}}let J="readystatechange",q="scheduled";function k(w){let b=w.data,D=b.target;D[E]=!1,D[p]=!1;let K=D[f];U||(U=D[Le],$=D[Ie]),K&&$.call(D,J,K);let W=D[f]=()=>{if(D.readyState===D.DONE)if(!b.aborted&&D[E]&&w.state===q){let s=D[a.__symbol__("loadfalse")];if(D.status!==0&&s&&s.length>0){let i=w.invoke;w.invoke=function(){let o=D[a.__symbol__("loadfalse")];for(let g=0;g<o.length;g++)o[g]===w&&o.splice(g,1);!b.aborted&&w.state===q&&i.call(w)},s.push(w)}else w.invoke()}else!b.aborted&&D[E]===!1&&(D[p]=!0)};return U.call(D,J,W),D[t]||(D[t]=w),z.apply(D,b.args),D[E]=!0,w}function d(){}function A(w){let b=w.data;return b.aborted=!0,S.apply(b.target,b.args)}let x=ue(I,"open",()=>function(w,b){return w[c]=b[2]==!1,w[T]=b[1],x.apply(w,b)}),X="XMLHttpRequest.send",G=j("fetchTaskAborting"),y=j("fetchTaskScheduling"),z=ue(I,"send",()=>function(w,b){if(a.current[y]===!0||w[c])return z.apply(w,b);{let D={target:w,url:w[T],isPeriodic:!1,args:b,aborted:!1},K=Ge(X,d,D,k,A);w&&w[p]===!0&&!D.aborted&&K.state===q&&K.invoke()}}),S=ue(I,"abort",()=>function(w,b){let D=H(w);if(D&&typeof D.type=="string"){if(D.cancelFn==null||D.data&&D.data.aborted)return;D.zone.cancelTask(D)}else if(a.current[G]===!0)return S.apply(w,b)})}}),e.__load_patch("geolocation",n=>{n.navigator&&n.navigator.geolocation&&yt(n.navigator.geolocation,["getCurrentPosition","watchPosition"])}),e.__load_patch("PromiseRejectionEvent",(n,a)=>{function t(c){return function(f){lt(n,c).forEach(T=>{let p=n.PromiseRejectionEvent;if(p){let C=new p(c,{promise:f.promise,reason:f.rejection});T.invoke(C)}})}}n.PromiseRejectionEvent&&(a[j("unhandledPromiseRejectionHandler")]=t("unhandledrejection"),a[j("rejectionHandledHandler")]=t("rejectionhandled"))}),e.__load_patch("queueMicrotask",(n,a,t)=>{Rt(n,t)})}function Lt(e){e.__load_patch("ZoneAwarePromise",(n,a,t)=>{let c=Object.getOwnPropertyDescriptor,f=Object.defineProperty;function E(h){if(h&&h.toString===Object.prototype.toString){let l=h.constructor&&h.constructor.name;return(l||"")+": "+JSON.stringify(h)}return h?h.toString():Object.prototype.toString.call(h)}let T=t.symbol,p=[],C=n[T("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")]!==!1,_=T("Promise"),P=T("then"),I="__creationTrace__";t.onUnhandledError=h=>{if(t.showUncaughtError()){let l=h&&h.rejection;l?console.error("Unhandled Promise rejection:",l instanceof Error?l.message:l,"; Zone:",h.zone.name,"; Task:",h.task&&h.task.source,"; Value:",l,l instanceof Error?l.stack:void 0):console.error(h)}},t.microtaskDrainDone=()=>{for(;p.length;){let h=p.shift();try{h.zone.runGuarded(()=>{throw h.throwOriginal?h.rejection:h})}catch(l){U(l)}}};let H=T("unhandledPromiseRejectionHandler");function U(h){t.onUnhandledError(h);try{let l=a[H];typeof l=="function"&&l.call(this,h)}catch{}}function $(h){return h&&h.then}function J(h){return h}function q(h){return Z.reject(h)}let k=T("state"),d=T("value"),A=T("finally"),x=T("parentPromiseValue"),X=T("parentPromiseState"),G="Promise.then",y=null,z=!0,S=!1,w=0;function b(h,l){return r=>{try{M(h,l,r)}catch(u){M(h,!1,u)}}}let D=function(){let h=!1;return function(r){return function(){h||(h=!0,r.apply(null,arguments))}}},K="Promise resolved with itself",W=T("currentTaskTrace");function M(h,l,r){let u=D();if(h===r)throw new TypeError(K);if(h[k]===y){let v=null;try{(typeof r=="object"||typeof r=="function")&&(v=r&&r.then)}catch(R){return u(()=>{M(h,!1,R)})(),h}if(l!==S&&r instanceof Z&&r.hasOwnProperty(k)&&r.hasOwnProperty(d)&&r[k]!==y)i(r),M(h,r[k],r[d]);else if(l!==S&&typeof v=="function")try{v.call(r,u(b(h,l)),u(b(h,!1)))}catch(R){u(()=>{M(h,!1,R)})()}else{h[k]=l;let R=h[d];if(h[d]=r,h[A]===A&&l===z&&(h[k]=h[X],h[d]=h[x]),l===S&&r instanceof Error){let m=a.currentTask&&a.currentTask.data&&a.currentTask.data[I];m&&f(r,W,{configurable:!0,enumerable:!1,writable:!0,value:m})}for(let m=0;m<R.length;)o(h,R[m++],R[m++],R[m++],R[m++]);if(R.length==0&&l==S){h[k]=w;let m=r;try{throw new Error("Uncaught (in promise): "+E(r)+(r&&r.stack?`
2
+ `+r.stack:""))}catch(O){m=O}C&&(m.throwOriginal=!0),m.rejection=r,m.promise=h,m.zone=a.current,m.task=a.currentTask,p.push(m),t.scheduleMicroTask()}}}return h}let s=T("rejectionHandledHandler");function i(h){if(h[k]===w){try{let l=a[s];l&&typeof l=="function"&&l.call(this,{rejection:h[d],promise:h})}catch{}h[k]=S;for(let l=0;l<p.length;l++)h===p[l].promise&&p.splice(l,1)}}function o(h,l,r,u,v){i(h);let R=h[k],m=R?typeof u=="function"?u:J:typeof v=="function"?v:q;l.scheduleMicroTask(G,()=>{try{let O=h[d],N=!!r&&A===r[A];N&&(r[x]=O,r[X]=R);let L=l.run(m,void 0,N&&m!==q&&m!==J?[]:[O]);M(r,!0,L)}catch(O){M(r,!1,O)}},r)}let g="function ZoneAwarePromise() { [native code] }",V=function(){},ee=n.AggregateError;class Z{static toString(){return g}static resolve(l){return l instanceof Z?l:M(new this(null),z,l)}static reject(l){return M(new this(null),S,l)}static withResolvers(){let l={};return l.promise=new Z((r,u)=>{l.resolve=r,l.reject=u}),l}static any(l){if(!l||typeof l[Symbol.iterator]!="function")return Promise.reject(new ee([],"All promises were rejected"));let r=[],u=0;try{for(let m of l)u++,r.push(Z.resolve(m))}catch{return Promise.reject(new ee([],"All promises were rejected"))}if(u===0)return Promise.reject(new ee([],"All promises were rejected"));let v=!1,R=[];return new Z((m,O)=>{for(let N=0;N<r.length;N++)r[N].then(L=>{v||(v=!0,m(L))},L=>{R.push(L),u--,u===0&&(v=!0,O(new ee(R,"All promises were rejected")))})})}static race(l){let r,u,v=new this((O,N)=>{r=O,u=N});function R(O){r(O)}function m(O){u(O)}for(let O of l)$(O)||(O=this.resolve(O)),O.then(R,m);return v}static all(l){return Z.allWithCallback(l)}static allSettled(l){return(this&&this.prototype instanceof Z?this:Z).allWithCallback(l,{thenCallback:u=>({status:"fulfilled",value:u}),errorCallback:u=>({status:"rejected",reason:u})})}static allWithCallback(l,r){let u,v,R=new this((L,F)=>{u=L,v=F}),m=2,O=0,N=[];for(let L of l){$(L)||(L=this.resolve(L));let F=O;try{L.then(B=>{N[F]=r?r.thenCallback(B):B,m--,m===0&&u(N)},B=>{r?(N[F]=r.errorCallback(B),m--,m===0&&u(N)):v(B)})}catch(B){v(B)}m++,O++}return m-=2,m===0&&u(N),R}constructor(l){let r=this;if(!(r instanceof Z))throw new Error("Must be an instanceof Promise.");r[k]=y,r[d]=[];try{let u=D();l&&l(u(b(r,z)),u(b(r,S)))}catch(u){M(r,!1,u)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return Z}then(l,r){let u=this.constructor?.[Symbol.species];(!u||typeof u!="function")&&(u=this.constructor||Z);let v=new u(V),R=a.current;return this[k]==y?this[d].push(R,v,l,r):o(this,R,v,l,r),v}catch(l){return this.then(null,l)}finally(l){let r=this.constructor?.[Symbol.species];(!r||typeof r!="function")&&(r=Z);let u=new r(V);u[A]=A;let v=a.current;return this[k]==y?this[d].push(v,u,l,l):o(this,v,u,l,l),u}}Z.resolve=Z.resolve,Z.reject=Z.reject,Z.race=Z.race,Z.all=Z.all;let he=n[_]=n.Promise;n.Promise=Z;let _e=T("thenPatched");function Q(h){let l=h.prototype,r=c(l,"then");if(r&&(r.writable===!1||!r.configurable))return;let u=l.then;l[P]=u,h.prototype.then=function(v,R){return new Z((O,N)=>{u.call(this,O,N)}).then(v,R)},h[_e]=!0}t.patchThen=Q;function Ee(h){return function(l,r){let u=h.apply(l,r);if(u instanceof Z)return u;let v=u.constructor;return v[_e]||Q(v),u}}return he&&(Q(he),ue(n,"fetch",h=>Ee(h))),Promise[a.__symbol__("uncaughtPromiseErrors")]=p,Z})}function It(e){e.__load_patch("toString",n=>{let a=Function.prototype.toString,t=j("OriginalDelegate"),c=j("Promise"),f=j("Error"),E=function(){if(typeof this=="function"){let _=this[t];if(_)return typeof _=="function"?a.call(_):Object.prototype.toString.call(_);if(this===Promise){let P=n[c];if(P)return a.call(P)}if(this===Error){let P=n[f];if(P)return a.call(P)}}return a.call(this)};E[t]=a,Function.prototype.toString=E;let T=Object.prototype.toString,p="[object Promise]";Object.prototype.toString=function(){return typeof Promise=="function"&&this instanceof Promise?p:T.call(this)}})}function Mt(e,n,a,t,c){let f=Zone.__symbol__(t);if(n[f])return;let E=n[f]=n[t];n[t]=function(T,p,C){return p&&p.prototype&&c.forEach(function(_){let P=`${a}.${t}::`+_,I=p.prototype;try{if(I.hasOwnProperty(_)){let H=e.ObjectGetOwnPropertyDescriptor(I,_);H&&H.value?(H.value=e.wrapWithCurrentZone(H.value,P),e._redefineProperty(p.prototype,_,H)):I[_]&&(I[_]=e.wrapWithCurrentZone(I[_],P))}else I[_]&&(I[_]=e.wrapWithCurrentZone(I[_],P))}catch{}}),E.call(n,T,p,C)},e.attachOriginToPatched(n[t],E)}function Zt(e){e.__load_patch("util",(n,a,t)=>{let c=Ze(n);t.patchOnProperties=ot,t.patchMethod=ue,t.bindArguments=Fe,t.patchMacroTask=pt;let f=a.__symbol__("BLACK_LISTED_EVENTS"),E=a.__symbol__("UNPATCHED_EVENTS");n[E]&&(n[f]=n[E]),n[f]&&(a[f]=a[E]=n[f]),t.patchEventPrototype=wt,t.patchEventTarget=Pt,t.isIEOrEdge=vt,t.ObjectDefineProperty=Ae,t.ObjectGetOwnPropertyDescriptor=be,t.ObjectCreate=Et,t.ArraySlice=Tt,t.patchClass=ve,t.wrapWithCurrentZone=Ve,t.filterProperties=ut,t.attachOriginToPatched=fe,t._redefineProperty=Object.defineProperty,t.patchCallbacks=Mt,t.getGlobalObjects=()=>({globalSources:st,zoneSymbolEventNames:ne,eventNames:c,isBrowser:Be,isMix:rt,isNode:Se,TRUE_STR:ae,FALSE_STR:le,ZONE_SYMBOL_PREFIX:Pe,ADD_EVENT_LISTENER_STR:He,REMOVE_EVENT_LISTENER_STR:xe})})}function At(e){Lt(e),It(e),Zt(e)}var ft=_t();At(ft);Nt(ft);