marketplacepos 3.2.1 → 3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/Marketplace/3rdpartylicenses.txt +202 -187
  2. package/Marketplace/chunk-2GOE5RBJ.js +1 -0
  3. package/Marketplace/chunk-2QO2D23V.js +1 -0
  4. package/Marketplace/chunk-2XMJ7C47.js +1 -0
  5. package/Marketplace/chunk-2Y47HNW5.js +1 -0
  6. package/Marketplace/chunk-32YQ5ZBK.js +1 -0
  7. package/Marketplace/chunk-353KSOKY.js +1 -0
  8. package/Marketplace/chunk-3MUYDBXT.js +1 -0
  9. package/Marketplace/chunk-55NPYZ64.js +2 -0
  10. package/Marketplace/chunk-5PV4AXUR.js +2 -0
  11. package/Marketplace/chunk-5UESNVF7.js +3 -0
  12. package/Marketplace/chunk-5YX57TZJ.js +1 -0
  13. package/Marketplace/chunk-6FFJWFMY.js +4 -0
  14. package/Marketplace/chunk-7AS2YI3I.js +2 -0
  15. package/Marketplace/chunk-AN4U7FVT.js +1 -0
  16. package/Marketplace/chunk-B6ZV4WVU.js +8 -0
  17. package/Marketplace/chunk-BBX2DZWF.js +1 -0
  18. package/Marketplace/chunk-BLRV33OB.js +4 -0
  19. package/Marketplace/chunk-BTKP3PJH.js +5 -0
  20. package/Marketplace/chunk-CA4NYL7C.js +1 -0
  21. package/Marketplace/chunk-CFL3VDAM.js +1 -0
  22. package/Marketplace/chunk-DE2BZXNA.js +1 -0
  23. package/Marketplace/chunk-DE6KXPBU.js +1 -0
  24. package/Marketplace/chunk-FDGOGKXD.js +1 -0
  25. package/Marketplace/chunk-FDYGWNMG.js +1 -0
  26. package/Marketplace/chunk-FR67IIWG.js +1 -0
  27. package/Marketplace/chunk-G6DYB24N.js +1 -0
  28. package/Marketplace/chunk-GAMNBDJD.js +1 -0
  29. package/Marketplace/chunk-GUKAWOAK.js +1 -0
  30. package/Marketplace/chunk-HDWZXE6G.js +1 -0
  31. package/Marketplace/chunk-HQTUUTDT.js +1 -0
  32. package/Marketplace/chunk-HTODD7RF.js +1 -0
  33. package/Marketplace/chunk-I2FTGSXA.js +1 -0
  34. package/Marketplace/chunk-IFHFFP4S.js +1 -0
  35. package/Marketplace/chunk-IGSHV4S3.js +1 -0
  36. package/Marketplace/chunk-IJ3WNDAP.js +6 -0
  37. package/Marketplace/chunk-J3NU4TSW.js +1 -0
  38. package/Marketplace/chunk-J55273WG.js +7 -0
  39. package/Marketplace/chunk-JI67LAJB.js +1 -0
  40. package/Marketplace/chunk-JJXHYCB6.js +1 -0
  41. package/Marketplace/chunk-JRZ4OAAZ.js +1 -0
  42. package/Marketplace/chunk-JT76ON64.js +1 -0
  43. package/Marketplace/chunk-KKQWPACG.js +1 -0
  44. package/Marketplace/chunk-LICL6LNZ.js +1 -0
  45. package/Marketplace/chunk-LWR5YJ24.js +8 -0
  46. package/Marketplace/chunk-LZR6F2JE.js +1 -0
  47. package/Marketplace/chunk-MB6PCQRT.js +1 -0
  48. package/Marketplace/chunk-MYMGFQII.js +1 -0
  49. package/Marketplace/chunk-NNYMQPRT.js +1 -0
  50. package/Marketplace/chunk-NV3T3OZB.js +5 -0
  51. package/Marketplace/chunk-OGJ6YVG4.js +1 -0
  52. package/Marketplace/chunk-OI7LGMDP.js +1 -0
  53. package/Marketplace/chunk-Q4Y764AE.js +5 -0
  54. package/Marketplace/chunk-QJKKB3RG.js +3 -0
  55. package/Marketplace/chunk-QSO3ASFL.js +1 -0
  56. package/Marketplace/chunk-QV22VQ5Q.js +1 -0
  57. package/Marketplace/chunk-R3VPTXDH.js +1 -0
  58. package/Marketplace/chunk-RHM4GQMX.js +1 -0
  59. package/Marketplace/chunk-RS52HOKA.js +5 -0
  60. package/Marketplace/chunk-S7ANPM6L.js +1 -0
  61. package/Marketplace/chunk-TEEFXPWJ.js +2 -0
  62. package/Marketplace/chunk-TIXJK5ZY.js +1 -0
  63. package/Marketplace/chunk-TZ6CWMER.js +1 -0
  64. package/Marketplace/chunk-UUMW24BF.js +1 -0
  65. package/Marketplace/chunk-VMRMDMBE.js +1 -0
  66. package/Marketplace/chunk-XDPBTCKN.js +1 -0
  67. package/Marketplace/chunk-XQTL4ELH.js +1 -0
  68. package/Marketplace/chunk-YHWXRXON.js +1 -0
  69. package/Marketplace/chunk-YIB32JAF.js +1 -0
  70. package/Marketplace/chunk-YZHBBFDR.js +2 -0
  71. package/Marketplace/index.html +2 -2
  72. package/Marketplace/main-KZQ55EQA.js +1 -0
  73. package/Marketplace/polyfills-OSLX3UYW.js +2 -0
  74. package/Marketplace/scripts-M46NWPTC.js +5 -0
  75. package/Marketplace/styles-LDNPEPLO.css +1 -0
  76. package/package.json +1 -1
  77. package/Marketplace/103.bc1f4c51ca99f04f.js +0 -1
  78. package/Marketplace/168.07ef2936896a9f4f.js +0 -1
  79. package/Marketplace/231.0c7ab993977632a2.js +0 -1
  80. package/Marketplace/257.d1592e885695ba4b.js +0 -1
  81. package/Marketplace/278.e89610409641d910.js +0 -1
  82. package/Marketplace/296.93310f70e5f9d3a9.js +0 -1
  83. package/Marketplace/311.afcc0c4a03ea0076.js +0 -1
  84. package/Marketplace/389.02d8fd64069d0119.js +0 -1
  85. package/Marketplace/394.11ae606578598904.js +0 -1
  86. package/Marketplace/445.cbf341bc0afe3ffc.js +0 -1
  87. package/Marketplace/452.58ce3ef12b9b5a47.js +0 -1
  88. package/Marketplace/476.d08ef7b92327904d.js +0 -1
  89. package/Marketplace/478.a63c640a3e971a16.js +0 -1
  90. package/Marketplace/500.c2e6963e4771761e.js +0 -1
  91. package/Marketplace/527.984c24771dbd0f8e.js +0 -1
  92. package/Marketplace/556.5d624cfb73f161b2.js +0 -1
  93. package/Marketplace/56.0432dfcbb3e04e39.js +0 -1
  94. package/Marketplace/599.8de0c2b4c7af0f9d.js +0 -1
  95. package/Marketplace/609.0e0a820d30efd4d4.js +0 -1
  96. package/Marketplace/617.4db1b737553fe58b.js +0 -1
  97. package/Marketplace/62.4f9a8ca2692bdd97.js +0 -1
  98. package/Marketplace/687.1fb4b2602d2b185a.js +0 -1
  99. package/Marketplace/699.d68a917277dbe11a.js +0 -1
  100. package/Marketplace/700.755c54d915bd281e.js +0 -1
  101. package/Marketplace/726.40535ee28a35e978.js +0 -1
  102. package/Marketplace/806.4037f673990a5242.js +0 -1
  103. package/Marketplace/810.629a800ca97725b7.js +0 -1
  104. package/Marketplace/877.bbdea3b04cc75780.js +0 -1
  105. package/Marketplace/900.b7de175b628a8dbe.js +0 -1
  106. package/Marketplace/967.2b39f548c7f4eb30.js +0 -1
  107. package/Marketplace/common.2cffc11d42ed963f.js +0 -1
  108. package/Marketplace/main.7c0e9137308de113.js +0 -1
  109. package/Marketplace/polyfills.503b3f4bf922d237.js +0 -1
  110. package/Marketplace/runtime.b0602b888a191d78.js +0 -1
  111. package/Marketplace/scripts.0d34bffadb54993a.js +0 -1
  112. package/Marketplace/styles.095460a0131dd2fc.css +0 -19
@@ -0,0 +1 @@
1
+ import{$ as lt,$a as G,E as rt,Ea as a,Fa as C,Ja as L,Ma as O,Na as r,Nb as R,Oa as D,Qa as v,Ta as A,Tb as J,Ya as p,Yb as Y,Za as g,_ as I,_a as M,aa as ct,ab as $,b as nt,ba as f,c as _,ca as w,cb as U,da as P,ea as ut,eb as mt,gb as H,hc as ft,ia as V,ib as u,j as ot,ja as z,ob as T,oc as vt,p as at,qa as ht,qb as b,qc as gt,ra as E,rc as K,tb as q,uc as N,vc as j,wa as dt,xa as Z,xc as Q,za as pt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-LWR5YJ24.js";import{a as d,b as y}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-J3NU4TSW.js";var Tt=["toast-component",""];function xt(s,n){if(s&1){let e=U();p(0,"button",5),H("click",function(){V(e);let i=u();return z(i.remove())}),p(1,"span",6),T(2,"\xD7"),g()()}}function Ot(s,n){if(s&1&&(G(0),T(1),$()),s&2){let e=u(2);a(1),b("[",e.duplicatesCount+1,"]")}}function Dt(s,n){if(s&1&&(p(0,"div"),T(1),A(2,Ot,2,1,"ng-container",4),g()),s&2){let e=u();v(e.options.titleClass),O("aria-label",e.title),a(1),b(" ",e.title," "),a(1),r("ngIf",e.duplicatesCount)}}function At(s,n){if(s&1&&M(0,"div",7),s&2){let e=u();v(e.options.messageClass),r("innerHTML",e.message,Z)}}function Mt(s,n){if(s&1&&(p(0,"div",8),T(1),g()),s&2){let e=u();v(e.options.messageClass),O("aria-label",e.message),a(1),b(" ",e.message," ")}}function Ht(s,n){if(s&1&&(p(0,"div"),M(1,"div",9),g()),s&2){let e=u();a(1),D("width",e.width+"%")}}function Et(s,n){if(s&1){let e=U();p(0,"button",5),H("click",function(){V(e);let i=u();return z(i.remove())}),p(1,"span",6),T(2,"\xD7"),g()()}}function Rt(s,n){if(s&1&&(G(0),T(1),$()),s&2){let e=u(2);a(1),b("[",e.duplicatesCount+1,"]")}}function Nt(s,n){if(s&1&&(p(0,"div"),T(1),A(2,Rt,2,1,"ng-container",4),g()),s&2){let e=u();v(e.options.titleClass),O("aria-label",e.title),a(1),b(" ",e.title," "),a(1),r("ngIf",e.duplicatesCount)}}function jt(s,n){if(s&1&&M(0,"div",7),s&2){let e=u();v(e.options.messageClass),r("innerHTML",e.message,Z)}}function St(s,n){if(s&1&&(p(0,"div",8),T(1),g()),s&2){let e=u();v(e.options.messageClass),O("aria-label",e.message),a(1),b(" ",e.message," ")}}function Bt(s,n){if(s&1&&(p(0,"div"),M(1,"div",9),g()),s&2){let e=u();a(1),D("width",e.width+"%")}}var W=class{_attachedHost;component;viewContainerRef;injector;constructor(n,e){this.component=n,this.injector=e}attach(n,e){return this._attachedHost=n,n.attach(this,e)}detach(){let n=this._attachedHost;if(n)return this._attachedHost=void 0,n.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(n){this._attachedHost=n}},X=class{_attachedPortal;_disposeFn;attach(n,e){return this._attachedPortal=n,this.attachComponentPortal(n,e)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(n){this._disposeFn=n}},tt=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new _;_activate=new _;_manualClose=new _;_resetTimeout=new _;_countDuplicate=new _;constructor(n){this._overlayRef=n}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(n,e){n&&this._resetTimeout.next(),e&&this._countDuplicate.next(++this.duplicatesCount)}},x=class{toastId;config;message;title;toastType;toastRef;_onTap=new _;_onAction=new _;constructor(n,e,t,i,o,h){this.toastId=n,this.config=e,this.message=t,this.title=i,this.toastType=o,this.toastRef=h,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(n){this._onAction.next(n)}onAction(){return this._onAction.asObservable()}},_t={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing"},Ct=new ct("ToastConfig"),et=class extends X{_hostDomElement;_componentFactoryResolver;_appRef;constructor(n,e,t){super(),this._hostDomElement=n,this._componentFactoryResolver=e,this._appRef=t}attachComponentPortal(n,e){let t=this._componentFactoryResolver.resolveComponentFactory(n.component),i;return i=t.create(n.injector),this._appRef.attachView(i.hostView),this.setDisposeFn(()=>{this._appRef.detachView(i.hostView),i.destroy()}),e?this._hostDomElement.insertBefore(this._getComponentRootNode(i),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(i)),i}_getComponentRootNode(n){return n.hostView.rootNodes[0]}},Ft=(()=>{class s{_document=w(J);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let e=this._document.createElement("div");e.classList.add("overlay-container"),e.setAttribute("aria-live","polite"),this._document.body.appendChild(e),this._containerElement=e}static \u0275fac=function(t){return new(t||s)};static \u0275prov=I({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),it=class{_portalHost;constructor(n){this._portalHost=n}attach(n,e=!0){return this._portalHost.attach(n,e)}detach(){return this._portalHost.detach()}},kt=(()=>{class s{_overlayContainer=w(Ft);_componentFactoryResolver=w(pt);_appRef=w(R);_document=w(J);_paneElements=new Map;create(e,t){return this._createOverlayRef(this.getPaneElement(e,t))}getPaneElement(e="",t){return this._paneElements.get(t)||this._paneElements.set(t,{}),this._paneElements.get(t)[e]||(this._paneElements.get(t)[e]=this._createPaneElement(e,t)),this._paneElements.get(t)[e]}_createPaneElement(e,t){let i=this._document.createElement("div");return i.id="toast-container",i.classList.add(e),i.classList.add("toast-container"),t?t.getContainerElement().appendChild(i):this._overlayContainer.getContainerElement().appendChild(i),i}_createPortalHost(e){return new et(e,this._componentFactoryResolver,this._appRef)}_createOverlayRef(e){return new it(this._createPortalHost(e))}static \u0275fac=function(t){return new(t||s)};static \u0275prov=I({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),S=(()=>{class s{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(e,t,i,o,h){this.overlay=t,this._injector=i,this.sanitizer=o,this.ngZone=h,this.toastrConfig=d(d({},e.default),e.config),e.config.iconClasses&&(this.toastrConfig.iconClasses=d(d({},e.default.iconClasses),e.config.iconClasses))}show(e,t,i={},o=""){return this._preBuildNotification(o,e,t,this.applyConfig(i))}success(e,t,i={}){let o=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(o,e,t,this.applyConfig(i))}error(e,t,i={}){let o=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(o,e,t,this.applyConfig(i))}info(e,t,i={}){let o=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(o,e,t,this.applyConfig(i))}warning(e,t,i={}){let o=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(o,e,t,this.applyConfig(i))}clear(e){for(let t of this.toasts)if(e!==void 0){if(t.toastId===e){t.toastRef.manualClose();return}}else t.toastRef.manualClose()}remove(e){let t=this._findToast(e);if(!t||(t.activeToast.toastRef.close(),this.toasts.splice(t.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){let i=this.toasts[this.currentlyActive].toastRef;i.isInactive()||(this.currentlyActive=this.currentlyActive+1,i.activate())}return!0}findDuplicate(e="",t="",i,o){let{includeTitleDuplicates:h}=this.toastrConfig;for(let l of this.toasts){let c=h&&l.title===e;if((!h||c)&&l.message===t)return l.toastRef.onDuplicate(i,o),l}return null}applyConfig(e={}){return d(d({},this.toastrConfig),e)}_findToast(e){for(let t=0;t<this.toasts.length;t++)if(this.toasts[t].toastId===e)return{index:t,activeToast:this.toasts[t]};return null}_preBuildNotification(e,t,i,o){return o.onActivateTick?this.ngZone.run(()=>this._buildNotification(e,t,i,o)):this._buildNotification(e,t,i,o)}_buildNotification(e,t,i,o){if(!o.toastComponent)throw new Error("toastComponent required");let h=this.findDuplicate(i,t,this.toastrConfig.resetTimeoutOnDuplicate&&o.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&i||t)&&this.toastrConfig.preventDuplicates&&h!==null)return h;this.previousToastMessage=t;let l=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(l=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let c=this.overlay.create(o.positionClass,this.overlayContainer);this.index=this.index+1;let B=t;t&&o.enableHtml&&(B=this.sanitizer.sanitize(dt.HTML,t));let m=new tt(c),F=new x(this.index,o,B,i,e,m),bt=[{provide:x,useValue:F}],yt=E.create({providers:bt,parent:this._injector}),It=new W(o.toastComponent,yt),st=c.attach(It,o.newestOnTop);m.componentInstance=st.instance;let k={toastId:this.index,title:i||"",message:t||"",toastRef:m,onShown:m.afterActivate(),onHidden:m.afterClosed(),onTap:F.onTap(),onAction:F.onAction(),portal:st};return l||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{k.toastRef.activate()})),this.toasts.push(k),k}static \u0275fac=function(t){return new(t||s)(f(Ct),f(kt),f(E),f(vt),f(L))};static \u0275prov=I({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),Pt=(()=>{class s{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=-1;toastClasses="";state;get displayStyle(){if(this.state.value==="inactive")return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(e,t,i){this.toastrService=e,this.toastPackage=t,this.ngZone=i,this.message=t.message,this.title=t.title,this.options=t.config,this.originalTimeout=t.config.timeOut,this.toastClasses=`${t.toastType} ${t.config.toastClass}`,this.sub=t.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=t.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=t.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=t.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o}),this.state={value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}}}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state=y(d({},this.state),{value:"active"}),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(this.width===0||this.width===100||!this.options.timeOut)return;let e=new Date().getTime(),t=this.hideTime-e;this.width=t/this.options.timeOut*100,this.options.progressAnimation==="increasing"&&(this.width=100-this.width),this.width<=0&&(this.width=0),this.width>=100&&(this.width=100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state=y(d({},this.state),{value:"active"}),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){this.state.value!=="removed"&&(clearTimeout(this.timeout),this.state=y(d({},this.state),{value:"removed"}),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){this.state.value!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state.value!=="removed"&&this.options.disableTimeOut!=="extendedTimeOut"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width=0)}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state.value==="removed"||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(e,t){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(e),t)):this.timeout=setTimeout(()=>e(),t)}outsideInterval(e,t){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(e),t)):this.intervalId=setInterval(()=>e(),t)}runInsideAngular(e){this.ngZone?this.ngZone.run(()=>e()):e()}static \u0275fac=function(t){return new(t||s)(C(S),C(x),C(L))};static \u0275cmp=P({type:s,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(t,i){t&1&&H("click",function(){return i.tapToast()})("mouseenter",function(){return i.stickAround()})("mouseleave",function(){return i.delayedHideToast()}),t&2&&(mt("@flyInOut",i.state),v(i.toastClasses),D("display",i.displayStyle))},standalone:!0,features:[q],attrs:Tt,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(t,i){t&1&&A(0,xt,3,0,"button",0)(1,Dt,3,5,"div",1)(2,At,1,3,"div",2)(3,Mt,2,4,"div",3)(4,Ht,2,2,"div",4),t&2&&(r("ngIf",i.options.closeButton),a(1),r("ngIf",i.title),a(1),r("ngIf",i.message&&i.options.enableHtml),a(1),r("ngIf",i.message&&!i.options.enableHtml),a(1),r("ngIf",i.options.progressBar))},dependencies:[Y],encapsulation:2,data:{animation:[gt("flyInOut",[j("inactive",N({opacity:0})),j("active",N({opacity:1})),j("removed",N({opacity:0})),Q("inactive => active",K("{{ easeTime }}ms {{ easing }}")),Q("active => removed",K("{{ easeTime }}ms {{ easing }}"))])]}})}return s})(),Vt=y(d({},_t),{toastComponent:Pt}),zt=(s={})=>ht([{provide:Ct,useValue:{default:Vt,config:s}}]),ne=(()=>{class s{static forRoot(e={}){return{ngModule:s,providers:[zt(e)]}}static \u0275fac=function(t){return new(t||s)};static \u0275mod=ut({type:s});static \u0275inj=lt({})}return s})();var Zt=(()=>{class s{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=-1;toastClasses="";get displayStyle(){return this.state==="inactive"?"none":null}state="inactive";timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(e,t,i){this.toastrService=e,this.toastPackage=t,this.appRef=i,this.message=t.message,this.title=t.title,this.options=t.config,this.originalTimeout=t.config.timeOut,this.toastClasses=`${t.toastType} ${t.config.toastClass}`,this.sub=t.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=t.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=t.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=t.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state="active",!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.timeout=setTimeout(()=>{this.remove()},this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))),this.options.onActivateTick&&this.appRef.tick()}updateProgress(){if(this.width===0||this.width===100||!this.options.timeOut)return;let e=new Date().getTime(),t=this.hideTime-e;this.width=t/this.options.timeOut*100,this.options.progressAnimation==="increasing"&&(this.width=100-this.width),this.width<=0&&(this.width=0),this.width>=100&&(this.width=100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state="active",this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=new Date().getTime()+(this.originalTimeout||0),this.width=-1,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){this.state!=="removed"&&(clearTimeout(this.timeout),this.state="removed",this.timeout=setTimeout(()=>this.toastrService.remove(this.toastPackage.toastId)))}tapToast(){this.state!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state!=="removed"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width=0)}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state==="removed"||(this.timeout=setTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}static \u0275fac=function(t){return new(t||s)(C(S),C(x),C(R))};static \u0275cmp=P({type:s,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(t,i){t&1&&H("click",function(){return i.tapToast()})("mouseenter",function(){return i.stickAround()})("mouseleave",function(){return i.delayedHideToast()}),t&2&&(v(i.toastClasses),D("display",i.displayStyle))},standalone:!0,features:[q],attrs:Tt,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(t,i){t&1&&A(0,Et,3,0,"button",0)(1,Nt,3,5,"div",1)(2,jt,1,3,"div",2)(3,St,2,4,"div",3)(4,Bt,2,2,"div",4),t&2&&(r("ngIf",i.options.closeButton),a(1),r("ngIf",i.title),a(1),r("ngIf",i.message&&i.options.enableHtml),a(1),r("ngIf",i.message&&!i.options.enableHtml),a(1),r("ngIf",i.options.progressBar))},dependencies:[Y],encapsulation:2})}return s})(),oe=y(d({},_t),{toastComponent:Zt});var ue=(()=>{let n=class n{constructor(t,i){this.http=t,this.toastr=i}get(t){return this.http.get(t).pipe(rt(i=>{let o=this.errorMessageHandling(i);return this.toastr.error(o.message!=""?o.message:"An unknown error has occured!",o.header),ot}))}post(t,i,o={},h=1e5){return new nt(l=>{this.http.post(t,i,o).pipe(at(h)).subscribe({next:c=>{l.next(c),l.complete()},error:c=>{if(c.status==200)l.next(c.error.text),l.complete();else{if(!this.unauthorizedErrorHandling(c)&&!Array.isArray(c?.error?.Message)){let m=this.errorMessageHandling(c);this.toastr.error(m.message!=""?m.message:"An unknown error has occured!",m.header,{enableHtml:!0})}l.error(c)}}})})}unauthorizedErrorHandling(t){let i=!1;return t.status==401&&(localStorage.getItem("Token")?window.location.href="/A/Unauthorized/Main/Unauthorized":window.location.href="/",i=!0),i}errorMessageHandling(t){let i="API Error",o="Exception Message";return t.error?(i="API Error - "+t.status,t.error.Message&&(t.error.Message.indexOf("Message")!=-1?o=JSON.parse(t.error.Message).Message:o=t.error.Message)):t.message&&(i="API Error - "+t.name,o=t.message),{header:i,message:o}}};n.\u0275fac=function(i){return new(i||n)(f(ft),f(S))},n.\u0275prov=I({token:n,factory:n.\u0275fac,providedIn:"root"});let s=n;return s})();export{x as a,S as b,Pt as c,ne as d,ue as e};
@@ -0,0 +1,4 @@
1
+ import{a as be}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-JT76ON64.js";import{a as Se,b as X,c as _e,d as Ce,e as Y,f as Re,g as Q,h as De,i as M,j as ee,k as p}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-J55273WG.js";import{a as Oe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-DE2BZXNA.js";import{e as Pe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-BBX2DZWF.js";import{c as ye}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-GAMNBDJD.js";import{$ as W,A as Ae,B as ke,Ja as _,Kb as we,Lb as ve,M as Ee,P as q,Pb as J,S as k,T as Z,W as O,_ as S,aa as m,b as L,ba as u,c as fe,ea as H,fc as Ie,g as ge,h as me,k as I,l as y,m as R,n as D,oa as Te,q as P,ta as $}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-LWR5YJ24.js";import{h as T}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-J3NU4TSW.js";var Ze="firebase",Je="10.7.1";M(Ze,Je,"app");var F=new we("ANGULARFIRE2_VERSION");var Xe=(e,r)=>{let n=r?[r]:De(),t=[];return n.forEach(i=>{i.container.getProvider(e).instances.forEach(s=>{t.includes(s)||t.push(s)})}),t},N=class{constructor(){return Xe(Ye)}},Ye="app-check";function te(){}var U=class{zone;delegate;constructor(r,n=me){this.zone=r,this.delegate=n}now(){return this.delegate.now()}schedule(r,n,t){let i=this.zone,o=function(s){i.runGuarded(()=>{r.apply(this,[s])})};return this.delegate.schedule(o,n,t)}},ne=class{zone;task=null;constructor(r){this.zone=r}call(r,n){let t=this.unscheduleTask.bind(this);return this.task=this.zone.run(()=>Zone.current.scheduleMacroTask("firebaseZoneBlock",te,{},te,te)),n.pipe(O({next:t,complete:t,error:t})).subscribe(r).add(t)}unscheduleTask(){setTimeout(()=>{this.task!=null&&this.task.state==="scheduled"&&(this.task.invoke(),this.task=null)},10)}},Me=(()=>{class e{ngZone;outsideAngular;insideAngular;constructor(n){this.ngZone=n,this.outsideAngular=n.runOutsideAngular(()=>new U(Zone.current)),this.insideAngular=n.run(()=>new U(Zone.current,ge)),globalThis.\u0275AngularFireScheduler||=this}static \u0275fac=function(t){return new(t||e)(u(_))};static \u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Qe(){let e=globalThis.\u0275AngularFireScheduler;if(!e)throw new Error(`Either AngularFireModule has not been provided in your AppModule (this can be done manually or implictly using
2
+ provideFirebaseApp) or you're calling an AngularFire method outside of an NgModule (which is not supported).`);return e}function Ne(e){return et(Qe())(e)}function et(e){return function(n){return n=n.lift(new ne(e.ngZone)),n.pipe(y(e.outsideAngular),I(e.insideAngular))}}var nt="firebase",rt="10.7.1";p.registerVersion(nt,rt,"app-compat");var it=["ngOnDestroy"],xe=(e,r,n,t={})=>new Proxy(e,{get:(i,o)=>n.runOutsideAngular(()=>{if(e[o])return t?.spy?.get&&t.spy.get(o,e[o]),e[o];if(it.indexOf(o)>-1)return()=>{};let s=r.toPromise().then(c=>{let a=c?.[o];return typeof a=="function"?a.bind(c):a?.then?a.then(d=>n.run(()=>d)):n.run(()=>a)});return new Proxy(()=>{},{get:(c,a)=>s[a],apply:(c,a,d)=>s.then(g=>{let b=g?.(...d);return t?.spy?.apply&&t.spy.apply(o,d,b),b})})})});var z=class{constructor(r){return r}},B=new m("angularfire2.app.options"),K=new m("angularfire2.app.name");function ie(e,r,n){let t=typeof n=="string"&&n||"[DEFAULT]",i=typeof n=="object"&&n||{};i.name=i.name||t;let s=p.apps.filter(c=>c&&c.name===i.name)[0]||r.runOutsideAngular(()=>p.initializeApp(e,i));try{if(JSON.stringify(e)!==JSON.stringify(s.options)){let c=!!module.hot;ot("error",`${s.name} Firebase App already initialized with different options${c?", you may need to reload as Firebase is not HMR aware.":"."}`)}}catch{}return new z(s)}var ot=(e,...r)=>{J()&&typeof console<"u"&&console[e](...r)},st={provide:z,useFactory:ie,deps:[B,_,[new Te,K]]},an=(()=>{class e{static initializeApp(n,t){return{ngModule:e,providers:[{provide:B,useValue:n},{provide:K,useValue:t}]}}constructor(n){p.registerVersion("angularfire",F.full,"core"),p.registerVersion("angularfire",F.full,"app-compat"),p.registerVersion("angular",ve.full,n.toString())}static \u0275fac=function(t){return new(t||e)(u($))};static \u0275mod=H({type:e});static \u0275inj=W({providers:[st]})}return e})();function je(e,r,n,t,i){let[,o,s]=globalThis.\u0275AngularfireInstanceCache.find(c=>c[0]===e)||[];if(o)return at(i,s)||(Fe("error",`${r} was already initialized on the ${n} Firebase App with different settings.${ct?" You may need to reload as Firebase is not HMR aware.":""}`),Fe("warn",{is:i,was:s})),o;{let c=t();return globalThis.\u0275AngularfireInstanceCache.push([e,c,i]),c}}function at(e,r){try{return e.toString()===r.toString()}catch{return e===r}}var ct=typeof module<"u"&&!!module.hot,Fe=(e,...r)=>{J()&&typeof console<"u"&&console[e](...r)};globalThis.\u0275AngularfireInstanceCache||=[];var ut=new Map,lt={activated:!1,tokenObservers:[]},dt={initialized:!1,enabled:!1};function f(e){return ut.get(e)||Object.assign({},lt)}function Ue(){return dt}var ht="https://content-firebaseappcheck.googleapis.com/v1";var pt="exchangeDebugToken",Le={OFFSET_DURATION:5*60*1e3,RETRIAL_MIN_WAIT:30*1e3,RETRIAL_MAX_WAIT:16*60*1e3},Tn=24*60*60*1e3;var se=class{constructor(r,n,t,i,o){if(this.operation=r,this.retryPolicy=n,this.getWaitDuration=t,this.lowerBound=i,this.upperBound=o,this.pending=null,this.nextErrorWaitInterval=i,i>o)throw new Error("Proactive refresh lower bound greater than upper bound!")}start(){this.nextErrorWaitInterval=this.lowerBound,this.process(!0).catch(()=>{})}stop(){this.pending&&(this.pending.reject("cancelled"),this.pending=null)}isRunning(){return!!this.pending}process(r){return T(this,null,function*(){this.stop();try{this.pending=new X,this.pending.promise.catch(n=>{}),yield ft(this.getNextRun(r)),this.pending.resolve(),yield this.pending.promise,this.pending=new X,this.pending.promise.catch(n=>{}),yield this.operation(),this.pending.resolve(),yield this.pending.promise,this.process(!0).catch(()=>{})}catch(n){this.retryPolicy(n)?this.process(!1).catch(()=>{}):this.stop()}})}getNextRun(r){if(r)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();{let n=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),n}}};function ft(e){return new Promise(r=>{setTimeout(r,e)})}var gt={"already-initialized":"You have already called initializeAppCheck() for FirebaseApp {$appName} with different options. To avoid this error, call initializeAppCheck() with the same options as when it was originally called. This will return the already initialized instance.","use-before-activation":"App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. Call initializeAppCheck() before instantiating other Firebase services.","fetch-network-error":"Fetch failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-parse-error":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status-error":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","recaptcha-error":"ReCAPTCHA error.",throttled:"Requests throttled due to {$httpStatus} error. Attempts allowed again after {$time}"},w=new Ce("appCheck","AppCheck",gt);function ze(e){if(!f(e).activated)throw w.create("use-before-activation",{appName:e.name})}function Be(t,i){return T(this,arguments,function*({url:e,body:r},n){let o={"Content-Type":"application/json"},s=n.getImmediate({optional:!0});if(s){let h=yield s.getHeartbeatsHeader();h&&(o["X-Firebase-Client"]=h)}let c={method:"POST",body:JSON.stringify(r),headers:o},a;try{a=yield fetch(e,c)}catch(h){throw w.create("fetch-network-error",{originalErrorMessage:h?.message})}if(a.status!==200)throw w.create("fetch-status-error",{httpStatus:a.status});let d;try{d=yield a.json()}catch(h){throw w.create("fetch-parse-error",{originalErrorMessage:h?.message})}let g=d.ttl.match(/^([\d.]+)(s)$/);if(!g||!g[2]||isNaN(Number(g[1])))throw w.create("fetch-parse-error",{originalErrorMessage:`ttl field (timeToLive) is not in standard Protobuf Duration format: ${d.ttl}`});let b=Number(g[1])*1e3,j=Date.now();return{token:d.token,expireTimeMillis:j+b,issuedAtTimeMillis:j}})}function Ke(e,r){let{projectId:n,appId:t,apiKey:i}=e.options;return{url:`${ht}/projects/${n}/apps/${t}:${pt}?key=${i}`,body:{debug_token:r}}}var mt="firebase-app-check-database",At=1,ae="firebase-app-check-store";var V=null;function kt(){return V||(V=new Promise((e,r)=>{try{let n=indexedDB.open(mt,At);n.onsuccess=t=>{e(t.target.result)},n.onerror=t=>{var i;r(w.create("storage-open",{originalErrorMessage:(i=t.target.error)===null||i===void 0?void 0:i.message}))},n.onupgradeneeded=t=>{let i=t.target.result;switch(t.oldVersion){case 0:i.createObjectStore(ae,{keyPath:"compositeKey"})}}}catch(n){r(w.create("storage-open",{originalErrorMessage:n?.message}))}}),V)}function Et(e,r){return Tt(wt(e),r)}function Tt(e,r){return T(this,null,function*(){let t=(yield kt()).transaction(ae,"readwrite"),o=t.objectStore(ae).put({compositeKey:e,value:r});return new Promise((s,c)=>{o.onsuccess=a=>{s()},t.onerror=a=>{var d;c(w.create("storage-set",{originalErrorMessage:(d=a.target.error)===null||d===void 0?void 0:d.message}))}})})}function wt(e){return`${e.options.appId}-${e.name}`}var ce=new Re("@firebase/app-check");function oe(e,r){return _e()?Et(e,r).catch(n=>{ce.warn(`Failed to write token to IndexedDB. Error: ${n}`)}):Promise.resolve()}function Ve(){return Ue().enabled}function Ge(){return T(this,null,function*(){let e=Ue();if(e.enabled&&e.token)return e.token.promise;throw Error(`
3
+ Can't get debug token in production mode.
4
+ `)})}var vt={error:"UNKNOWN_ERROR"};function It(e){return Se.encodeString(JSON.stringify(e),!1)}function ue(e,r=!1){return T(this,null,function*(){let n=e.app;ze(n);let t=f(n),i=t.token,o;if(i&&!x(i)&&(t.token=void 0,i=void 0),!i){let a=yield t.cachedTokenPromise;a&&(x(a)?i=a:yield oe(n,void 0))}if(!r&&i&&x(i))return{token:i.token};let s=!1;if(Ve()){t.exchangeTokenPromise||(t.exchangeTokenPromise=Be(Ke(n,yield Ge()),e.heartbeatServiceProvider).finally(()=>{t.exchangeTokenPromise=void 0}),s=!0);let a=yield t.exchangeTokenPromise;return yield oe(n,a),t.token=a,{token:a.token}}try{t.exchangeTokenPromise||(t.exchangeTokenPromise=t.provider.getToken().finally(()=>{t.exchangeTokenPromise=void 0}),s=!0),i=yield f(n).exchangeTokenPromise}catch(a){a.code==="appCheck/throttled"?ce.warn(a.message):ce.error(a),o=a}let c;return i?o?x(i)?c={token:i.token,internalError:o}:c=He(o):(c={token:i.token},t.token=i,yield oe(n,i)):c=He(o),s&&St(n,c),c})}function Pt(e){return T(this,null,function*(){let r=e.app;ze(r);let{provider:n}=f(r);if(Ve()){let t=yield Ge(),{token:i}=yield Be(Ke(r,t),e.heartbeatServiceProvider);return{token:i}}else{let{token:t}=yield n.getToken();return{token:t}}})}function bt(e,r,n,t){let{app:i}=e,o=f(i),s={next:n,error:t,type:r};if(o.tokenObservers=[...o.tokenObservers,s],o.token&&x(o.token)){let c=o.token;Promise.resolve().then(()=>{n({token:c.token}),We(e)}).catch(()=>{})}o.cachedTokenPromise.then(()=>We(e))}function qe(e,r){let n=f(e),t=n.tokenObservers.filter(i=>i.next!==r);t.length===0&&n.tokenRefresher&&n.tokenRefresher.isRunning()&&n.tokenRefresher.stop(),n.tokenObservers=t}function We(e){let{app:r}=e,n=f(r),t=n.tokenRefresher;t||(t=yt(e),n.tokenRefresher=t),!t.isRunning()&&n.isTokenAutoRefreshEnabled&&t.start()}function yt(e){let{app:r}=e;return new se(()=>T(this,null,function*(){let n=f(r),t;if(n.token?t=yield ue(e,!0):t=yield ue(e),t.error)throw t.error;if(t.internalError)throw t.internalError}),()=>!0,()=>{let n=f(r);if(n.token){let t=n.token.issuedAtTimeMillis+(n.token.expireTimeMillis-n.token.issuedAtTimeMillis)*.5+3e5,i=n.token.expireTimeMillis-5*60*1e3;return t=Math.min(t,i),Math.max(0,t-Date.now())}else return 0},Le.RETRIAL_MIN_WAIT,Le.RETRIAL_MAX_WAIT)}function St(e,r){let n=f(e).tokenObservers;for(let t of n)try{t.type==="EXTERNAL"&&r.error!=null?t.error(r.error):t.next(r)}catch{}}function x(e){return e.expireTimeMillis-Date.now()>0}function He(e){return{token:It(vt),error:e}}var le=class{constructor(r,n){this.app=r,this.heartbeatServiceProvider=n}_delete(){let{tokenObservers:r}=f(this.app);for(let n of r)qe(this.app,n.next);return Promise.resolve()}};function _t(e,r){return new le(e,r)}function Ct(e){return{getToken:r=>ue(e,r),getLimitedUseToken:()=>Pt(e),addTokenListener:r=>bt(e,"INTERNAL",r),removeTokenListener:r=>qe(e.app,r)}}var Rt="@firebase/app-check",Dt="0.8.1";var Ot="app-check",$e="app-check-internal";function Mt(){Q(new Y(Ot,e=>{let r=e.getProvider("app").getImmediate(),n=e.getProvider("heartbeat");return _t(r,n)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,r,n)=>{e.getProvider($e).initialize()})),Q(new Y($e,e=>{let r=e.getProvider("app-check").getImmediate();return Ct(r)},"PUBLIC").setInstantiationMode("EXPLICIT")),M(Rt,Dt)}Mt();var Nt=["localhost","0.0.0.0","127.0.0.1"],On=typeof window<"u"&&Nt.includes(window.location.hostname);var xt=new m("angularfire2.auth.use-emulator"),jt=new m("angularfire2.auth.settings"),Lt=new m("angularfire2.auth.tenant-id"),Wt=new m("angularfire2.auth.langugage-code"),Ht=new m("angularfire2.auth.use-device-language"),$t=new m("angularfire.auth.persistence"),Ut=(e,r,n,t,i,o,s,c)=>je(`${e.name}.auth`,"AngularFireAuth",e.name,()=>{let a=r.runOutsideAngular(()=>e.auth());if(n&&a.useEmulator(...n),t&&(a.tenantId=t),a.languageCode=i,o&&a.useDeviceLanguage(),s)for(let[d,g]of Object.entries(s))a.settings[d]=g;return c&&a.setPersistence(c),a},[n,t,i,o,s,c]),de=(()=>{class e{authState;idToken;user;idTokenResult;credential;constructor(n,t,i,o,s,c,a,d,g,b,j,h){let he=new fe,C=D(void 0).pipe(I(s.outsideAngular),k(()=>o.runOutsideAngular(()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-LZR6F2JE.js"))),P(()=>ie(n,o,t)),P(E=>Ut(E,o,c,d,g,b,a,j)),q({bufferSize:1,refCount:!1}));if(Ie(i))this.authState=this.user=this.idToken=this.idTokenResult=this.credential=D(null);else{C.pipe(Ee()).subscribe();let E=C.pipe(k(l=>l.getRedirectResult().then(A=>A,()=>null)),Ne,q({bufferSize:1,refCount:!1})),pe=C.pipe(k(l=>new L(A=>({unsubscribe:o.runOutsideAngular(()=>l.onAuthStateChanged(v=>A.next(v),v=>A.error(v),()=>A.complete()))})))),G=C.pipe(k(l=>new L(A=>({unsubscribe:o.runOutsideAngular(()=>l.onIdTokenChanged(v=>A.next(v),v=>A.error(v),()=>A.complete()))}))));this.authState=E.pipe(Z(pe),y(s.outsideAngular),I(s.insideAngular)),this.user=E.pipe(Z(G),y(s.outsideAngular),I(s.insideAngular)),this.idToken=this.user.pipe(k(l=>l?R(l.getIdToken()):D(null))),this.idTokenResult=this.user.pipe(k(l=>l?R(l.getIdTokenResult()):D(null))),this.credential=Ae(E,he,this.authState.pipe(ke(l=>!l))).pipe(P(l=>l?.user?l:null),y(s.outsideAngular),I(s.insideAngular))}return xe(this,C,o,{spy:{apply:(E,pe,G)=>{(E.startsWith("signIn")||E.startsWith("createUser"))&&G.then(l=>he.next(l))}}})}static \u0275fac=function(t){return new(t||e)(u(B),u(K,8),u($),u(_),u(Me),u(xt,8),u(jt,8),u(Lt,8),u(Wt,8),u(Ht,8),u($t,8),u(N,8))};static \u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"any"})}return e})(),qn=(()=>{class e{constructor(){p.registerVersion("angularfire",F.full,"auth-compat")}static \u0275fac=function(t){return new(t||e)};static \u0275mod=H({type:e});static \u0275inj=W({providers:[de]})}return e})();var xi=(()=>{let r=class r{constructor(t,i,o,s){this.httpService=t,this.tokenDecodeService=i,this.afAuth=o,this.ngxPermission=s}login(t){return this.httpService.post("/api/token/Login",t).pipe(O(i=>{this.setLocalStorage(i,t.Host,t.Username),this.loadPermissions()}))}loginWithGoogle(t,i){t.preventDefault();let o=new ee;return o.setCustomParameters({prompt:"select_account"}),R(this.afAuth.signInWithPopup(o)).pipe(P(s=>s.credential),P(s=>s.idToken),k(s=>this.httpService.post("/api/token/LoginWithSocialProvider",JSON.stringify({IDToken:s,Host:i}))),O(s=>{this.setLocalStorage(s,i,null),this.loadPermissions()}))}setLocalStorage(t,i,o){localStorage.setItem("user",JSON.stringify(t)),localStorage.setItem("Authorization",JSON.stringify({Host:i,username:o})),localStorage.setItem("Intercom",JSON.stringify(t.IntercomWidget))}loadPermissions(){this.ngxPermission.loadPermissions([]);let t=localStorage.getItem("user");if(ye.IsNotEmpty(t)){let i=this.tokenDecodeService.GetRoles();this.ngxPermission.loadPermissions(i)}}logout(){this.clearLocalStorage(),this.ngxPermission.flushPermissions()}isActiveToken(){let t=JSON.parse(window.localStorage.getItem("user")),i=new Date;if(t!=null){let o=new Date(t.Token.expiredAt);return i<o?!0:(this.clearLocalStorage(),!1)}else return!1}getDomain(){if(!this.domain){let t=localStorage.getItem("Authorization");this.domain="https://"+JSON.parse(t).Host}return this.domain}clearLocalStorage(){localStorage.removeItem("Intercom"),localStorage.removeItem("Authorization"),localStorage.removeItem("user")}};r.\u0275fac=function(i){return new(i||r)(u(Pe),u(be),u(de),u(Oe))},r.\u0275prov=S({token:r,factory:r.\u0275fac,providedIn:"root"});let e=r;return e})();export{an as a,qn as b,xi as c};
@@ -0,0 +1,5 @@
1
+ import{a as ee,b as ne,c as ie,d as oe,e as re,f as ae}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-KKQWPACG.js";import{b as te}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-XDPBTCKN.js";import{c as q}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-BLRV33OB.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-JT76ON64.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-J55273WG.js";import{a as Y,b as Z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-OI7LGMDP.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-DE2BZXNA.js";import{e as V}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-BBX2DZWF.js";import{a as J}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-2QO2D23V.js";import{v as Q,w as X}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-YZHBBFDR.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-32YQ5ZBK.js";import{c as W,h as z,k as G,u as K}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-UUMW24BF.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-GAMNBDJD.js";import{$ as N,$a as u,Ea as l,Fa as E,Fc as H,Hc as j,Ia as O,Jc as $,Na as p,Ta as c,Xb as w,Ya as o,Yb as R,Za as a,Zb as P,_ as T,_a as d,ab as f,ba as U,cb as y,da as h,dc as A,ea as k,gb as _,ia as S,ib as g,ja as v,nb as C,ob as m,pb as F,qb as L,sb as B,vb as b,xa as M}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-LWR5YJ24.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-J3NU4TSW.js";var de=e=>[e];function ue(e,t){if(e&1&&(u(0),o(1,"a",9),m(2),a(),f()),e&2){let s=t.$implicit;l(1),p("routerLink",b(2,de,s.url)),l(1),L(" ",s.title,"")}}var pe=(()=>{let t=class t{constructor(){this.tabs=[{Title:"Download By Url",Url:"/menu/products/download/by-url",Description:"Download products information by product URL as a parameter"}],this.moreMenu=[{title:"Sold In Channel",url:"/menu/products/status/sold-in-channel"},{title:"In POS",url:"/menu/products/status/in-pos"},{title:"Not In Channel",url:"/menu/products/status/not-in-channel"},{title:"Duplicate SKU",url:"/menu/products/status/duplicate-sku"}]}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=h({type:t,selectors:[["app-download"]],decls:12,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-block"],[4,"ngFor","ngForOf"],[1,"dropdown-item",3,"routerLink"]],template:function(i,r){i&1&&(o(0,"nav",0)(1,"div",1)(2,"div"),d(3,"nav-tab",2),a()(),o(4,"div")(5,"div",3)(6,"a",4),d(7,"i",5),a(),o(8,"div",6)(9,"div",7),c(10,ue,3,4,"ng-container",8),a()()()()(),d(11,"router-outlet")),i&2&&(l(3),p("Tabs",r.tabs),l(7),p("ngForOf",r.moreMenu))},dependencies:[w,Y,H,j]});let e=t;return e})();var I=(()=>{let t=class t{constructor(n){this.httpService=n}download(n){let i="/api/Product/downloadurl";return this.httpService.post(i,n)}};t.\u0275fac=function(i){return new(i||t)(U(V))},t.\u0275prov=T({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();function ge(e,t){if(e&1&&(o(0,"th"),m(1),a()),e&2){let s=t.$implicit;l(1),F(s.column)}}function _e(e,t){if(e&1&&(u(0),o(1,"td"),d(2,"span",6),a(),f()),e&2){let s=t.$implicit,n=g().$implicit;l(2),p("innerHTML",n[s.prop],M)}}var he=e=>({"background-color":e});function Se(e,t){if(e&1&&(o(0,"tr",5),c(1,_e,3,1,"ng-container",3),a()),e&2){let s=t.$implicit,n=g();p("ngStyle",b(2,he,s.Status>200?"#F4D6D5":"#DEE9C9")),l(1),p("ngForOf",n.configs)}}var se=(()=>{let t=class t{constructor(){this.eventClose=new O}ngOnInit(){}onClose(){this.eventClose.emit()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=h({type:t,selectors:[["app-response-api-list"]],inputs:{configs:"configs",data:"data",status:"status"},outputs:{eventClose:"onClose"},decls:7,vars:2,consts:[[1,"table-responsive"],[1,"table"],[1,"thead-light"],[4,"ngFor","ngForOf"],[3,"ngStyle",4,"ngFor","ngForOf"],[3,"ngStyle"],[3,"innerHTML"]],template:function(i,r){i&1&&(o(0,"div",0)(1,"table",1)(2,"thead",2)(3,"tr"),c(4,ge,2,1,"th",3),a()(),o(5,"tbody"),c(6,Se,2,4,"tr",4),a()()()),i&2&&(l(4),p("ngForOf",r.configs),l(2),p("ngForOf",r.data))},dependencies:[w,P]});let e=t;return e})();function ye(e,t){if(e&1){let s=y();u(0),o(1,"button",23),_("click",function(){S(s);let i=g(),r=C(11);return v(i.onNewStepperState(r))}),d(2,"i",24),m(3," New "),a(),f()}}function Ce(e,t){if(e&1){let s=y();u(0),o(1,"button",23),_("click",function(){S(s),g();let i=C(11);return v(i.previous())}),m(2," Back "),a(),f()}}function be(e,t){if(e&1){let s=y();u(0),o(1,"button",25),_("click",function(){S(s);let i=g(),r=C(11);return v(i.onStepperNext(r))}),m(2," Next "),a(),f()}}function we(e,t){if(e&1){let s=y();u(0),o(1,"button",26),_("click",function(){S(s);let i=g(),r=C(11);return v(i.onSubmit(r))}),m(2,"Download"),a(),f()}if(e&2){let s=g();l(1),p("disabled",!s.urls)}}function xe(e,t){e&1&&m(0,"Instruction")}function Ie(e,t){e&1&&m(0,"Download")}function De(e,t){e&1&&m(0,"Finish")}function Ee(e,t){e&1&&d(0,"i",27)}function Te(e,t){e&1&&d(0,"i",28)}function Ne(e,t){e&1&&d(0,"i",29)}var me=(()=>{let t=class t{constructor(n,i){this.downloadService=n,this.authService=i,this.configs=[{column:"Url",prop:"URL"},{column:"POS",prop:"Name"},{column:"Exception",prop:"Message"}],this.downloadResponses=[],this.stepperState="DOWNLOAD",this.urlPlaceholder=`https://tokopedia.com/tokoriyanadi/kaos-polos-biru
2
+ https://tokopedia.com/tokoriyanadi/Celana-Chinos-Coklat`,this.currentDomain=this.authService.getDomain()}onStepperChange(n){this.stepperState=n.selectedStep.state}onSubmit(n){let i=this.urls.split(/\r?\n/);this.downloadService.download(i).subscribe(r=>{this.downloadResponses=r,this.mappingLinkToProduct(),this.onStepperNext(n)})}mappingLinkToProduct(){this.downloadResponses=this.downloadResponses.map(n=>(n.Name=n?.Name?`<a href="${this.currentDomain}/menu/Products/Catalog/Products/Info?ID=${n.ID}" target="_blank">
3
+ ${n?.Name}
4
+ </a>`:"-",n))}onNewStepperState(n){this.downloadResponses=[],this.urls=null,this.stepperState="DOWNLOAD",n.reset(),this.onStepperNext(n)}onStepperNext(n){n.selected.completed=!0,n.next()}};t.\u0275fac=function(i){return new(i||t)(E(I),E(q))},t.\u0275cmp=h({type:t,selectors:[["app-by-url"]],features:[B([{provide:ee,useValue:{displayDefaultIndicatorType:!1}}])],decls:41,vars:15,consts:[["headerTitle","Tokopedia - Product Download By Url",3,"hideSearchBox","hideSearchDropdown"],[4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],["labelPosition","bottom","linear","",1,"stepper-downloadByUrl",3,"selectedIndex","selectionChange"],["stepper",""],["state","GUIDE",3,"editable","completed"],["matStepLabel",""],[1,"mt-8"],[1,"card","border","w-50"],[1,"card-header","py-6"],[1,"text-primary"],[1,"card-body",2,"padding-left","0px"],[1,"mt-6"],["href","https://seller.tokopedia.com","target","_blank"],["state","DOWNLOAD",3,"editable","completed"],["name","url","cols","30","rows","25",1,"form-control",3,"placeholder","ngModel","ngModelChange"],["state","FINISH"],["status","error",3,"data","configs"],["matStepperIcon","GUIDE"],["matStepperIcon","DOWNLOAD"],["matStepperIcon","FINISH"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-3",3,"click"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white","ms-3",3,"disabled","click"],[1,"fa-solid","fa-info"],[1,"fa-solid","fa-download"],[1,"fa-sharp","fa-solid","fa-flag"]],template:function(i,r){i&1&&(o(0,"mainpanel",0)(1,"actions"),c(2,ye,4,0,"ng-container",1)(3,Ce,3,0,"ng-container",1)(4,be,3,0,"ng-container",1)(5,we,3,1,"ng-container",1),a(),o(6,"content")(7,"div",2)(8,"div",3)(9,"div",4)(10,"mat-stepper",5,6),_("selectionChange",function(D){return r.onStepperChange(D)}),o(12,"mat-step",7),c(13,xe,1,0,"ng-template",8),o(14,"div",9)(15,"div",10)(16,"div",11)(17,"h4",12),m(18,"Note"),a()(),o(19,"div",13)(20,"ol",14)(21,"li"),m(22," Use this form to Download Products from Tokopedia using product URL "),a(),o(23,"li"),m(24," Copy Product URL from "),o(25,"a",15),m(26,"https://seller.tokopedia.com/ "),a(),m(27," and paste in this form "),a(),o(28,"li"),m(29," Use New Line when you want to input several product URLs "),a()()()()()(),o(30,"mat-step",16),c(31,Ie,1,0,"ng-template",8),o(32,"div",9)(33,"textarea",17),_("ngModelChange",function(D){return r.urls=D}),a()()(),o(34,"mat-step",18),c(35,De,1,0,"ng-template",8),o(36,"div",9),d(37,"app-response-api-list",19),a()(),c(38,Ee,1,0,"ng-template",20)(39,Te,1,0,"ng-template",21)(40,Ne,1,0,"ng-template",22),a()()()()()()),i&2&&(p("hideSearchBox",!0)("hideSearchDropdown",!0),l(2),p("ngIf",r.stepperState=="FINISH"),l(1),p("ngIf",r.stepperState=="DOWNLOAD"),l(1),p("ngIf",r.stepperState=="GUIDE"),l(1),p("ngIf",r.stepperState=="DOWNLOAD"),l(5),p("selectedIndex",1),l(2),p("editable",r.stepperState!="FINISH")("completed",!0),l(18),p("editable",r.stepperState!="FINISH")("completed",!1),l(3),p("placeholder",r.urlPlaceholder)("ngModel",r.urls),l(4),p("data",r.downloadResponses)("configs",r.configs))},dependencies:[R,W,z,G,Q,oe,ne,re,ie,se],styles:[`.card-header{background-color:#00000008}mat-stepper.stepper-downloadByUrl>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%}mat-stepper.stepper-downloadByUrl>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container mat-step-header>div.mat-step-label{padding-top:8px}
5
+ `],encapsulation:2});let e=t;return e})();var Ue=[{path:"",component:pe,children:[{path:"by-url",component:me,data:{title:"Download Product By Url"},canActivate:[J]},{pathMatch:"full",path:"",redirectTo:"by-url"}]}],ot=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=k({type:t}),t.\u0275inj=N({providers:[I],imports:[A,K,Z,X,ae,te,$.forChild(Ue)]});let e=t;return e})();export{ot as DownloadModule};
@@ -0,0 +1 @@
1
+ import{a as W}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-Q4Y764AE.js";import{c as z,d as j,e as q,f as G,g as H,h as J,i as K,j as Q,k as U}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-QJKKB3RG.js";import{a as L,c as O}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-RHM4GQMX.js";import{c as N}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-R3VPTXDH.js";import{b as P,g as V,h as x}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-6FFJWFMY.js";import{Q as R,R as F,S as I,T as B}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-32YQ5ZBK.js";import{u as A}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-UUMW24BF.js";import{$a as v,Ea as o,Ia as h,Na as r,Qa as M,Ta as k,Ya as p,Yb as S,Za as m,_a as w,ab as Y,cb as _,da as D,dc as b,gb as c,ia as u,ib as y,ja as f,nb as g,ob as C,sb as E,tb as T}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-LWR5YJ24.js";function Z(l,a){if(l&1){let X=_();v(0),p(1,"mat-date-range-picker-actions")(2,"button",8),C(3,"Cancel"),m(),p(4,"button",9),c("click",function(){u(X);let e=y();return f(e.onSelectDate())}),C(5,"Search"),m()(),Y()}}var $={parse:{dateInput:"DD MMM YYYY"},display:{dateInput:"DD MMM YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}},he=(()=>{let a=class a{constructor(){this.disabled=!1,this.widthClass="w-100",this.showButtonConfirm=!1,this.dateChange=new h}fromDateChange(t){let e=t?.toDate();this.from=e}toDateChange(t){if(t){let e=t.toDate();this.to=e,this.showButtonConfirm||this.emitDateChange()}}onOpenDatepicker(){console.log("open");let t=document.getElementById("dropdown-filter");if(t){var e=new bootstrap.Dropdown(t);e&&(e._config.autoClose="inside")}}onCloseDatepicker(){console.log("close");let t=document.getElementById("dropdown-filter");if(t){var e=new bootstrap.Dropdown(t);e&&(e._config.autoClose="outside")}}emitDateChange(){this.dateChange.emit({from:this.from,to:this.to})}onSelectDate(){this.emitDateChange()}};a.\u0275fac=function(e){return new(e||a)},a.\u0275cmp=D({type:a,selectors:[["app-datepicker-range"]],inputs:{placeholder:"placeholder",displayToggle:"displayToggle",date:"date",disabled:"disabled",minDate:"minDate",widthClass:"widthClass",showButtonConfirm:"showButtonConfirm",from:"from",to:"to"},outputs:{dateChange:"dateChange"},standalone:!0,features:[E([{provide:F,useClass:W,deps:[R]},{provide:I,useValue:$}]),T],decls:8,vars:8,consts:[["appearance","outline",1,"date-range"],["id","dates",3,"min","rangePicker"],["matStartDate","","placeholder","Start date",3,"value","dateChange","click"],["matEndDate","","placeholder","End date",3,"value","dateChange","click"],["matPrefix","",3,"for"],[3,"opened","closed"],["picker",""],[4,"ngIf"],["mat-button","","matDateRangePickerCancel",""],["mat-raised-button","","color","primary","matDateRangePickerApply","",3,"click"]],template:function(e,n){if(e&1){let d=_();p(0,"mat-form-field",0)(1,"mat-date-range-input",1)(2,"input",2),c("dateChange",function(i){return n.fromDateChange(i.value)})("click",function(){u(d);let i=g(6);return f(i.open())}),m(),p(3,"input",3),c("dateChange",function(i){return n.toDateChange(i.value)})("click",function(){u(d);let i=g(6);return f(i.open())}),m()(),w(4,"mat-datepicker-toggle",4),p(5,"mat-date-range-picker",5,6),c("opened",function(){return n.onOpenDatepicker()})("closed",function(){return n.onCloseDatepicker()}),k(7,Z,6,0,"ng-container",7),m()()}if(e&2){let d=g(6);M(n.widthClass),o(1),r("min",n.minDate)("rangePicker",d),o(1),r("value",n.from),o(1),r("value",n.to),o(1),r("for",d),o(3),r("ngIf",n.showButtonConfirm)}},dependencies:[b,S,B,U,z,G,j,q,H,Q,K,J,x,V,P,N,A,O,L],styles:["mat-form-field.date-range.mat-mdc-form-field-type-mat-date-range-input .mat-mdc-form-field-infix{padding-top:12px!important;padding-bottom:12px!important;min-height:45px!important;font-size:14px!important}"]});let l=a;return l})();export{he as a};
@@ -0,0 +1 @@
1
+ import{d as D,e as H,f as B,g as K}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-QV22VQ5Q.js";import{Ea as a,Ia as b,Na as r,Oa as O,Ra as v,Ta as _,Vb as V,Ya as l,Yb as F,Za as c,_a as M,cb as u,da as w,dc as j,gb as f,ia as p,ib as s,ja as g,jb as P,kb as h,ob as C,pb as T,qb as I,tb as S,vb as E,wb as y,xa as k}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-LWR5YJ24.js";var m=function(t){return t.Success="Success",t.Info="Info",t.Warning="Warning",t.Error="Error",t}(m||{});var x=class{constructor(){this.title="New Modal",this.titleExtra="",this.okText="OK",this.cancelText="CANCEL",this.hideFooter=!1,this.hideCancel=!1,this.hideOk=!1,this.hideClose=!1,this.eMoney=!1,this.headerType=m.Success,this.validated=!0,this.customWidth="initial",this.bodyScrollable=!1,this.hideScrollbar=!1,this.disableKeyup=!1,this.showMoreButton=!1,this.noPadding=!1}};function L(t,n){if(t&1){let e=u();l(0,"div",9),f("click",function(){p(e);let i=s();return g(i.onBack.emit())}),l(1,"a",10),M(2,"i",11),c()()}}function W(t,n){if(t&1){let e=u();l(0,"div",12)(1,"a",13),f("click",function(){p(e);let i=s();return g(i.onCancel.emit())}),M(2,"i",14),c()()}}function A(t,n){t&1&&h(0,2,["*ngIf","more"])}function z(t,n){if(t&1){let e=u();l(0,"a",19),f("click",function(){p(e);let i=s(2);return g(i.more=!i.more)}),C(1,"More"),c()}}function q(t,n){if(t&1){let e=u();l(0,"button",20),f("click",function(){p(e);let i=s(2);return g(i.onCancel.emit())}),C(1),c()}if(t&2){let e=s(2);a(1),I(" ",e.config.cancelText?e.config.cancelText:"CANCEL","")}}function G(t,n){if(t&1){let e=u();l(0,"button",21),f("click",function(){p(e);let i=s(2);return g(i.onOk.emit())})("keyup.F2",function(){p(e);let i=s(2);return g(i.onOk.emit())}),c()}if(t&2){let e=s(2);r("disabled",!e.config.validated||!e.dynamicValidated)("innerHTML",e.config.okText?e.config.okText:"OK",k)}}function J(t,n){if(t&1&&(l(0,"mat-dialog-actions",15),_(1,z,2,0,"a",16),h(2,3),_(3,q,2,1,"button",17)(4,G,1,2,"button",18),c()),t&2){let e=s();a(1),r("ngIf",e.config.showMoreButton),a(2),r("ngIf",!e.config.hideCancel),a(1),r("ngIf",!e.config.hideOk)}}var Q=[[["","header",""]],[["","content",""]],[["","more-content",""]],[["","footer",""]]],R=(t,n)=>({bodyScrollable:t,hideScrollbar:n}),U=t=>({"mx-auto":t}),X=(t,n)=>({"show-footer":t,"p-0":n}),Y=["[header]","[content]","[more-content]","[footer]"],gt=(()=>{let n=class n{constructor(){this.dynamicValidated=!0,this.onOk=new b,this.onCancel=new b,this.onClose=new b,this.onBack=new b,this.term="",this.more=!1}ngOnInit(){switch(this.config==null&&(this.config=new x),this.config.headerType){case m.Success:this.background="bg-success";break;case m.Warning:this.background="bg-warning";break;case m.Info:this.background="bg-warning";break;case m.Error:this.background="bg-danger";break;default:this.background="";break}}onKeyup(d){this.config.disableKeyup||(d.code=="F2"&&this.onOk.emit("F2"),(d.code=="Enter"||d.code=="NumpadEnter")&&this.onOk.emit("Enter"))}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=w({type:n,selectors:[["modal-material"]],inputs:{config:"config",dynamicValidated:"dynamicValidated"},outputs:{onOk:"onOk",onCancel:"onCancel",onClose:"onClose",onBack:"onBack"},standalone:!0,features:[S],ngContentSelectors:Y,decls:12,vars:21,consts:[[1,"modal-material","d-flex","align-items-start","flex-column","position-relative","maxHeight",3,"ngClass","keyup"],["mat-dialog-title",""],["class","back-button position-absolute pointer d-print-none",3,"click",4,"ngIf"],[1,"d-flex","flex-row","d-print-none",3,"ngClass"],[1,"fw-normal","text-white"],["class","ps-3",4,"ngIf"],[1,"modal-body","w-100",3,"ngClass"],[4,"ngIf"],["class","w-100 mt-10 py-7 border-top d-flex justify-content-end d-print-none",4,"ngIf"],[1,"back-button","position-absolute","pointer","d-print-none",3,"click"],[1,"btn","back-button"],[1,"fa-solid","fa-arrow-left"],[1,"ps-3"],[1,"btn-light-blue","btn-sm","pointer","close",3,"click"],[1,"fas","fa-times","fa-md","text-primary"],[1,"w-100","mt-10","py-7","border-top","d-flex","justify-content-end","d-print-none"],["class","more clearfix",3,"click",4,"ngIf"],["class","btn btn-light-blue text-primary btn-lg fw-bold mx-3 py-8",3,"click",4,"ngIf"],["style","width: 70px;","class","btn btn-light-blue me-6 text-primary btn-lg fw-bold mx-3 py-8","data-cy","ConfirmOk",3,"disabled","innerHTML","click","keyup.F2",4,"ngIf"],[1,"more","clearfix",3,"click"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3","py-8",3,"click"],["data-cy","ConfirmOk",1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3","py-8",2,"width","70px",3,"disabled","innerHTML","click","keyup.F2"]],template:function(i,o){i&1&&(P(Q),l(0,"div",0),f("keyup",function(N){return o.onKeyup(N)}),l(1,"div",1),_(2,L,3,0,"div",2),l(3,"div",3)(4,"h3",4),C(5),c(),h(6),c(),_(7,W,3,0,"div",5),c(),l(8,"mat-dialog-content",6),h(9,1),_(10,A,1,0,"ng-content",7),c(),_(11,J,5,3,"mat-dialog-actions",8),c()),i&2&&(O("width",o.config.customWidth),r("ngClass",y(13,R,o.config.bodyScrollable,o.config.hideScrollbar)),a(1),v("d-flex w-100 justify-content-between modal-header position-relative ",o.background,""),a(1),r("ngIf",o.config.eMoney),a(1),r("ngClass",E(16,U,o.config.eMoney)),a(2),T(o.config.title),a(2),r("ngIf",!o.config.hideClose),a(1),r("ngClass",y(18,X,!o.config.hideFooter,o.config.noPadding)),a(2),r("ngIf",o.more),a(1),r("ngIf",!o.config.hideFooter))},dependencies:[j,V,F,K,D,B,H],styles:[".mat-dialog-container{padding:0!important;border-radius:4px!important;overflow:visible!important} .mat-dialog-container [mat-dialog-title]{color:#fff;padding:15px;border:none}@media print{ .mat-dialog-container{box-shadow:unset;width:100vw}}@media print{ .cdk-overlay-pane{position:absolute!important;top:-30px;max-width:100vw!important}.modal-body[_ngcontent-%COMP%]{width:100vw!important}}.maxHeight[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{max-height:100%!important}.maxHeight.bodyScrollable[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{max-height:450px!important;overflow-y:auto}body.modal-body[_ngcontent-%COMP%]{height:100%;overflow-y:hidden}mat-dialog-actions[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{padding:15px!important;margin-right:12px}mat-dialog-actions[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{margin-right:auto;margin-top:-1rem;padding-top:.4rem!important;margin-left:1rem}.back-button[_ngcontent-%COMP%]{top:5px;left:0}.close[_ngcontent-%COMP%]{padding:.4rem .5rem}.no-padding[_ngcontent-%COMP%]{padding:0}.modal-material[_ngcontent-%COMP%]{width:40vw}@media (max-width: 992px){.modal-material[_ngcontent-%COMP%]{width:50vw!important}}.modal-header[_ngcontent-%COMP%], .modal-footer[_ngcontent-%COMP%], .modal-footer[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{padding:15px}.modal-dialog[_ngcontent-%COMP%]{max-width:none}.modal-content[_ngcontent-%COMP%]{width:auto;margin:auto;max-width:850px}.maxHeight[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{max-height:400px;overflow:auto}.modal-body[_ngcontent-%COMP%]{padding:1rem}.modal-body[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block}.modal-body[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{margin:0;position:absolute;bottom:-20px}.modal-body[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%], .modal-body[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .modal-body[_ngcontent-%COMP%] input[type=password][_ngcontent-%COMP%]{border:1px solid #c8d3df;padding:5px 7px}.modal-body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:330px;height:90px}"]});let t=n;return t})();export{m as a,x as b,gt as c};
@@ -0,0 +1 @@
1
+ import{$ as K,A as b,E as F,Eb as X,Gc as Z,Ha as q,I as L,Ia as V,K as G,M as y,Q as M,S as j,Sa as Q,W as C,_ as f,aa as E,ba as c,ca as p,d,ea as N,fa as J,ha as Y,m as g,n as h,q as S,s as m,t as I,w as z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-LWR5YJ24.js";import{a as l,b as v}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-J3NU4TSW.js";var A={REMOVE:"remove",SHOW:"show"},ee=(()=>{let t=class t{constructor(){this.strategiesSource=new d({}),this.strategies$=this.strategiesSource.asObservable()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})(),B=new E("USE_CONFIGURATION_STORE"),$=(()=>{let t=class t{constructor(e=!1,i){this.isolate=e,this.configurationStore=i,this.strategiesSource=this.isolate?new d({}):this.configurationStore.strategiesSource,this.strategies$=this.strategiesSource.asObservable(),this.onAuthorisedDefaultStrategy=this.isolate?void 0:this.configurationStore.onAuthorisedDefaultStrategy,this.onUnAuthorisedDefaultStrategy=this.isolate?void 0:this.configurationStore.onUnAuthorisedDefaultStrategy}setDefaultOnAuthorizedStrategy(e){this.isolate?this.onAuthorisedDefaultStrategy=this.getDefinedStrategy(e):(this.configurationStore.onAuthorisedDefaultStrategy=this.getDefinedStrategy(e),this.onAuthorisedDefaultStrategy=this.configurationStore.onAuthorisedDefaultStrategy)}setDefaultOnUnauthorizedStrategy(e){this.isolate?this.onUnAuthorisedDefaultStrategy=this.getDefinedStrategy(e):(this.configurationStore.onUnAuthorisedDefaultStrategy=this.getDefinedStrategy(e),this.onUnAuthorisedDefaultStrategy=this.configurationStore.onUnAuthorisedDefaultStrategy)}addPermissionStrategy(e,i){this.strategiesSource.value[e]=i}getStrategy(e){return this.strategiesSource.value[e]}getAllStrategies(){return this.strategiesSource.value}getDefinedStrategy(e){if(this.strategiesSource.value[e]||this.isPredefinedStrategy(e))return e;throw new Error(`No ' ${e} ' strategy is found please define one`)}isPredefinedStrategy(e){return e===A.SHOW||e===A.REMOVE}};t.\u0275fac=function(i){return new(i||t)(c(B),c(ee))},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})();function u(r){return typeof r=="function"}function k(r){if(Object.prototype.toString.call(r)!=="[object Object]")return!1;{let t=Object.getPrototypeOf(r);return t===null||t===Object.prototype}}function ie(r){return!!r&&typeof r=="string"}function T(r){return typeof r=="boolean"}function te(r){return Object.prototype.toString.call(r)==="[object Promise]"}function O(r){return Array.isArray(r)?r.length>0:!!r}function R(r){return ie(r)?[r]:r}var se=(()=>{let t=class t{constructor(){this.permissionsSource=new d({}),this.permissions$=this.permissionsSource.asObservable()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})(),W=new E("USE_PERMISSIONS_STORE"),x=(()=>{let t=class t{constructor(e=!1,i){this.isolate=e,this.permissionsStore=i,this.permissionsSource=this.isolate?new d({}):this.permissionsStore.permissionsSource,this.permissions$=this.permissionsSource.asObservable()}flushPermissions(){this.permissionsSource.next({})}hasPermission(e){return!e||Array.isArray(e)&&e.length===0?Promise.resolve(!0):(e=R(e),this.hasArrayPermission(e))}loadPermissions(e,i){let s=e.reduce((o,n)=>this.reducePermission(o,n,i),{});this.permissionsSource.next(s)}addPermission(e,i){if(Array.isArray(e)){let s=e.reduce((o,n)=>this.reducePermission(o,n,i),this.permissionsSource.value);this.permissionsSource.next(s)}else{let s=this.reducePermission(this.permissionsSource.value,e,i);this.permissionsSource.next(s)}}removePermission(e){let i=l({},this.permissionsSource.value);delete i[e],this.permissionsSource.next(i)}getPermission(e){return this.permissionsSource.value[e]}getPermissions(){return this.permissionsSource.value}reducePermission(e,i,s){return s&&u(s)?v(l({},e),{[i]:{name:i,validationFunction:s}}):v(l({},e),{[i]:{name:i}})}hasArrayPermission(e){let i=e.map(s=>{if(this.hasPermissionValidationFunction(s)){let o=this.permissionsSource.value[s].validationFunction,n=l({},this.permissionsSource.value);return h(null).pipe(S(()=>o(s,n)),j(a=>T(a)?h(a):a),F(()=>h(!1)))}return h(!!this.permissionsSource.value[s])});return g(i).pipe(I(),y(s=>s!==!1,!1),S(s=>s!==!1)).toPromise().then(s=>s)}hasPermissionValidationFunction(e){return!!this.permissionsSource.value[e]&&!!this.permissionsSource.value[e].validationFunction&&u(this.permissionsSource.value[e].validationFunction)}};t.\u0275fac=function(i){return new(i||t)(c(W),c(se))},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})(),U=class{constructor(){this.rolesSource=new d({}),this.roles$=this.rolesSource.asObservable()}},H=new E("USE_ROLES_STORE"),D=(()=>{let t=class t{constructor(e=!1,i,s){this.isolate=e,this.rolesStore=i,this.permissionsService=s,this.rolesSource=this.isolate?new d({}):this.rolesStore.rolesSource,this.roles$=this.rolesSource.asObservable()}addRole(e,i){let s=v(l({},this.rolesSource.value),{[e]:{name:e,validationFunction:i}});this.rolesSource.next(s)}addRoleWithPermissions(e,i){this.permissionsService.addPermission(i),this.addRole(e,i)}addRoles(e){Object.keys(e).forEach((i,s)=>{this.addRole(i,e[i])})}addRolesWithPermissions(e){Object.keys(e).forEach((i,s)=>{this.addRoleWithPermissions(i,e[i])})}flushRoles(){this.rolesSource.next({})}flushRolesAndPermissions(){this.flushRoles(),this.permissionsService.flushPermissions()}removeRole(e){let i=l({},this.rolesSource.value);delete i[e],this.rolesSource.next(i)}getRoles(){return this.rolesSource.value}getRole(e){return this.rolesSource.value[e]}hasOnlyRoles(e){return!e||Array.isArray(e)&&e.length===0?Promise.resolve(!0):(e=R(e),Promise.all([this.hasRoleKey(e),this.hasRolePermission(this.rolesSource.value,e)]).then(([s,o])=>s||o))}hasRoleKey(e){let i=e.map(s=>{if(!!this.rolesSource.value[s]&&!!this.rolesSource.value[s].validationFunction&&u(this.rolesSource.value[s].validationFunction)&&!te(this.rolesSource.value[s].validationFunction)){let n=this.rolesSource.value[s].validationFunction,a=l({},this.rolesSource.value);return h(null).pipe(S(()=>n(s,a)),j(P=>T(P)?h(P):P),F(()=>h(!1)))}return h(!1)});return g(i).pipe(I(),y(s=>s!==!1,!1),S(s=>s!==!1)).toPromise().then(s=>s)}hasRolePermission(e,i){return g(i).pipe(m(s=>e[s]&&Array.isArray(e[s].validationFunction)?g(e[s].validationFunction).pipe(m(o=>this.permissionsService.hasPermission(o)),G(o=>o===!0)):h(!1)),y(s=>s===!0,!1)).toPromise()}};t.\u0275fac=function(i){return new(i||t)(c(H),c(U),c(x))},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})(),pe=(()=>{let t=class t{constructor(){this.permissionsAuthorized=new V,this.permissionsUnauthorized=new V,this.firstMergeUnusedRun=1,this.permissionsService=p(x),this.configurationService=p($),this.rolesService=p(D),this.viewContainer=p(Q),this.changeDetector=p(q),this.templateRef=p(X)}ngOnInit(){this.viewContainer.clear(),this.initPermissionSubscription=this.validateExceptOnlyPermissions()}ngOnChanges(e){let i=e.ngxPermissionsOnly,s=e.ngxPermissionsExcept;if(i||s){if(i&&i.firstChange||s&&s.firstChange)return;b(this.permissionsService.permissions$,this.rolesService.roles$).pipe(M(this.firstMergeUnusedRun),L(1)).subscribe(()=>{if(O(this.ngxPermissionsExcept)){this.validateExceptAndOnlyPermissions();return}if(O(this.ngxPermissionsOnly)){this.validateOnlyPermissions();return}this.handleAuthorisedPermission(this.getAuthorisedTemplates())})}}ngOnDestroy(){this.initPermissionSubscription&&this.initPermissionSubscription.unsubscribe()}validateExceptOnlyPermissions(){return b(this.permissionsService.permissions$,this.rolesService.roles$).pipe(M(this.firstMergeUnusedRun)).subscribe(()=>{if(O(this.ngxPermissionsExcept)){this.validateExceptAndOnlyPermissions();return}if(O(this.ngxPermissionsOnly)){this.validateOnlyPermissions();return}this.handleAuthorisedPermission(this.getAuthorisedTemplates())})}validateExceptAndOnlyPermissions(){Promise.all([this.permissionsService.hasPermission(this.ngxPermissionsExcept),this.rolesService.hasOnlyRoles(this.ngxPermissionsExcept)]).then(([e,i])=>{if(e||i){this.handleUnauthorisedPermission(this.ngxPermissionsExceptElse||this.ngxPermissionsElse);return}if(this.ngxPermissionsOnly)throw!1;this.handleAuthorisedPermission(this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef)}).catch(()=>{this.ngxPermissionsOnly?this.validateOnlyPermissions():this.handleAuthorisedPermission(this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef)})}validateOnlyPermissions(){Promise.all([this.permissionsService.hasPermission(this.ngxPermissionsOnly),this.rolesService.hasOnlyRoles(this.ngxPermissionsOnly)]).then(([e,i])=>{e||i?this.handleAuthorisedPermission(this.ngxPermissionsOnlyThen||this.ngxPermissionsThen||this.templateRef):this.handleUnauthorisedPermission(this.ngxPermissionsOnlyElse||this.ngxPermissionsElse)}).catch(()=>{this.handleUnauthorisedPermission(this.ngxPermissionsOnlyElse||this.ngxPermissionsElse)})}handleUnauthorisedPermission(e){if(!(T(this.currentAuthorizedState)&&!this.currentAuthorizedState)){if(this.currentAuthorizedState=!1,this.permissionsUnauthorized.emit(),this.getUnAuthorizedStrategyInput()){this.applyStrategyAccordingToStrategyType(this.getUnAuthorizedStrategyInput());return}this.configurationService.onUnAuthorisedDefaultStrategy&&!this.elseBlockDefined()?this.applyStrategy(this.configurationService.onUnAuthorisedDefaultStrategy):this.showTemplateBlockInView(e)}}handleAuthorisedPermission(e){if(!(T(this.currentAuthorizedState)&&this.currentAuthorizedState)){if(this.currentAuthorizedState=!0,this.permissionsAuthorized.emit(),this.getAuthorizedStrategyInput()){this.applyStrategyAccordingToStrategyType(this.getAuthorizedStrategyInput());return}this.configurationService.onAuthorisedDefaultStrategy&&!this.thenBlockDefined()?this.applyStrategy(this.configurationService.onAuthorisedDefaultStrategy):this.showTemplateBlockInView(e)}}applyStrategyAccordingToStrategyType(e){if(ie(e)){this.applyStrategy(e);return}if(u(e)){this.showTemplateBlockInView(this.templateRef),e(this.templateRef);return}}showTemplateBlockInView(e){this.viewContainer.clear(),e&&(this.viewContainer.createEmbeddedView(e),this.changeDetector.markForCheck())}getAuthorisedTemplates(){return this.ngxPermissionsOnlyThen||this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef}elseBlockDefined(){return!!this.ngxPermissionsExceptElse||!!this.ngxPermissionsElse}thenBlockDefined(){return!!this.ngxPermissionsExceptThen||!!this.ngxPermissionsThen}getAuthorizedStrategyInput(){return this.ngxPermissionsOnlyAuthorisedStrategy||this.ngxPermissionsExceptAuthorisedStrategy||this.ngxPermissionsAuthorisedStrategy}getUnAuthorizedStrategyInput(){return this.ngxPermissionsOnlyUnauthorisedStrategy||this.ngxPermissionsExceptUnauthorisedStrategy||this.ngxPermissionsUnauthorisedStrategy}applyStrategy(e){if(e===A.SHOW){this.showTemplateBlockInView(this.templateRef);return}if(e===A.REMOVE){this.viewContainer.clear();return}let i=this.configurationService.getStrategy(e);this.showTemplateBlockInView(this.templateRef),i(this.templateRef)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=J({type:t,selectors:[["","ngxPermissionsOnly",""],["","ngxPermissionsExcept",""]],inputs:{ngxPermissionsOnly:"ngxPermissionsOnly",ngxPermissionsOnlyThen:"ngxPermissionsOnlyThen",ngxPermissionsOnlyElse:"ngxPermissionsOnlyElse",ngxPermissionsExcept:"ngxPermissionsExcept",ngxPermissionsExceptElse:"ngxPermissionsExceptElse",ngxPermissionsExceptThen:"ngxPermissionsExceptThen",ngxPermissionsThen:"ngxPermissionsThen",ngxPermissionsElse:"ngxPermissionsElse",ngxPermissionsOnlyAuthorisedStrategy:"ngxPermissionsOnlyAuthorisedStrategy",ngxPermissionsOnlyUnauthorisedStrategy:"ngxPermissionsOnlyUnauthorisedStrategy",ngxPermissionsExceptUnauthorisedStrategy:"ngxPermissionsExceptUnauthorisedStrategy",ngxPermissionsExceptAuthorisedStrategy:"ngxPermissionsExceptAuthorisedStrategy",ngxPermissionsUnauthorisedStrategy:"ngxPermissionsUnauthorisedStrategy",ngxPermissionsAuthorisedStrategy:"ngxPermissionsAuthorisedStrategy"},outputs:{permissionsAuthorized:"permissionsAuthorized",permissionsUnauthorized:"permissionsUnauthorized"},features:[Y]});let r=t;return r})(),re="default";var _=(()=>{let t=class t{constructor(e,i,s){this.permissionsService=e,this.rolesService=i,this.router=s}canActivate(e,i){return this.hasPermissions(e,i)}canActivateChild(e,i){return this.hasPermissions(e,i)}canLoad(e){return this.hasPermissions(e)}canMatch(e){return this.hasPermissions(e)}hasPermissions(e,i){let s=e&&e.data?e.data.permissions:{},o=this.transformPermission(s,e,i);return this.isParameterAvailable(o.except)?this.passingExceptPermissionsValidation(o,e,i):this.isParameterAvailable(o.only)?this.passingOnlyPermissionsValidation(o,e,i):!0}transformPermission(e,i,s){let o=u(e.only)?e.only(i,s):R(e.only),n=u(e.except)?e.except(i,s):R(e.except),a=e.redirectTo;return{only:o,except:n,redirectTo:a}}isParameterAvailable(e){return!!e&&e.length>0}passingExceptPermissionsValidation(e,i,s){if(e.redirectTo&&(u(e.redirectTo)||k(e.redirectTo)&&!this.isRedirectionWithParameters(e.redirectTo))){let o="";return g(e.except).pipe(m(n=>z([this.permissionsService.hasPermission(n),this.rolesService.hasOnlyRoles(n)]).pipe(C(a=>{a.every(w=>w===!1)||(o=n)}))),y(n=>n.some(a=>a===!0),!1),m(n=>o?(this.handleRedirectOfFailedPermission(e,o,i,s),h(!1)):!n&&e.only?this.onlyRedirectCheck(e,i,s):h(!n))).toPromise()}return Promise.all([this.permissionsService.hasPermission(e.except),this.rolesService.hasOnlyRoles(e.except)]).then(([o,n])=>o||n?(e.redirectTo&&this.redirectToAnotherRoute(e.redirectTo,i,s),!1):e.only?this.checkOnlyPermissions(e,i,s):!0)}redirectToAnotherRoute(e,i,s,o){let n=u(e)?e(o,i,s):e;if(this.isRedirectionWithParameters(n)){n.navigationCommands=this.transformNavigationCommands(n.navigationCommands,i,s),n.navigationExtras=this.transformNavigationExtras(n.navigationExtras,i,s),this.router.navigate(n.navigationCommands,n.navigationExtras);return}Array.isArray(n)?this.router.navigate(n):this.router.navigate([n])}isRedirectionWithParameters(e){return k(e)&&(!!e.navigationCommands||!!e.navigationExtras)}transformNavigationCommands(e,i,s){return u(e)?e(i,s):e}transformNavigationExtras(e,i,s){return u(e)?e(i,s):e}onlyRedirectCheck(e,i,s){let o="";return g(e.only).pipe(m(n=>z([this.permissionsService.hasPermission(n),this.rolesService.hasOnlyRoles(n)]).pipe(C(a=>{a.every(w=>w===!1)&&(o=n)}))),y(n=>u(e.redirectTo)?n.some(a=>a===!0):n.every(a=>a===!1),!1),m(n=>u(e.redirectTo)?n?h(!0):(this.handleRedirectOfFailedPermission(e,o,i,s),h(!1)):(o&&this.handleRedirectOfFailedPermission(e,o,i,s),h(!n)))).toPromise()}handleRedirectOfFailedPermission(e,i,s,o){this.isFailedPermissionPropertyOfRedirectTo(e,i)?this.redirectToAnotherRoute(e.redirectTo[i],s,o,i):u(e.redirectTo)?this.redirectToAnotherRoute(e.redirectTo,s,o,i):this.redirectToAnotherRoute(e.redirectTo[re],s,o,i)}isFailedPermissionPropertyOfRedirectTo(e,i){return!!e.redirectTo&&e.redirectTo[i]}checkOnlyPermissions(e,i,s){let o=l({},e);return Promise.all([this.permissionsService.hasPermission(o.only),this.rolesService.hasOnlyRoles(o.only)]).then(([n,a])=>n||a?!0:(o.redirectTo&&this.redirectToAnotherRoute(o.redirectTo,i,s),!1))}passingOnlyPermissionsValidation(e,i,s){return u(e.redirectTo)||k(e.redirectTo)&&!this.isRedirectionWithParameters(e.redirectTo)?this.onlyRedirectCheck(e,i,s):this.checkOnlyPermissions(e,i,s)}};t.\u0275fac=function(i){return new(i||t)(c(x),c(D),c(Z))},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})();var ye=(()=>{let t=class t{static forRoot(e={}){return{ngModule:t,providers:[se,U,ee,x,_,D,$,{provide:W,useValue:e.permissionsIsolate},{provide:H,useValue:e.rolesIsolate},{provide:B,useValue:e.configurationIsolate}]}}static forChild(e={}){return{ngModule:t,providers:[{provide:W,useValue:e.permissionsIsolate},{provide:H,useValue:e.rolesIsolate},{provide:B,useValue:e.configurationIsolate},$,x,D,_]}}};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=N({type:t}),t.\u0275inj=K({});let r=t;return r})();export{x as a,pe as b,ye as c};
@@ -0,0 +1 @@
1
+ import{a as ht,c as H,d as Qt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-7AS2YI3I.js";import{a as z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-IFHFFP4S.js";import{a as U}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-YIB32JAF.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-353KSOKY.js";import{d as Jt,e as zt,f as Ht,g as Zt,k as qt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-QJKKB3RG.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-OGJ6YVG4.js";import{a as Z,b as _t}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-GUKAWOAK.js";import{a as G}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-JJXHYCB6.js";import{b as Wt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-S7ANPM6L.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-RHM4GQMX.js";import{a as Yt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-MYMGFQII.js";import{a as D}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-QSO3ASFL.js";import{a as V}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-NV3T3OZB.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-CFL3VDAM.js";import{c as j}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-QV22VQ5Q.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-R3VPTXDH.js";import{a as Rt,b as Bt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-OI7LGMDP.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-DE2BZXNA.js";import{b as A,e as R}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-BBX2DZWF.js";import{a as Kt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-IJ3WNDAP.js";import{a as $t,b as jt,c as Gt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-HDWZXE6G.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-G6DYB24N.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-6FFJWFMY.js";import{a as et,c as J,d as Vt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-55NPYZ64.js";import{a as Y}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-2QO2D23V.js";import{t as ut,u as Lt,v as k,w as At}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-YZHBBFDR.js";import{T as Ut}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-32YQ5ZBK.js";import{b as Et,c as X,h as B,k as $,u as kt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-UUMW24BF.js";import{b as tt,c as g}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-GAMNBDJD.js";import{$ as wt,$a as I,$b as st,Ab as F,B as b,Bb as N,Cb as Ot,Ea as c,Ec as pt,Fa as P,Fc as Nt,Hc as mt,Jb as W,Jc as Tt,Na as d,S as K,Ta as S,U as lt,W as yt,Xb as T,Ya as a,Yb as E,Za as l,_a as C,ab as y,ac as Ft,c as bt,cb as x,cc as dt,da as M,dc as Dt,ea as Mt,gb as _,ia as u,ib as p,ja as h,nb as L,ob as m,pb as ct,q as It,qb as v,ub as q,vb as nt,ya as O}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-LWR5YJ24.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-J3NU4TSW.js";var ce=()=>["/menu/products/download/by-url"],Xt=(()=>{let r=class r{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/status/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/status/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/status/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/status/in-pos",Description:"All products which is already available in POS"},{Title:"Multiple Listing",Url:"/menu/products/status/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"},{Title:"Channel Statistic",Url:"/menu/products/status/channel-statistic",Description:"Product statistic from each channel obtained from the last product scan"}]}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=M({type:r,selectors:[["app-status"]],decls:13,vars:3,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-flex"],[1,"dropdown-item",3,"routerLink"]],template:function(e,i){e&1&&(a(0,"nav",0)(1,"div",1)(2,"div"),C(3,"nav-tab",2),l()(),a(4,"div")(5,"div",3)(6,"a",4),C(7,"i",5),l(),a(8,"div",6)(9,"div",7)(10,"a",8),m(11,"Download Product By Url"),l()()()()()(),C(12,"router-outlet")),e&2&&(c(3),d("Tabs",i.productTabs),c(7),d("routerLink",q(2,ce)))},dependencies:[Rt,Nt,mt]});let o=r;return o})();function se(o,r){if(o&1){let n=x();a(0,"button",15),_("click",function(){u(n);let e=p();return h(e.onOpenScanDialog())}),C(1,"i",16),m(2," Scan Channel "),l()}}function de(o,r){if(o&1){let n=x();a(0,"button",17),_("click",function(){u(n);let e=p();return h(e.onScanMultipleProduct())}),C(1,"i",16),m(2),l()}if(o&2){let n=p(),t;c(2),v(" Scan (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function pe(o,r){if(o&1){let n=x();a(0,"button",18),_("click",function(){u(n);let e=p();return h(e.onUploadMultipleProduct())}),C(1,"i",19),m(2),l()}if(o&2){let n=p(),t;c(2),v(" Upload (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function me(o,r){if(o&1){let n=x();a(0,"div",20)(1,"app-product-card",21),_("onUpload",function(){let i=u(n).$implicit,s=p();return h(s.onUploadToMultipleChannel(i))})("onScan",function(){let i=u(n).$implicit,s=p();return h(s.onScanSingleProduct(i))})("onDescEvent",function(){let i=u(n).index,s=p();return h(s.onOpenDialogVariant(i))})("onCheckBoxChange",function(e){let s=u(n).$implicit;return h(s.selected=e)}),l()()}if(o&2){let n=r.$implicit,t=p();c(1),d("productId",n.ID)("title",n==null?null:n.Name)("image",n==null?null:n.ThumbnailUrl)("description",(n==null?null:n.Variants.length)>1?(n==null?null:n.Variants.length)+" Variants":null)("channels",t.productService.getChannelProduct(n))("code",t.getVariantCode(n==null?null:n.Variants))("showCheckBox",(n==null?null:n.Channel.length)<t.channelOptions.length)("scanButton",!0)("uploadButton",n==null?null:n.hasUpload)("imageForZoom",n==null?null:n.ImageUrl)}}function ue(o,r){o&1&&(I(0),a(1,"div",22),C(2,"app-empty-state"),l(),y())}function he(o,r){if(o&1){let n=x();I(0),a(1,"div",23)(2,"div",24)(3,"app-custom-paginator",25),_("next",function(){u(n);let e=p();return h(e.onNextPage())})("previous",function(){u(n);let e=p();return h(e.onPrevPage())}),l()()(),y()}if(o&2){let n=p();c(3),d("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",!0)}}var ee=(()=>{let r=class r{constructor(t,e,i,s){this.http=t,this.toastr=e,this.dialog=i,this.productService=s,this.searchFilter=new z,this.products=[],this.rowCount=0,this.getLoaderPage()}getLoaderPage(){this.productService.LoadInPOS().subscribe(t=>{this.channelOptions=t.Options.Channel,this.Categories=t.Options.Categories,this.searchFilter.PageNumber=t.Filter.PageNumber,this.searchFilter.RowCount=t.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.Category=t.Filter.Category,this.searchFilter.PageSize=100,this.getProducts()})}getProducts(){let t={PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Category:this.searchFilter.Category,From:this.startDate,To:this.endDate};this.http.post("/api/product/GetInPOS",t).subscribe(e=>{this.products=e.Data,this.rowCount=e.Total==null?this.searchFilter.RowCount:e.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=g.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(b(i=>g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAllProduct()})}scanAllProduct(){if(this.searchFilter.ChannelID==null){this.toastr.error("Please Select Channel","Error");return}this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(t=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{this.getLoaderPage();let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(t,e,!this.searchFilter.UpdatedProduct)}})}onOpenDialogVariant(t){this.dialog.open(ht,{data:{title:this.products[t].Name,variants:this.products[t].Variants},width:"800px"})}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products),e=this.productService.filterUnselectedChannel(t,this.channelOptions);this.dialog.open(H,{width:"700px",data:{title:"Upload Multiple Product",channels:e}}).afterClosed().pipe(b(i=>i!=="CANCEL"),K(i=>this.productService.uploadMultipleProduct(t,i))).subscribe({next:i=>{this.getProducts()}})}onUploadToMultipleChannel(t){let e=this.productService.getChannelProduct(t);t.Channel=e;let i=this.productService.filterUnselectedChannel([t],this.channelOptions);this.dialog.open(H,{width:"700px",data:{title:`Upload - ${t.Name}`,channels:i}}).afterClosed().pipe(b(s=>s!=="CANCEL"),K(s=>this.productService.uploadSingleProduct([t],s))).subscribe({next:s=>{this.getProducts()}})}searchProduct(t){this.searchFilter.text=t,this.getProducts()}onNextPage(){this.getProducts()}onPrevPage(){this.getProducts()}onScanMultipleProduct(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=g.GuidEMpty;let e=this.productService.filterChannelByTypeId(this.channelOptions,[tt.Tokopedia,tt.Tiktok]);this.dialog.open(D,{data:{filter:t,channelOptions:e,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(b(s=>g.IsNotEmpty(s))).subscribe(s=>{this.searchFilter.ChannelID=s.ChannelID,this.searchFilter.ScanFull=s.ScanFull,this.searchFilter.UpdatedProduct=s.UpdatedProduct;let f=this.productService.selectedProduct(this.products),w=this.productService.getVariantCodesProducts(f);this.scanSingleProduct(w)})}onScanSingleProduct(t){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=g.GuidEMpty,this.dialog.open(D,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(b(i=>g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;let s=this.productService.getVariantCodesProduct(t);this.scanSingleProduct(s)})}scanSingleProduct(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:e=>{if(e)this.toastr.success("Successfully Scan ","Success");else{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${i?.Name} `,"Error")}this.searchFilter.ChannelID=g.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=g.GuidEMpty}})}getVariantCode(t){let e;return t.length>1&&(e=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(e=t[0].Code),e}};r.\u0275fac=function(e){return new(e||r)(P(R),P(A),P(j),P(V))},r.\u0275cmp=M({type:r,selectors:[["app-in-pos"]],decls:26,vars:13,consts:[["description","All products which is already available in POS",3,"headerTitle","onSubmit"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-2",3,"click",4,"ngIf"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","name","Name","bindValue","Name","placeholder","Select Category",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModel","ngModelChange","click"],["matEndDate","","placeholder","End date",3,"ngModel","ngModelChange","click"],["picker",""],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","onUpload","onScan","onDescEvent","onCheckBoxChange"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"filter","totaldata","paginationTotal","hasClicked","next","previous"]],template:function(e,i){if(e&1){let s=x();a(0,"mainpanel",0),_("onSubmit",function(w){return i.searchProduct(w)}),a(1,"actions"),S(2,se,3,0,"button",1)(3,de,3,1,"button",2)(4,pe,3,1,"button",3),l(),a(5,"filters")(6,"div",4)(7,"div",5)(8,"div")(9,"h6"),m(10,"Category "),l(),a(11,"ng-select",6),_("ngModelChange",function(w){return i.searchFilter.Category=w}),l()(),a(12,"div")(13,"h6"),m(14,"Release"),l(),a(15,"mat-date-range-input",7)(16,"input",8),_("ngModelChange",function(w){return i.startDate=w})("click",function(){u(s);let w=L(19);return h(w.open())}),l(),a(17,"input",9),_("ngModelChange",function(w){return i.endDate=w})("click",function(){u(s);let w=L(19);return h(w.open())}),l()(),C(18,"mat-date-range-picker",null,10),l()()()(),a(20,"content")(21,"div",11)(22,"div",12),S(23,me,2,10,"div",13)(24,ue,3,0,"ng-container",14),l(),S(25,he,4,4,"ng-container",14),l()()()}if(e&2){let s=L(19);d("headerTitle","In POS ("+i.rowCount+")"),c(2),d("ngIf",!i.productService.hasSelection(i.products)),c(1),d("ngIf",i.productService.hasSelection(i.products)),c(1),d("ngIf",i.productService.hasSelection(i.products)),c(7),d("clearable",!0)("items",i.Categories)("ngModel",i.searchFilter.Category),c(4),d("rangePicker",s),c(1),d("ngModel",i.startDate),c(1),d("ngModel",i.endDate),c(6),d("ngForOf",i.products),c(1),d("ngIf",i.products.length==0),c(1),d("ngIf",i.products.length>0)}},dependencies:[T,E,X,B,$,k,J,G,Z,U,Ht,Jt,zt,Zt],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.img-logo[_ngcontent-%COMP%]{height:24px;width:24px}"]});let o=r;return o})();function _e(o,r){if(o&1){let n=x();a(0,"button",13),_("click",function(){u(n);let e=p();return h(e.onOpenScanDialog())}),C(1,"i",14),m(2," Scan Channel "),l()}}function ge(o,r){if(o&1){let n=x();a(0,"button",15),_("click",function(){u(n);let e=p();return h(e.onScanMultipleProduct())}),C(1,"i",14),m(2),l()}if(o&2){let n=p();c(2),v(" Scan (",n.productService.selectedProduct(n.products).length,") ")}}function Ce(o,r){if(o&1){let n=x();a(0,"button",16),_("click",function(){u(n);let e=p();return h(e.onUploadMultipleProduct())}),C(1,"i",17),m(2),l()}if(o&2){let n=p();c(2),v(" Upload (",n.productService.selectedProduct(n.products).length,") ")}}function fe(o,r){if(o&1&&(a(0,"span",18),C(1,"img",19),l(),m(2)),o&2){let n=r.item,t=p();c(1),d("src",t.getChannelLogo(n.TypeID),O),c(1),v(" ",n.Name," ")}}function Se(o,r){if(o&1){let n=x();a(0,"div")(1,"h6"),m(2,"Item ID"),l(),a(3,"input",20),_("ngModelChange",function(e){u(n);let i=p();return h(i.searchFilter.Item_id=e)}),l()()}if(o&2){let n=p();c(3),d("ngModel",n.searchFilter.Item_id)}}function xe(o,r){if(o&1){let n=x();a(0,"div",21)(1,"app-product-card",22),_("onUpload",function(){let i=u(n).$implicit,s=p();return h(s.onUploadToMultipleChannel(i))})("onDescEvent",function(){let i=u(n).index,s=p();return h(s.onOpenVariantDetail(i))})("onScan",function(){let i=u(n).$implicit,s=p();return h(s.onScanSingleProduct(i))})("onCheckBoxChange",function(e){let s=u(n).$implicit;return h(s.selected=e)}),l()()}if(o&2){let n=r.$implicit,t=p();c(1),d("productId",n==null?null:n.ID)("title",n==null?null:n.Name)("image",n==null?null:n.ThumbnailUrl)("description",(n==null||n.Variants==null?null:n.Variants.length)>1?(n==null||n.Variants==null?null:n.Variants.length)+" Variants":null)("channels",t.productService.getChannelProduct(n))("code",t.getVariantCode(n==null?null:n.Variants))("showCheckBox",n==null?null:n.hasScan)("scanButton",!0)("uploadButton",n==null?null:n.hasUpload)("imageForZoom",n==null?null:n.ImageUrl)}}function Pe(o,r){o&1&&(I(0),a(1,"div",23),C(2,"app-empty-state"),l(),y())}function ve(o,r){if(o&1){let n=x();a(0,"div",24)(1,"div",25)(2,"app-custom-paginator",26),_("total",function(){u(n);let e=p();return h(e.getRowCount())})("next",function(){u(n);let e=p();return h(e.onNextPage())})("previous",function(){u(n);let e=p();return h(e.onPreviousPage())}),l()()()}if(o&2){let n=p();c(2),d("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var ne=(()=>{let r=class r{constructor(t,e,i,s,f){this.http=t,this.dialog=e,this.toastr=i,this.productService=s,this.activateRouter=f,this.searchFilter=new z,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=g.GuidEMpty}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(g.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(e=>{this.channelOptions=e.Options.Channel,this.searchFilter=e.Filter,e.Filter.ChannelID!=g.GuidEMpty&&(this.searchFilter.ListChannelID=[],this.searchFilter.ListChannelID.push(e.Filter.ChannelID)),this.searchFilter.PageSize=e.Filter.RowCount,this.searchFilter.Item_id="",this.getProducts()})}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Item_id:this.searchFilter.Item_id};this.productService.findAllSoldInChannel(t).subscribe(e=>{this.products=e.Data,this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions),this.products=this.productService.checkProductHasScanButton(this.products,this.channelOptions)})}searchProduct(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onOpenVariantDetail(t){let e=this.products[t].Variants;this.dialog.open(ht,{data:{variants:e,title:this.products[t].Name},width:"800px"})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=g.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(b(i=>g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAllProduct()})}scanAllProduct(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).pipe(b(e=>e)).subscribe(e=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct),this.initPageLoader(g.GuidEMpty))})}onScanSingleProduct(t){t.Channel=this.productService.getChannelProduct(t);let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(D,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(b(i=>g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;let s=this.productService.getVariantCodesProduct(t);this.scanProducts(s)})}onUploadToMultipleChannel(t){let e=this.productService.getChannelProduct(t);t.Channel=e;let i=this.productService.filterUnselectedChannel([t],this.channelOptions);this.dialog.open(H,{width:"700px",data:{title:`Upload - ${t.Name}`,channels:i}}).afterClosed().pipe(b(s=>s!=="CANCEL"),K(s=>this.productService.uploadSingleProduct([t],s))).subscribe({next:s=>{this.getProducts()}})}onScanMultipleProduct(){let t=this.productService.filterChannelByTypeId(this.channelOptions,[tt.Tokopedia,tt.Tiktok]);this.searchFilter.ChannelID=g.GuidEMpty;let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(D,{data:{filter:e,channelOptions:t,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(b(s=>g.IsNotEmpty(s))).subscribe(s=>{this.searchFilter.ChannelID=s.ChannelID,this.searchFilter.ScanFull=s.ScanFull,this.searchFilter.UpdatedProduct=s.UpdatedProduct;let f=this.productService.selectedProduct(this.products),w=this.productService.getVariantCodesProducts(f);this.scanProducts(w)})}scanProducts(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:e=>{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);e?this.toastr.success(`Product Successfully scan with ${i?.Name}`,"Success"):this.toastr.error(`This product is not existed in ${i?.Name} `,"Error"),this.searchFilter.ChannelID=g.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=g.GuidEMpty}})}getVariantCode(t){let e;return t.length>1&&(e=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(e=t[0].Code),e}onClearFilterChannel(){this.searchFilter.ChannelID=g.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products),e=this.productService.filterUnselectedChannel(t,this.channelOptions);this.dialog.open(H,{width:"700px",data:{title:"Upload Multiple Product",channels:e}}).afterClosed().pipe(b(i=>i!=="CANCEL"),K(i=>this.productService.uploadMultipleProduct(t,i))).subscribe({next:i=>{this.getProducts()}})}getRowCount(){let t={ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text};this.http.post("/api/product/GetSoldInChannelRowCount",t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Total})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(t){return g.getChannelLogoByTypeId(t)}};r.\u0275fac=function(e){return new(e||r)(P(R),P(j),P(A),P(V),P(pt))},r.\u0275cmp=M({type:r,selectors:[["app-sold-in-channel"]],decls:20,vars:12,consts:[["description","SKU has been mapped between dealpos and marketplace",3,"headerTitle","onSubmit"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-2",3,"click",4,"ngIf"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","multiple","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],[4,"ngIf"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],["type","text","name","Item_id","id","Item_id",1,"form-control",3,"ngModel","ngModelChange"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","onUpload","onDescEvent","onScan","onCheckBoxChange"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),_("onSubmit",function(f){return i.searchProduct(f)}),a(1,"actions"),S(2,_e,3,0,"button",1)(3,ge,3,1,"button",2)(4,Ce,3,1,"button",3),l(),a(5,"filters")(6,"div",4)(7,"div",5)(8,"div")(9,"h6"),m(10,"Channel"),l(),a(11,"ng-select",6),_("ngModelChange",function(f){return i.searchFilter.ListChannelID=f})("clear",function(){return i.onClearFilterChannel()}),S(12,fe,3,2,"ng-template",7),l()(),S(13,Se,4,1,"div",8),l()()(),a(14,"content")(15,"div",9)(16,"div",10),S(17,xe,2,10,"div",11)(18,Pe,3,0,"ng-container",8),l(),S(19,ve,3,4,"div",12),l()()()),e&2&&(d("headerTitle","Sold in Channel"),c(2),d("ngIf",!i.productService.hasSelection(i.products)),c(1),d("ngIf",i.productService.hasSelection(i.products)),c(1),d("ngIf",i.productService.hasSelection(i.products)),c(7),d("clearable",!0)("multiple",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ListChannelID),c(2),d("ngIf",i.searchFilter.ListChannelID!=null),c(4),d("ngForOf",i.products),c(1),d("ngIf",i.products.length==0),c(1),d("ngIf",i.products==null?null:i.products.length))},dependencies:[T,E,X,B,$,k,J,et,G,Z,U],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]});let o=r;return o})();function Ie(o,r){if(o&1){let n=x();a(0,"button",10),_("click",function(){u(n);let e=p(2);return h(e.uploadMultipleProduct())}),C(1,"i",11),m(2),l()}if(o&2){let n=p(2);c(2),v(" upload (",n.selectedProducts==null?null:n.selectedProducts.length,") ")}}function ye(o,r){if(o&1){let n=x();I(0),a(1,"td",27)(2,"input",28),_("ngModelChange",function(e){u(n);let i=p(2).$implicit;return h(i.selected=e)})("ngModelChange",function(){u(n);let e=p(3).ngIf,i=p(3);return h(i.onSelectProduct(e))}),l()(),y()}if(o&2){let n=p(2).$implicit;c(1),d("rowSpan",n==null?null:n.Variants.length),c(1),d("ngModel",n.selected)}}function we(o,r){if(o&1){let n=x();I(0),a(1,"img",34),_("click",function(e){u(n);let i=p(3).$implicit,s=p(4);return h(s.onZoomImage(e,i==null?null:i.ImageUrl))}),l(),y()}if(o&2){let n=p(3).$implicit;c(1),d("src",n==null?null:n.ImageUrl,O)}}function Me(o,r){o&1&&C(0,"img",35)}function Oe(o,r){if(o&1&&(I(0),a(1,"td",27)(2,"div",29),S(3,we,2,1,"ng-container",7)(4,Me,1,0,"ng-template",null,30,W),l()(),a(6,"td",31)(7,"h4",32)(8,"span",33),m(9),l()()(),y()),o&2){let n=L(5),t=p(2).$implicit;c(1),d("rowSpan",t==null?null:t.Variants.length),c(2),d("ngIf",t==null?null:t.ImageUrl)("ngIfElse",n),c(3),d("rowSpan",t==null?null:t.Variants.length),c(2),d("matTooltip",(t==null||t.Name==null?null:t.Name.length)>50?t==null?null:t.Name:""),c(1),v(" ",t==null?null:t.Name," ")}}function Fe(o,r){if(o&1&&(a(0,"div")(1,"a",23),C(2,"img",36),l()()),o&2){let n=r.$implicit;c(1),d("href",n.URL,O),c(1),d("src",n.Img,O)("matTooltip",n.Name)}}function De(o,r){if(o&1&&(a(0,"div"),C(1,"img",36),l()),o&2){let n=r.$implicit;c(1),d("src",n.Img,O)("matTooltip",n.Name)}}function Ne(o,r){if(o&1&&(a(0,"tr"),S(1,ye,3,2,"ng-container",20)(2,Oe,10,6,"ng-container",20),a(3,"td"),m(4),l(),a(5,"td")(6,"span"),m(7),l(),a(8,"span",22)(9,"a",23),C(10,"i",24),l()()(),a(11,"td",25)(12,"div",26),S(13,Fe,3,3,"div",21),l()(),a(14,"td",25)(15,"div",26),S(16,De,2,2,"div",21),l()()()),o&2){let n=r.$implicit,t=r.index,e=p(5);c(1),d("ngIf",t==0),c(1),d("ngIf",t==0),c(2),v(" ",n.Name," "),c(3),v(" ",n.Code," "),c(2),d("href","https://"+e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(n==null?null:n.ID),O),c(4),d("ngForOf",n==null?null:n.Available),c(3),d("ngForOf",n==null?null:n.NotAvailable)}}function Te(o,r){if(o&1&&(I(0),S(1,Ne,17,7,"tr",21),y()),o&2){let n=r.$implicit;c(1),d("ngForOf",n.Variants)}}function Ee(o,r){if(o&1&&(a(0,"tbody"),S(1,Te,2,1,"ng-container",21),l()),o&2){let n=r.ngIf;c(1),d("ngForOf",n)}}function ke(o,r){if(o&1&&(I(0),a(1,"div",12)(2,"table",13)(3,"thead",14)(4,"tr"),C(5,"th",15),a(6,"th",16),m(7,"Product"),l(),a(8,"th",17),m(9,"Variant"),l(),a(10,"th",17),m(11,"SKU"),l(),a(12,"th",18),m(13,"Available In"),l(),a(14,"th",19),m(15,"Not Available In"),l()()(),S(16,Ee,2,1,"tbody",20),F(17,"async"),l()(),y()),o&2){let n=p(2);c(16),d("ngIf",N(17,1,n.data$))}}function Ve(o,r){o&1&&(a(0,"div",37),C(1,"app-empty-state"),l())}function Ue(o,r){if(o&1){let n=x();a(0,"span",45),_("click",function(){u(n);let e=p(3);return h(e.getRowCount())}),a(1,"i",46),m(2,"?"),l()()}}function Le(o,r){if(o&1&&(a(0,"span"),m(1),F(2,"number"),l()),o&2){let n=r.ngIf;c(1),ct(N(2,1,n==null?null:n.Count))}}function Ae(o,r){if(o&1){let n=x();a(0,"a",47),_("click",function(){u(n);let e=p(3);return h(e.onNextPage())}),C(1,"i",48),m(2," Next"),l()}}function Re(o,r){if(o&1){let n=x();a(0,"a",49),_("click",function(){u(n);let e=p(3);return h(e.onLastPage())}),C(1,"i",50),m(2," Last"),l()}}function Be(o,r){if(o&1&&(a(0,"div",38)(1,"div",39)(2,"div",40),m(3),F(4,"number"),S(5,Ue,3,0,"span",41)(6,Le,3,3,"span",20),F(7,"async"),m(8),l()(),a(9,"div",42),S(10,Ae,3,0,"a",43)(11,Re,3,0,"a",44),l()()),o&2){let n=r.ngIf,t=p(2);c(3),v(" Showing 1 - ",N(4,6,n==null?null:n.length)," of "),c(2),d("ngIf",t.paginationService.hideCount),c(1),d("ngIf",!t.paginationService.hideCount&&N(7,8,t.rowCount$)),c(2),v(" records ~ ",t.paginationService.footerPageNumber," Page "),c(2),d("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),c(1),d("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}function $e(o,r){if(o&1){let n=x();a(0,"mainpanel",1),_("onSubmit",function(e){u(n);let i=p();return h(i.searchProduct(e))}),a(1,"actions"),S(2,Ie,3,1,"button",2),a(3,"button",3),_("click",function(){let i=u(n).ngIf,s=p();return h(s.openScanDialog(i))}),C(4,"i",4),m(5," Scan Channel "),l()(),a(6,"content")(7,"div",5)(8,"div",6),S(9,ke,18,3,"ng-container",7),F(10,"async"),S(11,Ve,2,0,"ng-template",null,8,W),l(),S(13,Be,12,10,"div",9),F(14,"async"),l()()()}if(o&2){let n=L(12),t=p(),e;d("hideSearchDropdown",!0),c(2),d("ngIf",t.hasSelectionProduct),c(7),d("ngIf",((e=N(10,5,t.data$))==null?null:e.length)>0)("ngIfElse",n),c(4),d("ngIf",N(14,7,t.data$))}}var ie=(()=>{let r=class r{constructor(t,e,i,s,f,w){this.http=t,this.dialog=e,this.toastr=i,this.productService=s,this.paginationService=f,this.biggerPictureService=w,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[]}ngOnInit(){this.initPageLoader(),this.iniData(),this.initHostName()}initHostName(){let t=localStorage.getItem("Authorization");this.hostName=JSON.parse(t)?.Host}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe(yt(t=>{this.filterSearch=t.Filter,this.paginationService.reloadPagination(t.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe(It(t=>(t=t.map(e=>(e.Variants=e.Variants.map(i=>(i.Available=this.productService.sortChannel(i.Available),i.NotAvailable=this.productService.sortChannel(i.NotAvailable),i.Available=this.assignLogoChannel(i.Available),i.NotAvailable=this.assignLogoChannel(i.NotAvailable),i)),e)),t)))}assignLogoChannel(t){return t=t.map(e=>(e.Img=g.getChannelLogoByTypeId(e.TypeID),e)),t}searchProduct(t){this.filterSearch.text=t,this.paginationService.reloadPagination(this.filterSearch)}scanAllProduct(t){let e=this.productService.findChannelById(this.filterSearch.ChannelID,t.Options.Channel);this.productService.scanAll(this.filterSearch.ChannelID,this.filterSearch.ScanFull,this.filterSearch.UpdatedProduct,this.filterSearch.Async).subscribe(i=>{this.filterSearch.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(i,e,!this.filterSearch.UpdatedProduct),this.initPageLoader())})}openScanDialog(t){let e=JSON.parse(JSON.stringify(this.filterSearch));e.ChannelID=g.GuidEMpty,this.dialog.open(D,{data:{filter:e,channelOptions:t.Options.Channel},width:"600px"}).afterClosed().pipe(b(s=>g.IsNotEmpty(s))).subscribe(s=>{this.filterSearch.ChannelID=s.ChannelID,this.filterSearch.ScanFull=s.ScanFull,this.filterSearch.UpdatedProduct=s.UpdatedProduct,this.filterSearch.Async=s.Async,this.scanAllProduct(t)})}getChannelLogoById(t){return g.getChannelLogoByTypeId(t)}getRowCount(){this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`/api/${this.rowCountAPI}`,this.filterSearch)}onNextPage(){this.paginationService.onNextPage(this.filterSearch)}onLastPage(){this.http.post(`/api/${this.rowCountAPI}`,{}).subscribe({next:t=>{this.filterSearch.PageNumber=1,this.paginationService.getAllData(this.filterSearch,t.Count)}})}onZoomImage(t,e){this.biggerPictureService.openBiggerPicture(t,e)}onSelectProduct(t){this.hasSelectionProduct=this.productService.hasSelection(t),this.selectedProducts=this.productService.selectedProduct(t)}uploadMultipleProduct(){let t=this.getUniqueChannels();t=t.map(e=>(e.ID=e.ChannelID,e)),this.dialog.open(H,{width:"700px",data:{title:"Upload Multiple Product",channels:t}}).afterClosed().pipe(b(e=>e!=="CANCEL"),K(e=>{let i=this.getSelectedProductIds();return this.productService.uploadNotInChannel(i,e)})).subscribe({next:()=>{this.paginationService.reloadPagination(this.filterSearch),this.selectedProducts=[],this.hasSelectionProduct=!1},error:e=>{this.selectedProducts=[],this.hasSelectionProduct=!1}})}getSelectedProductIds(){return this.selectedProducts.map(e=>({ID:e.ProductID}))}getUniqueChannels(){let t=[];return this.selectedProducts.forEach(e=>{t=[...t,...e.Variants[0].NotAvailable]}),t=t.filter((e,i,s)=>s.findIndex(f=>f.ChannelID==e.ChannelID)==i),t}ngOnDestroy(){this.paginationService.destroy()}};r.\u0275fac=function(e){return new(e||r)(P(R),P(j),P(A),P(V),P(Yt),P(Kt))},r.\u0275cmp=M({type:r,selectors:[["app-not-in-channel"]],decls:2,vars:3,consts:[["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"hideSearchDropdown","onSubmit",4,"ngIf"],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"hideSearchDropdown","onSubmit"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"container-fluid","mt-3"],[1,"row"],[4,"ngIf","ngIfElse"],["EMPTY",""],["class","d-flex justify-content-between mt-5",4,"ngIf"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"col-md-12"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","10px"],["colspan","2",1,"ms-5","text-center",2,"width","450px"],[2,"width","150px"],[2,"width","20%"],[2,"width","16%"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"ms-1"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt","external-link-custom"],[2,"padding-left","0px"],[1,"d-flex","flex-wrap","mb-1"],[1,"text-center",3,"rowSpan"],["type","checkbox",3,"ngModel","ngModelChange"],[2,"padding-right","0px"],["elsePic",""],[1,"text-start",3,"rowSpan"],[1,"ms-5","fw-normal","text-ellipsis",2,"max-width","26vw !important"],[3,"matTooltip"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(e,i){e&1&&(S(0,$e,15,9,"mainpanel",0),F(1,"async")),e&2&&d("ngIf",N(1,1,i.loader$))},dependencies:[T,E,Et,B,$,k,ut,U,st,dt],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}thead[_ngcontent-%COMP%]{position:sticky;top:0}.channel-logo[_ngcontent-%COMP%]{width:20px}.w-img[_ngcontent-%COMP%]{width:100%}"]});let o=r;return o})();function je(o,r){if(o&1){let n=x();a(0,"button",14),_("click",function(){u(n);let e=p();return h(e.openScanDialog())}),C(1,"i",15),m(2," Scan Channel "),l()}}function Ge(o,r){if(o&1){let n=x();I(0),a(1,"button",16),_("click",function(){u(n);let e=p();return h(e.onDownloadAllProduct("SELECTED"))}),C(2,"i",17),m(3),l(),y()}if(o&2){let n=p(),t;c(3),v(" Download (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function Ke(o,r){if(o&1&&(a(0,"span",18),C(1,"img",19),l(),m(2)),o&2){let n=r.item,t=p();c(1),d("src",t.getChannelLogo(n.TypeID),O),c(1),v(" ",n.Name," ")}}var Je=o=>[o],ze=()=>[];function He(o,r){if(o&1){let n=x();a(0,"div",20)(1,"app-product-card",21),_("onCheckBoxChange",function(e){let s=u(n).index,f=p();return h(f.onSelectProduct(e,s))})("onDescEvent",function(){let i=u(n).index,s=p();return h(s.onShowVariantDetail(i))})("onDownload",function(){let i=u(n).$implicit,s=p();return h(s.onDownloadProduct(i))})("onScan",function(){let i=u(n).$implicit,s=p();return h(s.onScanChannel(i))}),l()()}if(o&2){let n=r.$implicit;c(1),d("showRedirectIcon",!1)("title",n==null?null:n.Name)("image",n==null?null:n.Image)("imageForZoom",n==null?null:n.Image)("code",n==null?null:n.SKU)("description",(n==null||n.Variant==null?null:n.Variant.length)>0?(n==null||n.Variant==null?null:n.Variant.length)+" Variants":null)("downloadButton",!0)("channels",n!=null&&n.Channel?nt(10,Je,n==null?null:n.Channel):q(12,ze))("showCheckBox",!0)("scanButton",!0)}}function Ze(o,r){o&1&&(I(0),a(1,"div",22),C(2,"app-empty-state"),l(),y())}function qe(o,r){if(o&1){let n=x();a(0,"div",23)(1,"div",24)(2,"app-custom-paginator",25),_("total",function(){u(n);let e=p();return h(e.getRowCount())})("next",function(){u(n);let e=p();return h(e.onNextPage())})("previous",function(){u(n);let e=p();return h(e.onPreviousPage())}),l()()()}if(o&2){let n=p();c(2),d("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var oe=(()=>{let r=class r{constructor(t,e,i,s,f){this.http=t,this.dialog=e,this.productService=i,this.toastrService=s,this.activateRouter=f,this.searchFilter=new z,this.products=[],this.hasClickRowCount=!1}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(g.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(e=>{this.channelOptions=e.Options.Channel,this.searchFilter=e.Filter,this.searchFilter.PageSize=e.Filter.RowCount,this.getProducts()})}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",this.searchFilter).subscribe(t=>{this.products=t.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){this.products=this.products.map(t=>(t.Channel=JSON.parse(JSON.stringify(this.channelOptions.find(e=>e.ID==t.ChannelID))),t)).map(t=>(t.Channel.Url=t.Url,t))}setSkuProduct(){this.products=this.products.map(t=>(t?.Variant?.length==0?g.IsNotEmpty(t?.ChannelItemSKU)?t.SKU=t?.ChannelItemSKU:t.SKU="SKU not assigned":t.SKU=t?.Variant[0]?.ChannelVariationSKU?t?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",t))}onSearch(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onClearChannelFilter(){this.searchFilter.ChannelID=g.GuidEMpty}onScanAll(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{this.searchFilter.Async?this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(g.GuidEMpty),this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=g.GuidEMpty})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=g.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(b(i=>g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.Async=i.Async,this.onScanAll()})}onDownloadAllProduct(t){let e;t=="ALL"?e=this.products:e=this.productService.selectedProduct(this.products),e.length>0&&this.productService.downloadMultipleProduct(e).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(t,e){this.products[e].selected=t}onDownloadProduct(t){confirm(`Are you sure you want to Retrieve product ${t?.Name} from ${t?.Channel.Name} to POS?`)&&this.productService.downloadProduct(t).subscribe({next:()=>{this.getProducts()}})}onScanChannel(t){let e=JSON.parse(JSON.stringify(t));delete e.Channel,this.productService.scanCompareToPos([e]).subscribe(i=>{i.Status?(this.initPageLoader(g.GuidEMpty),this.toastrService.success(`product ${t.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${t.Name} is not existed in POS`,"Error")})}onShowVariantDetail(t){let e=this.products[t].Variant;e.length>0&&this.dialog.open(Qt,{data:{title:this.products[t].Name,variants:e},width:"30%"})}getRowCount(){let t={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku)};this.http.post("/api/product/GetProductChannelNotPOSRowCount",t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Count})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(t){return g.getChannelLogoByTypeId(t)}};r.\u0275fac=function(e){return new(e||r)(P(R),P(j),P(V),P(A),P(pt))},r.\u0275cmp=M({type:r,selectors:[["app-not-in-pos"]],decls:32,vars:13,consts:[["headerTitle","Not in POS","textButton","Search","description","SKU sold in Marketplace but not exist in DEALPOS",3,"onSubmit"],["type","button","data-cy","scanNotInPos","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],[4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],["name","haveSKU",1,"form-control","h-100","pt-3","rounded",3,"ngModel","ngModelChange"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3",3,"click"],[1,"fa","fa-download"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton","onCheckBoxChange","onDescEvent","onDownload","onScan"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),_("onSubmit",function(f){return i.onSearch(f)}),a(1,"actions"),S(2,je,3,0,"button",1)(3,Ge,4,1,"ng-container",2),l(),a(4,"filters")(5,"div",3)(6,"div",4)(7,"div")(8,"h6"),m(9,"Channel"),l(),a(10,"ng-select",5),_("ngModelChange",function(f){return i.searchFilter.ChannelID=f})("clear",function(){return i.onClearChannelFilter()}),S(11,Ke,3,2,"ng-template",6),l()(),a(12,"div")(13,"h6"),m(14,"SKU Assigned"),l(),a(15,"mat-radio-group",7),_("ngModelChange",function(f){return i.searchFilter.HaveSku=f}),a(16,"mat-radio-button",8),m(17," All "),l(),a(18,"mat-radio-button",8),m(19," Yes "),l(),a(20,"mat-radio-button",8),m(21," No "),l()()(),a(22,"div")(23,"h6"),m(24,"Item ID"),l(),a(25,"input",9),_("ngModelChange",function(f){return i.searchFilter.Item_id=f}),l()()()()(),a(26,"content")(27,"div",10)(28,"div",11),S(29,He,2,13,"div",12)(30,Ze,3,0,"ng-container",2),l(),S(31,qe,3,4,"div",13),l()()()),e&2&&(c(2),d("ngIf",!i.productService.hasSelection(i.products)),c(1),d("ngIf",i.productService.hasSelection(i.products)),c(7),d("clearable",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ChannelID),c(5),d("ngModel",i.searchFilter.HaveSku),c(1),d("value",0),c(2),d("value",1),c(2),d("value",2),c(5),d("ngModel",i.searchFilter.Item_id),c(4),d("ngForOf",i.products),c(1),d("ngIf",i.products.length==0),c(1),d("ngIf",(i.products==null?null:i.products.length)>0))},dependencies:[T,E,X,B,$,k,J,et,$t,jt,G,Z,U],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.itemTitle[_ngcontent-%COMP%]{cursor:pointer}"]});let o=r;return o})();function Ye(o,r){if(o&1&&(a(0,"span",8),C(1,"img",9),l(),m(2)),o&2){let n=r.item,t=p();c(1),d("src",t.getChannelLogo(n.TypeID),O),c(1),v(" ",n.Name," ")}}function Qe(o,r){if(o&1&&(a(0,"div",10),C(1,"app-duplicate-product-card",11),l()),o&2){let n=r.$implicit,t=r.index;c(1),d("imageForZoom",n.ImageUrl)("title",n.Name)("code",n.Code)("id",t)("image",n.ThumbnailURL)("channels",n.Channels)}}function We(o,r){o&1&&(I(0),a(1,"div",12),C(2,"app-empty-state"),l(),y())}function Xe(o,r){if(o&1){let n=x();I(0),a(1,"div",13)(2,"div",14)(3,"app-custom-paginator",15),_("next",function(){u(n);let e=p();return h(e.onNextPage())})("previous",function(){u(n);let e=p();return h(e.onPrevPage())})("total",function(){u(n);let e=p();return h(e.getRowCount())}),l()()(),y()}if(o&2){let n=p();c(3),d("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickedRowCount)}}var re=(()=>{let r=class r{constructor(t,e){this.httpService=t,this.productService=e,this.searchFilter=new z,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader()}getPageLoader(){this.productService.loader().subscribe(t=>{this.searchFilter=t.Filter,this.searchFilter.PageSize=t.Filter.RowCount,this.channelOptions=t.Options.Channel,this.getProducts()})}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text};this.httpService.post("/api/product/GetDuplicateInChannel",t).subscribe(e=>{this.products=e.Data})}onSearch(t){this.searchFilter.text=t,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=g.GuidEMpty}getChannelLogo(t){return g.getChannelLogoByTypeId(t)}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPrevPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getRowCount(){let t={text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",t).subscribe(e=>{this.hasClickedRowCount=!0,this.rowCount=e.Total})}};r.\u0275fac=function(e){return new(e||r)(P(R),P(V))},r.\u0275cmp=M({type:r,selectors:[["app-duplicate-sku"]],decls:14,vars:7,consts:[["headerTitle","Multiple Listing","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"multiple","clearable","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],[1,"container-fluid"],[1,"row","mt-8","mx-1"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"imageForZoom","title","code","id","image","channels"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"filter","totaldata","paginationTotal","hasClicked","next","previous","total"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),_("onSubmit",function(f){return i.onSearch(f)}),a(1,"filters")(2,"div",1)(3,"div")(4,"h6"),m(5,"Channel"),l(),a(6,"ng-select",2),_("ngModelChange",function(f){return i.searchFilter.ListChannelID=f})("clear",function(){return i.onClearFilter()}),S(7,Ye,3,2,"ng-template",3),l()()()(),a(8,"content")(9,"div",4)(10,"div",5),S(11,Qe,2,6,"div",6)(12,We,3,0,"ng-container",7),l(),S(13,Xe,4,4,"ng-container",7),l()()()),e&2&&(c(6),d("multiple",!0)("clearable",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ListChannelID),c(5),d("ngForOf",i.products),c(1),d("ngIf",(i.products==null?null:i.products.length)==0),c(1),d("ngIf",(i.products==null?null:i.products.length)>0))},dependencies:[T,E,B,$,k,J,et,_t,G,U]});let o=r;return o})();function tn(o,r){if(o&1&&(I(0),m(1),y()),o&2){let n=p().$implicit;c(1),v(" ",n.Count," ")}}function en(o,r){if(o&1){let n=x();a(0,"span",26),_("click",function(){u(n);let e=p().$implicit,i=p(2);return h(i.getLiveProductCount(e.ID,e))}),C(1,"i",27),l()}}var nn=()=>["/menu/products/status/sold-in-channel"],ae=o=>({ID:o}),on=()=>["/menu/products/status/not-in-pos"];function rn(o,r){if(o&1){let n=x();a(0,"tr")(1,"td"),C(2,"img",16),a(3,"span",17),m(4),l()(),a(5,"td",18),S(6,tn,2,1,"ng-container",4)(7,en,2,0,"ng-template",null,19,W),l(),a(9,"td",18)(10,"a",20),m(11),F(12,"number"),l()(),a(13,"td",18)(14,"a",20),m(15),F(16,"number"),l()(),a(17,"td"),m(18),F(19,"date"),l(),a(20,"td")(21,"div",21)(22,"button",22),_("click",function(){let i=u(n).$implicit,s=p(2);return h(s.onScanChannel(i))}),C(23,"i",23),m(24," Scan "),l(),a(25,"button",24),_("click",function(){let i=u(n).$implicit,s=p(2);return h(s.onClearCache(i.ID))}),C(26,"i",25),m(27," Clear "),l()()()()}if(o&2){let n=r.$implicit,t=L(8),e=p(2);c(2),d("src",e.getChannelLogo(n.TypeID),O),c(2),ct(n.Name),c(2),d("ngIf",n.Count!==void 0)("ngIfElse",t),c(4),d("routerLink",q(18,nn))("queryParams",nt(19,ae,n.ID)),c(1),v(" ",N(12,11,n.SoldInChannel)," "),c(3),d("routerLink",q(21,on))("queryParams",nt(22,ae,n.ID)),c(1),v(" ",N(16,13,n.NotInPOS)," "),c(3),v("",n.LastSync?Ot(19,15,n.LastSync,"dd MMM yyyy HH:mm"):"-"," ")}}function an(o,r){if(o&1&&(I(0),a(1,"div",6)(2,"table",7)(3,"thead",8)(4,"tr",9)(5,"th"),m(6,"Channel"),l(),a(7,"th",10),m(8,"Live Product"),l(),a(9,"th",11),m(10,"Sold In Channel"),l(),a(11,"th",12),m(12,"Product Not in POS"),l(),a(13,"th",13),m(14,"Last Sync"),l(),C(15,"th",14),l()(),a(16,"tbody"),S(17,rn,28,24,"tr",15),F(18,"async"),l()()(),y()),o&2){let n=p(),t;c(17),d("ngForOf",(t=N(18,1,n.channels$))==null?null:t.Data)}}function ln(o,r){o&1&&(a(0,"div",28),C(1,"app-empty-state"),l())}var le=(()=>{let r=class r{constructor(t,e,i){this.productService=t,this.toastr=e,this.dialog=i,this.destroy$=new bt}ngOnInit(){this.setObsProductStatistic(),this.initPageLoader()}initPageLoader(){this.productService.loader().pipe(lt(this.destroy$)).subscribe(t=>{this.channelOptions=t?.Options?.Channel})}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(t,e){this.productService.getTotalProductLive(t).pipe(lt(this.destroy$)).subscribe(i=>{e.Count=i.Count})}onScanChannel(t){this.dialog.open(D,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:t.ID},disabledChannelOption:!0}}).afterClosed().pipe(b(e=>g.IsNotEmpty(e))).subscribe(e=>{this.scanAllProduct(t.ID,e)})}scanAllProduct(t,e){let i=this.productService.findChannelById(t,this.channelOptions);this.productService.scanAll(e.ChannelID,e.ScanFull,e.UpdatedProduct,e.Async).pipe(b(s=>s)).subscribe(s=>{e.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(s,i,!e.UpdatedProduct),this.initPageLoader(),this.setObsProductStatistic())})}onClearCache(t){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.productService.clearCacheChannel(t).pipe(lt(this.destroy$)).subscribe(i=>{this.toastr.success("Successfully cleared cache","Success"),this.initPageLoader(),this.setObsProductStatistic()})}getChannelLogo(t){return g.getChannelLogoByTypeId(t)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};r.\u0275fac=function(e){return new(e||r)(P(V),P(A),P(j))},r.\u0275cmp=M({type:r,selectors:[["app-channel-statistic"]],decls:9,vars:6,consts:[["headerTitle","Products Statistic",3,"hideSearchBox","hideSearchDropdown"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],["EMPTY",""],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[1,"text-center",2,"width","13rem"],[1,"text-center",2,"width","9rem"],[1,"text-center",2,"width","14rem"],[2,"width","10rem"],[2,"width","12rem"],[4,"ngFor","ngForOf"],[2,"width","24px","height","24px",3,"src"],[1,"ms-3"],[1,"text-center"],["QUESTION",""],[3,"routerLink","queryParams"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-sm","btn-secondary","fs-6",3,"click"],[1,"fa","fa-spinner"],[1,"btn","btn-sm","btn-secondary","fs-6","ms-3",3,"click"],[1,"fa","fa-trash"],["matTooltip","Click to see total live product",1,"cursor-pointer","fs-5","text-primary",3,"click"],[1,"fa-solid","fa-circle-question","cursor"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(e,i){if(e&1&&(a(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div",3),S(5,an,19,3,"ng-container",4),F(6,"async"),S(7,ln,2,0,"ng-template",null,5,W),l()()()()()),e&2){let s=L(8),f;d("hideSearchBox",!0)("hideSearchDropdown",!0),c(5),d("ngIf",((f=N(6,4,i.channels$))==null||f.Data==null?null:f.Data.length)>0)("ngIfElse",s)}},dependencies:[T,E,k,ut,mt,U,st,dt,Ft]});let o=r;return o})();var cn=[{component:Xt,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:ee,canActivate:[Y],data:{title:"Products in POS"}},{path:"sold-in-channel",component:ne,canActivate:[Y],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:ie,canActivate:[Y],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:oe,canActivate:[Y],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:re,canActivate:[Y],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",component:le,canActivate:[Y],data:{title:"Channel Statistic"}}]}],xi=(()=>{let r=class r{};r.\u0275fac=function(e){return new(e||r)},r.\u0275mod=Mt({type:r}),r.\u0275inj=wt({imports:[Dt,kt,At,Lt,Vt,Wt,Gt,Bt,_t,G,Z,Tt.forChild(cn),qt,Ut]});let o=r;return o})();export{xi as StatusModule};
@@ -0,0 +1 @@
1
+ import{b as O}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-Q4Y764AE.js";import{a as H}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-FR67IIWG.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-QJKKB3RG.js";import{a as $,b as N}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-S7ANPM6L.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-RHM4GQMX.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-R3VPTXDH.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-BBX2DZWF.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-G6DYB24N.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-6FFJWFMY.js";import{v as D,w}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-YZHBBFDR.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-32YQ5ZBK.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-UUMW24BF.js";import{$b as E,Ab as u,Bb as g,Cb as _,Ea as o,Fa as C,Hc as k,Jc as B,Na as m,P as h,Qa as I,Ta as L,Xb as M,Ya as n,Za as i,ac as A,cc as T,da as S,dc as R,gb as c,ob as s,q as v,qb as y,tb as P,ub as b,vb as F}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-LWR5YJ24.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-J3NU4TSW.js";var q=()=>["/menu/log/inventory-async/detail"],x=r=>({ID:r});function z(r,a){if(r&1&&(n(0,"tr")(1,"td")(2,"a",12),s(3),u(4,"date"),i()(),n(5,"td"),s(6),u(7,"number"),i(),n(8,"td")(9,"span",13),s(10),i()()()),r&2){let e=a.$implicit;o(2),m("routerLink",b(13,q))("queryParams",F(14,x,e._id)),o(1),y(" ",_(4,7,e==null?null:e._source["@timestamp"],"dd MMM yyyy HH:mm:ss")," "),o(3),y(" ",_(7,10,e.DurationInSecond,"1.1-1")," s "),o(3),I((e==null||e._source==null||e._source.log==null?null:e._source.log.respCode)===200||(e==null||e._source==null||e._source.log==null?null:e._source.log.respCode)===202?"bg-success":"bg-warning"),o(1),y(" ",e==null||e._source==null||e._source.log==null?null:e._source.log.respCode," ")}}var te=(()=>{let a=class a{constructor(l){this.inventoryAsyncServiceLog=l,this.filters={PageNumber:1,RowCount:100,From:null,To:null}}ngOnInit(){this.initInventoryLog()}initInventoryLog(){let l=this.inventoryAsyncServiceLog.getInventoryAsyncLog(this.filters).pipe(h(1));this.inventoryLog$=l.pipe(v(p=>p?.hits)),this.totalPagination$=l.pipe(v(p=>p?.total.value))}onPaginationChange(l){this.filters.PageNumber=l.pageIndex+1,this.initInventoryLog()}onSubmitFilter(){this.initInventoryLog()}};a.\u0275fac=function(p){return new(p||a)(C(H))},a.\u0275cmp=S({type:a,selectors:[["app-inventory-async-log"]],standalone:!0,features:[P],decls:29,vars:15,consts:[["headerTitle","Async Inventory",3,"hideSearchBox","onSubmit"],["container",""],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],[3,"routerLink","queryParams"],[1,"text-white","p-2","rounded","response-desc"]],template:function(p,t){p&1&&(n(0,"mainpanel",0),c("onSubmit",function(){return t.onSubmitFilter()}),n(1,"filters")(2,"div",1)(3,"div")(4,"h6"),s(5,"From/To"),i(),n(6,"datepicker",2),c("dateChange",function(d){return t.filters.From=d}),i(),n(7,"datepicker",3),c("dateChange",function(d){return t.filters.To=d}),i()()()(),n(8,"content")(9,"div",4)(10,"div",5)(11,"div",6)(12,"div",7)(13,"table",8)(14,"thead")(15,"tr",9)(16,"th"),s(17,"Created"),i(),n(18,"th"),s(19,"Duration"),i(),n(20,"th"),s(21,"Response code"),i()()(),n(22,"tbody"),L(23,z,11,16,"tr",10),u(24,"async"),i()(),n(25,"mat-paginator",11),c("page",function(d){return t.onPaginationChange(d)}),u(26,"async"),u(27,"async"),u(28,"async"),i()()()()()()()),p&2&&(m("hideSearchBox",!0),o(6),m("date",t.filters.From),o(1),m("date",t.filters.To),o(16),m("ngForOf",g(24,7,t.inventoryLog$)),o(2),m("length",g(26,9,t.totalPagination$))("pageSize",t.filters.RowCount>g(27,11,t.totalPagination$)?g(28,13,t.totalPagination$):t.filters.RowCount)("pageIndex",(t.filters==null?null:t.filters.PageNumber)==0?0:(t.filters==null?null:t.filters.PageNumber)-1))},dependencies:[R,M,E,T,A,w,D,N,$,O,B,k]});let r=a;return r})();export{te as InventoryAsyncLogComponent};
@@ -0,0 +1 @@
1
+ import{b as h,e as c}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-BBX2DZWF.js";import{c as l}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-GAMNBDJD.js";import{W as a,_ as p,ba as i,q as s}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-LWR5YJ24.js";var g=(()=>{let r=class r{constructor(t,e){this.httpService=t,this.toastr=e}getChannel(t){return this.httpService.post("/api/Channel/GetChannel",t)}getChannelLoader(){return this.httpService.get("/api/ChannelLoader/GetChannelLoader")}testShopID(t){return this.httpService.post("/api/Channel/TestShopID",t).pipe(a(e=>{this.showTostrSuccessTestShopID(e)}))}updateChannelIndex(t){return this.httpService.post("/api/Channel/UpdateChannelIndex",t)}deleteChannel(t){return this.httpService.post("/api/Channel/DeleteChannel",t)}mapChannelImage(t){return t.map(e=>(e.img=l.getChannelLogoByTypeId(e.TypeID),e))}showTostrSuccessTestShopID(t){let e="";for(var o in t)e+=o+" : "+t[o]+"<br/>";this.toastr.success(e,"Success",{enableHtml:!0,closeButton:!0,positionClass:"toast-bottom-right"})}getRegisterByOutletName(t){return this.httpService.post("/api/Channel/GetRegistersByOutletOrder",{Outlet:t})}getChannelRowCount(t){return this.httpService.post("/api/Channel/GetCountChannel",t).pipe(s(e=>e.Count))}};r.\u0275fac=function(e){return new(e||r)(i(c),i(h))},r.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();export{g as a};
@@ -0,0 +1 @@
1
+ import{e as p}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-BBX2DZWF.js";import{_ as c,ba as a,q as n}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-LWR5YJ24.js";var f=(()=>{let t=class t{constructor(r){this.httpService=r}getInventoryAsyncLog(r){return this.httpService.post("api/Inventory/GetAsyncLog",r).pipe(n(e=>(e.hits=e.hits.map(i=>(i.DurationInSecond=parseInt(i._source?.Duration)/1e3,i)),e)))}getInventoryAsyncLogDetail(r){return this.httpService.post("api/Inventory/GetAsyncLogDetail",{ID:r})}};t.\u0275fac=function(e){return new(e||t)(a(p))},t.\u0275prov=c({token:t,factory:t.\u0275fac,providedIn:"root"});let o=t;return o})();export{f as a};
@@ -0,0 +1 @@
1
+ import{d as Ue,e as $e,h as Ze}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-6FFJWFMY.js";import{b as Le,e as Ve,f as We,p as Z,q as T,r as E,s as Be}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-YZHBBFDR.js";import{$ as Ye,B as Fe,F as Pe,J,K as je,M as Ke,N as Ne,O as qe,U as He,Y as Ge,Z as Qe,_ as ze,a as b,aa as Xe,b as Te,ba as ee,g as U,r as Ee,s as $,u as Re}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-32YQ5ZBK.js";import{e as Ie,g as xe,j as Ae,n as De}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-UUMW24BF.js";import{$ as ne,A as O,Aa as he,B as L,Ea as u,Fa as l,Fb as f,Gb as I,Ha as pe,Hb as x,I as V,Ia as w,Ib as y,J as ae,Ja as me,Ka as ue,Ma as S,Na as q,Pa as _e,R as W,Ra as ge,S as B,Ta as k,U as m,Ua as H,Vb as Oe,Ya as h,Za as _,_a as fe,aa as M,c as C,ca as re,cb as ye,da as se,dc as Me,ea as oe,gb as v,ha as le,ia as j,ib as g,ja as K,jb as ve,ka as N,kb as G,la as ce,na as de,nb as be,ob as Q,pb as z,q as P,qc as Y,rc as X,sb as Ce,uc as A,v as ie,vc as we,xc as D,yc as Se,zc as ke}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-LWR5YJ24.js";var ut=["trigger"],_t=["panel"];function gt(n,r){if(n&1&&(h(0,"span",9),Q(1),_()),n&2){let s=g();u(1),z(s.placeholder)}}function ft(n,r){n&1&&G(0)}function yt(n,r){if(n&1&&(h(0,"span",11),Q(1),_()),n&2){let s=g(2);u(1),z(s.triggerValue)}}function vt(n,r){if(n&1&&(h(0,"span",10),k(1,ft,1,0)(2,yt,2,1),_()),n&2){let s=g();u(1),H(1,s.customTrigger?1:2)}}function bt(n,r){if(n&1){let s=ye();N(),ce(),h(0,"div",12,13),v("@transformPanel.done",function(t){j(s);let i=g();return K(i._panelDoneAnimatingStream.next(t.toState))})("keydown",function(t){j(s);let i=g();return K(i._handleKeydown(t))}),G(2,1),_()}if(n&2){let s=g();ge("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",s._getPanelTheme(),""),q("ngClass",s.panelClass)("@transformPanel","showing"),S("id",s.id+"-panel")("aria-multiselectable",s.multiple)("aria-label",s.ariaLabel||null)("aria-labelledby",s._getPanelAriaLabelledby())}}var Ct=[[["mat-select-trigger"]],"*"],Ot=["mat-select-trigger","*"],Mt={transformPanelWrap:Y("transformPanelWrap",[D("* => void",ke("@transformPanel",[Se()],{optional:!0}))]),transformPanel:Y("transformPanel",[we("void",A({opacity:0,transform:"scale(1, 0.8)"})),D("void => showing",X("120ms cubic-bezier(0, 0, 0.2, 1)",A({opacity:1,transform:"scale(1, 1)"}))),D("* => void",X("100ms linear",A({opacity:0})))])};var at=0,nt=new M("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{let n=re(Z);return()=>n.scrollStrategies.reposition()}});function wt(n){return()=>n.scrollStrategies.reposition()}var St=new M("MAT_SELECT_CONFIG"),kt={provide:nt,deps:[Z],useFactory:wt},It=new M("MatSelectTrigger"),te=class{constructor(r,s){this.source=r,this.value=s}},xt=Ke(Ne(je(qe(class{constructor(n,r,s,e,t){this._elementRef=n,this._defaultErrorStateMatcher=r,this._parentForm=s,this._parentFormGroup=e,this.ngControl=t,this.stateChanges=new C}})))),pi=(()=>{let r=class r extends xt{_scrollOptionIntoView(e){let t=this.options.toArray()[e];if(t){let i=this.panel.nativeElement,a=Ye(e,this.options,this.optionGroups),o=t._getHostElement();e===0&&a===1?i.scrollTop=0:i.scrollTop=Xe(o.offsetTop,o.offsetHeight,i.scrollTop,i.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(e){return new te(this,e)}get focused(){return this._focused||this._panelOpen}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=b(e),this._syncParentProperties()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}get required(){return this._required??this.ngControl?.control?.hasValidator(Ie.required)??!1}set required(e){this._required=b(e),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(e){this._selectionModel,this._multiple=b(e)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(e){this._disableOptionCentering=b(e)}get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this._assignValue(e)&&this._onChange(e)}get typeaheadDebounceInterval(){return this._typeaheadDebounceInterval}set typeaheadDebounceInterval(e){this._typeaheadDebounceInterval=Te(e)}get id(){return this._id}set id(e){this._id=e||this._uid,this.stateChanges.next()}constructor(e,t,i,a,o,p,c,rt,st,ot,lt,ct,dt,R){super(o,a,c,rt,ot),this._viewportRuler=e,this._changeDetectorRef=t,this._ngZone=i,this._dir=p,this._parentFormField=st,this._liveAnnouncer=dt,this._defaultOptions=R,this._positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}],this._panelOpen=!1,this._compareWith=(d,F)=>d===F,this._uid=`mat-select-${at++}`,this._triggerAriaLabelledBy=null,this._destroy=new C,this._onChange=()=>{},this._onTouched=()=>{},this._valueId=`mat-select-value-${at++}`,this._panelDoneAnimatingStream=new C,this._overlayPanelClass=this._defaultOptions?.overlayPanelClass||"",this._focused=!1,this.controlType="mat-select",this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this._multiple=!1,this._disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1,this.ariaLabel="",this.panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto",this.optionSelectionChanges=ie(()=>{let d=this.options;return d?d.changes.pipe(W(d),B(()=>O(...d.map(F=>F.onSelectionChange)))):this._ngZone.onStable.pipe(V(1),B(()=>this.optionSelectionChanges))}),this.openedChange=new w,this._openedStream=this.openedChange.pipe(L(d=>d),P(()=>{})),this._closedStream=this.openedChange.pipe(L(d=>!d),P(()=>{})),this.selectionChange=new w,this.valueChange=new w,this._trackedModal=null,this._skipPredicate=d=>this.panelOpen?!1:d.disabled,this.ngControl&&(this.ngControl.valueAccessor=this),R?.typeaheadDebounceInterval!=null&&(this._typeaheadDebounceInterval=R.typeaheadDebounceInterval),this._scrollStrategyFactory=ct,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(lt)||0,this.id=this.id}ngOnInit(){this._selectionModel=new Le(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(ae(),m(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen)),this._viewportRuler.change().pipe(m(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges())})}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(m(this._destroy)).subscribe(e=>{e.added.forEach(t=>t.select()),e.removed.forEach(t=>t.deselect())}),this.options.changes.pipe(W(null),m(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){let e=this._getTriggerAriaLabelledby(),t=this.ngControl;if(e!==this._triggerAriaLabelledBy){let i=this._elementRef.nativeElement;this._triggerAriaLabelledBy=e,e?i.setAttribute("aria-labelledby",e):i.removeAttribute("aria-labelledby")}t&&(this._previousControl!==t.control&&(this._previousControl!==void 0&&t.disabled!==null&&t.disabled!==this.disabled&&(this.disabled=t.disabled),this._previousControl=t.control),this.updateErrorState())}ngOnChanges(e){(e.disabled||e.userAriaDescribedBy)&&this.stateChanges.next(),e.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this._typeaheadDebounceInterval)}ngOnDestroy(){this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete(),this._clearFromModal()}toggle(){this.panelOpen?this.close():this.open()}open(){this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._canOpen()&&(this._applyModalPanelOwnership(),this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck()),this.stateChanges.next()}_applyModalPanelOwnership(){let e=this._elementRef.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!e)return;let t=`${this.id}-panel`;this._trackedModal&&$(this._trackedModal,"aria-owns",t),Ee(e,"aria-owns",t),this._trackedModal=e}_clearFromModal(){if(!this._trackedModal)return;let e=`${this.id}-panel`;$(this._trackedModal,"aria-owns",e),this._trackedModal=null}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched()),this.stateChanges.next()}writeValue(e){this._assignValue(e)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){let e=this._selectionModel.selected.map(t=>t.viewValue);return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue}_isRtl(){return this._dir?this._dir.value==="rtl":!1}_handleKeydown(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e))}_handleClosedKeydown(e){let t=e.keyCode,i=t===40||t===38||t===37||t===39,a=t===13||t===32,o=this._keyManager;if(!o.isTyping()&&a&&!U(e)||(this.multiple||e.altKey)&&i)e.preventDefault(),this.open();else if(!this.multiple){let p=this.selected;o.onKeydown(e);let c=this.selected;c&&p!==c&&this._liveAnnouncer.announce(c.viewValue,1e4)}}_handleOpenKeydown(e){let t=this._keyManager,i=e.keyCode,a=i===40||i===38,o=t.isTyping();if(a&&e.altKey)e.preventDefault(),this.close();else if(!o&&(i===13||i===32)&&t.activeItem&&!U(e))e.preventDefault(),t.activeItem._selectViaInteraction();else if(!o&&this._multiple&&i===65&&e.ctrlKey){e.preventDefault();let p=this.options.some(c=>!c.disabled&&!c.selected);this.options.forEach(c=>{c.disabled||(p?c.select():c.deselect())})}else{let p=t.activeItemIndex;t.onKeydown(e),this._multiple&&a&&e.shiftKey&&t.activeItem&&t.activeItemIndex!==p&&t.activeItem._selectViaInteraction()}}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this._overlayDir.positionChange.pipe(V(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()})}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(e){if(this.options.forEach(t=>t.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&e)Array.isArray(e),e.forEach(t=>this._selectOptionByValue(t)),this._sortValues();else{let t=this._selectOptionByValue(e);t?this._keyManager.updateActiveItem(t):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(e){let t=this.options.find(i=>{if(this._selectionModel.isSelected(i))return!1;try{return i.value!=null&&this._compareWith(i.value,e)}catch{return!1}});return t&&this._selectionModel.select(t),t}_assignValue(e){return e!==this._value||this._multiple&&Array.isArray(e)?(this.options&&this._setSelectionByValue(e),this._value=e,!0):!1}_getOverlayWidth(e){return this.panelWidth==="auto"?(e instanceof T?e.elementRef:e||this._elementRef).nativeElement.getBoundingClientRect().width:this.panelWidth===null?"":this.panelWidth}_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}_initKeyManager(){this._keyManager=new Re(this.options).withTypeAhead(this._typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){let e=O(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(m(e)).subscribe(t=>{this._onSelect(t.source,t.isUserInput),t.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),O(...this.options.map(t=>t._stateChanges)).pipe(m(e)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(e,t){let i=this._selectionModel.isSelected(e);e.value==null&&!this._multiple?(e.deselect(),this._selectionModel.clear(),this.value!=null&&this._propagateChanges(e.value)):(i!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),t&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),t&&this.focus())),i!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){let e=this.options.toArray();this._selectionModel.sort((t,i)=>this.sortComparator?this.sortComparator(t,i,e):e.indexOf(t)-e.indexOf(i)),this.stateChanges.next()}}_propagateChanges(e){let t;this.multiple?t=this.selected.map(i=>i.value):t=this.selected?this.selected.value:e,this._value=t,this.valueChange.emit(t),this._onChange(t),this.selectionChange.emit(this._getChangeEvent(t)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let e=-1;for(let t=0;t<this.options.length;t++)if(!this.options.get(t).disabled){e=t;break}this._keyManager.setActiveItem(e)}else this._keyManager.setActiveItem(this._selectionModel.selected[0])}_canOpen(){return!this._panelOpen&&!this.disabled&&this.options?.length>0}focus(e){this._elementRef.nativeElement.focus(e)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId(),t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId(),t=(e?e+" ":"")+this._valueId;return this.ariaLabelledby&&(t+=" "+this.ariaLabelledby),t}_panelDoneAnimating(e){this.openedChange.emit(e)}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}};r.\u0275fac=function(t){return new(t||r)(l(Ve),l(pe),l(me),l(He),l(he),l(Pe,8),l(Ae,8),l(De,8),l($e,8),l(xe,10),de("tabindex"),l(nt),l(Fe),l(St,8))},r.\u0275cmp=se({type:r,selectors:[["mat-select"]],contentQueries:function(t,i,a){if(t&1&&(x(a,It,5),x(a,ze,5),x(a,Qe,5)),t&2){let o;f(o=y())&&(i.customTrigger=o.first),f(o=y())&&(i.options=o),f(o=y())&&(i.optionGroups=o)}},viewQuery:function(t,i){if(t&1&&(I(ut,5),I(_t,5),I(E,5)),t&2){let a;f(a=y())&&(i.trigger=a.first),f(a=y())&&(i.panel=a.first),f(a=y())&&(i._overlayDir=a.first)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox","ngSkipHydration","",1,"mat-mdc-select"],hostVars:19,hostBindings:function(t,i){t&1&&v("keydown",function(o){return i._handleKeydown(o)})("focus",function(){return i._onFocus()})("blur",function(){return i._onBlur()}),t&2&&(S("id",i.id)("tabindex",i.tabIndex)("aria-controls",i.panelOpen?i.id+"-panel":null)("aria-expanded",i.panelOpen)("aria-label",i.ariaLabel||null)("aria-required",i.required.toString())("aria-disabled",i.disabled.toString())("aria-invalid",i.errorState)("aria-activedescendant",i._getAriaActiveDescendant()),_e("mat-mdc-select-disabled",i.disabled)("mat-mdc-select-invalid",i.errorState)("mat-mdc-select-required",i.required)("mat-mdc-select-empty",i.empty)("mat-mdc-select-multiple",i.multiple))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex",userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",hideSingleSelectionIndicator:"hideSingleSelectionIndicator",placeholder:"placeholder",required:"required",multiple:"multiple",disableOptionCentering:"disableOptionCentering",compareWith:"compareWith",value:"value",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:"typeaheadDebounceInterval",sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],features:[Ce([{provide:Ue,useExisting:r},{provide:Ge,useExisting:r}]),ue,le],ngContentSelectors:Ot,decls:11,vars:8,consts:[["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],[1,"mat-mdc-select-value"],["class","mat-mdc-select-placeholder mat-mdc-select-min-line"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth","backdropClick","attach","detach"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(t,i){if(t&1&&(ve(Ct),h(0,"div",0,1),v("click",function(){return i.toggle()}),h(3,"div",2),k(4,gt,2,1,"span",3)(5,vt,3,1),_(),h(6,"div",4)(7,"div",5),N(),h(8,"svg",6),fe(9,"path",7),_()()()(),k(10,bt,3,9,"ng-template",8),v("backdropClick",function(){return i.close()})("attach",function(){return i._onAttached()})("detach",function(){return i.close()})),t&2){let a=be(1);u(3),S("id",i._valueId),u(1),H(4,i.empty?4:5),u(6),q("cdkConnectedOverlayPanelClass",i._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",i._scrollStrategy)("cdkConnectedOverlayOrigin",i._preferredOverlayOrigin||a)("cdkConnectedOverlayOpen",i.panelOpen)("cdkConnectedOverlayPositions",i._positions)("cdkConnectedOverlayWidth",i._overlayWidth)}},dependencies:[Oe,E,T],styles:['.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color);font-family:var(--mat-select-trigger-text-font);line-height:var(--mat-select-trigger-text-line-height);font-size:var(--mat-select-trigger-text-size);font-weight:var(--mat-select-trigger-text-weight);letter-spacing:var(--mat-select-trigger-text-tracking)}.mat-mdc-select-disabled{color:var(--mat-select-disabled-trigger-text-color)}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:translateY(-8px)}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color)}.mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--mat-select-focused-arrow-color)}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow{color:var(--mat-select-invalid-arrow-color)}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:var(--mat-select-disabled-arrow-color)}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:GrayText}div.mat-mdc-select-panel{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12);width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-select-panel-background-color)}.cdk-high-contrast-active div.mat-mdc-select-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) div.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);color:var(--mat-select-placeholder-text-color)}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}'],encapsulation:2,data:{animation:[Mt.transformPanel]},changeDetection:0});let n=r;return n})();var mi=(()=>{let r=class r{};r.\u0275fac=function(t){return new(t||r)},r.\u0275mod=oe({type:r}),r.\u0275inj=ne({providers:[kt],imports:[Me,Be,ee,J,We,Ze,ee,J]});let n=r;return n})();export{pi as a,mi as b};
@@ -0,0 +1 @@
1
+ var i=function(o){return o.SHOOPE="//res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png",o.WOOCOMMERCE="//res.cloudinary.com/pos/image/upload/w_50/v1632447439/icons/WooCommerce/woocommerce-icon.webp",o.TOKOPEDIA="//res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png",o.TIKTOK="//res.cloudinary.com/pos/image/upload/w_30/v1645761611/icons/Marketplace%20logo/tiktok.png",o.LAZADA="//res.cloudinary.com/pos/image/upload/v1680681836/icons/marketplace_icons/Lazadanew.png",o.KALCARE="//res.cloudinary.com/pos/image/upload/v1654230268/icons/marketplace_icons/kalcare.png",o}(i||{});var t=function(o){return o[o.Shopee=0]="Shopee",o[o.Tokopedia=1]="Tokopedia",o[o.WooCommerce=2]="WooCommerce",o[o.None=3]="None",o[o.KalCare=4]="KalCare",o[o.ShopeeV2=5]="ShopeeV2",o[o.Tiktok=6]="Tiktok",o[o.Lazada=7]="Lazada",o}(t||{});var l=(()=>{let s=class s{static IsNotEmpty(a){return a!=""&&a!=s.GuidEMpty&&a!=null&&a!=null}static IsEmpty(a){return a==""||a==null||a==null||a==s.GuidEMpty}static getChannelLogoByTypeId(a){let e;switch(a){case t.Tokopedia:e=i.TOKOPEDIA;break;case t.ShopeeV2:e=i.SHOOPE;break;case t.WooCommerce:e=i.WOOCOMMERCE;break;case t.Lazada:e=i.LAZADA;break;case t.Tiktok:e=i.TIKTOK;break;case t.KalCare:e=i.KALCARE;break}return e}static getChannelLogoByName(a=""){a=a.toLowerCase();let e;switch(a){case"tokopedia":e=i.TOKOPEDIA;break;case"shoppe":e=i.SHOOPE;break;case"woocommerce":e=i.WOOCOMMERCE;break;case"tiktok":e=i.TIKTOK;break;case"lazada":e=i.LAZADA;break;case"kalCare":e=i.KALCARE;break}return e}static getChannelName(a){let e;switch(a){case t.ShopeeV2:e="Shopee";break;case t.Tokopedia:e="Tokopedia";break;case t.Lazada:e="Lazada";break;case t.Tiktok:e="Tiktok";break;case t.WooCommerce:e="WooCommerce";break;case t.KalCare:e="WooCommerce";break}return e}static assignChannelLogo(a){return a=a.map(e=>(e.logo=this.getChannelLogoByTypeId(e.TypeID),e)),a}static getCssChannelColor(a){let e;switch(a){case t.ShopeeV2:e="#ee4d2d";break;case t.Tokopedia:e="var(--G500,#03AC0E)";break;case t.Lazada:e="#FF00B2";break;case t.Tiktok:e="black";break;case t.WooCommerce:e="#674399";break;case t.KalCare:e="rgb(128, 188, 0)";break}return e}static getDaysDiff(a,e){var r=e.getTime()-a.getTime(),c=r/(1e3*60*60*24);return c}static addDays(a,e){let r=new Date(Number(a));return r.setDate(a.getDate()-e),r}static isValidDate(a){return a instanceof Date&&!isNaN(a)}static getImageInfo(a){return new Promise((e,r)=>{let c=new Image;c.src=a,c.decode().then(()=>{e({img:a,height:c.height,width:c.width})}).catch(()=>{r(new Error(`Image load error for ${a}`))})})}static formatTitleFromDate(a,e){let r=null,c=new Date(a),d=new Date(e);return c.getDate()!=d.getDate()&&(r="dd"),c.getMonth()!=d.getMonth()&&(r="dd MMM"),c.getFullYear()!=d.getFullYear()&&(r="dd MMM yyyy"),r}static openDownloadFile(a,e){var r=window.URL.createObjectURL(a),c=document.createElement("a");c.href=r,c.download=e,c.click()}static compare(a,e,r){return(a<e?-1:1)*(r?1:-1)}};s.GuidEMpty="00000000-0000-0000-0000-000000000000",s.MinDate="0001-01-01T00:00:00";let o=s;return o})();export{i as a,t as b,l as c};
@@ -0,0 +1 @@
1
+ import{a as R}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-IJ3WNDAP.js";import{t as N,u as z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-YZHBBFDR.js";import{u as F}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-UUMW24BF.js";import{c as V}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-GAMNBDJD.js";import{$a as x,Ea as i,Fa as T,Ia as w,Jb as I,Ma as Z,Na as c,Ta as s,Vb as O,Xb as U,Ya as a,Yb as B,Za as l,_a as m,ab as v,cb as C,da as k,dc as D,gb as f,gc as $,ia as _,ib as p,ja as h,lb as j,nb as P,ob as g,pb as b,qb as S,rb as L,tb as M,vb as y,ya as u}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.1/Marketplace/chunk-LWR5YJ24.js";function q(e,o){if(e&1){let t=C();x(0),a(1,"img",19),f("click",function(n){_(t);let d=p();return h(d.openBiggerPicture(n))}),l(),v()}if(e&2){let t=p();i(1),c("src",t.image,u)}}function G(e,o){e&1&&m(0,"img",20)}function Q(e,o){if(e&1&&(x(0),a(1,"span",24)(2,"a",25),m(3,"i",26),l()(),v()),e&2){let t=p(2);i(2),c("href",t.redirectUrl,u)}}function X(e,o){if(e&1&&(a(0,"div",21),m(1,"i",22),a(2,"span"),g(3),l(),s(4,Q,4,1,"ng-container",23),l()),e&2){let t=p();i(3),b(t.code),i(1),c("ngIf",t.code!=="SKU not assigned"&&t.showRedirectIcon)}}function Y(e,o){if(e&1){let t=C();a(0,"div",27),f("click",function(){_(t);let n=p();return h(n.onEventDesc())}),m(1,"i",28),a(2,"span"),g(3),l()()}if(e&2){let t=p();i(3),b(t.description)}}function ee(e,o){if(e&1){let t=C();a(0,"div",29)(1,"input",30),f("change",function(n){_(t);let d=p();return h(d.onCheck(n.target.checked))}),l()()}}function te(e,o){if(e&1){let t=C();a(0,"button",31),f("click",function(){_(t);let n=p();return h(n.onDownload())}),m(1,"i",32),g(2," Download "),l()}}function ne(e,o){if(e&1){let t=C();a(0,"button",31),f("click",function(){_(t);let n=p();return h(n.onUpload())}),m(1,"i",33),g(2," Upload "),l()}}function ie(e,o){if(e&1){let t=C();a(0,"button",34),f("click",function(){_(t);let n=p();return h(n.onScan())}),m(1,"i",35),g(2," Scan "),l()}}var oe=e=>({"me-3":e});function re(e,o){if(e&1&&(x(0),a(1,"a",37),m(2,"img",38),l(),v()),e&2){let t=o.$implicit,r=o.index,n=p(2);i(1),j("href",t.Url,u),i(1),c("ngClass",y(4,oe,r!=n.channels.length-1))("src",n.getChannelLogo(t),u)("matTooltip",t.Title?t.Title:t.Name)}}function ae(e,o){if(e&1&&(x(0),s(1,re,3,6,"ng-container",36),v()),e&2){let t=p();i(1),c("ngForOf",t.channels)}}var ce=e=>({"border-bottom pb-2":e});function le(e,o){if(e&1&&(a(0,"li")(1,"div",42)(2,"div",43)(3,"a",37),m(4,"img",44),a(5,"span",45),g(6),l()()()()()),e&2){let t=o.$implicit,r=o.index,n=p(2);i(2),c("ngClass",y(4,ce,r!=n.channels.length-1)),i(1),c("href",t.Url,u),i(1),c("src",n.getChannelLogo(t),u),i(2),b(t.Title)}}function de(e,o){if(e&1&&(a(0,"div",39)(1,"button",40),g(2),l(),a(3,"ul",41),s(4,le,7,6,"li",36),l()()),e&2){let t=p();i(2),S(" ",t.channels.length," CHANNELS "),i(2),c("ngForOf",t.channels)}}var Se=(()=>{let o=class o{constructor(r){this.biggerPictureService=r,this.uploadButton=!1,this.scanButton=!1,this.showCheckBox=!1,this.downloadButton=!1,this.hasZoom=!0,this.showRedirectIcon=!0,this.onUploadEvent=new w,this.onScanEvent=new w,this.checkBoxChange=new w,this.onDescEvent=new w,this.onDownloadEvent=new w}ngAfterContentInit(){this.initRedirectUrl()}initRedirectUrl(){let r=localStorage.getItem("Authorization"),n=JSON.parse(r)?.Host;this.redirectUrl=`https://${n}/menu/Products/Catalog/Products/Info?ID=${this.productId}`}onUpload(){this.onUploadEvent.emit()}onScan(){this.onScanEvent.emit()}onCheck(r){this.checkBoxChange.emit(r)}onEventDesc(){this.onDescEvent.emit()}onDownload(){this.onDownloadEvent.emit()}getChannelLogo(r){return V.getChannelLogoByTypeId(r.TypeID)}openBiggerPicture(r){this.biggerPictureService.openBiggerPicture(r,this.imageForZoom)}};o.\u0275fac=function(n){return new(n||o)(T(R))},o.\u0275cmp=k({type:o,selectors:[["app-product-card"]],inputs:{productId:"productId",uploadButton:"uploadButton",scanButton:"scanButton",showCheckBox:"showCheckBox",downloadButton:"downloadButton",image:"image",title:"title",code:"code",description:"description",channels:"channels",check:"check",imageForZoom:"imageForZoom",hasZoom:"hasZoom",showRedirectIcon:"showRedirectIcon"},outputs:{onUploadEvent:"onUpload",onScanEvent:"onScan",checkBoxChange:"onCheckBoxChange",onDescEvent:"onDescEvent",onDownloadEvent:"onDownload"},standalone:!0,features:[M],decls:26,vars:11,consts:[[1,"card",2,"margin-bottom","0px"],[1,"card-body","py-6"],[1,"row"],[1,"col-4"],[1,"productUpload_defaultSize","me-2","image-upload"],[1,"imgContainer"],[4,"ngIf","ngIfElse"],["elsePic",""],[1,"col-7","d-inline-block","justify-content-between","gx-0",2,"padding-left","0px"],[1,"itemTitle","cursor-pointer",3,"click"],["class","description cursor-pointer",4,"ngIf"],["class","description cursor-pointer",3,"click",4,"ngIf"],[1,"col-1","gx-0","d-flex","justify-content-center"],[1,"text-end"],["class","text-end gx-0",4,"ngIf"],[1,"card-footer","d-flex","justify-content-between","py-5","bg-footer","align-items-center",2,"border-top","0.1px solid rgb(220 220 220)"],["class","fs-6 btn btn-light btn-sm me-3",3,"click",4,"ngIf"],["class","fs-6 btn btn-light btn-sm",3,"click",4,"ngIf"],["DROPDOWN",""],[1,"rounded","imgUpload","float-left",3,"src","click"],["src","https://res.cloudinary.com/pos/image/upload/w_110/POS/Images/Icon/products_thumb.png",1,"rounded","float-left","imgUpload"],[1,"description","cursor-pointer"],[1,"fa","fa-barcode","me-2"],[4,"ngIf"],[1,"ms-2"],["target","_blank",2,"color","#0976b4",3,"href"],[1,"fas","fa-external-link-alt"],[1,"description","cursor-pointer",3,"click"],[1,"fa","fa-tag","me-2"],[1,"text-end","gx-0"],["type","checkbox",3,"change"],[1,"fs-6","btn","btn-light","btn-sm","me-3",3,"click"],["aria-hidden","true",1,"fa","fa-download"],["aria-hidden","true",1,"fa","fa-upload"],[1,"fs-6","btn","btn-light","btn-sm",3,"click"],[1,"fa","fa-spinner"],[4,"ngFor","ngForOf"],["target","_blank",3,"href"],["alt","",1,"img-logo",3,"ngClass","src","matTooltip"],[1,"dropdown"],["type","button","id","dropdownMenuButton1","data-bs-toggle","dropdown","aria-expanded","false",1,"btn","fs-6","btn-sm","btn-light","dropdown-toggle"],[1,"dropdown-menu"],[1,"dropdown-item","py-2",2,"cursor","pointer"],[3,"ngClass"],[1,"img-logo",3,"src"],[1,"ms-4"]],template:function(n,d){if(n&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),s(6,q,2,1,"ng-container",6)(7,G,1,0,"ng-template",null,7,I),l()()(),a(9,"div",8)(10,"h4",9),f("click",function(){return d.onEventDesc()}),g(11),l(),s(12,X,5,2,"div",10)(13,Y,4,1,"div",11),l(),a(14,"div",12)(15,"div",13),s(16,ee,2,0,"div",14),l()()()(),a(17,"div",15)(18,"div"),s(19,te,3,0,"button",16)(20,ne,3,0,"button",16)(21,ie,3,0,"button",17),l(),a(22,"div"),s(23,ae,2,1,"ng-container",6)(24,de,5,2,"ng-template",null,18,I),l()()()),n&2){let E=P(8),A=P(25);i(6),c("ngIf",d.image)("ngIfElse",E),i(5),S(" ",d.title," "),i(1),c("ngIf",d.code),i(1),c("ngIf",d.description),i(3),c("ngIf",d.showCheckBox),i(3),c("ngIf",d.downloadButton),i(1),c("ngIf",d.uploadButton),i(1),c("ngIf",d.scanButton),i(2),c("ngIf",d.channels.length<4)("ngIfElse",A)}},dependencies:[D,O,U,B,F,z,N],styles:[".img-logo[_ngcontent-%COMP%]{height:24px;width:24px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;max-width:100%}.bg-footer[_ngcontent-%COMP%]{background-color:#ededed69}.description[_ngcontent-%COMP%]{font-weight:300;margin-left:2px}.productUpload_defaultSize[_ngcontent-%COMP%]{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}.image-upload[_ngcontent-%COMP%]{position:relative}.imgContainer[_ngcontent-%COMP%]{width:100%;height:100px}.imgUpload[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:scale-down;cursor:pointer}.dropdown[_ngcontent-%COMP%] .dropdown-menu.show[_ngcontent-%COMP%]{top:unset!important}"]});let e=o;return e})();function pe(e,o){if(e&1){let t=C();x(0),a(1,"img",14),f("click",function(n){_(t);let d=p();return h(d.onZoomImage(n))}),l(),v()}if(e&2){let t=p();i(1),c("ngSrc",t.image)("fill",!0)}}function me(e,o){e&1&&m(0,"img",15),e&2&&c("fill",!0)}function se(e,o){if(e&1&&(a(0,"div",16),m(1,"i",17),a(2,"span"),g(3),l()()),e&2){let t=p();i(3),b(t.code)}}var ge=e=>({"border-bottom":e});function ue(e,o){if(e&1&&(x(0),a(1,"div",27)(2,"div",28),g(3),l(),a(4,"div")(5,"a",29),m(6,"i",30),l()()(),v()),e&2){let t=o.$implicit,r=o.index,n=p().$implicit;i(1),c("ngClass",y(4,ge,r!==(n==null?null:n.Variants.length)-1)),i(2),L(" ",t.ProductName," - ",t.Name," "),i(2),c("href",t.URL,u)}}var fe=e=>({"border-bottom-0":e});function _e(e,o){if(e&1&&(a(0,"div",18)(1,"h2",19)(2,"button",20)(3,"div",21),m(4,"img",22),a(5,"span",23),g(6),l()()()(),a(7,"div",24)(8,"div",25),s(9,ue,7,6,"ng-container",26),l()()()),e&2){let t=o.$implicit,r=o.index,n=p();c("ngClass",y(10,fe,n.channels.length-1==r)),i(1),c("id","heading"+r+n.code+n.id),i(1),Z("data-bs-target","#collapse"+r+n.code+n.id)("aria-controls","#collapse"+r+n.code+n.id),i(2),c("src",n.getChannelLogo(t.TypeID),u),i(1),c("matTooltip",(t==null||t.ChannelName==null?null:t.ChannelName.length)>30?t.ChannelName:""),i(1),b(t.ChannelName),i(1),c("id","collapse"+r+n.code+n.id),Z("aria-labelledby","heading"+r+n.code+n.id),i(2),c("ngForOf",t.Variants)}}var Oe=(()=>{let o=class o{constructor(r){this.biggerPictureService=r}getChannelLogo(r){return V.getChannelLogoByTypeId(r)}onZoomImage(r){this.biggerPictureService.openBiggerPicture(r,this.imageForZoom)}};o.\u0275fac=function(n){return new(n||o)(T(R))},o.\u0275cmp=k({type:o,selectors:[["app-duplicate-product-card"]],inputs:{image:"image",imageForZoom:"imageForZoom",title:"title",code:"code",channels:"channels",id:"id"},standalone:!0,features:[M],decls:16,vars:5,consts:[[1,"card"],[1,"card-body","py-6"],[1,"row"],[1,"col-4"],[1,"productUpload_defaultSize","me-2","image-upload"],[1,"imgContainer"],[4,"ngIf","ngIfElse"],["elsePic",""],[1,"col-8","d-inline-block","justify-content-between","gx-0",2,"padding-left","0px"],[1,"itemTitle"],["class","description",4,"ngIf"],[1,"card-footer",2,"padding-left","0px","padding-right","0px"],["id","accordionParent",1,"accordion","accordion-flush"],["class","accordion-item border-start-0 border-end-0",3,"ngClass",4,"ngFor","ngForOf"],[1,"rounded","imgUpload","float-left","cursor-pointer",3,"ngSrc","fill","click"],["ngSrc","//res.cloudinary.com/pos/image/upload/w_110/POS/Images/Icon/products_thumb.png",1,"rounded","float-left","imgUpload",3,"fill"],[1,"description"],[1,"fa","fa-barcode","me-2"],[1,"accordion-item","border-start-0","border-end-0",3,"ngClass"],[1,"accordion-header",3,"id"],["type","button","data-bs-toggle","collapse","aria-expanded","true",1,"accordion-button","collapsed",2,"height","40px"],[1,"d-flex","align-items-center","justify-content-start","w-100"],["alt","",1,"channel-logo",3,"src"],[1,"fs-4","ps-4","text-ellipsis",2,"max-width","13vw",3,"matTooltip"],["data-bs-parent","#accordionParent",1,"accordion-collapse","collapse",3,"id"],[1,"accordion-body",2,"padding-top","0px","padding-bottom","0px"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","align-items-center","py-4",3,"ngClass"],[1,"text-ellipsis"],["target","_blank",1,"text-secondary",3,"href"],[1,"fa","fa-external-link-alt"]],template:function(n,d){if(n&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),s(6,pe,2,2,"ng-container",6)(7,me,1,1,"ng-template",null,7,I),l()()(),a(9,"div",8)(10,"h4",9),g(11),l(),s(12,se,4,1,"div",10),l()()(),a(13,"div",11)(14,"div",12),s(15,_e,10,12,"div",13),l()()()),n&2){let E=P(8);i(6),c("ngIf",d.image)("ngIfElse",E),i(5),S(" ",d.title," "),i(1),c("ngIf",d.code),i(3),c("ngForOf",d.channels)}},dependencies:[D,O,U,B,F,z,N,$],styles:[`.productUpload_defaultSize[_ngcontent-%COMP%]{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}.image-upload[_ngcontent-%COMP%]{position:relative}.imgContainer[_ngcontent-%COMP%]{width:100%;height:100px}.imgUpload[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:scale-down}.channel-logo[_ngcontent-%COMP%]{width:18px;height:18px}.accordion-button[_ngcontent-%COMP%]{background-color:#ededed69!important}.accordion-button[_ngcontent-%COMP%]:not(.collapsed){background-color:#ededed69!important;color:#333}.accordion-button[_ngcontent-%COMP%]:after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333333'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e")}.accordion-button[_ngcontent-%COMP%]:focus{box-shadow:none!important}.card[_ngcontent-%COMP%]{margin-bottom:0!important}`]});let e=o;return e})();export{Se as a,Oe as b};