marketplacepos 5.48.5 → 5.48.6

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 (50) hide show
  1. package/Marketplace/{chunk-Z2CPXQ24.js → chunk-2B5DXBBJ.js} +1 -1
  2. package/Marketplace/{chunk-I7YNDTEK.js → chunk-2MEVIFIA.js} +1 -1
  3. package/Marketplace/{chunk-2PXOGGDS.js → chunk-3664K4KH.js} +1 -1
  4. package/Marketplace/{chunk-XUMLTOVI.js → chunk-4LQREJ6J.js} +1 -1
  5. package/Marketplace/{chunk-VKZ2UVXB.js → chunk-5A3P2NB3.js} +1 -1
  6. package/Marketplace/{chunk-35DCCWTG.js → chunk-6CM22SKR.js} +1 -1
  7. package/Marketplace/{chunk-MAK2RHFD.js → chunk-6LRZDPE5.js} +1 -1
  8. package/Marketplace/{chunk-VEBP36WX.js → chunk-6UOPF4ZP.js} +1 -1
  9. package/Marketplace/{chunk-QFGKR62M.js → chunk-7Z5X4HRT.js} +1 -1
  10. package/Marketplace/{chunk-PYQPYOIY.js → chunk-BQEBDVGB.js} +1 -1
  11. package/Marketplace/{chunk-JZL2233L.js → chunk-C4VD7LDS.js} +2 -2
  12. package/Marketplace/{chunk-LVRM4JAP.js → chunk-C6JVY2ER.js} +1 -1
  13. package/Marketplace/{chunk-SETHDR5R.js → chunk-CBD25LAJ.js} +1 -1
  14. package/Marketplace/{chunk-6T3PILHS.js → chunk-DDV2A3Y2.js} +1 -1
  15. package/Marketplace/{chunk-VNI2KCJE.js → chunk-DUXKDRDP.js} +1 -1
  16. package/Marketplace/{chunk-UN53SVGE.js → chunk-E32KODU7.js} +1 -1
  17. package/Marketplace/{chunk-UYG2OCBS.js → chunk-ESXDXSQ3.js} +1 -1
  18. package/Marketplace/{chunk-BI2LUCYC.js → chunk-FKPDG4AM.js} +1 -1
  19. package/Marketplace/{chunk-JTP3ZFNS.js → chunk-HNFW4VQS.js} +1 -1
  20. package/Marketplace/{chunk-2WEEVTKZ.js → chunk-HSQHQZV7.js} +1 -1
  21. package/Marketplace/{chunk-2HGLCZCJ.js → chunk-I3R7CC6J.js} +1 -1
  22. package/Marketplace/{chunk-E3TCC2HT.js → chunk-ICE4DSEP.js} +1 -1
  23. package/Marketplace/{chunk-AMHOLPZC.js → chunk-JWK3HR6P.js} +1 -1
  24. package/Marketplace/{chunk-F6SEXTTP.js → chunk-K2BII75W.js} +1 -1
  25. package/Marketplace/{chunk-TJUIBLFE.js → chunk-KSR5TQDN.js} +1 -1
  26. package/Marketplace/{chunk-FEQNJY7V.js → chunk-KTLMPVSK.js} +1 -1
  27. package/Marketplace/{chunk-6J3WQHJF.js → chunk-KUBWQQZK.js} +1 -1
  28. package/Marketplace/{chunk-DOVAN3PS.js → chunk-KUNITWR6.js} +1 -1
  29. package/Marketplace/{chunk-LA2EIRS6.js → chunk-L22SKCLL.js} +1 -1
  30. package/Marketplace/{chunk-ESXTZ7DM.js → chunk-LEUBNBGC.js} +1 -1
  31. package/Marketplace/{chunk-DDSVUI6T.js → chunk-LY32FUZ4.js} +2 -2
  32. package/Marketplace/{chunk-K2QHJ7WS.js → chunk-MDP2SGJI.js} +1 -1
  33. package/Marketplace/{chunk-KWRH5WFZ.js → chunk-MTPSSM64.js} +1 -1
  34. package/Marketplace/{chunk-CBB3JEV7.js → chunk-N5VHHR26.js} +1 -1
  35. package/Marketplace/{chunk-HVGTRPJH.js → chunk-NBCUYSP7.js} +1 -1
  36. package/Marketplace/{chunk-UJ4S2WZV.js → chunk-NH6QGSVC.js} +1 -1
  37. package/Marketplace/{chunk-GEDKSGFP.js → chunk-ODLI42YV.js} +1 -1
  38. package/Marketplace/{chunk-BY7LPG4A.js → chunk-ONPG3DER.js} +1 -1
  39. package/Marketplace/{chunk-E4BL56JJ.js → chunk-OQM7K2EA.js} +1 -1
  40. package/Marketplace/{chunk-WD4PA53F.js → chunk-Q56RJPES.js} +1 -1
  41. package/Marketplace/{chunk-WZYOXBEP.js → chunk-RI7L4QSY.js} +1 -1
  42. package/Marketplace/{chunk-3IGKGUHQ.js → chunk-RWVVRZJY.js} +1 -1
  43. package/Marketplace/{chunk-RXE72I2S.js → chunk-T5IUZ6UD.js} +1 -1
  44. package/Marketplace/{chunk-OCP5FDSY.js → chunk-TAITBX62.js} +1 -1
  45. package/Marketplace/{chunk-7NHO7E6W.js → chunk-UQK5JNU2.js} +1 -1
  46. package/Marketplace/{chunk-3J4WF3UO.js → chunk-WFVK32EW.js} +1 -1
  47. package/Marketplace/{chunk-MYJY2N6R.js → chunk-ZLBPUHTQ.js} +1 -1
  48. package/Marketplace/index.html +2 -2
  49. package/Marketplace/{main-JXUEQJZZ.js → main-K3MDOIIF.js} +1 -1
  50. package/package.json +1 -1
@@ -1 +1 @@
1
- import{e as G}from"./chunk-6KWG6O5L.js";import{a as q}from"./chunk-LA2EIRS6.js";import"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import"./chunk-PYQPYOIY.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import{a as J}from"./chunk-AGBJEXIM.js";import{b as F,e as H}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-JBEKD57G.js";import{m as U,n as Y}from"./chunk-EDEZ3JLR.js";import{A as j,c as B,h as I,m as R}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{i as P,k as W,m as k}from"./chunk-LNJUGHOX.js";import{$b as N,Gb as M,Ha as g,Mc as i,Nc as T,Qc as b,Rc as v,Sc as _,Tc as V,Uc as D,Vc as S,Z as x,bc as O,gc as f,hc as e,hd as w,ic as t,id as y,jc as L,nb as d,qc as E,ra as h,vc as C,xa as s,xc as A,ya as c}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function K(o,l){if(o&1&&(e(0,"pre",21),i(1),w(2,"json"),t()),o&2){A();let z=S(25);d(),T(y(2,1,z))}}function Q(o,l){o&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var ue=(()=>{let l=class l{constructor(){this.httpService=h(H),this.toastr=h(F),this.selectedChannel=g(null),this.orderNumber=g(null)}fetchLog(){if(!this.selectedChannel()||!this.orderNumber()){this.toastr.warning("Please select a channel and enter an order number","Warning");return}this.orderLog$=this.httpService.post(J.GetOrderApiLog,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(x(1))}copyToClipboard(p){if(!p)return;let m=typeof p=="string"?p:JSON.stringify(p,null,2);navigator.clipboard.writeText(m),this.toastr.success("Copied to clipboard!","Success")}};l.\u0275fac=function(m){return new(m||l)},l.\u0275cmp=M({type:l,selectors:[["app-order-api"]],decls:40,vars:9,consts:[["headerTitle","Origin Order Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Order Number or Invoice Number",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","orderLogText"],[1,"text-center","my-12","text-muted"]],template:function(m,n){if(m&1){let a=E();e(0,"mainpanel",0)(1,"actions")(2,"button",1),C("click",function(){return s(a),c(n.fetchLog())}),L(3,"i",2),i(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),i(12,"Channel"),t(),e(13,"p",8),i(14," View logs related to Order API activities. "),t()(),e(15,"div",9)(16,"app-channel-options-v2",10),_("ngModelChange",function(r){return s(a),v(n.selectedChannel,r)||(n.selectedChannel=r),c(r)}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),i(20,"Order Number"),t(),e(21,"p",8),i(22," Order or Invoice number from Channel. "),t()(),e(23,"div",9)(24,"input",12),_("ngModelChange",function(r){return s(a),v(n.orderNumber,r)||(n.orderNumber=r),c(r)}),t()()()()(),V(25),w(26,"async"),e(27,"div",13)(28,"div",14)(29,"div",15)(30,"div",16)(31,"h5"),i(32,"Response"),t(),e(33,"button",17),C("click",function(){s(a);let r=S(25);return c(n.copyToClipboard(r))}),i(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),N(38,K,3,3,"pre",21)(39,Q,2,0,"p",22),t()()()()()()()()()}if(m&2){f("hideSearchBox",!0)("hideSearchDropdown",!0),d(16),b("ngModel",n.selectedChannel),d(8),b("ngModel",n.orderNumber),d();let a=D(y(26,6,n.orderLog$));d(8),f("disabled",!a),d(5),O(a?38:39)}},dependencies:[k,Y,U,G,j,B,I,R,q,P,W],encapsulation:2});let o=l;return o})();export{ue as OrderApiComponent};
1
+ import{e as G}from"./chunk-6KWG6O5L.js";import{a as q}from"./chunk-L22SKCLL.js";import"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import"./chunk-BQEBDVGB.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import{a as J}from"./chunk-AGBJEXIM.js";import{b as F,e as H}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-JBEKD57G.js";import{m as U,n as Y}from"./chunk-EDEZ3JLR.js";import{A as j,c as B,h as I,m as R}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{i as P,k as W,m as k}from"./chunk-LNJUGHOX.js";import{$b as N,Gb as M,Ha as g,Mc as i,Nc as T,Qc as b,Rc as v,Sc as _,Tc as V,Uc as D,Vc as S,Z as x,bc as O,gc as f,hc as e,hd as w,ic as t,id as y,jc as L,nb as d,qc as E,ra as h,vc as C,xa as s,xc as A,ya as c}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function K(o,l){if(o&1&&(e(0,"pre",21),i(1),w(2,"json"),t()),o&2){A();let z=S(25);d(),T(y(2,1,z))}}function Q(o,l){o&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var ue=(()=>{let l=class l{constructor(){this.httpService=h(H),this.toastr=h(F),this.selectedChannel=g(null),this.orderNumber=g(null)}fetchLog(){if(!this.selectedChannel()||!this.orderNumber()){this.toastr.warning("Please select a channel and enter an order number","Warning");return}this.orderLog$=this.httpService.post(J.GetOrderApiLog,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(x(1))}copyToClipboard(p){if(!p)return;let m=typeof p=="string"?p:JSON.stringify(p,null,2);navigator.clipboard.writeText(m),this.toastr.success("Copied to clipboard!","Success")}};l.\u0275fac=function(m){return new(m||l)},l.\u0275cmp=M({type:l,selectors:[["app-order-api"]],decls:40,vars:9,consts:[["headerTitle","Origin Order Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Order Number or Invoice Number",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","orderLogText"],[1,"text-center","my-12","text-muted"]],template:function(m,n){if(m&1){let a=E();e(0,"mainpanel",0)(1,"actions")(2,"button",1),C("click",function(){return s(a),c(n.fetchLog())}),L(3,"i",2),i(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),i(12,"Channel"),t(),e(13,"p",8),i(14," View logs related to Order API activities. "),t()(),e(15,"div",9)(16,"app-channel-options-v2",10),_("ngModelChange",function(r){return s(a),v(n.selectedChannel,r)||(n.selectedChannel=r),c(r)}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),i(20,"Order Number"),t(),e(21,"p",8),i(22," Order or Invoice number from Channel. "),t()(),e(23,"div",9)(24,"input",12),_("ngModelChange",function(r){return s(a),v(n.orderNumber,r)||(n.orderNumber=r),c(r)}),t()()()()(),V(25),w(26,"async"),e(27,"div",13)(28,"div",14)(29,"div",15)(30,"div",16)(31,"h5"),i(32,"Response"),t(),e(33,"button",17),C("click",function(){s(a);let r=S(25);return c(n.copyToClipboard(r))}),i(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),N(38,K,3,3,"pre",21)(39,Q,2,0,"p",22),t()()()()()()()()()}if(m&2){f("hideSearchBox",!0)("hideSearchDropdown",!0),d(16),b("ngModel",n.selectedChannel),d(8),b("ngModel",n.orderNumber),d();let a=D(y(26,6,n.orderLog$));d(8),f("disabled",!a),d(5),O(a?38:39)}},dependencies:[k,Y,U,G,j,B,I,R,q,P,W],encapsulation:2});let o=l;return o})();export{ue as OrderApiComponent};
@@ -1 +1 @@
1
- import{a as pe}from"./chunk-ZSUWHVKX.js";import{e as _e}from"./chunk-6KWG6O5L.js";import{a as ge,i as be}from"./chunk-PYQPYOIY.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-AGBJEXIM.js";import{b as he,e as S}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{a as M,c as ue}from"./chunk-JBEKD57G.js";import{A as me,c as te,h as ne,i as ie,k as oe,m as re,n as ae,t as se,u as de,v as ce,w as le}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import{a as fe,c as xe}from"./chunk-ZETUYNFJ.js";import{D as y,F as w,I as V,c as X,i as Z,m as ee}from"./chunk-LNJUGHOX.js";import{$b as C,Bc as W,Cc as B,Dc as q,Gb as f,Hb as A,Hc as k,Lc as H,Mc as a,Nc as x,Oc as Y,Pc as G,Qc as E,Rc as L,Sc as I,Z as R,ad as Q,bc as v,dc as z,ec as N,fc as D,gc as b,hc as i,hd as K,ic as r,id as $,jc as l,lb as O,ma as U,na as T,nb as c,qc as j,td as J,vc as g,xa as u,xc as p,ya as h,zb as m}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var Ce=(()=>{let t=class t{constructor(){}getBrowserName(){let n=window.navigator.userAgent.toLowerCase();switch(!0){case(n.indexOf("edge")>-1||n.indexOf("edg")>-1):return"edge";case n.indexOf("opr")>-1:return"opera";case n.indexOf("chrome")>-1:return"chrome";case n.indexOf("trident")>-1:return"ie";case n.indexOf("firefox")>-1:return"firefox";case n.indexOf("safari")>-1:return"safari";default:return"other"}}};t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=U({token:t,factory:t.\u0275fac,providedIn:"root"});let o=t;return o})();function Le(o,t){if(o&1&&(i(0,"swiper-slide")(1,"div")(2,"a",1),l(3,"img",2),r()(),i(4,"a",3),a(5),r(),i(6,"p",4),a(7),r()()),o&2){let d=t.$implicit;c(2),b("href",d.href,O),c(),b("src",d.imgSrc,O),c(),b("href",d.href,O),c(),x(d.title),c(2),x(d.description)}}var ve=(()=>{let t=class t{constructor(){this.newsList=J([])}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=f({type:t,selectors:[["POS-news-swiper"]],inputs:{newsList:[1,"newsList"]},standalone:!1,decls:3,vars:0,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false",2,"margin-top","30px"],["target","_blank",3,"href"],[1,"border-0","rounded-1","mb-8",2,"width","252px","height","152px",3,"src"],["target","_blank",1,"fw-bold","h5","text-success","header-title","fs-4",3,"href"],[2,"margin-bottom","3rem"]],template:function(e,s){e&1&&(i(0,"swiper-container",0),N(1,Le,8,5,"swiper-slide",null,z),r()),e&2&&(c(),D(s.newsList()))},styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"]});let o=t;return o})();var Te=["subdomainEl"],Ae=(o,t)=>({"rounded-end":o,"border-end-0":t});function ze(o,t){if(o&1&&(i(0,"div",33),l(1,"img",34),r()),o&2){let d=t.$implicit;c(),b("src",d.img,O)("title",d.title)("alt",d.title)}}function Ne(o,t){if(o&1){let d=j();i(0,"div",15)(1,"h3",16),a(2," DealPOS Omnichannel "),r(),i(3,"small",17),a(4," Multichannel Inventory Management Software "),r()(),i(5,"form",18)(6,"div",19)(7,"div",20)(8,"div",21)(9,"span"),l(10,"i",22),r()(),i(11,"input",23,0),I("ngModelChange",function(e){u(d);let s=p();return L(s.subdomain,e)||(s.subdomain=e),h(e)}),r(),i(13,"div")(14,"select",24),I("ngModelChange",function(e){u(d);let s=p();return L(s.domain,e)||(s.domain=e),h(e)}),i(15,"option",25),a(16,".dealpos.co.id"),r(),i(17,"option",26),a(18,".dealpos.net"),r(),i(19,"option",27),a(20,".dealpos.com"),r(),i(21,"option",28),a(22,".dealpos.app"),r()()()(),i(23,"div",29)(24,"button",30),g("click",function(){u(d);let e=p();return h(e.onNextState())}),a(25," Next "),r()(),i(26,"div",31)(27,"div",32),N(28,ze,2,3,"div",33,z),r()()()()}if(o&2){let d=p();c(11),E("ngModel",d.subdomain),c(3),E("ngModel",d.domain),c(14),D(d.channels)}}function De(o,t){o&1&&(i(0,"p"),a(1," Username is required "),r())}function je(o,t){if(o&1&&(i(0,"div",44),l(1,"div",54),i(2,"div",55),C(3,De,2,0,"p"),r()()),o&2){p();let d=k(14);c(3),v(d.errors.required?3:-1)}}function Ve(o,t){if(o&1){let d=j();i(0,"i",57),g("click",function(){u(d);let e=p(3);return h(e.hideShowPassword())}),r()}if(o&2){let d=p(3);H("fa "+d.passwordIcon)}}function Fe(o,t){if(o&1&&(i(0,"span",47),C(1,Ve,1,2,"i",56),r()),o&2){let d=p(2);c(),v(d.password?1:-1)}}function Re(o,t){o&1&&(i(0,"p"),a(1," Password is required "),r())}function Ue(o,t){if(o&1&&(i(0,"div",44),l(1,"div",54),i(2,"div",55),C(3,Re,2,0,"p"),r()()),o&2){p();let d=k(21);c(3),v(d.errors.required?3:-1)}}function We(o,t){if(o&1){let d=j();i(0,"div",35)(1,"h3",36),a(2,"Sign in"),r(),i(3,"h3",37),a(4," to "),i(5,"h6",38),a(6),r(),i(7,"i",39),g("click",function(){u(d);let e=p();return h(e.onEditDomain())}),r()()(),i(8,"form",40)(9,"div",41)(10,"div",21)(11,"span"),l(12,"i",42),r()(),i(13,"input",43,1),I("ngModelChange",function(e){u(d);let s=p();return L(s.username,e)||(s.username=e),h(e)}),r()(),C(15,je,4,1,"div",44),i(16,"div",20)(17,"div",21)(18,"span"),l(19,"i",45),r()(),i(20,"input",46,2),I("ngModelChange",function(e){u(d);let s=p();return L(s.password,e)||(s.password=e),h(e)}),r(),C(22,Fe,2,1,"span",47),r(),C(23,Ue,4,1,"div",44),i(24,"div",48)(25,"button",49),g("click",function(){u(d);let e=p();return h(e.onLogin())}),a(26," Log in "),r()(),i(27,"div",50),l(28,"hr"),i(29,"span",51),a(30,"or"),r(),l(31,"hr"),r(),i(32,"div")(33,"button",52),g("click",function(e){u(d);let s=p();return h(s.onLoginByGoogle(e))}),l(34,"i",53),a(35," Sign In with Google "),r()()()}if(o&2){let d=k(14),n=k(21),e=p();c(6),G(" (",e.subdomain,"",e.domain,") "),c(7),E("ngModel",e.username),c(2),v(d.invalid&&(d.dirty||d.touched)?15:-1),c(5),b("type",e.passwordType)("ngClass",Q(9,Ae,e.browser=="edge",e.browser!="edge")),E("ngModel",e.password),c(2),v(e.browser!="edge"?22:-1),c(),v(n.invalid&&(n.dirty||n.touched)?23:-1)}}var we=(()=>{let t=class t{constructor(n,e,s,_,ke){this._router=n,this.toastr=e,this.checkBrowser=s,this.authService=_,this.ngxPermission=ke,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="fa-eye",this.channels=[{title:"Shopee",img:M.SHOOPE},{title:"Tokopedia",img:M.TOKOPEDIA},{title:"Tiktok",img:M.TIKTOK},{title:"Woocommerce",img:M.WOOCOMMERCE},{title:"Lazada",img:M.LAZADA},{title:"Shopify",img:M.SHOPIFY},{title:"Plugo",img:M.PLUGONEW}],this.version=ge.version,this.news$=_.getNews().pipe(R(1))}ngOnInit(){this.initLogin(),this.browser=this.checkBrowser.getBrowserName(),document.body.classList.add("login-body"),this.initChangeLogUrl()}initChangeLogUrl(){let n=`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${this.version}`;this.changelogUrl=n}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let n=JSON.parse(localStorage.getItem("Authorization"));if(n){this.username=n?.username,this.subdomain=n?.Host?.split(".")[0];let e=n?.Host?.split("dealpos");this.domain=`.dealpos${e[1]}`,this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(ue.IsEmpty(this.subdomain)){this.toastr.warning("Account Domain is required","Warning");return}this.parseSubdomain(),this.loginState="FORM_AUTH"}parseSubdomain(){let n=this.subdomain.indexOf(".dealpos");n!=-1&&(this.subdomain=this.subdomain.substring(0,n))}onEditDomain(){this.loginState="FORM_DOMAIN"}onLogin(){let n={Host:`${this.subdomain}${this.domain}`,Username:this.username,Password:this.password};this.authService.login(n).subscribe(e=>{this.onSuccessLogin(e)})}onLoginByGoogle(n){let e=`${this.subdomain}${this.domain}`;this.authService.loginWithGoogle(n,e).subscribe(s=>{this.onSuccessLogin(s)})}onSuccessLogin(n){this.ngxPermission.hasPermission([pe.DashboardView]).then(e=>{e?this._router.navigate(["menu/dashboard"]):n?.TotalChannel<1?this._router.navigate(["menu/channel"]):this._router.navigate(["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType=this.passwordType==="text"?"password":"text",this.passwordIcon=this.passwordIcon==="fa-eye"?"fa-eye-slash":"fa-eye"}ngOnDestroy(){document.body.classList.remove("login-body")}};t.\u0275fac=function(e){return new(e||t)(m(w),m(he),m(Ce),m(be),m(fe))},t.\u0275cmp=f({type:t,selectors:[["app-login"]],viewQuery:function(e,s){if(e&1&&W(Te,5),e&2){let _;B(_=q())&&(s.subdomainEl=_.first)}},standalone:!1,decls:18,vars:6,consts:[["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"fw-normal","fs-2","header-title","text-center"],[3,"newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[1,"d-flex","copyright",2,"margin-left","20px"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version",2,"margin-right","18px"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"fs-2","header-title","me-2","fw-normal"],[1,"text-secondary-emphasis","fst-italic",2,"font-size","11px"],[2,"margin-top","38px"],[1,"form-block","mt-5"],[1,"input-group","input-group-lg","mt-8"],[1,"input-group-text","rounded-start","border-end-0",2,"width","52px"],[1,"fa-solid","fa-cloud"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","border-start","rounded-end","rounded-start-0","domain-option",2,"height","58px",3,"ngModelChange","ngModel"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],["value",".dealpos.app"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"d-flex","align-items-center","justify-content-center",2,"margin-top","2.1rem"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[1,""],[1,"border-0",2,"width","34px","height","34px",3,"src","title","alt"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"robotoslab","fw-normal"],[1,"ms-2","fw-normal"],[1,"me-2","robotoslab","d-inline-block","text-success"],["title","Edit Store Address",1,"fa-solid","fa-edit","link-success","fs-5","pointer",3,"click"],[2,"margin-top","29px"],[1,"input-group","input-group-lg"],[1,"fas","fa-user","fa-lg"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],[1,"d-flex","justify-content-start","w-50","mb-4",2,"height","16px"],[1,"fas","fa-key","fa-lg"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","aria-describedby","basic-addon1","autofocus","","name","password","required","",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","type","ngClass","ngModel"],[1,"input-group-text","border-start-0","rounded-end"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-success","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[2,"width","52px"],[1,"text-danger","ps-1"],[3,"class"],[3,"click"]],template:function(e,s){e&1&&(i(0,"div",3)(1,"div",4)(2,"div",5)(3,"h3",6),a(4,"New Features"),r(),l(5,"POS-news-swiper",7),K(6,"async"),r(),i(7,"div",8),C(8,Ne,30,2)(9,We,36,12),r()(),i(10,"div",9)(11,"span",10),a(12,"powered by :"),r(),l(13,"a",11),r(),i(14,"div",12)(15,"a",13),a(16),l(17,"i",14),r()()()),e&2&&(c(5),b("newsList",$(6,4,s.news$)),c(3),v(s.loginState=="FORM_DOMAIN"?8:9),c(7),b("href",s.changelogUrl,O),c(),Y("version ",s.version))},dependencies:[X,ae,de,ce,te,se,ne,ie,le,re,oe,ve,Z],styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}"]});let o=t;return o})();var Oe=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.shopID=n.shop_id,this.code=n.code})}addShopee(){let n={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",n).subscribe(s=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(m(y),m(S),m(w))},t.\u0275cmp=f({type:t,selectors:[["shopee-authorized"]],standalone:!1,decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-t",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Shopee"),r(),i(13,"div"),a(14," Your shopID is "),i(15,"span",8),a(16),r()(),i(17,"button",9),g("click",function(){return s.addShopee()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(c(16),x(s.shopID))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});let o=t;return o})();var Pe=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.code=n.code,this.state=n.state})}addChannelTiktok(){let n={Code:this.code};this.http.post("/api/ChannelAdd/AddTiktok",n).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(m(y),m(S),m(w))},t.\u0275cmp=f({type:t,selectors:[["app-tiktok"]],standalone:!1,decls:24,vars:2,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Tiktok"),r(),i(13,"div"),a(14," Your Code is "),i(15,"span",8),a(16),r()(),i(17,"div"),a(18," Your State is "),i(19,"span",8),a(20),r()(),i(21,"button",9),g("click",function(){return s.addChannelTiktok()}),l(22,"i",10),a(23," Add to my Channel"),r()()()()()()),e&2&&(c(16),x(s.code),c(4),x(s.state))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});let o=t;return o})();var ye=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.code=n.code})}addChannelLazada(){let n={Code:this.code};this.http.post("/api/ChannelAdd/AddLazada",n).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(m(y),m(S),m(w))},t.\u0275cmp=f({type:t,selectors:[["app-lazada"]],standalone:!1,decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Lazada"),r(),i(13,"div"),a(14," Your Code is "),i(15,"span",8),a(16),r()(),i(17,"button",9),g("click",function(){return s.addChannelLazada()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(c(16),x(s.code))},encapsulation:2});let o=t;return o})();var Be=[{path:"",component:we,data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:Oe,data:{title:"Success"}},{path:"tiktok",component:Pe,data:{title:"Success"}},{path:"lazada",component:ye,data:{title:"Success"}}],Se=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=A({type:t}),t.\u0275inj=T({imports:[V.forChild(Be),V]});let o=t;return o})();var kt=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=A({type:t}),t.\u0275inj=T({imports:[ee,me,Se,_e,xe]});let o=t;return o})();export{kt as LoginModule};
1
+ import{a as pe}from"./chunk-ZSUWHVKX.js";import{e as _e}from"./chunk-6KWG6O5L.js";import{a as ge,i as be}from"./chunk-BQEBDVGB.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-AGBJEXIM.js";import{b as he,e as S}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{a as M,c as ue}from"./chunk-JBEKD57G.js";import{A as me,c as te,h as ne,i as ie,k as oe,m as re,n as ae,t as se,u as de,v as ce,w as le}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import{a as fe,c as xe}from"./chunk-ZETUYNFJ.js";import{D as y,F as w,I as V,c as X,i as Z,m as ee}from"./chunk-LNJUGHOX.js";import{$b as C,Bc as W,Cc as B,Dc as q,Gb as f,Hb as A,Hc as k,Lc as H,Mc as a,Nc as x,Oc as Y,Pc as G,Qc as E,Rc as L,Sc as I,Z as R,ad as Q,bc as v,dc as z,ec as N,fc as D,gc as b,hc as i,hd as K,ic as r,id as $,jc as l,lb as O,ma as U,na as T,nb as c,qc as j,td as J,vc as g,xa as u,xc as p,ya as h,zb as m}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var Ce=(()=>{let t=class t{constructor(){}getBrowserName(){let n=window.navigator.userAgent.toLowerCase();switch(!0){case(n.indexOf("edge")>-1||n.indexOf("edg")>-1):return"edge";case n.indexOf("opr")>-1:return"opera";case n.indexOf("chrome")>-1:return"chrome";case n.indexOf("trident")>-1:return"ie";case n.indexOf("firefox")>-1:return"firefox";case n.indexOf("safari")>-1:return"safari";default:return"other"}}};t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=U({token:t,factory:t.\u0275fac,providedIn:"root"});let o=t;return o})();function Le(o,t){if(o&1&&(i(0,"swiper-slide")(1,"div")(2,"a",1),l(3,"img",2),r()(),i(4,"a",3),a(5),r(),i(6,"p",4),a(7),r()()),o&2){let d=t.$implicit;c(2),b("href",d.href,O),c(),b("src",d.imgSrc,O),c(),b("href",d.href,O),c(),x(d.title),c(2),x(d.description)}}var ve=(()=>{let t=class t{constructor(){this.newsList=J([])}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=f({type:t,selectors:[["POS-news-swiper"]],inputs:{newsList:[1,"newsList"]},standalone:!1,decls:3,vars:0,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false",2,"margin-top","30px"],["target","_blank",3,"href"],[1,"border-0","rounded-1","mb-8",2,"width","252px","height","152px",3,"src"],["target","_blank",1,"fw-bold","h5","text-success","header-title","fs-4",3,"href"],[2,"margin-bottom","3rem"]],template:function(e,s){e&1&&(i(0,"swiper-container",0),N(1,Le,8,5,"swiper-slide",null,z),r()),e&2&&(c(),D(s.newsList()))},styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"]});let o=t;return o})();var Te=["subdomainEl"],Ae=(o,t)=>({"rounded-end":o,"border-end-0":t});function ze(o,t){if(o&1&&(i(0,"div",33),l(1,"img",34),r()),o&2){let d=t.$implicit;c(),b("src",d.img,O)("title",d.title)("alt",d.title)}}function Ne(o,t){if(o&1){let d=j();i(0,"div",15)(1,"h3",16),a(2," DealPOS Omnichannel "),r(),i(3,"small",17),a(4," Multichannel Inventory Management Software "),r()(),i(5,"form",18)(6,"div",19)(7,"div",20)(8,"div",21)(9,"span"),l(10,"i",22),r()(),i(11,"input",23,0),I("ngModelChange",function(e){u(d);let s=p();return L(s.subdomain,e)||(s.subdomain=e),h(e)}),r(),i(13,"div")(14,"select",24),I("ngModelChange",function(e){u(d);let s=p();return L(s.domain,e)||(s.domain=e),h(e)}),i(15,"option",25),a(16,".dealpos.co.id"),r(),i(17,"option",26),a(18,".dealpos.net"),r(),i(19,"option",27),a(20,".dealpos.com"),r(),i(21,"option",28),a(22,".dealpos.app"),r()()()(),i(23,"div",29)(24,"button",30),g("click",function(){u(d);let e=p();return h(e.onNextState())}),a(25," Next "),r()(),i(26,"div",31)(27,"div",32),N(28,ze,2,3,"div",33,z),r()()()()}if(o&2){let d=p();c(11),E("ngModel",d.subdomain),c(3),E("ngModel",d.domain),c(14),D(d.channels)}}function De(o,t){o&1&&(i(0,"p"),a(1," Username is required "),r())}function je(o,t){if(o&1&&(i(0,"div",44),l(1,"div",54),i(2,"div",55),C(3,De,2,0,"p"),r()()),o&2){p();let d=k(14);c(3),v(d.errors.required?3:-1)}}function Ve(o,t){if(o&1){let d=j();i(0,"i",57),g("click",function(){u(d);let e=p(3);return h(e.hideShowPassword())}),r()}if(o&2){let d=p(3);H("fa "+d.passwordIcon)}}function Fe(o,t){if(o&1&&(i(0,"span",47),C(1,Ve,1,2,"i",56),r()),o&2){let d=p(2);c(),v(d.password?1:-1)}}function Re(o,t){o&1&&(i(0,"p"),a(1," Password is required "),r())}function Ue(o,t){if(o&1&&(i(0,"div",44),l(1,"div",54),i(2,"div",55),C(3,Re,2,0,"p"),r()()),o&2){p();let d=k(21);c(3),v(d.errors.required?3:-1)}}function We(o,t){if(o&1){let d=j();i(0,"div",35)(1,"h3",36),a(2,"Sign in"),r(),i(3,"h3",37),a(4," to "),i(5,"h6",38),a(6),r(),i(7,"i",39),g("click",function(){u(d);let e=p();return h(e.onEditDomain())}),r()()(),i(8,"form",40)(9,"div",41)(10,"div",21)(11,"span"),l(12,"i",42),r()(),i(13,"input",43,1),I("ngModelChange",function(e){u(d);let s=p();return L(s.username,e)||(s.username=e),h(e)}),r()(),C(15,je,4,1,"div",44),i(16,"div",20)(17,"div",21)(18,"span"),l(19,"i",45),r()(),i(20,"input",46,2),I("ngModelChange",function(e){u(d);let s=p();return L(s.password,e)||(s.password=e),h(e)}),r(),C(22,Fe,2,1,"span",47),r(),C(23,Ue,4,1,"div",44),i(24,"div",48)(25,"button",49),g("click",function(){u(d);let e=p();return h(e.onLogin())}),a(26," Log in "),r()(),i(27,"div",50),l(28,"hr"),i(29,"span",51),a(30,"or"),r(),l(31,"hr"),r(),i(32,"div")(33,"button",52),g("click",function(e){u(d);let s=p();return h(s.onLoginByGoogle(e))}),l(34,"i",53),a(35," Sign In with Google "),r()()()}if(o&2){let d=k(14),n=k(21),e=p();c(6),G(" (",e.subdomain,"",e.domain,") "),c(7),E("ngModel",e.username),c(2),v(d.invalid&&(d.dirty||d.touched)?15:-1),c(5),b("type",e.passwordType)("ngClass",Q(9,Ae,e.browser=="edge",e.browser!="edge")),E("ngModel",e.password),c(2),v(e.browser!="edge"?22:-1),c(),v(n.invalid&&(n.dirty||n.touched)?23:-1)}}var we=(()=>{let t=class t{constructor(n,e,s,_,ke){this._router=n,this.toastr=e,this.checkBrowser=s,this.authService=_,this.ngxPermission=ke,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="fa-eye",this.channels=[{title:"Shopee",img:M.SHOOPE},{title:"Tokopedia",img:M.TOKOPEDIA},{title:"Tiktok",img:M.TIKTOK},{title:"Woocommerce",img:M.WOOCOMMERCE},{title:"Lazada",img:M.LAZADA},{title:"Shopify",img:M.SHOPIFY},{title:"Plugo",img:M.PLUGONEW}],this.version=ge.version,this.news$=_.getNews().pipe(R(1))}ngOnInit(){this.initLogin(),this.browser=this.checkBrowser.getBrowserName(),document.body.classList.add("login-body"),this.initChangeLogUrl()}initChangeLogUrl(){let n=`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${this.version}`;this.changelogUrl=n}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let n=JSON.parse(localStorage.getItem("Authorization"));if(n){this.username=n?.username,this.subdomain=n?.Host?.split(".")[0];let e=n?.Host?.split("dealpos");this.domain=`.dealpos${e[1]}`,this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(ue.IsEmpty(this.subdomain)){this.toastr.warning("Account Domain is required","Warning");return}this.parseSubdomain(),this.loginState="FORM_AUTH"}parseSubdomain(){let n=this.subdomain.indexOf(".dealpos");n!=-1&&(this.subdomain=this.subdomain.substring(0,n))}onEditDomain(){this.loginState="FORM_DOMAIN"}onLogin(){let n={Host:`${this.subdomain}${this.domain}`,Username:this.username,Password:this.password};this.authService.login(n).subscribe(e=>{this.onSuccessLogin(e)})}onLoginByGoogle(n){let e=`${this.subdomain}${this.domain}`;this.authService.loginWithGoogle(n,e).subscribe(s=>{this.onSuccessLogin(s)})}onSuccessLogin(n){this.ngxPermission.hasPermission([pe.DashboardView]).then(e=>{e?this._router.navigate(["menu/dashboard"]):n?.TotalChannel<1?this._router.navigate(["menu/channel"]):this._router.navigate(["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType=this.passwordType==="text"?"password":"text",this.passwordIcon=this.passwordIcon==="fa-eye"?"fa-eye-slash":"fa-eye"}ngOnDestroy(){document.body.classList.remove("login-body")}};t.\u0275fac=function(e){return new(e||t)(m(w),m(he),m(Ce),m(be),m(fe))},t.\u0275cmp=f({type:t,selectors:[["app-login"]],viewQuery:function(e,s){if(e&1&&W(Te,5),e&2){let _;B(_=q())&&(s.subdomainEl=_.first)}},standalone:!1,decls:18,vars:6,consts:[["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"fw-normal","fs-2","header-title","text-center"],[3,"newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[1,"d-flex","copyright",2,"margin-left","20px"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version",2,"margin-right","18px"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"fs-2","header-title","me-2","fw-normal"],[1,"text-secondary-emphasis","fst-italic",2,"font-size","11px"],[2,"margin-top","38px"],[1,"form-block","mt-5"],[1,"input-group","input-group-lg","mt-8"],[1,"input-group-text","rounded-start","border-end-0",2,"width","52px"],[1,"fa-solid","fa-cloud"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","border-start","rounded-end","rounded-start-0","domain-option",2,"height","58px",3,"ngModelChange","ngModel"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],["value",".dealpos.app"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"d-flex","align-items-center","justify-content-center",2,"margin-top","2.1rem"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[1,""],[1,"border-0",2,"width","34px","height","34px",3,"src","title","alt"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"robotoslab","fw-normal"],[1,"ms-2","fw-normal"],[1,"me-2","robotoslab","d-inline-block","text-success"],["title","Edit Store Address",1,"fa-solid","fa-edit","link-success","fs-5","pointer",3,"click"],[2,"margin-top","29px"],[1,"input-group","input-group-lg"],[1,"fas","fa-user","fa-lg"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],[1,"d-flex","justify-content-start","w-50","mb-4",2,"height","16px"],[1,"fas","fa-key","fa-lg"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","aria-describedby","basic-addon1","autofocus","","name","password","required","",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","type","ngClass","ngModel"],[1,"input-group-text","border-start-0","rounded-end"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-success","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[2,"width","52px"],[1,"text-danger","ps-1"],[3,"class"],[3,"click"]],template:function(e,s){e&1&&(i(0,"div",3)(1,"div",4)(2,"div",5)(3,"h3",6),a(4,"New Features"),r(),l(5,"POS-news-swiper",7),K(6,"async"),r(),i(7,"div",8),C(8,Ne,30,2)(9,We,36,12),r()(),i(10,"div",9)(11,"span",10),a(12,"powered by :"),r(),l(13,"a",11),r(),i(14,"div",12)(15,"a",13),a(16),l(17,"i",14),r()()()),e&2&&(c(5),b("newsList",$(6,4,s.news$)),c(3),v(s.loginState=="FORM_DOMAIN"?8:9),c(7),b("href",s.changelogUrl,O),c(),Y("version ",s.version))},dependencies:[X,ae,de,ce,te,se,ne,ie,le,re,oe,ve,Z],styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}"]});let o=t;return o})();var Oe=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.shopID=n.shop_id,this.code=n.code})}addShopee(){let n={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",n).subscribe(s=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(m(y),m(S),m(w))},t.\u0275cmp=f({type:t,selectors:[["shopee-authorized"]],standalone:!1,decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-t",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Shopee"),r(),i(13,"div"),a(14," Your shopID is "),i(15,"span",8),a(16),r()(),i(17,"button",9),g("click",function(){return s.addShopee()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(c(16),x(s.shopID))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});let o=t;return o})();var Pe=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.code=n.code,this.state=n.state})}addChannelTiktok(){let n={Code:this.code};this.http.post("/api/ChannelAdd/AddTiktok",n).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(m(y),m(S),m(w))},t.\u0275cmp=f({type:t,selectors:[["app-tiktok"]],standalone:!1,decls:24,vars:2,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Tiktok"),r(),i(13,"div"),a(14," Your Code is "),i(15,"span",8),a(16),r()(),i(17,"div"),a(18," Your State is "),i(19,"span",8),a(20),r()(),i(21,"button",9),g("click",function(){return s.addChannelTiktok()}),l(22,"i",10),a(23," Add to my Channel"),r()()()()()()),e&2&&(c(16),x(s.code),c(4),x(s.state))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});let o=t;return o})();var ye=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.code=n.code})}addChannelLazada(){let n={Code:this.code};this.http.post("/api/ChannelAdd/AddLazada",n).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(m(y),m(S),m(w))},t.\u0275cmp=f({type:t,selectors:[["app-lazada"]],standalone:!1,decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Lazada"),r(),i(13,"div"),a(14," Your Code is "),i(15,"span",8),a(16),r()(),i(17,"button",9),g("click",function(){return s.addChannelLazada()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(c(16),x(s.code))},encapsulation:2});let o=t;return o})();var Be=[{path:"",component:we,data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:Oe,data:{title:"Success"}},{path:"tiktok",component:Pe,data:{title:"Success"}},{path:"lazada",component:ye,data:{title:"Success"}}],Se=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=A({type:t}),t.\u0275inj=T({imports:[V.forChild(Be),V]});let o=t;return o})();var kt=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=A({type:t}),t.\u0275inj=T({imports:[ee,me,Se,_e,xe]});let o=t;return o})();export{kt as LoginModule};
@@ -1,4 +1,4 @@
1
- import{a as Pt,b as _t,d as Ti}from"./chunk-Q2QX5AAJ.js";import"./chunk-AZOCRKXK.js";import{a as di}from"./chunk-EYT2YJGK.js";import{b as bt}from"./chunk-RNWHARPK.js";import{a as _i}from"./chunk-5X2E3W32.js";import{a as ui}from"./chunk-UH5C5HXK.js";import{a as Jt}from"./chunk-ZSUWHVKX.js";import{a as Ci}from"./chunk-LA2EIRS6.js";import{a as fi,b as bi}from"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import{a as si}from"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import{d as ft,e as Bt}from"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import{a as ci,b as yi,c as wi}from"./chunk-E6AMKEQR.js";import{a as We,b as mi,c as gi}from"./chunk-IGKMJFKP.js";import{a as gt,d as pi,e as hi}from"./chunk-ITGVXYDV.js";import{a as Qe}from"./chunk-HK5FXZE4.js";import{b as Ke}from"./chunk-KJE5GRQ4.js";import{a as K}from"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import{i as ti}from"./chunk-PYQPYOIY.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import{a as M,e as F,f as li}from"./chunk-L7WZ6U4T.js";import{b as Y,c as pe,d as Ae,e as A,f as ue}from"./chunk-LOWGZOML.js";import{G as oi,U as mt,V as qe,ja as ce,ka as ai,la as Ft,ma as Lt,oa as ri,ra as ie,sa as q}from"./chunk-5PMKN6PM.js";import"./chunk-AGBJEXIM.js";import{b as Zt,e as Xt}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{c as Dt}from"./chunk-JBEKD57G.js";import{m as ii,n as ni}from"./chunk-EDEZ3JLR.js";import{A as we,a as Ie,b as Wt,g as ht,h as Ne,m as He}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import{b as Yt,c as ei}from"./chunk-ZETUYNFJ.js";import"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{c as Ve,e as pt,f as Le,g as ut,h as be,i as jt,l as qt,m as ne,n as Oe}from"./chunk-LNJUGHOX.js";import{$b as me,$c as G,Ac as v,Ba as tt,Bc as ae,Cc as b,Dc as _,Fd as T,Gb as I,Gd as Z,Ha as it,Hb as le,Hc as lt,Ib as Rt,Ic as Re,K as kt,Kb as E,Kc as ze,Lb as se,Lc as C,Mb as p,Mc as V,Nc as $e,Oa as x,Oc as te,Qc as Me,Rc as De,Sc as Fe,Z as et,Zb as D,Zc as oe,_c as Mt,ad as Se,bc as ge,cc as Ut,cd as st,dd as dt,ea as Ue,ec as at,ed as je,f as Pe,fc as rt,fd as $t,gc as l,hc as h,hd as Te,ic as m,id as ve,jc as B,kc as U,kd as ye,la as xe,lb as nt,lc as $,ma as ee,mc as L,na as re,nb as s,nc as O,oc as N,od as ct,pa as de,pc as k,qc as H,ra as z,rc as X,sb as R,tb as ot,td as fe,v as Gt,vc as P,xa as y,xc as c,ya as w,za as S,zb as ke}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import{a as Be,b as Ge}from"./chunk-66YHNWRR.js";var vi=`
1
+ import{a as Pt,b as _t,d as Ti}from"./chunk-Q2QX5AAJ.js";import"./chunk-AZOCRKXK.js";import{a as di}from"./chunk-EYT2YJGK.js";import{b as bt}from"./chunk-RNWHARPK.js";import{a as _i}from"./chunk-5X2E3W32.js";import{a as ui}from"./chunk-UH5C5HXK.js";import{a as Jt}from"./chunk-ZSUWHVKX.js";import{a as Ci}from"./chunk-L22SKCLL.js";import{a as fi,b as bi}from"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import{a as si}from"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import{d as ft,e as Bt}from"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import{a as ci,b as yi,c as wi}from"./chunk-E6AMKEQR.js";import{a as We,b as mi,c as gi}from"./chunk-IGKMJFKP.js";import{a as gt,d as pi,e as hi}from"./chunk-ITGVXYDV.js";import{a as Qe}from"./chunk-HK5FXZE4.js";import{b as Ke}from"./chunk-KJE5GRQ4.js";import{a as K}from"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import{i as ti}from"./chunk-BQEBDVGB.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import{a as M,e as F,f as li}from"./chunk-L7WZ6U4T.js";import{b as Y,c as pe,d as Ae,e as A,f as ue}from"./chunk-LOWGZOML.js";import{G as oi,U as mt,V as qe,ja as ce,ka as ai,la as Ft,ma as Lt,oa as ri,ra as ie,sa as q}from"./chunk-5PMKN6PM.js";import"./chunk-AGBJEXIM.js";import{b as Zt,e as Xt}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{c as Dt}from"./chunk-JBEKD57G.js";import{m as ii,n as ni}from"./chunk-EDEZ3JLR.js";import{A as we,a as Ie,b as Wt,g as ht,h as Ne,m as He}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import{b as Yt,c as ei}from"./chunk-ZETUYNFJ.js";import"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{c as Ve,e as pt,f as Le,g as ut,h as be,i as jt,l as qt,m as ne,n as Oe}from"./chunk-LNJUGHOX.js";import{$b as me,$c as G,Ac as v,Ba as tt,Bc as ae,Cc as b,Dc as _,Fd as T,Gb as I,Gd as Z,Ha as it,Hb as le,Hc as lt,Ib as Rt,Ic as Re,K as kt,Kb as E,Kc as ze,Lb as se,Lc as C,Mb as p,Mc as V,Nc as $e,Oa as x,Oc as te,Qc as Me,Rc as De,Sc as Fe,Z as et,Zb as D,Zc as oe,_c as Mt,ad as Se,bc as ge,cc as Ut,cd as st,dd as dt,ea as Ue,ec as at,ed as je,f as Pe,fc as rt,fd as $t,gc as l,hc as h,hd as Te,ic as m,id as ve,jc as B,kc as U,kd as ye,la as xe,lb as nt,lc as $,ma as ee,mc as L,na as re,nb as s,nc as O,oc as N,od as ct,pa as de,pc as k,qc as H,ra as z,rc as X,sb as R,tb as ot,td as fe,v as Gt,vc as P,xa as y,xc as c,ya as w,za as S,zb as ke}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import{a as Be,b as Ge}from"./chunk-66YHNWRR.js";var vi=`
2
2
  .p-datatable {
3
3
  position: relative;
4
4
  display: block;
@@ -1 +1 @@
1
- import{a as r}from"./chunk-UJ4S2WZV.js";import{a as C,b as v}from"./chunk-A7PUMY67.js";import"./chunk-PYQPYOIY.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-AGBJEXIM.js";import"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-JBEKD57G.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{E as h,I as o,m as f}from"./chunk-LNJUGHOX.js";import{Gb as l,Hb as c,gc as s,hc as d,ic as u,jc as i,na as p,nb as m}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var b=(()=>{let e=class e{constructor(){this.priceTabs=[{Title:"Single Channel Comparison",Url:"/menu/price/SingleChannel"},{Title:"Multi Channel Comparison",Url:"/menu/price/pos"}]}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=l({type:e,selectors:[["app-price"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,g){n&1&&(d(0,"nav",0)(1,"div",1)(2,"div"),i(3,"nav-tab",2),u()()(),i(4,"router-outlet")),n&2&&(m(3),s("Tabs",g.priceTabs))},dependencies:[v,C,o,h],encapsulation:2});let t=e;return t})();var M=[{path:"",component:b,children:[{path:"",redirectTo:"SingleChannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-3IGKGUHQ.js").then(t=>t.PricePosChannelComponent)},canActivate:[r],data:{title:"Global Price Comparison"}},{path:"SingleChannel",loadComponent(){return import("./chunk-DOVAN3PS.js").then(t=>t.PriceSingleChannelComponent)},canActivate:[r],data:{title:"Price Single Channel Comparison"}}]}],F=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=c({type:e}),e.\u0275inj=p({imports:[f,o.forChild(M)]});let t=e;return t})();export{F as PriceRoutingModule};
1
+ import{a as r}from"./chunk-NH6QGSVC.js";import{a as C,b as v}from"./chunk-A7PUMY67.js";import"./chunk-BQEBDVGB.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-AGBJEXIM.js";import"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-JBEKD57G.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{E as h,I as o,m as f}from"./chunk-LNJUGHOX.js";import{Gb as l,Hb as c,gc as s,hc as d,ic as u,jc as i,na as p,nb as m}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var b=(()=>{let e=class e{constructor(){this.priceTabs=[{Title:"Single Channel Comparison",Url:"/menu/price/SingleChannel"},{Title:"Multi Channel Comparison",Url:"/menu/price/pos"}]}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=l({type:e,selectors:[["app-price"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,g){n&1&&(d(0,"nav",0)(1,"div",1)(2,"div"),i(3,"nav-tab",2),u()()(),i(4,"router-outlet")),n&2&&(m(3),s("Tabs",g.priceTabs))},dependencies:[v,C,o,h],encapsulation:2});let t=e;return t})();var M=[{path:"",component:b,children:[{path:"",redirectTo:"SingleChannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-RWVVRZJY.js").then(t=>t.PricePosChannelComponent)},canActivate:[r],data:{title:"Global Price Comparison"}},{path:"SingleChannel",loadComponent(){return import("./chunk-KUNITWR6.js").then(t=>t.PriceSingleChannelComponent)},canActivate:[r],data:{title:"Price Single Channel Comparison"}}]}],F=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=c({type:e}),e.\u0275inj=p({imports:[f,o.forChild(M)]});let t=e;return t})();export{F as PriceRoutingModule};
@@ -1 +1 @@
1
- import{a as f}from"./chunk-UJ4S2WZV.js";import{b as l}from"./chunk-A7PUMY67.js";import"./chunk-PYQPYOIY.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-AGBJEXIM.js";import"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-JBEKD57G.js";import{n as u}from"./chunk-EDEZ3JLR.js";import{A as d}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{E as c,I as m,m as n}from"./chunk-LNJUGHOX.js";import{Gb as a,Hb as i,jc as s,na as r}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var M=(()=>{let t=class t{constructor(){}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=a({type:t,selectors:[["app-report"]],standalone:!1,decls:1,vars:0,template:function(e,O){e&1&&s(0,"router-outlet")},dependencies:[c],styles:["ul[_ngcontent-%COMP%] > li.dropdown-item[_ngcontent-%COMP%]{font-size:.6875rem!important}"]});let o=t;return o})();var y=[{path:"",component:M,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",loadChildren:()=>import("./chunk-2HGLCZCJ.js").then(o=>o.OrderModule),canActivate:[f]}]}],C=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i({type:t}),t.\u0275inj=r({imports:[n,m.forChild(y)]});let o=t;return o})();var b=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i({type:t}),t.\u0275inj=r({imports:[n,l,C,d,u,m]});let o=t;return o})();export{b as ReportModule};
1
+ import{a as f}from"./chunk-NH6QGSVC.js";import{b as l}from"./chunk-A7PUMY67.js";import"./chunk-BQEBDVGB.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-AGBJEXIM.js";import"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-JBEKD57G.js";import{n as u}from"./chunk-EDEZ3JLR.js";import{A as d}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{E as c,I as m,m as n}from"./chunk-LNJUGHOX.js";import{Gb as a,Hb as i,jc as s,na as r}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var M=(()=>{let t=class t{constructor(){}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=a({type:t,selectors:[["app-report"]],standalone:!1,decls:1,vars:0,template:function(e,O){e&1&&s(0,"router-outlet")},dependencies:[c],styles:["ul[_ngcontent-%COMP%] > li.dropdown-item[_ngcontent-%COMP%]{font-size:.6875rem!important}"]});let o=t;return o})();var y=[{path:"",component:M,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",loadChildren:()=>import("./chunk-I3R7CC6J.js").then(o=>o.OrderModule),canActivate:[f]}]}],C=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i({type:t}),t.\u0275inj=r({imports:[n,m.forChild(y)]});let o=t;return o})();var b=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i({type:t}),t.\u0275inj=r({imports:[n,l,C,d,u,m]});let o=t;return o})();export{b as ReportModule};
@@ -1,2 +1,2 @@
1
- import{h as f}from"./chunk-PYQPYOIY.js";import{a as n}from"./chunk-AGBJEXIM.js";import{e as m}from"./chunk-OXWPYJNB.js";import{ea as u,ma as c,ra as l,v as a}from"./chunk-ZYJ6LAJ3.js";var S=(()=>{let r=class r{constructor(){}convertToCSV(t,e){let i;if(typeof t=="string")i=t;else{var o=typeof t=="object"?t:JSON.parse(t);i=this.transformToCSVStringFormat(o)}this.downloadCSV(i,e)}transformToCSVStringFormat(t){if(!t||!t.length)return;let e=",",i=Object.keys(t[0]);return t.map(h=>i.map(d=>{let p=h[d]===null||h[d]===void 0?"":h[d];return p=p instanceof Date?p.toLocaleString():p.toString().replace(/"/g,'""'),p.search(/("|,|\n)/g)>=0&&(p=`"${p}"`),p}).join(e)).join(`
1
+ import{h as f}from"./chunk-BQEBDVGB.js";import{a as n}from"./chunk-AGBJEXIM.js";import{e as m}from"./chunk-OXWPYJNB.js";import{ea as u,ma as c,ra as l,v as a}from"./chunk-ZYJ6LAJ3.js";var S=(()=>{let r=class r{constructor(){}convertToCSV(t,e){let i;if(typeof t=="string")i=t;else{var o=typeof t=="object"?t:JSON.parse(t);i=this.transformToCSVStringFormat(o)}this.downloadCSV(i,e)}transformToCSVStringFormat(t){if(!t||!t.length)return;let e=",",i=Object.keys(t[0]);return t.map(h=>i.map(d=>{let p=h[d]===null||h[d]===void 0?"":h[d];return p=p instanceof Date?p.toLocaleString():p.toString().replace(/"/g,'""'),p.search(/("|,|\n)/g)>=0&&(p=`"${p}"`),p}).join(e)).join(`
2
2
  `)}downloadCSV(t,e){var i=new Blob([t],{type:"text/csv;charset=utf8;"}),o=document.createElement("a");o.setAttribute("href",window.URL.createObjectURL(i)),o.setAttribute("download",e),document.body.appendChild(o),o.click(),document.body.removeChild(o)}};r.\u0275fac=function(e){return new(e||r)},r.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"});let s=r;return s})();var T=(()=>{let r=class r{constructor(){this.httpService=l(m),this.tokenService=l(f),this.exportService=l(S)}getShippedOrders(t){return this.httpService.post(n.GetShipped,t).pipe(a(e=>e.Data||[]))}getReadyToShipOrders(t){return this.httpService.post(n.GetToShip,t).pipe(a(e=>e?.Data))}getCompletedOrders(t){return this.httpService.post(n.GetCompleted,t).pipe(a(e=>e?.Data||[]))}getCancelledOrders(t){return this.httpService.post(n.GetCancelled,t).pipe(a(e=>e.Data))}getAwaitingCollectionOrders(t){return this.httpService.post(n.GetAwaitingCollection,t).pipe(a(e=>e?.Data))}getOrderDefaultValue(){return this.httpService.get(n.getOrderDaysFrom).pipe(a(t=>{let e=Number(t.Days??0),i=new Date;return e===0?null:new Date(i.setDate(i.getDate()-e))}))}getAllOrders(t){return this.httpService.post(n.GetAll,t).pipe(a(e=>e.Data))}exportOrders(t,e){return this.httpService.post("api/Orders/ExportOrder",t).pipe(u(i=>{this.exportService.convertToCSV(i,e)}))}refreshShippingCourier(t,e){let i={ShopID:t,OrderNumber:e};return this.httpService.post(n.RefreshShippingCourierAndRefNumber,i)}};r.\u0275fac=function(e){return new(e||r)},r.\u0275prov=c({token:r,factory:r.\u0275fac});let s=r;return s})();export{T as a};
@@ -1 +1 @@
1
- import{b as de,c as pe}from"./chunk-ILW6ZFFV.js";import{a as ce}from"./chunk-VNI2KCJE.js";import{a as T}from"./chunk-35DCCWTG.js";import{a as se}from"./chunk-S7CKRTJV.js";import{a as ae}from"./chunk-7JQEF4XX.js";import"./chunk-AFIF6VRM.js";import"./chunk-ZW2TMVZP.js";import"./chunk-ZTHO6JJM.js";import"./chunk-SHUYFOQI.js";import"./chunk-FCEXPGTK.js";import"./chunk-QFSA7CU4.js";import"./chunk-OPXITNRF.js";import"./chunk-HPINZVE4.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import"./chunk-3RK6DDJD.js";import"./chunk-4YCSITNV.js";import"./chunk-WHHW4IZT.js";import"./chunk-N5AE5WMQ.js";import"./chunk-6OJQRHIZ.js";import{a as me}from"./chunk-LA2EIRS6.js";import"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import{a as le}from"./chunk-PDCVMSLL.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import"./chunk-PYQPYOIY.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import"./chunk-AGBJEXIM.js";import"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-JBEKD57G.js";import{m as re,n as oe}from"./chunk-EDEZ3JLR.js";import{A as te,c as Y,h as Z,m as $,o as ee}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import{v as ie,w as ne}from"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{i as K,j as Q,l as U,m as X}from"./chunk-LNJUGHOX.js";import{$b as y,$c as G,Gb as W,Ha as O,Lc as k,Mc as a,Nc as E,Oc as w,Qc as g,Rc as C,Sc as h,Tc as z,Uc as R,Vc as H,Z as F,Zc as j,_c as q,bc as b,cc as D,ec as I,fc as B,gc as v,hc as t,hd as x,ic as i,id as A,jc as _,jd as J,nb as l,qc as V,ra as N,vc as M,xa as c,xc as f,ya as u}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import{a as P,b as L}from"./chunk-66YHNWRR.js";var ue=()=>[],_e=r=>({"td-cell-hover":r});function fe(r,m){if(r&1&&_(0,"variants-dropdown",26),r&2){let e=f().$implicit;v("variants",e==null?null:e.Variants)}}function ge(r,m){if(r&1&&_(0,"variant-with-image",27),r&2){let e=f().$implicit;v("variant",e==null?null:e.Variants[0])}}function Ce(r,m){if(r&1&&(t(0,"span"),a(1),i()),r&2){let e=f().$implicit;l(),w("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function he(r,m){if(r&1&&(t(0,"tr")(1,"td")(2,"div",23)(3,"div"),_(4,"order-link",24),i(),t(5,"small"),a(6),x(7,"date"),i(),_(8,"br"),t(9,"small"),_(10,"i",25),a(11),i()()(),t(12,"td"),y(13,fe,1,1,"variants-dropdown",26)(14,ge,1,1,"variant-with-image",27),i(),t(15,"td"),a(16),x(17,"number"),i(),t(18,"td")(19,"div",23)(20,"div",28)(21,"span"),a(22),i(),y(23,Ce,2,1,"span"),i(),t(24,"small"),a(25),i()()()()),r&2){let e=m.$implicit;l(4),v("order",e),l(2),w(" ",J(7,10,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),l(5),w(" ",e.Customer," "),l(),k(G(15,_e,(e.Variants==null?null:e.Variants.length)>1)),l(),b((e.Variants==null?null:e.Variants.length)>1?13:14),l(3),E(A(17,13,e.Amount)),l(6),E(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),l(),b(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?23:-1),l(2),w(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," ")}}function Se(r,m){if(r&1){let e=V();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),a(5,"Number"),i(),t(6,"th"),a(7,"Items"),i(),t(8,"th",21),a(9,"Amount"),i(),t(10,"th",21),a(11,"Shipping"),i()()(),t(12,"tbody"),I(13,he,26,17,"tr",null,D),i()(),t(15,"app-custom-paginator",22),M("next",function(){c(e);let p=f();return u(p.initAllOrders())})("previous",function(){c(e);let p=f();return u(p.initAllOrders())}),i()()}if(r&2){let e=f(),d=H(0);l(13),B(d),l(2),v("filter",e.filter())("totaldata",d==null?null:d.length)}}function ve(r,m){r&1&&(t(0,"div",16),_(1,"app-empty-state"),i())}var qe=(()=>{let m=class m{constructor(){this.orderService=N(T),this.filter=O({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:d=>{this.initFromDate(d)},error:d=>{console.error("Error fetching default date:",d),this.initFromDate(null)}})}initFromDate(d){this.filter.update(p=>L(P({},p),{From:d})),this.initAllOrders()}initAllOrders(){this.allOrders$=this.orderService.getAllOrders(this.filter()).pipe(F(1))}};m.\u0275fac=function(p){return new(p||m)},m.\u0275cmp=W({type:m,selectors:[["app-all"]],features:[j([T])],decls:34,vars:12,consts:[["headerTitle","Completed","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],["rowCountApi","/api/orders/allcount",3,"next","previous","filter","totaldata"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[1,"fa-solid","fa-user"],[3,"variants"],[3,"variant"],[1,"d-flex","align-items-end","gap-2"]],template:function(p,o){if(p&1){let s=V();z(0),x(1,"async"),t(2,"mainpanel",0),M("onSubmit",function(){return c(s),u(o.initAllOrders())}),h("textChange",function(n){return c(s),C(o.filter().Number,n)||(o.filter().Number=n),u(n)}),t(3,"actions")(4,"a",1),_(5,"i",2),t(6,"span"),a(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),a(11,"Channel"),i(),t(12,"app-channel-options-v2",4),h("ngModelChange",function(n){return c(s),C(o.filter().ListChannelID,n)||(o.filter().ListChannelID=n),u(n)}),i()(),t(13,"div",5)(14,"label",3),a(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),h("dateChange",function(n){return c(s),C(o.filter().From,n)||(o.filter().From=n),u(n)}),i()(),t(18,"div")(19,"datepicker",8),h("dateChange",function(n){return c(s),C(o.filter().To,n)||(o.filter().To=n),u(n)}),i()()(),t(20,"div",5)(21,"label",9),a(22,"Page Number"),i(),t(23,"input",10),h("ngModelChange",function(n){return c(s),C(o.filter().PageNumber,n)||(o.filter().PageNumber=n),u(n)}),i()(),t(24,"div",5)(25,"label",9),a(26,"Page Size"),i(),t(27,"input",11),h("ngModelChange",function(n){return c(s),C(o.filter().PageSize,n)||(o.filter().PageSize=n),u(n)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),y(32,Se,16,2,"div",15)(33,ve,2,0,"div",16),i()()()()()}if(p&2){let s=R(A(1,8,o.allOrders$)||q(11,ue));l(2),g("text",o.filter().Number),l(10),v("multiple",!0),g("ngModel",o.filter().ListChannelID),l(5),g("date",o.filter().From),l(2),g("date",o.filter().To),l(4),g("ngModel",o.filter().PageNumber),l(4),g("ngModel",o.filter().PageSize),l(5),b((s==null?null:s.length)>0?32:33)}},dependencies:[X,oe,re,ae,le,te,Y,ee,Z,$,de,pe,se,ne,ie,ce,me,K,U,Q],encapsulation:2});let r=m;return r})();export{qe as AllComponent};
1
+ import{b as de,c as pe}from"./chunk-ILW6ZFFV.js";import{a as ce}from"./chunk-DUXKDRDP.js";import{a as T}from"./chunk-6CM22SKR.js";import{a as se}from"./chunk-S7CKRTJV.js";import{a as ae}from"./chunk-7JQEF4XX.js";import"./chunk-AFIF6VRM.js";import"./chunk-ZW2TMVZP.js";import"./chunk-ZTHO6JJM.js";import"./chunk-SHUYFOQI.js";import"./chunk-FCEXPGTK.js";import"./chunk-QFSA7CU4.js";import"./chunk-OPXITNRF.js";import"./chunk-HPINZVE4.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import"./chunk-3RK6DDJD.js";import"./chunk-4YCSITNV.js";import"./chunk-WHHW4IZT.js";import"./chunk-N5AE5WMQ.js";import"./chunk-6OJQRHIZ.js";import{a as me}from"./chunk-L22SKCLL.js";import"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import{a as le}from"./chunk-PDCVMSLL.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import"./chunk-BQEBDVGB.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import"./chunk-AGBJEXIM.js";import"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-JBEKD57G.js";import{m as re,n as oe}from"./chunk-EDEZ3JLR.js";import{A as te,c as Y,h as Z,m as $,o as ee}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import{v as ie,w as ne}from"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{i as K,j as Q,l as U,m as X}from"./chunk-LNJUGHOX.js";import{$b as y,$c as G,Gb as W,Ha as O,Lc as k,Mc as a,Nc as E,Oc as w,Qc as g,Rc as C,Sc as h,Tc as z,Uc as R,Vc as H,Z as F,Zc as j,_c as q,bc as b,cc as D,ec as I,fc as B,gc as v,hc as t,hd as x,ic as i,id as A,jc as _,jd as J,nb as l,qc as V,ra as N,vc as M,xa as c,xc as f,ya as u}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import{a as P,b as L}from"./chunk-66YHNWRR.js";var ue=()=>[],_e=r=>({"td-cell-hover":r});function fe(r,m){if(r&1&&_(0,"variants-dropdown",26),r&2){let e=f().$implicit;v("variants",e==null?null:e.Variants)}}function ge(r,m){if(r&1&&_(0,"variant-with-image",27),r&2){let e=f().$implicit;v("variant",e==null?null:e.Variants[0])}}function Ce(r,m){if(r&1&&(t(0,"span"),a(1),i()),r&2){let e=f().$implicit;l(),w("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function he(r,m){if(r&1&&(t(0,"tr")(1,"td")(2,"div",23)(3,"div"),_(4,"order-link",24),i(),t(5,"small"),a(6),x(7,"date"),i(),_(8,"br"),t(9,"small"),_(10,"i",25),a(11),i()()(),t(12,"td"),y(13,fe,1,1,"variants-dropdown",26)(14,ge,1,1,"variant-with-image",27),i(),t(15,"td"),a(16),x(17,"number"),i(),t(18,"td")(19,"div",23)(20,"div",28)(21,"span"),a(22),i(),y(23,Ce,2,1,"span"),i(),t(24,"small"),a(25),i()()()()),r&2){let e=m.$implicit;l(4),v("order",e),l(2),w(" ",J(7,10,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),l(5),w(" ",e.Customer," "),l(),k(G(15,_e,(e.Variants==null?null:e.Variants.length)>1)),l(),b((e.Variants==null?null:e.Variants.length)>1?13:14),l(3),E(A(17,13,e.Amount)),l(6),E(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),l(),b(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?23:-1),l(2),w(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," ")}}function Se(r,m){if(r&1){let e=V();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),a(5,"Number"),i(),t(6,"th"),a(7,"Items"),i(),t(8,"th",21),a(9,"Amount"),i(),t(10,"th",21),a(11,"Shipping"),i()()(),t(12,"tbody"),I(13,he,26,17,"tr",null,D),i()(),t(15,"app-custom-paginator",22),M("next",function(){c(e);let p=f();return u(p.initAllOrders())})("previous",function(){c(e);let p=f();return u(p.initAllOrders())}),i()()}if(r&2){let e=f(),d=H(0);l(13),B(d),l(2),v("filter",e.filter())("totaldata",d==null?null:d.length)}}function ve(r,m){r&1&&(t(0,"div",16),_(1,"app-empty-state"),i())}var qe=(()=>{let m=class m{constructor(){this.orderService=N(T),this.filter=O({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:d=>{this.initFromDate(d)},error:d=>{console.error("Error fetching default date:",d),this.initFromDate(null)}})}initFromDate(d){this.filter.update(p=>L(P({},p),{From:d})),this.initAllOrders()}initAllOrders(){this.allOrders$=this.orderService.getAllOrders(this.filter()).pipe(F(1))}};m.\u0275fac=function(p){return new(p||m)},m.\u0275cmp=W({type:m,selectors:[["app-all"]],features:[j([T])],decls:34,vars:12,consts:[["headerTitle","Completed","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],["rowCountApi","/api/orders/allcount",3,"next","previous","filter","totaldata"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[1,"fa-solid","fa-user"],[3,"variants"],[3,"variant"],[1,"d-flex","align-items-end","gap-2"]],template:function(p,o){if(p&1){let s=V();z(0),x(1,"async"),t(2,"mainpanel",0),M("onSubmit",function(){return c(s),u(o.initAllOrders())}),h("textChange",function(n){return c(s),C(o.filter().Number,n)||(o.filter().Number=n),u(n)}),t(3,"actions")(4,"a",1),_(5,"i",2),t(6,"span"),a(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),a(11,"Channel"),i(),t(12,"app-channel-options-v2",4),h("ngModelChange",function(n){return c(s),C(o.filter().ListChannelID,n)||(o.filter().ListChannelID=n),u(n)}),i()(),t(13,"div",5)(14,"label",3),a(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),h("dateChange",function(n){return c(s),C(o.filter().From,n)||(o.filter().From=n),u(n)}),i()(),t(18,"div")(19,"datepicker",8),h("dateChange",function(n){return c(s),C(o.filter().To,n)||(o.filter().To=n),u(n)}),i()()(),t(20,"div",5)(21,"label",9),a(22,"Page Number"),i(),t(23,"input",10),h("ngModelChange",function(n){return c(s),C(o.filter().PageNumber,n)||(o.filter().PageNumber=n),u(n)}),i()(),t(24,"div",5)(25,"label",9),a(26,"Page Size"),i(),t(27,"input",11),h("ngModelChange",function(n){return c(s),C(o.filter().PageSize,n)||(o.filter().PageSize=n),u(n)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),y(32,Se,16,2,"div",15)(33,ve,2,0,"div",16),i()()()()()}if(p&2){let s=R(A(1,8,o.allOrders$)||q(11,ue));l(2),g("text",o.filter().Number),l(10),v("multiple",!0),g("ngModel",o.filter().ListChannelID),l(5),g("date",o.filter().From),l(2),g("date",o.filter().To),l(4),g("ngModel",o.filter().PageNumber),l(4),g("ngModel",o.filter().PageSize),l(5),b((s==null?null:s.length)>0?32:33)}},dependencies:[X,oe,re,ae,le,te,Y,ee,Z,$,de,pe,se,ne,ie,ce,me,K,U,Q],encapsulation:2});let r=m;return r})();export{qe as AllComponent};
@@ -1 +1 @@
1
- import{a as Y}from"./chunk-LA2EIRS6.js";import"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import"./chunk-PYQPYOIY.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import{a as H}from"./chunk-AGBJEXIM.js";import{e as F}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-JBEKD57G.js";import{m as J,n as G}from"./chunk-EDEZ3JLR.js";import{A as j,c as U,h as K,m as R,p as O}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{i as W,k as D,m as N}from"./chunk-LNJUGHOX.js";import{$b as S,Gb as V,Ha as w,Mc as d,Nc as A,Qc as g,Rc as C,Sc as y,Tc as L,Uc as T,Vc as P,Z as k,bc as x,gc as f,hc as i,hd as b,ic as t,id as B,jc as E,nb as c,qc as M,ra as I,vc as v,xa as m,xc as h,ya as u}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function q(n,a){if(n&1){let p=M();i(0,"input",30),y("ngModelChange",function(o){m(p);let e=h();return C(e.sku,o)||(e.sku=o),u(o)}),t()}if(n&2){let p=h();g("ngModel",p.sku)}}function z(n,a){if(n&1){let p=M();i(0,"input",31),y("ngModelChange",function(o){m(p);let e=h();return C(e.itemId,o)||(e.itemId=o),u(o)}),t()}if(n&2){let p=h();g("ngModel",p.itemId)}}function Q(n,a){if(n&1&&(i(0,"pre",28),d(1),b(2,"json"),t()),n&2){h();let p=P(35);c(),A(B(2,1,p))}}function X(n,a){n&1&&(i(0,"p",29),d(1," Your data will be shown here once it's available "),t())}var me=(()=>{let a=class a{constructor(){this.httpService=I(F),this.selectedChannel=w(null),this.sku=w(null),this.itemId=w(null),this.searchBy="sku"}initProductLog(){let l={ChannelID:this.selectedChannel()};this.searchBy==="sku"?l.SKU=this.sku():l.ItemID=this.itemId(),this.productLog$=this.httpService.post(H.GetProductApiLog,l).pipe(k(1))}copyToClipboard(l){if(!l)return;let o=typeof l=="string"?l:JSON.stringify(l,null,2);navigator.clipboard.writeText(o),alert("Copied to clipboard!")}};a.\u0275fac=function(o){return new(o||a)},a.\u0275cmp=V({type:a,selectors:[["app-product-api"]],decls:50,vars:14,consts:[["headerTitle","Origin Product Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],[1,"mb-2"],[1,"form-check","form-check-inline"],["type","radio","name","searchBy","id","searchBySku",1,"form-check-input",3,"ngModelChange","ngModel","value"],["for","searchBySku",1,"form-check-label"],["type","radio","name","searchBy","id","searchByItemId",1,"form-check-input",3,"ngModelChange","ngModel","value"],["for","searchByItemId",1,"form-check-label"],["type","text","placeholder","Product Code / SKU",1,"form-control","rounded-1",2,"height","40px",3,"ngModel"],["type","text","placeholder","ItemID is Product id from seller center",1,"form-control","rounded-1",2,"height","40px",3,"ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","productLogText"],[1,"text-center","my-12","text-muted"],["type","text","placeholder","Product Code / SKU",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"],["type","text","placeholder","ItemID is Product id from seller center",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"]],template:function(o,e){if(o&1){let s=M();i(0,"mainpanel",0)(1,"actions")(2,"button",1),v("click",function(){return m(s),u(e.initProductLog())}),E(3,"i",2),d(4," Search "),t()(),i(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),d(12,"Channel"),t(),i(13,"p",8),d(14," View logs related to Product API Detail "),t()(),i(15,"div",9)(16,"app-channel-options-v2",10),y("ngModelChange",function(r){return m(s),C(e.selectedChannel,r)||(e.selectedChannel=r),u(r)}),t()()(),i(17,"div",11)(18,"div",7)(19,"h6"),d(20,"Product Code / SKU"),t(),i(21,"p",8),d(22," Product SKU or Code from Channel Product "),t()(),i(23,"div",9)(24,"div",12)(25,"div",13)(26,"input",14),y("ngModelChange",function(r){return m(s),C(e.searchBy,r)||(e.searchBy=r),u(r)}),t(),i(27,"label",15),d(28,"Search by SKU"),t()(),i(29,"div",13)(30,"input",16),y("ngModelChange",function(r){return m(s),C(e.searchBy,r)||(e.searchBy=r),u(r)}),t(),i(31,"label",17),d(32,"Search by ItemID"),t()()(),S(33,q,1,1,"input",18),S(34,z,1,1,"input",19),t()()()(),L(35),b(36,"async"),i(37,"div",20)(38,"div",21)(39,"div",22)(40,"div",23)(41,"h5"),d(42,"Response"),t(),i(43,"button",24),v("click",function(){m(s);let r=P(35);return u(e.copyToClipboard(r))}),d(44," Copy "),t()(),i(45,"div",25)(46,"div",26)(47,"div",27),S(48,Q,3,3,"pre",28)(49,X,2,0,"p",29),t()()()()()()()()()}if(o&2){f("hideSearchBox",!0)("hideSearchDropdown",!0),c(16),g("ngModel",e.selectedChannel),c(10),g("ngModel",e.searchBy),f("value","sku"),c(4),g("ngModel",e.searchBy),f("value","itemid"),c(3),x(e.searchBy==="sku"?33:-1),c(),x(e.searchBy==="itemid"?34:-1),c();let s=T(B(36,11,e.productLog$));c(8),f("disabled",!s),c(5),x(s?48:49)}},dependencies:[N,j,U,O,K,R,G,J,Y,W,D],encapsulation:2});let n=a;return n})();export{me as ProductApiComponent};
1
+ import{a as Y}from"./chunk-L22SKCLL.js";import"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import"./chunk-BQEBDVGB.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import{a as H}from"./chunk-AGBJEXIM.js";import{e as F}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-JBEKD57G.js";import{m as J,n as G}from"./chunk-EDEZ3JLR.js";import{A as j,c as U,h as K,m as R,p as O}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{i as W,k as D,m as N}from"./chunk-LNJUGHOX.js";import{$b as S,Gb as V,Ha as w,Mc as d,Nc as A,Qc as g,Rc as C,Sc as y,Tc as L,Uc as T,Vc as P,Z as k,bc as x,gc as f,hc as i,hd as b,ic as t,id as B,jc as E,nb as c,qc as M,ra as I,vc as v,xa as m,xc as h,ya as u}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function q(n,a){if(n&1){let p=M();i(0,"input",30),y("ngModelChange",function(o){m(p);let e=h();return C(e.sku,o)||(e.sku=o),u(o)}),t()}if(n&2){let p=h();g("ngModel",p.sku)}}function z(n,a){if(n&1){let p=M();i(0,"input",31),y("ngModelChange",function(o){m(p);let e=h();return C(e.itemId,o)||(e.itemId=o),u(o)}),t()}if(n&2){let p=h();g("ngModel",p.itemId)}}function Q(n,a){if(n&1&&(i(0,"pre",28),d(1),b(2,"json"),t()),n&2){h();let p=P(35);c(),A(B(2,1,p))}}function X(n,a){n&1&&(i(0,"p",29),d(1," Your data will be shown here once it's available "),t())}var me=(()=>{let a=class a{constructor(){this.httpService=I(F),this.selectedChannel=w(null),this.sku=w(null),this.itemId=w(null),this.searchBy="sku"}initProductLog(){let l={ChannelID:this.selectedChannel()};this.searchBy==="sku"?l.SKU=this.sku():l.ItemID=this.itemId(),this.productLog$=this.httpService.post(H.GetProductApiLog,l).pipe(k(1))}copyToClipboard(l){if(!l)return;let o=typeof l=="string"?l:JSON.stringify(l,null,2);navigator.clipboard.writeText(o),alert("Copied to clipboard!")}};a.\u0275fac=function(o){return new(o||a)},a.\u0275cmp=V({type:a,selectors:[["app-product-api"]],decls:50,vars:14,consts:[["headerTitle","Origin Product Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],[1,"mb-2"],[1,"form-check","form-check-inline"],["type","radio","name","searchBy","id","searchBySku",1,"form-check-input",3,"ngModelChange","ngModel","value"],["for","searchBySku",1,"form-check-label"],["type","radio","name","searchBy","id","searchByItemId",1,"form-check-input",3,"ngModelChange","ngModel","value"],["for","searchByItemId",1,"form-check-label"],["type","text","placeholder","Product Code / SKU",1,"form-control","rounded-1",2,"height","40px",3,"ngModel"],["type","text","placeholder","ItemID is Product id from seller center",1,"form-control","rounded-1",2,"height","40px",3,"ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","productLogText"],[1,"text-center","my-12","text-muted"],["type","text","placeholder","Product Code / SKU",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"],["type","text","placeholder","ItemID is Product id from seller center",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"]],template:function(o,e){if(o&1){let s=M();i(0,"mainpanel",0)(1,"actions")(2,"button",1),v("click",function(){return m(s),u(e.initProductLog())}),E(3,"i",2),d(4," Search "),t()(),i(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),d(12,"Channel"),t(),i(13,"p",8),d(14," View logs related to Product API Detail "),t()(),i(15,"div",9)(16,"app-channel-options-v2",10),y("ngModelChange",function(r){return m(s),C(e.selectedChannel,r)||(e.selectedChannel=r),u(r)}),t()()(),i(17,"div",11)(18,"div",7)(19,"h6"),d(20,"Product Code / SKU"),t(),i(21,"p",8),d(22," Product SKU or Code from Channel Product "),t()(),i(23,"div",9)(24,"div",12)(25,"div",13)(26,"input",14),y("ngModelChange",function(r){return m(s),C(e.searchBy,r)||(e.searchBy=r),u(r)}),t(),i(27,"label",15),d(28,"Search by SKU"),t()(),i(29,"div",13)(30,"input",16),y("ngModelChange",function(r){return m(s),C(e.searchBy,r)||(e.searchBy=r),u(r)}),t(),i(31,"label",17),d(32,"Search by ItemID"),t()()(),S(33,q,1,1,"input",18),S(34,z,1,1,"input",19),t()()()(),L(35),b(36,"async"),i(37,"div",20)(38,"div",21)(39,"div",22)(40,"div",23)(41,"h5"),d(42,"Response"),t(),i(43,"button",24),v("click",function(){m(s);let r=P(35);return u(e.copyToClipboard(r))}),d(44," Copy "),t()(),i(45,"div",25)(46,"div",26)(47,"div",27),S(48,Q,3,3,"pre",28)(49,X,2,0,"p",29),t()()()()()()()()()}if(o&2){f("hideSearchBox",!0)("hideSearchDropdown",!0),c(16),g("ngModel",e.selectedChannel),c(10),g("ngModel",e.searchBy),f("value","sku"),c(4),g("ngModel",e.searchBy),f("value","itemid"),c(3),x(e.searchBy==="sku"?33:-1),c(),x(e.searchBy==="itemid"?34:-1),c();let s=T(B(36,11,e.productLog$));c(8),f("disabled",!s),c(5),x(s?48:49)}},dependencies:[N,j,U,O,K,R,G,J,Y,W,D],encapsulation:2});let n=a;return n})();export{me as ProductApiComponent};
@@ -1 +1 @@
1
- import{a as Fe,b as Ie}from"./chunk-L76NLJD7.js";import{a as Ee,b as Ve,c as Ae}from"./chunk-ILW6ZFFV.js";import{a as Ne}from"./chunk-VNI2KCJE.js";import{a as j}from"./chunk-35DCCWTG.js";import{a as De}from"./chunk-S7CKRTJV.js";import"./chunk-EYT2YJGK.js";import"./chunk-RNWHARPK.js";import{a as Le}from"./chunk-7JQEF4XX.js";import"./chunk-AFIF6VRM.js";import"./chunk-ZW2TMVZP.js";import"./chunk-ZTHO6JJM.js";import"./chunk-SHUYFOQI.js";import"./chunk-FCEXPGTK.js";import"./chunk-QFSA7CU4.js";import"./chunk-OPXITNRF.js";import"./chunk-HPINZVE4.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import"./chunk-3RK6DDJD.js";import"./chunk-4YCSITNV.js";import"./chunk-WHHW4IZT.js";import"./chunk-N5AE5WMQ.js";import"./chunk-6OJQRHIZ.js";import"./chunk-6KWG6O5L.js";import{a as Pe}from"./chunk-LA2EIRS6.js";import"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import{a as Me}from"./chunk-PDCVMSLL.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import"./chunk-PYQPYOIY.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import{a as x}from"./chunk-AGBJEXIM.js";import{b as L,e as z}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{b as d,c as A}from"./chunk-JBEKD57G.js";import{b as Se,d as we,f as ve,g as ye,h as xe,m as ke,n as Te}from"./chunk-EDEZ3JLR.js";import{A as R,b as ge,c as fe,h as O,m as W,o as Ce}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import{v as _e,w as be}from"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{i as ce,j as de,l as ue,m as he}from"./chunk-LNJUGHOX.js";import{$b as k,$c as pe,Bc as te,Cc as ie,Dc as ne,G,Gb as N,Ha as B,Lc as oe,Mc as c,Nc as P,Oc as E,Qc as S,Rc as w,Sc as v,Tc as re,Uc as ae,Vc as F,Z as J,Zc as le,aa as X,bc as T,cc as Z,ec as $,fc as ee,gc as y,hc as o,hd as V,ic as r,id as I,jc as _,jd as se,lb as Y,ma as D,nb as m,od as me,qc as M,ra as C,v as K,vc as b,xa as h,xc as f,ya as g}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import{a as Q,b as q}from"./chunk-66YHNWRR.js";var Oe=(()=>{let l=class l{constructor(){this.http=C(z),this.toastr=C(L)}printTokopediaShippingLabel(e,t=!1){let i={OrderNumber:e,Printed:t};return this.http.post(x.TokopediaPrintShippingLabel,i)}printTiktokShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.TiktokPrintShippingLabel,i)}printShopeeShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.ShopeePrintShippingLabel,i).pipe(K(p=>(p&&(p.Number=e),p)))}printLazadaShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.LazadaPrintShippingLabel,i)}handleShippingLabelResponse(e,t){switch(t){case d.Tokopedia:let u=window.open("about:blank","_blank");u.document.write(e.File),u.document.close();break;case d.Tiktok:e.data!=null?window.open(e.data.doc_url,"_blank"):this.toastr.error("Cannot Print the Shipping Label,The invoice Number is not set to Pickup","Cannot Print");break;case d.Shopee:var i=Uint8Array.from(atob(e.File),s=>s.charCodeAt(0)),p=new Blob([i],{type:"octet/stream"});A.openDownloadFile(p,`${e?.Number}.pdf`);break;case d.Lazada:e?.result?.data!=null?window.open(e?.result?.data?.pdf_url,"_blank"):this.toastr.error(e.message,"Cannot Print");break}}};l.\u0275fac=function(t){return new(t||l)},l.\u0275prov=D({token:l,factory:l.\u0275fac,providedIn:"root"});let a=l;return a})();var We=(()=>{let l=class l{constructor(){this.dialogRef=C(Se),this.tandaiSudahDicetak=!1}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak?1:0)}};l.\u0275fac=function(t){return new(t||l)},l.\u0275cmp=N({type:l,selectors:[["app-print-tokopedia"]],decls:17,vars:1,consts:[[1,"container-fluid"],[1,"text-center","mb-4","fw-bold","mt-6"],[1,"row"],[1,"col-12"],[1,"fs-5"],[1,"d-flex","align-items-center","text-center","justify-content-center","mb-8"],[1,"me-2",3,"ngModelChange","ngModel"],[1,"fs-5","pt-1"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click"]],template:function(t,i){t&1&&(o(0,"div",0)(1,"h2",1),c(2,"Cetak label pesanan"),r(),o(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),c(7,"Kamu akan mencetak label yang berisi detail pesanan"),r(),o(8,"div",5)(9,"mat-checkbox",6),v("ngModelChange",function(u){return w(i.tandaiSudahDicetak,u)||(i.tandaiSudahDicetak=u),u}),r(),o(10,"span",7),c(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),r()()()()(),o(12,"mat-dialog-actions",8)(13,"button",9),b("click",function(){return i.onCancel()}),c(14,"Cancel"),r(),o(15,"button",10),b("click",function(){return i.onPrint()}),c(16,"Cetak Pesanan"),r()()()),t&2&&(m(9),S("ngModel",i.tandaiSudahDicetak))},dependencies:[R,O,W,xe,ye,ve],encapsulation:2});let a=l;return a})();var U=(()=>{let l=class l{constructor(){this.httpService=C(z),this.shippingLabelService=C(Oe),this.toastrService=C(L),this.dialog=C(we)}printShippingLabel(e){switch(e?.MarketType){case d.Shopee:this.shippingLabelService.printShopeeShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Shopee));break;case d.Tiktok:this.shippingLabelService.printTiktokShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Tiktok));break;case d.Tokopedia:this.dialog.open(We).afterClosed().pipe(G(t=>A.IsNotEmpty(t)),X(t=>this.shippingLabelService.printTokopediaShippingLabel(e.Number,t))).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Tokopedia));break;case d.Lazada:this.shippingLabelService.printLazadaShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Lazada));break;case d.Shopify:this.toastrService.error("Shopify not supported","Error Not supported");break}}printMultipleShippingLabel(e){let t=e.map(p=>({OrderNumber:p.Number,ShopID:p.ShopID})),i="";switch(e[0]?.MarketType){case d.Shopee:i=x.ShopeePrintMultipleShippingLabel;break;case d.Tiktok:i=x.TiktokPrintMultipleShippingLabel;break;case d.Lazada:i=x.LazadaPrintMultipleShippingLabel;break}this.httpService.post(i,t).subscribe(p=>{var u=Uint8Array.from(atob(p.File),Re=>Re.charCodeAt(0)),s=new Blob([u],{type:"octet/stream"});A.openDownloadFile(s,`${p?.Name}.pdf`)})}};l.\u0275fac=function(t){return new(t||l)},l.\u0275prov=D({token:l,factory:l.\u0275fac});let a=l;return a})();var Be=["contextMenu"],je=a=>({"td-cell-hover":a});function He(a,l){if(a&1){let n=M();o(0,"button",20),b("click",function(){h(n);let t=f(),i=F(0);return g(t.onDowloadShippingLabel(i))}),_(1,"i",21),o(2,"span"),c(3,"Download Shipping Label"),r()()}}function Ue(a,l){if(a&1){let n=M();o(0,"input",47),v("ngModelChange",function(t){h(n);let i=f().$implicit;return w(i.selected,t)||(i.selected=t),g(t)}),b("ngModelChange",function(){h(n);let t=f(3),i=F(0);return g(t.onSelectOrders(i))}),r()}if(a&2){let n=f().$implicit,e=f(2);S("ngModel",n.selected),y("disabled",e.selectedChannelType()!=null&&e.selectedChannelType()!=n.MarketType)}}function Qe(a,l){if(a&1&&_(0,"variants-dropdown",39),a&2){let n=f().$implicit;y("variants",n==null?null:n.Variants)}}function qe(a,l){if(a&1&&_(0,"variant-with-image",40),a&2){let n=f().$implicit;y("variant",n==null?null:n.Variants[0])}}function Ke(a,l){if(a&1&&(o(0,"span"),c(1),r()),a&2){let n=f().$implicit;m(),E("(",n.LogisticService==null?null:n.LogisticService.Option,")")}}function Ge(a,l){if(a&1){let n=M();o(0,"button",48),b("click",function(){h(n);let t=f().$implicit,i=f(2);return g(i.onPrintShippingLabel(t))}),_(1,"i",49),r()}}function Je(a,l){if(a&1){let n=M();o(0,"tr")(1,"td"),k(2,Ue,1,2,"input",31),r(),o(3,"td")(4,"div",32),_(5,"img",33),V(6,"channelImage"),o(7,"div",34)(8,"div"),c(9),r(),o(10,"small",35)(11,"span"),c(12),r()()()()(),o(13,"td")(14,"div",36)(15,"div"),_(16,"order-link",37),r(),o(17,"small"),c(18),V(19,"date"),r(),_(20,"br"),o(21,"small"),_(22,"i",38),c(23),r()()(),o(24,"td"),k(25,Qe,1,1,"variants-dropdown",39)(26,qe,1,1,"variant-with-image",40),r(),o(27,"td",41),c(28),V(29,"number"),r(),o(30,"td",42),b("mouseenter",function(t){let i=h(n).$implicit,p=f(2);return g(p.onMouseEnter(t,i))}),o(31,"div",43)(32,"div",36)(33,"div",44)(34,"span"),c(35),r(),k(36,Ke,2,1,"span"),r(),o(37,"small"),c(38),r()()()(),o(39,"td",45),k(40,Ge,2,0,"button",46),r()()}if(a&2){let n=l.$implicit,e=f(2);m(2),T((n==null?null:n.MarketType)!=e.channelType.WooCommerce?2:-1),m(3),y("src",I(6,16,n==null?null:n.MarketType),Y)("alt",n==null||n.Variants[0]==null?null:n.Variants[0].Name),m(4),P(n.Outlet),m(3),P(n.ChannelName),m(4),y("order",n),m(2),E(" ",se(19,18,n==null?null:n.Created,"dd/MM/yyyy HH:mm:ss")," "),m(5),E(" ",n.Customer," "),m(),oe(pe(23,je,(n.Variants==null?null:n.Variants.length)>1)),m(),T((n.Variants==null?null:n.Variants.length)>1?25:26),m(3),P(I(29,21,n.Amount)),m(7),P(n.LogisticService!=null&&n.LogisticService.Name?n.LogisticService==null?null:n.LogisticService.Name:"-"),m(),T(n.LogisticService!=null&&n.LogisticService.Option&&(n.LogisticService==null?null:n.LogisticService.Option)!="Default"?36:-1),m(2),E(" ",n.ReferenceNumber?n.ReferenceNumber:"-"," "),m(2),T((n==null?null:n.MarketType)!=e.channelType.WooCommerce?40:-1)}}function Xe(a,l){if(a&1){let n=M();o(0,"div",17)(1,"table",22)(2,"thead",23)(3,"tr",24),_(4,"th",25),o(5,"th",26),c(6,"Outlet"),r(),o(7,"th",26),c(8,"Number"),r(),o(9,"th"),c(10,"Items"),r(),o(11,"th",27),c(12,"Amount"),r(),o(13,"th",28),c(14,"Shipping"),r(),_(15,"th",29),r()(),o(16,"tbody"),$(17,Je,41,25,"tr",null,Z),r()(),o(19,"app-custom-paginator",30),b("next",function(){h(n);let t=f();return g(t.initAwaitingCollection())})("previous",function(){h(n);let t=f();return g(t.initAwaitingCollection())}),r()()}if(a&2){let n=f(),e=F(0);m(17),ee(e),m(2),y("filter",n.filter())("totaldata",e==null?null:e.length)}}function Ye(a,l){a&1&&(o(0,"div",18),_(1,"app-empty-state"),r())}var Yt=(()=>{let l=class l{constructor(){this.printShippingService=C(U),this.orderService=C(j),this.toastr=C(L),this.fulfillmentService=C(Fe),this.channelType=d,this.selectedOrders=B([]),this.selectedChannelType=me(()=>{let e=null;return this.selectedOrders().length>0&&(e=this.selectedOrders()[0].MarketType),e}),this.filter=B({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null}),this.contextMenuItems=[{id:"refresh",label:"Refresh Shipping",icon:"fa-solid fa-arrows-rotate"},{id:"fulfillment",label:"Set Fulfillment",icon:"fa-solid fa-truck"}]}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(t=>q(Q({},t),{From:e})),this.initAwaitingCollection()}initAwaitingCollection(){this.awaitingCollections$=this.orderService.getAwaitingCollectionOrders(this.filter()).pipe(J(1))}onPrintShippingLabel(e){this.printShippingService.printShippingLabel(e)}onSelectOrders(e){let t=e.filter(i=>i.selected);this.selectedOrders.set(t)}onDowloadShippingLabel(e){e=e.map(t=>(t.selected=!1,t)),this.printShippingService.printMultipleShippingLabel(this.selectedOrders()),this.selectedOrders.set([])}onSetFulfillment(e){this.fulfillmentService.setFulfillmentOrder(e).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initAwaitingCollection()})}refreshShippingAndRefNumber(e){this.orderService.refreshShippingCourier(e.ShopID,e.Number).subscribe(()=>{this.toastr.success("Shipping courier and reference number refreshed","Success"),this.initAwaitingCollection()})}onMouseEnter(e,t){(!t.LogisticService?.Name||!t.ReferenceNumber)&&this.contextMenuEl.show(e,t)}onSelectContextItem(e){e.item?.id==="refresh"?this.refreshShippingAndRefNumber(e.data):this.onSetFulfillment(e.data)}};l.\u0275fac=function(t){return new(t||l)},l.\u0275cmp=N({type:l,selectors:[["app-awaiting-collection"]],viewQuery:function(t,i){if(t&1&&te(Be,5),t&2){let p;ie(p=ne())&&(i.contextMenuEl=p.first)}},features:[le([j,U])],decls:37,vars:13,consts:[["contextMenu",""],["headerTitle","Awaiting Collection","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],[1,"btn","btn-outline-secondary","shadow","rounded"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-3"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[3,"onSelectItem","items"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line","me-3"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","150px"],[2,"width","50px"],["rowCountApi","/api/orders/awaitingcollectioncount",3,"next","previous","filter","totaldata"],["type","checkbox",3,"ngModel","disabled"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[1,"fa-solid","fa-user"],[3,"variants"],[3,"variant"],[1,"text-end"],[3,"mouseenter"],[1,"d-flex","align-items-center","gap-6"],[1,"d-flex","align-items-end","gap-2"],[1,"text-end","td-cell-hover"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line"]],template:function(t,i){if(t&1){let p=M();re(0),V(1,"async"),o(2,"mainpanel",1),b("onSubmit",function(){return h(p),g(i.initAwaitingCollection())}),v("textChange",function(s){return h(p),w(i.filter().Number,s)||(i.filter().Number=s),g(s)}),o(3,"actions"),k(4,He,4,0,"button",2),o(5,"a",3),_(6,"i",4),o(7,"span"),c(8,"Order Fulfillment Display"),r()()(),o(9,"filters")(10,"div")(11,"label",5),c(12,"Channel"),r(),o(13,"app-channel-options-v2",6),v("ngModelChange",function(s){return h(p),w(i.filter().ListChannelID,s)||(i.filter().ListChannelID=s),g(s)}),r()(),o(14,"div",7)(15,"label",5),c(16,"From/To"),r(),o(17,"div",8)(18,"datepicker",9),v("dateChange",function(s){return h(p),w(i.filter().From,s)||(i.filter().From=s),g(s)}),r()(),o(19,"div")(20,"datepicker",10),v("dateChange",function(s){return h(p),w(i.filter().To,s)||(i.filter().To=s),g(s)}),r()()(),o(21,"div",7)(22,"label",11),c(23,"Page Number"),r(),o(24,"input",12),v("ngModelChange",function(s){return h(p),w(i.filter().PageNumber,s)||(i.filter().PageNumber=s),g(s)}),r()(),o(25,"div",7)(26,"label",11),c(27,"Page Size"),r(),o(28,"input",13),v("ngModelChange",function(s){return h(p),w(i.filter().PageSize,s)||(i.filter().PageSize=s),g(s)}),r()()(),o(29,"content")(30,"div",14)(31,"div",15)(32,"div",16),k(33,Xe,20,2,"div",17)(34,Ye,2,0,"div",18),r()()()()(),o(35,"app-context-menu",19,0),b("onSelectItem",function(s){return h(p),g(i.onSelectContextItem(s))}),r()}if(t&2){let p=ae(I(1,10,i.awaitingCollections$));m(2),S("text",i.filter().Number),m(2),T(i.selectedOrders().length>0?4:-1),m(9),y("multiple",!0),S("ngModel",i.filter().ListChannelID),m(5),S("date",i.filter().From),m(2),S("date",i.filter().To),m(4),S("ngModel",i.filter().PageNumber),m(4),S("ngModel",i.filter().PageSize),m(5),T((p==null?null:p.length)>0?33:34),m(2),y("items",i.contextMenuItems)}},dependencies:[he,Te,ke,Le,Me,R,fe,Ce,ge,O,W,Ve,Ae,De,be,_e,Ne,Ie,Pe,ce,ue,de,Ee],encapsulation:2});let a=l;return a})();export{Yt as AwaitingCollectionComponent};
1
+ import{a as Fe,b as Ie}from"./chunk-L76NLJD7.js";import{a as Ee,b as Ve,c as Ae}from"./chunk-ILW6ZFFV.js";import{a as Ne}from"./chunk-DUXKDRDP.js";import{a as j}from"./chunk-6CM22SKR.js";import{a as De}from"./chunk-S7CKRTJV.js";import"./chunk-EYT2YJGK.js";import"./chunk-RNWHARPK.js";import{a as Le}from"./chunk-7JQEF4XX.js";import"./chunk-AFIF6VRM.js";import"./chunk-ZW2TMVZP.js";import"./chunk-ZTHO6JJM.js";import"./chunk-SHUYFOQI.js";import"./chunk-FCEXPGTK.js";import"./chunk-QFSA7CU4.js";import"./chunk-OPXITNRF.js";import"./chunk-HPINZVE4.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import"./chunk-3RK6DDJD.js";import"./chunk-4YCSITNV.js";import"./chunk-WHHW4IZT.js";import"./chunk-N5AE5WMQ.js";import"./chunk-6OJQRHIZ.js";import"./chunk-6KWG6O5L.js";import{a as Pe}from"./chunk-L22SKCLL.js";import"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import{a as Me}from"./chunk-PDCVMSLL.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import"./chunk-BQEBDVGB.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import{a as x}from"./chunk-AGBJEXIM.js";import{b as L,e as z}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{b as d,c as A}from"./chunk-JBEKD57G.js";import{b as Se,d as we,f as ve,g as ye,h as xe,m as ke,n as Te}from"./chunk-EDEZ3JLR.js";import{A as R,b as ge,c as fe,h as O,m as W,o as Ce}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import{v as _e,w as be}from"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{i as ce,j as de,l as ue,m as he}from"./chunk-LNJUGHOX.js";import{$b as k,$c as pe,Bc as te,Cc as ie,Dc as ne,G,Gb as N,Ha as B,Lc as oe,Mc as c,Nc as P,Oc as E,Qc as S,Rc as w,Sc as v,Tc as re,Uc as ae,Vc as F,Z as J,Zc as le,aa as X,bc as T,cc as Z,ec as $,fc as ee,gc as y,hc as o,hd as V,ic as r,id as I,jc as _,jd as se,lb as Y,ma as D,nb as m,od as me,qc as M,ra as C,v as K,vc as b,xa as h,xc as f,ya as g}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import{a as Q,b as q}from"./chunk-66YHNWRR.js";var Oe=(()=>{let l=class l{constructor(){this.http=C(z),this.toastr=C(L)}printTokopediaShippingLabel(e,t=!1){let i={OrderNumber:e,Printed:t};return this.http.post(x.TokopediaPrintShippingLabel,i)}printTiktokShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.TiktokPrintShippingLabel,i)}printShopeeShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.ShopeePrintShippingLabel,i).pipe(K(p=>(p&&(p.Number=e),p)))}printLazadaShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.LazadaPrintShippingLabel,i)}handleShippingLabelResponse(e,t){switch(t){case d.Tokopedia:let u=window.open("about:blank","_blank");u.document.write(e.File),u.document.close();break;case d.Tiktok:e.data!=null?window.open(e.data.doc_url,"_blank"):this.toastr.error("Cannot Print the Shipping Label,The invoice Number is not set to Pickup","Cannot Print");break;case d.Shopee:var i=Uint8Array.from(atob(e.File),s=>s.charCodeAt(0)),p=new Blob([i],{type:"octet/stream"});A.openDownloadFile(p,`${e?.Number}.pdf`);break;case d.Lazada:e?.result?.data!=null?window.open(e?.result?.data?.pdf_url,"_blank"):this.toastr.error(e.message,"Cannot Print");break}}};l.\u0275fac=function(t){return new(t||l)},l.\u0275prov=D({token:l,factory:l.\u0275fac,providedIn:"root"});let a=l;return a})();var We=(()=>{let l=class l{constructor(){this.dialogRef=C(Se),this.tandaiSudahDicetak=!1}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak?1:0)}};l.\u0275fac=function(t){return new(t||l)},l.\u0275cmp=N({type:l,selectors:[["app-print-tokopedia"]],decls:17,vars:1,consts:[[1,"container-fluid"],[1,"text-center","mb-4","fw-bold","mt-6"],[1,"row"],[1,"col-12"],[1,"fs-5"],[1,"d-flex","align-items-center","text-center","justify-content-center","mb-8"],[1,"me-2",3,"ngModelChange","ngModel"],[1,"fs-5","pt-1"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click"]],template:function(t,i){t&1&&(o(0,"div",0)(1,"h2",1),c(2,"Cetak label pesanan"),r(),o(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),c(7,"Kamu akan mencetak label yang berisi detail pesanan"),r(),o(8,"div",5)(9,"mat-checkbox",6),v("ngModelChange",function(u){return w(i.tandaiSudahDicetak,u)||(i.tandaiSudahDicetak=u),u}),r(),o(10,"span",7),c(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),r()()()()(),o(12,"mat-dialog-actions",8)(13,"button",9),b("click",function(){return i.onCancel()}),c(14,"Cancel"),r(),o(15,"button",10),b("click",function(){return i.onPrint()}),c(16,"Cetak Pesanan"),r()()()),t&2&&(m(9),S("ngModel",i.tandaiSudahDicetak))},dependencies:[R,O,W,xe,ye,ve],encapsulation:2});let a=l;return a})();var U=(()=>{let l=class l{constructor(){this.httpService=C(z),this.shippingLabelService=C(Oe),this.toastrService=C(L),this.dialog=C(we)}printShippingLabel(e){switch(e?.MarketType){case d.Shopee:this.shippingLabelService.printShopeeShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Shopee));break;case d.Tiktok:this.shippingLabelService.printTiktokShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Tiktok));break;case d.Tokopedia:this.dialog.open(We).afterClosed().pipe(G(t=>A.IsNotEmpty(t)),X(t=>this.shippingLabelService.printTokopediaShippingLabel(e.Number,t))).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Tokopedia));break;case d.Lazada:this.shippingLabelService.printLazadaShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,d.Lazada));break;case d.Shopify:this.toastrService.error("Shopify not supported","Error Not supported");break}}printMultipleShippingLabel(e){let t=e.map(p=>({OrderNumber:p.Number,ShopID:p.ShopID})),i="";switch(e[0]?.MarketType){case d.Shopee:i=x.ShopeePrintMultipleShippingLabel;break;case d.Tiktok:i=x.TiktokPrintMultipleShippingLabel;break;case d.Lazada:i=x.LazadaPrintMultipleShippingLabel;break}this.httpService.post(i,t).subscribe(p=>{var u=Uint8Array.from(atob(p.File),Re=>Re.charCodeAt(0)),s=new Blob([u],{type:"octet/stream"});A.openDownloadFile(s,`${p?.Name}.pdf`)})}};l.\u0275fac=function(t){return new(t||l)},l.\u0275prov=D({token:l,factory:l.\u0275fac});let a=l;return a})();var Be=["contextMenu"],je=a=>({"td-cell-hover":a});function He(a,l){if(a&1){let n=M();o(0,"button",20),b("click",function(){h(n);let t=f(),i=F(0);return g(t.onDowloadShippingLabel(i))}),_(1,"i",21),o(2,"span"),c(3,"Download Shipping Label"),r()()}}function Ue(a,l){if(a&1){let n=M();o(0,"input",47),v("ngModelChange",function(t){h(n);let i=f().$implicit;return w(i.selected,t)||(i.selected=t),g(t)}),b("ngModelChange",function(){h(n);let t=f(3),i=F(0);return g(t.onSelectOrders(i))}),r()}if(a&2){let n=f().$implicit,e=f(2);S("ngModel",n.selected),y("disabled",e.selectedChannelType()!=null&&e.selectedChannelType()!=n.MarketType)}}function Qe(a,l){if(a&1&&_(0,"variants-dropdown",39),a&2){let n=f().$implicit;y("variants",n==null?null:n.Variants)}}function qe(a,l){if(a&1&&_(0,"variant-with-image",40),a&2){let n=f().$implicit;y("variant",n==null?null:n.Variants[0])}}function Ke(a,l){if(a&1&&(o(0,"span"),c(1),r()),a&2){let n=f().$implicit;m(),E("(",n.LogisticService==null?null:n.LogisticService.Option,")")}}function Ge(a,l){if(a&1){let n=M();o(0,"button",48),b("click",function(){h(n);let t=f().$implicit,i=f(2);return g(i.onPrintShippingLabel(t))}),_(1,"i",49),r()}}function Je(a,l){if(a&1){let n=M();o(0,"tr")(1,"td"),k(2,Ue,1,2,"input",31),r(),o(3,"td")(4,"div",32),_(5,"img",33),V(6,"channelImage"),o(7,"div",34)(8,"div"),c(9),r(),o(10,"small",35)(11,"span"),c(12),r()()()()(),o(13,"td")(14,"div",36)(15,"div"),_(16,"order-link",37),r(),o(17,"small"),c(18),V(19,"date"),r(),_(20,"br"),o(21,"small"),_(22,"i",38),c(23),r()()(),o(24,"td"),k(25,Qe,1,1,"variants-dropdown",39)(26,qe,1,1,"variant-with-image",40),r(),o(27,"td",41),c(28),V(29,"number"),r(),o(30,"td",42),b("mouseenter",function(t){let i=h(n).$implicit,p=f(2);return g(p.onMouseEnter(t,i))}),o(31,"div",43)(32,"div",36)(33,"div",44)(34,"span"),c(35),r(),k(36,Ke,2,1,"span"),r(),o(37,"small"),c(38),r()()()(),o(39,"td",45),k(40,Ge,2,0,"button",46),r()()}if(a&2){let n=l.$implicit,e=f(2);m(2),T((n==null?null:n.MarketType)!=e.channelType.WooCommerce?2:-1),m(3),y("src",I(6,16,n==null?null:n.MarketType),Y)("alt",n==null||n.Variants[0]==null?null:n.Variants[0].Name),m(4),P(n.Outlet),m(3),P(n.ChannelName),m(4),y("order",n),m(2),E(" ",se(19,18,n==null?null:n.Created,"dd/MM/yyyy HH:mm:ss")," "),m(5),E(" ",n.Customer," "),m(),oe(pe(23,je,(n.Variants==null?null:n.Variants.length)>1)),m(),T((n.Variants==null?null:n.Variants.length)>1?25:26),m(3),P(I(29,21,n.Amount)),m(7),P(n.LogisticService!=null&&n.LogisticService.Name?n.LogisticService==null?null:n.LogisticService.Name:"-"),m(),T(n.LogisticService!=null&&n.LogisticService.Option&&(n.LogisticService==null?null:n.LogisticService.Option)!="Default"?36:-1),m(2),E(" ",n.ReferenceNumber?n.ReferenceNumber:"-"," "),m(2),T((n==null?null:n.MarketType)!=e.channelType.WooCommerce?40:-1)}}function Xe(a,l){if(a&1){let n=M();o(0,"div",17)(1,"table",22)(2,"thead",23)(3,"tr",24),_(4,"th",25),o(5,"th",26),c(6,"Outlet"),r(),o(7,"th",26),c(8,"Number"),r(),o(9,"th"),c(10,"Items"),r(),o(11,"th",27),c(12,"Amount"),r(),o(13,"th",28),c(14,"Shipping"),r(),_(15,"th",29),r()(),o(16,"tbody"),$(17,Je,41,25,"tr",null,Z),r()(),o(19,"app-custom-paginator",30),b("next",function(){h(n);let t=f();return g(t.initAwaitingCollection())})("previous",function(){h(n);let t=f();return g(t.initAwaitingCollection())}),r()()}if(a&2){let n=f(),e=F(0);m(17),ee(e),m(2),y("filter",n.filter())("totaldata",e==null?null:e.length)}}function Ye(a,l){a&1&&(o(0,"div",18),_(1,"app-empty-state"),r())}var Yt=(()=>{let l=class l{constructor(){this.printShippingService=C(U),this.orderService=C(j),this.toastr=C(L),this.fulfillmentService=C(Fe),this.channelType=d,this.selectedOrders=B([]),this.selectedChannelType=me(()=>{let e=null;return this.selectedOrders().length>0&&(e=this.selectedOrders()[0].MarketType),e}),this.filter=B({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null}),this.contextMenuItems=[{id:"refresh",label:"Refresh Shipping",icon:"fa-solid fa-arrows-rotate"},{id:"fulfillment",label:"Set Fulfillment",icon:"fa-solid fa-truck"}]}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(t=>q(Q({},t),{From:e})),this.initAwaitingCollection()}initAwaitingCollection(){this.awaitingCollections$=this.orderService.getAwaitingCollectionOrders(this.filter()).pipe(J(1))}onPrintShippingLabel(e){this.printShippingService.printShippingLabel(e)}onSelectOrders(e){let t=e.filter(i=>i.selected);this.selectedOrders.set(t)}onDowloadShippingLabel(e){e=e.map(t=>(t.selected=!1,t)),this.printShippingService.printMultipleShippingLabel(this.selectedOrders()),this.selectedOrders.set([])}onSetFulfillment(e){this.fulfillmentService.setFulfillmentOrder(e).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initAwaitingCollection()})}refreshShippingAndRefNumber(e){this.orderService.refreshShippingCourier(e.ShopID,e.Number).subscribe(()=>{this.toastr.success("Shipping courier and reference number refreshed","Success"),this.initAwaitingCollection()})}onMouseEnter(e,t){(!t.LogisticService?.Name||!t.ReferenceNumber)&&this.contextMenuEl.show(e,t)}onSelectContextItem(e){e.item?.id==="refresh"?this.refreshShippingAndRefNumber(e.data):this.onSetFulfillment(e.data)}};l.\u0275fac=function(t){return new(t||l)},l.\u0275cmp=N({type:l,selectors:[["app-awaiting-collection"]],viewQuery:function(t,i){if(t&1&&te(Be,5),t&2){let p;ie(p=ne())&&(i.contextMenuEl=p.first)}},features:[le([j,U])],decls:37,vars:13,consts:[["contextMenu",""],["headerTitle","Awaiting Collection","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],[1,"btn","btn-outline-secondary","shadow","rounded"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-3"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[3,"onSelectItem","items"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line","me-3"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","150px"],[2,"width","50px"],["rowCountApi","/api/orders/awaitingcollectioncount",3,"next","previous","filter","totaldata"],["type","checkbox",3,"ngModel","disabled"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[1,"fa-solid","fa-user"],[3,"variants"],[3,"variant"],[1,"text-end"],[3,"mouseenter"],[1,"d-flex","align-items-center","gap-6"],[1,"d-flex","align-items-end","gap-2"],[1,"text-end","td-cell-hover"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line"]],template:function(t,i){if(t&1){let p=M();re(0),V(1,"async"),o(2,"mainpanel",1),b("onSubmit",function(){return h(p),g(i.initAwaitingCollection())}),v("textChange",function(s){return h(p),w(i.filter().Number,s)||(i.filter().Number=s),g(s)}),o(3,"actions"),k(4,He,4,0,"button",2),o(5,"a",3),_(6,"i",4),o(7,"span"),c(8,"Order Fulfillment Display"),r()()(),o(9,"filters")(10,"div")(11,"label",5),c(12,"Channel"),r(),o(13,"app-channel-options-v2",6),v("ngModelChange",function(s){return h(p),w(i.filter().ListChannelID,s)||(i.filter().ListChannelID=s),g(s)}),r()(),o(14,"div",7)(15,"label",5),c(16,"From/To"),r(),o(17,"div",8)(18,"datepicker",9),v("dateChange",function(s){return h(p),w(i.filter().From,s)||(i.filter().From=s),g(s)}),r()(),o(19,"div")(20,"datepicker",10),v("dateChange",function(s){return h(p),w(i.filter().To,s)||(i.filter().To=s),g(s)}),r()()(),o(21,"div",7)(22,"label",11),c(23,"Page Number"),r(),o(24,"input",12),v("ngModelChange",function(s){return h(p),w(i.filter().PageNumber,s)||(i.filter().PageNumber=s),g(s)}),r()(),o(25,"div",7)(26,"label",11),c(27,"Page Size"),r(),o(28,"input",13),v("ngModelChange",function(s){return h(p),w(i.filter().PageSize,s)||(i.filter().PageSize=s),g(s)}),r()()(),o(29,"content")(30,"div",14)(31,"div",15)(32,"div",16),k(33,Xe,20,2,"div",17)(34,Ye,2,0,"div",18),r()()()()(),o(35,"app-context-menu",19,0),b("onSelectItem",function(s){return h(p),g(i.onSelectContextItem(s))}),r()}if(t&2){let p=ae(I(1,10,i.awaitingCollections$));m(2),S("text",i.filter().Number),m(2),T(i.selectedOrders().length>0?4:-1),m(9),y("multiple",!0),S("ngModel",i.filter().ListChannelID),m(5),S("date",i.filter().From),m(2),S("date",i.filter().To),m(4),S("ngModel",i.filter().PageNumber),m(4),S("ngModel",i.filter().PageSize),m(5),T((p==null?null:p.length)>0?33:34),m(2),y("items",i.contextMenuItems)}},dependencies:[he,Te,ke,Le,Me,R,fe,Ce,ge,O,W,Ve,Ae,De,be,_e,Ne,Ie,Pe,ce,ue,de,Ee],encapsulation:2});let a=l;return a})();export{Yt as AwaitingCollectionComponent};
@@ -1,4 +1,4 @@
1
- import{a as x}from"./chunk-QXRG5XYP.js";import{a as Xe,b as ye,c as Ye,d as Qe,e as we,f as et,g as Se,h as tt,i as Q,j as ve,k as R}from"./chunk-RXLMJGUY.js";import{a as ot}from"./chunk-AGBJEXIM.js";import{e as oe}from"./chunk-OXWPYJNB.js";import{b as me,c as F}from"./chunk-JBEKD57G.js";import{b as rt}from"./chunk-YTHY4IFS.js";import{a as nt}from"./chunk-ZETUYNFJ.js";import{F as Ze,n as Ge,o as Je}from"./chunk-LNJUGHOX.js";import{Ca as Ve,F as Le,G as Ue,Ha as ne,Hb as q,La as qe,O as he,S as $e,T as He,Va as z,Z as pe,aa as B,ba as fe,c as m,ea as Y,f as Ne,ga as We,ha as Ke,j as Be,k as Me,ma as T,n as Z,na as K,o as re,p as M,pa as P,q as X,qa as g,ra as O,tb as V,ua as ge,v as j,w as Fe,wa as ze,zd as H}from"./chunk-ZYJ6LAJ3.js";import{b as w}from"./chunk-WFMAM73Y.js";import{a as de,i as k}from"./chunk-66YHNWRR.js";var it={production:!0,version:"5.48.5",firebaseConfig:{apiKey:"AIzaSyDnnitFXpM8TglWKNpzu4ChgF98n25Rgvw",authDomain:"auth.dealpos.com",projectId:"devops-signin",storageBucket:"devops-signin.appspot.com",messagingSenderId:"412465165194",appId:"1:412465165194:web:03d806f6b6ab6f8b460e73",measurementId:"G-MNDBRJ5XZD"},news:"https://changelog.dealpos.app/umbraco/delivery/api/v2/content?fetch=children:omni&sort=sortOrder:asc"};var Ct="firebase",Dt="11.10.0";Q(Ct,Dt,"app");var G=new We("ANGULARFIRE2_VERSION");var st=(r,o)=>{let s=o?[o]:tt(),e=[];return s.forEach(t=>{t.container.getProvider(r).instances.forEach(i=>{e.includes(i)||e.push(i)})}),e},ke=(function(r){return r[r.SILENT=0]="SILENT",r[r.WARN=1]="WARN",r[r.VERBOSE=2]="VERBOSE",r})(ke||{}),Lr=H()&&typeof Zone<"u"?ke.WARN:ke.SILENT;var ie=class{zone;delegate;constructor(o,s=Me){this.zone=o,this.delegate=s}now(){return this.delegate.now()}schedule(o,s,e){let t=this.zone,n=function(i){t?t.runGuarded(()=>{o.apply(this,[i])}):o.apply(this,[i])};return this.delegate.schedule(n,s,e)}},Ae=(()=>{class r{outsideAngular;insideAngular;constructor(){let s=O(V);this.outsideAngular=s.runOutsideAngular(()=>new ie(typeof Zone>"u"?void 0:Zone.current)),this.insideAngular=s.run(()=>new ie(typeof Zone>"u"?void 0:Zone.current,Be))}static \u0275fac=function(e){return new(e||r)};static \u0275prov=T({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var xt=new Map,Rt={activated:!1,tokenObservers:[]},_t={initialized:!1,enabled:!1};function _(r){return xt.get(r)||Object.assign({},Rt)}function ut(){return _t}var jt="https://content-firebaseappcheck.googleapis.com/v1";var Ot="exchangeDebugToken",at={OFFSET_DURATION:300*1e3,RETRIAL_MIN_WAIT:30*1e3,RETRIAL_MAX_WAIT:960*1e3},Zr=1440*60*1e3;var Ie=class{constructor(o,s,e,t,n){if(this.operation=o,this.retryPolicy=s,this.getWaitDuration=e,this.lowerBound=t,this.upperBound=n,this.pending=null,this.nextErrorWaitInterval=t,t>n)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(o){return k(this,null,function*(){this.stop();try{this.pending=new ye,this.pending.promise.catch(s=>{}),yield Nt(this.getNextRun(o)),this.pending.resolve(),yield this.pending.promise,this.pending=new ye,this.pending.promise.catch(s=>{}),yield this.operation(),this.pending.resolve(),yield this.pending.promise,this.process(!0).catch(()=>{})}catch(s){this.retryPolicy(s)?this.process(!1).catch(()=>{}):this.stop()}})}getNextRun(o){if(o)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();{let s=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),s}}};function Nt(r){return new Promise(o=>{setTimeout(o,r)})}var Bt={"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.","initial-throttle":"{$httpStatus} error. Attempts allowed again after {$time}",throttled:"Requests throttled due to previous {$httpStatus} error. Attempts allowed again after {$time}"},U=new Qe("appCheck","AppCheck",Bt);function dt(r){if(!_(r).activated)throw U.create("use-before-activation",{appName:r.name})}function ht(e,t){return k(this,arguments,function*({url:r,body:o},s){let n={"Content-Type":"application/json"},i=s.getImmediate({optional:!0});if(i){let h=yield i.getHeartbeatsHeader();h&&(n["X-Firebase-Client"]=h)}let a={method:"POST",body:JSON.stringify(o),headers:n},l;try{l=yield fetch(r,a)}catch(h){throw U.create("fetch-network-error",{originalErrorMessage:h?.message})}if(l.status!==200)throw U.create("fetch-status-error",{httpStatus:l.status});let c;try{c=yield l.json()}catch(h){throw U.create("fetch-parse-error",{originalErrorMessage:h?.message})}let u=c.ttl.match(/^([\d.]+)(s)$/);if(!u||!u[2]||isNaN(Number(u[1])))throw U.create("fetch-parse-error",{originalErrorMessage:`ttl field (timeToLive) is not in standard Protobuf Duration format: ${c.ttl}`});let f=Number(u[1])*1e3,d=Date.now();return{token:c.token,expireTimeMillis:d+f,issuedAtTimeMillis:d}})}function pt(r,o){let{projectId:s,appId:e,apiKey:t}=r.options;return{url:`${jt}/projects/${s}/apps/${e}:${Ot}?key=${t}`,body:{debug_token:o}}}var Mt="firebase-app-check-database",Ft=1,Te="firebase-app-check-store";var se=null;function Lt(){return se||(se=new Promise((r,o)=>{try{let s=indexedDB.open(Mt,Ft);s.onsuccess=e=>{r(e.target.result)},s.onerror=e=>{var t;o(U.create("storage-open",{originalErrorMessage:(t=e.target.error)===null||t===void 0?void 0:t.message}))},s.onupgradeneeded=e=>{let t=e.target.result;switch(e.oldVersion){case 0:t.createObjectStore(Te,{keyPath:"compositeKey"})}}}catch(s){o(U.create("storage-open",{originalErrorMessage:s?.message}))}}),se)}function Ut(r,o){return $t(Ht(r),o)}function $t(r,o){return k(this,null,function*(){let e=(yield Lt()).transaction(Te,"readwrite"),n=e.objectStore(Te).put({compositeKey:r,value:o});return new Promise((i,a)=>{n.onsuccess=l=>{i()},e.onerror=l=>{var c;a(U.create("storage-set",{originalErrorMessage:(c=l.target.error)===null||c===void 0?void 0:c.message}))}})})}function Ht(r){return`${r.options.appId}-${r.name}`}var ee=new et("@firebase/app-check");function be(r,o){return Ye()?Ut(r,o).catch(s=>{ee.warn(`Failed to write token to IndexedDB. Error: ${s}`)}):Promise.resolve()}function ft(){return ut().enabled}function gt(){return k(this,null,function*(){let r=ut();if(r.enabled&&r.token)return r.token.promise;throw Error(`
1
+ import{a as x}from"./chunk-QXRG5XYP.js";import{a as Xe,b as ye,c as Ye,d as Qe,e as we,f as et,g as Se,h as tt,i as Q,j as ve,k as R}from"./chunk-RXLMJGUY.js";import{a as ot}from"./chunk-AGBJEXIM.js";import{e as oe}from"./chunk-OXWPYJNB.js";import{b as me,c as F}from"./chunk-JBEKD57G.js";import{b as rt}from"./chunk-YTHY4IFS.js";import{a as nt}from"./chunk-ZETUYNFJ.js";import{F as Ze,n as Ge,o as Je}from"./chunk-LNJUGHOX.js";import{Ca as Ve,F as Le,G as Ue,Ha as ne,Hb as q,La as qe,O as he,S as $e,T as He,Va as z,Z as pe,aa as B,ba as fe,c as m,ea as Y,f as Ne,ga as We,ha as Ke,j as Be,k as Me,ma as T,n as Z,na as K,o as re,p as M,pa as P,q as X,qa as g,ra as O,tb as V,ua as ge,v as j,w as Fe,wa as ze,zd as H}from"./chunk-ZYJ6LAJ3.js";import{b as w}from"./chunk-WFMAM73Y.js";import{a as de,i as k}from"./chunk-66YHNWRR.js";var it={production:!0,version:"5.48.6",firebaseConfig:{apiKey:"AIzaSyDnnitFXpM8TglWKNpzu4ChgF98n25Rgvw",authDomain:"auth.dealpos.com",projectId:"devops-signin",storageBucket:"devops-signin.appspot.com",messagingSenderId:"412465165194",appId:"1:412465165194:web:03d806f6b6ab6f8b460e73",measurementId:"G-MNDBRJ5XZD"},news:"https://changelog.dealpos.app/umbraco/delivery/api/v2/content?fetch=children:omni&sort=sortOrder:asc"};var Ct="firebase",Dt="11.10.0";Q(Ct,Dt,"app");var G=new We("ANGULARFIRE2_VERSION");var st=(r,o)=>{let s=o?[o]:tt(),e=[];return s.forEach(t=>{t.container.getProvider(r).instances.forEach(i=>{e.includes(i)||e.push(i)})}),e},ke=(function(r){return r[r.SILENT=0]="SILENT",r[r.WARN=1]="WARN",r[r.VERBOSE=2]="VERBOSE",r})(ke||{}),Lr=H()&&typeof Zone<"u"?ke.WARN:ke.SILENT;var ie=class{zone;delegate;constructor(o,s=Me){this.zone=o,this.delegate=s}now(){return this.delegate.now()}schedule(o,s,e){let t=this.zone,n=function(i){t?t.runGuarded(()=>{o.apply(this,[i])}):o.apply(this,[i])};return this.delegate.schedule(n,s,e)}},Ae=(()=>{class r{outsideAngular;insideAngular;constructor(){let s=O(V);this.outsideAngular=s.runOutsideAngular(()=>new ie(typeof Zone>"u"?void 0:Zone.current)),this.insideAngular=s.run(()=>new ie(typeof Zone>"u"?void 0:Zone.current,Be))}static \u0275fac=function(e){return new(e||r)};static \u0275prov=T({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var xt=new Map,Rt={activated:!1,tokenObservers:[]},_t={initialized:!1,enabled:!1};function _(r){return xt.get(r)||Object.assign({},Rt)}function ut(){return _t}var jt="https://content-firebaseappcheck.googleapis.com/v1";var Ot="exchangeDebugToken",at={OFFSET_DURATION:300*1e3,RETRIAL_MIN_WAIT:30*1e3,RETRIAL_MAX_WAIT:960*1e3},Zr=1440*60*1e3;var Ie=class{constructor(o,s,e,t,n){if(this.operation=o,this.retryPolicy=s,this.getWaitDuration=e,this.lowerBound=t,this.upperBound=n,this.pending=null,this.nextErrorWaitInterval=t,t>n)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(o){return k(this,null,function*(){this.stop();try{this.pending=new ye,this.pending.promise.catch(s=>{}),yield Nt(this.getNextRun(o)),this.pending.resolve(),yield this.pending.promise,this.pending=new ye,this.pending.promise.catch(s=>{}),yield this.operation(),this.pending.resolve(),yield this.pending.promise,this.process(!0).catch(()=>{})}catch(s){this.retryPolicy(s)?this.process(!1).catch(()=>{}):this.stop()}})}getNextRun(o){if(o)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();{let s=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),s}}};function Nt(r){return new Promise(o=>{setTimeout(o,r)})}var Bt={"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.","initial-throttle":"{$httpStatus} error. Attempts allowed again after {$time}",throttled:"Requests throttled due to previous {$httpStatus} error. Attempts allowed again after {$time}"},U=new Qe("appCheck","AppCheck",Bt);function dt(r){if(!_(r).activated)throw U.create("use-before-activation",{appName:r.name})}function ht(e,t){return k(this,arguments,function*({url:r,body:o},s){let n={"Content-Type":"application/json"},i=s.getImmediate({optional:!0});if(i){let h=yield i.getHeartbeatsHeader();h&&(n["X-Firebase-Client"]=h)}let a={method:"POST",body:JSON.stringify(o),headers:n},l;try{l=yield fetch(r,a)}catch(h){throw U.create("fetch-network-error",{originalErrorMessage:h?.message})}if(l.status!==200)throw U.create("fetch-status-error",{httpStatus:l.status});let c;try{c=yield l.json()}catch(h){throw U.create("fetch-parse-error",{originalErrorMessage:h?.message})}let u=c.ttl.match(/^([\d.]+)(s)$/);if(!u||!u[2]||isNaN(Number(u[1])))throw U.create("fetch-parse-error",{originalErrorMessage:`ttl field (timeToLive) is not in standard Protobuf Duration format: ${c.ttl}`});let f=Number(u[1])*1e3,d=Date.now();return{token:c.token,expireTimeMillis:d+f,issuedAtTimeMillis:d}})}function pt(r,o){let{projectId:s,appId:e,apiKey:t}=r.options;return{url:`${jt}/projects/${s}/apps/${e}:${Ot}?key=${t}`,body:{debug_token:o}}}var Mt="firebase-app-check-database",Ft=1,Te="firebase-app-check-store";var se=null;function Lt(){return se||(se=new Promise((r,o)=>{try{let s=indexedDB.open(Mt,Ft);s.onsuccess=e=>{r(e.target.result)},s.onerror=e=>{var t;o(U.create("storage-open",{originalErrorMessage:(t=e.target.error)===null||t===void 0?void 0:t.message}))},s.onupgradeneeded=e=>{let t=e.target.result;switch(e.oldVersion){case 0:t.createObjectStore(Te,{keyPath:"compositeKey"})}}}catch(s){o(U.create("storage-open",{originalErrorMessage:s?.message}))}}),se)}function Ut(r,o){return $t(Ht(r),o)}function $t(r,o){return k(this,null,function*(){let e=(yield Lt()).transaction(Te,"readwrite"),n=e.objectStore(Te).put({compositeKey:r,value:o});return new Promise((i,a)=>{n.onsuccess=l=>{i()},e.onerror=l=>{var c;a(U.create("storage-set",{originalErrorMessage:(c=l.target.error)===null||c===void 0?void 0:c.message}))}})})}function Ht(r){return`${r.options.appId}-${r.name}`}var ee=new et("@firebase/app-check");function be(r,o){return Ye()?Ut(r,o).catch(s=>{ee.warn(`Failed to write token to IndexedDB. Error: ${s}`)}):Promise.resolve()}function ft(){return ut().enabled}function gt(){return k(this,null,function*(){let r=ut();if(r.enabled&&r.token)return r.token.promise;throw Error(`
2
2
  Can't get debug token in production mode.
3
3
  `)})}var Wt={error:"UNKNOWN_ERROR"};function Kt(r){return Xe.encodeString(JSON.stringify(r),!1)}function Ce(r,o=!1,s=!1){return k(this,null,function*(){let e=r.app;dt(e);let t=_(e),n=t.token,i;if(n&&!te(n)&&(t.token=void 0,n=void 0),!n){let c=yield t.cachedTokenPromise;c&&(te(c)?n=c:yield be(e,void 0))}if(!o&&n&&te(n))return{token:n.token};let a=!1;if(ft())try{t.exchangeTokenPromise||(t.exchangeTokenPromise=ht(pt(e,yield gt()),r.heartbeatServiceProvider).finally(()=>{t.exchangeTokenPromise=void 0}),a=!0);let c=yield t.exchangeTokenPromise;return yield be(e,c),t.token=c,{token:c.token}}catch(c){return c.code==="appCheck/throttled"||c.code==="appCheck/initial-throttle"?ee.warn(c.message):s&&ee.error(c),Ee(c)}try{t.exchangeTokenPromise||(t.exchangeTokenPromise=t.provider.getToken().finally(()=>{t.exchangeTokenPromise=void 0}),a=!0),n=yield _(e).exchangeTokenPromise}catch(c){c.code==="appCheck/throttled"||c.code==="appCheck/initial-throttle"?ee.warn(c.message):s&&ee.error(c),i=c}let l;return n?i?te(n)?l={token:n.token,internalError:i}:l=Ee(i):(l={token:n.token},t.token=n,yield be(e,n)):l=Ee(i),a&&Gt(e,l),l})}function zt(r){return k(this,null,function*(){let o=r.app;dt(o);let{provider:s}=_(o);if(ft()){let e=yield gt(),{token:t}=yield ht(pt(o,e),r.heartbeatServiceProvider);return{token:t}}else{let{token:e}=yield s.getToken();return{token:e}}})}function Vt(r,o,s,e){let{app:t}=r,n=_(t),i={next:s,error:e,type:o};if(n.tokenObservers=[...n.tokenObservers,i],n.token&&te(n.token)){let a=n.token;Promise.resolve().then(()=>{s({token:a.token}),ct(r)}).catch(()=>{})}n.cachedTokenPromise.then(()=>ct(r))}function mt(r,o){let s=_(r),e=s.tokenObservers.filter(t=>t.next!==o);e.length===0&&s.tokenRefresher&&s.tokenRefresher.isRunning()&&s.tokenRefresher.stop(),s.tokenObservers=e}function ct(r){let{app:o}=r,s=_(o),e=s.tokenRefresher;e||(e=qt(r),s.tokenRefresher=e),!e.isRunning()&&s.isTokenAutoRefreshEnabled&&e.start()}function qt(r){let{app:o}=r;return new Ie(()=>k(null,null,function*(){let s=_(o),e;if(s.token?e=yield Ce(r,!0):e=yield Ce(r),e.error)throw e.error;if(e.internalError)throw e.internalError}),()=>!0,()=>{let s=_(o);if(s.token){let e=s.token.issuedAtTimeMillis+(s.token.expireTimeMillis-s.token.issuedAtTimeMillis)*.5+3e5,t=s.token.expireTimeMillis-300*1e3;return e=Math.min(e,t),Math.max(0,e-Date.now())}else return 0},at.RETRIAL_MIN_WAIT,at.RETRIAL_MAX_WAIT)}function Gt(r,o){let s=_(r).tokenObservers;for(let e of s)try{e.type==="EXTERNAL"&&o.error!=null?e.error(o.error):e.next(o)}catch{}}function te(r){return r.expireTimeMillis-Date.now()>0}function Ee(r){return{token:Kt(Wt),error:r}}var De=class{constructor(o,s){this.app=o,this.heartbeatServiceProvider=s}_delete(){let{tokenObservers:o}=_(this.app);for(let s of o)mt(this.app,s.next);return Promise.resolve()}};function Jt(r,o){return new De(r,o)}function Zt(r){return{getToken:o=>Ce(r,o),getLimitedUseToken:()=>zt(r),addTokenListener:o=>Vt(r,"INTERNAL",o),removeTokenListener:o=>mt(r.app,o)}}var Xt="@firebase/app-check",Yt="0.10.1";var Qt="app-check",lt="app-check-internal";function er(){Se(new we(Qt,r=>{let o=r.getProvider("app").getImmediate(),s=r.getProvider("heartbeat");return Jt(o,s)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((r,o,s)=>{r.getProvider(lt).initialize()})),Se(new we(lt,r=>{let o=r.getProvider("app-check").getImmediate();return Zt(o)},"PUBLIC").setInstantiationMode("EXPLICIT")),Q(Xt,Yt)}er();var tr="app-check";var ae=class{constructor(){return st(tr)}};var rr=["localhost","0.0.0.0","127.0.0.1"],hn=typeof window<"u"&&rr.includes(window.location.hostname);var yt=(()=>{let o=class o{constructor(){}getParseToken(){let e=JSON.parse(window.localStorage.getItem("user"));return this.ParseToken(e.Token.access_token)}GetRoles(){let t=this.getParseToken()["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"];return typeof t=="string"&&(t=[t]),t||[]}ParseToken(e){try{let n=e.split(".")[0].replace("-","+").replace("_","/"),i=JSON.parse(window.atob(n)),l=e.split(".")[1].replace("-","+").replace("_","/"),c=JSON.parse(window.atob(l));return c.header=i,c}catch{return!1}}};o.\u0275fac=function(t){return new(t||o)},o.\u0275prov=T({token:o,factory:o.\u0275fac,providedIn:"root"});let r=o;return r})();var ir="firebase",sr="11.10.0";R.registerVersion(ir,sr,"app-compat");var ar=["ngOnDestroy"],St=(r,o,s,e={})=>new Proxy(r,{get:(t,n)=>s.runOutsideAngular(()=>{if(r[n])return e?.spy?.get&&e.spy.get(n,r[n]),r[n];if(ar.indexOf(n)>-1)return()=>{};let i=o.toPromise().then(a=>{let l=a?.[n];return typeof l=="function"?l.bind(a):l?.then?l.then(c=>s.run(()=>c)):s.run(()=>l)});return new Proxy(()=>{},{get:(a,l)=>i[l],apply:(a,l,c)=>i.then(u=>{let f=u?.(...c);return e?.spy?.apply&&e.spy.apply(n,c,f),f})})})});var ce=class{constructor(o){return o}},le=new P("angularfire2.app.options"),ue=new P("angularfire2.app.name");function Pe(r,o,s){let e=typeof s=="string"&&s||"[DEFAULT]",t=typeof s=="object"&&s||{};t.name=t.name||e;let i=R.apps.filter(a=>a&&a.name===t.name)[0]||o.runOutsideAngular(()=>R.initializeApp(r,t));try{if(JSON.stringify(r)!==JSON.stringify(i.options)){let a=!!module.hot;cr("error",`${i.name} Firebase App already initialized with different options${a?", you may need to reload as Firebase is not HMR aware.":"."}`)}}catch{}return new ce(i)}var cr=(r,...o)=>{H()&&typeof console<"u"&&console[r](...o)},lr={provide:ce,useFactory:Pe,deps:[le,V,[new qe,ue]]},ii=(()=>{class r{static initializeApp(s,e){return{ngModule:r,providers:[{provide:le,useValue:s},{provide:ue,useValue:e}]}}constructor(s){R.registerVersion("angularfire",G.full,"core"),R.registerVersion("angularfire",G.full,"app-compat"),R.registerVersion("angular",Ke.full,s.toString())}static \u0275fac=function(e){return new(e||r)(g(z))};static \u0275mod=q({type:r});static \u0275inj=K({providers:[lr]})}return r})();function vt(r,o,s,e,t){let[,n,i]=globalThis.\u0275AngularfireInstanceCache.find(a=>a[0]===r)||[];if(n)return ur(t,i)||(wt("error",`${o} was already initialized on the ${s} Firebase App with different settings.${dr?" You may need to reload as Firebase is not HMR aware.":""}`),wt("warn",{is:t,was:i})),n;{let a=e();return globalThis.\u0275AngularfireInstanceCache.push([r,a,t]),a}}function ur(r,o){try{return r.toString()===o.toString()}catch{return r===o}}var dr=typeof module<"u"&&!!module.hot,wt=(r,...o)=>{H()&&typeof console<"u"&&console[r](...o)};globalThis.\u0275AngularfireInstanceCache||=[];var hr=new P("angularfire2.auth.use-emulator"),pr=new P("angularfire2.auth.settings"),fr=new P("angularfire2.auth.tenant-id"),gr=new P("angularfire2.auth.langugage-code"),mr=new P("angularfire2.auth.use-device-language"),yr=new P("angularfire.auth.persistence"),wr=(r,o,s,e,t,n,i,a)=>vt(`${r.name}.auth`,"AngularFireAuth",r.name,()=>{let l=o.runOutsideAngular(()=>r.auth());if(s&&l.useEmulator(...s),e&&(l.tenantId=e),l.languageCode=t,n&&l.useDeviceLanguage(),i)for(let[c,u]of Object.entries(i))l.settings[c]=u;return a&&l.setPersistence(a),l},[s,e,t,n,i,a]),xe=(()=>{class r{injector=O(ge);authState;idToken;user;idTokenResult;credential;constructor(s,e,t,n,i,a,l,c,u,f,d,h){let p=new Ne,y=X(void 0).pipe(Z(i.outsideAngular),B(()=>n.runOutsideAngular(()=>import("./chunk-XRLXIT7I.js"))),j(()=>Pe(s,n,e)),j(C=>wr(C,n,a,c,u,f,l,d)),pe({bufferSize:1,refCount:!1}));if(Je(t))this.authState=this.user=this.idToken=this.idTokenResult=this.credential=X(null);else{y.pipe(He()).subscribe();let C=y.pipe(B(I=>I.getRedirectResult().then(N=>N,()=>null)),rt(this.injector),pe({bufferSize:1,refCount:!1})),W=y.pipe(B(I=>new m(N=>({unsubscribe:n.runOutsideAngular(()=>I.onAuthStateChanged($=>N.next($),$=>N.error($),()=>N.complete()))})))),J=y.pipe(B(I=>new m(N=>({unsubscribe:n.runOutsideAngular(()=>I.onIdTokenChanged($=>N.next($),$=>N.error($),()=>N.complete()))}))));this.authState=C.pipe(fe(W),re(i.outsideAngular),Z(i.insideAngular)),this.user=C.pipe(fe(J),re(i.outsideAngular),Z(i.insideAngular)),this.idToken=this.user.pipe(B(I=>I?M(I.getIdToken()):X(null))),this.idTokenResult=this.user.pipe(B(I=>I?M(I.getIdTokenResult()):X(null))),this.credential=Le(C,p,this.authState.pipe(Ue(I=>!I))).pipe(j(I=>I?.user?I:null),re(i.outsideAngular),Z(i.insideAngular))}return St(this,y,n,{spy:{apply:(C,W,J)=>{(C.startsWith("signIn")||C.startsWith("createUser"))&&J.then(I=>p.next(I))}}})}static \u0275fac=function(e){return new(e||r)(g(le),g(ue,8),g(z),g(V),g(Ae),g(hr,8),g(pr,8),g(fr,8),g(gr,8),g(mr,8),g(yr,8),g(ae,8))};static \u0275prov=T({token:r,factory:r.\u0275fac,providedIn:"any"})}return r})(),ki=(()=>{class r{constructor(){R.registerVersion("angularfire",G.full,"auth-compat")}static \u0275fac=function(e){return new(e||r)};static \u0275mod=q({type:r});static \u0275inj=K({providers:[xe]})}return r})();var A=(function(r){return r.readonly="readonly",r.readwrite="readwrite",r})(A||{}),kt=new P(null),At=new P("Indexed DB"),vr=new P("Server Indexed DB");function kr(r,o){return r.objectStoreNames.contains(o)}function D(r,o,s){if(!r){s("You need to use the openDatabase function to create a database before you query it!");return}kr(r,o)||s(`objectStore does not exists: ${o}`)}function b(r,o){let s=r.transaction(o.storeName,o.dbMode);return s.onerror=o.error,s.onabort=o.abort,s}function E(r,o,s,e){return{storeName:o,dbMode:r,error:t=>{s(t)},abort:t=>{s(t)}}}var _e=[];function S(r,o,s,e){return new Promise((t,n)=>{r||n("IndexedDB not available");let i=r.open(o,s),a;i.onsuccess=()=>{a=i.result,_e.push(a),t(a)},i.onerror=()=>{n(`IndexedDB error: ${i.error}`)},typeof e=="function"&&(i.onupgradeneeded=l=>{e(l,a)})})}function Re(r,o,s,e,t){return k(this,null,function*(){return new Promise((n,i)=>{if(!r)return;let a=r.open(o,s);a.onupgradeneeded=l=>k(null,null,function*(){let c=l.target.result,u=e.map(d=>k(null,null,function*(){if(!c.objectStoreNames.contains(d.store)){let h=c.createObjectStore(d.store,d.storeConfig);for(let p of d.storeSchema)h.createIndex(p.name,p.keypath,p.options)}}));yield Promise.all(u);let f=t&&t();if(f){let d=Object.keys(f).map(h=>parseInt(h,10)).filter(h=>h>l.oldVersion).sort((h,p)=>h-p);for(let h of d)f[h](c,a.transaction)}c.close(),n()}),a.onsuccess=l=>{l.target.result.close(),n()},a.onerror=l=>{i(l)}})})}function Ar(r,o,s){if(!r||!o||!s)throw Error('Params: "dbName", "version", "storeName" are mandatory.');return new m(e=>{try{let t=o+1,n=indexedDB.open(r,t);n.onupgradeneeded=i=>{let a=i.target.result;a.deleteObjectStore(s),a.close(),console.log("onupgradeneeded"),e.next(),e.complete()},n.onerror=i=>e.error(i)}catch(t){e.error(t)}})}function br(r){return new Promise((o,s)=>{if(!r){s(new Error("No database to close"));return}try{r.close(),o()}catch(e){s(`Error closing database: ${e}`)}})}function v(){return function(r,o,s){let e=s.value;return s.value=function(...t){let n=e.apply(this,t);return n instanceof m?n.pipe($e(()=>k(this,null,function*(){let i=_e.map(a=>k(this,null,function*(){yield br(a)}));yield Promise.all(i),_e.length=0}))):n},s}}var Oe=(()=>{let o=class o{constructor(e,t){this.dbConfigs=e,this.indexedDB=t,this.defaultDatabaseName=null,Object.values(this.dbConfigs).forEach((n,i,a)=>this.instanciateConfig(n,a.length===1))}instanciateConfig(e,t){return k(this,null,function*(){if(!e.name)throw new Error("NgxIndexedDB: Please, provide the dbName 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||t)&&(this.defaultDatabaseName=e.name,this.selectedDb=e.name),yield Re(this.indexedDB,e.name,e.version,e.objectStoresMeta,e.migrationFactory),S(this.indexedDB,e.name).then(n=>{n.version!==e.version&&(H()&&(console.warn(`
4
4
  Your DB Config doesn't match the most recent version of the DB with name ${e.name}, please update it