marketplacepos 3.14.1 → 3.15.1

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.
Files changed (100) hide show
  1. package/Marketplace/3rdpartylicenses.txt +61 -61
  2. package/Marketplace/chunk-2AMEIUWK.js +1 -0
  3. package/Marketplace/{chunk-2LGY3VGP.js → chunk-2L5RCILV.js} +1 -1
  4. package/Marketplace/chunk-2NRYBLX2.js +1 -0
  5. package/Marketplace/chunk-3I25MNEJ.js +6 -0
  6. package/Marketplace/chunk-3TNPJNQS.js +4 -0
  7. package/Marketplace/{chunk-HXDXTE2F.js → chunk-4BPLZVXV.js} +1 -1
  8. package/Marketplace/chunk-4HOIRUEO.js +1 -0
  9. package/Marketplace/{chunk-FZ7LVL4C.js → chunk-4URWFKAM.js} +1 -1
  10. package/Marketplace/{chunk-VOWLO2M7.js → chunk-572KOLLQ.js} +1 -1
  11. package/Marketplace/{chunk-IYV3772A.js → chunk-5B6FNQOB.js} +1 -1
  12. package/Marketplace/chunk-5BU6HQXL.js +1 -0
  13. package/Marketplace/chunk-5NDG3SUM.js +1 -0
  14. package/Marketplace/{chunk-2YXHLXID.js → chunk-6NFPCNPI.js} +1 -1
  15. package/Marketplace/{chunk-KWFES5F7.js → chunk-6NTRXLMW.js} +1 -1
  16. package/Marketplace/{chunk-WXUKZFAH.js → chunk-75FMUZX2.js} +1 -1
  17. package/Marketplace/chunk-AAFEUTPF.js +1 -0
  18. package/Marketplace/chunk-AMUX4WZH.js +2 -0
  19. package/Marketplace/{chunk-V4UFHWKE.js → chunk-AUMUHIAD.js} +1 -1
  20. package/Marketplace/{chunk-JDKWQEVP.js → chunk-B4SCNDB5.js} +1 -1
  21. package/Marketplace/{chunk-OQWLBQEH.js → chunk-BV6WKJBP.js} +1 -1
  22. package/Marketplace/{chunk-RMD2ZXUN.js → chunk-C62XLEFW.js} +1 -1
  23. package/Marketplace/chunk-CHPESC5O.js +1 -0
  24. package/Marketplace/{chunk-MVPTQRFO.js → chunk-CTKEWRX4.js} +1 -1
  25. package/Marketplace/{chunk-R7MYFLXJ.js → chunk-DSDMENCN.js} +2 -2
  26. package/Marketplace/{chunk-RXRML6X2.js → chunk-DTNJ6LRO.js} +1 -1
  27. package/Marketplace/{chunk-J47B3BJQ.js → chunk-E3LCGTRI.js} +1 -1
  28. package/Marketplace/{chunk-5WXM6HSA.js → chunk-EEOWKNSQ.js} +8 -8
  29. package/Marketplace/{chunk-FELGHSYN.js → chunk-G7GU37FJ.js} +1 -1
  30. package/Marketplace/chunk-GOR2LPT5.js +1 -0
  31. package/Marketplace/chunk-GP6U42SV.js +1 -0
  32. package/Marketplace/{chunk-EKCNJX26.js → chunk-GXHE2CDH.js} +1 -1
  33. package/Marketplace/chunk-HSFUKC7R.js +8 -0
  34. package/Marketplace/chunk-IAYFW5AU.js +1 -0
  35. package/Marketplace/chunk-IG2LDANH.js +1 -0
  36. package/Marketplace/{chunk-IPYNDMGQ.js → chunk-IJAO5VS5.js} +1 -1
  37. package/Marketplace/{chunk-Z3E6ZJZB.js → chunk-JQZFTRSI.js} +1 -1
  38. package/Marketplace/chunk-JSPMPN5T.js +22 -0
  39. package/Marketplace/chunk-K4IJAE56.js +1 -0
  40. package/Marketplace/{chunk-VQUUMT5F.js → chunk-KGSUB5OH.js} +1 -1
  41. package/Marketplace/{chunk-RZ7FKABW.js → chunk-M4JG6342.js} +1 -1
  42. package/Marketplace/{chunk-KCFS3M2K.js → chunk-N366YXEY.js} +1 -1
  43. package/Marketplace/chunk-NEQN5BMS.js +15 -0
  44. package/Marketplace/{chunk-JTJLVSTV.js → chunk-O5FN3DLG.js} +1 -1
  45. package/Marketplace/chunk-OCG3HG72.js +1 -0
  46. package/Marketplace/{chunk-YZ42FKNJ.js → chunk-ONKOEBKR.js} +1 -1
  47. package/Marketplace/{chunk-FGYTQIJ5.js → chunk-OR4XOUSV.js} +1 -1
  48. package/Marketplace/chunk-OXSGKWPW.js +1 -0
  49. package/Marketplace/{chunk-26HKN7YV.js → chunk-PUC6ODUE.js} +3 -3
  50. package/Marketplace/{chunk-KGINCJJU.js → chunk-PYCM3S43.js} +1 -1
  51. package/Marketplace/{chunk-KGNFBVTF.js → chunk-QITW54IW.js} +3 -3
  52. package/Marketplace/chunk-QKJFDGHL.js +1 -0
  53. package/Marketplace/chunk-QOA24ZLA.js +1 -0
  54. package/Marketplace/chunk-RER2OLD4.js +1 -0
  55. package/Marketplace/{chunk-PIIJRFHM.js → chunk-RKRJ4JOF.js} +1 -1
  56. package/Marketplace/chunk-RXDUUYMX.js +1 -0
  57. package/Marketplace/chunk-TLKDYQBN.js +1 -0
  58. package/Marketplace/{chunk-UHE3QQB5.js → chunk-TRGFX3AD.js} +1 -1
  59. package/Marketplace/chunk-UJL2GLHS.js +1 -0
  60. package/Marketplace/{chunk-4R22UO7N.js → chunk-UUNZHJ6W.js} +1 -1
  61. package/Marketplace/{chunk-YG3KQ63T.js → chunk-VHYFEAS2.js} +1 -1
  62. package/Marketplace/chunk-VUL363BT.js +2 -0
  63. package/Marketplace/chunk-VVKIT2K2.js +1 -0
  64. package/Marketplace/{chunk-CAXMTBHH.js → chunk-W5TR3NDM.js} +1 -1
  65. package/Marketplace/chunk-WDY3SIUY.js +1 -0
  66. package/Marketplace/{chunk-OY6H4LKT.js → chunk-WRS54BQ7.js} +3 -3
  67. package/Marketplace/{chunk-D7X76LHU.js → chunk-XNGU3O4O.js} +1 -1
  68. package/Marketplace/{chunk-S5GA4AVB.js → chunk-Y27IE54D.js} +1 -1
  69. package/Marketplace/{chunk-QZKWUCMY.js → chunk-ZG6JXFSY.js} +1 -1
  70. package/Marketplace/{chunk-MSVZKMTY.js → chunk-ZQLDSEY5.js} +1 -1
  71. package/Marketplace/index.html +55 -25
  72. package/Marketplace/main-XF2FUSJ6.js +1 -0
  73. package/Marketplace/{styles-BHJH7JG5.css → styles-K7GFOZYN.css} +1 -1
  74. package/package.json +1 -1
  75. package/Marketplace/chunk-3WGDHGSC.js +0 -36
  76. package/Marketplace/chunk-57XFPFTU.js +0 -1
  77. package/Marketplace/chunk-7OUOPJNV.js +0 -1
  78. package/Marketplace/chunk-B3LBEB32.js +0 -1
  79. package/Marketplace/chunk-C3YE27TZ.js +0 -8
  80. package/Marketplace/chunk-DSF55IXM.js +0 -1
  81. package/Marketplace/chunk-EJ5OYNY3.js +0 -1
  82. package/Marketplace/chunk-F63GNFZE.js +0 -1
  83. package/Marketplace/chunk-FTVIBNXQ.js +0 -1
  84. package/Marketplace/chunk-G6HY2OKZ.js +0 -1
  85. package/Marketplace/chunk-HIVRWPHI.js +0 -2
  86. package/Marketplace/chunk-HWUMVID7.js +0 -1
  87. package/Marketplace/chunk-JWI6NSSG.js +0 -1
  88. package/Marketplace/chunk-K7EHVRIN.js +0 -5
  89. package/Marketplace/chunk-L34D7YAZ.js +0 -1
  90. package/Marketplace/chunk-NCNHP5BH.js +0 -1
  91. package/Marketplace/chunk-QPRFFPO5.js +0 -1
  92. package/Marketplace/chunk-RX2NCNAM.js +0 -1
  93. package/Marketplace/chunk-UEZ3MCEP.js +0 -1
  94. package/Marketplace/chunk-V6L3NRY3.js +0 -1
  95. package/Marketplace/chunk-VOSKUYZN.js +0 -1
  96. package/Marketplace/chunk-ZWGSECG3.js +0 -2
  97. package/Marketplace/main-KVPKHKMN.js +0 -1
  98. /package/Marketplace/{chunk-IWVYX6KY.js → chunk-7KG3DC5J.js} +0 -0
  99. /package/Marketplace/{chunk-662E5VTA.js → chunk-BVIRHZTZ.js} +0 -0
  100. /package/Marketplace/{chunk-BSBYMQ7J.js → chunk-XHAXYWZ7.js} +0 -0
@@ -1 +0,0 @@
1
- import{a as Ce}from"./chunk-L34D7YAZ.js";import{a as oe}from"./chunk-662E5VTA.js";import{c as fe}from"./chunk-5WXM6HSA.js";import{a as ue,b as xe}from"./chunk-JTJLVSTV.js";import{c as de}from"./chunk-IPYNDMGQ.js";import{a as ge}from"./chunk-RMD2ZXUN.js";import{g as se}from"./chunk-KWFES5F7.js";import{g as ae}from"./chunk-KGNFBVTF.js";import{d as me,g as pe}from"./chunk-4R22UO7N.js";import{t as ce,u as _e}from"./chunk-MVPTQRFO.js";import{b as ee,h as te,k as ne,u as ie}from"./chunk-B3LBEB32.js";import{e as re,f as le}from"./chunk-QPRFFPO5.js";import{$a as m,$b as K,Bc as J,Cc as Q,Ha as v,Hb as b,Ia as r,Ib as p,Ja as I,Jb as k,Kb as y,Lb as H,Mb as O,Nb as D,Ob as N,Qb as Z,Sb as T,V as L,Za as s,Zb as $,_b as R,ac as w,c as W,ga as z,gb as P,hb as E,jb as M,kb as V,lb as c,mb as _,nb as S,oa as g,ob as x,pa as d,pb as f,qb as U,rb as C,sc as X,ub as h,uc as Y,vc as q,wb as a,xc as G,za as B,zb as A}from"./chunk-C3YE27TZ.js";var j=t=>[t],he=t=>({"text-decoration-line-through":t}),Te=t=>({"ms-10":t}),be=t=>({"bg-gradient-warning":t});function ve(t,l){if(t&1){let n=C();c(0,"mat-slide-toggle",14),h("toggleChange",function(){g(n);let e=a();return e.toggleStatus=!e.toggleStatus,d(e.onToggle())}),c(1,"small",15),p(2),_()()}if(t&2){let n=a();r(2),y(" ",n.productToggleTitle?n.productToggleTitle:"FILTER DIFFERENT INVENTORY"," ")}}function Se(t,l){if(t&1){let n=C();c(0,"th")(1,"input",16),N("ngModelChange",function(e){g(n);let o=a();return D(o.checkboxState,e)||(o.checkboxState=e),d(e)}),h("ngModelChange",function(){g(n);let e=a();return d(e.onCheckboxStateChange())}),_()()}if(t&2){let n=a();r(),O("ngModel",n.checkboxState)}}function ye(t,l){t&1&&(c(0,"th",11),p(1,"POS"),_())}function we(t,l){if(t&1&&(x(0),c(1,"th",17)(2,"div",18)(3,"div",19),S(4,"img",20),c(5,"div",21),p(6),$(7,"stringLimit"),_()()()(),f()),t&2){let n=l.$implicit;r(3),m("matTooltip",(n.Name==null?null:n.Name.length)>20?n.Name:""),r(),m("src",n==null?null:n.Img,v),r(2),H(" ",K(7,4,n.Name,20),"",(n.Name==null?null:n.Name.length)>20?"...":""," ")}}function Fe(t,l){t&1&&U(0)}function Ie(t,l){if(t&1&&(x(0),s(1,Fe,1,0,"ng-container",34),f()),t&2){a();let n=b(7);r(),m("ngTemplateOutlet",n)}}function Pe(t,l){t&1&&U(0)}function Ee(t,l){if(t&1&&s(0,Pe,1,0,"ng-container",34),t&2){a(2);let n=b(7);m("ngTemplateOutlet",n)}}function Me(t,l){if(t&1&&s(0,Ee,1,1,"ng-template",12),t&2){let n=a(4);m("ngxPermissionsOnly",T(1,j,n.rolePriceEdit))}}function Ve(t,l){if(t&1){let n=C();x(0),c(1,"input",35),N("ngModelChange",function(e){g(n);let o=a(4).$implicit;return D(o.selected,e)||(o.selected=e),d(e)}),h("ngModelChange",function(){g(n);let e=a(4).$implicit,o=a();return d(o.onCheckboxStateProduct(e.ID))}),_(),f()}if(t&2){let n=a(4).$implicit;r(),O("ngModel",n.selected)}}function ke(t,l){if(t&1&&s(0,Ve,2,1,"ng-container",22),t&2){let n=a(3).$implicit;m("ngIf",(n==null||n.Variants==null?null:n.Variants.length)>1)}}function Oe(t,l){if(t&1){let n=C();x(0),c(1,"img",36),h("click",function(e){g(n);let o=a(3).$implicit,u=a();return d(u.onZoomImage(e,o==null?null:o.ImageUrl))}),_(),f()}if(t&2){let n=a(3).$implicit;r(),A("src",n==null?null:n.ThumbnailUrl,v)}}function De(t,l){t&1&&S(0,"img",37)}function Ne(t,l){if(t&1&&(x(0),c(1,"td",29)(2,"div",30),s(3,Ie,2,1,"ng-container",31)(4,Me,1,3,"ng-template",null,0,w)(6,ke,1,1,"ng-template",null,1,w),c(8,"div",26),s(9,Oe,2,1,"ng-container",31)(10,De,1,0,"ng-template",null,2,w),_()()(),c(12,"td",32)(13,"div"),p(14),_(),c(15,"small",33),p(16),_()(),f()),t&2){let n=b(5),i=b(11),e=a(2).$implicit,o=a();r(),m("rowSpan",e==null?null:e.Variants.length),r(2),m("ngIf",o.table=="inventory")("ngIfElse",n),r(5),m("ngClass",T(9,Te,(e==null||e.Variants==null?null:e.Variants.length)<=1)),r(),m("ngIf",e==null?null:e.ThumbnailUrl)("ngIfElse",i),r(3),m("rowSpan",e==null?null:e.Variants.length),r(2),k(e==null?null:e.Name),r(2),y("(",e==null?null:e.Category,")")}}function $e(t,l){if(t&1){let n=C();c(0,"input",16),N("ngModelChange",function(e){g(n);let o=a(2).$implicit;return D(o.selected,e)||(o.selected=e),d(e)}),_()}if(t&2){let n=a(2).$implicit;O("ngModel",n.selected)}}function Be(t,l){if(t&1&&(c(0,"td",38),s(1,$e,1,1,"input",39),_()),t&2){let n=a().$implicit,i=a(2);r(),m("ngIf",i.printPOS(n)>=0||i.table=="price")}}function Ue(t,l){if(t&1&&(c(0,"td",24),p(1),$(2,"number"),_()),t&2){let n=a().$implicit,i=a(2);r(),k(R(2,1,i.printPOS(n)))}}function Re(t,l){if(t&1){let n=C();x(0),c(1,"td",40),h("click",function(){g(n);let e=a().$implicit,o=a().$implicit,u=a().$implicit,F=a();return d(F.openTableDialog(u.Name,o,e.ID,u.ChannelItemID))}),c(2,"div",30)(3,"div",41),p(4),$(5,"number"),_(),c(6,"a",42),h("click",function(e){return g(n),d(e==null?null:e.stopPropagation())}),S(7,"i",28),_()()(),f()}if(t&2){let n=l.$implicit,i=a(2).$implicit,e=a(2);r(),m("ngClass",T(5,be,e.printPOS(i)!=e.printItem(n))),r(3),y(" ",R(5,3,e.printItem(n))," "),r(2),m("href",n.Url,v)}}function je(t,l){t&1&&(c(0,"td",43)(1,"div",30)(2,"span"),p(3,"X"),_()()())}function We(t,l){if(t&1&&s(0,Re,8,7,"ng-container",31)(1,je,4,0,"ng-template",null,3,w),t&2){let n=l.$implicit,i=b(2),e=a().$implicit,o=a(2);m("ngIf",o.getItemFromChannel(e,n.ID))("ngIfElse",i)}}function Le(t,l){if(t&1&&(c(0,"tr"),s(1,Ne,17,11,"ng-container",22),c(2,"td",23),p(3),_(),c(4,"td",24)(5,"div",25)(6,"div",26),p(7),_(),c(8,"div",21)(9,"a",27),S(10,"i",28),_()()()(),s(11,Be,2,1,"ng-template",12)(12,Ue,3,3,"td",24),M(13,We,3,2,null,null,E),_()),t&2){let n=l.$implicit,i=l.$index,e=a(2);r(),m("ngIf",i==0),r(2),k(n==null?null:n.Model),r(2),m("matTooltip",n.Discontinued?e.discontinuedVariantMsg:""),r(),m("ngClass",T(8,he,n.Discontinued)),r(),y(" ",n.Code," "),r(2),m("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(n==null?null:n.ID),v),r(2),m("ngxPermissionsOnly",T(10,j,e.rolePriceEdit)),r(),P(e.filter!=null&&e.filter.HiddenIPOSInventory?-1:12),r(),V(e.channel)}}function ze(t,l){if(t&1&&(c(0,"tbody"),M(1,Le,15,12,"tr",null,E),_()),t&2){let n=l.$implicit;r(),V(n.Variants)}}var ft=(()=>{let l=class l{constructor(i,e,o){this.dialog=i,this.biggerPictureService=e,this.authService=o,this.showProductToggle=!1,this.toggleStatus=!1,this.checkboxState=!1,this.rolePriceEdit=oe.price,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.onSubmit=new B,this.destroy$=new W,this.toggle=new B,this.hostName=this.authService.getDomain()}ngOnInit(){this.table=="inventory"?this.stockHeader="Stock":this.table=="price"&&(this.stockHeader="Price")}onCheckboxStateProduct(i){let e=this.data.filter(o=>o.ID==i);e.length>0&&(e=e.map(o=>(o.Variants=o.Variants.map(u=>(u.selected=o.selected,u)),o)))}onCheckboxStateChange(){this.data=this.data.map(i=>(i.Variants=i.Variants.map(e=>(e.selected=this.checkboxState,e)),i))}getItemFromChannel(i,e){return i.Channel.find(o=>o.ChannelID==e)}printItem(i){if(this.table=="inventory")return i.Inventory;if(this.table=="price")return i.Price}openTableDialog(i,e,o,u){this.dialog.open(Ce,{data:{Name:i,Variant:e,ChannelID:o,Table:this.table,ChannelItemID:u}}).afterClosed().pipe(L(this.destroy$)).subscribe(F=>{F!=null&&this.onSubmit.emit(F)})}printPOS(i){return this.table=="inventory"?i.Inventory?i.Inventory:0:this.table=="price"?i.UnitPrice:null}onToggle(){this.toggle.emit(this.toggleStatus)}onZoomImage(i,e){this.biggerPictureService.openBiggerPicture(i,e)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};l.\u0275fac=function(e){return new(e||l)(I(me),I(ge),I(ae))},l.\u0275cmp=z({type:l,selectors:[["app-table"]],inputs:{filter:"filter",data:"data",table:"table",channel:"channel",showProductToggle:"showProductToggle",productToggleTitle:"productToggleTitle"},outputs:{onSubmit:"onSubmit",toggle:"onToggle"},standalone:!0,features:[Z],decls:18,vars:6,consts:[["PRICE",""],["checkbox_update",""],["elsePic",""],["elseCol",""],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","w-25"],[1,"w-100"],[2,"width","200px"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],[3,"ngxPermissionsOnly"],[4,"ngFor","ngForOf"],[2,"width","200px",3,"toggleChange"],[1,"fw-bold"],["type","checkbox",3,"ngModelChange","ngModel"],["scope","col"],[1,"w-100","d-flex","align-items-center","justify-content-center"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],[4,"ngIf"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-end",3,"matTooltip"],[3,"ngClass"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt","external-link-custom"],[1,"text-center",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-center"],[4,"ngIf","ngIfElse"],[1,"text-start",2,"padding-left","0px",3,"rowSpan"],[1,"mt-1"],[4,"ngTemplateOutlet"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"align-middle"],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],[1,"p-0","pointer","cell-hover",3,"click","ngClass"],[1,"me-2","mt-1"],["target","_blank",3,"click","href"],[1,"table-white","text-center",2,"color","red"]],template:function(e,o){e&1&&(c(0,"div",4)(1,"table",5)(2,"thead",6)(3,"tr")(4,"th",7)(5,"div",8)(6,"div"),p(7,"Product"),_(),s(8,ve,3,1,"mat-slide-toggle",9),_()(),c(9,"th",10),p(10,"Variant"),_(),c(11,"th",11),p(12,"SKU"),_(),s(13,Se,2,1,"ng-template",12)(14,ye,2,0,"th",11)(15,we,8,7,"ng-container",13),_()(),M(16,ze,3,0,"tbody",null,E),_()()),e&2&&(r(8),P(o.showProductToggle?8:-1),r(5),m("ngxPermissionsOnly",T(4,j,o.rolePriceEdit)),r(),P(o.filter!=null&&o.filter.HiddenIPOSInventory?-1:14),r(),m("ngForOf",o.channel),r(),V(o.data))},dependencies:[Q,X,Y,q,G,J,ie,ee,te,ne,xe,ue,pe,se,de,le,re,_e,ce,fe],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}.text-wrapping[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:88px}.cell-hover[_ngcontent-%COMP%]{width:400px!important}"]});let t=l;return t})();export{ft as a};
@@ -1 +0,0 @@
1
- import{a as te}from"./chunk-57XFPFTU.js";import{a as ee}from"./chunk-VOWLO2M7.js";import{a as I}from"./chunk-BSBYMQ7J.js";import{b as N,c as ne}from"./chunk-L34D7YAZ.js";import"./chunk-YG3KQ63T.js";import"./chunk-662E5VTA.js";import{a as Z}from"./chunk-5WXM6HSA.js";import"./chunk-JTJLVSTV.js";import"./chunk-IPYNDMGQ.js";import"./chunk-RMD2ZXUN.js";import"./chunk-KWFES5F7.js";import{g as $}from"./chunk-KGNFBVTF.js";import{b as j,e as G}from"./chunk-DSF55IXM.js";import"./chunk-KCDL7SWP.js";import{d as q,l as X,m as Y}from"./chunk-4R22UO7N.js";import"./chunk-MVPTQRFO.js";import"./chunk-EKCNJX26.js";import{c as W,h as z,k as H,m as K,u as Q}from"./chunk-B3LBEB32.js";import{c as J}from"./chunk-QPRFFPO5.js";import{$a as d,B as V,Cc as U,Ia as u,Ib as y,Ja as h,Mb as b,Nb as P,Ob as M,Pb as R,Qb as O,X as D,Za as _,Zb as f,_b as S,da as F,ga as T,lb as l,mb as p,nb as E,oa as s,ob as L,pa as c,pb as B,rb as v,ub as C,vc as k,wb as o,yc as A}from"./chunk-C3YE27TZ.js";import"./chunk-GNOSNGXM.js";function ie(a,r){if(a&1){let n=v();l(0,"button",14),C("click",function(){s(n);let t=o().ngIf,i=o(2);return c(i.onUpdateItems(t))}),E(1,"i",15),y(2," Update "),p()}}function ae(a,r){if(a&1&&(l(0,"actions")(1,"div",12),_(2,ie,3,0,"button",13),p()()),a&2){let n=r.ngIf,e=o(2);u(2),d("ngIf",e.productService.hasSelectionVariant(n))}}function oe(a,r){if(a&1){let n=v();L(0),l(1,"app-table",16),C("onToggle",function(t){s(n);let i=o(2);return c(i.onShowDifferenceStock(t))})("onSubmit",function(t){s(n);let i=o(2);return c(i.updateStockByVariant(t))}),p(),B()}if(a&2){let n=r.ngIf,e=o(2);u(),d("data",n)("channel",e.channelOptions)("showProductToggle",!0)("filter",e.searchFilter)}}function re(a,r){if(a&1){let n=v();l(0,"mainpanel",1),C("onSubmit",function(t){s(n);let i=o();return c(i.onSearch(t))}),_(1,ae,3,1,"actions",2),f(2,"async"),l(3,"filters")(4,"div")(5,"label",3),y(6,"PageNumber"),p(),l(7,"input",4),M("ngModelChange",function(t){s(n);let i=o();return P(i.searchFilter.PageNumber,t)||(i.searchFilter.PageNumber=t),c(t)}),p()(),l(8,"div",5)(9,"label",6),y(10,"Page Size"),p(),l(11,"input",7),M("ngModelChange",function(t){s(n);let i=o();return P(i.searchFilter.RowCount,t)||(i.searchFilter.RowCount=t),c(t)}),p()()(),l(12,"content")(13,"div",8)(14,"div",9)(15,"div",10),_(16,oe,2,4,"ng-container",2),f(17,"async"),l(18,"infinite-paginator",11),f(19,"async"),C("onNextPage",function(){s(n);let t=o();return c(t.paginationService.onNextPage(t.searchFilter))})("onLastPage",function(){s(n);let t=o();return c(t.paginationService.onLastPage(t.searchFilter))})("onGetRowCount",function(){s(n);let t=o();return c(t.paginationService.getRowCount(t.searchFilter))}),p()()()()()()}if(a&2){let n=o();d("pageData",n.pageData)("hideSearchBox",!1)("textButton","Search"),u(),d("ngIf",S(2,13,n.paginationService.data$)),u(6),b("ngModel",n.searchFilter.PageNumber),u(4),b("ngModel",n.searchFilter.RowCount),u(5),d("ngIf",S(17,15,n.paginationService.data$)),u(2),d("totalData",n.paginationService.totalData())("hideCount",n.paginationService.hideCount())("rowCount",S(19,17,n.paginationService.totalRowCount$))("pageNumber",n.paginationService.pageNumber())("disableNextButton",n.paginationService.disableNextButton())("goToLastPage",n.paginationService.isLastPage())}}var Ve=(()=>{let r=class r{constructor(e,t,i,g,x){this.http=e,this.toastr=t,this.dialog=i,this.productService=g,this.authService=x,this.paginationService=F(N),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.paginationService.fethRowCountEndpoint=this.allDataCountEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(D(e=>{e.Filter={PageNumber:e.Filter.PageNumber,filterModel:I.ALL,RowCount:e.Filter.PageSize,HiddenIPOSInventory:e.Filter.HiddenIPOSInventory},this.searchFilter=e.Filter,this.paginationService.reloadPagination(this.searchFilter)}))}onSearch(e){this.searchFilter.text=e,this.paginationService.reloadPagination(this.searchFilter)}updateStock(e,t){let i=this.productService.selectedVariantProduct(e);if(i.length>0){let x=i.map(m=>({ID:m.ID,Code:m.Code,Inventory:m.Inventory}));var g=t.filter(m=>m.selected).map(m=>m.ID);let w={ListChannelID:g,List:x};this.http.post("/api/Inventory/UpdateChannel",w).subscribe(m=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+w.List.length+" variants in "+w.ListChannelID.length+" channels","Success")})}}updateStockByVariant(e){let t={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,NewQuantity:parseFloat(e.Inventory),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Inventory/UpdateQuantityByItem",t).subscribe(i=>{this.paginationService.reloadPagination(this.searchFilter);let g=this.productService.findChannelById(t.ID,this.channelOptions);this.toastr.success("Successfully updated "+e.ItemName+"("+e.VarName+") inventory in "+g.Name+" to "+t.NewQuantity,"Success")})}onShowDifferenceStock(e){e?this.searchFilter.filterModel=I.DIFFERENCE:this.searchFilter.filterModel=I.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(e){let t=this.productService.selectedVariantProduct(e);this.dialog.open(ee,{data:{selectedItems:t,channels:JSON.parse(JSON.stringify(this.channelOptions))},width:"600px"}).afterClosed().pipe(V(i=>J.IsNotEmpty(i))).subscribe(i=>{this.updateStock(e,i)})}};r.\u0275fac=function(t){return new(t||r)(h(G),h(j),h(q),h(Z),h($))},r.\u0275cmp=T({type:r,selectors:[["app-multi-channel-comparison"]],standalone:!0,features:[R([N]),O],decls:2,vars:3,consts:[["headerTitle","Inventory Comparison",3,"pageData","hideSearchBox","textButton","onSubmit",4,"ngIf"],["headerTitle","Inventory Comparison",3,"onSubmit","pageData","hideSearchBox","textButton"],[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,"ngModelChange","ngModel"],[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,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[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,"onToggle","onSubmit","data","channel","showProductToggle","filter"]],template:function(t,i){t&1&&(_(0,re,20,19,"mainpanel",0),f(1,"async")),t&2&&d("ngIf",S(1,1,i.loader$))},dependencies:[U,k,A,Y,X,te,Q,W,K,z,H,ne],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let a=r;return a})();export{Ve as MultiChannelComparison};
@@ -1 +0,0 @@
1
- import{Ja as a,Oa as O,Pb as f,Ua as A,Wa as c,Z as U,_ as h,_a as oe,aa as H,ba as D,bb as ae,c as ve,dc as Ve,ha as L,ia as u,ic as De,jc as W,lc as M,m as ye,mc as v,na as $,pc as le,q as _e,sa as m,ub as y,w as Ce,ya as S,za as b}from"./chunk-C3YE27TZ.js";import{a as d,b as p}from"./chunk-GNOSNGXM.js";var xe=(()=>{let e=class e{constructor(t,r){this._renderer=t,this._elementRef=r,this.onChange=s=>{},this.onTouched=()=>{}}setProperty(t,r){this._renderer.setProperty(this._elementRef.nativeElement,t,r)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}};e.\u0275fac=function(r){return new(r||e)(a(O),a(S))},e.\u0275dir=u({type:e});let i=e;return i})(),R=(()=>{let e=class e extends xe{};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=m(e)))(s||e)}})(),e.\u0275dir=u({type:e,features:[c]});let i=e;return i})(),F=new D(""),nt={provide:F,useExisting:h(()=>rt),multi:!0},rt=(()=>{let e=class e extends R{writeValue(t){this.setProperty("checked",t)}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=m(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(r,s){r&1&&y("change",function(l){return s.onChange(l.target.checked)})("blur",function(){return s.onTouched()})},features:[f([nt]),c]});let i=e;return i})(),st={provide:F,useExisting:h(()=>Ne),multi:!0};function ot(){let i=le()?le().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var at=new D(""),Ne=(()=>{let e=class e extends xe{constructor(t,r,s){super(t,r),this._compositionMode=s,this._composing=!1,this._compositionMode==null&&(this._compositionMode=!ot())}writeValue(t){let r=t??"";this.setProperty("value",r)}_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(r){return new(r||e)(a(O),a(S),a(at,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(r,s){r&1&&y("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:[f([st]),c]});let i=e;return i})();function _(i){return i==null||(typeof i=="string"||Array.isArray(i))&&i.length===0}function Pe(i){return i!=null&&typeof i.length=="number"}var I=new D(""),he=new D(""),lt=/^(?=.{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])?)*$/,be=class{static min(e){return ut(e)}static max(e){return ct(e)}static required(e){return ke(e)}static requiredTrue(e){return dt(e)}static email(e){return Ge(e)}static minLength(e){return ht(e)}static maxLength(e){return ft(e)}static pattern(e){return Te(e)}static nullValidator(e){return z(e)}static compose(e){return Le(e)}static composeAsync(e){return $e(e)}};function ut(i){return e=>{if(_(e.value)||_(i))return null;let n=parseFloat(e.value);return!isNaN(n)&&n<i?{min:{min:i,actual:e.value}}:null}}function ct(i){return e=>{if(_(e.value)||_(i))return null;let n=parseFloat(e.value);return!isNaN(n)&&n>i?{max:{max:i,actual:e.value}}:null}}function ke(i){return _(i.value)?{required:!0}:null}function dt(i){return i.value===!0?null:{required:!0}}function Ge(i){return _(i.value)||lt.test(i.value)?null:{email:!0}}function ht(i){return e=>_(e.value)||!Pe(e.value)?null:e.value.length<i?{minlength:{requiredLength:i,actualLength:e.value.length}}:null}function ft(i){return e=>Pe(e.value)&&e.value.length>i?{maxlength:{requiredLength:i,actualLength:e.value.length}}:null}function Te(i){if(!i)return z;let e,n;return typeof i=="string"?(n="",i.charAt(0)!=="^"&&(n+="^"),n+=i,i.charAt(i.length-1)!=="$"&&(n+="$"),e=new RegExp(n)):(n=i.toString(),e=i),t=>{if(_(t.value))return null;let r=t.value;return e.test(r)?null:{pattern:{requiredPattern:n,actualValue:r}}}}function z(i){return null}function Re(i){return i!=null}function je(i){return Ve(i)?ye(i):i}function Be(i){let e={};return i.forEach(n=>{e=n!=null?d(d({},e),n):e}),Object.keys(e).length===0?null:e}function Ue(i,e){return e.map(n=>n(i))}function pt(i){return!i.validate}function He(i){return i.map(e=>pt(e)?e:n=>e.validate(n))}function Le(i){if(!i)return null;let e=i.filter(Re);return e.length==0?null:function(n){return Be(Ue(n,e))}}function fe(i){return i!=null?Le(He(i)):null}function $e(i){if(!i)return null;let e=i.filter(Re);return e.length==0?null:function(n){let t=Ue(n,e).map(je);return Ce(t).pipe(_e(Be))}}function pe(i){return i!=null?$e(He(i)):null}function Ae(i,e){return i===null?[e]:Array.isArray(i)?[...i,e]:[i,e]}function We(i){return i._rawValidators}function qe(i){return i._rawAsyncValidators}function ue(i){return i?Array.isArray(i)?i:[i]:[]}function Z(i,e){return Array.isArray(i)?i.includes(e):i===e}function Me(i,e){let n=ue(e);return ue(i).forEach(r=>{Z(n,r)||n.push(r)}),n}function Ee(i,e){return ue(e).filter(n=>!Z(i,n))}var X=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=fe(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=pe(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,n){return this.control?this.control.hasError(e,n):!1}getError(e,n){return this.control?this.control.getError(e,n):null}},C=class extends X{get formDirective(){return null}get path(){return null}},T=class extends X{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},Y=class{constructor(e){this._cd=e}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},gt={"[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"},mi=p(d({},gt),{"[class.ng-submitted]":"isSubmitted"}),vi=(()=>{let e=class e extends Y{constructor(t){super(t)}};e.\u0275fac=function(r){return new(r||e)(a(T,2))},e.\u0275dir=u({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(r,s){r&2&&ae("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:[c]});let i=e;return i})(),yi=(()=>{let e=class e extends Y{constructor(t){super(t)}};e.\u0275fac=function(r){return new(r||e)(a(C,10))},e.\u0275dir=u({type:e,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(r,s){r&2&&ae("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:[c]});let i=e;return i})();var x="VALID",q="INVALID",E="PENDING",N="DISABLED",V=class{},K=class extends V{constructor(e,n){super(),this.value=e,this.source=n}},k=class extends V{constructor(e,n){super(),this.pristine=e,this.source=n}},G=class extends V{constructor(e,n){super(),this.touched=e,this.source=n}},w=class extends V{constructor(e,n){super(),this.status=e,this.source=n}},ce=class extends V{constructor(e){super(),this.source=e}},de=class extends V{constructor(e){super(),this.source=e}};function ze(i){return(ne(i)?i.validators:i)||null}function mt(i){return Array.isArray(i)?fe(i):i||null}function Ze(i,e){return(ne(e)?e.asyncValidators:i)||null}function vt(i){return Array.isArray(i)?pe(i):i||null}function ne(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}function yt(i,e,n){let t=i.controls;if(!(e?Object.keys(t):t).length)throw new U(1e3,"");if(!t[n])throw new U(1001,"")}function _t(i,e,n){i._forEachChild((t,r)=>{if(n[r]===void 0)throw new U(1002,"")})}var J=class{constructor(e,n){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=null,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this._status=M(()=>this.statusReactive()),this.statusReactive=A(void 0),this._pristine=M(()=>this.pristineReactive()),this.pristineReactive=A(!0),this._touched=M(()=>this.touchedReactive()),this.touchedReactive=A(!1),this._events=new ve,this.events=this._events.asObservable(),this._onDisabledChange=[],this._assignValidators(e),this._assignAsyncValidators(n)}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 status(){return v(this.statusReactive)}set status(e){v(()=>this.statusReactive.set(e))}get valid(){return this.status===x}get invalid(){return this.status===q}get pending(){return this.status==E}get disabled(){return this.status===N}get enabled(){return this.status!==N}get pristine(){return v(this.pristineReactive)}set pristine(e){v(()=>this.pristineReactive.set(e))}get dirty(){return!this.pristine}get touched(){return v(this.touchedReactive)}set touched(e){v(()=>this.touchedReactive.set(e))}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(Me(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(Me(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(Ee(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(Ee(e,this._rawAsyncValidators))}hasValidator(e){return Z(this._rawValidators,e)}hasAsyncValidator(e){return Z(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let n=this.touched===!1;this.touched=!0;let t=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsTouched(p(d({},e),{sourceControl:t})),n&&e.emitEvent!==!1&&this._events.next(new G(!0,t))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(n=>n.markAllAsTouched(e))}markAsUntouched(e={}){let n=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let t=e.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:t})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,t),n&&e.emitEvent!==!1&&this._events.next(new G(!1,t))}markAsDirty(e={}){let n=this.pristine===!0;this.pristine=!1;let t=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsDirty(p(d({},e),{sourceControl:t})),n&&e.emitEvent!==!1&&this._events.next(new k(!1,t))}markAsPristine(e={}){let n=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let t=e.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e,t),n&&e.emitEvent!==!1&&this._events.next(new k(!0,t))}markAsPending(e={}){this.status=E;let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new w(this.status,n)),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.markAsPending(p(d({},e),{sourceControl:n}))}disable(e={}){let n=this._parentMarkedDirty(e.onlySelf);this.status=N,this.errors=null,this._forEachChild(r=>{r.disable(p(d({},e),{onlySelf:!0}))}),this._updateValue();let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new K(this.value,t)),this._events.next(new w(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(p(d({},e),{skipPristineCheck:n}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let n=this._parentMarkedDirty(e.onlySelf);this.status=x,this._forEachChild(t=>{t.enable(p(d({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(p(d({},e),{skipPristineCheck:n}),this),this._onDisabledChange.forEach(t=>t(!1))}_updateAncestors(e,n){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine({},n),this._parent._updateTouched({},n))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let t=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===x||this.status===E)&&this._runAsyncValidator(t,e.emitEvent)}let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new K(this.value,n)),this._events.next(new w(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(p(d({},e),{sourceControl:n}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(n=>n._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?N:x}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,n){if(this.asyncValidator){this.status=E,this._hasOwnPendingAsyncValidator={emitEvent:n!==!1};let t=je(this.asyncValidator(this));this._asyncValidationSubscription=t.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:n,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,n={}){this.errors=e,this._updateControlsErrors(n.emitEvent!==!1,this,n.shouldHaveEmitted)}get(e){let n=e;return n==null||(Array.isArray(n)||(n=n.split(".")),n.length===0)?null:n.reduce((t,r)=>t&&t._find(r),this)}getError(e,n){let t=n?this.get(n):this;return t&&t.errors?t.errors[e]:null}hasError(e,n){return!!this.getError(e,n)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,n,t){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||t)&&this._events.next(new w(this.status,n)),this._parent&&this._parent._updateControlsErrors(e,n,t)}_initObservables(){this.valueChanges=new b,this.statusChanges=new b}_calculateStatus(){return this._allControlsDisabled()?N:this.errors?q:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(E)?E:this._anyControlsHaveStatus(q)?q:x}_anyControlsHaveStatus(e){return this._anyControls(n=>n.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,n){let t=!this._anyControlsDirty(),r=this.pristine!==t;this.pristine=t,this._parent&&!e.onlySelf&&this._parent._updatePristine(e,n),r&&this._events.next(new k(this.pristine,n))}_updateTouched(e={},n){this.touched=this._anyControlsTouched(),this._events.next(new G(this.touched,n)),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,n)}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){ne(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){let n=this._parent&&this._parent.dirty;return!e&&!!n&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=mt(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=vt(this._rawAsyncValidators)}},Q=class extends J{constructor(e,n,t){super(ze(n),Ze(t,n)),this.controls=e,this._initObservables(),this._setUpdateStrategy(n),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,n){return this.controls[e]?this.controls[e]:(this.controls[e]=n,n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange),n)}addControl(e,n,t={}){this.registerControl(e,n),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}removeControl(e,n={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}setControl(e,n,t={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],n&&this.registerControl(e,n),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,n={}){_t(this,!0,e),Object.keys(e).forEach(t=>{yt(this,!0,t),this.controls[t].setValue(e[t],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}patchValue(e,n={}){e!=null&&(Object.keys(e).forEach(t=>{let r=this.controls[t];r&&r.patchValue(e[t],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n))}reset(e={},n={}){this._forEachChild((t,r)=>{t.reset(e?e[r]:null,{onlySelf:!0,emitEvent:n.emitEvent})}),this._updatePristine(n,this),this._updateTouched(n,this),this.updateValueAndValidity(n)}getRawValue(){return this._reduceChildren({},(e,n,t)=>(e[t]=n.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(n,t)=>t._syncPendingControls()?!0:n);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(n=>{let t=this.controls[n];t&&e(t,n)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(let[n,t]of Object.entries(this.controls))if(this.contains(n)&&e(t))return!0;return!1}_reduceValue(){let e={};return this._reduceChildren(e,(n,t,r)=>((t.enabled||this.disabled)&&(n[r]=t.value),n))}_reduceChildren(e,n){let t=e;return this._forEachChild((r,s)=>{t=n(t,r,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 j=new D("CallSetDisabledState",{providedIn:"root",factory:()=>re}),re="always";function Ct(i,e){return[...e.path,i]}function ee(i,e,n=re){ge(i,e),e.valueAccessor.writeValue(i.value),(i.disabled||n==="always")&&e.valueAccessor.setDisabledState?.(i.disabled),Dt(i,e),At(i,e),bt(i,e),Vt(i,e)}function we(i,e,n=!0){let t=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(t),e.valueAccessor.registerOnTouched(t)),ie(i,e),i&&(e._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function te(i,e){i.forEach(n=>{n.registerOnValidatorChange&&n.registerOnValidatorChange(e)})}function Vt(i,e){if(e.valueAccessor.setDisabledState){let n=t=>{e.valueAccessor.setDisabledState(t)};i.registerOnDisabledChange(n),e._registerOnDestroy(()=>{i._unregisterOnDisabledChange(n)})}}function ge(i,e){let n=We(i);e.validator!==null?i.setValidators(Ae(n,e.validator)):typeof n=="function"&&i.setValidators([n]);let t=qe(i);e.asyncValidator!==null?i.setAsyncValidators(Ae(t,e.asyncValidator)):typeof t=="function"&&i.setAsyncValidators([t]);let r=()=>i.updateValueAndValidity();te(e._rawValidators,r),te(e._rawAsyncValidators,r)}function ie(i,e){let n=!1;if(i!==null){if(e.validator!==null){let r=We(i);if(Array.isArray(r)&&r.length>0){let s=r.filter(o=>o!==e.validator);s.length!==r.length&&(n=!0,i.setValidators(s))}}if(e.asyncValidator!==null){let r=qe(i);if(Array.isArray(r)&&r.length>0){let s=r.filter(o=>o!==e.asyncValidator);s.length!==r.length&&(n=!0,i.setAsyncValidators(s))}}}let t=()=>{};return te(e._rawValidators,t),te(e._rawAsyncValidators,t),n}function Dt(i,e){e.valueAccessor.registerOnChange(n=>{i._pendingValue=n,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&Xe(i,e)})}function bt(i,e){e.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&Xe(i,e),i.updateOn!=="submit"&&i.markAsTouched()})}function Xe(i,e){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function At(i,e){let n=(t,r)=>{e.valueAccessor.writeValue(t),r&&e.viewToModelUpdate(t)};i.registerOnChange(n),e._registerOnDestroy(()=>{i._unregisterOnChange(n)})}function Ye(i,e){i==null,ge(i,e)}function Mt(i,e){return ie(i,e)}function Et(i,e){if(!i.hasOwnProperty("model"))return!1;let n=i.model;return n.isFirstChange()?!0:!Object.is(e,n.currentValue)}function wt(i){return Object.getPrototypeOf(i.constructor)===R}function Ke(i,e){i._syncPendingControls(),e.forEach(n=>{let t=n.control;t.updateOn==="submit"&&t._pendingChange&&(n.viewToModelUpdate(t._pendingValue),t._pendingChange=!1)})}function Ft(i,e){if(!e)return null;Array.isArray(e);let n,t,r;return e.forEach(s=>{s.constructor===Ne?n=s:wt(s)?t=s:r=s}),r||t||n||null}function It(i,e){let n=i.indexOf(e);n>-1&&i.splice(n,1)}var St={provide:C,useExisting:h(()=>Ot)},P=Promise.resolve(),Ot=(()=>{let e=class e extends C{get submitted(){return v(this.submittedReactive)}constructor(t,r,s){super(),this.callSetDisabledState=s,this._submitted=M(()=>this.submittedReactive()),this.submittedReactive=A(!1),this._directives=new Set,this.ngSubmit=new b,this.form=new Q({},fe(t),pe(r))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){P.then(()=>{let r=this._findContainer(t.path);t.control=r.registerControl(t.name,t.control),ee(t.control,t,this.callSetDisabledState),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){P.then(()=>{let r=this._findContainer(t.path);r&&r.removeControl(t.name),this._directives.delete(t)})}addFormGroup(t){P.then(()=>{let r=this._findContainer(t.path),s=new Q({});Ye(s,t),r.registerControl(t.name,s),s.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){P.then(()=>{let r=this._findContainer(t.path);r&&r.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,r){P.then(()=>{this.form.get(t.path).setValue(r)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submittedReactive.set(!0),Ke(this.form,this._directives),this.ngSubmit.emit(t),t?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this.submittedReactive.set(!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(r){return new(r||e)(a(I,10),a(he,10),a(j,8))},e.\u0275dir=u({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(r,s){r&1&&y("submit",function(l){return s.onSubmit(l)})("reset",function(){return s.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[f([St]),c]});let i=e;return i})();function Fe(i,e){let n=i.indexOf(e);n>-1&&i.splice(n,1)}function Ie(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var Je=class extends J{constructor(e=null,n,t){super(ze(n),Ze(t,n)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(e),this._setUpdateStrategy(n),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),ne(n)&&(n.nonNullable||n.initialValueIsDefault)&&(Ie(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,n={}){this.value=this._pendingValue=e,this._onChange.length&&n.emitModelToViewChange!==!1&&this._onChange.forEach(t=>t(this.value,n.emitViewToModelChange!==!1)),this.updateValueAndValidity(n)}patchValue(e,n={}){this.setValue(e,n)}reset(e=this.defaultValue,n={}){this._applyFormState(e),this.markAsPristine(n),this.markAsUntouched(n),this.setValue(this.value,n),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){Fe(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){Fe(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){Ie(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 xt=i=>i instanceof Je;var Nt={provide:T,useExisting:h(()=>Pt)},Se=Promise.resolve(),Pt=(()=>{let e=class e extends T{constructor(t,r,s,o,l,g){super(),this._changeDetectorRef=l,this.callSetDisabledState=g,this.control=new Je,this._registered=!1,this.name="",this.update=new b,this._parent=t,this._setValidators(r),this._setAsyncValidators(s),this.valueAccessor=Ft(this,o)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){let r=t.name.previousValue;this.formDirective.removeControl({name:r,path:this._getPath(r)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),Et(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(){ee(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){Se.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let r=t.isDisabled.currentValue,s=r!==0&&W(r);Se.then(()=>{s&&!this.control.disabled?this.control.disable():!s&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?Ct(t,this._parent):[t]}};e.\u0275fac=function(r){return new(r||e)(a(C,9),a(I,10),a(he,10),a(F,10),a(De,8),a(j,8))},e.\u0275dir=u({type:e,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[f([Nt]),c,$]});let i=e;return i})(),Ci=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=u({type:e,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]});let i=e;return i})(),kt={provide:F,useExisting:h(()=>Gt),multi:!0},Gt=(()=>{let e=class e extends R{writeValue(t){let r=t??"";this.setProperty("value",r)}registerOnChange(t){this.onChange=r=>{t(r==""?null:parseFloat(r))}}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=m(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(r,s){r&1&&y("input",function(l){return s.onChange(l.target.value)})("blur",function(){return s.onTouched()})},features:[f([kt]),c]});let i=e;return i})();var Tt=new D("");var Rt={provide:C,useExisting:h(()=>jt)},jt=(()=>{let e=class e extends C{get submitted(){return v(this._submittedReactive)}set submitted(t){this._submittedReactive.set(t)}constructor(t,r,s){super(),this.callSetDisabledState=s,this._submitted=M(()=>this._submittedReactive()),this._submittedReactive=A(!1),this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new b,this._setValidators(t),this._setAsyncValidators(r)}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(ie(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 r=this.form.get(t.path);return ee(r,t,this.callSetDisabledState),r.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),r}getControl(t){return this.form.get(t.path)}removeControl(t){we(t.control||null,t,!1),It(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,r){this.form.get(t.path).setValue(r)}onSubmit(t){return this._submittedReactive.set(!0),Ke(this.form,this.directives),this.ngSubmit.emit(t),this.form._events.next(new ce(this.control)),t?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this._submittedReactive.set(!1),this.form._events.next(new de(this.form))}_updateDomValue(){this.directives.forEach(t=>{let r=t.control,s=this.form.get(t.path);r!==s&&(we(r||null,t),xt(s)&&(ee(s,t,this.callSetDisabledState),t.control=s))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){let r=this.form.get(t.path);Ye(r,t),r.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){let r=this.form.get(t.path);r&&Mt(r,t)&&r.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){ge(this.form,this),this._oldForm&&ie(this._oldForm,this)}_checkFormPresent(){this.form}};e.\u0275fac=function(r){return new(r||e)(a(I,10),a(he,10),a(j,8))},e.\u0275dir=u({type:e,selectors:[["","formGroup",""]],hostBindings:function(r,s){r&1&&y("submit",function(l){return s.onSubmit(l)})("reset",function(){return s.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[f([Rt]),c,$]});let i=e;return i})();var Bt={provide:F,useExisting:h(()=>et),multi:!0};function Qe(i,e){return i==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function Ut(i){return i.split(":")[0]}var et=(()=>{let e=class e extends R{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 r=this._getOptionId(t),s=Qe(r,t);this.setProperty("value",s)}registerOnChange(t){this.onChange=r=>{this.value=this._getOptionValue(r),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(let r of this._optionMap.keys())if(this._compareWith(this._optionMap.get(r),t))return r;return null}_getOptionValue(t){let r=Ut(t);return this._optionMap.has(r)?this._optionMap.get(r):t}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=m(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(r,s){r&1&&y("change",function(l){return s.onChange(l.target.value)})("blur",function(){return s.onTouched()})},inputs:{compareWith:"compareWith"},features:[f([Bt]),c]});let i=e;return i})(),Vi=(()=>{let e=class e{constructor(t,r,s){this._element=t,this._renderer=r,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(Qe(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(r){return new(r||e)(a(S),a(O),a(et,9))},e.\u0275dir=u({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}});let i=e;return i})(),Ht={provide:F,useExisting:h(()=>tt),multi:!0};function Oe(i,e){return i==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function Lt(i){return i.split(":")[0]}var tt=(()=>{let e=class e extends R{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 r;if(Array.isArray(t)){let s=t.map(o=>this._getOptionId(o));r=(o,l)=>{o._setSelected(s.indexOf(l.toString())>-1)}}else r=(s,o)=>{s._setSelected(!1)};this._optionMap.forEach(r)}registerOnChange(t){this.onChange=r=>{let s=[],o=r.selectedOptions;if(o!==void 0){let l=o;for(let g=0;g<l.length;g++){let B=l[g],se=this._getOptionValue(B.value);s.push(se)}}else{let l=r.options;for(let g=0;g<l.length;g++){let B=l[g];if(B.selected){let se=this._getOptionValue(B.value);s.push(se)}}}this.value=s,t(s)}}_registerOption(t){let r=(this._idCounter++).toString();return this._optionMap.set(r,t),r}_getOptionId(t){for(let r of this._optionMap.keys())if(this._compareWith(this._optionMap.get(r)._value,t))return r;return null}_getOptionValue(t){let r=Lt(t);return this._optionMap.has(r)?this._optionMap.get(r)._value:t}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=m(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(r,s){r&1&&y("change",function(l){return s.onChange(l.target)})("blur",function(){return s.onTouched()})},inputs:{compareWith:"compareWith"},features:[f([Ht]),c]});let i=e;return i})(),Di=(()=>{let e=class e{constructor(t,r,s){this._element=t,this._renderer=r,this._select=s,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){this._select!=null&&(this._value=t,this._setElementValue(Oe(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(Oe(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(r){return new(r||e)(a(S),a(O),a(tt,9))},e.\u0275dir=u({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}});let i=e;return i})();var me=(()=>{let e=class e{constructor(){this._validator=z}ngOnChanges(t){if(this.inputName in t){let r=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(r),this._validator=this._enabled?this.createValidator(r):z,this._onChange&&this._onChange()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return t!=null}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=u({type:e,features:[$]});let i=e;return i})();var $t={provide:I,useExisting:h(()=>Wt),multi:!0};var Wt=(()=>{let e=class e extends me{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=W,this.createValidator=t=>ke}enabled(t){return t}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=m(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(r,s){r&2&&oe("required",s._enabled?"":null)},inputs:{required:"required"},features:[f([$t]),c]});let i=e;return i})();var qt={provide:I,useExisting:h(()=>zt),multi:!0},zt=(()=>{let e=class e extends me{constructor(){super(...arguments),this.inputName="email",this.normalizeInput=W,this.createValidator=t=>Ge}enabled(t){return t}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=m(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["","email","","formControlName",""],["","email","","formControl",""],["","email","","ngModel",""]],inputs:{email:"email"},features:[f([qt]),c]});let i=e;return i})();var Zt={provide:I,useExisting:h(()=>Xt),multi:!0},Xt=(()=>{let e=class e extends me{constructor(){super(...arguments),this.inputName="pattern",this.normalizeInput=t=>t,this.createValidator=t=>Te(t)}};e.\u0275fac=(()=>{let t;return function(s){return(t||(t=m(e)))(s||e)}})(),e.\u0275dir=u({type:e,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(r,s){r&2&&oe("pattern",s._enabled?s.pattern:null)},inputs:{pattern:"pattern"},features:[f([Zt]),c]});let i=e;return i})();var it=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=L({type:e}),e.\u0275inj=H({});let i=e;return i})();var bi=(()=>{let e=class e{static withConfig(t){return{ngModule:e,providers:[{provide:j,useValue:t.callSetDisabledState??re}]}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=L({type:e}),e.\u0275inj=H({imports:[it]});let i=e;return i})(),Ai=(()=>{let e=class e{static withConfig(t){return{ngModule:e,providers:[{provide:Tt,useValue:t.warnOnNgModelWithFormControl??"always"},{provide:j,useValue:t.callSetDisabledState??re}]}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=L({type:e}),e.\u0275inj=H({imports:[it]});let i=e;return i})();export{F as a,rt as b,Ne as c,I as d,be as e,C as f,T as g,vi as h,yi as i,Ot as j,Pt as k,Ci as l,Gt as m,jt as n,et as o,Vi as p,Di as q,Wt as r,zt as s,Xt as t,bi as u,Ai as v};