dealpos 12.28.2 → 12.28.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/POS/{chunk-ZGBTAIVU.js → chunk-2ETI6OVC.js} +1 -1
  2. package/POS/{chunk-HJVM24SD.js → chunk-2P4TQWNV.js} +1 -1
  3. package/POS/{chunk-BIZWDFXO.js → chunk-2XDUTTXO.js} +1 -1
  4. package/POS/{chunk-36TOQKHP.js → chunk-2XOHX5MX.js} +1 -1
  5. package/POS/{chunk-Q6INFSD2.js → chunk-32LQWXLE.js} +1 -1
  6. package/POS/{chunk-6EBAPHVF.js → chunk-37W3LDR2.js} +1 -1
  7. package/POS/{chunk-QUMXS5ZR.js → chunk-3NZG6KM2.js} +2 -2
  8. package/POS/{chunk-EDLNNWW2.js → chunk-3XVONFHI.js} +1 -1
  9. package/POS/{chunk-62BYOTPI.js → chunk-3ZBGUNXM.js} +1 -1
  10. package/POS/{chunk-3UOPPBFM.js → chunk-4BNMZHD5.js} +1 -1
  11. package/POS/{chunk-6Y3Z5JVC.js → chunk-4GF3XK6S.js} +1 -1
  12. package/POS/{chunk-6OYVXQCA.js → chunk-4NSP7J6A.js} +1 -1
  13. package/POS/{chunk-FWGXXXTS.js → chunk-4RBZYAZ4.js} +1 -1
  14. package/POS/{chunk-XI4TYNL2.js → chunk-4TAK65W7.js} +1 -1
  15. package/POS/{chunk-N6JF5CSX.js → chunk-5AXX6EQS.js} +1 -1
  16. package/POS/{chunk-3I5X5KAO.js → chunk-5BAHIKYL.js} +1 -1
  17. package/POS/{chunk-AKYQ6TXT.js → chunk-5D2X26DQ.js} +1 -1
  18. package/POS/{chunk-RXUHT3CA.js → chunk-5KIZHLPD.js} +1 -1
  19. package/POS/{chunk-OPJLDKQF.js → chunk-5YS6EDQM.js} +1 -1
  20. package/POS/{chunk-UYOYUKD5.js → chunk-5ZHGC4IQ.js} +1 -1
  21. package/POS/{chunk-Q4CIBO3F.js → chunk-6562EFL6.js} +1 -1
  22. package/POS/{chunk-RSQQ2ZIH.js → chunk-6OUYHQTO.js} +1 -1
  23. package/POS/{chunk-I7NS6KBG.js → chunk-6QILV6HL.js} +1 -1
  24. package/POS/{chunk-DKGJJRIZ.js → chunk-6R5V5M3B.js} +1 -1
  25. package/POS/{chunk-XOAEKN45.js → chunk-6SYV5ELZ.js} +1 -1
  26. package/POS/{chunk-WRQ5IP3J.js → chunk-6UHAMSJW.js} +1 -1
  27. package/POS/{chunk-CK4IAD2V.js → chunk-6WEFP2SL.js} +1 -1
  28. package/POS/{chunk-FZG4BMJH.js → chunk-72X7S3CS.js} +1 -1
  29. package/POS/{chunk-HV5R2VDY.js → chunk-72ZNNAFT.js} +1 -1
  30. package/POS/{chunk-DHTUX7GC.js → chunk-73ME3R2T.js} +1 -1
  31. package/POS/{chunk-KN6LFP4S.js → chunk-74L7M4MA.js} +1 -1
  32. package/POS/{chunk-TWCVWFLZ.js → chunk-7K6FRNQS.js} +1 -1
  33. package/POS/{chunk-UKYVEBMD.js → chunk-7OLQWUL5.js} +1 -1
  34. package/POS/{chunk-S3OJ7AIV.js → chunk-7PNTGARZ.js} +1 -1
  35. package/POS/{chunk-QBSPDJVY.js → chunk-7QMX6Q6X.js} +1 -1
  36. package/POS/{chunk-NJXIXSRT.js → chunk-AKORFW7L.js} +1 -1
  37. package/POS/{chunk-E4OOECI3.js → chunk-ALAOTU4R.js} +1 -1
  38. package/POS/{chunk-GY6DCRXI.js → chunk-ANPDOOIN.js} +1 -1
  39. package/POS/{chunk-K62RY6HW.js → chunk-BCPBRAVZ.js} +1 -1
  40. package/POS/{chunk-NYPDLIT4.js → chunk-BSHZ6ZNF.js} +1 -1
  41. package/POS/{chunk-55WDSZTB.js → chunk-C5KV3DUP.js} +1 -1
  42. package/POS/{chunk-QWIDQTCQ.js → chunk-C62C4LA6.js} +1 -1
  43. package/POS/{chunk-Z6JDCTER.js → chunk-CT6CZSXF.js} +1 -1
  44. package/POS/{chunk-55UMHE7K.js → chunk-CUMTPF7C.js} +1 -1
  45. package/POS/{chunk-M3NINC45.js → chunk-CZHPSWRR.js} +1 -1
  46. package/POS/{chunk-Y43YC633.js → chunk-DSGHX5JR.js} +1 -1
  47. package/POS/{chunk-MTJB2KS2.js → chunk-DZNMXARA.js} +1 -1
  48. package/POS/{chunk-KT6IV7DR.js → chunk-EAJXYTXF.js} +1 -1
  49. package/POS/{chunk-OLELXGNW.js → chunk-EIP2DOAM.js} +1 -1
  50. package/POS/{chunk-SLZQQJA7.js → chunk-EJY6LHQ3.js} +1 -1
  51. package/POS/{chunk-TZNCFP6M.js → chunk-EQUFIDM5.js} +1 -1
  52. package/POS/chunk-F2RZKMLK.js +1 -0
  53. package/POS/{chunk-LDPIBCUA.js → chunk-F57P6BOC.js} +1 -1
  54. package/POS/{chunk-PES73SWY.js → chunk-FCUWXIQB.js} +1 -1
  55. package/POS/{chunk-XBOC6HS5.js → chunk-FH5RXSSH.js} +1 -1
  56. package/POS/{chunk-TUFSTMOG.js → chunk-G65RVOXP.js} +1 -1
  57. package/POS/{chunk-VEPCTQOG.js → chunk-GA72DCV4.js} +1 -1
  58. package/POS/{chunk-ML22HTOC.js → chunk-GBGYRLAZ.js} +1 -1
  59. package/POS/{chunk-2CBUU23K.js → chunk-GJ4QCDDE.js} +1 -1
  60. package/POS/{chunk-M5RWUIWO.js → chunk-GJR6OW52.js} +1 -1
  61. package/POS/{chunk-JBNKBG7Z.js → chunk-GVXTPZGV.js} +1 -1
  62. package/POS/{chunk-VJHBJ76H.js → chunk-HHZTFB3P.js} +1 -1
  63. package/POS/{chunk-UOBGHZMV.js → chunk-HL4CVGVO.js} +1 -1
  64. package/POS/{chunk-B645UACU.js → chunk-HLA46OHD.js} +1 -1
  65. package/POS/{chunk-UGGDK7ZA.js → chunk-HLTMHODV.js} +1 -1
  66. package/POS/{chunk-BHM76WTB.js → chunk-HU42WQFE.js} +1 -1
  67. package/POS/{chunk-ZVNNWE2N.js → chunk-HVXK3B6C.js} +1 -1
  68. package/POS/{chunk-7YYMM3LU.js → chunk-IFGZJBBR.js} +1 -1
  69. package/POS/{chunk-XNTEZ46W.js → chunk-IGT37DBB.js} +1 -1
  70. package/POS/{chunk-WJ3GYYTT.js → chunk-IOBF7ADK.js} +1 -1
  71. package/POS/{chunk-SFFKZD3R.js → chunk-IQVB64BS.js} +1 -1
  72. package/POS/{chunk-ADPP4ZJE.js → chunk-JHTNTQ6T.js} +1 -1
  73. package/POS/{chunk-IG7WGTSL.js → chunk-JK5K44PF.js} +1 -1
  74. package/POS/{chunk-CJXYIQOY.js → chunk-KBE5QUAR.js} +1 -1
  75. package/POS/{chunk-O5UILVAJ.js → chunk-KGTIVP5Q.js} +1 -1
  76. package/POS/{chunk-ADIQWVWD.js → chunk-KWT4TSOR.js} +1 -1
  77. package/POS/{chunk-SIHAVEHY.js → chunk-LFDUFAEP.js} +1 -1
  78. package/POS/{chunk-XPM3R3DT.js → chunk-LHHIIAFG.js} +1 -1
  79. package/POS/{chunk-MRPLRTW6.js → chunk-LHRFNTVW.js} +1 -1
  80. package/POS/{chunk-ZX2X5MF3.js → chunk-LL5N57UO.js} +1 -1
  81. package/POS/{chunk-W5YIYCXW.js → chunk-LRJ2OD4C.js} +1 -1
  82. package/POS/chunk-M4MDLNQP.js +1 -0
  83. package/POS/{chunk-7ATDSUAA.js → chunk-MKCVD6W3.js} +1 -1
  84. package/POS/{chunk-FBBY6XHY.js → chunk-MMSE5HZL.js} +1 -1
  85. package/POS/{chunk-3HX2HUA3.js → chunk-MP2QOEPA.js} +1 -1
  86. package/POS/{chunk-E37OSMD3.js → chunk-MTSJ7MPL.js} +1 -1
  87. package/POS/{chunk-75VTM4SC.js → chunk-MVNDQLBM.js} +1 -1
  88. package/POS/{chunk-EJ7YZX7F.js → chunk-N55P54KS.js} +1 -1
  89. package/POS/{chunk-4FDZMD3S.js → chunk-N6ZI2FAC.js} +1 -1
  90. package/POS/{chunk-DBIOXTH4.js → chunk-NHTOCYX5.js} +1 -1
  91. package/POS/{chunk-NH4ZRKCE.js → chunk-NQPLOLXT.js} +1 -1
  92. package/POS/{chunk-M2VJY3WV.js → chunk-O2VM2WYB.js} +1 -1
  93. package/POS/{chunk-XMKQYWUP.js → chunk-OBVPALBC.js} +1 -1
  94. package/POS/{chunk-ZPEX3LZS.js → chunk-OEAWO5UV.js} +1 -1
  95. package/POS/chunk-POF6RZXN.js +1 -0
  96. package/POS/{chunk-BGPWCSBG.js → chunk-PQ3WTCXN.js} +1 -1
  97. package/POS/{chunk-NFWLRYDU.js → chunk-PYQUHWCN.js} +1 -1
  98. package/POS/{chunk-CUS6M6WD.js → chunk-QCFUPKPB.js} +1 -1
  99. package/POS/{chunk-NY5PUJN4.js → chunk-QPTLGM5J.js} +1 -1
  100. package/POS/{chunk-CWZKTS4L.js → chunk-QRGORC7P.js} +1 -1
  101. package/POS/{chunk-CA5FOJJA.js → chunk-R42EHJET.js} +1 -1
  102. package/POS/{chunk-266HW532.js → chunk-R6FKKICZ.js} +1 -1
  103. package/POS/{chunk-G65TLZNJ.js → chunk-R7W7CIMS.js} +1 -1
  104. package/POS/{chunk-TGUJJXYX.js → chunk-RCR7LLCL.js} +1 -1
  105. package/POS/{chunk-B4OZGIA6.js → chunk-RGXOULA7.js} +1 -1
  106. package/POS/{chunk-UUIRT4PG.js → chunk-RMUH5KQE.js} +1 -1
  107. package/POS/{chunk-4YGSZBOC.js → chunk-RNW4BDCH.js} +1 -1
  108. package/POS/{chunk-OZI4RW7B.js → chunk-RWFFRQ7C.js} +1 -1
  109. package/POS/{chunk-452IABBT.js → chunk-RXL2PXSD.js} +1 -1
  110. package/POS/{chunk-Z3PTJNNB.js → chunk-SDY5SYK6.js} +1 -1
  111. package/POS/{chunk-VR4Z32DB.js → chunk-SHECKALS.js} +1 -1
  112. package/POS/{chunk-WLGT4JZ5.js → chunk-SSDDSGOA.js} +1 -1
  113. package/POS/{chunk-YXUTG3VS.js → chunk-SUVR442T.js} +1 -1
  114. package/POS/{chunk-JN4HYJDB.js → chunk-SWUXNVF4.js} +1 -1
  115. package/POS/{chunk-4HMWF6JN.js → chunk-T7HB5IC2.js} +1 -1
  116. package/POS/{chunk-65PKDAKO.js → chunk-TIZBLVGF.js} +1 -1
  117. package/POS/{chunk-WNVUKCR3.js → chunk-TMFBWWNO.js} +1 -1
  118. package/POS/{chunk-JNSU3ONL.js → chunk-TMT67XNT.js} +1 -1
  119. package/POS/{chunk-2OKTKJBI.js → chunk-TNCYNB3P.js} +1 -1
  120. package/POS/{chunk-V2GMMSIG.js → chunk-TWCO3OQP.js} +1 -1
  121. package/POS/{chunk-KCNGKSYW.js → chunk-UARVGB47.js} +1 -1
  122. package/POS/{chunk-PQVROLI5.js → chunk-UDNYMXVD.js} +1 -1
  123. package/POS/{chunk-C6JI6L37.js → chunk-UGF6PFLB.js} +1 -1
  124. package/POS/{chunk-IBDUGHZH.js → chunk-UKVME7NC.js} +1 -1
  125. package/POS/{chunk-O3OHQXSQ.js → chunk-UO4KJA22.js} +1 -1
  126. package/POS/{chunk-IIVPIVNG.js → chunk-UQWAVCLU.js} +1 -1
  127. package/POS/{chunk-QIUJ4W45.js → chunk-UWZJOOZK.js} +1 -1
  128. package/POS/{chunk-CGDWF5KW.js → chunk-V3UJN3HI.js} +1 -1
  129. package/POS/{chunk-MGFLCAO5.js → chunk-VETLE6FR.js} +1 -1
  130. package/POS/{chunk-YFKTC6OB.js → chunk-VNFAH7UC.js} +1 -1
  131. package/POS/{chunk-TOF24FES.js → chunk-VTBXSS66.js} +1 -1
  132. package/POS/{chunk-OFKMEVX4.js → chunk-VZ37C2I3.js} +1 -1
  133. package/POS/{chunk-7AHT3UAA.js → chunk-W2CHSTCA.js} +1 -1
  134. package/POS/{chunk-7CHT5D4Q.js → chunk-W5JQ2S2B.js} +1 -1
  135. package/POS/{chunk-WYB6CGMJ.js → chunk-W5WKAASS.js} +1 -1
  136. package/POS/{chunk-56PM7LKF.js → chunk-WIIKFCP2.js} +1 -1
  137. package/POS/{chunk-F7EOUHKM.js → chunk-WKFRGRGD.js} +1 -1
  138. package/POS/{chunk-IDIFBZKI.js → chunk-X5MY3TGA.js} +1 -1
  139. package/POS/{chunk-UVGVO4GX.js → chunk-XA5GKCJ2.js} +1 -1
  140. package/POS/{chunk-3QCOIY4L.js → chunk-XD3VS7DZ.js} +1 -1
  141. package/POS/{chunk-LUKQ4RCT.js → chunk-XRVFOXUS.js} +1 -1
  142. package/POS/{chunk-QXCV6PQ7.js → chunk-XWNYL6E7.js} +1 -1
  143. package/POS/{chunk-2SUTJTS5.js → chunk-Y3GVX7R7.js} +1 -1
  144. package/POS/chunk-YCXUI7DM.js +1 -0
  145. package/POS/{chunk-N4VKRR2Q.js → chunk-YEKBEAMT.js} +1 -1
  146. package/POS/{chunk-JBDC46AR.js → chunk-YH32WGIZ.js} +1 -1
  147. package/POS/{chunk-CNIBLWBQ.js → chunk-YM3GEUAD.js} +1 -1
  148. package/POS/{chunk-S3FKMGD5.js → chunk-YQ6GW4N7.js} +1 -1
  149. package/POS/{chunk-ARFOYL4E.js → chunk-YV3CA2QW.js} +1 -1
  150. package/POS/{chunk-OVKFVPL2.js → chunk-Z5HUB3UT.js} +1 -1
  151. package/POS/{chunk-WX367R6T.js → chunk-ZOWXGMDO.js} +2 -2
  152. package/POS/{chunk-4XJ4KYKD.js → chunk-ZRYTJR4A.js} +1 -1
  153. package/POS/index.html +3 -3
  154. package/POS/{main-QB5AWIKZ.js → main-C63LN2OO.js} +1 -1
  155. package/package.json +1 -1
  156. package/POS/chunk-EHN7FQTX.js +0 -1
  157. package/POS/chunk-N2IVG6XT.js +0 -1
  158. package/POS/chunk-PMQKGRPG.js +0 -1
  159. package/POS/chunk-YTVJOEVX.js +0 -1
@@ -1 +1 @@
1
- import{Ab as m,Bb as l,Bc as E,Ca as T,Dc as j,Gb as y,Ib as x,Jb as M,Nb as w,Oa as p,Pb as S,Qc as k,Zb as F,bb as g,db as r,ea as b,ma as c,na as f,ob as i,pb as a,sa as d,ta as C,ub as v,xb as h,zb as _}from"./chunk-2CBUU23K.js";var N=["*"],O=(()=>{class t{tabTitle;active=!1;static \u0275fac=function(e){return new(e||t)};static \u0275cmp=c({type:t,selectors:[["tab"]],inputs:{tabTitle:"tabTitle",active:"active"},ngContentSelectors:N,decls:2,vars:1,consts:[[1,"pane",3,"hidden"]],template:function(e,o){e&1&&(m(),i(0,"div",0),l(1),a()),e&2&&r("hidden",!o.active)},styles:[".pane[_ngcontent-%COMP%]{padding:0 1px}"]})}return t})();var Q=["*"],V=t=>({selected:t});function A(t,I){if(t&1){let n=v();i(0,"a",4),h("click",function(){let o=d(n).$implicit,s=_();return s.onSelectTab(o),C(s.onTabChange(o))}),w(1),a()}if(t&2){let n=I.$implicit;r("ngClass",F(2,V,(n==null?null:n.active)==!0)),p(),S(" ",n.tabTitle," ")}}var J=(()=>{class t{tabs;tabChange;constructor(){this.tabChange=new T}ngAfterContentInit(){this.tabs.filter(e=>e.active).length===0&&this.onSelectTab(this.tabs.first)}onSelectTab(n){this.tabChange.emit(n.tabTitle),this.tabs.toArray().forEach(e=>e.active=!1),n.active=!0}onTabChange(n){this.tabChange.emit(n.tabTitle)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=c({type:t,selectors:[["custom-tabs"]],contentQueries:function(e,o,s){if(e&1&&y(s,O,4),e&2){let u;x(u=M())&&(o.tabs=u)}},outputs:{tabChange:"onTabChange"},ngContentSelectors:Q,decls:6,vars:1,consts:[[1,"row","border-bottom"],[1,"col-12"],["class","btn btn-link-tab",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"row","mt-6"],[1,"btn","btn-link-tab",3,"click","ngClass"]],template:function(e,o){e&1&&(m(),i(0,"div",0)(1,"div",1),g(2,A,2,4,"a",2),a()(),i(3,"div",3)(4,"div",1),l(5),a()()),e&2&&(p(2),r("ngForOf",o.tabs))},dependencies:[E,j]})}return t})();var $=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=f({type:t});static \u0275inj=b({imports:[k]})}return t})();export{O as a,J as b,$ as c};
1
+ import{Ab as m,Bb as l,Bc as E,Ca as T,Dc as j,Gb as y,Ib as x,Jb as M,Nb as w,Oa as p,Pb as S,Qc as k,Zb as F,bb as g,db as r,ea as b,ma as c,na as f,ob as i,pb as a,sa as d,ta as C,ub as v,xb as h,zb as _}from"./chunk-GJ4QCDDE.js";var N=["*"],O=(()=>{class t{tabTitle;active=!1;static \u0275fac=function(e){return new(e||t)};static \u0275cmp=c({type:t,selectors:[["tab"]],inputs:{tabTitle:"tabTitle",active:"active"},ngContentSelectors:N,decls:2,vars:1,consts:[[1,"pane",3,"hidden"]],template:function(e,o){e&1&&(m(),i(0,"div",0),l(1),a()),e&2&&r("hidden",!o.active)},styles:[".pane[_ngcontent-%COMP%]{padding:0 1px}"]})}return t})();var Q=["*"],V=t=>({selected:t});function A(t,I){if(t&1){let n=v();i(0,"a",4),h("click",function(){let o=d(n).$implicit,s=_();return s.onSelectTab(o),C(s.onTabChange(o))}),w(1),a()}if(t&2){let n=I.$implicit;r("ngClass",F(2,V,(n==null?null:n.active)==!0)),p(),S(" ",n.tabTitle," ")}}var J=(()=>{class t{tabs;tabChange;constructor(){this.tabChange=new T}ngAfterContentInit(){this.tabs.filter(e=>e.active).length===0&&this.onSelectTab(this.tabs.first)}onSelectTab(n){this.tabChange.emit(n.tabTitle),this.tabs.toArray().forEach(e=>e.active=!1),n.active=!0}onTabChange(n){this.tabChange.emit(n.tabTitle)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=c({type:t,selectors:[["custom-tabs"]],contentQueries:function(e,o,s){if(e&1&&y(s,O,4),e&2){let u;x(u=M())&&(o.tabs=u)}},outputs:{tabChange:"onTabChange"},ngContentSelectors:Q,decls:6,vars:1,consts:[[1,"row","border-bottom"],[1,"col-12"],["class","btn btn-link-tab",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"row","mt-6"],[1,"btn","btn-link-tab",3,"click","ngClass"]],template:function(e,o){e&1&&(m(),i(0,"div",0)(1,"div",1),g(2,A,2,4,"a",2),a()(),i(3,"div",3)(4,"div",1),l(5),a()()),e&2&&(p(2),r("ngForOf",o.tabs))},dependencies:[E,j]})}return t})();var $=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=f({type:t});static \u0275inj=b({imports:[k]})}return t})();export{O as a,J as b,$ as c};
@@ -1 +1 @@
1
- import{Cd as m,J as g,b as d,da as p,ga as u}from"./chunk-2CBUU23K.js";var I=(()=>{class s{toastr;cloudinaryWidget;mediaEditorWidget;unfilteredResult;config;allowedImageFormat=["jpg","jpeg","png","gif"];constructor(e){this.toastr=e;let i=localStorage.getItem("CloudinaryConfig"),t=atob(i);this.config=JSON.parse(t)}initMediaEditorWidget(e,i){return new d(t=>{this.mediaEditorWidget=e.mediaEditor(),this.mediaEditorWidget.update({publicIds:[i],cloudName:this.config.CloudName,image:{steps:["resizeAndCrop","export"],resizeAndCrop:{toggleAspectRatio:!0,aspectRatioLock:!0,flip:!0,rotate:!0,presets:["original"]},export:{quality:["auto"],formats:["png"],download:!0,share:!0}}}),this.mediaEditorWidget.on("export",r=>{t.next(r),t.complete()}),this.mediaEditorWidget.on("close",()=>{t.complete()})}).pipe(g(1))}initUploadImageWidget(e,i){return new d(t=>{this.cloudinaryWidget=e.createUploadWidget({cloudName:this.config.CloudName,uploadPreset:this.config.UploadPreset,folder:i,googleApiKey:this.config.GoogleApiKey,sources:["local","url","google_drive","camera","image_search"],cropping:this.config.Cropping,croppingCoordinatesMode:"custom",resourceType:"image",croppingDefaultSelectionRatio:1,clientAllowedFormats:this.allowedImageFormat},(r,o)=>{if(!r&&o.event==="success"){this.unfilteredResult=o;let n=o.info.secure_url.split("/").reverse(),l={ImageURL:o.info.secure_url.replace("https:",""),ImageName:n[0]};t.next(l)}r&&this.toastr.error(r.statusText,"Failed to upload image")})})}initUploadMultipleImagesWidget(e,i,t){return new d(r=>{this.cloudinaryWidget=e.createUploadWidget({cloudName:this.config.CloudName,uploadPreset:this.config.UploadPreset,folder:i,googleApiKey:this.config.GoogleApiKey,sources:["local","url","google_drive","camera","image_search"],resourceType:"image",croppingDefaultSelectionRatio:1,clientAllowedFormats:["jpg","jpeg","png","gif"],maxFiles:t,text:{en:{notifications:{limit_reached:`You have reached the maximum number of product image (Max ${t} Images)`}}}},(o,a)=>{if(!o&&a.event==="success"){this.unfilteredResult=a;let l=a.info.secure_url.split("/").reverse(),c={ImageURL:a.info.secure_url.replace("https:",""),ImageName:l[0]};r.next(c)}else!o&&a.event==="close"&&r.complete();o&&this.toastr.error(o.statusText,"Failed to upload image")})})}initUploadFileWidget(e,i,t=[]){return new d(r=>{this.cloudinaryWidget=e.createUploadWidget({cloudName:this.config.CloudName,uploadPreset:this.config.UploadPreset,folder:i,sources:["local","url","google_drive","image_search"],googleApiKey:this.config.GoogleApiKey,clientAllowedFormats:t},(o,a)=>{if(!o&&a.event==="success"){this.unfilteredResult=a;let l=a.info.secure_url.split("/").reverse()[0],c=a.info.secure_url.replace("https:",""),f={FileName:l,FileURL:c};r.next(f)}})})}openUploadWidget(){this.cloudinaryWidget.open()}openMediaEditorWidget(){this.mediaEditorWidget.show()}destroyImageEditor(){this.mediaEditorWidget.destroy()}updateUploadWidgetMaxFiles(e){this.cloudinaryWidget.update({maxFiles:e})}static \u0275fac=function(i){return new(i||s)(u(m))};static \u0275prov=p({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();export{I as a};
1
+ import{Cd as m,J as g,b as d,da as p,ga as u}from"./chunk-GJ4QCDDE.js";var I=(()=>{class s{toastr;cloudinaryWidget;mediaEditorWidget;unfilteredResult;config;allowedImageFormat=["jpg","jpeg","png","gif"];constructor(e){this.toastr=e;let i=localStorage.getItem("CloudinaryConfig"),t=atob(i);this.config=JSON.parse(t)}initMediaEditorWidget(e,i){return new d(t=>{this.mediaEditorWidget=e.mediaEditor(),this.mediaEditorWidget.update({publicIds:[i],cloudName:this.config.CloudName,image:{steps:["resizeAndCrop","export"],resizeAndCrop:{toggleAspectRatio:!0,aspectRatioLock:!0,flip:!0,rotate:!0,presets:["original"]},export:{quality:["auto"],formats:["png"],download:!0,share:!0}}}),this.mediaEditorWidget.on("export",r=>{t.next(r),t.complete()}),this.mediaEditorWidget.on("close",()=>{t.complete()})}).pipe(g(1))}initUploadImageWidget(e,i){return new d(t=>{this.cloudinaryWidget=e.createUploadWidget({cloudName:this.config.CloudName,uploadPreset:this.config.UploadPreset,folder:i,googleApiKey:this.config.GoogleApiKey,sources:["local","url","google_drive","camera","image_search"],cropping:this.config.Cropping,croppingCoordinatesMode:"custom",resourceType:"image",croppingDefaultSelectionRatio:1,clientAllowedFormats:this.allowedImageFormat},(r,o)=>{if(!r&&o.event==="success"){this.unfilteredResult=o;let n=o.info.secure_url.split("/").reverse(),l={ImageURL:o.info.secure_url.replace("https:",""),ImageName:n[0]};t.next(l)}r&&this.toastr.error(r.statusText,"Failed to upload image")})})}initUploadMultipleImagesWidget(e,i,t){return new d(r=>{this.cloudinaryWidget=e.createUploadWidget({cloudName:this.config.CloudName,uploadPreset:this.config.UploadPreset,folder:i,googleApiKey:this.config.GoogleApiKey,sources:["local","url","google_drive","camera","image_search"],resourceType:"image",croppingDefaultSelectionRatio:1,clientAllowedFormats:["jpg","jpeg","png","gif"],maxFiles:t,text:{en:{notifications:{limit_reached:`You have reached the maximum number of product image (Max ${t} Images)`}}}},(o,a)=>{if(!o&&a.event==="success"){this.unfilteredResult=a;let l=a.info.secure_url.split("/").reverse(),c={ImageURL:a.info.secure_url.replace("https:",""),ImageName:l[0]};r.next(c)}else!o&&a.event==="close"&&r.complete();o&&this.toastr.error(o.statusText,"Failed to upload image")})})}initUploadFileWidget(e,i,t=[]){return new d(r=>{this.cloudinaryWidget=e.createUploadWidget({cloudName:this.config.CloudName,uploadPreset:this.config.UploadPreset,folder:i,sources:["local","url","google_drive","image_search"],googleApiKey:this.config.GoogleApiKey,clientAllowedFormats:t},(o,a)=>{if(!o&&a.event==="success"){this.unfilteredResult=a;let l=a.info.secure_url.split("/").reverse()[0],c=a.info.secure_url.replace("https:",""),f={FileName:l,FileURL:c};r.next(f)}})})}openUploadWidget(){this.cloudinaryWidget.open()}openMediaEditorWidget(){this.mediaEditorWidget.show()}destroyImageEditor(){this.mediaEditorWidget.destroy()}updateUploadWidgetMaxFiles(e){this.cloudinaryWidget.update({maxFiles:e})}static \u0275fac=function(i){return new(i||s)(u(m))};static \u0275prov=p({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();export{I as a};
@@ -1,4 +1,4 @@
1
- import{a as we,b as X,c as ve,d as be,e as Y,f as ye,g as J,h as _e,i as C,k as p}from"./chunk-L7GSN5XZ.js";import{$ as me,B as pe,C as he,Fa as H,O as ge,S as q,Sc as Te,W as b,Wa as I,X as G,b as N,c as le,da as x,ea as j,fa as m,g as de,ga as d,h as fe,ja as Ae,k as v,l as _,lc as ke,m as V,mc as Ee,n as P,na as $,qc as Z,r as F}from"./chunk-2CBUU23K.js";import{k as E}from"./chunk-O3DEWASH.js";var ze="firebase",Ke="10.11.0";C(ze,Ke,"app");var D=new ke("ANGULARFIRE2_VERSION");var We=(e,r)=>{let t=r?[r]:_e(),n=[];return t.forEach(i=>{i.container.getProvider(e).instances.forEach(a=>{n.includes(a)||n.push(a)})}),n},S=class{constructor(){return We(Ve)}},Ve="app-check";function Q(){}var L=class{zone;delegate;constructor(r,t=fe){this.zone=r,this.delegate=t}now(){return this.delegate.now()}schedule(r,t,n){let i=this.zone,o=function(a){i.runGuarded(()=>{r.apply(this,[a])})};return this.delegate.schedule(o,t,n)}},ee=class{zone;task=null;constructor(r){this.zone=r}call(r,t){let n=this.unscheduleTask.bind(this);return this.task=this.zone.run(()=>Zone.current.scheduleMacroTask("firebaseZoneBlock",Q,{},Q,Q)),t.pipe(me({next:n,complete:n,error:n})).subscribe(r).add(n)}unscheduleTask(){setTimeout(()=>{this.task!=null&&this.task.state==="scheduled"&&(this.task.invoke(),this.task=null)},10)}},Re=(()=>{class e{ngZone;outsideAngular;insideAngular;constructor(t){this.ngZone=t,this.outsideAngular=t.runOutsideAngular(()=>new L(Zone.current)),this.insideAngular=t.run(()=>new L(Zone.current,de)),globalThis.\u0275AngularFireScheduler||=this}static \u0275fac=function(n){return new(n||e)(d(I))};static \u0275prov=x({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function qe(){let e=globalThis.\u0275AngularFireScheduler;if(!e)throw new Error(`Either AngularFireModule has not been provided in your AppModule (this can be done manually or implictly using
1
+ import{a as we,b as X,c as ve,d as be,e as Y,f as ye,g as J,h as _e,i as C,k as p}from"./chunk-L7GSN5XZ.js";import{$ as me,B as pe,C as he,Fa as H,O as ge,S as q,Sc as Te,W as b,Wa as I,X as G,b as N,c as le,da as x,ea as j,fa as m,g as de,ga as d,h as fe,ja as Ae,k as v,l as _,lc as ke,m as V,mc as Ee,n as P,na as $,qc as Z,r as F}from"./chunk-GJ4QCDDE.js";import{k as E}from"./chunk-O3DEWASH.js";var ze="firebase",Ke="10.11.0";C(ze,Ke,"app");var D=new ke("ANGULARFIRE2_VERSION");var We=(e,r)=>{let t=r?[r]:_e(),n=[];return t.forEach(i=>{i.container.getProvider(e).instances.forEach(a=>{n.includes(a)||n.push(a)})}),n},S=class{constructor(){return We(Ve)}},Ve="app-check";function Q(){}var L=class{zone;delegate;constructor(r,t=fe){this.zone=r,this.delegate=t}now(){return this.delegate.now()}schedule(r,t,n){let i=this.zone,o=function(a){i.runGuarded(()=>{r.apply(this,[a])})};return this.delegate.schedule(o,t,n)}},ee=class{zone;task=null;constructor(r){this.zone=r}call(r,t){let n=this.unscheduleTask.bind(this);return this.task=this.zone.run(()=>Zone.current.scheduleMacroTask("firebaseZoneBlock",Q,{},Q,Q)),t.pipe(me({next:n,complete:n,error:n})).subscribe(r).add(n)}unscheduleTask(){setTimeout(()=>{this.task!=null&&this.task.state==="scheduled"&&(this.task.invoke(),this.task=null)},10)}},Re=(()=>{class e{ngZone;outsideAngular;insideAngular;constructor(t){this.ngZone=t,this.outsideAngular=t.runOutsideAngular(()=>new L(Zone.current)),this.insideAngular=t.run(()=>new L(Zone.current,de)),globalThis.\u0275AngularFireScheduler||=this}static \u0275fac=function(n){return new(n||e)(d(I))};static \u0275prov=x({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function qe(){let e=globalThis.\u0275AngularFireScheduler;if(!e)throw new Error(`Either AngularFireModule has not been provided in your AppModule (this can be done manually or implictly using
2
2
  provideFirebaseApp) or you're calling an AngularFire method outside of an NgModule (which is not supported).`);return e}function Pe(e){return Ge(qe())(e)}function Ge(e){return function(t){return t=t.lift(new ee(e.ngZone)),t.pipe(_(e.outsideAngular),v(e.insideAngular))}}var Xe="firebase",Ye="10.11.0";p.registerVersion(Xe,Ye,"app-compat");var Je=["ngOnDestroy"],Se=(e,r,t,n={})=>new Proxy(e,{get:(i,o)=>t.runOutsideAngular(()=>{if(e[o])return n?.spy?.get&&n.spy.get(o,e[o]),e[o];if(Je.indexOf(o)>-1)return()=>{};let a=r.toPromise().then(c=>{let s=c?.[o];return typeof s=="function"?s.bind(c):s?.then?s.then(l=>t.run(()=>l)):t.run(()=>s)});return new Proxy(()=>{},{get:(c,s)=>a[s],apply:(c,s,l)=>a.then(g=>{let y=g?.(...l);return n?.spy?.apply&&n.spy.apply(o,l,y),y})})})});var B=class{constructor(r){return r}},U=new m("angularfire2.app.options"),z=new m("angularfire2.app.name");function te(e,r,t){let n=typeof t=="string"&&t||"[DEFAULT]",i=typeof t=="object"&&t||{};i.name=i.name||n;let a=p.apps.filter(c=>c&&c.name===i.name)[0]||r.runOutsideAngular(()=>p.initializeApp(e,i));try{if(JSON.stringify(e)!==JSON.stringify(a.options)){let c=!!module.hot;Qe("error",`${a.name} Firebase App already initialized with different options${c?", you may need to reload as Firebase is not HMR aware.":"."}`)}}catch{}return new B(a)}var Qe=(e,...r)=>{Z()&&typeof console<"u"&&console[e](...r)},et={provide:B,useFactory:te,deps:[U,I,[new Ae,z]]},en=(()=>{class e{static initializeApp(t,n){return{ngModule:e,providers:[{provide:U,useValue:t},{provide:z,useValue:n}]}}constructor(t){p.registerVersion("angularfire",D.full,"core"),p.registerVersion("angularfire",D.full,"app-compat"),p.registerVersion("angular",Ee.full,t.toString())}static \u0275fac=function(n){return new(n||e)(d(H))};static \u0275mod=$({type:e});static \u0275inj=j({providers:[et]})}return e})();function De(e,r,t,n,i){let[,o,a]=globalThis.\u0275AngularfireInstanceCache.find(c=>c[0]===e)||[];if(o)return tt(i,a)||(Ce("error",`${r} was already initialized on the ${t} Firebase App with different settings.${nt?" You may need to reload as Firebase is not HMR aware.":""}`),Ce("warn",{is:i,was:a})),o;{let c=n();return globalThis.\u0275AngularfireInstanceCache.push([e,c,i]),c}}function tt(e,r){try{return e.toString()===r.toString()}catch{return e===r}}var nt=typeof module<"u"&&!!module.hot,Ce=(e,...r)=>{Z()&&typeof console<"u"&&console[e](...r)};globalThis.\u0275AngularfireInstanceCache||=[];var rt=new Map,it={activated:!1,tokenObservers:[]},ot={initialized:!1,enabled:!1};function h(e){return rt.get(e)||Object.assign({},it)}function xe(){return ot}var st="https://content-firebaseappcheck.googleapis.com/v1";var at="exchangeDebugToken",Oe={OFFSET_DURATION:5*60*1e3,RETRIAL_MIN_WAIT:30*1e3,RETRIAL_MAX_WAIT:16*60*1e3},hn=24*60*60*1e3;var re=class{constructor(r,t,n,i,o){if(this.operation=r,this.retryPolicy=t,this.getWaitDuration=n,this.lowerBound=i,this.upperBound=o,this.pending=null,this.nextErrorWaitInterval=i,i>o)throw new Error("Proactive refresh lower bound greater than upper bound!")}start(){this.nextErrorWaitInterval=this.lowerBound,this.process(!0).catch(()=>{})}stop(){this.pending&&(this.pending.reject("cancelled"),this.pending=null)}isRunning(){return!!this.pending}process(r){return E(this,null,function*(){this.stop();try{this.pending=new X,this.pending.promise.catch(t=>{}),yield ct(this.getNextRun(r)),this.pending.resolve(),yield this.pending.promise,this.pending=new X,this.pending.promise.catch(t=>{}),yield this.operation(),this.pending.resolve(),yield this.pending.promise,this.process(!0).catch(()=>{})}catch(t){this.retryPolicy(t)?this.process(!1).catch(()=>{}):this.stop()}})}getNextRun(r){if(r)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();{let t=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),t}}};function ct(e){return new Promise(r=>{setTimeout(r,e)})}var ut={"already-initialized":"You have already called initializeAppCheck() for FirebaseApp {$appName} with different options. To avoid this error, call initializeAppCheck() with the same options as when it was originally called. This will return the already initialized instance.","use-before-activation":"App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. Call initializeAppCheck() before instantiating other Firebase services.","fetch-network-error":"Fetch failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-parse-error":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status-error":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","recaptcha-error":"ReCAPTCHA error.",throttled:"Requests throttled due to {$httpStatus} error. Attempts allowed again after {$time}"},T=new be("appCheck","AppCheck",ut);function je(e){if(!h(e).activated)throw T.create("use-before-activation",{appName:e.name})}function $e(n,i){return E(this,arguments,function*({url:e,body:r},t){let o={"Content-Type":"application/json"},a=t.getImmediate({optional:!0});if(a){let f=yield a.getHeartbeatsHeader();f&&(o["X-Firebase-Client"]=f)}let c={method:"POST",body:JSON.stringify(r),headers:o},s;try{s=yield fetch(e,c)}catch(f){throw T.create("fetch-network-error",{originalErrorMessage:f?.message})}if(s.status!==200)throw T.create("fetch-status-error",{httpStatus:s.status});let l;try{l=yield s.json()}catch(f){throw T.create("fetch-parse-error",{originalErrorMessage:f?.message})}let g=l.ttl.match(/^([\d.]+)(s)$/);if(!g||!g[2]||isNaN(Number(g[1])))throw T.create("fetch-parse-error",{originalErrorMessage:`ttl field (timeToLive) is not in standard Protobuf Duration format: ${l.ttl}`});let y=Number(g[1])*1e3,M=Date.now();return{token:l.token,expireTimeMillis:M+y,issuedAtTimeMillis:M}})}function He(e,r){let{projectId:t,appId:n,apiKey:i}=e.options;return{url:`${st}/projects/${t}/apps/${n}:${at}?key=${i}`,body:{debug_token:r}}}var lt="firebase-app-check-database",dt=1,ie="firebase-app-check-store";var K=null;function ft(){return K||(K=new Promise((e,r)=>{try{let t=indexedDB.open(lt,dt);t.onsuccess=n=>{e(n.target.result)},t.onerror=n=>{var i;r(T.create("storage-open",{originalErrorMessage:(i=n.target.error)===null||i===void 0?void 0:i.message}))},t.onupgradeneeded=n=>{let i=n.target.result;switch(n.oldVersion){case 0:i.createObjectStore(ie,{keyPath:"compositeKey"})}}}catch(t){r(T.create("storage-open",{originalErrorMessage:t?.message}))}}),K)}function pt(e,r){return ht(gt(e),r)}function ht(e,r){return E(this,null,function*(){let n=(yield ft()).transaction(ie,"readwrite"),o=n.objectStore(ie).put({compositeKey:e,value:r});return new Promise((a,c)=>{o.onsuccess=s=>{a()},n.onerror=s=>{var l;c(T.create("storage-set",{originalErrorMessage:(l=s.target.error)===null||l===void 0?void 0:l.message}))}})})}function gt(e){return`${e.options.appId}-${e.name}`}var oe=new ye("@firebase/app-check");function ne(e,r){return ve()?pt(e,r).catch(t=>{oe.warn(`Failed to write token to IndexedDB. Error: ${t}`)}):Promise.resolve()}function Le(){return xe().enabled}function Be(){return E(this,null,function*(){let e=xe();if(e.enabled&&e.token)return e.token.promise;throw Error(`
3
3
  Can't get debug token in production mode.
4
4
  `)})}var mt={error:"UNKNOWN_ERROR"};function At(e){return we.encodeString(JSON.stringify(e),!1)}function se(e,r=!1){return E(this,null,function*(){let t=e.app;je(t);let n=h(t),i=n.token,o;if(i&&!O(i)&&(n.token=void 0,i=void 0),!i){let s=yield n.cachedTokenPromise;s&&(O(s)?i=s:yield ne(t,void 0))}if(!r&&i&&O(i))return{token:i.token};let a=!1;if(Le()){n.exchangeTokenPromise||(n.exchangeTokenPromise=$e(He(t,yield Be()),e.heartbeatServiceProvider).finally(()=>{n.exchangeTokenPromise=void 0}),a=!0);let s=yield n.exchangeTokenPromise;return yield ne(t,s),n.token=s,{token:s.token}}try{n.exchangeTokenPromise||(n.exchangeTokenPromise=n.provider.getToken().finally(()=>{n.exchangeTokenPromise=void 0}),a=!0),i=yield h(t).exchangeTokenPromise}catch(s){s.code==="appCheck/throttled"?oe.warn(s.message):oe.error(s),o=s}let c;return i?o?O(i)?c={token:i.token,internalError:o}:c=Ne(o):(c={token:i.token},n.token=i,yield ne(t,i)):c=Ne(o),a&&wt(t,c),c})}function kt(e){return E(this,null,function*(){let r=e.app;je(r);let{provider:t}=h(r);if(Le()){let n=yield Be(),{token:i}=yield $e(He(r,n),e.heartbeatServiceProvider);return{token:i}}else{let{token:n}=yield t.getToken();return{token:n}}})}function Et(e,r,t,n){let{app:i}=e,o=h(i),a={next:t,error:n,type:r};if(o.tokenObservers=[...o.tokenObservers,a],o.token&&O(o.token)){let c=o.token;Promise.resolve().then(()=>{t({token:c.token}),Me(e)}).catch(()=>{})}o.cachedTokenPromise.then(()=>Me(e))}function Ue(e,r){let t=h(e),n=t.tokenObservers.filter(i=>i.next!==r);n.length===0&&t.tokenRefresher&&t.tokenRefresher.isRunning()&&t.tokenRefresher.stop(),t.tokenObservers=n}function Me(e){let{app:r}=e,t=h(r),n=t.tokenRefresher;n||(n=Tt(e),t.tokenRefresher=n),!n.isRunning()&&t.isTokenAutoRefreshEnabled&&n.start()}function Tt(e){let{app:r}=e;return new re(()=>E(this,null,function*(){let t=h(r),n;if(t.token?n=yield se(e,!0):n=yield se(e),n.error)throw n.error;if(n.internalError)throw n.internalError}),()=>!0,()=>{let t=h(r);if(t.token){let n=t.token.issuedAtTimeMillis+(t.token.expireTimeMillis-t.token.issuedAtTimeMillis)*.5+3e5,i=t.token.expireTimeMillis-5*60*1e3;return n=Math.min(n,i),Math.max(0,n-Date.now())}else return 0},Oe.RETRIAL_MIN_WAIT,Oe.RETRIAL_MAX_WAIT)}function wt(e,r){let t=h(e).tokenObservers;for(let n of t)try{n.type==="EXTERNAL"&&r.error!=null?n.error(r.error):n.next(r)}catch{}}function O(e){return e.expireTimeMillis-Date.now()>0}function Ne(e){return{token:At(mt),error:e}}var ae=class{constructor(r,t){this.app=r,this.heartbeatServiceProvider=t}_delete(){let{tokenObservers:r}=h(this.app);for(let t of r)Ue(this.app,t.next);return Promise.resolve()}};function vt(e,r){return new ae(e,r)}function bt(e){return{getToken:r=>se(e,r),getLimitedUseToken:()=>kt(e),addTokenListener:r=>Et(e,"INTERNAL",r),removeTokenListener:r=>Ue(e.app,r)}}var yt="@firebase/app-check",_t="0.8.3";var It="app-check",Fe="app-check-internal";function Rt(){J(new Y(It,e=>{let r=e.getProvider("app").getImmediate(),t=e.getProvider("heartbeat");return vt(r,t)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,r,t)=>{e.getProvider(Fe).initialize()})),J(new Y(Fe,e=>{let r=e.getProvider("app-check").getImmediate();return bt(r)},"PUBLIC").setInstantiationMode("EXPLICIT")),C(yt,_t)}Rt();var Pt=["localhost","0.0.0.0","127.0.0.1"],In=typeof window<"u"&&Pt.includes(window.location.hostname);var St=new m("angularfire2.auth.use-emulator"),Dt=new m("angularfire2.auth.settings"),Ot=new m("angularfire2.auth.tenant-id"),Mt=new m("angularfire2.auth.langugage-code"),Nt=new m("angularfire2.auth.use-device-language"),Ft=new m("angularfire.auth.persistence"),xt=(e,r,t,n,i,o,a,c)=>De(`${e.name}.auth`,"AngularFireAuth",e.name,()=>{let s=r.runOutsideAngular(()=>e.auth());if(t&&s.useEmulator(...t),n&&(s.tenantId=n),s.languageCode=i,o&&s.useDeviceLanguage(),a)for(let[l,g]of Object.entries(a))s.settings[l]=g;return c&&s.setPersistence(c),s},[t,n,i,o,a,c]),jt=(()=>{class e{authState;idToken;user;idTokenResult;credential;constructor(t,n,i,o,a,c,s,l,g,y,M,f){let ce=new le,R=P(void 0).pipe(v(a.outsideAngular),b(()=>o.runOutsideAngular(()=>import("./chunk-DEYNPZR2.js"))),F(()=>te(t,o,n)),F(k=>xt(k,o,c,l,g,y,s,M)),q({bufferSize:1,refCount:!1}));if(Te(i))this.authState=this.user=this.idToken=this.idTokenResult=this.credential=P(null);else{R.pipe(ge()).subscribe();let k=R.pipe(b(u=>u.getRedirectResult().then(A=>A,()=>null)),Pe,q({bufferSize:1,refCount:!1})),ue=R.pipe(b(u=>new N(A=>({unsubscribe:o.runOutsideAngular(()=>u.onAuthStateChanged(w=>A.next(w),w=>A.error(w),()=>A.complete()))})))),W=R.pipe(b(u=>new N(A=>({unsubscribe:o.runOutsideAngular(()=>u.onIdTokenChanged(w=>A.next(w),w=>A.error(w),()=>A.complete()))}))));this.authState=k.pipe(G(ue),_(a.outsideAngular),v(a.insideAngular)),this.user=k.pipe(G(W),_(a.outsideAngular),v(a.insideAngular)),this.idToken=this.user.pipe(b(u=>u?V(u.getIdToken()):P(null))),this.idTokenResult=this.user.pipe(b(u=>u?V(u.getIdTokenResult()):P(null))),this.credential=pe(k,ce,this.authState.pipe(he(u=>!u))).pipe(F(u=>u?.user?u:null),_(a.outsideAngular),v(a.insideAngular))}return Se(this,R,o,{spy:{apply:(k,ue,W)=>{(k.startsWith("signIn")||k.startsWith("createUser"))&&W.then(u=>ce.next(u))}}})}static \u0275fac=function(n){return new(n||e)(d(U),d(z,8),d(H),d(I),d(Re),d(St,8),d(Dt,8),d(Ot,8),d(Mt,8),d(Nt,8),d(Ft,8),d(S,8))};static \u0275prov=x({token:e,factory:e.\u0275fac,providedIn:"any"})}return e})(),Un=(()=>{class e{constructor(){p.registerVersion("angularfire",D.full,"auth-compat")}static \u0275fac=function(n){return new(n||e)};static \u0275mod=$({type:e});static \u0275inj=j({providers:[jt]})}return e})();export{en as a,jt as b,Un as c};
@@ -1 +1 @@
1
- import{Fa as k,J as C,Qc as E,Rc as M,b as g,c as v,da as I,ea as O,fa as q,ga as m,m as S,na as P,s as y}from"./chunk-2CBUU23K.js";import{k as D}from"./chunk-O3DEWASH.js";var R=function(a){return a.Outlet="Outlet",a.SyncTime="SyncTime",a.OutletPrice="OutletPrice",a.POSStorage="POSStorage",a.Product="Product",a.OfflineConfig="OfflineConfig",a.Order="Order",a.FailedOrder="FailedOrder",a}(R||{});function f(a,l,e,o){return new Promise((t,r)=>{a||r("IndexedDB not available");let n=a.open(l,e),i;n.onsuccess=c=>{i=n.result,t(i)},n.onerror=c=>{r(`IndexedDB error: ${n.error}`)},typeof o=="function"&&(n.onupgradeneeded=c=>{o(c,i)})})}function A(a,l,e,o,t){if(!a)return;let r=a.open(l,e);r.onupgradeneeded=n=>{let i=n.target.result;o.forEach(s=>{if(!i.objectStoreNames.contains(s.store)){let u=i.createObjectStore(s.store,s.storeConfig);s.storeSchema.forEach(d=>{u.createIndex(d.name,d.keypath,d.options)})}});let c=t&&t();c&&Object.keys(c).map(s=>parseInt(s,10)).filter(s=>s>n.oldVersion).sort((s,u)=>s-u).forEach(s=>{c[s](i,r.transaction)}),i.close()},r.onsuccess=n=>{n.target.result.close()}}function V(a,l,e){if(!a||!l||!e)throw Error('Params: "dbName", "version", "storeName" are mandatory.');return new g(o=>{try{let t=l+1,r=indexedDB.open(a,t);r.onupgradeneeded=n=>{let i=n.target.result;i.deleteObjectStore(e),i.close(),console.log("onupgradeneeded"),o.next(!0),o.complete()},r.onerror=n=>o.error(n)}catch(t){o.error(t)}})}function _(a,l){return a.objectStoreNames.contains(l)}function j(a,l,e){a||e("You need to use the openDatabase function to create a database before you query it!"),_(a,l)||e(`objectStore does not exists: ${l}`)}function p(a,l){let e=a.transaction(l.storeName,l.dbMode);return e.onerror=l.error,e.onabort=l.abort,e}function b(a,l,e,o){return{storeName:l,dbMode:a,error:t=>{e(t)},abort:t=>{e(t)}}}var x=function(a){return a.readonly="readonly",a.readwrite="readwrite",a}(x||{}),K=new q(null),G=(()=>{class a{constructor(e,o){if(this.dbConfigs=e,this.platformId=o,this.defaultDatabaseName=null,this.isBrowser=M(this.platformId),this.isBrowser){this.indexedDB=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB;let t=Object.values(this.dbConfigs),r=t.length===1;for(let n of t)this.instanciateConfig(n,r)}}instanciateConfig(e,o){if(!e.name)throw new Error("NgxIndexedDB: Please, provide the dbName in the configuration");if(!e.version)throw new Error("NgxIndexedDB: Please, provide the db version in the configuration");if((e.isDefault??!1)&&this.defaultDatabaseName)throw new Error("NgxIndexedDB: Only one database can be set as default");((e.isDefault??!1)&&!this.defaultDatabaseName||o)&&(this.defaultDatabaseName=e.name,this.selectedDb=e.name),A(this.indexedDB,e.name,e.version,e.objectStoresMeta,e.migrationFactory),f(this.indexedDB,e.name).then(t=>{t.version!==e.version&&(this.dbConfigs[e.name].version=t.version)})}get dbConfig(){return this.dbConfigs[this.selectedDb]}selectDb(e){if(e=e??this.defaultDatabaseName,!e)throw new Error("No database name specified and no default database set.");if(!Object.keys(this.dbConfigs).includes(e))throw new Error(`NgxIndexedDB: Database ${e} is not initialized.`);this.selectedDb=e}createObjectStore(e,o){let t=[e];A(this.indexedDB,this.dbConfig.name,++this.dbConfig.version,t,o)}add(e,o,t){return new g(r=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{let c=p(n,b(x.readwrite,e,u=>r.error(u))).objectStore(e),s=t?c.add(o,t):c.add(o);s.onsuccess=u=>D(this,null,function*(){let d=u.target.result,h=c.get(d);h.onsuccess=w=>{r.next(w.target.result),r.complete()},h.onerror=w=>{r.error(w)}}),s.onerror=u=>{r.error(u)}}).catch(n=>r.error(n))})}bulkAdd(e,o){let t=new Promise((r,n)=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{let s=p(i,b(x.readwrite,e,r,n)).objectStore(e),u=o.map(d=>new Promise((h,w)=>{let B=d.key;delete d.key;let T=B?s.add(d,B):s.add(d);T.onsuccess=$=>{let F=$.target.result;h(F)}}));r(Promise.all(u))}).catch(i=>n(i))});return S(t)}bulkDelete(e,o){let t=o.map(r=>new Promise((n,i)=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(c=>{let s=p(c,b(x.readwrite,e,i,n));s.objectStore(e).delete(r),s.oncomplete=()=>{this.getAll(e).pipe(C(1)).subscribe(d=>{n(d)})}}).catch(c=>i(c))}));return S(Promise.all(t))}getByKey(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{let c=p(r,b(x.readonly,e,t.error)).objectStore(e).get(o);c.onsuccess=s=>{t.next(s.target.result),t.complete()},c.onerror=s=>{t.error(s)}}).catch(r=>t.error(r))})}bulkGet(e,o){let t=o.map(r=>this.getByKey(e,r));return new g(r=>{y(t).subscribe(n=>{r.next(n),r.complete()})})}getByID(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{j(r,e,s=>t.error(s));let c=p(r,b(x.readonly,e,t.error,t.next)).objectStore(e).get(o);c.onsuccess=s=>{t.next(s.target.result)}}).catch(r=>t.error(r))})}getByIndex(e,o,t){return new g(r=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{j(n,e,d=>r.error(d));let u=p(n,b(x.readonly,e,r.error)).objectStore(e).index(o).get(t);u.onsuccess=d=>{r.next(d.target.result),r.complete()}}).catch(n=>r.error(n))})}getAll(e){return new g(o=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(t=>{j(t,e,c=>o.error(c));let i=p(t,b(x.readonly,e,o.error,o.next)).objectStore(e).getAll();i.onerror=c=>{o.error(c)},i.onsuccess=({target:{result:c}})=>{o.next(c),o.complete()}}).catch(t=>o.error(t))})}update(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{j(r,e,s=>t.error(s));let i=p(r,b(x.readwrite,e,s=>t.error(s))).objectStore(e),c=i.put(o);c.onsuccess=s=>D(this,null,function*(){let u=s.target.result,d=i.get(u);d.onsuccess=h=>{t.next(h.target.result),t.complete()}})}).catch(r=>t.error(r))})}bulkPut(e,o){let t;return new g(r=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{j(n,e,c=>r.error(c)),t=p(n,b(x.readwrite,e,c=>r.error(c)));let i=t.objectStore(e);o.forEach((c,s)=>{let u=i.put(c);s===o.length-1&&(u.onsuccess=d=>{t.commit(),r.next(d.target.result),r.complete()}),u.onerror=d=>{t.abort(),r.error(d)}})}).catch(n=>{t?.abort(),r.error(n)})})}delete(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{j(r,e,c=>t.error(c));let n=p(r,b(x.readwrite,e,c=>t.error(c)));n.objectStore(e).delete(o),n.oncomplete=()=>{this.getAll(e).pipe(C(1)).subscribe(c=>{t.next(c),t.complete()})}}).catch(r=>t.error(r))})}deleteByKey(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{j(r,e,c=>t.error(c));let n=p(r,b(x.readwrite,e,c=>t.error(c))),i=n.objectStore(e);n.oncomplete=()=>{t.next(!0),t.complete()},i.delete(o)}).catch(r=>t.error(r))})}clear(e){return new g(o=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(t=>{j(t,e,i=>o.error(i));let r=p(t,b(x.readwrite,e,i=>o.error(i)));r.objectStore(e).clear(),r.oncomplete=()=>{o.next(!0),o.complete()}}).catch(t=>o.error(t))})}deleteDatabase(){return new g(e=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>D(this,null,function*(){yield o.close();let t=this.indexedDB.deleteDatabase(this.dbConfig.name);t.onsuccess=()=>{e.next(!0),e.complete()},t.onerror=r=>e.error(r),t.onblocked=()=>{throw new Error("Unable to delete database because it's blocked")}})).catch(o=>e.error(o))})}openCursor(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{j(r,e,s=>t.error(s));let i=p(r,b(x.readonly,e,t.error)).objectStore(e),c=o===void 0?i.openCursor():i.openCursor(o);c.onsuccess=s=>{t.next(s),t.complete()}}).catch(r=>t.error(r))})}openCursorByIndex(e,o,t,r=x.readonly){let n=new v;return f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{j(i,e,h=>{n.error(h)});let d=p(i,b(r,e,h=>{n.error(h)},()=>{n.next()})).objectStore(e).index(o).openCursor(t);d.onsuccess=h=>{n.next(h)}}).catch(i=>n.error(i)),n}getAllByIndex(e,o,t){let r=[];return new g(n=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{j(i,e,h=>n.error(h));let d=p(i,b(x.readonly,e,n.error)).objectStore(e).index(o).openCursor(t);d.onsuccess=h=>{let w=h.target.result;w?(r.push(w.value),w.continue()):(n.next(r),n.complete())}}).catch(i=>n.error(i))})}getAllKeysByIndex(e,o,t){let r=[];return new g(n=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{j(i,e,h=>n.error(h));let d=p(i,b(x.readonly,e,n.error)).objectStore(e).index(o).openKeyCursor(t);d.onsuccess=h=>{let w=h.target.result;w?(r.push({primaryKey:w.primaryKey,key:w.key}),w.continue()):(n.next(r),n.complete())}}).catch(i=>n.error(i))})}count(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{j(r,e,s=>t.error(s));let c=p(r,b(x.readonly,e,t.error)).objectStore(e).count(o);c.onerror=s=>t.error(s),c.onsuccess=s=>{t.next(s.target.result),t.complete()}}).catch(r=>t.error(r))})}countByIndex(e,o,t){return new g(r=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{j(n,e,d=>r.error(d));let u=p(n,b(x.readonly,e,r.error)).objectStore(e).index(o).count(t);u.onerror=d=>r.error(d),u.onsuccess=d=>{r.next(d.target.result),r.complete()}}).catch(n=>r.error(n))})}deleteObjectStore(e){return V(this.dbConfig.name,++this.dbConfig.version,e)}}return a.\u0275fac=function(e){return new(e||a)(m(K),m(k))},a.\u0275prov=I({token:a,factory:a.\u0275fac}),a})(),Z=(()=>{class a{static forRoot(...e){let o={};for(let t of e)Object.assign(o,{[t.name]:t});return{ngModule:a,providers:[G,{provide:K,useValue:o}]}}}return a.\u0275fac=function(e){return new(e||a)},a.\u0275mod=P({type:a}),a.\u0275inj=O({imports:[E]}),a})();export{R as a,G as b,Z as c};
1
+ import{Fa as k,J as C,Qc as E,Rc as M,b as g,c as v,da as I,ea as O,fa as q,ga as m,m as S,na as P,s as y}from"./chunk-GJ4QCDDE.js";import{k as D}from"./chunk-O3DEWASH.js";var R=function(a){return a.Outlet="Outlet",a.SyncTime="SyncTime",a.OutletPrice="OutletPrice",a.POSStorage="POSStorage",a.Product="Product",a.OfflineConfig="OfflineConfig",a.Order="Order",a.FailedOrder="FailedOrder",a}(R||{});function f(a,l,e,o){return new Promise((t,r)=>{a||r("IndexedDB not available");let n=a.open(l,e),i;n.onsuccess=c=>{i=n.result,t(i)},n.onerror=c=>{r(`IndexedDB error: ${n.error}`)},typeof o=="function"&&(n.onupgradeneeded=c=>{o(c,i)})})}function A(a,l,e,o,t){if(!a)return;let r=a.open(l,e);r.onupgradeneeded=n=>{let i=n.target.result;o.forEach(s=>{if(!i.objectStoreNames.contains(s.store)){let u=i.createObjectStore(s.store,s.storeConfig);s.storeSchema.forEach(d=>{u.createIndex(d.name,d.keypath,d.options)})}});let c=t&&t();c&&Object.keys(c).map(s=>parseInt(s,10)).filter(s=>s>n.oldVersion).sort((s,u)=>s-u).forEach(s=>{c[s](i,r.transaction)}),i.close()},r.onsuccess=n=>{n.target.result.close()}}function V(a,l,e){if(!a||!l||!e)throw Error('Params: "dbName", "version", "storeName" are mandatory.');return new g(o=>{try{let t=l+1,r=indexedDB.open(a,t);r.onupgradeneeded=n=>{let i=n.target.result;i.deleteObjectStore(e),i.close(),console.log("onupgradeneeded"),o.next(!0),o.complete()},r.onerror=n=>o.error(n)}catch(t){o.error(t)}})}function _(a,l){return a.objectStoreNames.contains(l)}function j(a,l,e){a||e("You need to use the openDatabase function to create a database before you query it!"),_(a,l)||e(`objectStore does not exists: ${l}`)}function p(a,l){let e=a.transaction(l.storeName,l.dbMode);return e.onerror=l.error,e.onabort=l.abort,e}function b(a,l,e,o){return{storeName:l,dbMode:a,error:t=>{e(t)},abort:t=>{e(t)}}}var x=function(a){return a.readonly="readonly",a.readwrite="readwrite",a}(x||{}),K=new q(null),G=(()=>{class a{constructor(e,o){if(this.dbConfigs=e,this.platformId=o,this.defaultDatabaseName=null,this.isBrowser=M(this.platformId),this.isBrowser){this.indexedDB=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB;let t=Object.values(this.dbConfigs),r=t.length===1;for(let n of t)this.instanciateConfig(n,r)}}instanciateConfig(e,o){if(!e.name)throw new Error("NgxIndexedDB: Please, provide the dbName in the configuration");if(!e.version)throw new Error("NgxIndexedDB: Please, provide the db version in the configuration");if((e.isDefault??!1)&&this.defaultDatabaseName)throw new Error("NgxIndexedDB: Only one database can be set as default");((e.isDefault??!1)&&!this.defaultDatabaseName||o)&&(this.defaultDatabaseName=e.name,this.selectedDb=e.name),A(this.indexedDB,e.name,e.version,e.objectStoresMeta,e.migrationFactory),f(this.indexedDB,e.name).then(t=>{t.version!==e.version&&(this.dbConfigs[e.name].version=t.version)})}get dbConfig(){return this.dbConfigs[this.selectedDb]}selectDb(e){if(e=e??this.defaultDatabaseName,!e)throw new Error("No database name specified and no default database set.");if(!Object.keys(this.dbConfigs).includes(e))throw new Error(`NgxIndexedDB: Database ${e} is not initialized.`);this.selectedDb=e}createObjectStore(e,o){let t=[e];A(this.indexedDB,this.dbConfig.name,++this.dbConfig.version,t,o)}add(e,o,t){return new g(r=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{let c=p(n,b(x.readwrite,e,u=>r.error(u))).objectStore(e),s=t?c.add(o,t):c.add(o);s.onsuccess=u=>D(this,null,function*(){let d=u.target.result,h=c.get(d);h.onsuccess=w=>{r.next(w.target.result),r.complete()},h.onerror=w=>{r.error(w)}}),s.onerror=u=>{r.error(u)}}).catch(n=>r.error(n))})}bulkAdd(e,o){let t=new Promise((r,n)=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{let s=p(i,b(x.readwrite,e,r,n)).objectStore(e),u=o.map(d=>new Promise((h,w)=>{let B=d.key;delete d.key;let T=B?s.add(d,B):s.add(d);T.onsuccess=$=>{let F=$.target.result;h(F)}}));r(Promise.all(u))}).catch(i=>n(i))});return S(t)}bulkDelete(e,o){let t=o.map(r=>new Promise((n,i)=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(c=>{let s=p(c,b(x.readwrite,e,i,n));s.objectStore(e).delete(r),s.oncomplete=()=>{this.getAll(e).pipe(C(1)).subscribe(d=>{n(d)})}}).catch(c=>i(c))}));return S(Promise.all(t))}getByKey(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{let c=p(r,b(x.readonly,e,t.error)).objectStore(e).get(o);c.onsuccess=s=>{t.next(s.target.result),t.complete()},c.onerror=s=>{t.error(s)}}).catch(r=>t.error(r))})}bulkGet(e,o){let t=o.map(r=>this.getByKey(e,r));return new g(r=>{y(t).subscribe(n=>{r.next(n),r.complete()})})}getByID(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{j(r,e,s=>t.error(s));let c=p(r,b(x.readonly,e,t.error,t.next)).objectStore(e).get(o);c.onsuccess=s=>{t.next(s.target.result)}}).catch(r=>t.error(r))})}getByIndex(e,o,t){return new g(r=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{j(n,e,d=>r.error(d));let u=p(n,b(x.readonly,e,r.error)).objectStore(e).index(o).get(t);u.onsuccess=d=>{r.next(d.target.result),r.complete()}}).catch(n=>r.error(n))})}getAll(e){return new g(o=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(t=>{j(t,e,c=>o.error(c));let i=p(t,b(x.readonly,e,o.error,o.next)).objectStore(e).getAll();i.onerror=c=>{o.error(c)},i.onsuccess=({target:{result:c}})=>{o.next(c),o.complete()}}).catch(t=>o.error(t))})}update(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{j(r,e,s=>t.error(s));let i=p(r,b(x.readwrite,e,s=>t.error(s))).objectStore(e),c=i.put(o);c.onsuccess=s=>D(this,null,function*(){let u=s.target.result,d=i.get(u);d.onsuccess=h=>{t.next(h.target.result),t.complete()}})}).catch(r=>t.error(r))})}bulkPut(e,o){let t;return new g(r=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{j(n,e,c=>r.error(c)),t=p(n,b(x.readwrite,e,c=>r.error(c)));let i=t.objectStore(e);o.forEach((c,s)=>{let u=i.put(c);s===o.length-1&&(u.onsuccess=d=>{t.commit(),r.next(d.target.result),r.complete()}),u.onerror=d=>{t.abort(),r.error(d)}})}).catch(n=>{t?.abort(),r.error(n)})})}delete(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{j(r,e,c=>t.error(c));let n=p(r,b(x.readwrite,e,c=>t.error(c)));n.objectStore(e).delete(o),n.oncomplete=()=>{this.getAll(e).pipe(C(1)).subscribe(c=>{t.next(c),t.complete()})}}).catch(r=>t.error(r))})}deleteByKey(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{j(r,e,c=>t.error(c));let n=p(r,b(x.readwrite,e,c=>t.error(c))),i=n.objectStore(e);n.oncomplete=()=>{t.next(!0),t.complete()},i.delete(o)}).catch(r=>t.error(r))})}clear(e){return new g(o=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(t=>{j(t,e,i=>o.error(i));let r=p(t,b(x.readwrite,e,i=>o.error(i)));r.objectStore(e).clear(),r.oncomplete=()=>{o.next(!0),o.complete()}}).catch(t=>o.error(t))})}deleteDatabase(){return new g(e=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>D(this,null,function*(){yield o.close();let t=this.indexedDB.deleteDatabase(this.dbConfig.name);t.onsuccess=()=>{e.next(!0),e.complete()},t.onerror=r=>e.error(r),t.onblocked=()=>{throw new Error("Unable to delete database because it's blocked")}})).catch(o=>e.error(o))})}openCursor(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{j(r,e,s=>t.error(s));let i=p(r,b(x.readonly,e,t.error)).objectStore(e),c=o===void 0?i.openCursor():i.openCursor(o);c.onsuccess=s=>{t.next(s),t.complete()}}).catch(r=>t.error(r))})}openCursorByIndex(e,o,t,r=x.readonly){let n=new v;return f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{j(i,e,h=>{n.error(h)});let d=p(i,b(r,e,h=>{n.error(h)},()=>{n.next()})).objectStore(e).index(o).openCursor(t);d.onsuccess=h=>{n.next(h)}}).catch(i=>n.error(i)),n}getAllByIndex(e,o,t){let r=[];return new g(n=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{j(i,e,h=>n.error(h));let d=p(i,b(x.readonly,e,n.error)).objectStore(e).index(o).openCursor(t);d.onsuccess=h=>{let w=h.target.result;w?(r.push(w.value),w.continue()):(n.next(r),n.complete())}}).catch(i=>n.error(i))})}getAllKeysByIndex(e,o,t){let r=[];return new g(n=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{j(i,e,h=>n.error(h));let d=p(i,b(x.readonly,e,n.error)).objectStore(e).index(o).openKeyCursor(t);d.onsuccess=h=>{let w=h.target.result;w?(r.push({primaryKey:w.primaryKey,key:w.key}),w.continue()):(n.next(r),n.complete())}}).catch(i=>n.error(i))})}count(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{j(r,e,s=>t.error(s));let c=p(r,b(x.readonly,e,t.error)).objectStore(e).count(o);c.onerror=s=>t.error(s),c.onsuccess=s=>{t.next(s.target.result),t.complete()}}).catch(r=>t.error(r))})}countByIndex(e,o,t){return new g(r=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{j(n,e,d=>r.error(d));let u=p(n,b(x.readonly,e,r.error)).objectStore(e).index(o).count(t);u.onerror=d=>r.error(d),u.onsuccess=d=>{r.next(d.target.result),r.complete()}}).catch(n=>r.error(n))})}deleteObjectStore(e){return V(this.dbConfig.name,++this.dbConfig.version,e)}}return a.\u0275fac=function(e){return new(e||a)(m(K),m(k))},a.\u0275prov=I({token:a,factory:a.\u0275fac}),a})(),Z=(()=>{class a{static forRoot(...e){let o={};for(let t of e)Object.assign(o,{[t.name]:t});return{ngModule:a,providers:[G,{provide:K,useValue:o}]}}}return a.\u0275fac=function(e){return new(e||a)},a.\u0275mod=P({type:a}),a.\u0275inj=O({imports:[E]}),a})();export{R as a,G as b,Z as c};
@@ -1 +1 @@
1
- import{Ad as M,Cd as z,F as f,Uc as u,Vc as x,b as p,da as w,ga as g,o as m,q as l,wd as H}from"./chunk-2CBUU23K.js";var j=(()=>{class c{http;toastr;router;port=window.location.href.split("localhost:")[1]?.split("/")[0];hostURL=t=>M.production?t:`https://localhost:${this.port}${t}`;constructor(t,r,n){this.http=t,this.toastr=r,this.router=n}PostToUrlEncode(t,r,n=1e5){let e=new u;return e=e.set("Content-Type","application/x-www-form-urlencoded"),new p(s=>{this.http.post(this.hostURL(t),r,{headers:e}).pipe(l(n)).subscribe(a=>{s.next(a),s.complete()})})}GetText(t=1e5){let r=localStorage.getItem("Token"),e={responseType:"text",headers:new u({Authorization:"Bearer "+r})};return new p(s=>{this.http.get(this.hostURL("/API/Token/GetZendeskJWT"),e).pipe(l(t)).subscribe(a=>{s.next(a),s.complete()})})}POSText(t,r,n=1e5){let e=localStorage.getItem("Token"),a={responseType:"text",headers:new u({"Content-Type":"application/json","Cache-Control":"no-cache",Authorization:"Bearer "+e})};return new p(i=>{this.http.post(this.hostURL(t),r,a).pipe(l(n)).subscribe(o=>{i.next(o),i.complete()})})}get(t){let r=localStorage.getItem("Token"),n=new u({"Content-Type":"application/json","Cache-Control":"no-cache"});r&&(n=n.append("Authorization","Bearer "+r));let e={headers:n};return this.http.get(this.hostURL(t),e).pipe(f(s=>{if(!this.unauthorizedErrorHandling(s)){let i=this.errorMessageHandling(s);this.toastr.error(i.Message!=""?i.Message:"An unknown error has occured!",i.header),this.paymentErrorHandling(s)}return m(()=>s)}))}getNews(t){return this.http.get(t)}paymentErrorHandling(t){t.status==402&&this.router.navigate(["/menu/Profile/Main/My_Subscription"])}post(t,r,n=1e5){return new p(e=>{let s=localStorage.getItem("Token"),a=new u({"Content-Type":"application/json","Cache-Control":"no-cache"});s&&(a=a.append("Authorization","Bearer "+s));let i={headers:a};this.http.post(this.hostURL(t),r,i).pipe(l(n)).subscribe({next:o=>{e.next(o),e.complete()},error:o=>{if(o.status==200)e.next(o.error.text),e.complete();else{if(!this.unauthorizedErrorHandling(o)){let h=this.errorMessageHandling(o);this.toastr.error(h.Message!=""?h.Message:"An unknown error has occured!",h.header,{enableHtml:!0})}e.error(o)}}})})}postFile(t,r,n=1e5){return new p(e=>{let s=localStorage.getItem("Token"),a=new u({"Content-Type":"application/json","Cache-Control":"no-cache"});s&&(a=a.append("Authorization","Bearer "+s)),this.http.post(this.hostURL(t),r,{headers:a,observe:"response",responseType:"blob"}).pipe(l(n)).subscribe({next:i=>{e.next({title:i.headers.get("Content-Disposition"),file:i.body}),e.complete()},error:i=>{if(i.headers.get("Content-Type")==="application/json; charset=utf-8"){let o=new FileReader;o.addEventListener("loadend",d=>{let h=JSON.parse(d.srcElement.result)?.Message;if(!this.unauthorizedErrorHandling(i)){let k=this.errorMessageHandling(i);this.toastr.error(h??"An unknown error has occured!",k.header,{enableHtml:!0})}}),o.readAsText(i.error)}e.error(i)}})})}put(t,r,n=1e5){return new p(e=>{let s=localStorage.getItem("Token"),a=new u({"Content-Type":"application/json","Cache-Control":"no-cache"});s&&(a=a.append("Authorization","Bearer "+s));let i={headers:a};this.http.put(this.hostURL(t),r,i).pipe(l(n)).subscribe({next:o=>{e.next(o),e.complete()},error:o=>{if(o.status==200)e.next(o.error.text),e.complete();else{if(!this.unauthorizedErrorHandling(o)){let h=this.errorMessageHandling(o);this.toastr.error(h.Message!=""?h.Message:"An unknown error has occured!",h.header)}e.error(o)}}})})}delete(t,r,n=1e5){return new p(e=>{let s=localStorage.getItem("Token"),a=new u({"Content-Type":"application/json","Cache-Control":"no-cache"});s&&(a=a.append("Authorization","Bearer "+s));let i={headers:a,body:r};this.http.delete(this.hostURL(t),i).pipe(l(n)).subscribe({next:o=>{e.next(o),e.complete()},error:o=>{if(o.status==200)e.next(o.error.text),e.complete();else{if(!this.unauthorizedErrorHandling(o)){let h=this.errorMessageHandling(o);this.toastr.error(h.Message!=""?h.Message:"An unknown error has occured!",h.header)}e.error(o)}}})})}unauthorizedErrorHandling(t){let r=!1;return(t.status==401||t.status==403)&&(localStorage.getItem("Token")?this.router.navigate(["/menu/Unauthorized/Main/Unauthorized"]):window.location.href="/",r=!0),r}errorMessageHandling(t){let r="API Error",n="Exception Message";return t.error?(r="API Error - "+t.status,t.status==451&&(r="Error"),t.error&&(n=t.error.Message)):t.Message&&(r="API Error - "+t.name,n=t.Message),{header:r,Message:n}}postFormDataWithoutBearer(t,r){return new p(n=>{this.http.post(this.hostURL(t),r).pipe(l(1e5)).subscribe({next:e=>{n.next(e),n.complete()},error:e=>{e.status==200&&(n.next(e.error.text),n.complete()),n.error(e)}})})}postFormData(t,r,n=!0){return new p(e=>{let s=localStorage.getItem("Token"),i={headers:new u({Authorization:"Bearer "+s})};this.http.post(this.hostURL(t),r,i).pipe(l(1e5)).subscribe({next:o=>{e.next(o),e.complete()},error:o=>{if(o.status==200)e.next(o.error.text),e.complete();else{if(!this.unauthorizedErrorHandling(o)&&n){let h=this.errorMessageHandling(o);this.toastr.error(h.Message!=""?h.Message:"An unknown error has occured!",h.header)}e.error(o)}}})})}static \u0275fac=function(r){return new(r||c)(g(x),g(z),g(H))};static \u0275prov=w({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})();export{j as a};
1
+ import{Ad as M,Cd as z,F as f,Uc as u,Vc as x,b as p,da as w,ga as g,o as m,q as l,wd as H}from"./chunk-GJ4QCDDE.js";var j=(()=>{class c{http;toastr;router;port=window.location.href.split("localhost:")[1]?.split("/")[0];hostURL=t=>M.production?t:`https://localhost:${this.port}${t}`;constructor(t,r,n){this.http=t,this.toastr=r,this.router=n}PostToUrlEncode(t,r,n=1e5){let e=new u;return e=e.set("Content-Type","application/x-www-form-urlencoded"),new p(s=>{this.http.post(this.hostURL(t),r,{headers:e}).pipe(l(n)).subscribe(a=>{s.next(a),s.complete()})})}GetText(t=1e5){let r=localStorage.getItem("Token"),e={responseType:"text",headers:new u({Authorization:"Bearer "+r})};return new p(s=>{this.http.get(this.hostURL("/API/Token/GetZendeskJWT"),e).pipe(l(t)).subscribe(a=>{s.next(a),s.complete()})})}POSText(t,r,n=1e5){let e=localStorage.getItem("Token"),a={responseType:"text",headers:new u({"Content-Type":"application/json","Cache-Control":"no-cache",Authorization:"Bearer "+e})};return new p(i=>{this.http.post(this.hostURL(t),r,a).pipe(l(n)).subscribe(o=>{i.next(o),i.complete()})})}get(t){let r=localStorage.getItem("Token"),n=new u({"Content-Type":"application/json","Cache-Control":"no-cache"});r&&(n=n.append("Authorization","Bearer "+r));let e={headers:n};return this.http.get(this.hostURL(t),e).pipe(f(s=>{if(!this.unauthorizedErrorHandling(s)){let i=this.errorMessageHandling(s);this.toastr.error(i.Message!=""?i.Message:"An unknown error has occured!",i.header),this.paymentErrorHandling(s)}return m(()=>s)}))}getNews(t){return this.http.get(t)}paymentErrorHandling(t){t.status==402&&this.router.navigate(["/menu/Profile/Main/My_Subscription"])}post(t,r,n=1e5){return new p(e=>{let s=localStorage.getItem("Token"),a=new u({"Content-Type":"application/json","Cache-Control":"no-cache"});s&&(a=a.append("Authorization","Bearer "+s));let i={headers:a};this.http.post(this.hostURL(t),r,i).pipe(l(n)).subscribe({next:o=>{e.next(o),e.complete()},error:o=>{if(o.status==200)e.next(o.error.text),e.complete();else{if(!this.unauthorizedErrorHandling(o)){let h=this.errorMessageHandling(o);this.toastr.error(h.Message!=""?h.Message:"An unknown error has occured!",h.header,{enableHtml:!0})}e.error(o)}}})})}postFile(t,r,n=1e5){return new p(e=>{let s=localStorage.getItem("Token"),a=new u({"Content-Type":"application/json","Cache-Control":"no-cache"});s&&(a=a.append("Authorization","Bearer "+s)),this.http.post(this.hostURL(t),r,{headers:a,observe:"response",responseType:"blob"}).pipe(l(n)).subscribe({next:i=>{e.next({title:i.headers.get("Content-Disposition"),file:i.body}),e.complete()},error:i=>{if(i.headers.get("Content-Type")==="application/json; charset=utf-8"){let o=new FileReader;o.addEventListener("loadend",d=>{let h=JSON.parse(d.srcElement.result)?.Message;if(!this.unauthorizedErrorHandling(i)){let k=this.errorMessageHandling(i);this.toastr.error(h??"An unknown error has occured!",k.header,{enableHtml:!0})}}),o.readAsText(i.error)}e.error(i)}})})}put(t,r,n=1e5){return new p(e=>{let s=localStorage.getItem("Token"),a=new u({"Content-Type":"application/json","Cache-Control":"no-cache"});s&&(a=a.append("Authorization","Bearer "+s));let i={headers:a};this.http.put(this.hostURL(t),r,i).pipe(l(n)).subscribe({next:o=>{e.next(o),e.complete()},error:o=>{if(o.status==200)e.next(o.error.text),e.complete();else{if(!this.unauthorizedErrorHandling(o)){let h=this.errorMessageHandling(o);this.toastr.error(h.Message!=""?h.Message:"An unknown error has occured!",h.header)}e.error(o)}}})})}delete(t,r,n=1e5){return new p(e=>{let s=localStorage.getItem("Token"),a=new u({"Content-Type":"application/json","Cache-Control":"no-cache"});s&&(a=a.append("Authorization","Bearer "+s));let i={headers:a,body:r};this.http.delete(this.hostURL(t),i).pipe(l(n)).subscribe({next:o=>{e.next(o),e.complete()},error:o=>{if(o.status==200)e.next(o.error.text),e.complete();else{if(!this.unauthorizedErrorHandling(o)){let h=this.errorMessageHandling(o);this.toastr.error(h.Message!=""?h.Message:"An unknown error has occured!",h.header)}e.error(o)}}})})}unauthorizedErrorHandling(t){let r=!1;return(t.status==401||t.status==403)&&(localStorage.getItem("Token")?this.router.navigate(["/menu/Unauthorized/Main/Unauthorized"]):window.location.href="/",r=!0),r}errorMessageHandling(t){let r="API Error",n="Exception Message";return t.error?(r="API Error - "+t.status,t.status==451&&(r="Error"),t.error&&(n=t.error.Message)):t.Message&&(r="API Error - "+t.name,n=t.Message),{header:r,Message:n}}postFormDataWithoutBearer(t,r){return new p(n=>{this.http.post(this.hostURL(t),r).pipe(l(1e5)).subscribe({next:e=>{n.next(e),n.complete()},error:e=>{e.status==200&&(n.next(e.error.text),n.complete()),n.error(e)}})})}postFormData(t,r,n=!0){return new p(e=>{let s=localStorage.getItem("Token"),i={headers:new u({Authorization:"Bearer "+s})};this.http.post(this.hostURL(t),r,i).pipe(l(1e5)).subscribe({next:o=>{e.next(o),e.complete()},error:o=>{if(o.status==200)e.next(o.error.text),e.complete();else{if(!this.unauthorizedErrorHandling(o)&&n){let h=this.errorMessageHandling(o);this.toastr.error(h.Message!=""?h.Message:"An unknown error has occured!",h.header)}e.error(o)}}})})}static \u0275fac=function(r){return new(r||c)(g(x),g(z),g(H))};static \u0275prov=w({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})();export{j as a};
@@ -1 +1 @@
1
- import{a as c}from"./chunk-YXUTG3VS.js";import{b as o}from"./chunk-3UOPPBFM.js";import{Ba as l,Pa as n,Xa as r,oa as a}from"./chunk-2CBUU23K.js";var d=(()=>{class i{vcr;elementRef;type="input";label="";value="";isMasked=!1;constructor(t,e){this.vcr=t,this.elementRef=e}ngOnInit(){let t=this.elementRef.nativeElement;if(t.firstChild&&this.isMasked){for(;t.firstChild;)t.removeChild(t.firstChild);let e=this.vcr.createComponent(c);e.instance.inputType=this.type,e.instance.inputValue=this.value,e.instance.labelValue=this.label,e.instance.tooltip=o.maskingField,e.instance.disabled=!0;let s=this.elementRef.nativeElement;s.insertBefore(e.location.nativeElement,s.firstChild)}}static \u0275fac=function(e){return new(e||i)(n(r),n(l))};static \u0275dir=a({type:i,selectors:[["","pOSFormOrFloatingOnMasked",""]],inputs:{type:"type",label:"label",value:"value",isMasked:"isMasked"},standalone:!0})}return i})();export{d as a};
1
+ import{a as c}from"./chunk-SUVR442T.js";import{b as o}from"./chunk-4BNMZHD5.js";import{Ba as l,Pa as n,Xa as r,oa as a}from"./chunk-GJ4QCDDE.js";var d=(()=>{class i{vcr;elementRef;type="input";label="";value="";isMasked=!1;constructor(t,e){this.vcr=t,this.elementRef=e}ngOnInit(){let t=this.elementRef.nativeElement;if(t.firstChild&&this.isMasked){for(;t.firstChild;)t.removeChild(t.firstChild);let e=this.vcr.createComponent(c);e.instance.inputType=this.type,e.instance.inputValue=this.value,e.instance.labelValue=this.label,e.instance.tooltip=o.maskingField,e.instance.disabled=!0;let s=this.elementRef.nativeElement;s.insertBefore(e.location.nativeElement,s.firstChild)}}static \u0275fac=function(e){return new(e||i)(n(r),n(l))};static \u0275dir=a({type:i,selectors:[["","pOSFormOrFloatingOnMasked",""]],inputs:{type:"type",label:"label",value:"value",isMasked:"isMasked"},standalone:!0})}return i})();export{d as a};