marketplacepos 3.10.1 → 3.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/{chunk-H57B7P7N.js → chunk-2CCOAUJC.js} +1 -1
- package/Marketplace/{chunk-BFNB4J5W.js → chunk-2E7TANNT.js} +1 -1
- package/Marketplace/{chunk-6GF6XSWZ.js → chunk-2ILB3NSK.js} +1 -1
- package/Marketplace/{chunk-ZQYW374F.js → chunk-4276ECDR.js} +1 -1
- package/Marketplace/{chunk-3CF7HOB3.js → chunk-4BX3EUMQ.js} +1 -1
- package/Marketplace/{chunk-QUSBGNEW.js → chunk-4L6TZC4Q.js} +1 -1
- package/Marketplace/{chunk-VXL3UMDN.js → chunk-4RHNT4DZ.js} +1 -1
- package/Marketplace/{chunk-5PIRWI5F.js → chunk-52XKBWBC.js} +1 -1
- package/Marketplace/{chunk-OIUZMXWP.js → chunk-5ADQ3O2A.js} +1 -1
- package/Marketplace/{chunk-UCVQS5HR.js → chunk-6F5PLBQH.js} +1 -1
- package/Marketplace/{chunk-GR67GFTL.js → chunk-6FRKO4S2.js} +1 -1
- package/Marketplace/{chunk-52UFYFEM.js → chunk-A6KWQYQ4.js} +1 -1
- package/Marketplace/{chunk-Z3NC34XH.js → chunk-BCUSOEWI.js} +1 -1
- package/Marketplace/{chunk-OIV2KTCZ.js → chunk-C7NKOWMY.js} +1 -1
- package/Marketplace/{chunk-XB2UHCVJ.js → chunk-CHXSDB2F.js} +1 -1
- package/Marketplace/{chunk-BJBDPG47.js → chunk-CMVC2NTG.js} +1 -1
- package/Marketplace/{chunk-V3UGRPNZ.js → chunk-E3GZ25PR.js} +1 -1
- package/Marketplace/chunk-F4WFV5C7.js +1 -0
- package/Marketplace/{chunk-F5ZJBCUU.js → chunk-FP2EY4DY.js} +1 -1
- package/Marketplace/{chunk-IWREFJGX.js → chunk-FQV6GA74.js} +1 -1
- package/Marketplace/{chunk-XDLTNTVT.js → chunk-FUC2SF5Q.js} +1 -1
- package/Marketplace/{chunk-C7TRF3SY.js → chunk-FWBPK3JW.js} +2 -2
- package/Marketplace/{chunk-CNCAKULD.js → chunk-FYQZXWZE.js} +1 -1
- package/Marketplace/{chunk-WIQODYPX.js → chunk-HCE3NYED.js} +1 -1
- package/Marketplace/{chunk-MWO3MHRT.js → chunk-HG3XRZ32.js} +1 -1
- package/Marketplace/chunk-HNWEYQEO.js +1 -0
- package/Marketplace/{chunk-RONMO7FE.js → chunk-I2E3VYHO.js} +1 -1
- package/Marketplace/{chunk-OM4EEQPS.js → chunk-IHY6NGKX.js} +1 -1
- package/Marketplace/{chunk-LDGVYQDZ.js → chunk-ITCAVZN5.js} +1 -1
- package/Marketplace/{chunk-F2X2FB6J.js → chunk-JAGECSCV.js} +1 -1
- package/Marketplace/{chunk-C3TFPYXX.js → chunk-LMYBWQKO.js} +1 -1
- package/Marketplace/{chunk-JJPZKFSE.js → chunk-MCVGOQW3.js} +1 -1
- package/Marketplace/{chunk-GTSE6GZT.js → chunk-MHZTEGOR.js} +1 -1
- package/Marketplace/{chunk-A2WAKRJC.js → chunk-MLG7CYPK.js} +1 -1
- package/Marketplace/{chunk-ODJ4UZGV.js → chunk-MPPVCPW6.js} +1 -1
- package/Marketplace/{chunk-FTHNPPXM.js → chunk-MXRTBC2I.js} +1 -1
- package/Marketplace/{chunk-WZCMEPBS.js → chunk-N76NUVI2.js} +1 -1
- package/Marketplace/{chunk-36GAH775.js → chunk-NLIQ2J6A.js} +1 -1
- package/Marketplace/{chunk-CNKB33H4.js → chunk-NWBY55LE.js} +1 -1
- package/Marketplace/{chunk-7NZIFRTH.js → chunk-OI2AB7KN.js} +1 -1
- package/Marketplace/{chunk-JUI6EOAN.js → chunk-OQPXY7Z5.js} +1 -1
- package/Marketplace/{chunk-PLNXC7LP.js → chunk-PAHXMFHZ.js} +1 -1
- package/Marketplace/chunk-QXR35VSU.js +5 -0
- package/Marketplace/{chunk-LDMABSVE.js → chunk-SX547BDR.js} +1 -1
- package/Marketplace/{chunk-ODAO6UI4.js → chunk-TKMWRB4W.js} +1 -1
- package/Marketplace/{chunk-QOGXVEGW.js → chunk-TYL25LTY.js} +1 -1
- package/Marketplace/{chunk-NIH5QHYK.js → chunk-U22NLR2G.js} +1 -1
- package/Marketplace/{chunk-23SBJKPP.js → chunk-V7GAS2H2.js} +1 -1
- package/Marketplace/{chunk-L35RXBHK.js → chunk-WAEUYRER.js} +1 -1
- package/Marketplace/{chunk-DHJDNOMM.js → chunk-WPB7FUQN.js} +12 -12
- package/Marketplace/{chunk-F7TBBOWO.js → chunk-XDA6LS5Q.js} +1 -1
- package/Marketplace/{chunk-Z5U5IBQC.js → chunk-XM2IT53M.js} +1 -1
- package/Marketplace/{chunk-2RIYYO3I.js → chunk-YJTBGAYK.js} +1 -1
- package/Marketplace/{chunk-P24WVMWI.js → chunk-YNZUWVLD.js} +1 -1
- package/Marketplace/{chunk-JJLMXJYI.js → chunk-YRDQ5HY2.js} +1 -1
- package/Marketplace/{chunk-U53TPHQS.js → chunk-YUII6AII.js} +1 -1
- package/Marketplace/{chunk-QZFQKQ7J.js → chunk-ZJQVUUVL.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/main-YQ364KRP.js +1 -0
- package/Marketplace/{styles-UF4D57IG.css → styles-Y32ZXHRJ.css} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-LKQ6EHTZ.js +0 -1
- package/Marketplace/chunk-UWJWLXE2.js +0 -1
- package/Marketplace/chunk-ZDNNLDAI.js +0 -5
- package/Marketplace/main-B2USSC5L.js +0 -1
- /package/Marketplace/{chunk-KG5K5AND.js → chunk-K6D5ADDS.js} +0 -0
- /package/Marketplace/{chunk-PUBPICPK.js → chunk-QMX3UB7H.js} +0 -0
- /package/Marketplace/{chunk-UWYERBYV.js → chunk-WTVDIONN.js} +0 -0
- /package/Marketplace/{polyfills-UZ2JZAXP.js → polyfills-MG5POISX.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ca as F,Ea as w,Ha as a,Ja as de,La as V,Na as d,Pa as J,Sa as Q,Vb as T,Xb as ee,Z as c,_ as G,aa as M,ba as _,fa as E,ga as u,ia as j,ib as ce,jb as m,m as ae,na as p,q as le,vb as h,w as ue}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-P24WVMWI.js";import{a as g,b as C}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-PUBPICPK.js";var Ve=(()=>{let e=class e{constructor(t,n){this._renderer=t,this._elementRef=n,this.onChange=s=>{},this.onTouched=()=>{}}setProperty(t,n){this._renderer.setProperty(this._elementRef.nativeElement,t,n)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}};e.\u0275fac=function(n){return new(n||e)(a(w),a(F))},e.\u0275dir=u({type:e});let i=e;return i})(),P=(()=>{let e=class e extends Ve{};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,features:[d]});let i=e;return i})(),b=new _("NgValueAccessor"),qe={provide:b,useExisting:c(()=>ze),multi:!0},ze=(()=>{let e=class e extends P{writeValue(t){this.setProperty("checked",t)}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(n,s){n&1&&m("change",function(l){return s.onChange(l.target.checked)})("blur",function(){return s.onTouched()})},features:[h([qe]),d]});let i=e;return i})(),Ze={provide:b,useExisting:c(()=>De),multi:!0};function Xe(){let i=ee()?ee().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var Ye=new _("CompositionEventMode"),De=(()=>{let e=class e extends Ve{constructor(t,n,s){super(t,n),this._compositionMode=s,this._composing=!1,this._compositionMode==null&&(this._compositionMode=!Xe())}writeValue(t){let n=t??"";this.setProperty("value",n)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}};e.\u0275fac=function(n){return new(n||e)(a(w),a(F),a(Ye,8))},e.\u0275dir=u({type:e,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,s){n&1&&m("input",function(l){return s._handleInput(l.target.value)})("blur",function(){return s.onTouched()})("compositionstart",function(){return s._compositionStart()})("compositionend",function(l){return s._compositionEnd(l.target.value)})},features:[h([Ze]),d]});let i=e;return i})();function y(i){return i==null||(typeof i=="string"||Array.isArray(i))&&i.length===0}function be(i){return i!=null&&typeof i.length=="number"}var A=new _("NgValidators"),ie=new _("NgAsyncValidators"),Ke=/^(?=.{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])?)*$/,he=class{static min(e){return Je(e)}static max(e){return Qe(e)}static required(e){return Ae(e)}static requiredTrue(e){return et(e)}static email(e){return Me(e)}static minLength(e){return tt(e)}static maxLength(e){return it(e)}static pattern(e){return Ee(e)}static nullValidator(e){return U(e)}static compose(e){return Ne(e)}static composeAsync(e){return Pe(e)}};function Je(i){return e=>{if(y(e.value)||y(i))return null;let r=parseFloat(e.value);return!isNaN(r)&&r<i?{min:{min:i,actual:e.value}}:null}}function Qe(i){return e=>{if(y(e.value)||y(i))return null;let r=parseFloat(e.value);return!isNaN(r)&&r>i?{max:{max:i,actual:e.value}}:null}}function Ae(i){return y(i.value)?{required:!0}:null}function et(i){return i.value===!0?null:{required:!0}}function Me(i){return y(i.value)||Ke.test(i.value)?null:{email:!0}}function tt(i){return e=>y(e.value)||!be(e.value)?null:e.value.length<i?{minlength:{requiredLength:i,actualLength:e.value.length}}:null}function it(i){return e=>be(e.value)&&e.value.length>i?{maxlength:{requiredLength:i,actualLength:e.value.length}}:null}function Ee(i){if(!i)return U;let e,r;return typeof i=="string"?(r="",i.charAt(0)!=="^"&&(r+="^"),r+=i,i.charAt(i.length-1)!=="$"&&(r+="$"),e=new RegExp(r)):(r=i.toString(),e=i),t=>{if(y(t.value))return null;let n=t.value;return e.test(n)?null:{pattern:{requiredPattern:r,actualValue:n}}}}function U(i){return null}function Fe(i){return i!=null}function we(i){return ce(i)?ae(i):i}function Ie(i){let e={};return i.forEach(r=>{e=r!=null?g(g({},e),r):e}),Object.keys(e).length===0?null:e}function Se(i,e){return e.map(r=>r(i))}function nt(i){return!i.validate}function Oe(i){return i.map(e=>nt(e)?e:r=>e.validate(r))}function Ne(i){if(!i)return null;let e=i.filter(Fe);return e.length==0?null:function(r){return Ie(Se(r,e))}}function ne(i){return i!=null?Ne(Oe(i)):null}function Pe(i){if(!i)return null;let e=i.filter(Fe);return e.length==0?null:function(r){let t=Se(r,e).map(we);return ue(t).pipe(le(Ie))}}function re(i){return i!=null?Pe(Oe(i)):null}function fe(i,e){return i===null?[e]:Array.isArray(i)?[...i,e]:[i,e]}function xe(i){return i._rawValidators}function ke(i){return i._rawAsyncValidators}function te(i){return i?Array.isArray(i)?i:[i]:[]}function R(i,e){return Array.isArray(i)?i.includes(e):i===e}function pe(i,e){let r=te(e);return te(i).forEach(n=>{R(r,n)||r.push(n)}),r}function ge(i,e){return te(e).filter(r=>!R(i,r))}var H=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(e){this._rawValidators=e||[],this._composedValidatorFn=ne(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=re(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control&&this.control.reset(e)}hasError(e,r){return this.control?this.control.hasError(e,r):!1}getError(e,r){return this.control?this.control.getError(e,r):null}},v=class extends H{get formDirective(){return null}get path(){return null}},N=class extends H{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},L=class{constructor(e){this._cd=e}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}},rt={"[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"},oi=C(g({},rt),{"[class.ng-submitted]":"isSubmitted"}),ai=(()=>{let e=class e extends L{constructor(t){super(t)}};e.\u0275fac=function(n){return new(n||e)(a(N,2))},e.\u0275dir=u({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,s){n&2&&Q("ng-untouched",s.isUntouched)("ng-touched",s.isTouched)("ng-pristine",s.isPristine)("ng-dirty",s.isDirty)("ng-valid",s.isValid)("ng-invalid",s.isInvalid)("ng-pending",s.isPending)},features:[d]});let i=e;return i})(),li=(()=>{let e=class e extends L{constructor(t){super(t)}};e.\u0275fac=function(n){return new(n||e)(a(v,10))},e.\u0275dir=u({type:e,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(n,s){n&2&&Q("ng-untouched",s.isUntouched)("ng-touched",s.isTouched)("ng-pristine",s.isPristine)("ng-dirty",s.isDirty)("ng-valid",s.isValid)("ng-invalid",s.isInvalid)("ng-pending",s.isPending)("ng-submitted",s.isSubmitted)},features:[d]});let i=e;return i})();var I="VALID",B="INVALID",D="PENDING",S="DISABLED";function Ge(i){return(X(i)?i.validators:i)||null}function st(i){return Array.isArray(i)?ne(i):i||null}function je(i,e){return(X(e)?e.asyncValidators:i)||null}function ot(i){return Array.isArray(i)?re(i):i||null}function X(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}function at(i,e,r){let t=i.controls;if(!(e?Object.keys(t):t).length)throw new G(1e3,"");if(!t[r])throw new G(1001,"")}function lt(i,e,r){i._forEachChild((t,n)=>{if(r[n]===void 0)throw new G(1002,"")})}var $=class{constructor(e,r){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(e),this._assignAsyncValidators(r)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get valid(){return this.status===I}get invalid(){return this.status===B}get pending(){return this.status==D}get disabled(){return this.status===S}get enabled(){return this.status!==S}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(pe(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(pe(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(ge(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(ge(e,this._rawAsyncValidators))}hasValidator(e){return R(this._rawValidators,e)}hasAsyncValidator(e){return R(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(e=>e.markAllAsTouched())}markAsUntouched(e={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}markAsDirty(e={}){this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)}markAsPristine(e={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(r=>{r.markAsPristine({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}markAsPending(e={}){this.status=D,e.emitEvent!==!1&&this.statusChanges.emit(this.status),this._parent&&!e.onlySelf&&this._parent.markAsPending(e)}disable(e={}){let r=this._parentMarkedDirty(e.onlySelf);this.status=S,this.errors=null,this._forEachChild(t=>{t.disable(C(g({},e),{onlySelf:!0}))}),this._updateValue(),e.emitEvent!==!1&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(C(g({},e),{skipPristineCheck:r})),this._onDisabledChange.forEach(t=>t(!0))}enable(e={}){let r=this._parentMarkedDirty(e.onlySelf);this.status=I,this._forEachChild(t=>{t.enable(C(g({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(C(g({},e),{skipPristineCheck:r})),this._onDisabledChange.forEach(t=>t(!1))}_updateAncestors(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===I||this.status===D)&&this._runAsyncValidator(e.emitEvent)),e.emitEvent!==!1&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(r=>r._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?S:I}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e){if(this.asyncValidator){this.status=D,this._hasOwnPendingAsyncValidator=!0;let r=we(this.asyncValidator(this));this._asyncValidationSubscription=r.subscribe(t=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(t,{emitEvent:e})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(e,r={}){this.errors=e,this._updateControlsErrors(r.emitEvent!==!1)}get(e){let r=e;return r==null||(Array.isArray(r)||(r=r.split(".")),r.length===0)?null:r.reduce((t,n)=>t&&t._find(n),this)}getError(e,r){let t=r?this.get(r):this;return t&&t.errors?t.errors[e]:null}hasError(e,r){return!!this.getError(e,r)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)}_initObservables(){this.valueChanges=new V,this.statusChanges=new V}_calculateStatus(){return this._allControlsDisabled()?S:this.errors?B:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(D)?D:this._anyControlsHaveStatus(B)?B:I}_anyControlsHaveStatus(e){return this._anyControls(r=>r.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e={}){this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}_updateTouched(e={}){this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){X(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){let r=this._parent&&this._parent.dirty;return!e&&!!r&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=st(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=ot(this._rawAsyncValidators)}},W=class extends ${constructor(e,r,t){super(Ge(r),je(t,r)),this.controls=e,this._initObservables(),this._setUpdateStrategy(r),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,r){return this.controls[e]?this.controls[e]:(this.controls[e]=r,r.setParent(this),r._registerOnCollectionChange(this._onCollectionChange),r)}addControl(e,r,t={}){this.registerControl(e,r),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}removeControl(e,r={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}setControl(e,r,t={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],r&&this.registerControl(e,r),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,r={}){lt(this,!0,e),Object.keys(e).forEach(t=>{at(this,!0,t),this.controls[t].setValue(e[t],{onlySelf:!0,emitEvent:r.emitEvent})}),this.updateValueAndValidity(r)}patchValue(e,r={}){e!=null&&(Object.keys(e).forEach(t=>{let n=this.controls[t];n&&n.patchValue(e[t],{onlySelf:!0,emitEvent:r.emitEvent})}),this.updateValueAndValidity(r))}reset(e={},r={}){this._forEachChild((t,n)=>{t.reset(e?e[n]:null,{onlySelf:!0,emitEvent:r.emitEvent})}),this._updatePristine(r),this._updateTouched(r),this.updateValueAndValidity(r)}getRawValue(){return this._reduceChildren({},(e,r,t)=>(e[t]=r.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(r,t)=>t._syncPendingControls()?!0:r);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(r=>{let t=this.controls[r];t&&e(t,r)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(let[r,t]of Object.entries(this.controls))if(this.contains(r)&&e(t))return!0;return!1}_reduceValue(){let e={};return this._reduceChildren(e,(r,t,n)=>((t.enabled||this.disabled)&&(r[n]=t.value),r))}_reduceChildren(e,r){let t=e;return this._forEachChild((n,s)=>{t=r(t,n,s)}),t}_allControlsDisabled(){for(let e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(e){return this.controls.hasOwnProperty(e)?this.controls[e]:null}};var x=new _("CallSetDisabledState",{providedIn:"root",factory:()=>Y}),Y="always";function ut(i,e){return[...e.path,i]}function q(i,e,r=Y){se(i,e),e.valueAccessor.writeValue(i.value),(i.disabled||r==="always")&&e.valueAccessor.setDisabledState?.(i.disabled),ct(i,e),ft(i,e),ht(i,e),dt(i,e)}function me(i,e,r=!0){let t=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(t),e.valueAccessor.registerOnTouched(t)),Z(i,e),i&&(e._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function z(i,e){i.forEach(r=>{r.registerOnValidatorChange&&r.registerOnValidatorChange(e)})}function dt(i,e){if(e.valueAccessor.setDisabledState){let r=t=>{e.valueAccessor.setDisabledState(t)};i.registerOnDisabledChange(r),e._registerOnDestroy(()=>{i._unregisterOnDisabledChange(r)})}}function se(i,e){let r=xe(i);e.validator!==null?i.setValidators(fe(r,e.validator)):typeof r=="function"&&i.setValidators([r]);let t=ke(i);e.asyncValidator!==null?i.setAsyncValidators(fe(t,e.asyncValidator)):typeof t=="function"&&i.setAsyncValidators([t]);let n=()=>i.updateValueAndValidity();z(e._rawValidators,n),z(e._rawAsyncValidators,n)}function Z(i,e){let r=!1;if(i!==null){if(e.validator!==null){let n=xe(i);if(Array.isArray(n)&&n.length>0){let s=n.filter(o=>o!==e.validator);s.length!==n.length&&(r=!0,i.setValidators(s))}}if(e.asyncValidator!==null){let n=ke(i);if(Array.isArray(n)&&n.length>0){let s=n.filter(o=>o!==e.asyncValidator);s.length!==n.length&&(r=!0,i.setAsyncValidators(s))}}}let t=()=>{};return z(e._rawValidators,t),z(e._rawAsyncValidators,t),r}function ct(i,e){e.valueAccessor.registerOnChange(r=>{i._pendingValue=r,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&Te(i,e)})}function ht(i,e){e.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&Te(i,e),i.updateOn!=="submit"&&i.markAsTouched()})}function Te(i,e){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function ft(i,e){let r=(t,n)=>{e.valueAccessor.writeValue(t),n&&e.viewToModelUpdate(t)};i.registerOnChange(r),e._registerOnDestroy(()=>{i._unregisterOnChange(r)})}function Be(i,e){i==null,se(i,e)}function pt(i,e){return Z(i,e)}function gt(i,e){if(!i.hasOwnProperty("model"))return!1;let r=i.model;return r.isFirstChange()?!0:!Object.is(e,r.currentValue)}function mt(i){return Object.getPrototypeOf(i.constructor)===P}function Ue(i,e){i._syncPendingControls(),e.forEach(r=>{let t=r.control;t.updateOn==="submit"&&t._pendingChange&&(r.viewToModelUpdate(t._pendingValue),t._pendingChange=!1)})}function yt(i,e){if(!e)return null;Array.isArray(e);let r,t,n;return e.forEach(s=>{s.constructor===De?r=s:mt(s)?t=s:n=s}),n||t||r||null}function vt(i,e){let r=i.indexOf(e);r>-1&&i.splice(r,1)}var _t={provide:v,useExisting:c(()=>Ct)},O=(()=>Promise.resolve())(),Ct=(()=>{let e=class e extends v{constructor(t,n,s){super(),this.callSetDisabledState=s,this.submitted=!1,this._directives=new Set,this.ngSubmit=new V,this.form=new W({},ne(t),re(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){O.then(()=>{let n=this._findContainer(t.path);t.control=n.registerControl(t.name,t.control),q(t.control,t,this.callSetDisabledState),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){O.then(()=>{let n=this._findContainer(t.path);n&&n.removeControl(t.name),this._directives.delete(t)})}addFormGroup(t){O.then(()=>{let n=this._findContainer(t.path),s=new W({});Be(s,t),n.registerControl(t.name,s),s.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){O.then(()=>{let n=this._findContainer(t.path);n&&n.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,n){O.then(()=>{this.form.get(t.path).setValue(n)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,Ue(this.form,this._directives),this.ngSubmit.emit(t),t?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}};e.\u0275fac=function(n){return new(n||e)(a(A,10),a(ie,10),a(x,8))},e.\u0275dir=u({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(n,s){n&1&&m("submit",function(l){return s.onSubmit(l)})("reset",function(){return s.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[h([_t]),d]});let i=e;return i})();function ye(i,e){let r=i.indexOf(e);r>-1&&i.splice(r,1)}function ve(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var Re=class extends ${constructor(e=null,r,t){super(Ge(r),je(t,r)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(e),this._setUpdateStrategy(r),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),X(r)&&(r.nonNullable||r.initialValueIsDefault)&&(ve(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,r={}){this.value=this._pendingValue=e,this._onChange.length&&r.emitModelToViewChange!==!1&&this._onChange.forEach(t=>t(this.value,r.emitViewToModelChange!==!1)),this.updateValueAndValidity(r)}patchValue(e,r={}){this.setValue(e,r)}reset(e=this.defaultValue,r={}){this._applyFormState(e),this.markAsPristine(r),this.markAsUntouched(r),this.setValue(this.value,r),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){ye(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){ye(this._onDisabledChange,e)}_forEachChild(e){}_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(e){ve(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}};var Vt=i=>i instanceof Re;var Dt={provide:N,useExisting:c(()=>bt)},_e=(()=>Promise.resolve())(),bt=(()=>{let e=class e extends N{constructor(t,n,s,o,l,f){super(),this._changeDetectorRef=l,this.callSetDisabledState=f,this.control=new Re,this._registered=!1,this.name="",this.update=new V,this._parent=t,this._setValidators(n),this._setAsyncValidators(s),this.valueAccessor=yt(this,o)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){let n=t.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),gt(t,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(t){this.viewModel=t,this.update.emit(t)}_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(){q(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(t){_e.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let n=t.isDisabled.currentValue,s=n!==0&&T(n);_e.then(()=>{s&&!this.control.disabled?this.control.disable():!s&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?ut(t,this._parent):[t]}};e.\u0275fac=function(n){return new(n||e)(a(v,9),a(A,10),a(ie,10),a(b,10),a(de,8),a(x,8))},e.\u0275dir=u({type:e,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[h([Dt]),d,j]});let i=e;return i})(),di=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=u({type:e,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]});let i=e;return i})(),At={provide:b,useExisting:c(()=>Mt),multi:!0},Mt=(()=>{let e=class e extends P{writeValue(t){let n=t??"";this.setProperty("value",n)}registerOnChange(t){this.onChange=n=>{t(n==""?null:parseFloat(n))}}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(n,s){n&1&&m("input",function(l){return s.onChange(l.target.value)})("blur",function(){return s.onTouched()})},features:[h([At]),d]});let i=e;return i})();var Et=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=E({type:e}),e.\u0275inj=M({});let i=e;return i})();var Ft=new _("NgModelWithFormControlWarning");var wt={provide:v,useExisting:c(()=>It)},It=(()=>{let e=class e extends v{constructor(t,n,s){super(),this.callSetDisabledState=s,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new V,this._setValidators(t),this._setAsyncValidators(n)}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Z(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){let n=this.form.get(t.path);return q(n,t,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),n}getControl(t){return this.form.get(t.path)}removeControl(t){me(t.control||null,t,!1),vt(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,n){this.form.get(t.path).setValue(n)}onSubmit(t){return this.submitted=!0,Ue(this.form,this.directives),this.ngSubmit.emit(t),t?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{let n=t.control,s=this.form.get(t.path);n!==s&&(me(n||null,t),Vt(s)&&(q(s,t,this.callSetDisabledState),t.control=s))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){let n=this.form.get(t.path);Be(n,t),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){let n=this.form.get(t.path);n&&pt(n,t)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){se(this.form,this),this._oldForm&&Z(this._oldForm,this)}_checkFormPresent(){this.form}};e.\u0275fac=function(n){return new(n||e)(a(A,10),a(ie,10),a(x,8))},e.\u0275dir=u({type:e,selectors:[["","formGroup",""]],hostBindings:function(n,s){n&1&&m("submit",function(l){return s.onSubmit(l)})("reset",function(){return s.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[h([wt]),d,j]});let i=e;return i})();var St={provide:b,useExisting:c(()=>Le),multi:!0};function He(i,e){return i==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function Ot(i){return i.split(":")[0]}var Le=(()=>{let e=class e extends P{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){this.value=t;let n=this._getOptionId(t),s=He(n,t);this.setProperty("value",s)}registerOnChange(t){this.onChange=n=>{this.value=this._getOptionValue(n),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n),t))return n;return null}_getOptionValue(t){let n=Ot(t);return this._optionMap.has(n)?this._optionMap.get(n):t}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(n,s){n&1&&m("change",function(l){return s.onChange(l.target.value)})("blur",function(){return s.onTouched()})},inputs:{compareWith:"compareWith"},features:[h([St]),d]});let i=e;return i})(),ci=(()=>{let e=class e{constructor(t,n,s){this._element=t,this._renderer=n,this._select=s,this._select&&(this.id=this._select._registerOption())}set ngValue(t){this._select!=null&&(this._select._optionMap.set(this.id,t),this._setElementValue(He(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._setElementValue(t),this._select&&this._select.writeValue(this._select.value)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}};e.\u0275fac=function(n){return new(n||e)(a(F),a(w),a(Le,9))},e.\u0275dir=u({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}});let i=e;return i})(),Nt={provide:b,useExisting:c(()=>$e),multi:!0};function Ce(i,e){return i==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function Pt(i){return i.split(":")[0]}var $e=(()=>{let e=class e extends P{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){this.value=t;let n;if(Array.isArray(t)){let s=t.map(o=>this._getOptionId(o));n=(o,l)=>{o._setSelected(s.indexOf(l.toString())>-1)}}else n=(s,o)=>{s._setSelected(!1)};this._optionMap.forEach(n)}registerOnChange(t){this.onChange=n=>{let s=[],o=n.selectedOptions;if(o!==void 0){let l=o;for(let f=0;f<l.length;f++){let k=l[f],K=this._getOptionValue(k.value);s.push(K)}}else{let l=n.options;for(let f=0;f<l.length;f++){let k=l[f];if(k.selected){let K=this._getOptionValue(k.value);s.push(K)}}}this.value=s,t(s)}}_registerOption(t){let n=(this._idCounter++).toString();return this._optionMap.set(n,t),n}_getOptionId(t){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n)._value,t))return n;return null}_getOptionValue(t){let n=Pt(t);return this._optionMap.has(n)?this._optionMap.get(n)._value:t}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(n,s){n&1&&m("change",function(l){return s.onChange(l.target)})("blur",function(){return s.onTouched()})},inputs:{compareWith:"compareWith"},features:[h([Nt]),d]});let i=e;return i})(),hi=(()=>{let e=class e{constructor(t,n,s){this._element=t,this._renderer=n,this._select=s,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){this._select!=null&&(this._value=t,this._setElementValue(Ce(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(Ce(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}};e.\u0275fac=function(n){return new(n||e)(a(F),a(w),a($e,9))},e.\u0275dir=u({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}});let i=e;return i})();var oe=(()=>{let e=class e{constructor(){this._validator=U}ngOnChanges(t){if(this.inputName in t){let n=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(n),this._validator=this._enabled?this.createValidator(n):U,this._onChange&&this._onChange()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return t!=null}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=u({type:e,features:[j]});let i=e;return i})();var xt={provide:A,useExisting:c(()=>kt),multi:!0};var kt=(()=>{let e=class e extends oe{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=T,this.createValidator=t=>Ae}enabled(t){return t}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(n,s){n&2&&J("required",s._enabled?"":null)},inputs:{required:"required"},features:[h([xt]),d]});let i=e;return i})();var Gt={provide:A,useExisting:c(()=>jt),multi:!0},jt=(()=>{let e=class e extends oe{constructor(){super(...arguments),this.inputName="email",this.normalizeInput=T,this.createValidator=t=>Me}enabled(t){return t}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["","email","","formControlName",""],["","email","","formControl",""],["","email","","ngModel",""]],inputs:{email:"email"},features:[h([Gt]),d]});let i=e;return i})();var Tt={provide:A,useExisting:c(()=>Bt),multi:!0},Bt=(()=>{let e=class e extends oe{constructor(){super(...arguments),this.inputName="pattern",this.normalizeInput=t=>t,this.createValidator=t=>Ee(t)}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(n,s){n&2&&J("pattern",s._enabled?s.pattern:null)},inputs:{pattern:"pattern"},features:[h([Tt]),d]});let i=e;return i})();var We=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=E({type:e}),e.\u0275inj=M({imports:[Et]});let i=e;return i})();var fi=(()=>{let e=class e{static withConfig(t){return{ngModule:e,providers:[{provide:x,useValue:t.callSetDisabledState??Y}]}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=E({type:e}),e.\u0275inj=M({imports:[We]});let i=e;return i})(),pi=(()=>{let e=class e{static withConfig(t){return{ngModule:e,providers:[{provide:Ft,useValue:t.warnOnNgModelWithFormControl??"always"},{provide:x,useValue:t.callSetDisabledState??Y}]}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=E({type:e}),e.\u0275inj=M({imports:[We]});let i=e;return i})();export{b as a,ze as b,De as c,A as d,he as e,v as f,N as g,ai as h,li as i,Ct as j,bt as k,di as l,Mt as m,It as n,Le as o,ci as p,hi as q,kt as r,jt as s,Bt as t,fi as u,pi as v};
|
|
1
|
+
import{Ca as F,Ea as w,Ha as a,Ja as de,La as V,Na as d,Pa as J,Sa as Q,Vb as T,Xb as ee,Z as c,_ as G,aa as M,ba as _,fa as E,ga as u,ia as j,ib as ce,jb as m,m as ae,na as p,q as le,vb as h,w as ue}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.3/Marketplace/chunk-YNZUWVLD.js";import{a as g,b as C}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.3/Marketplace/chunk-QMX3UB7H.js";var Ve=(()=>{let e=class e{constructor(t,n){this._renderer=t,this._elementRef=n,this.onChange=s=>{},this.onTouched=()=>{}}setProperty(t,n){this._renderer.setProperty(this._elementRef.nativeElement,t,n)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}};e.\u0275fac=function(n){return new(n||e)(a(w),a(F))},e.\u0275dir=u({type:e});let i=e;return i})(),P=(()=>{let e=class e extends Ve{};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,features:[d]});let i=e;return i})(),b=new _("NgValueAccessor"),qe={provide:b,useExisting:c(()=>ze),multi:!0},ze=(()=>{let e=class e extends P{writeValue(t){this.setProperty("checked",t)}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(n,s){n&1&&m("change",function(l){return s.onChange(l.target.checked)})("blur",function(){return s.onTouched()})},features:[h([qe]),d]});let i=e;return i})(),Ze={provide:b,useExisting:c(()=>De),multi:!0};function Xe(){let i=ee()?ee().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var Ye=new _("CompositionEventMode"),De=(()=>{let e=class e extends Ve{constructor(t,n,s){super(t,n),this._compositionMode=s,this._composing=!1,this._compositionMode==null&&(this._compositionMode=!Xe())}writeValue(t){let n=t??"";this.setProperty("value",n)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}};e.\u0275fac=function(n){return new(n||e)(a(w),a(F),a(Ye,8))},e.\u0275dir=u({type:e,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,s){n&1&&m("input",function(l){return s._handleInput(l.target.value)})("blur",function(){return s.onTouched()})("compositionstart",function(){return s._compositionStart()})("compositionend",function(l){return s._compositionEnd(l.target.value)})},features:[h([Ze]),d]});let i=e;return i})();function y(i){return i==null||(typeof i=="string"||Array.isArray(i))&&i.length===0}function be(i){return i!=null&&typeof i.length=="number"}var A=new _("NgValidators"),ie=new _("NgAsyncValidators"),Ke=/^(?=.{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])?)*$/,he=class{static min(e){return Je(e)}static max(e){return Qe(e)}static required(e){return Ae(e)}static requiredTrue(e){return et(e)}static email(e){return Me(e)}static minLength(e){return tt(e)}static maxLength(e){return it(e)}static pattern(e){return Ee(e)}static nullValidator(e){return U(e)}static compose(e){return Ne(e)}static composeAsync(e){return Pe(e)}};function Je(i){return e=>{if(y(e.value)||y(i))return null;let r=parseFloat(e.value);return!isNaN(r)&&r<i?{min:{min:i,actual:e.value}}:null}}function Qe(i){return e=>{if(y(e.value)||y(i))return null;let r=parseFloat(e.value);return!isNaN(r)&&r>i?{max:{max:i,actual:e.value}}:null}}function Ae(i){return y(i.value)?{required:!0}:null}function et(i){return i.value===!0?null:{required:!0}}function Me(i){return y(i.value)||Ke.test(i.value)?null:{email:!0}}function tt(i){return e=>y(e.value)||!be(e.value)?null:e.value.length<i?{minlength:{requiredLength:i,actualLength:e.value.length}}:null}function it(i){return e=>be(e.value)&&e.value.length>i?{maxlength:{requiredLength:i,actualLength:e.value.length}}:null}function Ee(i){if(!i)return U;let e,r;return typeof i=="string"?(r="",i.charAt(0)!=="^"&&(r+="^"),r+=i,i.charAt(i.length-1)!=="$"&&(r+="$"),e=new RegExp(r)):(r=i.toString(),e=i),t=>{if(y(t.value))return null;let n=t.value;return e.test(n)?null:{pattern:{requiredPattern:r,actualValue:n}}}}function U(i){return null}function Fe(i){return i!=null}function we(i){return ce(i)?ae(i):i}function Ie(i){let e={};return i.forEach(r=>{e=r!=null?g(g({},e),r):e}),Object.keys(e).length===0?null:e}function Se(i,e){return e.map(r=>r(i))}function nt(i){return!i.validate}function Oe(i){return i.map(e=>nt(e)?e:r=>e.validate(r))}function Ne(i){if(!i)return null;let e=i.filter(Fe);return e.length==0?null:function(r){return Ie(Se(r,e))}}function ne(i){return i!=null?Ne(Oe(i)):null}function Pe(i){if(!i)return null;let e=i.filter(Fe);return e.length==0?null:function(r){let t=Se(r,e).map(we);return ue(t).pipe(le(Ie))}}function re(i){return i!=null?Pe(Oe(i)):null}function fe(i,e){return i===null?[e]:Array.isArray(i)?[...i,e]:[i,e]}function xe(i){return i._rawValidators}function ke(i){return i._rawAsyncValidators}function te(i){return i?Array.isArray(i)?i:[i]:[]}function R(i,e){return Array.isArray(i)?i.includes(e):i===e}function pe(i,e){let r=te(e);return te(i).forEach(n=>{R(r,n)||r.push(n)}),r}function ge(i,e){return te(e).filter(r=>!R(i,r))}var H=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(e){this._rawValidators=e||[],this._composedValidatorFn=ne(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=re(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control&&this.control.reset(e)}hasError(e,r){return this.control?this.control.hasError(e,r):!1}getError(e,r){return this.control?this.control.getError(e,r):null}},v=class extends H{get formDirective(){return null}get path(){return null}},N=class extends H{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},L=class{constructor(e){this._cd=e}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}},rt={"[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"},oi=C(g({},rt),{"[class.ng-submitted]":"isSubmitted"}),ai=(()=>{let e=class e extends L{constructor(t){super(t)}};e.\u0275fac=function(n){return new(n||e)(a(N,2))},e.\u0275dir=u({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,s){n&2&&Q("ng-untouched",s.isUntouched)("ng-touched",s.isTouched)("ng-pristine",s.isPristine)("ng-dirty",s.isDirty)("ng-valid",s.isValid)("ng-invalid",s.isInvalid)("ng-pending",s.isPending)},features:[d]});let i=e;return i})(),li=(()=>{let e=class e extends L{constructor(t){super(t)}};e.\u0275fac=function(n){return new(n||e)(a(v,10))},e.\u0275dir=u({type:e,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(n,s){n&2&&Q("ng-untouched",s.isUntouched)("ng-touched",s.isTouched)("ng-pristine",s.isPristine)("ng-dirty",s.isDirty)("ng-valid",s.isValid)("ng-invalid",s.isInvalid)("ng-pending",s.isPending)("ng-submitted",s.isSubmitted)},features:[d]});let i=e;return i})();var I="VALID",B="INVALID",D="PENDING",S="DISABLED";function Ge(i){return(X(i)?i.validators:i)||null}function st(i){return Array.isArray(i)?ne(i):i||null}function je(i,e){return(X(e)?e.asyncValidators:i)||null}function ot(i){return Array.isArray(i)?re(i):i||null}function X(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}function at(i,e,r){let t=i.controls;if(!(e?Object.keys(t):t).length)throw new G(1e3,"");if(!t[r])throw new G(1001,"")}function lt(i,e,r){i._forEachChild((t,n)=>{if(r[n]===void 0)throw new G(1002,"")})}var $=class{constructor(e,r){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(e),this._assignAsyncValidators(r)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get valid(){return this.status===I}get invalid(){return this.status===B}get pending(){return this.status==D}get disabled(){return this.status===S}get enabled(){return this.status!==S}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(pe(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(pe(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(ge(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(ge(e,this._rawAsyncValidators))}hasValidator(e){return R(this._rawValidators,e)}hasAsyncValidator(e){return R(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(e=>e.markAllAsTouched())}markAsUntouched(e={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}markAsDirty(e={}){this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)}markAsPristine(e={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(r=>{r.markAsPristine({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}markAsPending(e={}){this.status=D,e.emitEvent!==!1&&this.statusChanges.emit(this.status),this._parent&&!e.onlySelf&&this._parent.markAsPending(e)}disable(e={}){let r=this._parentMarkedDirty(e.onlySelf);this.status=S,this.errors=null,this._forEachChild(t=>{t.disable(C(g({},e),{onlySelf:!0}))}),this._updateValue(),e.emitEvent!==!1&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(C(g({},e),{skipPristineCheck:r})),this._onDisabledChange.forEach(t=>t(!0))}enable(e={}){let r=this._parentMarkedDirty(e.onlySelf);this.status=I,this._forEachChild(t=>{t.enable(C(g({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(C(g({},e),{skipPristineCheck:r})),this._onDisabledChange.forEach(t=>t(!1))}_updateAncestors(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===I||this.status===D)&&this._runAsyncValidator(e.emitEvent)),e.emitEvent!==!1&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(r=>r._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?S:I}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e){if(this.asyncValidator){this.status=D,this._hasOwnPendingAsyncValidator=!0;let r=we(this.asyncValidator(this));this._asyncValidationSubscription=r.subscribe(t=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(t,{emitEvent:e})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(e,r={}){this.errors=e,this._updateControlsErrors(r.emitEvent!==!1)}get(e){let r=e;return r==null||(Array.isArray(r)||(r=r.split(".")),r.length===0)?null:r.reduce((t,n)=>t&&t._find(n),this)}getError(e,r){let t=r?this.get(r):this;return t&&t.errors?t.errors[e]:null}hasError(e,r){return!!this.getError(e,r)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)}_initObservables(){this.valueChanges=new V,this.statusChanges=new V}_calculateStatus(){return this._allControlsDisabled()?S:this.errors?B:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(D)?D:this._anyControlsHaveStatus(B)?B:I}_anyControlsHaveStatus(e){return this._anyControls(r=>r.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e={}){this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}_updateTouched(e={}){this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){X(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){let r=this._parent&&this._parent.dirty;return!e&&!!r&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=st(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=ot(this._rawAsyncValidators)}},W=class extends ${constructor(e,r,t){super(Ge(r),je(t,r)),this.controls=e,this._initObservables(),this._setUpdateStrategy(r),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,r){return this.controls[e]?this.controls[e]:(this.controls[e]=r,r.setParent(this),r._registerOnCollectionChange(this._onCollectionChange),r)}addControl(e,r,t={}){this.registerControl(e,r),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}removeControl(e,r={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}setControl(e,r,t={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],r&&this.registerControl(e,r),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,r={}){lt(this,!0,e),Object.keys(e).forEach(t=>{at(this,!0,t),this.controls[t].setValue(e[t],{onlySelf:!0,emitEvent:r.emitEvent})}),this.updateValueAndValidity(r)}patchValue(e,r={}){e!=null&&(Object.keys(e).forEach(t=>{let n=this.controls[t];n&&n.patchValue(e[t],{onlySelf:!0,emitEvent:r.emitEvent})}),this.updateValueAndValidity(r))}reset(e={},r={}){this._forEachChild((t,n)=>{t.reset(e?e[n]:null,{onlySelf:!0,emitEvent:r.emitEvent})}),this._updatePristine(r),this._updateTouched(r),this.updateValueAndValidity(r)}getRawValue(){return this._reduceChildren({},(e,r,t)=>(e[t]=r.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(r,t)=>t._syncPendingControls()?!0:r);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(r=>{let t=this.controls[r];t&&e(t,r)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(let[r,t]of Object.entries(this.controls))if(this.contains(r)&&e(t))return!0;return!1}_reduceValue(){let e={};return this._reduceChildren(e,(r,t,n)=>((t.enabled||this.disabled)&&(r[n]=t.value),r))}_reduceChildren(e,r){let t=e;return this._forEachChild((n,s)=>{t=r(t,n,s)}),t}_allControlsDisabled(){for(let e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(e){return this.controls.hasOwnProperty(e)?this.controls[e]:null}};var x=new _("CallSetDisabledState",{providedIn:"root",factory:()=>Y}),Y="always";function ut(i,e){return[...e.path,i]}function q(i,e,r=Y){se(i,e),e.valueAccessor.writeValue(i.value),(i.disabled||r==="always")&&e.valueAccessor.setDisabledState?.(i.disabled),ct(i,e),ft(i,e),ht(i,e),dt(i,e)}function me(i,e,r=!0){let t=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(t),e.valueAccessor.registerOnTouched(t)),Z(i,e),i&&(e._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function z(i,e){i.forEach(r=>{r.registerOnValidatorChange&&r.registerOnValidatorChange(e)})}function dt(i,e){if(e.valueAccessor.setDisabledState){let r=t=>{e.valueAccessor.setDisabledState(t)};i.registerOnDisabledChange(r),e._registerOnDestroy(()=>{i._unregisterOnDisabledChange(r)})}}function se(i,e){let r=xe(i);e.validator!==null?i.setValidators(fe(r,e.validator)):typeof r=="function"&&i.setValidators([r]);let t=ke(i);e.asyncValidator!==null?i.setAsyncValidators(fe(t,e.asyncValidator)):typeof t=="function"&&i.setAsyncValidators([t]);let n=()=>i.updateValueAndValidity();z(e._rawValidators,n),z(e._rawAsyncValidators,n)}function Z(i,e){let r=!1;if(i!==null){if(e.validator!==null){let n=xe(i);if(Array.isArray(n)&&n.length>0){let s=n.filter(o=>o!==e.validator);s.length!==n.length&&(r=!0,i.setValidators(s))}}if(e.asyncValidator!==null){let n=ke(i);if(Array.isArray(n)&&n.length>0){let s=n.filter(o=>o!==e.asyncValidator);s.length!==n.length&&(r=!0,i.setAsyncValidators(s))}}}let t=()=>{};return z(e._rawValidators,t),z(e._rawAsyncValidators,t),r}function ct(i,e){e.valueAccessor.registerOnChange(r=>{i._pendingValue=r,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&Te(i,e)})}function ht(i,e){e.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&Te(i,e),i.updateOn!=="submit"&&i.markAsTouched()})}function Te(i,e){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function ft(i,e){let r=(t,n)=>{e.valueAccessor.writeValue(t),n&&e.viewToModelUpdate(t)};i.registerOnChange(r),e._registerOnDestroy(()=>{i._unregisterOnChange(r)})}function Be(i,e){i==null,se(i,e)}function pt(i,e){return Z(i,e)}function gt(i,e){if(!i.hasOwnProperty("model"))return!1;let r=i.model;return r.isFirstChange()?!0:!Object.is(e,r.currentValue)}function mt(i){return Object.getPrototypeOf(i.constructor)===P}function Ue(i,e){i._syncPendingControls(),e.forEach(r=>{let t=r.control;t.updateOn==="submit"&&t._pendingChange&&(r.viewToModelUpdate(t._pendingValue),t._pendingChange=!1)})}function yt(i,e){if(!e)return null;Array.isArray(e);let r,t,n;return e.forEach(s=>{s.constructor===De?r=s:mt(s)?t=s:n=s}),n||t||r||null}function vt(i,e){let r=i.indexOf(e);r>-1&&i.splice(r,1)}var _t={provide:v,useExisting:c(()=>Ct)},O=(()=>Promise.resolve())(),Ct=(()=>{let e=class e extends v{constructor(t,n,s){super(),this.callSetDisabledState=s,this.submitted=!1,this._directives=new Set,this.ngSubmit=new V,this.form=new W({},ne(t),re(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){O.then(()=>{let n=this._findContainer(t.path);t.control=n.registerControl(t.name,t.control),q(t.control,t,this.callSetDisabledState),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){O.then(()=>{let n=this._findContainer(t.path);n&&n.removeControl(t.name),this._directives.delete(t)})}addFormGroup(t){O.then(()=>{let n=this._findContainer(t.path),s=new W({});Be(s,t),n.registerControl(t.name,s),s.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){O.then(()=>{let n=this._findContainer(t.path);n&&n.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,n){O.then(()=>{this.form.get(t.path).setValue(n)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,Ue(this.form,this._directives),this.ngSubmit.emit(t),t?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}};e.\u0275fac=function(n){return new(n||e)(a(A,10),a(ie,10),a(x,8))},e.\u0275dir=u({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(n,s){n&1&&m("submit",function(l){return s.onSubmit(l)})("reset",function(){return s.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[h([_t]),d]});let i=e;return i})();function ye(i,e){let r=i.indexOf(e);r>-1&&i.splice(r,1)}function ve(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var Re=class extends ${constructor(e=null,r,t){super(Ge(r),je(t,r)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(e),this._setUpdateStrategy(r),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),X(r)&&(r.nonNullable||r.initialValueIsDefault)&&(ve(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,r={}){this.value=this._pendingValue=e,this._onChange.length&&r.emitModelToViewChange!==!1&&this._onChange.forEach(t=>t(this.value,r.emitViewToModelChange!==!1)),this.updateValueAndValidity(r)}patchValue(e,r={}){this.setValue(e,r)}reset(e=this.defaultValue,r={}){this._applyFormState(e),this.markAsPristine(r),this.markAsUntouched(r),this.setValue(this.value,r),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){ye(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){ye(this._onDisabledChange,e)}_forEachChild(e){}_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(e){ve(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}};var Vt=i=>i instanceof Re;var Dt={provide:N,useExisting:c(()=>bt)},_e=(()=>Promise.resolve())(),bt=(()=>{let e=class e extends N{constructor(t,n,s,o,l,f){super(),this._changeDetectorRef=l,this.callSetDisabledState=f,this.control=new Re,this._registered=!1,this.name="",this.update=new V,this._parent=t,this._setValidators(n),this._setAsyncValidators(s),this.valueAccessor=yt(this,o)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){let n=t.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),gt(t,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(t){this.viewModel=t,this.update.emit(t)}_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(){q(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(t){_e.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let n=t.isDisabled.currentValue,s=n!==0&&T(n);_e.then(()=>{s&&!this.control.disabled?this.control.disable():!s&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?ut(t,this._parent):[t]}};e.\u0275fac=function(n){return new(n||e)(a(v,9),a(A,10),a(ie,10),a(b,10),a(de,8),a(x,8))},e.\u0275dir=u({type:e,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[h([Dt]),d,j]});let i=e;return i})(),di=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=u({type:e,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]});let i=e;return i})(),At={provide:b,useExisting:c(()=>Mt),multi:!0},Mt=(()=>{let e=class e extends P{writeValue(t){let n=t??"";this.setProperty("value",n)}registerOnChange(t){this.onChange=n=>{t(n==""?null:parseFloat(n))}}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(n,s){n&1&&m("input",function(l){return s.onChange(l.target.value)})("blur",function(){return s.onTouched()})},features:[h([At]),d]});let i=e;return i})();var Et=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=E({type:e}),e.\u0275inj=M({});let i=e;return i})();var Ft=new _("NgModelWithFormControlWarning");var wt={provide:v,useExisting:c(()=>It)},It=(()=>{let e=class e extends v{constructor(t,n,s){super(),this.callSetDisabledState=s,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new V,this._setValidators(t),this._setAsyncValidators(n)}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Z(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){let n=this.form.get(t.path);return q(n,t,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),n}getControl(t){return this.form.get(t.path)}removeControl(t){me(t.control||null,t,!1),vt(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,n){this.form.get(t.path).setValue(n)}onSubmit(t){return this.submitted=!0,Ue(this.form,this.directives),this.ngSubmit.emit(t),t?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{let n=t.control,s=this.form.get(t.path);n!==s&&(me(n||null,t),Vt(s)&&(q(s,t,this.callSetDisabledState),t.control=s))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){let n=this.form.get(t.path);Be(n,t),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){let n=this.form.get(t.path);n&&pt(n,t)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){se(this.form,this),this._oldForm&&Z(this._oldForm,this)}_checkFormPresent(){this.form}};e.\u0275fac=function(n){return new(n||e)(a(A,10),a(ie,10),a(x,8))},e.\u0275dir=u({type:e,selectors:[["","formGroup",""]],hostBindings:function(n,s){n&1&&m("submit",function(l){return s.onSubmit(l)})("reset",function(){return s.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[h([wt]),d,j]});let i=e;return i})();var St={provide:b,useExisting:c(()=>Le),multi:!0};function He(i,e){return i==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function Ot(i){return i.split(":")[0]}var Le=(()=>{let e=class e extends P{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){this.value=t;let n=this._getOptionId(t),s=He(n,t);this.setProperty("value",s)}registerOnChange(t){this.onChange=n=>{this.value=this._getOptionValue(n),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n),t))return n;return null}_getOptionValue(t){let n=Ot(t);return this._optionMap.has(n)?this._optionMap.get(n):t}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(n,s){n&1&&m("change",function(l){return s.onChange(l.target.value)})("blur",function(){return s.onTouched()})},inputs:{compareWith:"compareWith"},features:[h([St]),d]});let i=e;return i})(),ci=(()=>{let e=class e{constructor(t,n,s){this._element=t,this._renderer=n,this._select=s,this._select&&(this.id=this._select._registerOption())}set ngValue(t){this._select!=null&&(this._select._optionMap.set(this.id,t),this._setElementValue(He(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._setElementValue(t),this._select&&this._select.writeValue(this._select.value)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}};e.\u0275fac=function(n){return new(n||e)(a(F),a(w),a(Le,9))},e.\u0275dir=u({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}});let i=e;return i})(),Nt={provide:b,useExisting:c(()=>$e),multi:!0};function Ce(i,e){return i==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function Pt(i){return i.split(":")[0]}var $e=(()=>{let e=class e extends P{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){this.value=t;let n;if(Array.isArray(t)){let s=t.map(o=>this._getOptionId(o));n=(o,l)=>{o._setSelected(s.indexOf(l.toString())>-1)}}else n=(s,o)=>{s._setSelected(!1)};this._optionMap.forEach(n)}registerOnChange(t){this.onChange=n=>{let s=[],o=n.selectedOptions;if(o!==void 0){let l=o;for(let f=0;f<l.length;f++){let k=l[f],K=this._getOptionValue(k.value);s.push(K)}}else{let l=n.options;for(let f=0;f<l.length;f++){let k=l[f];if(k.selected){let K=this._getOptionValue(k.value);s.push(K)}}}this.value=s,t(s)}}_registerOption(t){let n=(this._idCounter++).toString();return this._optionMap.set(n,t),n}_getOptionId(t){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n)._value,t))return n;return null}_getOptionValue(t){let n=Pt(t);return this._optionMap.has(n)?this._optionMap.get(n)._value:t}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(n,s){n&1&&m("change",function(l){return s.onChange(l.target)})("blur",function(){return s.onTouched()})},inputs:{compareWith:"compareWith"},features:[h([Nt]),d]});let i=e;return i})(),hi=(()=>{let e=class e{constructor(t,n,s){this._element=t,this._renderer=n,this._select=s,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){this._select!=null&&(this._value=t,this._setElementValue(Ce(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(Ce(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}};e.\u0275fac=function(n){return new(n||e)(a(F),a(w),a($e,9))},e.\u0275dir=u({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}});let i=e;return i})();var oe=(()=>{let e=class e{constructor(){this._validator=U}ngOnChanges(t){if(this.inputName in t){let n=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(n),this._validator=this._enabled?this.createValidator(n):U,this._onChange&&this._onChange()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return t!=null}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=u({type:e,features:[j]});let i=e;return i})();var xt={provide:A,useExisting:c(()=>kt),multi:!0};var kt=(()=>{let e=class e extends oe{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=T,this.createValidator=t=>Ae}enabled(t){return t}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(n,s){n&2&&J("required",s._enabled?"":null)},inputs:{required:"required"},features:[h([xt]),d]});let i=e;return i})();var Gt={provide:A,useExisting:c(()=>jt),multi:!0},jt=(()=>{let e=class e extends oe{constructor(){super(...arguments),this.inputName="email",this.normalizeInput=T,this.createValidator=t=>Me}enabled(t){return t}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["","email","","formControlName",""],["","email","","formControl",""],["","email","","ngModel",""]],inputs:{email:"email"},features:[h([Gt]),d]});let i=e;return i})();var Tt={provide:A,useExisting:c(()=>Bt),multi:!0},Bt=(()=>{let e=class e extends oe{constructor(){super(...arguments),this.inputName="pattern",this.normalizeInput=t=>t,this.createValidator=t=>Ee(t)}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(n,s){n&2&&J("pattern",s._enabled?s.pattern:null)},inputs:{pattern:"pattern"},features:[h([Tt]),d]});let i=e;return i})();var We=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=E({type:e}),e.\u0275inj=M({imports:[Et]});let i=e;return i})();var fi=(()=>{let e=class e{static withConfig(t){return{ngModule:e,providers:[{provide:x,useValue:t.callSetDisabledState??Y}]}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=E({type:e}),e.\u0275inj=M({imports:[We]});let i=e;return i})(),pi=(()=>{let e=class e{static withConfig(t){return{ngModule:e,providers:[{provide:Ft,useValue:t.warnOnNgModelWithFormControl??"always"},{provide:x,useValue:t.callSetDisabledState??Y}]}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=E({type:e}),e.\u0275inj=M({imports:[We]});let i=e;return i})();export{b as a,ze as b,De as c,A as d,he as e,v as f,N as g,ai as h,li as i,Ct as j,bt as k,di as l,Mt as m,It as n,Le as o,ci as p,hi as q,kt as r,jt as s,Bt as t,fi as u,pi as v};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as St}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-V3UGRPNZ.js";import{a as Dt,b as We,c as xt,d as Pt,e as Ue,f as Rt,g as Ve,h as Ot,i as de,j as Ke,k as R}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-FTHNPPXM.js";import{b as Le,c as ue,d as jt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-VXL3UMDN.js";import{$ as b,$a as P,A as ht,B as pt,Ba as Tt,Cc as Et,Dc as $e,Ga as g,Gc as Te,Ha as J,Hc as be,I as Se,Jc as ze,Ma as F,N as ft,Pa as re,Pb as wt,Q as ke,Qa as I,Qb as yt,Ra as se,Sb as ve,T as B,Ta as H,U as Ee,Ub as Be,Wa as ae,X as oe,Yb as Fe,aa as W,ab as L,b as m,ba as S,bb as ce,bc as He,c as x,ca as h,cb as Oe,da as ee,db as je,ea as De,fa as U,fb as Me,g as lt,h as ut,hb as bt,ic as _t,ja as xe,jb as le,jc as Ct,k as Z,ka as Pe,kc as It,l as Q,lb as k,m as z,n as ie,pa as mt,q as M,r as dt,ra as gt,rb as $,ta as ge,tb as X,tc as At,va as te,wb as Ne,xc as kt,ya as vt,za as Re}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-P24WVMWI.js";import{a as C,b as Y,h as D}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-PUBPICPK.js";var Mt={production:!0,version:"3.10.1",firebaseConfig:{apiKey:"AIzaSyDnnitFXpM8TglWKNpzu4ChgF98n25Rgvw",authDomain:"auth.dealpos.com",projectId:"devops-signin",storageBucket:"devops-signin.appspot.com",messagingSenderId:"412465165194",appId:"1:412465165194:web:03d806f6b6ab6f8b460e73",measurementId:"G-MNDBRJ5XZD"},news:"https://changelog.dealpos.app/umbraco/delivery/api/v1/content?fetch=children:omni&sort=sortOrder:asc"};var Nt=(()=>{let o=class o{constructor(){}getParseToken(){let e=JSON.parse(window.localStorage.getItem("user"));return this.ParseToken(e.Token.access_token)}GetRoles(){let n=this.getParseToken()["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"];return n||[]}ParseToken(e){try{let r=e.split(".")[0].replace("-","+").replace("_","/"),s=JSON.parse(window.atob(r)),c=e.split(".")[1].replace("-","+").replace("_","/"),l=JSON.parse(window.atob(c));return l.header=s,l}catch{return!1}}};o.\u0275fac=function(n){return new(n||o)},o.\u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var Bt=["toast-component",""];function ln(i,o){if(i&1){let t=Me();P(0,"button",5),le("click",function(){xe(t);let n=k();return Pe(n.remove())}),P(1,"span",6),$(2,"\xD7"),L()()}}function un(i,o){if(i&1&&(Oe(0),$(1),je()),i&2){let t=k(2);g(1),X("[",t.duplicatesCount+1,"]")}}function dn(i,o){if(i&1&&(P(0,"div"),$(1),ae(2,un,2,1,"ng-container",4),L()),i&2){let t=k();H(t.options.titleClass),re("aria-label",t.title),g(1),X(" ",t.title," "),g(1),I("ngIf",t.duplicatesCount)}}function hn(i,o){if(i&1&&ce(0,"div",7),i&2){let t=k();H(t.options.messageClass),I("innerHTML",t.message,Re)}}function pn(i,o){if(i&1&&(P(0,"div",8),$(1),L()),i&2){let t=k();H(t.options.messageClass),re("aria-label",t.message),g(1),X(" ",t.message," ")}}function fn(i,o){if(i&1&&(P(0,"div"),ce(1,"div",9),L()),i&2){let t=k();g(1),se("width",t.width+"%")}}function mn(i,o){if(i&1){let t=Me();P(0,"button",5),le("click",function(){xe(t);let n=k();return Pe(n.remove())}),P(1,"span",6),$(2,"\xD7"),L()()}}function gn(i,o){if(i&1&&(Oe(0),$(1),je()),i&2){let t=k(2);g(1),X("[",t.duplicatesCount+1,"]")}}function vn(i,o){if(i&1&&(P(0,"div"),$(1),ae(2,gn,2,1,"ng-container",4),L()),i&2){let t=k();H(t.options.titleClass),re("aria-label",t.title),g(1),X(" ",t.title," "),g(1),I("ngIf",t.duplicatesCount)}}function Tn(i,o){if(i&1&&ce(0,"div",7),i&2){let t=k();H(t.options.messageClass),I("innerHTML",t.message,Re)}}function bn(i,o){if(i&1&&(P(0,"div",8),$(1),L()),i&2){let t=k();H(t.options.messageClass),re("aria-label",t.message),g(1),X(" ",t.message," ")}}function wn(i,o){if(i&1&&(P(0,"div"),ce(1,"div",9),L()),i&2){let t=k();g(1),se("width",t.width+"%")}}var qe=class{_attachedHost;component;viewContainerRef;injector;constructor(o,t){this.component=o,this.injector=t}attach(o,t){return this._attachedHost=o,o.attach(this,t)}detach(){let o=this._attachedHost;if(o)return this._attachedHost=void 0,o.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(o){this._attachedHost=o}},Ge=class{_attachedPortal;_disposeFn;attach(o,t){return this._attachedPortal=o,this.attachComponentPortal(o,t)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(o){this._disposeFn=o}},Ze=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new x;_activate=new x;_manualClose=new x;_resetTimeout=new x;_countDuplicate=new x;constructor(o){this._overlayRef=o}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(o,t){o&&this._resetTimeout.next(),t&&this._countDuplicate.next(++this.duplicatesCount)}},ne=class{toastId;config;message;title;toastType;toastRef;_onTap=new x;_onAction=new x;constructor(o,t,e,n,r,s){this.toastId=o,this.config=t,this.message=e,this.title=n,this.toastType=r,this.toastRef=s,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(o){this._onAction.next(o)}onAction(){return this._onAction.asObservable()}},Ft={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing"},Ht=new S("ToastConfig"),Je=class extends Ge{_hostDomElement;_componentFactoryResolver;_appRef;constructor(o,t,e){super(),this._hostDomElement=o,this._componentFactoryResolver=t,this._appRef=e}attachComponentPortal(o,t){let e=this._componentFactoryResolver.resolveComponentFactory(o.component),n;return n=e.create(o.injector),this._appRef.attachView(n.hostView),this.setDisposeFn(()=>{this._appRef.detachView(n.hostView),n.destroy()}),t?this._hostDomElement.insertBefore(this._getComponentRootNode(n),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(n)),n}_getComponentRootNode(o){return o.hostView.rootNodes[0]}},yn=(()=>{class i{_document=ee(Fe);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let t=this._document.createElement("div");t.classList.add("overlay-container"),t.setAttribute("aria-live","polite"),this._document.body.appendChild(t),this._containerElement=t}static \u0275fac=function(e){return new(e||i)};static \u0275prov=b({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Xe=class{_portalHost;constructor(o){this._portalHost=o}attach(o,t=!0){return this._portalHost.attach(o,t)}detach(){return this._portalHost.detach()}},_n=(()=>{class i{_overlayContainer=ee(yn);_componentFactoryResolver=ee(Tt);_appRef=ee(ve);_document=ee(Fe);_paneElements=new Map;create(t,e){return this._createOverlayRef(this.getPaneElement(t,e))}getPaneElement(t="",e){return this._paneElements.get(e)||this._paneElements.set(e,{}),this._paneElements.get(e)[t]||(this._paneElements.get(e)[t]=this._createPaneElement(t,e)),this._paneElements.get(e)[t]}_createPaneElement(t,e){let n=this._document.createElement("div");return n.id="toast-container",n.classList.add(t),n.classList.add("toast-container"),e?e.getContainerElement().appendChild(n):this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalHost(t){return new Je(t,this._componentFactoryResolver,this._appRef)}_createOverlayRef(t){return new Xe(this._createPortalHost(t))}static \u0275fac=function(e){return new(e||i)};static \u0275prov=b({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Lt=(()=>{class i{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(t,e,n,r,s){this.overlay=e,this._injector=n,this.sanitizer=r,this.ngZone=s,this.toastrConfig=C(C({},t.default),t.config),t.config.iconClasses&&(this.toastrConfig.iconClasses=C(C({},t.default.iconClasses),t.config.iconClasses))}show(t,e,n={},r=""){return this._preBuildNotification(r,t,e,this.applyConfig(n))}success(t,e,n={}){let r=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(r,t,e,this.applyConfig(n))}error(t,e,n={}){let r=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(r,t,e,this.applyConfig(n))}info(t,e,n={}){let r=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(r,t,e,this.applyConfig(n))}warning(t,e,n={}){let r=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(r,t,e,this.applyConfig(n))}clear(t){for(let e of this.toasts)if(t!==void 0){if(e.toastId===t){e.toastRef.manualClose();return}}else e.toastRef.manualClose()}remove(t){let e=this._findToast(t);if(!e||(e.activeToast.toastRef.close(),this.toasts.splice(e.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){let n=this.toasts[this.currentlyActive].toastRef;n.isInactive()||(this.currentlyActive=this.currentlyActive+1,n.activate())}return!0}findDuplicate(t="",e="",n,r){let{includeTitleDuplicates:s}=this.toastrConfig;for(let a of this.toasts){let c=s&&a.title===t;if((!s||c)&&a.message===e)return a.toastRef.onDuplicate(n,r),a}return null}applyConfig(t={}){return C(C({},this.toastrConfig),t)}_findToast(t){for(let e=0;e<this.toasts.length;e++)if(this.toasts[e].toastId===t)return{index:e,activeToast:this.toasts[e]};return null}_preBuildNotification(t,e,n,r){return r.onActivateTick?this.ngZone.run(()=>this._buildNotification(t,e,n,r)):this._buildNotification(t,e,n,r)}_buildNotification(t,e,n,r){if(!r.toastComponent)throw new Error("toastComponent required");let s=this.findDuplicate(n,e,this.toastrConfig.resetTimeoutOnDuplicate&&r.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&n||e)&&this.toastrConfig.preventDuplicates&&s!==null)return s;this.previousToastMessage=e;let a=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(a=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let c=this.overlay.create(r.positionClass,this.overlayContainer);this.index=this.index+1;let l=e;e&&r.enableHtml&&(l=this.sanitizer.sanitize(vt.HTML,e));let d=new Ze(c),u=new ne(this.index,r,l,n,t,d),p=[{provide:ne,useValue:u}],f=ge.create({providers:p,parent:this._injector}),q=new qe(r.toastComponent,f),j=c.attach(q,r.newestOnTop);d.componentInstance=j.instance;let A={toastId:this.index,title:n||"",message:e||"",toastRef:d,onShown:d.afterActivate(),onHidden:d.afterClosed(),onTap:u.onTap(),onAction:u.onAction(),portal:j};return a||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{A.toastRef.activate()})),this.toasts.push(A),A}static \u0275fac=function(e){return new(e||i)(h(Ht),h(_n),h(ge),h(At),h(F))};static \u0275prov=b({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Cn=(()=>{class i{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=-1;toastClasses="";state;get displayStyle(){if(this.state.value==="inactive")return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,n){this.toastrService=t,this.toastPackage=e,this.ngZone=n,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(r=>{this.duplicatesCount=r}),this.state={value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}}}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state=Y(C({},this.state),{value:"active"}),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(this.width===0||this.width===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width=e/this.options.timeOut*100,this.options.progressAnimation==="increasing"&&(this.width=100-this.width),this.width<=0&&(this.width=0),this.width>=100&&(this.width=100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state=Y(C({},this.state),{value:"active"}),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){this.state.value!=="removed"&&(clearTimeout(this.timeout),this.state=Y(C({},this.state),{value:"removed"}),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){this.state.value!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state.value!=="removed"&&this.options.disableTimeOut!=="extendedTimeOut"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width=0)}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state.value==="removed"||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(t),e)):this.timeout=setTimeout(()=>t(),e)}outsideInterval(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(t),e)):this.intervalId=setInterval(()=>t(),e)}runInsideAngular(t){this.ngZone?this.ngZone.run(()=>t()):t()}static \u0275fac=function(e){return new(e||i)(J(Lt),J(ne),J(F))};static \u0275cmp=De({type:i,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(e,n){e&1&&le("click",function(){return n.tapToast()})("mouseenter",function(){return n.stickAround()})("mouseleave",function(){return n.delayedHideToast()}),e&2&&(bt("@flyInOut",n.state),H(n.toastClasses),se("display",n.displayStyle))},standalone:!0,features:[Ne],attrs:Bt,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,n){e&1&&ae(0,ln,3,0,"button",0)(1,dn,3,5,"div",1)(2,hn,1,3,"div",2)(3,pn,2,4,"div",3)(4,fn,2,2,"div",4),e&2&&(I("ngIf",n.options.closeButton),g(1),I("ngIf",n.title),g(1),I("ngIf",n.message&&n.options.enableHtml),g(1),I("ngIf",n.message&&!n.options.enableHtml),g(1),I("ngIf",n.options.progressBar))},dependencies:[He],encapsulation:2,data:{animation:[Et("flyInOut",[be("inactive",Te({opacity:0})),be("active",Te({opacity:1})),be("removed",Te({opacity:0})),ze("inactive => active",$e("{{ easeTime }}ms {{ easing }}")),ze("active => removed",$e("{{ easeTime }}ms {{ easing }}"))])]}})}return i})(),In=Y(C({},Ft),{toastComponent:Cn}),An=(i={})=>gt([{provide:Ht,useValue:{default:In,config:i}}]),zi=(()=>{class i{static forRoot(t={}){return{ngModule:i,providers:[An(t)]}}static \u0275fac=function(e){return new(e||i)};static \u0275mod=U({type:i});static \u0275inj=W({})}return i})();var Sn=(()=>{class i{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=-1;toastClasses="";get displayStyle(){return this.state==="inactive"?"none":null}state="inactive";timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,n){this.toastrService=t,this.toastPackage=e,this.appRef=n,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(r=>{this.duplicatesCount=r})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state="active",!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.timeout=setTimeout(()=>{this.remove()},this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))),this.options.onActivateTick&&this.appRef.tick()}updateProgress(){if(this.width===0||this.width===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width=e/this.options.timeOut*100,this.options.progressAnimation==="increasing"&&(this.width=100-this.width),this.width<=0&&(this.width=0),this.width>=100&&(this.width=100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state="active",this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=new Date().getTime()+(this.originalTimeout||0),this.width=-1,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){this.state!=="removed"&&(clearTimeout(this.timeout),this.state="removed",this.timeout=setTimeout(()=>this.toastrService.remove(this.toastPackage.toastId)))}tapToast(){this.state!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state!=="removed"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width=0)}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state==="removed"||(this.timeout=setTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}static \u0275fac=function(e){return new(e||i)(J(Lt),J(ne),J(ve))};static \u0275cmp=De({type:i,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(e,n){e&1&&le("click",function(){return n.tapToast()})("mouseenter",function(){return n.stickAround()})("mouseleave",function(){return n.delayedHideToast()}),e&2&&(H(n.toastClasses),se("display",n.displayStyle))},standalone:!0,features:[Ne],attrs:Bt,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,n){e&1&&ae(0,mn,3,0,"button",0)(1,vn,3,5,"div",1)(2,Tn,1,3,"div",2)(3,bn,2,4,"div",3)(4,wn,2,2,"div",4),e&2&&(I("ngIf",n.options.closeButton),g(1),I("ngIf",n.title),g(1),I("ngIf",n.message&&n.options.enableHtml),g(1),I("ngIf",n.message&&!n.options.enableHtml),g(1),I("ngIf",n.options.progressBar))},dependencies:[He],encapsulation:2})}return i})(),Wi=Y(C({},Ft),{toastComponent:Sn});var kn="firebase",En="10.7.1";de(kn,En,"app");var pe=new wt("ANGULARFIRE2_VERSION");var Dn=(i,o)=>{let t=o?[o]:Ot(),e=[];return t.forEach(n=>{n.container.getProvider(i).instances.forEach(s=>{e.includes(s)||e.push(s)})}),e},he=class{constructor(){return Dn(xn)}},xn="app-check";function Ye(){}var we=class{zone;delegate;constructor(o,t=ut){this.zone=o,this.delegate=t}now(){return this.delegate.now()}schedule(o,t,e){let n=this.zone,r=function(s){n.runGuarded(()=>{o.apply(this,[s])})};return this.delegate.schedule(r,t,e)}},Qe=class{zone;task=null;constructor(o){this.zone=o}call(o,t){let e=this.unscheduleTask.bind(this);return this.task=this.zone.run(()=>Zone.current.scheduleMacroTask("firebaseZoneBlock",Ye,{},Ye,Ye)),t.pipe(oe({next:e,complete:e,error:e})).subscribe(o).add(e)}unscheduleTask(){setTimeout(()=>{this.task!=null&&this.task.state==="scheduled"&&(this.task.invoke(),this.task=null)},10)}},$t=(()=>{class i{ngZone;outsideAngular;insideAngular;constructor(t){this.ngZone=t,this.outsideAngular=t.runOutsideAngular(()=>new we(Zone.current)),this.insideAngular=t.run(()=>new we(Zone.current,lt)),globalThis.\u0275AngularFireScheduler||=this}static \u0275fac=function(e){return new(e||i)(h(F))};static \u0275prov=b({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function Pn(){let i=globalThis.\u0275AngularFireScheduler;if(!i)throw new Error(`Either AngularFireModule has not been provided in your AppModule (this can be done manually or implictly using
|
|
1
|
+
import{a as St}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.3/Marketplace/chunk-E3GZ25PR.js";import{a as Dt,b as We,c as xt,d as Pt,e as Ue,f as Rt,g as Ve,h as Ot,i as de,j as Ke,k as R}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.3/Marketplace/chunk-MXRTBC2I.js";import{b as Le,c as ue,d as jt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.3/Marketplace/chunk-4RHNT4DZ.js";import{$ as b,$a as P,A as ht,B as pt,Ba as Tt,Cc as Et,Dc as $e,Ga as g,Gc as Te,Ha as J,Hc as be,I as Se,Jc as ze,Ma as F,N as ft,Pa as re,Pb as wt,Q as ke,Qa as I,Qb as yt,Ra as se,Sb as ve,T as B,Ta as H,U as Ee,Ub as Be,Wa as ae,X as oe,Yb as Fe,aa as W,ab as L,b as m,ba as S,bb as ce,bc as He,c as x,ca as h,cb as Oe,da as ee,db as je,ea as De,fa as U,fb as Me,g as lt,h as ut,hb as bt,ic as _t,ja as xe,jb as le,jc as Ct,k as Z,ka as Pe,kc as It,l as Q,lb as k,m as z,n as ie,pa as mt,q as M,r as dt,ra as gt,rb as $,ta as ge,tb as X,tc as At,va as te,wb as Ne,xc as kt,ya as vt,za as Re}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.3/Marketplace/chunk-YNZUWVLD.js";import{a as C,b as Y,h as D}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.3/Marketplace/chunk-QMX3UB7H.js";var Mt={production:!0,version:"3.10.3",firebaseConfig:{apiKey:"AIzaSyDnnitFXpM8TglWKNpzu4ChgF98n25Rgvw",authDomain:"auth.dealpos.com",projectId:"devops-signin",storageBucket:"devops-signin.appspot.com",messagingSenderId:"412465165194",appId:"1:412465165194:web:03d806f6b6ab6f8b460e73",measurementId:"G-MNDBRJ5XZD"},news:"https://changelog.dealpos.app/umbraco/delivery/api/v1/content?fetch=children:omni&sort=sortOrder:asc"};var Nt=(()=>{let o=class o{constructor(){}getParseToken(){let e=JSON.parse(window.localStorage.getItem("user"));return this.ParseToken(e.Token.access_token)}GetRoles(){let n=this.getParseToken()["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"];return n||[]}ParseToken(e){try{let r=e.split(".")[0].replace("-","+").replace("_","/"),s=JSON.parse(window.atob(r)),c=e.split(".")[1].replace("-","+").replace("_","/"),l=JSON.parse(window.atob(c));return l.header=s,l}catch{return!1}}};o.\u0275fac=function(n){return new(n||o)},o.\u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var Bt=["toast-component",""];function ln(i,o){if(i&1){let t=Me();P(0,"button",5),le("click",function(){xe(t);let n=k();return Pe(n.remove())}),P(1,"span",6),$(2,"\xD7"),L()()}}function un(i,o){if(i&1&&(Oe(0),$(1),je()),i&2){let t=k(2);g(1),X("[",t.duplicatesCount+1,"]")}}function dn(i,o){if(i&1&&(P(0,"div"),$(1),ae(2,un,2,1,"ng-container",4),L()),i&2){let t=k();H(t.options.titleClass),re("aria-label",t.title),g(1),X(" ",t.title," "),g(1),I("ngIf",t.duplicatesCount)}}function hn(i,o){if(i&1&&ce(0,"div",7),i&2){let t=k();H(t.options.messageClass),I("innerHTML",t.message,Re)}}function pn(i,o){if(i&1&&(P(0,"div",8),$(1),L()),i&2){let t=k();H(t.options.messageClass),re("aria-label",t.message),g(1),X(" ",t.message," ")}}function fn(i,o){if(i&1&&(P(0,"div"),ce(1,"div",9),L()),i&2){let t=k();g(1),se("width",t.width+"%")}}function mn(i,o){if(i&1){let t=Me();P(0,"button",5),le("click",function(){xe(t);let n=k();return Pe(n.remove())}),P(1,"span",6),$(2,"\xD7"),L()()}}function gn(i,o){if(i&1&&(Oe(0),$(1),je()),i&2){let t=k(2);g(1),X("[",t.duplicatesCount+1,"]")}}function vn(i,o){if(i&1&&(P(0,"div"),$(1),ae(2,gn,2,1,"ng-container",4),L()),i&2){let t=k();H(t.options.titleClass),re("aria-label",t.title),g(1),X(" ",t.title," "),g(1),I("ngIf",t.duplicatesCount)}}function Tn(i,o){if(i&1&&ce(0,"div",7),i&2){let t=k();H(t.options.messageClass),I("innerHTML",t.message,Re)}}function bn(i,o){if(i&1&&(P(0,"div",8),$(1),L()),i&2){let t=k();H(t.options.messageClass),re("aria-label",t.message),g(1),X(" ",t.message," ")}}function wn(i,o){if(i&1&&(P(0,"div"),ce(1,"div",9),L()),i&2){let t=k();g(1),se("width",t.width+"%")}}var qe=class{_attachedHost;component;viewContainerRef;injector;constructor(o,t){this.component=o,this.injector=t}attach(o,t){return this._attachedHost=o,o.attach(this,t)}detach(){let o=this._attachedHost;if(o)return this._attachedHost=void 0,o.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(o){this._attachedHost=o}},Ge=class{_attachedPortal;_disposeFn;attach(o,t){return this._attachedPortal=o,this.attachComponentPortal(o,t)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(o){this._disposeFn=o}},Ze=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new x;_activate=new x;_manualClose=new x;_resetTimeout=new x;_countDuplicate=new x;constructor(o){this._overlayRef=o}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(o,t){o&&this._resetTimeout.next(),t&&this._countDuplicate.next(++this.duplicatesCount)}},ne=class{toastId;config;message;title;toastType;toastRef;_onTap=new x;_onAction=new x;constructor(o,t,e,n,r,s){this.toastId=o,this.config=t,this.message=e,this.title=n,this.toastType=r,this.toastRef=s,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(o){this._onAction.next(o)}onAction(){return this._onAction.asObservable()}},Ft={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing"},Ht=new S("ToastConfig"),Je=class extends Ge{_hostDomElement;_componentFactoryResolver;_appRef;constructor(o,t,e){super(),this._hostDomElement=o,this._componentFactoryResolver=t,this._appRef=e}attachComponentPortal(o,t){let e=this._componentFactoryResolver.resolveComponentFactory(o.component),n;return n=e.create(o.injector),this._appRef.attachView(n.hostView),this.setDisposeFn(()=>{this._appRef.detachView(n.hostView),n.destroy()}),t?this._hostDomElement.insertBefore(this._getComponentRootNode(n),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(n)),n}_getComponentRootNode(o){return o.hostView.rootNodes[0]}},yn=(()=>{class i{_document=ee(Fe);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let t=this._document.createElement("div");t.classList.add("overlay-container"),t.setAttribute("aria-live","polite"),this._document.body.appendChild(t),this._containerElement=t}static \u0275fac=function(e){return new(e||i)};static \u0275prov=b({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Xe=class{_portalHost;constructor(o){this._portalHost=o}attach(o,t=!0){return this._portalHost.attach(o,t)}detach(){return this._portalHost.detach()}},_n=(()=>{class i{_overlayContainer=ee(yn);_componentFactoryResolver=ee(Tt);_appRef=ee(ve);_document=ee(Fe);_paneElements=new Map;create(t,e){return this._createOverlayRef(this.getPaneElement(t,e))}getPaneElement(t="",e){return this._paneElements.get(e)||this._paneElements.set(e,{}),this._paneElements.get(e)[t]||(this._paneElements.get(e)[t]=this._createPaneElement(t,e)),this._paneElements.get(e)[t]}_createPaneElement(t,e){let n=this._document.createElement("div");return n.id="toast-container",n.classList.add(t),n.classList.add("toast-container"),e?e.getContainerElement().appendChild(n):this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalHost(t){return new Je(t,this._componentFactoryResolver,this._appRef)}_createOverlayRef(t){return new Xe(this._createPortalHost(t))}static \u0275fac=function(e){return new(e||i)};static \u0275prov=b({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Lt=(()=>{class i{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(t,e,n,r,s){this.overlay=e,this._injector=n,this.sanitizer=r,this.ngZone=s,this.toastrConfig=C(C({},t.default),t.config),t.config.iconClasses&&(this.toastrConfig.iconClasses=C(C({},t.default.iconClasses),t.config.iconClasses))}show(t,e,n={},r=""){return this._preBuildNotification(r,t,e,this.applyConfig(n))}success(t,e,n={}){let r=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(r,t,e,this.applyConfig(n))}error(t,e,n={}){let r=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(r,t,e,this.applyConfig(n))}info(t,e,n={}){let r=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(r,t,e,this.applyConfig(n))}warning(t,e,n={}){let r=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(r,t,e,this.applyConfig(n))}clear(t){for(let e of this.toasts)if(t!==void 0){if(e.toastId===t){e.toastRef.manualClose();return}}else e.toastRef.manualClose()}remove(t){let e=this._findToast(t);if(!e||(e.activeToast.toastRef.close(),this.toasts.splice(e.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){let n=this.toasts[this.currentlyActive].toastRef;n.isInactive()||(this.currentlyActive=this.currentlyActive+1,n.activate())}return!0}findDuplicate(t="",e="",n,r){let{includeTitleDuplicates:s}=this.toastrConfig;for(let a of this.toasts){let c=s&&a.title===t;if((!s||c)&&a.message===e)return a.toastRef.onDuplicate(n,r),a}return null}applyConfig(t={}){return C(C({},this.toastrConfig),t)}_findToast(t){for(let e=0;e<this.toasts.length;e++)if(this.toasts[e].toastId===t)return{index:e,activeToast:this.toasts[e]};return null}_preBuildNotification(t,e,n,r){return r.onActivateTick?this.ngZone.run(()=>this._buildNotification(t,e,n,r)):this._buildNotification(t,e,n,r)}_buildNotification(t,e,n,r){if(!r.toastComponent)throw new Error("toastComponent required");let s=this.findDuplicate(n,e,this.toastrConfig.resetTimeoutOnDuplicate&&r.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&n||e)&&this.toastrConfig.preventDuplicates&&s!==null)return s;this.previousToastMessage=e;let a=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(a=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let c=this.overlay.create(r.positionClass,this.overlayContainer);this.index=this.index+1;let l=e;e&&r.enableHtml&&(l=this.sanitizer.sanitize(vt.HTML,e));let d=new Ze(c),u=new ne(this.index,r,l,n,t,d),p=[{provide:ne,useValue:u}],f=ge.create({providers:p,parent:this._injector}),q=new qe(r.toastComponent,f),j=c.attach(q,r.newestOnTop);d.componentInstance=j.instance;let A={toastId:this.index,title:n||"",message:e||"",toastRef:d,onShown:d.afterActivate(),onHidden:d.afterClosed(),onTap:u.onTap(),onAction:u.onAction(),portal:j};return a||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{A.toastRef.activate()})),this.toasts.push(A),A}static \u0275fac=function(e){return new(e||i)(h(Ht),h(_n),h(ge),h(At),h(F))};static \u0275prov=b({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Cn=(()=>{class i{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=-1;toastClasses="";state;get displayStyle(){if(this.state.value==="inactive")return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,n){this.toastrService=t,this.toastPackage=e,this.ngZone=n,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(r=>{this.duplicatesCount=r}),this.state={value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}}}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state=Y(C({},this.state),{value:"active"}),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(this.width===0||this.width===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width=e/this.options.timeOut*100,this.options.progressAnimation==="increasing"&&(this.width=100-this.width),this.width<=0&&(this.width=0),this.width>=100&&(this.width=100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state=Y(C({},this.state),{value:"active"}),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){this.state.value!=="removed"&&(clearTimeout(this.timeout),this.state=Y(C({},this.state),{value:"removed"}),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){this.state.value!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state.value!=="removed"&&this.options.disableTimeOut!=="extendedTimeOut"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width=0)}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state.value==="removed"||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(t),e)):this.timeout=setTimeout(()=>t(),e)}outsideInterval(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(t),e)):this.intervalId=setInterval(()=>t(),e)}runInsideAngular(t){this.ngZone?this.ngZone.run(()=>t()):t()}static \u0275fac=function(e){return new(e||i)(J(Lt),J(ne),J(F))};static \u0275cmp=De({type:i,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(e,n){e&1&&le("click",function(){return n.tapToast()})("mouseenter",function(){return n.stickAround()})("mouseleave",function(){return n.delayedHideToast()}),e&2&&(bt("@flyInOut",n.state),H(n.toastClasses),se("display",n.displayStyle))},standalone:!0,features:[Ne],attrs:Bt,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,n){e&1&&ae(0,ln,3,0,"button",0)(1,dn,3,5,"div",1)(2,hn,1,3,"div",2)(3,pn,2,4,"div",3)(4,fn,2,2,"div",4),e&2&&(I("ngIf",n.options.closeButton),g(1),I("ngIf",n.title),g(1),I("ngIf",n.message&&n.options.enableHtml),g(1),I("ngIf",n.message&&!n.options.enableHtml),g(1),I("ngIf",n.options.progressBar))},dependencies:[He],encapsulation:2,data:{animation:[Et("flyInOut",[be("inactive",Te({opacity:0})),be("active",Te({opacity:1})),be("removed",Te({opacity:0})),ze("inactive => active",$e("{{ easeTime }}ms {{ easing }}")),ze("active => removed",$e("{{ easeTime }}ms {{ easing }}"))])]}})}return i})(),In=Y(C({},Ft),{toastComponent:Cn}),An=(i={})=>gt([{provide:Ht,useValue:{default:In,config:i}}]),zi=(()=>{class i{static forRoot(t={}){return{ngModule:i,providers:[An(t)]}}static \u0275fac=function(e){return new(e||i)};static \u0275mod=U({type:i});static \u0275inj=W({})}return i})();var Sn=(()=>{class i{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=-1;toastClasses="";get displayStyle(){return this.state==="inactive"?"none":null}state="inactive";timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,n){this.toastrService=t,this.toastPackage=e,this.appRef=n,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(r=>{this.duplicatesCount=r})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state="active",!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.timeout=setTimeout(()=>{this.remove()},this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))),this.options.onActivateTick&&this.appRef.tick()}updateProgress(){if(this.width===0||this.width===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width=e/this.options.timeOut*100,this.options.progressAnimation==="increasing"&&(this.width=100-this.width),this.width<=0&&(this.width=0),this.width>=100&&(this.width=100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state="active",this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=new Date().getTime()+(this.originalTimeout||0),this.width=-1,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){this.state!=="removed"&&(clearTimeout(this.timeout),this.state="removed",this.timeout=setTimeout(()=>this.toastrService.remove(this.toastPackage.toastId)))}tapToast(){this.state!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state!=="removed"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width=0)}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state==="removed"||(this.timeout=setTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}static \u0275fac=function(e){return new(e||i)(J(Lt),J(ne),J(ve))};static \u0275cmp=De({type:i,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(e,n){e&1&&le("click",function(){return n.tapToast()})("mouseenter",function(){return n.stickAround()})("mouseleave",function(){return n.delayedHideToast()}),e&2&&(H(n.toastClasses),se("display",n.displayStyle))},standalone:!0,features:[Ne],attrs:Bt,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,n){e&1&&ae(0,mn,3,0,"button",0)(1,vn,3,5,"div",1)(2,Tn,1,3,"div",2)(3,bn,2,4,"div",3)(4,wn,2,2,"div",4),e&2&&(I("ngIf",n.options.closeButton),g(1),I("ngIf",n.title),g(1),I("ngIf",n.message&&n.options.enableHtml),g(1),I("ngIf",n.message&&!n.options.enableHtml),g(1),I("ngIf",n.options.progressBar))},dependencies:[He],encapsulation:2})}return i})(),Wi=Y(C({},Ft),{toastComponent:Sn});var kn="firebase",En="10.7.1";de(kn,En,"app");var pe=new wt("ANGULARFIRE2_VERSION");var Dn=(i,o)=>{let t=o?[o]:Ot(),e=[];return t.forEach(n=>{n.container.getProvider(i).instances.forEach(s=>{e.includes(s)||e.push(s)})}),e},he=class{constructor(){return Dn(xn)}},xn="app-check";function Ye(){}var we=class{zone;delegate;constructor(o,t=ut){this.zone=o,this.delegate=t}now(){return this.delegate.now()}schedule(o,t,e){let n=this.zone,r=function(s){n.runGuarded(()=>{o.apply(this,[s])})};return this.delegate.schedule(r,t,e)}},Qe=class{zone;task=null;constructor(o){this.zone=o}call(o,t){let e=this.unscheduleTask.bind(this);return this.task=this.zone.run(()=>Zone.current.scheduleMacroTask("firebaseZoneBlock",Ye,{},Ye,Ye)),t.pipe(oe({next:e,complete:e,error:e})).subscribe(o).add(e)}unscheduleTask(){setTimeout(()=>{this.task!=null&&this.task.state==="scheduled"&&(this.task.invoke(),this.task=null)},10)}},$t=(()=>{class i{ngZone;outsideAngular;insideAngular;constructor(t){this.ngZone=t,this.outsideAngular=t.runOutsideAngular(()=>new we(Zone.current)),this.insideAngular=t.run(()=>new we(Zone.current,lt)),globalThis.\u0275AngularFireScheduler||=this}static \u0275fac=function(e){return new(e||i)(h(F))};static \u0275prov=b({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function Pn(){let i=globalThis.\u0275AngularFireScheduler;if(!i)throw new Error(`Either AngularFireModule has not been provided in your AppModule (this can be done manually or implictly using
|
|
2
2
|
provideFirebaseApp) or you're calling an AngularFire method outside of an NgModule (which is not supported).`);return i}function zt(i){return Rn(Pn())(i)}function Rn(i){return function(t){return t=t.lift(new Qe(i.ngZone)),t.pipe(Q(i.outsideAngular),Z(i.insideAngular))}}var jn="firebase",Mn="10.7.1";R.registerVersion(jn,Mn,"app-compat");var Nn=["ngOnDestroy"],Ut=(i,o,t,e={})=>new Proxy(i,{get:(n,r)=>t.runOutsideAngular(()=>{if(i[r])return e?.spy?.get&&e.spy.get(r,i[r]),i[r];if(Nn.indexOf(r)>-1)return()=>{};let s=o.toPromise().then(a=>{let c=a?.[r];return typeof c=="function"?c.bind(a):c?.then?c.then(l=>t.run(()=>l)):t.run(()=>c)});return new Proxy(()=>{},{get:(a,c)=>s[c],apply:(a,c,l)=>s.then(d=>{let u=d?.(...l);return e?.spy?.apply&&e.spy.apply(r,l,u),u})})})});var ye=class{constructor(o){return o}},_e=new S("angularfire2.app.options"),Ce=new S("angularfire2.app.name");function et(i,o,t){let e=typeof t=="string"&&t||"[DEFAULT]",n=typeof t=="object"&&t||{};n.name=n.name||e;let s=R.apps.filter(a=>a&&a.name===n.name)[0]||o.runOutsideAngular(()=>R.initializeApp(i,n));try{if(JSON.stringify(i)!==JSON.stringify(s.options)){let a=!!module.hot;Bn("error",`${s.name} Firebase App already initialized with different options${a?", you may need to reload as Firebase is not HMR aware.":"."}`)}}catch{}return new ye(s)}var Bn=(i,...o)=>{Be()&&typeof console<"u"&&console[i](...o)},Fn={provide:ye,useFactory:et,deps:[_e,F,[new mt,Ce]]},co=(()=>{class i{static initializeApp(t,e){return{ngModule:i,providers:[{provide:_e,useValue:t},{provide:Ce,useValue:e}]}}constructor(t){R.registerVersion("angularfire",pe.full,"core"),R.registerVersion("angularfire",pe.full,"app-compat"),R.registerVersion("angular",yt.full,t.toString())}static \u0275fac=function(e){return new(e||i)(h(te))};static \u0275mod=U({type:i});static \u0275inj=W({providers:[Fn]})}return i})();function Vt(i,o,t,e,n){let[,r,s]=globalThis.\u0275AngularfireInstanceCache.find(a=>a[0]===i)||[];if(r)return Hn(n,s)||(Wt("error",`${o} was already initialized on the ${t} Firebase App with different settings.${Ln?" You may need to reload as Firebase is not HMR aware.":""}`),Wt("warn",{is:n,was:s})),r;{let a=e();return globalThis.\u0275AngularfireInstanceCache.push([i,a,n]),a}}function Hn(i,o){try{return i.toString()===o.toString()}catch{return i===o}}var Ln=typeof module<"u"&&!!module.hot,Wt=(i,...o)=>{Be()&&typeof console<"u"&&console[i](...o)};globalThis.\u0275AngularfireInstanceCache||=[];var $n=new Map,zn={activated:!1,tokenObservers:[]},Wn={initialized:!1,enabled:!1};function O(i){return $n.get(i)||Object.assign({},zn)}function Jt(){return Wn}var Un="https://content-firebaseappcheck.googleapis.com/v1";var Vn="exchangeDebugToken",Kt={OFFSET_DURATION:5*60*1e3,RETRIAL_MIN_WAIT:30*1e3,RETRIAL_MAX_WAIT:16*60*1e3},_o=24*60*60*1e3;var nt=class{constructor(o,t,e,n,r){if(this.operation=o,this.retryPolicy=t,this.getWaitDuration=e,this.lowerBound=n,this.upperBound=r,this.pending=null,this.nextErrorWaitInterval=n,n>r)throw new Error("Proactive refresh lower bound greater than upper bound!")}start(){this.nextErrorWaitInterval=this.lowerBound,this.process(!0).catch(()=>{})}stop(){this.pending&&(this.pending.reject("cancelled"),this.pending=null)}isRunning(){return!!this.pending}process(o){return D(this,null,function*(){this.stop();try{this.pending=new We,this.pending.promise.catch(t=>{}),yield Kn(this.getNextRun(o)),this.pending.resolve(),yield this.pending.promise,this.pending=new We,this.pending.promise.catch(t=>{}),yield this.operation(),this.pending.resolve(),yield this.pending.promise,this.process(!0).catch(()=>{})}catch(t){this.retryPolicy(t)?this.process(!1).catch(()=>{}):this.stop()}})}getNextRun(o){if(o)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();{let t=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),t}}};function Kn(i){return new Promise(o=>{setTimeout(o,i)})}var qn={"already-initialized":"You have already called initializeAppCheck() for FirebaseApp {$appName} with different options. To avoid this error, call initializeAppCheck() with the same options as when it was originally called. This will return the already initialized instance.","use-before-activation":"App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. Call initializeAppCheck() before instantiating other Firebase services.","fetch-network-error":"Fetch failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-parse-error":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status-error":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","recaptcha-error":"ReCAPTCHA error.",throttled:"Requests throttled due to {$httpStatus} error. Attempts allowed again after {$time}"},K=new Pt("appCheck","AppCheck",qn);function Xt(i){if(!O(i).activated)throw K.create("use-before-activation",{appName:i.name})}function Yt(e,n){return D(this,arguments,function*({url:i,body:o},t){let r={"Content-Type":"application/json"},s=t.getImmediate({optional:!0});if(s){let f=yield s.getHeartbeatsHeader();f&&(r["X-Firebase-Client"]=f)}let a={method:"POST",body:JSON.stringify(o),headers:r},c;try{c=yield fetch(i,a)}catch(f){throw K.create("fetch-network-error",{originalErrorMessage:f?.message})}if(c.status!==200)throw K.create("fetch-status-error",{httpStatus:c.status});let l;try{l=yield c.json()}catch(f){throw K.create("fetch-parse-error",{originalErrorMessage:f?.message})}let d=l.ttl.match(/^([\d.]+)(s)$/);if(!d||!d[2]||isNaN(Number(d[1])))throw K.create("fetch-parse-error",{originalErrorMessage:`ttl field (timeToLive) is not in standard Protobuf Duration format: ${l.ttl}`});let u=Number(d[1])*1e3,p=Date.now();return{token:l.token,expireTimeMillis:p+u,issuedAtTimeMillis:p}})}function Qt(i,o){let{projectId:t,appId:e,apiKey:n}=i.options;return{url:`${Un}/projects/${t}/apps/${e}:${Vn}?key=${n}`,body:{debug_token:o}}}var Gn="firebase-app-check-database",Zn=1,it="firebase-app-check-store";var Ie=null;function Jn(){return Ie||(Ie=new Promise((i,o)=>{try{let t=indexedDB.open(Gn,Zn);t.onsuccess=e=>{i(e.target.result)},t.onerror=e=>{var n;o(K.create("storage-open",{originalErrorMessage:(n=e.target.error)===null||n===void 0?void 0:n.message}))},t.onupgradeneeded=e=>{let n=e.target.result;switch(e.oldVersion){case 0:n.createObjectStore(it,{keyPath:"compositeKey"})}}}catch(t){o(K.create("storage-open",{originalErrorMessage:t?.message}))}}),Ie)}function Xn(i,o){return Yn(Qn(i),o)}function Yn(i,o){return D(this,null,function*(){let e=(yield Jn()).transaction(it,"readwrite"),r=e.objectStore(it).put({compositeKey:i,value:o});return new Promise((s,a)=>{r.onsuccess=c=>{s()},e.onerror=c=>{var l;a(K.create("storage-set",{originalErrorMessage:(l=c.target.error)===null||l===void 0?void 0:l.message}))}})})}function Qn(i){return`${i.options.appId}-${i.name}`}var ot=new Rt("@firebase/app-check");function tt(i,o){return xt()?Xn(i,o).catch(t=>{ot.warn(`Failed to write token to IndexedDB. Error: ${t}`)}):Promise.resolve()}function en(){return Jt().enabled}function tn(){return D(this,null,function*(){let i=Jt();if(i.enabled&&i.token)return i.token.promise;throw Error(`
|
|
3
3
|
Can't get debug token in production mode.
|
|
4
|
-
`)})}var ei={error:"UNKNOWN_ERROR"};function ti(i){return Dt.encodeString(JSON.stringify(i),!1)}function rt(i,o=!1){return D(this,null,function*(){let t=i.app;Xt(t);let e=O(t),n=e.token,r;if(n&&!fe(n)&&(e.token=void 0,n=void 0),!n){let c=yield e.cachedTokenPromise;c&&(fe(c)?n=c:yield tt(t,void 0))}if(!o&&n&&fe(n))return{token:n.token};let s=!1;if(en()){e.exchangeTokenPromise||(e.exchangeTokenPromise=Yt(Qt(t,yield tn()),i.heartbeatServiceProvider).finally(()=>{e.exchangeTokenPromise=void 0}),s=!0);let c=yield e.exchangeTokenPromise;return yield tt(t,c),e.token=c,{token:c.token}}try{e.exchangeTokenPromise||(e.exchangeTokenPromise=e.provider.getToken().finally(()=>{e.exchangeTokenPromise=void 0}),s=!0),n=yield O(t).exchangeTokenPromise}catch(c){c.code==="appCheck/throttled"?ot.warn(c.message):ot.error(c),r=c}let a;return n?r?fe(n)?a={token:n.token,internalError:r}:a=Gt(r):(a={token:n.token},e.token=n,yield tt(t,n)):a=Gt(r),s&&ri(t,a),a})}function ni(i){return D(this,null,function*(){let o=i.app;Xt(o);let{provider:t}=O(o);if(en()){let e=yield tn(),{token:n}=yield Yt(Qt(o,e),i.heartbeatServiceProvider);return{token:n}}else{let{token:e}=yield t.getToken();return{token:e}}})}function ii(i,o,t,e){let{app:n}=i,r=O(n),s={next:t,error:e,type:o};if(r.tokenObservers=[...r.tokenObservers,s],r.token&&fe(r.token)){let a=r.token;Promise.resolve().then(()=>{t({token:a.token}),qt(i)}).catch(()=>{})}r.cachedTokenPromise.then(()=>qt(i))}function nn(i,o){let t=O(i),e=t.tokenObservers.filter(n=>n.next!==o);e.length===0&&t.tokenRefresher&&t.tokenRefresher.isRunning()&&t.tokenRefresher.stop(),t.tokenObservers=e}function qt(i){let{app:o}=i,t=O(o),e=t.tokenRefresher;e||(e=oi(i),t.tokenRefresher=e),!e.isRunning()&&t.isTokenAutoRefreshEnabled&&e.start()}function oi(i){let{app:o}=i;return new nt(()=>D(this,null,function*(){let t=O(o),e;if(t.token?e=yield rt(i,!0):e=yield rt(i),e.error)throw e.error;if(e.internalError)throw e.internalError}),()=>!0,()=>{let t=O(o);if(t.token){let e=t.token.issuedAtTimeMillis+(t.token.expireTimeMillis-t.token.issuedAtTimeMillis)*.5+3e5,n=t.token.expireTimeMillis-5*60*1e3;return e=Math.min(e,n),Math.max(0,e-Date.now())}else return 0},Kt.RETRIAL_MIN_WAIT,Kt.RETRIAL_MAX_WAIT)}function ri(i,o){let t=O(i).tokenObservers;for(let e of t)try{e.type==="EXTERNAL"&&o.error!=null?e.error(o.error):e.next(o)}catch{}}function fe(i){return i.expireTimeMillis-Date.now()>0}function Gt(i){return{token:ti(ei),error:i}}var st=class{constructor(o,t){this.app=o,this.heartbeatServiceProvider=t}_delete(){let{tokenObservers:o}=O(this.app);for(let t of o)nn(this.app,t.next);return Promise.resolve()}};function si(i,o){return new st(i,o)}function ai(i){return{getToken:o=>rt(i,o),getLimitedUseToken:()=>ni(i),addTokenListener:o=>ii(i,"INTERNAL",o),removeTokenListener:o=>nn(i.app,o)}}var ci="@firebase/app-check",li="0.8.1";var ui="app-check",Zt="app-check-internal";function di(){Ve(new Ue(ui,i=>{let o=i.getProvider("app").getImmediate(),t=i.getProvider("heartbeat");return si(o,t)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((i,o,t)=>{i.getProvider(Zt).initialize()})),Ve(new Ue(Zt,i=>{let o=i.getProvider("app-check").getImmediate();return ai(o)},"PUBLIC").setInstantiationMode("EXPLICIT")),de(ci,li)}di();var hi=["localhost","0.0.0.0","127.0.0.1"],jo=typeof window<"u"&&hi.includes(window.location.hostname);var fi=new S("angularfire2.auth.use-emulator"),mi=new S("angularfire2.auth.settings"),gi=new S("angularfire2.auth.tenant-id"),vi=new S("angularfire2.auth.langugage-code"),Ti=new S("angularfire2.auth.use-device-language"),bi=new S("angularfire.auth.persistence"),wi=(i,o,t,e,n,r,s,a)=>Vt(`${i.name}.auth`,"AngularFireAuth",i.name,()=>{let c=o.runOutsideAngular(()=>i.auth());if(t&&c.useEmulator(...t),e&&(c.tenantId=e),c.languageCode=n,r&&c.useDeviceLanguage(),s)for(let[l,d]of Object.entries(s))c.settings[l]=d;return a&&c.setPersistence(a),c},[t,e,n,r,s,a]),at=(()=>{class i{authState;idToken;user;idTokenResult;credential;constructor(t,e,n,r,s,a,c,l,d,u,p,f){let q=new x,j=ie(void 0).pipe(Z(s.outsideAngular),B(()=>r.runOutsideAngular(()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-LKQ6EHTZ.js"))),M(()=>et(t,r,e)),M(A=>wi(A,r,a,l,d,u,c,p)),ke({bufferSize:1,refCount:!1}));if(It(n))this.authState=this.user=this.idToken=this.idTokenResult=this.credential=ie(null);else{j.pipe(ft()).subscribe();let A=j.pipe(B(T=>T.getRedirectResult().then(N=>N,()=>null)),zt,ke({bufferSize:1,refCount:!1})),me=j.pipe(B(T=>new m(N=>({unsubscribe:r.runOutsideAngular(()=>T.onAuthStateChanged(G=>N.next(G),G=>N.error(G),()=>N.complete()))})))),Ae=j.pipe(B(T=>new m(N=>({unsubscribe:r.runOutsideAngular(()=>T.onIdTokenChanged(G=>N.next(G),G=>N.error(G),()=>N.complete()))}))));this.authState=A.pipe(Ee(me),Q(s.outsideAngular),Z(s.insideAngular)),this.user=A.pipe(Ee(Ae),Q(s.outsideAngular),Z(s.insideAngular)),this.idToken=this.user.pipe(B(T=>T?z(T.getIdToken()):ie(null))),this.idTokenResult=this.user.pipe(B(T=>T?z(T.getIdTokenResult()):ie(null))),this.credential=ht(A,q,this.authState.pipe(pt(T=>!T))).pipe(M(T=>T?.user?T:null),Q(s.outsideAngular),Z(s.insideAngular))}return Ut(this,j,r,{spy:{apply:(A,me,Ae)=>{(A.startsWith("signIn")||A.startsWith("createUser"))&&Ae.then(T=>q.next(T))}}})}static \u0275fac=function(e){return new(e||i)(h(_e),h(Ce,8),h(te),h(F),h($t),h(fi,8),h(mi,8),h(gi,8),h(vi,8),h(Ti,8),h(bi,8),h(he,8))};static \u0275prov=b({token:i,factory:i.\u0275fac,providedIn:"any"})}return i})(),Jo=(()=>{class i{constructor(){R.registerVersion("angularfire",pe.full,"auth-compat")}static \u0275fac=function(e){return new(e||i)};static \u0275mod=U({type:i});static \u0275inj=W({providers:[at]})}return i})();function v(i,o,t,e){return new Promise((n,r)=>{i||r("IndexedDB not available");let s=i.open(o,t),a;s.onsuccess=c=>{a=s.result,n(a)},s.onerror=c=>{r(`IndexedDB error: ${s.error}`)},typeof e=="function"&&(s.onupgradeneeded=c=>{e(c,a)})})}function on(i,o,t,e,n){if(!i)return;let r=i.open(o,t);r.onupgradeneeded=s=>{let a=s.target.result;e.forEach(l=>{if(!a.objectStoreNames.contains(l.store)){let d=a.createObjectStore(l.store,l.storeConfig);l.storeSchema.forEach(u=>{d.createIndex(u.name,u.keypath,u.options)})}});let c=n&&n();c&&Object.keys(c).map(l=>parseInt(l,10)).filter(l=>l>s.oldVersion).sort((l,d)=>l-d).forEach(l=>{c[l](a,r.transaction)}),a.close()},r.onsuccess=s=>{s.target.result.close()}}function _i(i,o,t){if(!i||!o||!t)throw Error('Params: "dbName", "version", "storeName" are mandatory.');return new m(e=>{try{let n=o+1,r=indexedDB.open(i,n);r.onupgradeneeded=s=>{let a=s.target.result;a.deleteObjectStore(t),a.close(),console.log("onupgradeneeded"),e.next(!0),e.complete()},r.onerror=s=>e.error(s)}catch(n){e.error(n)}})}function Ci(i,o){return i.objectStoreNames.contains(o)}function E(i,o,t){i||t("You need to use the openDatabase function to create a database before you query it!"),Ci(i,o)||t(`objectStore does not exists: ${o}`)}function y(i,o){let t=i.transaction(o.storeName,o.dbMode);return t.onerror=o.error,t.onabort=o.abort,t}function _(i,o,t,e){return{storeName:o,dbMode:i,error:n=>{t(n)},abort:n=>{t(n)}}}var w=function(i){return i.readonly="readonly",i.readwrite="readwrite",i}(w||{}),rn=new S(null),ct=(()=>{class i{constructor(t,e){if(this.dbConfig=t,this.platformId=e,!t.name)throw new Error("NgxIndexedDB: Please, provide the dbName in the configuration");if(!t.version)throw new Error("NgxIndexedDB: Please, provide the db version in the configuration");this.isBrowser=Ct(this.platformId),this.isBrowser&&(this.indexedDB=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,on(this.indexedDB,t.name,t.version,t.objectStoresMeta,t.migrationFactory),v(this.indexedDB,t.name).then(n=>{n.version!==t.version&&(this.dbConfig.version=n.version)}))}createObjectStore(t,e){let n=[t];on(this.indexedDB,this.dbConfig.name,++this.dbConfig.version,n,e)}add(t,e,n){return new m(r=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{let c=y(s,_(w.readwrite,t,d=>r.error(d))).objectStore(t),l=n?c.add(e,n):c.add(e);l.onsuccess=d=>D(this,null,function*(){let u=d.target.result,p=c.get(u);p.onsuccess=f=>{r.next(f.target.result),r.complete()}})}).catch(s=>r.error(s))})}bulkAdd(t,e){let n=new Promise((r,s)=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{let l=y(a,_(w.readwrite,t,r,s)).objectStore(t),d=e.map(u=>new Promise((p,f)=>{let q=u.key;delete u.key;let j=q?l.add(u,q):l.add(u);j.onsuccess=A=>{let me=A.target.result;p(me)}}));r(Promise.all(d))}).catch(a=>s(a))});return z(n)}bulkDelete(t,e){let n=e.map(r=>new Promise((s,a)=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(c=>{let l=y(c,_(w.readwrite,t,a,s));l.objectStore(t).delete(r),l.oncomplete=()=>{this.getAll(t).pipe(Se(1)).subscribe(u=>{s(u)})}}).catch(c=>a(c))}));return z(Promise.all(n))}getByKey(t,e){return new m(n=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{let c=y(r,_(w.readonly,t,n.error)).objectStore(t).get(e);c.onsuccess=l=>{n.next(l.target.result),n.complete()},c.onerror=l=>{n.error(l)}}).catch(r=>n.error(r))})}bulkGet(t,e){let n=e.map(r=>this.getByKey(t,r));return new m(r=>{dt(n).subscribe(s=>{r.next(s),r.complete()})})}getByID(t,e){return new m(n=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{E(r,t,l=>n.error(l));let c=y(r,_(w.readonly,t,n.error,n.next)).objectStore(t).get(e);c.onsuccess=l=>{n.next(l.target.result)}}).catch(r=>n.error(r))})}getByIndex(t,e,n){return new m(r=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{E(s,t,u=>r.error(u));let d=y(s,_(w.readonly,t,r.error)).objectStore(t).index(e).get(n);d.onsuccess=u=>{r.next(u.target.result),r.complete()}}).catch(s=>r.error(s))})}getAll(t){return new m(e=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{E(n,t,c=>e.error(c));let a=y(n,_(w.readonly,t,e.error,e.next)).objectStore(t).getAll();a.onerror=c=>{e.error(c)},a.onsuccess=({target:{result:c}})=>{e.next(c),e.complete()}}).catch(n=>e.error(n))})}update(t,e){return new m(n=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{E(r,t,l=>n.error(l));let a=y(r,_(w.readwrite,t,l=>n.error(l))).objectStore(t),c=a.put(e);c.onsuccess=l=>D(this,null,function*(){let d=l.target.result,u=a.get(d);u.onsuccess=p=>{n.next(p.target.result),n.complete()}})}).catch(r=>n.error(r))})}delete(t,e){return new m(n=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{E(r,t,c=>n.error(c));let s=y(r,_(w.readwrite,t,c=>n.error(c)));s.objectStore(t).delete(e),s.oncomplete=()=>{this.getAll(t).pipe(Se(1)).subscribe(c=>{n.next(c),n.complete()})}}).catch(r=>n.error(r))})}deleteByKey(t,e){return new m(n=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{E(r,t,c=>n.error(c));let s=y(r,_(w.readwrite,t,c=>n.error(c))),a=s.objectStore(t);s.oncomplete=()=>{n.next(!0),n.complete()},a.delete(e)}).catch(r=>n.error(r))})}clear(t){return new m(e=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{E(n,t,a=>e.error(a));let r=y(n,_(w.readwrite,t,a=>e.error(a)));r.objectStore(t).clear(),r.oncomplete=()=>{e.next(!0),e.complete()}}).catch(n=>e.error(n))})}deleteDatabase(){return new m(t=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(e=>D(this,null,function*(){yield e.close();let n=this.indexedDB.deleteDatabase(this.dbConfig.name);n.onsuccess=()=>{t.next(!0),t.complete()},n.onerror=r=>t.error(r),n.onblocked=()=>{throw new Error("Unable to delete database because it's blocked")}})).catch(e=>t.error(e))})}openCursor(t,e){return new m(n=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{E(r,t,l=>n.error(l));let a=y(r,_(w.readonly,t,n.error)).objectStore(t),c=e===void 0?a.openCursor():a.openCursor(e);c.onsuccess=l=>{n.next(l),n.complete()}}).catch(r=>n.error(r))})}openCursorByIndex(t,e,n,r=w.readonly){let s=new x;return v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{E(a,t,p=>{s.error(p)});let u=y(a,_(r,t,p=>{s.error(p)},()=>{s.next()})).objectStore(t).index(e).openCursor(n);u.onsuccess=p=>{s.next(p)}}).catch(a=>s.error(a)),s}getAllByIndex(t,e,n){let r=[];return new m(s=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{E(a,t,p=>s.error(p));let u=y(a,_(w.readonly,t,s.error)).objectStore(t).index(e).openCursor(n);u.onsuccess=p=>{let f=p.target.result;f?(r.push(f.value),f.continue()):(s.next(r),s.complete())}}).catch(a=>s.error(a))})}getAllKeysByIndex(t,e,n){let r=[];return new m(s=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{E(a,t,p=>s.error(p));let u=y(a,_(w.readonly,t,s.error)).objectStore(t).index(e).openKeyCursor(n);u.onsuccess=p=>{let f=p.target.result;f?(r.push({primaryKey:f.primaryKey,key:f.key}),f.continue()):(s.next(r),s.complete())}}).catch(a=>s.error(a))})}count(t,e){return new m(n=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{E(r,t,l=>n.error(l));let c=y(r,_(w.readonly,t,n.error)).objectStore(t).count(e);c.onerror=l=>n.error(l),c.onsuccess=l=>{n.next(l.target.result),n.complete()}}).catch(r=>n.error(r))})}countByIndex(t,e,n){return new m(r=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{E(s,t,u=>r.error(u));let d=y(s,_(w.readonly,t,r.error)).objectStore(t).index(e).count(n);d.onerror=u=>r.error(u),d.onsuccess=u=>{r.next(u.target.result),r.complete()}}).catch(s=>r.error(s))})}deleteObjectStore(t){return _i(this.dbConfig.name,++this.dbConfig.version,t)}}return i.\u0275fac=function(t){return new(t||i)(h(rn),h(te))},i.\u0275prov=b({token:i,factory:i.\u0275fac}),i})(),or=(()=>{class i{static forRoot(t){return{ngModule:i,providers:[ct,{provide:rn,useValue:t}]}}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=U({type:i}),i.\u0275inj=W({imports:[[_t]]}),i})();var sn=(()=>{let o=class o{constructor(e){this.db=e,this.DATABASE="Categories"}saveCategoriesByChannelType(e,n){let r=this.getKey(n);return this.db.add(this.DATABASE,e,r).pipe(M(s=>e))}getCategoriesByChannelType(e){let n=this.getKey(e);return this.db.getByKey(this.DATABASE,n)}getKey(e){let n="";switch(e){case Le.Lazada:n="Lazada";break;case Le.Tokopedia:n="Tokopedia";break}return n}clearDatabase(){this.db.clear(this.DATABASE)}getHostName(){let e=localStorage.getItem("Authorization");return this.hostName=JSON.parse(e)?.Host,this.hostName}};o.\u0275fac=function(n){return new(n||o)(h(ct))},o.\u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var an=(()=>{let o=class o{constructor(){}inititalizeIntercom(){let e=this.getFromLocalStorage();e?.Enabled&&window.Intercom("boot",{app_id:"xv1oomgl",name:e.Name,email:e.Email,created_at:e.Created,user_hash:e.Hash})}shutdown(){this.getFromLocalStorage()?.Enabled&&(window.Intercom("shutdown"),this.clearStorage())}clearStorage(){localStorage.removeItem("Intercom")}updateLocalStorage(e){let n={Enabled:!0};e&&(n=C(C({},n),e)),localStorage.setItem("Intercom",JSON.stringify(n))}getFromLocalStorage(){let e=localStorage.getItem("Intercom");return JSON.parse(e)}hideLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(window.Intercom("update",{app_id:"xv1oomgl",hide_default_launcher:!0}),e.hide_default_launcher=!0,this.updateLocalStorage(e))}showLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(window.Intercom("update",{app_id:"xv1oomgl",hide_default_launcher:!1}),e.hide_default_launcher=!1,this.updateLocalStorage(e))}isHideLauncher(){let e=this.getFromLocalStorage();return ue.IsEmpty(e?.hide_default_launcher)?!1:e?.hide_default_launcher}};o.\u0275fac=function(n){return new(n||o)},o.\u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var Ys=(()=>{let o=class o{constructor(e,n,r,s,a,c,l){this.httpService=e,this.tokenDecodeService=n,this.afAuth=r,this.ngxPermission=s,this.localDataService=a,this.router=c,this.intercomService=l,this.channels=[]}login(e){return this.httpService.post("/api/token/Login",e).pipe(oe(n=>{this.setLocalStorage(n,e.Host,e.Username),this.loadPermissions()}))}getNews(){return this.httpService.get(Mt.news).pipe(M(e=>e?.items?.map(n=>n?.properties)))}loginWithGoogle(e,n){e.preventDefault();let r=new Ke;return r.setCustomParameters({prompt:"select_account"}),z(this.afAuth.signInWithPopup(r)).pipe(M(s=>s.credential),M(s=>s.idToken),B(s=>this.httpService.post("/api/token/LoginWithSocialProvider",JSON.stringify({IDToken:s,Host:n}))),oe(s=>{this.setLocalStorage(s,n,null),this.loadPermissions()}))}setLocalStorage(e,n,r){localStorage.setItem("user",JSON.stringify(e)),localStorage.setItem("Authorization",JSON.stringify({Host:n,username:r})),localStorage.setItem("channels",JSON.stringify(e.Channels)),this.intercomService.updateLocalStorage(e.IntercomWidget),this.intercomService.inititalizeIntercom()}loadPermissions(){this.ngxPermission.loadPermissions([]);let e=localStorage.getItem("user");if(ue.IsNotEmpty(e)){let n=this.tokenDecodeService.GetRoles();this.ngxPermission.loadPermissions(n)}}getChannels(){let e=JSON.parse(JSON.stringify(this.channels));if(this.channels.length===0){let n=localStorage.getItem("channels");n?(this.channels=JSON.parse(n),e=JSON.parse(JSON.stringify(this.channels))):(this.channels=[],e=[])}return e=this.setChannelLogo(e),e}setChannelLogo(e){return e=e.map(n=>(n.Img=ue.getChannelLogoByTypeId(n.TypeID),n)),e}logout(){this.clearLocalStorage(),this.ngxPermission.flushPermissions()}isActiveToken(){let e=JSON.parse(window.localStorage.getItem("user")),n=new Date;if(e!=null){let r=new Date(e.Token.expiredAt);return n<r?!0:(this.clearLocalStorage(),!1)}else return!1}getDomain(){if(!this.domain){let e=localStorage.getItem("Authorization");this.domain="https://"+JSON.parse(e).Host}return this.domain}clearLocalStorage(){this.domain=null,this.channels=[],localStorage.removeItem("channels"),localStorage.removeItem("user"),this.intercomService.shutdown(),this.localDataService.clearDatabase(),this.router.navigate([""])}};o.\u0275fac=function(n){return new(n||o)(h(St),h(Nt),h(at),h(jt),h(sn),h(kt),h(an))},o.\u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();export{Nt as a,Mt as b,ne as c,Lt as d,Cn as e,zi as f,co as g,Jo as h,or as i,sn as j,Ys as k};
|
|
4
|
+
`)})}var ei={error:"UNKNOWN_ERROR"};function ti(i){return Dt.encodeString(JSON.stringify(i),!1)}function rt(i,o=!1){return D(this,null,function*(){let t=i.app;Xt(t);let e=O(t),n=e.token,r;if(n&&!fe(n)&&(e.token=void 0,n=void 0),!n){let c=yield e.cachedTokenPromise;c&&(fe(c)?n=c:yield tt(t,void 0))}if(!o&&n&&fe(n))return{token:n.token};let s=!1;if(en()){e.exchangeTokenPromise||(e.exchangeTokenPromise=Yt(Qt(t,yield tn()),i.heartbeatServiceProvider).finally(()=>{e.exchangeTokenPromise=void 0}),s=!0);let c=yield e.exchangeTokenPromise;return yield tt(t,c),e.token=c,{token:c.token}}try{e.exchangeTokenPromise||(e.exchangeTokenPromise=e.provider.getToken().finally(()=>{e.exchangeTokenPromise=void 0}),s=!0),n=yield O(t).exchangeTokenPromise}catch(c){c.code==="appCheck/throttled"?ot.warn(c.message):ot.error(c),r=c}let a;return n?r?fe(n)?a={token:n.token,internalError:r}:a=Gt(r):(a={token:n.token},e.token=n,yield tt(t,n)):a=Gt(r),s&&ri(t,a),a})}function ni(i){return D(this,null,function*(){let o=i.app;Xt(o);let{provider:t}=O(o);if(en()){let e=yield tn(),{token:n}=yield Yt(Qt(o,e),i.heartbeatServiceProvider);return{token:n}}else{let{token:e}=yield t.getToken();return{token:e}}})}function ii(i,o,t,e){let{app:n}=i,r=O(n),s={next:t,error:e,type:o};if(r.tokenObservers=[...r.tokenObservers,s],r.token&&fe(r.token)){let a=r.token;Promise.resolve().then(()=>{t({token:a.token}),qt(i)}).catch(()=>{})}r.cachedTokenPromise.then(()=>qt(i))}function nn(i,o){let t=O(i),e=t.tokenObservers.filter(n=>n.next!==o);e.length===0&&t.tokenRefresher&&t.tokenRefresher.isRunning()&&t.tokenRefresher.stop(),t.tokenObservers=e}function qt(i){let{app:o}=i,t=O(o),e=t.tokenRefresher;e||(e=oi(i),t.tokenRefresher=e),!e.isRunning()&&t.isTokenAutoRefreshEnabled&&e.start()}function oi(i){let{app:o}=i;return new nt(()=>D(this,null,function*(){let t=O(o),e;if(t.token?e=yield rt(i,!0):e=yield rt(i),e.error)throw e.error;if(e.internalError)throw e.internalError}),()=>!0,()=>{let t=O(o);if(t.token){let e=t.token.issuedAtTimeMillis+(t.token.expireTimeMillis-t.token.issuedAtTimeMillis)*.5+3e5,n=t.token.expireTimeMillis-5*60*1e3;return e=Math.min(e,n),Math.max(0,e-Date.now())}else return 0},Kt.RETRIAL_MIN_WAIT,Kt.RETRIAL_MAX_WAIT)}function ri(i,o){let t=O(i).tokenObservers;for(let e of t)try{e.type==="EXTERNAL"&&o.error!=null?e.error(o.error):e.next(o)}catch{}}function fe(i){return i.expireTimeMillis-Date.now()>0}function Gt(i){return{token:ti(ei),error:i}}var st=class{constructor(o,t){this.app=o,this.heartbeatServiceProvider=t}_delete(){let{tokenObservers:o}=O(this.app);for(let t of o)nn(this.app,t.next);return Promise.resolve()}};function si(i,o){return new st(i,o)}function ai(i){return{getToken:o=>rt(i,o),getLimitedUseToken:()=>ni(i),addTokenListener:o=>ii(i,"INTERNAL",o),removeTokenListener:o=>nn(i.app,o)}}var ci="@firebase/app-check",li="0.8.1";var ui="app-check",Zt="app-check-internal";function di(){Ve(new Ue(ui,i=>{let o=i.getProvider("app").getImmediate(),t=i.getProvider("heartbeat");return si(o,t)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((i,o,t)=>{i.getProvider(Zt).initialize()})),Ve(new Ue(Zt,i=>{let o=i.getProvider("app-check").getImmediate();return ai(o)},"PUBLIC").setInstantiationMode("EXPLICIT")),de(ci,li)}di();var hi=["localhost","0.0.0.0","127.0.0.1"],jo=typeof window<"u"&&hi.includes(window.location.hostname);var fi=new S("angularfire2.auth.use-emulator"),mi=new S("angularfire2.auth.settings"),gi=new S("angularfire2.auth.tenant-id"),vi=new S("angularfire2.auth.langugage-code"),Ti=new S("angularfire2.auth.use-device-language"),bi=new S("angularfire.auth.persistence"),wi=(i,o,t,e,n,r,s,a)=>Vt(`${i.name}.auth`,"AngularFireAuth",i.name,()=>{let c=o.runOutsideAngular(()=>i.auth());if(t&&c.useEmulator(...t),e&&(c.tenantId=e),c.languageCode=n,r&&c.useDeviceLanguage(),s)for(let[l,d]of Object.entries(s))c.settings[l]=d;return a&&c.setPersistence(a),c},[t,e,n,r,s,a]),at=(()=>{class i{authState;idToken;user;idTokenResult;credential;constructor(t,e,n,r,s,a,c,l,d,u,p,f){let q=new x,j=ie(void 0).pipe(Z(s.outsideAngular),B(()=>r.runOutsideAngular(()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.10.3/Marketplace/chunk-F4WFV5C7.js"))),M(()=>et(t,r,e)),M(A=>wi(A,r,a,l,d,u,c,p)),ke({bufferSize:1,refCount:!1}));if(It(n))this.authState=this.user=this.idToken=this.idTokenResult=this.credential=ie(null);else{j.pipe(ft()).subscribe();let A=j.pipe(B(T=>T.getRedirectResult().then(N=>N,()=>null)),zt,ke({bufferSize:1,refCount:!1})),me=j.pipe(B(T=>new m(N=>({unsubscribe:r.runOutsideAngular(()=>T.onAuthStateChanged(G=>N.next(G),G=>N.error(G),()=>N.complete()))})))),Ae=j.pipe(B(T=>new m(N=>({unsubscribe:r.runOutsideAngular(()=>T.onIdTokenChanged(G=>N.next(G),G=>N.error(G),()=>N.complete()))}))));this.authState=A.pipe(Ee(me),Q(s.outsideAngular),Z(s.insideAngular)),this.user=A.pipe(Ee(Ae),Q(s.outsideAngular),Z(s.insideAngular)),this.idToken=this.user.pipe(B(T=>T?z(T.getIdToken()):ie(null))),this.idTokenResult=this.user.pipe(B(T=>T?z(T.getIdTokenResult()):ie(null))),this.credential=ht(A,q,this.authState.pipe(pt(T=>!T))).pipe(M(T=>T?.user?T:null),Q(s.outsideAngular),Z(s.insideAngular))}return Ut(this,j,r,{spy:{apply:(A,me,Ae)=>{(A.startsWith("signIn")||A.startsWith("createUser"))&&Ae.then(T=>q.next(T))}}})}static \u0275fac=function(e){return new(e||i)(h(_e),h(Ce,8),h(te),h(F),h($t),h(fi,8),h(mi,8),h(gi,8),h(vi,8),h(Ti,8),h(bi,8),h(he,8))};static \u0275prov=b({token:i,factory:i.\u0275fac,providedIn:"any"})}return i})(),Jo=(()=>{class i{constructor(){R.registerVersion("angularfire",pe.full,"auth-compat")}static \u0275fac=function(e){return new(e||i)};static \u0275mod=U({type:i});static \u0275inj=W({providers:[at]})}return i})();function v(i,o,t,e){return new Promise((n,r)=>{i||r("IndexedDB not available");let s=i.open(o,t),a;s.onsuccess=c=>{a=s.result,n(a)},s.onerror=c=>{r(`IndexedDB error: ${s.error}`)},typeof e=="function"&&(s.onupgradeneeded=c=>{e(c,a)})})}function on(i,o,t,e,n){if(!i)return;let r=i.open(o,t);r.onupgradeneeded=s=>{let a=s.target.result;e.forEach(l=>{if(!a.objectStoreNames.contains(l.store)){let d=a.createObjectStore(l.store,l.storeConfig);l.storeSchema.forEach(u=>{d.createIndex(u.name,u.keypath,u.options)})}});let c=n&&n();c&&Object.keys(c).map(l=>parseInt(l,10)).filter(l=>l>s.oldVersion).sort((l,d)=>l-d).forEach(l=>{c[l](a,r.transaction)}),a.close()},r.onsuccess=s=>{s.target.result.close()}}function _i(i,o,t){if(!i||!o||!t)throw Error('Params: "dbName", "version", "storeName" are mandatory.');return new m(e=>{try{let n=o+1,r=indexedDB.open(i,n);r.onupgradeneeded=s=>{let a=s.target.result;a.deleteObjectStore(t),a.close(),console.log("onupgradeneeded"),e.next(!0),e.complete()},r.onerror=s=>e.error(s)}catch(n){e.error(n)}})}function Ci(i,o){return i.objectStoreNames.contains(o)}function E(i,o,t){i||t("You need to use the openDatabase function to create a database before you query it!"),Ci(i,o)||t(`objectStore does not exists: ${o}`)}function y(i,o){let t=i.transaction(o.storeName,o.dbMode);return t.onerror=o.error,t.onabort=o.abort,t}function _(i,o,t,e){return{storeName:o,dbMode:i,error:n=>{t(n)},abort:n=>{t(n)}}}var w=function(i){return i.readonly="readonly",i.readwrite="readwrite",i}(w||{}),rn=new S(null),ct=(()=>{class i{constructor(t,e){if(this.dbConfig=t,this.platformId=e,!t.name)throw new Error("NgxIndexedDB: Please, provide the dbName in the configuration");if(!t.version)throw new Error("NgxIndexedDB: Please, provide the db version in the configuration");this.isBrowser=Ct(this.platformId),this.isBrowser&&(this.indexedDB=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,on(this.indexedDB,t.name,t.version,t.objectStoresMeta,t.migrationFactory),v(this.indexedDB,t.name).then(n=>{n.version!==t.version&&(this.dbConfig.version=n.version)}))}createObjectStore(t,e){let n=[t];on(this.indexedDB,this.dbConfig.name,++this.dbConfig.version,n,e)}add(t,e,n){return new m(r=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{let c=y(s,_(w.readwrite,t,d=>r.error(d))).objectStore(t),l=n?c.add(e,n):c.add(e);l.onsuccess=d=>D(this,null,function*(){let u=d.target.result,p=c.get(u);p.onsuccess=f=>{r.next(f.target.result),r.complete()}})}).catch(s=>r.error(s))})}bulkAdd(t,e){let n=new Promise((r,s)=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{let l=y(a,_(w.readwrite,t,r,s)).objectStore(t),d=e.map(u=>new Promise((p,f)=>{let q=u.key;delete u.key;let j=q?l.add(u,q):l.add(u);j.onsuccess=A=>{let me=A.target.result;p(me)}}));r(Promise.all(d))}).catch(a=>s(a))});return z(n)}bulkDelete(t,e){let n=e.map(r=>new Promise((s,a)=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(c=>{let l=y(c,_(w.readwrite,t,a,s));l.objectStore(t).delete(r),l.oncomplete=()=>{this.getAll(t).pipe(Se(1)).subscribe(u=>{s(u)})}}).catch(c=>a(c))}));return z(Promise.all(n))}getByKey(t,e){return new m(n=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{let c=y(r,_(w.readonly,t,n.error)).objectStore(t).get(e);c.onsuccess=l=>{n.next(l.target.result),n.complete()},c.onerror=l=>{n.error(l)}}).catch(r=>n.error(r))})}bulkGet(t,e){let n=e.map(r=>this.getByKey(t,r));return new m(r=>{dt(n).subscribe(s=>{r.next(s),r.complete()})})}getByID(t,e){return new m(n=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{E(r,t,l=>n.error(l));let c=y(r,_(w.readonly,t,n.error,n.next)).objectStore(t).get(e);c.onsuccess=l=>{n.next(l.target.result)}}).catch(r=>n.error(r))})}getByIndex(t,e,n){return new m(r=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{E(s,t,u=>r.error(u));let d=y(s,_(w.readonly,t,r.error)).objectStore(t).index(e).get(n);d.onsuccess=u=>{r.next(u.target.result),r.complete()}}).catch(s=>r.error(s))})}getAll(t){return new m(e=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{E(n,t,c=>e.error(c));let a=y(n,_(w.readonly,t,e.error,e.next)).objectStore(t).getAll();a.onerror=c=>{e.error(c)},a.onsuccess=({target:{result:c}})=>{e.next(c),e.complete()}}).catch(n=>e.error(n))})}update(t,e){return new m(n=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{E(r,t,l=>n.error(l));let a=y(r,_(w.readwrite,t,l=>n.error(l))).objectStore(t),c=a.put(e);c.onsuccess=l=>D(this,null,function*(){let d=l.target.result,u=a.get(d);u.onsuccess=p=>{n.next(p.target.result),n.complete()}})}).catch(r=>n.error(r))})}delete(t,e){return new m(n=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{E(r,t,c=>n.error(c));let s=y(r,_(w.readwrite,t,c=>n.error(c)));s.objectStore(t).delete(e),s.oncomplete=()=>{this.getAll(t).pipe(Se(1)).subscribe(c=>{n.next(c),n.complete()})}}).catch(r=>n.error(r))})}deleteByKey(t,e){return new m(n=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{E(r,t,c=>n.error(c));let s=y(r,_(w.readwrite,t,c=>n.error(c))),a=s.objectStore(t);s.oncomplete=()=>{n.next(!0),n.complete()},a.delete(e)}).catch(r=>n.error(r))})}clear(t){return new m(e=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{E(n,t,a=>e.error(a));let r=y(n,_(w.readwrite,t,a=>e.error(a)));r.objectStore(t).clear(),r.oncomplete=()=>{e.next(!0),e.complete()}}).catch(n=>e.error(n))})}deleteDatabase(){return new m(t=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(e=>D(this,null,function*(){yield e.close();let n=this.indexedDB.deleteDatabase(this.dbConfig.name);n.onsuccess=()=>{t.next(!0),t.complete()},n.onerror=r=>t.error(r),n.onblocked=()=>{throw new Error("Unable to delete database because it's blocked")}})).catch(e=>t.error(e))})}openCursor(t,e){return new m(n=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{E(r,t,l=>n.error(l));let a=y(r,_(w.readonly,t,n.error)).objectStore(t),c=e===void 0?a.openCursor():a.openCursor(e);c.onsuccess=l=>{n.next(l),n.complete()}}).catch(r=>n.error(r))})}openCursorByIndex(t,e,n,r=w.readonly){let s=new x;return v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{E(a,t,p=>{s.error(p)});let u=y(a,_(r,t,p=>{s.error(p)},()=>{s.next()})).objectStore(t).index(e).openCursor(n);u.onsuccess=p=>{s.next(p)}}).catch(a=>s.error(a)),s}getAllByIndex(t,e,n){let r=[];return new m(s=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{E(a,t,p=>s.error(p));let u=y(a,_(w.readonly,t,s.error)).objectStore(t).index(e).openCursor(n);u.onsuccess=p=>{let f=p.target.result;f?(r.push(f.value),f.continue()):(s.next(r),s.complete())}}).catch(a=>s.error(a))})}getAllKeysByIndex(t,e,n){let r=[];return new m(s=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{E(a,t,p=>s.error(p));let u=y(a,_(w.readonly,t,s.error)).objectStore(t).index(e).openKeyCursor(n);u.onsuccess=p=>{let f=p.target.result;f?(r.push({primaryKey:f.primaryKey,key:f.key}),f.continue()):(s.next(r),s.complete())}}).catch(a=>s.error(a))})}count(t,e){return new m(n=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{E(r,t,l=>n.error(l));let c=y(r,_(w.readonly,t,n.error)).objectStore(t).count(e);c.onerror=l=>n.error(l),c.onsuccess=l=>{n.next(l.target.result),n.complete()}}).catch(r=>n.error(r))})}countByIndex(t,e,n){return new m(r=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{E(s,t,u=>r.error(u));let d=y(s,_(w.readonly,t,r.error)).objectStore(t).index(e).count(n);d.onerror=u=>r.error(u),d.onsuccess=u=>{r.next(u.target.result),r.complete()}}).catch(s=>r.error(s))})}deleteObjectStore(t){return _i(this.dbConfig.name,++this.dbConfig.version,t)}}return i.\u0275fac=function(t){return new(t||i)(h(rn),h(te))},i.\u0275prov=b({token:i,factory:i.\u0275fac}),i})(),or=(()=>{class i{static forRoot(t){return{ngModule:i,providers:[ct,{provide:rn,useValue:t}]}}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=U({type:i}),i.\u0275inj=W({imports:[[_t]]}),i})();var sn=(()=>{let o=class o{constructor(e){this.db=e,this.DATABASE="Categories"}saveCategoriesByChannelType(e,n){let r=this.getKey(n);return this.db.add(this.DATABASE,e,r).pipe(M(s=>e))}getCategoriesByChannelType(e){let n=this.getKey(e);return this.db.getByKey(this.DATABASE,n)}getKey(e){let n="";switch(e){case Le.Lazada:n="Lazada";break;case Le.Tokopedia:n="Tokopedia";break}return n}clearDatabase(){this.db.clear(this.DATABASE)}getHostName(){let e=localStorage.getItem("Authorization");return this.hostName=JSON.parse(e)?.Host,this.hostName}};o.\u0275fac=function(n){return new(n||o)(h(ct))},o.\u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var an=(()=>{let o=class o{constructor(){}inititalizeIntercom(){let e=this.getFromLocalStorage();e?.Enabled&&window.Intercom("boot",{app_id:"xv1oomgl",name:e.Name,email:e.Email,created_at:e.Created,user_hash:e.Hash})}shutdown(){this.getFromLocalStorage()?.Enabled&&(window.Intercom("shutdown"),this.clearStorage())}clearStorage(){localStorage.removeItem("Intercom")}updateLocalStorage(e){let n={Enabled:!0};e&&(n=C(C({},n),e)),localStorage.setItem("Intercom",JSON.stringify(n))}getFromLocalStorage(){let e=localStorage.getItem("Intercom");return JSON.parse(e)}hideLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(window.Intercom("update",{app_id:"xv1oomgl",hide_default_launcher:!0}),e.hide_default_launcher=!0,this.updateLocalStorage(e))}showLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(window.Intercom("update",{app_id:"xv1oomgl",hide_default_launcher:!1}),e.hide_default_launcher=!1,this.updateLocalStorage(e))}isHideLauncher(){let e=this.getFromLocalStorage();return ue.IsEmpty(e?.hide_default_launcher)?!1:e?.hide_default_launcher}};o.\u0275fac=function(n){return new(n||o)},o.\u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var Ys=(()=>{let o=class o{constructor(e,n,r,s,a,c,l){this.httpService=e,this.tokenDecodeService=n,this.afAuth=r,this.ngxPermission=s,this.localDataService=a,this.router=c,this.intercomService=l,this.channels=[]}login(e){return this.httpService.post("/api/token/Login",e).pipe(oe(n=>{this.setLocalStorage(n,e.Host,e.Username),this.loadPermissions()}))}getNews(){return this.httpService.get(Mt.news).pipe(M(e=>e?.items?.map(n=>n?.properties)))}loginWithGoogle(e,n){e.preventDefault();let r=new Ke;return r.setCustomParameters({prompt:"select_account"}),z(this.afAuth.signInWithPopup(r)).pipe(M(s=>s.credential),M(s=>s.idToken),B(s=>this.httpService.post("/api/token/LoginWithSocialProvider",JSON.stringify({IDToken:s,Host:n}))),oe(s=>{this.setLocalStorage(s,n,null),this.loadPermissions()}))}setLocalStorage(e,n,r){localStorage.setItem("user",JSON.stringify(e)),localStorage.setItem("Authorization",JSON.stringify({Host:n,username:r})),localStorage.setItem("channels",JSON.stringify(e.Channels)),this.intercomService.updateLocalStorage(e.IntercomWidget),this.intercomService.inititalizeIntercom()}loadPermissions(){this.ngxPermission.loadPermissions([]);let e=localStorage.getItem("user");if(ue.IsNotEmpty(e)){let n=this.tokenDecodeService.GetRoles();this.ngxPermission.loadPermissions(n)}}getChannels(){let e=JSON.parse(JSON.stringify(this.channels));if(this.channels.length===0){let n=localStorage.getItem("channels");n?(this.channels=JSON.parse(n),e=JSON.parse(JSON.stringify(this.channels))):(this.channels=[],e=[])}return e=this.setChannelLogo(e),e}setChannelLogo(e){return e=e.map(n=>(n.Img=ue.getChannelLogoByTypeId(n.TypeID),n)),e}logout(){this.clearLocalStorage(),this.ngxPermission.flushPermissions()}isActiveToken(){let e=JSON.parse(window.localStorage.getItem("user")),n=new Date;if(e!=null){let r=new Date(e.Token.expiredAt);return n<r?!0:(this.clearLocalStorage(),!1)}else return!1}getDomain(){if(!this.domain){let e=localStorage.getItem("Authorization");this.domain="https://"+JSON.parse(e).Host}return this.domain}clearLocalStorage(){this.domain=null,this.channels=[],localStorage.removeItem("channels"),localStorage.removeItem("user"),this.intercomService.shutdown(),this.localDataService.clearDatabase(),this.router.navigate([""])}};o.\u0275fac=function(n){return new(n||o)(h(St),h(Nt),h(at),h(jt),h(sn),h(kt),h(an))},o.\u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();export{Nt as a,Mt as b,ne as c,Lt as d,Cn as e,zi as f,co as g,Jo as h,or as i,sn as j,Ys as k};
|