marketplacepos 2.7.5 → 2.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/{369.19d90a301af16090.js → 369.8e0f0cb3753df1cb.js} +1 -1
- package/Marketplace/397.5272744096b3c1f6.js +1 -0
- package/Marketplace/408.37b4fc08ff0dec9d.js +1 -0
- package/Marketplace/512.29e1a80c0261c3fd.js +1 -0
- package/Marketplace/516.62e0aa94b5bf1d69.js +1 -0
- package/Marketplace/643.cb4d6fbf012ab5e2.js +1 -0
- package/Marketplace/833.ac6eaa6a9d4889f8.js +1 -0
- package/Marketplace/863.8a1ee5ad77c709bd.js +1 -0
- package/Marketplace/877.162c86da2be22c5c.js +1 -0
- package/Marketplace/993.2e09a35cae6cb725.js +1 -0
- package/Marketplace/common.964b6e7314a0ac53.js +1 -0
- package/Marketplace/index.html +2 -2
- package/Marketplace/main.4b854eb9a27f62ed.js +1 -0
- package/Marketplace/runtime.8464b07500ba30ae.js +1 -0
- package/Marketplace/{styles.bd36b2077413d718.css → styles.97105d62c44869cb.css} +2 -2
- package/package.json +1 -1
- package/Marketplace/397.bd20bd794e4994a8.js +0 -1
- package/Marketplace/512.2796526d3f4c83f5.js +0 -1
- package/Marketplace/516.23780ce40d15b408.js +0 -1
- package/Marketplace/587.69b186b4d297a852.js +0 -1
- package/Marketplace/643.7de8ebbdb10aeed8.js +0 -1
- package/Marketplace/833.552ef7db8cfcde45.js +0 -1
- package/Marketplace/863.67b36200543c45b1.js +0 -1
- package/Marketplace/877.460b82caffdbeb26.js +0 -1
- package/Marketplace/993.f25cf4b5757f3e91.js +0 -1
- package/Marketplace/common.1ae3037cc1f5de4e.js +0 -1
- package/Marketplace/main.3c2864f277c98596.js +0 -1
- package/Marketplace/runtime.2751fd0e9a5e9d78.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[512],{5512:(b,p,o)=>{o.r(p),o.d(p,{LogisticModule:()=>a});var d=o(6895),m=o(284),f=o(3154),t=o(4650),C=o(1318),L=o(7185),r=o(4006),u=o(7481),h=o(8796);function T(n,e){if(1&n&&(t.TgZ(0,"span",14),t._UZ(1,"img",15),t.qZA(),t._uU(2)),2&n){const i=e.item,s=t.oxw();t.xp6(1),t.Q6J("src",s.getChannelLogo(i.TypeID),t.LSH),t.xp6(1),t.hij(" ",i.Name," ")}}function Z(n,e){if(1&n){const i=t.EpF();t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td"),t._uU(6),t.qZA(),t.TgZ(7,"td")(8,"input",16),t.NdJ("ngModelChange",function(g){const v=t.CHM(i).$implicit;return t.KtG(v.ProductSKU=g)}),t.qZA()()()}if(2&n){const i=e.$implicit;t.xp6(2),t.Oqu(i.Name),t.xp6(2),t.Oqu(i.Service),t.xp6(2),t.Oqu(i.Type),t.xp6(2),t.Q6J("ngModel",i.ProductSKU)}}class c{constructor(e,i){this.http=e,this.toastr=i,this.filter={ChannelID:""},this.pageData={Title:"Logistic",Nav:[]},this.LoaderChannel()}ngOnInit(){}Validate(){for(let e of this.list)void 0===this.dataold.find(s=>s.ProductSKU==e.ProductSKU&&s.Name==e.Name)&&(e.IsChange=!0);return Promise.resolve(this.list)}Submit(){this.Validate().then(e=>{this.http.post("/api/Logistic/Submit",this.list).subscribe(i=>{this.toastr.success("Success","Update Complete!",{timeOut:5e3,enableHtml:!0}),this.Get()})})}LoaderChannel(){this.http.post("/api/Logistic/Load",{}).subscribe(e=>{this.Channel=e.Options.Channel,this.filter=e.Filter,this.Name=this.Channel[0].Name,this.Get()})}Get(){this.dataold=[],this.http.post("/api/Logistic/Get",this.filter).subscribe(e=>{let i=this.Channel.find(s=>s.ID==this.filter.ChannelID);null!=i&&(this.Name=i.Name),this.list=e,this.dataold=JSON.parse(JSON.stringify(this.list))})}getChannelLogo(e){return f.g.getChannelLogoByTypeId(e)}}c.\u0275fac=function(e){return new(e||c)(t.Y36(C.O),t.Y36(L._W))},c.\u0275cmp=t.Xpm({type:c,selectors:[["app-logistic"]],decls:29,vars:6,consts:[["hideSearchBox","true","searchBoxPlaceHolder","Enter Number...",3,"headerTitle","hideSearchDropdown","onSubmit"],["container",""],[1,"mb-3","fw-normal"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["ng-option-tmp",""],["role","button","data-toggle","tooltip","data-placement","top","matTooltip","enter Logistic for recorded",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"click"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],["type","text","placeholder","Logistic Service Code",1,"form-control","w-50",3,"ngModel","ngModelChange"]],template:function(e,i){1&e&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(){return i.Get()}),t.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h5",2),t._uU(5,"Select a Channel"),t.qZA(),t.TgZ(6,"ng-select",3),t.NdJ("ngModelChange",function(g){return i.filter.ChannelID=g}),t.YNc(7,T,3,2,"ng-template",4),t.qZA()()()(),t.TgZ(8,"actions")(9,"a",5),t.NdJ("click",function(){return i.Submit()}),t._uU(10,"Submit"),t.qZA()(),t.TgZ(11,"content")(12,"div",6)(13,"div",7)(14,"div",8)(15,"div",9)(16,"table",10)(17,"thead",11)(18,"tr",12)(19,"th"),t._uU(20,"Logistic"),t.qZA(),t.TgZ(21,"th"),t._uU(22,"Service"),t.qZA(),t.TgZ(23,"th"),t._uU(24,"Type"),t.qZA(),t.TgZ(25,"th"),t._uU(26,"Logistic Service Code"),t.qZA()()(),t.TgZ(27,"tbody"),t.YNc(28,Z,9,4,"tr",13),t.qZA()()()()()()()()),2&e&&(t.Q6J("headerTitle","Logistic Courier - "+i.Name)("hideSearchDropdown",!1),t.xp6(6),t.Q6J("clearable",!0)("items",i.Channel)("ngModel",i.filter.ChannelID),t.xp6(22),t.Q6J("ngForOf",i.list))},dependencies:[d.sg,r.Fj,r.JJ,r.On,u.p,h.w9,h.ir]});const S=[{path:"",component:c}];class l{}l.\u0275fac=function(e){return new(e||l)},l.\u0275mod=t.oAB({type:l}),l.\u0275inj=t.cJS({imports:[d.ez,m.Bz.forChild(S)]});class a{}a.\u0275fac=function(e){return new(e||a)},a.\u0275mod=t.oAB({type:a}),a.\u0275inj=t.cJS({imports:[d.ez,m.Bz,l,r.u5,u.R,h.A0]})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[516],{8231:(P,D,r)=>{r.d(D,{j:()=>S});var _=r(5412),p=r(3154),c=r(9694),T=r(6779),e=r(4650),g=r(284),C=r(6895),t=r(4006),n=r(1948),a=r(9549),l=r(4385),i=r(3238),d=r(266),f=r(6401);function v(h,s){if(1&h&&(e.TgZ(0,"mat-option",9)(1,"div",10),e._UZ(2,"img",11),e.TgZ(3,"span"),e._uU(4),e.qZA()()()),2&h){const o=s.$implicit;e.Q6J("value",o.ID)("disabled",o.disabled),e.xp6(1),e.Q6J("matTooltip",o.disabled?"Single Product Scan disabled for this type of Channel":null),e.xp6(1),e.Q6J("src",o.Img,e.LSH),e.xp6(2),e.Oqu(o.Name)}}function M(h,s){if(1&h){const o=e.EpF();e.TgZ(0,"div")(1,"h5",12),e._uU(2,"Scan Type"),e.qZA(),e.TgZ(3,"mat-radio-group",13),e.NdJ("ngModelChange",function(m){e.CHM(o);const I=e.oxw();return e.KtG(I.filter.ScanFull=m)}),e.TgZ(4,"mat-radio-button",14),e._uU(5," Full (Include Inactive Products) "),e.qZA(),e.TgZ(6,"mat-radio-button",15),e._uU(7," Active "),e.qZA()()()}if(2&h){const o=e.oxw();e.xp6(3),e.Q6J("ngModel",o.filter.ScanFull),e.xp6(1),e.Q6J("value",!0),e.xp6(2),e.Q6J("value",!1)}}function E(h,s){if(1&h){const o=e.EpF();e.TgZ(0,"div",16)(1,"h5",3),e._uU(2),e.ALo(3,"date"),e.qZA(),e.TgZ(4,"mat-radio-group",17),e.NdJ("ngModelChange",function(m){e.CHM(o);const I=e.oxw();return e.KtG(I.filter.UpdatedProduct=m)}),e.TgZ(5,"mat-radio-button",18),e._uU(6," Scan All Products "),e.qZA(),e.TgZ(7,"mat-radio-button",19),e._uU(8," Scan Updated Products "),e.qZA()()()}if(2&h){const o=e.oxw();e.xp6(2),e.hij(" Last Scan: ",e.xi3(3,4,o.selectedChannel.LastSync,"dd MMMM yyyy HH:mm")," "),e.xp6(2),e.Q6J("ngModel",o.filter.UpdatedProduct),e.xp6(1),e.Q6J("value",!1),e.xp6(2),e.Q6J("value",!0)}}function O(h,s){if(1&h){const o=e.EpF();e.TgZ(0,"div",16)(1,"h5",3),e._uU(2," Scan Option "),e.qZA(),e.TgZ(3,"mat-radio-group",20),e.NdJ("ngModelChange",function(m){e.CHM(o);const I=e.oxw();return e.KtG(I.filter.Async=m)}),e.TgZ(4,"mat-radio-button",21),e._uU(5," Asynchronous (Get Notified when Complete) "),e.qZA(),e.TgZ(6,"mat-radio-button",22),e._uU(7," Synchronous (Wait until Complete) "),e.qZA()()()}if(2&h){const o=e.oxw();e.xp6(3),e.Q6J("ngModel",o.filter.Async),e.xp6(1),e.Q6J("value",!0),e.xp6(2),e.Q6J("value",!1)}}class S{constructor(s,o,u){this.dialogRef=s,this.data=o,this.router=u,this.channelType=c.x,this.disabledChannelOption=!1,this.filter={ChannelID:p.g.GuidEMpty,ScanFull:!0,UpdatedProduct:!1,Async:!1},this.isSingleChannel=!!p.g.IsNotEmpty(o.isSingleChannel)&&this.data.isSingleChannel,this.disabledChannelOption=!p.g.IsEmpty(o.disabledChannelOption)&&this.data.disabledChannelOption}ngOnInit(){this.initChannelOptions(),this.initFilter(),this.onSelectChannel(this.data?.filter?.ChannelID),this.initModalConfig()}initModalConfig(){this.modalConfig=new T.O,this.modalConfig.title="Scan Marketplace",this.modalConfig.bodyScrollable=!0}initFilter(){this.filter.ChannelID=this.data?.filter?.ChannelID,this.filter.ScanFull=!1,1==this.channelOptions.length&&(this.filter.ChannelID=this.data.channelOptions[0].ID,this.selectedChannel=this.data.channelOptions[0])}initChannelOptions(){this.channelOptions=JSON.parse(JSON.stringify(this.data.channelOptions)),this.isSingleChannel&&(this.channelOptions=this.channelOptions.map(s=>(s.disabled=!0,(s.TypeID==c.x.Tiktok||s.TypeID==c.x.Tokopedia||s.TypeID==c.x.Lazada)&&(s.disabled=!1),s)).sort(s=>s.disabled?1:-1))}onSelectChannel(s){let o=this.filterChannelById(s);this.selectedChannel=1==this.channelOptions.length?this.channelOptions[0]:o,this.filter.Async=!0,o&&o.TypeID==c.x.Tokopedia?(this.filter.ScanFull=!0,this.isTokopedia=!0):(this.filter.ScanFull=!1,this.isTokopedia=!1),this.iniHasScanUpdate(),this.setDefaultConfigUpdate()}setDefaultConfigUpdate(){this.filter.UpdatedProduct=!1,this.selectedChannel&&p.g.IsNotEmpty(this.selectedChannel.LastSync)&&(this.selectedChannel.TypeID==c.x.ShopeeV2||this.selectedChannel.TypeID==c.x.Tiktok||this.selectedChannel.TypeID==c.x.Lazada)&&(this.filter.UpdatedProduct=!0)}iniHasScanUpdate(){this.hasScanUpdate=!(this.selectedChannel?.TypeID==c.x.WooCommerce||this.selectedChannel?.TypeID==c.x.KalCare||this.selectedChannel?.TypeID==c.x.None||!p.g.IsNotEmpty(this.selectedChannel?.LastSync)||this.isSingleChannel)}filterChannelById(s){let o;return this.channelOptions&&(o=this.channelOptions.find(u=>u.ID==s)),o}submit(){this.selectedChannel.TypeID==c.x.Tokopedia&&this.filter.UpdatedProduct?this.router.navigate(["/menu/products/download/by-url"]).then(()=>{this.dialogRef.close()}):(this.beforeSubmit(),this.dialogRef.close(this.filter))}beforeSubmit(){this.filter.UpdatedProduct&&(this.filter.Async=!1)}isNotEmpty(s){return p.g.IsNotEmpty(s)}onClose(){this.dialogRef.close()}}S.\u0275fac=function(s){return new(s||S)(e.Y36(_.so),e.Y36(_.WI),e.Y36(g.F0))},S.\u0275cmp=e.Xpm({type:S,selectors:[["app-scan-dialog"]],decls:11,vars:8,consts:[[3,"dynamicValidated","config","onOk","onClose","onCancel"],["content",""],[1,"mx-4"],[1,"mb-3","fw-normal"],["appearance","outline",1,"w-100"],["name","channelid","placeholder","Channel",1,"mat-select-channel",3,"disabled","ngModel","ngModelChange"],["class","channel-option",3,"value","disabled",4,"ngFor","ngForOf"],[4,"ngIf"],["class","mt-8",4,"ngIf"],[1,"channel-option",3,"value","disabled"],["matTooltipPosition","above","matTooltipClass","custom-width-tooltip",3,"matTooltip"],[2,"width","18px","margin-right","10px",3,"src"],[1,"mb-3","fw-normal","mt-3"],["name","scanType",1,"form-control","h-100","round",3,"ngModel","ngModelChange"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Full Scan Product",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Only Active Product",1,"me-5",3,"value"],[1,"mt-8"],["name","ScanFull",1,"form-control","h-100","round",2,"line-height","2",3,"ngModel","ngModelChange"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scan product from beginning ( use this if you haven't scanned at all)",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scan only products that have been updated since the last channel scan",1,"me-5",3,"value"],["name","Async",1,"form-control","h-100","round",2,"line-height","2",3,"ngModel","ngModelChange"],["matTooltipClass","custom-width-tooltip","matTooltip","Scan is running in the background, status will be visible in the notification menu","matTooltipPosition","above",1,"me-5",3,"value"],[1,"me-5",3,"value"]],template:function(s,o){1&s&&(e.TgZ(0,"modal-material",0),e.NdJ("onOk",function(){return o.submit()})("onClose",function(){return o.onClose()})("onCancel",function(){return o.onClose()}),e.TgZ(1,"div",1)(2,"div",2)(3,"h5",3),e._uU(4,"Select a Channel"),e.qZA(),e.TgZ(5,"mat-form-field",4)(6,"mat-select",5),e.NdJ("ngModelChange",function(m){return o.filter.ChannelID=m})("ngModelChange",function(m){return o.onSelectChannel(m)}),e.YNc(7,v,5,5,"mat-option",6),e.qZA()(),e.YNc(8,M,8,3,"div",7),e.YNc(9,E,9,7,"div",8),e.YNc(10,O,8,3,"div",8),e.qZA()()()),2&s&&(e.Q6J("dynamicValidated",o.isNotEmpty(o.filter.ChannelID))("config",o.modalConfig),e.xp6(6),e.Q6J("disabled",o.disabledChannelOption)("ngModel",o.filter.ChannelID),e.xp6(1),e.Q6J("ngForOf",o.channelOptions),e.xp6(1),e.Q6J("ngIf",!o.isSingleChannel&&!o.isTokopedia&&o.isNotEmpty(o.filter.ChannelID)),e.xp6(1),e.Q6J("ngIf",o.hasScanUpdate),e.xp6(1),e.Q6J("ngIf",!(null!=o.filter&&o.filter.UpdatedProduct)&&!o.isSingleChannel&&o.isNotEmpty(o.filter.ChannelID)))},dependencies:[C.sg,C.O5,t.JJ,t.On,n.VQ,n.U0,a.KE,l.gD,i.ey,d.gM,f.M,C.uU],encapsulation:2})},6082:(P,D,r)=>{r.d(D,{M:()=>g});var _=r(8505),p=r(3154),c=r(4650),T=r(1318),e=r(7185);class g{constructor(t,n){this.httpService=t,this.toastrService=n}loader(t=p.g.GuidEMpty){return this.httpService.post("/api/product/Load",{ID:t})}LoadInPOS(t=p.g.GuidEMpty){return this.httpService.post("/api/product/LoadInPOS",{ID:t})}filterChannelByTypeId(t,n){return t.filter(a=>-1!==n.findIndex(l=>a.TypeID==l))}getProductStatistic(){return this.httpService.post("/api/product/ProductStatistic",{})}getTotalProductLive(t){return this.httpService.post("/api/product/TotalProductLive",{ID:t})}clearCacheChannel(t){return this.httpService.post("/api/Channel/ClearCacheChannel",{ID:t})}uploadSingleProduct(t,n){return this.httpService.post("api/product/UploadMultipleChannel",{Channel:n,Products:t})}uploadMultipleProduct(t,n){return this.httpService.post("api/product/UploadMultipleProductAndMultipleChannel",{Channel:n,Products:t})}scanSingle(t,n){return this.httpService.post("/api/product/ScanSingle",{ID:t,SKU:n})}scanNotInChannel(t){return this.httpService.post("/api/product/ScanNotinChannel",{ID:t})}findAllSoldInChannel(t){return this.httpService.post("/api/product/GetSoldInChannel",t)}scanAll(t,n,a,l=!1){return this.httpService.post("/api/product/ScanOptimized",{ID:t,ScanFull:n,UpdatedProduct:a,Async:l})}scanCompareToPos(t){return this.httpService.post("/api/product/CompareMarketplaceToPOS",t)}getVariantCodesProduct(t){return t.Variants.map(a=>a.Code)}downloadMultipleProduct(t){let n=t.map(a=>({ChannelItemID:a.ChannelItemID,ChannelID:a.ChannelID}));return this.httpService.post("/api/product/DownloadMultipleProductFromChannel",n).pipe((0,_.b)(a=>{this.toastrService.success(`${a.Count} products downloaded to POS`,"Download Complete")}))}downloadProduct(t){return this.httpService.post("/api/product/DownloadProductFromChannel",{ChannelItemID:t.ChannelItemID,ChannelID:t.ChannelID}).pipe((0,_.b)(()=>{this.toastrService.success("Product successfully downloaded to POS","Download Complete")}))}getVariantCodesProducts(t=[]){let n=[];return t.forEach(a=>{a.Variants.forEach(l=>{n=[...n,l.Code]})}),n}filterUnselectedChannel(t,n){let l,a=[];if(t.forEach(i=>{a=[...a,...i.Channel]}),a&&0!=a.length){let i=[];l=n.filter(d=>(i=a.filter(f=>f.ChannelID==d.ID),i.length!==t.length))}else l=n;return l}findChannelById(t,n){return n.find(a=>a.ID==t)}sortChannel(t=[]){return t.sort((n,a)=>n.TypeID<a.TypeID?1:n.TypeID===a.TypeID?0:-1)}hasSelection(t=[]){return this.selectedProduct(t).length>0}selectedProduct(t=[]){return t.filter(n=>n.selected)}hasSelectionVariant(t){return this.selectedVariantProduct(t).length>0}selectedVariantProduct(t){let n=[];return t.forEach(a=>{n=[...n,...null!=a.Variants?a.Variants.filter(l=>l.selected):""]}),n}getChannelProduct(t){const n=t.Variants;let a=[];for(let l of n)if(null!=l.Channel)for(let i of l.Channel)0==a.filter(d=>d.ChannelID==i.ChannelID).length&&a.push(i);return this.sortChannel(a)}successToastrScanAllProduct(t,n,a){if(a){const l=t?.NotInPOS?.Product?t?.NotInPOS?.Product:0,i=t?.InChannel?.Product?t?.InChannel?.Product:0;this.toastrService.success(`\n ${l+i} found in ${n.Name} </br>\n (${i} In POS + ${l} Not In Pos)\n `,"Scan Complete!",{enableHtml:!0})}else this.toastrService.success(`${t.InChannel?t.InChannel.Product:0} product updates in ${n.Name} </br> \n since ${t.LastUpdate}`,"Scan Complete!",{enableHtml:!0})}checkProductHasScanButton(t,n){let a;return t.map(l=>(l.Channel=this.getChannelProduct(l),a=this.filterUnselectedChannel([l],n),l.hasScan=a.length>0,l))}checkProductHasUploadBtn(t,n){let a;return t.map(l=>(l.Channel=this.getChannelProduct(l),a=this.filterUnselectedChannel([l],n),l.hasUpload=a.length>0,l))}showToastrUploadMultiple(t=[]){let n=[],a=[];if(t.forEach(l=>{"string"==typeof l?.Response?a=[...a,`<li>${l.Response}</li>`]:(l?.Response?.Success.forEach(i=>{n=[...n,`<li>Product ${i} was <b>successfully</b> uploaded to ${l.Name}</li>`]}),l?.Response.Fail.forEach(i=>{a=[...a,`<li>${i}</li>`]}))}),a.length>0&&n.length>0){const l=[...n,...a];this.toastrService.warning(this.concatMessage(l),"Warning!",{enableHtml:!0})}else n.length>0&&0==a.length?this.toastrService.success(this.concatMessage(n),"Success",{enableHtml:!0}):this.toastrService.error(this.concatMessage(a),"Error",{enableHtml:!0})}concatMessage(t=[]){let n="";return t.forEach(a=>{n+=a}),`<ol>${n}</ol>`}showToastrSuccessUploadSingle(t,n){let a=t.filter(d=>0==d.Status),l=t.filter(d=>1==d.Status),i=this.generateToastrMessage(a,l,n);this.toastrService.success(i.message,"Success",{enableHtml:!0})}showToastErrorUploadSingle(t,n){let a=t?.error?.Message.filter(d=>0==d.Status),l=t?.error?.Message.filter(d=>1==d.Status),i=this.generateToastrMessage(a,l,n);"WARNING"==i.status?this.toastrService.warning(i.message,"Warning!",{enableHtml:!0}):this.toastrService.error(i.message,`Error - ${t.status}`,{enableHtml:!0})}generateToastrMessage(t,n,a){let i,l="";return 0==t.length&&n.length>0?(i="SUCCESS",l=this.createSuccessResponse(n,a)):t.length>0&&0==n.length?(i="ERROR",l=this.createErrResponse(t,a)):(i="WARNING",l=`${this.createSuccessResponse(n,a)} ${this.createErrResponse(t,a)}`),l=`<ol>${l}</ol>`,{status:i,message:l}}createErrResponse(t,n){let a="";return t.forEach((l,i)=>{a+=`<li><b>${l.Response}</b> for ${n.Name} in ${l.Name}</li>`}),a}createSuccessResponse(t,n){let a="";return t.forEach((l,i)=>{a+=`<li>Product ${n.Name} was <b>successfully</b> uploaded to ${l.Name}</li>`}),a}getHostName(){if(p.g.IsEmpty(this.hostName)){const t=localStorage.getItem("Authorization");this.hostName=JSON.parse(t)?.Host}return this.hostName}}g.\u0275fac=function(t){return new(t||g)(c.LFG(T.O),c.LFG(e._W))},g.\u0275prov=c.Yz7({token:g,factory:g.\u0275fac,providedIn:"root"})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[643],{8549:(j,R,c)=>{c.r(R),c.d(R,{OrdersModule:()=>I});var u=c(6895),f=c(284),e=c(4650),z=c(7398);class S{constructor(){this.ObjectOrderTabs=[{Title:"1 - New Order",Url:"/menu/Order/new"},{Title:"2 - Ready to Ship",Url:"/menu/Order/ready_to_ship"},{Title:"3 - Shipped",Url:"/menu/Order/Shipped"},{Title:"4 - Completed",Url:"/menu/Order/Delivered"},{Title:"All",Url:"/menu/Order/All"},{Title:"99 - Cancelled",Url:"/menu/Order/Cancelled"},{Title:"Download",Url:"/menu/Order/Download"}]}ngOnInit(){}}S.\u0275fac=function(n){return new(n||S)},S.\u0275cmp=e.Xpm({type:S,selectors:[["app-orders"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,t){1&n&&(e.TgZ(0,"nav",0)(1,"div",1)(2,"div"),e._UZ(3,"nav-tab",2),e.qZA()()(),e._UZ(4,"router-outlet")),2&n&&(e.xp6(3),e.Q6J("Tabs",t.ObjectOrderTabs))},dependencies:[z.e,f.lC]});var g=c(3154),C=c(1318),r=c(7185),s=c(9568),p=c(2428),l=c(4006),d=c(7481),m=c(2594),Z=c(9549),D=c(4385),y=c(3238);function V(a,n){if(1&a&&(e.TgZ(0,"mat-option",16),e.NdJ("click",function(i){return i.stopPropagation()}),e.TgZ(1,"span",17),e._UZ(2,"img",18),e.qZA(),e.TgZ(3,"span"),e._uU(4),e.qZA()()),2&a){const t=n.$implicit;e.Q6J("value",t.ID)("title",t.Name)("title",t.Name),e.xp6(2),e.Q6J("src",t.img,e.LSH),e.xp6(2),e.hij(" ",t.Name," ")}}function W(a,n){if(1&a&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(t.Number)}}function K(a,n){if(1&a&&(e.TgZ(0,"a",21),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit,i=e.oxw();e.Q6J("href",i.domain+t.ID,e.LSH),e.xp6(1),e.Oqu(t.Number)}}function X(a,n){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e.YNc(4,W,2,1,"span",19),e.YNc(5,K,2,2,"a",20),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.ALo(10,"date"),e.qZA()()),2&a){const t=n.$implicit,i=e.oxw();e.xp6(2),e.Oqu(t.Outlet),e.xp6(2),e.Q6J("ngIf",i.hasGuidEmpty(t.ID)),e.xp6(1),e.Q6J("ngIf",!i.hasGuidEmpty(t.ID)),e.xp6(2),e.Oqu(t.Customer),e.xp6(2),e.Oqu(e.xi3(10,5,t.Created,"dd MMM yyyy HH:mm"))}}class q{constructor(n,t,i,o){this.http=n,this.toastr=t,this.localDataService=i,this.channelService=o,this.filter={PageNumber:null,PageSize:null,ListChannelID:[]},this.totaldata=0,this.paginationTotal=0,this.checkboxState=!1}ngOnInit(){this.Load()}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(n=>{this.filter.PageNumber=n.Filter.PageNumber,this.filter.PageSize=n.Filter.RowCount,this.channels=n.Options.Channel,this.channels=this.channelService.mapChannelImage(this.channels),this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Order/Sales_Order/Info?ID=`,this.Get()})}Get(n){this.http.post("api/orders/GetNewOrder",{Number:n,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID}).subscribe(i=>{this.data=i.Data,this.totaldata=this.data.length})}UpdateDelivery(){let n=this.getSelected();if(n.length>0){let t=[];n.forEach(i=>t.push(i)),this.http.post("/api/Orders/UpdateStateDelivery",t).subscribe(i=>{this.toastr.success("Successfully updated","Success")})}}getRowCount(){this.http.post("api/orders/GetCountNewOrder",{ListChannelID:this.filter.ListChannelID}).subscribe(t=>{this.paginationTotal=t.Count})}onCheckboxStateProduct(n){let t=this.data.filter(i=>i.Number==n);if(t.length>0)for(let i of t)i.selected=i.selected}onCheckboxStateChange(){for(let n of this.data)n.selected=this.checkboxState}getSelected(){let n=[];if(this.data){for(let t of this.data)t.selected&&n.push(t);return n}return[]}hasGuidEmpty(n){return n==g.g.GuidEMpty}hasSelection(){return!!this.data&&this.getSelected().length>0}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}}function ee(a,n){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.ALo(5,"number"),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.ALo(8,"number"),e.qZA()()),2&a){const t=n.$implicit;e.xp6(2),e.Oqu(t.Code),e.xp6(2),e.Oqu(e.lcZ(5,3,t.Quantity)),e.xp6(3),e.Oqu(e.lcZ(8,5,t.Price))}}function te(a,n){if(1&a&&(e.TgZ(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"h3",8),e._uU(5,"Outlet Info"),e.qZA()(),e.TgZ(6,"div",4)(7,"div",9),e._uU(8," Outlet : "),e.qZA(),e.TgZ(9,"div",9),e._uU(10),e.qZA()(),e.TgZ(11,"div",4)(12,"div",9),e._uU(13," Date : "),e.qZA(),e.TgZ(14,"div",9),e._uU(15),e.ALo(16,"date"),e.qZA()(),e.TgZ(17,"div",4)(18,"div",9),e._uU(19," Status : "),e.qZA(),e.TgZ(20,"div",9),e._uU(21),e.qZA()(),e.TgZ(22,"div",4)(23,"div",9),e._uU(24," Tax Type : "),e.qZA(),e.TgZ(25,"div",9),e._uU(26),e.qZA()(),e.TgZ(27,"div",4)(28,"div",9),e._uU(29," Due Date : "),e.qZA(),e.TgZ(30,"div",9),e._uU(31),e.ALo(32,"date"),e.qZA()()(),e.TgZ(33,"div",6)(34,"div",7)(35,"h3",8),e._uU(36,"Customer Info"),e.qZA()(),e.TgZ(37,"div",4)(38,"div",9),e._uU(39," Name : "),e.qZA(),e.TgZ(40,"div",9),e._uU(41),e.qZA()(),e.TgZ(42,"div",4)(43,"div",9),e._uU(44," Email : "),e.qZA(),e.TgZ(45,"div",9),e._uU(46),e.qZA()(),e.TgZ(47,"div",4)(48,"div",9),e._uU(49," Mobile : "),e.qZA(),e.TgZ(50,"div",9),e._uU(51),e.qZA()()()(),e.TgZ(52,"div",10)(53,"h3",11),e._uU(54,"Products Sold"),e.qZA(),e.TgZ(55,"div",12)(56,"table",13)(57,"thead",14)(58,"tr",15)(59,"th"),e._uU(60,"Code"),e.qZA(),e.TgZ(61,"th"),e._uU(62,"Quantity"),e.qZA(),e.TgZ(63,"th"),e._uU(64,"Price"),e.qZA()()(),e.TgZ(65,"tbody"),e.YNc(66,ee,9,7,"tr",16),e.qZA()()()()()),2&a){const t=e.oxw();e.xp6(10),e.hij(" ",t.model.Outlet," "),e.xp6(5),e.hij(" ",e.xi3(16,9,t.model.Date,"dd MMM yyyy")," "),e.xp6(6),e.hij(" ",t.model.Delivery," "),e.xp6(5),e.hij(" ",t.model.TaxType," "),e.xp6(5),e.hij(" ",e.xi3(32,12,t.model.DueDate,"dd MMM yyyy")," "),e.xp6(10),e.hij(" ",t.model.Customer.Name," "),e.xp6(5),e.hij(" ",t.model.Customer.Email," "),e.xp6(5),e.hij(" ",t.model.Customer.Mobile," "),e.xp6(15),e.Q6J("ngForOf",t.model.Variants)}}q.\u0275fac=function(n){return new(n||q)(e.Y36(C.O),e.Y36(r._W),e.Y36(s.T),e.Y36(p.T))},q.\u0275cmp=e.Xpm({type:q,selectors:[["app-new-order"]],decls:36,vars:9,consts:[["headerTitle","1 - New Order","searchBoxPlaceHolder","Search Orders...",3,"hideSearchBox","onSubmit"],["container",""],["appearance","outline",1,"w-100"],["multiple","","placeholder","Choose channels",3,"ngModel","ngModelChange"],[3,"value","title","click",4,"ngFor","ngForOf"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageSize",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"filter","totaldata","paginationTotal","total","next","previous"],[3,"value","title","click"],[1,"me-1"],["alt","",2,"width","18px",3,"src"],[4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],["target","_blank",3,"href"]],template:function(n,t){1&n&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(o){return t.Get(o)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"mat-form-field",2)(7,"mat-select",3),e.NdJ("ngModelChange",function(o){return t.filter.ListChannelID=o}),e.YNc(8,V,5,5,"mat-option",4),e.qZA()()(),e.TgZ(9,"div")(10,"h6"),e._uU(11,"Page Number"),e.qZA(),e.TgZ(12,"input",5),e.NdJ("ngModelChange",function(o){return t.filter.PageNumber=o}),e.qZA()(),e.TgZ(13,"div")(14,"h6"),e._uU(15,"Page Size"),e.qZA(),e.TgZ(16,"input",6),e.NdJ("ngModelChange",function(o){return t.filter.PageSize=o}),e.qZA()()()(),e.TgZ(17,"content")(18,"div",7)(19,"div",8)(20,"div",9)(21,"div",10)(22,"table",11)(23,"thead",12)(24,"tr",13)(25,"th"),e._uU(26,"Outlet"),e.qZA(),e.TgZ(27,"th"),e._uU(28,"Order number"),e.qZA(),e.TgZ(29,"th"),e._uU(30,"Customer"),e.qZA(),e.TgZ(31,"th"),e._uU(32,"Created On"),e.qZA()()(),e.TgZ(33,"tbody"),e.YNc(34,X,11,8,"tr",14),e.qZA()(),e.TgZ(35,"app-mat-paginator-no-count",15),e.NdJ("total",function(){return t.getRowCount()})("next",function(){return t.NextPage()})("previous",function(){return t.PreviousPage()}),e.qZA()()()()()()()),2&n&&(e.Q6J("hideSearchBox",!0),e.xp6(7),e.Q6J("ngModel",t.filter.ListChannelID),e.xp6(1),e.Q6J("ngForOf",t.channels),e.xp6(4),e.Q6J("ngModel",t.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",t.filter.PageSize),e.xp6(18),e.Q6J("ngForOf",t.data),e.xp6(1),e.Q6J("filter",t.filter)("totaldata",t.totaldata)("paginationTotal",t.paginationTotal))},dependencies:[u.sg,u.O5,l.Fj,l.wV,l.JJ,l.On,d.p,m.n,Z.KE,D.gD,y.ey,u.uU]});const ne=function(){return["/menu/Order"]};class M{constructor(n,t){this.http=n,this.url=t,this.number=this.url.snapshot.queryParams.Number,this.outlet=this.url.snapshot.queryParams.Outlet}ngOnInit(){this.Load()}Load(){this.http.post("/api/orders/GetInvoiceDetail",{Number:this.number,Outlet:this.outlet}).subscribe(t=>{this.model=t})}}M.\u0275fac=function(n){return new(n||M)(e.Y36(C.O),e.Y36(f.gz))},M.\u0275cmp=e.Xpm({type:M,selectors:[["app-detail-order"]],decls:7,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button",1,"btn","btn-secondary","btn-fill","btn-lg","me-3",3,"routerLink"],[1,"container"],["class","row",4,"ngIf"],[1,"row"],[1,"col-4"],[1,"border","my-3","py-3","col-12"],[1,"row","m-2"],[1,"text-center"],[1,"col"],[1,"col-8"],[1,"text-center","my-3","py-3"],[1,"table-responsive"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"]],template:function(n,t){1&n&&(e.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),e._uU(3,"Back"),e.qZA()(),e.TgZ(4,"content")(5,"div",2),e.YNc(6,te,67,15,"div",3),e.qZA()()()),2&n&&(e.Q6J("headerTitle","Order #"+t.number)("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(2),e.Q6J("routerLink",e.DdM(5,ne)),e.xp6(4),e.Q6J("ngIf",t.model))},dependencies:[u.sg,u.O5,d.p,f.rH,u.JJ,u.uU]});var _=c(9694),N=c(5412),$=c(6709);class U{constructor(n){this.dialogRef=n,this.tandaiSudahDicetak=!1}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak?1:0)}}U.\u0275fac=function(n){return new(n||U)(e.Y36(N.so))},U.\u0275cmp=e.Xpm({type:U,selectors:[["app-print-tokopedia"]],decls:17,vars:1,consts:[[1,"container-fluid"],["mat-dialog-title","",1,"text-center","mb-8","fw-bold"],[1,"row"],[1,"col-12"],[1,"fs-5"],[1,"d-flex","align-items-center","text-center","justify-content-center","mb-8"],[1,"me-2",3,"ngModel","ngModelChange"],[1,"fs-5","pt-1"],[1,"d-flex","align-items-center","justify-content-center","mt-6"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click"]],template:function(n,t){1&n&&(e.TgZ(0,"div",0)(1,"h2",1),e._uU(2,"Cetak label pesanan"),e.qZA(),e.TgZ(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),e._uU(7,"Kamu akan mencetak label yang berisi detail pesanan"),e.qZA(),e.TgZ(8,"div",5)(9,"mat-checkbox",6),e.NdJ("ngModelChange",function(o){return t.tandaiSudahDicetak=o}),e.qZA(),e.TgZ(10,"span",7),e._uU(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),e.qZA()()()()(),e.TgZ(12,"mat-dialog-actions",8)(13,"button",9),e.NdJ("click",function(){return t.onCancel()}),e._uU(14,"Cancel"),e.qZA(),e.TgZ(15,"button",10),e.NdJ("click",function(){return t.onPrint()}),e._uU(16,"Cetak Pesanan"),e.qZA()()()),2&n&&(e.xp6(9),e.Q6J("ngModel",t.tandaiSudahDicetak))},dependencies:[l.JJ,l.On,$.oG,N.uh,N.xY,N.H8]});var ae=c(9300),ie=c(3900);class v{constructor(n,t,i){this.http=n,this.dialog=t,this.toastr=i}printShippingLabelTokopedia(n){const t={OrderNumber:n,Printed:!0};this.dialog.open(U).afterClosed().pipe((0,ae.h)(i=>void 0!==i),(0,ie.w)(i=>(t.Printed=i,this.http.post("api/v1/Shippinglabel/Tokopedia",t)))).subscribe(i=>{const o=window.open("about:blank","_blank");o.document.write(i),o.document.close()})}printShippingLabelTiktok(n,t){this.http.post("api/v1/Shippinglabel/Tiktok",{ShopID:t,OrderNumber:n}).subscribe(o=>{null!=o.data?window.open(o.data.doc_url,"_blank"):this.toastr.error("Cannot Print the Shipping Label,The invoice Number is not set to Pickup","Cannot Print")})}printShippingLabelShopee(n,t){this.http.post("api/v1/Shippinglabel/shopee/DownloadShipping",{ShopID:t,OrderNumber:n}).subscribe(o=>{var h=Uint8Array.from(atob(o),mt=>mt.charCodeAt(0)),A=new Blob([h],{type:"octet/stream"});g.g.openDownloadFile(A,`${n}.pdf`)})}printShippingLabelLazada(n,t){this.http.post("api/v1/Shippinglabel/Lazada/DownloadShipping",{ShopID:t,OrderNumber:n}).subscribe(o=>{null!=o.result.data?window.open(o.result.data.pdf_url,"_blank"):this.toastr.error(o.message,"Cannot Print")})}}v.\u0275fac=function(n){return new(n||v)(e.LFG(C.O),e.LFG(N.uw),e.LFG(r._W))},v.\u0275prov=e.Yz7({token:v,factory:v.\u0275fac});class P{constructor(){}set typeId(n){this.channelLogo=g.g.getChannelLogoByTypeId(n),this.initChannelName(n)}initChannelName(n){switch(n){case _.x.Tokopedia:this.channelName="Tokopedia";break;case _.x.Tiktok:this.channelName="Tiktok";break;case _.x.WooCommerce:this.channelName="WooCommerce";break;case _.x.ShopeeV2:this.channelName="Shopee";break;case _.x.Lazada:this.channelName="Lazada";break;case _.x.KalCare:this.channelName="Kalcare"}}}function oe(a,n){if(1&a&&(e.TgZ(0,"mat-option",19),e.NdJ("click",function(i){return i.stopPropagation()}),e.TgZ(1,"span",20),e._UZ(2,"img",21),e.qZA(),e.TgZ(3,"span"),e._uU(4),e.qZA()()),2&a){const t=n.$implicit;e.Q6J("value",t.ID)("title",t.Name)("title",t.Name),e.xp6(2),e.Q6J("src",t.img,e.LSH),e.xp6(2),e.hij(" ",t.Name," ")}}P.\u0275fac=function(n){return new(n||P)},P.\u0275cmp=e.Xpm({type:P,selectors:[["app-channel-logo"]],inputs:{typeId:"typeId"},decls:4,vars:2,consts:[[1,"d-flex","align-items-center"],[2,"width","20px",3,"src"],[1,"ms-2","fw-bold"]],template:function(n,t){1&n&&(e.TgZ(0,"div",0),e._UZ(1,"img",1),e.TgZ(2,"span",2),e._uU(3),e.qZA()()),2&n&&(e.xp6(1),e.Q6J("src",t.channelLogo,e.LSH),e.xp6(2),e.Oqu(t.channelName))}});const re=function(){return["/menu/Order/detail"]},le=function(a,n){return{Number:a,Outlet:n}};function se(a,n){if(1&a&&(e.TgZ(0,"a",28),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit;e.Q6J("routerLink",e.DdM(3,re))("queryParams",e.WLB(4,le,t.Number,t.Outlet)),e.xp6(1),e.Oqu(t.Number)}}function pe(a,n){if(1&a&&(e.TgZ(0,"a",29),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit,i=e.oxw();e.Q6J("href",i.domain+t.ID,e.LSH),e.xp6(1),e.Oqu(t.Number)}}function de(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"a",30),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,h=e.oxw();return e.KtG(h.onPrintShippingLabel(o.Number,o.ShopID,o.TypeID))}),e._UZ(1,"i",31),e.qZA()}}function ce(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"tr")(1,"td")(2,"input",22),e.NdJ("ngModelChange",function(o){const A=e.CHM(t).$implicit;return e.KtG(A.selected=o)})("ngModelChange",function(){const h=e.CHM(t).$implicit,A=e.oxw();return e.KtG(A.onCheckboxStateProduct(h.Number))}),e.qZA()(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e.YNc(6,se,2,7,"a",23),e.YNc(7,pe,2,2,"a",24),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.qZA(),e.TgZ(10,"td"),e._uU(11),e.ALo(12,"number"),e.qZA(),e.TgZ(13,"td"),e._uU(14),e.ALo(15,"date"),e.qZA(),e.TgZ(16,"td"),e._UZ(17,"app-channel-logo",25),e.qZA(),e.TgZ(18,"td",26),e.YNc(19,de,2,0,"a",27),e.qZA()()}if(2&a){const t=n.$implicit,i=e.oxw();e.xp6(2),e.Q6J("ngModel",t.selected),e.xp6(2),e.Oqu(t.Outlet),e.xp6(2),e.Q6J("ngIf",i.hasGuidEmpty(t.ID)),e.xp6(1),e.Q6J("ngIf",!i.hasGuidEmpty(t.ID)),e.xp6(2),e.Oqu(t.Customer),e.xp6(2),e.Oqu(e.lcZ(12,9,t.Amount)),e.xp6(3),e.Oqu(e.xi3(15,11,t.Created,"dd MMM yyyy HH:mm")),e.xp6(3),e.Q6J("typeId",t.TypeID),e.xp6(2),e.Q6J("ngIf",t.TypeID==i.channelType.ShopeeV2||t.TypeID==i.channelType.Tokopedia||t.TypeID==i.channelType.Tiktok||t.TypeID==i.channelType.Lazada)}}class J{constructor(n,t,i,o,h,A){this.http=n,this.toastr=t,this.localDataService=i,this.dialog=o,this.orderService=h,this.channelService=A,this.filter={PageNumber:null,PageSize:null,ListChannelID:[]},this.totaldata=0,this.paginationTotal=0,this.checkboxState=!1,this.channelType=_.x}ngOnInit(){this.Load()}getChannelLogo(n){return g.g.getChannelLogoByTypeId(n)}hasGuidEmpty(n){return n==g.g.GuidEMpty}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(n=>{this.filter.PageNumber=n.Filter.PageNumber,this.filter.PageSize=n.Filter.RowCount,this.channels=n.Options.Channel,this.channels=this.channelService.mapChannelImage(this.channels),this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(n){this.http.post("api/orders/GetReadyToShip",{Number:n,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID}).subscribe(i=>{this.data=i.Data,this.totaldata=this.data.length})}onPrintShippingLabel(n,t,i){switch(i){case _.x.Tokopedia:this.orderService.printShippingLabelTokopedia(n);break;case _.x.Tiktok:this.orderService.printShippingLabelTiktok(n,t);break;case _.x.ShopeeV2:this.orderService.printShippingLabelShopee(n,t);break;case _.x.Lazada:this.orderService.printShippingLabelLazada(n,t)}}updateDelivery(){let n=this.getSelected();if(n.length>0){let t=[];n.forEach(i=>t.push(i)),this.http.post("/api/Orders/UpdateStateDelivery",t).subscribe(i=>{this.toastr.success("Successfully updated","Success")})}}StoreRowsCountAPIResult(){this.http.post("api/orders/GetRowCount",{PaymentState:"Unpaid",DeliveryState:"Unsent",ListChannelID:this.filter.ListChannelID}).subscribe(t=>{this.paginationTotal=t.Total})}onCheckboxStateProduct(n){let t=this.data.filter(i=>i.Number==n);if(t.length>0)for(let i of t)i.selected=i.selected}onCheckboxStateChange(){for(let n of this.data)n.selected=this.checkboxState}getSelected(){let n=[];if(this.data){for(let t of this.data)t.selected&&n.push(t);return n}return[]}hasSelection(){return!!this.data&&this.getSelected().length>0}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}}function ue(a,n){if(1&a&&(e.TgZ(0,"mat-option",16),e.NdJ("click",function(i){return i.stopPropagation()}),e.TgZ(1,"span",17),e._UZ(2,"img",18),e.qZA(),e.TgZ(3,"span"),e._uU(4),e.qZA()()),2&a){const t=n.$implicit;e.Q6J("value",t.ID)("title",t.Name)("title",t.Name),e.xp6(2),e.Q6J("src",t.img,e.LSH),e.xp6(2),e.hij(" ",t.Name," ")}}J.\u0275fac=function(n){return new(n||J)(e.Y36(C.O),e.Y36(r._W),e.Y36(s.T),e.Y36(N.uw),e.Y36(v),e.Y36(p.T))},J.\u0275cmp=e.Xpm({type:J,selectors:[["app-ready-to-ship"]],decls:46,vars:10,consts:[["headerTitle","2 - Ready to Ship","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["container","",1,""],["appearance","outline",1,"w-100"],["multiple","","placeholder","Choose channels",3,"ngModel","ngModelChange"],[3,"value","title","click",4,"ngFor","ngForOf"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageSize",1,"w-100",3,"ngModel","ngModelChange"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"hidden","click"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],["type","checkbox",3,"ngModel","ngModelChange"],[4,"ngFor","ngForOf"],[3,"filter","totaldata","paginationTotal","total","next","previous"],[3,"value","title","click"],[1,"me-1"],["alt","",2,"width","18px",3,"src"],["type","checkbox",1,"me-3",3,"ngModel","ngModelChange"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[1,"text-center","text-primary"],["title","Print shipping label",3,"click",4,"ngIf"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],["title","Print shipping label",3,"click"],[1,"fa-solid","fa-print","fs-3","cursor"]],template:function(n,t){1&n&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(o){return t.Get(o)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"mat-form-field",2)(7,"mat-select",3),e.NdJ("ngModelChange",function(o){return t.filter.ListChannelID=o}),e.YNc(8,oe,5,5,"mat-option",4),e.qZA()()(),e.TgZ(9,"div")(10,"h6"),e._uU(11,"Page Number"),e.qZA(),e.TgZ(12,"input",5),e.NdJ("ngModelChange",function(o){return t.filter.PageNumber=o}),e.qZA()(),e.TgZ(13,"div")(14,"h6"),e._uU(15,"Page Size"),e.qZA(),e.TgZ(16,"input",6),e.NdJ("ngModelChange",function(o){return t.filter.PageSize=o}),e.qZA()()()(),e.TgZ(17,"actions")(18,"button",7),e.NdJ("click",function(){return t.updateDelivery()}),e._uU(19," Dispatch "),e.qZA()(),e.TgZ(20,"content")(21,"div",8)(22,"div",9)(23,"div",10)(24,"div",11)(25,"table",12)(26,"thead",13)(27,"tr",14)(28,"th",15)(29,"input",16),e.NdJ("ngModelChange",function(o){return t.checkboxState=o})("ngModelChange",function(){return t.onCheckboxStateChange()}),e.qZA()(),e.TgZ(30,"th"),e._uU(31,"Outlet"),e.qZA(),e.TgZ(32,"th"),e._uU(33,"Order number"),e.qZA(),e.TgZ(34,"th"),e._uU(35,"Customer"),e.qZA(),e.TgZ(36,"th"),e._uU(37,"Amount"),e.qZA(),e.TgZ(38,"th"),e._uU(39,"Created On"),e.qZA(),e.TgZ(40,"th"),e._uU(41,"Channel Name"),e.qZA(),e._UZ(42,"th"),e.qZA()(),e.TgZ(43,"tbody"),e.YNc(44,ce,20,14,"tr",17),e.qZA()(),e.TgZ(45,"app-mat-paginator-no-count",18),e.NdJ("total",function(){return t.StoreRowsCountAPIResult()})("next",function(){return t.NextPage()})("previous",function(){return t.PreviousPage()}),e.qZA()()()()()()()),2&n&&(e.xp6(7),e.Q6J("ngModel",t.filter.ListChannelID),e.xp6(1),e.Q6J("ngForOf",t.channels),e.xp6(4),e.Q6J("ngModel",t.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",t.filter.PageSize),e.xp6(2),e.Q6J("hidden",!t.hasSelection()),e.xp6(11),e.Q6J("ngModel",t.checkboxState),e.xp6(15),e.Q6J("ngForOf",t.data),e.xp6(1),e.Q6J("filter",t.filter)("totaldata",t.totaldata)("paginationTotal",t.paginationTotal))},dependencies:[u.sg,u.O5,l.Fj,l.wV,l.Wl,l.JJ,l.On,d.p,f.rH,m.n,P,Z.KE,D.gD,y.ey,u.JJ,u.uU]});const he=function(){return["/menu/Order/detail"]},ge=function(a,n){return{Number:a,Outlet:n}};function me(a,n){if(1&a&&(e.TgZ(0,"a",24),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit;e.Q6J("routerLink",e.DdM(3,he))("queryParams",e.WLB(4,ge,t.Number,t.Outlet)),e.xp6(1),e.Oqu(t.Number)}}function _e(a,n){if(1&a&&(e.TgZ(0,"a",25),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit,i=e.oxw();e.Q6J("href",i.domain+t.ID,e.LSH),e.xp6(1),e.Oqu(t.Number)}}function fe(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"a",26),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,h=e.oxw();return e.KtG(h.onPrintShippingLabel(o.Number,o.ShopID,o.TypeID))}),e._UZ(1,"i",27),e.qZA()}}function Te(a,n){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e.YNc(4,me,2,7,"a",19),e.YNc(5,_e,2,2,"a",20),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.ALo(10,"number"),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.ALo(13,"date"),e.qZA(),e.TgZ(14,"td"),e._UZ(15,"app-channel-logo",21),e.qZA(),e.TgZ(16,"td",22),e.YNc(17,fe,2,0,"a",23),e.qZA()()),2&a){const t=n.$implicit,i=e.oxw();e.xp6(2),e.Oqu(t.Outlet),e.xp6(2),e.Q6J("ngIf",i.hasGuidEmpty(t.ID)),e.xp6(1),e.Q6J("ngIf",!i.hasGuidEmpty(t.ID)),e.xp6(2),e.Oqu(t.Customer),e.xp6(2),e.Oqu(e.lcZ(10,8,t.Amount)),e.xp6(3),e.Oqu(e.xi3(13,10,t.Created,"dd MMM yyyy HH:mm")),e.xp6(3),e.Q6J("typeId",t.TypeID),e.xp6(2),e.Q6J("ngIf",t.TypeID==i.channelType.ShopeeV2||t.TypeID==i.channelType.Tokopedia||t.TypeID==i.channelType.Tiktok||t.TypeID==i.channelType.Lazada)}}class k{constructor(n,t,i,o){this.http=n,this.localDataService=t,this.orderService=i,this.channelService=o,this.filter={PageNumber:null,PageSize:null,ListChannelID:[]},this.totaldata=0,this.paginationTotal=0,this.channelType=_.x}ngOnInit(){this.Load()}getChannelLogo(n){return g.g.getChannelLogoByTypeId(n)}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(n=>{this.filter.PageNumber=n.Filter.PageNumber,this.filter.PageSize=n.Filter.RowCount,this.channels=n.Options.Channel,this.channels=this.channelService.mapChannelImage(this.channels),this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}hasGuidEmpty(n){return n==g.g.GuidEMpty}Get(n){this.http.post("api/orders/GetShipped",{Number:n,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID}).subscribe(i=>{this.data=i.Data,this.totaldata=this.data.length})}changePage(n){this.filter.PageNumber=n.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){this.http.post("api/orders/GetRowCount",{PaymentState:"Unpaid",DeliveryState:"Sent",ListChannelID:this.filter.ListChannelID}).subscribe(t=>{this.paginationTotal=t.Total})}onPrintShippingLabel(n,t,i){switch(i){case _.x.Tokopedia:this.orderService.printShippingLabelTokopedia(n);break;case _.x.Tiktok:this.orderService.printShippingLabelTiktok(n,t);break;case _.x.ShopeeV2:this.orderService.printShippingLabelShopee(n,t);break;case _.x.Lazada:this.orderService.printShippingLabelLazada(n,t)}}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}}k.\u0275fac=function(n){return new(n||k)(e.Y36(C.O),e.Y36(s.T),e.Y36(v),e.Y36(p.T))},k.\u0275cmp=e.Xpm({type:k,selectors:[["app-shipped"]],decls:41,vars:8,consts:[["headerTitle","3 - Shipped","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["container",""],["appearance","outline",1,"w-100"],["multiple","","placeholder","Choose channels",3,"ngModel","ngModelChange"],[3,"value","title","click",4,"ngFor","ngForOf"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageSize",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"filter","totaldata","paginationTotal","total","next","previous"],[3,"value","title","click"],[1,"me-1"],["alt","",2,"width","18px",3,"src"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[1,"text-center","text-primary"],["title","Print shipping label",3,"click",4,"ngIf"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],["title","Print shipping label",3,"click"],[1,"fa-solid","fa-print","fs-3","cursor"]],template:function(n,t){1&n&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(o){return t.Get(o)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"mat-form-field",2)(7,"mat-select",3),e.NdJ("ngModelChange",function(o){return t.filter.ListChannelID=o}),e.YNc(8,ue,5,5,"mat-option",4),e.qZA()()(),e.TgZ(9,"div")(10,"h6"),e._uU(11,"Page Number"),e.qZA(),e.TgZ(12,"input",5),e.NdJ("ngModelChange",function(o){return t.filter.PageNumber=o}),e.qZA()(),e.TgZ(13,"div")(14,"h6"),e._uU(15,"Page Size"),e.qZA(),e.TgZ(16,"input",6),e.NdJ("ngModelChange",function(o){return t.filter.PageSize=o}),e.qZA()()()(),e.TgZ(17,"content")(18,"div",7)(19,"div",8)(20,"div",9)(21,"div",10)(22,"table",11)(23,"thead",12)(24,"tr",13)(25,"th"),e._uU(26,"Outlet"),e.qZA(),e.TgZ(27,"th"),e._uU(28,"Order number"),e.qZA(),e.TgZ(29,"th"),e._uU(30,"Customer"),e.qZA(),e.TgZ(31,"th"),e._uU(32,"Amount"),e.qZA(),e.TgZ(33,"th"),e._uU(34,"Created On"),e.qZA(),e.TgZ(35,"th"),e._uU(36,"Channel Name"),e.qZA(),e._UZ(37,"th"),e.qZA()(),e.TgZ(38,"tbody"),e.YNc(39,Te,18,13,"tr",14),e.qZA()(),e.TgZ(40,"app-mat-paginator-no-count",15),e.NdJ("total",function(){return t.StoreRowsCountAPIResult()})("next",function(){return t.NextPage()})("previous",function(){return t.PreviousPage()}),e.qZA()()()()()()()),2&n&&(e.xp6(7),e.Q6J("ngModel",t.filter.ListChannelID),e.xp6(1),e.Q6J("ngForOf",t.channels),e.xp6(4),e.Q6J("ngModel",t.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",t.filter.PageSize),e.xp6(23),e.Q6J("ngForOf",t.data),e.xp6(1),e.Q6J("filter",t.filter)("totaldata",t.totaldata)("paginationTotal",t.paginationTotal))},dependencies:[u.sg,u.O5,l.Fj,l.wV,l.JJ,l.On,d.p,f.rH,m.n,P,Z.KE,D.gD,y.ey,u.JJ,u.uU]});var Ce=c(501);function Ze(a,n){if(1&a&&(e.TgZ(0,"mat-option",16),e.NdJ("click",function(i){return i.stopPropagation()}),e.TgZ(1,"span",17),e._UZ(2,"img",18),e.qZA(),e.TgZ(3,"span"),e._uU(4),e.qZA()()),2&a){const t=n.$implicit;e.Q6J("value",t.ID)("title",t.Name)("title",t.Name),e.xp6(2),e.Q6J("src",t.img,e.LSH),e.xp6(2),e.hij(" ",t.Name," ")}}const ve=function(){return["/menu/Order/detail"]},be=function(a,n){return{Number:a,Outlet:n}};function Se(a,n){if(1&a&&(e.TgZ(0,"a",24),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit;e.Q6J("routerLink",e.DdM(3,ve))("queryParams",e.WLB(4,be,t.Number,t.Outlet)),e.xp6(1),e.Oqu(t.Number)}}function De(a,n){if(1&a&&(e.TgZ(0,"a",25),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit,i=e.oxw();e.Q6J("href",i.customerInfoUrl+t.ID,e.LSH),e.xp6(1),e.Oqu(t.Number)}}function ye(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"a",26),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,h=e.oxw();return e.KtG(h.onPrintShippingLabel(o.Number,o.ShopID,o.TypeID))}),e._UZ(1,"i",27),e.qZA()}}function Ne(a,n){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e.YNc(4,Se,2,7,"a",19),e.YNc(5,De,2,2,"a",20),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.ALo(10,"number"),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.ALo(13,"date"),e.qZA(),e.TgZ(14,"td"),e._UZ(15,"app-channel-logo",21),e.qZA(),e.TgZ(16,"td",22),e.YNc(17,ye,2,0,"a",23),e.qZA()()),2&a){const t=n.$implicit,i=e.oxw();e.xp6(2),e.Oqu(t.Outlet),e.xp6(2),e.Q6J("ngIf",i.hasGuidEmpty(t.ID)),e.xp6(1),e.Q6J("ngIf",!i.hasGuidEmpty(t.ID)),e.xp6(2),e.Oqu(t.Customer),e.xp6(2),e.Oqu(e.lcZ(10,8,t.Amount)),e.xp6(3),e.Oqu(e.xi3(13,10,t.Created,"dd MMM yyyy HH:mm")),e.xp6(3),e.Q6J("typeId",t.TypeID),e.xp6(2),e.Q6J("ngIf",t.TypeID==i.channelType.ShopeeV2||t.TypeID==i.channelType.Tokopedia||t.TypeID==i.channelType.Tiktok)}}class L{constructor(n,t,i,o){this.http=n,this.orderService=t,this.authService=i,this.channelService=o,this.filter={PageNumber:null,PageSize:null,ListChannelID:[]},this.totaldata=0,this.paginationTotal=0,this.channelType=_.x}ngOnInit(){this.Load()}hasGuidEmpty(n){return n==g.g.GuidEMpty}getChannelLogo(n){return g.g.getChannelLogoByTypeId(n)}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(n=>{this.filter.PageNumber=n.Filter.PageNumber,this.filter.PageSize=n.Filter.RowCount,this.channels=n.Options.Channel,this.channels=this.channelService.mapChannelImage(this.channels),this.customerInfoUrl=`${this.authService.getDomain()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(n){this.http.post("api/orders/GetDelivered ",{Number:n,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID}).subscribe(i=>{this.data=i.Data,this.totaldata=this.data.length})}changePage(n){this.filter.PageNumber=n.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){this.http.post("api/orders/GetRowCount",{PaymentState:"Paid",DeliveryState:"Sent",ListChannelID:this.filter.ListChannelID}).subscribe(t=>{this.paginationTotal=t.Total})}onPrintShippingLabel(n,t,i){switch(i){case _.x.Tokopedia:this.orderService.printShippingLabelTokopedia(n);break;case _.x.Tiktok:this.orderService.printShippingLabelTiktok(n,t);break;case _.x.ShopeeV2:this.orderService.printShippingLabelShopee(n,t)}}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}}function Pe(a,n){if(1&a&&(e.TgZ(0,"mat-option",16),e.NdJ("click",function(i){return i.stopPropagation()}),e.TgZ(1,"span",17),e._UZ(2,"img",18),e.qZA(),e.TgZ(3,"span"),e._uU(4),e.qZA()()),2&a){const t=n.$implicit;e.Q6J("value",t.ID)("title",t.Name)("title",t.Name),e.xp6(2),e.Q6J("src",t.img,e.LSH),e.xp6(2),e.hij(" ",t.Name," ")}}L.\u0275fac=function(n){return new(n||L)(e.Y36(C.O),e.Y36(v),e.Y36(Ce.e),e.Y36(p.T))},L.\u0275cmp=e.Xpm({type:L,selectors:[["app-delivered"]],decls:41,vars:9,consts:[["headerTitle","4 - Completed","searchBoxPlaceHolder","Search ...",3,"hideSearchBox","onSubmit"],["container","",1,""],["appearance","outline",1,"w-100"],["multiple","","placeholder","Choose channels",3,"ngModel","ngModelChange"],[3,"value","title","click",4,"ngFor","ngForOf"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageSize",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"filter","totaldata","paginationTotal","total","next","previous"],[3,"value","title","click"],[1,"me-1"],["alt","",2,"width","18px",3,"src"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[1,"text-center","text-primary"],["title","Print shipping label",3,"click",4,"ngIf"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],["title","Print shipping label",3,"click"],[1,"fa-solid","fa-print","fs-3","cursor"]],template:function(n,t){1&n&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(o){return t.Get(o)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"mat-form-field",2)(7,"mat-select",3),e.NdJ("ngModelChange",function(o){return t.filter.ListChannelID=o}),e.YNc(8,Ze,5,5,"mat-option",4),e.qZA()()(),e.TgZ(9,"div")(10,"h6"),e._uU(11,"Page Number"),e.qZA(),e.TgZ(12,"input",5),e.NdJ("ngModelChange",function(o){return t.filter.PageNumber=o}),e.qZA()(),e.TgZ(13,"div")(14,"h6"),e._uU(15,"Page Size"),e.qZA(),e.TgZ(16,"input",6),e.NdJ("ngModelChange",function(o){return t.filter.PageSize=o}),e.qZA()()()(),e.TgZ(17,"content")(18,"div",7)(19,"div",8)(20,"div",9)(21,"div",10)(22,"table",11)(23,"thead",12)(24,"tr",13)(25,"th"),e._uU(26,"Outlet"),e.qZA(),e.TgZ(27,"th"),e._uU(28,"Order number"),e.qZA(),e.TgZ(29,"th"),e._uU(30,"Customer"),e.qZA(),e.TgZ(31,"th"),e._uU(32,"Amount"),e.qZA(),e.TgZ(33,"th"),e._uU(34,"Created On"),e.qZA(),e.TgZ(35,"th"),e._uU(36,"Channel Name"),e.qZA(),e._UZ(37,"th"),e.qZA()(),e.TgZ(38,"tbody"),e.YNc(39,Ne,18,13,"tr",14),e.qZA()(),e.TgZ(40,"app-mat-paginator-no-count",15),e.NdJ("total",function(){return t.StoreRowsCountAPIResult()})("next",function(){return t.NextPage()})("previous",function(){return t.PreviousPage()}),e.qZA()()()()()()()),2&n&&(e.Q6J("hideSearchBox",!0),e.xp6(7),e.Q6J("ngModel",t.filter.ListChannelID),e.xp6(1),e.Q6J("ngForOf",t.channels),e.xp6(4),e.Q6J("ngModel",t.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",t.filter.PageSize),e.xp6(23),e.Q6J("ngForOf",t.data),e.xp6(1),e.Q6J("filter",t.filter)("totaldata",t.totaldata)("paginationTotal",t.paginationTotal))},dependencies:[u.sg,u.O5,l.Fj,l.wV,l.JJ,l.On,d.p,f.rH,m.n,P,Z.KE,D.gD,y.ey,u.JJ,u.uU]});const xe=function(){return["/menu/Order/detail"]},Ae=function(a,n){return{Number:a,Outlet:n}};function we(a,n){if(1&a&&(e.TgZ(0,"a",21),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit;e.Q6J("routerLink",e.DdM(3,xe))("queryParams",e.WLB(4,Ae,t.Number,t.Outlet)),e.xp6(1),e.Oqu(t.Number)}}function Oe(a,n){if(1&a&&(e.TgZ(0,"a",22),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit,i=e.oxw();e.Q6J("href",i.domain+t.ID,e.LSH),e.xp6(1),e.Oqu(t.Number)}}function Ie(a,n){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e.YNc(4,we,2,7,"a",19),e.YNc(5,Oe,2,2,"a",20),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.ALo(10,"number"),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.ALo(13,"date"),e.qZA(),e.TgZ(14,"td"),e._uU(15),e.qZA()()),2&a){const t=n.$implicit,i=e.oxw();e.xp6(2),e.Oqu(t.Outlet),e.xp6(2),e.Q6J("ngIf",i.hasGuidEmpty(t.ID)),e.xp6(1),e.Q6J("ngIf",!i.hasGuidEmpty(t.ID)),e.xp6(2),e.Oqu(t.Customer),e.xp6(2),e.Oqu(e.lcZ(10,7,t.Amount)),e.xp6(3),e.Oqu(e.xi3(13,9,t.Created,"dd MMM yyyy HH:mm")),e.xp6(3),e.Oqu(t.State)}}class Q{constructor(n,t,i){this.http=n,this.localDataService=t,this.channelService=i,this.filter={PageNumber:null,PageSize:null,ListChannelID:[]},this.totaldata=0,this.paginationTotal=0}ngOnInit(){this.Load()}hasGuidEmpty(n){return n==g.g.GuidEMpty}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(n=>{this.filter.PageNumber=n.Filter.PageNumber,this.filter.PageSize=n.Filter.RowCount,this.channels=n.Options.Channel,this.channels=this.channelService.mapChannelImage(this.channels),this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(n){this.http.post("api/orders/GetAll ",{Number:n,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID}).subscribe(i=>{this.data=i.Data,this.totaldata=this.data.length})}changePage(n){this.filter=n,this.Get()}StoreRowsCountAPIResult(){this.http.post("api/orders/GetRowCount",{PaymentState:"",DeliveryState:"",Bin:!1,ListChannelID:this.filter.ListChannelID}).subscribe(t=>{this.paginationTotal=t.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}}function qe(a,n){if(1&a&&(e.TgZ(0,"mat-option",16),e.NdJ("click",function(i){return i.stopPropagation()}),e.TgZ(1,"span",17),e._UZ(2,"img",18),e.qZA(),e.TgZ(3,"span"),e._uU(4),e.qZA()()),2&a){const t=n.$implicit;e.Q6J("value",t.ID)("title",t.Name)("title",t.Name),e.xp6(2),e.Q6J("src",t.img,e.LSH),e.xp6(2),e.hij(" ",t.Name," ")}}Q.\u0275fac=function(n){return new(n||Q)(e.Y36(C.O),e.Y36(s.T),e.Y36(p.T))},Q.\u0275cmp=e.Xpm({type:Q,selectors:[["app-all-order"]],decls:40,vars:8,consts:[["headerTitle","All","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["container",""],["appearance","outline",1,"w-100"],["multiple","","placeholder","Choose channels",3,"ngModel","ngModelChange"],[3,"value","title","click",4,"ngFor","ngForOf"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageSize",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"filter","totaldata","paginationTotal","total","next","previous"],[3,"value","title","click"],[1,"me-1"],["alt","",2,"width","18px",3,"src"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"routerLink","queryParams"],["target","_blank",3,"href"]],template:function(n,t){1&n&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(o){return t.Get(o)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"mat-form-field",2)(7,"mat-select",3),e.NdJ("ngModelChange",function(o){return t.filter.ListChannelID=o}),e.YNc(8,Pe,5,5,"mat-option",4),e.qZA()()(),e.TgZ(9,"div")(10,"h6"),e._uU(11,"Page Number"),e.qZA(),e.TgZ(12,"input",5),e.NdJ("ngModelChange",function(o){return t.filter.PageNumber=o}),e.qZA()(),e.TgZ(13,"div")(14,"h6"),e._uU(15,"Page Size"),e.qZA(),e.TgZ(16,"input",6),e.NdJ("ngModelChange",function(o){return t.filter.PageSize=o}),e.qZA()()()(),e.TgZ(17,"content")(18,"div",7)(19,"div",8)(20,"div",9)(21,"div",10)(22,"table",11)(23,"thead",12)(24,"tr",13)(25,"th"),e._uU(26,"Outlet"),e.qZA(),e.TgZ(27,"th"),e._uU(28,"Order number"),e.qZA(),e.TgZ(29,"th"),e._uU(30,"Customer"),e.qZA(),e.TgZ(31,"th"),e._uU(32,"Amount"),e.qZA(),e.TgZ(33,"th"),e._uU(34,"Created On"),e.qZA(),e.TgZ(35,"th"),e._uU(36,"Status"),e.qZA()()(),e.TgZ(37,"tbody"),e.YNc(38,Ie,16,12,"tr",14),e.qZA()(),e.TgZ(39,"app-mat-paginator-no-count",15),e.NdJ("total",function(){return t.StoreRowsCountAPIResult()})("next",function(){return t.NextPage()})("previous",function(){return t.PreviousPage()}),e.qZA()()()()()()()),2&n&&(e.xp6(7),e.Q6J("ngModel",t.filter.ListChannelID),e.xp6(1),e.Q6J("ngForOf",t.channels),e.xp6(4),e.Q6J("ngModel",t.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",t.filter.PageSize),e.xp6(22),e.Q6J("ngForOf",t.data),e.xp6(1),e.Q6J("filter",t.filter)("totaldata",t.totaldata)("paginationTotal",t.paginationTotal))},dependencies:[u.sg,u.O5,l.Fj,l.wV,l.JJ,l.On,d.p,f.rH,m.n,Z.KE,D.gD,y.ey,u.JJ,u.uU]});const Me=function(){return["/menu/Order/detail"]},Ue=function(a,n){return{Number:a,Outlet:n}};function Je(a,n){if(1&a&&(e.TgZ(0,"a",21),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit;e.Q6J("routerLink",e.DdM(3,Me))("queryParams",e.WLB(4,Ue,t.Number,t.Outlet)),e.xp6(1),e.Oqu(t.Number)}}function ke(a,n){if(1&a&&(e.TgZ(0,"a",22),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit,i=e.oxw();e.Q6J("href",i.domain+t.ID,e.LSH),e.xp6(1),e.Oqu(t.Number)}}function Le(a,n){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e.YNc(4,Je,2,7,"a",19),e.YNc(5,ke,2,2,"a",20),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.ALo(10,"number"),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.ALo(13,"date"),e.qZA()()),2&a){const t=n.$implicit,i=e.oxw();e.xp6(2),e.Oqu(t.Outlet),e.xp6(2),e.Q6J("ngIf",i.hasGuidEmpty(t.ID)),e.xp6(1),e.Q6J("ngIf",!i.hasGuidEmpty(t.ID)),e.xp6(2),e.Oqu(t.Customer),e.xp6(2),e.Oqu(e.lcZ(10,6,t.Amount)),e.xp6(3),e.Oqu(e.xi3(13,8,t.Created,"dd MMM yyyy HH:mm"))}}class F{constructor(n,t,i){this.http=n,this.localDataService=t,this.channelService=i,this.filter={PageNumber:null,PageSize:null,ListChannelID:[]},this.totaldata=0,this.paginationTotal=0}ngOnInit(){this.Load()}hasGuidEmpty(n){return n==g.g.GuidEMpty}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(n=>{this.filter.PageNumber=n.Filter.PageNumber,this.filter.PageSize=n.Filter.RowCount,this.channels=n.Options.Channel,this.channels=this.channelService.mapChannelImage(this.channels),this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(n){this.http.post("api/orders/GetCancelled ",{Number:n,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID}).subscribe(i=>{this.data=i.Data,this.totaldata=this.data.length})}changePage(n){this.filter.PageNumber=n.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){this.http.post("api/orders/GetRowCount",{PaymentState:"",DeliveryState:"",Bin:!0,ListChannelID:this.filter.ListChannelID}).subscribe(t=>{this.paginationTotal=t.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}getChannelLogo(n){return g.g.getChannelLogoByTypeId(n)}}F.\u0275fac=function(n){return new(n||F)(e.Y36(C.O),e.Y36(s.T),e.Y36(p.T))},F.\u0275cmp=e.Xpm({type:F,selectors:[["app-cancelled"]],decls:38,vars:8,consts:[["headerTitle","99 - Cancelled","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["container","",1,""],["appearance","outline",1,"w-100"],["multiple","","placeholder","Choose channels",3,"ngModel","ngModelChange"],[3,"value","title","click",4,"ngFor","ngForOf"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageSize",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"filter","totaldata","paginationTotal","total","next","previous"],[3,"value","title","click"],[1,"me-1"],["alt","",2,"width","18px",3,"src"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"routerLink","queryParams"],["target","_blank",3,"href"]],template:function(n,t){1&n&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(o){return t.Get(o)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"mat-form-field",2)(7,"mat-select",3),e.NdJ("ngModelChange",function(o){return t.filter.ListChannelID=o}),e.YNc(8,qe,5,5,"mat-option",4),e.qZA()()(),e.TgZ(9,"div")(10,"h6"),e._uU(11,"Page Number"),e.qZA(),e.TgZ(12,"input",5),e.NdJ("ngModelChange",function(o){return t.filter.PageNumber=o}),e.qZA()(),e.TgZ(13,"div")(14,"h6"),e._uU(15,"Page Size"),e.qZA(),e.TgZ(16,"input",6),e.NdJ("ngModelChange",function(o){return t.filter.PageSize=o}),e.qZA()()()(),e.TgZ(17,"content")(18,"div",7)(19,"div",8)(20,"div",9)(21,"div",10)(22,"table",11)(23,"thead",12)(24,"tr",13)(25,"th"),e._uU(26,"Outlet"),e.qZA(),e.TgZ(27,"th"),e._uU(28,"Order number"),e.qZA(),e.TgZ(29,"th"),e._uU(30,"Customer"),e.qZA(),e.TgZ(31,"th"),e._uU(32,"Amount"),e.qZA(),e.TgZ(33,"th"),e._uU(34,"Created On"),e.qZA()()(),e.TgZ(35,"tbody"),e.YNc(36,Le,14,11,"tr",14),e.qZA()(),e.TgZ(37,"app-mat-paginator-no-count",15),e.NdJ("total",function(){return t.StoreRowsCountAPIResult()})("next",function(){return t.NextPage()})("previous",function(){return t.PreviousPage()}),e.qZA()()()()()()()),2&n&&(e.xp6(7),e.Q6J("ngModel",t.filter.ListChannelID),e.xp6(1),e.Q6J("ngForOf",t.channels),e.xp6(4),e.Q6J("ngModel",t.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",t.filter.PageSize),e.xp6(20),e.Q6J("ngForOf",t.data),e.xp6(1),e.Q6J("filter",t.filter)("totaldata",t.totaldata)("paginationTotal",t.paginationTotal))},dependencies:[u.sg,u.O5,l.Fj,l.wV,l.JJ,l.On,d.p,f.rH,m.n,Z.KE,D.gD,y.ey,u.JJ,u.uU]});var Qe=c(2138),x=(()=>{return(a=x||(x={}))[a.DoNothing=0]="DoNothing",a[a.New=1]="New",a[a.Update=2]="Update",x;var a})(),Fe=c(6082),H=c(8796),G=c(9602),Y=c(8425),B=c(266);function Ge(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",27),e.NdJ("click",function(){e.CHM(t),e.oxw();const o=e.MAs(11);return e.KtG(o.previous())}),e._uU(1," Back "),e.qZA()}}function Ye(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",28),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(),h=e.MAs(11);return e.KtG(o.onNext(h))}),e._uU(1," Next "),e.qZA()}if(2&a){const t=e.oxw();e.Q6J("disabled",t.checkDisabledNextFilter())}}function Ee(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",27),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(),h=e.MAs(11);return e.KtG(o.onNew(h))}),e._UZ(1,"i",29),e._uU(2," New "),e.qZA()}}function Re(a,n){1&a&&e._uU(0,"Filter")}function ze(a,n){if(1&a&&(e.TgZ(0,"ng-option",30),e._UZ(1,"img",31),e._uU(2),e.qZA()),2&a){const t=n.$implicit;e.Q6J("value",t.ID),e.xp6(1),e.s9C("src",t.Img,e.LSH),e.xp6(1),e.hij("",t.Name," ")}}function He(a,n){1&a&&e._uU(0,"Preview")}function $e(a,n){if(1&a&&(e.TgZ(0,"th",49),e._uU(1),e.qZA()),2&a){const t=e.oxw(2);e.xp6(1),e.Oqu(0==t.getTypeID()?"Last Status Update":"Created Date")}}function Be(a,n){if(1&a&&(e.TgZ(0,"td"),e._uU(1),e.ALo(2,"date"),e.qZA()),2&a){const t=e.oxw().$implicit;e.xp6(1),e.hij(" ",e.xi3(2,1,t.Date,"dd MMM yyyy HH:mm:ss"),"")}}function je(a,n){if(1&a&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&a){const t=e.oxw().$implicit;e.xp6(1),e.hij(" ",t.ActionString," ")}}function Ve(a,n){if(1&a&&(e.TgZ(0,"li"),e._uU(1),e.qZA()),2&a){const t=n.$implicit;e.xp6(1),e.hij("",t," ")}}function We(a,n){if(1&a&&(e.TgZ(0,"ul",55),e.YNc(1,Ve,2,1,"li",50),e.qZA()),2&a){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",t.ActionString)}}function Ke(a,n){if(1&a&&(e.TgZ(0,"span",56),e._UZ(1,"i",57),e.qZA()),2&a){const t=e.oxw().$implicit;e.hYB("title","Delivery : ",t.DeliveryState," \nPayment : ",t.PaymentState,"")}}const Xe=function(a,n){return{"over-due-today":a,"over-due":n}};function et(a,n){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.YNc(5,Be,3,4,"td",51),e.TgZ(6,"td")(7,"span"),e._uU(8),e.qZA(),e._uU(9),e.qZA(),e.TgZ(10,"td",52)(11,"span"),e._uU(12),e.qZA(),e._uU(13),e.qZA(),e.TgZ(14,"td"),e.YNc(15,je,2,1,"span",51),e.YNc(16,We,2,1,"ul",53),e.qZA(),e.TgZ(17,"td"),e.YNc(18,Ke,2,2,"span",54),e.qZA()()),2&a){const t=n.$implicit,i=n.index,o=e.oxw(3);e.xp6(2),e.Oqu(i+1),e.xp6(2),e.Oqu(t.Number),e.xp6(1),e.Q6J("ngIf",o.getTypeID()!=o.channelType.ShopeeV2),e.xp6(3),e.hij("",t.ChannelStatus," - "),e.xp6(1),e.Oqu(t.ChannelStatusDescription),e.xp6(1),e.Q6J("ngClass",e.WLB(11,Xe,(null==t?null:t.Action)==o.actionPreviewOrder.Update,(null==t?null:t.Action)==o.actionPreviewOrder.New)),e.xp6(2),e.hij("",t.POSStatus," - "),e.xp6(1),e.hij("",t.POSStatusDescription," "),e.xp6(2),e.Q6J("ngIf",1==t.ActionString.length),e.xp6(1),e.Q6J("ngIf",t.ActionString.length>1),e.xp6(2),e.Q6J("ngIf",99!=t.ChannelStatus&&99!=t.POSStatus)}}function tt(a,n){if(1&a&&(e.ynx(0),e.YNc(1,et,19,14,"tr",50),e.BQk()),2&a){const t=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",t.displayedPreviewData)}}function nt(a,n){1&a&&(e.TgZ(0,"tr",58)(1,"td",59)(2,"div",60),e._UZ(3,"i",61),e.qZA(),e.TgZ(4,"h4",62),e._uU(5,"There is no order to processed"),e.qZA()()())}function at(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"div",32)(1,"div",33)(2,"div",34)(3,"ul",35)(4,"li",36)(5,"button",37),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.filterPreviewData(o.previewStatus.ALL))}),e._uU(6),e.qZA()(),e.TgZ(7,"li",36)(8,"button",38),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.filterPreviewData(o.previewStatus.SYNC))}),e._uU(9),e.qZA()(),e.TgZ(10,"li",36)(11,"button",39),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.filterPreviewData(o.previewStatus.WRONG))}),e._uU(12),e.qZA()(),e.TgZ(13,"li",36)(14,"button",40),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.filterPreviewData(o.previewStatus.UNSYNC))}),e._uU(15),e.qZA()()()(),e.TgZ(16,"table",41)(17,"thead",42)(18,"tr"),e._UZ(19,"th",43),e.TgZ(20,"th",44),e._uU(21,"Number"),e.qZA(),e.YNc(22,$e,2,1,"th",45),e.TgZ(23,"th",46),e._uU(24,"Channel Status"),e.qZA(),e.TgZ(25,"th",46),e._uU(26,"POS Status"),e.qZA(),e.TgZ(27,"th"),e._uU(28,"Action"),e.qZA(),e._UZ(29,"th",43),e.qZA()(),e.TgZ(30,"tbody"),e.YNc(31,tt,2,1,"ng-container",47),e.YNc(32,nt,6,0,"ng-template",null,48,e.W1O),e.qZA()()()()}if(2&a){const t=e.MAs(33),i=e.oxw();e.xp6(5),e.Q6J("ngClass","all"==i.pillStatus?"btn-secondary text-white":"btn-outline-dark"),e.xp6(1),e.hij("All (",i.allData,")"),e.xp6(2),e.Q6J("ngClass","sync"==i.pillStatus?"btn-success":"btn-outline-success"),e.xp6(1),e.hij("Existing (",i.syncData,")"),e.xp6(2),e.Q6J("ngClass","wrong"==i.pillStatus?"btn-warning text-white":"btn-outline-warning"),e.xp6(1),e.hij("Wrong Status (",i.wrongData,")"),e.xp6(2),e.Q6J("ngClass","unsync"==i.pillStatus?"btn-danger":"btn-outline-danger"),e.xp6(1),e.hij("Missing (",i.unsyncData,")"),e.xp6(7),e.Q6J("ngIf",i.getTypeID()!=i.channelType.ShopeeV2),e.xp6(9),e.Q6J("ngIf",i.displayedPreviewData.length>0)("ngIfElse",t)}}function it(a,n){1&a&&e._uU(0,"Finish")}const ot=function(a){return{"over-due":a}};function rt(a,n){if(1&a&&(e.TgZ(0,"tr",52)(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA()()),2&a){const t=n.$implicit,i=n.index;e.Q6J("ngClass",e.VKq(5,ot,t.Exception)),e.xp6(2),e.Oqu(i+1),e.xp6(2),e.Oqu(t.Number),e.xp6(2),e.Oqu(t.Status),e.xp6(2),e.Oqu(t.Exception)}}function lt(a,n){if(1&a&&(e.ynx(0),e.YNc(1,rt,9,7,"tr",64),e.BQk()),2&a){const t=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",t.downloadData)}}function st(a,n){1&a&&(e.TgZ(0,"tr",58)(1,"td",59)(2,"div",60),e._UZ(3,"i",61),e.qZA(),e.TgZ(4,"h4",62),e._uU(5,"There is no order to processed"),e.qZA()()())}function pt(a,n){if(1&a&&(e.TgZ(0,"div",32)(1,"div",33)(2,"table",41)(3,"thead",42)(4,"tr"),e._UZ(5,"th",43),e.TgZ(6,"th"),e._uU(7,"Order Number"),e.qZA(),e.TgZ(8,"th"),e._uU(9,"Status"),e.qZA(),e.TgZ(10,"th"),e._uU(11,"Exception"),e.qZA()()(),e.TgZ(12,"tbody"),e.YNc(13,lt,2,1,"ng-container",47),e.YNc(14,st,6,0,"ng-template",null,63,e.W1O),e.qZA()()()()),2&a){const t=e.MAs(15),i=e.oxw();e.xp6(13),e.Q6J("ngIf",(null==i.downloadData?null:i.downloadData.length)>0)("ngIfElse",t)}}function dt(a,n){1&a&&e._UZ(0,"i",65)}function ct(a,n){1&a&&e._UZ(0,"i",66)}function ut(a,n){1&a&&e._UZ(0,"i",67)}var T=(()=>{return(a=T||(T={})).ALL="all",a.SYNC="sync",a.WRONG="wrong",a.UNSYNC="unsync",T;var a})();class E{constructor(n,t,i,o,h){this.http=n,this.toastr=t,this.datePipe=i,this.url=o,this.productService=h,this.pageTitle="Download to POS",this.pillStatus="all",this.displayedPreviewData=[],this.previewData=[],this.channelType=_.x,this.previewStatus=T,this.currentState="filter",this.wrongData=0,this.unsyncData=0,this.syncData=0,this.allData=0,this.actionPreviewOrder=x}ngOnInit(){this.initPageLoader(),this.url.queryParams.subscribe(n=>{this.channelID=n.ChannelID,this.startDate=new Date(n.Date),this.endDate=new Date(n.Date)})}initPageLoader(){this.productService.loader().subscribe(n=>{this.channelOptions=n.Options.Channel})}onDownload(n){this.http.post("/api/Orders/Download",{ID:this.channelID,From:this.startDate,To:this.endDate,ListPreview:this.downloadedPreviewData}).subscribe(i=>{this.downloadData=i.Body,this.onStepperNext(n)})}onPreview(n){this.validateDatePreview()&&this.http.post("/api/Orders/Preview",{ID:this.channelID,From:this.startDate,To:this.endDate}).subscribe(i=>{0!=i.length?(this.previewData=i,this.groupingPreviewData(),this.filterPreviewData(T.ALL),this.initLengthStatusData(),this.onStepperNext(n)):this.toastrEmptyPreview()})}toastrEmptyPreview(){this.toastr.info("There is no orders from "+this.datePipe.transform(this.startDate,"dd MMM yyyy")+" to "+this.datePipe.transform(this.endDate,"dd MMM yyyy")+" !","No Orders!")}validateDatePreview(){let n=!0;return g.g.getDaysDiff(this.startDate,this.endDate)>14&&(this.toastr.warning("Dates cannot be more than 14 days apart!","Failed"),n=!1),n}setPageTitle(n){const t=g.g.formatTitleFromDate(new Date(this.startDate),new Date(this.endDate)),i=this.datePipe.transform(this.startDate,t),o=this.datePipe.transform(this.endDate,"dd MMM yyyy");this.pageTitle=`\n ${n} (${null==t?"":i+"-"} ${o})\n `}onNew(n){this.channelID=null,this.startDate=null,this.endDate=null,this.pageTitle="Download to POS",n.reset()}groupingPreviewData(){let n=this.filterDataByStatus(T.UNSYNC),t=this.filterDataByStatus(T.WRONG);this.downloadedPreviewData=[...n,...t]}filterDataByStatus(n){let t=[];switch(n){case T.ALL:t=this.previewData;break;case T.SYNC:t=this.previewData.filter(i=>i.Action==x.DoNothing);break;case T.WRONG:t=this.previewData.filter(i=>i.Action==x.Update);break;case T.UNSYNC:t=this.previewData.filter(i=>i.Action==x.New)}return t}filterPreviewData(n){this.pillStatus=n,this.displayedPreviewData=this.filterDataByStatus(n)}initLengthStatusData(){this.wrongData=this.filterDataByStatus(T.WRONG).length,this.allData=this.previewData.length,this.syncData=this.filterDataByStatus(T.SYNC).length,this.unsyncData=this.filterDataByStatus(T.UNSYNC).length}getTypeID(){var n=this.channelOptions.find(t=>t.ID==this.channelID)?.TypeID;return n??0}onStepperChange(n){this.currentState=n.selectedStep.state}onStepperNext(n){n.selected.completed=!0,n.next()}onNext(n){switch(this.currentState){case"filter":this.onPreview(n);break;case"preview":this.onDownload(n)}}stepChange(n){switch(n?.selectedStep?.state){case"filter":this.pageTitle="Download To POS",this.resetPreviewData();break;case"preview":let t=this.productService.findChannelById(this.channelID,this.channelOptions);this.setPageTitle(`Preview ${t?.Name}`);break;case"finish":this.setPageTitle("Download")}}resetPreviewData(){this.displayedPreviewData=[],this.previewData=[],this.initLengthStatusData()}checkDisabledNextFilter(){let n=!g.g.isValidDate(this.startDate)||!g.g.isValidDate(this.endDate),t=g.g.IsEmpty(this.channelID);return n||t}}E.\u0275fac=function(n){return new(n||E)(e.Y36(C.O),e.Y36(r._W),e.Y36(u.uU),e.Y36(f.gz),e.Y36(Fe.M))},E.\u0275cmp=e.Xpm({type:E,selectors:[["app-download"]],features:[e._Bn([{provide:Qe.gx,useValue:{displayDefaultIndicatorType:!1}}])],decls:47,vars:20,consts:[[3,"headerTitle","description","hideSearchBox","hideSearchDropdown"],["class","btn btn-outline-secondary btn-fill btn-lg ms-2",3,"click",4,"ngIf"],["class","btn btn-outline-secondary btn-fill btn-lg ms-2","type","button",3,"disabled","click",4,"ngIf"],[1,"container-fluid","pt-5","mt-5"],[1,"row"],[1,"col-12"],[1,"d-flex","justify-content-center"],["labelPosition","bottom","linear","",1,"w-100","stepper-download",3,"ngClass","selectionChange"],["stepper",""],["state","filter",3,"editable","completed"],["matStepLabel",""],[1,"row","pt-2",2,"width","63%","margin-right","40px"],[1,"col-6"],[1,"text-muted"],["appendTo","body",3,"clearable","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"row","mt-1rem"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModel","ngModelChange","click"],["matEndDate","","placeholder","End date",3,"ngModel","ngModelChange","click"],["picker",""],["state","preview",3,"editable","completed"],["class","row pt-2",4,"ngIf"],["state","finish"],["matStepperIcon","filter"],["matStepperIcon","preview"],["matStepperIcon","finish"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-2",3,"click"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-2",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"],[1,"row","pt-2"],[1,"col-md-12"],[1,"row","mx-1","mb-5"],[1,"nav","nav-pills"],[1,"nav-item","mx-3"],[1,"btn","btn-sm","rounded-pill",3,"ngClass","click"],["matTooltip","All Invoice which is already available in POS",1,"btn","btn-sm","rounded-pill",3,"ngClass","click"],["matTooltip","Invoices that have different status between marketplace and POS",1,"btn","btn-sm","rounded-pill",3,"ngClass","click"],["matTooltip","Invoices which is not exist in POS",1,"btn","btn-sm","rounded-pill",3,"ngClass","click"],[1,"table"],[1,"thead-light"],["width","1%"],["width","25%"],["width","15%",4,"ngIf"],["width","10%"],[4,"ngIf","ngIfElse"],["EMPTY",""],["width","15%"],[4,"ngFor","ngForOf"],[4,"ngIf"],[3,"ngClass"],["class","ps-5",4,"ngIf"],[3,"title",4,"ngIf"],[1,"ps-5"],[3,"title"],[1,"fas","fa-info-circle","ms-2"],[1,"text-center"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"],["EMPTY_DOWNLOAD",""],[3,"ngClass",4,"ngFor","ngForOf"],[1,"fa-solid","fa-filter"],[1,"fa-solid","fa-file"],[1,"fa-sharp","fa-solid","fa-flag"]],template:function(n,t){if(1&n){const i=e.EpF();e.TgZ(0,"mainpanel",0)(1,"actions"),e.YNc(2,Ge,2,0,"button",1),e.YNc(3,Ye,2,1,"button",2),e.YNc(4,Ee,3,0,"button",1),e.qZA(),e.TgZ(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"mat-stepper",7,8),e.NdJ("selectionChange",function(h){return t.stepChange(h)})("selectionChange",function(h){return t.onStepperChange(h)}),e.TgZ(12,"mat-step",9),e.YNc(13,Re,1,0,"ng-template",10),e.TgZ(14,"div",11)(15,"div",5)(16,"div",4)(17,"div",12)(18,"h5"),e._uU(19,"Select a Channel"),e.qZA(),e.TgZ(20,"p",13),e._uU(21,"Select Channel want to download order"),e.qZA()(),e.TgZ(22,"div",12)(23,"ng-select",14),e.NdJ("ngModelChange",function(h){return t.channelID=h}),e.YNc(24,ze,3,3,"ng-option",15),e.qZA()()(),e.TgZ(25,"div",16)(26,"div",12)(27,"h5"),e._uU(28,"Date Range"),e.qZA(),e.TgZ(29,"p",13),e._uU(30,"Select transaction date of the channel you want to download (Max 2 Weeks)"),e.qZA()(),e.TgZ(31,"div",12)(32,"div",5)(33,"mat-date-range-input",17)(34,"input",18),e.NdJ("ngModelChange",function(h){return t.startDate=h})("click",function(){e.CHM(i);const h=e.MAs(37);return e.KtG(h.open())}),e.qZA(),e.TgZ(35,"input",19),e.NdJ("ngModelChange",function(h){return t.endDate=h})("click",function(){e.CHM(i);const h=e.MAs(37);return e.KtG(h.open())}),e.qZA()(),e._UZ(36,"mat-date-range-picker",null,20),e.qZA()()()()()(),e.TgZ(38,"mat-step",21),e.YNc(39,He,1,0,"ng-template",10),e.YNc(40,at,34,11,"div",22),e.qZA(),e.TgZ(41,"mat-step",23),e.YNc(42,it,1,0,"ng-template",10),e.YNc(43,pt,16,2,"div",22),e.qZA(),e.YNc(44,dt,1,0,"ng-template",24),e.YNc(45,ct,1,0,"ng-template",25),e.YNc(46,ut,1,0,"ng-template",26),e.qZA()()()()()()()}if(2&n){const i=e.MAs(11),o=e.MAs(37);e.Q6J("headerTitle",t.pageTitle)("description",t.pageTitle)("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(2),e.Q6J("ngIf","preview"==t.currentState),e.xp6(1),e.Q6J("ngIf","finish"!=t.currentState),e.xp6(1),e.Q6J("ngIf","finish"==t.currentState),e.xp6(6),e.s9C("ngClass","last-edited-step-"+i.selectedIndex),e.xp6(2),e.Q6J("editable","finish"!=t.currentState)("completed",!1),e.xp6(11),e.Q6J("clearable",!1)("ngModel",t.channelID),e.xp6(1),e.Q6J("ngForOf",t.channelOptions),e.xp6(9),e.Q6J("rangePicker",o),e.xp6(1),e.Q6J("ngModel",t.startDate),e.xp6(1),e.Q6J("ngModel",t.endDate),e.xp6(3),e.Q6J("editable","finish"!=t.currentState)("completed",!1),e.xp6(2),e.Q6J("ngIf","preview"==t.currentState),e.xp6(3),e.Q6J("ngIf","finish"==t.currentState)}},dependencies:[u.mk,u.sg,u.O5,l.Fj,l.JJ,l.On,d.p,H.w9,H.jq,G.wx,G.zY,G.By,G._g,Y.C0,Y.VY,Y.Vq,Y.z9,B.gM,u.uU],styles:[".vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}.mt-1rem[_ngcontent-%COMP%]{margin-top:1rem}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem} mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%} mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container mat-step-header>div.mat-step-label{padding-top:8px} mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container>div.mat-horizontal-stepper-content:nth-child(1){display:flex;justify-content:left} mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container{margin-top:30px} mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container>mat-step-header.mat-horizontal-stepper-header{pointer-events:none!important}"]});var b=c(8063);const ht=[{path:"",component:S,children:[{path:"",redirectTo:"new",pathMatch:"full"},{path:"new",component:q,canActivate:[b.a],data:{title:"New Order"}},{path:"detail",component:M,canActivate:[b.a],data:{title:"Orders detail"}},{path:"ready_to_ship",component:J,canActivate:[b.a],data:{title:"Ready To Ship"}},{path:"Shipped",component:k,canActivate:[b.a],data:{title:"Shipped"}},{path:"Delivered",component:L,canActivate:[b.a],data:{title:"Delivered"}},{path:"All",component:Q,canActivate:[b.a],data:{title:"All Order"}},{path:"Cancelled",component:F,canActivate:[b.a],data:{title:"Cancelled"}},{path:"Download",component:E,canActivate:[b.a],data:{title:"Download"}}]}];class w{}w.\u0275fac=function(n){return new(n||w)},w.\u0275mod=e.oAB({type:w}),w.\u0275inj=e.cJS({imports:[u.ez,f.Bz.forChild(ht)]});var gt=c(8739);class O{}O.\u0275fac=function(n){return new(n||O)},O.\u0275mod=e.oAB({type:O}),O.\u0275inj=e.cJS({imports:[u.ez]});class I{}I.\u0275fac=function(n){return new(n||I)},I.\u0275mod=e.oAB({type:I}),I.\u0275inj=e.cJS({providers:[v],imports:[u.ez,l.u5,w,z.Z,d.R,gt.TU,f.Bz,H.A0,G.FA,y.XK,m.n,Y.T5,B.AV,O,$.p9,N.Is,D.LD]})},6082:(j,R,c)=>{c.d(R,{M:()=>g});var u=c(8505),f=c(3154),e=c(4650),z=c(1318),S=c(7185);class g{constructor(r,s){this.httpService=r,this.toastrService=s}loader(r=f.g.GuidEMpty){return this.httpService.post("/api/product/Load",{ID:r})}LoadInPOS(r=f.g.GuidEMpty){return this.httpService.post("/api/product/LoadInPOS",{ID:r})}filterChannelByTypeId(r,s){return r.filter(p=>-1!==s.findIndex(l=>p.TypeID==l))}getProductStatistic(){return this.httpService.post("/api/product/ProductStatistic",{})}getTotalProductLive(r){return this.httpService.post("/api/product/TotalProductLive",{ID:r})}clearCacheChannel(r){return this.httpService.post("/api/Channel/ClearCacheChannel",{ID:r})}uploadSingleProduct(r,s){return this.httpService.post("api/product/UploadMultipleChannel",{Channel:s,Products:r})}uploadMultipleProduct(r,s){return this.httpService.post("api/product/UploadMultipleProductAndMultipleChannel",{Channel:s,Products:r})}scanSingle(r,s){return this.httpService.post("/api/product/ScanSingle",{ID:r,SKU:s})}scanNotInChannel(r){return this.httpService.post("/api/product/ScanNotinChannel",{ID:r})}findAllSoldInChannel(r){return this.httpService.post("/api/product/GetSoldInChannel",r)}scanAll(r,s,p,l=!1){return this.httpService.post("/api/product/ScanOptimized",{ID:r,ScanFull:s,UpdatedProduct:p,Async:l})}scanCompareToPos(r){return this.httpService.post("/api/product/CompareMarketplaceToPOS",r)}getVariantCodesProduct(r){return r.Variants.map(p=>p.Code)}downloadMultipleProduct(r){let s=r.map(p=>({ChannelItemID:p.ChannelItemID,ChannelID:p.ChannelID}));return this.httpService.post("/api/product/DownloadMultipleProductFromChannel",s).pipe((0,u.b)(p=>{this.toastrService.success(`${p.Count} products downloaded to POS`,"Download Complete")}))}downloadProduct(r){return this.httpService.post("/api/product/DownloadProductFromChannel",{ChannelItemID:r.ChannelItemID,ChannelID:r.ChannelID}).pipe((0,u.b)(()=>{this.toastrService.success("Product successfully downloaded to POS","Download Complete")}))}getVariantCodesProducts(r=[]){let s=[];return r.forEach(p=>{p.Variants.forEach(l=>{s=[...s,l.Code]})}),s}filterUnselectedChannel(r,s){let l,p=[];if(r.forEach(d=>{p=[...p,...d.Channel]}),p&&0!=p.length){let d=[];l=s.filter(m=>(d=p.filter(Z=>Z.ChannelID==m.ID),d.length!==r.length))}else l=s;return l}findChannelById(r,s){return s.find(p=>p.ID==r)}sortChannel(r=[]){return r.sort((s,p)=>s.TypeID<p.TypeID?1:s.TypeID===p.TypeID?0:-1)}hasSelection(r=[]){return this.selectedProduct(r).length>0}selectedProduct(r=[]){return r.filter(s=>s.selected)}hasSelectionVariant(r){return this.selectedVariantProduct(r).length>0}selectedVariantProduct(r){let s=[];return r.forEach(p=>{s=[...s,...null!=p.Variants?p.Variants.filter(l=>l.selected):""]}),s}getChannelProduct(r){const s=r.Variants;let p=[];for(let l of s)if(null!=l.Channel)for(let d of l.Channel)0==p.filter(m=>m.ChannelID==d.ChannelID).length&&p.push(d);return this.sortChannel(p)}successToastrScanAllProduct(r,s,p){if(p){const l=r?.NotInPOS?.Product?r?.NotInPOS?.Product:0,d=r?.InChannel?.Product?r?.InChannel?.Product:0;this.toastrService.success(`\n ${l+d} found in ${s.Name} </br>\n (${d} In POS + ${l} Not In Pos)\n `,"Scan Complete!",{enableHtml:!0})}else this.toastrService.success(`${r.InChannel?r.InChannel.Product:0} product updates in ${s.Name} </br> \n since ${r.LastUpdate}`,"Scan Complete!",{enableHtml:!0})}checkProductHasScanButton(r,s){let p;return r.map(l=>(l.Channel=this.getChannelProduct(l),p=this.filterUnselectedChannel([l],s),l.hasScan=p.length>0,l))}checkProductHasUploadBtn(r,s){let p;return r.map(l=>(l.Channel=this.getChannelProduct(l),p=this.filterUnselectedChannel([l],s),l.hasUpload=p.length>0,l))}showToastrUploadMultiple(r=[]){let s=[],p=[];if(r.forEach(l=>{"string"==typeof l?.Response?p=[...p,`<li>${l.Response}</li>`]:(l?.Response?.Success.forEach(d=>{s=[...s,`<li>Product ${d} was <b>successfully</b> uploaded to ${l.Name}</li>`]}),l?.Response.Fail.forEach(d=>{p=[...p,`<li>${d}</li>`]}))}),p.length>0&&s.length>0){const l=[...s,...p];this.toastrService.warning(this.concatMessage(l),"Warning!",{enableHtml:!0})}else s.length>0&&0==p.length?this.toastrService.success(this.concatMessage(s),"Success",{enableHtml:!0}):this.toastrService.error(this.concatMessage(p),"Error",{enableHtml:!0})}concatMessage(r=[]){let s="";return r.forEach(p=>{s+=p}),`<ol>${s}</ol>`}showToastrSuccessUploadSingle(r,s){let p=r.filter(m=>0==m.Status),l=r.filter(m=>1==m.Status),d=this.generateToastrMessage(p,l,s);this.toastrService.success(d.message,"Success",{enableHtml:!0})}showToastErrorUploadSingle(r,s){let p=r?.error?.Message.filter(m=>0==m.Status),l=r?.error?.Message.filter(m=>1==m.Status),d=this.generateToastrMessage(p,l,s);"WARNING"==d.status?this.toastrService.warning(d.message,"Warning!",{enableHtml:!0}):this.toastrService.error(d.message,`Error - ${r.status}`,{enableHtml:!0})}generateToastrMessage(r,s,p){let d,l="";return 0==r.length&&s.length>0?(d="SUCCESS",l=this.createSuccessResponse(s,p)):r.length>0&&0==s.length?(d="ERROR",l=this.createErrResponse(r,p)):(d="WARNING",l=`${this.createSuccessResponse(s,p)} ${this.createErrResponse(r,p)}`),l=`<ol>${l}</ol>`,{status:d,message:l}}createErrResponse(r,s){let p="";return r.forEach((l,d)=>{p+=`<li><b>${l.Response}</b> for ${s.Name} in ${l.Name}</li>`}),p}createSuccessResponse(r,s){let p="";return r.forEach((l,d)=>{p+=`<li>Product ${s.Name} was <b>successfully</b> uploaded to ${l.Name}</li>`}),p}getHostName(){if(f.g.IsEmpty(this.hostName)){const r=localStorage.getItem("Authorization");this.hostName=JSON.parse(r)?.Host}return this.hostName}}g.\u0275fac=function(r){return new(r||g)(e.LFG(z.O),e.LFG(S._W))},g.\u0275prov=e.Yz7({token:g,factory:g.\u0275fac,providedIn:"root"})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[833],{3154:(Z,G,p)=>{p.d(G,{g:()=>w});var e=(()=>{return(x=e||(e={})).SHOOPE="//res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png",x.WOOCOMMERCE="//res.cloudinary.com/pos/image/upload/w_50/v1632447439/icons/WooCommerce/woocommerce-icon.webp",x.TOKOPEDIA="//res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png",x.TIKTOK="//res.cloudinary.com/pos/image/upload/w_30/v1645761611/icons/Marketplace%20logo/tiktok.png",x.LAZADA="//res.cloudinary.com/pos/image/upload/w_30/v1641528003/icons/marketplace_icons/lazada.png",x.KALCARE="//res.cloudinary.com/pos/image/upload/v1654230268/icons/marketplace_icons/kalcare.png",e;var x})(),E=p(9694);class w{static IsNotEmpty(_){return""!=_&&_!=w.GuidEMpty&&null!=_&&null!=_}static IsEmpty(_){return""==_||null==_||null==_||_==w.GuidEMpty}static getChannelLogoByTypeId(_){let F;switch(_){case E.x.Tokopedia:F=e.TOKOPEDIA;break;case E.x.ShopeeV2:F=e.SHOOPE;break;case E.x.WooCommerce:F=e.WOOCOMMERCE;break;case E.x.Lazada:F=e.LAZADA;break;case E.x.Tiktok:F=e.TIKTOK;break;case E.x.KalCare:F=e.KALCARE}return F}static getDaysDiff(_,F){return(F.getTime()-_.getTime())/864e5}static addDays(_,F){const V=new Date(Number(_));return V.setDate(_.getDate()-F),V}static isValidDate(_){return _ instanceof Date&&!isNaN(_)}static getImageInfo(_){return new Promise((F,V)=>{let C=new Image;C.src=_,C.decode().then(()=>{F({img:_,height:C.height,width:C.width})}).catch(()=>{V(new Error(`Image load error for ${_}`))})})}static formatTitleFromDate(_,F){let V=null;const C=new Date(_),S=new Date(F);return C.getDate()!=S.getDate()&&(V="dd"),C.getMonth()!=S.getMonth()&&(V="dd MMM"),C.getFullYear()!=S.getFullYear()&&(V="dd MMM yyyy"),V}static openDownloadFile(_,F){var V=window.URL.createObjectURL(_),C=document.createElement("a");C.href=V,C.download=F,C.click()}}w.GuidEMpty="00000000-0000-0000-0000-000000000000",w.MinDate="0001-01-01T00:00:00"},9694:(Z,G,p)=>{p.d(G,{x:()=>e});var e=(()=>{return(E=e||(e={}))[E.Shopee=0]="Shopee",E[E.Tokopedia=1]="Tokopedia",E[E.WooCommerce=2]="WooCommerce",E[E.None=3]="None",E[E.KalCare=4]="KalCare",E[E.ShopeeV2=5]="ShopeeV2",E[E.Tiktok=6]="Tiktok",E[E.Lazada=7]="Lazada",e;var E})()},4128:(Z,G,p)=>{p.d(G,{D:()=>C});var e=p(9751),E=p(4742),w=p(8421),x=p(3269),_=p(5403),F=p(3268),V=p(1810);function C(...S){const m=(0,x.jO)(S),{args:T,keys:b}=(0,E.D)(S),O=new e.y(N=>{const{length:v}=T;if(!v)return void N.complete();const D=new Array(v);let g=v,y=v;for(let A=0;A<v;A++){let H=!1;(0,w.Xf)(T[A]).subscribe((0,_.x)(N,j=>{H||(H=!0,y--),D[A]=j},()=>g--,void 0,()=>{(!g||!H)&&(y||N.next(b?(0,V.n)(b,D):D),N.complete())}))}});return m?O.pipe((0,F.Z)(m)):O}},4968:(Z,G,p)=>{p.d(G,{R:()=>m});var e=p(8421),E=p(9751),w=p(5577),x=p(1144),_=p(576),F=p(3268);const V=["addListener","removeListener"],C=["addEventListener","removeEventListener"],S=["on","off"];function m(v,D,g,y){if((0,_.m)(g)&&(y=g,g=void 0),y)return m(v,D,g).pipe((0,F.Z)(y));const[A,H]=function N(v){return(0,_.m)(v.addEventListener)&&(0,_.m)(v.removeEventListener)}(v)?C.map(j=>q=>v[j](D,q,g)):function b(v){return(0,_.m)(v.addListener)&&(0,_.m)(v.removeListener)}(v)?V.map(T(v,D)):function O(v){return(0,_.m)(v.on)&&(0,_.m)(v.off)}(v)?S.map(T(v,D)):[];if(!A&&(0,x.z)(v))return(0,w.z)(j=>m(j,D,g))((0,e.Xf)(v));if(!A)throw new TypeError("Invalid event target");return new E.y(j=>{const q=(...J)=>j.next(1<J.length?J:J[0]);return A(q),()=>H(q)})}function T(v,D){return g=>y=>v[g](D,y)}},3601:(Z,G,p)=>{p.d(G,{e:()=>V});var e=p(4986),E=p(4482),w=p(8421),x=p(5403),F=p(2805);function V(C,S=e.z){return function _(C){return(0,E.e)((S,m)=>{let T=!1,b=null,O=null,N=!1;const v=()=>{if(O?.unsubscribe(),O=null,T){T=!1;const g=b;b=null,m.next(g)}N&&m.complete()},D=()=>{O=null,N&&m.complete()};S.subscribe((0,x.x)(m,g=>{T=!0,b=g,O||(0,w.Xf)(C(g)).subscribe(O=(0,x.x)(m,v,D))},()=>{N=!0,(!T||!O||O.closed)&&m.complete()}))})}(()=>(0,F.H)(C,S))}},6406:(Z,G,p)=>{p.d(G,{Z:()=>V});var e=p(4408),E=p(727);const w={schedule(S){let m=requestAnimationFrame,T=cancelAnimationFrame;const{delegate:b}=w;b&&(m=b.requestAnimationFrame,T=b.cancelAnimationFrame);const O=m(N=>{T=void 0,S(N)});return new E.w0(()=>T?.(O))},requestAnimationFrame(...S){const{delegate:m}=w;return(m?.requestAnimationFrame||requestAnimationFrame)(...S)},cancelAnimationFrame(...S){const{delegate:m}=w;return(m?.cancelAnimationFrame||cancelAnimationFrame)(...S)},delegate:void 0};var _=p(7565);const V=new class F extends _.v{flush(m){this._active=!0;const T=this._scheduled;this._scheduled=void 0;const{actions:b}=this;let O;m=m||b.shift();do{if(O=m.execute(m.state,m.delay))break}while((m=b[0])&&m.id===T&&b.shift());if(this._active=!1,O){for(;(m=b[0])&&m.id===T&&b.shift();)m.unsubscribe();throw O}}}(class x extends e.o{constructor(m,T){super(m,T),this.scheduler=m,this.work=T}requestAsyncId(m,T,b=0){return null!==b&&b>0?super.requestAsyncId(m,T,b):(m.actions.push(this),m._scheduled||(m._scheduled=w.requestAnimationFrame(()=>m.flush(void 0))))}recycleAsyncId(m,T,b=0){if(null!=b&&b>0||null==b&&this.delay>0)return super.recycleAsyncId(m,T,b);m.actions.some(O=>O.id===T)||(w.cancelAnimationFrame(T),m._scheduled=void 0)}})},3101:(Z,G,p)=>{p.d(G,{E:()=>N});var e=p(4408);let w,E=1;const x={};function _(D){return D in x&&(delete x[D],!0)}const F={setImmediate(D){const g=E++;return x[g]=!0,w||(w=Promise.resolve()),w.then(()=>_(g)&&D()),g},clearImmediate(D){_(D)}},{setImmediate:C,clearImmediate:S}=F,m={setImmediate(...D){const{delegate:g}=m;return(g?.setImmediate||C)(...D)},clearImmediate(D){const{delegate:g}=m;return(g?.clearImmediate||S)(D)},delegate:void 0};var b=p(7565);const N=new class O extends b.v{flush(g){this._active=!0;const y=this._scheduled;this._scheduled=void 0;const{actions:A}=this;let H;g=g||A.shift();do{if(H=g.execute(g.state,g.delay))break}while((g=A[0])&&g.id===y&&A.shift());if(this._active=!1,H){for(;(g=A[0])&&g.id===y&&A.shift();)g.unsubscribe();throw H}}}(class T extends e.o{constructor(g,y){super(g,y),this.scheduler=g,this.work=y}requestAsyncId(g,y,A=0){return null!==A&&A>0?super.requestAsyncId(g,y,A):(g.actions.push(this),g._scheduled||(g._scheduled=m.setImmediate(g.flush.bind(g,void 0))))}recycleAsyncId(g,y,A=0){if(null!=A&&A>0||null==A&&this.delay>0)return super.recycleAsyncId(g,y,A);g.actions.some(H=>H.id===y)||(m.clearImmediate(y),g._scheduled=void 0)}})},4006:(Z,G,p)=>{p.d(G,{Cf:()=>y,EJ:()=>qe,F:()=>We,Fj:()=>N,JJ:()=>Le,JL:()=>Ge,JU:()=>C,Kr:()=>jt,On:()=>lt,Q7:()=>Ke,UX:()=>Mn,Wl:()=>m,YN:()=>Ut,Zs:()=>pt,_Y:()=>Nt,a5:()=>W,c5:()=>gt,gN:()=>P,kI:()=>j,on:()=>mt,sg:()=>ze,u5:()=>On,wV:()=>at});var e=p(4650),E=p(6895),w=p(8996),x=p(4128),_=p(4004);let F=(()=>{class s{constructor(t,r){this._renderer=t,this._elementRef=r,this.onChange=c=>{},this.onTouched=()=>{}}setProperty(t,r){this._renderer.setProperty(this._elementRef.nativeElement,t,r)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(e.Qsj),e.Y36(e.SBq))},s.\u0275dir=e.lG2({type:s}),s})(),V=(()=>{class s extends F{}return s.\u0275fac=function(){let n;return function(r){return(n||(n=e.n5z(s)))(r||s)}}(),s.\u0275dir=e.lG2({type:s,features:[e.qOj]}),s})();const C=new e.OlP("NgValueAccessor"),S={provide:C,useExisting:(0,e.Gpc)(()=>m),multi:!0};let m=(()=>{class s extends V{writeValue(t){this.setProperty("checked",t)}}return s.\u0275fac=function(){let n;return function(r){return(n||(n=e.n5z(s)))(r||s)}}(),s.\u0275dir=e.lG2({type:s,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(t,r){1&t&&e.NdJ("change",function(f){return r.onChange(f.target.checked)})("blur",function(){return r.onTouched()})},features:[e._Bn([S]),e.qOj]}),s})();const T={provide:C,useExisting:(0,e.Gpc)(()=>N),multi:!0},O=new e.OlP("CompositionEventMode");let N=(()=>{class s extends F{constructor(t,r,c){super(t,r),this._compositionMode=c,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function b(){const s=(0,E.q)()?(0,E.q)().getUserAgent():"";return/android (\d+)/.test(s.toLowerCase())}())}writeValue(t){this.setProperty("value",t??"")}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(e.Qsj),e.Y36(e.SBq),e.Y36(O,8))},s.\u0275dir=e.lG2({type:s,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(t,r){1&t&&e.NdJ("input",function(f){return r._handleInput(f.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(f){return r._compositionEnd(f.target.value)})},features:[e._Bn([T]),e.qOj]}),s})();function D(s){return null==s||("string"==typeof s||Array.isArray(s))&&0===s.length}function g(s){return null!=s&&"number"==typeof s.length}const y=new e.OlP("NgValidators"),A=new e.OlP("NgAsyncValidators"),H=/^(?=.{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])?)*$/;class j{static min(n){return function q(s){return n=>{if(D(n.value)||D(s))return null;const t=parseFloat(n.value);return!isNaN(t)&&t<s?{min:{min:s,actual:n.value}}:null}}(n)}static max(n){return function J(s){return n=>{if(D(n.value)||D(s))return null;const t=parseFloat(n.value);return!isNaN(t)&&t>s?{max:{max:s,actual:n.value}}:null}}(n)}static required(n){return ve(n)}static requiredTrue(n){return ye(n)}static email(n){return Ce(n)}static minLength(n){return function Ee(s){return n=>D(n.value)||!g(n.value)?null:n.value.length<s?{minlength:{requiredLength:s,actualLength:n.value.length}}:null}(n)}static maxLength(n){return function Ae(s){return n=>g(n.value)&&n.value.length>s?{maxlength:{requiredLength:s,actualLength:n.value.length}}:null}(n)}static pattern(n){return De(n)}static nullValidator(n){return null}static compose(n){return Oe(n)}static composeAsync(n){return Me(n)}}function ve(s){return D(s.value)?{required:!0}:null}function ye(s){return!0===s.value?null:{required:!0}}function Ce(s){return D(s.value)||H.test(s.value)?null:{email:!0}}function De(s){if(!s)return ie;let n,t;return"string"==typeof s?(t="","^"!==s.charAt(0)&&(t+="^"),t+=s,"$"!==s.charAt(s.length-1)&&(t+="$"),n=new RegExp(t)):(t=s.toString(),n=s),r=>{if(D(r.value))return null;const c=r.value;return n.test(c)?null:{pattern:{requiredPattern:t,actualValue:c}}}}function ie(s){return null}function be(s){return null!=s}function Te(s){return(0,e.QGY)(s)?(0,w.D)(s):s}function Fe(s){let n={};return s.forEach(t=>{n=null!=t?{...n,...t}:n}),0===Object.keys(n).length?null:n}function Ve(s,n){return n.map(t=>t(s))}function we(s){return s.map(n=>function Ze(s){return!s.validate}(n)?n:t=>n.validate(t))}function Oe(s){if(!s)return null;const n=s.filter(be);return 0==n.length?null:function(t){return Fe(Ve(t,n))}}function ue(s){return null!=s?Oe(we(s)):null}function Me(s){if(!s)return null;const n=s.filter(be);return 0==n.length?null:function(t){const r=Ve(t,n).map(Te);return(0,x.D)(r).pipe((0,_.U)(Fe))}}function ce(s){return null!=s?Me(we(s)):null}function Se(s,n){return null===s?[n]:Array.isArray(s)?[...s,n]:[s,n]}function Ie(s){return s._rawValidators}function xe(s){return s._rawAsyncValidators}function de(s){return s?Array.isArray(s)?s:[s]:[]}function se(s,n){return Array.isArray(s)?s.includes(n):s===n}function Ne(s,n){const t=de(n);return de(s).forEach(c=>{se(t,c)||t.push(c)}),t}function Be(s,n){return de(n).filter(t=>!se(s,t))}class ke{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(n){this._rawValidators=n||[],this._composedValidatorFn=ue(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=ce(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(n){this._onDestroyCallbacks.push(n)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(n=>n()),this._onDestroyCallbacks=[]}reset(n){this.control&&this.control.reset(n)}hasError(n,t){return!!this.control&&this.control.hasError(n,t)}getError(n,t){return this.control?this.control.getError(n,t):null}}class P extends ke{get formDirective(){return null}get path(){return null}}class W extends ke{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Pe{constructor(n){this._cd=n}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let Le=(()=>{class s extends Pe{constructor(t){super(t)}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(W,2))},s.\u0275dir=e.lG2({type:s,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,r){2&t&&e.ekj("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},features:[e.qOj]}),s})(),Ge=(()=>{class s extends Pe{constructor(t){super(t)}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(P,10))},s.\u0275dir=e.lG2({type:s,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(t,r){2&t&&e.ekj("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},features:[e.qOj]}),s})();const ee="VALID",K="INVALID",Q="PENDING",R="DISABLED";function le(s){return(te(s)?s.validators:s)||null}function me(s,n){return(te(n)?n.asyncValidators:s)||null}function te(s){return null!=s&&!Array.isArray(s)&&"object"==typeof s}class ge{constructor(n,t){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(n),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(n){this._rawValidators=this._composedValidatorFn=n}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(n){this._rawAsyncValidators=this._composedAsyncValidatorFn=n}get parent(){return this._parent}get valid(){return this.status===ee}get invalid(){return this.status===K}get pending(){return this.status==Q}get disabled(){return this.status===R}get enabled(){return this.status!==R}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(n){this._assignValidators(n)}setAsyncValidators(n){this._assignAsyncValidators(n)}addValidators(n){this.setValidators(Ne(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(Ne(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(Be(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(Be(n,this._rawAsyncValidators))}hasValidator(n){return se(this._rawValidators,n)}hasAsyncValidator(n){return se(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){this.touched=!0,this._parent&&!n.onlySelf&&this._parent.markAsTouched(n)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(n=>n.markAllAsTouched())}markAsUntouched(n={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}markAsDirty(n={}){this.pristine=!1,this._parent&&!n.onlySelf&&this._parent.markAsDirty(n)}markAsPristine(n={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}markAsPending(n={}){this.status=Q,!1!==n.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!n.onlySelf&&this._parent.markAsPending(n)}disable(n={}){const t=this._parentMarkedDirty(n.onlySelf);this.status=R,this.errors=null,this._forEachChild(r=>{r.disable({...n,onlySelf:!0})}),this._updateValue(),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...n,skipPristineCheck:t}),this._onDisabledChange.forEach(r=>r(!0))}enable(n={}){const t=this._parentMarkedDirty(n.onlySelf);this.status=ee,this._forEachChild(r=>{r.enable({...n,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors({...n,skipPristineCheck:t}),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(n){this._parent&&!n.onlySelf&&(this._parent.updateValueAndValidity(n),n.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(n){this._parent=n}getRawValue(){return this.value}updateValueAndValidity(n={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===ee||this.status===Q)&&this._runAsyncValidator(n.emitEvent)),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.updateValueAndValidity(n)}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?R:ee}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n){if(this.asyncValidator){this.status=Q,this._hasOwnPendingAsyncValidator=!0;const t=Te(this.asyncValidator(this));this._asyncValidationSubscription=t.subscribe(r=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(r,{emitEvent:n})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(n,t={}){this.errors=n,this._updateControlsErrors(!1!==t.emitEvent)}get(n){let t=n;return null==t||(Array.isArray(t)||(t=t.split(".")),0===t.length)?null:t.reduce((r,c)=>r&&r._find(c),this)}getError(n,t){const r=t?this.get(t):this;return r&&r.errors?r.errors[n]:null}hasError(n,t){return!!this.getError(n,t)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(n)}_initObservables(){this.valueChanges=new e.vpe,this.statusChanges=new e.vpe}_calculateStatus(){return this._allControlsDisabled()?R:this.errors?K:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Q)?Q:this._anyControlsHaveStatus(K)?K:ee}_anyControlsHaveStatus(n){return this._anyControls(t=>t.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n={}){this.pristine=!this._anyControlsDirty(),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}_updateTouched(n={}){this.touched=this._anyControlsTouched(),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){te(n)&&null!=n.updateOn&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){return!n&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(n){return null}_assignValidators(n){this._rawValidators=Array.isArray(n)?n.slice():n,this._composedValidatorFn=function He(s){return Array.isArray(s)?ue(s):s||null}(this._rawValidators)}_assignAsyncValidators(n){this._rawAsyncValidators=Array.isArray(n)?n.slice():n,this._composedAsyncValidatorFn=function Ue(s){return Array.isArray(s)?ce(s):s||null}(this._rawAsyncValidators)}}class fe extends ge{constructor(n,t,r){super(le(t),me(r,t)),this.controls=n,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(n,t){return this.controls[n]?this.controls[n]:(this.controls[n]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(n,t,r={}){this.registerControl(n,t),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}removeControl(n,t={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(n,t,r={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],t&&this.registerControl(n,t),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}contains(n){return this.controls.hasOwnProperty(n)&&this.controls[n].enabled}setValue(n,t={}){(function je(s,n,t){s._forEachChild((r,c)=>{if(void 0===t[c])throw new e.vHH(1002,"")})})(this,0,n),Object.keys(n).forEach(r=>{(function Ye(s,n,t){const r=s.controls;if(!(n?Object.keys(r):r).length)throw new e.vHH(1e3,"");if(!r[t])throw new e.vHH(1001,"")})(this,!0,r),this.controls[r].setValue(n[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(n,t={}){null!=n&&(Object.keys(n).forEach(r=>{const c=this.controls[r];c&&c.patchValue(n[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(n={},t={}){this._forEachChild((r,c)=>{r.reset(n[c],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(n,t,r)=>(n[r]=t.getRawValue(),n))}_syncPendingControls(){let n=this._reduceChildren(!1,(t,r)=>!!r._syncPendingControls()||t);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){Object.keys(this.controls).forEach(t=>{const r=this.controls[t];r&&n(r,t)})}_setUpControls(){this._forEachChild(n=>{n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(n){for(const[t,r]of Object.entries(this.controls))if(this.contains(t)&&n(r))return!0;return!1}_reduceValue(){return this._reduceChildren({},(t,r,c)=>((r.enabled||this.disabled)&&(t[c]=r.value),t))}_reduceChildren(n,t){let r=n;return this._forEachChild((c,f)=>{r=t(r,c,f)}),r}_allControlsDisabled(){for(const n of Object.keys(this.controls))if(this.controls[n].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(n){return this.controls.hasOwnProperty(n)?this.controls[n]:null}}const a=new e.OlP("CallSetDisabledState",{providedIn:"root",factory:()=>i}),i="always";function u(s,n,t=i){k(s,n),n.valueAccessor.writeValue(s.value),(s.disabled||"always"===t)&&n.valueAccessor.setDisabledState?.(s.disabled),function z(s,n){n.valueAccessor.registerOnChange(t=>{s._pendingValue=t,s._pendingChange=!0,s._pendingDirty=!0,"change"===s.updateOn&&U(s,n)})}(s,n),function ae(s,n){const t=(r,c)=>{n.valueAccessor.writeValue(r),c&&n.viewToModelUpdate(r)};s.registerOnChange(t),n._registerOnDestroy(()=>{s._unregisterOnChange(t)})}(s,n),function Y(s,n){n.valueAccessor.registerOnTouched(()=>{s._pendingTouched=!0,"blur"===s.updateOn&&s._pendingChange&&U(s,n),"submit"!==s.updateOn&&s.markAsTouched()})}(s,n),function M(s,n){if(n.valueAccessor.setDisabledState){const t=r=>{n.valueAccessor.setDisabledState(r)};s.registerOnDisabledChange(t),n._registerOnDestroy(()=>{s._unregisterOnDisabledChange(t)})}}(s,n)}function d(s,n,t=!0){const r=()=>{};n.valueAccessor&&(n.valueAccessor.registerOnChange(r),n.valueAccessor.registerOnTouched(r)),B(s,n),s&&(n._invokeOnDestroyCallbacks(),s._registerOnCollectionChange(()=>{}))}function h(s,n){s.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(n)})}function k(s,n){const t=Ie(s);null!==n.validator?s.setValidators(Se(t,n.validator)):"function"==typeof t&&s.setValidators([t]);const r=xe(s);null!==n.asyncValidator?s.setAsyncValidators(Se(r,n.asyncValidator)):"function"==typeof r&&s.setAsyncValidators([r]);const c=()=>s.updateValueAndValidity();h(n._rawValidators,c),h(n._rawAsyncValidators,c)}function B(s,n){let t=!1;if(null!==s){if(null!==n.validator){const c=Ie(s);if(Array.isArray(c)&&c.length>0){const f=c.filter(L=>L!==n.validator);f.length!==c.length&&(t=!0,s.setValidators(f))}}if(null!==n.asyncValidator){const c=xe(s);if(Array.isArray(c)&&c.length>0){const f=c.filter(L=>L!==n.asyncValidator);f.length!==c.length&&(t=!0,s.setAsyncValidators(f))}}}const r=()=>{};return h(n._rawValidators,r),h(n._rawAsyncValidators,r),t}function U(s,n){s._pendingDirty&&s.markAsDirty(),s.setValue(s._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(s._pendingValue),s._pendingChange=!1}function Ft(s,n){k(s,n)}function Vt(s,n){s._syncPendingControls(),n.forEach(t=>{const r=t.control;"submit"===r.updateOn&&r._pendingChange&&(t.viewToModelUpdate(r._pendingValue),r._pendingChange=!1)})}const nn={provide:P,useExisting:(0,e.Gpc)(()=>We)},_e=(()=>Promise.resolve())();let We=(()=>{class s extends P{constructor(t,r,c){super(),this.callSetDisabledState=c,this.submitted=!1,this._directives=new Set,this.ngSubmit=new e.vpe,this.form=new fe({},ue(t),ce(r))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){_e.then(()=>{const r=this._findContainer(t.path);t.control=r.registerControl(t.name,t.control),u(t.control,t,this.callSetDisabledState),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){_e.then(()=>{const r=this._findContainer(t.path);r&&r.removeControl(t.name),this._directives.delete(t)})}addFormGroup(t){_e.then(()=>{const r=this._findContainer(t.path),c=new fe({});Ft(c,t),r.registerControl(t.name,c),c.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){_e.then(()=>{const r=this._findContainer(t.path);r&&r.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,r){_e.then(()=>{this.form.get(t.path).setValue(r)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,Vt(this.form,this._directives),this.ngSubmit.emit(t),"dialog"===t?.target?.method}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(y,10),e.Y36(A,10),e.Y36(a,8))},s.\u0275dir=e.lG2({type:s,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,r){1&t&&e.NdJ("submit",function(f){return r.onSubmit(f)})("reset",function(){return r.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[e._Bn([nn]),e.qOj]}),s})();function wt(s,n){const t=s.indexOf(n);t>-1&&s.splice(t,1)}function Ot(s){return"object"==typeof s&&null!==s&&2===Object.keys(s).length&&"value"in s&&"disabled"in s}const Mt=class extends ge{constructor(n=null,t,r){super(le(t),me(r,t)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(n),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),te(t)&&(t.nonNullable||t.initialValueIsDefault)&&(this.defaultValue=Ot(n)?n.value:n)}setValue(n,t={}){this.value=this._pendingValue=n,this._onChange.length&&!1!==t.emitModelToViewChange&&this._onChange.forEach(r=>r(this.value,!1!==t.emitViewToModelChange)),this.updateValueAndValidity(t)}patchValue(n,t={}){this.setValue(n,t)}reset(n=this.defaultValue,t={}){this._applyFormState(n),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){wt(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){wt(this._onDisabledChange,n)}_forEachChild(n){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(n){Ot(n)?(this.value=this._pendingValue=n.value,n.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=n}},on={provide:W,useExisting:(0,e.Gpc)(()=>lt)},xt=(()=>Promise.resolve())();let lt=(()=>{class s extends W{constructor(t,r,c,f,L,$){super(),this._changeDetectorRef=L,this.callSetDisabledState=$,this.control=new Mt,this._registered=!1,this.update=new e.vpe,this._parent=t,this._setValidators(r),this._setAsyncValidators(c),this.valueAccessor=function ot(s,n){if(!n)return null;let t,r,c;return Array.isArray(n),n.forEach(f=>{f.constructor===N?t=f:function en(s){return Object.getPrototypeOf(s.constructor)===V}(f)?r=f:c=f}),c||r||t||null}(0,f)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){const r=t.name.previousValue;this.formDirective.removeControl({name:r,path:this._getPath(r)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),function rt(s,n){if(!s.hasOwnProperty("model"))return!1;const t=s.model;return!!t.isFirstChange()||!Object.is(n,t.currentValue)}(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){u(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(t){xt.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){const r=t.isDisabled.currentValue,c=0!==r&&(0,e.D6c)(r);xt.then(()=>{c&&!this.control.disabled?this.control.disable():!c&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?function o(s,n){return[...n.path,s]}(t,this._parent):[t]}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(P,9),e.Y36(y,10),e.Y36(A,10),e.Y36(C,10),e.Y36(e.sBO,8),e.Y36(a,8))},s.\u0275dir=e.lG2({type:s,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[e._Bn([on]),e.qOj,e.TTD]}),s})(),Nt=(()=>{class s{}return s.\u0275fac=function(t){return new(t||s)},s.\u0275dir=e.lG2({type:s,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),s})();const ln={provide:C,useExisting:(0,e.Gpc)(()=>at),multi:!0};let at=(()=>{class s extends V{writeValue(t){this.setProperty("value",t??"")}registerOnChange(t){this.onChange=r=>{t(""==r?null:parseFloat(r))}}}return s.\u0275fac=function(){let n;return function(r){return(n||(n=e.n5z(s)))(r||s)}}(),s.\u0275dir=e.lG2({type:s,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(t,r){1&t&&e.NdJ("input",function(f){return r.onChange(f.target.value)})("blur",function(){return r.onTouched()})},features:[e._Bn([ln]),e.qOj]}),s})(),Bt=(()=>{class s{}return s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=e.oAB({type:s}),s.\u0275inj=e.cJS({}),s})();const ut=new e.OlP("NgModelWithFormControlWarning"),hn={provide:P,useExisting:(0,e.Gpc)(()=>ze)};let ze=(()=>{class s extends P{constructor(t,r,c){super(),this.callSetDisabledState=c,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new e.vpe,this._setValidators(t),this._setAsyncValidators(r)}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(B(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){const r=this.form.get(t.path);return u(r,t,this.callSetDisabledState),r.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),r}getControl(t){return this.form.get(t.path)}removeControl(t){d(t.control||null,t,!1),function tn(s,n){const t=s.indexOf(n);t>-1&&s.splice(t,1)}(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,r){this.form.get(t.path).setValue(r)}onSubmit(t){return this.submitted=!0,Vt(this.form,this.directives),this.ngSubmit.emit(t),"dialog"===t?.target?.method}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{const r=t.control,c=this.form.get(t.path);r!==c&&(d(r||null,t),(s=>s instanceof Mt)(c)&&(u(c,t,this.callSetDisabledState),t.control=c))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){const r=this.form.get(t.path);Ft(r,t),r.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){const r=this.form.get(t.path);r&&function Qt(s,n){return B(s,n)}(r,t)&&r.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){k(this.form,this),this._oldForm&&B(this._oldForm,this)}_checkFormPresent(){}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(y,10),e.Y36(A,10),e.Y36(a,8))},s.\u0275dir=e.lG2({type:s,selectors:[["","formGroup",""]],hostBindings:function(t,r){1&t&&e.NdJ("submit",function(f){return r.onSubmit(f)})("reset",function(){return r.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[e._Bn([hn]),e.qOj,e.TTD]}),s})();const fn={provide:C,useExisting:(0,e.Gpc)(()=>qe),multi:!0};function Ht(s,n){return null==s?`${n}`:(n&&"object"==typeof n&&(n="Object"),`${s}: ${n}`.slice(0,50))}let qe=(()=>{class s extends V{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){this.value=t;const c=Ht(this._getOptionId(t),t);this.setProperty("value",c)}registerOnChange(t){this.onChange=r=>{this.value=this._getOptionValue(r),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(const r of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(r),t))return r;return null}_getOptionValue(t){const r=function _n(s){return s.split(":")[0]}(t);return this._optionMap.has(r)?this._optionMap.get(r):t}}return s.\u0275fac=function(){let n;return function(r){return(n||(n=e.n5z(s)))(r||s)}}(),s.\u0275dir=e.lG2({type:s,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(t,r){1&t&&e.NdJ("change",function(f){return r.onChange(f.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},features:[e._Bn([fn]),e.qOj]}),s})(),Ut=(()=>{class s{constructor(t,r,c){this._element=t,this._renderer=r,this._select=c,this._select&&(this.id=this._select._registerOption())}set ngValue(t){null!=this._select&&(this._select._optionMap.set(this.id,t),this._setElementValue(Ht(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._setElementValue(t),this._select&&this._select.writeValue(this._select.value)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(e.SBq),e.Y36(e.Qsj),e.Y36(qe,9))},s.\u0275dir=e.lG2({type:s,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),s})();const vn={provide:C,useExisting:(0,e.Gpc)(()=>ht),multi:!0};function Yt(s,n){return null==s?`${n}`:("string"==typeof n&&(n=`'${n}'`),n&&"object"==typeof n&&(n="Object"),`${s}: ${n}`.slice(0,50))}let ht=(()=>{class s extends V{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){let r;if(this.value=t,Array.isArray(t)){const c=t.map(f=>this._getOptionId(f));r=(f,L)=>{f._setSelected(c.indexOf(L.toString())>-1)}}else r=(c,f)=>{c._setSelected(!1)};this._optionMap.forEach(r)}registerOnChange(t){this.onChange=r=>{const c=[],f=r.selectedOptions;if(void 0!==f){const L=f;for(let $=0;$<L.length;$++){const ft=this._getOptionValue(L[$].value);c.push(ft)}}else{const L=r.options;for(let $=0;$<L.length;$++){const $e=L[$];if($e.selected){const ft=this._getOptionValue($e.value);c.push(ft)}}}this.value=c,t(c)}}_registerOption(t){const r=(this._idCounter++).toString();return this._optionMap.set(r,t),r}_getOptionId(t){for(const r of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(r)._value,t))return r;return null}_getOptionValue(t){const r=function yn(s){return s.split(":")[0]}(t);return this._optionMap.has(r)?this._optionMap.get(r)._value:t}}return s.\u0275fac=function(){let n;return function(r){return(n||(n=e.n5z(s)))(r||s)}}(),s.\u0275dir=e.lG2({type:s,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(t,r){1&t&&e.NdJ("change",function(f){return r.onChange(f.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},features:[e._Bn([vn]),e.qOj]}),s})(),jt=(()=>{class s{constructor(t,r,c){this._element=t,this._renderer=r,this._select=c,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){null!=this._select&&(this._value=t,this._setElementValue(Yt(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(Yt(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(e.SBq),e.Y36(e.Qsj),e.Y36(ht,9))},s.\u0275dir=e.lG2({type:s,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),s})(),ne=(()=>{class s{constructor(){this._validator=ie}ngOnChanges(t){if(this.inputName in t){const r=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(r),this._validator=this._enabled?this.createValidator(r):ie,this._onChange&&this._onChange()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return null!=t}}return s.\u0275fac=function(t){return new(t||s)},s.\u0275dir=e.lG2({type:s,features:[e.TTD]}),s})();const An={provide:y,useExisting:(0,e.Gpc)(()=>Ke),multi:!0},Dn={provide:y,useExisting:(0,e.Gpc)(()=>pt),multi:!0};let Ke=(()=>{class s extends ne{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=e.D6c,this.createValidator=t=>ve}enabled(t){return t}}return s.\u0275fac=function(){let n;return function(r){return(n||(n=e.n5z(s)))(r||s)}}(),s.\u0275dir=e.lG2({type:s,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(t,r){2&t&&e.uIk("required",r._enabled?"":null)},inputs:{required:"required"},features:[e._Bn([An]),e.qOj]}),s})(),pt=(()=>{class s extends Ke{constructor(){super(...arguments),this.createValidator=t=>ye}}return s.\u0275fac=function(){let n;return function(r){return(n||(n=e.n5z(s)))(r||s)}}(),s.\u0275dir=e.lG2({type:s,selectors:[["input","type","checkbox","required","","formControlName",""],["input","type","checkbox","required","","formControl",""],["input","type","checkbox","required","","ngModel",""]],hostVars:1,hostBindings:function(t,r){2&t&&e.uIk("required",r._enabled?"":null)},features:[e._Bn([Dn]),e.qOj]}),s})();const bn={provide:y,useExisting:(0,e.Gpc)(()=>mt),multi:!0};let mt=(()=>{class s extends ne{constructor(){super(...arguments),this.inputName="email",this.normalizeInput=e.D6c,this.createValidator=t=>Ce}enabled(t){return t}}return s.\u0275fac=function(){let n;return function(r){return(n||(n=e.n5z(s)))(r||s)}}(),s.\u0275dir=e.lG2({type:s,selectors:[["","email","","formControlName",""],["","email","","formControl",""],["","email","","ngModel",""]],inputs:{email:"email"},features:[e._Bn([bn]),e.qOj]}),s})();const Vn={provide:y,useExisting:(0,e.Gpc)(()=>gt),multi:!0};let gt=(()=>{class s extends ne{constructor(){super(...arguments),this.inputName="pattern",this.normalizeInput=t=>t,this.createValidator=t=>De(t)}}return s.\u0275fac=function(){let n;return function(r){return(n||(n=e.n5z(s)))(r||s)}}(),s.\u0275dir=e.lG2({type:s,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(t,r){2&t&&e.uIk("pattern",r._enabled?r.pattern:null)},inputs:{pattern:"pattern"},features:[e._Bn([Vn]),e.qOj]}),s})(),Jt=(()=>{class s{}return s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=e.oAB({type:s}),s.\u0275inj=e.cJS({imports:[Bt]}),s})(),On=(()=>{class s{static withConfig(t){return{ngModule:s,providers:[{provide:a,useValue:t.callSetDisabledState??i}]}}}return s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=e.oAB({type:s}),s.\u0275inj=e.cJS({imports:[Jt]}),s})(),Mn=(()=>{class s{static withConfig(t){return{ngModule:s,providers:[{provide:ut,useValue:t.warnOnNgModelWithFormControl??"always"},{provide:a,useValue:t.callSetDisabledState??i}]}}}return s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=e.oAB({type:s}),s.\u0275inj=e.cJS({imports:[Jt]}),s})()},8796:(Z,G,p)=>{p.d(G,{A0:()=>it,ir:()=>Qe,jq:()=>te,w9:()=>fe});var e=p(4650),E=p(4006),w=p(2722),x=p(3601),_=p(8675),F=p(8505),V=p(8372),C=p(9300),S=p(4004),m=p(6406),T=p(3101),b=p(7579),O=p(4968),N=p(6451),v=p(6895);const D=["content"],g=["scroll"],y=["padding"],A=function(l){return{searchTerm:l}};function H(l,a){if(1&l&&(e.TgZ(0,"div",6),e.GkF(1,7),e.qZA()),2&l){const i=e.oxw();e.xp6(1),e.Q6J("ngTemplateOutlet",i.headerTemplate)("ngTemplateOutletContext",e.VKq(2,A,i.filterValue))}}function j(l,a){if(1&l&&(e.TgZ(0,"div",8),e.GkF(1,7),e.qZA()),2&l){const i=e.oxw();e.xp6(1),e.Q6J("ngTemplateOutlet",i.footerTemplate)("ngTemplateOutletContext",e.VKq(2,A,i.filterValue))}}const q=["*"],J=["searchInput"];function ve(l,a){if(1&l){const i=e.EpF();e.TgZ(0,"span",15),e.NdJ("click",function(){e.CHM(i);const u=e.oxw().$implicit,d=e.oxw(2);return e.KtG(d.unselect(u))}),e._uU(1,"\xd7"),e.qZA(),e._UZ(2,"span",16)}if(2&l){const i=e.oxw().$implicit,o=e.oxw(2);e.xp6(2),e.Q6J("ngItemLabel",i.label)("escape",o.escapeHTML)}}function ye(l,a){}const Ce=function(l,a,i){return{item:l,clear:a,label:i}};function Ee(l,a){if(1&l&&(e.TgZ(0,"div",12),e.YNc(1,ve,3,2,"ng-template",null,13,e.W1O),e.YNc(3,ye,0,0,"ng-template",14),e.qZA()),2&l){const i=a.$implicit,o=e.MAs(2),u=e.oxw(2);e.ekj("ng-value-disabled",i.disabled),e.xp6(3),e.Q6J("ngTemplateOutlet",u.labelTemplate||o)("ngTemplateOutletContext",e.kEZ(4,Ce,i.value,u.clearItem,i.label))}}function Ae(l,a){if(1&l&&(e.ynx(0),e.YNc(1,Ee,4,8,"div",11),e.BQk()),2&l){const i=e.oxw();e.xp6(1),e.Q6J("ngForOf",i.selectedItems)("ngForTrackBy",i.trackByOption)}}function De(l,a){}const ie=function(l,a){return{items:l,clear:a}};function be(l,a){if(1&l&&e.YNc(0,De,0,0,"ng-template",14),2&l){const i=e.oxw();e.Q6J("ngTemplateOutlet",i.multiLabelTemplate)("ngTemplateOutletContext",e.WLB(2,ie,i.selectedValues,i.clearItem))}}function Te(l,a){1&l&&e._UZ(0,"div",19)}function Fe(l,a){}function Ve(l,a){if(1&l&&(e.ynx(0),e.YNc(1,Te,1,0,"ng-template",null,17,e.W1O),e.YNc(3,Fe,0,0,"ng-template",18),e.BQk()),2&l){const i=e.MAs(2),o=e.oxw();e.xp6(3),e.Q6J("ngTemplateOutlet",o.loadingSpinnerTemplate||i)}}function Ze(l,a){if(1&l&&(e.TgZ(0,"span",20)(1,"span",21),e._uU(2,"\xd7"),e.qZA()()),2&l){const i=e.oxw();e.s9C("title",i.clearAllText)}}function we(l,a){if(1&l&&e._UZ(0,"span",27),2&l){const i=e.oxw().$implicit,o=e.oxw(2);e.Q6J("ngItemLabel",i.label)("escape",o.escapeHTML)}}function Oe(l,a){}const ue=function(l,a,i,o){return{item:l,item$:a,index:i,searchTerm:o}};function Me(l,a){if(1&l){const i=e.EpF();e.TgZ(0,"div",25),e.NdJ("click",function(){const d=e.CHM(i).$implicit,h=e.oxw(2);return e.KtG(h.toggleItem(d))})("mouseover",function(){const d=e.CHM(i).$implicit,h=e.oxw(2);return e.KtG(h.onItemHover(d))}),e.YNc(1,we,1,2,"ng-template",null,26,e.W1O),e.YNc(3,Oe,0,0,"ng-template",14),e.qZA()}if(2&l){const i=a.$implicit,o=e.MAs(2),u=e.oxw(2);e.ekj("ng-option-disabled",i.disabled)("ng-option-selected",i.selected)("ng-optgroup",i.children)("ng-option",!i.children)("ng-option-child",!!i.parent)("ng-option-marked",i===u.itemsList.markedItem),e.uIk("role",i.children?"group":"option")("aria-selected",i.selected)("id",null==i?null:i.htmlId),e.xp6(3),e.Q6J("ngTemplateOutlet",i.children?u.optgroupTemplate||o:u.optionTemplate||o)("ngTemplateOutletContext",e.l5B(17,ue,i.value,i,i.index,u.searchTerm))}}function ce(l,a){if(1&l&&(e.TgZ(0,"span")(1,"span",30),e._uU(2),e.qZA(),e._uU(3),e.qZA()),2&l){const i=e.oxw(3);e.xp6(2),e.Oqu(i.addTagText),e.xp6(1),e.hij('"',i.searchTerm,'"')}}function Se(l,a){}function Ie(l,a){if(1&l){const i=e.EpF();e.TgZ(0,"div",28),e.NdJ("mouseover",function(){e.CHM(i);const u=e.oxw(2);return e.KtG(u.itemsList.unmarkItem())})("click",function(){e.CHM(i);const u=e.oxw(2);return e.KtG(u.selectTag())}),e.YNc(1,ce,4,2,"ng-template",null,29,e.W1O),e.YNc(3,Se,0,0,"ng-template",14),e.qZA()}if(2&l){const i=e.MAs(2),o=e.oxw(2);e.ekj("ng-option-marked",!o.itemsList.markedItem),e.xp6(3),e.Q6J("ngTemplateOutlet",o.tagTemplate||i)("ngTemplateOutletContext",e.VKq(4,A,o.searchTerm))}}function xe(l,a){if(1&l&&(e.TgZ(0,"div",32),e._uU(1),e.qZA()),2&l){const i=e.oxw(3);e.xp6(1),e.Oqu(i.notFoundText)}}function de(l,a){}function se(l,a){if(1&l&&(e.ynx(0),e.YNc(1,xe,2,1,"ng-template",null,31,e.W1O),e.YNc(3,de,0,0,"ng-template",14),e.BQk()),2&l){const i=e.MAs(2),o=e.oxw(2);e.xp6(3),e.Q6J("ngTemplateOutlet",o.notFoundTemplate||i)("ngTemplateOutletContext",e.VKq(2,A,o.searchTerm))}}function Ne(l,a){if(1&l&&(e.TgZ(0,"div",32),e._uU(1),e.qZA()),2&l){const i=e.oxw(3);e.xp6(1),e.Oqu(i.typeToSearchText)}}function Be(l,a){}function ke(l,a){if(1&l&&(e.ynx(0),e.YNc(1,Ne,2,1,"ng-template",null,33,e.W1O),e.YNc(3,Be,0,0,"ng-template",18),e.BQk()),2&l){const i=e.MAs(2),o=e.oxw(2);e.xp6(3),e.Q6J("ngTemplateOutlet",o.typeToSearchTemplate||i)}}function P(l,a){if(1&l&&(e.TgZ(0,"div",32),e._uU(1),e.qZA()),2&l){const i=e.oxw(3);e.xp6(1),e.Oqu(i.loadingText)}}function W(l,a){}function Pe(l,a){if(1&l&&(e.ynx(0),e.YNc(1,P,2,1,"ng-template",null,34,e.W1O),e.YNc(3,W,0,0,"ng-template",14),e.BQk()),2&l){const i=e.MAs(2),o=e.oxw(2);e.xp6(3),e.Q6J("ngTemplateOutlet",o.loadingTextTemplate||i)("ngTemplateOutletContext",e.VKq(2,A,o.searchTerm))}}function _t(l,a){if(1&l){const i=e.EpF();e.TgZ(0,"ng-dropdown-panel",22),e.NdJ("update",function(u){e.CHM(i);const d=e.oxw();return e.KtG(d.viewPortItems=u)})("scroll",function(u){e.CHM(i);const d=e.oxw();return e.KtG(d.scroll.emit(u))})("scrollToEnd",function(u){e.CHM(i);const d=e.oxw();return e.KtG(d.scrollToEnd.emit(u))})("outsideClick",function(){e.CHM(i);const u=e.oxw();return e.KtG(u.close())}),e.ynx(1),e.YNc(2,Me,4,22,"div",23),e.YNc(3,Ie,4,6,"div",24),e.BQk(),e.YNc(4,se,4,4,"ng-container",3),e.YNc(5,ke,4,1,"ng-container",3),e.YNc(6,Pe,4,4,"ng-container",3),e.qZA()}if(2&l){const i=e.oxw();e.ekj("ng-select-multiple",i.multiple),e.Q6J("virtualScroll",i.virtualScroll)("bufferAmount",i.bufferAmount)("appendTo",i.appendTo)("position",i.dropdownPosition)("headerTemplate",i.headerTemplate)("footerTemplate",i.footerTemplate)("filterValue",i.searchTerm)("items",i.itemsList.filteredItems)("markedItem",i.itemsList.markedItem)("ngClass",i.appendTo?i.classes:null)("id",i.dropdownId),e.xp6(2),e.Q6J("ngForOf",i.viewPortItems)("ngForTrackBy",i.trackByOption),e.xp6(1),e.Q6J("ngIf",i.showAddTag),e.xp6(1),e.Q6J("ngIf",i.showNoItemsFound()),e.xp6(1),e.Q6J("ngIf",i.showTypeToSearch()),e.xp6(1),e.Q6J("ngIf",i.loading&&0===i.itemsList.filteredItems.length)}}const Je=/[&<>"']/g,Le=RegExp(Je.source),Ge={"&":"&","<":"<",">":">",'"':""","'":"'"};function I(l){return null!=l}function X(l){return"object"==typeof l&&I(l)}function re(l){return l instanceof Function}let vt=(()=>{class l{constructor(i){this.element=i,this.escape=!0}ngOnChanges(i){this.element.nativeElement.innerHTML=this.escape?function he(l){return l&&Le.test(l)?l.replace(Je,a=>Ge[a]):l}(this.ngItemLabel):this.ngItemLabel}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.SBq))},l.\u0275dir=e.lG2({type:l,selectors:[["","ngItemLabel",""]],inputs:{ngItemLabel:"ngItemLabel",escape:"escape"},features:[e.TTD]}),l})(),Qe=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-option-tmp",""]]}),l})(),yt=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-optgroup-tmp",""]]}),l})(),Ct=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-label-tmp",""]]}),l})(),Et=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-multi-label-tmp",""]]}),l})(),At=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-header-tmp",""]]}),l})(),Dt=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-footer-tmp",""]]}),l})(),Xe=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-notfound-tmp",""]]}),l})(),Re=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-typetosearch-tmp",""]]}),l})(),et=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-loadingtext-tmp",""]]}),l})(),tt=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-tag-tmp",""]]}),l})(),nt=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-loadingspinner-tmp",""]]}),l})();function oe(){return"axxxxxxxxxxx".replace(/[x]/g,()=>(16*Math.random()|0).toString(16))}const ee={"\u24b6":"A",\uff21:"A",\u00c0:"A",\u00c1:"A",\u00c2:"A",\u1ea6:"A",\u1ea4:"A",\u1eaa:"A",\u1ea8:"A",\u00c3:"A",\u0100:"A",\u0102:"A",\u1eb0:"A",\u1eae:"A",\u1eb4:"A",\u1eb2:"A",\u0226:"A",\u01e0:"A",\u00c4:"A",\u01de:"A",\u1ea2:"A",\u00c5:"A",\u01fa:"A",\u01cd:"A",\u0200:"A",\u0202:"A",\u1ea0:"A",\u1eac:"A",\u1eb6:"A",\u1e00:"A",\u0104:"A",\u023a:"A",\u2c6f:"A",\ua732:"AA",\u00c6:"AE",\u01fc:"AE",\u01e2:"AE",\ua734:"AO",\ua736:"AU",\ua738:"AV",\ua73a:"AV",\ua73c:"AY","\u24b7":"B",\uff22:"B",\u1e02:"B",\u1e04:"B",\u1e06:"B",\u0243:"B",\u0182:"B",\u0181:"B","\u24b8":"C",\uff23:"C",\u0106:"C",\u0108:"C",\u010a:"C",\u010c:"C",\u00c7:"C",\u1e08:"C",\u0187:"C",\u023b:"C",\ua73e:"C","\u24b9":"D",\uff24:"D",\u1e0a:"D",\u010e:"D",\u1e0c:"D",\u1e10:"D",\u1e12:"D",\u1e0e:"D",\u0110:"D",\u018b:"D",\u018a:"D",\u0189:"D",\ua779:"D",\u01f1:"DZ",\u01c4:"DZ",\u01f2:"Dz",\u01c5:"Dz","\u24ba":"E",\uff25:"E",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u1ec0:"E",\u1ebe:"E",\u1ec4:"E",\u1ec2:"E",\u1ebc:"E",\u0112:"E",\u1e14:"E",\u1e16:"E",\u0114:"E",\u0116:"E",\u00cb:"E",\u1eba:"E",\u011a:"E",\u0204:"E",\u0206:"E",\u1eb8:"E",\u1ec6:"E",\u0228:"E",\u1e1c:"E",\u0118:"E",\u1e18:"E",\u1e1a:"E",\u0190:"E",\u018e:"E","\u24bb":"F",\uff26:"F",\u1e1e:"F",\u0191:"F",\ua77b:"F","\u24bc":"G",\uff27:"G",\u01f4:"G",\u011c:"G",\u1e20:"G",\u011e:"G",\u0120:"G",\u01e6:"G",\u0122:"G",\u01e4:"G",\u0193:"G",\ua7a0:"G",\ua77d:"G",\ua77e:"G","\u24bd":"H",\uff28:"H",\u0124:"H",\u1e22:"H",\u1e26:"H",\u021e:"H",\u1e24:"H",\u1e28:"H",\u1e2a:"H",\u0126:"H",\u2c67:"H",\u2c75:"H",\ua78d:"H","\u24be":"I",\uff29:"I",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u0128:"I",\u012a:"I",\u012c:"I",\u0130:"I",\u00cf:"I",\u1e2e:"I",\u1ec8:"I",\u01cf:"I",\u0208:"I",\u020a:"I",\u1eca:"I",\u012e:"I",\u1e2c:"I",\u0197:"I","\u24bf":"J",\uff2a:"J",\u0134:"J",\u0248:"J","\u24c0":"K",\uff2b:"K",\u1e30:"K",\u01e8:"K",\u1e32:"K",\u0136:"K",\u1e34:"K",\u0198:"K",\u2c69:"K",\ua740:"K",\ua742:"K",\ua744:"K",\ua7a2:"K","\u24c1":"L",\uff2c:"L",\u013f:"L",\u0139:"L",\u013d:"L",\u1e36:"L",\u1e38:"L",\u013b:"L",\u1e3c:"L",\u1e3a:"L",\u0141:"L",\u023d:"L",\u2c62:"L",\u2c60:"L",\ua748:"L",\ua746:"L",\ua780:"L",\u01c7:"LJ",\u01c8:"Lj","\u24c2":"M",\uff2d:"M",\u1e3e:"M",\u1e40:"M",\u1e42:"M",\u2c6e:"M",\u019c:"M","\u24c3":"N",\uff2e:"N",\u01f8:"N",\u0143:"N",\u00d1:"N",\u1e44:"N",\u0147:"N",\u1e46:"N",\u0145:"N",\u1e4a:"N",\u1e48:"N",\u0220:"N",\u019d:"N",\ua790:"N",\ua7a4:"N",\u01ca:"NJ",\u01cb:"Nj","\u24c4":"O",\uff2f:"O",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u1ed2:"O",\u1ed0:"O",\u1ed6:"O",\u1ed4:"O",\u00d5:"O",\u1e4c:"O",\u022c:"O",\u1e4e:"O",\u014c:"O",\u1e50:"O",\u1e52:"O",\u014e:"O",\u022e:"O",\u0230:"O",\u00d6:"O",\u022a:"O",\u1ece:"O",\u0150:"O",\u01d1:"O",\u020c:"O",\u020e:"O",\u01a0:"O",\u1edc:"O",\u1eda:"O",\u1ee0:"O",\u1ede:"O",\u1ee2:"O",\u1ecc:"O",\u1ed8:"O",\u01ea:"O",\u01ec:"O",\u00d8:"O",\u01fe:"O",\u0186:"O",\u019f:"O",\ua74a:"O",\ua74c:"O",\u01a2:"OI",\ua74e:"OO",\u0222:"OU","\u24c5":"P",\uff30:"P",\u1e54:"P",\u1e56:"P",\u01a4:"P",\u2c63:"P",\ua750:"P",\ua752:"P",\ua754:"P","\u24c6":"Q",\uff31:"Q",\ua756:"Q",\ua758:"Q",\u024a:"Q","\u24c7":"R",\uff32:"R",\u0154:"R",\u1e58:"R",\u0158:"R",\u0210:"R",\u0212:"R",\u1e5a:"R",\u1e5c:"R",\u0156:"R",\u1e5e:"R",\u024c:"R",\u2c64:"R",\ua75a:"R",\ua7a6:"R",\ua782:"R","\u24c8":"S",\uff33:"S",\u1e9e:"S",\u015a:"S",\u1e64:"S",\u015c:"S",\u1e60:"S",\u0160:"S",\u1e66:"S",\u1e62:"S",\u1e68:"S",\u0218:"S",\u015e:"S",\u2c7e:"S",\ua7a8:"S",\ua784:"S","\u24c9":"T",\uff34:"T",\u1e6a:"T",\u0164:"T",\u1e6c:"T",\u021a:"T",\u0162:"T",\u1e70:"T",\u1e6e:"T",\u0166:"T",\u01ac:"T",\u01ae:"T",\u023e:"T",\ua786:"T",\ua728:"TZ","\u24ca":"U",\uff35:"U",\u00d9:"U",\u00da:"U",\u00db:"U",\u0168:"U",\u1e78:"U",\u016a:"U",\u1e7a:"U",\u016c:"U",\u00dc:"U",\u01db:"U",\u01d7:"U",\u01d5:"U",\u01d9:"U",\u1ee6:"U",\u016e:"U",\u0170:"U",\u01d3:"U",\u0214:"U",\u0216:"U",\u01af:"U",\u1eea:"U",\u1ee8:"U",\u1eee:"U",\u1eec:"U",\u1ef0:"U",\u1ee4:"U",\u1e72:"U",\u0172:"U",\u1e76:"U",\u1e74:"U",\u0244:"U","\u24cb":"V",\uff36:"V",\u1e7c:"V",\u1e7e:"V",\u01b2:"V",\ua75e:"V",\u0245:"V",\ua760:"VY","\u24cc":"W",\uff37:"W",\u1e80:"W",\u1e82:"W",\u0174:"W",\u1e86:"W",\u1e84:"W",\u1e88:"W",\u2c72:"W","\u24cd":"X",\uff38:"X",\u1e8a:"X",\u1e8c:"X","\u24ce":"Y",\uff39:"Y",\u1ef2:"Y",\u00dd:"Y",\u0176:"Y",\u1ef8:"Y",\u0232:"Y",\u1e8e:"Y",\u0178:"Y",\u1ef6:"Y",\u1ef4:"Y",\u01b3:"Y",\u024e:"Y",\u1efe:"Y","\u24cf":"Z",\uff3a:"Z",\u0179:"Z",\u1e90:"Z",\u017b:"Z",\u017d:"Z",\u1e92:"Z",\u1e94:"Z",\u01b5:"Z",\u0224:"Z",\u2c7f:"Z",\u2c6b:"Z",\ua762:"Z","\u24d0":"a",\uff41:"a",\u1e9a:"a",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u1ea7:"a",\u1ea5:"a",\u1eab:"a",\u1ea9:"a",\u00e3:"a",\u0101:"a",\u0103:"a",\u1eb1:"a",\u1eaf:"a",\u1eb5:"a",\u1eb3:"a",\u0227:"a",\u01e1:"a",\u00e4:"a",\u01df:"a",\u1ea3:"a",\u00e5:"a",\u01fb:"a",\u01ce:"a",\u0201:"a",\u0203:"a",\u1ea1:"a",\u1ead:"a",\u1eb7:"a",\u1e01:"a",\u0105:"a",\u2c65:"a",\u0250:"a",\ua733:"aa",\u00e6:"ae",\u01fd:"ae",\u01e3:"ae",\ua735:"ao",\ua737:"au",\ua739:"av",\ua73b:"av",\ua73d:"ay","\u24d1":"b",\uff42:"b",\u1e03:"b",\u1e05:"b",\u1e07:"b",\u0180:"b",\u0183:"b",\u0253:"b","\u24d2":"c",\uff43:"c",\u0107:"c",\u0109:"c",\u010b:"c",\u010d:"c",\u00e7:"c",\u1e09:"c",\u0188:"c",\u023c:"c",\ua73f:"c",\u2184:"c","\u24d3":"d",\uff44:"d",\u1e0b:"d",\u010f:"d",\u1e0d:"d",\u1e11:"d",\u1e13:"d",\u1e0f:"d",\u0111:"d",\u018c:"d",\u0256:"d",\u0257:"d",\ua77a:"d",\u01f3:"dz",\u01c6:"dz","\u24d4":"e",\uff45:"e",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u1ec1:"e",\u1ebf:"e",\u1ec5:"e",\u1ec3:"e",\u1ebd:"e",\u0113:"e",\u1e15:"e",\u1e17:"e",\u0115:"e",\u0117:"e",\u00eb:"e",\u1ebb:"e",\u011b:"e",\u0205:"e",\u0207:"e",\u1eb9:"e",\u1ec7:"e",\u0229:"e",\u1e1d:"e",\u0119:"e",\u1e19:"e",\u1e1b:"e",\u0247:"e",\u025b:"e",\u01dd:"e","\u24d5":"f",\uff46:"f",\u1e1f:"f",\u0192:"f",\ua77c:"f","\u24d6":"g",\uff47:"g",\u01f5:"g",\u011d:"g",\u1e21:"g",\u011f:"g",\u0121:"g",\u01e7:"g",\u0123:"g",\u01e5:"g",\u0260:"g",\ua7a1:"g",\u1d79:"g",\ua77f:"g","\u24d7":"h",\uff48:"h",\u0125:"h",\u1e23:"h",\u1e27:"h",\u021f:"h",\u1e25:"h",\u1e29:"h",\u1e2b:"h",\u1e96:"h",\u0127:"h",\u2c68:"h",\u2c76:"h",\u0265:"h",\u0195:"hv","\u24d8":"i",\uff49:"i",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u0129:"i",\u012b:"i",\u012d:"i",\u00ef:"i",\u1e2f:"i",\u1ec9:"i",\u01d0:"i",\u0209:"i",\u020b:"i",\u1ecb:"i",\u012f:"i",\u1e2d:"i",\u0268:"i",\u0131:"i","\u24d9":"j",\uff4a:"j",\u0135:"j",\u01f0:"j",\u0249:"j","\u24da":"k",\uff4b:"k",\u1e31:"k",\u01e9:"k",\u1e33:"k",\u0137:"k",\u1e35:"k",\u0199:"k",\u2c6a:"k",\ua741:"k",\ua743:"k",\ua745:"k",\ua7a3:"k","\u24db":"l",\uff4c:"l",\u0140:"l",\u013a:"l",\u013e:"l",\u1e37:"l",\u1e39:"l",\u013c:"l",\u1e3d:"l",\u1e3b:"l",\u017f:"l",\u0142:"l",\u019a:"l",\u026b:"l",\u2c61:"l",\ua749:"l",\ua781:"l",\ua747:"l",\u01c9:"lj","\u24dc":"m",\uff4d:"m",\u1e3f:"m",\u1e41:"m",\u1e43:"m",\u0271:"m",\u026f:"m","\u24dd":"n",\uff4e:"n",\u01f9:"n",\u0144:"n",\u00f1:"n",\u1e45:"n",\u0148:"n",\u1e47:"n",\u0146:"n",\u1e4b:"n",\u1e49:"n",\u019e:"n",\u0272:"n",\u0149:"n",\ua791:"n",\ua7a5:"n",\u01cc:"nj","\u24de":"o",\uff4f:"o",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u1ed3:"o",\u1ed1:"o",\u1ed7:"o",\u1ed5:"o",\u00f5:"o",\u1e4d:"o",\u022d:"o",\u1e4f:"o",\u014d:"o",\u1e51:"o",\u1e53:"o",\u014f:"o",\u022f:"o",\u0231:"o",\u00f6:"o",\u022b:"o",\u1ecf:"o",\u0151:"o",\u01d2:"o",\u020d:"o",\u020f:"o",\u01a1:"o",\u1edd:"o",\u1edb:"o",\u1ee1:"o",\u1edf:"o",\u1ee3:"o",\u1ecd:"o",\u1ed9:"o",\u01eb:"o",\u01ed:"o",\u00f8:"o",\u01ff:"o",\u0254:"o",\ua74b:"o",\ua74d:"o",\u0275:"o",\u01a3:"oi",\u0223:"ou",\ua74f:"oo","\u24df":"p",\uff50:"p",\u1e55:"p",\u1e57:"p",\u01a5:"p",\u1d7d:"p",\ua751:"p",\ua753:"p",\ua755:"p","\u24e0":"q",\uff51:"q",\u024b:"q",\ua757:"q",\ua759:"q","\u24e1":"r",\uff52:"r",\u0155:"r",\u1e59:"r",\u0159:"r",\u0211:"r",\u0213:"r",\u1e5b:"r",\u1e5d:"r",\u0157:"r",\u1e5f:"r",\u024d:"r",\u027d:"r",\ua75b:"r",\ua7a7:"r",\ua783:"r","\u24e2":"s",\uff53:"s",\u00df:"s",\u015b:"s",\u1e65:"s",\u015d:"s",\u1e61:"s",\u0161:"s",\u1e67:"s",\u1e63:"s",\u1e69:"s",\u0219:"s",\u015f:"s",\u023f:"s",\ua7a9:"s",\ua785:"s",\u1e9b:"s","\u24e3":"t",\uff54:"t",\u1e6b:"t",\u1e97:"t",\u0165:"t",\u1e6d:"t",\u021b:"t",\u0163:"t",\u1e71:"t",\u1e6f:"t",\u0167:"t",\u01ad:"t",\u0288:"t",\u2c66:"t",\ua787:"t",\ua729:"tz","\u24e4":"u",\uff55:"u",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u0169:"u",\u1e79:"u",\u016b:"u",\u1e7b:"u",\u016d:"u",\u00fc:"u",\u01dc:"u",\u01d8:"u",\u01d6:"u",\u01da:"u",\u1ee7:"u",\u016f:"u",\u0171:"u",\u01d4:"u",\u0215:"u",\u0217:"u",\u01b0:"u",\u1eeb:"u",\u1ee9:"u",\u1eef:"u",\u1eed:"u",\u1ef1:"u",\u1ee5:"u",\u1e73:"u",\u0173:"u",\u1e77:"u",\u1e75:"u",\u0289:"u","\u24e5":"v",\uff56:"v",\u1e7d:"v",\u1e7f:"v",\u028b:"v",\ua75f:"v",\u028c:"v",\ua761:"vy","\u24e6":"w",\uff57:"w",\u1e81:"w",\u1e83:"w",\u0175:"w",\u1e87:"w",\u1e85:"w",\u1e98:"w",\u1e89:"w",\u2c73:"w","\u24e7":"x",\uff58:"x",\u1e8b:"x",\u1e8d:"x","\u24e8":"y",\uff59:"y",\u1ef3:"y",\u00fd:"y",\u0177:"y",\u1ef9:"y",\u0233:"y",\u1e8f:"y",\u00ff:"y",\u1ef7:"y",\u1e99:"y",\u1ef5:"y",\u01b4:"y",\u024f:"y",\u1eff:"y","\u24e9":"z",\uff5a:"z",\u017a:"z",\u1e91:"z",\u017c:"z",\u017e:"z",\u1e93:"z",\u1e95:"z",\u01b6:"z",\u0225:"z",\u0240:"z",\u2c6c:"z",\ua763:"z",\u0386:"\u0391",\u0388:"\u0395",\u0389:"\u0397",\u038a:"\u0399",\u03aa:"\u0399",\u038c:"\u039f",\u038e:"\u03a5",\u03ab:"\u03a5",\u038f:"\u03a9",\u03ac:"\u03b1",\u03ad:"\u03b5",\u03ae:"\u03b7",\u03af:"\u03b9",\u03ca:"\u03b9",\u0390:"\u03b9",\u03cc:"\u03bf",\u03cd:"\u03c5",\u03cb:"\u03c5",\u03b0:"\u03c5",\u03c9:"\u03c9",\u03c2:"\u03c3"};function K(l){return l.replace(/[^\u0000-\u007E]/g,i=>ee[i]||i)}class Q{constructor(a,i){this._ngSelect=a,this._selectionModel=i,this._items=[],this._filteredItems=[],this._markedIndex=-1}get items(){return this._items}get filteredItems(){return this._filteredItems}get markedIndex(){return this._markedIndex}get selectedItems(){return this._selectionModel.value}get markedItem(){return this._filteredItems[this._markedIndex]}get noItemsToSelect(){return this._ngSelect.hideSelected&&this._items.length===this.selectedItems.length}get maxItemsSelected(){return this._ngSelect.multiple&&this._ngSelect.maxSelectedItems<=this.selectedItems.length}get lastSelectedItem(){let a=this.selectedItems.length-1;for(;a>=0;a--){const i=this.selectedItems[a];if(!i.disabled)return i}return null}setItems(a){this._items=a.map((i,o)=>this.mapItem(i,o)),this._ngSelect.groupBy?(this._groups=this._groupBy(this._items,this._ngSelect.groupBy),this._items=this._flatten(this._groups)):(this._groups=new Map,this._groups.set(void 0,this._items)),this._filteredItems=[...this._items]}select(a){if(a.selected||this.maxItemsSelected)return;const i=this._ngSelect.multiple;i||this.clearSelected(),this._selectionModel.select(a,i,this._ngSelect.selectableGroupAsModel),this._ngSelect.hideSelected&&this._hideSelected(a)}unselect(a){a.selected&&(this._selectionModel.unselect(a,this._ngSelect.multiple),this._ngSelect.hideSelected&&I(a.index)&&this._ngSelect.multiple&&this._showSelected(a))}findItem(a){let i;return i=this._ngSelect.compareWith?o=>this._ngSelect.compareWith(o.value,a):this._ngSelect.bindValue?o=>!o.children&&this.resolveNested(o.value,this._ngSelect.bindValue)===a:o=>o.value===a||!o.children&&o.label&&o.label===this.resolveNested(a,this._ngSelect.bindLabel),this._items.find(o=>i(o))}addItem(a){const i=this.mapItem(a,this._items.length);return this._items.push(i),this._filteredItems.push(i),i}clearSelected(a=!1){this._selectionModel.clear(a),this._items.forEach(i=>{i.selected=a&&i.selected&&i.disabled,i.marked=!1}),this._ngSelect.hideSelected&&this.resetFilteredItems()}findByLabel(a){return a=K(a).toLocaleLowerCase(),this.filteredItems.find(i=>K(i.label).toLocaleLowerCase().substr(0,a.length)===a)}filter(a){if(!a)return void this.resetFilteredItems();this._filteredItems=[],a=this._ngSelect.searchFn?a:K(a).toLocaleLowerCase();const i=this._ngSelect.searchFn||this._defaultSearchFn,o=this._ngSelect.hideSelected;for(const u of Array.from(this._groups.keys())){const d=[];for(const h of this._groups.get(u))o&&(h.parent&&h.parent.selected||h.selected)||i(a,this._ngSelect.searchFn?h.value:h)&&d.push(h);if(d.length>0){const[h]=d.slice(-1);if(h.parent){const M=this._items.find(k=>k===h.parent);this._filteredItems.push(M)}this._filteredItems.push(...d)}}}resetFilteredItems(){this._filteredItems.length!==this._items.length&&(this._filteredItems=this._ngSelect.hideSelected&&this.selectedItems.length>0?this._items.filter(a=>!a.selected):this._items)}unmarkItem(){this._markedIndex=-1}markNextItem(){this._stepToItem(1)}markPreviousItem(){this._stepToItem(-1)}markItem(a){this._markedIndex=this._filteredItems.indexOf(a)}markSelectedOrDefault(a){if(0===this._filteredItems.length)return;const i=this._getLastMarkedIndex();this._markedIndex=i>-1?i:a?this.filteredItems.findIndex(o=>!o.disabled):-1}resolveNested(a,i){if(!X(a))return a;if(-1===i.indexOf("."))return a[i];{const o=i.split(".");let u=a;for(let d=0,h=o.length;d<h;++d){if(null==u)return null;u=u[o[d]]}return u}}mapItem(a,i){const o=I(a.$ngOptionLabel)?a.$ngOptionLabel:this.resolveNested(a,this._ngSelect.bindLabel),u=I(a.$ngOptionValue)?a.$ngOptionValue:a;return{index:i,label:I(o)?o.toString():"",value:u,disabled:a.disabled,htmlId:`${this._ngSelect.dropdownId}-${i}`}}mapSelectedItems(){const a=this._ngSelect.multiple;for(const i of this.selectedItems){const o=this._ngSelect.bindValue?this.resolveNested(i.value,this._ngSelect.bindValue):i.value,u=I(o)?this.findItem(o):null;this._selectionModel.unselect(i,a),this._selectionModel.select(u||i,a,this._ngSelect.selectableGroupAsModel)}this._ngSelect.hideSelected&&(this._filteredItems=this.filteredItems.filter(i=>-1===this.selectedItems.indexOf(i)))}_showSelected(a){if(this._filteredItems.push(a),a.parent){const i=a.parent;this._filteredItems.find(u=>u===i)||this._filteredItems.push(i)}else if(a.children)for(const i of a.children)i.selected=!1,this._filteredItems.push(i);this._filteredItems=[...this._filteredItems.sort((i,o)=>i.index-o.index)]}_hideSelected(a){this._filteredItems=this._filteredItems.filter(i=>i!==a),a.parent?a.parent.children.every(o=>o.selected)&&(this._filteredItems=this._filteredItems.filter(o=>o!==a.parent)):a.children&&(this._filteredItems=this.filteredItems.filter(i=>i.parent!==a))}_defaultSearchFn(a,i){return K(i.label).toLocaleLowerCase().indexOf(a)>-1}_getNextItemIndex(a){return a>0?this._markedIndex>=this._filteredItems.length-1?0:this._markedIndex+1:this._markedIndex<=0?this._filteredItems.length-1:this._markedIndex-1}_stepToItem(a){0===this._filteredItems.length||this._filteredItems.every(i=>i.disabled)||(this._markedIndex=this._getNextItemIndex(a),this.markedItem.disabled&&this._stepToItem(a))}_getLastMarkedIndex(){if(this._ngSelect.hideSelected||this._markedIndex>-1&&void 0===this.markedItem)return-1;const a=this._filteredItems.indexOf(this.lastSelectedItem);return this.lastSelectedItem&&a<0?-1:Math.max(this.markedIndex,a)}_groupBy(a,i){const o=new Map;if(0===a.length)return o;if(Array.isArray(a[0].value[i])){for(const h of a){const M=(h.value[i]||[]).map((k,B)=>this.mapItem(k,B));o.set(h,M)}return o}const u=re(this._ngSelect.groupBy),d=h=>{const M=u?i(h.value):h.value[i];return I(M)?M:void 0};for(const h of a){const M=d(h),k=o.get(M);k?k.push(h):o.set(M,[h])}return o}_flatten(a){const i=re(this._ngSelect.groupBy),o=[];for(const u of Array.from(a.keys())){let d=o.length;if(void 0===u){const Y=a.get(void 0)||[];o.push(...Y.map(U=>(U.index=d++,U)));continue}const h=X(u),M={label:h?"":String(u),children:void 0,parent:null,index:d++,disabled:!this._ngSelect.selectableGroup,htmlId:oe()},k=i?this._ngSelect.bindLabel:this._ngSelect.groupBy,B=this._ngSelect.groupValue||(()=>h?u.value:{[k]:u}),z=a.get(u).map(Y=>(Y.parent=M,Y.children=void 0,Y.index=d++,Y));M.children=z,M.value=B(u,z.map(Y=>Y.value)),o.push(M),o.push(...z)}return o}}var R=(()=>{return(l=R||(R={}))[l.Tab=9]="Tab",l[l.Enter=13]="Enter",l[l.Esc=27]="Esc",l[l.Space=32]="Space",l[l.ArrowUp=38]="ArrowUp",l[l.ArrowDown=40]="ArrowDown",l[l.Backspace=8]="Backspace",R;var l})();let le=(()=>{class l{constructor(){this._dimensions={itemHeight:0,panelHeight:0,itemsPerViewport:0}}get dimensions(){return this._dimensions}calculateItems(i,o,u){const d=this._dimensions,h=d.itemHeight*o,k=Math.max(0,i)/h*o;let B=Math.min(o,Math.ceil(k)+(d.itemsPerViewport+1));const Y=Math.max(0,B-d.itemsPerViewport);let U=Math.min(Y,Math.floor(k)),ae=d.itemHeight*Math.ceil(U)-d.itemHeight*Math.min(U,u);return ae=isNaN(ae)?0:ae,U=isNaN(U)?-1:U,B=isNaN(B)?-1:B,U-=u,U=Math.max(0,U),B+=u,B=Math.min(o,B),{topPadding:ae,scrollHeight:h,start:U,end:B}}setDimensions(i,o){const u=Math.max(1,Math.floor(o/i));this._dimensions={itemHeight:i,panelHeight:o,itemsPerViewport:u}}getScrollTo(i,o,u){const{panelHeight:d}=this.dimensions,h=i+o,k=u+d;return d>=h&&u===i?null:h>k?u+h-k:i<=u?i:null}}return l.\u0275fac=function(i){return new(i||l)},l.\u0275prov=e.Yz7({token:l,factory:l.\u0275fac}),l})();const He=["top","right","bottom","left"],me=typeof requestAnimationFrame<"u"?m.Z:T.E;let Ue=(()=>{class l{constructor(i,o,u,d,h){this._renderer=i,this._zone=o,this._panelService=u,this._document=h,this.items=[],this.position="auto",this.virtualScroll=!1,this.filterValue=null,this.update=new e.vpe,this.scroll=new e.vpe,this.scrollToEnd=new e.vpe,this.outsideClick=new e.vpe,this._destroy$=new b.x,this._scrollToEndFired=!1,this._updateScrollHeight=!1,this._lastScrollPosition=0,this._dropdown=d.nativeElement}get currentPosition(){return this._currentPosition}get itemsLength(){return this._itemsLength}set itemsLength(i){i!==this._itemsLength&&(this._itemsLength=i,this._onItemsLengthChanged())}get _startOffset(){if(this.markedItem){const{itemHeight:i,panelHeight:o}=this._panelService.dimensions,u=this.markedItem.index*i;return o>u?0:u}return 0}ngOnInit(){this._select=this._dropdown.parentElement,this._virtualPadding=this.paddingElementRef.nativeElement,this._scrollablePanel=this.scrollElementRef.nativeElement,this._contentPanel=this.contentElementRef.nativeElement,this._handleScroll(),this._handleOutsideClick(),this._appendDropdown(),this._setupMousedownListener()}ngOnChanges(i){if(i.items){const o=i.items;this._onItemsChange(o.currentValue,o.firstChange)}}ngOnDestroy(){this._destroy$.next(),this._destroy$.complete(),this._destroy$.unsubscribe(),this.appendTo&&this._renderer.removeChild(this._dropdown.parentNode,this._dropdown)}scrollTo(i,o=!1){if(!i)return;const u=this.items.indexOf(i);if(u<0||u>=this.itemsLength)return;let d;if(this.virtualScroll){const h=this._panelService.dimensions.itemHeight;d=this._panelService.getScrollTo(u*h,h,this._lastScrollPosition)}else{const h=this._dropdown.querySelector(`#${i.htmlId}`);d=this._panelService.getScrollTo(h.offsetTop,h.clientHeight,o?h.offsetTop:this._lastScrollPosition)}I(d)&&(this._scrollablePanel.scrollTop=d)}scrollToTag(){const i=this._scrollablePanel;i.scrollTop=i.scrollHeight-i.clientHeight}adjustPosition(){this._updateYPosition()}_handleDropdownPosition(){this._currentPosition=this._calculateCurrentPosition(this._dropdown),He.includes(this._currentPosition)?this._updateDropdownClass(this._currentPosition):this._updateDropdownClass("bottom"),this.appendTo&&this._updateYPosition(),this._dropdown.style.opacity="1"}_updateDropdownClass(i){He.forEach(u=>{const d=`ng-select-${u}`;this._renderer.removeClass(this._dropdown,d),this._renderer.removeClass(this._select,d)});const o=`ng-select-${i}`;this._renderer.addClass(this._dropdown,o),this._renderer.addClass(this._select,o)}_handleScroll(){this._zone.runOutsideAngular(()=>{(0,O.R)(this.scrollElementRef.nativeElement,"scroll").pipe((0,w.R)(this._destroy$),(0,x.e)(0,me)).subscribe(i=>{const o=i.path||i.composedPath&&i.composedPath();this._onContentScrolled(o&&0!==o.length?o[0].scrollTop:i.target.scrollTop)})})}_handleOutsideClick(){this._document&&this._zone.runOutsideAngular(()=>{(0,N.T)((0,O.R)(this._document,"touchstart",{capture:!0}),(0,O.R)(this._document,"mousedown",{capture:!0})).pipe((0,w.R)(this._destroy$)).subscribe(i=>this._checkToClose(i))})}_checkToClose(i){if(this._select.contains(i.target)||this._dropdown.contains(i.target))return;const o=i.path||i.composedPath&&i.composedPath();i.target&&i.target.shadowRoot&&o&&o[0]&&this._select.contains(o[0])||this._zone.run(()=>this.outsideClick.emit())}_onItemsChange(i,o){this.items=i||[],this._scrollToEndFired=!1,this.itemsLength=i.length,this.virtualScroll?this._updateItemsRange(o):(this._setVirtualHeight(),this._updateItems(o))}_updateItems(i){this.update.emit(this.items),!1!==i&&this._zone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this._panelService.setDimensions(0,this._scrollablePanel.clientHeight),this._handleDropdownPosition(),this.scrollTo(this.markedItem,i)})})}_updateItemsRange(i){this._zone.runOutsideAngular(()=>{this._measureDimensions().then(()=>{i?(this._renderItemsRange(this._startOffset),this._handleDropdownPosition()):this._renderItemsRange()})})}_onContentScrolled(i){this.virtualScroll&&this._renderItemsRange(i),this._lastScrollPosition=i,this._fireScrollToEnd(i)}_updateVirtualHeight(i){this._updateScrollHeight&&(this._virtualPadding.style.height=`${i}px`,this._updateScrollHeight=!1)}_setVirtualHeight(){this._virtualPadding&&(this._virtualPadding.style.height="0px")}_onItemsLengthChanged(){this._updateScrollHeight=!0}_renderItemsRange(i=null){if(i&&this._lastScrollPosition===i)return;const o=this._panelService.calculateItems(i=i||this._scrollablePanel.scrollTop,this.itemsLength,this.bufferAmount);this._updateVirtualHeight(o.scrollHeight),this._contentPanel.style.transform=`translateY(${o.topPadding}px)`,this._zone.run(()=>{this.update.emit(this.items.slice(o.start,o.end)),this.scroll.emit({start:o.start,end:o.end})}),I(i)&&0===this._lastScrollPosition&&(this._scrollablePanel.scrollTop=i,this._lastScrollPosition=i)}_measureDimensions(){if(this._panelService.dimensions.itemHeight>0||0===this.itemsLength)return Promise.resolve(this._panelService.dimensions);const[i]=this.items;return this.update.emit([i]),Promise.resolve().then(()=>{const u=this._dropdown.querySelector(`#${i.htmlId}`).clientHeight;return this._virtualPadding.style.height=u*this.itemsLength+"px",this._panelService.setDimensions(u,this._scrollablePanel.clientHeight),this._panelService.dimensions})}_fireScrollToEnd(i){this._scrollToEndFired||0===i||i+this._dropdown.clientHeight>=(this.virtualScroll?this._virtualPadding:this._contentPanel).clientHeight-1&&(this._zone.run(()=>this.scrollToEnd.emit()),this._scrollToEndFired=!0)}_calculateCurrentPosition(i){if("auto"!==this.position)return this.position;const o=this._select.getBoundingClientRect(),u=document.documentElement.scrollTop||document.body.scrollTop;return o.top+window.pageYOffset+o.height+i.getBoundingClientRect().height>u+document.documentElement.clientHeight?"top":"bottom"}_appendDropdown(){if(this.appendTo){if(this._parent=document.querySelector(this.appendTo),!this._parent)throw new Error(`appendTo selector ${this.appendTo} did not found any parent element`);this._updateXPosition(),this._parent.appendChild(this._dropdown)}}_updateXPosition(){const i=this._select.getBoundingClientRect(),o=this._parent.getBoundingClientRect();this._dropdown.style.left=i.left-o.left+"px",this._dropdown.style.width=i.width+"px",this._dropdown.style.minWidth=i.width+"px"}_updateYPosition(){const i=this._select.getBoundingClientRect(),o=this._parent.getBoundingClientRect(),u=i.height;"top"===this._currentPosition?(this._dropdown.style.bottom=o.bottom-i.bottom+u+"px",this._dropdown.style.top="auto"):"bottom"===this._currentPosition&&(this._dropdown.style.top=i.top-o.top+u+"px",this._dropdown.style.bottom="auto")}_setupMousedownListener(){this._zone.runOutsideAngular(()=>{(0,O.R)(this._dropdown,"mousedown").pipe((0,w.R)(this._destroy$)).subscribe(i=>{"INPUT"!==i.target.tagName&&i.preventDefault()})})}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Qsj),e.Y36(e.R0b),e.Y36(le),e.Y36(e.SBq),e.Y36(v.K0,8))},l.\u0275cmp=e.Xpm({type:l,selectors:[["ng-dropdown-panel"]],viewQuery:function(i,o){if(1&i&&(e.Gf(D,7,e.SBq),e.Gf(g,7,e.SBq),e.Gf(y,7,e.SBq)),2&i){let u;e.iGM(u=e.CRH())&&(o.contentElementRef=u.first),e.iGM(u=e.CRH())&&(o.scrollElementRef=u.first),e.iGM(u=e.CRH())&&(o.paddingElementRef=u.first)}},inputs:{items:"items",markedItem:"markedItem",position:"position",appendTo:"appendTo",bufferAmount:"bufferAmount",virtualScroll:"virtualScroll",headerTemplate:"headerTemplate",footerTemplate:"footerTemplate",filterValue:"filterValue"},outputs:{update:"update",scroll:"scroll",scrollToEnd:"scrollToEnd",outsideClick:"outsideClick"},features:[e.TTD],ngContentSelectors:q,decls:9,vars:6,consts:[["class","ng-dropdown-header",4,"ngIf"],[1,"ng-dropdown-panel-items","scroll-host"],["scroll",""],["padding",""],["content",""],["class","ng-dropdown-footer",4,"ngIf"],[1,"ng-dropdown-header"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"ng-dropdown-footer"]],template:function(i,o){1&i&&(e.F$t(),e.YNc(0,H,2,4,"div",0),e.TgZ(1,"div",1,2),e._UZ(3,"div",null,3),e.TgZ(5,"div",null,4),e.Hsn(7),e.qZA()(),e.YNc(8,j,2,4,"div",5)),2&i&&(e.Q6J("ngIf",o.headerTemplate),e.xp6(3),e.ekj("total-padding",o.virtualScroll),e.xp6(2),e.ekj("scrollable-content",o.virtualScroll&&o.items.length),e.xp6(3),e.Q6J("ngIf",o.footerTemplate))},dependencies:[v.O5,v.tP],encapsulation:2,changeDetection:0}),l})(),te=(()=>{class l{constructor(i){this.elementRef=i,this.stateChange$=new b.x,this._disabled=!1}get disabled(){return this._disabled}set disabled(i){this._disabled=this._isDisabled(i)}get label(){return(this.elementRef.nativeElement.textContent||"").trim()}ngOnChanges(i){i.disabled&&this.stateChange$.next({value:this.value,disabled:this._disabled})}ngAfterViewChecked(){this.label!==this._previousLabel&&(this._previousLabel=this.label,this.stateChange$.next({value:this.value,disabled:this._disabled,label:this.elementRef.nativeElement.innerHTML}))}ngOnDestroy(){this.stateChange$.complete()}_isDisabled(i){return null!=i&&"false"!=`${i}`}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.SBq))},l.\u0275cmp=e.Xpm({type:l,selectors:[["ng-option"]],inputs:{value:"value",disabled:"disabled"},features:[e.TTD],ngContentSelectors:q,decls:1,vars:0,template:function(i,o){1&i&&(e.F$t(),e.Hsn(0))},encapsulation:2,changeDetection:0}),l})(),Ye=(()=>{class l{constructor(){this.notFoundText="No items found",this.typeToSearchText="Type to search",this.addTagText="Add item",this.loadingText="Loading...",this.clearAllText="Clear all",this.disableVirtualScroll=!0,this.openOnEnter=!0,this.appearance="underline"}}return l.\u0275fac=function(i){return new(i||l)},l.\u0275prov=e.Yz7({token:l,factory:l.\u0275fac,providedIn:"root"}),l})(),je=(()=>{class l{warn(i){console.warn(i)}}return l.\u0275fac=function(i){return new(i||l)},l.\u0275prov=e.Yz7({token:l,factory:l.\u0275fac,providedIn:"root"}),l})();const ge=new e.OlP("ng-select-selection-model");let fe=(()=>{class l{constructor(i,o,u,d,h,M,k){this.classes=i,this.autoFocus=o,this.config=u,this._cd=M,this._console=k,this.markFirst=!0,this.dropdownPosition="auto",this.loading=!1,this.closeOnSelect=!0,this.hideSelected=!1,this.selectOnTab=!1,this.bufferAmount=4,this.selectableGroup=!1,this.selectableGroupAsModel=!0,this.searchFn=null,this.trackByFn=null,this.clearOnBackspace=!0,this.labelForId=null,this.inputAttrs={},this.readonly=!1,this.searchWhileComposing=!0,this.minTermLength=0,this.editableSearchTerm=!1,this.keyDownFn=B=>!0,this.multiple=!1,this.addTag=!1,this.searchable=!0,this.clearable=!0,this.isOpen=!1,this.blurEvent=new e.vpe,this.focusEvent=new e.vpe,this.changeEvent=new e.vpe,this.openEvent=new e.vpe,this.closeEvent=new e.vpe,this.searchEvent=new e.vpe,this.clearEvent=new e.vpe,this.addEvent=new e.vpe,this.removeEvent=new e.vpe,this.scroll=new e.vpe,this.scrollToEnd=new e.vpe,this.useDefaultClass=!0,this.viewPortItems=[],this.searchTerm=null,this.dropdownId=oe(),this.escapeHTML=!0,this._items=[],this._defaultLabel="label",this._pressedKeys=[],this._isComposing=!1,this._destroy$=new b.x,this._keyPress$=new b.x,this._onChange=B=>{},this._onTouched=()=>{},this.clearItem=B=>{const z=this.selectedItems.find(Y=>Y.value===B);this.unselect(z)},this.trackByOption=(B,z)=>this.trackByFn?this.trackByFn(z.value):z,this._mergeGlobalConfig(u),this.itemsList=new Q(this,d()),this.element=h.nativeElement}get items(){return this._items}set items(i){null===i&&(i=[]),this._itemsAreUsed=!0,this._items=i}get compareWith(){return this._compareWith}set compareWith(i){if(null!=i&&!re(i))throw Error("`compareWith` must be a function.");this._compareWith=i}get clearSearchOnAdd(){return I(this._clearSearchOnAdd)?this._clearSearchOnAdd:I(this.config.clearSearchOnAdd)?this.config.clearSearchOnAdd:this.closeOnSelect}set clearSearchOnAdd(i){this._clearSearchOnAdd=i}get disabled(){return this.readonly||this._disabled}get filtered(){return!!this.searchTerm&&this.searchable||this._isComposing}get single(){return!this.multiple}get _editableSearchTerm(){return this.editableSearchTerm&&!this.multiple}get selectedItems(){return this.itemsList.selectedItems}get selectedValues(){return this.selectedItems.map(i=>i.value)}get hasValue(){return this.selectedItems.length>0}get currentPanelPosition(){if(this.dropdownPanel)return this.dropdownPanel.currentPosition}ngOnInit(){this._handleKeyPresses(),this._setInputAttributes()}ngOnChanges(i){i.multiple&&this.itemsList.clearSelected(),i.items&&this._setItems(i.items.currentValue||[]),i.isOpen&&(this._manualOpen=I(i.isOpen.currentValue))}ngAfterViewInit(){this._itemsAreUsed||(this.escapeHTML=!1,this._setItemsFromNgOptions()),I(this.autoFocus)&&this.focus()}ngOnDestroy(){this._destroy$.next(),this._destroy$.complete()}handleKeyDown(i){if(R[i.which]){if(!1===this.keyDownFn(i))return;this.handleKeyCode(i)}else i.key&&1===i.key.length&&this._keyPress$.next(i.key.toLocaleLowerCase())}handleKeyCode(i){switch(i.which){case R.ArrowDown:this._handleArrowDown(i);break;case R.ArrowUp:this._handleArrowUp(i);break;case R.Space:this._handleSpace(i);break;case R.Enter:this._handleEnter(i);break;case R.Tab:this._handleTab(i);break;case R.Esc:this.close(),i.preventDefault();break;case R.Backspace:this._handleBackspace()}}handleMousedown(i){const o=i.target;"INPUT"!==o.tagName&&i.preventDefault(),o.classList.contains("ng-clear-wrapper")?this.handleClearClick():o.classList.contains("ng-arrow-wrapper")?this.handleArrowClick():o.classList.contains("ng-value-icon")||(this.focused||this.focus(),this.searchable?this.open():this.toggle())}handleArrowClick(){this.isOpen?this.close():this.open()}handleClearClick(){this.hasValue&&(this.itemsList.clearSelected(!0),this._updateNgModel()),this._clearSearch(),this.focus(),this.clearEvent.emit(),this._onSelectionChanged()}clearModel(){this.clearable&&(this.itemsList.clearSelected(),this._updateNgModel())}writeValue(i){this.itemsList.clearSelected(),this._handleWriteValue(i),this._cd.markForCheck()}registerOnChange(i){this._onChange=i}registerOnTouched(i){this._onTouched=i}setDisabledState(i){this._disabled=i,this._cd.markForCheck()}toggle(){this.isOpen?this.close():this.open()}open(){this.disabled||this.isOpen||this._manualOpen||!this._isTypeahead&&!this.addTag&&this.itemsList.noItemsToSelect||(this.isOpen=!0,this.itemsList.markSelectedOrDefault(this.markFirst),this.openEvent.emit(),this.searchTerm||this.focus(),this.detectChanges())}close(){!this.isOpen||this._manualOpen||(this.isOpen=!1,this._isComposing=!1,this._editableSearchTerm?this.itemsList.resetFilteredItems():this._clearSearch(),this.itemsList.unmarkItem(),this._onTouched(),this.closeEvent.emit(),this._cd.markForCheck())}toggleItem(i){!i||i.disabled||this.disabled||(this.multiple&&i.selected?this.unselect(i):this.select(i),this._editableSearchTerm&&this._setSearchTermFromItems(),this._onSelectionChanged())}select(i){i.selected||(this.itemsList.select(i),this.clearSearchOnAdd&&!this._editableSearchTerm&&this._clearSearch(),this._updateNgModel(),this.multiple&&this.addEvent.emit(i.value)),(this.closeOnSelect||this.itemsList.noItemsToSelect)&&this.close()}focus(){this.searchInput.nativeElement.focus()}blur(){this.searchInput.nativeElement.blur()}unselect(i){i&&(this.itemsList.unselect(i),this.focus(),this._updateNgModel(),this.removeEvent.emit(i))}selectTag(){let i;i=re(this.addTag)?this.addTag(this.searchTerm):this._primitive?this.searchTerm:{[this.bindLabel]:this.searchTerm};const o=u=>this._isTypeahead||!this.isOpen?this.itemsList.mapItem(u,null):this.itemsList.addItem(u);!function pe(l){return l instanceof Promise}(i)?i&&this.select(o(i)):i.then(u=>this.select(o(u))).catch(()=>{})}showClear(){return this.clearable&&(this.hasValue||this.searchTerm)&&!this.disabled}get showAddTag(){if(!this._validTerm)return!1;const i=this.searchTerm.toLowerCase().trim();return this.addTag&&!this.itemsList.filteredItems.some(o=>o.label.toLowerCase()===i)&&(!this.hideSelected&&this.isOpen||!this.selectedItems.some(o=>o.label.toLowerCase()===i))&&!this.loading}showNoItemsFound(){const i=0===this.itemsList.filteredItems.length;return(i&&!this._isTypeahead&&!this.loading||i&&this._isTypeahead&&this._validTerm&&!this.loading)&&!this.showAddTag}showTypeToSearch(){return 0===this.itemsList.filteredItems.length&&this._isTypeahead&&!this._validTerm&&!this.loading}onCompositionStart(){this._isComposing=!0}onCompositionEnd(i){this._isComposing=!1,!this.searchWhileComposing&&this.filter(i)}filter(i){this._isComposing&&!this.searchWhileComposing||(this.searchTerm=i,this._isTypeahead&&(this._validTerm||0===this.minTermLength)&&this.typeahead.next(i),this._isTypeahead||(this.itemsList.filter(this.searchTerm),this.isOpen&&this.itemsList.markSelectedOrDefault(this.markFirst)),this.searchEvent.emit({term:i,items:this.itemsList.filteredItems.map(o=>o.value)}),this.open())}onInputFocus(i){this.focused||(this._editableSearchTerm&&this._setSearchTermFromItems(),this.element.classList.add("ng-select-focused"),this.focusEvent.emit(i),this.focused=!0)}onInputBlur(i){this.element.classList.remove("ng-select-focused"),this.blurEvent.emit(i),!this.isOpen&&!this.disabled&&this._onTouched(),this._editableSearchTerm&&this._setSearchTermFromItems(),this.focused=!1}onItemHover(i){i.disabled||this.itemsList.markItem(i)}detectChanges(){this._cd.destroyed||this._cd.detectChanges()}_setSearchTermFromItems(){const i=this.selectedItems&&this.selectedItems[0];this.searchTerm=i&&i.label||null}_setItems(i){const o=i[0];this.bindLabel=this.bindLabel||this._defaultLabel,this._primitive=I(o)?!X(o):this._primitive||this.bindLabel===this._defaultLabel,this.itemsList.setItems(i),i.length>0&&this.hasValue&&this.itemsList.mapSelectedItems(),this.isOpen&&I(this.searchTerm)&&!this._isTypeahead&&this.itemsList.filter(this.searchTerm),(this._isTypeahead||this.isOpen)&&this.itemsList.markSelectedOrDefault(this.markFirst)}_setItemsFromNgOptions(){const i=u=>{this.items=u.map(d=>({$ngOptionValue:d.value,$ngOptionLabel:d.elementRef.nativeElement.innerHTML,disabled:d.disabled})),this.itemsList.setItems(this.items),this.hasValue&&this.itemsList.mapSelectedItems(),this.detectChanges()},o=()=>{const u=(0,N.T)(this.ngOptions.changes,this._destroy$);(0,N.T)(...this.ngOptions.map(d=>d.stateChange$)).pipe((0,w.R)(u)).subscribe(d=>{const h=this.itemsList.findItem(d.value);h.disabled=d.disabled,h.label=d.label||h.label,this._cd.detectChanges()})};this.ngOptions.changes.pipe((0,_.O)(this.ngOptions),(0,w.R)(this._destroy$)).subscribe(u=>{this.bindLabel=this._defaultLabel,i(u),o()})}_isValidWriteValue(i){if(!I(i)||this.multiple&&""===i||Array.isArray(i)&&0===i.length)return!1;const o=u=>!(!I(this.compareWith)&&X(u)&&this.bindValue&&(this._console.warn(`Setting object(${JSON.stringify(u)}) as your model with bindValue is not allowed unless [compareWith] is used.`),1));return this.multiple?Array.isArray(i)?i.every(u=>o(u)):(this._console.warn("Multiple select ngModel should be array."),!1):o(i)}_handleWriteValue(i){if(!this._isValidWriteValue(i))return;const o=u=>{let d=this.itemsList.findItem(u);if(d)this.itemsList.select(d);else{const h=X(u);h||!h&&!this.bindValue?this.itemsList.select(this.itemsList.mapItem(u,null)):this.bindValue&&(d={[this.bindLabel]:null,[this.bindValue]:u},this.itemsList.select(this.itemsList.mapItem(d,null)))}};this.multiple?i.forEach(u=>o(u)):o(i)}_handleKeyPresses(){this.searchable||this._keyPress$.pipe((0,w.R)(this._destroy$),(0,F.b)(i=>this._pressedKeys.push(i)),(0,V.b)(200),(0,C.h)(()=>this._pressedKeys.length>0),(0,S.U)(()=>this._pressedKeys.join(""))).subscribe(i=>{const o=this.itemsList.findByLabel(i);o&&(this.isOpen?(this.itemsList.markItem(o),this._scrollToMarked(),this._cd.markForCheck()):this.select(o)),this._pressedKeys=[]})}_setInputAttributes(){const i=this.searchInput.nativeElement,o={type:"text",autocorrect:"off",autocapitalize:"off",autocomplete:this.labelForId?"off":this.dropdownId,...this.inputAttrs};for(const u of Object.keys(o))i.setAttribute(u,o[u])}_updateNgModel(){const i=[];for(const u of this.selectedItems)if(this.bindValue){let d=null;d=u.children?u.value[(this.groupValue?this.bindValue:this.groupBy)||this.groupBy]:this.itemsList.resolveNested(u.value,this.bindValue),i.push(d)}else i.push(u.value);const o=this.selectedItems.map(u=>u.value);this.multiple?(this._onChange(i),this.changeEvent.emit(o)):(this._onChange(I(i[0])?i[0]:null),this.changeEvent.emit(o[0])),this._cd.markForCheck()}_clearSearch(){this.searchTerm&&(this._changeSearch(null),this.itemsList.resetFilteredItems())}_changeSearch(i){this.searchTerm=i,this._isTypeahead&&this.typeahead.next(i)}_scrollToMarked(){!this.isOpen||!this.dropdownPanel||this.dropdownPanel.scrollTo(this.itemsList.markedItem)}_scrollToTag(){!this.isOpen||!this.dropdownPanel||this.dropdownPanel.scrollToTag()}_onSelectionChanged(){this.isOpen&&this.multiple&&this.appendTo&&(this._cd.detectChanges(),this.dropdownPanel.adjustPosition())}_handleTab(i){!1===this.isOpen&&!this.addTag||(this.selectOnTab?this.itemsList.markedItem?(this.toggleItem(this.itemsList.markedItem),i.preventDefault()):this.showAddTag?(this.selectTag(),i.preventDefault()):this.close():this.close())}_handleEnter(i){if(this.isOpen||this._manualOpen)this.itemsList.markedItem?this.toggleItem(this.itemsList.markedItem):this.showAddTag&&this.selectTag();else{if(!this.openOnEnter)return;this.open()}i.preventDefault()}_handleSpace(i){this.isOpen||this._manualOpen||(this.open(),i.preventDefault())}_handleArrowDown(i){this._nextItemIsTag(1)?(this.itemsList.unmarkItem(),this._scrollToTag()):(this.itemsList.markNextItem(),this._scrollToMarked()),this.open(),i.preventDefault()}_handleArrowUp(i){this.isOpen&&(this._nextItemIsTag(-1)?(this.itemsList.unmarkItem(),this._scrollToTag()):(this.itemsList.markPreviousItem(),this._scrollToMarked()),i.preventDefault())}_nextItemIsTag(i){const o=this.itemsList.markedIndex+i;return this.addTag&&this.searchTerm&&this.itemsList.markedItem&&(o<0||o===this.itemsList.filteredItems.length)}_handleBackspace(){this.searchTerm||!this.clearable||!this.clearOnBackspace||!this.hasValue||(this.multiple?this.unselect(this.itemsList.lastSelectedItem):this.clearModel())}get _isTypeahead(){return this.typeahead&&this.typeahead.observers.length>0}get _validTerm(){const i=this.searchTerm&&this.searchTerm.trim();return i&&i.length>=this.minTermLength}_mergeGlobalConfig(i){this.placeholder=this.placeholder||i.placeholder,this.notFoundText=this.notFoundText||i.notFoundText,this.typeToSearchText=this.typeToSearchText||i.typeToSearchText,this.addTagText=this.addTagText||i.addTagText,this.loadingText=this.loadingText||i.loadingText,this.clearAllText=this.clearAllText||i.clearAllText,this.virtualScroll=I(this.virtualScroll)?this.virtualScroll:!!I(i.disableVirtualScroll)&&!i.disableVirtualScroll,this.openOnEnter=I(this.openOnEnter)?this.openOnEnter:i.openOnEnter,this.appendTo=this.appendTo||i.appendTo,this.bindValue=this.bindValue||i.bindValue,this.bindLabel=this.bindLabel||i.bindLabel,this.appearance=this.appearance||i.appearance}}return l.\u0275fac=function(i){return new(i||l)(e.$8M("class"),e.$8M("autofocus"),e.Y36(Ye),e.Y36(ge),e.Y36(e.SBq),e.Y36(e.sBO),e.Y36(je))},l.\u0275cmp=e.Xpm({type:l,selectors:[["ng-select"]],contentQueries:function(i,o,u){if(1&i&&(e.Suo(u,Qe,5,e.Rgc),e.Suo(u,yt,5,e.Rgc),e.Suo(u,Ct,5,e.Rgc),e.Suo(u,Et,5,e.Rgc),e.Suo(u,At,5,e.Rgc),e.Suo(u,Dt,5,e.Rgc),e.Suo(u,Xe,5,e.Rgc),e.Suo(u,Re,5,e.Rgc),e.Suo(u,et,5,e.Rgc),e.Suo(u,tt,5,e.Rgc),e.Suo(u,nt,5,e.Rgc),e.Suo(u,te,5)),2&i){let d;e.iGM(d=e.CRH())&&(o.optionTemplate=d.first),e.iGM(d=e.CRH())&&(o.optgroupTemplate=d.first),e.iGM(d=e.CRH())&&(o.labelTemplate=d.first),e.iGM(d=e.CRH())&&(o.multiLabelTemplate=d.first),e.iGM(d=e.CRH())&&(o.headerTemplate=d.first),e.iGM(d=e.CRH())&&(o.footerTemplate=d.first),e.iGM(d=e.CRH())&&(o.notFoundTemplate=d.first),e.iGM(d=e.CRH())&&(o.typeToSearchTemplate=d.first),e.iGM(d=e.CRH())&&(o.loadingTextTemplate=d.first),e.iGM(d=e.CRH())&&(o.tagTemplate=d.first),e.iGM(d=e.CRH())&&(o.loadingSpinnerTemplate=d.first),e.iGM(d=e.CRH())&&(o.ngOptions=d)}},viewQuery:function(i,o){if(1&i&&(e.Gf(Ue,5),e.Gf(J,7)),2&i){let u;e.iGM(u=e.CRH())&&(o.dropdownPanel=u.first),e.iGM(u=e.CRH())&&(o.searchInput=u.first)}},hostVars:20,hostBindings:function(i,o){1&i&&e.NdJ("keydown",function(d){return o.handleKeyDown(d)}),2&i&&e.ekj("ng-select-typeahead",o.typeahead)("ng-select-multiple",o.multiple)("ng-select-taggable",o.addTag)("ng-select-searchable",o.searchable)("ng-select-clearable",o.clearable)("ng-select-opened",o.isOpen)("ng-select",o.useDefaultClass)("ng-select-disabled",o.disabled)("ng-select-filtered",o.filtered)("ng-select-single",o.single)},inputs:{bindLabel:"bindLabel",bindValue:"bindValue",markFirst:"markFirst",placeholder:"placeholder",notFoundText:"notFoundText",typeToSearchText:"typeToSearchText",addTagText:"addTagText",loadingText:"loadingText",clearAllText:"clearAllText",appearance:"appearance",dropdownPosition:"dropdownPosition",appendTo:"appendTo",loading:"loading",closeOnSelect:"closeOnSelect",hideSelected:"hideSelected",selectOnTab:"selectOnTab",openOnEnter:"openOnEnter",maxSelectedItems:"maxSelectedItems",groupBy:"groupBy",groupValue:"groupValue",bufferAmount:"bufferAmount",virtualScroll:"virtualScroll",selectableGroup:"selectableGroup",selectableGroupAsModel:"selectableGroupAsModel",searchFn:"searchFn",trackByFn:"trackByFn",clearOnBackspace:"clearOnBackspace",labelForId:"labelForId",inputAttrs:"inputAttrs",tabIndex:"tabIndex",readonly:"readonly",searchWhileComposing:"searchWhileComposing",minTermLength:"minTermLength",editableSearchTerm:"editableSearchTerm",keyDownFn:"keyDownFn",typeahead:"typeahead",multiple:"multiple",addTag:"addTag",searchable:"searchable",clearable:"clearable",isOpen:"isOpen",items:"items",compareWith:"compareWith",clearSearchOnAdd:"clearSearchOnAdd"},outputs:{blurEvent:"blur",focusEvent:"focus",changeEvent:"change",openEvent:"open",closeEvent:"close",searchEvent:"search",clearEvent:"clear",addEvent:"add",removeEvent:"remove",scroll:"scroll",scrollToEnd:"scrollToEnd"},features:[e._Bn([{provide:E.JU,useExisting:(0,e.Gpc)(()=>l),multi:!0},le]),e.TTD],decls:14,vars:19,consts:[[1,"ng-select-container",3,"mousedown"],[1,"ng-value-container"],[1,"ng-placeholder"],[4,"ngIf"],["role","combobox","aria-haspopup","listbox",1,"ng-input"],["aria-autocomplete","list",3,"readOnly","disabled","value","input","compositionstart","compositionend","focus","blur","change"],["searchInput",""],["class","ng-clear-wrapper",3,"title",4,"ngIf"],[1,"ng-arrow-wrapper"],[1,"ng-arrow"],["class","ng-dropdown-panel","role","listbox","aria-label","Options list",3,"virtualScroll","bufferAmount","appendTo","position","headerTemplate","footerTemplate","filterValue","items","markedItem","ng-select-multiple","ngClass","id","update","scroll","scrollToEnd","outsideClick",4,"ngIf"],["class","ng-value",3,"ng-value-disabled",4,"ngFor","ngForOf","ngForTrackBy"],[1,"ng-value"],["defaultLabelTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["aria-hidden","true",1,"ng-value-icon","left",3,"click"],[1,"ng-value-label",3,"ngItemLabel","escape"],["defaultLoadingSpinnerTemplate",""],[3,"ngTemplateOutlet"],[1,"ng-spinner-loader"],[1,"ng-clear-wrapper",3,"title"],["aria-hidden","true",1,"ng-clear"],["role","listbox","aria-label","Options list",1,"ng-dropdown-panel",3,"virtualScroll","bufferAmount","appendTo","position","headerTemplate","footerTemplate","filterValue","items","markedItem","ngClass","id","update","scroll","scrollToEnd","outsideClick"],["class","ng-option",3,"ng-option-disabled","ng-option-selected","ng-optgroup","ng-option","ng-option-child","ng-option-marked","click","mouseover",4,"ngFor","ngForOf","ngForTrackBy"],["class","ng-option","role","option",3,"ng-option-marked","mouseover","click",4,"ngIf"],[1,"ng-option",3,"click","mouseover"],["defaultOptionTemplate",""],[1,"ng-option-label",3,"ngItemLabel","escape"],["role","option",1,"ng-option",3,"mouseover","click"],["defaultTagTemplate",""],[1,"ng-tag-label"],["defaultNotFoundTemplate",""],[1,"ng-option","ng-option-disabled"],["defaultTypeToSearchTemplate",""],["defaultLoadingTextTemplate",""]],template:function(i,o){if(1&i){const u=e.EpF();e.TgZ(0,"div",0),e.NdJ("mousedown",function(h){return o.handleMousedown(h)}),e.TgZ(1,"div",1)(2,"div",2),e._uU(3),e.qZA(),e.YNc(4,Ae,2,2,"ng-container",3),e.YNc(5,be,1,5,null,3),e.TgZ(6,"div",4)(7,"input",5,6),e.NdJ("input",function(){e.CHM(u);const h=e.MAs(8);return e.KtG(o.filter(h.value))})("compositionstart",function(){return o.onCompositionStart()})("compositionend",function(){e.CHM(u);const h=e.MAs(8);return e.KtG(o.onCompositionEnd(h.value))})("focus",function(h){return o.onInputFocus(h)})("blur",function(h){return o.onInputBlur(h)})("change",function(h){return h.stopPropagation()}),e.qZA()()(),e.YNc(9,Ve,4,1,"ng-container",3),e.YNc(10,Ze,3,1,"span",7),e.TgZ(11,"span",8),e._UZ(12,"span",9),e.qZA()(),e.YNc(13,_t,7,19,"ng-dropdown-panel",10)}2&i&&(e.ekj("ng-appearance-outline","outline"===o.appearance)("ng-has-value",o.hasValue),e.xp6(3),e.Oqu(o.placeholder),e.xp6(1),e.Q6J("ngIf",(!o.multiLabelTemplate||!o.multiple)&&o.selectedItems.length>0),e.xp6(1),e.Q6J("ngIf",o.multiple&&o.multiLabelTemplate&&o.selectedValues.length>0),e.xp6(1),e.uIk("aria-expanded",o.isOpen)("aria-owns",o.isOpen?o.dropdownId:null),e.xp6(1),e.Q6J("readOnly",!o.searchable||o.itemsList.maxItemsSelected)("disabled",o.disabled)("value",o.searchTerm?o.searchTerm:""),e.uIk("id",o.labelForId)("tabindex",o.tabIndex)("aria-activedescendant",o.isOpen?null==o.itemsList||null==o.itemsList.markedItem?null:o.itemsList.markedItem.htmlId:null)("aria-controls",o.isOpen?o.dropdownId:null),e.xp6(2),e.Q6J("ngIf",o.loading),e.xp6(1),e.Q6J("ngIf",o.showClear()),e.xp6(3),e.Q6J("ngIf",o.isOpen))},dependencies:[v.mk,v.sg,v.O5,v.tP,Ue,vt],styles:['@charset "UTF-8";.ng-select{position:relative;display:block;box-sizing:border-box}.ng-select div,.ng-select input,.ng-select span{box-sizing:border-box}.ng-select [hidden]{display:none}.ng-select.ng-select-searchable .ng-select-container .ng-value-container .ng-input{opacity:1}.ng-select.ng-select-opened .ng-select-container{z-index:1001}.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-placeholder,.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-value{-webkit-user-select:none;user-select:none;cursor:default}.ng-select.ng-select-disabled .ng-arrow-wrapper{cursor:default}.ng-select.ng-select-filtered .ng-placeholder{display:none}.ng-select .ng-select-container{cursor:default;display:flex;outline:none;overflow:hidden;position:relative;width:100%}.ng-select .ng-select-container .ng-value-container{display:flex;flex:1}.ng-select .ng-select-container .ng-value-container .ng-input{opacity:0}.ng-select .ng-select-container .ng-value-container .ng-input>input{box-sizing:content-box;background:none transparent;border:0 none;box-shadow:none;outline:none;padding:0;cursor:default;width:100%}.ng-select .ng-select-container .ng-value-container .ng-input>input::-ms-clear{display:none}.ng-select .ng-select-container .ng-value-container .ng-input>input[readonly]{-webkit-user-select:none;user-select:none;width:0;padding:0}.ng-select.ng-select-single.ng-select-filtered .ng-select-container .ng-value-container .ng-value{visibility:hidden}.ng-select.ng-select-single .ng-select-container .ng-value-container,.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{position:absolute;left:0;width:100%}.ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container{flex-wrap:wrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{position:absolute}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{white-space:nowrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{cursor:pointer}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{flex:1;z-index:2}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{z-index:1}.ng-select .ng-clear-wrapper{cursor:pointer;position:relative;width:17px;-webkit-user-select:none;user-select:none}.ng-select .ng-clear-wrapper .ng-clear{display:inline-block;font-size:18px;line-height:1;pointer-events:none}.ng-select .ng-spinner-loader{border-radius:50%;width:17px;height:17px;margin-right:5px;font-size:10px;position:relative;text-indent:-9999em;border-top:2px solid rgba(66,66,66,.2);border-right:2px solid rgba(66,66,66,.2);border-bottom:2px solid rgba(66,66,66,.2);border-left:2px solid #424242;transform:translateZ(0);animation:load8 .8s infinite linear}.ng-select .ng-spinner-loader:after{border-radius:50%;width:17px;height:17px}@keyframes load8{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ng-select .ng-arrow-wrapper{cursor:pointer;position:relative;text-align:center;-webkit-user-select:none;user-select:none}.ng-select .ng-arrow-wrapper .ng-arrow{pointer-events:none;display:inline-block;height:0;width:0;position:relative}.ng-dropdown-panel{box-sizing:border-box;position:absolute;opacity:0;width:100%;z-index:1050;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .ng-dropdown-panel-items{display:block;height:auto;box-sizing:border-box;max-height:240px;overflow-y:auto}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option{box-sizing:border-box;cursor:pointer;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-option-label:empty:before{content:"\\200b"}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .highlighted{font-weight:700;text-decoration:underline}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.disabled{cursor:default}.ng-dropdown-panel .scroll-host{overflow:hidden;overflow-y:auto;position:relative;display:block;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .scrollable-content{top:0;left:0;width:100%;height:100%;position:absolute}.ng-dropdown-panel .total-padding{width:1px;opacity:0}\n'],encapsulation:2,changeDetection:0}),l})();function bt(){return new Tt}class Tt{constructor(){this._selected=[]}get value(){return this._selected}select(a,i,o){if(a.selected=!0,(!a.children||!i&&o)&&this._selected.push(a),i)if(a.parent){const u=a.parent.children.length,d=a.parent.children.filter(h=>h.selected).length;a.parent.selected=u===d}else a.children&&(this._setChildrenSelectedState(a.children,!0),this._removeChildren(a),this._selected=o&&this._activeChildren(a)?[...this._selected.filter(u=>u.parent!==a),a]:[...this._selected,...a.children.filter(u=>!u.disabled)])}unselect(a,i){if(this._selected=this._selected.filter(o=>o!==a),a.selected=!1,i)if(a.parent&&a.parent.selected){const o=a.parent.children;this._removeParent(a.parent),this._removeChildren(a.parent),this._selected.push(...o.filter(u=>u!==a&&!u.disabled)),a.parent.selected=!1}else a.children&&(this._setChildrenSelectedState(a.children,!1),this._removeChildren(a))}clear(a){this._selected=a?this._selected.filter(i=>i.disabled):[]}_setChildrenSelectedState(a,i){for(const o of a)o.disabled||(o.selected=i)}_removeChildren(a){this._selected=[...this._selected.filter(i=>i.parent!==a),...a.children.filter(i=>i.parent===a&&i.disabled&&i.selected)]}_removeParent(a){this._selected=this._selected.filter(i=>i!==a)}_activeChildren(a){return a.children.every(i=>!i.disabled||i.selected)}}let it=(()=>{class l{}return l.\u0275fac=function(i){return new(i||l)},l.\u0275mod=e.oAB({type:l}),l.\u0275inj=e.cJS({providers:[{provide:ge,useValue:bt}],imports:[v.ez]}),l})()}}]);
|