dealposbooks 1.9.2 → 1.9.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/3rdpartylicenses.txt +769 -68
- package/assets/scss/components/_scafholdings.scss +21 -17
- package/assets/scss/layouts/_sidebar.scss +1 -1
- package/assets/scss/style.scss +51 -11
- package/assets/scss/variables/_variables.scss +3 -3
- package/{chunk-4OXMK44M.js → chunk-2US5D2LY.js} +1 -1
- package/{chunk-HKFTHGN6.js → chunk-33XUIS57.js} +1 -1
- package/{chunk-DCES5UJV.js → chunk-353U23ZQ.js} +1 -1
- package/chunk-3B65XZ6E.js +1 -0
- package/{chunk-5M3BH2HK.js → chunk-3CEJ67I5.js} +1 -1
- package/chunk-3E2EKFPH.js +1 -0
- package/{chunk-XFW6LFAM.js → chunk-3ENMEUVK.js} +1 -1
- package/chunk-3H5KBX4R.js +1 -0
- package/chunk-3XLREP6U.js +297 -0
- package/{chunk-63XPN7AG.js → chunk-4CUA33JH.js} +1 -1
- package/chunk-4NSHHAXV.js +1 -0
- package/{chunk-OVUTH3B6.js → chunk-5AITWOQZ.js} +1 -1
- package/{chunk-VET2QT6C.js → chunk-5QVQY32E.js} +1 -1
- package/chunk-6DPW74DP.js +1 -0
- package/{chunk-FOSJHYSQ.js → chunk-6NCHCAKY.js} +3 -3
- package/{chunk-HBVENULS.js → chunk-7DRL5PZZ.js} +1 -1
- package/chunk-7G6KXHQB.js +1 -0
- package/{chunk-W5VZK5LZ.js → chunk-7KQDKLO4.js} +1 -1
- package/{chunk-VHNXAKFS.js → chunk-7U2775BI.js} +1 -1
- package/{chunk-OPNWLQQY.js → chunk-7U2I35GP.js} +1 -1
- package/{chunk-5MHVGNVO.js → chunk-A47VRZZB.js} +1 -1
- package/{chunk-JWPV2SP2.js → chunk-ACQX2T2H.js} +1 -1
- package/chunk-AG7353CN.js +1 -0
- package/chunk-AI6YS6T2.js +1 -0
- package/{chunk-S6JRFIGG.js → chunk-ANMXAMBL.js} +1 -1
- package/{chunk-K5GIEJY3.js → chunk-ARSLNNKY.js} +4 -4
- package/chunk-AT7II4DO.js +7 -0
- package/{chunk-OUJ6CGAI.js → chunk-BCXNVGDH.js} +1 -1
- package/chunk-BJNN42CI.js +1 -0
- package/chunk-CSQ4MHL2.js +246 -0
- package/chunk-DG6ETDOW.js +1 -0
- package/{chunk-ELUESCCC.js → chunk-DIX7J6JH.js} +1 -1
- package/chunk-DMVAXVYQ.js +1 -0
- package/{chunk-4FHVIHSY.js → chunk-DNSQSWOS.js} +1 -1
- package/chunk-F3PEWQT7.js +1 -0
- package/{chunk-PCZW753D.js → chunk-FTVGAWDW.js} +1 -1
- package/{chunk-M66SFDOI.js → chunk-FUCSF42O.js} +1 -1
- package/chunk-FXUC6M2U.js +1 -0
- package/{chunk-UHDEQNDX.js → chunk-GCGWIESO.js} +1 -1
- package/{chunk-DERWDCI5.js → chunk-GY53MWXH.js} +5 -5
- package/{chunk-FJ7IM55X.js → chunk-H4V6YZX2.js} +1 -1
- package/chunk-IHJLTHHQ.js +1 -0
- package/{chunk-KOC7QQ5A.js → chunk-J6H3BBKP.js} +1 -1
- package/{chunk-5CZUTVXD.js → chunk-JG5HGOEX.js} +1 -1
- package/{chunk-OBBJFGOA.js → chunk-LFDCJISD.js} +1 -1
- package/chunk-LFGL4ACG.css +1 -0
- package/{chunk-JDKSRPMM.js → chunk-LNRTAR2V.js} +1 -1
- package/chunk-LWKS2JEV.js +1 -0
- package/chunk-N2XLL6HJ.js +33 -0
- package/chunk-NM37SDQJ.js +1 -0
- package/chunk-NN6GSTBJ.js +1 -0
- package/chunk-NRULEUE7.js +1 -0
- package/{chunk-4EDEITTK.js → chunk-O2GA6PH7.js} +1 -1
- package/{chunk-PAQGWJ3J.js → chunk-OAD4GTH6.js} +1 -1
- package/chunk-OCIKQOWD.js +328 -0
- package/{chunk-JBLYOAVS.js → chunk-PJKHUCJX.js} +1 -1
- package/chunk-PRRU3DEZ.js +503 -0
- package/{chunk-TO47DVWB.js → chunk-PZBZVQUY.js} +1 -1
- package/chunk-Q2IWISMY.js +1 -0
- package/{chunk-V4MEQMDJ.js → chunk-Q5BXN24W.js} +3 -3
- package/{chunk-EDPSZYHH.js → chunk-QIXIZZPY.js} +1 -1
- package/{chunk-Q3HG4BLC.js → chunk-RANHETC3.js} +2 -2
- package/{chunk-HGUXJRBI.js → chunk-RQEEJGOE.js} +1 -1
- package/{chunk-GO3ETPB7.js → chunk-SGXU6X3O.js} +1 -1
- package/chunk-TDDTBHQE.js +1 -0
- package/{chunk-W56XJVPD.js → chunk-TNWHAKS6.js} +1 -1
- package/{chunk-ZZNYX7MX.js → chunk-TPGKCMVN.js} +1 -1
- package/{chunk-CP57YBBI.js → chunk-TYETQJ2X.js} +2 -2
- package/{chunk-FNWWNWQP.js → chunk-U5LD55IP.js} +1 -1
- package/chunk-U6SRN7P3.js +1 -0
- package/{chunk-CCE4VMYO.js → chunk-V3B32QFK.js} +1 -1
- package/chunk-VBCJCAMN.js +1 -0
- package/chunk-W76GKZZU.js +1 -0
- package/{chunk-Z5SFK23M.js → chunk-WAJWW3TC.js} +1 -1
- package/{chunk-WLFERE5C.js → chunk-WM3NKRKN.js} +1 -1
- package/{chunk-GYOO2JKC.js → chunk-X4EHZEMZ.js} +1 -1
- package/chunk-X5SV4H5B.js +1 -0
- package/chunk-YQFG5XE2.js +1 -0
- package/chunk-YWYF6P7O.js +1 -0
- package/chunk-YYUWLV5N.js +1 -0
- package/{chunk-OWUXXKGD.js → chunk-ZB6TB7JI.js} +3 -3
- package/{chunk-PZRWSIXN.js → chunk-ZPTNYW2S.js} +1 -1
- package/{chunk-7CAU344O.js → chunk-ZUALJ33O.js} +1 -1
- package/index.html +2 -2
- package/main-L6WVDQUB.js +1 -0
- package/main-YYIZ54AR.css +1 -0
- package/package.json +1 -1
- package/styles-7FHABE27.css +1 -0
- package/chunk-2GAPYNNZ.js +0 -1
- package/chunk-2HYLQR56.js +0 -1
- package/chunk-2VTAWSHV.js +0 -1
- package/chunk-3R4UQAEP.js +0 -1
- package/chunk-3SPHZLLV.js +0 -301
- package/chunk-4OHRBQE4.js +0 -1
- package/chunk-4TTJBC5I.js +0 -1
- package/chunk-74EMBNLM.js +0 -1
- package/chunk-75NY4EHJ.js +0 -7
- package/chunk-BS6MB7HD.js +0 -1
- package/chunk-C54Z7Z3J.js +0 -246
- package/chunk-EQDQRRRY.js +0 -1
- package/chunk-GH3BVHFE.js +0 -1
- package/chunk-GYI6FJNZ.js +0 -1
- package/chunk-HF7H6NPN.js +0 -1
- package/chunk-MOGY4H6O.js +0 -1
- package/chunk-PMQ7L7VQ.js +0 -1
- package/chunk-PRVKVHZC.js +0 -1
- package/chunk-QEQCMTMU.js +0 -1
- package/chunk-QMXENXYW.js +0 -1
- package/chunk-R4CV5F66.js +0 -1
- package/chunk-RJZW77TO.js +0 -1
- package/chunk-W37QK7Z5.js +0 -520
- package/chunk-WF2ZEF5P.js +0 -1
- package/chunk-WZ5MSCDB.js +0 -1
- package/chunk-YAEJRHVD.js +0 -1
- package/chunk-ZQKGNYP5.js +0 -297
- package/main-G22CDQKS.js +0 -1
- package/styles-ETBLCGC3.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as et,d as V,f as j,g as N,h as $}from"./chunk-F2X3VGZZ.js";import{f as gt,g as _t,k as Tt}from"./chunk-CP57YBBI.js";import{a as X,m as tt}from"./chunk-DCES5UJV.js";import{$a as pt,Ab as O,Fa as A,Gb as k,I as D,Jb as E,Kb as c,Lb as R,Ob as m,Ub as d,Vb as f,Wb as M,Xb as K,Yb as Q,Z as P,_b as W,ab as Y,ac as vt,ba as b,ca as ut,dc as H,ea as dt,ec as u,fb as a,g,ga as C,ha as p,ia as ht,ib as mt,lb as T,n as lt,pa as z,pc as v,qa as G,r as x,rc as y,s as B,ua as F,ub as J,vb as ft,za as U}from"./chunk-K5GIEJY3.js";import{a as r,b as h}from"./chunk-EQDQRRRY.js";var yt=["toast-component",""];function At(s,n){if(s&1){let t=W();d(0,"button",5),H("click",function(){z(t);let i=u();return G(i.remove())}),d(1,"span",6),v(2,"\xD7"),f()()}}function Ot(s,n){if(s&1&&(K(0),v(1),Q()),s&2){let t=u(2);a(),y("[",t.duplicatesCount+1,"]")}}function Et(s,n){if(s&1&&(d(0,"div"),v(1),O(2,Ot,2,1,"ng-container",4),f()),s&2){let t=u();m(t.options.titleClass),E("aria-label",t.title),a(),y(" ",t.title," "),a(),c("ngIf",t.duplicatesCount)}}function Rt(s,n){if(s&1&&M(0,"div",7),s&2){let t=u();m(t.options.messageClass),c("innerHTML",t.message,Y)}}function Mt(s,n){if(s&1&&(d(0,"div",8),v(1),f()),s&2){let t=u();m(t.options.messageClass),E("aria-label",t.message),a(),y(" ",t.message," ")}}function Ht(s,n){if(s&1&&(d(0,"div"),M(1,"div",9),f()),s&2){let t=u();a(),R("width",t.width()+"%")}}function jt(s,n){if(s&1){let t=W();d(0,"button",5),H("click",function(){z(t);let i=u();return G(i.remove())}),d(1,"span",6),v(2,"\xD7"),f()()}}function Nt(s,n){if(s&1&&(K(0),v(1),Q()),s&2){let t=u(2);a(),y("[",t.duplicatesCount+1,"]")}}function St(s,n){if(s&1&&(d(0,"div"),v(1),O(2,Nt,2,1,"ng-container",4),f()),s&2){let t=u();m(t.options.titleClass),E("aria-label",t.title),a(),y(" ",t.title," "),a(),c("ngIf",t.duplicatesCount)}}function Bt(s,n){if(s&1&&M(0,"div",7),s&2){let t=u();m(t.options.messageClass),c("innerHTML",t.message,Y)}}function Pt(s,n){if(s&1&&(d(0,"div",8),v(1),f()),s&2){let t=u();m(t.options.messageClass),E("aria-label",t.message),a(),y(" ",t.message," ")}}function Ft(s,n){if(s&1&&(d(0,"div"),M(1,"div",9),f()),s&2){let t=u();a(),R("width",t.width()+"%")}}var it=class{_attachedHost;component;viewContainerRef;injector;constructor(n,t){this.component=n,this.injector=t}attach(n,t){return this._attachedHost=n,n.attach(this,t)}detach(){let n=this._attachedHost;if(n)return this._attachedHost=void 0,n.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(n){this._attachedHost=n}},st=class{_attachedPortal;_disposeFn;attach(n,t){return this._attachedPortal=n,this.attachComponentPortal(n,t)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(n){this._disposeFn=n}},nt=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new g;_activate=new g;_manualClose=new g;_resetTimeout=new g;_countDuplicate=new g;constructor(n){this._overlayRef=n}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(n,t){n&&this._resetTimeout.next(),t&&this._countDuplicate.next(++this.duplicatesCount)}},I=class{toastId;config;message;title;toastType;toastRef;_onTap=new g;_onAction=new g;constructor(n,t,e,i,o,l){this.toastId=n,this.config=t,this.message=e,this.title=i,this.toastType=o,this.toastRef=l,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(n){this._onAction.next(n)}onAction(){return this._onAction.asObservable()}},bt={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"},Ct=new dt("ToastConfig"),ot=class extends st{_hostDomElement;_componentFactoryResolver;_appRef;constructor(n,t,e){super(),this._hostDomElement=n,this._componentFactoryResolver=t,this._appRef=e}attachComponentPortal(n,t){let e=this._componentFactoryResolver.resolveComponentFactory(n.component),i;return i=e.create(n.injector),this._appRef.attachView(i.hostView),this.setDisposeFn(()=>{this._appRef.detachView(i.hostView),i.destroy()}),t?this._hostDomElement.insertBefore(this._getComponentRootNode(i),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(i)),i}_getComponentRootNode(n){return n.hostView.rootNodes[0]}},kt=(()=>{class s{_document=p(X);_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||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),at=class{_portalHost;constructor(n){this._portalHost=n}attach(n,t=!0){return this._portalHost.attach(n,t)}detach(){return this._portalHost.detach()}},Vt=(()=>{class s{_overlayContainer=p(kt);_componentFactoryResolver=p(mt);_appRef=p(k);_document=p(X);_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 i=this._document.createElement("div");return i.id="toast-container",i.classList.add(t),i.classList.add("toast-container"),e?e.getContainerElement().appendChild(i):this._overlayContainer.getContainerElement().appendChild(i),i}_createPortalHost(t){return new ot(t,this._componentFactoryResolver,this._appRef)}_createOverlayRef(t){return new at(this._createPortalHost(t))}static \u0275fac=function(e){return new(e||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),L=(()=>{class s{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(t,e,i,o,l){this.overlay=e,this._injector=i,this.sanitizer=o,this.ngZone=l,this.toastrConfig=r(r({},t.default),t.config),t.config.iconClasses&&(this.toastrConfig.iconClasses=r(r({},t.default.iconClasses),t.config.iconClasses))}show(t,e,i={},o=""){return this._preBuildNotification(o,t,e,this.applyConfig(i))}success(t,e,i={}){let o=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(o,t,e,this.applyConfig(i))}error(t,e,i={}){let o=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(o,t,e,this.applyConfig(i))}info(t,e,i={}){let o=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(o,t,e,this.applyConfig(i))}warning(t,e,i={}){let o=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(o,t,e,this.applyConfig(i))}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 i=this.toasts[this.currentlyActive].toastRef;i.isInactive()||(this.currentlyActive=this.currentlyActive+1,i.activate())}return!0}findDuplicate(t="",e="",i,o){let{includeTitleDuplicates:l}=this.toastrConfig;for(let _ of this.toasts){let S=l&&_.title===t;if((!l||S)&&_.message===e)return _.toastRef.onDuplicate(i,o),_}return null}applyConfig(t={}){return r(r({},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,i,o){return o.onActivateTick?this.ngZone.run(()=>this._buildNotification(t,e,i,o)):this._buildNotification(t,e,i,o)}_buildNotification(t,e,i,o){if(!o.toastComponent)throw new Error("toastComponent required");let l=this.findDuplicate(i,e,this.toastrConfig.resetTimeoutOnDuplicate&&o.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&i||e)&&this.toastrConfig.preventDuplicates&&l!==null)return l;this.previousToastMessage=e;let _=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(_=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let S=this.overlay.create(o.positionClass,this.overlayContainer);this.index=this.index+1;let rt=e;e&&o.enableHtml&&(rt=this.sanitizer.sanitize(pt.HTML,e));let w=new nt(S),Z=new I(this.index,o,rt,i,t,w),It=[{provide:I,useValue:Z}],wt=F.create({providers:It,parent:this._injector}),xt=new it(o.toastComponent,wt),ct=S.attach(xt,o.newestOnTop);w.componentInstance=ct.instance;let q={toastId:this.index,title:i||"",message:e||"",toastRef:w,onShown:w.afterActivate(),onHidden:w.afterClosed(),onTap:Z.onTap(),onAction:Z.onAction(),portal:ct};return _||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{q.toastRef.activate()})),this.toasts.push(q),q}static \u0275fac=function(e){return new(e||s)(C(Ct),C(Vt),C(F),C(Tt),C(U))};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),$t=(()=>{class s{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=A(-1);toastClasses="";state;get _state(){return this.state()}get displayStyle(){if(this.state().value==="inactive")return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,i){this.toastrService=t,this.toastPackage=e,this.ngZone=i,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(o=>{this.duplicatesCount=o}),this.state=A({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.update(t=>h(r({},t),{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.set(e/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(i=>100-i),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.update(t=>h(r({},t),{value:"active"})),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){this.state().value!=="removed"&&(clearTimeout(this.timeout),this.state.update(t=>h(r({},t),{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.set(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.set(-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||s)(T(L),T(I),T(U))};static \u0275cmp=J({type:s,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(e,i){e&1&&H("click",function(){return i.tapToast()})("mouseenter",function(){return i.stickAround()})("mouseleave",function(){return i.delayedHideToast()}),e&2&&(vt("@flyInOut",i._state),m(i.toastClasses),R("display",i.displayStyle))},attrs:yt,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,i){e&1&&O(0,At,3,0,"button",0)(1,Et,3,5,"div",1)(2,Rt,1,3,"div",2)(3,Mt,2,4,"div",3)(4,Ht,2,2,"div",4),e&2&&(c("ngIf",i.options.closeButton),a(),c("ngIf",i.title),a(),c("ngIf",i.message&&i.options.enableHtml),a(),c("ngIf",i.message&&!i.options.enableHtml),a(),c("ngIf",i.options.progressBar))},dependencies:[tt],encapsulation:2,data:{animation:[et("flyInOut",[N("inactive",j({opacity:0})),N("active",j({opacity:1})),N("removed",j({opacity:0})),$("inactive => active",V("{{ easeTime }}ms {{ easing }}")),$("active => removed",V("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return s})(),Lt=h(r({},bt),{toastComponent:$t}),Zt=(s={})=>ht([{provide:Ct,useValue:{default:Lt,config:s}}]),ye=(()=>{class s{static forRoot(t={}){return{ngModule:s,providers:[Zt(t)]}}static \u0275fac=function(e){return new(e||s)};static \u0275mod=ft({type:s});static \u0275inj=ut({})}return s})();var qt=(()=>{class s{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=A(-1);toastClasses="";get displayStyle(){return this.state()==="inactive"?"none":null}state=A("inactive");timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,i){this.toastrService=t,this.toastPackage=e,this.appRef=i,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(o=>{this.duplicatesCount=o})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.set("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.set(e/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(i=>100-i),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.set("active"),this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=new Date().getTime()+(this.originalTimeout||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.state.set("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.set(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.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}static \u0275fac=function(e){return new(e||s)(T(L),T(I),T(k))};static \u0275cmp=J({type:s,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(e,i){e&1&&H("click",function(){return i.tapToast()})("mouseenter",function(){return i.stickAround()})("mouseleave",function(){return i.delayedHideToast()}),e&2&&(m(i.toastClasses),R("display",i.displayStyle))},attrs:yt,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,i){e&1&&O(0,jt,3,0,"button",0)(1,St,3,5,"div",1)(2,Bt,1,3,"div",2)(3,Pt,2,4,"div",3)(4,Ft,2,2,"div",4),e&2&&(c("ngIf",i.options.closeButton),a(),c("ngIf",i.title),a(),c("ngIf",i.message&&i.options.enableHtml),a(),c("ngIf",i.message&&!i.options.enableHtml),a(),c("ngIf",i.options.progressBar))},dependencies:[tt],encapsulation:2,changeDetection:0})}return s})(),be=h(r({},bt),{toastComponent:qt});var Ee=(()=>{class s{constructor(){this.httpClient=p(_t),this.toastr=p(L),this.requestTimeout=1e4}get(t="",e,i={}){return this.httpClient.get(`${t}${e}`,i).pipe(x(this.requestTimeout),D(this.handleError.bind(this)))}post(t="",e,i,o={}){return this.httpClient.post(`${t}${e}`,i,r({observe:"response"},o)).pipe(x(this.requestTimeout),P(this.handleResponse.bind(this)),B(l=>l.body),D(this.handleError.bind(this)))}put(t="",e,i,o={}){return this.httpClient.put(`${t}${e}`,i,h(r({},o),{observe:"response"})).pipe(x(this.requestTimeout),P(this.handleResponse.bind(this)),B(l=>l.body),D(this.handleError.bind(this)))}delete(t="",e,i={}){return this.httpClient.delete(`${t}${e}`,h(r({},i),{observe:"response"})).pipe(x(this.requestTimeout),P(this.handleResponse.bind(this)),B(o=>o.body),D(this.handleError.bind(this)))}handleResponse(t){if(t.status===200&&t.body){let e=t.body.message;e&&this.toastr.success(e,"Success")}}handleError(t){let e={header:"API Error",message:"An unknown error occurred"};return t instanceof gt&&(t.status===504?(e.message=t.statusText||"Gateway Timeout",e.header=`API Error: ${t.status}`):(e.header=`API Error: ${t.status}`,e.message=t.error&&(t.error.Message||t.error.message||t.error.error)||t.message)),this.toastr.error(e.message,e.header),lt(()=>e)}static{this.\u0275fac=function(e){return new(e||s)}}static{this.\u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();export{L as a,Zt as b,ye as c,Ee as d};
|
|
1
|
+
import{c as et,d as V,f as j,g as N,h as $}from"./chunk-F2X3VGZZ.js";import{g as gt,h as _t,l as Tt}from"./chunk-TYETQJ2X.js";import{a as X,m as tt}from"./chunk-353U23ZQ.js";import{$b as W,Aa as U,Bb as O,Ga as A,Hb as k,I as D,Kb as R,Lb as c,Mb as E,Pb as m,Vb as d,Wb as f,Xb as M,Yb as K,Z as P,Zb as Q,ab as pt,ba as b,bb as Y,bc as vt,ca as ut,ea as dt,ec as H,fc as u,g,ga as C,gb as a,ha as p,ia as ht,jb as mt,mb as T,n as lt,pa as z,qa as G,qc as v,r as x,s as B,sc as y,va as F,vb as J,wb as ft}from"./chunk-ARSLNNKY.js";import{a as r,b as h}from"./chunk-YQFG5XE2.js";var yt=["toast-component",""];function At(s,n){if(s&1){let t=W();d(0,"button",5),H("click",function(){z(t);let i=u();return G(i.remove())}),d(1,"span",6),v(2,"\xD7"),f()()}}function Ot(s,n){if(s&1&&(K(0),v(1),Q()),s&2){let t=u(2);a(),y("[",t.duplicatesCount+1,"]")}}function Rt(s,n){if(s&1&&(d(0,"div"),v(1),O(2,Ot,2,1,"ng-container",4),f()),s&2){let t=u();m(t.options.titleClass),R("aria-label",t.title),a(),y(" ",t.title," "),a(),c("ngIf",t.duplicatesCount)}}function Et(s,n){if(s&1&&M(0,"div",7),s&2){let t=u();m(t.options.messageClass),c("innerHTML",t.message,Y)}}function Mt(s,n){if(s&1&&(d(0,"div",8),v(1),f()),s&2){let t=u();m(t.options.messageClass),R("aria-label",t.message),a(),y(" ",t.message," ")}}function Ht(s,n){if(s&1&&(d(0,"div"),M(1,"div",9),f()),s&2){let t=u();a(),E("width",t.width()+"%")}}function jt(s,n){if(s&1){let t=W();d(0,"button",5),H("click",function(){z(t);let i=u();return G(i.remove())}),d(1,"span",6),v(2,"\xD7"),f()()}}function Nt(s,n){if(s&1&&(K(0),v(1),Q()),s&2){let t=u(2);a(),y("[",t.duplicatesCount+1,"]")}}function St(s,n){if(s&1&&(d(0,"div"),v(1),O(2,Nt,2,1,"ng-container",4),f()),s&2){let t=u();m(t.options.titleClass),R("aria-label",t.title),a(),y(" ",t.title," "),a(),c("ngIf",t.duplicatesCount)}}function Bt(s,n){if(s&1&&M(0,"div",7),s&2){let t=u();m(t.options.messageClass),c("innerHTML",t.message,Y)}}function Pt(s,n){if(s&1&&(d(0,"div",8),v(1),f()),s&2){let t=u();m(t.options.messageClass),R("aria-label",t.message),a(),y(" ",t.message," ")}}function Ft(s,n){if(s&1&&(d(0,"div"),M(1,"div",9),f()),s&2){let t=u();a(),E("width",t.width()+"%")}}var it=class{_attachedHost;component;viewContainerRef;injector;constructor(n,t){this.component=n,this.injector=t}attach(n,t){return this._attachedHost=n,n.attach(this,t)}detach(){let n=this._attachedHost;if(n)return this._attachedHost=void 0,n.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(n){this._attachedHost=n}},st=class{_attachedPortal;_disposeFn;attach(n,t){return this._attachedPortal=n,this.attachComponentPortal(n,t)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(n){this._disposeFn=n}},nt=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new g;_activate=new g;_manualClose=new g;_resetTimeout=new g;_countDuplicate=new g;constructor(n){this._overlayRef=n}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(n,t){n&&this._resetTimeout.next(),t&&this._countDuplicate.next(++this.duplicatesCount)}},I=class{toastId;config;message;title;toastType;toastRef;_onTap=new g;_onAction=new g;constructor(n,t,e,i,o,l){this.toastId=n,this.config=t,this.message=e,this.title=i,this.toastType=o,this.toastRef=l,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(n){this._onAction.next(n)}onAction(){return this._onAction.asObservable()}},bt={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"},Ct=new dt("ToastConfig"),ot=class extends st{_hostDomElement;_componentFactoryResolver;_appRef;constructor(n,t,e){super(),this._hostDomElement=n,this._componentFactoryResolver=t,this._appRef=e}attachComponentPortal(n,t){let e=this._componentFactoryResolver.resolveComponentFactory(n.component),i;return i=e.create(n.injector),this._appRef.attachView(i.hostView),this.setDisposeFn(()=>{this._appRef.detachView(i.hostView),i.destroy()}),t?this._hostDomElement.insertBefore(this._getComponentRootNode(i),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(i)),i}_getComponentRootNode(n){return n.hostView.rootNodes[0]}},kt=(()=>{class s{_document=p(X);_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||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),at=class{_portalHost;constructor(n){this._portalHost=n}attach(n,t=!0){return this._portalHost.attach(n,t)}detach(){return this._portalHost.detach()}},Vt=(()=>{class s{_overlayContainer=p(kt);_componentFactoryResolver=p(mt);_appRef=p(k);_document=p(X);_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 i=this._document.createElement("div");return i.id="toast-container",i.classList.add(t),i.classList.add("toast-container"),e?e.getContainerElement().appendChild(i):this._overlayContainer.getContainerElement().appendChild(i),i}_createPortalHost(t){return new ot(t,this._componentFactoryResolver,this._appRef)}_createOverlayRef(t){return new at(this._createPortalHost(t))}static \u0275fac=function(e){return new(e||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),L=(()=>{class s{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(t,e,i,o,l){this.overlay=e,this._injector=i,this.sanitizer=o,this.ngZone=l,this.toastrConfig=r(r({},t.default),t.config),t.config.iconClasses&&(this.toastrConfig.iconClasses=r(r({},t.default.iconClasses),t.config.iconClasses))}show(t,e,i={},o=""){return this._preBuildNotification(o,t,e,this.applyConfig(i))}success(t,e,i={}){let o=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(o,t,e,this.applyConfig(i))}error(t,e,i={}){let o=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(o,t,e,this.applyConfig(i))}info(t,e,i={}){let o=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(o,t,e,this.applyConfig(i))}warning(t,e,i={}){let o=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(o,t,e,this.applyConfig(i))}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 i=this.toasts[this.currentlyActive].toastRef;i.isInactive()||(this.currentlyActive=this.currentlyActive+1,i.activate())}return!0}findDuplicate(t="",e="",i,o){let{includeTitleDuplicates:l}=this.toastrConfig;for(let _ of this.toasts){let S=l&&_.title===t;if((!l||S)&&_.message===e)return _.toastRef.onDuplicate(i,o),_}return null}applyConfig(t={}){return r(r({},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,i,o){return o.onActivateTick?this.ngZone.run(()=>this._buildNotification(t,e,i,o)):this._buildNotification(t,e,i,o)}_buildNotification(t,e,i,o){if(!o.toastComponent)throw new Error("toastComponent required");let l=this.findDuplicate(i,e,this.toastrConfig.resetTimeoutOnDuplicate&&o.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&i||e)&&this.toastrConfig.preventDuplicates&&l!==null)return l;this.previousToastMessage=e;let _=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(_=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let S=this.overlay.create(o.positionClass,this.overlayContainer);this.index=this.index+1;let rt=e;e&&o.enableHtml&&(rt=this.sanitizer.sanitize(pt.HTML,e));let w=new nt(S),Z=new I(this.index,o,rt,i,t,w),It=[{provide:I,useValue:Z}],wt=F.create({providers:It,parent:this._injector}),xt=new it(o.toastComponent,wt),ct=S.attach(xt,o.newestOnTop);w.componentInstance=ct.instance;let q={toastId:this.index,title:i||"",message:e||"",toastRef:w,onShown:w.afterActivate(),onHidden:w.afterClosed(),onTap:Z.onTap(),onAction:Z.onAction(),portal:ct};return _||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{q.toastRef.activate()})),this.toasts.push(q),q}static \u0275fac=function(e){return new(e||s)(C(Ct),C(Vt),C(F),C(Tt),C(U))};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),$t=(()=>{class s{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=A(-1);toastClasses="";state;get _state(){return this.state()}get displayStyle(){if(this.state().value==="inactive")return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,i){this.toastrService=t,this.toastPackage=e,this.ngZone=i,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(o=>{this.duplicatesCount=o}),this.state=A({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.update(t=>h(r({},t),{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.set(e/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(i=>100-i),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.update(t=>h(r({},t),{value:"active"})),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){this.state().value!=="removed"&&(clearTimeout(this.timeout),this.state.update(t=>h(r({},t),{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.set(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.set(-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||s)(T(L),T(I),T(U))};static \u0275cmp=J({type:s,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(e,i){e&1&&H("click",function(){return i.tapToast()})("mouseenter",function(){return i.stickAround()})("mouseleave",function(){return i.delayedHideToast()}),e&2&&(vt("@flyInOut",i._state),m(i.toastClasses),E("display",i.displayStyle))},attrs:yt,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,i){e&1&&O(0,At,3,0,"button",0)(1,Rt,3,5,"div",1)(2,Et,1,3,"div",2)(3,Mt,2,4,"div",3)(4,Ht,2,2,"div",4),e&2&&(c("ngIf",i.options.closeButton),a(),c("ngIf",i.title),a(),c("ngIf",i.message&&i.options.enableHtml),a(),c("ngIf",i.message&&!i.options.enableHtml),a(),c("ngIf",i.options.progressBar))},dependencies:[tt],encapsulation:2,data:{animation:[et("flyInOut",[N("inactive",j({opacity:0})),N("active",j({opacity:1})),N("removed",j({opacity:0})),$("inactive => active",V("{{ easeTime }}ms {{ easing }}")),$("active => removed",V("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return s})(),Lt=h(r({},bt),{toastComponent:$t}),Zt=(s={})=>ht([{provide:Ct,useValue:{default:Lt,config:s}}]),ye=(()=>{class s{static forRoot(t={}){return{ngModule:s,providers:[Zt(t)]}}static \u0275fac=function(e){return new(e||s)};static \u0275mod=ft({type:s});static \u0275inj=ut({})}return s})();var qt=(()=>{class s{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=A(-1);toastClasses="";get displayStyle(){return this.state()==="inactive"?"none":null}state=A("inactive");timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,i){this.toastrService=t,this.toastPackage=e,this.appRef=i,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(o=>{this.duplicatesCount=o})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.set("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.set(e/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(i=>100-i),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.set("active"),this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=new Date().getTime()+(this.originalTimeout||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.state.set("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.set(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.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}static \u0275fac=function(e){return new(e||s)(T(L),T(I),T(k))};static \u0275cmp=J({type:s,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(e,i){e&1&&H("click",function(){return i.tapToast()})("mouseenter",function(){return i.stickAround()})("mouseleave",function(){return i.delayedHideToast()}),e&2&&(m(i.toastClasses),E("display",i.displayStyle))},attrs:yt,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,i){e&1&&O(0,jt,3,0,"button",0)(1,St,3,5,"div",1)(2,Bt,1,3,"div",2)(3,Pt,2,4,"div",3)(4,Ft,2,2,"div",4),e&2&&(c("ngIf",i.options.closeButton),a(),c("ngIf",i.title),a(),c("ngIf",i.message&&i.options.enableHtml),a(),c("ngIf",i.message&&!i.options.enableHtml),a(),c("ngIf",i.options.progressBar))},dependencies:[tt],encapsulation:2,changeDetection:0})}return s})(),be=h(r({},bt),{toastComponent:qt});var Re=(()=>{class s{constructor(){this.httpClient=p(_t),this.toastr=p(L),this.requestTimeout=1e4}get(t="",e,i={}){return this.httpClient.get(`${t}${e}`,i).pipe(x(this.requestTimeout),D(this.handleError.bind(this)))}post(t="",e,i,o={}){return this.httpClient.post(`${t}${e}`,i,r({observe:"response"},o)).pipe(x(this.requestTimeout),P(this.handleResponse.bind(this)),B(l=>l.body),D(this.handleError.bind(this)))}put(t="",e,i,o={}){return this.httpClient.put(`${t}${e}`,i,h(r({},o),{observe:"response"})).pipe(x(this.requestTimeout),P(this.handleResponse.bind(this)),B(l=>l.body),D(this.handleError.bind(this)))}delete(t="",e,i={}){return this.httpClient.delete(`${t}${e}`,h(r({},i),{observe:"response"})).pipe(x(this.requestTimeout),P(this.handleResponse.bind(this)),B(o=>o.body),D(this.handleError.bind(this)))}handleResponse(t){if(t.status===200&&t.body){let e=t.body.message;e&&this.toastr.success(e,"Success")}}handleError(t){let e={header:"API Error",message:"An unknown error occurred"};if(t instanceof gt)switch(t.status){case 0:e.message="CORS error: Request blocked or server not responding with proper CORS headers",e.header="CORS Error";break;case 504:e.message=t.statusText||"Gateway Timeout",e.header=`API Error: ${t.status}`;break;default:e.header=`API Error: ${t.status}`,e.message=t.error&&(t.error.Message||t.error.message||t.error.error)||t.message}return this.toastr.error(e.message,e.header),lt(()=>e)}static{this.\u0275fac=function(e){return new(e||s)}}static{this.\u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();export{L as a,Zt as b,ye as c,Re as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as ge}from"./chunk-353U23ZQ.js";import{$ as k,Db as Re,Ea as P,Ga as b,Kb as ce,Nb as he,Qc as je,Vc as fe,Xc as p,Yc as M,Zc as Te,aa as h,ba as ue,ca as W,ea as V,ec as E,g as Se,ha as q,i as Ie,l as Oe,lb as R,mb as s,na as ke,oa as w,s as Ne,ta as D,va as de,wa as Pe,wb as z,xb as l,y as xe,yc as f,za as y,zb as u}from"./chunk-ARSLNNKY.js";import{a as c,b as g}from"./chunk-YQFG5XE2.js";var Ze=(()=>{class n{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,i){this._renderer=e,this._elementRef=i}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(i){return new(i||n)(s(R),s(P))};static \u0275dir=l({type:n})}return n})(),ve=(()=>{class n extends Ze{static \u0275fac=(()=>{let e;return function(r){return(e||(e=D(n)))(r||n)}})();static \u0275dir=l({type:n,features:[u]})}return n})(),N=new V("");var Vt={provide:N,useExisting:h(()=>Xe),multi:!0};function Dt(){let n=ge()?ge().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var bt=new V(""),Xe=(()=>{class n extends Ze{_compositionMode;_composing=!1;constructor(e,i,r){super(e,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!Dt())}writeValue(e){let i=e??"";this.setProperty("value",i)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(i){return new(i||n)(s(R),s(P),s(bt,8))};static \u0275dir=l({type:n,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(i,r){i&1&&E("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)})},standalone:!1,features:[f([Vt]),u]})}return n})();function ye(n){return n==null||Ce(n)===0}function Ce(n){return n==null?null:Array.isArray(n)||typeof n=="string"?n.length:n instanceof Set?n.size:null}var v=new V(""),A=new V(""),Mt=/^(?=.{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])?)*$/,Ge=class{static min(t){return At(t)}static max(t){return wt(t)}static required(t){return Ye(t)}static requiredTrue(t){return Et(t)}static email(t){return Ft(t)}static minLength(t){return St(t)}static maxLength(t){return Ke(t)}static pattern(t){return It(t)}static nullValidator(t){return X()}static compose(t){return it(t)}static composeAsync(t){return rt(t)}};function At(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function wt(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function Ye(n){return ye(n.value)?{required:!0}:null}function Et(n){return n.value===!0?null:{required:!0}}function Ft(n){return ye(n.value)||Mt.test(n.value)?null:{email:!0}}function St(n){return t=>{let e=t.value?.length??Ce(t.value);return e===null||e===0?null:e<n?{minlength:{requiredLength:n,actualLength:e}}:null}}function Ke(n){return t=>{let e=t.value?.length??Ce(t.value);return e!==null&&e>n?{maxlength:{requiredLength:n,actualLength:e}}:null}}function It(n){if(!n)return X;let t,e;return typeof n=="string"?(e="",n.charAt(0)!=="^"&&(e+="^"),e+=n,n.charAt(n.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(ye(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function X(n){return null}function Je(n){return n!=null}function Qe(n){return Re(n)?Oe(n):n}function et(n){let t={};return n.forEach(e=>{t=e!=null?c(c({},t),e):t}),Object.keys(t).length===0?null:t}function tt(n,t){return t.map(e=>e(n))}function Ot(n){return!n.validate}function nt(n){return n.map(t=>Ot(t)?t:e=>t.validate(e))}function it(n){if(!n)return null;let t=n.filter(Je);return t.length==0?null:function(e){return et(tt(e,t))}}function Ve(n){return n!=null?it(nt(n)):null}function rt(n){if(!n)return null;let t=n.filter(Je);return t.length==0?null:function(e){let i=tt(e,t).map(Qe);return xe(i).pipe(Ne(et))}}function De(n){return n!=null?rt(nt(n)):null}function Ue(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function ot(n){return n._rawValidators}function st(n){return n._rawAsyncValidators}function pe(n){return n?Array.isArray(n)?n:[n]:[]}function Y(n,t){return Array.isArray(n)?n.includes(t):n===t}function Be(n,t){let e=pe(t);return pe(n).forEach(r=>{Y(e,r)||e.push(r)}),e}function He(n,t){return pe(t).filter(e=>!Y(n,e))}var K=class{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}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=Ve(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=De(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,e){return this.control?this.control.hasError(t,e):!1}getError(t,e){return this.control?this.control.getError(t,e):null}},d=class extends K{name;get formDirective(){return null}get path(){return null}},_=class extends K{_parent=null;name=null;valueAccessor=null},J=class{_cd;constructor(t){this._cd=t}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},Nt={"[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"},In=g(c({},Nt),{"[class.ng-submitted]":"isSubmitted"}),On=(()=>{class n extends J{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(s(_,2))};static \u0275dir=l({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&he("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[u]})}return n})(),Nn=(()=>{class n extends J{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(s(d,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){i&2&&he("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},standalone:!1,features:[u]})}return n})();var j="VALID",Z="INVALID",F="PENDING",T="DISABLED",C=class{},Q=class extends C{value;source;constructor(t,e){super(),this.value=t,this.source=e}},U=class extends C{pristine;source;constructor(t,e){super(),this.pristine=t,this.source=e}},B=class extends C{touched;source;constructor(t,e){super(),this.touched=t,this.source=e}},S=class extends C{status;source;constructor(t,e){super(),this.status=t,this.source=e}},ee=class extends C{source;constructor(t){super(),this.source=t}},te=class extends C{source;constructor(t){super(),this.source=t}};function be(n){return(oe(n)?n.validators:n)||null}function xt(n){return Array.isArray(n)?Ve(n):n||null}function Me(n,t){return(oe(t)?t.asyncValidators:n)||null}function kt(n){return Array.isArray(n)?De(n):n||null}function oe(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function at(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new k(1e3,"");if(!i[e])throw new k(1001,"")}function lt(n,t,e){n._forEachChild((i,r)=>{if(e[r]===void 0)throw new k(1002,"")})}var I=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(t,e){this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return p(this.statusReactive)}set status(t){p(()=>this.statusReactive.set(t))}_status=M(()=>this.statusReactive());statusReactive=b(void 0);get valid(){return this.status===j}get invalid(){return this.status===Z}get pending(){return this.status==F}get disabled(){return this.status===T}get enabled(){return this.status!==T}errors;get pristine(){return p(this.pristineReactive)}set pristine(t){p(()=>this.pristineReactive.set(t))}_pristine=M(()=>this.pristineReactive());pristineReactive=b(!0);get dirty(){return!this.pristine}get touched(){return p(this.touchedReactive)}set touched(t){p(()=>this.touchedReactive.set(t))}_touched=M(()=>this.touchedReactive());touchedReactive=b(!1);get untouched(){return!this.touched}_events=new Se;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(Be(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Be(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(He(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(He(t,this._rawAsyncValidators))}hasValidator(t){return Y(this._rawValidators,t)}hasAsyncValidator(t){return Y(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let e=this.touched===!1;this.touched=!0;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched(g(c({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new B(!0,i))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t))}markAsUntouched(t={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:i})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,i),e&&t.emitEvent!==!1&&this._events.next(new B(!1,i))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty(g(c({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new U(!1,i))}markAsPristine(t={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,i),e&&t.emitEvent!==!1&&this._events.next(new U(!0,i))}markAsPending(t={}){this.status=F;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new S(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending(g(c({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=T,this.errors=null,this._forEachChild(r=>{r.disable(g(c({},t),{onlySelf:!0}))}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Q(this.value,i)),this._events.next(new S(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(g(c({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=j,this._forEachChild(i=>{i.enable(g(c({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(g(c({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t,e){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===j||this.status===F)&&this._runAsyncValidator(i,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Q(this.value,e)),this._events.next(new S(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(g(c({},t),{sourceControl:e}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?T:j}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=F,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1};let i=Qe(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){let i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new S(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i)}_initObservables(){this.valueChanges=new y,this.statusChanges=new y}_calculateStatus(){return this._allControlsDisabled()?T:this.errors?Z:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(F)?F:this._anyControlsHaveStatus(Z)?Z:j}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,e),r&&this._events.next(new U(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new B(this.touched,e)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,e)}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){oe(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let e=this._parent&&this._parent.dirty;return!t&&!!e&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=xt(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=kt(this._rawAsyncValidators)}},O=class extends I{constructor(t,e,i){super(be(e),Me(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){lt(this,!0,t),Object.keys(t).forEach(i=>{at(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(i=>{let r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t?t[r]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>i._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,o)=>{i=e(i,r,o)}),i}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var me=class extends O{};var x=new V("",{providedIn:"root",factory:()=>se}),se="always";function ae(n,t){return[...t.path,n]}function L(n,t,e=se){Ae(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),Rt(n,t),Tt(n,t),jt(n,t),Pt(n,t)}function ne(n,t,e=!0){let i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),re(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function ie(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function Pt(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}function Ae(n,t){let e=ot(n);t.validator!==null?n.setValidators(Ue(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=st(n);t.asyncValidator!==null?n.setAsyncValidators(Ue(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();ie(t._rawValidators,r),ie(t._rawAsyncValidators,r)}function re(n,t){let e=!1;if(n!==null){if(t.validator!==null){let r=ot(n);if(Array.isArray(r)&&r.length>0){let o=r.filter(a=>a!==t.validator);o.length!==r.length&&(e=!0,n.setValidators(o))}}if(t.asyncValidator!==null){let r=st(n);if(Array.isArray(r)&&r.length>0){let o=r.filter(a=>a!==t.asyncValidator);o.length!==r.length&&(e=!0,n.setAsyncValidators(o))}}}let i=()=>{};return ie(t._rawValidators,i),ie(t._rawAsyncValidators,i),e}function Rt(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&ut(n,t)})}function jt(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&ut(n,t),n.updateOn!=="submit"&&n.markAsTouched()})}function ut(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function Tt(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}function dt(n,t){n==null,Ae(n,t)}function Gt(n,t){return re(n,t)}function we(n,t){if(!n.hasOwnProperty("model"))return!1;let e=n.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function Ut(n){return Object.getPrototypeOf(n.constructor)===ve}function ct(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function Ee(n,t){if(!t)return null;Array.isArray(t);let e,i,r;return t.forEach(o=>{o.constructor===Xe?e=o:Ut(o)?i=o:r=o}),r||i||e||null}function Bt(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}var Ht={provide:d,useExisting:h(()=>Lt)},G=Promise.resolve(),Lt=(()=>{class n extends d{callSetDisabledState;get submitted(){return p(this.submittedReactive)}_submitted=M(()=>this.submittedReactive());submittedReactive=b(!1);_directives=new Set;form;ngSubmit=new y;options;constructor(e,i,r){super(),this.callSetDisabledState=r,this.form=new O({},Ve(e),De(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){G.then(()=>{let i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),L(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){G.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){G.then(()=>{let i=this._findContainer(e.path),r=new O({});dt(r,e),i.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){G.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){G.then(()=>{this.form.get(e.path).setValue(i)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),ct(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new ee(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1),this.form._events.next(new te(this.form))}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(i){return new(i||n)(s(v,10),s(A,10),s(x,8))};static \u0275dir=l({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(i,r){i&1&&E("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[f([Ht]),u]})}return n})();function Le(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function $e(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var H=class extends I{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(t=null,e,i){super(be(e),Me(i,e)),this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),oe(e)&&(e.nonNullable||e.initialValueIsDefault)&&($e(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){Le(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Le(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){$e(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}};var $t=n=>n instanceof H,Wt=(()=>{class n extends d{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return ae(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let e;return function(r){return(e||(e=D(n)))(r||n)}})();static \u0275dir=l({type:n,standalone:!1,features:[u]})}return n})();var qt={provide:_,useExisting:h(()=>zt)},We=Promise.resolve(),zt=(()=>{class n extends _{_changeDetectorRef;callSetDisabledState;control=new H;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new y;constructor(e,i,r,o,a,m){super(),this._changeDetectorRef=a,this.callSetDisabledState=m,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=Ee(this,o)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),we(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){L(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){We.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&fe(i);We.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?ae(e,this._parent):[e]}static \u0275fac=function(i){return new(i||n)(s(d,9),s(v,10),s(A,10),s(N,10),s(je,8),s(x,8))};static \u0275dir=l({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[f([qt]),u,w]})}return n})();var kn=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275dir=l({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return n})();var Fe=new V(""),Zt={provide:_,useExisting:h(()=>Xt)},Xt=(()=>{class n extends _{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new y;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,o,a){super(),this._ngModelWarningConfig=o,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=Ee(this,r)}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&ne(i,this,!1),L(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}we(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&ne(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}static \u0275fac=function(i){return new(i||n)(s(v,10),s(A,10),s(N,10),s(Fe,8),s(x,8))};static \u0275dir=l({type:n,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[f([Zt]),u,w]})}return n})(),Yt={provide:d,useExisting:h(()=>ht)},ht=(()=>{class n extends d{callSetDisabledState;get submitted(){return p(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=M(()=>this._submittedReactive());_submittedReactive=b(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new y;constructor(e,i,r){super(),this.callSetDisabledState=r,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(re(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let i=this.form.get(e.path);return L(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){ne(e.control||null,e,!1),Bt(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this._submittedReactive.set(!0),ct(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new ee(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this._submittedReactive.set(!1),this.form._events.next(new te(this.form))}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(ne(i||null,e),$t(r)&&(L(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);dt(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let i=this.form.get(e.path);i&&Gt(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){Ae(this.form,this),this._oldForm&&re(this._oldForm,this)}static \u0275fac=function(i){return new(i||n)(s(v,10),s(A,10),s(x,8))};static \u0275dir=l({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&E("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[f([Yt]),u,w]})}return n})(),Kt={provide:d,useExisting:h(()=>ft)},ft=(()=>{class n extends Wt{name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}_checkParentType(){pt(this._parent)}static \u0275fac=function(i){return new(i||n)(s(d,13),s(v,10),s(A,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[f([Kt]),u]})}return n})(),Jt={provide:d,useExisting:h(()=>gt)},gt=(()=>{class n extends d{_parent;name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}ngOnInit(){pt(this._parent),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective?.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return ae(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(i){return new(i||n)(s(d,13),s(v,10),s(A,10))};static \u0275dir=l({type:n,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[f([Jt]),u]})}return n})();function pt(n){return!(n instanceof ft)&&!(n instanceof ht)&&!(n instanceof gt)}var Qt={provide:_,useExisting:h(()=>en)},en=(()=>{class n extends _{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new y;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,o,a){super(),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=Ee(this,o)}ngOnChanges(e){this._added||this._setUpControl(),we(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return ae(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(i){return new(i||n)(s(d,13),s(v,10),s(A,10),s(N,10),s(Fe,8))};static \u0275dir=l({type:n,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[f([Qt]),u,w]})}return n})();var tn={provide:N,useExisting:h(()=>_t),multi:!0};function mt(n,t){return n==null?`${t}`:(t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function nn(n){return n.split(":")[0]}var _t=(()=>{class n extends ve{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e}_compareWith=Object.is;writeValue(e){this.value=e;let i=this._getOptionId(e),r=mt(i,e);this.setProperty("value",r)}registerOnChange(e){this.onChange=i=>{this.value=this._getOptionValue(i),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i),e))return i;return null}_getOptionValue(e){let i=nn(e);return this._optionMap.has(i)?this._optionMap.get(i):e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=D(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(i,r){i&1&&E("change",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[f([tn]),u]})}return n})(),Pn=(()=>{class n{_element;_renderer;_select;id;constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(e){this._select!=null&&(this._select._optionMap.set(this.id,e),this._setElementValue(mt(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(i){return new(i||n)(s(P),s(R),s(_t,9))};static \u0275dir=l({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})(),rn={provide:N,useExisting:h(()=>vt),multi:!0};function qe(n,t){return n==null?`${t}`:(typeof t=="string"&&(t=`'${t}'`),t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function on(n){return n.split(":")[0]}var vt=(()=>{class n extends ve{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e}_compareWith=Object.is;writeValue(e){this.value=e;let i;if(Array.isArray(e)){let r=e.map(o=>this._getOptionId(o));i=(o,a)=>{o._setSelected(r.indexOf(a.toString())>-1)}}else i=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(e){this.onChange=i=>{let r=[],o=i.selectedOptions;if(o!==void 0){let a=o;for(let m=0;m<a.length;m++){let $=a[m],le=this._getOptionValue($.value);r.push(le)}}else{let a=i.options;for(let m=0;m<a.length;m++){let $=a[m];if($.selected){let le=this._getOptionValue($.value);r.push(le)}}}this.value=r,e(r)}}_registerOption(e){let i=(this._idCounter++).toString();return this._optionMap.set(i,e),i}_getOptionId(e){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i)._value,e))return i;return null}_getOptionValue(e){let i=on(e);return this._optionMap.has(i)?this._optionMap.get(i)._value:e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=D(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(i,r){i&1&&E("change",function(a){return r.onChange(a.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[f([rn]),u]})}return n})(),Rn=(()=>{class n{_element;_renderer;_select;id;_value;constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){this._select!=null&&(this._value=e,this._setElementValue(qe(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(qe(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(i){return new(i||n)(s(P),s(R),s(vt,9))};static \u0275dir=l({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})();function sn(n){return typeof n=="number"?n:parseInt(n,10)}var yt=(()=>{class n{_validator=X;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):X,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(i){return new(i||n)};static \u0275dir=l({type:n,features:[w]})}return n})();var an={provide:v,useExisting:h(()=>ln),multi:!0};var ln=(()=>{class n extends yt{required;inputName="required";normalizeInput=fe;createValidator=e=>Ye;enabled(e){return e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=D(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(i,r){i&2&&ce("required",r._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[f([an]),u]})}return n})();var un={provide:v,useExisting:h(()=>dn),multi:!0},dn=(()=>{class n extends yt{maxlength;inputName="maxlength";normalizeInput=e=>sn(e);createValidator=e=>Ke(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=D(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&ce("maxlength",r._enabled?r.maxlength:null)},inputs:{maxlength:"maxlength"},standalone:!1,features:[f([un]),u]})}return n})();var Ct=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=z({type:n});static \u0275inj=W({})}return n})(),_e=class extends I{constructor(t,e,i){super(be(e),Me(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){lt(this,!1,t),t.forEach((i,r)=>{at(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>i._syncPendingControls()?!0:e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}};function ze(n){return!!n&&(n.asyncValidators!==void 0||n.validators!==void 0||n.updateOn!==void 0)}var cn=(()=>{class n{useNonNullable=!1;get nonNullable(){let e=new n;return e.useNonNullable=!0,e}group(e,i=null){let r=this._reduceControls(e),o={};return ze(i)?o=i:i!==null&&(o.validators=i.validator,o.asyncValidators=i.asyncValidator),new O(r,o)}record(e,i=null){let r=this._reduceControls(e);return new me(r,i)}control(e,i,r){let o={};return this.useNonNullable?(ze(i)?o=i:(o.validators=i,o.asyncValidators=r),new H(e,g(c({},o),{nonNullable:!0}))):new H(e,i,r)}array(e,i,r){let o=e.map(a=>this._createControl(a));return new _e(o,i,r)}_reduceControls(e){let i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){if(e instanceof H)return e;if(e instanceof I)return e;if(Array.isArray(e)){let i=e[0],r=e.length>1?e[1]:null,o=e.length>2?e[2]:null;return this.control(i,r,o)}else return this.control(e)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),jn=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=ue({token:n,factory:()=>q(cn).nonNullable,providedIn:"root"})}return n})();var Tn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:x,useValue:e.callSetDisabledState??se}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=z({type:n});static \u0275inj=W({imports:[Ct]})}return n})(),Gn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:Fe,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:x,useValue:e.callSetDisabledState??se}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=z({type:n});static \u0275inj=W({imports:[Ct]})}return n})();function hn(n,t){!t?.injector&&ke(hn);let e=t?.injector??q(de),i=new Ie(1),r=Te(()=>{let o;try{o=n()}catch(a){p(()=>i.error(a));return}p(()=>i.next(o))},{injector:e,manualCleanup:!0});return e.get(Pe).onDestroy(()=>{r.destroy(),i.complete()}),i.asObservable()}export{N as a,Xe as b,Ge as c,_ as d,On as e,Nn as f,O as g,Lt as h,H as i,zt as j,kn as k,Xt as l,ht as m,ft as n,gt as o,en as p,_t as q,Pn as r,Rn as s,ln as t,dn as u,_e as v,cn as w,jn as x,Tn as y,Gn as z,hn as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ca as o,ea as r,
|
|
1
|
+
import{ca as o,ea as r,wb as a}from"./chunk-ARSLNNKY.js";var p=/[&<>"']/g,Oe=RegExp(p.source);function m(){return new l}var l=class{constructor(){this._selected=[]}get value(){return this._selected}select(e,t,i){if(e.selected=!0,(!e.children||!t&&i)&&this._selected.push(e),t)if(e.parent){let n=e.parent.children.length,u=e.parent.children.filter(c=>c.selected).length;e.parent.selected=n===u}else e.children&&(this._setChildrenSelectedState(e.children,!0),this._removeChildren(e),i&&this._activeChildren(e)?this._selected=[...this._selected.filter(n=>n.parent!==e),e]:this._selected=[...this._selected,...e.children.filter(n=>!n.disabled)])}unselect(e,t){if(this._selected=this._selected.filter(i=>i!==e),e.selected=!1,t)if(e.parent&&e.parent.selected){let i=e.parent.children;this._removeParent(e.parent),this._removeChildren(e.parent),this._selected.push(...i.filter(n=>n!==e&&!n.disabled)),e.parent.selected=!1}else e.children&&(this._setChildrenSelectedState(e.children,!1),this._removeChildren(e))}clear(e){this._selected=e?this._selected.filter(t=>t.disabled):[]}_setChildrenSelectedState(e,t){for(let i of e)i.disabled||(i.selected=t)}_removeChildren(e){this._selected=[...this._selected.filter(t=>t.parent!==e),...e.children.filter(t=>t.parent===e&&t.disabled&&t.selected)]}_removeParent(e){this._selected=this._selected.filter(t=>t!==e)}_activeChildren(e){return e.children.every(t=>!t.disabled||t.selected)}};var g=new r("ng-select-selection-model");var ke=(()=>{class s{static{this.\u0275fac=function(i){return new(i||s)}}static{this.\u0275mod=a({type:s})}static{this.\u0275inj=o({providers:[{provide:g,useValue:m}]})}}return s})();export{ke as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as k}from"./chunk-ANMXAMBL.js";import{a as q}from"./chunk-QIXIZZPY.js";import{a as ae,b as oe}from"./chunk-ZPTNYW2S.js";import{h as ie,j as re,k as le,l as me}from"./chunk-GY53MWXH.js";import"./chunk-6NCHCAKY.js";import"./chunk-5AITWOQZ.js";import"./chunk-ACQX2T2H.js";import{c as $,d as W}from"./chunk-JG5HGOEX.js";import{g as ne}from"./chunk-ZB6TB7JI.js";import"./chunk-7KQDKLO4.js";import{a as b,b as X,c as Y,d as Z,e as ee,f as te}from"./chunk-H4V6YZX2.js";import{C as K,D as Q}from"./chunk-WAJWW3TC.js";import"./chunk-U6SRN7P3.js";import"./chunk-TPGKCMVN.js";import"./chunk-BCXNVGDH.js";import"./chunk-U5LD55IP.js";import"./chunk-F2X3VGZZ.js";import"./chunk-TYETQJ2X.js";import{m as F,r as G,s as L,t as O}from"./chunk-353U23ZQ.js";import{$b as v,Bb as j,Jc as A,Kc as D,Lb as _,Lc as B,Mc as g,Ob as I,Vb as i,Wb as o,X as R,Xb as C,Yc as w,bb as P,c as y,cb as M,ec as E,fc as s,gb as p,ha as f,pa as x,qa as h,qc as c,rc as S,s as J,sc as V,uc as U,vb as H,yc as N,zc as z}from"./chunk-ARSLNNKY.js";import{a as r,b as m}from"./chunk-YQFG5XE2.js";var ce={data:{data:[],totalCount:0},filter:{PageNumber:1,PageSize:20,Number:""}},T=X(te(ce),Y(t=>({first:w(()=>(t.filter().PageNumber-1)*t.filter().PageSize+1),end:w(()=>Math.min(t.filter().PageNumber*t.filter().PageSize,t.data().totalCount)),hasCheckedRows:w(()=>t.data().data.some(d=>d.checked)),checkedAdjustment:w(()=>t.data().data.filter(d=>d.checked).map(d=>d.id))})),ee(t=>{let d=f(k);return{updateFilter(a){b(t,n=>m(r({},n),{filter:r(r({},n.filter),a)}))},onRowSelect(a){b(t,n=>{let l=n.data.data.map(u=>u.id===a.id?m(r({},u),{checked:!0}):u);return m(r({},n),{data:m(r({},n.data),{data:l})})})},onRowUnselect(a){b(t,n=>{let l=n.data.data.map(u=>u.id===a.id?m(r({},u),{checked:!1}):u);return m(r({},n),{data:m(r({},n.data),{data:l})})})},onHeaderCheckboxToggle(a){b(t,n=>{let l=n.data.data.map(u=>m(r({},u),{checked:a}));return m(r({},n),{data:m(r({},n.data),{data:l})})})},getAdjustmentJournal:ae(y(R(a=>d.getAdjustmentJournal(a).pipe(J(n=>m(r({},n),{data:n.data.map(l=>m(r({},l),{checked:!1}))})),oe({next:n=>{b(t,l=>m(r({},l),{data:n}))},error:n=>{console.error("Error fetching customer invoice:",n)}})))))}}),Z(t=>({onInit:()=>{t.getAdjustmentJournal(t.filter)}})));var de=()=>({height:"calc(100vh - 70px)"});function pe(t,d){if(t&1){let e=v();i(0,"p-button",8),E("onClick",function(){x(e);let n=s(2);return h(n.generateAdjusmentJournal())}),o()}}function se(t,d){if(t&1&&j(0,pe,1,0,"p-button",7),t&2){let e=s();_("ngIf",e.store.hasCheckedRows())}}function ue(t,d){t&1&&(i(0,"tr")(1,"th",10),C(2,"p-tableHeaderCheckbox"),o(),i(3,"th"),c(4,"Outlet"),o(),i(5,"th"),c(6,"Number"),o(),i(7,"th"),c(8,"Date"),o(),i(9,"th"),c(10,"Adjustment Qty"),o(),i(11,"th"),c(12,"Type"),o(),i(13,"th"),c(14,"State"),o(),i(15,"th"),c(16,"Note"),o(),C(17,"th"),o())}function _e(t,d){if(t&1&&(i(0,"tr")(1,"td"),C(2,"p-tableCheckbox",11),o(),i(3,"td"),c(4),o(),i(5,"td")(6,"a",12),c(7),o()(),i(8,"td"),c(9),A(10,"date"),o(),i(11,"td"),c(12),A(13,"number"),o(),i(14,"td"),c(15),o(),i(16,"td"),c(17),o(),i(18,"td"),C(19,"div",13),o(),i(20,"td"),C(21,"p-button",14),o()()),t&2){let e=d.$implicit,a=s(2);p(2),_("value",e),p(2),S(e.outlet),p(2),_("href",a.authService.getTenantExternalURL()+"/menu/Adjustment/Adjustment/Archive/Info?ID="+e.id,M),p(),V(" ",e.number," "),p(2),S(B(10,12,e.date,"d MMM y")),p(3),S(D(13,15,e.quantitySUM)),p(3),S(e.type),p(2),S(e.state),p(2),_("innerHTML",e.note,P),p(2),_("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function ge(t,d){if(t&1&&c(0),t&2){let e=s(2);U(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function fe(t,d){t&1&&(i(0,"tr")(1,"td",15)(2,"span"),c(3,"No records found."),o()()())}function xe(t,d){if(t&1){let e=v();i(0,"p-panel")(1,"p-table",9),E("onRowSelect",function(n){x(e);let l=s();return h(l.onRowSelect(n))})("onRowUnselect",function(n){x(e);let l=s();return h(l.onRowUnselect(n))})("onHeaderCheckboxToggle",function(n){x(e);let l=s();return h(l.onHeaderCheckboxToggle(n))})("onPage",function(n){x(e);let l=s();return h(l.onPageChange(n))}),j(2,ue,18,0,"ng-template",null,2,g)(4,_e,22,17,"ng-template",null,3,g)(6,ge,1,3,"ng-template",null,4,g)(8,fe,4,0,"ng-template",null,5,g),o()()}if(t&2){let e=s();I(z(9,de)),p(),_("value",e.store.data().data)("scrollable",!0)("scrollHeight","calc(100vh - 142px)")("paginator",!0)("rows",e.store.filter().PageSize)("totalRecords",e.store.data().totalCount)("lazy",!0)}}var Fe=(()=>{class t{constructor(){this.store=f(T),this.generateJournalService=f(k),this.authService=f(q)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(a=>{this.store.onRowUnselect(a)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onPageChange(e){let a=e.first/e.rows;this.store.updateFilter(m(r({},this.store.filter()),{PageNumber:a+1}))}generateAdjusmentJournal(){this.generateJournalService.createAdjustmentJournal(this.store.checkedAdjustment()).subscribe()}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=H({type:t,selectors:[["app-adjustment-journal"]],features:[N([T])],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Adjustment"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onRowSelect","onRowUnselect","onHeaderCheckboxToggle","onPage","value","scrollable","scrollHeight","paginator","rows","totalRecords","lazy"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"innerHTML"],[3,"icon","severity","text"],["colspan","8"]],template:function(a,n){a&1&&(i(0,"app-main-panel",6),j(1,se,1,1,"ng-template",null,0,g)(3,xe,10,10,"ng-template",null,1,g),o())},dependencies:[ne,me,ie,re,le,O,F,L,G,W,$,Q,K],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();export{Fe as AdjustmentJournalComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Z as o}from"./chunk-ARSLNNKY.js";function i(e="emit"){return r=>r.pipe(o(t=>console.log(`${e}`,t)))}export{i as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as St}from"./chunk-R4CV5F66.js";import{a as C}from"./chunk-ZZNYX7MX.js";import{B as Ot,C as Nt,F as je,M as Mt,Q as R,T as We,b as ae,ca as Qe,d as ue,k as Tt,ka as It,la as F,r as he,ta as x,w as ze}from"./chunk-OUJ6CGAI.js";import{a as te,j as Ct,m as wt,n as Dt,o as Ue,t as W,w as De}from"./chunk-DCES5UJV.js";import{A as at,Ab as Z,Ca as Y,D as le,Da as K,F as lt,G as fe,Gb as Ge,Ja as Fe,Jb as A,Kb as b,Lb as He,Mb as I,N as Ae,Nb as gt,Ob as M,P as ct,Pa as _e,Q as dt,Qa as me,Ub as X,Uc as g,Vb as ee,Vc as yt,Wb as j,X as ut,Xb as be,Xc as we,Y as N,Yb as ye,Yc as vt,Z as ht,Zb as _t,Zc as re,_ as Pe,ba as _,ca as y,d as st,dc as ce,ea as pt,ec as P,fb as T,fc as G,g as S,gc as H,ha as c,hb as Be,ic as de,jc as mt,k as rt,kc as oe,la as Re,lb as $e,lc as se,m as Oe,mc as Ve,nc as bt,oa as ge,ob as Le,pc as ve,qc as Ce,ra as ft,s as ke,sa as f,ua as L,ub as O,vb as v,wb as k,xc as D,ya as E,yb as m,z as V,za as U,zc as Ne}from"./chunk-K5GIEJY3.js";import{a as q,b as Ee}from"./chunk-EQDQRRRY.js";var xt=["*"];var Xt=["dialog"];var Et={animation:!0,transitionTimerDelayMs:5},Ke=(()=>{class t{constructor(){this.animation=Et.animation}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=_({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function ei(t){let{transitionDelay:o,transitionDuration:e}=window.getComputedStyle(t),i=parseFloat(o),n=parseFloat(e);return(i+n)*1e3}function Ze(t){return typeof t=="string"}function pe(t){return t!=null}function kt(t){return t&&t.then}function Se(t){return(t||document.body).getBoundingClientRect()}function ti(t){return o=>new st(e=>{let i=r=>t.run(()=>e.next(r)),n=r=>t.run(()=>e.error(r)),s=()=>t.run(()=>e.complete());return o.subscribe({next:i,error:n,complete:s})})}var ii=()=>{},{transitionTimerDelayMs:ni}=Et,Me=new Map,B=(t,o,e,i)=>{let n=i.context||{},s=Me.get(o);if(s)switch(i.runningTransition){case"continue":return rt;case"stop":t.run(()=>s.transition$.complete()),n=Object.assign(s.context,n),Me.delete(o)}let r=e(o,i.animation,n)||ii;if(!i.animation||window.getComputedStyle(o).transitionProperty==="none")return t.run(()=>r()),Oe(void 0).pipe(ti(t));let a=new S,l=new S,d=a.pipe(ct(!0));Me.set(o,{transition$:a,complete:()=>{l.next(),l.complete()},context:n});let u=ei(o);return t.runOutsideAngular(()=>{let h=V(o,"transitionend").pipe(N(d),le(({target:w})=>w===o)),p=at(u+ni).pipe(N(d));lt(p,h,l).pipe(N(d)).subscribe(()=>{Me.delete(o),t.run(()=>{r(),a.next(),a.complete()})})}),a.asObservable()};function oi(t,o){if(typeof navigator>"u")return"0px";let{classList:e}=t,i=e.contains("show");i||e.add("show"),t.style[o]="";let n=t.getBoundingClientRect()[o]+"px";return i||e.remove("show"),n}var si=(t,o,e)=>{let{direction:i,maxSize:n,dimension:s}=e,{classList:r}=t;function a(){r.add("collapse"),i==="show"?r.add("show"):r.remove("show")}if(!o){a();return}return n||(n=oi(t,s),e.maxSize=n,t.style[s]=i!=="show"?n:"0px",r.remove("collapse","collapsing","show"),Se(t),r.add("collapsing")),t.style[s]=i==="show"?n:"0px",()=>{a(),r.remove("collapsing"),t.style[s]=""}},ri=(()=>{class t{constructor(){this._ngbConfig=c(Ke),this.horizontal=!1}get animation(){return this._animation??this._ngbConfig.animation}set animation(e){this._animation=e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=_({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),ro=(()=>{class t{constructor(){this._config=c(ri),this._element=c(K),this._zone=c(U),this.animation=this._config.animation,this._afterInit=!1,this._isCollapsed=!1,this.ngbCollapseChange=new E,this.horizontal=this._config.horizontal,this.shown=new E,this.hidden=new E}set collapsed(e){this._isCollapsed!==e&&(this._isCollapsed=e,this._afterInit&&this._runTransitionWithEvents(e,this.animation))}ngOnInit(){this._runTransition(this._isCollapsed,!1),this._afterInit=!0}toggle(e=this._isCollapsed){this.collapsed=!e,this.ngbCollapseChange.next(this._isCollapsed)}_runTransition(e,i){return B(this._zone,this._element.nativeElement,si,{animation:i,runningTransition:"stop",context:{direction:e?"hide":"show",dimension:this.horizontal?"width":"height"}})}_runTransitionWithEvents(e,i){this._runTransition(e,i).subscribe(()=>{e?this.hidden.emit():this.shown.emit()})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=k({type:t,selectors:[["","ngbCollapse",""]],hostVars:2,hostBindings:function(i,n){i&2&&I("collapse-horizontal",n.horizontal)},inputs:{animation:"animation",collapsed:[0,"ngbCollapse","collapsed"],horizontal:"horizontal"},outputs:{ngbCollapseChange:"ngbCollapseChange",shown:"shown",hidden:"hidden"},exportAs:["ngbCollapse"]})}}return t})();var ao=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=v({type:t})}static{this.\u0275inj=y({})}}return t})();var lo=(()=>{let t=()=>/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2,o=()=>/Android/.test(navigator.userAgent);return typeof navigator<"u"?!!navigator.userAgent&&(t()||o()):!1})();var ai=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function Xe(t){let o=Array.from(t.querySelectorAll(ai)).filter(e=>e.tabIndex!==-1);return[o[0],o[o.length-1]]}var At=(t,o,e,i=!1)=>{t.runOutsideAngular(()=>{let n=V(o,"focusin").pipe(N(e),ke(s=>s.target));V(o,"keydown").pipe(N(e),le(s=>s.key==="Tab"),Pe(n)).subscribe(([s,r])=>{let[a,l]=Xe(o);(r===a||r===o)&&s.shiftKey&&(l.focus(),s.preventDefault()),r===l&&!s.shiftKey&&(a.focus(),s.preventDefault())}),i&&V(o,"click").pipe(N(e),Pe(n),ke(s=>s[1])).subscribe(s=>s.focus())})};var co=new Date(1882,10,12),uo=new Date(2174,10,25);var ho=1e3*60*60*24;var et=1080,li=24*et,ci=12*et+793,po=29*li+ci,fo=11*et+204;var go=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=v({type:t})}static{this.\u0275inj=y({})}}return t})(),di=(()=>{class t{constructor(){this._ngbConfig=c(Ke),this.backdrop=!0,this.fullscreen=!1,this.keyboard=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(e){this._animation=e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=_({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),z=class{constructor(o,e,i){this.nodes=o,this.viewRef=e,this.componentRef=i}};var Pt=(()=>{class t{constructor(){this._document=c(te)}hide(){let e=Math.abs(window.innerWidth-this._document.documentElement.clientWidth),i=this._document.body,n=i.style,{overflow:s,paddingRight:r}=n;if(e>0){let a=parseFloat(window.getComputedStyle(i).paddingRight);n.paddingRight=`${a+e}px`}return n.overflow="hidden",()=>{e>0&&(n.paddingRight=r),n.overflow=s}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=_({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),ui=(()=>{class t{constructor(){this._nativeElement=c(K).nativeElement,this._zone=c(U),this._injector=c(L)}ngOnInit(){me(()=>B(this._zone,this._nativeElement,(e,i)=>{i&&Se(e),e.classList.add("show")},{animation:this.animation,runningTransition:"continue"}),{injector:this._injector,phase:_e.MixedReadWrite})}hide(){return B(this._zone,this._nativeElement,({classList:e})=>e.remove("show"),{animation:this.animation,runningTransition:"stop"})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=O({type:t,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1055"],hostVars:6,hostBindings:function(i,n){i&2&&(M("modal-backdrop"+(n.backdropClass?" "+n.backdropClass:"")),I("show",!n.animation)("fade",n.animation))},inputs:{animation:"animation",backdropClass:"backdropClass"},decls:0,vars:0,template:function(i,n){},encapsulation:2})}}return t})(),Ie=class{update(o){}close(o){}dismiss(o){}},hi=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","fullscreen","keyboard","scrollable","size","windowClass","modalDialogClass"],pi=["animation","backdropClass"],Je=class{_applyWindowOptions(o,e){hi.forEach(i=>{pe(e[i])&&(o[i]=e[i])})}_applyBackdropOptions(o,e){pi.forEach(i=>{pe(e[i])&&(o[i]=e[i])})}update(o){this._applyWindowOptions(this._windowCmptRef.instance,o),this._backdropCmptRef&&this._backdropCmptRef.instance&&this._applyBackdropOptions(this._backdropCmptRef.instance,o)}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe(N(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe(N(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}constructor(o,e,i,n){this._windowCmptRef=o,this._contentRef=e,this._backdropCmptRef=i,this._beforeDismiss=n,this._closed=new S,this._dismissed=new S,this._hidden=new S,o.instance.dismissEvent.subscribe(s=>{this.dismiss(s)}),this.result=new Promise((s,r)=>{this._resolve=s,this._reject=r}),this.result.then(null,()=>{})}close(o){this._windowCmptRef&&(this._closed.next(o),this._resolve(o),this._removeModalElements())}_dismiss(o){this._dismissed.next(o),this._reject(o),this._removeModalElements()}dismiss(o){if(this._windowCmptRef)if(!this._beforeDismiss)this._dismiss(o);else{let e=this._beforeDismiss();kt(e)?e.then(i=>{i!==!1&&this._dismiss(o)},()=>{}):e!==!1&&this._dismiss(o)}}_removeModalElements(){let o=this._windowCmptRef.instance.hide(),e=this._backdropCmptRef?this._backdropCmptRef.instance.hide():Oe(void 0);o.subscribe(()=>{let{nativeElement:i}=this._windowCmptRef.location;i.parentNode.removeChild(i),this._windowCmptRef.destroy(),this._contentRef?.viewRef?.destroy(),this._windowCmptRef=null,this._contentRef=null}),e.subscribe(()=>{if(this._backdropCmptRef){let{nativeElement:i}=this._backdropCmptRef.location;i.parentNode.removeChild(i),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),fe(o,e).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}},qe=function(t){return t[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC",t}(qe||{}),fi=(()=>{class t{constructor(){this._document=c(te),this._elRef=c(K),this._zone=c(U),this._injector=c(L),this._closed$=new S,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new E,this.shown=new S,this.hidden=new S}get fullscreenClass(){return this.fullscreen===!0?" modal-fullscreen":Ze(this.fullscreen)?` modal-fullscreen-${this.fullscreen}-down`:""}dismiss(e){this.dismissEvent.emit(e)}ngOnInit(){this._elWithFocus=this._document.activeElement,me(()=>this._show(),{injector:this._injector,phase:_e.MixedReadWrite})}ngOnDestroy(){this._disableEventHandling()}hide(){let{nativeElement:e}=this._elRef,i={animation:this.animation,runningTransition:"stop"},n=B(this._zone,e,()=>e.classList.remove("show"),i),s=B(this._zone,this._dialogEl.nativeElement,()=>{},i),r=fe(n,s);return r.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),r}_show(){let e={animation:this.animation,runningTransition:"continue"},i=B(this._zone,this._elRef.nativeElement,(s,r)=>{r&&Se(s),s.classList.add("show")},e),n=B(this._zone,this._dialogEl.nativeElement,()=>{},e);fe(i,n).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){let{nativeElement:e}=this._elRef;this._zone.runOutsideAngular(()=>{V(e,"keydown").pipe(N(this._closed$),le(n=>n.key==="Escape")).subscribe(n=>{this.keyboard?requestAnimationFrame(()=>{n.defaultPrevented||this._zone.run(()=>this.dismiss(qe.ESC))}):this.backdrop==="static"&&this._bumpBackdrop()});let i=!1;V(this._dialogEl.nativeElement,"mousedown").pipe(N(this._closed$),ht(()=>i=!1),ut(()=>V(e,"mouseup").pipe(N(this._closed$),Ae(1))),le(({target:n})=>e===n)).subscribe(()=>{i=!0}),V(e,"click").pipe(N(this._closed$)).subscribe(({target:n})=>{e===n&&(this.backdrop==="static"?this._bumpBackdrop():this.backdrop===!0&&!i&&this._zone.run(()=>this.dismiss(qe.BACKDROP_CLICK))),i=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){let{nativeElement:e}=this._elRef;if(!e.contains(document.activeElement)){let i=e.querySelector("[ngbAutofocus]"),n=Xe(e)[0];(i||n||e).focus()}}_restoreFocus(){let e=this._document.body,i=this._elWithFocus,n;i&&i.focus&&e.contains(i)?n=i:n=e,this._zone.runOutsideAngular(()=>{setTimeout(()=>n.focus()),this._elWithFocus=null})}_bumpBackdrop(){this.backdrop==="static"&&B(this._zone,this._elRef.nativeElement,({classList:e})=>(e.add("modal-static"),()=>e.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=O({type:t,selectors:[["ngb-modal-window"]],viewQuery:function(i,n){if(i&1&&mt(Xt,7),i&2){let s;oe(s=se())&&(n._dialogEl=s.first)}},hostAttrs:["role","dialog","tabindex","-1"],hostVars:7,hostBindings:function(i,n){i&2&&(A("aria-modal",!0)("aria-labelledby",n.ariaLabelledBy)("aria-describedby",n.ariaDescribedBy),M("modal d-block"+(n.windowClass?" "+n.windowClass:"")),I("fade",n.animation))},inputs:{animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",backdrop:"backdrop",centered:"centered",fullscreen:"fullscreen",keyboard:"keyboard",scrollable:"scrollable",size:"size",windowClass:"windowClass",modalDialogClass:"modalDialogClass"},outputs:{dismissEvent:"dismiss"},ngContentSelectors:xt,decls:4,vars:2,consts:[["dialog",""],["role","document"],[1,"modal-content"]],template:function(i,n){i&1&&(G(),X(0,"div",1,0)(2,"div",2),H(3),ee()()),i&2&&M("modal-dialog"+(n.size?" modal-"+n.size:"")+(n.centered?" modal-dialog-centered":"")+n.fullscreenClass+(n.scrollable?" modal-dialog-scrollable":"")+(n.modalDialogClass?" "+n.modalDialogClass:""))},styles:[`ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}
|
|
1
|
+
import{j as St}from"./chunk-U6SRN7P3.js";import{a as C}from"./chunk-TPGKCMVN.js";import{B as Ot,C as Nt,F as je,M as Mt,Q as R,T as We,b as ae,ca as Qe,d as ue,k as Tt,ka as It,la as F,r as he,ta as x,w as ze}from"./chunk-BCXNVGDH.js";import{a as te,j as Ct,m as wt,n as Dt,o as Ue,t as W,w as De}from"./chunk-353U23ZQ.js";import{A as at,Aa as U,Ac as Ne,Bb as Z,D as le,Da as Y,Ea as K,F as lt,G as fe,Hb as Ge,Ka as Fe,Kb as A,Lb as b,Mb as He,N as Ae,Nb as I,Ob as gt,P as ct,Pb as M,Q as dt,Qa as _e,Ra as me,Vb as X,Vc as g,Wb as ee,Wc as yt,X as ut,Xb as j,Y as N,Yb as be,Yc as we,Z as ht,Zb as ye,Zc as vt,_ as Pe,_b as _t,_c as re,ba as _,ca as y,d as st,ea as pt,ec as ce,fc as P,g as S,gb as T,gc as G,ha as c,hc as H,ib as Be,jc as de,k as rt,kc as mt,la as Re,lc as oe,m as Oe,mb as $e,mc as se,nc as Ve,oa as ge,oc as bt,pb as Le,qc as ve,ra as ft,rc as Ce,s as ke,ta as f,va as L,vb as O,wb as v,xb as k,yc as D,z as V,za as E,zb as m}from"./chunk-ARSLNNKY.js";import{a as q,b as Ee}from"./chunk-YQFG5XE2.js";var xt=["*"];var Xt=["dialog"];var Et={animation:!0,transitionTimerDelayMs:5},Ke=(()=>{class t{constructor(){this.animation=Et.animation}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=_({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function ei(t){let{transitionDelay:o,transitionDuration:e}=window.getComputedStyle(t),i=parseFloat(o),n=parseFloat(e);return(i+n)*1e3}function Ze(t){return typeof t=="string"}function pe(t){return t!=null}function kt(t){return t&&t.then}function Se(t){return(t||document.body).getBoundingClientRect()}function ti(t){return o=>new st(e=>{let i=r=>t.run(()=>e.next(r)),n=r=>t.run(()=>e.error(r)),s=()=>t.run(()=>e.complete());return o.subscribe({next:i,error:n,complete:s})})}var ii=()=>{},{transitionTimerDelayMs:ni}=Et,Me=new Map,B=(t,o,e,i)=>{let n=i.context||{},s=Me.get(o);if(s)switch(i.runningTransition){case"continue":return rt;case"stop":t.run(()=>s.transition$.complete()),n=Object.assign(s.context,n),Me.delete(o)}let r=e(o,i.animation,n)||ii;if(!i.animation||window.getComputedStyle(o).transitionProperty==="none")return t.run(()=>r()),Oe(void 0).pipe(ti(t));let a=new S,l=new S,d=a.pipe(ct(!0));Me.set(o,{transition$:a,complete:()=>{l.next(),l.complete()},context:n});let u=ei(o);return t.runOutsideAngular(()=>{let h=V(o,"transitionend").pipe(N(d),le(({target:w})=>w===o)),p=at(u+ni).pipe(N(d));lt(p,h,l).pipe(N(d)).subscribe(()=>{Me.delete(o),t.run(()=>{r(),a.next(),a.complete()})})}),a.asObservable()};function oi(t,o){if(typeof navigator>"u")return"0px";let{classList:e}=t,i=e.contains("show");i||e.add("show"),t.style[o]="";let n=t.getBoundingClientRect()[o]+"px";return i||e.remove("show"),n}var si=(t,o,e)=>{let{direction:i,maxSize:n,dimension:s}=e,{classList:r}=t;function a(){r.add("collapse"),i==="show"?r.add("show"):r.remove("show")}if(!o){a();return}return n||(n=oi(t,s),e.maxSize=n,t.style[s]=i!=="show"?n:"0px",r.remove("collapse","collapsing","show"),Se(t),r.add("collapsing")),t.style[s]=i==="show"?n:"0px",()=>{a(),r.remove("collapsing"),t.style[s]=""}},ri=(()=>{class t{constructor(){this._ngbConfig=c(Ke),this.horizontal=!1}get animation(){return this._animation??this._ngbConfig.animation}set animation(e){this._animation=e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=_({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),ro=(()=>{class t{constructor(){this._config=c(ri),this._element=c(K),this._zone=c(U),this.animation=this._config.animation,this._afterInit=!1,this._isCollapsed=!1,this.ngbCollapseChange=new E,this.horizontal=this._config.horizontal,this.shown=new E,this.hidden=new E}set collapsed(e){this._isCollapsed!==e&&(this._isCollapsed=e,this._afterInit&&this._runTransitionWithEvents(e,this.animation))}ngOnInit(){this._runTransition(this._isCollapsed,!1),this._afterInit=!0}toggle(e=this._isCollapsed){this.collapsed=!e,this.ngbCollapseChange.next(this._isCollapsed)}_runTransition(e,i){return B(this._zone,this._element.nativeElement,si,{animation:i,runningTransition:"stop",context:{direction:e?"hide":"show",dimension:this.horizontal?"width":"height"}})}_runTransitionWithEvents(e,i){this._runTransition(e,i).subscribe(()=>{e?this.hidden.emit():this.shown.emit()})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=k({type:t,selectors:[["","ngbCollapse",""]],hostVars:2,hostBindings:function(i,n){i&2&&I("collapse-horizontal",n.horizontal)},inputs:{animation:"animation",collapsed:[0,"ngbCollapse","collapsed"],horizontal:"horizontal"},outputs:{ngbCollapseChange:"ngbCollapseChange",shown:"shown",hidden:"hidden"},exportAs:["ngbCollapse"]})}}return t})();var ao=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=v({type:t})}static{this.\u0275inj=y({})}}return t})();var lo=(()=>{let t=()=>/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2,o=()=>/Android/.test(navigator.userAgent);return typeof navigator<"u"?!!navigator.userAgent&&(t()||o()):!1})();var ai=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function Xe(t){let o=Array.from(t.querySelectorAll(ai)).filter(e=>e.tabIndex!==-1);return[o[0],o[o.length-1]]}var At=(t,o,e,i=!1)=>{t.runOutsideAngular(()=>{let n=V(o,"focusin").pipe(N(e),ke(s=>s.target));V(o,"keydown").pipe(N(e),le(s=>s.key==="Tab"),Pe(n)).subscribe(([s,r])=>{let[a,l]=Xe(o);(r===a||r===o)&&s.shiftKey&&(l.focus(),s.preventDefault()),r===l&&!s.shiftKey&&(a.focus(),s.preventDefault())}),i&&V(o,"click").pipe(N(e),Pe(n),ke(s=>s[1])).subscribe(s=>s.focus())})};var co=new Date(1882,10,12),uo=new Date(2174,10,25);var ho=1e3*60*60*24;var et=1080,li=24*et,ci=12*et+793,po=29*li+ci,fo=11*et+204;var go=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=v({type:t})}static{this.\u0275inj=y({})}}return t})(),di=(()=>{class t{constructor(){this._ngbConfig=c(Ke),this.backdrop=!0,this.fullscreen=!1,this.keyboard=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(e){this._animation=e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=_({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),z=class{constructor(o,e,i){this.nodes=o,this.viewRef=e,this.componentRef=i}};var Pt=(()=>{class t{constructor(){this._document=c(te)}hide(){let e=Math.abs(window.innerWidth-this._document.documentElement.clientWidth),i=this._document.body,n=i.style,{overflow:s,paddingRight:r}=n;if(e>0){let a=parseFloat(window.getComputedStyle(i).paddingRight);n.paddingRight=`${a+e}px`}return n.overflow="hidden",()=>{e>0&&(n.paddingRight=r),n.overflow=s}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=_({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),ui=(()=>{class t{constructor(){this._nativeElement=c(K).nativeElement,this._zone=c(U),this._injector=c(L)}ngOnInit(){me(()=>B(this._zone,this._nativeElement,(e,i)=>{i&&Se(e),e.classList.add("show")},{animation:this.animation,runningTransition:"continue"}),{injector:this._injector,phase:_e.MixedReadWrite})}hide(){return B(this._zone,this._nativeElement,({classList:e})=>e.remove("show"),{animation:this.animation,runningTransition:"stop"})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=O({type:t,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1055"],hostVars:6,hostBindings:function(i,n){i&2&&(M("modal-backdrop"+(n.backdropClass?" "+n.backdropClass:"")),I("show",!n.animation)("fade",n.animation))},inputs:{animation:"animation",backdropClass:"backdropClass"},decls:0,vars:0,template:function(i,n){},encapsulation:2})}}return t})(),Ie=class{update(o){}close(o){}dismiss(o){}},hi=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","fullscreen","keyboard","scrollable","size","windowClass","modalDialogClass"],pi=["animation","backdropClass"],Je=class{_applyWindowOptions(o,e){hi.forEach(i=>{pe(e[i])&&(o[i]=e[i])})}_applyBackdropOptions(o,e){pi.forEach(i=>{pe(e[i])&&(o[i]=e[i])})}update(o){this._applyWindowOptions(this._windowCmptRef.instance,o),this._backdropCmptRef&&this._backdropCmptRef.instance&&this._applyBackdropOptions(this._backdropCmptRef.instance,o)}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe(N(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe(N(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}constructor(o,e,i,n){this._windowCmptRef=o,this._contentRef=e,this._backdropCmptRef=i,this._beforeDismiss=n,this._closed=new S,this._dismissed=new S,this._hidden=new S,o.instance.dismissEvent.subscribe(s=>{this.dismiss(s)}),this.result=new Promise((s,r)=>{this._resolve=s,this._reject=r}),this.result.then(null,()=>{})}close(o){this._windowCmptRef&&(this._closed.next(o),this._resolve(o),this._removeModalElements())}_dismiss(o){this._dismissed.next(o),this._reject(o),this._removeModalElements()}dismiss(o){if(this._windowCmptRef)if(!this._beforeDismiss)this._dismiss(o);else{let e=this._beforeDismiss();kt(e)?e.then(i=>{i!==!1&&this._dismiss(o)},()=>{}):e!==!1&&this._dismiss(o)}}_removeModalElements(){let o=this._windowCmptRef.instance.hide(),e=this._backdropCmptRef?this._backdropCmptRef.instance.hide():Oe(void 0);o.subscribe(()=>{let{nativeElement:i}=this._windowCmptRef.location;i.parentNode.removeChild(i),this._windowCmptRef.destroy(),this._contentRef?.viewRef?.destroy(),this._windowCmptRef=null,this._contentRef=null}),e.subscribe(()=>{if(this._backdropCmptRef){let{nativeElement:i}=this._backdropCmptRef.location;i.parentNode.removeChild(i),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),fe(o,e).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}},qe=function(t){return t[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC",t}(qe||{}),fi=(()=>{class t{constructor(){this._document=c(te),this._elRef=c(K),this._zone=c(U),this._injector=c(L),this._closed$=new S,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new E,this.shown=new S,this.hidden=new S}get fullscreenClass(){return this.fullscreen===!0?" modal-fullscreen":Ze(this.fullscreen)?` modal-fullscreen-${this.fullscreen}-down`:""}dismiss(e){this.dismissEvent.emit(e)}ngOnInit(){this._elWithFocus=this._document.activeElement,me(()=>this._show(),{injector:this._injector,phase:_e.MixedReadWrite})}ngOnDestroy(){this._disableEventHandling()}hide(){let{nativeElement:e}=this._elRef,i={animation:this.animation,runningTransition:"stop"},n=B(this._zone,e,()=>e.classList.remove("show"),i),s=B(this._zone,this._dialogEl.nativeElement,()=>{},i),r=fe(n,s);return r.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),r}_show(){let e={animation:this.animation,runningTransition:"continue"},i=B(this._zone,this._elRef.nativeElement,(s,r)=>{r&&Se(s),s.classList.add("show")},e),n=B(this._zone,this._dialogEl.nativeElement,()=>{},e);fe(i,n).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){let{nativeElement:e}=this._elRef;this._zone.runOutsideAngular(()=>{V(e,"keydown").pipe(N(this._closed$),le(n=>n.key==="Escape")).subscribe(n=>{this.keyboard?requestAnimationFrame(()=>{n.defaultPrevented||this._zone.run(()=>this.dismiss(qe.ESC))}):this.backdrop==="static"&&this._bumpBackdrop()});let i=!1;V(this._dialogEl.nativeElement,"mousedown").pipe(N(this._closed$),ht(()=>i=!1),ut(()=>V(e,"mouseup").pipe(N(this._closed$),Ae(1))),le(({target:n})=>e===n)).subscribe(()=>{i=!0}),V(e,"click").pipe(N(this._closed$)).subscribe(({target:n})=>{e===n&&(this.backdrop==="static"?this._bumpBackdrop():this.backdrop===!0&&!i&&this._zone.run(()=>this.dismiss(qe.BACKDROP_CLICK))),i=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){let{nativeElement:e}=this._elRef;if(!e.contains(document.activeElement)){let i=e.querySelector("[ngbAutofocus]"),n=Xe(e)[0];(i||n||e).focus()}}_restoreFocus(){let e=this._document.body,i=this._elWithFocus,n;i&&i.focus&&e.contains(i)?n=i:n=e,this._zone.runOutsideAngular(()=>{setTimeout(()=>n.focus()),this._elWithFocus=null})}_bumpBackdrop(){this.backdrop==="static"&&B(this._zone,this._elRef.nativeElement,({classList:e})=>(e.add("modal-static"),()=>e.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=O({type:t,selectors:[["ngb-modal-window"]],viewQuery:function(i,n){if(i&1&&mt(Xt,7),i&2){let s;oe(s=se())&&(n._dialogEl=s.first)}},hostAttrs:["role","dialog","tabindex","-1"],hostVars:7,hostBindings:function(i,n){i&2&&(A("aria-modal",!0)("aria-labelledby",n.ariaLabelledBy)("aria-describedby",n.ariaDescribedBy),M("modal d-block"+(n.windowClass?" "+n.windowClass:"")),I("fade",n.animation))},inputs:{animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",backdrop:"backdrop",centered:"centered",fullscreen:"fullscreen",keyboard:"keyboard",scrollable:"scrollable",size:"size",windowClass:"windowClass",modalDialogClass:"modalDialogClass"},outputs:{dismissEvent:"dismiss"},ngContentSelectors:xt,decls:4,vars:2,consts:[["dialog",""],["role","document"],[1,"modal-content"]],template:function(i,n){i&1&&(G(),X(0,"div",1,0)(2,"div",2),H(3),ee()()),i&2&&M("modal-dialog"+(n.size?" modal-"+n.size:"")+(n.centered?" modal-dialog-centered":"")+n.fullscreenClass+(n.scrollable?" modal-dialog-scrollable":"")+(n.modalDialogClass?" "+n.modalDialogClass:""))},styles:[`ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}
|
|
2
2
|
`],encapsulation:2})}}return t})(),gi=(()=>{class t{constructor(){this._applicationRef=c(Ge),this._injector=c(L),this._environmentInjector=c(Re),this._document=c(te),this._scrollBar=c(Pt),this._activeWindowCmptHasChanged=new S,this._ariaHiddenValues=new Map,this._scrollBarRestoreFn=null,this._modalRefs=[],this._windowCmpts=[],this._activeInstances=new E;let e=c(U);this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){let i=this._windowCmpts[this._windowCmpts.length-1];At(e,i.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(i.location.nativeElement)}})}_restoreScrollBar(){let e=this._scrollBarRestoreFn;e&&(this._scrollBarRestoreFn=null,e())}_hideScrollBar(){this._scrollBarRestoreFn||(this._scrollBarRestoreFn=this._scrollBar.hide())}open(e,i,n){let s=n.container instanceof HTMLElement?n.container:pe(n.container)?this._document.querySelector(n.container):this._document.body;if(!s)throw new Error(`The specified modal container "${n.container||"body"}" was not found in the DOM.`);this._hideScrollBar();let r=new Ie;e=n.injector||e;let a=e.get(Re,null)||this._environmentInjector,l=this._getContentRef(e,a,i,r,n),d=n.backdrop!==!1?this._attachBackdrop(s):void 0,u=this._attachWindowComponent(s,l.nodes),h=new Je(u,l,d,n.beforeDismiss);return this._registerModalRef(h),this._registerWindowCmpt(u),h.hidden.pipe(Ae(1)).subscribe(()=>Promise.resolve(!0).then(()=>{this._modalRefs.length||(this._document.body.classList.remove("modal-open"),this._restoreScrollBar(),this._revertAriaHidden())})),r.close=p=>{h.close(p)},r.dismiss=p=>{h.dismiss(p)},r.update=p=>{h.update(p)},h.update(n),this._modalRefs.length===1&&this._document.body.classList.add("modal-open"),d&&d.instance&&d.changeDetectorRef.detectChanges(),u.changeDetectorRef.detectChanges(),h}get activeInstances(){return this._activeInstances}dismissAll(e){this._modalRefs.forEach(i=>i.dismiss(e))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(e){let i=re(ui,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector});return this._applicationRef.attachView(i.hostView),e.appendChild(i.location.nativeElement),i}_attachWindowComponent(e,i){let n=re(fi,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector,projectableNodes:i});return this._applicationRef.attachView(n.hostView),e.appendChild(n.location.nativeElement),n}_getContentRef(e,i,n,s,r){return n?n instanceof Be?this._createFromTemplateRef(n,s):Ze(n)?this._createFromString(n):this._createFromComponent(e,i,n,s,r):new z([])}_createFromTemplateRef(e,i){let n={$implicit:i,close(r){i.close(r)},dismiss(r){i.dismiss(r)}},s=e.createEmbeddedView(n);return this._applicationRef.attachView(s),new z([s.rootNodes],s)}_createFromString(e){let i=this._document.createTextNode(`${e}`);return new z([[i]])}_createFromComponent(e,i,n,s,r){let a=L.create({providers:[{provide:Ie,useValue:s}],parent:e}),l=re(n,{environmentInjector:i,elementInjector:a}),d=l.location.nativeElement;return r.scrollable&&d.classList.add("component-host-scrollable"),this._applicationRef.attachView(l.hostView),new z([[d]],l.hostView,l)}_setAriaHidden(e){let i=e.parentElement;i&&e!==this._document.body&&(Array.from(i.children).forEach(n=>{n!==e&&n.nodeName!=="SCRIPT"&&(this._ariaHiddenValues.set(n,n.getAttribute("aria-hidden")),n.setAttribute("aria-hidden","true"))}),this._setAriaHidden(i))}_revertAriaHidden(){this._ariaHiddenValues.forEach((e,i)=>{e?i.setAttribute("aria-hidden",e):i.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(e){let i=()=>{let n=this._modalRefs.indexOf(e);n>-1&&(this._modalRefs.splice(n,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(e),this._activeInstances.emit(this._modalRefs),e.result.then(i,i)}_registerWindowCmpt(e){this._windowCmpts.push(e),this._activeWindowCmptHasChanged.next(),e.onDestroy(()=>{let i=this._windowCmpts.indexOf(e);i>-1&&(this._windowCmpts.splice(i,1),this._activeWindowCmptHasChanged.next())})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=_({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),_o=(()=>{class t{constructor(){this._injector=c(L),this._modalStack=c(gi),this._config=c(di)}open(e,i={}){let n=q(Ee(q({},this._config),{animation:this._config.animation}),i);return this._modalStack.open(this._injector,e,n)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(e){this._modalStack.dismissAll(e)}hasOpenModals(){return this._modalStack.hasOpenModals()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=_({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var mo=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=v({type:t})}static{this.\u0275inj=y({})}}return t})();var bo=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=v({type:t})}static{this.\u0275inj=y({})}}return t})();var yo=new pt("live announcer delay",{providedIn:"root",factory:()=>100});var _i=(()=>{class t{constructor(){this._ngbConfig=c(Ke),this.backdrop=!0,this.keyboard=!0,this.position="start",this.scroll=!1}get animation(){return this._animation??this._ngbConfig.animation}set animation(e){this._animation=e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=_({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),xe=class{close(o){}dismiss(o){}},Ye=class{get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe(N(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe(N(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._panelCmptRef.instance.shown.asObservable()}constructor(o,e,i,n){this._panelCmptRef=o,this._contentRef=e,this._backdropCmptRef=i,this._beforeDismiss=n,this._closed=new S,this._dismissed=new S,this._hidden=new S,o.instance.dismissEvent.subscribe(s=>{this.dismiss(s)}),i&&i.instance.dismissEvent.subscribe(s=>{this.dismiss(s)}),this.result=new Promise((s,r)=>{this._resolve=s,this._reject=r}),this.result.then(null,()=>{})}close(o){this._panelCmptRef&&(this._closed.next(o),this._resolve(o),this._removeOffcanvasElements())}_dismiss(o){this._dismissed.next(o),this._reject(o),this._removeOffcanvasElements()}dismiss(o){if(this._panelCmptRef)if(!this._beforeDismiss)this._dismiss(o);else{let e=this._beforeDismiss();kt(e)?e.then(i=>{i!==!1&&this._dismiss(o)},()=>{}):e!==!1&&this._dismiss(o)}}_removeOffcanvasElements(){let o=this._panelCmptRef.instance.hide(),e=this._backdropCmptRef?this._backdropCmptRef.instance.hide():Oe(void 0);o.subscribe(()=>{let{nativeElement:i}=this._panelCmptRef.location;i.parentNode.removeChild(i),this._panelCmptRef.destroy(),this._contentRef?.viewRef?.destroy(),this._panelCmptRef=null,this._contentRef=null}),e.subscribe(()=>{if(this._backdropCmptRef){let{nativeElement:i}=this._backdropCmptRef.location;i.parentNode.removeChild(i),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),fe(o,e).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}},tt=function(t){return t[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC",t}(tt||{}),mi=(()=>{class t{constructor(){this._nativeElement=c(K).nativeElement,this._zone=c(U),this._injector=c(L),this.dismissEvent=new E}ngOnInit(){me(()=>B(this._zone,this._nativeElement,(e,i)=>{i&&Se(e),e.classList.add("show")},{animation:this.animation,runningTransition:"continue"}),{injector:this._injector,phase:_e.MixedReadWrite})}hide(){return B(this._zone,this._nativeElement,({classList:e})=>e.remove("show"),{animation:this.animation,runningTransition:"stop"})}dismiss(){this.static||this.dismissEvent.emit(tt.BACKDROP_CLICK)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=O({type:t,selectors:[["ngb-offcanvas-backdrop"]],hostVars:6,hostBindings:function(i,n){i&1&&ce("mousedown",function(){return n.dismiss()}),i&2&&(M("offcanvas-backdrop"+(n.backdropClass?" "+n.backdropClass:"")),I("show",!n.animation)("fade",n.animation))},inputs:{animation:"animation",backdropClass:"backdropClass",static:"static"},outputs:{dismissEvent:"dismiss"},decls:0,vars:0,template:function(i,n){},encapsulation:2})}}return t})(),bi=(()=>{class t{constructor(){this._document=c(te),this._elRef=c(K),this._zone=c(U),this._injector=c(L),this._closed$=new S,this._elWithFocus=null,this.keyboard=!0,this.position="start",this.dismissEvent=new E,this.shown=new S,this.hidden=new S}dismiss(e){this.dismissEvent.emit(e)}ngOnInit(){this._elWithFocus=this._document.activeElement,me(()=>this._show(),{injector:this._injector,phase:_e.MixedReadWrite})}ngOnDestroy(){this._disableEventHandling()}hide(){let e={animation:this.animation,runningTransition:"stop"},i=B(this._zone,this._elRef.nativeElement,n=>(n.classList.remove("showing"),n.classList.add("hiding"),()=>n.classList.remove("show","hiding")),e);return i.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),i}_show(){let e={animation:this.animation,runningTransition:"continue"};B(this._zone,this._elRef.nativeElement,(n,s)=>(s&&Se(n),n.classList.add("show","showing"),()=>n.classList.remove("showing")),e).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){let{nativeElement:e}=this._elRef;this._zone.runOutsideAngular(()=>{V(e,"keydown").pipe(N(this._closed$),le(i=>i.key==="Escape")).subscribe(i=>{this.keyboard&&requestAnimationFrame(()=>{i.defaultPrevented||this._zone.run(()=>this.dismiss(tt.ESC))})})})}_disableEventHandling(){this._closed$.next()}_setFocus(){let{nativeElement:e}=this._elRef;if(!e.contains(document.activeElement)){let i=e.querySelector("[ngbAutofocus]"),n=Xe(e)[0];(i||n||e).focus()}}_restoreFocus(){let e=this._document.body,i=this._elWithFocus,n;i&&i.focus&&e.contains(i)?n=i:n=e,this._zone.runOutsideAngular(()=>{setTimeout(()=>n.focus()),this._elWithFocus=null})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=O({type:t,selectors:[["ngb-offcanvas-panel"]],hostAttrs:["role","dialog","tabindex","-1"],hostVars:5,hostBindings:function(i,n){i&2&&(A("aria-modal",!0)("aria-labelledby",n.ariaLabelledBy)("aria-describedby",n.ariaDescribedBy),M("offcanvas offcanvas-"+n.position+(n.panelClass?" "+n.panelClass:"")))},inputs:{animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",keyboard:"keyboard",panelClass:"panelClass",position:"position"},outputs:{dismissEvent:"dismiss"},ngContentSelectors:xt,decls:1,vars:0,template:function(i,n){i&1&&(G(),H(0))},encapsulation:2})}}return t})(),yi=(()=>{class t{constructor(){this._applicationRef=c(Ge),this._injector=c(L),this._document=c(te),this._scrollBar=c(Pt),this._activePanelCmptHasChanged=new S,this._scrollBarRestoreFn=null,this._backdropAttributes=["animation","backdropClass"],this._panelAttributes=["animation","ariaDescribedBy","ariaLabelledBy","keyboard","panelClass","position"],this._activeInstance=new E;let e=c(U);this._activePanelCmptHasChanged.subscribe(()=>{this._panelCmpt&&At(e,this._panelCmpt.location.nativeElement,this._activePanelCmptHasChanged)})}_restoreScrollBar(){let e=this._scrollBarRestoreFn;e&&(this._scrollBarRestoreFn=null,e())}_hideScrollBar(){this._scrollBarRestoreFn||(this._scrollBarRestoreFn=this._scrollBar.hide())}open(e,i,n){let s=n.container instanceof HTMLElement?n.container:pe(n.container)?this._document.querySelector(n.container):this._document.body;if(!s)throw new Error(`The specified offcanvas container "${n.container||"body"}" was not found in the DOM.`);n.scroll||this._hideScrollBar();let r=new xe,a=this._getContentRef(n.injector||e,i,r),l=n.backdrop!==!1?this._attachBackdrop(s):void 0,d=this._attachWindowComponent(s,a.nodes),u=new Ye(d,a,l,n.beforeDismiss);return this._registerOffcanvasRef(u),this._registerPanelCmpt(d),u.hidden.pipe(dt(()=>this._restoreScrollBar())).subscribe(),r.close=h=>{u.close(h)},r.dismiss=h=>{u.dismiss(h)},this._applyPanelOptions(d.instance,n),l&&l.instance&&(this._applyBackdropOptions(l.instance,n),l.changeDetectorRef.detectChanges()),d.changeDetectorRef.detectChanges(),u}get activeInstance(){return this._activeInstance}dismiss(e){this._offcanvasRef?.dismiss(e)}hasOpenOffcanvas(){return!!this._offcanvasRef}_attachBackdrop(e){let i=re(mi,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector});return this._applicationRef.attachView(i.hostView),e.appendChild(i.location.nativeElement),i}_attachWindowComponent(e,i){let n=re(bi,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector,projectableNodes:i});return this._applicationRef.attachView(n.hostView),e.appendChild(n.location.nativeElement),n}_applyPanelOptions(e,i){this._panelAttributes.forEach(n=>{pe(i[n])&&(e[n]=i[n])})}_applyBackdropOptions(e,i){this._backdropAttributes.forEach(n=>{pe(i[n])&&(e[n]=i[n])}),e.static=i.backdrop==="static"}_getContentRef(e,i,n){return i?i instanceof Be?this._createFromTemplateRef(i,n):Ze(i)?this._createFromString(i):this._createFromComponent(e,i,n):new z([])}_createFromTemplateRef(e,i){let n={$implicit:i,close(r){i.close(r)},dismiss(r){i.dismiss(r)}},s=e.createEmbeddedView(n);return this._applicationRef.attachView(s),new z([s.rootNodes],s)}_createFromString(e){let i=this._document.createTextNode(`${e}`);return new z([[i]])}_createFromComponent(e,i,n){let s=L.create({providers:[{provide:xe,useValue:n}],parent:e}),r=re(i,{environmentInjector:this._applicationRef.injector,elementInjector:s}),a=r.location.nativeElement;return this._applicationRef.attachView(r.hostView),new z([[a]],r.hostView,r)}_registerOffcanvasRef(e){let i=()=>{this._offcanvasRef=void 0,this._activeInstance.emit(this._offcanvasRef)};this._offcanvasRef=e,this._activeInstance.emit(this._offcanvasRef),e.result.then(i,i)}_registerPanelCmpt(e){this._panelCmpt=e,this._activePanelCmptHasChanged.next(),e.onDestroy(()=>{this._panelCmpt=void 0,this._activePanelCmptHasChanged.next()})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=_({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),vo=(()=>{class t{constructor(){this._injector=c(L),this._offcanvasStack=c(yi),this._config=c(_i)}open(e,i={}){let n=q(Ee(q({},this._config),{animation:this._config.animation}),i);return this._offcanvasStack.open(this._injector,e,n)}get activeInstance(){return this._offcanvasStack.activeInstance}dismiss(e){this._offcanvasStack.dismiss(e)}hasOpenOffcanvas(){return this._offcanvasStack.hasOpenOffcanvas()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=_({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var vi=({dt:t})=>`
|
|
3
3
|
.p-inputtext {
|
|
4
4
|
font-family: inherit;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as b,
|
|
1
|
+
import{d as b,j as m}from"./chunk-U6SRN7P3.js";import{a as y}from"./chunk-TPGKCMVN.js";import{ta as $}from"./chunk-BCXNVGDH.js";import{Nb as h,Vc as o,ba as l,ca as s,ec as x,ha as d,mb as r,ta as u,wb as p,xb as f,yc as v,za as c,zb as g}from"./chunk-ARSLNNKY.js";var M=({dt:e})=>`
|
|
2
2
|
.p-textarea {
|
|
3
3
|
font-family: inherit;
|
|
4
4
|
font-feature-settings: inherit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u,w as b}from"./chunk-
|
|
1
|
+
import{a as u,w as b}from"./chunk-353U23ZQ.js";import{Ka as d,ba as n,ca as s,ea as o,ga as a,ha as h,wb as c,za as p}from"./chunk-ARSLNNKY.js";var v;try{v=typeof Intl<"u"&&Intl.v8BreakIterator}catch{v=!1}var T=(()=>{class t{constructor(r){this._platformId=r,this.isBrowser=this._platformId?b(this._platformId):typeof document=="object"&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!!(window.chrome||v)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}static{this.\u0275fac=function(e){return new(e||t)(a(d))}}static{this.\u0275prov=n({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var l;function _(){if(l==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>l=!0}))}finally{l=l||!1}return l}function F(t){return _()?t:!!t.capture}var g;function w(){if(g==null){let t=typeof document<"u"?document.head:null;g=!!(t&&(t.createShadowRoot||t.attachShadow))}return g}function B(t){if(w()){let i=t.getRootNode?t.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&i instanceof ShadowRoot)return i}return null}function A(t){return t.composedPath?t.composedPath()[0]:t.target}var P=new o("cdk-dir-doc",{providedIn:"root",factory:O});function O(){return h(u)}var x=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function k(t){let i=t?.toLowerCase()||"";return i==="auto"&&typeof navigator<"u"&&navigator?.language?x.test(navigator.language)?"rtl":"ltr":i==="rtl"?"rtl":"ltr"}var $=(()=>{class t{constructor(r){if(this.value="ltr",this.change=new p,r){let e=r.body?r.body.dir:null,m=r.documentElement?r.documentElement.dir:null;this.value=k(e||m||"ltr")}}ngOnDestroy(){this.change.complete()}static{this.\u0275fac=function(e){return new(e||t)(a(P,8))}}static{this.\u0275prov=n({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Nt=new o("NG_SCROLLBAR_OPTIONS"),Vt=new o("NG_SCROLLBAR_POLYFILL");var jt=new o("NG_SCROLLBAR");var Wt=new o("SCROLLBAR_CONTROL");var Yt=(()=>{class t{static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275mod=c({type:t})}static{this.\u0275inj=s({})}}return t})();export{T as a,F as b,B as c,A as d,$ as e,Yt as f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as E}from"./chunk-ANMXAMBL.js";import{b as pe}from"./chunk-TDDTBHQE.js";import{a as O}from"./chunk-QIXIZZPY.js";import{a as ne,b as oe}from"./chunk-ZPTNYW2S.js";import{h as ae,j as ie,k as re,l as le}from"./chunk-GY53MWXH.js";import"./chunk-6NCHCAKY.js";import"./chunk-5AITWOQZ.js";import"./chunk-ACQX2T2H.js";import{c as q,d as Q}from"./chunk-JG5HGOEX.js";import{g as te}from"./chunk-ZB6TB7JI.js";import"./chunk-7KQDKLO4.js";import{a as w,b as W,c as X,d as Y,e as Z,f as ee}from"./chunk-H4V6YZX2.js";import{C as K,D as $}from"./chunk-WAJWW3TC.js";import"./chunk-U6SRN7P3.js";import"./chunk-TPGKCMVN.js";import"./chunk-BCXNVGDH.js";import"./chunk-U5LD55IP.js";import"./chunk-F2X3VGZZ.js";import"./chunk-TYETQJ2X.js";import{m as F,r as G,t as L}from"./chunk-353U23ZQ.js";import{$b as y,Bb as k,Jc as J,Lb as g,Lc as T,Mc as x,Ob as N,Vb as a,Wb as o,X as H,Xb as S,Yc as v,bb as I,c as A,cb as V,ec as R,fc as u,gb as d,ha as f,pa as h,qa as C,qc as p,rc as b,s as M,sc as U,uc as z,vb as D,yc as B,zc as j}from"./chunk-ARSLNNKY.js";import{a as r,b as l}from"./chunk-YQFG5XE2.js";var ce={data:{data:[],totalCount:0},filter:{PageNumber:1,PageSize:20,Number:""}},P=W(ee(ce),X(t=>({first:v(()=>(t.filter().PageNumber-1)*t.filter().PageSize+1),end:v(()=>Math.min(t.filter().PageNumber*t.filter().PageSize,t.data().totalCount)),hasCheckedRows:v(()=>t.data().data.some(c=>c.checked)),checkedAPCollection:v(()=>t.data().data.filter(c=>c.checked).map(c=>c.id))})),Z(t=>{let c=f(E),e=f(pe);return{updateFilter(i){w(t,n=>l(r({},n),{filter:r(r({},n.filter),i)}))},onRowSelect(i){w(t,n=>{let s=n.data.data.map(_=>_.id===i.id?l(r({},_),{checked:!0}):_);return l(r({},n),{data:l(r({},n.data),{data:s})})})},onRowUnselect(i){w(t,n=>{let s=n.data.data.map(_=>_.id===i.id?l(r({},_),{checked:!1}):_);return l(r({},n),{data:l(r({},n.data),{data:s})})})},onHeaderCheckboxToggle(i){w(t,n=>{let s=n.data.data.map(_=>l(r({},_),{checked:i}));return l(r({},n),{data:l(r({},n.data),{data:s})})})},getARCollection:ne(A(H(i=>c.getAPJournal(i).pipe(M(n=>l(r({},n),{data:n.data.map(s=>l(r({},s),{due:e.from(s.due)?e.from(s.due).format():null,checked:!1}))})),oe({next:n=>{w(t,s=>l(r({},s),{data:n}))},error:n=>{console.error("Error fetching customer invoice:",n)}})))))}}),Y(t=>({onInit:()=>{t.getARCollection(t.filter)}})));var me=()=>({height:"calc(100vh - 70px)"});function de(t,c){if(t&1){let e=y();a(0,"p-button",8),R("onClick",function(){h(e);let i=u(2);return C(i.onCreateJournal())}),o()}}function se(t,c){if(t&1&&k(0,de,1,0,"p-button",7),t&2){let e=u();g("ngIf",e.store.hasCheckedRows())}}function ue(t,c){t&1&&(a(0,"tr")(1,"th",10),S(2,"p-tableHeaderCheckbox"),o(),a(3,"th"),p(4,"Outlet"),o(),a(5,"th"),p(6,"Number"),o(),a(7,"th"),p(8,"Supplier"),o(),a(9,"th"),p(10,"Date"),o(),a(11,"th"),p(12,"Due"),o(),a(13,"th"),p(14,"Note"),o(),a(15,"th"),p(16,"Payment"),o(),S(17,"th"),o())}function _e(t,c){if(t&1&&(a(0,"tr")(1,"td"),S(2,"p-tableCheckbox",11),o(),a(3,"td"),p(4),o(),a(5,"td")(6,"a",12),p(7),o()(),a(8,"td"),p(9),o(),a(10,"td"),p(11),J(12,"date"),o(),a(13,"td"),p(14),J(15,"date"),o(),a(16,"td"),S(17,"div",13),o(),a(18,"td"),p(19),o(),a(20,"td"),S(21,"p-button",14),o()()),t&2){let e=c.$implicit,m=u(2);d(2),g("value",e),d(2),b(e.outlet),d(2),g("href",m.authService.getTenantExternalURL()+"/menu/Debt/Debt/Join_Bill/New_Join_Bill/Info?ID="+e.id,V),d(),U(" ",e.number," "),d(2),b(e.customer),d(2),b(T(12,12,e.date,"d MMM y")),d(3),b(e.due?T(15,15,e.due,"d MMM y hh:mm"):"-"),d(3),g("innerHTML",e.note,I),d(2),b(e.payment),d(2),g("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function fe(t,c){if(t&1&&p(0),t&2){let e=u(2);z(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function ge(t,c){t&1&&(a(0,"tr")(1,"td",15)(2,"span"),p(3,"No records found."),o()()())}function xe(t,c){if(t&1){let e=y();a(0,"p-panel")(1,"p-table",9),R("onPage",function(i){h(e);let n=u();return C(n.onPageChange(i))})("onHeaderCheckboxToggle",function(i){h(e);let n=u();return C(n.onHeaderCheckboxToggle(i))})("onRowSelect",function(i){h(e);let n=u();return C(n.onRowSelect(i))})("onRowUnselect",function(i){h(e);let n=u();return C(n.onRowUnselect(i))}),k(2,ue,18,0,"ng-template",null,2,x)(4,_e,22,18,"ng-template",null,3,x)(6,fe,1,3,"ng-template",null,4,x)(8,ge,4,0,"ng-template",null,5,x),o()()}if(t&2){let e=u();N(j(9,me)),d(),g("value",e.store.data().data)("scrollable",!0)("scrollHeight","calc(100vh - 142px)")("paginator",!0)("rows",e.store.filter().PageSize)("totalRecords",e.store.data().totalCount)("lazy",!0)}}var Ge=(()=>{class t{constructor(){this.store=f(P),this.generateJournalService=f(E),this.authService=f(O)}onPageChange(e){let m=e.first/e.rows;this.store.updateFilter(l(r({},this.store.filter()),{PageNumber:m+1}))}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(m=>{this.store.onRowUnselect(m)});return}else this.store.onRowUnselect(e.data)}onCreateJournal(){this.generateJournalService.createAPJournal(this.store.checkedAPCollection()).subscribe()}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-ap-journal"]],features:[B([P])],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","AP Collection"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onPage","onHeaderCheckboxToggle","onRowSelect","onRowUnselect","value","scrollable","scrollHeight","paginator","rows","totalRecords","lazy"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"innerHTML"],[3,"icon","severity","text"],["colspan","8"]],template:function(m,i){m&1&&(a(0,"app-main-panel",6),k(1,se,1,1,"ng-template",null,0,x)(3,xe,10,10,"ng-template",null,1,x),o())},dependencies:[te,le,ae,ie,re,L,F,G,$,K,Q,q],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();export{Ge as ApJournalComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var v=Object.create;var n=Object.defineProperty,w=Object.defineProperties,x=Object.getOwnPropertyDescriptor,y=Object.getOwnPropertyDescriptors,z=Object.getOwnPropertyNames,m=Object.getOwnPropertySymbols,A=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;var l=(b,a)=>(a=Symbol[b])?a:Symbol.for("Symbol."+b),B=b=>{throw TypeError(b)};var r=(b,a,c)=>a in b?n(b,a,{enumerable:!0,configurable:!0,writable:!0,value:c}):b[a]=c,D=(b,a)=>{for(var c in a||={})o.call(a,c)&&r(b,c,a[c]);if(m)for(var c of m(a))s.call(a,c)&&r(b,c,a[c]);return b},E=(b,a)=>w(b,y(a));var F=(b,a)=>{var c={};for(var d in b)o.call(b,d)&&a.indexOf(d)<0&&(c[d]=b[d]);if(b!=null&&m)for(var d of m(b))a.indexOf(d)<0&&s.call(b,d)&&(c[d]=b[d]);return c};var G=(b,a)=>()=>(a||b((a={exports:{}}).exports,a),a.exports);var C=(b,a,c,d)=>{if(a&&typeof a=="object"||typeof a=="function")for(let e of z(a))!o.call(b,e)&&e!==c&&n(b,e,{get:()=>a[e],enumerable:!(d=x(a,e))||d.enumerable});return b};var H=(b,a,c)=>(c=b!=null?v(A(b)):{},C(a||!b||!b.__esModule?n(c,"default",{value:b,enumerable:!0}):c,b));var I=(b,a,c)=>new Promise((d,e)=>{var f=g=>{try{i(c.next(g))}catch(j){e(j)}},h=g=>{try{i(c.throw(g))}catch(j){e(j)}},i=g=>g.done?d(g.value):Promise.resolve(g.value).then(f,h);i((c=c.apply(b,a)).next())}),t=function(b,a){this[0]=b,this[1]=a},J=(b,a,c)=>{var d=(h,i,g,j)=>{try{var p=c[h](i),q=(i=p.value)instanceof t,u=p.done;Promise.resolve(q?i[0]:i).then(k=>q?d(h==="return"?h:"next",i[1]?{done:k.done,value:k.value}:k,g,j):g({value:k,done:u})).catch(k=>d("throw",k,g,j))}catch(k){j(k)}},e=h=>f[h]=i=>new Promise((g,j)=>d(h,i,g,j)),f={};return c=c.apply(b,a),f[l("asyncIterator")]=()=>f,e("next"),e("throw"),e("return"),f},K=b=>{var a=b[l("asyncIterator")],c=!1,d,e={};return a==null?(a=b[l("iterator")](),d=f=>e[f]=h=>a[f](h)):(a=a.call(b),d=f=>e[f]=h=>{if(c){if(c=!1,f==="throw")throw h;return h}return c=!0,{done:!1,value:new t(new Promise(i=>{var g=a[f](h);g instanceof Object||B("Object expected"),i(g)}),1)}}),e[l("iterator")]=()=>e,d("next"),"throw"in a?d("throw"):e.throw=f=>{throw f},"return"in a&&d("return"),e},L=(b,a,c)=>(a=b[l("asyncIterator")])?a.call(b):(b=b[l("iterator")](),a={},c=(d,e)=>(e=b[d])&&(a[d]=f=>new Promise((h,i,g)=>(f=e.call(b,f),g=f.done,Promise.resolve(f.value).then(j=>h({value:j,done:g}),i)))),c("next"),c("return"),a);export{D as a,E as b,F as c,G as d,H as e,I as f,t as g,J as h,K as i,L as j};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as n}from"./chunk-QIXIZZPY.js";import{p as i}from"./chunk-TYETQJ2X.js";import{ha as t}from"./chunk-ARSLNNKY.js";var d=(e,r)=>{let o=t(n),u=t(i);return console.log("Auth Guard activated",e),console.log("Auth Guard activated",r),!o.isAuthenticated()||o.isTokenExpired()?(console.warn("User is not authenticated or token is expired",e,r),u.navigate(["authentication/login"],{queryParams:{returnUrl:r.url}}),!1):!0};export{d as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as Je,b as qe,c as Qe,d as Xe,e as Ze,f as et}from"./chunk-O2GA6PH7.js";import{c as Z,d as re}from"./chunk-PZBZVQUY.js";import{a as ze,b as Ye}from"./chunk-ZPTNYW2S.js";import{h as ee,i as Ke,j as ye,k as be,l as te}from"./chunk-GY53MWXH.js";import{f as Y,g as K}from"./chunk-6NCHCAKY.js";import"./chunk-5AITWOQZ.js";import"./chunk-ACQX2T2H.js";import{a as Ee}from"./chunk-W76GKZZU.js";import{c as H,d as V}from"./chunk-JG5HGOEX.js";import{a as ve,b as z}from"./chunk-7U2I35GP.js";import{g as R}from"./chunk-ZB6TB7JI.js";import"./chunk-7KQDKLO4.js";import{a as se,b as $e,c as Ve,d as We,e as Ue,f as je,g as He}from"./chunk-H4V6YZX2.js";import{C as B,D as $,u as Be}from"./chunk-WAJWW3TC.js";import{e as j,f as _e,j as ae,k as fe,m as ge,n as xe,o as Ne,p as he,w as Ce,y as X,z as Se}from"./chunk-U6SRN7P3.js";import"./chunk-TPGKCMVN.js";import"./chunk-BCXNVGDH.js";import{d as de}from"./chunk-U5LD55IP.js";import"./chunk-F2X3VGZZ.js";import{n as ie,p as Ge,q as N,x as A}from"./chunk-TYETQJ2X.js";import{m as k,q as Le,t as D}from"./chunk-353U23ZQ.js";import{$b as w,Ac as oe,Bb as d,Ga as O,Jc as ke,Kc as Ae,Lb as s,Mc as u,Ob as T,Qb as me,Rb as v,Tb as y,Ub as b,Vb as a,Wb as o,X as Q,Xb as W,Yc as ce,Z as E,ba as ue,bb as De,c as Me,ec as M,fc as c,gb as p,ha as x,pa as C,qa as S,qc as m,rc as _,s as q,sc as P,vb as F,yc as Re,zc as I}from"./chunk-ARSLNNKY.js";import{a as f,b as g}from"./chunk-YQFG5XE2.js";var L=(()=>{class t{constructor(){this.httpService=x(de)}getGlobalConfiguration(){return this.httpService.get(void 0,"/api/setup/GlobalConfiguration")}saveGlobalConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitGlobalConfiguration",e)}fetchPOSOutletConfiguration(){return this.httpService.get(void 0,"/api/Setup/OutletConfiguration")}fetchPOSOutletFormConfiguration(e){let n={params:e};return this.httpService.get(void 0,"/api/Setup/OutletConfigurationForm",n)}updatePOSOutletConfiguration(e){return this.httpService.post(void 0,"/api/Setup/SubmitOutletConfiguration",e)}fetchPOSPaymentConfiguration(){return this.httpService.get(void 0,"/api/Setup/PaymentConfiguration")}fetchPOSPaymentFormConfiguration(e){let n={params:e};return this.httpService.get(void 0,"api/Setup/PaymentConfigurationForm",n)}updatePOSPaymentConfiguration(e){return this.httpService.post(void 0,"/api/Setup/SubmitPaymentConfiguration",e)}fetchPOSTaxConfiguration(){return this.httpService.get(void 0,"/api/setup/TaxConfigurationForm")}updatePOSTaxConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitTaxConfiguration",e)}fetchPOSWriteOffConfiguration(){return this.httpService.get(void 0,"/api/setup/WriteOffConfigurationList")}fetchPOSWriteOffFormConfiguration(e){let n={params:e};return this.httpService.get(void 0,"/api/setup/WriteOffConfigurationForm",n)}updatePOSWriteOffConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitWriteOffConfiguration",e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=ue({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var G=function(t){return t.POSGLOBAL_SELL="Sell",t.POSGLOBAL_BUY="Buy",t.POSGLOBAL_ADJUSTMENT="Adjustment",t.POSGLOBAL_PREPAID="Prepaid",t.POSGLOBAL_RETURN="Return",t.POSGLOBAL_DEBT="Debt",t.POSGLOBAL_PAYMENTFEE="Payment Fee",t.POSGLOBAL_MANUFACTURING="Manufacturing",t.POSGLOBAL_ADVANCE="Advance",t}(G||{});var tt={[G.POSGLOBAL_SELL]:[{typeID:2,side:"debit",label:"Account Receivable"},{typeID:1,side:"credit",label:"Sales"},{typeID:4,side:"debit",label:"COGS"},{typeID:3,side:"credit",label:"Sold Inventory"},{typeID:10,side:"debit",label:"Sales Discount"}],[G.POSGLOBAL_BUY]:[{typeID:27,side:"debit",label:"Pending Paid Inventory"},{typeID:5,side:"credit",label:"Account Payable"},{typeID:28,side:"debit",label:"Inventory Bought"},{typeID:27,side:"credit",label:"Pending Paid Inventory"},{typeID:11,side:"credit",label:"Purchase Discount"}],[G.POSGLOBAL_ADJUSTMENT]:[{typeID:26,side:"debit",label:"Adjustment Asset"},{typeID:21,side:"credit",label:"Adjustment Expense"}],[G.POSGLOBAL_PREPAID]:[{typeID:29,side:"debit",label:"Accounting for Prepaid"},{typeID:29,side:"credit",label:"Accounting for Prepaid"},{typeID:30,side:"debit",label:"Sales For Prepaid"}],[G.POSGLOBAL_RETURN]:[{typeID:8,side:"debit",label:"Sales Return"},{typeID:3,side:"debit",label:"Inventory"},{typeID:4,side:"credit",label:"COGS"},{typeID:9,side:"credit",label:"Purchase Return"}],[G.POSGLOBAL_DEBT]:[{typeID:17,side:"debit",label:"Consignment Payable"}],[G.POSGLOBAL_PAYMENTFEE]:[{typeID:19,side:"debit",label:"Payment Fee"},{typeID:20,side:"credit",label:"Surcharge"}],[G.POSGLOBAL_MANUFACTURING]:[{typeID:24,side:"debit",label:"Finished Goods"},{typeID:23,side:"credit",label:"Raw Material"},{typeID:25,side:"credit",label:"Production Expenses"}],[G.POSGLOBAL_ADVANCE]:[{typeID:15,side:"debit",label:"Crossing Account"},{typeID:16,side:"debit",label:"Retained Earnings"},{typeID:18,side:"debit",label:"Current Earnings"}]};function dt(t,r){if(t&1){let e=w();a(0,"div",5)(1,"p-button",6),M("onClick",function(){C(e);let i=c();return S(i.onSubmit())}),o()()}}function _t(t,r){if(t&1&&(a(0,"p-tab",10),m(1),o()),t&2){let e=r.$implicit;s("value",e.value),p(),_(e.label)}}function ft(t,r){if(t&1&&(a(0,"div",19)(1,"div")(2,"span"),m(3),o()(),a(4,"div")(5,"span"),m(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),_(e.name)}}function gt(t,r){if(t&1&&(a(0,"div",19)(1,"div")(2,"span"),m(3),o()(),a(4,"div")(5,"span"),m(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),_(e.name)}}function xt(t,r){if(t&1&&(a(0,"div",14)(1,"div",15)(2,"div",5)(3,"label",16),m(4),o(),a(5,"span",17),m(6),o()(),a(7,"p-select",18),d(8,ft,7,2,"ng-template",null,2,u)(10,gt,7,2,"ng-template",null,3,u),o()()()),t&2){let e=c(),n=e.$implicit,i=e.$index,l=c(4);s("formGroupName",i),p(4),_(n.entry.value.label),p(2),_(n.entry.value.side),p(),s("options",l.posIntegration().options.accounts)}}function ht(t,r){if(t&1&&d(0,xt,12,4,"div",14),t&2){let e=r.$implicit;me(e.entry.value.side==="debit"?0:-1)}}function Ct(t,r){if(t&1&&(a(0,"div",19)(1,"div")(2,"span"),m(3),o()(),a(4,"div")(5,"span"),m(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),_(e.name)}}function St(t,r){if(t&1&&(a(0,"div",19)(1,"div")(2,"span"),m(3),o()(),a(4,"div")(5,"span"),m(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),_(e.name)}}function vt(t,r){if(t&1&&(a(0,"div",14)(1,"div",15)(2,"div",5)(3,"label",16),m(4),o(),a(5,"span",20),m(6),o()(),a(7,"p-select",18),d(8,Ct,7,2,"ng-template",null,2,u)(10,St,7,2,"ng-template",null,3,u),o()()()),t&2){let e=c(),n=e.$implicit,i=e.$index,l=c(4);s("formGroupName",i),p(4),_(n.entry.value.label),p(2),_(n.entry.value.side),p(),s("options",l.posIntegration().options.accounts)}}function yt(t,r){if(t&1&&d(0,vt,12,4,"div",14),t&2){let e=r.$implicit;me(e.entry.value.side==="credit"?0:-1)}}function bt(t,r){if(t&1&&(a(0,"p-tabpanel",10)(1,"div",11)(2,"div",12)(3,"div",13),y(4,ht,1,1,null,null,v),o()(),a(6,"div",12)(7,"div",13),y(8,yt,1,1,null,null,v),o()()()()),t&2){let e=r.$implicit,n=c(3);s("value",e.value),p(),s("formGroupName",e.value),p(3),b(n.getDebitEntries(e.value)),p(4),b(n.getCreditEntries(e.value))}}function Pt(t,r){if(t&1){let e=w();a(0,"form",8),M("ngSubmit",function(){C(e);let i=c(2);return S(i.onSubmit())}),a(1,"p-tabs",9)(2,"p-tablist"),y(3,_t,2,2,"p-tab",10,v),o(),a(5,"p-tabpanels"),y(6,bt,10,2,"p-tabpanel",10,v),o()()()}if(t&2){let e=c(2);s("formGroup",e.accountForm),p(),s("value",e.tab())("lazy",!0),p(2),b(e.tabs()),p(3),b(e.tabs())}}function Ot(t,r){if(t&1&&d(0,Pt,8,3,"form",7),t&2){let e=c();s("ngIf",e.posIntegration())}}var nt=(()=>{class t{constructor(){this.posConfigService=x(L),this.fb=x(Ce),this.tab=O(G.POSGLOBAL_SELL),this.tabs=O(Object.values(G).map(e=>({label:e,value:e}))),this.posIntegration=O(null),this.form=O([]),this.descriptionsMap=new Map,this.objectKeys=Object.keys,this.posGlobalTabEnum=G}ngOnInit(){this.posConfigService.getGlobalConfiguration().pipe(E(e=>{this.posIntegration.set(e),this.form.set(e.form),this.descriptionsMap=new Map(e.descriptions.map(n=>[+n.id,n.name])),this.initializeForm()})).subscribe()}initializeForm(){let e={};this.tabs().forEach(n=>{let i=this.getEntriesForTab(n.value);console.log(`Entries for ${n.value}:`,i),e[n.value]=this.fb.array(i.map(l=>this.createEntryFormGroup(l)))}),this.accountForm=this.fb.group(e)}createEntryFormGroup(e){return this.fb.group({typeID:[e.typeID],label:[e.label],side:[e.side],accountID:[this.getAccountIDByTypeID(e.typeID)]})}getAccountIDByTypeID(e){return this.form().find(i=>i.typeID===e)?.accountID||""}getEntriesForTab(e){return tt[e]||[]}getTabEntries(e){return this.accountForm.get(e)}updateAccountID(e,n){let i=this.form().map(l=>l.typeID===n?g(f({},l),{accountID:e}):l);this.form.set(i)}onSubmit(){let e=this.accountForm.getRawValue(),n=[],i=new Set;for(let l of Object.values(e))for(let{typeID:h,accountID:U}of l){let we=`${h}_${U}`;i.has(we)||(i.add(we),n.push({typeID:h,accountID:U}))}console.log("Form submitted with value:",n),this.posConfigService.saveGlobalConfiguration({form:n}).subscribe({next:()=>console.log("Save successful"),error:l=>console.error("Save failed",l)})}getDebitEntries(e){return this.getTabEntries(e).controls.map((n,i)=>({entry:n,index:i})).filter(n=>n.entry.value.side==="debit")}getCreditEntries(e){return this.getTabEntries(e).controls.map((n,i)=>({entry:n,index:i})).filter(n=>n.entry.value.side==="credit")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-pos-global"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],["pageTitle","POS Integration"],[1,"d-flex","gap-2"],["label","Submit",3,"onClick"],[3,"formGroup","ngSubmit",4,"ngIf"],[3,"ngSubmit","formGroup"],[1,"border-top",3,"value","lazy"],[3,"value"],[1,"row",3,"formGroupName"],[1,"col"],[1,"row","gap-3"],[1,"col-12",3,"formGroupName"],[1,"form-group","d-flex","flex-column"],["for","",1,"fs-3"],[1,"text-success","fs-3"],["filter","","filterBy","code,name","formControlName","accountID","optionLabel","name","optionValue","id",3,"options"],[1,"d-flex","align-items-center","gap-2"],[1,"text-danger","fs-3"]],template:function(n,i){n&1&&(a(0,"app-main-panel",4),d(1,dt,2,0,"ng-template",null,0,u)(3,Ot,1,1,"ng-template",null,1,u),o())},dependencies:[R,et,Ze,Xe,Qe,Je,qe,Be,K,Y,X,fe,j,_e,D,k,A,$,B,Se,ge,he,xe],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var It=t=>[t];function Et(t,r){if(t&1&&(a(0,"th",8),m(1),o()),t&2){let e=r.$implicit;p(),_(e.name.slice(0,10))}}function Ft(t,r){if(t&1&&(a(0,"tr")(1,"th",6),m(2,"Method"),o(),a(3,"th",7),m(4,"Outlet"),o()(),a(5,"tr"),y(6,Et,2,1,"th",8,v),o()),t&2){let e=c(3);p(3),s("colSpan",e.paymentConfiguration().outlets.length),p(3),b(e.paymentConfiguration().outlets)}}function Tt(t,r){if(t&1&&(a(0,"td"),m(1),o()),t&2){let e=r.$implicit;p(),_(e.accountName)}}function wt(t,r){if(t&1&&(a(0,"tr")(1,"td",9)(2,"a",10),m(3),o()(),y(4,Tt,2,1,"td",null,v),o()),t&2){let e=r.$implicit;p(2),s("routerLink",oe(2,It,e.id)),p(),_(e.name),p(),b(e.accounts)}}function Mt(t,r){if(t&1&&(a(0,"p-table",5),d(1,Ft,8,1,"ng-template",null,1,u)(3,wt,6,4,"ng-template",null,2,u),o()),t&2){let e=c(2);s("scrollable",!0)("scrollHeight","calc(100vh - 70px)")("value",e.paymentConfiguration().payment)}}function Dt(t,r){t&1&&(a(0,"app-main-panel",4),d(1,Mt,5,3,"ng-template",null,0,u),o())}var ot=(()=>{class t{constructor(){this.POSSetupService=x(L),this.paymentConfiguration=O(null)}ngOnInit(){this.POSSetupService.fetchPOSPaymentConfiguration().pipe(E(e=>{this.paymentConfiguration.set(e)})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-pos-payment"]],decls:1,vars:1,consts:[["content",""],["header",""],["body",""],["pageTitle","Payment Method Accounting",4,"ngIf"],["pageTitle","Payment Method Accounting"],[3,"scrollable","scrollHeight","value"],["rowspan","3",2,"min-width","300px"],[3,"colSpan"],[2,"min-width","200px"],["pFrozenColumn",""],[1,"link-primary",3,"routerLink"]],template:function(n,i){n&1&&d(0,Dt,3,0,"app-main-panel",3),n&2&&s("ngIf",i.paymentConfiguration())},dependencies:[R,te,ee,Ke,D,k,A,N],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Rt=()=>({height:"calc(100vh - 70px)"}),kt=t=>[t];function At(t,r){if(t&1&&(a(0,"th"),m(1),o()),t&2){let e=r.$implicit;p(),_(e.value)}}function Lt(t,r){if(t&1&&(a(0,"tr")(1,"th"),m(2,"Name"),o(),y(3,At,2,1,"th",null,v),o()),t&2){let e=c(3);p(3),b(e.outletList().listCOAType)}}function Gt(t,r){if(t&1&&(a(0,"td"),m(1),o()),t&2){let e=r.$implicit;p(),_(e)}}function Nt(t,r){if(t&1&&(a(0,"tr")(1,"td")(2,"a",6),m(3),o()(),y(4,Gt,2,1,"td",null,v),o()),t&2){let e=r.$implicit;p(2),s("routerLink",oe(2,kt,e.OutletID)),p(),P(" ",e.OutletName,""),p(),b(e.Accounts)}}function Bt(t,r){if(t&1&&(a(0,"p-panel")(1,"p-table",5),d(2,Lt,5,0,"ng-template",null,1,u)(4,Nt,6,4,"ng-template",null,2,u),o()()),t&2){let e=c(2);T(I(5,Rt)),p(),s("scrollable",!0)("scrollHeight","calc(100vh - 100px)")("value",e.outletList().listOutletAccount)}}function $t(t,r){if(t&1&&d(0,Bt,6,6,"p-panel",4),t&2){let e=c();s("ngIf",e.outletList())}}var it=(()=>{class t{constructor(){this.POSSetupService=x(L),this.outletList=O(null)}ngOnInit(){this.POSSetupService.fetchPOSOutletConfiguration().pipe(E(e=>{this.outletList.set(e)})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-pos-outlet"]],decls:3,vars:0,consts:[["content",""],["header",""],["body",""],["pageTitle","Outlet Account"],[3,"style",4,"ngIf"],[3,"scrollable","scrollHeight","value"],[1,"link","link-primary",3,"routerLink"]],template:function(n,i){n&1&&(a(0,"app-main-panel",3),d(1,$t,1,1,"ng-template",null,0,u),o())},dependencies:[R,D,k,z,te,ee,A,N,V,H],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Vt=()=>({height:"calc(100vh - 100px)"}),Wt=()=>({height:"calc(100vh - 150px)"});function Ut(t,r){if(t&1){let e=w();a(0,"a",5),m(1,"Cancel"),o(),a(2,"p-button",6),M("onClick",function(){C(e);let i=c();return S(i.updatePOsOutletConfiguration())}),o()}}function jt(t,r){if(t&1&&(a(0,"div",16)(1,"div",17)(2,"span"),m(3),o()(),a(4,"div",17)(5,"span",17),m(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),_(e.name)}}function Ht(t,r){if(t&1&&(a(0,"div",16)(1,"div",17)(2,"span"),m(3),o()(),a(4,"div",18)(5,"span",17),m(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),_(e.name)}}function zt(t,r){if(t&1&&(a(0,"div",12)(1,"span",14),m(2),o(),a(3,"p-select",15),d(4,jt,7,2,"ng-template",null,2,u)(6,Ht,7,2,"ng-template",null,3,u),o()()),t&2){let e,n=r.$implicit,i=r.$index,l=c(3);s("formGroupName",i),p(2),_((e=n.get("TypeName"))==null?null:e.value),p(),s("options",l.options.accounts)}}function Yt(t,r){t&1&&W(0,"hr")}function Kt(t,r){if(t&1&&(a(0,"div",9)(1,"h3",10),m(2),ke(3,"titlecase"),o(),a(4,"div",11),y(5,zt,8,3,"div",12,v),o()(),d(7,Yt,1,0,"hr",13)),t&2){let e,n=r.$implicit,i=r.$index,l=r.$index,h=r.$count,U=c(2);s("formGroupName",i),p(2),P(" ",Ae(3,3,(e=n.get("groupName"))==null?null:e.value)," "),p(3),b(U.getAccountsFormArray(l).controls),p(2),s("ngIf",l!==h-1)}}function Jt(t,r){if(t&1&&(a(0,"p-panel")(1,"p-scroll-panel")(2,"form",7)(3,"div",8),y(4,Kt,8,5,null,null,v),o()()()()),t&2){let e=c();T(I(5,Vt)),p(),T(I(6,Wt)),p(),s("formGroup",e.accountsForm),p(2),b(e.accountGroupsArray.controls)}}var at=(()=>{class t{constructor(){this.route=x(ie),this.POSSetupService=x(L),this.outletForm=O(null),this.allAccounts=[],this.options=null,this.outletName="",this.accountGroups=[{name:"sell",typeIds:[1,2],accounts:[]},{name:"delivery",typeIds:[3,4],accounts:[]},{name:"buy",typeIds:[27,11,28],accounts:[]},{name:"purchase return",typeIds:[9],accounts:[]},{name:"sales return",typeIds:[8],accounts:[]},{name:"adjustment",typeIds:[21,26],accounts:[]}],this.fb=x(Ce)}ngOnInit(){this.accountsForm=this.fb.group({accountGroups:this.fb.array([])}),this.route.paramMap.pipe(q(e=>e.get("id")),Q(e=>this.POSSetupService.fetchPOSOutletFormConfiguration({outletID:e})),E(e=>{this.allAccounts=e.form,this.options=e.options,this.outletName=e.form[0].OutletName,this.accountGroups.forEach(i=>{i.accounts=this.allAccounts.filter(l=>i.typeIds.includes(l.TypeID))});let n=this.accountsForm.get("accountGroups");this.accountGroups.forEach(i=>{n.push(this.createAccountGroupControl(i))})})).subscribe()}get accountGroupsArray(){return this.accountsForm.get("accountGroups")}getAccountsFormArray(e){return this.accountGroupsArray.at(e).get("accounts")}createAccountGroupControl(e){return this.fb.group({groupName:[e.name],accounts:this.fb.array(e.accounts.map(n=>this.createAccountControl(n)))})}createAccountControl(e){return this.fb.group({AccountID:[e.AccountID],TypeID:[e.TypeID],TypeName:[e.TypeName],OutletID:[e.OutletID],OutletName:[e.OutletName]})}updatePOsOutletConfiguration(){let{accountGroups:e}=this.accountsForm.value,n={form:e.flatMap(i=>i.accounts.map(l=>({AccountID:l.AccountID,TypeID:l.TypeID,TypeName:l.TypeName,OutletID:l.OutletID,OutletName:l.OutletName})))};this.POSSetupService.updatePOSOutletConfiguration(n).pipe().subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-pos-outlet-form"]],decls:5,vars:2,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"pageTitle","hasMainWrapperPadding"],["routerLink","/pos-setup/outlets",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[1,"",3,"formGroup"],["formArrayName","accountGroups",1,"d-flex","flex-column","gap-2"],[1,"row",3,"formGroupName"],[1,"fs-4","fw-semibold"],["formArrayName","accounts",1,"row","row-gap-3"],[1,"col-6",3,"formGroupName"],[4,"ngIf"],[1,"fs-3"],["formControlName","AccountID","filter","","filterBy","code,name","optionLabel","name","optionValue","id","placeholder","Select an account",1,"w-100",3,"options"],[1,"d-flex","gap-2"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,i){n&1&&(a(0,"app-main-panel",4),d(1,Ut,3,0,"ng-template",null,0,u)(3,Jt,6,7,"ng-template",null,1,u),o()),n&2&&s("pageTitle","Edit "+i.outletName)("hasMainWrapperPadding",!0)},dependencies:[R,D,k,Le,z,Se,fe,j,_e,ge,he,xe,Ne,K,Y,V,H,Z,$,B,A,N],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Qt=()=>({height:"calc(100vh - 100px)"}),Xt=()=>({width:"100%",height:"calc(100vh - 150px)"}),Zt=()=>({width:"100%"});function en(t,r){if(t&1){let e=w();a(0,"a",6),m(1,"Cancel"),o(),a(2,"p-button",7),M("onClick",function(){C(e);let i=c(3);return S(i.updatePOSOutletConfiguration())}),o()}}function tn(t,r){if(t&1&&(a(0,"div",15)(1,"div",16)(2,"span"),m(3),o()(),a(4,"div",16)(5,"span",16),m(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),_(e.name)}}function nn(t,r){if(t&1&&(a(0,"div",15)(1,"div",16)(2,"span"),m(3),o()(),a(4,"div",17)(5,"span",16),m(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),_(e.name)}}function on(t,r){if(t&1){let e=w();a(0,"div",9)(1,"div",10)(2,"div",11)(3,"label",12),m(4),o()(),a(5,"div",13)(6,"p-select",14),M("ngModelChange",function(i){let l=C(e).$index,h=c(4);return S(h.updateAccountById(i,l))}),d(7,tn,7,2,"ng-template",null,2,u)(9,nn,7,2,"ng-template",null,3,u),o()()()()}if(t&2){let e=r.$implicit,n=r.$index,i=c(4);p(4),_(e.outletName.slice(0,15)),p(2),T(I(7,Zt)),s("ngModel",i.paymentForm().form.accounts[n].accountID)("virtualScroll",!0)("virtualScrollItemSize",50)("options",i.paymentForm().options.chartOfAccount)}}function an(t,r){if(t&1&&(a(0,"p-card")(1,"p-scrollpanel")(2,"div",8),y(3,on,11,8,"div",9,v),o()()()),t&2){let e=c(3);T(I(4,Qt)),p(),T(I(5,Xt)),p(2),b(e.paymentForm().form.accounts)}}function rn(t,r){if(t&1&&(a(0,"app-main-panel",4),d(1,en,3,0,"ng-template",null,0,u)(3,an,5,6,"ng-template",null,1,u),o()),t&2){let e=c(2);s("pageTitle",e.paymentForm().form.paymentMethod.name+" Form Accounting")("hasMainWrapperPadding",!0)}}function pn(t,r){if(t&1&&d(0,rn,5,2,"app-main-panel",5),t&2){let e=c();s("ngIf",e.paymentForm())}}var pt=(()=>{class t{constructor(){this.route=x(ie),this.POSSetupService=x(L),this.paymentForm=O(null),this.router=x(Ge)}ngOnInit(){this.route.paramMap.pipe(q(e=>+e.get("id")),Q(e=>this.POSSetupService.fetchPOSPaymentFormConfiguration({ID:e})),E(e=>{this.paymentForm.set(e)}),Ee("response")).subscribe()}updateAccountById(e,n){let i=this.paymentForm().form.accounts,l=g(f({},this.paymentForm()),{form:g(f({},this.paymentForm().form),{accounts:i.map((h,U)=>U===n?g(f({},h),{accountID:e}):h)})});this.paymentForm.set(l)}updatePOSOutletConfiguration(){let e={form:[...this.paymentForm().form.accounts]};this.POSSetupService.updatePOSPaymentConfiguration(e).pipe(Ee("response"),E(()=>{this.router.navigate(["/pos-setup/payments"])})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-pos-payment-form"]],decls:1,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"pageTitle","hasMainWrapperPadding"],[3,"pageTitle","hasMainWrapperPadding",4,"ngIf"],["routerLink","/pos-setup/payments",1,"p-button","p-button-outlined","p-button-secondary"],["label","Submit",3,"onClick"],[1,"row","row-gap-3"],[1,"col-6","d-flex","flex-column","gap-2"],[1,"row","row-gap-4"],[1,"col-2"],["for",""],[1,"col-6"],["filter","","filterBy","name,code","optionLabel","name","optionValue","id","placeholder","Select an account",1,"w-full",3,"ngModelChange","ngModel","virtualScroll","virtualScrollItemSize","options"],[1,"d-flex","gap-2"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,i){n&1&&d(0,pn,1,1,"app-main-panel",4),n&2&&me(i.paymentForm()?0:-1)},dependencies:[z,ve,R,D,k,re,Z,K,Y,X,j,ae,A,N,$,B,V],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var ln=()=>({height:"calc(100vh - 70px)"}),mn=()=>({width:"100%",height:"calc(100vh - 100px)"});function cn(t,r){if(t&1){let e=w();a(0,"div",5)(1,"a",6),m(2,"Cancel"),o(),a(3,"p-button",7),M("onClick",function(){C(e);let i=c();return S(i.updatePOSTaxConfiguration())}),o()()}}function sn(t,r){if(t&1&&(a(0,"div",5)(1,"div",15)(2,"span"),m(3),o()(),a(4,"div",15)(5,"span",15),m(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),_(e.name)}}function un(t,r){if(t&1&&(a(0,"div",5)(1,"div",15)(2,"span"),m(3),o()(),a(4,"div",16)(5,"span",15),m(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),_(e.name)}}function dn(t,r){if(t&1){let e=w();a(0,"div",11)(1,"div",12)(2,"label",13),m(3),o(),a(4,"p-select",14),M("ngModelChange",function(i){let l=C(e).$index,h=c(2);return S(h.updateAccountID(i,l))}),d(5,sn,7,2,"ng-template",null,2,u)(7,un,7,2,"ng-template",null,3,u),o()()()}if(t&2){let e=r.$implicit,n=r.$index,i=c(2);p(3),_(e.name),p(),s("options",i.taxForm().options.chartOfAccount)("ngModel",i.taxForm().form[n].accountID)}}function _n(t,r){if(t&1&&(a(0,"p-panel")(1,"p-scroll-panel")(2,"div",8)(3,"div",9)(4,"div",10),y(5,dn,9,3,"div",11,v),o()()()()()),t&2){let e=c();T(I(4,ln)),p(),T(I(5,mn)),p(4),b(e.taxForm().form)}}var lt=(()=>{class t{constructor(){this.POSSetupService=x(L),this.taxForm=O(null)}ngOnInit(){this.POSSetupService.fetchPOSTaxConfiguration().pipe(E(e=>{this.taxForm.set(e)})).subscribe()}updateAccountID(e,n){let i=this.taxForm().form,l=g(f({},this.taxForm()),{form:i.map((h,U)=>U===n?g(f({},h),{accountID:e}):h)});this.taxForm.set(l)}updatePOSTaxConfiguration(){let e={form:[...this.taxForm().form]};this.POSSetupService.updatePOSTaxConfiguration(e).pipe(E(n=>console.log(n))).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-pos-tax"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],["pageTitle","Tax Setup"],[1,"d-flex","gap-2"],["routerLink","..",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[1,"row"],[1,"col-4"],[1,"row","row-gap-3"],[1,"col-12"],[1,"d-flex","flex-column"],["for",""],["filter","","filterBy","name,code","optionLabel","name","optionValue","id","placeholder","Select a account",3,"ngModelChange","options","ngModel"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,i){n&1&&(a(0,"app-main-panel",4),d(1,cn,4,0,"ng-template",null,0,u)(3,_n,7,6,"ng-template",null,1,u),o())},dependencies:[R,z,D,K,Y,re,Z,X,j,ae,A,N,$,B,V,H],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var fn=()=>({height:"calc(100vh - 70px)"}),gn=()=>({"min-width":"50rem"}),xn=t=>[t];function hn(t,r){t&1&&W(0,"p-button",6)}function Cn(t,r){if(t&1&&d(0,hn,1,0,"p-button",5),t&2){let e=c();s("ngIf",e.hasCheckedItems())}}function Sn(t,r){t&1&&(a(0,"tr")(1,"th",8),W(2,"p-tableHeaderCheckbox"),o(),a(3,"th"),m(4,"Name"),o(),a(5,"th"),m(6,"Description"),o()())}function vn(t,r){if(t&1&&(a(0,"tr")(1,"td"),W(2,"p-tableCheckbox",9),o(),a(3,"td")(4,"a",10),m(5),o()(),a(6,"td"),m(7),o()()),t&2){let e,n=r.$implicit;p(2),s("value",n),p(2),s("routerLink",oe(4,xn,n.id)),p(),_(n.name),p(2),_((e=n.description)!==null&&e!==void 0?e:"N/A")}}function yn(t,r){if(t&1){let e=w();a(0,"p-panel")(1,"p-table",7),M("onRowSelect",function(i){C(e);let l=c();return S(l.onRowSelect(i))})("onRowUnselect",function(i){C(e);let l=c();return S(l.onRowSelect(i))})("onHeaderCheckboxToggle",function(i){C(e);let l=c();return S(l.onSelectAll(i))}),d(2,Sn,7,0,"ng-template",null,2,u)(4,vn,8,6,"ng-template",null,3,u),o()()}if(t&2){let e=c();T(I(4,fn)),p(),s("value",e.writeoffList().data)("tableStyle",I(5,gn))}}var mt=(()=>{class t{constructor(){this.POSSetupService=x(L),this.writeoffList=O(null),this.hasCheckedItems=ce(()=>{let e=this.writeoffList();return!e||!e.data||!Array.isArray(e.data)?!1:e.data.some(n=>n&&n.checked===!0)})}ngOnInit(){this.POSSetupService.fetchPOSWriteOffConfiguration().pipe(q(e=>g(f({},e),{data:e.data.map(n=>g(f({},n),{checked:!1}))})),E(e=>{this.writeoffList.set(e)})).subscribe()}onRowSelect(e){console.log("Selected Row:",e.data);let n=this.writeoffList();if(!n||!n.data)return;let i=n.data.findIndex(l=>l.id===e.data.id);if(i!==-1){let l=[...n.data];l[i]=g(f({},l[i]),{checked:!l[i].checked}),this.writeoffList.set(g(f({},n),{data:l}))}}onSelectAll(e){let n=this.writeoffList();if(!n?.data)return;let i=n.data.map(l=>g(f({},l),{checked:e.checked}));this.writeoffList.set(g(f({},n),{data:i}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-pos-writeoff"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["body",""],["pageTitle","Write Off"],["severity","danger","label","Delete","icon","fa-solid fa-trash",4,"ngIf"],["severity","danger","label","Delete","icon","fa-solid fa-trash"],["dataKey","id",3,"onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value","tableStyle"],[2,"width","4rem"],[3,"value"],[1,"link-primary",3,"routerLink"]],template:function(n,i){n&1&&(a(0,"app-main-panel",4),d(1,Cn,1,1,"ng-template",null,0,u)(3,yn,6,6,"ng-template",null,1,u),o())},dependencies:[R,D,k,te,ee,ye,be,A,N,$,B,V,H],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var bn=()=>({witdh:"100%",height:"calc(100vh - 150px)"});function Pn(t,r){if(t&1){let e=w();a(0,"div",6)(1,"a",7),m(2,"Cancel"),o(),a(3,"p-button",8),M("onClick",function(){C(e);let i=c(2);return S(i.updateWriteOffConfiguration())}),o()()}}function On(t,r){if(t&1&&(a(0,"div",6)(1,"span",16),m(2),o(),a(3,"span",16),m(4),o()()),t&2){let e=r.$implicit;p(2),P("(",e.code,")"),p(2),_(e.name)}}function In(t,r){if(t&1&&(a(0,"div",6)(1,"span",16),m(2),o(),a(3,"span",16),m(4),o()()),t&2){let e=r.$implicit;p(2),P("(",e.code,")"),p(2),_(e.name)}}function En(t,r){if(t&1){let e=w();a(0,"div",12)(1,"div",13)(2,"label",14),m(3),o(),a(4,"p-select",15),M("ngModelChange",function(i){let l=C(e).$index,h=c(3);return S(h.updateAccountById(i,l))}),d(5,On,5,2,"ng-template",null,2,u)(7,In,5,2,"ng-template",null,3,u),o()()()}if(t&2){let e=r.$implicit,n=c(3);p(3),_(e.name),p(),s("ngModel",e.accountID)("options",n.writeOffForm().options.account)("virtualScroll",!0)("virtualScrollItemSize",50)}}function Fn(t,r){if(t&1&&(a(0,"p-card")(1,"p-scroll-panel")(2,"div",9)(3,"div",10)(4,"div",11),y(5,En,9,5,"div",12,v),o()()()()()),t&2){let e=c(2);p(),T(I(2,bn)),p(4),b(e.writeOffForm().form)}}function Tn(t,r){if(t&1&&(a(0,"app-main-panel",5),d(1,Pn,4,0,"ng-template",null,0,u)(3,Fn,7,3,"ng-template",null,1,u),o()),t&2){let e=c();s("pageTitle","Write Off Form "+e.writeOffForm().info.name)("hasMainWrapperPadding",!0)}}var ct=(()=>{class t{constructor(){this.POSSetupService=x(L),this.route=x(ie),this.writeOffForm=O(null)}ngOnInit(){this.route.paramMap.pipe(q(e=>e.get("id")),Q(e=>this.POSSetupService.fetchPOSWriteOffFormConfiguration({ID:e})),E(e=>this.writeOffForm.set(e))).subscribe()}updateAccountById(e,n){let i=this.writeOffForm().form,l=g(f({},this.writeOffForm()),{form:i.map((h,U)=>U===n?g(f({},h),{accountID:e}):h)});this.writeOffForm.set(l)}updateWriteOffConfiguration(){let e={form:this.writeOffForm().form};this.POSSetupService.updatePOSWriteOffConfiguration(e).pipe().subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-pos-writeoff-form"]],decls:1,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"pageTitle","hasMainWrapperPadding",4,"ngIf"],[3,"pageTitle","hasMainWrapperPadding"],[1,"d-flex","gap-2"],["routerLink","/pos-setup/writeoff",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[1,"row"],[1,"col"],[1,"row","row-gap-3"],[1,"col-3"],[1,"d-flex","flex-column"],["for","",1,"d-inline-block","text-truncate",2,"max-width","300px"],["filter","","filterBy","name,code","optionLabel","name","filter","","filterBy","name,code","optionValue","id","placeholder","Select an account",3,"ngModelChange","ngModel","options","virtualScroll","virtualScrollItemSize"],[1,""]],template:function(n,i){n&1&&d(0,Tn,5,2,"app-main-panel",4),n&2&&s("ngIf",i.writeOffForm())},dependencies:[R,D,k,z,ve,re,Z,K,Y,X,j,ae,A,N,$,B],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var st=(()=>{class t{constructor(){this.httpService=x(de)}getExpenseOptions(){return this.httpService.get(void 0,"/api/SetupExpenseOption/GetExpenseOptions")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=ue({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var wn={data:{expenseOptions:[]}},Te=$e(je(wn),He("POSExpenseOptionStore"),Ve(t=>({hasCheckedRows:ce(()=>t.data().expenseOptions.some(r=>r.checked)),checkedInvoice:ce(()=>t.data().expenseOptions.filter(r=>r.checked).map(r=>r.id))})),Ue(t=>{let r=x(st);return{onRowSelect(n){se(t,i=>{let l=i.data.expenseOptions.map(h=>h.id===n.id?g(f({},h),{checked:!0}):h);return g(f({},i),{data:g(f({},i.data),{expenseOptions:l})})})},onRowUnselect(n){se(t,i=>{let l=i.data.expenseOptions.map(h=>h.id===n.id?g(f({},h),{checked:!1}):h);return g(f({},i),{data:g(f({},i.data),{expenseOptions:l})})})},onHeaderCheckboxToggle(n){se(t,i=>{let l=i.data.expenseOptions.map(h=>g(f({},h),{checked:n}));return g(f({},i),{data:g(f({},i.data),{expenseOptions:l})})})},getExpenseOptions:ze(Me(Q(()=>r.getExpenseOptions().pipe(Ye({next:n=>{se(t,i=>g(f({},i),{data:g(f({},i.data),{expenseOptions:n.expenseOptions.map(l=>g(f({},l),{checked:!1}))})}))},error:n=>{console.error("Error fetching expense options:",n)}})))))}}),We({onInit:t=>{t.getExpenseOptions()}}));var Mn=()=>({height:"calc(100vh - 70px)"});function Dn(t,r){t&1&&W(0,"p-button",6)}function Rn(t,r){if(t&1&&d(0,Dn,1,0,"p-button",5),t&2){let e=c();s("ngIf",e.store.hasCheckedRows())}}function kn(t,r){t&1&&(a(0,"tr")(1,"th",8),W(2,"p-tableHeaderCheckbox"),o(),a(3,"th"),m(4,"Name"),o(),a(5,"th"),m(6,"Account"),o(),a(7,"th"),m(8,"Description"),o()())}function An(t,r){if(t&1&&(a(0,"tr")(1,"td"),W(2,"p-tableCheckbox",9),o(),a(3,"td"),m(4),o(),a(5,"td"),m(6),o(),a(7,"td"),W(8,"p",10),o()()),t&2){let e=r.$implicit;p(2),s("value",e),p(2),_(e.name),p(2),_(e.accountName),p(2),s("innerHTML",e.description,De)}}function Ln(t,r){if(t&1){let e=w();a(0,"p-panel")(1,"p-table",7),M("onRowSelect",function(i){C(e);let l=c();return S(l.onRowSelect(i))})("onRowUnselect",function(i){C(e);let l=c();return S(l.onRowUnselect(i))})("onHeaderCheckboxToggle",function(i){C(e);let l=c();return S(l.onHeaderCheckboxToggle(i))}),d(2,kn,9,0,"ng-template",null,2,u)(4,An,9,4,"ng-template",null,3,u),o()()}if(t&2){let e=c();T(I(3,Mn)),p(),s("value",e.store.data().expenseOptions)}}var ut=(()=>{class t{constructor(){this.store=x(Te)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){Array.isArray(e.data)?e.data.forEach(n=>{this.store.onRowUnselect(n)}):this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-pos-expense-option"]],features:[Re([Te])],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["body",""],["pageTitle","Contact Form"],["label","Delete","severity","danger","icon","fa-solid fa-trash",4,"ngIf"],["label","Delete","severity","danger","icon","fa-solid fa-trash"],["dataKey","id",3,"onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value"],[2,"width","4rem"],[3,"value"],[3,"innerHTML"]],template:function(n,i){n&1&&(a(0,"app-main-panel",4),d(1,Rn,1,1,"ng-template",null,0,u)(3,Ln,6,4,"ng-template",null,1,u),o())},dependencies:[R,te,ee,ye,be,V,H,$,B,D,k],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Ma=[{path:"",redirectTo:"global",pathMatch:"full"},{path:"",children:[{path:"global",component:nt},{path:"outlets",component:it},{path:"outlets/:id",component:at},{path:"payments",component:ot},{path:"payments/:id",component:pt},{path:"taxs",component:lt},{path:"writeoff",component:mt},{path:"writeoff/:id",component:ct},{path:"expense-option",component:ut}]}];export{Ma as POS_SETUP_ROUTES};
|