marketplacepos 3.10.1 → 3.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/{chunk-QOGXVEGW.js → chunk-223SSA62.js} +1 -1
- package/Marketplace/{chunk-FTHNPPXM.js → chunk-2HHCA3NK.js} +1 -1
- package/Marketplace/{chunk-V3UGRPNZ.js → chunk-2OVWEFCG.js} +1 -1
- package/Marketplace/{chunk-P24WVMWI.js → chunk-2TS2HEE6.js} +1 -1
- package/Marketplace/{chunk-RONMO7FE.js → chunk-3ZPC3DOZ.js} +1 -1
- package/Marketplace/{chunk-IWREFJGX.js → chunk-4R2X6SN5.js} +1 -1
- package/Marketplace/{chunk-36GAH775.js → chunk-5VJQDJRJ.js} +1 -1
- package/Marketplace/{chunk-H57B7P7N.js → chunk-6C4L2S7S.js} +1 -1
- package/Marketplace/{chunk-JUI6EOAN.js → chunk-6NGKE364.js} +1 -1
- package/Marketplace/{chunk-BFNB4J5W.js → chunk-6ORTAB6O.js} +1 -1
- package/Marketplace/{chunk-CNKB33H4.js → chunk-7C4NOK37.js} +1 -1
- package/Marketplace/{chunk-A2WAKRJC.js → chunk-7RZLTDIS.js} +1 -1
- package/Marketplace/{chunk-UCVQS5HR.js → chunk-B6BTNEL5.js} +1 -1
- package/Marketplace/{chunk-MWO3MHRT.js → chunk-C6SMFVRJ.js} +1 -1
- package/Marketplace/{chunk-L35RXBHK.js → chunk-CCMD33HH.js} +1 -1
- package/Marketplace/{chunk-7NZIFRTH.js → chunk-CD5AKGA4.js} +1 -1
- package/Marketplace/{chunk-C3TFPYXX.js → chunk-DDXVCGNF.js} +1 -1
- package/Marketplace/{chunk-QUSBGNEW.js → chunk-DG6KCZ24.js} +1 -1
- package/Marketplace/{chunk-BJBDPG47.js → chunk-DITYFI3U.js} +1 -1
- package/Marketplace/{chunk-C7TRF3SY.js → chunk-EJMJP3AQ.js} +2 -2
- package/Marketplace/{chunk-DHJDNOMM.js → chunk-FGIAQ42H.js} +1 -1
- package/Marketplace/{chunk-LDMABSVE.js → chunk-G7RXTLDR.js} +1 -1
- package/Marketplace/{chunk-Z5U5IBQC.js → chunk-GK4USVUZ.js} +1 -1
- package/Marketplace/{chunk-3CF7HOB3.js → chunk-GRHKW2KQ.js} +1 -1
- package/Marketplace/{chunk-F7TBBOWO.js → chunk-H6M6M4LW.js} +1 -1
- package/Marketplace/{chunk-ODAO6UI4.js → chunk-I2G5J34U.js} +1 -1
- package/Marketplace/{chunk-NIH5QHYK.js → chunk-JN7U2QOU.js} +1 -1
- package/Marketplace/{chunk-JJPZKFSE.js → chunk-L3QJXWW4.js} +1 -1
- package/Marketplace/{chunk-WZCMEPBS.js → chunk-LPSC67EP.js} +1 -1
- package/Marketplace/{chunk-QZFQKQ7J.js → chunk-M4MZ4PBS.js} +1 -1
- package/Marketplace/{chunk-CNCAKULD.js → chunk-MB5EFAFQ.js} +1 -1
- package/Marketplace/{chunk-XDLTNTVT.js → chunk-MFWCFDSI.js} +1 -1
- package/Marketplace/{chunk-PLNXC7LP.js → chunk-MIITW5F3.js} +1 -1
- package/Marketplace/{chunk-GR67GFTL.js → chunk-MQ5YF2EQ.js} +1 -1
- package/Marketplace/{chunk-Z3NC34XH.js → chunk-NNZ2QIAF.js} +1 -1
- package/Marketplace/{chunk-GTSE6GZT.js → chunk-NX7MGO3M.js} +1 -1
- package/Marketplace/{chunk-LDGVYQDZ.js → chunk-NZ5PGMTU.js} +1 -1
- package/Marketplace/chunk-OZAOB2RM.js +1 -0
- package/Marketplace/{chunk-VXL3UMDN.js → chunk-PHYOU4H6.js} +1 -1
- package/Marketplace/{chunk-2RIYYO3I.js → chunk-PIKZDDIU.js} +1 -1
- package/Marketplace/{chunk-ZDNNLDAI.js → chunk-POHGR6GW.js} +1 -1
- package/Marketplace/{chunk-6GF6XSWZ.js → chunk-RS4FBR2B.js} +1 -1
- package/Marketplace/{chunk-OM4EEQPS.js → chunk-RTSSYFK3.js} +1 -1
- package/Marketplace/{chunk-ZQYW374F.js → chunk-TZRTEOJA.js} +1 -1
- package/Marketplace/{chunk-JJLMXJYI.js → chunk-UYBYAC3J.js} +1 -1
- package/Marketplace/{chunk-52UFYFEM.js → chunk-UZO2VDKA.js} +1 -1
- package/Marketplace/chunk-V3BUL62F.js +1 -0
- package/Marketplace/{chunk-F5ZJBCUU.js → chunk-V6IO53G5.js} +1 -1
- package/Marketplace/{chunk-5PIRWI5F.js → chunk-VA2Y75VY.js} +1 -1
- package/Marketplace/{chunk-OIUZMXWP.js → chunk-VGBWD4JQ.js} +1 -1
- package/Marketplace/{chunk-F2X2FB6J.js → chunk-VWCDA6IC.js} +1 -1
- package/Marketplace/{chunk-OIV2KTCZ.js → chunk-WKWDPKZH.js} +1 -1
- package/Marketplace/{chunk-WIQODYPX.js → chunk-WTRYN5E5.js} +1 -1
- package/Marketplace/{chunk-XB2UHCVJ.js → chunk-XT3VATZ2.js} +1 -1
- package/Marketplace/{chunk-23SBJKPP.js → chunk-Y3MMZORK.js} +1 -1
- package/Marketplace/{chunk-U53TPHQS.js → chunk-YBOYS5WI.js} +1 -1
- package/Marketplace/{chunk-ODJ4UZGV.js → chunk-Z24AOV6E.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/main-2KHAM5PJ.js +1 -0
- package/Marketplace/{styles-UF4D57IG.css → styles-U2EKFDJI.css} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-LKQ6EHTZ.js +0 -1
- package/Marketplace/chunk-UWJWLXE2.js +0 -1
- package/Marketplace/main-B2USSC5L.js +0 -1
- /package/Marketplace/{chunk-PUBPICPK.js → chunk-NNG6BZAM.js} +0 -0
- /package/Marketplace/{chunk-UWYERBYV.js → chunk-ODLFLX6Z.js} +0 -0
- /package/Marketplace/{chunk-KG5K5AND.js → chunk-SDNS6DZW.js} +0 -0
- /package/Marketplace/{polyfills-UZ2JZAXP.js → polyfills-OPLU3AGL.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as D,b as Ee,c as Pe,d as ae,e as oe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-LDMABSVE.js";import{a as Me}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-ODJ4UZGV.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-UCVQS5HR.js";import{a as Ve,b as De}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-H57B7P7N.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-UWYERBYV.js";import{a as ie}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-Z3NC34XH.js";import{a as ne}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-BFNB4J5W.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-F5ZJBCUU.js";import{a as Ie,b as we}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-3CF7HOB3.js";import{a as Te}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-52UFYFEM.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-ZQYW374F.js";import{a as Ce,b as fe,d as xe,e as ve}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-QOGXVEGW.js";import{a as re}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-QZFQKQ7J.js";import{d as q,k as W}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-C7TRF3SY.js";import{a as H}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-V3UGRPNZ.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-FTHNPPXM.js";import{B as ye,C as te,D as be,q as X,r as Se,u as ee}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-36GAH775.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-C3TFPYXX.js";import{b as ge,c as K,h as Y,k as J,m as Z,u as he}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-XDLTNTVT.js";import{c as V}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-VXL3UMDN.js";import{$a as l,Aa as N,Ac as G,B,Fb as f,Ga as r,Gb as x,Ha as y,Hb as O,Ob as R,Qa as p,Wa as u,X as k,_b as me,aa as $,ab as s,ac as de,bb as v,bc as U,cb as b,db as I,ea as P,ec as j,fa as A,fb as S,fc as _e,hc as z,ic as Q,ja as d,jb as g,ka as _,lb as c,ob as pe,q as se,qb as F,rb as m,sb as E,tb as w,ub as ce,wc as ue,yb as L}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-P24WVMWI.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-PUBPICPK.js";var Ne=(()=>{let o=class o{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"}]}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=P({type:o,selectors:[["app-inventory"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,a){n&1&&(l(0,"nav",0)(1,"div",1)(2,"div"),v(3,"nav-tab",2),s()()(),v(4,"router-outlet")),n&2&&(r(3),p("Tabs",a.inventoryTabs))},dependencies:[ue,Ie]});let i=o;return i})();function Ye(i,o){if(i&1){let e=S();l(0,"button",21),g("click",function(){d(e);let n=c().ngIf,a=c(2);return _(a.onUpdateItems(n))}),v(1,"i",22),m(2," Update "),s()}}function Je(i,o){if(i&1&&(l(0,"actions")(1,"div",19),u(2,Ye,3,0,"button",20),s()()),i&2){let e=o.ngIf,t=c(2);r(2),p("ngIf",t.productService.hasSelectionVariant(e))}}function Ze(i,o){if(i&1){let e=S();l(0,"app-table",23),g("onToggle",function(n){d(e);let a=c(2);return _(a.onShowDifferenceStock(n))})("onSubmit",function(n){let h=d(e).ngIf,C=c(2);return _(C.updateStockByVariant(n,h))}),s()}if(i&2){let e=o.ngIf,t=c(2);p("data",e)("channel",t.channelOptions)("showProductToggle",!0)("filter",t.searchFilter)}}function qe(i,o){if(i&1){let e=S();l(0,"span",24),g("click",function(){d(e);let n=c(2);return _(n.getRowCount())}),l(1,"i",25),m(2,"?"),s()()}}function We(i,o){if(i&1&&(l(0,"span"),m(1),f(2,"number"),s()),i&2){let e=o.ngIf;r(1),E(x(2,1,e))}}function Xe(i,o){if(i&1){let e=S();l(0,"a",26),g("click",function(){d(e);let n=c(2);return _(n.nextPage())}),v(1,"i",27),m(2," Next"),s()}}function et(i,o){if(i&1){let e=S();l(0,"a",28),g("click",function(){d(e);let n=c(2);return _(n.getAllData())}),v(1,"i",29),m(2," Last"),s()}}function tt(i,o){if(i&1){let e=S();l(0,"mainpanel",1),g("onSubmit",function(n){d(e);let a=c();return _(a.onSearch(n))}),u(1,Je,3,1,"actions",2),f(2,"async"),l(3,"filters")(4,"div")(5,"label",3),m(6,"PageNumber"),s(),l(7,"input",4),g("ngModelChange",function(n){d(e);let a=c();return _(a.searchFilter.PageNumber=n)}),s()(),l(8,"div",5)(9,"label",6),m(10,"Page Size"),s(),l(11,"input",7),g("ngModelChange",function(n){d(e);let a=c();return _(a.searchFilter.RowCount=n)}),s()()(),l(12,"content")(13,"div",8)(14,"div",9)(15,"div",10),u(16,Ze,1,4,"app-table",11),f(17,"async"),b(18),l(19,"div",12)(20,"div",13)(21,"div",14),m(22),f(23,"number"),f(24,"async"),u(25,qe,3,0,"span",15)(26,We,3,3,"span",2),f(27,"async"),m(28),s()(),l(29,"div",16),u(30,Xe,3,0,"a",17)(31,et,3,0,"a",18),s()(),I(),s()()()()()}if(i&2){let e=c(),t;p("pageData",e.pageData)("hideSearchBox",!1)("textButton","Search"),r(1),p("ngIf",x(2,13,e.paginationService.data$)),r(6),p("ngModel",e.searchFilter.PageNumber),r(4),p("ngModel",e.searchFilter.RowCount),r(5),p("ngIf",x(17,15,e.paginationService.data$)),r(6),w(" Showing 1 - ",x(23,17,(t=x(24,19,e.paginationService.data$))==null?null:t.length)," of "),r(3),p("ngIf",e.paginationService.hideCount),r(1),p("ngIf",x(27,21,!e.paginationService.hideCount&&e.allDataCount$)),r(2),w(" records ~ ",e.paginationService.footerPageNumber," Page "),r(2),p("ngIf",e.paginationService.disableNextButton&&!e.paginationService.goToLastPage),r(1),p("ngIf",e.paginationService.disableNextButton&&!e.paginationService.goToLastPage)}}var ke=(()=>{let o=class o{constructor(t,n,a,h,C,T){this.http=t,this.toastr=n,this.dialog=a,this.paginationService=h,this.productService=C,this.authService=T,this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.filterTypeOptions=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory/pos",Active:!0},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!1}]},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(k(t=>{t.Filter={PageNumber:t.Filter.PageNumber,filterModel:D.ALL,RowCount:t.Filter.PageSize,HiddenIPOSInventory:t.Filter.HiddenIPOSInventory},this.searchFilter=t.Filter,this.paginationService.reloadPagination(this.searchFilter)}))}onSearch(t){this.searchFilter.text=t,this.paginationService.reloadPagination(this.searchFilter)}updateStock(t,n){let a=this.productService.selectedVariantProduct(t);if(a.length>0){let C=a.map(M=>({ID:M.ID,Code:M.Code,Inventory:M.Inventory}));var h=n.filter(M=>M.selected).map(M=>M.ID);let T={ListChannelID:h,List:C};this.http.post("/api/Inventory/UpdateChannel",T).subscribe(M=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+T.List.length+" variants in "+T.ListChannelID.length+" channels","Success")})}}updateStockByVariant(t,n){let a={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,NewQuantity:parseFloat(t.Inventory),VariantID:t.ID,SKU:t.Sku};this.http.post("/api/Inventory/UpdateQuantityByItem",a).subscribe(h=>{let C=this.productService.findChannelById(a.ID,this.channelOptions);this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") inventory in "+C.Name+" to "+a.NewQuantity,"Success")})}onShowDifferenceStock(t){t?this.searchFilter.filterModel=D.DIFFERENCE:this.searchFilter.filterModel=D.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(t){let n=this.productService.selectedVariantProduct(t);this.dialog.open(Me,{data:{selectedItems:n,channels:JSON.parse(JSON.stringify(this.channelOptions))},width:"600px"}).afterClosed().pipe(B(a=>V.IsNotEmpty(a))).subscribe(a=>{this.updateStock(t,a)})}getRowCount(){this.paginationService.hideCount=!1;let t={text:this.searchFilter.text};this.allDataCount$=this.http.post(`/API/${this.allDataCountEndpoint}`,t)}nextPage(){this.paginationService.onNextPage(this.searchFilter)}getAllData(){this.http.post(`/API/${this.allDataCountEndpoint}`,{}).subscribe({next:t=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,t)}})}ngOnDestroy(){this.paginationService.destroy()}};o.\u0275fac=function(n){return new(n||o)(y(H),y(q),y(ee),y(ie),y(ne),y(W))},o.\u0275cmp=P({type:o,selectors:[["app-multi-channel-comparison"]],decls:2,vars:3,consts:[["headerTitle","Inventory Comparison",3,"pageData","hideSearchBox","textButton","onSubmit",4,"ngIf"],["headerTitle","Inventory Comparison",3,"pageData","hideSearchBox","textButton","onSubmit"],[4,"ngIf"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control","mt-2",3,"ngModel","ngModelChange"],[1,"mt-5"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","mt-2",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["table","inventory",3,"data","channel","showProductToggle","filter","onToggle","onSubmit",4,"ngIf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary border-start-0","title","Load all products",3,"click",4,"ngIf"],[1,"d-flex"],["type","button","class","btn btn-success shadow-sm rounded me-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"data","channel","showProductToggle","filter","onToggle","onSubmit"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(n,a){n&1&&(u(0,tt,32,23,"mainpanel",0),f(1,"async")),n&2&&p("ngIf",x(1,1,a.loader$))},dependencies:[U,K,Z,Y,J,te,ae,X,j,z],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let i=o;return i})();function nt(i,o){if(i&1){let e=S();l(0,"button",39),g("click",function(){d(e);let n=c().ngIf,a=c(2);return _(a.updateStock(n))}),v(1,"i",40),m(2," Update"),s()}}function it(i,o){if(i&1&&(l(0,"div"),u(1,nt,3,0,"button",38),s()),i&2){let e=o.ngIf,t=c(2);r(1),p("ngIf",t.productService.hasSelectionVariant(e))}}function at(i,o){if(i&1&&(l(0,"span",41),v(1,"img",42),s(),m(2)),i&2){let e=o.item;r(1),p("src",e==null?null:e.Img,N),r(1),w(" ",e.Name," ")}}function ot(i,o){i&1&&(l(0,"div",43)(1,"span"),m(2," showing only different stock, please press next to populate more data "),s()())}function lt(i,o){if(i&1){let e=S();l(0,"th")(1,"input",44),g("ngModelChange",function(n){d(e);let a=c(2);return _(a.checkboxState=n)})("ngModelChange",function(){let a=d(e).ngIf,h=c(2);return _(h.onCheckboxStateChange(a))}),s()()}if(i&2){let e=c(2);r(1),p("ngModel",e.checkboxState)}}function rt(i,o){i&1&&(b(0),l(1,"th",45),m(2," Reserved "),s(),I())}function st(i,o){if(i&1){let e=S();b(0),l(1,"input",61),g("ngModelChange",function(n){d(e);let a=c(3).$implicit;return _(a.selected=n)})("ngModelChange",function(){d(e);let n=c(3).$implicit,a=c(2);return _(a.onCheckboxStateProduct(n))}),s(),I()}if(i&2){let e=c(3).$implicit;r(1),p("ngModel",e.selected)}}function pt(i,o){if(i&1){let e=S();b(0),l(1,"img",62),g("click",function(n){d(e);let a=c(3).$implicit,h=c(2);return _(h.onZoomImage(n,a==null?null:a.ImageUrl))}),s(),I()}if(i&2){let e=c(3).$implicit;r(1),pe("src",e==null?null:e.ThumbnailUrl,N)}}function ct(i,o){i&1&&v(0,"img",63)}function mt(i,o){if(i&1&&(b(0),v(1,"br"),l(2,"div",64),v(3,"i",65),l(4,"small"),m(5),s()(),I()),i&2){let e=c(3).$implicit;r(5),w("(",e==null?null:e.Category,")")}}var dt=i=>({"ms-10":i});function _t(i,o){if(i&1&&(b(0),l(1,"td",57)(2,"div",13),u(3,st,2,1,"ng-container",3),l(4,"div",49),u(5,pt,2,1,"ng-container",51)(6,ct,1,0,"ng-template",null,58,R),s()()(),l(8,"td",59)(9,"span",60),m(10),s(),u(11,mt,6,1,"ng-container",3),s(),I()),i&2){let e=F(7),t=c(2).$implicit,n=c(2);r(1),p("rowSpan",t==null?null:t.Variants.length),r(2),p("ngIf",t.Variants.length>1),r(1),p("ngClass",L(8,dt,t.Variants.length<=1)),r(1),p("ngIf",t==null?null:t.ThumbnailUrl)("ngIfElse",e),r(3),p("rowSpan",t==null?null:t.Variants.length),r(2),E(t==null?null:t.Name),r(1),p("ngIf",t.CategoryID!==null&&t.CategoryID!=n.guidEmpty)}}function ut(i,o){if(i&1){let e=S();b(0),l(1,"input",44),g("ngModelChange",function(n){d(e);let a=c(2).$implicit;return _(a.selected=n)}),s(),I()}if(i&2){let e=c(2).$implicit;r(1),p("ngModel",e.selected)}}function gt(i,o){if(i&1&&(b(0),u(1,ut,2,1,"ng-container",3),I()),i&2){let e=c().$implicit;r(1),p("ngIf",(e==null?null:e.Inventory)<=1e5)}}function ht(i,o){if(i&1){let e=S();l(0,"input",44),g("ngModelChange",function(n){d(e);let a=c(2).$implicit;return _(a.selected=n)}),s()}if(i&2){let e=c(2).$implicit;p("ngModel",e.selected)}}function Ct(i,o){if(i&1&&u(0,ht,1,1,"input",66),i&2){let e=c().$implicit;p("ngIf",(e==null?null:e.Inventory)>=0)}}function ft(i,o){i&1&&(l(0,"div",67),m(1,"Not Found"),s())}function xt(i,o){if(i&1&&(l(0,"div")(1,"span",68),m(2),f(3,"number"),s(),m(4," => "),l(5,"span",69),m(6),f(7,"number"),s()()),i&2){let e=c().$implicit;r(2),w(" ",x(3,2,e==null||e.I==null?null:e.I.Available),""),r(4),E(x(7,4,e==null?null:e.Inventory))}}function vt(i,o){if(i&1&&(l(0,"div"),m(1),f(2,"number"),s()),i&2){let e=c().$implicit;r(1),w(" ",x(2,1,e==null?null:e.Inventory)," ")}}function St(i,o){if(i&1&&(b(0),l(1,"div",70)(2,"a",71),v(3,"i",72),s()(),I()),i&2){let e=c().$implicit,t=c(3);r(2),p("href",t.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),N)}}var yt=i=>({"bg-gradient-warning":i});function bt(i,o){if(i&1){let e=S();l(0,"td",73)(1,"div",48)(2,"div")(3,"span",74),g("click",function(){d(e);let n=c().$implicit,a=c(),h=a.$implicit,C=a.ngForOf,T=c(2);return _(T.openTableDialog(h,n,C))}),m(4),f(5,"number"),s()(),l(6,"div",70)(7,"a",71),v(8,"i",72),s()(),l(9,"div",70)(10,"span",75),g("click",function(){d(e);let n=c().$implicit,a=c(3);return _(a.refreshInventory(n==null||n.Channel[0]==null?null:n.Channel[0].ChannelItemID,n==null||n.Channel[0]==null?null:n.Channel[0].ChannelVariationID,n==null||n.Channel[0]==null?null:n.Channel[0].ChannelID,n==null?null:n.ID))}),v(11,"i",76),s()()()()}if(i&2){let e=c().$implicit;p("ngClass",L(5,yt,(e==null?null:e.Inventory)!=(e==null||e.Channel[0]==null?null:e.Channel[0].Inventory))),r(4),w(" ",x(5,3,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," "),r(3),p("href",e==null||e.Channel[0]==null?null:e.Channel[0].Url,N)}}function It(i,o){if(i&1&&(b(0),l(1,"span",79),m(2),f(3,"number"),s(),I()),i&2){let e=c(2).$implicit;r(2),w(" (",x(3,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function wt(i,o){i&1&&m(0," - ")}function Tt(i,o){if(i&1&&(b(0),l(1,"td",77),u(2,It,4,3,"ng-container",51)(3,wt,1,0,"ng-template",null,78,R),s(),I()),i&2){let e=F(4),t=c().$implicit;r(2),p("ngIf",t==null||t.Channel[0]==null?null:t.Channel[0].InventoryReserved)("ngIfElse",e)}}function Mt(i,o){i&1&&(b(0),m(1," - "),I())}function Et(i,o){if(i&1&&(l(0,"span",80),f(1,"date"),m(2),f(3,"date"),s()),i&2){let e=c().$implicit;p("matTooltip",O(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),r(2),w(" ",O(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}var Vt=i=>({"text-decoration-line-through":i});function Dt(i,o){if(i&1&&(l(0,"tr"),u(1,_t,12,10,"ng-container",3),l(2,"td",46),m(3),s(),l(4,"td",47)(5,"div",48)(6,"span",49),m(7),s()()(),l(8,"td",50),u(9,gt,2,1,"ng-container",51)(10,Ct,1,1,"ng-template",null,52,R),s(),l(12,"td")(13,"div",48),u(14,ft,2,0,"div",53)(15,xt,8,6,"div",3)(16,vt,3,3,"div",3)(17,St,4,1,"ng-container",3),s()(),u(18,bt,12,7,"td",54)(19,Tt,5,2,"ng-container",3),l(20,"td",55),u(21,Mt,2,0,"ng-container",51)(22,Et,4,8,"ng-template",null,56,R),s()()),i&2){let e=o.$implicit,t=o.index,n=F(11),a=F(23),h=c(3);r(1),p("ngIf",t==0),r(2),E(e==null?null:e.Model),r(1),p("matTooltip",e.isDiscontinued?h.discontinuedVariantMsg:""),r(2),p("ngClass",L(15,Vt,e.isDiscontinued)),r(1),E(e==null?null:e.Code),r(2),p("ngIf",(e==null?null:e.Channel[0].TypeID)==1)("ngIfElse",n),r(5),p("ngIf",(e==null?null:e.I)==null),r(1),p("ngIf",(e==null?null:e.I)!=null&&(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)),r(1),p("ngIf",(e==null?null:e.I)!=null&&(e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)),r(1),p("ngIf",(e==null?null:e.I)!=null),r(1),p("ngIf",e==null?null:e.Channel),r(1),p("ngIf",h.isShowReservedColumn),r(2),p("ngIf",(e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==h.minDate)("ngIfElse",a)}}function Pt(i,o){if(i&1&&(l(0,"tbody"),u(1,Dt,24,17,"tr",32),s()),i&2){let e=o.$implicit;r(1),p("ngForOf",e.Variants)}}function Nt(i,o){if(i&1){let e=S();l(0,"span",81),g("click",function(){d(e);let n=c(2);return _(n.getRowCount())}),l(1,"i",82),m(2,"?"),s()()}}function kt(i,o){if(i&1&&(l(0,"span"),m(1),f(2,"number"),s()),i&2){let e=o.ngIf;r(1),E(x(2,1,e==null?null:e.Total))}}function Ft(i,o){if(i&1){let e=S();l(0,"a",86),g("click",function(){d(e);let n=c(3);return _(n.onNextPage())}),v(1,"i",87),m(2," Next"),s()}}function Rt(i,o){if(i&1){let e=S();l(0,"a",88),g("click",function(){d(e);let n=c(3);return _(n.onLastPage())}),v(1,"i",89),m(2," Last"),s()}}function Bt(i,o){if(i&1&&(l(0,"div",83),u(1,Ft,3,0,"a",84)(2,Rt,3,0,"a",85),s()),i&2){let e=c(2);r(1),p("ngIf",e.paginationService.disableNextButton&&!e.paginationService.goToLastPage),r(1),p("ngIf",e.paginationService.disableNextButton&&!e.paginationService.goToLastPage)}}function $t(i,o){if(i&1){let e=S();l(0,"mainpanel",1),g("onSubmit",function(n){d(e);let a=c();return _(a.onSearch(n))}),l(1,"actions")(2,"div",2),u(3,it,2,1,"div",3),f(4,"async"),s()(),l(5,"filters")(6,"div")(7,"label",4),m(8,"Channel"),s(),l(9,"ng-select",5),g("ngModelChange",function(n){d(e);let a=c();return _(a.searchFilter.ChannelID=n)}),u(10,at,3,2,"ng-template",6),s()(),l(11,"div",7)(12,"label",8),m(13,"PageNumber"),s(),l(14,"input",9),g("ngModelChange",function(n){d(e);let a=c();return _(a.searchFilter.PageNumber=n)}),s()(),l(15,"div",7)(16,"label",10),m(17,"Page Size"),s(),l(18,"input",11),g("ngModelChange",function(n){d(e);let a=c();return _(a.searchFilter.RowCount=n)}),s()(),l(19,"div",7)(20,"label",12),m(21,"Quantity From - To"),s(),l(22,"div",13)(23,"input",14),g("ngModelChange",function(n){d(e);let a=c();return _(a.searchFilter.QuantityFrom=n)}),s(),m(24," - "),l(25,"input",15),g("ngModelChange",function(n){d(e);let a=c();return _(a.searchFilter.QuantityTo=n)}),s()()()(),l(26,"content")(27,"div",16)(28,"div",17)(29,"div",18),u(30,ot,3,0,"div",19),l(31,"table",20)(32,"thead",21)(33,"tr")(34,"th",22),m(35,"Product "),v(36,"br"),l(37,"mat-slide-toggle",23),g("toggleChange",function(){d(e);let n=c();return n.showDifferenceStock=!n.showDifferenceStock,_(n.onShowDifferenceStock())}),l(38,"small",12),m(39,"FILTER DIFFERENT INVENTORY"),s()()(),l(40,"th",24),m(41,"Variant"),s(),l(42,"th",25),m(43,"SKU"),s(),u(44,lt,2,1,"th",3),f(45,"async"),l(46,"th",26),m(47,"POS"),s(),l(48,"th",27)(49,"div",28),g("click",function(){d(e);let n=c();return _(n.openModalFilter())}),v(50,"img",29),l(51,"span",30),m(52),f(53,"stringLimit"),s()()(),u(54,rt,3,0,"ng-container",3),l(55,"th",31),m(56,"Last Sync"),s()()(),u(57,Pt,2,1,"tbody",32),f(58,"async"),s(),l(59,"div",33)(60,"div",34)(61,"div",35),m(62),f(63,"number"),f(64,"async"),u(65,Nt,3,0,"span",36)(66,kt,3,3,"span",3),f(67,"async"),m(68),s()(),u(69,Bt,3,2,"div",37),f(70,"async"),s()()()()()()}if(i&2){let e=c(),t,n;p("headerTitle","Inventory Comparison")("pageData",e.pageData)("hideSearchBox",!1),r(3),p("ngIf",x(4,24,e.paginationService.data$)),r(6),p("clearable",!1)("items",e.channelOptions)("ngModel",e.searchFilter.ChannelID),r(5),p("ngModel",e.searchFilter.PageNumber),r(4),p("ngModel",e.searchFilter.RowCount),r(5),p("ngModel",e.searchFilter.QuantityFrom),r(2),p("ngModel",e.searchFilter.QuantityTo),r(5),p("ngIf",(e.searchFilter==null?null:e.searchFilter.filterModel)==3),r(14),p("ngIf",x(45,26,e.paginationService.data$)),r(5),p("matTooltip",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>13?e.selectedChannel==null?null:e.selectedChannel.Name:""),r(1),p("src",e.selectedChannel==null?null:e.selectedChannel.Img,N),r(2),ce(" ",O(53,28,e.selectedChannel==null?null:e.selectedChannel.Name,13),"",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>13?"...":""," "),r(2),p("ngIf",e.isShowReservedColumn),r(3),p("ngForOf",x(58,31,e.products$)),r(5),w(" Showing 1 - ",x(63,33,(t=x(64,35,e.paginationService.data$))==null?null:t.length)," of "),r(3),p("ngIf",e.paginationService.hideCount),r(1),p("ngIf",x(67,37,!e.paginationService.hideCount&&e.rowCount$)),r(2),w(" records ~ ",e.paginationService.footerPageNumber," Page "),r(1),p("ngIf",((n=x(70,39,e.paginationService.data$))==null?null:n.length)>0)}}var Fe=(()=>{let o=class o{constructor(t,n,a,h,C,T,M,Be,$e){this.http=t,this.toastr=n,this.dialog=a,this.paginationService=h,this.productService=C,this.authService=T,this.biggerPictureService=M,this.inventoryService=Be,this.mainPanelService=$e,this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="/api/InventoryLoader/Load",this.rowCountApi="/api/Inventory/GetInventoryByChannelRowCount",this.minDate=V.MinDate,this.isShowReservedColumn=!0,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.guidEmpty=V.GuidEMpty,this.Options=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory Realtime",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory",Active:!1},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!0}]}}ngOnInit(){this.channelOptions=this.authService.getChannels(),this.hostName=this.authService.getDomain(),this.initPageLoader(),this.products$=this.paginationService.data$.pipe(se(t=>(t=t.map(n=>(n.Variants&&(n.Variants=n.Variants.map(a=>(a.isDiscontinued=n.Discontinued=="Yes",a))),n)),t)),k(t=>{this.checkShowReservedColumn(t)}))}checkShowReservedColumn(t){let n=0,a;t.forEach(h=>{a=h.Variants.find(C=>V.IsNotEmpty(C?.Channel[0]?.InventoryReserved)),a&&(n+=1)}),this.isShowReservedColumn=n>0}initPageLoader(){this.paginationService.fetchDataEndpoint="Inventory/GetSingleChannelComparison",this.loader$=this.http.post(this.loaderApi,{}).pipe(k(t=>{if(this.searchFilter={RowCount:t.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:t.Filter.ChannelID},this.initSelectedChannel(),this.paginationService.reloadPagination(this.searchFilter),!t.Filter.IsMarketplaceAppActive){let n=`Automatic inventory sync disabled.
|
|
1
|
+
import{a as D,b as Ee,c as Pe,d as ae,e as oe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.2/Marketplace/chunk-G7RXTLDR.js";import{a as Me}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.2/Marketplace/chunk-Z24AOV6E.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.2/Marketplace/chunk-B6BTNEL5.js";import{a as Ve,b as De}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.2/Marketplace/chunk-6C4L2S7S.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.2/Marketplace/chunk-ODLFLX6Z.js";import{a as ie}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.2/Marketplace/chunk-NNZ2QIAF.js";import{a as ne}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.2/Marketplace/chunk-6ORTAB6O.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.2/Marketplace/chunk-V6IO53G5.js";import{a as Ie,b as we}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.2/Marketplace/chunk-GRHKW2KQ.js";import{a as Te}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.2/Marketplace/chunk-UZO2VDKA.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.2/Marketplace/chunk-TZRTEOJA.js";import{a as Ce,b as fe,d as xe,e as ve}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.2/Marketplace/chunk-223SSA62.js";import{a as re}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.2/Marketplace/chunk-M4MZ4PBS.js";import{d as q,k as W}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.2/Marketplace/chunk-EJMJP3AQ.js";import{a as H}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.2/Marketplace/chunk-2OVWEFCG.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.2/Marketplace/chunk-2HHCA3NK.js";import{B as ye,C as te,D as be,q as X,r as Se,u as ee}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.2/Marketplace/chunk-5VJQDJRJ.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.2/Marketplace/chunk-DDXVCGNF.js";import{b as ge,c as K,h as Y,k as J,m as Z,u as he}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.2/Marketplace/chunk-MFWCFDSI.js";import{c as V}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.2/Marketplace/chunk-PHYOU4H6.js";import{$a as l,Aa as N,Ac as G,B,Fb as f,Ga as r,Gb as x,Ha as y,Hb as O,Ob as R,Qa as p,Wa as u,X as k,_b as me,aa as $,ab as s,ac as de,bb as v,bc as U,cb as b,db as I,ea as P,ec as j,fa as A,fb as S,fc as _e,hc as z,ic as Q,ja as d,jb as g,ka as _,lb as c,ob as pe,q as se,qb as F,rb as m,sb as E,tb as w,ub as ce,wc as ue,yb as L}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.2/Marketplace/chunk-2TS2HEE6.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.2/Marketplace/chunk-NNG6BZAM.js";var Ne=(()=>{let o=class o{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"}]}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=P({type:o,selectors:[["app-inventory"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,a){n&1&&(l(0,"nav",0)(1,"div",1)(2,"div"),v(3,"nav-tab",2),s()()(),v(4,"router-outlet")),n&2&&(r(3),p("Tabs",a.inventoryTabs))},dependencies:[ue,Ie]});let i=o;return i})();function Ye(i,o){if(i&1){let e=S();l(0,"button",21),g("click",function(){d(e);let n=c().ngIf,a=c(2);return _(a.onUpdateItems(n))}),v(1,"i",22),m(2," Update "),s()}}function Je(i,o){if(i&1&&(l(0,"actions")(1,"div",19),u(2,Ye,3,0,"button",20),s()()),i&2){let e=o.ngIf,t=c(2);r(2),p("ngIf",t.productService.hasSelectionVariant(e))}}function Ze(i,o){if(i&1){let e=S();l(0,"app-table",23),g("onToggle",function(n){d(e);let a=c(2);return _(a.onShowDifferenceStock(n))})("onSubmit",function(n){let h=d(e).ngIf,C=c(2);return _(C.updateStockByVariant(n,h))}),s()}if(i&2){let e=o.ngIf,t=c(2);p("data",e)("channel",t.channelOptions)("showProductToggle",!0)("filter",t.searchFilter)}}function qe(i,o){if(i&1){let e=S();l(0,"span",24),g("click",function(){d(e);let n=c(2);return _(n.getRowCount())}),l(1,"i",25),m(2,"?"),s()()}}function We(i,o){if(i&1&&(l(0,"span"),m(1),f(2,"number"),s()),i&2){let e=o.ngIf;r(1),E(x(2,1,e))}}function Xe(i,o){if(i&1){let e=S();l(0,"a",26),g("click",function(){d(e);let n=c(2);return _(n.nextPage())}),v(1,"i",27),m(2," Next"),s()}}function et(i,o){if(i&1){let e=S();l(0,"a",28),g("click",function(){d(e);let n=c(2);return _(n.getAllData())}),v(1,"i",29),m(2," Last"),s()}}function tt(i,o){if(i&1){let e=S();l(0,"mainpanel",1),g("onSubmit",function(n){d(e);let a=c();return _(a.onSearch(n))}),u(1,Je,3,1,"actions",2),f(2,"async"),l(3,"filters")(4,"div")(5,"label",3),m(6,"PageNumber"),s(),l(7,"input",4),g("ngModelChange",function(n){d(e);let a=c();return _(a.searchFilter.PageNumber=n)}),s()(),l(8,"div",5)(9,"label",6),m(10,"Page Size"),s(),l(11,"input",7),g("ngModelChange",function(n){d(e);let a=c();return _(a.searchFilter.RowCount=n)}),s()()(),l(12,"content")(13,"div",8)(14,"div",9)(15,"div",10),u(16,Ze,1,4,"app-table",11),f(17,"async"),b(18),l(19,"div",12)(20,"div",13)(21,"div",14),m(22),f(23,"number"),f(24,"async"),u(25,qe,3,0,"span",15)(26,We,3,3,"span",2),f(27,"async"),m(28),s()(),l(29,"div",16),u(30,Xe,3,0,"a",17)(31,et,3,0,"a",18),s()(),I(),s()()()()()}if(i&2){let e=c(),t;p("pageData",e.pageData)("hideSearchBox",!1)("textButton","Search"),r(1),p("ngIf",x(2,13,e.paginationService.data$)),r(6),p("ngModel",e.searchFilter.PageNumber),r(4),p("ngModel",e.searchFilter.RowCount),r(5),p("ngIf",x(17,15,e.paginationService.data$)),r(6),w(" Showing 1 - ",x(23,17,(t=x(24,19,e.paginationService.data$))==null?null:t.length)," of "),r(3),p("ngIf",e.paginationService.hideCount),r(1),p("ngIf",x(27,21,!e.paginationService.hideCount&&e.allDataCount$)),r(2),w(" records ~ ",e.paginationService.footerPageNumber," Page "),r(2),p("ngIf",e.paginationService.disableNextButton&&!e.paginationService.goToLastPage),r(1),p("ngIf",e.paginationService.disableNextButton&&!e.paginationService.goToLastPage)}}var ke=(()=>{let o=class o{constructor(t,n,a,h,C,T){this.http=t,this.toastr=n,this.dialog=a,this.paginationService=h,this.productService=C,this.authService=T,this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.filterTypeOptions=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory/pos",Active:!0},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!1}]},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(k(t=>{t.Filter={PageNumber:t.Filter.PageNumber,filterModel:D.ALL,RowCount:t.Filter.PageSize,HiddenIPOSInventory:t.Filter.HiddenIPOSInventory},this.searchFilter=t.Filter,this.paginationService.reloadPagination(this.searchFilter)}))}onSearch(t){this.searchFilter.text=t,this.paginationService.reloadPagination(this.searchFilter)}updateStock(t,n){let a=this.productService.selectedVariantProduct(t);if(a.length>0){let C=a.map(M=>({ID:M.ID,Code:M.Code,Inventory:M.Inventory}));var h=n.filter(M=>M.selected).map(M=>M.ID);let T={ListChannelID:h,List:C};this.http.post("/api/Inventory/UpdateChannel",T).subscribe(M=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+T.List.length+" variants in "+T.ListChannelID.length+" channels","Success")})}}updateStockByVariant(t,n){let a={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,NewQuantity:parseFloat(t.Inventory),VariantID:t.ID,SKU:t.Sku};this.http.post("/api/Inventory/UpdateQuantityByItem",a).subscribe(h=>{let C=this.productService.findChannelById(a.ID,this.channelOptions);this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") inventory in "+C.Name+" to "+a.NewQuantity,"Success")})}onShowDifferenceStock(t){t?this.searchFilter.filterModel=D.DIFFERENCE:this.searchFilter.filterModel=D.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(t){let n=this.productService.selectedVariantProduct(t);this.dialog.open(Me,{data:{selectedItems:n,channels:JSON.parse(JSON.stringify(this.channelOptions))},width:"600px"}).afterClosed().pipe(B(a=>V.IsNotEmpty(a))).subscribe(a=>{this.updateStock(t,a)})}getRowCount(){this.paginationService.hideCount=!1;let t={text:this.searchFilter.text};this.allDataCount$=this.http.post(`/API/${this.allDataCountEndpoint}`,t)}nextPage(){this.paginationService.onNextPage(this.searchFilter)}getAllData(){this.http.post(`/API/${this.allDataCountEndpoint}`,{}).subscribe({next:t=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,t)}})}ngOnDestroy(){this.paginationService.destroy()}};o.\u0275fac=function(n){return new(n||o)(y(H),y(q),y(ee),y(ie),y(ne),y(W))},o.\u0275cmp=P({type:o,selectors:[["app-multi-channel-comparison"]],decls:2,vars:3,consts:[["headerTitle","Inventory Comparison",3,"pageData","hideSearchBox","textButton","onSubmit",4,"ngIf"],["headerTitle","Inventory Comparison",3,"pageData","hideSearchBox","textButton","onSubmit"],[4,"ngIf"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control","mt-2",3,"ngModel","ngModelChange"],[1,"mt-5"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","mt-2",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["table","inventory",3,"data","channel","showProductToggle","filter","onToggle","onSubmit",4,"ngIf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary border-start-0","title","Load all products",3,"click",4,"ngIf"],[1,"d-flex"],["type","button","class","btn btn-success shadow-sm rounded me-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"data","channel","showProductToggle","filter","onToggle","onSubmit"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(n,a){n&1&&(u(0,tt,32,23,"mainpanel",0),f(1,"async")),n&2&&p("ngIf",x(1,1,a.loader$))},dependencies:[U,K,Z,Y,J,te,ae,X,j,z],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let i=o;return i})();function nt(i,o){if(i&1){let e=S();l(0,"button",39),g("click",function(){d(e);let n=c().ngIf,a=c(2);return _(a.updateStock(n))}),v(1,"i",40),m(2," Update"),s()}}function it(i,o){if(i&1&&(l(0,"div"),u(1,nt,3,0,"button",38),s()),i&2){let e=o.ngIf,t=c(2);r(1),p("ngIf",t.productService.hasSelectionVariant(e))}}function at(i,o){if(i&1&&(l(0,"span",41),v(1,"img",42),s(),m(2)),i&2){let e=o.item;r(1),p("src",e==null?null:e.Img,N),r(1),w(" ",e.Name," ")}}function ot(i,o){i&1&&(l(0,"div",43)(1,"span"),m(2," showing only different stock, please press next to populate more data "),s()())}function lt(i,o){if(i&1){let e=S();l(0,"th")(1,"input",44),g("ngModelChange",function(n){d(e);let a=c(2);return _(a.checkboxState=n)})("ngModelChange",function(){let a=d(e).ngIf,h=c(2);return _(h.onCheckboxStateChange(a))}),s()()}if(i&2){let e=c(2);r(1),p("ngModel",e.checkboxState)}}function rt(i,o){i&1&&(b(0),l(1,"th",45),m(2," Reserved "),s(),I())}function st(i,o){if(i&1){let e=S();b(0),l(1,"input",61),g("ngModelChange",function(n){d(e);let a=c(3).$implicit;return _(a.selected=n)})("ngModelChange",function(){d(e);let n=c(3).$implicit,a=c(2);return _(a.onCheckboxStateProduct(n))}),s(),I()}if(i&2){let e=c(3).$implicit;r(1),p("ngModel",e.selected)}}function pt(i,o){if(i&1){let e=S();b(0),l(1,"img",62),g("click",function(n){d(e);let a=c(3).$implicit,h=c(2);return _(h.onZoomImage(n,a==null?null:a.ImageUrl))}),s(),I()}if(i&2){let e=c(3).$implicit;r(1),pe("src",e==null?null:e.ThumbnailUrl,N)}}function ct(i,o){i&1&&v(0,"img",63)}function mt(i,o){if(i&1&&(b(0),v(1,"br"),l(2,"div",64),v(3,"i",65),l(4,"small"),m(5),s()(),I()),i&2){let e=c(3).$implicit;r(5),w("(",e==null?null:e.Category,")")}}var dt=i=>({"ms-10":i});function _t(i,o){if(i&1&&(b(0),l(1,"td",57)(2,"div",13),u(3,st,2,1,"ng-container",3),l(4,"div",49),u(5,pt,2,1,"ng-container",51)(6,ct,1,0,"ng-template",null,58,R),s()()(),l(8,"td",59)(9,"span",60),m(10),s(),u(11,mt,6,1,"ng-container",3),s(),I()),i&2){let e=F(7),t=c(2).$implicit,n=c(2);r(1),p("rowSpan",t==null?null:t.Variants.length),r(2),p("ngIf",t.Variants.length>1),r(1),p("ngClass",L(8,dt,t.Variants.length<=1)),r(1),p("ngIf",t==null?null:t.ThumbnailUrl)("ngIfElse",e),r(3),p("rowSpan",t==null?null:t.Variants.length),r(2),E(t==null?null:t.Name),r(1),p("ngIf",t.CategoryID!==null&&t.CategoryID!=n.guidEmpty)}}function ut(i,o){if(i&1){let e=S();b(0),l(1,"input",44),g("ngModelChange",function(n){d(e);let a=c(2).$implicit;return _(a.selected=n)}),s(),I()}if(i&2){let e=c(2).$implicit;r(1),p("ngModel",e.selected)}}function gt(i,o){if(i&1&&(b(0),u(1,ut,2,1,"ng-container",3),I()),i&2){let e=c().$implicit;r(1),p("ngIf",(e==null?null:e.Inventory)<=1e5)}}function ht(i,o){if(i&1){let e=S();l(0,"input",44),g("ngModelChange",function(n){d(e);let a=c(2).$implicit;return _(a.selected=n)}),s()}if(i&2){let e=c(2).$implicit;p("ngModel",e.selected)}}function Ct(i,o){if(i&1&&u(0,ht,1,1,"input",66),i&2){let e=c().$implicit;p("ngIf",(e==null?null:e.Inventory)>=0)}}function ft(i,o){i&1&&(l(0,"div",67),m(1,"Not Found"),s())}function xt(i,o){if(i&1&&(l(0,"div")(1,"span",68),m(2),f(3,"number"),s(),m(4," => "),l(5,"span",69),m(6),f(7,"number"),s()()),i&2){let e=c().$implicit;r(2),w(" ",x(3,2,e==null||e.I==null?null:e.I.Available),""),r(4),E(x(7,4,e==null?null:e.Inventory))}}function vt(i,o){if(i&1&&(l(0,"div"),m(1),f(2,"number"),s()),i&2){let e=c().$implicit;r(1),w(" ",x(2,1,e==null?null:e.Inventory)," ")}}function St(i,o){if(i&1&&(b(0),l(1,"div",70)(2,"a",71),v(3,"i",72),s()(),I()),i&2){let e=c().$implicit,t=c(3);r(2),p("href",t.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),N)}}var yt=i=>({"bg-gradient-warning":i});function bt(i,o){if(i&1){let e=S();l(0,"td",73)(1,"div",48)(2,"div")(3,"span",74),g("click",function(){d(e);let n=c().$implicit,a=c(),h=a.$implicit,C=a.ngForOf,T=c(2);return _(T.openTableDialog(h,n,C))}),m(4),f(5,"number"),s()(),l(6,"div",70)(7,"a",71),v(8,"i",72),s()(),l(9,"div",70)(10,"span",75),g("click",function(){d(e);let n=c().$implicit,a=c(3);return _(a.refreshInventory(n==null||n.Channel[0]==null?null:n.Channel[0].ChannelItemID,n==null||n.Channel[0]==null?null:n.Channel[0].ChannelVariationID,n==null||n.Channel[0]==null?null:n.Channel[0].ChannelID,n==null?null:n.ID))}),v(11,"i",76),s()()()()}if(i&2){let e=c().$implicit;p("ngClass",L(5,yt,(e==null?null:e.Inventory)!=(e==null||e.Channel[0]==null?null:e.Channel[0].Inventory))),r(4),w(" ",x(5,3,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," "),r(3),p("href",e==null||e.Channel[0]==null?null:e.Channel[0].Url,N)}}function It(i,o){if(i&1&&(b(0),l(1,"span",79),m(2),f(3,"number"),s(),I()),i&2){let e=c(2).$implicit;r(2),w(" (",x(3,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function wt(i,o){i&1&&m(0," - ")}function Tt(i,o){if(i&1&&(b(0),l(1,"td",77),u(2,It,4,3,"ng-container",51)(3,wt,1,0,"ng-template",null,78,R),s(),I()),i&2){let e=F(4),t=c().$implicit;r(2),p("ngIf",t==null||t.Channel[0]==null?null:t.Channel[0].InventoryReserved)("ngIfElse",e)}}function Mt(i,o){i&1&&(b(0),m(1," - "),I())}function Et(i,o){if(i&1&&(l(0,"span",80),f(1,"date"),m(2),f(3,"date"),s()),i&2){let e=c().$implicit;p("matTooltip",O(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),r(2),w(" ",O(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}var Vt=i=>({"text-decoration-line-through":i});function Dt(i,o){if(i&1&&(l(0,"tr"),u(1,_t,12,10,"ng-container",3),l(2,"td",46),m(3),s(),l(4,"td",47)(5,"div",48)(6,"span",49),m(7),s()()(),l(8,"td",50),u(9,gt,2,1,"ng-container",51)(10,Ct,1,1,"ng-template",null,52,R),s(),l(12,"td")(13,"div",48),u(14,ft,2,0,"div",53)(15,xt,8,6,"div",3)(16,vt,3,3,"div",3)(17,St,4,1,"ng-container",3),s()(),u(18,bt,12,7,"td",54)(19,Tt,5,2,"ng-container",3),l(20,"td",55),u(21,Mt,2,0,"ng-container",51)(22,Et,4,8,"ng-template",null,56,R),s()()),i&2){let e=o.$implicit,t=o.index,n=F(11),a=F(23),h=c(3);r(1),p("ngIf",t==0),r(2),E(e==null?null:e.Model),r(1),p("matTooltip",e.isDiscontinued?h.discontinuedVariantMsg:""),r(2),p("ngClass",L(15,Vt,e.isDiscontinued)),r(1),E(e==null?null:e.Code),r(2),p("ngIf",(e==null?null:e.Channel[0].TypeID)==1)("ngIfElse",n),r(5),p("ngIf",(e==null?null:e.I)==null),r(1),p("ngIf",(e==null?null:e.I)!=null&&(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)),r(1),p("ngIf",(e==null?null:e.I)!=null&&(e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)),r(1),p("ngIf",(e==null?null:e.I)!=null),r(1),p("ngIf",e==null?null:e.Channel),r(1),p("ngIf",h.isShowReservedColumn),r(2),p("ngIf",(e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==h.minDate)("ngIfElse",a)}}function Pt(i,o){if(i&1&&(l(0,"tbody"),u(1,Dt,24,17,"tr",32),s()),i&2){let e=o.$implicit;r(1),p("ngForOf",e.Variants)}}function Nt(i,o){if(i&1){let e=S();l(0,"span",81),g("click",function(){d(e);let n=c(2);return _(n.getRowCount())}),l(1,"i",82),m(2,"?"),s()()}}function kt(i,o){if(i&1&&(l(0,"span"),m(1),f(2,"number"),s()),i&2){let e=o.ngIf;r(1),E(x(2,1,e==null?null:e.Total))}}function Ft(i,o){if(i&1){let e=S();l(0,"a",86),g("click",function(){d(e);let n=c(3);return _(n.onNextPage())}),v(1,"i",87),m(2," Next"),s()}}function Rt(i,o){if(i&1){let e=S();l(0,"a",88),g("click",function(){d(e);let n=c(3);return _(n.onLastPage())}),v(1,"i",89),m(2," Last"),s()}}function Bt(i,o){if(i&1&&(l(0,"div",83),u(1,Ft,3,0,"a",84)(2,Rt,3,0,"a",85),s()),i&2){let e=c(2);r(1),p("ngIf",e.paginationService.disableNextButton&&!e.paginationService.goToLastPage),r(1),p("ngIf",e.paginationService.disableNextButton&&!e.paginationService.goToLastPage)}}function $t(i,o){if(i&1){let e=S();l(0,"mainpanel",1),g("onSubmit",function(n){d(e);let a=c();return _(a.onSearch(n))}),l(1,"actions")(2,"div",2),u(3,it,2,1,"div",3),f(4,"async"),s()(),l(5,"filters")(6,"div")(7,"label",4),m(8,"Channel"),s(),l(9,"ng-select",5),g("ngModelChange",function(n){d(e);let a=c();return _(a.searchFilter.ChannelID=n)}),u(10,at,3,2,"ng-template",6),s()(),l(11,"div",7)(12,"label",8),m(13,"PageNumber"),s(),l(14,"input",9),g("ngModelChange",function(n){d(e);let a=c();return _(a.searchFilter.PageNumber=n)}),s()(),l(15,"div",7)(16,"label",10),m(17,"Page Size"),s(),l(18,"input",11),g("ngModelChange",function(n){d(e);let a=c();return _(a.searchFilter.RowCount=n)}),s()(),l(19,"div",7)(20,"label",12),m(21,"Quantity From - To"),s(),l(22,"div",13)(23,"input",14),g("ngModelChange",function(n){d(e);let a=c();return _(a.searchFilter.QuantityFrom=n)}),s(),m(24," - "),l(25,"input",15),g("ngModelChange",function(n){d(e);let a=c();return _(a.searchFilter.QuantityTo=n)}),s()()()(),l(26,"content")(27,"div",16)(28,"div",17)(29,"div",18),u(30,ot,3,0,"div",19),l(31,"table",20)(32,"thead",21)(33,"tr")(34,"th",22),m(35,"Product "),v(36,"br"),l(37,"mat-slide-toggle",23),g("toggleChange",function(){d(e);let n=c();return n.showDifferenceStock=!n.showDifferenceStock,_(n.onShowDifferenceStock())}),l(38,"small",12),m(39,"FILTER DIFFERENT INVENTORY"),s()()(),l(40,"th",24),m(41,"Variant"),s(),l(42,"th",25),m(43,"SKU"),s(),u(44,lt,2,1,"th",3),f(45,"async"),l(46,"th",26),m(47,"POS"),s(),l(48,"th",27)(49,"div",28),g("click",function(){d(e);let n=c();return _(n.openModalFilter())}),v(50,"img",29),l(51,"span",30),m(52),f(53,"stringLimit"),s()()(),u(54,rt,3,0,"ng-container",3),l(55,"th",31),m(56,"Last Sync"),s()()(),u(57,Pt,2,1,"tbody",32),f(58,"async"),s(),l(59,"div",33)(60,"div",34)(61,"div",35),m(62),f(63,"number"),f(64,"async"),u(65,Nt,3,0,"span",36)(66,kt,3,3,"span",3),f(67,"async"),m(68),s()(),u(69,Bt,3,2,"div",37),f(70,"async"),s()()()()()()}if(i&2){let e=c(),t,n;p("headerTitle","Inventory Comparison")("pageData",e.pageData)("hideSearchBox",!1),r(3),p("ngIf",x(4,24,e.paginationService.data$)),r(6),p("clearable",!1)("items",e.channelOptions)("ngModel",e.searchFilter.ChannelID),r(5),p("ngModel",e.searchFilter.PageNumber),r(4),p("ngModel",e.searchFilter.RowCount),r(5),p("ngModel",e.searchFilter.QuantityFrom),r(2),p("ngModel",e.searchFilter.QuantityTo),r(5),p("ngIf",(e.searchFilter==null?null:e.searchFilter.filterModel)==3),r(14),p("ngIf",x(45,26,e.paginationService.data$)),r(5),p("matTooltip",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>13?e.selectedChannel==null?null:e.selectedChannel.Name:""),r(1),p("src",e.selectedChannel==null?null:e.selectedChannel.Img,N),r(2),ce(" ",O(53,28,e.selectedChannel==null?null:e.selectedChannel.Name,13),"",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>13?"...":""," "),r(2),p("ngIf",e.isShowReservedColumn),r(3),p("ngForOf",x(58,31,e.products$)),r(5),w(" Showing 1 - ",x(63,33,(t=x(64,35,e.paginationService.data$))==null?null:t.length)," of "),r(3),p("ngIf",e.paginationService.hideCount),r(1),p("ngIf",x(67,37,!e.paginationService.hideCount&&e.rowCount$)),r(2),w(" records ~ ",e.paginationService.footerPageNumber," Page "),r(1),p("ngIf",((n=x(70,39,e.paginationService.data$))==null?null:n.length)>0)}}var Fe=(()=>{let o=class o{constructor(t,n,a,h,C,T,M,Be,$e){this.http=t,this.toastr=n,this.dialog=a,this.paginationService=h,this.productService=C,this.authService=T,this.biggerPictureService=M,this.inventoryService=Be,this.mainPanelService=$e,this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="/api/InventoryLoader/Load",this.rowCountApi="/api/Inventory/GetInventoryByChannelRowCount",this.minDate=V.MinDate,this.isShowReservedColumn=!0,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.guidEmpty=V.GuidEMpty,this.Options=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory Realtime",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory",Active:!1},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!0}]}}ngOnInit(){this.channelOptions=this.authService.getChannels(),this.hostName=this.authService.getDomain(),this.initPageLoader(),this.products$=this.paginationService.data$.pipe(se(t=>(t=t.map(n=>(n.Variants&&(n.Variants=n.Variants.map(a=>(a.isDiscontinued=n.Discontinued=="Yes",a))),n)),t)),k(t=>{this.checkShowReservedColumn(t)}))}checkShowReservedColumn(t){let n=0,a;t.forEach(h=>{a=h.Variants.find(C=>V.IsNotEmpty(C?.Channel[0]?.InventoryReserved)),a&&(n+=1)}),this.isShowReservedColumn=n>0}initPageLoader(){this.paginationService.fetchDataEndpoint="Inventory/GetSingleChannelComparison",this.loader$=this.http.post(this.loaderApi,{}).pipe(k(t=>{if(this.searchFilter={RowCount:t.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:t.Filter.ChannelID},this.initSelectedChannel(),this.paginationService.reloadPagination(this.searchFilter),!t.Filter.IsMarketplaceAppActive){let n=`Automatic inventory sync disabled.
|
|
2
2
|
Please enable Dealpos X Marketplace Apps integration in POS Configuration`;this.toastr.warning(n,"Warning")}}))}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(t=>t.ID==this.searchFilter.ChannelID)}onSearch(t){this.searchFilter.text=t,this.paginationService.reloadPagination(this.searchFilter),this.initSelectedChannel()}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(t){let n=this.productService.selectedVariantProduct(t);if(n.length>0){let a=n.map(C=>({ID:C.ID,Code:C.Code,Inventory:C.Inventory})),h={ListChannelID:[this.searchFilter.ChannelID],List:a};this.http.post("/api/Inventory/UpdateChannel",h).subscribe(C=>{this.searchFilter.PageNumber=1,this.paginationService.reloadPagination(this.searchFilter),this.checkboxState=!1,this.handlingUpdateStock(C)})}}handlingUpdateStock(t){if(t[0]?.StatusProduct){let n=t[0].StatusProduct.Fail_list,a=t[0].StatusProduct.Success_list;this.inventoryService.showToastrUpdateInventory("Stock",a,n)}else this.toastr.error(t[0]?.Exception,"Error")}refreshInventory(t,n,a,h){let C={ChannelItemID:t,ChannelVariationID:n,ChannelID:a,VariantID:h};this.http.post("/api/Inventory/RefreshInventoryChannel",C).subscribe(T=>{this.toastr.success("Successfully updated","Success"),this.paginationService.reloadPagination(this.searchFilter)})}onCheckboxStateProduct(t){t.Variants=t.Variants.map(n=>(n.Inventory>=0&&(n.selected=t.selected),n))}onCheckboxStateChange(t){t=t.map(n=>(n.Variants=n.Variants.map(a=>(a.selected=this.checkboxState,a)),n))}openTableDialog(t,n,a){this.dialog.open(Ee,{data:{Name:t.Name,Variant:n,ChannelID:n?.Channel[0].ChannelID,Table:"inventory",ChannelItemID:t.ChannelItemID}}).afterClosed().pipe(B(C=>V.IsNotEmpty(C))).subscribe(C=>{this.updateItemAfterDialog(C,a)})}updateItemAfterDialog(t,n){let a={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,NewQuantity:parseFloat(t.Inventory),VariantID:t.ID,SKU:t.Sku},h=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.http.post("/api/Inventory/UpdateQuantityByItem",a).subscribe(C=>{this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") inventory in "+h?.Name+" to "+a.NewQuantity,"Success")})}onShowDifferenceStock(){this.showDifferenceStock?this.searchFilter.filterModel=D.DIFFERENCE:this.searchFilter.filterModel=D.ALL,this.paginationService.reloadPagination(this.searchFilter)}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}getRowCount(){let t={ChannelID:this.searchFilter.ChannelID,PageNumber:1,text:this.searchFilter.text};this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`${this.rowCountApi}`,t)}onLastPage(){let t={ChannelID:this.searchFilter.ChannelID,PageNumber:1};this.http.post(`${this.rowCountApi}`,t).subscribe({next:n=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,n.Total)}})}onZoomImage(t,n){this.biggerPictureService.openBiggerPicture(t,n)}ngOnDestroy(){this.paginationService.destroy()}};o.\u0275fac=function(n){return new(n||o)(y(H),y(q),y(ee),y(ie),y(ne),y(W),y(Te),y(oe),y(ye))},o.\u0275cmp=P({type:o,selectors:[["app-single-channel-comparison"]],decls:2,vars:3,consts:[["textButton","Search",3,"headerTitle","pageData","hideSearchBox","onSubmit",4,"ngIf"],["textButton","Search",3,"headerTitle","pageData","hideSearchBox","onSubmit"],[1,"d-flex"],[4,"ngIf"],["for","ng-select",1,"fw-bold"],["id","ng-select","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text","mt-3",3,"clearable","items","ngModel","ngModelChange"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModel","ngModelChange"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModel","ngModelChange"],[1,"fw-bold"],[1,"d-flex","align-items-center","justify-content-start"],["type","number","name","QuantityFrom",1,"w-25","me-2","mt-3","form-control",3,"ngModel","ngModelChange"],["type","number","name","QuantityTo",1,"w-25","ms-2","form-control","mt-2",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["class","alert alert-warning d-flex justify-content-between text-dark","role","alert",4,"ngIf"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","ps-12",2,"width","25%"],[3,"toggleChange"],["scope","col",1,"text-start"],["scope","col",1,"text-end",2,"width","10%"],["scope","col",1,"text-end","w-10",2,"width","8%"],[1,"text-end",2,"width","150px"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"matTooltip","click"],[2,"width","16px",3,"src"],[1,"ms-1"],[1,"text-center",2,"width","145px"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],["class","btn-group",4,"ngIf"],["class","btn btn-success",3,"click",4,"ngIf"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"me-2"],[2,"width","18px",3,"src"],["role","alert",1,"alert","alert-warning","d-flex","justify-content-between","text-dark"],["type","checkbox",3,"ngModel","ngModelChange"],["matTooltip","Reserved Stock","matTooltipPosition","above",1,"text-end",2,"width","80px"],[1,"text-start"],["matTooltipPosition","above",1,"text-end",3,"matTooltip"],[1,"d-flex","align-items-center","justify-content-end"],[3,"ngClass"],[1,"align-middle"],[4,"ngIf","ngIfElse"],["OTHER_CHANNEL",""],["class","text-danger","matTooltip","This product is no longer available in POS","matTooltipPosition","above",4,"ngIf"],["class","text-end",3,"ngClass",4,"ngIf"],[1,"text-center"],["SYNCDATE",""],[1,"text-start",2,"width","0%",3,"rowSpan"],["elsePic",""],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],["type","checkbox",1,"me-3",3,"ngModel","ngModelChange"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img",2,"margin-left","20px"],[1,"d-flex","align-items-center"],["title","Category",1,"fa-solid","fa-tags","me-2",2,"opacity","60%"],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],["title","Allocated"],["title","Inventory below minimum inventory"],[1,"ms-3"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt","external-link-custom"],[1,"text-end",3,"ngClass"],[1,"cursor",3,"click"],["matTooltip","Refresh stock according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","fa-sync","fa-lg","external-link-custom"],[1,"text-end"],["EMPTY_RESERVED",""],[1,"text-danger"],["matTooltipShowDelay","500",3,"matTooltip"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary border-start-0","title","Load all products",3,"click",4,"ngIf"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(n,a){n&1&&(u(0,$t,71,41,"mainpanel",0),f(1,"async")),n&2&&p("ngIf",x(1,1,a.loader$))},dependencies:[me,de,U,K,Z,ge,Y,J,xe,Ce,fe,Ve,te,X,j,z,_e,Pe],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}"]});let i=o;return i})();var At=[{path:"",component:Ne,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",component:ke,canActivate:[re],data:{title:"Inventory Comparison"}},{path:"bychannel",component:Fe,canActivate:[re],data:{title:"Inventory Comparison"}}]}],Re=(()=>{let o=class o{};o.\u0275fac=function(n){return new(n||o)},o.\u0275mod=A({type:o}),o.\u0275inj=$({imports:[Q,G.forChild(At)]});let i=o;return i})();var Nn=(()=>{let o=class o{};o.\u0275fac=function(n){return new(n||o)},o.\u0275mod=A({type:o}),o.\u0275inj=$({providers:[oe],imports:[Q,Re,G,we,he,ve,De,be,ae,Se]});let i=o;return i})();export{Nn as InventoryModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ca as F,Ea as w,Ha as a,Ja as de,La as V,Na as d,Pa as J,Sa as Q,Vb as T,Xb as ee,Z as c,_ as G,aa as M,ba as _,fa as E,ga as u,ia as j,ib as ce,jb as m,m as ae,na as p,q as le,vb as h,w as ue}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-P24WVMWI.js";import{a as g,b as C}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.1/Marketplace/chunk-PUBPICPK.js";var Ve=(()=>{let e=class e{constructor(t,n){this._renderer=t,this._elementRef=n,this.onChange=s=>{},this.onTouched=()=>{}}setProperty(t,n){this._renderer.setProperty(this._elementRef.nativeElement,t,n)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}};e.\u0275fac=function(n){return new(n||e)(a(w),a(F))},e.\u0275dir=u({type:e});let i=e;return i})(),P=(()=>{let e=class e extends Ve{};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,features:[d]});let i=e;return i})(),b=new _("NgValueAccessor"),qe={provide:b,useExisting:c(()=>ze),multi:!0},ze=(()=>{let e=class e extends P{writeValue(t){this.setProperty("checked",t)}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(n,s){n&1&&m("change",function(l){return s.onChange(l.target.checked)})("blur",function(){return s.onTouched()})},features:[h([qe]),d]});let i=e;return i})(),Ze={provide:b,useExisting:c(()=>De),multi:!0};function Xe(){let i=ee()?ee().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var Ye=new _("CompositionEventMode"),De=(()=>{let e=class e extends Ve{constructor(t,n,s){super(t,n),this._compositionMode=s,this._composing=!1,this._compositionMode==null&&(this._compositionMode=!Xe())}writeValue(t){let n=t??"";this.setProperty("value",n)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}};e.\u0275fac=function(n){return new(n||e)(a(w),a(F),a(Ye,8))},e.\u0275dir=u({type:e,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(n,s){n&1&&m("input",function(l){return s._handleInput(l.target.value)})("blur",function(){return s.onTouched()})("compositionstart",function(){return s._compositionStart()})("compositionend",function(l){return s._compositionEnd(l.target.value)})},features:[h([Ze]),d]});let i=e;return i})();function y(i){return i==null||(typeof i=="string"||Array.isArray(i))&&i.length===0}function be(i){return i!=null&&typeof i.length=="number"}var A=new _("NgValidators"),ie=new _("NgAsyncValidators"),Ke=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,he=class{static min(e){return Je(e)}static max(e){return Qe(e)}static required(e){return Ae(e)}static requiredTrue(e){return et(e)}static email(e){return Me(e)}static minLength(e){return tt(e)}static maxLength(e){return it(e)}static pattern(e){return Ee(e)}static nullValidator(e){return U(e)}static compose(e){return Ne(e)}static composeAsync(e){return Pe(e)}};function Je(i){return e=>{if(y(e.value)||y(i))return null;let r=parseFloat(e.value);return!isNaN(r)&&r<i?{min:{min:i,actual:e.value}}:null}}function Qe(i){return e=>{if(y(e.value)||y(i))return null;let r=parseFloat(e.value);return!isNaN(r)&&r>i?{max:{max:i,actual:e.value}}:null}}function Ae(i){return y(i.value)?{required:!0}:null}function et(i){return i.value===!0?null:{required:!0}}function Me(i){return y(i.value)||Ke.test(i.value)?null:{email:!0}}function tt(i){return e=>y(e.value)||!be(e.value)?null:e.value.length<i?{minlength:{requiredLength:i,actualLength:e.value.length}}:null}function it(i){return e=>be(e.value)&&e.value.length>i?{maxlength:{requiredLength:i,actualLength:e.value.length}}:null}function Ee(i){if(!i)return U;let e,r;return typeof i=="string"?(r="",i.charAt(0)!=="^"&&(r+="^"),r+=i,i.charAt(i.length-1)!=="$"&&(r+="$"),e=new RegExp(r)):(r=i.toString(),e=i),t=>{if(y(t.value))return null;let n=t.value;return e.test(n)?null:{pattern:{requiredPattern:r,actualValue:n}}}}function U(i){return null}function Fe(i){return i!=null}function we(i){return ce(i)?ae(i):i}function Ie(i){let e={};return i.forEach(r=>{e=r!=null?g(g({},e),r):e}),Object.keys(e).length===0?null:e}function Se(i,e){return e.map(r=>r(i))}function nt(i){return!i.validate}function Oe(i){return i.map(e=>nt(e)?e:r=>e.validate(r))}function Ne(i){if(!i)return null;let e=i.filter(Fe);return e.length==0?null:function(r){return Ie(Se(r,e))}}function ne(i){return i!=null?Ne(Oe(i)):null}function Pe(i){if(!i)return null;let e=i.filter(Fe);return e.length==0?null:function(r){let t=Se(r,e).map(we);return ue(t).pipe(le(Ie))}}function re(i){return i!=null?Pe(Oe(i)):null}function fe(i,e){return i===null?[e]:Array.isArray(i)?[...i,e]:[i,e]}function xe(i){return i._rawValidators}function ke(i){return i._rawAsyncValidators}function te(i){return i?Array.isArray(i)?i:[i]:[]}function R(i,e){return Array.isArray(i)?i.includes(e):i===e}function pe(i,e){let r=te(e);return te(i).forEach(n=>{R(r,n)||r.push(n)}),r}function ge(i,e){return te(e).filter(r=>!R(i,r))}var H=class{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=ne(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=re(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control&&this.control.reset(e)}hasError(e,r){return this.control?this.control.hasError(e,r):!1}getError(e,r){return this.control?this.control.getError(e,r):null}},v=class extends H{get formDirective(){return null}get path(){return null}},N=class extends H{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},L=class{constructor(e){this._cd=e}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}},rt={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},oi=C(g({},rt),{"[class.ng-submitted]":"isSubmitted"}),ai=(()=>{let e=class e extends L{constructor(t){super(t)}};e.\u0275fac=function(n){return new(n||e)(a(N,2))},e.\u0275dir=u({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,s){n&2&&Q("ng-untouched",s.isUntouched)("ng-touched",s.isTouched)("ng-pristine",s.isPristine)("ng-dirty",s.isDirty)("ng-valid",s.isValid)("ng-invalid",s.isInvalid)("ng-pending",s.isPending)},features:[d]});let i=e;return i})(),li=(()=>{let e=class e extends L{constructor(t){super(t)}};e.\u0275fac=function(n){return new(n||e)(a(v,10))},e.\u0275dir=u({type:e,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(n,s){n&2&&Q("ng-untouched",s.isUntouched)("ng-touched",s.isTouched)("ng-pristine",s.isPristine)("ng-dirty",s.isDirty)("ng-valid",s.isValid)("ng-invalid",s.isInvalid)("ng-pending",s.isPending)("ng-submitted",s.isSubmitted)},features:[d]});let i=e;return i})();var I="VALID",B="INVALID",D="PENDING",S="DISABLED";function Ge(i){return(X(i)?i.validators:i)||null}function st(i){return Array.isArray(i)?ne(i):i||null}function je(i,e){return(X(e)?e.asyncValidators:i)||null}function ot(i){return Array.isArray(i)?re(i):i||null}function X(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}function at(i,e,r){let t=i.controls;if(!(e?Object.keys(t):t).length)throw new G(1e3,"");if(!t[r])throw new G(1001,"")}function lt(i,e,r){i._forEachChild((t,n)=>{if(r[n]===void 0)throw new G(1002,"")})}var $=class{constructor(e,r){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(e),this._assignAsyncValidators(r)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get valid(){return this.status===I}get invalid(){return this.status===B}get pending(){return this.status==D}get disabled(){return this.status===S}get enabled(){return this.status!==S}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(pe(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(pe(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(ge(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(ge(e,this._rawAsyncValidators))}hasValidator(e){return R(this._rawValidators,e)}hasAsyncValidator(e){return R(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(e=>e.markAllAsTouched())}markAsUntouched(e={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}markAsDirty(e={}){this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)}markAsPristine(e={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(r=>{r.markAsPristine({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}markAsPending(e={}){this.status=D,e.emitEvent!==!1&&this.statusChanges.emit(this.status),this._parent&&!e.onlySelf&&this._parent.markAsPending(e)}disable(e={}){let r=this._parentMarkedDirty(e.onlySelf);this.status=S,this.errors=null,this._forEachChild(t=>{t.disable(C(g({},e),{onlySelf:!0}))}),this._updateValue(),e.emitEvent!==!1&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(C(g({},e),{skipPristineCheck:r})),this._onDisabledChange.forEach(t=>t(!0))}enable(e={}){let r=this._parentMarkedDirty(e.onlySelf);this.status=I,this._forEachChild(t=>{t.enable(C(g({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(C(g({},e),{skipPristineCheck:r})),this._onDisabledChange.forEach(t=>t(!1))}_updateAncestors(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===I||this.status===D)&&this._runAsyncValidator(e.emitEvent)),e.emitEvent!==!1&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(r=>r._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?S:I}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e){if(this.asyncValidator){this.status=D,this._hasOwnPendingAsyncValidator=!0;let r=we(this.asyncValidator(this));this._asyncValidationSubscription=r.subscribe(t=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(t,{emitEvent:e})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(e,r={}){this.errors=e,this._updateControlsErrors(r.emitEvent!==!1)}get(e){let r=e;return r==null||(Array.isArray(r)||(r=r.split(".")),r.length===0)?null:r.reduce((t,n)=>t&&t._find(n),this)}getError(e,r){let t=r?this.get(r):this;return t&&t.errors?t.errors[e]:null}hasError(e,r){return!!this.getError(e,r)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)}_initObservables(){this.valueChanges=new V,this.statusChanges=new V}_calculateStatus(){return this._allControlsDisabled()?S:this.errors?B:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(D)?D:this._anyControlsHaveStatus(B)?B:I}_anyControlsHaveStatus(e){return this._anyControls(r=>r.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e={}){this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}_updateTouched(e={}){this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){X(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){let r=this._parent&&this._parent.dirty;return!e&&!!r&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=st(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=ot(this._rawAsyncValidators)}},W=class extends ${constructor(e,r,t){super(Ge(r),je(t,r)),this.controls=e,this._initObservables(),this._setUpdateStrategy(r),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,r){return this.controls[e]?this.controls[e]:(this.controls[e]=r,r.setParent(this),r._registerOnCollectionChange(this._onCollectionChange),r)}addControl(e,r,t={}){this.registerControl(e,r),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}removeControl(e,r={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}setControl(e,r,t={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],r&&this.registerControl(e,r),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,r={}){lt(this,!0,e),Object.keys(e).forEach(t=>{at(this,!0,t),this.controls[t].setValue(e[t],{onlySelf:!0,emitEvent:r.emitEvent})}),this.updateValueAndValidity(r)}patchValue(e,r={}){e!=null&&(Object.keys(e).forEach(t=>{let n=this.controls[t];n&&n.patchValue(e[t],{onlySelf:!0,emitEvent:r.emitEvent})}),this.updateValueAndValidity(r))}reset(e={},r={}){this._forEachChild((t,n)=>{t.reset(e?e[n]:null,{onlySelf:!0,emitEvent:r.emitEvent})}),this._updatePristine(r),this._updateTouched(r),this.updateValueAndValidity(r)}getRawValue(){return this._reduceChildren({},(e,r,t)=>(e[t]=r.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(r,t)=>t._syncPendingControls()?!0:r);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(r=>{let t=this.controls[r];t&&e(t,r)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(let[r,t]of Object.entries(this.controls))if(this.contains(r)&&e(t))return!0;return!1}_reduceValue(){let e={};return this._reduceChildren(e,(r,t,n)=>((t.enabled||this.disabled)&&(r[n]=t.value),r))}_reduceChildren(e,r){let t=e;return this._forEachChild((n,s)=>{t=r(t,n,s)}),t}_allControlsDisabled(){for(let e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(e){return this.controls.hasOwnProperty(e)?this.controls[e]:null}};var x=new _("CallSetDisabledState",{providedIn:"root",factory:()=>Y}),Y="always";function ut(i,e){return[...e.path,i]}function q(i,e,r=Y){se(i,e),e.valueAccessor.writeValue(i.value),(i.disabled||r==="always")&&e.valueAccessor.setDisabledState?.(i.disabled),ct(i,e),ft(i,e),ht(i,e),dt(i,e)}function me(i,e,r=!0){let t=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(t),e.valueAccessor.registerOnTouched(t)),Z(i,e),i&&(e._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function z(i,e){i.forEach(r=>{r.registerOnValidatorChange&&r.registerOnValidatorChange(e)})}function dt(i,e){if(e.valueAccessor.setDisabledState){let r=t=>{e.valueAccessor.setDisabledState(t)};i.registerOnDisabledChange(r),e._registerOnDestroy(()=>{i._unregisterOnDisabledChange(r)})}}function se(i,e){let r=xe(i);e.validator!==null?i.setValidators(fe(r,e.validator)):typeof r=="function"&&i.setValidators([r]);let t=ke(i);e.asyncValidator!==null?i.setAsyncValidators(fe(t,e.asyncValidator)):typeof t=="function"&&i.setAsyncValidators([t]);let n=()=>i.updateValueAndValidity();z(e._rawValidators,n),z(e._rawAsyncValidators,n)}function Z(i,e){let r=!1;if(i!==null){if(e.validator!==null){let n=xe(i);if(Array.isArray(n)&&n.length>0){let s=n.filter(o=>o!==e.validator);s.length!==n.length&&(r=!0,i.setValidators(s))}}if(e.asyncValidator!==null){let n=ke(i);if(Array.isArray(n)&&n.length>0){let s=n.filter(o=>o!==e.asyncValidator);s.length!==n.length&&(r=!0,i.setAsyncValidators(s))}}}let t=()=>{};return z(e._rawValidators,t),z(e._rawAsyncValidators,t),r}function ct(i,e){e.valueAccessor.registerOnChange(r=>{i._pendingValue=r,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&Te(i,e)})}function ht(i,e){e.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&Te(i,e),i.updateOn!=="submit"&&i.markAsTouched()})}function Te(i,e){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function ft(i,e){let r=(t,n)=>{e.valueAccessor.writeValue(t),n&&e.viewToModelUpdate(t)};i.registerOnChange(r),e._registerOnDestroy(()=>{i._unregisterOnChange(r)})}function Be(i,e){i==null,se(i,e)}function pt(i,e){return Z(i,e)}function gt(i,e){if(!i.hasOwnProperty("model"))return!1;let r=i.model;return r.isFirstChange()?!0:!Object.is(e,r.currentValue)}function mt(i){return Object.getPrototypeOf(i.constructor)===P}function Ue(i,e){i._syncPendingControls(),e.forEach(r=>{let t=r.control;t.updateOn==="submit"&&t._pendingChange&&(r.viewToModelUpdate(t._pendingValue),t._pendingChange=!1)})}function yt(i,e){if(!e)return null;Array.isArray(e);let r,t,n;return e.forEach(s=>{s.constructor===De?r=s:mt(s)?t=s:n=s}),n||t||r||null}function vt(i,e){let r=i.indexOf(e);r>-1&&i.splice(r,1)}var _t={provide:v,useExisting:c(()=>Ct)},O=(()=>Promise.resolve())(),Ct=(()=>{let e=class e extends v{constructor(t,n,s){super(),this.callSetDisabledState=s,this.submitted=!1,this._directives=new Set,this.ngSubmit=new V,this.form=new W({},ne(t),re(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){O.then(()=>{let n=this._findContainer(t.path);t.control=n.registerControl(t.name,t.control),q(t.control,t,this.callSetDisabledState),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){O.then(()=>{let n=this._findContainer(t.path);n&&n.removeControl(t.name),this._directives.delete(t)})}addFormGroup(t){O.then(()=>{let n=this._findContainer(t.path),s=new W({});Be(s,t),n.registerControl(t.name,s),s.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){O.then(()=>{let n=this._findContainer(t.path);n&&n.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,n){O.then(()=>{this.form.get(t.path).setValue(n)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,Ue(this.form,this._directives),this.ngSubmit.emit(t),t?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}};e.\u0275fac=function(n){return new(n||e)(a(A,10),a(ie,10),a(x,8))},e.\u0275dir=u({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(n,s){n&1&&m("submit",function(l){return s.onSubmit(l)})("reset",function(){return s.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[h([_t]),d]});let i=e;return i})();function ye(i,e){let r=i.indexOf(e);r>-1&&i.splice(r,1)}function ve(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var Re=class extends ${constructor(e=null,r,t){super(Ge(r),je(t,r)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(e),this._setUpdateStrategy(r),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),X(r)&&(r.nonNullable||r.initialValueIsDefault)&&(ve(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,r={}){this.value=this._pendingValue=e,this._onChange.length&&r.emitModelToViewChange!==!1&&this._onChange.forEach(t=>t(this.value,r.emitViewToModelChange!==!1)),this.updateValueAndValidity(r)}patchValue(e,r={}){this.setValue(e,r)}reset(e=this.defaultValue,r={}){this._applyFormState(e),this.markAsPristine(r),this.markAsUntouched(r),this.setValue(this.value,r),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){ye(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){ye(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(e){ve(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}};var Vt=i=>i instanceof Re;var Dt={provide:N,useExisting:c(()=>bt)},_e=(()=>Promise.resolve())(),bt=(()=>{let e=class e extends N{constructor(t,n,s,o,l,f){super(),this._changeDetectorRef=l,this.callSetDisabledState=f,this.control=new Re,this._registered=!1,this.name="",this.update=new V,this._parent=t,this._setValidators(n),this._setAsyncValidators(s),this.valueAccessor=yt(this,o)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){let n=t.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),gt(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){q(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(t){_e.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let n=t.isDisabled.currentValue,s=n!==0&&T(n);_e.then(()=>{s&&!this.control.disabled?this.control.disable():!s&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?ut(t,this._parent):[t]}};e.\u0275fac=function(n){return new(n||e)(a(v,9),a(A,10),a(ie,10),a(b,10),a(de,8),a(x,8))},e.\u0275dir=u({type:e,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[h([Dt]),d,j]});let i=e;return i})(),di=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=u({type:e,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]});let i=e;return i})(),At={provide:b,useExisting:c(()=>Mt),multi:!0},Mt=(()=>{let e=class e extends P{writeValue(t){let n=t??"";this.setProperty("value",n)}registerOnChange(t){this.onChange=n=>{t(n==""?null:parseFloat(n))}}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(n,s){n&1&&m("input",function(l){return s.onChange(l.target.value)})("blur",function(){return s.onTouched()})},features:[h([At]),d]});let i=e;return i})();var Et=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=E({type:e}),e.\u0275inj=M({});let i=e;return i})();var Ft=new _("NgModelWithFormControlWarning");var wt={provide:v,useExisting:c(()=>It)},It=(()=>{let e=class e extends v{constructor(t,n,s){super(),this.callSetDisabledState=s,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new V,this._setValidators(t),this._setAsyncValidators(n)}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Z(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){let n=this.form.get(t.path);return q(n,t,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),n}getControl(t){return this.form.get(t.path)}removeControl(t){me(t.control||null,t,!1),vt(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,n){this.form.get(t.path).setValue(n)}onSubmit(t){return this.submitted=!0,Ue(this.form,this.directives),this.ngSubmit.emit(t),t?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{let n=t.control,s=this.form.get(t.path);n!==s&&(me(n||null,t),Vt(s)&&(q(s,t,this.callSetDisabledState),t.control=s))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){let n=this.form.get(t.path);Be(n,t),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){let n=this.form.get(t.path);n&&pt(n,t)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){se(this.form,this),this._oldForm&&Z(this._oldForm,this)}_checkFormPresent(){this.form}};e.\u0275fac=function(n){return new(n||e)(a(A,10),a(ie,10),a(x,8))},e.\u0275dir=u({type:e,selectors:[["","formGroup",""]],hostBindings:function(n,s){n&1&&m("submit",function(l){return s.onSubmit(l)})("reset",function(){return s.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[h([wt]),d,j]});let i=e;return i})();var St={provide:b,useExisting:c(()=>Le),multi:!0};function He(i,e){return i==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function Ot(i){return i.split(":")[0]}var Le=(()=>{let e=class e extends P{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){this.value=t;let n=this._getOptionId(t),s=He(n,t);this.setProperty("value",s)}registerOnChange(t){this.onChange=n=>{this.value=this._getOptionValue(n),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n),t))return n;return null}_getOptionValue(t){let n=Ot(t);return this._optionMap.has(n)?this._optionMap.get(n):t}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(n,s){n&1&&m("change",function(l){return s.onChange(l.target.value)})("blur",function(){return s.onTouched()})},inputs:{compareWith:"compareWith"},features:[h([St]),d]});let i=e;return i})(),ci=(()=>{let e=class e{constructor(t,n,s){this._element=t,this._renderer=n,this._select=s,this._select&&(this.id=this._select._registerOption())}set ngValue(t){this._select!=null&&(this._select._optionMap.set(this.id,t),this._setElementValue(He(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._setElementValue(t),this._select&&this._select.writeValue(this._select.value)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}};e.\u0275fac=function(n){return new(n||e)(a(F),a(w),a(Le,9))},e.\u0275dir=u({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}});let i=e;return i})(),Nt={provide:b,useExisting:c(()=>$e),multi:!0};function Ce(i,e){return i==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function Pt(i){return i.split(":")[0]}var $e=(()=>{let e=class e extends P{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){this.value=t;let n;if(Array.isArray(t)){let s=t.map(o=>this._getOptionId(o));n=(o,l)=>{o._setSelected(s.indexOf(l.toString())>-1)}}else n=(s,o)=>{s._setSelected(!1)};this._optionMap.forEach(n)}registerOnChange(t){this.onChange=n=>{let s=[],o=n.selectedOptions;if(o!==void 0){let l=o;for(let f=0;f<l.length;f++){let k=l[f],K=this._getOptionValue(k.value);s.push(K)}}else{let l=n.options;for(let f=0;f<l.length;f++){let k=l[f];if(k.selected){let K=this._getOptionValue(k.value);s.push(K)}}}this.value=s,t(s)}}_registerOption(t){let n=(this._idCounter++).toString();return this._optionMap.set(n,t),n}_getOptionId(t){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n)._value,t))return n;return null}_getOptionValue(t){let n=Pt(t);return this._optionMap.has(n)?this._optionMap.get(n)._value:t}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(n,s){n&1&&m("change",function(l){return s.onChange(l.target)})("blur",function(){return s.onTouched()})},inputs:{compareWith:"compareWith"},features:[h([Nt]),d]});let i=e;return i})(),hi=(()=>{let e=class e{constructor(t,n,s){this._element=t,this._renderer=n,this._select=s,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){this._select!=null&&(this._value=t,this._setElementValue(Ce(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(Ce(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}};e.\u0275fac=function(n){return new(n||e)(a(F),a(w),a($e,9))},e.\u0275dir=u({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}});let i=e;return i})();var oe=(()=>{let e=class e{constructor(){this._validator=U}ngOnChanges(t){if(this.inputName in t){let n=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(n),this._validator=this._enabled?this.createValidator(n):U,this._onChange&&this._onChange()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return t!=null}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=u({type:e,features:[j]});let i=e;return i})();var xt={provide:A,useExisting:c(()=>kt),multi:!0};var kt=(()=>{let e=class e extends oe{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=T,this.createValidator=t=>Ae}enabled(t){return t}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(n,s){n&2&&J("required",s._enabled?"":null)},inputs:{required:"required"},features:[h([xt]),d]});let i=e;return i})();var Gt={provide:A,useExisting:c(()=>jt),multi:!0},jt=(()=>{let e=class e extends oe{constructor(){super(...arguments),this.inputName="email",this.normalizeInput=T,this.createValidator=t=>Me}enabled(t){return t}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["","email","","formControlName",""],["","email","","formControl",""],["","email","","ngModel",""]],inputs:{email:"email"},features:[h([Gt]),d]});let i=e;return i})();var Tt={provide:A,useExisting:c(()=>Bt),multi:!0},Bt=(()=>{let e=class e extends oe{constructor(){super(...arguments),this.inputName="pattern",this.normalizeInput=t=>t,this.createValidator=t=>Ee(t)}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(n,s){n&2&&J("pattern",s._enabled?s.pattern:null)},inputs:{pattern:"pattern"},features:[h([Tt]),d]});let i=e;return i})();var We=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=E({type:e}),e.\u0275inj=M({imports:[Et]});let i=e;return i})();var fi=(()=>{let e=class e{static withConfig(t){return{ngModule:e,providers:[{provide:x,useValue:t.callSetDisabledState??Y}]}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=E({type:e}),e.\u0275inj=M({imports:[We]});let i=e;return i})(),pi=(()=>{let e=class e{static withConfig(t){return{ngModule:e,providers:[{provide:Ft,useValue:t.warnOnNgModelWithFormControl??"always"},{provide:x,useValue:t.callSetDisabledState??Y}]}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=E({type:e}),e.\u0275inj=M({imports:[We]});let i=e;return i})();export{b as a,ze as b,De as c,A as d,he as e,v as f,N as g,ai as h,li as i,Ct as j,bt as k,di as l,Mt as m,It as n,Le as o,ci as p,hi as q,kt as r,jt as s,Bt as t,fi as u,pi as v};
|
|
1
|
+
import{Ca as F,Ea as w,Ha as a,Ja as de,La as V,Na as d,Pa as J,Sa as Q,Vb as T,Xb as ee,Z as c,_ as G,aa as M,ba as _,fa as E,ga as u,ia as j,ib as ce,jb as m,m as ae,na as p,q as le,vb as h,w as ue}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.2/Marketplace/chunk-2TS2HEE6.js";import{a as g,b as C}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.10.2/Marketplace/chunk-NNG6BZAM.js";var Ve=(()=>{let e=class e{constructor(t,n){this._renderer=t,this._elementRef=n,this.onChange=s=>{},this.onTouched=()=>{}}setProperty(t,n){this._renderer.setProperty(this._elementRef.nativeElement,t,n)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}};e.\u0275fac=function(n){return new(n||e)(a(w),a(F))},e.\u0275dir=u({type:e});let i=e;return i})(),P=(()=>{let e=class e extends Ve{};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,features:[d]});let i=e;return i})(),b=new _("NgValueAccessor"),qe={provide:b,useExisting:c(()=>ze),multi:!0},ze=(()=>{let e=class e extends P{writeValue(t){this.setProperty("checked",t)}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(n,s){n&1&&m("change",function(l){return s.onChange(l.target.checked)})("blur",function(){return s.onTouched()})},features:[h([qe]),d]});let i=e;return i})(),Ze={provide:b,useExisting:c(()=>De),multi:!0};function Xe(){let i=ee()?ee().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var Ye=new _("CompositionEventMode"),De=(()=>{let e=class e extends Ve{constructor(t,n,s){super(t,n),this._compositionMode=s,this._composing=!1,this._compositionMode==null&&(this._compositionMode=!Xe())}writeValue(t){let n=t??"";this.setProperty("value",n)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}};e.\u0275fac=function(n){return new(n||e)(a(w),a(F),a(Ye,8))},e.\u0275dir=u({type:e,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(n,s){n&1&&m("input",function(l){return s._handleInput(l.target.value)})("blur",function(){return s.onTouched()})("compositionstart",function(){return s._compositionStart()})("compositionend",function(l){return s._compositionEnd(l.target.value)})},features:[h([Ze]),d]});let i=e;return i})();function y(i){return i==null||(typeof i=="string"||Array.isArray(i))&&i.length===0}function be(i){return i!=null&&typeof i.length=="number"}var A=new _("NgValidators"),ie=new _("NgAsyncValidators"),Ke=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,he=class{static min(e){return Je(e)}static max(e){return Qe(e)}static required(e){return Ae(e)}static requiredTrue(e){return et(e)}static email(e){return Me(e)}static minLength(e){return tt(e)}static maxLength(e){return it(e)}static pattern(e){return Ee(e)}static nullValidator(e){return U(e)}static compose(e){return Ne(e)}static composeAsync(e){return Pe(e)}};function Je(i){return e=>{if(y(e.value)||y(i))return null;let r=parseFloat(e.value);return!isNaN(r)&&r<i?{min:{min:i,actual:e.value}}:null}}function Qe(i){return e=>{if(y(e.value)||y(i))return null;let r=parseFloat(e.value);return!isNaN(r)&&r>i?{max:{max:i,actual:e.value}}:null}}function Ae(i){return y(i.value)?{required:!0}:null}function et(i){return i.value===!0?null:{required:!0}}function Me(i){return y(i.value)||Ke.test(i.value)?null:{email:!0}}function tt(i){return e=>y(e.value)||!be(e.value)?null:e.value.length<i?{minlength:{requiredLength:i,actualLength:e.value.length}}:null}function it(i){return e=>be(e.value)&&e.value.length>i?{maxlength:{requiredLength:i,actualLength:e.value.length}}:null}function Ee(i){if(!i)return U;let e,r;return typeof i=="string"?(r="",i.charAt(0)!=="^"&&(r+="^"),r+=i,i.charAt(i.length-1)!=="$"&&(r+="$"),e=new RegExp(r)):(r=i.toString(),e=i),t=>{if(y(t.value))return null;let n=t.value;return e.test(n)?null:{pattern:{requiredPattern:r,actualValue:n}}}}function U(i){return null}function Fe(i){return i!=null}function we(i){return ce(i)?ae(i):i}function Ie(i){let e={};return i.forEach(r=>{e=r!=null?g(g({},e),r):e}),Object.keys(e).length===0?null:e}function Se(i,e){return e.map(r=>r(i))}function nt(i){return!i.validate}function Oe(i){return i.map(e=>nt(e)?e:r=>e.validate(r))}function Ne(i){if(!i)return null;let e=i.filter(Fe);return e.length==0?null:function(r){return Ie(Se(r,e))}}function ne(i){return i!=null?Ne(Oe(i)):null}function Pe(i){if(!i)return null;let e=i.filter(Fe);return e.length==0?null:function(r){let t=Se(r,e).map(we);return ue(t).pipe(le(Ie))}}function re(i){return i!=null?Pe(Oe(i)):null}function fe(i,e){return i===null?[e]:Array.isArray(i)?[...i,e]:[i,e]}function xe(i){return i._rawValidators}function ke(i){return i._rawAsyncValidators}function te(i){return i?Array.isArray(i)?i:[i]:[]}function R(i,e){return Array.isArray(i)?i.includes(e):i===e}function pe(i,e){let r=te(e);return te(i).forEach(n=>{R(r,n)||r.push(n)}),r}function ge(i,e){return te(e).filter(r=>!R(i,r))}var H=class{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=ne(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=re(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control&&this.control.reset(e)}hasError(e,r){return this.control?this.control.hasError(e,r):!1}getError(e,r){return this.control?this.control.getError(e,r):null}},v=class extends H{get formDirective(){return null}get path(){return null}},N=class extends H{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},L=class{constructor(e){this._cd=e}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}},rt={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},oi=C(g({},rt),{"[class.ng-submitted]":"isSubmitted"}),ai=(()=>{let e=class e extends L{constructor(t){super(t)}};e.\u0275fac=function(n){return new(n||e)(a(N,2))},e.\u0275dir=u({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,s){n&2&&Q("ng-untouched",s.isUntouched)("ng-touched",s.isTouched)("ng-pristine",s.isPristine)("ng-dirty",s.isDirty)("ng-valid",s.isValid)("ng-invalid",s.isInvalid)("ng-pending",s.isPending)},features:[d]});let i=e;return i})(),li=(()=>{let e=class e extends L{constructor(t){super(t)}};e.\u0275fac=function(n){return new(n||e)(a(v,10))},e.\u0275dir=u({type:e,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(n,s){n&2&&Q("ng-untouched",s.isUntouched)("ng-touched",s.isTouched)("ng-pristine",s.isPristine)("ng-dirty",s.isDirty)("ng-valid",s.isValid)("ng-invalid",s.isInvalid)("ng-pending",s.isPending)("ng-submitted",s.isSubmitted)},features:[d]});let i=e;return i})();var I="VALID",B="INVALID",D="PENDING",S="DISABLED";function Ge(i){return(X(i)?i.validators:i)||null}function st(i){return Array.isArray(i)?ne(i):i||null}function je(i,e){return(X(e)?e.asyncValidators:i)||null}function ot(i){return Array.isArray(i)?re(i):i||null}function X(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}function at(i,e,r){let t=i.controls;if(!(e?Object.keys(t):t).length)throw new G(1e3,"");if(!t[r])throw new G(1001,"")}function lt(i,e,r){i._forEachChild((t,n)=>{if(r[n]===void 0)throw new G(1002,"")})}var $=class{constructor(e,r){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(e),this._assignAsyncValidators(r)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get valid(){return this.status===I}get invalid(){return this.status===B}get pending(){return this.status==D}get disabled(){return this.status===S}get enabled(){return this.status!==S}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(pe(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(pe(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(ge(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(ge(e,this._rawAsyncValidators))}hasValidator(e){return R(this._rawValidators,e)}hasAsyncValidator(e){return R(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(e=>e.markAllAsTouched())}markAsUntouched(e={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}markAsDirty(e={}){this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)}markAsPristine(e={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(r=>{r.markAsPristine({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}markAsPending(e={}){this.status=D,e.emitEvent!==!1&&this.statusChanges.emit(this.status),this._parent&&!e.onlySelf&&this._parent.markAsPending(e)}disable(e={}){let r=this._parentMarkedDirty(e.onlySelf);this.status=S,this.errors=null,this._forEachChild(t=>{t.disable(C(g({},e),{onlySelf:!0}))}),this._updateValue(),e.emitEvent!==!1&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(C(g({},e),{skipPristineCheck:r})),this._onDisabledChange.forEach(t=>t(!0))}enable(e={}){let r=this._parentMarkedDirty(e.onlySelf);this.status=I,this._forEachChild(t=>{t.enable(C(g({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(C(g({},e),{skipPristineCheck:r})),this._onDisabledChange.forEach(t=>t(!1))}_updateAncestors(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===I||this.status===D)&&this._runAsyncValidator(e.emitEvent)),e.emitEvent!==!1&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(r=>r._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?S:I}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e){if(this.asyncValidator){this.status=D,this._hasOwnPendingAsyncValidator=!0;let r=we(this.asyncValidator(this));this._asyncValidationSubscription=r.subscribe(t=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(t,{emitEvent:e})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(e,r={}){this.errors=e,this._updateControlsErrors(r.emitEvent!==!1)}get(e){let r=e;return r==null||(Array.isArray(r)||(r=r.split(".")),r.length===0)?null:r.reduce((t,n)=>t&&t._find(n),this)}getError(e,r){let t=r?this.get(r):this;return t&&t.errors?t.errors[e]:null}hasError(e,r){return!!this.getError(e,r)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)}_initObservables(){this.valueChanges=new V,this.statusChanges=new V}_calculateStatus(){return this._allControlsDisabled()?S:this.errors?B:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(D)?D:this._anyControlsHaveStatus(B)?B:I}_anyControlsHaveStatus(e){return this._anyControls(r=>r.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e={}){this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}_updateTouched(e={}){this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){X(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){let r=this._parent&&this._parent.dirty;return!e&&!!r&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=st(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=ot(this._rawAsyncValidators)}},W=class extends ${constructor(e,r,t){super(Ge(r),je(t,r)),this.controls=e,this._initObservables(),this._setUpdateStrategy(r),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,r){return this.controls[e]?this.controls[e]:(this.controls[e]=r,r.setParent(this),r._registerOnCollectionChange(this._onCollectionChange),r)}addControl(e,r,t={}){this.registerControl(e,r),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}removeControl(e,r={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}setControl(e,r,t={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],r&&this.registerControl(e,r),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,r={}){lt(this,!0,e),Object.keys(e).forEach(t=>{at(this,!0,t),this.controls[t].setValue(e[t],{onlySelf:!0,emitEvent:r.emitEvent})}),this.updateValueAndValidity(r)}patchValue(e,r={}){e!=null&&(Object.keys(e).forEach(t=>{let n=this.controls[t];n&&n.patchValue(e[t],{onlySelf:!0,emitEvent:r.emitEvent})}),this.updateValueAndValidity(r))}reset(e={},r={}){this._forEachChild((t,n)=>{t.reset(e?e[n]:null,{onlySelf:!0,emitEvent:r.emitEvent})}),this._updatePristine(r),this._updateTouched(r),this.updateValueAndValidity(r)}getRawValue(){return this._reduceChildren({},(e,r,t)=>(e[t]=r.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(r,t)=>t._syncPendingControls()?!0:r);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(r=>{let t=this.controls[r];t&&e(t,r)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(let[r,t]of Object.entries(this.controls))if(this.contains(r)&&e(t))return!0;return!1}_reduceValue(){let e={};return this._reduceChildren(e,(r,t,n)=>((t.enabled||this.disabled)&&(r[n]=t.value),r))}_reduceChildren(e,r){let t=e;return this._forEachChild((n,s)=>{t=r(t,n,s)}),t}_allControlsDisabled(){for(let e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(e){return this.controls.hasOwnProperty(e)?this.controls[e]:null}};var x=new _("CallSetDisabledState",{providedIn:"root",factory:()=>Y}),Y="always";function ut(i,e){return[...e.path,i]}function q(i,e,r=Y){se(i,e),e.valueAccessor.writeValue(i.value),(i.disabled||r==="always")&&e.valueAccessor.setDisabledState?.(i.disabled),ct(i,e),ft(i,e),ht(i,e),dt(i,e)}function me(i,e,r=!0){let t=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(t),e.valueAccessor.registerOnTouched(t)),Z(i,e),i&&(e._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function z(i,e){i.forEach(r=>{r.registerOnValidatorChange&&r.registerOnValidatorChange(e)})}function dt(i,e){if(e.valueAccessor.setDisabledState){let r=t=>{e.valueAccessor.setDisabledState(t)};i.registerOnDisabledChange(r),e._registerOnDestroy(()=>{i._unregisterOnDisabledChange(r)})}}function se(i,e){let r=xe(i);e.validator!==null?i.setValidators(fe(r,e.validator)):typeof r=="function"&&i.setValidators([r]);let t=ke(i);e.asyncValidator!==null?i.setAsyncValidators(fe(t,e.asyncValidator)):typeof t=="function"&&i.setAsyncValidators([t]);let n=()=>i.updateValueAndValidity();z(e._rawValidators,n),z(e._rawAsyncValidators,n)}function Z(i,e){let r=!1;if(i!==null){if(e.validator!==null){let n=xe(i);if(Array.isArray(n)&&n.length>0){let s=n.filter(o=>o!==e.validator);s.length!==n.length&&(r=!0,i.setValidators(s))}}if(e.asyncValidator!==null){let n=ke(i);if(Array.isArray(n)&&n.length>0){let s=n.filter(o=>o!==e.asyncValidator);s.length!==n.length&&(r=!0,i.setAsyncValidators(s))}}}let t=()=>{};return z(e._rawValidators,t),z(e._rawAsyncValidators,t),r}function ct(i,e){e.valueAccessor.registerOnChange(r=>{i._pendingValue=r,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&Te(i,e)})}function ht(i,e){e.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&Te(i,e),i.updateOn!=="submit"&&i.markAsTouched()})}function Te(i,e){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function ft(i,e){let r=(t,n)=>{e.valueAccessor.writeValue(t),n&&e.viewToModelUpdate(t)};i.registerOnChange(r),e._registerOnDestroy(()=>{i._unregisterOnChange(r)})}function Be(i,e){i==null,se(i,e)}function pt(i,e){return Z(i,e)}function gt(i,e){if(!i.hasOwnProperty("model"))return!1;let r=i.model;return r.isFirstChange()?!0:!Object.is(e,r.currentValue)}function mt(i){return Object.getPrototypeOf(i.constructor)===P}function Ue(i,e){i._syncPendingControls(),e.forEach(r=>{let t=r.control;t.updateOn==="submit"&&t._pendingChange&&(r.viewToModelUpdate(t._pendingValue),t._pendingChange=!1)})}function yt(i,e){if(!e)return null;Array.isArray(e);let r,t,n;return e.forEach(s=>{s.constructor===De?r=s:mt(s)?t=s:n=s}),n||t||r||null}function vt(i,e){let r=i.indexOf(e);r>-1&&i.splice(r,1)}var _t={provide:v,useExisting:c(()=>Ct)},O=(()=>Promise.resolve())(),Ct=(()=>{let e=class e extends v{constructor(t,n,s){super(),this.callSetDisabledState=s,this.submitted=!1,this._directives=new Set,this.ngSubmit=new V,this.form=new W({},ne(t),re(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){O.then(()=>{let n=this._findContainer(t.path);t.control=n.registerControl(t.name,t.control),q(t.control,t,this.callSetDisabledState),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){O.then(()=>{let n=this._findContainer(t.path);n&&n.removeControl(t.name),this._directives.delete(t)})}addFormGroup(t){O.then(()=>{let n=this._findContainer(t.path),s=new W({});Be(s,t),n.registerControl(t.name,s),s.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){O.then(()=>{let n=this._findContainer(t.path);n&&n.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,n){O.then(()=>{this.form.get(t.path).setValue(n)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,Ue(this.form,this._directives),this.ngSubmit.emit(t),t?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}};e.\u0275fac=function(n){return new(n||e)(a(A,10),a(ie,10),a(x,8))},e.\u0275dir=u({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(n,s){n&1&&m("submit",function(l){return s.onSubmit(l)})("reset",function(){return s.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[h([_t]),d]});let i=e;return i})();function ye(i,e){let r=i.indexOf(e);r>-1&&i.splice(r,1)}function ve(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var Re=class extends ${constructor(e=null,r,t){super(Ge(r),je(t,r)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(e),this._setUpdateStrategy(r),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),X(r)&&(r.nonNullable||r.initialValueIsDefault)&&(ve(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,r={}){this.value=this._pendingValue=e,this._onChange.length&&r.emitModelToViewChange!==!1&&this._onChange.forEach(t=>t(this.value,r.emitViewToModelChange!==!1)),this.updateValueAndValidity(r)}patchValue(e,r={}){this.setValue(e,r)}reset(e=this.defaultValue,r={}){this._applyFormState(e),this.markAsPristine(r),this.markAsUntouched(r),this.setValue(this.value,r),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){ye(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){ye(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(e){ve(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}};var Vt=i=>i instanceof Re;var Dt={provide:N,useExisting:c(()=>bt)},_e=(()=>Promise.resolve())(),bt=(()=>{let e=class e extends N{constructor(t,n,s,o,l,f){super(),this._changeDetectorRef=l,this.callSetDisabledState=f,this.control=new Re,this._registered=!1,this.name="",this.update=new V,this._parent=t,this._setValidators(n),this._setAsyncValidators(s),this.valueAccessor=yt(this,o)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){let n=t.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),gt(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){q(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(t){_e.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let n=t.isDisabled.currentValue,s=n!==0&&T(n);_e.then(()=>{s&&!this.control.disabled?this.control.disable():!s&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?ut(t,this._parent):[t]}};e.\u0275fac=function(n){return new(n||e)(a(v,9),a(A,10),a(ie,10),a(b,10),a(de,8),a(x,8))},e.\u0275dir=u({type:e,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[h([Dt]),d,j]});let i=e;return i})(),di=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=u({type:e,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]});let i=e;return i})(),At={provide:b,useExisting:c(()=>Mt),multi:!0},Mt=(()=>{let e=class e extends P{writeValue(t){let n=t??"";this.setProperty("value",n)}registerOnChange(t){this.onChange=n=>{t(n==""?null:parseFloat(n))}}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(n,s){n&1&&m("input",function(l){return s.onChange(l.target.value)})("blur",function(){return s.onTouched()})},features:[h([At]),d]});let i=e;return i})();var Et=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=E({type:e}),e.\u0275inj=M({});let i=e;return i})();var Ft=new _("NgModelWithFormControlWarning");var wt={provide:v,useExisting:c(()=>It)},It=(()=>{let e=class e extends v{constructor(t,n,s){super(),this.callSetDisabledState=s,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new V,this._setValidators(t),this._setAsyncValidators(n)}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Z(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){let n=this.form.get(t.path);return q(n,t,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),n}getControl(t){return this.form.get(t.path)}removeControl(t){me(t.control||null,t,!1),vt(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,n){this.form.get(t.path).setValue(n)}onSubmit(t){return this.submitted=!0,Ue(this.form,this.directives),this.ngSubmit.emit(t),t?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{let n=t.control,s=this.form.get(t.path);n!==s&&(me(n||null,t),Vt(s)&&(q(s,t,this.callSetDisabledState),t.control=s))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){let n=this.form.get(t.path);Be(n,t),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){let n=this.form.get(t.path);n&&pt(n,t)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){se(this.form,this),this._oldForm&&Z(this._oldForm,this)}_checkFormPresent(){this.form}};e.\u0275fac=function(n){return new(n||e)(a(A,10),a(ie,10),a(x,8))},e.\u0275dir=u({type:e,selectors:[["","formGroup",""]],hostBindings:function(n,s){n&1&&m("submit",function(l){return s.onSubmit(l)})("reset",function(){return s.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[h([wt]),d,j]});let i=e;return i})();var St={provide:b,useExisting:c(()=>Le),multi:!0};function He(i,e){return i==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function Ot(i){return i.split(":")[0]}var Le=(()=>{let e=class e extends P{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){this.value=t;let n=this._getOptionId(t),s=He(n,t);this.setProperty("value",s)}registerOnChange(t){this.onChange=n=>{this.value=this._getOptionValue(n),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n),t))return n;return null}_getOptionValue(t){let n=Ot(t);return this._optionMap.has(n)?this._optionMap.get(n):t}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(n,s){n&1&&m("change",function(l){return s.onChange(l.target.value)})("blur",function(){return s.onTouched()})},inputs:{compareWith:"compareWith"},features:[h([St]),d]});let i=e;return i})(),ci=(()=>{let e=class e{constructor(t,n,s){this._element=t,this._renderer=n,this._select=s,this._select&&(this.id=this._select._registerOption())}set ngValue(t){this._select!=null&&(this._select._optionMap.set(this.id,t),this._setElementValue(He(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._setElementValue(t),this._select&&this._select.writeValue(this._select.value)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}};e.\u0275fac=function(n){return new(n||e)(a(F),a(w),a(Le,9))},e.\u0275dir=u({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}});let i=e;return i})(),Nt={provide:b,useExisting:c(()=>$e),multi:!0};function Ce(i,e){return i==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function Pt(i){return i.split(":")[0]}var $e=(()=>{let e=class e extends P{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){this.value=t;let n;if(Array.isArray(t)){let s=t.map(o=>this._getOptionId(o));n=(o,l)=>{o._setSelected(s.indexOf(l.toString())>-1)}}else n=(s,o)=>{s._setSelected(!1)};this._optionMap.forEach(n)}registerOnChange(t){this.onChange=n=>{let s=[],o=n.selectedOptions;if(o!==void 0){let l=o;for(let f=0;f<l.length;f++){let k=l[f],K=this._getOptionValue(k.value);s.push(K)}}else{let l=n.options;for(let f=0;f<l.length;f++){let k=l[f];if(k.selected){let K=this._getOptionValue(k.value);s.push(K)}}}this.value=s,t(s)}}_registerOption(t){let n=(this._idCounter++).toString();return this._optionMap.set(n,t),n}_getOptionId(t){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n)._value,t))return n;return null}_getOptionValue(t){let n=Pt(t);return this._optionMap.has(n)?this._optionMap.get(n)._value:t}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(n,s){n&1&&m("change",function(l){return s.onChange(l.target)})("blur",function(){return s.onTouched()})},inputs:{compareWith:"compareWith"},features:[h([Nt]),d]});let i=e;return i})(),hi=(()=>{let e=class e{constructor(t,n,s){this._element=t,this._renderer=n,this._select=s,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){this._select!=null&&(this._value=t,this._setElementValue(Ce(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(Ce(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}};e.\u0275fac=function(n){return new(n||e)(a(F),a(w),a($e,9))},e.\u0275dir=u({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}});let i=e;return i})();var oe=(()=>{let e=class e{constructor(){this._validator=U}ngOnChanges(t){if(this.inputName in t){let n=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(n),this._validator=this._enabled?this.createValidator(n):U,this._onChange&&this._onChange()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return t!=null}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=u({type:e,features:[j]});let i=e;return i})();var xt={provide:A,useExisting:c(()=>kt),multi:!0};var kt=(()=>{let e=class e extends oe{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=T,this.createValidator=t=>Ae}enabled(t){return t}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(n,s){n&2&&J("required",s._enabled?"":null)},inputs:{required:"required"},features:[h([xt]),d]});let i=e;return i})();var Gt={provide:A,useExisting:c(()=>jt),multi:!0},jt=(()=>{let e=class e extends oe{constructor(){super(...arguments),this.inputName="email",this.normalizeInput=T,this.createValidator=t=>Me}enabled(t){return t}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["","email","","formControlName",""],["","email","","formControl",""],["","email","","ngModel",""]],inputs:{email:"email"},features:[h([Gt]),d]});let i=e;return i})();var Tt={provide:A,useExisting:c(()=>Bt),multi:!0},Bt=(()=>{let e=class e extends oe{constructor(){super(...arguments),this.inputName="pattern",this.normalizeInput=t=>t,this.createValidator=t=>Ee(t)}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=p(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(n,s){n&2&&J("pattern",s._enabled?s.pattern:null)},inputs:{pattern:"pattern"},features:[h([Tt]),d]});let i=e;return i})();var We=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=E({type:e}),e.\u0275inj=M({imports:[Et]});let i=e;return i})();var fi=(()=>{let e=class e{static withConfig(t){return{ngModule:e,providers:[{provide:x,useValue:t.callSetDisabledState??Y}]}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=E({type:e}),e.\u0275inj=M({imports:[We]});let i=e;return i})(),pi=(()=>{let e=class e{static withConfig(t){return{ngModule:e,providers:[{provide:Ft,useValue:t.warnOnNgModelWithFormControl??"always"},{provide:x,useValue:t.callSetDisabledState??Y}]}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=E({type:e}),e.\u0275inj=M({imports:[We]});let i=e;return i})();export{b as a,ze as b,De as c,A as d,he as e,v as f,N as g,ai as h,li as i,Ct as j,bt as k,di as l,Mt as m,It as n,Le as o,ci as p,hi as q,kt as r,jt as s,Bt as t,fi as u,pi as v};
|