marketplacepos 3.9.2 → 3.9.4

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 (70) hide show
  1. package/Marketplace/{chunk-LSG32F4X.js → chunk-35SISJKC.js} +1 -1
  2. package/Marketplace/{chunk-WDVFAXEE.js → chunk-3KO3N6JP.js} +1 -1
  3. package/Marketplace/{chunk-2GEKKULX.js → chunk-3OMVIKHK.js} +1 -1
  4. package/Marketplace/{chunk-GIXQOMAF.js → chunk-44TEKK34.js} +1 -1
  5. package/Marketplace/chunk-4VWZIBEC.js +1 -0
  6. package/Marketplace/{chunk-XH2RYIXU.js → chunk-5F2YQ7XL.js} +1 -1
  7. package/Marketplace/{chunk-62YVBX6C.js → chunk-5K7YSLKL.js} +1 -1
  8. package/Marketplace/{chunk-PEROEQOW.js → chunk-5XEX4Z6N.js} +1 -1
  9. package/Marketplace/{chunk-YWSTU35G.js → chunk-5YDKDDXQ.js} +2 -2
  10. package/Marketplace/{chunk-QC2RB3LW.js → chunk-673XNROP.js} +1 -1
  11. package/Marketplace/{chunk-PTD6INQZ.js → chunk-6O46WM77.js} +1 -1
  12. package/Marketplace/{chunk-A4NDARMD.js → chunk-7F3GACIE.js} +1 -1
  13. package/Marketplace/{chunk-YMW3PRQO.js → chunk-7F4OMKVB.js} +1 -1
  14. package/Marketplace/{chunk-6GHDH7BV.js → chunk-AI77CZ3S.js} +1 -1
  15. package/Marketplace/{chunk-3MUKJETU.js → chunk-AOQBLGBU.js} +1 -1
  16. package/Marketplace/{chunk-USTIBZQZ.js → chunk-BFJBMKDS.js} +1 -1
  17. package/Marketplace/{chunk-DR77LMQ5.js → chunk-BPOHVA6C.js} +1 -1
  18. package/Marketplace/{chunk-42URWJWL.js → chunk-BZT72IIB.js} +1 -1
  19. package/Marketplace/{chunk-KPVSCTPE.js → chunk-CFWKH54E.js} +1 -1
  20. package/Marketplace/{chunk-MNQTYXTP.js → chunk-CXQFJUAW.js} +1 -1
  21. package/Marketplace/{chunk-6TL753XX.js → chunk-D4PUISDS.js} +1 -1
  22. package/Marketplace/{chunk-WGRN55OQ.js → chunk-DG2DUPHG.js} +1 -1
  23. package/Marketplace/{chunk-DAOVB2Q7.js → chunk-DOMXTGO5.js} +1 -1
  24. package/Marketplace/{chunk-MSDWP3Z5.js → chunk-DR4WIP6T.js} +1 -1
  25. package/Marketplace/chunk-EEKM3HHQ.js +1 -0
  26. package/Marketplace/{chunk-TTTBABPM.js → chunk-GVJVVJCU.js} +1 -1
  27. package/Marketplace/{chunk-UU4FCLSH.js → chunk-IIGTCNJI.js} +1 -1
  28. package/Marketplace/{chunk-NUQYRQUS.js → chunk-IL3R7THF.js} +1 -1
  29. package/Marketplace/{chunk-ZOAWBPA4.js → chunk-J7N5VFE6.js} +1 -1
  30. package/Marketplace/{chunk-HWGOH7QS.js → chunk-L72SNBKA.js} +1 -1
  31. package/Marketplace/{chunk-5MVSVVTZ.js → chunk-LFB6AUP4.js} +1 -1
  32. package/Marketplace/{chunk-P5FK7XH7.js → chunk-M7ZLTUVL.js} +1 -1
  33. package/Marketplace/{chunk-NDL2OQM7.js → chunk-MICIQBL4.js} +1 -1
  34. package/Marketplace/{chunk-AYOR2E3R.js → chunk-MUDZXRNT.js} +1 -1
  35. package/Marketplace/{chunk-5KWI6CNM.js → chunk-MWOXQU66.js} +1 -1
  36. package/Marketplace/{chunk-253CGPDL.js → chunk-NA7DMV7H.js} +1 -1
  37. package/Marketplace/{chunk-TH3YEBZM.js → chunk-NFHX3EWZ.js} +1 -1
  38. package/Marketplace/{chunk-LLITFBOE.js → chunk-O6PGRAJA.js} +1 -1
  39. package/Marketplace/{chunk-K2D3HYO3.js → chunk-OVSLUEIO.js} +1 -1
  40. package/Marketplace/{chunk-X7OCPOXW.js → chunk-QDC2JFGY.js} +1 -1
  41. package/Marketplace/{chunk-XBFPNQRE.js → chunk-QVEJEIWR.js} +1 -1
  42. package/Marketplace/{chunk-TEMOBJ6P.js → chunk-RISMLJLZ.js} +1 -1
  43. package/Marketplace/{chunk-CQDJKHRJ.js → chunk-SMF6UCR5.js} +1 -1
  44. package/Marketplace/{chunk-T726PSLZ.js → chunk-TVKWMJ24.js} +1 -1
  45. package/Marketplace/{chunk-HTEDNGSI.js → chunk-UYW3YL3H.js} +1 -1
  46. package/Marketplace/{chunk-MU6WSNWI.js → chunk-V74TRO5C.js} +1 -1
  47. package/Marketplace/{chunk-ZKFCU6QY.js → chunk-VTLJVEYF.js} +1 -1
  48. package/Marketplace/{chunk-3ADBD6TU.js → chunk-VVTMP7TD.js} +1 -1
  49. package/Marketplace/{chunk-OGZ4S2OZ.js → chunk-W2SKBEUZ.js} +1 -1
  50. package/Marketplace/{chunk-5G6F6KM6.js → chunk-W6HDGIZB.js} +1 -1
  51. package/Marketplace/{chunk-RB4PODHN.js → chunk-WHZLZBWD.js} +1 -1
  52. package/Marketplace/{chunk-OHUTMYI3.js → chunk-WMKNIYJG.js} +1 -1
  53. package/Marketplace/{chunk-JZNKYXRR.js → chunk-WTNHPIXD.js} +1 -1
  54. package/Marketplace/{chunk-NO7WERYV.js → chunk-XBCSTQJ3.js} +1 -1
  55. package/Marketplace/{chunk-7NUYZDNH.js → chunk-YAWRXDGC.js} +1 -1
  56. package/Marketplace/{chunk-7DWQVDUN.js → chunk-Z7PAAM54.js} +1 -1
  57. package/Marketplace/{chunk-WOVAE35N.js → chunk-ZIANW63Q.js} +1 -1
  58. package/Marketplace/{chunk-KES3BFYS.js → chunk-ZKY4MRMH.js} +1 -1
  59. package/Marketplace/{chunk-VK5MBCEQ.js → chunk-ZNIAYABL.js} +1 -1
  60. package/Marketplace/index.html +2 -2
  61. package/Marketplace/{main-A64TEOJA.js → main-5EL5X5GA.js} +1 -1
  62. package/Marketplace/{styles-XF7HDZPE.css → styles-HLURZDLQ.css} +1 -1
  63. package/package.json +1 -1
  64. package/Marketplace/chunk-JRVVHEWT.js +0 -1
  65. package/Marketplace/chunk-YJA6GNVB.js +0 -1
  66. /package/Marketplace/{chunk-CRNJ2Q5T.js → chunk-KOJSHFZJ.js} +0 -0
  67. /package/Marketplace/{chunk-PXXT4AMP.js → chunk-T2YIFX3Q.js} +0 -0
  68. /package/Marketplace/{chunk-FXU7TISG.js → chunk-WJGIBFHG.js} +0 -0
  69. /package/Marketplace/{chunk-3OPATVPE.js → chunk-Y4MB3DWC.js} +0 -0
  70. /package/Marketplace/{polyfills-JB4R6HHU.js → polyfills-25D6JJC3.js} +0 -0
@@ -1 +1 @@
1
- import{c as Q}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-MSDWP3Z5.js";import{C as U,J as I,M as H,N as $,W as Y,X as J,a as s,b as N}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-K2D3HYO3.js";import{a as V}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-ZKFCU6QY.js";import{$a as k,Ba as M,Fa as m,Ga as a,Ia as f,Ib as y,Ja as g,Jb as j,Kb as B,La as P,Lb as x,Na as v,Oa as u,Qa as _,Z as D,Za as n,_a as l,aa as w,ba as p,ea as z,fa as E,ga as G,gc as L,hb as h,kb as q,lb as F,oa as T,ob as O,tb as S,va as A}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-WOVAE35N.js";var ie=["input"],re=["*"],K=0,b=class{constructor(o,X){this.source=o,this.value=X}},oe={provide:V,useExisting:D(()=>ae),multi:!0},W=new p("MatRadioGroup"),te=new p("mat-radio-default-options",{providedIn:"root",factory:de});function de(){return{color:"accent"}}var ae=(()=>{let o=class o{get name(){return this._name}set name(e){this._name=e,this._updateRadioButtonNames()}get labelPosition(){return this._labelPosition}set labelPosition(e){this._labelPosition=e==="before"?"before":"after",this._markRadiosForCheck()}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())}_checkSelectedRadioButton(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)}get selected(){return this._selected}set selected(e){this._selected=e,this.value=e?e.value:null,this._checkSelectedRadioButton()}get disabled(){return this._disabled}set disabled(e){this._disabled=s(e),this._markRadiosForCheck()}get required(){return this._required}set required(e){this._required=s(e),this._markRadiosForCheck()}constructor(e){this._changeDetector=e,this._value=null,this._name=`mat-radio-group-${K++}`,this._selected=null,this._isInitialized=!1,this._labelPosition="after",this._disabled=!1,this._required=!1,this._controlValueAccessorChangeFn=()=>{},this.onTouched=()=>{},this.change=new g}ngAfterContentInit(){this._isInitialized=!0,this._buttonChanges=this._radios.changes.subscribe(()=>{this.selected&&!this._radios.find(e=>e===this.selected)&&(this._selected=null)})}ngOnDestroy(){this._buttonChanges?.unsubscribe()}_touch(){this.onTouched&&this.onTouched()}_updateRadioButtonNames(){this._radios&&this._radios.forEach(e=>{e.name=this.name,e._markForCheck()})}_updateSelectedRadioFromValue(){let e=this._selected!==null&&this._selected.value===this._value;this._radios&&!e&&(this._selected=null,this._radios.forEach(i=>{i.checked=this.value===i.value,i.checked&&(this._selected=i)}))}_emitChangeEvent(){this._isInitialized&&this.change.emit(new b(this._selected,this._value))}_markRadiosForCheck(){this._radios&&this._radios.forEach(e=>e._markForCheck())}writeValue(e){this.value=e,this._changeDetector.markForCheck()}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetector.markForCheck()}};o.\u0275fac=function(i){return new(i||o)(a(f))},o.\u0275dir=G({type:o,selectors:[["mat-radio-group"]],contentQueries:function(i,r,d){if(i&1&&B(d,ne,5),i&2){let c;y(c=x())&&(r._radios=c)}},hostAttrs:["role","radiogroup",1,"mat-mdc-radio-group"],inputs:{color:"color",name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:"disabled",required:"required"},outputs:{change:"change"},exportAs:["matRadioGroup"],features:[S([oe,{provide:W,useExisting:o}])]});let t=o;return t})(),C=class{constructor(o){this._elementRef=o}},ce=H($(C)),ne=(()=>{let o=class o extends ce{get checked(){return this._checked}set checked(e){let i=s(e);this._checked!==i&&(this._checked=i,i&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!i&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),i&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this.radioGroup!==null&&(this.checked||(this.checked=this.radioGroup.value===e),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(e){this._labelPosition=e}get disabled(){return this._disabled||this.radioGroup!==null&&this.radioGroup.disabled}set disabled(e){this._setDisabled(s(e))}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(e){this._required=s(e)}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._providerOverride&&this._providerOverride.color||"accent"}set color(e){this._color=e}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(e,i,r,d,c,Z,ee,R){super(i),this._changeDetector=r,this._focusMonitor=d,this._radioDispatcher=c,this._providerOverride=ee,this._uniqueId=`mat-radio-${++K}`,this.id=this._uniqueId,this.change=new g,this._checked=!1,this._value=null,this._removeUniqueSelectionListener=()=>{},this.radioGroup=e,this._noopAnimations=Z==="NoopAnimations",R&&(this.tabIndex=N(R,0))}focus(e,i){i?this._focusMonitor.focusVia(this._inputElement,i,e):this._inputElement.nativeElement.focus(e)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.checked&&(this.radioGroup.selected=this),this.name=this.radioGroup.name),this._removeUniqueSelectionListener=this._radioDispatcher.listen((e,i)=>{e!==this.id&&i===this.name&&(this.checked=!1)})}ngDoCheck(){this._updateTabIndex()}ngAfterViewInit(){this._updateTabIndex(),this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{!e&&this.radioGroup&&this.radioGroup._touch()})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new b(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputClick(e){e.stopPropagation()}_onInputInteraction(e){if(e.stopPropagation(),!this.checked&&!this.disabled){let i=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),i&&this.radioGroup._emitChangeEvent())}}_onTouchTargetClick(e){this._onInputInteraction(e),this.disabled||this._inputElement.nativeElement.focus()}_setDisabled(e){this._disabled!==e&&(this._disabled=e,this._changeDetector.markForCheck())}_updateTabIndex(){let e=this.radioGroup,i;if(!e||!e.selected||this.disabled?i=this.tabIndex:i=e.selected===this?this.tabIndex:-1,i!==this._previousTabIndex){let r=this._inputElement?.nativeElement;r&&(r.setAttribute("tabindex",i+""),this._previousTabIndex=i)}}};o.\u0275fac=function(i){return new(i||o)(a(W,8),a(M),a(f),a(U),a(Q),a(A,8),a(te,8),T("tabindex"))},o.\u0275cmp=z({type:o,selectors:[["mat-radio-button"]],viewQuery:function(i,r){if(i&1&&j(ie,5),i&2){let d;y(d=x())&&(r._inputElement=d.first)}},hostAttrs:[1,"mat-mdc-radio-button"],hostVars:15,hostBindings:function(i,r){i&1&&h("focus",function(){return r._inputElement.nativeElement.focus()}),i&2&&(v("id",r.id)("tabindex",null)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),_("mat-primary",r.color==="primary")("mat-accent",r.color==="accent")("mat-warn",r.color==="warn")("mat-mdc-radio-checked",r.checked)("_mat-animation-noopable",r._noopAnimations))},inputs:{disableRipple:"disableRipple",tabIndex:"tabIndex",id:"id",name:"name",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],checked:"checked",value:"value",labelPosition:"labelPosition",disabled:"disabled",required:"required",color:"color"},outputs:{change:"change"},exportAs:["matRadioButton"],features:[P],ngContentSelectors:re,decls:13,vars:17,consts:[[1,"mdc-form-field"],["formField",""],[1,"mdc-radio"],[1,"mat-mdc-radio-touch-target",3,"click"],["type","radio",1,"mdc-radio__native-control",3,"id","checked","disabled","required","change"],["input",""],[1,"mdc-radio__background"],[1,"mdc-radio__outer-circle"],[1,"mdc-radio__inner-circle"],["mat-ripple","",1,"mat-radio-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mdc-label",3,"for"]],template:function(i,r){if(i&1&&(q(),n(0,"div",0,1)(2,"div",2)(3,"div",3),h("click",function(c){return r._onTouchTargetClick(c)}),l(),n(4,"input",4,5),h("change",function(c){return r._onInputInteraction(c)}),l(),n(6,"div",6),k(7,"div",7)(8,"div",8),l(),n(9,"div",9),k(10,"div",10),l()(),n(11,"label",11),F(12),l()()),i&2){let d=O(1);_("mdc-form-field--align-end",r.labelPosition=="before"),m(2),_("mdc-radio--disabled",r.disabled),m(2),u("id",r.inputId)("checked",r.checked)("disabled",r.disabled)("required",r.required),v("name",r.name)("value",r.value)("aria-label",r.ariaLabel)("aria-labelledby",r.ariaLabelledby)("aria-describedby",r.ariaDescribedby),m(5),u("matRippleTrigger",d)("matRippleDisabled",r._isRippleDisabled())("matRippleCentered",!0),m(2),u("for",r.inputId)}},dependencies:[Y],styles:['.mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color}.mdc-radio[hidden]{display:none}.mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:"";transition:opacity 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%;transition:transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;z-index:1}.mdc-radio--touch{margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-radio--touch .mdc-radio__native-control{top:calc((40px - 48px) / 2);right:calc((40px - 48px) / 2);left:calc((40px - 48px) / 2);width:48px;height:48px}.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring{border-color:CanvasText}}.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring::after,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring::after,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring::after{border-color:CanvasText}}.mdc-radio__native-control:checked+.mdc-radio__background,.mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1),border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio--disabled{cursor:default;pointer-events:none}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5);transition:transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1),border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:disabled+.mdc-radio__background,[aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background{cursor:default}.mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-form-field{display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field[hidden]{display:none}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}.mat-mdc-radio-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-radio-button .mdc-radio{padding:calc((var(--mdc-radio-state-layer-size) - 20px) / 2)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-disabled-selected-icon-color)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{opacity:var(--mdc-radio-disabled-selected-icon-opacity)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{opacity:var(--mdc-radio-disabled-selected-icon-opacity)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{opacity:var(--mdc-radio-disabled-unselected-icon-opacity)}.mat-mdc-radio-button .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-focus-icon-color)}.mat-mdc-radio-button .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-focus-icon-color)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-hover-icon-color)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-hover-icon-color)}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-icon-color)}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-icon-color)}.mat-mdc-radio-button .mdc-radio:not(:disabled):active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-pressed-icon-color)}.mat-mdc-radio-button .mdc-radio:not(:disabled):active .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-pressed-icon-color)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-hover-icon-color)}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-icon-color)}.mat-mdc-radio-button .mdc-radio:not(:disabled):active .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-pressed-icon-color)}.mat-mdc-radio-button .mdc-radio .mdc-radio__background::before{top:calc(-1 * (var(--mdc-radio-state-layer-size) - 20px) / 2);left:calc(-1 * (var(--mdc-radio-state-layer-size) - 20px) / 2);width:var(--mdc-radio-state-layer-size);height:var(--mdc-radio-state-layer-size)}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control{top:calc((var(--mdc-radio-state-layer-size) - var(--mdc-radio-state-layer-size)) / 2);right:calc((var(--mdc-radio-state-layer-size) - var(--mdc-radio-state-layer-size)) / 2);left:calc((var(--mdc-radio-state-layer-size) - var(--mdc-radio-state-layer-size)) / 2);width:var(--mdc-radio-state-layer-size);height:var(--mdc-radio-state-layer-size)}.mat-mdc-radio-button .mdc-radio .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled]):not(:focus)~.mdc-radio__background::before{opacity:.04;transform:scale(1)}.mat-mdc-radio-button.mat-mdc-radio-checked .mdc-radio__background::before{background-color:var(--mat-radio-checked-ripple-color)}.mat-mdc-radio-button.mat-mdc-radio-checked .mat-ripple-element{background-color:var(--mat-radio-checked-ripple-color)}.mat-mdc-radio-button .mdc-radio--disabled+label{color:var(--mat-radio-disabled-label-color)}.mat-mdc-radio-button .mat-radio-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:50%}.mat-mdc-radio-button .mat-radio-ripple .mat-ripple-element{opacity:.14}.mat-mdc-radio-button .mat-radio-ripple::before{border-radius:50%}.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__background::before,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__outer-circle,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__inner-circle{transition:none !important}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:focus:enabled:not(:checked)~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-focus-icon-color, black)}.mat-mdc-radio-button.cdk-focused .mat-mdc-focus-indicator::before{content:""}.mat-mdc-radio-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}[dir=rtl] .mat-mdc-radio-touch-target{left:0;right:50%;transform:translate(50%, -50%)}'],encapsulation:2,changeDetection:0});let t=o;return t})(),Te=(()=>{let o=class o{};o.\u0275fac=function(i){return new(i||o)},o.\u0275mod=E({type:o}),o.\u0275inj=w({imports:[I,L,J,I]});let t=o;return t})();export{ae as a,ne as b,Te as c};
1
+ import{c as Q}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-DR4WIP6T.js";import{C as U,J as I,M as H,N as $,W as Y,X as J,a as s,b as N}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-OVSLUEIO.js";import{a as V}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-VTLJVEYF.js";import{$a as k,Ba as M,Fa as m,Ga as a,Ia as f,Ib as y,Ja as g,Jb as j,Kb as B,La as P,Lb as x,Na as v,Oa as u,Qa as _,Z as D,Za as n,_a as l,aa as w,ba as p,ea as z,fa as E,ga as G,gc as L,hb as h,kb as q,lb as F,oa as T,ob as O,tb as S,va as A}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-ZIANW63Q.js";var ie=["input"],re=["*"],K=0,b=class{constructor(o,X){this.source=o,this.value=X}},oe={provide:V,useExisting:D(()=>ae),multi:!0},W=new p("MatRadioGroup"),te=new p("mat-radio-default-options",{providedIn:"root",factory:de});function de(){return{color:"accent"}}var ae=(()=>{let o=class o{get name(){return this._name}set name(e){this._name=e,this._updateRadioButtonNames()}get labelPosition(){return this._labelPosition}set labelPosition(e){this._labelPosition=e==="before"?"before":"after",this._markRadiosForCheck()}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())}_checkSelectedRadioButton(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)}get selected(){return this._selected}set selected(e){this._selected=e,this.value=e?e.value:null,this._checkSelectedRadioButton()}get disabled(){return this._disabled}set disabled(e){this._disabled=s(e),this._markRadiosForCheck()}get required(){return this._required}set required(e){this._required=s(e),this._markRadiosForCheck()}constructor(e){this._changeDetector=e,this._value=null,this._name=`mat-radio-group-${K++}`,this._selected=null,this._isInitialized=!1,this._labelPosition="after",this._disabled=!1,this._required=!1,this._controlValueAccessorChangeFn=()=>{},this.onTouched=()=>{},this.change=new g}ngAfterContentInit(){this._isInitialized=!0,this._buttonChanges=this._radios.changes.subscribe(()=>{this.selected&&!this._radios.find(e=>e===this.selected)&&(this._selected=null)})}ngOnDestroy(){this._buttonChanges?.unsubscribe()}_touch(){this.onTouched&&this.onTouched()}_updateRadioButtonNames(){this._radios&&this._radios.forEach(e=>{e.name=this.name,e._markForCheck()})}_updateSelectedRadioFromValue(){let e=this._selected!==null&&this._selected.value===this._value;this._radios&&!e&&(this._selected=null,this._radios.forEach(i=>{i.checked=this.value===i.value,i.checked&&(this._selected=i)}))}_emitChangeEvent(){this._isInitialized&&this.change.emit(new b(this._selected,this._value))}_markRadiosForCheck(){this._radios&&this._radios.forEach(e=>e._markForCheck())}writeValue(e){this.value=e,this._changeDetector.markForCheck()}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetector.markForCheck()}};o.\u0275fac=function(i){return new(i||o)(a(f))},o.\u0275dir=G({type:o,selectors:[["mat-radio-group"]],contentQueries:function(i,r,d){if(i&1&&B(d,ne,5),i&2){let c;y(c=x())&&(r._radios=c)}},hostAttrs:["role","radiogroup",1,"mat-mdc-radio-group"],inputs:{color:"color",name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:"disabled",required:"required"},outputs:{change:"change"},exportAs:["matRadioGroup"],features:[S([oe,{provide:W,useExisting:o}])]});let t=o;return t})(),C=class{constructor(o){this._elementRef=o}},ce=H($(C)),ne=(()=>{let o=class o extends ce{get checked(){return this._checked}set checked(e){let i=s(e);this._checked!==i&&(this._checked=i,i&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!i&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),i&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this.radioGroup!==null&&(this.checked||(this.checked=this.radioGroup.value===e),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(e){this._labelPosition=e}get disabled(){return this._disabled||this.radioGroup!==null&&this.radioGroup.disabled}set disabled(e){this._setDisabled(s(e))}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(e){this._required=s(e)}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._providerOverride&&this._providerOverride.color||"accent"}set color(e){this._color=e}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(e,i,r,d,c,Z,ee,R){super(i),this._changeDetector=r,this._focusMonitor=d,this._radioDispatcher=c,this._providerOverride=ee,this._uniqueId=`mat-radio-${++K}`,this.id=this._uniqueId,this.change=new g,this._checked=!1,this._value=null,this._removeUniqueSelectionListener=()=>{},this.radioGroup=e,this._noopAnimations=Z==="NoopAnimations",R&&(this.tabIndex=N(R,0))}focus(e,i){i?this._focusMonitor.focusVia(this._inputElement,i,e):this._inputElement.nativeElement.focus(e)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.checked&&(this.radioGroup.selected=this),this.name=this.radioGroup.name),this._removeUniqueSelectionListener=this._radioDispatcher.listen((e,i)=>{e!==this.id&&i===this.name&&(this.checked=!1)})}ngDoCheck(){this._updateTabIndex()}ngAfterViewInit(){this._updateTabIndex(),this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{!e&&this.radioGroup&&this.radioGroup._touch()})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new b(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputClick(e){e.stopPropagation()}_onInputInteraction(e){if(e.stopPropagation(),!this.checked&&!this.disabled){let i=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),i&&this.radioGroup._emitChangeEvent())}}_onTouchTargetClick(e){this._onInputInteraction(e),this.disabled||this._inputElement.nativeElement.focus()}_setDisabled(e){this._disabled!==e&&(this._disabled=e,this._changeDetector.markForCheck())}_updateTabIndex(){let e=this.radioGroup,i;if(!e||!e.selected||this.disabled?i=this.tabIndex:i=e.selected===this?this.tabIndex:-1,i!==this._previousTabIndex){let r=this._inputElement?.nativeElement;r&&(r.setAttribute("tabindex",i+""),this._previousTabIndex=i)}}};o.\u0275fac=function(i){return new(i||o)(a(W,8),a(M),a(f),a(U),a(Q),a(A,8),a(te,8),T("tabindex"))},o.\u0275cmp=z({type:o,selectors:[["mat-radio-button"]],viewQuery:function(i,r){if(i&1&&j(ie,5),i&2){let d;y(d=x())&&(r._inputElement=d.first)}},hostAttrs:[1,"mat-mdc-radio-button"],hostVars:15,hostBindings:function(i,r){i&1&&h("focus",function(){return r._inputElement.nativeElement.focus()}),i&2&&(v("id",r.id)("tabindex",null)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),_("mat-primary",r.color==="primary")("mat-accent",r.color==="accent")("mat-warn",r.color==="warn")("mat-mdc-radio-checked",r.checked)("_mat-animation-noopable",r._noopAnimations))},inputs:{disableRipple:"disableRipple",tabIndex:"tabIndex",id:"id",name:"name",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],checked:"checked",value:"value",labelPosition:"labelPosition",disabled:"disabled",required:"required",color:"color"},outputs:{change:"change"},exportAs:["matRadioButton"],features:[P],ngContentSelectors:re,decls:13,vars:17,consts:[[1,"mdc-form-field"],["formField",""],[1,"mdc-radio"],[1,"mat-mdc-radio-touch-target",3,"click"],["type","radio",1,"mdc-radio__native-control",3,"id","checked","disabled","required","change"],["input",""],[1,"mdc-radio__background"],[1,"mdc-radio__outer-circle"],[1,"mdc-radio__inner-circle"],["mat-ripple","",1,"mat-radio-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mdc-label",3,"for"]],template:function(i,r){if(i&1&&(q(),n(0,"div",0,1)(2,"div",2)(3,"div",3),h("click",function(c){return r._onTouchTargetClick(c)}),l(),n(4,"input",4,5),h("change",function(c){return r._onInputInteraction(c)}),l(),n(6,"div",6),k(7,"div",7)(8,"div",8),l(),n(9,"div",9),k(10,"div",10),l()(),n(11,"label",11),F(12),l()()),i&2){let d=O(1);_("mdc-form-field--align-end",r.labelPosition=="before"),m(2),_("mdc-radio--disabled",r.disabled),m(2),u("id",r.inputId)("checked",r.checked)("disabled",r.disabled)("required",r.required),v("name",r.name)("value",r.value)("aria-label",r.ariaLabel)("aria-labelledby",r.ariaLabelledby)("aria-describedby",r.ariaDescribedby),m(5),u("matRippleTrigger",d)("matRippleDisabled",r._isRippleDisabled())("matRippleCentered",!0),m(2),u("for",r.inputId)}},dependencies:[Y],styles:['.mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color}.mdc-radio[hidden]{display:none}.mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:"";transition:opacity 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%;transition:transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;z-index:1}.mdc-radio--touch{margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-radio--touch .mdc-radio__native-control{top:calc((40px - 48px) / 2);right:calc((40px - 48px) / 2);left:calc((40px - 48px) / 2);width:48px;height:48px}.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring{border-color:CanvasText}}.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring::after,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring::after,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring::after{border-color:CanvasText}}.mdc-radio__native-control:checked+.mdc-radio__background,.mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1),border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio--disabled{cursor:default;pointer-events:none}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5);transition:transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1),border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:disabled+.mdc-radio__background,[aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background{cursor:default}.mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-form-field{display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field[hidden]{display:none}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}.mat-mdc-radio-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-radio-button .mdc-radio{padding:calc((var(--mdc-radio-state-layer-size) - 20px) / 2)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-disabled-selected-icon-color)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{opacity:var(--mdc-radio-disabled-selected-icon-opacity)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{opacity:var(--mdc-radio-disabled-selected-icon-opacity)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{opacity:var(--mdc-radio-disabled-unselected-icon-opacity)}.mat-mdc-radio-button .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-focus-icon-color)}.mat-mdc-radio-button .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-focus-icon-color)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-hover-icon-color)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-hover-icon-color)}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-icon-color)}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-icon-color)}.mat-mdc-radio-button .mdc-radio:not(:disabled):active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-pressed-icon-color)}.mat-mdc-radio-button .mdc-radio:not(:disabled):active .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-pressed-icon-color)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-hover-icon-color)}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-icon-color)}.mat-mdc-radio-button .mdc-radio:not(:disabled):active .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-pressed-icon-color)}.mat-mdc-radio-button .mdc-radio .mdc-radio__background::before{top:calc(-1 * (var(--mdc-radio-state-layer-size) - 20px) / 2);left:calc(-1 * (var(--mdc-radio-state-layer-size) - 20px) / 2);width:var(--mdc-radio-state-layer-size);height:var(--mdc-radio-state-layer-size)}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control{top:calc((var(--mdc-radio-state-layer-size) - var(--mdc-radio-state-layer-size)) / 2);right:calc((var(--mdc-radio-state-layer-size) - var(--mdc-radio-state-layer-size)) / 2);left:calc((var(--mdc-radio-state-layer-size) - var(--mdc-radio-state-layer-size)) / 2);width:var(--mdc-radio-state-layer-size);height:var(--mdc-radio-state-layer-size)}.mat-mdc-radio-button .mdc-radio .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled]):not(:focus)~.mdc-radio__background::before{opacity:.04;transform:scale(1)}.mat-mdc-radio-button.mat-mdc-radio-checked .mdc-radio__background::before{background-color:var(--mat-radio-checked-ripple-color)}.mat-mdc-radio-button.mat-mdc-radio-checked .mat-ripple-element{background-color:var(--mat-radio-checked-ripple-color)}.mat-mdc-radio-button .mdc-radio--disabled+label{color:var(--mat-radio-disabled-label-color)}.mat-mdc-radio-button .mat-radio-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:50%}.mat-mdc-radio-button .mat-radio-ripple .mat-ripple-element{opacity:.14}.mat-mdc-radio-button .mat-radio-ripple::before{border-radius:50%}.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__background::before,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__outer-circle,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__inner-circle{transition:none !important}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:focus:enabled:not(:checked)~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-focus-icon-color, black)}.mat-mdc-radio-button.cdk-focused .mat-mdc-focus-indicator::before{content:""}.mat-mdc-radio-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}[dir=rtl] .mat-mdc-radio-touch-target{left:0;right:50%;transform:translate(50%, -50%)}'],encapsulation:2,changeDetection:0});let t=o;return t})(),Te=(()=>{let o=class o{};o.\u0275fac=function(i){return new(i||o)},o.\u0275mod=E({type:o}),o.\u0275inj=w({imports:[I,L,J,I]});let t=o;return t})();export{ae as a,ne as b,Te as c};
@@ -1 +1 @@
1
- import{a as _t,c as q,d as te}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-TTTBABPM.js";import{a as Z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-3OPATVPE.js";import{a as A}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-USTIBZQZ.js";import{d as Zt,e as qt,f as Yt,g as Qt,k as Wt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-62YVBX6C.js";import{a as Y,b as gt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-LLITFBOE.js";import{a as K}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-GIXQOMAF.js";import{b as ee}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-7NUYZDNH.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-MNQTYXTP.js";import{a as Xt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-5MVSVVTZ.js";import{a as D}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-UU4FCLSH.js";import{a as U}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-NO7WERYV.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-A4NDARMD.js";import{a as jt,b as Gt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-KPVSCTPE.js";import{f as k}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-YWSTU35G.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-6TL753XX.js";import{b as R,e as B}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-MU6WSNWI.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-3MUKJETU.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-OHUTMYI3.js";import{a as Ht}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-HWGOH7QS.js";import{a as Kt,b as Jt,c as zt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-DR77LMQ5.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-PTD6INQZ.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-TH3YEBZM.js";import{a as nt,c as H,d as Lt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-WDVFAXEE.js";import{a as W}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-LSG32F4X.js";import{B as V,C as $t,q as ht,r as Bt,u as G}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-MSDWP3Z5.js";import{T as Rt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-K2D3HYO3.js";import{b as Ut,c as et,h as $,k as j,u as At}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-ZKFCU6QY.js";import{b as z,c as _}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-PXXT4AMP.js";import{$a as C,$b as E,B as y,Db as F,Eb as T,Fa as c,Fb as Tt,Ga as x,Hc as mt,Ic as kt,Kc as ut,Mb as tt,Mc as Vt,Oa as s,T as J,Ua as S,V as Pt,X as Ot,Za as a,_a as l,_b as N,aa as Ft,ab as v,bb as b,c as wt,cc as pt,db as P,dc as Nt,ea as M,fa as Dt,fc as dt,gc as Et,hb as g,ja as u,jb as d,ka as h,ob as L,pb as m,q as Mt,qb as st,rb as I,vb as Q,wb as it,za as O}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-WOVAE35N.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-CRNJ2Q5T.js";var de=()=>["/menu/products/download/by-url"],ne=(()=>{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),s("Tabs",i.productTabs),c(7),s("routerLink",Q(2,de)))},dependencies:[jt,kt,ut]});let o=r;return o})();function me(o,r){if(o&1){let n=P();a(0,"button",13),g("click",function(){u(n);let e=d(2);return h(e.onOpenScanDialog())}),C(1,"i",14),m(2," Scan Channel "),l()}}function ue(o,r){if(o&1&&(v(0),S(1,me,3,0,"button",12),b()),o&2){let n=d();c(1),s("ngIf",!n.productService.hasSelection(n.products))}}function he(o,r){if(o&1){let n=P();v(0),a(1,"button",15),g("click",function(){u(n);let e=d();return h(e.onScanMultipleProduct())}),C(2,"i",14),m(3),l(),b()}if(o&2){let n=d(),t;c(3),I(" Scan (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function _e(o,r){if(o&1){let n=P();v(0),a(1,"button",16),g("click",function(){u(n);let e=d();return h(e.onUploadMultipleProduct())}),C(2,"i",17),m(3),l(),b()}if(o&2){let n=d(),t;c(3),I(" Upload (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function ge(o,r){if(o&1){let n=P();a(0,"div",18)(1,"app-product-card",19),g("onUpload",function(){let i=u(n).$implicit,p=d();return h(p.onUploadToMultipleChannel(i))})("onScan",function(){let i=u(n).$implicit,p=d();return h(p.onScanSingleProduct(i))})("onDescEvent",function(){let i=u(n).index,p=d();return h(p.onOpenDialogVariant(i))})("onCheckBoxChange",function(e){let p=u(n).$implicit;return h(p.selected=e)}),l()()}if(o&2){let n=r.$implicit,t=d();c(1),s("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 Ce(o,r){o&1&&(v(0),a(1,"div",20),C(2,"app-empty-state"),l(),b())}function fe(o,r){if(o&1){let n=P();v(0),a(1,"div",21)(2,"div",22)(3,"app-custom-paginator",23),g("next",function(){u(n);let e=d();return h(e.onNextPage())})("previous",function(){u(n);let e=d();return h(e.onPrevPage())}),l()()(),b()}if(o&2){let n=d();c(3),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",!0)}}var oe=(()=>{let r=class r{constructor(t,e,i,p,f){this.http=t,this.toastr=e,this.dialog=i,this.productService=p,this.authService=f,this.searchFilter=new Z,this.products=[],this.rowCount=0,this.multipeScanChannels=[],this.getLoaderPage(),this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}getLoaderPage(){this.productService.LoadInPOS().subscribe(t=>{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()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[z.Tokopedia,z.Tiktok])}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=_.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.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(_t,{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(q,{width:"700px",data:{title:"Upload Multiple Product",channels:e}}).afterClosed().pipe(y(i=>_.IsNotEmpty(i)),J(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(q,{width:"700px",data:{title:`Upload - ${t.Name}`,channels:i,product:t}}).afterClosed().pipe(y(p=>_.IsNotEmpty(p)),J(p=>this.productService.uploadSingleProduct([t],p))).subscribe({next:p=>{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=_.GuidEMpty;let e=this.productService.filterChannelByTypeId(this.channelOptions,[z.Tokopedia,z.Tiktok]);this.dialog.open(D,{data:{filter:t,channelOptions:e,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(p=>_.IsNotEmpty(p))).subscribe(p=>{this.searchFilter.ChannelID=p.ChannelID,this.searchFilter.ScanFull=p.ScanFull,this.searchFilter.UpdatedProduct=p.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=_.GuidEMpty,this.dialog.open(D,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;let p=this.productService.getVariantCodesProduct(t);this.scanSingleProduct(p)})}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=_.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=_.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)(x(B),x(R),x(G),x(U),x(k))},r.\u0275cmp=M({type:r,selectors:[["app-in-pos"]],decls:22,vars:13,consts:[["description","All products which is already available in POS",3,"headerTitle","onSubmit"],[4,"ngIf"],[1,"fw-bold"],["appendTo","body","bindLabel","Name","name","Name","bindValue","Name","placeholder","Select Category",1,"center-text","mt-2",3,"clearable","items","ngModel","ngModelChange"],[1,"mt-5"],["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"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",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 p=P();a(0,"mainpanel",0),g("onSubmit",function(w){return i.searchProduct(w)}),a(1,"actions"),S(2,ue,2,1,"ng-container",1)(3,he,4,1,"ng-container",1)(4,_e,4,1,"ng-container",1),l(),a(5,"filters")(6,"div")(7,"label",2),m(8,"Category"),l(),a(9,"ng-select",3),g("ngModelChange",function(w){return i.searchFilter.Category=w}),l()(),a(10,"div",4)(11,"mat-date-range-input",5)(12,"input",6),g("ngModelChange",function(w){return i.startDate=w})("click",function(){u(p);let w=L(15);return h(w.open())}),l(),a(13,"input",7),g("ngModelChange",function(w){return i.endDate=w})("click",function(){u(p);let w=L(15);return h(w.open())}),l()(),C(14,"mat-date-range-picker",null,8),l()(),a(16,"content")(17,"div",9)(18,"div",10),S(19,ge,2,10,"div",11)(20,Ce,3,0,"ng-container",1),l(),S(21,fe,4,4,"ng-container",1),l()()()}if(e&2){let p=L(15);s("headerTitle","In POS ("+i.rowCount+")"),c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(1),s("ngIf",i.productService.hasSelection(i.products)&&i.multipeScanChannels.length>0),c(1),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("items",i.Categories)("ngModel",i.searchFilter.Category),c(2),s("rangePicker",p),c(1),s("ngModel",i.startDate),c(1),s("ngModel",i.endDate),c(6),s("ngForOf",i.products),c(1),s("ngIf",i.products.length==0),c(1),s("ngIf",i.products.length>0)}},dependencies:[N,E,et,$,j,V,H,K,Y,A,Yt,Zt,qt,Qt],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}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}"]});let o=r;return o})();function Se(o,r){if(o&1){let n=P();v(0),a(1,"button",10),g("click",function(){u(n);let e=d();return h(e.onOpenScanDialog())}),C(2,"i",11),m(3," Scan Channel "),l(),b()}}function xe(o,r){if(o&1){let n=P();v(0),a(1,"button",12),g("click",function(){u(n);let e=d();return h(e.onScanMultipleProduct())}),C(2,"i",11),m(3),l(),b()}if(o&2){let n=d();c(3),I(" Scan (",n.productService.selectedProduct(n.products).length,") ")}}function Pe(o,r){if(o&1){let n=P();v(0),a(1,"button",13),g("click",function(){u(n);let e=d();return h(e.onUploadMultipleProduct())}),C(2,"i",14),m(3),l(),b()}if(o&2){let n=d();c(3),I(" Upload (",n.productService.selectedProduct(n.products).length,") ")}}function ve(o,r){if(o&1&&(a(0,"span",15),C(1,"img",16),l(),m(2)),o&2){let n=r.item,t=d();c(1),s("src",t.getChannelLogo(n.TypeID),O),c(1),I(" ",n.Name," ")}}function be(o,r){if(o&1){let n=P();a(0,"div",17)(1,"label",2),m(2,"Item ID"),l(),a(3,"input",18),g("ngModelChange",function(e){u(n);let i=d();return h(i.searchFilter.Item_id=e)}),l()()}if(o&2){let n=d();c(3),s("ngModel",n.searchFilter.Item_id)}}function Ie(o,r){if(o&1){let n=P();a(0,"div",19)(1,"app-product-card",20),g("onUpload",function(){let i=u(n).$implicit,p=d();return h(p.onUploadToMultipleChannel(i))})("onDescEvent",function(){let i=u(n).index,p=d();return h(p.onOpenVariantDetail(i))})("onScan",function(){let i=u(n).$implicit,p=d();return h(p.onScanSingleProduct(i))})("onCheckBoxChange",function(e){let p=u(n).$implicit;return h(p.selected=e)}),l()()}if(o&2){let n=r.$implicit,t=d();c(1),s("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 ye(o,r){o&1&&(v(0),a(1,"div",21),C(2,"app-empty-state"),l(),b())}function we(o,r){if(o&1){let n=P();a(0,"div",22)(1,"div",23)(2,"app-custom-paginator",24),g("total",function(){u(n);let e=d();return h(e.getRowCount())})("next",function(){u(n);let e=d();return h(e.onNextPage())})("previous",function(){u(n);let e=d();return h(e.onPreviousPage())}),l()()()}if(o&2){let n=d();c(2),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var re=(()=>{let r=class r{constructor(t,e,i,p,f,w){this.http=t,this.dialog=e,this.toastr=i,this.productService=p,this.activateRouter=f,this.authService=w,this.searchFilter=new Z,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=_.GuidEMpty,this.multipeScanChannels=[],this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(_.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(e=>{this.searchFilter=e.Filter,e.Filter.ChannelID!=_.GuidEMpty&&(this.searchFilter.ListChannelID=[],this.searchFilter.ListChannelID.push(e.Filter.ChannelID)),this.searchFilter.PageSize=e.Filter.RowCount,this.searchFilter.Item_id="",this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[z.Tokopedia,z.Tiktok])}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(_t,{data:{variants:e,title:this.products[t].Name},width:"800px"})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=_.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.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(y(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(_.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(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;let p=this.productService.getVariantCodesProduct(t);this.scanProducts(p)})}onUploadToMultipleChannel(t){let e=this.productService.getChannelProduct(t);t.Channel=e;let i=this.productService.filterUnselectedChannel([t],this.channelOptions);this.dialog.open(q,{width:"700px",data:{title:`Upload - ${t.Name}`,channels:i,product:t}}).afterClosed().pipe(y(p=>_.IsNotEmpty(p)),J(p=>this.productService.uploadSingleProduct([t],p))).subscribe({next:p=>{this.getProducts()}})}onScanMultipleProduct(){this.searchFilter.ChannelID=_.GuidEMpty;let t=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(D,{data:{filter:t,channelOptions:this.multipeScanChannels,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct;let p=this.productService.selectedProduct(this.products),f=this.productService.getVariantCodesProducts(p);this.scanProducts(f)})}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=_.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=_.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=_.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products),e=this.productService.filterUnselectedChannel(t,this.channelOptions);this.dialog.open(q,{width:"700px",data:{title:"Upload Multiple Product",channels:e}}).afterClosed().pipe(y(i=>_.IsNotEmpty(i)),J(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 _.getChannelLogoByTypeId(t)}};r.\u0275fac=function(e){return new(e||r)(x(B),x(G),x(R),x(U),x(mt),x(k))},r.\u0275cmp=M({type:r,selectors:[["app-sold-in-channel"]],decls:18,vars:12,consts:[["description","SKU has been mapped between dealpos and marketplace",3,"headerTitle","onSubmit"],[4,"ngIf"],[1,"fw-bold"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text","mt-2",3,"clearable","multiple","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],["class","mt-5",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"],[1,"mt-5"],["type","text","name","Item_id","id","Item_id",1,"form-control","mt-2",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),g("onSubmit",function(f){return i.searchProduct(f)}),a(1,"actions"),S(2,Se,4,0,"ng-container",1)(3,xe,4,1,"ng-container",1)(4,Pe,4,1,"ng-container",1),l(),a(5,"filters")(6,"div")(7,"label",2),m(8,"Channel"),l(),a(9,"ng-select",3),g("ngModelChange",function(f){return i.searchFilter.ListChannelID=f})("clear",function(){return i.onClearFilterChannel()}),S(10,ve,3,2,"ng-template",4),l()(),S(11,be,4,1,"div",5),l(),a(12,"content")(13,"div",6)(14,"div",7),S(15,Ie,2,10,"div",8)(16,ye,3,0,"ng-container",1),l(),S(17,we,3,4,"div",9),l()()()),e&2&&(s("headerTitle","Sold in Channel"),c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(1),s("ngIf",i.multipeScanChannels.length>0&&i.productService.hasSelection(i.products)),c(1),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("multiple",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ListChannelID),c(2),s("ngIf",i.searchFilter.ListChannelID!=null),c(4),s("ngForOf",i.products),c(1),s("ngIf",i.products.length==0),c(1),s("ngIf",i.products==null?null:i.products.length))},dependencies:[N,E,et,$,j,V,H,nt,K,Y,A],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 Oe(o,r){if(o&1){let n=P();a(0,"button",10),g("click",function(){u(n);let e=d(2);return h(e.uploadMultipleProduct())}),C(1,"i",11),m(2),l()}if(o&2){let n=d(2);c(2),I(" upload (",n.selectedProducts==null?null:n.selectedProducts.length,") ")}}function Fe(o,r){if(o&1){let n=P();v(0),a(1,"td",26)(2,"input",27),g("ngModelChange",function(e){u(n);let i=d(2).$implicit;return h(i.selected=e)})("ngModelChange",function(){u(n);let e=d(3).ngIf,i=d(3);return h(i.onSelectProduct(e))}),l()(),b()}if(o&2){let n=d(2).$implicit;c(1),s("rowSpan",n==null?null:n.Variants.length),c(1),s("ngModel",n.selected)}}function De(o,r){if(o&1){let n=P();v(0),a(1,"img",33),g("click",function(e){u(n);let i=d(3).$implicit,p=d(4);return h(p.onZoomImage(e,i==null?null:i.ImageUrl))}),l(),b()}if(o&2){let n=d(3).$implicit;c(1),s("src",n==null?null:n.ImageUrl,O)}}function Te(o,r){o&1&&C(0,"img",34)}function Ne(o,r){if(o&1&&(v(0),a(1,"td",26)(2,"div",28),S(3,De,2,1,"ng-container",7)(4,Te,1,0,"ng-template",null,29,tt),l()(),a(6,"td",30)(7,"h4",31)(8,"span",32),m(9),l()()(),b()),o&2){let n=L(5),t=d(2).$implicit;c(1),s("rowSpan",t==null?null:t.Variants.length),c(2),s("ngIf",t==null?null:t.ImageUrl)("ngIfElse",n),c(3),s("rowSpan",t==null?null:t.Variants.length),c(2),s("matTooltip",(t==null||t.Name==null?null:t.Name.length)>50?t==null?null:t.Name:""),c(1),I(" ",t==null?null:t.Name," ")}}function Ee(o,r){if(o&1&&(a(0,"div")(1,"a",22),C(2,"img",35),l()()),o&2){let n=r.$implicit;c(1),s("href",n.URL,O),c(1),s("src",n.Img,O)("matTooltip",n.Name)}}function ke(o,r){if(o&1&&(a(0,"div"),C(1,"img",35),l()),o&2){let n=r.$implicit;c(1),s("src",n.Img,O)("matTooltip",n.Name)}}function Ve(o,r){if(o&1&&(a(0,"tr"),S(1,Fe,3,2,"ng-container",9)(2,Ne,10,6,"ng-container",9),a(3,"td"),m(4),l(),a(5,"td")(6,"span"),m(7),l(),a(8,"span",21)(9,"a",22),C(10,"i",23),l()()(),a(11,"td",24)(12,"div",25),S(13,Ee,3,3,"div",20),l()(),a(14,"td",24)(15,"div",25),S(16,ke,2,2,"div",20),l()()()),o&2){let n=r.$implicit,t=r.index,e=d(5);c(1),s("ngIf",t==0),c(1),s("ngIf",t==0),c(2),I(" ",n.Name," "),c(3),I(" ",n.Code," "),c(2),s("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(n==null?null:n.ID),O),c(4),s("ngForOf",n==null?null:n.Available),c(3),s("ngForOf",n==null?null:n.NotAvailable)}}function Ue(o,r){if(o&1&&(v(0),S(1,Ve,17,7,"tr",20),b()),o&2){let n=r.$implicit;c(1),s("ngForOf",n.Variants)}}function Ae(o,r){if(o&1&&(a(0,"tbody"),S(1,Ue,2,1,"ng-container",20),l()),o&2){let n=r.ngIf;c(1),s("ngForOf",n)}}function Le(o,r){if(o&1&&(v(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,Ae,2,1,"tbody",9),F(17,"async"),l()(),b()),o&2){let n=d(2);c(16),s("ngIf",T(17,1,n.data$))}}function Re(o,r){o&1&&(a(0,"div",36),C(1,"app-empty-state"),l())}function Be(o,r){if(o&1){let n=P();a(0,"span",44),g("click",function(){u(n);let e=d(4);return h(e.getRowCount())}),a(1,"i",45),m(2,"?"),l()()}}function $e(o,r){if(o&1&&(a(0,"span"),m(1),F(2,"number"),l()),o&2){let n=r.ngIf;c(1),st(T(2,1,n==null?null:n.Count))}}function je(o,r){if(o&1){let n=P();a(0,"a",46),g("click",function(){u(n);let e=d(4);return h(e.onNextPage())}),C(1,"i",47),m(2," Next"),l()}}function Ge(o,r){if(o&1){let n=P();a(0,"a",48),g("click",function(){u(n);let e=d(4);return h(e.onLastPage())}),C(1,"i",49),m(2," Last"),l()}}function Ke(o,r){if(o&1&&(v(0),a(1,"div",37)(2,"div",38)(3,"div",39),m(4),F(5,"number"),S(6,Be,3,0,"span",40)(7,$e,3,3,"span",9),F(8,"async"),m(9),l()(),a(10,"div",41),S(11,je,3,0,"a",42)(12,Ge,3,0,"a",43),l()(),b()),o&2){let n=d().ngIf,t=d(2);c(4),I(" Showing 1 - ",T(5,6,n==null?null:n.length)," of "),c(2),s("ngIf",t.paginationService.hideCount),c(1),s("ngIf",!t.paginationService.hideCount&&T(8,8,t.rowCount$)),c(2),I(" records ~ ",t.paginationService.footerPageNumber," Page "),c(2),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),c(1),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}function Je(o,r){if(o&1&&(v(0),S(1,Ke,13,10,"ng-container",9),b()),o&2){let n=r.ngIf;c(1),s("ngIf",(n==null?null:n.length)>0)}}function ze(o,r){if(o&1){let n=P();a(0,"mainpanel",1),g("onSubmit",function(e){u(n);let i=d();return h(i.searchProduct(e))}),a(1,"actions"),S(2,Oe,3,1,"button",2),a(3,"button",3),g("click",function(){u(n);let e=d();return h(e.openScanDialog())}),C(4,"i",4),m(5," Scan Channel "),l()(),a(6,"content")(7,"div",5)(8,"div",6),S(9,Le,18,3,"ng-container",7),F(10,"async"),S(11,Re,2,0,"ng-template",null,8,tt),l(),S(13,Je,2,1,"ng-container",9),F(14,"async"),l()()()}if(o&2){let n=L(12),t=d(),e;s("hideSearchDropdown",!0),c(2),s("ngIf",t.hasSelectionProduct),c(7),s("ngIf",((e=T(10,5,t.data$))==null?null:e.length)>0)("ngIfElse",n),c(4),s("ngIf",T(14,7,t.data$))}}var ae=(()=>{let r=class r{constructor(t,e,i,p,f,w,yt){this.http=t,this.dialog=e,this.toastr=i,this.productService=p,this.paginationService=f,this.biggerPictureService=w,this.authService=yt,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[],this.channelOptions=yt.getChannels(),this.hostName=this.authService.getDomain()}ngOnInit(){this.initPageLoader(),this.iniData()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe(Ot(t=>{this.filterSearch=t.Filter,this.paginationService.reloadPagination(t.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe(Mt(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=_.getChannelLogoByTypeId(e.TypeID),e)),t}searchProduct(t){this.filterSearch.text=t,this.paginationService.reloadPagination(this.filterSearch)}scanAllProduct(){let t=this.productService.findChannelById(this.filterSearch.ChannelID,this.channelOptions);this.productService.scanAll(this.filterSearch.ChannelID,this.filterSearch.ScanFull,this.filterSearch.UpdatedProduct,this.filterSearch.Async).subscribe(e=>{this.filterSearch.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(e,t,!this.filterSearch.UpdatedProduct),this.initPageLoader())})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.filterSearch));t.ChannelID=_.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.filterSearch.ChannelID=i.ChannelID,this.filterSearch.ScanFull=i.ScanFull,this.filterSearch.UpdatedProduct=i.UpdatedProduct,this.filterSearch.Async=i.Async,this.scanAllProduct()})}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(q,{width:"700px",data:{title:"Upload Multiple Product",channels:t}}).afterClosed().pipe(y(e=>_.IsNotEmpty(e)),J(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,p)=>p.findIndex(f=>f.ChannelID==e.ChannelID)==i),t}ngOnDestroy(){this.paginationService.destroy()}};r.\u0275fac=function(e){return new(e||r)(x(B),x(G),x(R),x(U),x(Xt),x(Ht),x(k))},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",""],[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,"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,ze,15,9,"mainpanel",0),F(1,"async")),e&2&&s("ngIf",T(1,1,i.loader$))},dependencies:[N,E,Ut,$,j,V,ht,A,pt,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 He(o,r){if(o&1){let n=P();a(0,"button",14),g("click",function(){u(n);let e=d();return h(e.openScanDialog())}),C(1,"i",15),m(2," Scan Channel "),l()}}function Ze(o,r){if(o&1){let n=P();v(0),a(1,"button",16),g("click",function(){u(n);let e=d();return h(e.onDownloadAllProduct("SELECTED"))}),C(2,"i",17),m(3),l(),b()}if(o&2){let n=d(),t;c(3),I(" Download (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function qe(o,r){if(o&1&&(a(0,"span",18),C(1,"img",19),l(),m(2)),o&2){let n=r.item,t=d();c(1),s("src",t.getChannelLogo(n.TypeID),O),c(1),I(" ",n.Name," ")}}var Ye=o=>[o],Qe=()=>[];function We(o,r){if(o&1){let n=P();a(0,"div",20)(1,"app-product-card",21),g("onCheckBoxChange",function(e){let p=u(n).index,f=d();return h(f.onSelectProduct(e,p))})("onDescEvent",function(){let i=u(n).index,p=d();return h(p.onShowVariantDetail(i))})("onDownload",function(){let i=u(n).$implicit,p=d();return h(p.onDownloadProduct(i))})("onScan",function(){let i=u(n).$implicit,p=d();return h(p.onScanChannel(i))}),l()()}if(o&2){let n=r.$implicit;c(1),s("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?it(10,Ye,n==null?null:n.Channel):Q(12,Qe))("showCheckBox",!0)("scanButton",!0)}}function Xe(o,r){o&1&&(v(0),a(1,"div",22),C(2,"app-empty-state"),l(),b())}function tn(o,r){if(o&1){let n=P();a(0,"div",23)(1,"div",24)(2,"app-custom-paginator",25),g("total",function(){u(n);let e=d();return h(e.getRowCount())})("next",function(){u(n);let e=d();return h(e.onNextPage())})("previous",function(){u(n);let e=d();return h(e.onPreviousPage())}),l()()()}if(o&2){let n=d();c(2),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var le=(()=>{let r=class r{constructor(t,e,i,p,f,w){this.http=t,this.dialog=e,this.productService=i,this.toastrService=p,this.activateRouter=f,this.authService=w,this.searchFilter=new Z,this.products=[],this.hasClickRowCount=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(_.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(e=>{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(){let t;this.products=this.products.map(e=>(t=this.channelOptions.find(i=>i.ID==e.ChannelID),t?e.Channel=JSON.parse(JSON.stringify(t)):e.Channel=null,e)).map(e=>(e.Channel&&(e.Channel.Url=e.Url),e))}setSkuProduct(){this.products=this.products.map(t=>(t?.Variant?.length==0?_.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=_.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(_.GuidEMpty),this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=_.GuidEMpty})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=_.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.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(_.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(te,{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 _.getChannelLogoByTypeId(t)}};r.\u0275fac=function(e){return new(e||r)(x(B),x(G),x(U),x(R),x(mt),x(k))},r.\u0275cmp=M({type:r,selectors:[["app-not-in-pos"]],decls:30,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,"fw-bold"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text","mt-2",3,"clearable","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],[1,"mt-5"],["name","haveSKU",1,"form-control","h-100","pt-3","rounded","mt-2",3,"ngModel","ngModelChange"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control","mt-2",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),g("onSubmit",function(f){return i.onSearch(f)}),a(1,"actions"),S(2,He,3,0,"button",1)(3,Ze,4,1,"ng-container",2),l(),a(4,"filters")(5,"div")(6,"label",3),m(7,"Channel"),l(),a(8,"ng-select",4),g("ngModelChange",function(f){return i.searchFilter.ChannelID=f})("clear",function(){return i.onClearChannelFilter()}),S(9,qe,3,2,"ng-template",5),l()(),a(10,"div",6)(11,"label",3),m(12,"SKU Assigned"),l(),a(13,"mat-radio-group",7),g("ngModelChange",function(f){return i.searchFilter.HaveSku=f}),a(14,"mat-radio-button",8),m(15," All "),l(),a(16,"mat-radio-button",8),m(17," Yes "),l(),a(18,"mat-radio-button",8),m(19," No "),l()()(),a(20,"div",6)(21,"label",3),m(22,"Item ID"),l(),a(23,"input",9),g("ngModelChange",function(f){return i.searchFilter.Item_id=f}),l()()(),a(24,"content")(25,"div",10)(26,"div",11),S(27,We,2,13,"div",12)(28,Xe,3,0,"ng-container",2),l(),S(29,tn,3,4,"div",13),l()()()),e&2&&(c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(1),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ChannelID),c(5),s("ngModel",i.searchFilter.HaveSku),c(1),s("value",0),c(2),s("value",1),c(2),s("value",2),c(5),s("ngModel",i.searchFilter.Item_id),c(4),s("ngForOf",i.products),c(1),s("ngIf",i.products.length==0),c(1),s("ngIf",(i.products==null?null:i.products.length)>0))},dependencies:[N,E,et,$,j,V,H,nt,Kt,Jt,K,Y,A],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 en(o,r){if(o&1&&(a(0,"span",8),C(1,"img",9),l(),m(2)),o&2){let n=r.item,t=d();c(1),s("src",t.getChannelLogo(n.TypeID),O),c(1),I(" ",n.Name," ")}}function nn(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),s("imageForZoom",n.ImageUrl)("title",n.Name)("code",n.Code)("id",t)("image",n.ThumbnailURL)("channels",n.Channels)}}function on(o,r){o&1&&(v(0),a(1,"div",12),C(2,"app-empty-state"),l(),b())}function rn(o,r){if(o&1){let n=P();v(0),a(1,"div",13)(2,"div",14)(3,"app-custom-paginator",15),g("next",function(){u(n);let e=d();return h(e.onNextPage())})("previous",function(){u(n);let e=d();return h(e.onPrevPage())})("total",function(){u(n);let e=d();return h(e.getRowCount())}),l()()(),b()}if(o&2){let n=d();c(3),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickedRowCount)}}var ce=(()=>{let r=class r{constructor(t,e,i){this.httpService=t,this.productService=e,this.authService=i,this.searchFilter=new Z,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader(),this.channelOptions=i.getChannels()}getPageLoader(){this.productService.loader().subscribe(t=>{this.searchFilter=t.Filter,this.searchFilter.PageSize=t.Filter.RowCount,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=_.GuidEMpty}getChannelLogo(t){return _.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)(x(B),x(U),x(k))},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",""],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text","mt-2",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),g("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),g("ngModelChange",function(f){return i.searchFilter.ListChannelID=f})("clear",function(){return i.onClearFilter()}),S(7,en,3,2,"ng-template",3),l()()()(),a(8,"content")(9,"div",4)(10,"div",5),S(11,nn,2,6,"div",6)(12,on,3,0,"ng-container",7),l(),S(13,rn,4,4,"ng-container",7),l()()()),e&2&&(c(6),s("multiple",!0)("clearable",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ListChannelID),c(5),s("ngForOf",i.products),c(1),s("ngIf",(i.products==null?null:i.products.length)==0),c(1),s("ngIf",(i.products==null?null:i.products.length)>0))},dependencies:[N,E,$,j,V,H,nt,gt,K,A]});let o=r;return o})();function an(o,r){if(o&1&&(v(0),m(1),b()),o&2){let n=d().$implicit;c(1),I(" ",n.Count," ")}}function ln(o,r){if(o&1){let n=P();a(0,"span",26),g("click",function(){u(n);let e=d().$implicit,i=d(2);return h(i.getLiveProductCount(e.ID,e))}),C(1,"i",27),l()}}var cn=()=>["/menu/products/status/sold-in-channel"],se=o=>({ID:o}),sn=()=>["/menu/products/status/not-in-pos"];function pn(o,r){if(o&1){let n=P();a(0,"tr")(1,"td"),C(2,"img",16),a(3,"span",17),m(4),l()(),a(5,"td",18),S(6,an,2,1,"ng-container",4)(7,ln,2,0,"ng-template",null,19,tt),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),g("click",function(){let i=u(n).$implicit,p=d(2);return h(p.onScanChannel(i))}),C(23,"i",23),m(24," Scan "),l(),a(25,"button",24),g("click",function(){let i=u(n).$implicit,p=d(2);return h(p.onClearCache(i.ID))}),C(26,"i",25),m(27," Clear "),l()()()()}if(o&2){let n=r.$implicit,t=L(8),e=d(2);c(2),s("src",e.getChannelLogo(n.TypeID),O),c(2),st(n.Name),c(2),s("ngIf",n.Count!==void 0)("ngIfElse",t),c(4),s("routerLink",Q(18,cn))("queryParams",it(19,se,n.ID)),c(1),I(" ",T(12,11,n.SoldInChannel)," "),c(3),s("routerLink",Q(21,sn))("queryParams",it(22,se,n.ID)),c(1),I(" ",T(16,13,n.NotInPOS)," "),c(3),I("",n.LastSync?Tt(19,15,n.LastSync,"dd MMM yyyy HH:mm"):"-"," ")}}function dn(o,r){if(o&1&&(v(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,pn,28,24,"tr",15),F(18,"async"),l()()(),b()),o&2){let n=d(),t;c(17),s("ngForOf",(t=T(18,1,n.channels$))==null?null:t.Data)}}function mn(o,r){o&1&&(a(0,"div",28),C(1,"app-empty-state"),l())}var pe=(()=>{let r=class r{constructor(t,e,i,p){this.productService=t,this.toastr=e,this.dialog=i,this.authService=p,this.destroy$=new wt,this.channelOptions=p.getChannels()}ngOnInit(){this.setObsProductStatistic()}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(t,e){this.productService.getTotalProductLive(t).pipe(Pt(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(y(e=>_.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(y(p=>p)).subscribe(p=>{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(p,i,!e.UpdatedProduct),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(Pt(this.destroy$)).subscribe(i=>{this.toastr.success("Successfully cleared cache","Success"),this.setObsProductStatistic()})}getChannelLogo(t){return _.getChannelLogoByTypeId(t)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};r.\u0275fac=function(e){return new(e||r)(x(U),x(R),x(G),x(k))},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,dn,19,3,"ng-container",4),F(6,"async"),S(7,mn,2,0,"ng-template",null,5,tt),l()()()()()),e&2){let p=L(8),f;s("hideSearchBox",!0)("hideSearchDropdown",!0),c(5),s("ngIf",((f=T(6,4,i.channels$))==null||f.Data==null?null:f.Data.length)>0)("ngIfElse",p)}},dependencies:[N,E,V,ht,ut,A,pt,dt,Nt]});let o=r;return o})();var un=[{component:ne,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:oe,canActivate:[W],data:{title:"Products in POS"}},{path:"sold-in-channel",component:re,canActivate:[W],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:ae,canActivate:[W],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:le,canActivate:[W],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:ce,canActivate:[W],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",component:pe,canActivate:[W],data:{title:"Channel Statistic"}}]}],yi=(()=>{let r=class r{};r.\u0275fac=function(e){return new(e||r)},r.\u0275mod=Dt({type:r}),r.\u0275inj=Ft({imports:[Et,At,$t,Bt,Lt,ee,zt,Gt,gt,K,Y,Vt.forChild(un),Wt,Rt]});let o=r;return o})();export{yi as StatusModule};
1
+ import{a as _t,c as q,d as te}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-GVJVVJCU.js";import{a as Z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-Y4MB3DWC.js";import{a as A}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-BFJBMKDS.js";import{d as Zt,e as qt,f as Yt,g as Qt,k as Wt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-5K7YSLKL.js";import{a as Y,b as gt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-O6PGRAJA.js";import{a as K}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-44TEKK34.js";import{b as ee}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-YAWRXDGC.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-CXQFJUAW.js";import{a as Xt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-LFB6AUP4.js";import{a as D}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-IIGTCNJI.js";import{a as U}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-XBCSTQJ3.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-7F3GACIE.js";import{a as jt,b as Gt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-CFWKH54E.js";import{f as k}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-5YDKDDXQ.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-D4PUISDS.js";import{b as R,e as B}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-V74TRO5C.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-AOQBLGBU.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-WMKNIYJG.js";import{a as Ht}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-L72SNBKA.js";import{a as Kt,b as Jt,c as zt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-BPOHVA6C.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-6O46WM77.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-NFHX3EWZ.js";import{a as nt,c as H,d as Lt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-3KO3N6JP.js";import{a as W}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-35SISJKC.js";import{B as V,C as $t,q as ht,r as Bt,u as G}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-DR4WIP6T.js";import{T as Rt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-OVSLUEIO.js";import{b as Ut,c as et,h as $,k as j,u as At}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-VTLJVEYF.js";import{b as z,c as _}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-T2YIFX3Q.js";import{$a as C,$b as E,B as y,Db as F,Eb as T,Fa as c,Fb as Tt,Ga as x,Hc as mt,Ic as kt,Kc as ut,Mb as tt,Mc as Vt,Oa as s,T as J,Ua as S,V as Pt,X as Ot,Za as a,_a as l,_b as N,aa as Ft,ab as v,bb as b,c as wt,cc as pt,db as P,dc as Nt,ea as M,fa as Dt,fc as dt,gc as Et,hb as g,ja as u,jb as d,ka as h,ob as L,pb as m,q as Mt,qb as st,rb as I,vb as Q,wb as it,za as O}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-ZIANW63Q.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-KOJSHFZJ.js";var de=()=>["/menu/products/download/by-url"],ne=(()=>{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),s("Tabs",i.productTabs),c(7),s("routerLink",Q(2,de)))},dependencies:[jt,kt,ut]});let o=r;return o})();function me(o,r){if(o&1){let n=P();a(0,"button",13),g("click",function(){u(n);let e=d(2);return h(e.onOpenScanDialog())}),C(1,"i",14),m(2," Scan Channel "),l()}}function ue(o,r){if(o&1&&(v(0),S(1,me,3,0,"button",12),b()),o&2){let n=d();c(1),s("ngIf",!n.productService.hasSelection(n.products))}}function he(o,r){if(o&1){let n=P();v(0),a(1,"button",15),g("click",function(){u(n);let e=d();return h(e.onScanMultipleProduct())}),C(2,"i",14),m(3),l(),b()}if(o&2){let n=d(),t;c(3),I(" Scan (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function _e(o,r){if(o&1){let n=P();v(0),a(1,"button",16),g("click",function(){u(n);let e=d();return h(e.onUploadMultipleProduct())}),C(2,"i",17),m(3),l(),b()}if(o&2){let n=d(),t;c(3),I(" Upload (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function ge(o,r){if(o&1){let n=P();a(0,"div",18)(1,"app-product-card",19),g("onUpload",function(){let i=u(n).$implicit,p=d();return h(p.onUploadToMultipleChannel(i))})("onScan",function(){let i=u(n).$implicit,p=d();return h(p.onScanSingleProduct(i))})("onDescEvent",function(){let i=u(n).index,p=d();return h(p.onOpenDialogVariant(i))})("onCheckBoxChange",function(e){let p=u(n).$implicit;return h(p.selected=e)}),l()()}if(o&2){let n=r.$implicit,t=d();c(1),s("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 Ce(o,r){o&1&&(v(0),a(1,"div",20),C(2,"app-empty-state"),l(),b())}function fe(o,r){if(o&1){let n=P();v(0),a(1,"div",21)(2,"div",22)(3,"app-custom-paginator",23),g("next",function(){u(n);let e=d();return h(e.onNextPage())})("previous",function(){u(n);let e=d();return h(e.onPrevPage())}),l()()(),b()}if(o&2){let n=d();c(3),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",!0)}}var oe=(()=>{let r=class r{constructor(t,e,i,p,f){this.http=t,this.toastr=e,this.dialog=i,this.productService=p,this.authService=f,this.searchFilter=new Z,this.products=[],this.rowCount=0,this.multipeScanChannels=[],this.getLoaderPage(),this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}getLoaderPage(){this.productService.LoadInPOS().subscribe(t=>{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()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[z.Tokopedia,z.Tiktok])}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=_.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.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(_t,{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(q,{width:"700px",data:{title:"Upload Multiple Product",channels:e}}).afterClosed().pipe(y(i=>_.IsNotEmpty(i)),J(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(q,{width:"700px",data:{title:`Upload - ${t.Name}`,channels:i,product:t}}).afterClosed().pipe(y(p=>_.IsNotEmpty(p)),J(p=>this.productService.uploadSingleProduct([t],p))).subscribe({next:p=>{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=_.GuidEMpty;let e=this.productService.filterChannelByTypeId(this.channelOptions,[z.Tokopedia,z.Tiktok]);this.dialog.open(D,{data:{filter:t,channelOptions:e,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(p=>_.IsNotEmpty(p))).subscribe(p=>{this.searchFilter.ChannelID=p.ChannelID,this.searchFilter.ScanFull=p.ScanFull,this.searchFilter.UpdatedProduct=p.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=_.GuidEMpty,this.dialog.open(D,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;let p=this.productService.getVariantCodesProduct(t);this.scanSingleProduct(p)})}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=_.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=_.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)(x(B),x(R),x(G),x(U),x(k))},r.\u0275cmp=M({type:r,selectors:[["app-in-pos"]],decls:22,vars:13,consts:[["description","All products which is already available in POS",3,"headerTitle","onSubmit"],[4,"ngIf"],[1,"fw-bold"],["appendTo","body","bindLabel","Name","name","Name","bindValue","Name","placeholder","Select Category",1,"center-text","mt-2",3,"clearable","items","ngModel","ngModelChange"],[1,"mt-5"],["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"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",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 p=P();a(0,"mainpanel",0),g("onSubmit",function(w){return i.searchProduct(w)}),a(1,"actions"),S(2,ue,2,1,"ng-container",1)(3,he,4,1,"ng-container",1)(4,_e,4,1,"ng-container",1),l(),a(5,"filters")(6,"div")(7,"label",2),m(8,"Category"),l(),a(9,"ng-select",3),g("ngModelChange",function(w){return i.searchFilter.Category=w}),l()(),a(10,"div",4)(11,"mat-date-range-input",5)(12,"input",6),g("ngModelChange",function(w){return i.startDate=w})("click",function(){u(p);let w=L(15);return h(w.open())}),l(),a(13,"input",7),g("ngModelChange",function(w){return i.endDate=w})("click",function(){u(p);let w=L(15);return h(w.open())}),l()(),C(14,"mat-date-range-picker",null,8),l()(),a(16,"content")(17,"div",9)(18,"div",10),S(19,ge,2,10,"div",11)(20,Ce,3,0,"ng-container",1),l(),S(21,fe,4,4,"ng-container",1),l()()()}if(e&2){let p=L(15);s("headerTitle","In POS ("+i.rowCount+")"),c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(1),s("ngIf",i.productService.hasSelection(i.products)&&i.multipeScanChannels.length>0),c(1),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("items",i.Categories)("ngModel",i.searchFilter.Category),c(2),s("rangePicker",p),c(1),s("ngModel",i.startDate),c(1),s("ngModel",i.endDate),c(6),s("ngForOf",i.products),c(1),s("ngIf",i.products.length==0),c(1),s("ngIf",i.products.length>0)}},dependencies:[N,E,et,$,j,V,H,K,Y,A,Yt,Zt,qt,Qt],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}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}"]});let o=r;return o})();function Se(o,r){if(o&1){let n=P();v(0),a(1,"button",10),g("click",function(){u(n);let e=d();return h(e.onOpenScanDialog())}),C(2,"i",11),m(3," Scan Channel "),l(),b()}}function xe(o,r){if(o&1){let n=P();v(0),a(1,"button",12),g("click",function(){u(n);let e=d();return h(e.onScanMultipleProduct())}),C(2,"i",11),m(3),l(),b()}if(o&2){let n=d();c(3),I(" Scan (",n.productService.selectedProduct(n.products).length,") ")}}function Pe(o,r){if(o&1){let n=P();v(0),a(1,"button",13),g("click",function(){u(n);let e=d();return h(e.onUploadMultipleProduct())}),C(2,"i",14),m(3),l(),b()}if(o&2){let n=d();c(3),I(" Upload (",n.productService.selectedProduct(n.products).length,") ")}}function ve(o,r){if(o&1&&(a(0,"span",15),C(1,"img",16),l(),m(2)),o&2){let n=r.item,t=d();c(1),s("src",t.getChannelLogo(n.TypeID),O),c(1),I(" ",n.Name," ")}}function be(o,r){if(o&1){let n=P();a(0,"div",17)(1,"label",2),m(2,"Item ID"),l(),a(3,"input",18),g("ngModelChange",function(e){u(n);let i=d();return h(i.searchFilter.Item_id=e)}),l()()}if(o&2){let n=d();c(3),s("ngModel",n.searchFilter.Item_id)}}function Ie(o,r){if(o&1){let n=P();a(0,"div",19)(1,"app-product-card",20),g("onUpload",function(){let i=u(n).$implicit,p=d();return h(p.onUploadToMultipleChannel(i))})("onDescEvent",function(){let i=u(n).index,p=d();return h(p.onOpenVariantDetail(i))})("onScan",function(){let i=u(n).$implicit,p=d();return h(p.onScanSingleProduct(i))})("onCheckBoxChange",function(e){let p=u(n).$implicit;return h(p.selected=e)}),l()()}if(o&2){let n=r.$implicit,t=d();c(1),s("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 ye(o,r){o&1&&(v(0),a(1,"div",21),C(2,"app-empty-state"),l(),b())}function we(o,r){if(o&1){let n=P();a(0,"div",22)(1,"div",23)(2,"app-custom-paginator",24),g("total",function(){u(n);let e=d();return h(e.getRowCount())})("next",function(){u(n);let e=d();return h(e.onNextPage())})("previous",function(){u(n);let e=d();return h(e.onPreviousPage())}),l()()()}if(o&2){let n=d();c(2),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var re=(()=>{let r=class r{constructor(t,e,i,p,f,w){this.http=t,this.dialog=e,this.toastr=i,this.productService=p,this.activateRouter=f,this.authService=w,this.searchFilter=new Z,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=_.GuidEMpty,this.multipeScanChannels=[],this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(_.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(e=>{this.searchFilter=e.Filter,e.Filter.ChannelID!=_.GuidEMpty&&(this.searchFilter.ListChannelID=[],this.searchFilter.ListChannelID.push(e.Filter.ChannelID)),this.searchFilter.PageSize=e.Filter.RowCount,this.searchFilter.Item_id="",this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[z.Tokopedia,z.Tiktok])}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(_t,{data:{variants:e,title:this.products[t].Name},width:"800px"})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=_.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.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(y(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(_.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(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;let p=this.productService.getVariantCodesProduct(t);this.scanProducts(p)})}onUploadToMultipleChannel(t){let e=this.productService.getChannelProduct(t);t.Channel=e;let i=this.productService.filterUnselectedChannel([t],this.channelOptions);this.dialog.open(q,{width:"700px",data:{title:`Upload - ${t.Name}`,channels:i,product:t}}).afterClosed().pipe(y(p=>_.IsNotEmpty(p)),J(p=>this.productService.uploadSingleProduct([t],p))).subscribe({next:p=>{this.getProducts()}})}onScanMultipleProduct(){this.searchFilter.ChannelID=_.GuidEMpty;let t=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(D,{data:{filter:t,channelOptions:this.multipeScanChannels,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct;let p=this.productService.selectedProduct(this.products),f=this.productService.getVariantCodesProducts(p);this.scanProducts(f)})}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=_.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=_.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=_.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products),e=this.productService.filterUnselectedChannel(t,this.channelOptions);this.dialog.open(q,{width:"700px",data:{title:"Upload Multiple Product",channels:e}}).afterClosed().pipe(y(i=>_.IsNotEmpty(i)),J(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 _.getChannelLogoByTypeId(t)}};r.\u0275fac=function(e){return new(e||r)(x(B),x(G),x(R),x(U),x(mt),x(k))},r.\u0275cmp=M({type:r,selectors:[["app-sold-in-channel"]],decls:18,vars:12,consts:[["description","SKU has been mapped between dealpos and marketplace",3,"headerTitle","onSubmit"],[4,"ngIf"],[1,"fw-bold"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text","mt-2",3,"clearable","multiple","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],["class","mt-5",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"],[1,"mt-5"],["type","text","name","Item_id","id","Item_id",1,"form-control","mt-2",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),g("onSubmit",function(f){return i.searchProduct(f)}),a(1,"actions"),S(2,Se,4,0,"ng-container",1)(3,xe,4,1,"ng-container",1)(4,Pe,4,1,"ng-container",1),l(),a(5,"filters")(6,"div")(7,"label",2),m(8,"Channel"),l(),a(9,"ng-select",3),g("ngModelChange",function(f){return i.searchFilter.ListChannelID=f})("clear",function(){return i.onClearFilterChannel()}),S(10,ve,3,2,"ng-template",4),l()(),S(11,be,4,1,"div",5),l(),a(12,"content")(13,"div",6)(14,"div",7),S(15,Ie,2,10,"div",8)(16,ye,3,0,"ng-container",1),l(),S(17,we,3,4,"div",9),l()()()),e&2&&(s("headerTitle","Sold in Channel"),c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(1),s("ngIf",i.multipeScanChannels.length>0&&i.productService.hasSelection(i.products)),c(1),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("multiple",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ListChannelID),c(2),s("ngIf",i.searchFilter.ListChannelID!=null),c(4),s("ngForOf",i.products),c(1),s("ngIf",i.products.length==0),c(1),s("ngIf",i.products==null?null:i.products.length))},dependencies:[N,E,et,$,j,V,H,nt,K,Y,A],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 Oe(o,r){if(o&1){let n=P();a(0,"button",10),g("click",function(){u(n);let e=d(2);return h(e.uploadMultipleProduct())}),C(1,"i",11),m(2),l()}if(o&2){let n=d(2);c(2),I(" upload (",n.selectedProducts==null?null:n.selectedProducts.length,") ")}}function Fe(o,r){if(o&1){let n=P();v(0),a(1,"td",26)(2,"input",27),g("ngModelChange",function(e){u(n);let i=d(2).$implicit;return h(i.selected=e)})("ngModelChange",function(){u(n);let e=d(3).ngIf,i=d(3);return h(i.onSelectProduct(e))}),l()(),b()}if(o&2){let n=d(2).$implicit;c(1),s("rowSpan",n==null?null:n.Variants.length),c(1),s("ngModel",n.selected)}}function De(o,r){if(o&1){let n=P();v(0),a(1,"img",33),g("click",function(e){u(n);let i=d(3).$implicit,p=d(4);return h(p.onZoomImage(e,i==null?null:i.ImageUrl))}),l(),b()}if(o&2){let n=d(3).$implicit;c(1),s("src",n==null?null:n.ImageUrl,O)}}function Te(o,r){o&1&&C(0,"img",34)}function Ne(o,r){if(o&1&&(v(0),a(1,"td",26)(2,"div",28),S(3,De,2,1,"ng-container",7)(4,Te,1,0,"ng-template",null,29,tt),l()(),a(6,"td",30)(7,"h4",31)(8,"span",32),m(9),l()()(),b()),o&2){let n=L(5),t=d(2).$implicit;c(1),s("rowSpan",t==null?null:t.Variants.length),c(2),s("ngIf",t==null?null:t.ImageUrl)("ngIfElse",n),c(3),s("rowSpan",t==null?null:t.Variants.length),c(2),s("matTooltip",(t==null||t.Name==null?null:t.Name.length)>50?t==null?null:t.Name:""),c(1),I(" ",t==null?null:t.Name," ")}}function Ee(o,r){if(o&1&&(a(0,"div")(1,"a",22),C(2,"img",35),l()()),o&2){let n=r.$implicit;c(1),s("href",n.URL,O),c(1),s("src",n.Img,O)("matTooltip",n.Name)}}function ke(o,r){if(o&1&&(a(0,"div"),C(1,"img",35),l()),o&2){let n=r.$implicit;c(1),s("src",n.Img,O)("matTooltip",n.Name)}}function Ve(o,r){if(o&1&&(a(0,"tr"),S(1,Fe,3,2,"ng-container",9)(2,Ne,10,6,"ng-container",9),a(3,"td"),m(4),l(),a(5,"td")(6,"span"),m(7),l(),a(8,"span",21)(9,"a",22),C(10,"i",23),l()()(),a(11,"td",24)(12,"div",25),S(13,Ee,3,3,"div",20),l()(),a(14,"td",24)(15,"div",25),S(16,ke,2,2,"div",20),l()()()),o&2){let n=r.$implicit,t=r.index,e=d(5);c(1),s("ngIf",t==0),c(1),s("ngIf",t==0),c(2),I(" ",n.Name," "),c(3),I(" ",n.Code," "),c(2),s("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(n==null?null:n.ID),O),c(4),s("ngForOf",n==null?null:n.Available),c(3),s("ngForOf",n==null?null:n.NotAvailable)}}function Ue(o,r){if(o&1&&(v(0),S(1,Ve,17,7,"tr",20),b()),o&2){let n=r.$implicit;c(1),s("ngForOf",n.Variants)}}function Ae(o,r){if(o&1&&(a(0,"tbody"),S(1,Ue,2,1,"ng-container",20),l()),o&2){let n=r.ngIf;c(1),s("ngForOf",n)}}function Le(o,r){if(o&1&&(v(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,Ae,2,1,"tbody",9),F(17,"async"),l()(),b()),o&2){let n=d(2);c(16),s("ngIf",T(17,1,n.data$))}}function Re(o,r){o&1&&(a(0,"div",36),C(1,"app-empty-state"),l())}function Be(o,r){if(o&1){let n=P();a(0,"span",44),g("click",function(){u(n);let e=d(4);return h(e.getRowCount())}),a(1,"i",45),m(2,"?"),l()()}}function $e(o,r){if(o&1&&(a(0,"span"),m(1),F(2,"number"),l()),o&2){let n=r.ngIf;c(1),st(T(2,1,n==null?null:n.Count))}}function je(o,r){if(o&1){let n=P();a(0,"a",46),g("click",function(){u(n);let e=d(4);return h(e.onNextPage())}),C(1,"i",47),m(2," Next"),l()}}function Ge(o,r){if(o&1){let n=P();a(0,"a",48),g("click",function(){u(n);let e=d(4);return h(e.onLastPage())}),C(1,"i",49),m(2," Last"),l()}}function Ke(o,r){if(o&1&&(v(0),a(1,"div",37)(2,"div",38)(3,"div",39),m(4),F(5,"number"),S(6,Be,3,0,"span",40)(7,$e,3,3,"span",9),F(8,"async"),m(9),l()(),a(10,"div",41),S(11,je,3,0,"a",42)(12,Ge,3,0,"a",43),l()(),b()),o&2){let n=d().ngIf,t=d(2);c(4),I(" Showing 1 - ",T(5,6,n==null?null:n.length)," of "),c(2),s("ngIf",t.paginationService.hideCount),c(1),s("ngIf",!t.paginationService.hideCount&&T(8,8,t.rowCount$)),c(2),I(" records ~ ",t.paginationService.footerPageNumber," Page "),c(2),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),c(1),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}function Je(o,r){if(o&1&&(v(0),S(1,Ke,13,10,"ng-container",9),b()),o&2){let n=r.ngIf;c(1),s("ngIf",(n==null?null:n.length)>0)}}function ze(o,r){if(o&1){let n=P();a(0,"mainpanel",1),g("onSubmit",function(e){u(n);let i=d();return h(i.searchProduct(e))}),a(1,"actions"),S(2,Oe,3,1,"button",2),a(3,"button",3),g("click",function(){u(n);let e=d();return h(e.openScanDialog())}),C(4,"i",4),m(5," Scan Channel "),l()(),a(6,"content")(7,"div",5)(8,"div",6),S(9,Le,18,3,"ng-container",7),F(10,"async"),S(11,Re,2,0,"ng-template",null,8,tt),l(),S(13,Je,2,1,"ng-container",9),F(14,"async"),l()()()}if(o&2){let n=L(12),t=d(),e;s("hideSearchDropdown",!0),c(2),s("ngIf",t.hasSelectionProduct),c(7),s("ngIf",((e=T(10,5,t.data$))==null?null:e.length)>0)("ngIfElse",n),c(4),s("ngIf",T(14,7,t.data$))}}var ae=(()=>{let r=class r{constructor(t,e,i,p,f,w,yt){this.http=t,this.dialog=e,this.toastr=i,this.productService=p,this.paginationService=f,this.biggerPictureService=w,this.authService=yt,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[],this.channelOptions=yt.getChannels(),this.hostName=this.authService.getDomain()}ngOnInit(){this.initPageLoader(),this.iniData()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe(Ot(t=>{this.filterSearch=t.Filter,this.paginationService.reloadPagination(t.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe(Mt(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=_.getChannelLogoByTypeId(e.TypeID),e)),t}searchProduct(t){this.filterSearch.text=t,this.paginationService.reloadPagination(this.filterSearch)}scanAllProduct(){let t=this.productService.findChannelById(this.filterSearch.ChannelID,this.channelOptions);this.productService.scanAll(this.filterSearch.ChannelID,this.filterSearch.ScanFull,this.filterSearch.UpdatedProduct,this.filterSearch.Async).subscribe(e=>{this.filterSearch.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(e,t,!this.filterSearch.UpdatedProduct),this.initPageLoader())})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.filterSearch));t.ChannelID=_.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.filterSearch.ChannelID=i.ChannelID,this.filterSearch.ScanFull=i.ScanFull,this.filterSearch.UpdatedProduct=i.UpdatedProduct,this.filterSearch.Async=i.Async,this.scanAllProduct()})}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(q,{width:"700px",data:{title:"Upload Multiple Product",channels:t}}).afterClosed().pipe(y(e=>_.IsNotEmpty(e)),J(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,p)=>p.findIndex(f=>f.ChannelID==e.ChannelID)==i),t}ngOnDestroy(){this.paginationService.destroy()}};r.\u0275fac=function(e){return new(e||r)(x(B),x(G),x(R),x(U),x(Xt),x(Ht),x(k))},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",""],[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,"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,ze,15,9,"mainpanel",0),F(1,"async")),e&2&&s("ngIf",T(1,1,i.loader$))},dependencies:[N,E,Ut,$,j,V,ht,A,pt,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 He(o,r){if(o&1){let n=P();a(0,"button",14),g("click",function(){u(n);let e=d();return h(e.openScanDialog())}),C(1,"i",15),m(2," Scan Channel "),l()}}function Ze(o,r){if(o&1){let n=P();v(0),a(1,"button",16),g("click",function(){u(n);let e=d();return h(e.onDownloadAllProduct("SELECTED"))}),C(2,"i",17),m(3),l(),b()}if(o&2){let n=d(),t;c(3),I(" Download (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function qe(o,r){if(o&1&&(a(0,"span",18),C(1,"img",19),l(),m(2)),o&2){let n=r.item,t=d();c(1),s("src",t.getChannelLogo(n.TypeID),O),c(1),I(" ",n.Name," ")}}var Ye=o=>[o],Qe=()=>[];function We(o,r){if(o&1){let n=P();a(0,"div",20)(1,"app-product-card",21),g("onCheckBoxChange",function(e){let p=u(n).index,f=d();return h(f.onSelectProduct(e,p))})("onDescEvent",function(){let i=u(n).index,p=d();return h(p.onShowVariantDetail(i))})("onDownload",function(){let i=u(n).$implicit,p=d();return h(p.onDownloadProduct(i))})("onScan",function(){let i=u(n).$implicit,p=d();return h(p.onScanChannel(i))}),l()()}if(o&2){let n=r.$implicit;c(1),s("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?it(10,Ye,n==null?null:n.Channel):Q(12,Qe))("showCheckBox",!0)("scanButton",!0)}}function Xe(o,r){o&1&&(v(0),a(1,"div",22),C(2,"app-empty-state"),l(),b())}function tn(o,r){if(o&1){let n=P();a(0,"div",23)(1,"div",24)(2,"app-custom-paginator",25),g("total",function(){u(n);let e=d();return h(e.getRowCount())})("next",function(){u(n);let e=d();return h(e.onNextPage())})("previous",function(){u(n);let e=d();return h(e.onPreviousPage())}),l()()()}if(o&2){let n=d();c(2),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var le=(()=>{let r=class r{constructor(t,e,i,p,f,w){this.http=t,this.dialog=e,this.productService=i,this.toastrService=p,this.activateRouter=f,this.authService=w,this.searchFilter=new Z,this.products=[],this.hasClickRowCount=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(_.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(e=>{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(){let t;this.products=this.products.map(e=>(t=this.channelOptions.find(i=>i.ID==e.ChannelID),t?e.Channel=JSON.parse(JSON.stringify(t)):e.Channel=null,e)).map(e=>(e.Channel&&(e.Channel.Url=e.Url),e))}setSkuProduct(){this.products=this.products.map(t=>(t?.Variant?.length==0?_.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=_.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(_.GuidEMpty),this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=_.GuidEMpty})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=_.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.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(_.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(te,{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 _.getChannelLogoByTypeId(t)}};r.\u0275fac=function(e){return new(e||r)(x(B),x(G),x(U),x(R),x(mt),x(k))},r.\u0275cmp=M({type:r,selectors:[["app-not-in-pos"]],decls:30,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,"fw-bold"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text","mt-2",3,"clearable","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],[1,"mt-5"],["name","haveSKU",1,"form-control","h-100","pt-3","rounded","mt-2",3,"ngModel","ngModelChange"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control","mt-2",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),g("onSubmit",function(f){return i.onSearch(f)}),a(1,"actions"),S(2,He,3,0,"button",1)(3,Ze,4,1,"ng-container",2),l(),a(4,"filters")(5,"div")(6,"label",3),m(7,"Channel"),l(),a(8,"ng-select",4),g("ngModelChange",function(f){return i.searchFilter.ChannelID=f})("clear",function(){return i.onClearChannelFilter()}),S(9,qe,3,2,"ng-template",5),l()(),a(10,"div",6)(11,"label",3),m(12,"SKU Assigned"),l(),a(13,"mat-radio-group",7),g("ngModelChange",function(f){return i.searchFilter.HaveSku=f}),a(14,"mat-radio-button",8),m(15," All "),l(),a(16,"mat-radio-button",8),m(17," Yes "),l(),a(18,"mat-radio-button",8),m(19," No "),l()()(),a(20,"div",6)(21,"label",3),m(22,"Item ID"),l(),a(23,"input",9),g("ngModelChange",function(f){return i.searchFilter.Item_id=f}),l()()(),a(24,"content")(25,"div",10)(26,"div",11),S(27,We,2,13,"div",12)(28,Xe,3,0,"ng-container",2),l(),S(29,tn,3,4,"div",13),l()()()),e&2&&(c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(1),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ChannelID),c(5),s("ngModel",i.searchFilter.HaveSku),c(1),s("value",0),c(2),s("value",1),c(2),s("value",2),c(5),s("ngModel",i.searchFilter.Item_id),c(4),s("ngForOf",i.products),c(1),s("ngIf",i.products.length==0),c(1),s("ngIf",(i.products==null?null:i.products.length)>0))},dependencies:[N,E,et,$,j,V,H,nt,Kt,Jt,K,Y,A],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 en(o,r){if(o&1&&(a(0,"span",8),C(1,"img",9),l(),m(2)),o&2){let n=r.item,t=d();c(1),s("src",t.getChannelLogo(n.TypeID),O),c(1),I(" ",n.Name," ")}}function nn(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),s("imageForZoom",n.ImageUrl)("title",n.Name)("code",n.Code)("id",t)("image",n.ThumbnailURL)("channels",n.Channels)}}function on(o,r){o&1&&(v(0),a(1,"div",12),C(2,"app-empty-state"),l(),b())}function rn(o,r){if(o&1){let n=P();v(0),a(1,"div",13)(2,"div",14)(3,"app-custom-paginator",15),g("next",function(){u(n);let e=d();return h(e.onNextPage())})("previous",function(){u(n);let e=d();return h(e.onPrevPage())})("total",function(){u(n);let e=d();return h(e.getRowCount())}),l()()(),b()}if(o&2){let n=d();c(3),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickedRowCount)}}var ce=(()=>{let r=class r{constructor(t,e,i){this.httpService=t,this.productService=e,this.authService=i,this.searchFilter=new Z,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader(),this.channelOptions=i.getChannels()}getPageLoader(){this.productService.loader().subscribe(t=>{this.searchFilter=t.Filter,this.searchFilter.PageSize=t.Filter.RowCount,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=_.GuidEMpty}getChannelLogo(t){return _.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)(x(B),x(U),x(k))},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",""],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text","mt-2",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),g("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),g("ngModelChange",function(f){return i.searchFilter.ListChannelID=f})("clear",function(){return i.onClearFilter()}),S(7,en,3,2,"ng-template",3),l()()()(),a(8,"content")(9,"div",4)(10,"div",5),S(11,nn,2,6,"div",6)(12,on,3,0,"ng-container",7),l(),S(13,rn,4,4,"ng-container",7),l()()()),e&2&&(c(6),s("multiple",!0)("clearable",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ListChannelID),c(5),s("ngForOf",i.products),c(1),s("ngIf",(i.products==null?null:i.products.length)==0),c(1),s("ngIf",(i.products==null?null:i.products.length)>0))},dependencies:[N,E,$,j,V,H,nt,gt,K,A]});let o=r;return o})();function an(o,r){if(o&1&&(v(0),m(1),b()),o&2){let n=d().$implicit;c(1),I(" ",n.Count," ")}}function ln(o,r){if(o&1){let n=P();a(0,"span",26),g("click",function(){u(n);let e=d().$implicit,i=d(2);return h(i.getLiveProductCount(e.ID,e))}),C(1,"i",27),l()}}var cn=()=>["/menu/products/status/sold-in-channel"],se=o=>({ID:o}),sn=()=>["/menu/products/status/not-in-pos"];function pn(o,r){if(o&1){let n=P();a(0,"tr")(1,"td"),C(2,"img",16),a(3,"span",17),m(4),l()(),a(5,"td",18),S(6,an,2,1,"ng-container",4)(7,ln,2,0,"ng-template",null,19,tt),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),g("click",function(){let i=u(n).$implicit,p=d(2);return h(p.onScanChannel(i))}),C(23,"i",23),m(24," Scan "),l(),a(25,"button",24),g("click",function(){let i=u(n).$implicit,p=d(2);return h(p.onClearCache(i.ID))}),C(26,"i",25),m(27," Clear "),l()()()()}if(o&2){let n=r.$implicit,t=L(8),e=d(2);c(2),s("src",e.getChannelLogo(n.TypeID),O),c(2),st(n.Name),c(2),s("ngIf",n.Count!==void 0)("ngIfElse",t),c(4),s("routerLink",Q(18,cn))("queryParams",it(19,se,n.ID)),c(1),I(" ",T(12,11,n.SoldInChannel)," "),c(3),s("routerLink",Q(21,sn))("queryParams",it(22,se,n.ID)),c(1),I(" ",T(16,13,n.NotInPOS)," "),c(3),I("",n.LastSync?Tt(19,15,n.LastSync,"dd MMM yyyy HH:mm"):"-"," ")}}function dn(o,r){if(o&1&&(v(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,pn,28,24,"tr",15),F(18,"async"),l()()(),b()),o&2){let n=d(),t;c(17),s("ngForOf",(t=T(18,1,n.channels$))==null?null:t.Data)}}function mn(o,r){o&1&&(a(0,"div",28),C(1,"app-empty-state"),l())}var pe=(()=>{let r=class r{constructor(t,e,i,p){this.productService=t,this.toastr=e,this.dialog=i,this.authService=p,this.destroy$=new wt,this.channelOptions=p.getChannels()}ngOnInit(){this.setObsProductStatistic()}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(t,e){this.productService.getTotalProductLive(t).pipe(Pt(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(y(e=>_.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(y(p=>p)).subscribe(p=>{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(p,i,!e.UpdatedProduct),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(Pt(this.destroy$)).subscribe(i=>{this.toastr.success("Successfully cleared cache","Success"),this.setObsProductStatistic()})}getChannelLogo(t){return _.getChannelLogoByTypeId(t)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};r.\u0275fac=function(e){return new(e||r)(x(U),x(R),x(G),x(k))},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,dn,19,3,"ng-container",4),F(6,"async"),S(7,mn,2,0,"ng-template",null,5,tt),l()()()()()),e&2){let p=L(8),f;s("hideSearchBox",!0)("hideSearchDropdown",!0),c(5),s("ngIf",((f=T(6,4,i.channels$))==null||f.Data==null?null:f.Data.length)>0)("ngIfElse",p)}},dependencies:[N,E,V,ht,ut,A,pt,dt,Nt]});let o=r;return o})();var un=[{component:ne,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:oe,canActivate:[W],data:{title:"Products in POS"}},{path:"sold-in-channel",component:re,canActivate:[W],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:ae,canActivate:[W],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:le,canActivate:[W],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:ce,canActivate:[W],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",component:pe,canActivate:[W],data:{title:"Channel Statistic"}}]}],yi=(()=>{let r=class r{};r.\u0275fac=function(e){return new(e||r)},r.\u0275mod=Dt({type:r}),r.\u0275inj=Ft({imports:[Et,At,$t,Bt,Lt,ee,zt,Gt,gt,K,Y,Vt.forChild(un),Wt,Rt]});let o=r;return o})();export{yi as StatusModule};
@@ -1 +1 @@
1
- import{b as P,c as S}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-OHUTMYI3.js";import{r as k}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-MSDWP3Z5.js";import{$b as y,Fa as n,Kc as E,Lc as M,Mb as C,Mc as N,Oa as o,Ua as a,Za as s,_a as m,_b as b,aa as v,ab as p,bb as c,ea as g,fa as x,gc as I,jb as l,mb as f,ob as T,pb as u,rb as _}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-WOVAE35N.js";function D(e,t){if(e&1&&(p(0),s(1,"a",6),u(2),m(),c()),e&2){let i=l().$implicit;n(1),f("routerLink",i.Url),o("title",i.Description?i.Description:""),n(1),_(" ",i.Title," ")}}function F(e,t){if(e&1&&(s(0,"li",4),a(1,D,3,3,"ng-container",5),m()),e&2){let i=t.$implicit;n(1),o("ngxPermissionsOnly",i.Permissions)}}function L(e,t){if(e&1&&(p(0),a(1,F,2,1,"li",3),c()),e&2){let i=l();n(1),o("ngForOf",i.Tabs)}}function R(e,t){if(e&1&&(s(0,"li",4)(1,"a",6),u(2),m()()),e&2){let i=t.$implicit;n(1),f("routerLink",i.Url),o("title",i.Description?i.Description:""),n(1),_(" ",i.Title," ")}}function w(e,t){if(e&1&&a(0,R,3,3,"li",3),e&2){let i=l();o("ngForOf",i.Tabs)}}var H=(()=>{let t=class t{constructor(){this.usePermissions=!1}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=g({type:t,selectors:[["nav-tab"]],inputs:{Tabs:"Tabs",usePermissions:"usePermissions"},decls:4,vars:2,consts:[[1,"nav","navbar-nav","navbar-left","nav-tab-arrow"],[4,"ngIf","ngIfElse"],["NOT_USE_PERMISSIONS",""],["routerLinkActive","active","class","nav-item me-6",4,"ngFor","ngForOf"],["routerLinkActive","active",1,"nav-item","me-6"],[4,"ngxPermissionsOnly"],[1,"nav-link","nav-link-arrow","mb-0",3,"routerLink","title"]],template:function(r,O){if(r&1&&(s(0,"ul",0),a(1,L,2,1,"ng-container",1)(2,w,1,1,"ng-template",null,2,C),m()),r&2){let h=T(3);n(1),o("ngIf",O.usePermissions)("ngIfElse",h)}},dependencies:[b,y,E,M,P]});let e=t;return e})(),J=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=x({type:t}),t.\u0275inj=v({imports:[I,N,k,S.forChild()]});let e=t;return e})();export{H as a,J as b};
1
+ import{b as P,c as S}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-WMKNIYJG.js";import{r as k}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-DR4WIP6T.js";import{$b as y,Fa as n,Kc as E,Lc as M,Mb as C,Mc as N,Oa as o,Ua as a,Za as s,_a as m,_b as b,aa as v,ab as p,bb as c,ea as g,fa as x,gc as I,jb as l,mb as f,ob as T,pb as u,rb as _}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-ZIANW63Q.js";function D(e,t){if(e&1&&(p(0),s(1,"a",6),u(2),m(),c()),e&2){let i=l().$implicit;n(1),f("routerLink",i.Url),o("title",i.Description?i.Description:""),n(1),_(" ",i.Title," ")}}function F(e,t){if(e&1&&(s(0,"li",4),a(1,D,3,3,"ng-container",5),m()),e&2){let i=t.$implicit;n(1),o("ngxPermissionsOnly",i.Permissions)}}function L(e,t){if(e&1&&(p(0),a(1,F,2,1,"li",3),c()),e&2){let i=l();n(1),o("ngForOf",i.Tabs)}}function R(e,t){if(e&1&&(s(0,"li",4)(1,"a",6),u(2),m()()),e&2){let i=t.$implicit;n(1),f("routerLink",i.Url),o("title",i.Description?i.Description:""),n(1),_(" ",i.Title," ")}}function w(e,t){if(e&1&&a(0,R,3,3,"li",3),e&2){let i=l();o("ngForOf",i.Tabs)}}var H=(()=>{let t=class t{constructor(){this.usePermissions=!1}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=g({type:t,selectors:[["nav-tab"]],inputs:{Tabs:"Tabs",usePermissions:"usePermissions"},decls:4,vars:2,consts:[[1,"nav","navbar-nav","navbar-left","nav-tab-arrow"],[4,"ngIf","ngIfElse"],["NOT_USE_PERMISSIONS",""],["routerLinkActive","active","class","nav-item me-6",4,"ngFor","ngForOf"],["routerLinkActive","active",1,"nav-item","me-6"],[4,"ngxPermissionsOnly"],[1,"nav-link","nav-link-arrow","mb-0",3,"routerLink","title"]],template:function(r,O){if(r&1&&(s(0,"ul",0),a(1,L,2,1,"ng-container",1)(2,w,1,1,"ng-template",null,2,C),m()),r&2){let h=T(3);n(1),o("ngIf",O.usePermissions)("ngIfElse",h)}},dependencies:[b,y,E,M,P]});let e=t;return e})(),J=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=x({type:t}),t.\u0275inj=v({imports:[I,N,k,S.forChild()]});let e=t;return e})();export{H as a,J as b};