marketplacepos 2.4.0 → 2.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/Marketplace/102.00a16fb36f5a57f2.js +1 -0
  2. package/Marketplace/162.9784f9e579112c86.js +1 -0
  3. package/Marketplace/285.7583f3169c88c210.js +1 -0
  4. package/Marketplace/387.10f091023152d154.js +1 -0
  5. package/Marketplace/3rdpartylicenses.txt +25 -0
  6. package/Marketplace/402.60951eab064c9706.js +1 -0
  7. package/Marketplace/455.fc7663306b753727.js +1 -0
  8. package/Marketplace/458.556f206f7d19bc29.js +1 -0
  9. package/Marketplace/585.9e916b668a91cc94.js +1 -0
  10. package/Marketplace/616.fb179a9605c3e98c.js +1 -0
  11. package/Marketplace/667.b7320f874219caa9.js +1 -0
  12. package/Marketplace/785.a0973529f8e8819e.js +1 -0
  13. package/Marketplace/796.d34bd45b5a924fca.js +1 -0
  14. package/Marketplace/832.40bafce037098f88.js +1 -0
  15. package/Marketplace/874.9879a8b9489c9845.js +1 -0
  16. package/Marketplace/882.5d3edc53a8e4c38e.js +1 -0
  17. package/Marketplace/assets/lbd/_sidebar-and-main-panel.scss +0 -1
  18. package/Marketplace/index.html +2 -2
  19. package/Marketplace/main.f30bf3b0f501021c.js +1 -0
  20. package/Marketplace/runtime.9cbc4802b0456746.js +1 -0
  21. package/Marketplace/scripts.09af772bfa77d50d.js +1 -0
  22. package/Marketplace/styles.f8366e17917068bd.css +20 -0
  23. package/package.json +1 -1
  24. package/Marketplace/146.bc63745556a7579e.js +0 -1
  25. package/Marketplace/285.1f547ef81e91fc15.js +0 -1
  26. package/Marketplace/288.9b236c96f7411cc2.js +0 -1
  27. package/Marketplace/327.72c9ed40548e876f.js +0 -1
  28. package/Marketplace/402.76aaae9b8dfdc4fd.js +0 -1
  29. package/Marketplace/458.175fffe756700561.js +0 -1
  30. package/Marketplace/466.02b13502d80588a2.js +0 -1
  31. package/Marketplace/472.2a25cc631023dd9d.js +0 -1
  32. package/Marketplace/585.c93552ac67f4550c.js +0 -1
  33. package/Marketplace/61.6bf2570c9c03e65d.js +0 -1
  34. package/Marketplace/616.507588c0a5d7b9e1.js +0 -1
  35. package/Marketplace/767.297995f3aba0da57.js +0 -1
  36. package/Marketplace/796.3be8ad424aad7864.js +0 -1
  37. package/Marketplace/970.3f4eb2182e0ed6ff.js +0 -1
  38. package/Marketplace/main.7b5711d2efb046b5.js +0 -1
  39. package/Marketplace/runtime.ec27a3ee2f27cef3.js +0 -1
  40. package/Marketplace/scripts.512baec01df5d79f.js +0 -1
  41. package/Marketplace/styles.84477c613818f650.css +0 -39
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[102],{102:(pt,L,p)=>{p.r(L),p.d(L,{ChannelsModule:()=>rn});var g=p(6895),h=p(4006),w=p(7398),u=p(7481),k=p(1948),C=p(8796),f=p(8252),t=p(4650);let Z=(()=>{class o{constructor(){this.channelTabs=[{Title:"Marketplace",Url:"/menu/channel/marketplace"},{Title:"POS",Url:"/menu/channel/pos"}]}ngOnInit(){}}return o.\u0275fac=function(e){return new(e||o)},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-channels"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(e,i){1&e&&(t.TgZ(0,"nav",0)(1,"div",1)(2,"div"),t._UZ(3,"nav-tab",2),t.qZA()()(),t._UZ(4,"router-outlet")),2&e&&(t.xp6(3),t.Q6J("Tabs",i.channelTabs))},dependencies:[w.e,f.lC],styles:[".form-label-group[_ngcontent-%COMP%]{position:relative;margin-bottom:1rem}.form-label-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-radius:.25rem!important;border-color:#c8d3df}.form-label-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{width:auto;position:absolute;top:1.125rem;left:.75rem;display:block;margin-bottom:0;line-height:1.5;color:#ccc;pointer-events:none;cursor:text;border:1px solid transparent;border-radius:.25rem;transition:all .1s ease-in-out;font-size:.875rem}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]{padding:.75rem;color:#343434;resize:both;font-size:.875rem;border-radius:.25rem;border-color:#c8d3df}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%] ~ label[_ngcontent-%COMP%]{top:.9375rem}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]:focus ~ label[_ngcontent-%COMP%]{top:1rem;left:.78125rem}.form-label-group[_ngcontent-%COMP%] > ng-select[_ngcontent-%COMP%] .ng-select-container{min-height:3.625rem;border-color:#c8d3df;box-shadow:none}.form-label-group[_ngcontent-%COMP%] > ng-select[_ngcontent-%COMP%] ~ label[_ngcontent-%COMP%]{display:inline-block;top:-.625rem;background-color:#fff;font-size:.75rem!important;color:#9da2a6;padding:0 .25rem;z-index:2000;left:.5rem}.form-label-group.multiple[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-input{padding-left:.25rem!important}.form-label-group.multiple[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-placeholder{top:18px!important}.form-label-group.radio[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;border-radius:.25rem!important;border:solid 1px #c8d3df}.form-label-group.radio[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{background-color:#fff;font-size:.75rem!important;color:#9da2a6;top:-10px!important;padding:0 .25rem;left:.5rem}.form-label-group.empty[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] ~ label[_ngcontent-%COMP%]{display:none}.form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:not(:placeholder-shown) ~ label[_ngcontent-%COMP%], .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:not(:placeholder-shown) ~ label[_ngcontent-%COMP%]{background-color:#fff;font-size:.75rem!important;color:#9da2a6;top:-10px!important;padding:0 .25rem;left:.5rem}.form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:not(:placeholder-shown):focus ~ label[_ngcontent-%COMP%], .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:not(:placeholder-shown):focus ~ label[_ngcontent-%COMP%]{color:#3f8aec}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-placeholder{padding-left:.25rem;color:#ccc!important;font-size:.875rem}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-has-value .ng-value{padding-left:.25rem;font-size:.875rem}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-value-container{overflow:initial!important}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-input{top:auto!important;padding-left:.875rem!important;font-size:.875rem}"]}),o})();var T=p(7376),D=p(3353),_=p(1281),$=p(2687),b=p(7579),H=p(727),Xt=p(4986),$t=p(2805),ee=p(6406),ht=p(8306),N=p(6451),A=p(2722),V=p(8675),ie=p(4004),tt=p(5698),ne=p(8505),oe=p(3900),et=p(445);function it(o,n,e){for(let i in n)if(n.hasOwnProperty(i)){const a=n[i];a?o.setProperty(i,a,e?.has(i)?"important":""):o.removeProperty(i)}return o}function F(o,n){const e=n?"":"none";it(o.style,{"touch-action":n?"":"none","-webkit-user-drag":n?"":"none","-webkit-tap-highlight-color":n?"":"transparent","user-select":e,"-ms-user-select":e,"-webkit-user-select":e,"-moz-user-select":e})}function ut(o,n,e){it(o.style,{position:n?"":"fixed",top:n?"":"0",opacity:n?"":"0",left:n?"":"-999em"},e)}function G(o,n){return n&&"none"!=n?o+" "+n:o}function gt(o){const n=o.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(o)*n}function nt(o,n){return o.getPropertyValue(n).split(",").map(i=>i.trim())}function ot(o){const n=o.getBoundingClientRect();return{top:n.top,right:n.right,bottom:n.bottom,left:n.left,width:n.width,height:n.height,x:n.x,y:n.y}}function at(o,n,e){const{top:i,bottom:a,left:s,right:r}=o;return e>=i&&e<=a&&n>=s&&n<=r}function Y(o,n,e){o.top+=n,o.bottom=o.top+o.height,o.left+=e,o.right=o.left+o.width}function mt(o,n,e,i){const{top:a,right:s,bottom:r,left:l,width:d,height:c}=o,m=d*n,v=c*n;return i>a-v&&i<r+v&&e>l-m&&e<s+m}class _t{constructor(n){this._document=n,this.positions=new Map}clear(){this.positions.clear()}cache(n){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),n.forEach(e=>{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:ot(e)})})}handleScroll(n){const e=(0,D.sA)(n),i=this.positions.get(e);if(!i)return null;const a=i.scrollPosition;let s,r;if(e===this._document){const c=this.getViewportScrollPosition();s=c.top,r=c.left}else s=e.scrollTop,r=e.scrollLeft;const l=a.top-s,d=a.left-r;return this.positions.forEach((c,m)=>{c.clientRect&&e!==m&&e.contains(m)&&Y(c.clientRect,l,d)}),a.top=s,a.left=r,{top:l,left:d}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}}function ft(o){const n=o.cloneNode(!0),e=n.querySelectorAll("[id]"),i=o.nodeName.toLowerCase();n.removeAttribute("id");for(let a=0;a<e.length;a++)e[a].removeAttribute("id");return"canvas"===i?Ct(o,n):("input"===i||"select"===i||"textarea"===i)&&bt(o,n),vt("canvas",o,n,Ct),vt("input, textarea, select",o,n,bt),n}function vt(o,n,e,i){const a=n.querySelectorAll(o);if(a.length){const s=e.querySelectorAll(o);for(let r=0;r<a.length;r++)i(a[r],s[r])}}let se=0;function bt(o,n){"file"!==n.type&&(n.value=o.value),"radio"===n.type&&n.name&&(n.name=`mat-clone-${n.name}-${se++}`)}function Ct(o,n){const e=n.getContext("2d");if(e)try{e.drawImage(o,0,0)}catch{}}const yt=(0,D.i$)({passive:!0}),K=(0,D.i$)({passive:!1}),st=new Set(["position"]);class le{constructor(n,e,i,a,s,r){this._config=e,this._document=i,this._ngZone=a,this._viewportRuler=s,this._dragDropRegistry=r,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._hasStartedDragging=!1,this._moveEvents=new b.x,this._pointerMoveSubscription=H.w0.EMPTY,this._pointerUpSubscription=H.w0.EMPTY,this._scrollSubscription=H.w0.EMPTY,this._resizeSubscription=H.w0.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new b.x,this.started=new b.x,this.released=new b.x,this.ended=new b.x,this.entered=new b.x,this.exited=new b.x,this.dropped=new b.x,this.moved=this._moveEvents,this._pointerDown=l=>{if(this.beforeStarted.next(),this._handles.length){const d=this._getTargetHandle(l);d&&!this._disabledHandles.has(d)&&!this.disabled&&this._initializeDragSequence(d,l)}else this.disabled||this._initializeDragSequence(this._rootElement,l)},this._pointerMove=l=>{const d=this._getPointerPositionOnPage(l);if(!this._hasStartedDragging){if(Math.abs(d.x-this._pickupPositionOnPage.x)+Math.abs(d.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){const U=Date.now()>=this._dragStartTime+this._getDragStartDelay(l),q=this._dropContainer;if(!U)return void this._endDragSequence(l);(!q||!q.isDragging()&&!q.isReceiving())&&(l.preventDefault(),this._hasStartedDragging=!0,this._ngZone.run(()=>this._startDragSequence(l)))}return}l.preventDefault();const c=this._getConstrainedPointerPosition(d);if(this._hasMoved=!0,this._lastKnownPointerPosition=d,this._updatePointerDirectionDelta(c),this._dropContainer)this._updateActiveDropContainer(c,d);else{const m=this.constrainPosition?this._initialClientRect:this._pickupPositionOnPage,v=this._activeTransform;v.x=c.x-m.x+this._passiveTransform.x,v.y=c.y-m.y+this._passiveTransform.y,this._applyRootElementTransform(v.x,v.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:c,event:l,distance:this._getDragDistance(c),delta:this._pointerDirectionDelta})})},this._pointerUp=l=>{this._endDragSequence(l)},this._nativeDragStart=l=>{if(this._handles.length){const d=this._getTargetHandle(l);d&&!this._disabledHandles.has(d)&&!this.disabled&&l.preventDefault()}else this.disabled||l.preventDefault()},this.withRootElement(n).withParent(e.parentDragRef||null),this._parentPositions=new _t(i),r.registerDragItem(this)}get disabled(){return this._disabled||!(!this._dropContainer||!this._dropContainer.disabled)}set disabled(n){const e=(0,_.Ig)(n);e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(i=>F(i,e)))}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(n){this._handles=n.map(i=>(0,_.fI)(i)),this._handles.forEach(i=>F(i,this.disabled)),this._toggleNativeDragInteractions();const e=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&e.add(i)}),this._disabledHandles=e,this}withPreviewTemplate(n){return this._previewTemplate=n,this}withPlaceholderTemplate(n){return this._placeholderTemplate=n,this}withRootElement(n){const e=(0,_.fI)(n);return e!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{e.addEventListener("mousedown",this._pointerDown,K),e.addEventListener("touchstart",this._pointerDown,yt),e.addEventListener("dragstart",this._nativeDragStart,K)}),this._initialTransform=void 0,this._rootElement=e),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(n){return this._boundaryElement=n?(0,_.fI)(n):null,this._resizeSubscription.unsubscribe(),n&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(n){return this._parentDragRef=n,this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(n){!this._disabledHandles.has(n)&&this._handles.indexOf(n)>-1&&(this._disabledHandles.add(n),F(n,!0))}enableHandle(n){this._disabledHandles.has(n)&&(this._disabledHandles.delete(n),F(n,this.disabled))}withDirection(n){return this._direction=n,this}_withDropContainer(n){this._dropContainer=n}getFreeDragPosition(){const n=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:n.x,y:n.y}}setFreeDragPosition(n){return this._activeTransform={x:0,y:0},this._passiveTransform.x=n.x,this._passiveTransform.y=n.y,this._dropContainer||this._applyRootElementTransform(n.x,n.y),this}withPreviewContainer(n){return this._previewContainer=n,this}_sortFromLastPointerPosition(){const n=this._lastKnownPointerPosition;n&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(n),n)}_removeSubscriptions(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}_destroyPreview(){this._preview?.remove(),this._previewRef?.destroy(),this._preview=this._previewRef=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(n){if(this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging))if(this.released.next({source:this,event:n}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(n),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;const e=this._getPointerPositionOnPage(n);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:n})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(n){Q(n)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const e=this._dropContainer;if(e){const i=this._rootElement,a=i.parentNode,s=this._placeholder=this._createPlaceholderElement(),r=this._anchor=this._anchor||this._document.createComment(""),l=this._getShadowRoot();a.insertBefore(r,i),this._initialTransform=i.style.transform||"",this._preview=this._createPreviewElement(),ut(i,!1,st),this._document.body.appendChild(a.replaceChild(s,i)),this._getPreviewInsertionPoint(a,l).appendChild(this._preview),this.started.next({source:this,event:n}),e.start(),this._initialContainer=e,this._initialIndex=e.getItemIndex(this)}else this.started.next({source:this,event:n}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(e?e.getScrollableParents():[])}_initializeDragSequence(n,e){this._parentDragRef&&e.stopPropagation();const i=this.isDragging(),a=Q(e),s=!a&&0!==e.button,r=this._rootElement,l=(0,D.sA)(e),d=!a&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now(),c=a?(0,$.yG)(e):(0,$.X6)(e);if(l&&l.draggable&&"mousedown"===e.type&&e.preventDefault(),i||s||d||c)return;if(this._handles.length){const y=r.style;this._rootElementTapHighlight=y.webkitTapHighlightColor||"",y.webkitTapHighlightColor="transparent"}this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._initialClientRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(y=>this._updateOnScroll(y)),this._boundaryElement&&(this._boundaryRect=ot(this._boundaryElement));const m=this._previewTemplate;this._pickupPositionInElement=m&&m.template&&!m.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialClientRect,n,e);const v=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:v.x,y:v.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(n){ut(this._rootElement,!0,st),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialClientRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{const e=this._dropContainer,i=e.getItemIndex(this),a=this._getPointerPositionOnPage(n),s=this._getDragDistance(a),r=e._isOverContainer(a.x,a.y);this.ended.next({source:this,distance:s,dropPoint:a,event:n}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:r,distance:s,dropPoint:a,event:n}),e.drop(this,i,this._initialIndex,this._initialContainer,r,s,a),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:n,y:e},{x:i,y:a}){let s=this._initialContainer._getSiblingContainerFromPosition(this,n,e);!s&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(n,e)&&(s=this._initialContainer),s&&s!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=s,this._dropContainer.enter(this,n,e,s===this._initialContainer&&s.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:s,currentIndex:s.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,a),this._dropContainer._sortItem(this,n,e,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(n,e):this._applyPreviewTransform(n-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y))}_createPreviewElement(){const n=this._previewTemplate,e=this.previewClass,i=n?n.template:null;let a;if(i&&n){const s=n.matchSize?this._initialClientRect:null,r=n.viewContainer.createEmbeddedView(i,n.context);r.detectChanges(),a=Mt(r,this._document),this._previewRef=r,n.matchSize?Dt(a,s):a.style.transform=W(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else a=ft(this._rootElement),Dt(a,this._initialClientRect),this._initialTransform&&(a.style.transform=this._initialTransform);return it(a.style,{"pointer-events":"none",margin:"0",position:"fixed",top:"0",left:"0","z-index":`${this._config.zIndex||1e3}`},st),F(a,!1),a.classList.add("cdk-drag-preview"),a.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(s=>a.classList.add(s)):a.classList.add(e)),a}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const n=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._applyPreviewTransform(n.left,n.top);const e=function ae(o){const n=getComputedStyle(o),e=nt(n,"transition-property"),i=e.find(l=>"transform"===l||"all"===l);if(!i)return 0;const a=e.indexOf(i),s=nt(n,"transition-duration"),r=nt(n,"transition-delay");return gt(s[a])+gt(r[a])}(this._preview);return 0===e?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{const a=r=>{(!r||(0,D.sA)(r)===this._preview&&"transform"===r.propertyName)&&(this._preview?.removeEventListener("transitionend",a),i(),clearTimeout(s))},s=setTimeout(a,1.5*e);this._preview.addEventListener("transitionend",a)}))}_createPlaceholderElement(){const n=this._placeholderTemplate,e=n?n.template:null;let i;return e?(this._placeholderRef=n.viewContainer.createEmbeddedView(e,n.context),this._placeholderRef.detectChanges(),i=Mt(this._placeholderRef,this._document)):i=ft(this._rootElement),i.style.pointerEvents="none",i.classList.add("cdk-drag-placeholder"),i}_getPointerPositionInElement(n,e,i){const a=e===this._rootElement?null:e,s=a?a.getBoundingClientRect():n,r=Q(i)?i.targetTouches[0]:i,l=this._getViewportScrollPosition();return{x:s.left-n.left+(r.pageX-s.left-l.left),y:s.top-n.top+(r.pageY-s.top-l.top)}}_getPointerPositionOnPage(n){const e=this._getViewportScrollPosition(),i=Q(n)?n.touches[0]||n.changedTouches[0]||{pageX:0,pageY:0}:n,a=i.pageX-e.left,s=i.pageY-e.top;if(this._ownerSVGElement){const r=this._ownerSVGElement.getScreenCTM();if(r){const l=this._ownerSVGElement.createSVGPoint();return l.x=a,l.y=s,l.matrixTransform(r.inverse())}}return{x:a,y:s}}_getConstrainedPointerPosition(n){const e=this._dropContainer?this._dropContainer.lockAxis:null;let{x:i,y:a}=this.constrainPosition?this.constrainPosition(n,this,this._initialClientRect):n;if("x"===this.lockAxis||"x"===e?a=this._pickupPositionOnPage.y:("y"===this.lockAxis||"y"===e)&&(i=this._pickupPositionOnPage.x),this._boundaryRect){const{x:s,y:r}=this._pickupPositionInElement,l=this._boundaryRect,{width:d,height:c}=this._getPreviewRect(),m=l.top+r,v=l.bottom-(c-r);i=Tt(i,l.left+s,l.right-(d-s)),a=Tt(a,m,v)}return{x:i,y:a}}_updatePointerDirectionDelta(n){const{x:e,y:i}=n,a=this._pointerDirectionDelta,s=this._pointerPositionAtLastDirectionChange,r=Math.abs(e-s.x),l=Math.abs(i-s.y);return r>this._config.pointerDirectionChangeThreshold&&(a.x=e>s.x?1:-1,s.x=e),l>this._config.pointerDirectionChangeThreshold&&(a.y=i>s.y?1:-1,s.y=i),a}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const n=this._handles.length>0||!this.isDragging();n!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=n,F(this._rootElement,n))}_removeRootElementListeners(n){n.removeEventListener("mousedown",this._pointerDown,K),n.removeEventListener("touchstart",this._pointerDown,yt),n.removeEventListener("dragstart",this._nativeDragStart,K)}_applyRootElementTransform(n,e){const i=W(n,e),a=this._rootElement.style;null==this._initialTransform&&(this._initialTransform=a.transform&&"none"!=a.transform?a.transform:""),a.transform=G(i,this._initialTransform)}_applyPreviewTransform(n,e){const i=this._previewTemplate?.template?void 0:this._initialTransform,a=W(n,e);this._preview.style.transform=G(a,i)}_getDragDistance(n){const e=this._pickupPositionOnPage;return e?{x:n.x-e.x,y:n.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:n,y:e}=this._passiveTransform;if(0===n&&0===e||this.isDragging()||!this._boundaryElement)return;const i=this._rootElement.getBoundingClientRect(),a=this._boundaryElement.getBoundingClientRect();if(0===a.width&&0===a.height||0===i.width&&0===i.height)return;const s=a.left-i.left,r=i.right-a.right,l=a.top-i.top,d=i.bottom-a.bottom;a.width>i.width?(s>0&&(n+=s),r>0&&(n-=r)):n=0,a.height>i.height?(l>0&&(e+=l),d>0&&(e-=d)):e=0,(n!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:n})}_getDragStartDelay(n){const e=this.dragStartDelay;return"number"==typeof e?e:Q(n)?e.touch:e?e.mouse:0}_updateOnScroll(n){const e=this._parentPositions.handleScroll(n);if(e){const i=(0,D.sA)(n);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&Y(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return void 0===this._cachedShadowRoot&&(this._cachedShadowRoot=(0,D.kV)(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(n,e){const i=this._previewContainer||"global";if("parent"===i)return n;if("global"===i){const a=this._document;return e||a.fullscreenElement||a.webkitFullscreenElement||a.mozFullScreenElement||a.msFullscreenElement||a.body}return(0,_.fI)(i)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialClientRect),this._previewRect}_getTargetHandle(n){return this._handles.find(e=>n.target&&(n.target===e||e.contains(n.target)))}}function W(o,n){return`translate3d(${Math.round(o)}px, ${Math.round(n)}px, 0)`}function Tt(o,n,e){return Math.max(n,Math.min(e,o))}function Q(o){return"t"===o.type[0]}function Mt(o,n){const e=o.rootNodes;if(1===e.length&&e[0].nodeType===n.ELEMENT_NODE)return e[0];const i=n.createElement("div");return e.forEach(a=>i.appendChild(a)),i}function Dt(o,n){o.style.width=`${n.width}px`,o.style.height=`${n.height}px`,o.style.transform=W(n.left,n.top)}function St(o,n,e){const i=B(n,o.length-1),a=B(e,o.length-1);if(i===a)return;const s=o[i],r=a<i?-1:1;for(let l=i;l!==a;l+=r)o[l]=o[l+r];o[a]=s}function B(o,n){return Math.max(0,Math.min(n,o))}class de{constructor(n,e){this._element=n,this._dragDropRegistry=e,this._itemPositions=[],this.orientation="vertical",this._previousSwap={drag:null,delta:0,overlaps:!1}}start(n){this.withItems(n)}sort(n,e,i,a){const s=this._itemPositions,r=this._getItemIndexFromPointerPosition(n,e,i,a);if(-1===r&&s.length>0)return null;const l="horizontal"===this.orientation,d=s.findIndex(S=>S.drag===n),c=s[r],v=c.clientRect,y=d>r?1:-1,U=this._getItemOffsetPx(s[d].clientRect,v,y),q=this._getSiblingOffsetPx(d,s,y),J=s.slice();return St(s,d,r),s.forEach((S,ln)=>{if(J[ln]===S)return;const Wt=S.drag===n,ct=Wt?U:q,jt=Wt?n.getPlaceholderElement():S.drag.getRootElement();S.offset+=ct,l?(jt.style.transform=G(`translate3d(${Math.round(S.offset)}px, 0, 0)`,S.initialTransform),Y(S.clientRect,0,ct)):(jt.style.transform=G(`translate3d(0, ${Math.round(S.offset)}px, 0)`,S.initialTransform),Y(S.clientRect,ct,0))}),this._previousSwap.overlaps=at(v,e,i),this._previousSwap.drag=c.drag,this._previousSwap.delta=l?a.x:a.y,{previousIndex:d,currentIndex:r}}enter(n,e,i,a){const s=null==a||a<0?this._getItemIndexFromPointerPosition(n,e,i):a,r=this._activeDraggables,l=r.indexOf(n),d=n.getPlaceholderElement();let c=r[s];if(c===n&&(c=r[s+1]),!c&&(null==s||-1===s||s<r.length-1)&&this._shouldEnterAsFirstChild(e,i)&&(c=r[0]),l>-1&&r.splice(l,1),c&&!this._dragDropRegistry.isDragging(c)){const m=c.getRootElement();m.parentElement.insertBefore(d,m),r.splice(s,0,n)}else(0,_.fI)(this._element).appendChild(d),r.push(n);d.style.transform="",this._cacheItemPositions()}withItems(n){this._activeDraggables=n.slice(),this._cacheItemPositions()}withSortPredicate(n){this._sortPredicate=n}reset(){this._activeDraggables.forEach(n=>{const e=n.getRootElement();if(e){const i=this._itemPositions.find(a=>a.drag===n)?.initialTransform;e.style.transform=i||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(n){return("horizontal"===this.orientation&&"rtl"===this.direction?this._itemPositions.slice().reverse():this._itemPositions).findIndex(i=>i.drag===n)}updateOnScroll(n,e){this._itemPositions.forEach(({clientRect:i})=>{Y(i,n,e)}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}_cacheItemPositions(){const n="horizontal"===this.orientation;this._itemPositions=this._activeDraggables.map(e=>{const i=e.getVisibleElement();return{drag:e,offset:0,initialTransform:i.style.transform||"",clientRect:ot(i)}}).sort((e,i)=>n?e.clientRect.left-i.clientRect.left:e.clientRect.top-i.clientRect.top)}_getItemOffsetPx(n,e,i){const a="horizontal"===this.orientation;let s=a?e.left-n.left:e.top-n.top;return-1===i&&(s+=a?e.width-n.width:e.height-n.height),s}_getSiblingOffsetPx(n,e,i){const a="horizontal"===this.orientation,s=e[n].clientRect,r=e[n+-1*i];let l=s[a?"width":"height"]*i;if(r){const d=a?"left":"top",c=a?"right":"bottom";-1===i?l-=r.clientRect[d]-s[c]:l+=s[d]-r.clientRect[c]}return l}_shouldEnterAsFirstChild(n,e){if(!this._activeDraggables.length)return!1;const i=this._itemPositions,a="horizontal"===this.orientation;if(i[0].drag!==this._activeDraggables[0]){const r=i[i.length-1].clientRect;return a?n>=r.right:e>=r.bottom}{const r=i[0].clientRect;return a?n<=r.left:e<=r.top}}_getItemIndexFromPointerPosition(n,e,i,a){const s="horizontal"===this.orientation,r=this._itemPositions.findIndex(({drag:l,clientRect:d})=>{if(l===n)return!1;if(a){const c=s?a.x:a.y;if(l===this._previousSwap.drag&&this._previousSwap.overlaps&&c===this._previousSwap.delta)return!1}return s?e>=Math.floor(d.left)&&e<Math.floor(d.right):i>=Math.floor(d.top)&&i<Math.floor(d.bottom)});return-1!==r&&this._sortPredicate(r,n)?r:-1}}class ce{constructor(n,e,i,a,s){this._dragDropRegistry=e,this._ngZone=a,this._viewportRuler=s,this.disabled=!1,this.sortingDisabled=!1,this.autoScrollDisabled=!1,this.autoScrollStep=2,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.beforeStarted=new b.x,this.entered=new b.x,this.exited=new b.x,this.dropped=new b.x,this.sorted=new b.x,this._isDragging=!1,this._draggables=[],this._siblings=[],this._activeSiblings=new Set,this._viewportScrollSubscription=H.w0.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new b.x,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),function te(o=0,n=Xt.z){return o<0&&(o=0),(0,$t.H)(o,o,n)}(0,ee.Z).pipe((0,A.R)(this._stopScrollTimers)).subscribe(()=>{const r=this._scrollNode,l=this.autoScrollStep;1===this._verticalScrollDirection?r.scrollBy(0,-l):2===this._verticalScrollDirection&&r.scrollBy(0,l),1===this._horizontalScrollDirection?r.scrollBy(-l,0):2===this._horizontalScrollDirection&&r.scrollBy(l,0)})},this.element=(0,_.fI)(n),this._document=i,this.withScrollableParents([this.element]),e.registerDropContainer(this),this._parentPositions=new _t(i),this._sortStrategy=new de(this.element,e),this._sortStrategy.withSortPredicate((r,l)=>this.sortPredicate(r,l,this))}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(n,e,i,a){this._draggingStarted(),null==a&&this.sortingDisabled&&(a=this._draggables.indexOf(n)),this._sortStrategy.enter(n,e,i,a),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:n,container:this,currentIndex:this.getItemIndex(n)})}exit(n){this._reset(),this.exited.next({item:n,container:this})}drop(n,e,i,a,s,r,l,d={}){this._reset(),this.dropped.next({item:n,currentIndex:e,previousIndex:i,container:this,previousContainer:a,isPointerOverContainer:s,distance:r,dropPoint:l,event:d})}withItems(n){const e=this._draggables;return this._draggables=n,n.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(e.filter(a=>a.isDragging()).every(a=>-1===n.indexOf(a))?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(n){return this._sortStrategy.direction=n,this}connectedTo(n){return this._siblings=n.slice(),this}withOrientation(n){return this._sortStrategy.orientation=n,this}withScrollableParents(n){const e=(0,_.fI)(this.element);return this._scrollableElements=-1===n.indexOf(e)?[e,...n]:n.slice(),this}getScrollableParents(){return this._scrollableElements}getItemIndex(n){return this._isDragging?this._sortStrategy.getItemIndex(n):this._draggables.indexOf(n)}isReceiving(){return this._activeSiblings.size>0}_sortItem(n,e,i,a){if(this.sortingDisabled||!this._clientRect||!mt(this._clientRect,.05,e,i))return;const s=this._sortStrategy.sort(n,e,i,a);s&&this.sorted.next({previousIndex:s.previousIndex,currentIndex:s.currentIndex,container:this,item:n})}_startScrollingIfNecessary(n,e){if(this.autoScrollDisabled)return;let i,a=0,s=0;if(this._parentPositions.positions.forEach((r,l)=>{l===this._document||!r.clientRect||i||mt(r.clientRect,.05,n,e)&&([a,s]=function pe(o,n,e,i){const a=wt(n,i),s=Zt(n,e);let r=0,l=0;if(a){const d=o.scrollTop;1===a?d>0&&(r=1):o.scrollHeight-d>o.clientHeight&&(r=2)}if(s){const d=o.scrollLeft;1===s?d>0&&(l=1):o.scrollWidth-d>o.clientWidth&&(l=2)}return[r,l]}(l,r.clientRect,n,e),(a||s)&&(i=l))}),!a&&!s){const{width:r,height:l}=this._viewportRuler.getViewportSize(),d={width:r,height:l,top:0,right:r,bottom:l,left:0};a=wt(d,e),s=Zt(d,n),i=window}i&&(a!==this._verticalScrollDirection||s!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=a,this._horizontalScrollDirection=s,this._scrollNode=i,(a||s)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){const n=(0,_.fI)(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=n.msScrollSnapType||n.scrollSnapType||"",n.scrollSnapType=n.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){const n=(0,_.fI)(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(n).clientRect}_reset(){this._isDragging=!1;const n=(0,_.fI)(this.element).style;n.scrollSnapType=n.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(e=>e._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_isOverContainer(n,e){return null!=this._clientRect&&at(this._clientRect,n,e)}_getSiblingContainerFromPosition(n,e,i){return this._siblings.find(a=>a._canReceive(n,e,i))}_canReceive(n,e,i){if(!this._clientRect||!at(this._clientRect,e,i)||!this.enterPredicate(n,this))return!1;const a=this._getShadowRoot().elementFromPoint(e,i);if(!a)return!1;const s=(0,_.fI)(this.element);return a===s||s.contains(a)}_startReceiving(n,e){const i=this._activeSiblings;!i.has(n)&&e.every(a=>this.enterPredicate(a,this)||this._draggables.indexOf(a)>-1)&&(i.add(n),this._cacheParentPositions(),this._listenToScrollEvents())}_stopReceiving(n){this._activeSiblings.delete(n),this._viewportScrollSubscription.unsubscribe()}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(n=>{if(this.isDragging()){const e=this._parentPositions.handleScroll(n);e&&this._sortStrategy.updateOnScroll(e.top,e.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const n=(0,D.kV)((0,_.fI)(this.element));this._cachedShadowRoot=n||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){const n=this._sortStrategy.getActiveItemsSnapshot().filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,n))}}function wt(o,n){const{top:e,bottom:i,height:a}=o,s=.05*a;return n>=e-s&&n<=e+s?1:n>=i-s&&n<=i+s?2:0}function Zt(o,n){const{left:e,right:i,width:a}=o,s=.05*a;return n>=e-s&&n<=e+s?1:n>=i-s&&n<=i+s?2:0}const j=(0,D.i$)({passive:!1,capture:!0});let he=(()=>{class o{constructor(e,i){this._ngZone=e,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=[],this._globalListeners=new Map,this._draggingPredicate=a=>a.isDragging(),this.pointerMove=new b.x,this.pointerUp=new b.x,this.scroll=new b.x,this._preventDefaultWhileDragging=a=>{this._activeDragInstances.length>0&&a.preventDefault()},this._persistentTouchmoveListener=a=>{this._activeDragInstances.length>0&&(this._activeDragInstances.some(this._draggingPredicate)&&a.preventDefault(),this.pointerMove.next(a))},this._document=i}registerDropContainer(e){this._dropInstances.has(e)||this._dropInstances.add(e)}registerDragItem(e){this._dragInstances.add(e),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,j)})}removeDropContainer(e){this._dropInstances.delete(e)}removeDragItem(e){this._dragInstances.delete(e),this.stopDragging(e),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,j)}startDragging(e,i){if(!(this._activeDragInstances.indexOf(e)>-1)&&(this._activeDragInstances.push(e),1===this._activeDragInstances.length)){const a=i.type.startsWith("touch");this._globalListeners.set(a?"touchend":"mouseup",{handler:s=>this.pointerUp.next(s),options:!0}).set("scroll",{handler:s=>this.scroll.next(s),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:j}),a||this._globalListeners.set("mousemove",{handler:s=>this.pointerMove.next(s),options:j}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((s,r)=>{this._document.addEventListener(r,s.handler,s.options)})})}}stopDragging(e){const i=this._activeDragInstances.indexOf(e);i>-1&&(this._activeDragInstances.splice(i,1),0===this._activeDragInstances.length&&this._clearGlobalListeners())}isDragging(e){return this._activeDragInstances.indexOf(e)>-1}scrolled(e){const i=[this.scroll];return e&&e!==this._document&&i.push(new ht.y(a=>this._ngZone.runOutsideAngular(()=>{const r=l=>{this._activeDragInstances.length&&a.next(l)};return e.addEventListener("scroll",r,!0),()=>{e.removeEventListener("scroll",r,!0)}}))),(0,N.T)(...i)}ngOnDestroy(){this._dragInstances.forEach(e=>this.removeDragItem(e)),this._dropInstances.forEach(e=>this.removeDropContainer(e)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((e,i)=>{this._document.removeEventListener(i,e.handler,e.options)}),this._globalListeners.clear()}}return o.\u0275fac=function(e){return new(e||o)(t.LFG(t.R0b),t.LFG(g.K0))},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();const ue={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let rt=(()=>{class o{constructor(e,i,a,s){this._document=e,this._ngZone=i,this._viewportRuler=a,this._dragDropRegistry=s}createDrag(e,i=ue){return new le(e,i,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(e){return new ce(e,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}}return o.\u0275fac=function(e){return new(e||o)(t.LFG(g.K0),t.LFG(t.R0b),t.LFG(T.rL),t.LFG(he))},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();const Pt=new t.OlP("CDK_DRAG_PARENT"),kt=new t.OlP("CdkDropListGroup"),At=new t.OlP("CDK_DRAG_CONFIG");let ge=0;const Ot=new t.OlP("CdkDropList");let me=(()=>{class o{constructor(e,i,a,s,r,l,d){this.element=e,this._changeDetectorRef=a,this._scrollDispatcher=s,this._dir=r,this._group=l,this._destroyed=new b.x,this.connectedTo=[],this.id="cdk-drop-list-"+ge++,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.dropped=new t.vpe,this.entered=new t.vpe,this.exited=new t.vpe,this.sorted=new t.vpe,this._unsortedItems=new Set,this._dropListRef=i.createDropList(e),this._dropListRef.data=this,d&&this._assignDefaults(d),this._dropListRef.enterPredicate=(c,m)=>this.enterPredicate(c.data,m.data),this._dropListRef.sortPredicate=(c,m,v)=>this.sortPredicate(c,m.data,v.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),o._dropLists.push(this),l&&l._items.add(this)}get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(e){this._dropListRef.disabled=this._disabled=(0,_.Ig)(e)}addItem(e){this._unsortedItems.add(e),this._dropListRef.isDragging()&&this._syncItemsWithRef()}removeItem(e){this._unsortedItems.delete(e),this._dropListRef.isDragging()&&this._syncItemsWithRef()}getSortedItems(){return Array.from(this._unsortedItems).sort((e,i)=>e._dragRef.getVisibleElement().compareDocumentPosition(i._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){const e=o._dropLists.indexOf(this);e>-1&&o._dropLists.splice(e,1),this._group&&this._group._items.delete(this),this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(e){this._dir&&this._dir.change.pipe((0,V.O)(this._dir.value),(0,A.R)(this._destroyed)).subscribe(i=>e.withDirection(i)),e.beforeStarted.subscribe(()=>{const i=(0,_.Eq)(this.connectedTo).map(a=>"string"==typeof a?o._dropLists.find(r=>r.id===a):a);if(this._group&&this._group._items.forEach(a=>{-1===i.indexOf(a)&&i.push(a)}),!this._scrollableParentsResolved){const a=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(s=>s.getElementRef().nativeElement);this._dropListRef.withScrollableParents(a),this._scrollableParentsResolved=!0}e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.sortingDisabled=(0,_.Ig)(this.sortingDisabled),e.autoScrollDisabled=(0,_.Ig)(this.autoScrollDisabled),e.autoScrollStep=(0,_.su)(this.autoScrollStep,2),e.connectedTo(i.filter(a=>a&&a!==this).map(a=>a._dropListRef)).withOrientation(this.orientation)})}_handleEvents(e){e.beforeStarted.subscribe(()=>{this._syncItemsWithRef(),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(i=>{this.entered.emit({container:this,item:i.item.data,currentIndex:i.currentIndex})}),e.exited.subscribe(i=>{this.exited.emit({container:this,item:i.item.data}),this._changeDetectorRef.markForCheck()}),e.sorted.subscribe(i=>{this.sorted.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:i.item.data})}),e.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,item:i.item.data,isPointerOverContainer:i.isPointerOverContainer,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()})}_assignDefaults(e){const{lockAxis:i,draggingDisabled:a,sortingDisabled:s,listAutoScrollDisabled:r,listOrientation:l}=e;this.disabled=a??!1,this.sortingDisabled=s??!1,this.autoScrollDisabled=r??!1,this.orientation=l||"vertical",i&&(this.lockAxis=i)}_syncItemsWithRef(){this._dropListRef.withItems(this.getSortedItems().map(e=>e._dragRef))}}return o._dropLists=[],o.\u0275fac=function(e){return new(e||o)(t.Y36(t.SBq),t.Y36(rt),t.Y36(t.sBO),t.Y36(T.mF),t.Y36(et.Is,8),t.Y36(kt,12),t.Y36(At,8))},o.\u0275dir=t.lG2({type:o,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(e,i){2&e&&(t.uIk("id",i.id),t.ekj("cdk-drop-list-disabled",i.disabled)("cdk-drop-list-dragging",i._dropListRef.isDragging())("cdk-drop-list-receiving",i._dropListRef.isReceiving()))},inputs:{connectedTo:["cdkDropListConnectedTo","connectedTo"],data:["cdkDropListData","data"],orientation:["cdkDropListOrientation","orientation"],id:"id",lockAxis:["cdkDropListLockAxis","lockAxis"],disabled:["cdkDropListDisabled","disabled"],sortingDisabled:["cdkDropListSortingDisabled","sortingDisabled"],enterPredicate:["cdkDropListEnterPredicate","enterPredicate"],sortPredicate:["cdkDropListSortPredicate","sortPredicate"],autoScrollDisabled:["cdkDropListAutoScrollDisabled","autoScrollDisabled"],autoScrollStep:["cdkDropListAutoScrollStep","autoScrollStep"]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[t._Bn([{provide:kt,useValue:void 0},{provide:Ot,useExisting:o}])]}),o})();const Rt=new t.OlP("CdkDragHandle"),_e=new t.OlP("CdkDragPlaceholder"),fe=new t.OlP("CdkDragPreview");let be=(()=>{class o{constructor(e,i,a,s,r,l,d,c,m,v,y){this.element=e,this.dropContainer=i,this._ngZone=s,this._viewContainerRef=r,this._dir=d,this._changeDetectorRef=m,this._selfHandle=v,this._parentDrag=y,this._destroyed=new b.x,this.started=new t.vpe,this.released=new t.vpe,this.ended=new t.vpe,this.entered=new t.vpe,this.exited=new t.vpe,this.dropped=new t.vpe,this.moved=new ht.y(U=>{const q=this._dragRef.moved.pipe((0,ie.U)(J=>({source:this,pointerPosition:J.pointerPosition,event:J.event,delta:J.delta,distance:J.distance}))).subscribe(U);return()=>{q.unsubscribe()}}),this._dragRef=c.createDrag(e,{dragStartThreshold:l&&null!=l.dragStartThreshold?l.dragStartThreshold:5,pointerDirectionChangeThreshold:l&&null!=l.pointerDirectionChangeThreshold?l.pointerDirectionChangeThreshold:5,zIndex:l?.zIndex}),this._dragRef.data=this,o._dragInstances.push(this),l&&this._assignDefaults(l),i&&(this._dragRef._withDropContainer(i._dropListRef),i.addItem(this)),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}get disabled(){return this._disabled||this.dropContainer&&this.dropContainer.disabled}set disabled(e){this._disabled=(0,_.Ig)(e),this._dragRef.disabled=this._disabled}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(e){this._dragRef.setFreeDragPosition(e)}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe((0,tt.q)(1),(0,A.R)(this._destroyed)).subscribe(()=>{this._updateRootElement(),this._setupHandlesListener(),this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)})})}ngOnChanges(e){const i=e.rootElementSelector,a=e.freeDragPosition;i&&!i.firstChange&&this._updateRootElement(),a&&!a.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this);const e=o._dragInstances.indexOf(this);e>-1&&o._dragInstances.splice(e,1),this._ngZone.runOutsideAngular(()=>{this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_updateRootElement(){const e=this.element.nativeElement;let i=e;this.rootElementSelector&&(i=void 0!==e.closest?e.closest(this.rootElementSelector):e.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(i||e)}_getBoundaryElement(){const e=this.boundaryElement;return e?"string"==typeof e?this.element.nativeElement.closest(e):(0,_.fI)(e):null}_syncInputs(e){e.beforeStarted.subscribe(()=>{if(!e.isDragging()){const i=this._dir,a=this.dragStartDelay,s=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,r=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.dragStartDelay="object"==typeof a&&a?a:(0,_.su)(a),e.constrainPosition=this.constrainPosition,e.previewClass=this.previewClass,e.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(s).withPreviewTemplate(r).withPreviewContainer(this.previewContainer||"global"),i&&e.withDirection(i.value)}}),e.beforeStarted.pipe((0,tt.q)(1)).subscribe(()=>{if(this._parentDrag)return void e.withParent(this._parentDrag._dragRef);let i=this.element.nativeElement.parentElement;for(;i;){if(i.classList.contains("cdk-drag")){e.withParent(o._dragInstances.find(a=>a.element.nativeElement===i)?._dragRef||null);break}i=i.parentElement}})}_handleEvents(e){e.started.subscribe(i=>{this.started.emit({source:this,event:i.event}),this._changeDetectorRef.markForCheck()}),e.released.subscribe(i=>{this.released.emit({source:this,event:i.event})}),e.ended.subscribe(i=>{this.ended.emit({source:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(i=>{this.entered.emit({container:i.container.data,item:this,currentIndex:i.currentIndex})}),e.exited.subscribe(i=>{this.exited.emit({container:i.container.data,item:this})}),e.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,isPointerOverContainer:i.isPointerOverContainer,item:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event})})}_assignDefaults(e){const{lockAxis:i,dragStartDelay:a,constrainPosition:s,previewClass:r,boundaryElement:l,draggingDisabled:d,rootElementSelector:c,previewContainer:m}=e;this.disabled=d??!1,this.dragStartDelay=a||0,i&&(this.lockAxis=i),s&&(this.constrainPosition=s),r&&(this.previewClass=r),l&&(this.boundaryElement=l),c&&(this.rootElementSelector=c),m&&(this.previewContainer=m)}_setupHandlesListener(){this._handles.changes.pipe((0,V.O)(this._handles),(0,ne.b)(e=>{const i=e.filter(a=>a._parentDrag===this).map(a=>a.element);this._selfHandle&&this.rootElementSelector&&i.push(this.element),this._dragRef.withHandles(i)}),(0,oe.w)(e=>(0,N.T)(...e.map(i=>i._stateChanges.pipe((0,V.O)(i))))),(0,A.R)(this._destroyed)).subscribe(e=>{const i=this._dragRef,a=e.element.nativeElement;e.disabled?i.disableHandle(a):i.enableHandle(a)})}}return o._dragInstances=[],o.\u0275fac=function(e){return new(e||o)(t.Y36(t.SBq),t.Y36(Ot,12),t.Y36(g.K0),t.Y36(t.R0b),t.Y36(t.s_b),t.Y36(At,8),t.Y36(et.Is,8),t.Y36(rt),t.Y36(t.sBO),t.Y36(Rt,10),t.Y36(Pt,12))},o.\u0275dir=t.lG2({type:o,selectors:[["","cdkDrag",""]],contentQueries:function(e,i,a){if(1&e&&(t.Suo(a,fe,5),t.Suo(a,_e,5),t.Suo(a,Rt,5)),2&e){let s;t.iGM(s=t.CRH())&&(i._previewTemplate=s.first),t.iGM(s=t.CRH())&&(i._placeholderTemplate=s.first),t.iGM(s=t.CRH())&&(i._handles=s)}},hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(e,i){2&e&&t.ekj("cdk-drag-disabled",i.disabled)("cdk-drag-dragging",i._dragRef.isDragging())},inputs:{data:["cdkDragData","data"],lockAxis:["cdkDragLockAxis","lockAxis"],rootElementSelector:["cdkDragRootElement","rootElementSelector"],boundaryElement:["cdkDragBoundary","boundaryElement"],dragStartDelay:["cdkDragStartDelay","dragStartDelay"],freeDragPosition:["cdkDragFreeDragPosition","freeDragPosition"],disabled:["cdkDragDisabled","disabled"],constrainPosition:["cdkDragConstrainPosition","constrainPosition"],previewClass:["cdkDragPreviewClass","previewClass"],previewContainer:["cdkDragPreviewContainer","previewContainer"]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[t._Bn([{provide:Pt,useExisting:o}]),t.TTD]}),o})(),Ce=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({providers:[rt],imports:[T.ZD]}),o})();var O=p(1318),R=p(7185),Et=p(8002),z=p(266);function ye(o,n){1&o&&(t.TgZ(0,"a",12),t._uU(1,"Add"),t.qZA())}function Te(o,n){if(1&o){const e=t.EpF();t.ynx(0),t.TgZ(1,"button",13),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.onSaveDragAndDrop())}),t._UZ(2,"i",14),t._uU(3,"Save Changes "),t.qZA(),t.BQk()}}function Me(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"button",13),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.cdkDragDisabled=!a.cdkDragDisabled)}),t._UZ(1,"i",14),t._uU(2,"Sort "),t.qZA()}}function De(o,n){1&o&&t._UZ(0,"img",34)}function Se(o,n){1&o&&t._UZ(0,"img",35)}function Ie(o,n){1&o&&t._UZ(0,"img",36)}function xe(o,n){1&o&&t._UZ(0,"img",37)}function we(o,n){1&o&&t._UZ(0,"img",35)}function Ze(o,n){1&o&&t._UZ(0,"img",38)}function Pe(o,n){if(1&o&&(t.TgZ(0,"div"),t._uU(1," Expiration: "),t.TgZ(2,"span",39),t._uU(3),t.ALo(4,"date"),t.qZA()()),2&o){const e=t.oxw().$implicit;t.xp6(3),t.Oqu(t.xi3(4,1,null==e?null:e.ExpiredTime,"dd MMM yyyy"))}}function ke(o,n){if(1&o&&(t.TgZ(0,"span",41)(1,"button",42),t._uU(2),t.qZA()()),2&o){const e=t.oxw(2).$implicit,i=t.oxw();t.Q6J("matTooltip",i.filterProductInventory(e.POSInventoryOutletArray,4,e.POSInventoryOutletArray.length)),t.xp6(2),t.hij(" ",e.POSInventoryOutletArray.length-3," ")}}function Ae(o,n){if(1&o&&(t.TgZ(0,"span",26),t._uU(1),t.YNc(2,ke,3,2,"span",40),t.qZA()),2&o){const e=t.oxw().$implicit,i=t.oxw();t.xp6(1),t.hij(" ",i.filterProductInventory(e.POSInventoryOutletArray,1,3),", "),t.xp6(1),t.Q6J("ngIf",e.POSInventoryOutletArray.length>3)}}function Oe(o,n){1&o&&(t.TgZ(0,"span",26),t._uU(1," [SUM All Outlet] "),t.qZA())}function Re(o,n){if(1&o&&(t.TgZ(0,"div",25),t._uU(1,"Additional Item: "),t.TgZ(2,"span",26),t._uU(3),t.qZA()()),2&o){const e=t.oxw().$implicit;t.xp6(3),t.hij(" ",null==e?null:e.Additionalitem,"")}}const Ee=function(o){return{"bg-err":o}},Ut=function(){return["/menu/channel/marketplace/view"]},qt=function(o){return{ID:o}},Ue=function(o){return{"text-danger":o}};function qe(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"tr",15)(1,"td",16)(2,"a",17),t.YNc(3,De,1,0,"img",18),t.YNc(4,Se,1,0,"img",19),t.YNc(5,Ie,1,0,"img",20),t.YNc(6,xe,1,0,"img",21),t.YNc(7,we,1,0,"img",19),t.YNc(8,Ze,1,0,"img",22),t.qZA()(),t.TgZ(9,"td")(10,"a",17)(11,"span",23),t._uU(12),t.qZA()(),t._UZ(13,"br"),t._uU(14),t._UZ(15,"br"),t.qZA(),t.TgZ(16,"td",24)(17,"div",25),t._uU(18,"Sync Orders: "),t.TgZ(19,"span",26),t._uU(20),t.qZA()(),t.TgZ(21,"div",25),t._uU(22," Product Sync: "),t.TgZ(23,"span",26),t._uU(24),t.ALo(25,"date"),t.qZA()(),t.YNc(26,Pe,5,4,"div",27),t.qZA(),t.TgZ(27,"td",24)(28,"div",25),t._uU(29,"New Order To: "),t.TgZ(30,"span",26),t._uU(31),t.qZA()(),t.TgZ(32,"div",25),t._uU(33,"Dispatch Orders From: "),t.TgZ(34,"span",26),t._uU(35),t.qZA()(),t.TgZ(36,"div",28),t._uU(37,"Product Inventory: "),t.YNc(38,Ae,3,2,"span",29),t.YNc(39,Oe,2,0,"ng-template",null,30,t.W1O),t.qZA(),t.TgZ(41,"div",25),t._uU(42,"Minimum Inventory: "),t.TgZ(43,"span",26),t._uU(44),t.qZA()(),t.YNc(45,Re,4,1,"div",31),t.qZA(),t.TgZ(46,"td",24)(47,"div",25),t._uU(48,"Payment: "),t.TgZ(49,"span",26),t._uU(50),t.qZA()(),t.TgZ(51,"div",25),t._uU(52,"Tag: "),t.TgZ(53,"span",26),t._uU(54),t.qZA()(),t.TgZ(55,"div",32),t._uU(56,"Tax : "),t.TgZ(57,"span",26),t._uU(58),t.qZA()()(),t.TgZ(59,"td")(60,"button",33),t.NdJ("click",function(){const s=t.CHM(e).$implicit,r=t.oxw();return t.KtG(r.test(s))}),t._uU(61,"Test"),t.qZA()()()}if(2&o){const e=n.$implicit,i=t.MAs(40),a=t.oxw();t.Q6J("cdkDragDisabled",a.cdkDragDisabled)("ngClass",t.VKq(31,Ee,!(null!=e&&e.IsComplete))),t.xp6(2),t.Q6J("routerLink",t.DdM(33,Ut))("queryParams",t.VKq(34,qt,e.ID)),t.xp6(1),t.Q6J("ngIf",1==(null==e?null:e.TypeID)),t.xp6(1),t.Q6J("ngIf",0==(null==e?null:e.TypeID)),t.xp6(1),t.Q6J("ngIf",2==(null==e?null:e.TypeID)),t.xp6(1),t.Q6J("ngIf",4==(null==e?null:e.TypeID)),t.xp6(1),t.Q6J("ngIf",5==(null==e?null:e.TypeID)),t.xp6(1),t.Q6J("ngIf",6==(null==e?null:e.TypeID)),t.xp6(2),t.Q6J("routerLink",t.DdM(36,Ut))("queryParams",t.VKq(37,qt,e.ID)),t.xp6(2),t.Oqu(null==e?null:e.Name),t.xp6(2),t.hij(" ",null==e?null:e.URL," "),t.xp6(6),t.hij(" ",null==e?null:e.SyncOrder,""),t.xp6(4),t.Oqu(t.xi3(25,28,null==e?null:e.LastSync,"dd MMM yyyy HH:mm")),t.xp6(2),t.Q6J("ngIf",(0==e.TypeID||5==e.TypeID||6==e.TypeID)&&(null==e?null:e.ExpiredTime)),t.xp6(5),t.hij(" ",null==e?null:e.POSOutlet,""),t.xp6(4),t.hij(" ",null==e?null:e.POSDeliveryOutlet,""),t.xp6(3),t.Q6J("ngIf",null==e?null:e.POSInventoryOutlet)("ngIfElse",i),t.xp6(6),t.hij(" ",null==e?null:e.MinimumInventory,""),t.xp6(1),t.Q6J("ngIf",null==e?null:e.Additionalitem),t.xp6(5),t.Oqu(null==e?null:e.POSInvoicePaymentMethod),t.xp6(4),t.hij(" ",null==e?null:e.POSSalesOrderType,""),t.xp6(1),t.Q6J("ngClass",t.VKq(39,Ue,null===(null==e?null:e.POSTax))),t.xp6(3),t.Oqu(null!=e&&e.POSTax?null==e?null:e.POSTax:"-"),t.xp6(2),t.Q6J("hidden",4==(null==e?null:e.TypeID))}}let Le=(()=>{class o{constructor(e,i,a){this.http=e,this.toastr=i,this.konversi=a,this.Setup=!1,this.channel(),this.pageData={Title:"Channel",Nav:[{Title:"Channel",Url:"/menu/channel",Active:!0},{Title:"POS",Url:"/menu/channel/config",Active:!1}]},this.cdkDragDisabled=!0}ngOnInit(){this.konversi.GetRoles().filter(i=>"Setup"==i||"Stp"==i).length>0&&(this.Setup=!0)}channel(){this.http.post("/api/Channel/GetChannel",{}).subscribe(e=>{this.List=e.Data;for(let i of this.List)null!=i.POSOutlet&&null!=i.POSTax&&null!=i.POSInvoicePaymentMethod&&null!=i.POSSalesOrderType&&(i.IsComplete=!0)})}test(e){this.http.post("/api/Channel/TestShopID",e).subscribe(i=>{let a="";for(var s in this.channel(),i)a+=s+" : "+i[s]+"<br/>";this.toastr.success(a,"Success",{enableHtml:!0,closeButton:!0,positionClass:"toast-bottom-right"})})}delete(e){confirm("Want to delete?")&&this.http.post("/api/Channel/DeleteChannel",e).subscribe(a=>{this.channel()})}onDrop(e){St(this.List,e.previousIndex,e.currentIndex)}onSaveDragAndDrop(){this.cdkDragDisabled=!0,this.http.post("/api/Channel/UpdateChannelIndex",this.List).subscribe({next:()=>{this.toastr.success("Channel list successfully saved","Success")}})}filterProductInventory(e,i,a){let s=e;return s=s.filter((l,d)=>(d+=1)>=i&&d<=a),s.join(", ")}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(O.O),t.Y36(R._W),t.Y36(Et.e))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-marketplace"]],decls:26,vars:8,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","class","btn btn-success btn-fill btn-lg text-white","routerLink","/menu/channel/marketplace/add",4,"ngIf"],[4,"ngIf","ngIfElse"],["SORT_BTN",""],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],["cdkDropList","",3,"cdkDropListDropped"],["cdkDrag","",3,"cdkDragDisabled","ngClass",4,"ngFor","ngForOf"],["role","button","routerLink","/menu/channel/marketplace/add",1,"btn","btn-success","btn-fill","btn-lg","text-white"],["title","Drag and drop the rows of the table below to the order you want then click Save",1,"btn","btn-outline-secondary","btn-lg","me-3",2,"float","left",3,"click"],[1,"fa","fa-arrows-alt-v","me-3"],["cdkDrag","",3,"cdkDragDisabled","ngClass"],[2,"text-align","right"],[3,"routerLink","queryParams"],["style","width: 30px;","src","https://res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png",4,"ngIf"],["style","width: 30px;","src","https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png",4,"ngIf"],["style","width: 30px;","src","https://res.cloudinary.com/pos/image/upload/w_50/v1632447439/icons/WooCommerce/woocommerce-icon.webp",4,"ngIf"],["style","width: 30px;","src","https://res.cloudinary.com/pos/image/upload/v1639725279/icons/marketplace_icons/kalcare.png",4,"ngIf"],["style","width: 30px;","src","https://res.cloudinary.com/pos/image/upload/w_40/v1645761611/icons/Marketplace%20logo/tiktok.png",4,"ngIf"],[2,"font-size","16px"],[2,"font-size","12px"],[1,"mb-3"],[2,"color","blue"],[4,"ngIf"],[1,"mb-3","d-flex","align-items-center"],["style","color: blue;",4,"ngIf","ngIfElse"],["SUM_Outlet",""],["class","mb-3",4,"ngIf"],[1,"mb-3",3,"ngClass"],[1,"btn","btn-outline-success","mb-3","ms-2","btn-sm",3,"hidden","click"],["src","https://res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png",2,"width","30px"],["src","https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png",2,"width","30px"],["src","https://res.cloudinary.com/pos/image/upload/w_50/v1632447439/icons/WooCommerce/woocommerce-icon.webp",2,"width","30px"],["src","https://res.cloudinary.com/pos/image/upload/v1639725279/icons/marketplace_icons/kalcare.png",2,"width","30px"],["src","https://res.cloudinary.com/pos/image/upload/w_40/v1645761611/icons/Marketplace%20logo/tiktok.png",2,"width","30px"],[1,"text-danger"],["class","cursor-pointer",3,"matTooltip",4,"ngIf"],[1,"cursor-pointer",3,"matTooltip"],["type","button",1,"btn","btn-circle","btn-sm"]],template:function(e,i){if(1&e&&(t.TgZ(0,"mainpanel",0)(1,"actions"),t.YNc(2,ye,2,0,"a",1),t.YNc(3,Te,4,0,"ng-container",2),t.YNc(4,Me,3,0,"ng-template",null,3,t.W1O),t.qZA(),t.TgZ(6,"content")(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"table",8)(12,"thead")(13,"tr",9),t._UZ(14,"th"),t.TgZ(15,"th"),t._uU(16,"Channel"),t.qZA(),t.TgZ(17,"th"),t._uU(18,"Sync Info"),t.qZA(),t.TgZ(19,"th"),t._uU(20,"POS Outlet"),t.qZA(),t.TgZ(21,"th"),t._uU(22,"POS Orders"),t.qZA(),t._UZ(23,"th"),t.qZA()(),t.TgZ(24,"tbody",10),t.NdJ("cdkDropListDropped",function(s){return i.onDrop(s)}),t.YNc(25,qe,62,41,"tr",11),t.qZA()()()()()()()()),2&e){const a=t.MAs(5);t.Q6J("headerTitle","Marketplace")("pageData",i.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("ngIf",i.Setup),t.xp6(1),t.Q6J("ngIf",!i.cdkDragDisabled)("ngIfElse",a),t.xp6(22),t.Q6J("ngForOf",i.List)}},dependencies:[g.mk,g.sg,g.O5,u.p,f.yS,me,be,z.gM,g.uU],styles:[".form-label-group[_ngcontent-%COMP%]{position:relative;margin-bottom:1rem}.form-label-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-radius:.25rem!important;border-color:#c8d3df}.form-label-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{width:auto;position:absolute;top:1.125rem;left:.75rem;display:block;margin-bottom:0;line-height:1.5;color:#ccc;pointer-events:none;cursor:text;border:1px solid transparent;border-radius:.25rem;transition:all .1s ease-in-out;font-size:.875rem}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]{padding:.75rem;color:#343434;resize:both;font-size:.875rem;border-radius:.25rem;border-color:#c8d3df}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%] ~ label[_ngcontent-%COMP%]{top:.9375rem}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]:focus ~ label[_ngcontent-%COMP%]{top:1rem;left:.78125rem}.form-label-group[_ngcontent-%COMP%] > ng-select[_ngcontent-%COMP%] .ng-select-container{min-height:3.625rem;border-color:#c8d3df;box-shadow:none}.form-label-group[_ngcontent-%COMP%] > ng-select[_ngcontent-%COMP%] ~ label[_ngcontent-%COMP%]{display:inline-block;top:-.625rem;background-color:#fff;font-size:.75rem!important;color:#9da2a6;padding:0 .25rem;z-index:2000;left:.5rem}.form-label-group.multiple[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-input{padding-left:.25rem!important}.form-label-group.multiple[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-placeholder{top:18px!important}.form-label-group.radio[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;border-radius:.25rem!important;border:solid 1px #c8d3df}.form-label-group.radio[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{background-color:#fff;font-size:.75rem!important;color:#9da2a6;top:-10px!important;padding:0 .25rem;left:.5rem}.form-label-group.empty[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] ~ label[_ngcontent-%COMP%]{display:none}.form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:not(:placeholder-shown) ~ label[_ngcontent-%COMP%], .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:not(:placeholder-shown) ~ label[_ngcontent-%COMP%]{background-color:#fff;font-size:.75rem!important;color:#9da2a6;top:-10px!important;padding:0 .25rem;left:.5rem}.form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:not(:placeholder-shown):focus ~ label[_ngcontent-%COMP%], .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:not(:placeholder-shown):focus ~ label[_ngcontent-%COMP%]{color:#3f8aec}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-placeholder{padding-left:.25rem;color:#ccc!important;font-size:.875rem}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-has-value .ng-value{padding-left:.25rem;font-size:.875rem}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-value-container{overflow:initial!important}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-input{top:auto!important;padding-left:.875rem!important;font-size:.875rem}.btn-circle.btn-sm[_ngcontent-%COMP%]{width:18px;height:18px;padding:0;border-radius:60px;font-size:10px;text-align:center;background-color:#00f;border-color:#00f;color:#fff}"]}),o})();var E=p(8063),Lt=p(3154);class Ne{constructor(){this.ID="00000000-0000-0000-0000-000000000000",this.ShopID=0,this.Name="",this.TypeID=0,this.LastProductSync=new Date,this.POSOutlet="",this.POSTax="",this.POSInvoicePaymentMethod="",this.POSSalesOrderType="",this.URL="",this.POSDeliveryOutlet="",this.ProductCategoryDefault=null,this.SyncOrder=!0,this.CustomerDefaultEmail=null,this.InventoryLog=2,this.IsComplete=!1,this.OrderLog=3,this.SyncInventory=!0,this.POSInventoryOutlet="",this.POSWriteOff="",this.Register="",this.POSInventoryOutletArray=[],this.MinimumInventory="",this.Additionalitem="",this.ConsumerKey="",this.ConsumerSecret="",this.ShopIDString="",this.Index=0}}class lt{constructor(){this.Host="",this.Username="",this.Password="",this.HostNotification="",this.UsernameNotification="",this.PasswordNotification="",this.ChannelInventoryOutlet="",this.OrderPaymentAmountType=0,this.ClientSecretGuid="",this.IncludeParentInventory=!1,this.IncludeChildrenInventory=!1,this.CompositeVisible=!1}}var I=p(9521),x=p(3238),Fe=p(5017),dt=p(9549);const Je=["*"],Nt=new t.OlP("MatChipRemove"),Ft=new t.OlP("MatChipAvatar"),Jt=new t.OlP("MatChipTrailingIcon");class He{constructor(n){this._elementRef=n}}const Ye=(0,x.sb)((0,x.pj)((0,x.Kr)(He),"primary"),-1);let X=(()=>{class o extends Ye{constructor(e,i,a,s,r,l,d,c){super(e),this._ngZone=i,this._changeDetectorRef=r,this._hasFocus=!1,this.chipListSelectable=!0,this._chipListMultiple=!1,this._chipListDisabled=!1,this.role="option",this._selected=!1,this._selectable=!0,this._disabled=!1,this._removable=!0,this._onFocus=new b.x,this._onBlur=new b.x,this.selectionChange=new t.vpe,this.destroyed=new t.vpe,this.removed=new t.vpe,this._addHostClassName(),this._chipRippleTarget=l.createElement("div"),this._chipRippleTarget.classList.add("mat-chip-ripple"),this._elementRef.nativeElement.appendChild(this._chipRippleTarget),this._chipRipple=new x.IR(this,i,this._chipRippleTarget,a),this._chipRipple.setupTriggerEvents(e),this.rippleConfig=s||{},this._animationsDisabled="NoopAnimations"===d,this.tabIndex=null!=c&&parseInt(c)||-1}get rippleDisabled(){return this.disabled||this.disableRipple||this._animationsDisabled||!!this.rippleConfig.disabled}get selected(){return this._selected}set selected(e){const i=(0,_.Ig)(e);i!==this._selected&&(this._selected=i,this._dispatchSelectionChange())}get value(){return void 0!==this._value?this._value:this._elementRef.nativeElement.textContent}set value(e){this._value=e}get selectable(){return this._selectable&&this.chipListSelectable}set selectable(e){this._selectable=(0,_.Ig)(e)}get disabled(){return this._chipListDisabled||this._disabled}set disabled(e){this._disabled=(0,_.Ig)(e)}get removable(){return this._removable}set removable(e){this._removable=(0,_.Ig)(e)}get ariaSelected(){return this.selectable&&(this._chipListMultiple||this.selected)?this.selected.toString():null}_addHostClassName(){const e="mat-basic-chip",i=this._elementRef.nativeElement;i.hasAttribute(e)||i.tagName.toLowerCase()===e?i.classList.add(e):i.classList.add("mat-standard-chip")}ngOnDestroy(){this.destroyed.emit({chip:this}),this._chipRipple._removeTriggerEvents()}select(){this._selected||(this._selected=!0,this._dispatchSelectionChange(),this._changeDetectorRef.markForCheck())}deselect(){this._selected&&(this._selected=!1,this._dispatchSelectionChange(),this._changeDetectorRef.markForCheck())}selectViaInteraction(){this._selected||(this._selected=!0,this._dispatchSelectionChange(!0),this._changeDetectorRef.markForCheck())}toggleSelected(e=!1){return this._selected=!this.selected,this._dispatchSelectionChange(e),this._changeDetectorRef.markForCheck(),this.selected}focus(){this._hasFocus||(this._elementRef.nativeElement.focus(),this._onFocus.next({chip:this})),this._hasFocus=!0}remove(){this.removable&&this.removed.emit({chip:this})}_handleClick(e){this.disabled&&e.preventDefault()}_handleKeydown(e){if(!this.disabled)switch(e.keyCode){case I.yY:case I.ZH:this.remove(),e.preventDefault();break;case I.L_:this.selectable&&this.toggleSelected(!0),e.preventDefault()}}_blur(){this._ngZone.onStable.pipe((0,tt.q)(1)).subscribe(()=>{this._ngZone.run(()=>{this._hasFocus=!1,this._onBlur.next({chip:this})})})}_dispatchSelectionChange(e=!1){this.selectionChange.emit({source:this,isUserInput:e,selected:this._selected})}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(t.SBq),t.Y36(t.R0b),t.Y36(D.t4),t.Y36(x.Y2,8),t.Y36(t.sBO),t.Y36(g.K0),t.Y36(t.QbO,8),t.$8M("tabindex"))},o.\u0275dir=t.lG2({type:o,selectors:[["mat-basic-chip"],["","mat-basic-chip",""],["mat-chip"],["","mat-chip",""]],contentQueries:function(e,i,a){if(1&e&&(t.Suo(a,Ft,5),t.Suo(a,Jt,5),t.Suo(a,Nt,5)),2&e){let s;t.iGM(s=t.CRH())&&(i.avatar=s.first),t.iGM(s=t.CRH())&&(i.trailingIcon=s.first),t.iGM(s=t.CRH())&&(i.removeIcon=s.first)}},hostAttrs:[1,"mat-chip","mat-focus-indicator"],hostVars:15,hostBindings:function(e,i){1&e&&t.NdJ("click",function(s){return i._handleClick(s)})("keydown",function(s){return i._handleKeydown(s)})("focus",function(){return i.focus()})("blur",function(){return i._blur()}),2&e&&(t.uIk("tabindex",i.disabled?null:i.tabIndex)("role",i.role)("disabled",i.disabled||null)("aria-disabled",i.disabled.toString())("aria-selected",i.ariaSelected),t.ekj("mat-chip-selected",i.selected)("mat-chip-with-avatar",i.avatar)("mat-chip-with-trailing-icon",i.trailingIcon||i.removeIcon)("mat-chip-disabled",i.disabled)("_mat-animation-noopable",i._animationsDisabled))},inputs:{color:"color",disableRipple:"disableRipple",tabIndex:"tabIndex",role:"role",selected:"selected",value:"value",selectable:"selectable",disabled:"disabled",removable:"removable"},outputs:{selectionChange:"selectionChange",destroyed:"destroyed",removed:"removed"},exportAs:["matChip"],features:[t.qOj]}),o})(),Ht=(()=>{class o{constructor(e,i){this._parentChip=e,"BUTTON"===i.nativeElement.nodeName&&i.nativeElement.setAttribute("type","button")}_handleClick(e){const i=this._parentChip;i.removable&&!i.disabled&&i.remove(),e.stopPropagation(),e.preventDefault()}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(X),t.Y36(t.SBq))},o.\u0275dir=t.lG2({type:o,selectors:[["","matChipRemove",""]],hostAttrs:[1,"mat-chip-remove","mat-chip-trailing-icon"],hostBindings:function(e,i){1&e&&t.NdJ("click",function(s){return i._handleClick(s)})},features:[t._Bn([{provide:Nt,useExisting:o}])]}),o})();const Yt=new t.OlP("mat-chips-default-options"),ze=(0,x.FD)(class{constructor(o,n,e,i){this._defaultErrorStateMatcher=o,this._parentForm=n,this._parentFormGroup=e,this.ngControl=i,this.stateChanges=new b.x}});let Ve=0;class Ge{constructor(n,e){this.source=n,this.value=e}}let Qt=(()=>{class o extends ze{constructor(e,i,a,s,r,l,d){super(l,s,r,d),this._elementRef=e,this._changeDetectorRef=i,this._dir=a,this.controlType="mat-chip-list",this._lastDestroyedChipIndex=null,this._destroyed=new b.x,this._uid="mat-chip-list-"+Ve++,this._tabIndex=0,this._userTabIndex=null,this._onTouched=()=>{},this._onChange=()=>{},this._multiple=!1,this._compareWith=(c,m)=>c===m,this._disabled=!1,this.ariaOrientation="horizontal",this._selectable=!0,this.change=new t.vpe,this.valueChange=new t.vpe,this.ngControl&&(this.ngControl.valueAccessor=this)}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get role(){return this._explicitRole?this._explicitRole:this.empty?null:"listbox"}set role(e){this._explicitRole=e}get multiple(){return this._multiple}set multiple(e){this._multiple=(0,_.Ig)(e),this._syncChipsState()}get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this.writeValue(e),this._value=e}get id(){return this._chipInput?this._chipInput.id:this._uid}get required(){return this._required??this.ngControl?.control?.hasValidator(h.kI.required)??!1}set required(e){this._required=(0,_.Ig)(e),this.stateChanges.next()}get placeholder(){return this._chipInput?this._chipInput.placeholder:this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}get focused(){return this._chipInput&&this._chipInput.focused||this._hasFocusedChip()}get empty(){return(!this._chipInput||this._chipInput.empty)&&(!this.chips||0===this.chips.length)}get shouldLabelFloat(){return!this.empty||this.focused}get disabled(){return this.ngControl?!!this.ngControl.disabled:this._disabled}set disabled(e){this._disabled=(0,_.Ig)(e),this._syncChipsState()}get selectable(){return this._selectable}set selectable(e){this._selectable=(0,_.Ig)(e),this.chips&&this.chips.forEach(i=>i.chipListSelectable=this._selectable)}set tabIndex(e){this._userTabIndex=e,this._tabIndex=e}get chipSelectionChanges(){return(0,N.T)(...this.chips.map(e=>e.selectionChange))}get chipFocusChanges(){return(0,N.T)(...this.chips.map(e=>e._onFocus))}get chipBlurChanges(){return(0,N.T)(...this.chips.map(e=>e._onBlur))}get chipRemoveChanges(){return(0,N.T)(...this.chips.map(e=>e.destroyed))}ngAfterContentInit(){this._keyManager=new $.Em(this.chips).withWrap().withVerticalOrientation().withHomeAndEnd().withHorizontalOrientation(this._dir?this._dir.value:"ltr"),this._dir&&this._dir.change.pipe((0,A.R)(this._destroyed)).subscribe(e=>this._keyManager.withHorizontalOrientation(e)),this._keyManager.tabOut.pipe((0,A.R)(this._destroyed)).subscribe(()=>{this._allowFocusEscape()}),this.chips.changes.pipe((0,V.O)(null),(0,A.R)(this._destroyed)).subscribe(()=>{this.disabled&&Promise.resolve().then(()=>{this._syncChipsState()}),this._resetChips(),this._initializeSelection(),this._updateTabIndex(),this._updateFocusForDestroyedChips(),this.stateChanges.next()})}ngOnInit(){this._selectionModel=new Fe.Ov(this.multiple,void 0,!1),this.stateChanges.next()}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==this._disabled&&(this.disabled=!!this.ngControl.disabled))}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete(),this.stateChanges.complete(),this._dropSubscriptions()}registerInput(e){this._chipInput=e,this._elementRef.nativeElement.setAttribute("data-mat-chip-input",e.id)}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}writeValue(e){this.chips&&this._setSelectionByValue(e,!1)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this.stateChanges.next()}onContainerClick(e){this._originatesFromChip(e)||this.focus()}focus(e){this.disabled||this._chipInput&&this._chipInput.focused||(this.chips.length>0?(this._keyManager.setFirstItemActive(),this.stateChanges.next()):(this._focusInput(e),this.stateChanges.next()))}_focusInput(e){this._chipInput&&this._chipInput.focus(e)}_keydown(e){const i=e.target;i&&i.classList.contains("mat-chip")&&(this._keyManager.onKeydown(e),this.stateChanges.next())}_updateTabIndex(){this._tabIndex=this._userTabIndex||(0===this.chips.length?-1:0)}_updateFocusForDestroyedChips(){if(null!=this._lastDestroyedChipIndex)if(this.chips.length){const e=Math.min(this._lastDestroyedChipIndex,this.chips.length-1);this._keyManager.setActiveItem(e)}else this.focus();this._lastDestroyedChipIndex=null}_isValidIndex(e){return e>=0&&e<this.chips.length}_setSelectionByValue(e,i=!0){if(this._clearSelection(),this.chips.forEach(a=>a.deselect()),Array.isArray(e))e.forEach(a=>this._selectValue(a,i)),this._sortValues();else{const a=this._selectValue(e,i);a&&i&&this._keyManager.setActiveItem(a)}}_selectValue(e,i=!0){const a=this.chips.find(s=>null!=s.value&&this._compareWith(s.value,e));return a&&(i?a.selectViaInteraction():a.select(),this._selectionModel.select(a)),a}_initializeSelection(){Promise.resolve().then(()=>{(this.ngControl||this._value)&&(this._setSelectionByValue(this.ngControl?this.ngControl.value:this._value,!1),this.stateChanges.next())})}_clearSelection(e){this._selectionModel.clear(),this.chips.forEach(i=>{i!==e&&i.deselect()}),this.stateChanges.next()}_sortValues(){this._multiple&&(this._selectionModel.clear(),this.chips.forEach(e=>{e.selected&&this._selectionModel.select(e)}),this.stateChanges.next())}_propagateChanges(e){let i=null;i=Array.isArray(this.selected)?this.selected.map(a=>a.value):this.selected?this.selected.value:e,this._value=i,this.change.emit(new Ge(this,i)),this.valueChange.emit(i),this._onChange(i),this._changeDetectorRef.markForCheck()}_blur(){this._hasFocusedChip()||this._keyManager.setActiveItem(-1),this.disabled||(this._chipInput?setTimeout(()=>{this.focused||this._markAsTouched()}):this._markAsTouched())}_markAsTouched(){this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next()}_allowFocusEscape(){-1!==this._tabIndex&&(this._tabIndex=-1,setTimeout(()=>{this._tabIndex=this._userTabIndex||0,this._changeDetectorRef.markForCheck()}))}_resetChips(){this._dropSubscriptions(),this._listenToChipsFocus(),this._listenToChipsSelection(),this._listenToChipsRemoved()}_dropSubscriptions(){this._chipFocusSubscription&&(this._chipFocusSubscription.unsubscribe(),this._chipFocusSubscription=null),this._chipBlurSubscription&&(this._chipBlurSubscription.unsubscribe(),this._chipBlurSubscription=null),this._chipSelectionSubscription&&(this._chipSelectionSubscription.unsubscribe(),this._chipSelectionSubscription=null),this._chipRemoveSubscription&&(this._chipRemoveSubscription.unsubscribe(),this._chipRemoveSubscription=null)}_listenToChipsSelection(){this._chipSelectionSubscription=this.chipSelectionChanges.subscribe(e=>{e.source.selected?this._selectionModel.select(e.source):this._selectionModel.deselect(e.source),this.multiple||this.chips.forEach(i=>{!this._selectionModel.isSelected(i)&&i.selected&&i.deselect()}),e.isUserInput&&this._propagateChanges()})}_listenToChipsFocus(){this._chipFocusSubscription=this.chipFocusChanges.subscribe(e=>{let i=this.chips.toArray().indexOf(e.chip);this._isValidIndex(i)&&this._keyManager.updateActiveItem(i),this.stateChanges.next()}),this._chipBlurSubscription=this.chipBlurChanges.subscribe(()=>{this._blur(),this.stateChanges.next()})}_listenToChipsRemoved(){this._chipRemoveSubscription=this.chipRemoveChanges.subscribe(e=>{const i=e.chip,a=this.chips.toArray().indexOf(e.chip);this._isValidIndex(a)&&i._hasFocus&&(this._lastDestroyedChipIndex=a)})}_originatesFromChip(e){let i=e.target;for(;i&&i!==this._elementRef.nativeElement;){if(i.classList.contains("mat-chip"))return!0;i=i.parentElement}return!1}_hasFocusedChip(){return this.chips&&this.chips.some(e=>e._hasFocus)}_syncChipsState(){this.chips&&this.chips.forEach(e=>{e._chipListDisabled=this._disabled,e._chipListMultiple=this.multiple})}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(t.SBq),t.Y36(t.sBO),t.Y36(et.Is,8),t.Y36(h.F,8),t.Y36(h.sg,8),t.Y36(x.rD),t.Y36(h.a5,10))},o.\u0275cmp=t.Xpm({type:o,selectors:[["mat-chip-list"]],contentQueries:function(e,i,a){if(1&e&&t.Suo(a,X,5),2&e){let s;t.iGM(s=t.CRH())&&(i.chips=s)}},hostAttrs:[1,"mat-chip-list"],hostVars:14,hostBindings:function(e,i){1&e&&t.NdJ("focus",function(){return i.focus()})("blur",function(){return i._blur()})("keydown",function(s){return i._keydown(s)}),2&e&&(t.Ikx("id",i._uid),t.uIk("tabindex",i.disabled?null:i._tabIndex)("aria-required",i.role?i.required:null)("aria-disabled",i.disabled.toString())("aria-invalid",i.errorState)("aria-multiselectable",i.multiple)("role",i.role)("aria-orientation",i.ariaOrientation),t.ekj("mat-chip-list-disabled",i.disabled)("mat-chip-list-invalid",i.errorState)("mat-chip-list-required",i.required))},inputs:{role:"role",userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],errorStateMatcher:"errorStateMatcher",multiple:"multiple",compareWith:"compareWith",value:"value",required:"required",placeholder:"placeholder",disabled:"disabled",ariaOrientation:["aria-orientation","ariaOrientation"],selectable:"selectable",tabIndex:"tabIndex"},outputs:{change:"change",valueChange:"valueChange"},exportAs:["matChipList"],features:[t._Bn([{provide:dt.Eo,useExisting:o}]),t.qOj],ngContentSelectors:Je,decls:2,vars:0,consts:[[1,"mat-chip-list-wrapper"]],template:function(e,i){1&e&&(t.F$t(),t.TgZ(0,"div",0),t.Hsn(1),t.qZA())},styles:['.mat-chip{position:relative;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);border:none;-webkit-appearance:none;-moz-appearance:none}.mat-standard-chip{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);display:inline-flex;padding:7px 12px;border-radius:16px;align-items:center;cursor:default;min-height:32px;height:1px}.mat-standard-chip._mat-animation-noopable{transition:none !important;animation:none !important}.mat-standard-chip .mat-chip-remove{border:none;-webkit-appearance:none;-moz-appearance:none;padding:0;background:none}.mat-standard-chip .mat-chip-remove.mat-icon,.mat-standard-chip .mat-chip-remove .mat-icon{width:18px;height:18px;font-size:18px}.mat-standard-chip::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;opacity:0;content:"";pointer-events:none;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-standard-chip:hover::after{opacity:.12}.mat-standard-chip:focus{outline:none}.mat-standard-chip:focus::after{opacity:.16}.cdk-high-contrast-active .mat-standard-chip{outline:solid 1px}.cdk-high-contrast-active .mat-standard-chip:focus{outline:dotted 2px}.cdk-high-contrast-active .mat-standard-chip.mat-chip-selected{outline-width:3px}.mat-standard-chip.mat-chip-disabled::after{opacity:0}.mat-standard-chip.mat-chip-disabled .mat-chip-remove,.mat-standard-chip.mat-chip-disabled .mat-chip-trailing-icon{cursor:default}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar,.mat-standard-chip.mat-chip-with-avatar{padding-top:0;padding-bottom:0}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-right:8px;padding-left:0}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-left:8px;padding-right:0}.mat-standard-chip.mat-chip-with-trailing-icon{padding-top:7px;padding-bottom:7px;padding-right:8px;padding-left:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon{padding-left:8px;padding-right:12px}.mat-standard-chip.mat-chip-with-avatar{padding-left:0;padding-right:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-avatar{padding-right:0;padding-left:12px}.mat-standard-chip .mat-chip-avatar{width:24px;height:24px;margin-right:8px;margin-left:4px}[dir=rtl] .mat-standard-chip .mat-chip-avatar{margin-left:8px;margin-right:4px}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{width:18px;height:18px;cursor:pointer}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-standard-chip .mat-chip-remove,[dir=rtl] .mat-standard-chip .mat-chip-trailing-icon{margin-right:8px;margin-left:0}.mat-chip-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit;overflow:hidden;transform:translateZ(0)}.mat-chip-list-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;margin:-4px}.mat-chip-list-wrapper input.mat-input-element,.mat-chip-list-wrapper .mat-standard-chip{margin:4px}.mat-chip-list-stacked .mat-chip-list-wrapper{flex-direction:column;align-items:flex-start}.mat-chip-list-stacked .mat-chip-list-wrapper .mat-standard-chip{width:100%}.mat-chip-avatar{border-radius:50%;justify-content:center;align-items:center;display:flex;overflow:hidden;object-fit:cover}input.mat-chip-input{width:150px;margin:4px;flex:1 0 150px}'],encapsulation:2,changeDetection:0}),o})(),Ke=0,Bt=(()=>{class o{constructor(e,i){this._elementRef=e,this._defaultOptions=i,this.focused=!1,this._addOnBlur=!1,this.separatorKeyCodes=this._defaultOptions.separatorKeyCodes,this.chipEnd=new t.vpe,this.placeholder="",this.id="mat-chip-list-input-"+Ke++,this._disabled=!1,this.inputElement=this._elementRef.nativeElement}set chipList(e){e&&(this._chipList=e,this._chipList.registerInput(this))}get addOnBlur(){return this._addOnBlur}set addOnBlur(e){this._addOnBlur=(0,_.Ig)(e)}get disabled(){return this._disabled||this._chipList&&this._chipList.disabled}set disabled(e){this._disabled=(0,_.Ig)(e)}get empty(){return!this.inputElement.value}ngOnChanges(){this._chipList.stateChanges.next()}ngOnDestroy(){this.chipEnd.complete()}ngAfterContentInit(){this._focusLastChipOnBackspace=this.empty}_keydown(e){if(e){if(e.keyCode===I.Mf&&!(0,I.Vb)(e,"shiftKey")&&this._chipList._allowFocusEscape(),e.keyCode===I.ZH&&this._focusLastChipOnBackspace)return this._chipList._keyManager.setLastItemActive(),void e.preventDefault();this._focusLastChipOnBackspace=!1}this._emitChipEnd(e)}_keyup(e){!this._focusLastChipOnBackspace&&e.keyCode===I.ZH&&this.empty&&(this._focusLastChipOnBackspace=!0,e.preventDefault())}_blur(){this.addOnBlur&&this._emitChipEnd(),this.focused=!1,this._chipList.focused||this._chipList._blur(),this._chipList.stateChanges.next()}_focus(){this.focused=!0,this._focusLastChipOnBackspace=this.empty,this._chipList.stateChanges.next()}_emitChipEnd(e){!this.inputElement.value&&!!e&&this._chipList._keydown(e),(!e||this._isSeparatorKey(e))&&(this.chipEnd.emit({input:this.inputElement,value:this.inputElement.value,chipInput:this}),e?.preventDefault())}_onInput(){this._chipList.stateChanges.next()}focus(e){this.inputElement.focus(e)}clear(){this.inputElement.value="",this._focusLastChipOnBackspace=!0}_isSeparatorKey(e){return!(0,I.Vb)(e)&&new Set(this.separatorKeyCodes).has(e.keyCode)}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(t.SBq),t.Y36(Yt))},o.\u0275dir=t.lG2({type:o,selectors:[["input","matChipInputFor",""]],hostAttrs:[1,"mat-chip-input","mat-input-element"],hostVars:5,hostBindings:function(e,i){1&e&&t.NdJ("keydown",function(s){return i._keydown(s)})("keyup",function(s){return i._keyup(s)})("blur",function(){return i._blur()})("focus",function(){return i._focus()})("input",function(){return i._onInput()}),2&e&&(t.Ikx("id",i.id),t.uIk("disabled",i.disabled||null)("placeholder",i.placeholder||null)("aria-invalid",i._chipList&&i._chipList.ngControl?i._chipList.ngControl.invalid:null)("aria-required",i._chipList&&i._chipList.required||null))},inputs:{chipList:["matChipInputFor","chipList"],addOnBlur:["matChipInputAddOnBlur","addOnBlur"],separatorKeyCodes:["matChipInputSeparatorKeyCodes","separatorKeyCodes"],placeholder:"placeholder",id:"id",disabled:"disabled"},outputs:{chipEnd:"matChipInputTokenEnd"},exportAs:["matChipInput","matChipInputFor"],features:[t.TTD]}),o})(),We=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({providers:[x.rD,{provide:Yt,useValue:{separatorKeyCodes:[I.K5]}}],imports:[x.BQ]}),o})();var zt=p(7392);function je(o,n){1&o&&(t.TgZ(0,"div",75)(1,"span"),t._uU(2,"Channel name is required!"),t.qZA()())}function Xe(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"input",79),t.NdJ("ngModelChange",function(a){t.CHM(e);const s=t.oxw(2);return t.KtG(s.model.ShopID=a)}),t.qZA()}if(2&o){const e=t.oxw(2);t.Q6J("ngModel",e.model.ShopID)}}function $e(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"input",80),t.NdJ("ngModelChange",function(a){t.CHM(e);const s=t.oxw(2);return t.KtG(s.model.ShopIDString=a)}),t.qZA()}if(2&o){const e=t.oxw(2);t.Q6J("ngModel",e.model.ShopIDString)}}function ti(o,n){if(1&o&&(t.TgZ(0,"div",13),t.YNc(1,Xe,1,1,"input",76),t.YNc(2,$e,1,1,"input",77),t.TgZ(3,"label",78),t._uU(4,"Shop ID"),t.qZA()()),2&o){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",null==e.model.ShopIDString||""==e.model.ShopIDString),t.xp6(1),t.Q6J("ngIf",e.model.ShopIDString)}}function ei(o,n){1&o&&(t.TgZ(0,"span"),t._uU(1,"Please enter a valid URL!"),t.qZA())}function ii(o,n){if(1&o&&(t.TgZ(0,"div",75),t.YNc(1,ei,2,0,"span",81),t.qZA()),2&o){t.oxw();const e=t.MAs(37);t.xp6(1),t.Q6J("ngIf",e.errors.pattern)}}function ni(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"div",12)(1,"div",13)(2,"input",82,83),t.NdJ("ngModelChange",function(a){t.CHM(e);const s=t.oxw();return t.KtG(s.model.ConsumerKey=a)}),t.qZA(),t.TgZ(4,"label",25),t._uU(5,"Consumer Key"),t.qZA()()()}if(2&o){const e=t.oxw();t.xp6(2),t.Q6J("ngModel",e.model.ConsumerKey)}}function oi(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"div",12)(1,"div",13)(2,"input",84,85),t.NdJ("ngModelChange",function(a){t.CHM(e);const s=t.oxw();return t.KtG(s.model.ConsumerSecret=a)}),t.qZA(),t.TgZ(4,"label",25),t._uU(5,"Consumer Secret"),t.qZA()()()}if(2&o){const e=t.oxw();t.xp6(2),t.Q6J("ngModel",e.model.ConsumerSecret)}}function ai(o,n){1&o&&(t.TgZ(0,"p"),t._uU(1," Email is not valid "),t.qZA())}function si(o,n){if(1&o&&(t.TgZ(0,"div",86),t.YNc(1,ai,2,0,"p",81),t.qZA()),2&o){t.oxw();const e=t.MAs(104);t.xp6(1),t.Q6J("ngIf",e.errors.pattern)}}function ri(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"mat-chip",87),t.NdJ("removed",function(){const s=t.CHM(e).$implicit,r=t.oxw();return t.KtG(r.removeAdditonalItem(s))}),t._uU(1),t.TgZ(2,"button",88)(3,"mat-icon"),t._uU(4,"cancel"),t.qZA()()()}if(2&o){const e=n.$implicit;t.xp6(1),t.hij(" ",e," ")}}function li(o,n){1&o&&(t.TgZ(0,"div",75)(1,"span"),t._uU(2,"Outlet is required!"),t.qZA()())}function di(o,n){1&o&&(t.TgZ(0,"div",75)(1,"span"),t._uU(2,"Outlet is required!"),t.qZA()())}function ci(o,n){1&o&&(t.TgZ(0,"div",75)(1,"span"),t._uU(2,"Payment Method is required!"),t.qZA()())}function pi(o,n){1&o&&(t.TgZ(0,"div",75)(1,"span"),t._uU(2,"Sales Orders is required!"),t.qZA()())}function hi(o,n){1&o&&(t.TgZ(0,"div",75)(1,"span"),t._uU(2,"Tax Type is required!"),t.qZA()())}const P=function(o){return{empty:o}},ui=function(o){return{"is-invalid border border-danger":o}},gi=function(){return{updateOn:"blur"}};let mi=(()=>{class o{constructor(e,i,a,s){this.http=i,this.service=a,this.Toastr=s,this.model=new Ne,this.form=new lt,this.loading=!1,this.ListCategory=[],this.ListWriteOff=[],this.advance=!1,this.additionalItems=[],this.advance=!1;let r=e.snapshot.params;null!=r&&(this.model.ID=null!=r.ID?r.ID:"00000000-0000-0000-0000-000000000000"),this.TypeMarket=[{Name:"Shopee",ID:0},{Name:"Tokopedia",ID:1},{Name:"WooCommerce",ID:2},{Name:"KalCare",ID:4},{Name:"ShopeeV2",ID:5},{Name:"Tiktok",ID:6},{Name:"Lazada",ID:7}]}ngOnInit(){this.loaderChannel(this.model.ID)}loaderChannel(e){this.http.post("/api/ChannelLoader/GetPOSProperties",{ID:e}).subscribe(i=>{this.model=i.Model,this.form=i.Form,this.ListSalesType=i.Options.ListSalesOrderType,this.ListOutlet=i.Options.ListOutlet,this.ListTax=i.Options.ListTax,this.ListPaymentMethod=i.Options.ListPaymentMethod,this.Modes=i.Options.Modes,this.ListWriteOff=i.Options.ListWriteOff,this.initAdditionalItems()})}initAdditionalItems(){let e=this.model.Additionalitem;e&&(this.additionalItems=e.split(","))}Submit(){null==this.model.ProductCategoryDefault&&(this.model.ProductCategoryDefault=0),this.model.POSInventoryOutlet=null!=this.model.POSInventoryOutletArray&&this.model.POSInventoryOutletArray.length>0?this.model.POSInventoryOutletArray.join(","):null,this.model.Additionalitem=this.additionalItems.join(","),this.http.post("/api/Channel/SubmitChannel",this.model).subscribe(e=>{this.Toastr.success("Successfully submitted the Channel","Success!"),this.service.navigate(["/menu/channel"])})}SubmitHost(){this.http.post("/api/Channel/SubmitConfig",this.form).subscribe(e=>{this.Toastr.success("Successfully submitted the Channel","Success!"),this.service.navigate(["/menu/channel"])})}Channel(){this.http.post("/api/Channel/GetChannel",{}).subscribe(e=>{this.List=e.Data})}changeOutlet(){this.model.SyncOrder=!Lt.g.IsEmpty(this.model.POSOutlet)}Cancel(){this.Channel()}LoadCategory(){0!=this.model.TypeID&&1!=this.model.TypeID||this.http.post("/api/Channel/GetChannelCategory",{TypeID:this.model.TypeID}).subscribe(i=>{this.ListCategory=i})}addAdditonalItem(e){const i=(e.value||"").trim();this.additionalItems.includes(i)||this.additionalItems.push(i),e.chipInput.clear()}removeAdditonalItem(e){const i=this.additionalItems.indexOf(e);i>=0&&this.additionalItems.splice(i,1)}isEmpty(e){return Lt.g.IsEmpty(e)}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(f.gz),t.Y36(O.O),t.Y36(f.F0),t.Y36(R._W))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-marketplace-form"]],decls:188,vars:79,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/channel",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],["role","button","data-toggle","tooltip","data-placement","top","matTooltip","Choose Outlet where transaction is recorded",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"click"],[1,"container-fluid","py-5","bg-light-gray"],[1,"row"],[1,"col-sm-8"],["name","form"],["f","ngForm"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body","mt-8"],[1,"col-sm-6"],[1,"form-label-group"],["type","text","id","Name","placeholder","Name","name","Name","matTooltip","Channel Name","required","",1,"form-control","tall",3,"ngModel","ngModelChange"],["name","ngModel"],["for","Name"],["class","alert alert-danger",4,"ngIf"],[1,"col-sm-6","me-0"],[1,"form-label-group",3,"ngClass"],["id","Type","bindLabel","Name","bindValue","ID","placeholder","Type","name","Market","matTooltip","Channel type","data-toggle","tooltip",1,"center-text","tall",3,"items","ngModel","ngModelChange","change"],["for","type"],["class","form-label-group",4,"ngIf"],["type","text","id","URL","placeholder","URL","name","URL","data-toggle","tooltip","matTooltip","Fill with your Marketplace URL","pattern","^((https?|ftp|smtp):\\/\\/)?(www.)?[a-z0-9]+(.[a-z]+)(.id)?(\\/[-~$_.+!*'(),a-zA-Z0-9#]+\\/?)+$",1,"form-control",3,"ngModel","ngModelChange"],["url","ngModel"],["for","URL"],["class","col-sm-6",4,"ngIf"],[1,"form-label-group","radio"],["for","SyncOrder"],[1,"mt-3"],["name","SyncOrder",3,"ngModel","ngModelChange"],["data-toggle","tooltip","matTooltip","No Include if the channel makes a transaction",1,"me-5",3,"value"],["data-toggle","tootip","matTooltip","Include if the channel makes a transaction",1,"me-5",3,"value"],["name","SyncInventory",3,"ngModel","ngModelChange"],[1,"col-md-12"],[1,"form-label-group","radio",3,"ngClass"],[2,"top","-11px","background","white"],["name","InventoryLog",3,"ngModel","ngModelChange"],["data-toggle","tooltip","matTooltip","Not record any log from transaction",1,"me-5",3,"value"],["data-toggle","tooltip","matTooltip","Only record error log from transaction",1,"me-5",3,"value"],["data-toggle","tooltip","matTooltip","Record all log from transaction",1,"me-5",3,"value"],[1,"col-md-6"],[1,"card-header","cursor","mb-3"],["type","text","id","Register","placeholder","Register","name","Register","data-toggle","tooltip","matTooltip","Outlet register name",1,"form-control",3,"ngModel","ngModelChange"],["for","Register"],["type","email","name","Email","placeholder","Email","email","","pattern","\\b[\\w\\.-]+@[\\w\\.-]+\\.\\w{2,4}\\b",1,"form-control",3,"ngClass","ngModelOptions","ngModel","ngModelChange"],["Email","ngModel"],["class","text-danger",4,"ngIf"],["type","number","name","MinimumInventory","placeholder","Minimum Inventory","id","MinimumInventory","data-toggle","tooltip","matTooltip","Minimal inventory on channel, if product inventory is bellow minimum inventory will automatically update to 0 ",1,"form-control",3,"ngModel","ngModelChange"],["for","MinimumInventory"],[1,"col-sm-12","mat-chip-custom"],["appearance","outline",1,"w-100"],["aria-label","Additional Item"],["chipList",""],["style","font-size: 12px;",3,"removed",4,"ngFor","ngForOf"],["placeholder","New Item",3,"matChipInputFor","matChipInputTokenEnd"],["type","number","name","Index","placeholder","Additional item","id","Additionalitem",1,"form-control",3,"ngModel","ngModelChange"],["for","Index"],[1,"col-sm-4"],["id","outletOrder","bindLabel","Outlet","bindValue","Outlet","placeholder","New Order To","data-toggle","tooltip","data-placement","top","matTooltip","Choose Outlet where transaction is recorded","name","Outlet","required","",1,"center-text","tall",3,"items","ngModel","ngModelChange","change"],["outlet","ngModel"],["for","outletOrder"],["id","inventorySource","bindLabel","Outlet","bindValue","Outlet","placeholder","Dispatch Orders From","data-toggle","tooltip","data-placement","top","matTooltip","Choose outlet to be inventory source for marketplace ","name","Delivery","required","",1,"center-text","tall",3,"items","ngModel","ngModelChange"],["delivery","ngModel"],["for","inventorySource"],["id","ProductInventory","multiple","true","bindLabel","Outlet","bindValue","Outlet","placeholder","Product Inventory","data-toggle","tooltip","data-placement","top","matTooltip","Choose Outlet where inventory is recorded","name","POSInventoryOutletArray",1,"center-text","tall","multiple-select",3,"items","ngModel","ngModelChange"],["for","ProductInventory"],["bindLabel","Name","bindValue","Name","placeholder","Payment Method","data-toggle","tootlip","matTooltip","Choose your payment method","name","InvoicePaymentMethod","required","",1,"center-text","tall",3,"items","ngModel","ngModelChange"],["method","ngModel"],["bindLabel","Name","bindValue","Name","placeholder","Sales Orders Tag","data-toggle","tooltip","matTooltip","Choose sales order type for marketplace","name","SalesType","required","",1,"center-text","tall",3,"items","ngModel","ngModelChange"],["sales","ngModel"],["bindLabel","Name","bindValue","Name","placeholder","Tax","data-toggle","tooltip","matTooltip","Choose tax type for marketplace","name","POSTax","required","",1,"center-text","tall",3,"items","ngModel","ngModelChange"],["tax","ngModel"],["id","writeoff","bindLabel","Name","bindValue","Name","placeholder","Write off","data-toggle","tooltip","matTooltip","Choose Writeoff","name","POSWriteOff",1,"center-text","tall",3,"items","ngModel","ngModelChange"],["for","writeoff"],[1,"alert","alert-danger"],["type","number","id","ShopID","placeholder","Shop ID","class","form-control","name","ShopID","data-toggle","tooltip","matTooltip","Fill with your Shop ID",3,"ngModel","ngModelChange",4,"ngIf"],["type","text","id","ShopIDString","placeholder","Shop ID String","class","form-control","name","ShopIDString","data-toggle","tooltip","matTooltip","Fill with your Shop ID String",3,"ngModel","ngModelChange",4,"ngIf"],["for","ShopID"],["type","number","id","ShopID","placeholder","Shop ID","name","ShopID","data-toggle","tooltip","matTooltip","Fill with your Shop ID",1,"form-control",3,"ngModel","ngModelChange"],["type","text","id","ShopIDString","placeholder","Shop ID String","name","ShopIDString","data-toggle","tooltip","matTooltip","Fill with your Shop ID String",1,"form-control",3,"ngModel","ngModelChange"],[4,"ngIf"],["type","text","id","ConsumerKey","placeholder","Consumer Key","name","ConsumerKey","data-toggle","tooltip","matTooltip","Fill with your Marketplace Consumer Key",1,"form-control",3,"ngModel","ngModelChange"],["ConsumerKey","ngModel"],["type","text","id","ConsumerSecret","placeholder","Consumer Secret","name","ConsumerSecret","data-toggle","tooltip","matTooltip","Fill with your Marketplace Consumer Secret",1,"form-control",3,"ngModel","ngModelChange"],["ConsumerSecret","ngModel"],[1,"text-danger"],[2,"font-size","12px",3,"removed"],["matChipRemove",""]],template:function(e,i){if(1&e&&(t.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),t._uU(3,"Cancel"),t.qZA(),t.TgZ(4,"a",2),t.NdJ("click",function(){return i.Submit()}),t._uU(5,"Submit"),t.qZA()(),t.TgZ(6,"content")(7,"div",3)(8,"div",4)(9,"div",5)(10,"form",6,7)(12,"div",4)(13,"div",8)(14,"div",9)(15,"div",10)(16,"h3"),t._uU(17,"Marketplace Setup"),t.qZA()(),t.TgZ(18,"div",11)(19,"div",4)(20,"div",12)(21,"div",13)(22,"input",14,15),t.NdJ("ngModelChange",function(s){return i.model.Name=s}),t.qZA(),t.TgZ(24,"label",16),t._uU(25,"Name"),t.qZA()(),t.YNc(26,je,3,0,"div",17),t.qZA(),t.TgZ(27,"div",18)(28,"div",19)(29,"ng-select",20),t.NdJ("ngModelChange",function(s){return i.model.TypeID=s})("change",function(){return i.LoadCategory()}),t.qZA(),t.TgZ(30,"label",21),t._uU(31,"Type"),t.qZA()()(),t.TgZ(32,"div",12),t.YNc(33,ti,5,2,"div",22),t.qZA(),t.TgZ(34,"div",12)(35,"div",13)(36,"input",23,24),t.NdJ("ngModelChange",function(s){return i.model.URL=s}),t.qZA(),t.TgZ(38,"label",25),t._uU(39,"Marketplace URL"),t.qZA()(),t.YNc(40,ii,2,1,"div",17),t.qZA(),t.YNc(41,ni,6,1,"div",26),t.YNc(42,oi,6,1,"div",26),t.qZA()()()(),t.TgZ(43,"div",12)(44,"div",9)(45,"div",10)(46,"h3"),t._uU(47,"Sync"),t.qZA()(),t.TgZ(48,"div",11)(49,"div",4)(50,"div",8)(51,"div",27)(52,"label",28),t._uU(53,"Sync Order"),t.qZA(),t.TgZ(54,"div",29)(55,"mat-radio-group",30),t.NdJ("ngModelChange",function(s){return i.model.SyncOrder=s}),t.TgZ(56,"mat-radio-button",31),t._uU(57," No "),t.qZA(),t.TgZ(58,"mat-radio-button",32),t._uU(59," Yes "),t.qZA()()()()(),t.TgZ(60,"div",8)(61,"div",27)(62,"label",28),t._uU(63,"Sync Inventory"),t.qZA(),t.TgZ(64,"div",29)(65,"mat-radio-group",33),t.NdJ("ngModelChange",function(s){return i.model.SyncInventory=s}),t.TgZ(66,"mat-radio-button",31),t._uU(67," No "),t.qZA(),t.TgZ(68,"mat-radio-button",32),t._uU(69," Yes "),t.qZA()()()()()()()()(),t.TgZ(70,"div",12)(71,"div",9)(72,"div",10)(73,"h3"),t._uU(74,"Log"),t.qZA()(),t.TgZ(75,"div",11)(76,"div",4)(77,"div",34)(78,"div",35)(79,"label",36),t._uU(80,"Inventory Log Mode"),t.qZA(),t.TgZ(81,"div",29)(82,"mat-radio-group",37),t.NdJ("ngModelChange",function(s){return i.model.InventoryLog=s}),t.TgZ(83,"mat-radio-button",38),t._uU(84," None "),t.qZA(),t.TgZ(85,"mat-radio-button",39),t._uU(86," Error "),t.qZA(),t.TgZ(87,"mat-radio-button",40),t._uU(88," Full "),t.qZA()()()()()()()()(),t.TgZ(89,"div",41)(90,"div",9)(91,"div",42)(92,"h3"),t._uU(93,"Advance"),t.qZA()(),t.TgZ(94,"div",11)(95,"div",4)(96,"div",34)(97,"div",13)(98,"input",43),t.NdJ("ngModelChange",function(s){return i.model.Register=s}),t.qZA(),t.TgZ(99,"label",44),t._uU(100,"Register"),t.qZA()()(),t.TgZ(101,"div",8)(102,"div",13)(103,"input",45,46),t.NdJ("ngModelChange",function(s){return i.model.CustomerDefaultEmail=s}),t.qZA(),t.TgZ(105,"label",16),t._uU(106,"Customer Default Email"),t.qZA()(),t.YNc(107,si,2,1,"div",47),t.qZA(),t.TgZ(108,"div",8)(109,"div",13)(110,"input",48),t.NdJ("ngModelChange",function(s){return i.model.MinimumInventory=s}),t.qZA(),t.TgZ(111,"label",49),t._uU(112,"Minimum Inventory"),t.qZA()()(),t.TgZ(113,"div",50)(114,"mat-form-field",51)(115,"mat-label"),t._uU(116,"Additional Item"),t.qZA(),t.TgZ(117,"mat-chip-list",52,53),t.YNc(119,ri,5,1,"mat-chip",54),t.TgZ(120,"input",55),t.NdJ("matChipInputTokenEnd",function(s){return i.addAdditonalItem(s)}),t.qZA()()()(),t.TgZ(121,"div",8)(122,"div",13)(123,"input",56),t.NdJ("ngModelChange",function(s){return i.model.Index=s}),t.qZA(),t.TgZ(124,"label",57),t._uU(125,"Index"),t.qZA()()()()()()()()()(),t.TgZ(126,"div",58)(127,"form")(128,"div",4)(129,"div",8)(130,"div",9)(131,"div",10)(132,"h3"),t._uU(133,"POS Outlet Configuration"),t.qZA()(),t.TgZ(134,"div",11)(135,"div",4)(136,"div",34)(137,"div",19)(138,"ng-select",59,60),t.NdJ("ngModelChange",function(s){return i.model.POSOutlet=s})("change",function(){return i.changeOutlet()}),t.qZA(),t.TgZ(140,"label",61),t._uU(141,"New Order To"),t.qZA()(),t.YNc(142,li,3,0,"div",17),t.qZA(),t.TgZ(143,"div",34)(144,"div",19)(145,"ng-select",62,63),t.NdJ("ngModelChange",function(s){return i.model.POSDeliveryOutlet=s}),t.qZA(),t.TgZ(147,"label",64),t._uU(148,"Dispatch Orders From"),t.qZA()(),t.YNc(149,di,3,0,"div",17),t.qZA(),t.TgZ(150,"div",34)(151,"div",13)(152,"ng-select",65),t.NdJ("ngModelChange",function(s){return i.model.POSInventoryOutletArray=s}),t.qZA(),t.TgZ(153,"label",66),t._uU(154,"Product Inventory"),t.qZA()()()()()()(),t.TgZ(155,"div",8)(156,"div",9)(157,"div",10)(158,"h3"),t._uU(159,"POS Orders Configuration"),t.qZA()(),t.TgZ(160,"div",11)(161,"div",4)(162,"div",34)(163,"div",19)(164,"ng-select",67,68),t.NdJ("ngModelChange",function(s){return i.model.POSInvoicePaymentMethod=s}),t.qZA(),t.TgZ(166,"label"),t._uU(167,"Payment Method"),t.qZA()(),t.YNc(168,ci,3,0,"div",17),t.qZA(),t.TgZ(169,"div",34)(170,"div",19)(171,"ng-select",69,70),t.NdJ("ngModelChange",function(s){return i.model.POSSalesOrderType=s}),t.qZA(),t.TgZ(173,"label"),t._uU(174,"Sales Orders Tag"),t.qZA()(),t.YNc(175,pi,3,0,"div",17),t.qZA(),t.TgZ(176,"div",34)(177,"div",19)(178,"ng-select",71,72),t.NdJ("ngModelChange",function(s){return i.model.POSTax=s}),t.qZA(),t.TgZ(180,"label"),t._uU(181,"Tax"),t.qZA()(),t.YNc(182,hi,3,0,"div",17),t.qZA(),t.TgZ(183,"div",34)(184,"div",19)(185,"ng-select",73),t.NdJ("ngModelChange",function(s){return i.model.POSWriteOff=s}),t.qZA(),t.TgZ(186,"label",74),t._uU(187,"Write Off"),t.qZA()()()()()()()()()()()()()()),2&e){const a=t.MAs(23),s=t.MAs(37),r=t.MAs(104),l=t.MAs(118),d=t.MAs(139),c=t.MAs(146),m=t.MAs(165),v=t.MAs(172),y=t.MAs(179);t.Q6J("headerTitle","Configure Channel")("pageData",i.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(22),t.Q6J("ngModel",i.model.Name),t.xp6(4),t.Q6J("ngIf",a.invalid&&(a.dirty||a.touched)),t.xp6(2),t.Q6J("ngClass",t.VKq(60,P,i.isEmpty(i.model.TypeID))),t.xp6(1),t.Q6J("items",i.TypeMarket)("ngModel",i.model.TypeID),t.xp6(4),t.Q6J("ngIf",2!=i.model.TypeID),t.xp6(3),t.Q6J("ngModel",i.model.URL),t.xp6(4),t.Q6J("ngIf",s.invalid&&(s.dirty||s.touched)),t.xp6(1),t.Q6J("ngIf",2==i.model.TypeID),t.xp6(1),t.Q6J("ngIf",2==i.model.TypeID),t.xp6(13),t.Q6J("ngModel",i.model.SyncOrder),t.xp6(1),t.Q6J("value",!1),t.xp6(2),t.Q6J("value",!0),t.xp6(7),t.Q6J("ngModel",i.model.SyncInventory),t.xp6(1),t.Q6J("value",!1),t.xp6(2),t.Q6J("value",!0),t.xp6(10),t.Q6J("ngClass",t.VKq(62,P,i.isEmpty(i.model.InventoryLog))),t.xp6(4),t.Q6J("ngModel",i.model.InventoryLog),t.xp6(1),t.Q6J("value",1),t.xp6(2),t.Q6J("value",2),t.xp6(2),t.Q6J("value",3),t.xp6(11),t.Q6J("ngModel",i.model.Register),t.xp6(5),t.Q6J("ngClass",t.VKq(64,ui,r.invalid))("ngModelOptions",t.DdM(66,gi))("ngModel",i.model.CustomerDefaultEmail),t.xp6(4),t.Q6J("ngIf",r.invalid&&(r.dirty||r.touched)),t.xp6(3),t.Q6J("ngModel",i.model.MinimumInventory),t.xp6(9),t.Q6J("ngForOf",i.additionalItems),t.xp6(1),t.Q6J("matChipInputFor",l)("matChipInputFor",l),t.xp6(3),t.Q6J("ngModel",i.model.Index),t.xp6(14),t.Q6J("ngClass",t.VKq(67,P,i.isEmpty(i.model.POSOutlet))),t.xp6(1),t.Q6J("items",i.ListOutlet)("ngModel",i.model.POSOutlet),t.xp6(4),t.Q6J("ngIf",d.invalid&&(d.dirty||d.touched)),t.xp6(2),t.Q6J("ngClass",t.VKq(69,P,i.isEmpty(i.model.POSDeliveryOutlet))),t.xp6(1),t.Q6J("items",i.ListOutlet)("ngModel",i.model.POSDeliveryOutlet),t.xp6(4),t.Q6J("ngIf",c.invalid&&(c.dirty||c.touched)),t.xp6(3),t.Q6J("items",i.ListOutlet)("ngModel",i.model.POSInventoryOutletArray),t.xp6(11),t.Q6J("ngClass",t.VKq(71,P,i.isEmpty(i.model.POSInvoicePaymentMethod))),t.xp6(1),t.Q6J("items",i.ListPaymentMethod)("ngModel",i.model.POSInvoicePaymentMethod),t.xp6(4),t.Q6J("ngIf",m.invalid&&(m.dirty||m.touched)),t.xp6(2),t.Q6J("ngClass",t.VKq(73,P,i.isEmpty(i.model.POSSalesOrderType))),t.xp6(1),t.Q6J("items",i.ListSalesType)("ngModel",i.model.POSSalesOrderType),t.xp6(4),t.Q6J("ngIf",v.invalid&&(v.dirty||v.touched)),t.xp6(2),t.Q6J("ngClass",t.VKq(75,P,i.isEmpty(i.model.POSTax))),t.xp6(1),t.Q6J("items",i.ListTax)("ngModel",i.model.POSTax),t.xp6(4),t.Q6J("ngIf",y.invalid&&(y.dirty||y.touched)),t.xp6(2),t.Q6J("ngClass",t.VKq(77,P,i.isEmpty(i.model.POSWriteOff))),t.xp6(1),t.Q6J("items",i.ListWriteOff)("ngModel",i.model.POSWriteOff)}},dependencies:[g.mk,g.sg,g.O5,h._Y,h.Fj,h.wV,h.JJ,h.JL,h.Q7,h.c5,h.on,h.On,h.F,u.p,k.VQ,k.U0,C.w9,f.yS,Qt,X,Bt,Ht,dt.KE,dt.hX,zt.Hw,z.gM],styles:[".mb-1rem[_ngcontent-%COMP%]{margin-bottom:1rem} .mat-form-field-appearance-outline .mat-form-field-outline-thick{color:solid 1.5px #1a73e8!important} ng-select.multiple-select>div.ng-select-container div.ng-value-container div.ng-placeholder{top:-7px!important} ng-select.multiple-select>div.ng-select-container input{padding-top:0!important}"]}),o})();function _i(o,n){if(1&o&&(t.TgZ(0,"div",16)(1,"div",17)(2,"label"),t._uU(3,"Shop ID"),t.qZA(),t.TgZ(4,"div",36)(5,"span"),t._uU(6),t.qZA()()()()),2&o){const e=t.oxw(2);t.xp6(6),t.Oqu(0!=e.data.ShopID?e.data.ShopID:e.data.ShopIDString)}}function fi(o,n){1&o&&t._UZ(0,"a",42)}function vi(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"a",43),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(3);return t.KtG(a.Authorize(a.data.TypeID))}),t.qZA()}}function bi(o,n){if(1&o&&(t.TgZ(0,"div",16)(1,"div",17)(2,"label"),t._uU(3,"Expired Date"),t.qZA(),t.TgZ(4,"div",37)(5,"span",38),t._uU(6),t.ALo(7,"date"),t.ALo(8,"date"),t.qZA()(),t.TgZ(9,"div",39),t.YNc(10,fi,1,0,"a",40),t.YNc(11,vi,1,0,"a",41),t.qZA()()()),2&o){const e=t.oxw(2);t.xp6(6),t.hij(" ",e.data.ExpiredTime?t.xi3(7,4,e.data.ExpiredTime,"dd MMM yyyy HH:mm"):t.xi3(8,7,e.data.TokenExpired,"dd MMM yyyy HH:mm")," "),t.xp6(3),t.s9C("matTooltip",5==e.data.TypeID?"Extend Shopee Authorization Duration for an additional 1 year":"Update Token Expired date"),t.xp6(1),t.Q6J("ngIf",0==e.data.TypeID),t.xp6(1),t.Q6J("ngIf",5==e.data.TypeID||6==e.data.TypeID)}}function Ci(o,n){if(1&o&&(t.TgZ(0,"div",16)(1,"div",17)(2,"label"),t._uU(3,"Consumer Key"),t.qZA(),t.TgZ(4,"div",44)(5,"span"),t._uU(6),t.qZA()()()()),2&o){const e=t.oxw(2);t.xp6(6),t.Oqu(e.data.ConsumerKey)}}function yi(o,n){if(1&o&&(t.TgZ(0,"div",16)(1,"div",17)(2,"label"),t._uU(3,"Consumer Secret"),t.qZA(),t.TgZ(4,"div",45)(5,"span"),t._uU(6),t.qZA()()()()),2&o){const e=t.oxw(2);t.xp6(6),t.Oqu(e.data.ConsumerSecret)}}function Ti(o,n){if(1&o&&(t.TgZ(0,"div",15)(1,"div",46)(2,"label"),t._uU(3,"Sync Order"),t.qZA(),t.TgZ(4,"div")(5,"span"),t._uU(6),t.qZA()()(),t.TgZ(7,"div",47)(8,"label"),t._uU(9,"Sync Inventory"),t.qZA(),t.TgZ(10,"div")(11,"span"),t._uU(12),t.qZA()()()()),2&o){const e=t.oxw(2);t.xp6(6),t.Oqu(e.data.SyncOrder),t.xp6(6),t.Oqu(e.data.SyncInventory)}}function Mi(o,n){1&o&&(t.TgZ(0,"span"),t._uU(1,"None"),t.qZA())}function Di(o,n){1&o&&(t.TgZ(0,"span"),t._uU(1,"Error"),t.qZA())}function Si(o,n){1&o&&(t.TgZ(0,"span"),t._uU(1,"Full"),t.qZA())}function Ii(o,n){if(1&o&&(t.TgZ(0,"div",15)(1,"div",48)(2,"label",49),t._uU(3,"Inventory Log"),t.qZA(),t.TgZ(4,"div"),t.YNc(5,Mi,2,0,"span",50),t.YNc(6,Di,2,0,"span",50),t.YNc(7,Si,2,0,"span",50),t.qZA()()()),2&o){const e=t.oxw(2);t.xp6(5),t.Q6J("ngIf",1==e.data.InventoryLog),t.xp6(1),t.Q6J("ngIf",2==e.data.InventoryLog),t.xp6(1),t.Q6J("ngIf",3==e.data.InventoryLog)}}function xi(o,n){if(1&o&&(t.TgZ(0,"div",15)(1,"div",17)(2,"label"),t._uU(3,"New Order To"),t.qZA(),t.TgZ(4,"div",51)(5,"span"),t._uU(6),t.qZA()()(),t.TgZ(7,"div",17)(8,"label"),t._uU(9,"Dispatch Orders From"),t.qZA(),t.TgZ(10,"div",52)(11,"span"),t._uU(12),t.qZA()()(),t.TgZ(13,"div",17)(14,"label"),t._uU(15,"Product Inventory"),t.qZA(),t.TgZ(16,"div",53)(17,"span"),t._uU(18),t.qZA()()()()),2&o){const e=t.oxw(2);t.xp6(6),t.Oqu(e.data.POSOutlet),t.xp6(6),t.Oqu(e.data.POSDeliveryOutlet),t.xp6(6),t.Oqu(e.data.POSInventoryOutlet)}}function wi(o,n){if(1&o&&(t.TgZ(0,"div",54)(1,"div",55)(2,"label"),t._uU(3,"Payment Method"),t.qZA(),t.TgZ(4,"div",56)(5,"span"),t._uU(6),t.qZA()()(),t.TgZ(7,"div",17)(8,"label"),t._uU(9,"Tag"),t.qZA(),t.TgZ(10,"div",57)(11,"span"),t._uU(12),t.qZA()()(),t.TgZ(13,"div",17)(14,"label"),t._uU(15,"Tax"),t.qZA(),t.TgZ(16,"div",58)(17,"span"),t._uU(18),t.qZA()()(),t.TgZ(19,"div",17)(20,"label"),t._uU(21,"Write off"),t.qZA(),t.TgZ(22,"div",59)(23,"span"),t._uU(24),t.qZA()()()()),2&o){const e=t.oxw(2);t.xp6(6),t.Oqu(e.data.POSInvoicePaymentMethod),t.xp6(6),t.Oqu(e.data.POSSalesOrderType),t.xp6(6),t.Oqu(e.data.POSTax),t.xp6(6),t.Oqu(e.data.POSWriteOff)}}function Zi(o,n){if(1&o&&(t.TgZ(0,"div",9)(1,"div",10)(2,"div",11)(3,"div",10)(4,"div",12)(5,"div",13)(6,"div",14)(7,"h3"),t._uU(8,"Marketplace Setup"),t.qZA()(),t.TgZ(9,"div",15)(10,"div",10)(11,"div",16)(12,"div",17)(13,"label"),t._uU(14,"Name"),t.qZA(),t.TgZ(15,"div",18)(16,"span"),t._uU(17),t.qZA()()()(),t.TgZ(18,"div",19)(19,"div",17)(20,"label"),t._uU(21,"Type"),t.qZA(),t.TgZ(22,"div")(23,"span"),t._uU(24),t.qZA()()()(),t.YNc(25,_i,7,1,"div",20),t.YNc(26,bi,12,10,"div",20),t.TgZ(27,"div",16)(28,"div",17)(29,"label"),t._uU(30,"Marketplace URL"),t.qZA(),t.TgZ(31,"div",21)(32,"span"),t._uU(33),t.qZA()()()(),t.TgZ(34,"div",16)(35,"div",17)(36,"label"),t._uU(37,"Product Sync"),t.qZA(),t.TgZ(38,"div",21)(39,"span"),t._uU(40),t.ALo(41,"date"),t.qZA()()()(),t.YNc(42,Ci,7,1,"div",20),t.YNc(43,yi,7,1,"div",20),t.qZA()()()(),t.TgZ(44,"div",16)(45,"div",13)(46,"div",14)(47,"div",22)(48,"h3"),t._uU(49,"Sync"),t.qZA()()(),t.YNc(50,Ti,13,2,"div",23),t.qZA()(),t.TgZ(51,"div",16)(52,"div",13)(53,"div",14)(54,"div",22)(55,"h3"),t._uU(56,"Log"),t.qZA()()(),t.YNc(57,Ii,8,3,"div",23),t.qZA()(),t.TgZ(58,"div",24)(59,"div",13)(60,"div",25)(61,"h3"),t._uU(62,"Advance"),t.qZA()(),t.TgZ(63,"div",15)(64,"div",26)(65,"label"),t._uU(66,"Register"),t.qZA(),t.TgZ(67,"div")(68,"span"),t._uU(69),t.qZA()()(),t.TgZ(70,"div",17)(71,"label"),t._uU(72,"Customer Default Email"),t.qZA(),t.TgZ(73,"div",27)(74,"span"),t._uU(75),t.qZA()()(),t.TgZ(76,"div",28)(77,"label"),t._uU(78,"Minimum Inventory"),t.qZA(),t.TgZ(79,"div",29)(80,"span"),t._uU(81),t.ALo(82,"number"),t.qZA()()(),t.TgZ(83,"div",17)(84,"label"),t._uU(85,"Additional Item"),t.qZA(),t.TgZ(86,"div",30)(87,"span"),t._uU(88),t.qZA()()(),t.TgZ(89,"div",17)(90,"label"),t._uU(91,"Index"),t.qZA(),t.TgZ(92,"div",31)(93,"span"),t._uU(94),t.qZA()()()()()(),t.TgZ(95,"div",24)(96,"div",13)(97,"div",25)(98,"h3"),t._uU(99,"History"),t.qZA()(),t.TgZ(100,"div",15)(101,"div",32)(102,"label"),t._uU(103,"Created "),t.qZA(),t.TgZ(104,"div")(105,"span"),t._uU(106),t.ALo(107,"date"),t.qZA()()(),t.TgZ(108,"div",33)(109,"label"),t._uU(110,"Modified "),t.qZA(),t.TgZ(111,"div")(112,"span"),t._uU(113),t.ALo(114,"date"),t.qZA()()()()()()()(),t.TgZ(115,"div",34)(116,"div",10)(117,"div",12)(118,"div",13)(119,"div",14)(120,"h3"),t._uU(121,"POS Outlet Configuration"),t.qZA()(),t.YNc(122,xi,19,3,"div",23),t.qZA()(),t.TgZ(123,"div",12)(124,"div",13)(125,"div",14)(126,"div",22)(127,"h3"),t._uU(128,"POS Orders Configuration"),t.qZA()()(),t.YNc(129,wi,25,4,"div",35),t.qZA()()()()()()),2&o){const e=t.oxw();t.xp6(17),t.Oqu(e.data.Name),t.xp6(7),t.Oqu(e.data.TypeString),t.xp6(1),t.Q6J("ngIf",2!=e.data.TypeID),t.xp6(1),t.Q6J("ngIf",0==e.data.TypeID||5==e.data.TypeID||6==e.data.TypeID),t.xp6(7),t.Oqu(e.data.URL),t.xp6(7),t.Oqu(e.data.LastSync?t.xi3(41,19,e.data.LastSync,"dd MMM yyyy HH:mm"):"-"),t.xp6(2),t.Q6J("ngIf",2==e.data.TypeID),t.xp6(1),t.Q6J("ngIf",2==e.data.TypeID),t.xp6(7),t.Q6J("ngIf",e.data),t.xp6(7),t.Q6J("ngIf",e.data),t.xp6(12),t.Oqu(null==e.data?null:e.data.Register),t.xp6(6),t.Oqu(null==e.data?null:e.data.CustomerDefaultEmail),t.xp6(6),t.Oqu(t.lcZ(82,22,null==e.data?null:e.data.MinimumInventory)),t.xp6(7),t.Oqu(null==e.data?null:e.data.Additionalitem),t.xp6(6),t.Oqu(null==e.data?null:e.data.Index),t.xp6(12),t.Oqu(t.xi3(107,24,e.data.Created,"dd MMM yyyy HH:mm")),t.xp6(7),t.Oqu(t.xi3(114,27,e.data.Modified,"dd MMM yyyy HH:mm")),t.xp6(9),t.Q6J("ngIf",e.data),t.xp6(7),t.Q6J("ngIf",e.data)}}const Pi=function(){return["/menu/channel/marketplace/cache"]},Vt=function(o){return{ID:o}},ki=function(o){return["/menu/channel/marketplace/form",o]};let Ai=(()=>{class o{constructor(e,i,a,s,r){this.route=e,this.http=i,this.router=a,this.toastr=s,this.konversi=r,this.Setup=!1,this.advance=!1,this.advance=!1,this.route.queryParams.subscribe(l=>{this.ID=l.ID}),null!=this.ID&&this.Load()}ngOnInit(){this.konversi.GetRoles().filter(i=>"Setup"==i||"Stp"==i).length>0&&(this.Setup=!0)}Load(){this.http.post("/api/ChannelLoader/GetChannelView",{ID:this.ID}).subscribe(i=>{this.data=i.Model,1==this.data.LogMode?this.data.LogModeLabel="None":2==this.data.LogMode?this.data.LogModeLabel="Error":3==this.data.LogMode&&(this.data.LogModeLabel="Full")})}clear(){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.http.post("/api/Channel/ClearCacheChannel",{ID:this.ID}).subscribe(a=>{this.toastr.success("Successfully cleared cache","Success",{closeButton:!0,positionClass:"toast-bottom-right"}),this.Load()})}Authorize(e){let i="";5==e&&(i="ChannelAuthorization/ShopeeV2_URL"),6==e&&(i="ChannelAuthorization/Tiktok_URL"),this.http.post(`/api/${i}`).subscribe(a=>{window.location.href=a.Url})}delete(e){confirm("Delete channel "+e.Name+" ?")&&this.http.post("/api/Channel/DeleteChannel",{ID:e.ID}).subscribe(s=>{this.toastr.success("Channel "+e.Name+" is deleted!","Success",{closeButton:!0,positionClass:"toast-bottom-right"}),this.router.navigate(["menu/channel"])})}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(f.gz),t.Y36(O.O),t.Y36(f.F0),t.Y36(R._W),t.Y36(Et.e))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-marketplace-view"]],decls:14,vars:17,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button",1,"btn","btn-outline-secondary","btn-lg","me-2",3,"routerLink","queryParams"],[1,"fas","fa-archive",2,"font-size","20px"],["role","group","aria-label","Basic example",1,"btn-group"],["role","button",1,"btn","btn-outline-secondary","btn-lg",3,"hidden","routerLink"],[1,"fas","fa-edit",2,"font-size","20px"],["role","button",1,"btn","btn-danger","btn-lg","text-white",3,"hidden","click"],[1,"fas","fa-trash-alt",2,"font-size","20px"],["class","container-fluid py-5 bg-light-gray",4,"ngIf"],[1,"container-fluid","py-5","bg-light-gray"],[1,"row"],[1,"col-sm-8"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body","mt-8"],[1,"col-sm-6"],[1,"info-label-group"],["data-toggle","title","matTooltip","Your shop name in marketplace channel"],["data-toggle","tooltip","matTooltip","Marketplace / Website where your product is Sold / Distributed",1,"col-sm-6"],["class","col-sm-6",4,"ngIf"],["data-toggle","title","matTooltip","Your Marketplace URL"],[1,"d-flex","justify-content-between"],["class","card-body mt-8",4,"ngIf"],[1,"col-md-6"],[1,"card-header","cursor"],["data-toggle","title","matTooltip","regiter name from outlet",1,"info-label-group"],["data-toggle","title","matTooltip","Default Email for all of customer for orders from channel"],["data-toggle","title","matTooltip","Minimal inventory on channel, if product inventory is bellow minimum inventory will automatically update to 0 ",1,"info-label-group"],["data-toggle","title","title","Minimum Inventory"],["data-toggle","title","matTooltip","Additional item"],["data-toggle","title","matTooltip","Index"],["data-toggle","title","matTooltip","the first date the channel was created ",1,"info-label-group"],["data-toggle","title","matTooltip","last date of data in channel",1,"info-label-group"],[1,"col-sm-4"],["class","card-body",4,"ngIf"],["data-toggle","title","matTooltip","Your shop ID"],["data-toggle","title","matTooltip","Your expired time shop",1,"w-100","d-flex","justify-content-between"],[1,"text-primary"],["matTooltipClass","unset-max-width-tooltip","matTooltipPosition","above",3,"matTooltip"],["class","fas fa-plus-circle fa-lg ml-12","style","cursor:pointer;","href","https://partner.shopeemobile.com/api/v1/shop/auth_partner?id=845458&token=af8476104ba1e0ec3052adc6a2682f59bf0eb5304970727b9848760edc97ae1e&redirect=https%3A%2F%2Fmarketplace.dealpos.app%2Fshopee",4,"ngIf"],["class","fas fa-plus-circle fa-lg ml-12","style","cursor:pointer;",3,"click",4,"ngIf"],["href","https://partner.shopeemobile.com/api/v1/shop/auth_partner?id=845458&token=af8476104ba1e0ec3052adc6a2682f59bf0eb5304970727b9848760edc97ae1e&redirect=https%3A%2F%2Fmarketplace.dealpos.app%2Fshopee",1,"fas","fa-plus-circle","fa-lg","ml-12",2,"cursor","pointer"],[1,"fas","fa-plus-circle","fa-lg","ml-12",2,"cursor","pointer",3,"click"],["data-toggle","title","matTooltip","Consumer Key"],["data-toggle","title","matTooltip","Consumer Secret"],["data-toggle","title","matTooltip","Automatically sync your orders from channel to POS",1,"info-label-group"],["data-toggle","title","matTooltip","Automatically sync your POS inventory to channel inventory",1,"info-label-group"],["data-toggle","title","matTooltip","Your Inventory log status",1,"info-label-group"],[2,"top","-11px","background","white"],[4,"ngIf"],["data-toggle","title","matTooltip","Outlet to record your order form marketplace"],["data-toggle","title","matTooltip","Outlet that will be inventory source for your channel inventory"],["data-toggle","title","matTooltip","Outlet where the inventory will displayed as inventory in Inventory Comparison Menu"],[1,"card-body"],[1,"info-label-group","mt-5"],["data-toggle","title","matTooltip","Your payment method for orders from channel"],["data-toggle","title","matTooltip","Your orders tag in POS for orders from channel"],["data-toggle","title","matTooltip","Tax for orders from channel"],["data-toggle","title","matTooltip","Write Off"]],template:function(e,i){1&e&&(t.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),t._UZ(3,"i",2),t._uU(4," Cache "),t.qZA(),t.TgZ(5,"div",3)(6,"a",4),t._UZ(7,"i",5),t._uU(8,"Configure"),t.qZA(),t.TgZ(9,"a",6),t.NdJ("click",function(){return i.delete(i.data)}),t._UZ(10,"i",7),t._uU(11," Delete"),t.qZA()()(),t.TgZ(12,"content"),t.YNc(13,Zi,130,30,"div",8),t.qZA()()),2&e&&(t.Q6J("headerTitle","Marketplace Configuration View")("pageData",i.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("routerLink",t.DdM(10,Pi))("queryParams",t.VKq(11,Vt,i.ID)),t.xp6(4),t.Q6J("hidden",!i.Setup)("routerLink",t.VKq(15,ki,t.VKq(13,Vt,null==i.data?null:i.data.ID))),t.xp6(3),t.Q6J("hidden",!i.Setup),t.xp6(4),t.Q6J("ngIf",i.data))},dependencies:[g.O5,u.p,f.yS,z.gM,g.JJ,g.uU]}),o})();function Oi(o,n){if(1&o&&(t.TgZ(0,"div",7)(1,"div",8)(2,"h3"),t._uU(3,"Total Product"),t.qZA()(),t.TgZ(4,"div",9)(5,"div",4)(6,"div",10)(7,"div",11)(8,"label"),t._uU(9,"Last Sync"),t.qZA(),t.TgZ(10,"div",12)(11,"span"),t._uU(12),t.ALo(13,"date"),t.qZA()()()(),t.TgZ(14,"div",13)(15,"div",11)(16,"label"),t._uU(17,"Product in Channel"),t.qZA(),t.TgZ(18,"div")(19,"span"),t._uU(20),t.ALo(21,"number"),t.qZA()()()(),t.TgZ(22,"div",14)(23,"div",11)(24,"label"),t._uU(25),t.qZA(),t.TgZ(26,"div")(27,"span"),t._uU(28),t.ALo(29,"number"),t.qZA()()()(),t.TgZ(30,"div",15)(31,"div",11)(32,"label"),t._uU(33,"Product Not in POS"),t.qZA(),t.TgZ(34,"div",16)(35,"span"),t._uU(36),t.ALo(37,"number"),t.qZA()()()(),t.TgZ(38,"div",15)(39,"div",11)(40,"label"),t._uU(41,"Duplicate SKU"),t.qZA(),t.TgZ(42,"div",17)(43,"span"),t._uU(44),t.ALo(45,"number"),t.qZA()()()()()()()),2&o){const e=t.oxw();t.xp6(12),t.Oqu(t.xi3(13,6,e.data.LastSync,"dd MMM yyyy HH:mm")),t.xp6(8),t.Oqu(t.lcZ(21,9,e.data.ProductInChannel)),t.xp6(5),t.hij("Product in ",e.data.Type,""),t.xp6(3),t.Oqu(t.lcZ(29,11,e.data.TotalProductMarketplaceLive)),t.xp6(8),t.Oqu(t.lcZ(37,13,e.data.ProductNotInPOS)),t.xp6(8),t.Oqu(t.lcZ(45,15,e.data.DuplicateSKU))}}const Ri=function(){return["/menu/channel/marketplace/view"]},Ei=function(o){return{ID:o}};let Ui=(()=>{class o{constructor(e,i,a,s){this.route=e,this.http=i,this.router=a,this.toastr=s,this.Name="Total Product in Channel",this.advance=!1,this.advance=!1,this.route.queryParams.subscribe(r=>{this.ID=r.ID}),null!=this.ID&&this.Load()}Load(){this.http.post("/api/ChannelLoader/GetTotalProduct",{ID:this.ID}).subscribe(i=>{this.data=i.Model,this.Name=this.data.Name},i=>{alert(i.error.Message)})}clear(){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.http.post("/api/Channel/ClearCacheChannel",{ID:this.ID}).subscribe(a=>{this.toastr.success("Successfully cleared cache","Success",{closeButton:!0,positionClass:"toast-bottom-right"}),this.Load()})}delete(e){confirm("Delete channel "+e.Name+" ?")&&this.http.post("/api/Channel/DeleteChannel",{ID:e.ID}).subscribe(s=>{this.toastr.success("Channel "+e.Name+" is deleted!","Success",{closeButton:!0,positionClass:"toast-bottom-right"}),this.router.navigate(["menu/channel"])})}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(f.gz),t.Y36(O.O),t.Y36(f.F0),t.Y36(R._W))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-marketplace-cache"]],decls:11,vars:10,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button",1,"btn","btn-danger","btn-lg","text-white","me-2",3,"click"],["role","button",1,"btn","btn-success","text-white","btn-lg","ms-2",3,"routerLink","queryParams"],[1,"container-fluid","py-5","bg-light-gray"],[1,"row"],[1,"col-sm-6"],["class","card",4,"ngIf"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-sm-12","mt-3"],[1,"info-label-group"],["data-toggle","title","matTooltip","Your shop name in marketplace channel"],["data-toggle","tooltip","matTooltip","total product in channel",1,"col-sm-6"],["data-toggle","tooltip","matTooltip","total product in marketplace live",1,"col-sm-6"],[1,"col-sm-12"],["data-toggle","title","matTooltip","total product not in pos"],["data-toggle","title","matTooltip","total duplicate code/sku"]],template:function(e,i){1&e&&(t.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),t.NdJ("click",function(){return i.clear()}),t._uU(3," Clear"),t.qZA(),t.TgZ(4,"a",2),t._uU(5," Back "),t.qZA()(),t.TgZ(6,"content")(7,"div",3)(8,"div",4)(9,"div",5),t.YNc(10,Oi,46,17,"div",6),t.qZA()()()()()),2&e&&(t.Q6J("headerTitle",i.Name)("pageData",i.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(4),t.Q6J("routerLink",t.DdM(7,Ri))("queryParams",t.VKq(8,Ei,i.ID)),t.xp6(6),t.Q6J("ngIf",i.data))},dependencies:[g.O5,u.p,f.yS,z.gM,g.JJ,g.uU]}),o})();var M=p(5412);function qi(o,n){1&o&&(t.TgZ(0,"p"),t._uU(1," URL is required "),t.qZA())}function Li(o,n){if(1&o&&(t.TgZ(0,"div",15),t.YNc(1,qi,2,0,"p",16),t.qZA()),2&o){t.oxw();const e=t.MAs(11);t.xp6(1),t.Q6J("ngIf",e.errors.required)}}function Ni(o,n){1&o&&(t.TgZ(0,"p"),t._uU(1," Email is required "),t.qZA())}function Fi(o,n){1&o&&(t.TgZ(0,"p"),t._uU(1," Email is not valid "),t.qZA())}function Ji(o,n){if(1&o&&(t.TgZ(0,"div",15),t.YNc(1,Ni,2,0,"p",16),t.YNc(2,Fi,2,0,"p",16),t.qZA()),2&o){t.oxw();const e=t.MAs(17);t.xp6(1),t.Q6J("ngIf",e.errors.required),t.xp6(1),t.Q6J("ngIf",e.errors.pattern)}}const Hi=function(o){return{invalid:o}},Yi=function(){return{updateOn:"blur"}};let Qi=(()=>{class o{constructor(e){this.dialogRef=e}ngOnInit(){this.data={}}submit(){this.dialogRef.close(this.data)}close(){this.dialogRef.close()}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(M.so))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-contact-support"]],decls:25,vars:10,consts:[["mat-dialog-title","",1,"pt-2","pb-3"],[1,"py-5","mt-4","mx-0"],["for","customerURL"],[1,"input-group","mb-5"],[1,"input-group-prepend"],["id","tokopediaUrl",1,"border-right-0","rounded-left","input-group-text","pointer-default","bg-light",3,"ngClass"],["required","","type","text","id","customerURL","name","customerURL","data-toggle","tooltip","title","customerURL",1,"form-control","border-left-0",3,"ngModel","ngModelChange"],["url","ngModel"],["class","text-danger",4,"ngIf"],["for","customerEmail"],["required","","type","text","id","customerEmail","name","customerEmail","data-toggle","tooltip","title","customerEmail","pattern","\\b[\\w\\.-]+@[\\w\\.-]+\\.\\w{2,4}\\b",1,"form-control",3,"ngModel","ngModelOptions","ngModelChange"],["email","ngModel"],[1,"justify-content-end","mx-4"],["mat-button","",1,"btn","btn-light","mx-3",3,"click"],["mat-button","",1,"btn","btn-success","mx-3",3,"disabled","click"],[1,"text-danger"],[4,"ngIf"]],template:function(e,i){if(1&e&&(t.TgZ(0,"h1",0),t._uU(1,"Fill data for Customer Support"),t.qZA(),t._UZ(2,"hr"),t.TgZ(3,"mat-dialog-content",1)(4,"label",2),t._uU(5,"Tokopedia URL"),t.qZA(),t.TgZ(6,"div",3)(7,"div",4)(8,"span",5),t._uU(9,"https://tokopedia.com/"),t.qZA()(),t.TgZ(10,"input",6,7),t.NdJ("ngModelChange",function(s){return i.data.URL=s}),t.qZA()(),t.YNc(12,Li,2,1,"div",8),t.TgZ(13,"label",9),t._uU(14,"Requester's Email"),t.qZA(),t.TgZ(15,"div",3)(16,"input",10,11),t.NdJ("ngModelChange",function(s){return i.data.Email=s}),t.qZA()(),t.YNc(18,Ji,3,2,"div",8),t.qZA(),t._UZ(19,"hr"),t.TgZ(20,"mat-dialog-actions",12)(21,"button",13),t.NdJ("click",function(){return i.close()}),t._uU(22,"Cancel"),t.qZA(),t.TgZ(23,"button",14),t.NdJ("click",function(){return i.submit()}),t._uU(24,"Submit"),t.qZA()()),2&e){const a=t.MAs(11),s=t.MAs(17);t.xp6(8),t.Q6J("ngClass",t.VKq(7,Hi,a.invalid&&(a.dirty||a.touched))),t.xp6(2),t.Q6J("ngModel",i.data.URL),t.xp6(2),t.Q6J("ngIf",a.invalid&&(a.dirty||a.touched)),t.xp6(4),t.Q6J("ngModel",i.data.Email)("ngModelOptions",t.DdM(9,Yi)),t.xp6(2),t.Q6J("ngIf",s.invalid&&(s.dirty||s.touched)),t.xp6(5),t.Q6J("disabled",a.invalid||s.invalid)}},dependencies:[g.mk,g.O5,h.Fj,h.JJ,h.Q7,h.c5,h.On,M.uh,M.xY,M.H8],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.input-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-radius:.25rem!important;border-color:#c8d3df}.input-group[_ngcontent-%COMP%] > input.ng-invalid.ng-touched[_ngcontent-%COMP%]{border-color:#fb404b}.invalid[_ngcontent-%COMP%]{border-color:#fb404b}.pointer-default[_ngcontent-%COMP%]{cursor:default}"]}),o})(),Gt=(()=>{class o{constructor(e,i){this.dialogRef=e,this.data=i}submit(){this.dialogRef.close(this.data)}close(){this.dialogRef.close()}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(M.so),t.Y36(M.WI))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-modal-dialog-tokopedia"]],decls:15,vars:2,consts:[["mat-dialog-title","",1,"pt-2","pb-3"],[1,"py-5","mt-4","mx-0"],[1,"form-label-group"],["type","text","id","shopid","placeholder","Shop ID","name","ShopID","data-toggle","tooltip","title","Channel Name",1,"form-control",3,"ngModel","ngModelChange"],["name","ngModel"],["for","shopid"],[1,"justify-content-end","mx-4"],["mat-button","",1,"btn","btn-light","mx-3",3,"click"],["mat-button","",1,"btn","btn-success","mx-3",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"h1",0),t._uU(1),t.qZA(),t._UZ(2,"hr"),t.TgZ(3,"mat-dialog-content",1)(4,"div",2)(5,"input",3,4),t.NdJ("ngModelChange",function(s){return i.data.ShopID=s}),t.qZA(),t.TgZ(7,"label",5),t._uU(8,"Shop ID"),t.qZA()()(),t._UZ(9,"hr"),t.TgZ(10,"mat-dialog-actions",6)(11,"button",7),t.NdJ("click",function(){return i.close()}),t._uU(12,"Cancel"),t.qZA(),t.TgZ(13,"button",8),t.NdJ("click",function(){return i.submit()}),t._uU(14,"Save"),t.qZA()()),2&e&&(t.xp6(1),t.Oqu(i.data.title),t.xp6(4),t.Q6J("ngModel",i.data.ShopID))},dependencies:[h.Fj,h.JJ,h.On,M.uh,M.xY,M.H8],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"]}),o})(),Bi=(()=>{class o{constructor(e,i){this.dialogRef=e,this.data=i}ngOnInit(){}submit(){this.data.TypeID=2,this.dialogRef.close(this.data)}close(){this.dialogRef.close()}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(M.so),t.Y36(M.WI))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-modal-dialog-woocommerce"]],decls:25,vars:3,consts:[["mat-dialog-title","",1,"pt-2","pb-3"],[1,"py-5","mt-4","mx-0"],[1,"form-label-group"],["type","text","id","shopid","placeholder","Shop ID","name","URL","data-toggle","tooltip","title","URL",1,"form-control",3,"ngModel","ngModelChange"],["name","ngModel"],["for","shopid"],["type","text","id","ConsumerKey","placeholder","Consumer Key","name","ConsumerKey","data-toggle","tooltip","title","ConsumerKey",1,"form-control",3,"ngModel","ngModelChange"],["for","ConsumerKey"],["type","text","id","ConsumerSecret","placeholder","Consumer Secret","name","ConsumerSecret","data-toggle","tooltip","title","ConsumerSecret",1,"form-control",3,"ngModel","ngModelChange"],["for","ConsumerSecret"],[1,"justify-content-end","mx-4"],["mat-button","",1,"btn","btn-light",3,"click"],["mat-button","",1,"btn","btn-success",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"h1",0),t._uU(1,"WooCommerce"),t.qZA(),t._UZ(2,"hr"),t.TgZ(3,"mat-dialog-content",1)(4,"div",2)(5,"input",3,4),t.NdJ("ngModelChange",function(s){return i.data.URL=s}),t.qZA(),t.TgZ(7,"label",5),t._uU(8,"URL"),t.qZA()(),t.TgZ(9,"div",2)(10,"input",6,4),t.NdJ("ngModelChange",function(s){return i.data.ConsumerKey=s}),t.qZA(),t.TgZ(12,"label",7),t._uU(13,"Consumer Key"),t.qZA()(),t.TgZ(14,"div",2)(15,"input",8,4),t.NdJ("ngModelChange",function(s){return i.data.ConsumerSecret=s}),t.qZA(),t.TgZ(17,"label",9),t._uU(18,"Consumer Secret"),t.qZA()()(),t._UZ(19,"hr"),t.TgZ(20,"mat-dialog-actions",10)(21,"button",11),t.NdJ("click",function(){return i.close()}),t._uU(22,"Cancel"),t.qZA(),t.TgZ(23,"button",12),t.NdJ("click",function(){return i.submit()}),t._uU(24,"Save"),t.qZA()()),2&e&&(t.xp6(5),t.Q6J("ngModel",i.data.URL),t.xp6(5),t.Q6J("ngModel",i.data.ConsumerKey),t.xp6(5),t.Q6J("ngModel",i.data.ConsumerSecret))},dependencies:[h.Fj,h.JJ,h.On,M.uh,M.xY,M.H8],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"]}),o})();var Kt=p(455);function zi(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"div",3)(1,"div",4)(2,"div",5)(3,"div",24)(4,"span"),t._uU(5,"BETA"),t.qZA()(),t.TgZ(6,"div",6),t._UZ(7,"img",25),t.qZA(),t.TgZ(8,"div",8)(9,"div",9)(10,"p"),t._uU(11,"Authorize DEALPOS to manage your KALCare Shop. You will need to fill your KALCare ShopID."),t.qZA(),t.TgZ(12,"p"),t._uU(13,"Please request your shopID by "),t.TgZ(14,"a",26),t._uU(15,"contacting"),t.qZA(),t._uU(16," the KALCare team"),t.qZA()(),t.TgZ(17,"button",27),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.openKalcareDialog())}),t._uU(18,"Submit Shop ID"),t.qZA()()()(),t.TgZ(19,"div",11)(20,"div",5)(21,"div",24)(22,"span"),t._uU(23,"BETA"),t.qZA()(),t.TgZ(24,"div",6),t._UZ(25,"img",28),t.qZA(),t.TgZ(26,"div",8)(27,"div",9)(28,"p"),t._uU(29,"Authorize DEALPOS versi V2 to manage your lazada, you will be redirected to lazada website to complete this process."),t.qZA(),t.TgZ(30,"p"),t._uU(31,"You will need to sign in to Lazada using your Seller account and confirm the authorization."),t.qZA()(),t.TgZ(32,"a",29),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.lazadaAuthorize())}),t._uU(33,"Authorize Account"),t.qZA()()()()()}}let Vi=(()=>{class o{constructor(e,i,a,s,r){this.route=e,this.http=i,this.service=a,this.dialog=s,this.toastr=r,this.NewFeatureVisible=!1}saveTokopedia(){let e={ShopID:Number(this.ShopID)};this.http.post("/api/ChannelAdd/Tokopedia",e).subscribe(i=>{this.service.navigate(["/menu/channel"])})}saveWooCommerce(e){this.http.post("/api/ChannelAdd/AddWooCommerce",e).subscribe(i=>{this.service.navigate(["/menu/channel"])})}saveKalCare(){this.http.post("/api/ChannelAdd/AddKalCare",{ShopIDString:this.ShopIDString}).subscribe(i=>{this.service.navigate(["/menu/channel"])})}shopeeAuthorize(){this.http.post("/api/ChannelAuthorization/ShopeeV2_URL").subscribe(e=>{window.location.href=e.Url})}tiktokAuthorize(){this.http.post("/api/ChannelAuthorization/Tiktok_URL").subscribe(e=>{window.location.href=e.Url})}lazadaAuthorize(){this.http.post("/api/ChannelAuthorization/Lazada_URL").subscribe(e=>{window.location.href=e.Url})}openTokopediaDialog(){this.dialog.open(Gt,{data:{title:"Tokopedia",ShopID:this.ShopID},width:"30%"}).afterClosed().subscribe(i=>{null!=i&&(this.ShopID=i.ShopID,this.saveTokopedia())})}openKalcareDialog(){this.dialog.open(Gt,{data:{title:"KAL Care",ShopID:this.ShopIDString},width:"30%"}).afterClosed().subscribe(i=>{null!=i&&(this.ShopIDString=i.ShopID,this.saveKalCare())})}openWooCommerceDialog(){this.dialog.open(Bi,{data:{ShopID:this.ShopID},width:"30%"}).afterClosed().subscribe(i=>{null!=i.URL&&null!=i.ConsumerSecret&&null!=i.ConsumerKey&&this.saveWooCommerce(i)})}contactSupport(){this.dialog.open(Qi,{width:"30%"}).afterClosed().subscribe(i=>{if(null!=i){if(null==i.Email)return void this.toastr.error("Email cannot be empty!","Error!");if(null==i.URL)return void this.toastr.error("Email cannot be empty!","URL!");this.http.post("Api/ChannelAuthorization/Tokopedia_Intercom",{URL:i.URL,Email:i.Email}).subscribe({next:()=>{this.toastr.success("Your request has been received, we will be in touch at "+i.Email,"Thank you!")},error:s=>{console.log("Failed to submit customer support!",s)}})}})}onToggleNewVersion(e){this.NewFeatureVisible=e}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(f.gz),t.Y36(O.O),t.Y36(f.F0),t.Y36(M.uw),t.Y36(R._W))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-marketplace-add"]],decls:65,vars:5,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/channel",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container"],[1,"row","mt-12"],[1,"col-md-4","ps-md-0"],[1,"card","h-100","ribbon-box"],[1,"card-header"],["src","https://res.cloudinary.com/pos/image/upload/v1605249851/icons/Marketplace%20logo/shopee-logo.png",1,"w-100"],[1,"card-body"],[1,"mt-4","mb-4","h-auto",2,"font-size","larger"],[1,"h4","btn-bottom","fw-bold","btn","btn-shopee","text-white","btn-md","btn-block",3,"click"],[1,"col-md-4","pe-md-0"],[1,"card","h-100"],["src","https://res.cloudinary.com/pos/image/upload/v1605249861/icons/Marketplace%20logo/download_tkpd.png",1,"w-100"],["type","button",1,"button","text-primary","fw-bold",3,"click"],["data-cy","submitChannelTokopedia",1,"h4","btn-bottom","fw-bold","btn","btn-success","text-white","btn-md","btn-block",3,"click"],["src","https://woocommerce.com/wp-content/themes/woo/images/logo-woocommerce.svg",1,"w-100"],["href","https://support.dealpos.com/en/articles/5733019-woocommerce-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"],[1,"h4","btn-bottom","fw-bold","btn","btn-woocommerce","text-white","btn-md","btn-block",3,"click"],["src","https://res.cloudinary.com/pos/image/upload/v1645761565/icons/Marketplace%20logo/tiktok-logo.png",1,"w-100"],[1,"h4","btn-bottom","fw-bold","btn","btn-tiktok","text-white","btn-md","btn-block",3,"click"],["class","row mt-12",4,"ngIf"],[1,"p-5","text-start"],[3,"change"],[1,"ribbon","ribbon-top-right"],["src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYwAAAB/CAMAAADLlgV7AAABIFBMVEX///8jHyCAvAAAZUgAAACdyUTD3YwAYEEAY0V6uQAAXT0AWzoAWDUVDxCAfn94uAC7urulpKUMAAQZFBUPBwnf6+ecu7Cjw7jf39/3+vmZmZnn8e4pdl5om4oGblIZblOpvrZNi3draWnc7LxOS0w7gmy/19AAYEhaj3zK3NbW5N+Twk272Immy32Ih4cydFwrdlGgzFE+hEZvnY30+em+2Z4ATiW4ycLI4ZzD27Pu9t2izUTn8tJ9qJrv7+8/PD3U09NZV1gtKSqPxCTP5ar3+vDCwcG42X+kzl3R48TW6bWw1HLk7uLE35aRunidvrMxe00ufDoBakBjYWF/sISWvKdsp0Glz1et0nVvqFFWlzQAUTV8rmlbmUeLr6IARhVkELW6AAAVU0lEQVR4nO1dj3/aOJYnONTGdkqbBKgLhFIKDTTT2QxsyCaQpCFp2GTa7O7cXTs3N8z//1+cnmRLT7L8C5rZ9M7f3c802PKz/L7S+yUZCoUcOXLk+C7RGPUkLP/dHfp/DK9tWxLcVvqLL14GeB46d/b8JcKz1IK8NPd9HuBF+s5+B5i4hgI3jTooLja3d31svlfOnW1s7gpsb8Zq7Zlou3l+lnjfZ5vbPjbj5X5vqNshMqppr322uRFg54N8yjvf2UDYfhonx8Ntt1Vaw3i6xVtvJky57wvfiow38qkPu5iLrQ+xs+35Jm58mTg1EBnbYfuYBt71eNq9vb3qjq9T24E/AQ9DxlNJvTsJpueNNIuSB/t6ZIyvvh4WyxWCMvlvcb44mF5nFvIweBAyXspcXMYb9hdS65DFC2MNMqYHc8JBEYNQUrwZZxPzQHgIMp4r2r2IF/NSMmnEqCU55VXJuL4qVWQiAlT+z5LxTOZiO8nsbCjYfZlwwYpkXM0rWibI5Fikl/KQ+PZkXChcJKn2o9weXEyCU12JjGkpigoyMa7SSnlYBGS8/cdf3n4TMl5I3jghqAW8li8g2PwYf8UqZBzo7ZOPR+LBfTLe/vTuB5+N9cg4u5R0u/s6SYinTgziNBIuyk7GOGZaPB4r5ZPx9qfSuycHjI21yFCSva03iUnD8+0QGUmpRmYyToqx8+KxWClGBuHi9N2Bz8ZaZHzYwkpNCmoB5yErRexUvIqzkjENzwWIquZz9u+jsVKUDMJFqUTIYGysQ8ZrZZhfJMpASYZgJSHVyEjGWGWiSPK88Xh8fT0ed58s5pXHYqWADMoFJYOysQYZ72X7v5vgiOklu4KBc3Fl7IzKSMZcpmJ+LCcV19Npsow/B3WbccHIADZWJ0NJ9hKMDYNI+LYvRPa3G1stzEbGoizNiqvHVIxSUP+NceGTQdhYmQw12Usuv0pJxiU2WbGpRiYyrnAcVT48Sftw/w7U/1mSyHhy8K8VyVCSveSgFvALdxRbTwueqBjGphpZyLiW5kU27zCeTo+PP93dHF9Np8kkjrufbu4+6YRcHR/fagQ0air+o6SQ8eTgP9U2k4jb46nw5kKOihKq5j7OhITdC1ylik01spDxpbwaF9fdmxIUERnI7JofHnSRsxkf+ih16eeTBTSuHMpSTg6IkAoVUZwfyHwMLceW8FswLxAZZG4orZyeXrHPwvkanykpFuwKUpJxWZDrtzHXZyBjioxUuZTaXUxBtaF4uFy8ES2C85Vb+HjDPpaPsZRuqSj7qzscQ/dMuQzl+26Kv//tCWcjqIwEcGraLseRkW459FJMDPAw2E7FaDkDGSWsjbT+olsKM1FUdN0NWlRILHYd3KbcFVJODsN04i7sWdFcFArRbJj6TQrRZGxepHrqC9lKYTsVl2qkJ+MET4ywPddifBhZOqmIIPiWk0H0O+dqF8o+1hMqGshkKFzEsJGVjLQr0++FVs/pAcROzFaD9GTg8uA8XZ+u4konwmlwyRU8/cQ9FlFSuKWSyAhxEc1GRjI2k6rmAdDEYHEwKm3FpBrpyUBKKN+m6tJNXEWxJNrdBcouo0vKX4LTYRMVNOFuB5OBuDj9e9Aggo1sZCRXzX18VK0UTsg3okOA1GR0sUpSdSlyQFNF3omGJT4ZkCnkPgVzQUMpgUowNRAZmnkB+NsNpwOxkYmMrcQ17AAfRDR87h/Cdioy1UhNBrJS5YM0PZKz9UqxdHiKD6BYiddYDkuoge9T7tB9i3d/vbpCcQQvEQsy3v50Gp4XADE3nvxlJTIS1+k4zkJWCuyUEBSZaqQmYx7WUywOsI2qfGXO9lAcEd73Wi54BWANbpEYX/W3oiOBnRJk/OMdh8QFYeMHjn+tQsZ2iuogA0oyAisl+fStKDuVlozrjFaqKyUlvrO+RjKE/z4J8QCbf4rKFeU5v0JMlsDxIDP1mU+Av0oj+ed3pwH+6+0qZGylKUlRiCSDZnwMyE5FKjotGVNExmlyf7DaK9w9IJeA0mt1iaRSuu2ejJnqhd7nIsk75geDnmCfoWfj51JgvhAX2XxG2rj2QmOlZDv1JuLKtGTcItN9F9POx522udAiliGFBmQGoGTuRJya6oRryDAsHRt6LjJGU0n7CXxglV6Iw8hORaWOack4RtpNDmzRPCqjGPZGkIFWZ6X9DZUbLEcEveiwMGu8QCblGRo2fj7UcpE5z7hIfHIyBdDWtUt0HE2YKIuXloyvSL3dmHYMKJIqo4qgCJbKaPhL9UeJC+SoRPsr1DocTWn9RhQXmTPw+IU6/2K0Qnv+QgALjdiYkJaMuyxkIOuCQ1i9/0YUSalgAU9H6mK8k+7xXRFFBjwkU8hQ2CC+W89FZjJ2NpLZ+IBL7psI+LDe4KUl40sWMrDhQYenWv89RpGtsjVURML0JN1fjQ6UuRSVDIkNxMWvStXWHGn7H10o3Enc1/9Cs0MnLEafaqQl4zALGUK9Uh0c+W9kjVAwJRspOZzWQOQqM0dmw8J+A3Mhv1lmOQNt/yUylLWlpA1T6m5nPba1UtKSscjgwJF6K3jVQfgdvLsKBVPKxOjG1bZIa0G01zJUcDZ+4Bn5r20FzYilPunNJWWlbzdhpe9yIw30G3VX8RlJ1RAUeUk+AE0Y5L9RiKWs7X2KnRny4lNVxfKzQsbpfw89BVEPgMl4HdrwHLsGfpHGSkGqobt5WjKwGyjFtAMcaiPYwlgM9LnWf1cU+xe3p7c8T6jJ1J3PEhmnv/620oaE16GdOrHF26fSzsNoaKPkFZK+xF2DYgZUsMbQhEEL6KgyVVHkRJZ9y+V54i7SuuNbqh8Cf7HaVh2YB/ILSxuhN2AFzjR7OrXY0jG6SjkkwWmgXYeSExCxEc6/UWVKLbPgmFfwUCmWblJUKmF752dOxunvq+4opEbpqWx8oheZnqWzUhv6VCN11RZrJN5OYf+NDuvWKgrYf4fWctVq7nxeWtx9SrHTB0A3Pn/2yQAu1iGj8Ea2PpGqepN2ZmgrXanJkPLkWCOBJhEmA4UA2Hod6B0MQJCxuB4DsmyqZq8EfKZkUC7WIsO7VGIqfdHwBeZsJwx89pfw5YiM3VgyJKcRuzlET8ZJWX+5domD4Qs/pYRZaeC/LPOZkMG4WIuMwpkysLe0OTROMnbevA7hHEnQbExAZOy8eaEC2TVcy5DDIRVd7RTAq6f4ahTvqoJE0Jt6Z5BA8BrZ55vS7+u8uRQEshdqVn6huRAlGdo6Oc4mNakGDsV2tpRZtYXfCbmRKhHz6DQcl2y5G5AW/krC3iD/Hdpy8kmbsacEf8Hyf35f652+15qD9ITmfZmPyH1rjf4ZZus8dDo+LsZhw1jOh8t3ckgzvg0ULy0W+Wo/lowcimynMQqfhpdcxbmkgOpbve0qUjz1LfDwLo/XSJmbSQUPTaoRT4ZUeFdysHK59ARW5E5OTqbHd4dFvjcWv1BTLoGBGX+VLsWR7XG0/5YsY/krMm0nV6VK0ja6b0+G8l0V4TIV9isRGwexsQunGhnICIWasOeDghVTufHB7crFxWKh7GXDc0AkdpXwWL8rS4KOpwTdTwvYdpu4p/EByCj8IhcB1TIVTjIi3tiX3tPcUUsiWchQ3yFTwFep1Snk/yuW7Z4ImagYEu76VLKMJN+j/2fbopPWfh+CDOWVV/VVDZxk6K2UtJktnGpkIUNKwzUIDMmJrln54IqTIQwS4le3ZTRmH1xSgewhyFBfBpeLhjjJiNzejJc7Qo0ykUF8c1ztTrOXRpwsieAIFQSR/9YN9Zi5mLTd90HICBVl8StlsYOeAy8EqqnG+9i1kNDK+fg05osqeDIQ1mGZTBuxvxktaAsyjgsahN905khQ6MOQEfpCEBFvenglYzOyPI/f1Ve/2UX3Hn8MGST8ifgyHWnAq8tCdP+Njgwxh9T6uY/IuahxMRLqzupkII2H6uVKgLux/SJ8kbbW4UP6CpJL+dzZZlxpS7cgNV3o6SijlTf5Vcxi5QtYsIWGDOS/IwpP2lc8ypW5diIhDNUvjLSshCuQUp6e+5sIti4v1JPPtzYlBA2e4YMx+xbe43bKBPp4vhkN/WaI8Sf1W7+gsH0nFdZP5gFl5BRz2IeVADyIHRf5sWiz0y1Jd6NfMJa8W6hQcx0M19avdz8ynIVKUgGiV3vHx4u5r0jiS0s3V+EkobugDYqLgKRp18ctnwTXXY64jPrkeBGwViT3SlmoavQlPOJ31v8UXJ98w1fFIdV/LF9MkiNHjhw5cuTIkSNHjhw5cuTIkSNHjhw5cuTIkSNHjhw5cuTIkSNHjhw5cuTIkSNHjhw5cuTIkSNHjhw5cuTIkSNHjhw5cnzXQF89H/st9CkleZklectabXkfPt6vkeOxQrzGcJ3++kK8xlmkFK+2JP9Ld49hfe0v+qjSX9RowJ990zAs/W/IpMIrcr35ikqyiaROyssaR7bttMPHW65tHzUiL6vOmo7ruuZshZ5yeJP9PSLEaS4jzhuO7RjRnUBYuo67hvIYWrZlsd/7bpmW5a7B7iuHSHoFf/XJX2ZqMlzCXJN/9IJHbxFu3Sg9eCPHpsPIqa/cX0JozzWpFFv/0zkFb88yrHYcGby7RJBlrTtPhzCKeyC2bRmpNajDKyIpIMNILwqTMbwfNXv+8TgyGm34zjLTcVxnuHqHq3tgCxzTdFyNmQTEk+ENaq29YDb0HMtuRjRMjw7pETwS2Ba3v4ag9ck4O7JNfl0MGV4btGi1JoNBSoOuRYt02OxNhsPBfsQXnsWTMSHd5XOq0eq1UtmzWIDmbGJ5Rya2FitgfTI8+HPfPx5Dxghms7HOwKE3Bk0340OEeDKcyN8GWxVej9zwR89rWobj/7hS4340Gi25AbgnqHtgqGezGXUvjRo5QpQ+GqFniSLjbDIbje75E3nVSW02W/aDA5yM4f0SlPxj/b4Gt6ZknBXIxTPFkcEVhomdhVftg8wJl0n6RzranwXMDpdEjPJdWlVTo0v50QUZXt1XQoPoYAZWrX8/gvnZI3dq+Eq6D25QrREptSqXSXszXKJjUYCvKXQGQzIx2kxYzSB21LTdjv9sJoQUHlgRYl6pjodHtmM2SLxjJZNRa7vE+DimH7D0m45DPtuONROqpWTUXfrllZZtuzAogAxn0HGhJ3LIVLMNeRL3m3Ygk/VnAJGY13LNI6abDj3tNiVWq/RrAGWfszTZo+97ChmNPaKEPfLXkIhygGMi3e/uEYi1HFAJu2pmUSm2P1SHpHdHgxHtg5kwn2FO2Mt723CYGxu5pAcO2FN/gtIeeUxtJh1r8M2GFphcQyHDfkUCd4mMkUOkm+CPGBsD8sEB6YYfCQoyjuiXV1que1T3ySACabjjSr+HBl7OrqEDQ9eXaTlM5tCCX3qEm7JPJnH2JPoyZdWDHMuoo0fYh47DmLCZ+UJkNMGmNXzRoIR9NnZM0t1Bwf8NRHYRkwJjqUMPVOFcm9BDny7BsRDrYHU6lrVH21FL2BvWqHeLIgPkkid0HYUM68ceQdPiZNSINKvemIFJYFO0t38/6S/p94QOJDLOhgNo3KsOh15AhtkZIWE+4NlsPMI8kDlhMvsBGdA/549CECZWB001WhxaFvDX40zX6SAaQp/tVhIZ1SpV0b7fXUEGXG62hjMwFDNOhmW2WtBEGkUaNNos2GZDFx7eafg2e6gng6WK5miATSCQYbBfWTQC/YFoiA4KPSuQz0YGfJ8uO4CjKdWBw++YDqg03F/qMiSLg2TOOBlEof2qrxxI3EDVljQ1+gYdrE7HfwwDWCYPug+3biSQoThwToZnUB9MH9miCSMlw75n9jUxsJkxY00fCQY9vYBGWbUYMhyFYx0Z1B/Bo5KpYQZqLjSGg6XJ+VLIwKGtA+P8RyLOxb6XkqHmF4HMfU6GT34hyJ8gVnPk33+s7jtsjlNpA9u/HrRMW65CRh+0BENiGeQKlAzTY7q1eoV4sFk943egjzHkqteTEYoKmZnqEPS4ZQHzZNTq9ToZbFaPXTDp7NnUabB+xZIxCMjAU5COetkR1gOZggzLYKdYvEy6QCeOaiQGPZg3Jg1dXgXDDx6dTrFVyAAOaF2AaxLIsIy0ZBQ6lj8KUY+o6jvRZIiBjsggDryAoymI/gziXGEAMvYaHce0bOaqM5CBJwKd9XiIN3pcJiLDf2r6NcqWw4IGO1yEqkMXaeyyDB6AP+gqZMyCflMtzLKTsR8I8PlMRYYaoutC2336pP73FwMZXo9EC0atUbVWJ2NkykMhkDkEgxQiY+CyygnFkcZ9vvKdk0JG65GQQXOCAb8V+DWjynSVkQw6MyYDhqEvHuZgw1ydDJBhWMJwgWMCs9XQksGG0NDvgyawrAYTituVQfCHQkY7rZkCb826VVuLDD5kqdqobiHYAodJ6clGBo0SceBDRzU85hpk0NFh9jwkk4blejIKphFf5xmYAQdBzRS8C7XaKAOHINOuYiUwMoJCoezAQTcwRWj0vjoZhZ5fOOz5IS5Ljoh4b9/MTEaVagJ535EfMPd1ZNA6h+H3I4aMCbU87fthdTjwZQLjAyma4k89srW+gmhrMmx41QmMNZby7Pl36vnKw7UpmmnOCl5H2Mg+jRgaChmQ1ljtKqWPuck1yAAbaxkzWsxlj1CjN223TSszGYUlldaZzVpNGq3BaLL2ljMY3NaeQgYdfpbR7jXiySjMqFO2yYwAa1V3kcxOiAwPVj7MZms56rSxmIZBwoq2AWf9esuEPToMR1ZUR2TMQkooNGhIaLSbEhmsO+1Z0wwqB2uQUai5cD9yves7yQZdx7FMEzjvZCPDa1Fppm0yu+JBKGnZtrMHk0AhgzwHvVM7iQzCMVsVoubTa9pcJhuLEhmFoQ3noQtSWYV6dhrU89rXjD86O4LIqFpMCVbT4tHDiM5kNqYEGVSKRaWwwZyRjJ7rukc8ch804Wcc3D1eFx3skQNue1A7cl32sPA5RAY5e8TIIH+5wU0nTfajEC6rthB24Ich6hPS5g9Kxh+k8Z7f+N6CszRv3Sd/0T61yfk/1ByvOtpzoSlt0YC2rjVZEpkW75/wE42RQ/vgHmFr1acSHNccCeF99uhtnzTPIvdmyXBhYFChQglU7XCMlgdsWL5t4Ed2m75Gq/QckEH+dROXKaoAlMM1+vW69PgD+tmDZrST8OMOoRyYC6HtRNwC0uq8ZF5okA+ekFUYEgivMiSSq8Ef9CK1c1zOoN8feEKm2j+pYDKALgwUKd4guBlShfToVdw3RQlcAps5+DCVIhoF5xS95MiRI8ejxf8CaCHBz1xZMMgAAAAASUVORK5CYII=",1,"w-100"],["href","https://www.kalcare.com/kania",1,"button","text-primary","fw-bold"],[1,"h4","btn-bottom","fw-bold","btn","btn-kalcare","text-white","btn-md","btn-block",3,"click"],["src","https://res.cloudinary.com/pos/image/upload/v1641528116/icons/Marketplace%20logo/lazada.png",1,"w-100"],[1,"h4","btn-bottom","fw-bold","btn","btn-primary","text-white","btn-md","btn-block",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),t._uU(3,"Cancel"),t.qZA()(),t.TgZ(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6),t._UZ(10,"img",7),t.qZA(),t.TgZ(11,"div",8)(12,"div",9)(13,"p"),t._uU(14,"Authorize DEALPOS versi V2 to manage your shopee, you will be redirected to shopee website to complete this process."),t.qZA(),t.TgZ(15,"p"),t._uU(16,"You will need to sign in to Shopee using your Seller account and confirm the authorization."),t.qZA()(),t.TgZ(17,"a",10),t.NdJ("click",function(){return i.shopeeAuthorize()}),t._uU(18,"Authorize Account"),t.qZA()()()(),t.TgZ(19,"div",11)(20,"div",12)(21,"div",6),t._UZ(22,"img",13),t.qZA(),t.TgZ(23,"div",8)(24,"div",9)(25,"p"),t._uU(26,"Authorize DEALPOS to manage your tokopedia, please "),t.TgZ(27,"a",14),t.NdJ("click",function(){return i.contactSupport()}),t._uU(28,"contact our customer support"),t.qZA(),t._uU(29," to complete this process."),t.qZA(),t.TgZ(30,"p"),t._uU(31,"Our team will send an invitation email which needs to be approved."),t.qZA()(),t.TgZ(32,"button",15),t.NdJ("click",function(){return i.openTokopediaDialog()}),t._uU(33,"Submit Shop ID"),t.qZA()()()(),t.TgZ(34,"div",11)(35,"div",12)(36,"div",6),t._UZ(37,"img",16),t.qZA(),t.TgZ(38,"div",8)(39,"div",9)(40,"p"),t._uU(41,"Authorize DEALPOS to manage your Personal Website"),t.qZA(),t.TgZ(42,"p"),t._uU(43,"Configure woocommerce integration by visiting "),t.TgZ(44,"a",17),t._uU(45,"this article"),t.qZA()()(),t.TgZ(46,"button",18),t.NdJ("click",function(){return i.openWooCommerceDialog()}),t._uU(47,"Register"),t.qZA()()()()(),t.TgZ(48,"div",3)(49,"div",4)(50,"div",12)(51,"div",6),t._UZ(52,"img",19),t.qZA(),t.TgZ(53,"div",8)(54,"div",9)(55,"p"),t._uU(56,"Authorize DEALPOS to manage your Tiktok Seller, you will be redirected to Tiktok website to complete this process."),t.qZA(),t.TgZ(57,"p"),t._uU(58,"You will need to sign in to Tiktok using your Seller account and confirm the authorization."),t.qZA()(),t.TgZ(59,"a",20),t.NdJ("click",function(){return i.tiktokAuthorize()}),t._uU(60,"Authorize Account"),t.qZA()()()()(),t.YNc(61,zi,34,0,"div",21),t.qZA(),t.TgZ(62,"div",22)(63,"mat-slide-toggle",23),t.NdJ("change",function(s){return i.onToggleNewVersion(s.checked)}),t._uU(64,"Show Beta Channel Integration "),t.qZA()()()()),2&e&&(t.Q6J("headerTitle","Add New Channel")("pageData",i.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(61),t.Q6J("ngIf",i.NewFeatureVisible))},dependencies:[g.O5,u.p,f.yS,Kt.Rr],styles:['.bg-shopee[_ngcontent-%COMP%], .btn-shopee[_ngcontent-%COMP%]{background:linear-gradient(-180deg,#f53d2d,#f63)!important}.bg-tiktok[_ngcontent-%COMP%], .btn-tiktok[_ngcontent-%COMP%]{background:linear-gradient(-173deg,#ee1d52,#69c9d0)!important}.bg-woocommerce[_ngcontent-%COMP%], .btn-woocommerce[_ngcontent-%COMP%]{background:#8053b4!important}.bg-kalcare[_ngcontent-%COMP%], .btn-kalcare[_ngcontent-%COMP%]{background:#016648!important}.pointer-help[_ngcontent-%COMP%]{cursor:help}.btn-bottom[_ngcontent-%COMP%]{position:absolute;bottom:.5rem;left:.5rem;width:96%}.ribbon-box[_ngcontent-%COMP%]{position:relative}.ribbon[_ngcontent-%COMP%]{width:150px;height:150px;overflow:hidden;position:absolute}.ribbon[_ngcontent-%COMP%]:before, .ribbon[_ngcontent-%COMP%]:after{position:absolute;z-index:1;content:"";display:block;border:5px solid #78c424}.ribbon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:absolute;display:block;width:225px;padding:15px 0;background-color:#78c424;box-shadow:0 5px 10px #0000001a;color:#fff;font:700 18px/1 Lato,sans-serif;text-shadow:0 1px 1px rgba(0,0,0,.2);text-transform:uppercase;text-align:center}.ribbon-top-right[_ngcontent-%COMP%]{top:-10px;right:-10px}.ribbon-top-right[_ngcontent-%COMP%]:before, .ribbon-top-right[_ngcontent-%COMP%]:after{border-top-color:transparent;border-right-color:transparent}.ribbon-top-right[_ngcontent-%COMP%]:before{top:0;left:0}.ribbon-top-right[_ngcontent-%COMP%]:after{bottom:0;right:0}.ribbon-top-right[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{left:-25px;top:30px;transform:rotate(45deg)}']}),o})();function Gi(o,n){1&o&&(t.TgZ(0,"div",18)(1,"label"),t._uU(2,"Order Payment Type"),t.qZA(),t.TgZ(3,"div")(4,"span"),t._uU(5,"Full Amount"),t.qZA()()())}function Ki(o,n){1&o&&(t.TgZ(0,"div",18)(1,"label"),t._uU(2,"Order Payment Type"),t.qZA(),t.TgZ(3,"div")(4,"span"),t._uU(5," Escrow Amount"),t.qZA()()())}const Wi=function(){return["/menu/channel/pos/edit"]};let ji=(()=>{class o{constructor(e,i,a){this.http=e,this._router=i,this.toastr=a,this.form=new lt,this.pageData={Title:"POS",Nav:[{Title:"Channel",Url:"/menu/channel",Active:!1},{Title:"POS",Url:"/menu/channel/config",Active:!0}]},this.LoaderChannel()}ngOnInit(){}LoaderChannel(){this.http.post("/api/ChannelLoader/GetConfig",{}).subscribe(e=>{this.form=e.Form,this.ListOutlet=e.Options?e.Options.ListOutlet:[]})}SubmitHost(){this.http.post("/api/Channel/SubmitConfig",this.form).subscribe(e=>{this._router.navigate(["menu/channel"])})}Refresh(){this.http.post("/api/POSAccount/Remove",this.form).subscribe(e=>{this.toastr.success("Token has been refreshed!","Success",{closeButton:!0,positionClass:"toast-bottom-right"})})}test(){this.http.post("/api/POSAccount/Test",this.form).subscribe(e=>{this.toastr.success("Test was successful!","Success",{closeButton:!0,positionClass:"toast-bottom-right"})})}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(O.O),t.Y36(f.F0),t.Y36(R._W))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-pos"]],decls:44,vars:12,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button",1,"btn","btn-outline-success","btn-lg","text-success","me-2",3,"click"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"routerLink"],[1,"fas","fa-edit",2,"font-size","20px"],[1,"container-fluid","mt-3"],[1,"row","mt-5"],[1,"col-md-6"],[1,"card"],[1,"card-header"],[1,"card-body","mt-8"],[1,"form-label-group"],["type","text","id","Host","name","Host","data-toggle","tooltip","title","Host","readonly","",1,"form-control",3,"ngModel","ngModelChange"],["for","Host"],["type","text","id","Username","name","Username","data-toggle","tooltip","title","Username","readonly","",1,"form-control",3,"ngModel","ngModelChange"],["for","Username"],["type","text","id","ClientSecretGuid","name","ClientSecretGuid","data-toggle","tooltip","title","ClientSecretGuid","readonly","",1,"form-control",3,"ngModel","ngModelChange"],["for","ClientSecretGuid"],["class","info-label-group",4,"ngIf"],[1,"info-label-group"]],template:function(e,i){1&e&&(t.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),t.NdJ("click",function(){return i.Refresh()}),t._uU(3,"Refresh Token"),t.qZA(),t.TgZ(4,"a",1),t.NdJ("click",function(){return i.test()}),t._uU(5,"Validate Client Secret Guid"),t.qZA(),t.TgZ(6,"a",2),t._UZ(7,"i",3),t._uU(8," Edit"),t.qZA()(),t.TgZ(9,"content")(10,"div",4)(11,"div",5)(12,"div",6)(13,"div",7)(14,"div",8)(15,"h4"),t._uU(16,"Credentials"),t.qZA()(),t.TgZ(17,"div",9)(18,"div",10)(19,"input",11),t.NdJ("ngModelChange",function(s){return i.form.Host=s}),t.qZA(),t.TgZ(20,"label",12),t._uU(21,"Host"),t.qZA()(),t.TgZ(22,"div",10)(23,"input",13),t.NdJ("ngModelChange",function(s){return i.form.Username=s}),t.qZA(),t.TgZ(24,"label",14),t._uU(25,"Username"),t.qZA()(),t.TgZ(26,"div",10)(27,"input",15),t.NdJ("ngModelChange",function(s){return i.form.ClientSecretGuid=s}),t.qZA(),t.TgZ(28,"label",16),t._uU(29,"ClientSecretGuid"),t.qZA()()()()(),t.TgZ(30,"div",6)(31,"div",7)(32,"div",8)(33,"h4"),t._uU(34,"Configuration"),t.qZA()(),t.TgZ(35,"div",9),t.YNc(36,Gi,6,0,"div",17),t.YNc(37,Ki,6,0,"div",17),t.TgZ(38,"div",18)(39,"label"),t._uU(40,"Composite Inventory"),t.qZA(),t.TgZ(41,"div")(42,"span"),t._uU(43),t.qZA()()()()()()()()()()),2&e&&(t.Q6J("headerTitle","POS")("pageData",i.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(6),t.Q6J("routerLink",t.DdM(11,Wi)),t.xp6(13),t.Q6J("ngModel",i.form.Host),t.xp6(4),t.Q6J("ngModel",i.form.Username),t.xp6(4),t.Q6J("ngModel",i.form.ClientSecretGuid),t.xp6(9),t.Q6J("ngIf",1==i.form.OrderPaymentAmountType),t.xp6(1),t.Q6J("ngIf",0==i.form.OrderPaymentAmountType),t.xp6(6),t.hij(" ",i.form.CompositeVisible,""))},dependencies:[g.O5,h.Fj,h.JJ,h.On,u.p,f.yS]}),o})();var Xi=p(4810);function $i(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"div",16)(1,"label",17),t._uU(2,"Include Parent"),t.qZA(),t.TgZ(3,"div",18)(4,"mat-radio-group",19),t.NdJ("ngModelChange",function(a){t.CHM(e);const s=t.oxw();return t.KtG(s.form.IncludeParentInventory=a)}),t.TgZ(5,"mat-radio-button",25),t._uU(6," No "),t.qZA(),t.TgZ(7,"mat-radio-button",26),t._uU(8," Yes "),t.qZA()()()()}if(2&o){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.form.IncludeParentInventory),t.xp6(1),t.Q6J("value",!1),t.xp6(2),t.Q6J("value",!0)}}function tn(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"div",16)(1,"label",17),t._uU(2,"Include Child"),t.qZA(),t.TgZ(3,"div",18)(4,"mat-radio-group",19),t.NdJ("ngModelChange",function(a){t.CHM(e);const s=t.oxw();return t.KtG(s.form.IncludeChildrenInventory=a)}),t.TgZ(5,"mat-radio-button",27),t._uU(6," No "),t.qZA(),t.TgZ(7,"mat-radio-button",28),t._uU(8," Yes "),t.qZA()()()()}if(2&o){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.form.IncludeChildrenInventory),t.xp6(1),t.Q6J("value",!1),t.xp6(2),t.Q6J("value",!0)}}const nn=[{path:"",component:Z,children:[{path:"",redirectTo:"marketplace",pathMatch:"full"},{path:"marketplace",component:Le,canActivate:[E.a],data:{title:"List"}},{path:"marketplace/form",component:mi,canActivate:[E.a],data:{title:"Add new Channel"}},{path:"marketplace/view",component:Ai,canActivate:[E.a],data:{title:"Marketplace View"}},{path:"marketplace/cache",component:Ui,canActivate:[E.a],data:{title:"Marketplace Cache"}},{path:"marketplace/add",component:Vi,canActivate:[E.a],data:{title:"Marketplace Add"}},{path:"pos",component:ji,canActivate:[E.a],data:{title:"POS"}},{path:"pos/edit",component:(()=>{class o{constructor(e,i,a,s){this.http=e,this._router=i,this.toastr=a,this.checkBrowser=s,this.pass=!1,this.form=new lt,this.passwordType="password",this.passwordIcon="eye-off",this.pageData={Title:"POS",Nav:[{Title:"Channel",Url:"/menu/channel",Active:!1},{Title:"POS",Url:"/menu/channel/config",Active:!0}]},this.LoaderChannel()}ngOnInit(){this.browser=this.checkBrowser.getBrowserName()}hideShowPassword(){this.passwordType="text"===this.passwordType?"password":"text",this.passwordIcon="eye-off"===this.passwordIcon?"eye":"eye-off"}LoaderChannel(){this.http.post("/api/ChannelLoader/GetConfig",{}).subscribe(e=>{this.form=e.Form,this.ListOutlet=e.Options.ListOutlet})}SubmitHost(){this.http.post("/api/Channel/SubmitConfig",this.form).subscribe(e=>{this.toastr.success("Successfully Edited POS Config!","Success!"),this._router.navigate(["menu/channel"])})}Refresh(){this.http.post("/api/POSAccount/Remove",this.form).subscribe(e=>{this.toastr.success("sucess","Success",{closeButton:!0,positionClass:"toast-bottom-right"})})}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(O.O),t.Y36(f.F0),t.Y36(R._W),t.Y36(Xi.T))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-edit"]],decls:53,vars:15,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/channel",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"click"],[1,"container-fluid","mt-3"],[1,"row","mt-5"],[1,"col-md-6"],[1,"card"],[1,"card-header"],[1,"card-body","mt-8"],[1,"form-label-group"],["type","text","id","Host","name","Host","data-toggle","tooltip","title","Host",1,"form-control",3,"ngModel","ngModelChange"],["for","Host"],["type","text","id","Username","name","Username","data-toggle","tooltip","title","Username",1,"form-control",3,"ngModel","ngModelChange"],["for","Username"],["type","text","id","ClientSecretGuid","name","ClientSecretGuid","data-toggle","tooltip","title","ClientSecretGuid",1,"form-control",3,"ngModel","ngModelChange"],["for","ClientSecretGuid"],[1,"form-label-group","radio"],["for","OrderPaymentAmountType"],[1,"mt-3"],[3,"ngModel","ngModelChange"],["data-toggle","tooltip","title","Received Amount is cut by administration cost or tax",1,"me-5",3,"value"],["data-toggle","tootip","title","Received full amount from transaction payment",1,"me-5",3,"value"],["data-toggle","tooltip","title","No support composite and trigger component",1,"me-5",3,"value"],["data-toggle","tootip","title","Support composite and trigger component",1,"me-5",3,"value"],["class","form-label-group radio",4,"ngIf"],["data-toggle","tooltip","title","No include variant parent component",1,"me-5",3,"value"],["data-toggle","tootip","title","include variant parent component",1,"me-5",3,"value"],["data-toggle","tooltip","title","No Include variant child component",1,"me-5",3,"value"],["data-toggle","tootip","title","Include Include variant child component",1,"me-5",3,"value"]],template:function(e,i){1&e&&(t.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),t._uU(3,"Cancel"),t.qZA(),t.TgZ(4,"a",2),t.NdJ("click",function(){return i.SubmitHost()}),t._uU(5,"Save"),t.qZA()(),t.TgZ(6,"content")(7,"div",3)(8,"div",4)(9,"div",5)(10,"div",6)(11,"div",7)(12,"h4"),t._uU(13,"Credentials"),t.qZA()(),t.TgZ(14,"div",8)(15,"div",9)(16,"input",10),t.NdJ("ngModelChange",function(s){return i.form.Host=s}),t.qZA(),t.TgZ(17,"label",11),t._uU(18,"Host"),t.qZA()(),t.TgZ(19,"div",9)(20,"input",12),t.NdJ("ngModelChange",function(s){return i.form.Username=s}),t.qZA(),t.TgZ(21,"label",13),t._uU(22,"Username"),t.qZA()(),t.TgZ(23,"div",9)(24,"input",14),t.NdJ("ngModelChange",function(s){return i.form.ClientSecretGuid=s}),t.qZA(),t.TgZ(25,"label",15),t._uU(26,"ClientSecretGuid"),t.qZA()()()()(),t.TgZ(27,"div",5)(28,"div",6)(29,"div",7)(30,"h4"),t._uU(31,"Configuration"),t.qZA()(),t.TgZ(32,"div",8)(33,"div",16)(34,"label",17),t._uU(35,"Order Payment Type"),t.qZA(),t.TgZ(36,"div",18)(37,"mat-radio-group",19),t.NdJ("ngModelChange",function(s){return i.form.OrderPaymentAmountType=s}),t.TgZ(38,"mat-radio-button",20),t._uU(39," Escrow Amount "),t.qZA(),t.TgZ(40,"mat-radio-button",21),t._uU(41," Full Amount "),t.qZA()()()(),t.TgZ(42,"div",16)(43,"label",17),t._uU(44,"Composite Inventory"),t.qZA(),t.TgZ(45,"div",18)(46,"mat-radio-group",19),t.NdJ("ngModelChange",function(s){return i.form.CompositeVisible=s}),t.TgZ(47,"mat-radio-button",22),t._uU(48," No "),t.qZA(),t.TgZ(49,"mat-radio-button",23),t._uU(50," Yes "),t.qZA()()()(),t.YNc(51,$i,9,3,"div",24),t.YNc(52,tn,9,3,"div",24),t.qZA()()()()()()()),2&e&&(t.Q6J("headerTitle","POS Edit")("pageData",i.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(16),t.Q6J("ngModel",i.form.Host),t.xp6(4),t.Q6J("ngModel",i.form.Username),t.xp6(4),t.Q6J("ngModel",i.form.ClientSecretGuid),t.xp6(13),t.Q6J("ngModel",i.form.OrderPaymentAmountType),t.xp6(1),t.Q6J("value",0),t.xp6(2),t.Q6J("value",1),t.xp6(6),t.Q6J("ngModel",i.form.CompositeVisible),t.xp6(1),t.Q6J("value",!1),t.xp6(2),t.Q6J("value",!0),t.xp6(2),t.Q6J("ngIf",i.form.CompositeVisible),t.xp6(1),t.Q6J("ngIf",i.form.CompositeVisible))},dependencies:[g.O5,h.Fj,h.JJ,h.On,u.p,k.VQ,k.U0,f.yS],styles:[".passwordIcon[_ngcontent-%COMP%]{top:1.5rem;right:1rem;position:absolute;margin:0 auto!important;cursor:pointer}"]}),o})(),canActivate:[E.a],data:{title:"POS Edit"}}]}];let on=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({imports:[g.ez,f.Bz.forChild(nn)]}),o})();var an=p(4144),sn=p(4859);let rn=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({imports:[g.ez,h.u5,w.Z,u.R,k.Fk,C.A0,on,f.Bz,Ce,We,an.c,sn.ot,zt.Ps,z.AV,Kt.rP]}),o})()},7398:(pt,L,p)=>{p.d(L,{Z:()=>f,e:()=>C});var g=p(6895),h=p(266),w=p(8252),u=p(4650);function k(t,Z){if(1&t&&(u.TgZ(0,"li",2)(1,"a",3),u._uU(2),u.qZA()()),2&t){const T=Z.$implicit;u.xp6(1),u.s9C("routerLink",T.Url),u.Q6J("title",T.Description?T.Description:""),u.xp6(1),u.hij(" ",T.Title," ")}}let C=(()=>{class t{}return t.\u0275fac=function(T){return new(T||t)},t.\u0275cmp=u.Xpm({type:t,selectors:[["nav-tab"]],inputs:{Tabs:"Tabs"},decls:2,vars:1,consts:[[1,"nav","navbar-nav","navbar-left","nav-tab-arrow"],["routerLinkActive","active","class","nav-item me-6",4,"ngFor","ngForOf"],["routerLinkActive","active",1,"nav-item","me-6"],[1,"nav-link","nav-link-arrow","mb-0",3,"routerLink","title"]],template:function(T,D){1&T&&(u.TgZ(0,"ul",0),u.YNc(1,k,3,3,"li",1),u.qZA()),2&T&&(u.xp6(1),u.Q6J("ngForOf",D.Tabs))},dependencies:[g.sg,w.yS,w.Od]}),t})(),f=(()=>{class t{}return t.\u0275fac=function(T){return new(T||t)},t.\u0275mod=u.oAB({type:t}),t.\u0275inj=u.cJS({imports:[g.ez,w.Bz,h.AV]}),t})()},3154:(pt,L,p)=>{p.d(L,{g:()=>w});var g=(()=>{return(u=g||(g={})).SHOOPE="//res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png",u.WOOCOMMERCE="//res.cloudinary.com/pos/image/upload/w_50/v1632447439/icons/WooCommerce/woocommerce-icon.webp",u.TOKOPEDIA="//res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png",u.TIKTOK="//res.cloudinary.com/pos/image/upload/w_30/v1645761611/icons/Marketplace%20logo/tiktok.png",u.LAZADA="//res.cloudinary.com/pos/image/upload/w_30/v1641528003/icons/marketplace_icons/lazada.png",g;var u})(),h=p(9694);let w=(()=>{class u{static IsNotEmpty(C){return""!=C&&C!=u.GuidEMpty&&null!=C&&null!=C}static IsEmpty(C){return""==C||null==C||null==C||C==u.GuidEMpty}static getChannelLogoByTypeId(C){let f;switch(C){case h.x.Tokopedia:f=g.TOKOPEDIA;break;case h.x.ShopeeV2:f=g.SHOOPE;break;case h.x.WooCommerce:f=g.WOOCOMMERCE;break;case h.x.Lazada:f=g.LAZADA;break;case h.x.Tiktok:f=g.TIKTOK}return f}}return u.GuidEMpty="00000000-0000-0000-0000-000000000000",u})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[162],{9162:(xn,x,s)=>{s.r(x),s.d(x,{InventoryModule:()=>fn});var p=s(6895),n=s(4650),m=s(8252),v=s(7398);let D=(()=>{class e{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"}]}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=n.Xpm({type:e,selectors:[["app-inventory"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(t,i){1&t&&(n.TgZ(0,"nav",0)(1,"div",1)(2,"div"),n._UZ(3,"nav-tab",2),n.qZA()()(),n._UZ(4,"router-outlet")),2&t&&(n.xp6(3),n.Q6J("Tabs",i.inventoryTabs))},dependencies:[m.lC,v.e]}),e})();var b=s(8231),P=s(6304),I=s(8505),d=s(9300),u=s(3154),g=s(8705),S=s(1318),y=s(7185),T=s(5412),Z=s(7287),F=s(6082),C=s(7481),w=s(488);function J(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"button",17),n.NdJ("click",function(){n.CHM(t);const a=n.oxw(3);return n.KtG(a.openScanDialog())}),n._UZ(1,"i",18),n._uU(2," Scan Channel "),n.qZA()}}function U(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"button",19),n.NdJ("click",function(){n.CHM(t);const a=n.oxw().ngIf,o=n.oxw(2);return n.KtG(o.onUpdateItems(a))}),n._UZ(1,"i",20),n._uU(2," Update "),n.qZA()}}function k(e,l){if(1&e&&(n.TgZ(0,"actions")(1,"div",14)(2,"div"),n.YNc(3,J,3,0,"button",15),n.YNc(4,U,3,0,"button",16),n.qZA()()()),2&e){const t=l.ngIf,i=n.oxw(2);n.xp6(3),n.Q6J("ngIf",!i.productService.hasSelectionVariant(t)),n.xp6(1),n.Q6J("ngIf",i.productService.hasSelectionVariant(t))}}function L(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"app-table",21),n.NdJ("onToggle",function(a){n.CHM(t);const o=n.oxw(2);return n.KtG(o.onShowDifferenceStock(a))})("onSubmit",function(a){const r=n.CHM(t).ngIf,c=n.oxw(2);return n.KtG(c.updateStockByVariant(a,r))}),n.qZA()}if(2&e){const t=l.ngIf,i=n.oxw().ngIf,a=n.oxw();n.Q6J("data",t)("channel",a.channelOptions)("showProductToggle",!0)("filter",i.Filter)}}function O(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"span",22),n.NdJ("click",function(){n.CHM(t);const a=n.oxw(2);return n.KtG(a.getRowCount())}),n.TgZ(1,"i",23),n._uU(2,"?"),n.qZA()()}}function Q(e,l){if(1&e&&(n.TgZ(0,"span"),n._uU(1),n.ALo(2,"number"),n.qZA()),2&e){const t=l.ngIf;n.xp6(1),n.Oqu(n.lcZ(2,1,t))}}function E(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"a",24),n.NdJ("click",function(){n.CHM(t);const a=n.oxw(2);return n.KtG(a.nextPage())}),n._UZ(1,"i",25),n._uU(2," Next"),n.qZA()}}function Y(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"a",26),n.NdJ("click",function(){n.CHM(t);const a=n.oxw(2);return n.KtG(a.getAllData())}),n._UZ(1,"i",27),n._uU(2," Last"),n.qZA()}}function V(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"mainpanel",1),n.NdJ("onSubmit",function(a){n.CHM(t);const o=n.oxw();return n.KtG(o.onSearch(a))}),n.YNc(1,k,5,2,"actions",2),n.ALo(2,"async"),n.TgZ(3,"content")(4,"div",3)(5,"div",4)(6,"div",5),n.YNc(7,L,1,4,"app-table",6),n.ALo(8,"async"),n.ynx(9),n.TgZ(10,"div",7)(11,"div",8)(12,"div",9),n._uU(13),n.ALo(14,"number"),n.ALo(15,"async"),n.YNc(16,O,3,0,"span",10),n.YNc(17,Q,3,3,"span",2),n.ALo(18,"async"),n._uU(19),n.qZA()(),n.TgZ(20,"div",11),n.YNc(21,E,3,0,"a",12),n.YNc(22,Y,3,0,"a",13),n.qZA()(),n.BQk(),n.qZA()()()()()}if(2&e){const t=n.oxw();let i;n.Q6J("pageData",t.pageData)("hideSearchBox",!1)("hideSearchDropdown",!0)("textButton","Search"),n.xp6(1),n.Q6J("ngIf",n.lcZ(2,12,t.paginationService.data$)),n.xp6(6),n.Q6J("ngIf",n.lcZ(8,14,t.paginationService.data$)),n.xp6(6),n.hij(" Showing 1 - ",n.lcZ(14,16,null==(i=n.lcZ(15,18,t.paginationService.data$))?null:i.length)," of "),n.xp6(3),n.Q6J("ngIf",t.paginationService.hideCount),n.xp6(1),n.Q6J("ngIf",n.lcZ(18,20,!t.paginationService.hideCount&&t.allDataCount$)),n.xp6(2),n.hij(" records ~ ",t.paginationService.footerPageNumber," Page "),n.xp6(2),n.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),n.xp6(1),n.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}let $=(()=>{class e{constructor(t,i,a,o,r){this.http=t,this.toastr=i,this.dialog=a,this.paginationService=o,this.productService=r,this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.filterTypeOptions=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory/pos",Active:!0},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!1}]}}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe((0,I.b)(t=>{this.channelOptions=t.Options.Channel,t.Filter={PageNumber:t.Filter.PageNumber,filterModel:g.v.ALL,RowCount:t.Filter.PageSize},this.searchFilter=t.Filter,this.paginationService.resetToFirstPage(this.searchFilter)}))}onSearch(t){this.searchFilter.text=t,this.paginationService.resetToFirstPage(this.searchFilter)}updateStock(t,i){let a=this.productService.selectedVariantProduct(t);if(a.length>0){let r=a.map(h=>({ID:h.ID,Code:h.Code,Inventory:h.Inventory})),c={ListChannelID:i.filter(h=>h.selected).map(h=>h.ID),List:r};this.http.post("/api/Inventory/UpdateChannel",c).subscribe(h=>{this.paginationService.resetToFirstPage(this.searchFilter),this.toastr.success("Successfully updated "+c.List.length+" variants in "+c.ListChannelID.length+" channels","Success")})}}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(b.j,{data:{filter:t,Channel:this.channelOptions},width:"40%"}).afterClosed().pipe((0,d.h)(a=>u.g.IsNotEmpty(a))).subscribe(a=>{this.searchFilter.ScanFull=a.ScanFull,this.searchFilter.ChannelID=a.ChannelID,this.searchFilter.UpdatedProduct=a.UpdatedProduct,this.scanAll()})}scanAll(){this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct).subscribe(t=>{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.initPageLoader(),this.productService.successToastrScanAllProduct(t,i,!this.searchFilter.UpdatedProduct),this.searchFilter.ChannelID=u.g.GuidEMpty})}updateStockByVariant(t,i){let a={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,NewQuantity:parseFloat(t.Inventory),VariantID:t.ID,SKU:t.Sku};this.http.post("/api/Inventory/UpdateQuantityByItem",a).subscribe(o=>{let r=this.productService.findChannelById(a.ID,this.channelOptions);this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") inventory in "+r.Name+" to "+a.NewQuantity,"Success")})}onShowDifferenceStock(t){this.searchFilter.filterModel=t?g.v.DIFFERENCE:g.v.ALL,this.paginationService.resetToFirstPage(this.searchFilter)}onUpdateItems(t){const i=this.productService.selectedVariantProduct(t);this.dialog.open(P.j,{data:{selectedItems:i,channels:JSON.parse(JSON.stringify(this.channelOptions))},width:"40%"}).afterClosed().pipe((0,d.h)(a=>u.g.IsNotEmpty(a))).subscribe(a=>{this.updateStock(t,a)})}getRowCount(){this.paginationService.hideCount=!1,this.allDataCount$=this.http.post(`/API/${this.allDataCountEndpoint}`,{text:this.searchFilter.text})}nextPage(){this.paginationService.onNextPage(this.searchFilter)}getAllData(){this.http.post(`/API/${this.allDataCountEndpoint}`,{}).subscribe({next:t=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,t)}})}ngOnDestroy(){this.paginationService.destroy()}}return e.\u0275fac=function(t){return new(t||e)(n.Y36(S.O),n.Y36(y._W),n.Y36(T.uw),n.Y36(Z.b),n.Y36(F.M))},e.\u0275cmp=n.Xpm({type:e,selectors:[["app-multi-channel-comparison"]],decls:2,vars:3,consts:[["headerTitle","Inventory Comparison",3,"pageData","hideSearchBox","hideSearchDropdown","textButton","onSubmit",4,"ngIf"],["headerTitle","Inventory Comparison",3,"pageData","hideSearchBox","hideSearchDropdown","textButton","onSubmit"],[4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["table","inventory",3,"data","channel","showProductToggle","filter","onToggle","onSubmit",4,"ngIf"],[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"],[1,"d-flex"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-3",3,"click",4,"ngIf"],["type","button","class","btn btn-success shadow-sm rounded me-3",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"data","channel","showProductToggle","filter","onToggle","onSubmit"],[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(t,i){1&t&&(n.YNc(0,V,23,22,"mainpanel",0),n.ALo(1,"async")),2&t&&n.Q6J("ngIf",n.lcZ(1,1,i.loader$))},dependencies:[p.O5,C.p,w.a,p.Ov,p.JJ],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]}),e})();var q=s(7945),_=s(4006),f=s(8796),A=s(455),M=s(266);function R(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"button",32),n.NdJ("click",function(){n.CHM(t);const a=n.oxw(2).ngIf,o=n.oxw();return n.KtG(o.openScanDialog(a))}),n._UZ(1,"i",33),n._uU(2," Scan Channel "),n.qZA()}}function K(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"button",34),n.NdJ("click",function(){n.CHM(t);const a=n.oxw().ngIf,o=n.oxw(2);return n.KtG(o.updateStock(a))}),n._UZ(1,"i",35),n._uU(2," Update"),n.qZA()}}function G(e,l){if(1&e&&(n.TgZ(0,"div"),n.YNc(1,R,3,0,"button",30),n.YNc(2,K,3,0,"button",31),n.qZA()),2&e){const t=l.ngIf,i=n.oxw(2);n.xp6(1),n.Q6J("ngIf",!i.productService.hasSelectionVariant(t)),n.xp6(1),n.Q6J("ngIf",i.productService.hasSelectionVariant(t))}}function B(e,l){1&e&&(n.TgZ(0,"div",36)(1,"span"),n._uU(2," showing only different stock, please press next to populate more data "),n.qZA()())}function H(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"th")(1,"input",37),n.NdJ("ngModelChange",function(a){n.CHM(t);const o=n.oxw(2);return n.KtG(o.checkboxState=a)})("ngModelChange",function(){const o=n.CHM(t).ngIf,r=n.oxw(2);return n.KtG(r.onCheckboxStateChange(o))}),n.qZA()()}if(2&e){const t=n.oxw(2);n.xp6(1),n.Q6J("ngModel",t.checkboxState)}}function j(e,l){if(1&e&&(n.TgZ(0,"ng-option",38),n._UZ(1,"img",39),n._uU(2),n.qZA()),2&e){const t=l.$implicit;n.Q6J("value",t.ID),n.xp6(1),n.s9C("src",t.Img,n.LSH),n.xp6(1),n.hij("",t.Name," ")}}function z(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"input",57),n.NdJ("ngModelChange",function(a){n.CHM(t);const o=n.oxw(3).$implicit;return n.KtG(o.selected=a)})("ngModelChange",function(){n.CHM(t);const a=n.oxw(3).$implicit,o=n.oxw(2);return n.KtG(o.onCheckboxStateProduct(a))}),n.qZA()}if(2&e){const t=n.oxw(3).$implicit;n.Q6J("ngModel",t.selected)}}function W(e,l){if(1&e&&n._UZ(0,"img",58),2&e){const t=n.oxw(3).$implicit;n.s9C("src",null==t?null:t.ThumbnailUrl,n.LSH)}}function X(e,l){1&e&&n._UZ(0,"img",59)}function nn(e,l){if(1&e&&(n.ynx(0),n.TgZ(1,"td",50)(2,"div",51),n.YNc(3,z,1,1,"input",52),n.YNc(4,W,1,1,"img",53),n.YNc(5,X,1,0,"ng-template",null,54,n.W1O),n.qZA()(),n.TgZ(7,"td",55)(8,"span",56),n._uU(9),n.qZA(),n._UZ(10,"br"),n.TgZ(11,"small"),n._uU(12),n.qZA()(),n.BQk()),2&e){const t=n.MAs(6),i=n.oxw().$implicit,a=n.oxw().$implicit;n.xp6(1),n.Q6J("rowSpan",null==a?null:a.Variants.length),n.xp6(2),n.Q6J("ngIf",(null==i?null:i.Inventory)>=0||a.Variants.length>1),n.xp6(1),n.Q6J("ngIf",null==a?null:a.ThumbnailUrl)("ngIfElse",t),n.xp6(3),n.Q6J("rowSpan",null==a?null:a.Variants.length),n.xp6(2),n.Oqu(null==a?null:a.Name),n.xp6(3),n.hij("(",null==a?null:a.Category,")")}}function tn(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"input",37),n.NdJ("ngModelChange",function(a){n.CHM(t);const o=n.oxw().$implicit;return n.KtG(o.selected=a)}),n.qZA()}if(2&e){const t=n.oxw().$implicit;n.Q6J("ngModel",t.selected)}}function en(e,l){if(1&e&&(n.TgZ(0,"span")(1,"span",60),n._uU(2),n.ALo(3,"number"),n.qZA(),n._uU(4," => "),n.TgZ(5,"span",61),n._uU(6),n.ALo(7,"number"),n.qZA()()),2&e){const t=n.oxw().$implicit;n.xp6(2),n.hij(" ",n.lcZ(3,2,null==t||null==t.I?null:t.I.Available),""),n.xp6(4),n.Oqu(n.lcZ(7,4,null==t?null:t.Inventory))}}function an(e,l){if(1&e&&(n.TgZ(0,"span"),n._uU(1),n.ALo(2,"number"),n.qZA()),2&e){const t=n.oxw().$implicit;n.xp6(1),n.hij(" ",n.lcZ(2,1,null==t?null:t.Inventory)," ")}}const on=function(e){return{"bg-err":e}};function ln(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"td",62)(1,"div",63)(2,"div",64),n.NdJ("click",function(){n.CHM(t);const a=n.oxw().$implicit,o=n.oxw(),r=o.$implicit,c=o.ngForOf,h=n.oxw(2);return n.KtG(h.openTableDialog(r,a,c))}),n._uU(3),n.ALo(4,"number"),n.qZA()()()}if(2&e){const t=n.oxw().$implicit;n.Q6J("ngClass",n.VKq(4,on,(null==t?null:t.Inventory)!=(null==t||null==t.Channel[0]?null:t.Channel[0].Inventory))),n.xp6(3),n.hij(" ",n.lcZ(4,2,null==t||null==t.Channel[0]?null:t.Channel[0].Inventory)," ")}}function rn(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"tr"),n.YNc(1,nn,13,7,"ng-container",3),n.TgZ(2,"td",40),n._uU(3),n.qZA(),n.TgZ(4,"td",41),n._uU(5),n.qZA(),n.TgZ(6,"td",42),n.YNc(7,tn,1,1,"input",43),n.qZA(),n.TgZ(8,"td",41),n.YNc(9,en,8,6,"span",3),n.YNc(10,an,3,3,"span",3),n.qZA(),n.YNc(11,ln,5,6,"td",44),n.TgZ(12,"td")(13,"div",10)(14,"div",45)(15,"a",46),n._UZ(16,"i",47),n.qZA(),n._uU(17," \xa0\xa0 "),n.TgZ(18,"span",48),n.NdJ("click",function(){const o=n.CHM(t).$implicit,r=n.oxw(3);return n.KtG(r.RefreshInventory(null==o||null==o.Channel[0]?null:o.Channel[0].ChannelItemID,null==o||null==o.Channel[0]?null:o.Channel[0].ChannelVariationID,null==o||null==o.Channel[0]?null:o.Channel[0].ChannelID,null==o?null:o.ID))}),n._UZ(19,"i",49),n.qZA()()()()()}if(2&e){const t=l.$implicit,i=l.index;n.xp6(1),n.Q6J("ngIf",0==i),n.xp6(2),n.Oqu(null==t?null:t.Model),n.xp6(2),n.hij(" ",null==t?null:t.Code," "),n.xp6(2),n.Q6J("ngIf",(null==t?null:t.Inventory)>=0),n.xp6(2),n.Q6J("ngIf",(null==t?null:t.Inventory)!=(null==t||null==t.I?null:t.I.Available)),n.xp6(1),n.Q6J("ngIf",(null==t?null:t.Inventory)==(null==t||null==t.I?null:t.I.Available)),n.xp6(1),n.Q6J("ngIf",null==t?null:t.Channel),n.xp6(4),n.Q6J("href",null==t||null==t.Channel[0]?null:t.Channel[0].Url,n.LSH)}}function sn(e,l){if(1&e&&(n.TgZ(0,"tbody"),n.YNc(1,rn,20,8,"tr",24),n.qZA()),2&e){const t=l.$implicit;n.xp6(1),n.Q6J("ngForOf",t.Variants)}}function cn(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"span",65),n.NdJ("click",function(){n.CHM(t);const a=n.oxw(2);return n.KtG(a.getRowCount())}),n.TgZ(1,"i",66),n._uU(2,"?"),n.qZA()()}}function pn(e,l){if(1&e&&(n.TgZ(0,"span"),n._uU(1),n.ALo(2,"number"),n.qZA()),2&e){const t=l.ngIf;n.xp6(1),n.Oqu(n.lcZ(2,1,null==t?null:t.Total))}}function hn(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"a",70),n.NdJ("click",function(){n.CHM(t);const a=n.oxw(3);return n.KtG(a.onNextPage())}),n._UZ(1,"i",71),n._uU(2," Next"),n.qZA()}}function un(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"a",72),n.NdJ("click",function(){n.CHM(t);const a=n.oxw(3);return n.KtG(a.onLastPage())}),n._UZ(1,"i",73),n._uU(2," Last"),n.qZA()}}function _n(e,l){if(1&e&&(n.TgZ(0,"div",67),n.YNc(1,hn,3,0,"a",68),n.YNc(2,un,3,0,"a",69),n.qZA()),2&e){const t=n.oxw(2);n.xp6(1),n.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),n.xp6(1),n.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}function gn(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"mainpanel",1),n.NdJ("onSubmit",function(a){n.CHM(t);const o=n.oxw();return n.KtG(o.onSearch(a))}),n.TgZ(1,"actions")(2,"div",2),n.YNc(3,G,3,2,"div",3),n.ALo(4,"async"),n.qZA()(),n.TgZ(5,"filters")(6,"div",2)(7,"div",4)(8,"div")(9,"label",5),n._uU(10,"PageNumber"),n.qZA(),n.TgZ(11,"input",6),n.NdJ("ngModelChange",function(a){n.CHM(t);const o=n.oxw();return n.KtG(o.searchFilter.PageNumber=a)}),n.qZA()(),n.TgZ(12,"div")(13,"label",7),n._uU(14,"Page Size"),n.qZA(),n.TgZ(15,"input",8),n.NdJ("ngModelChange",function(a){n.CHM(t);const o=n.oxw();return n.KtG(o.searchFilter.RowCount=a)}),n.qZA()()()()(),n.TgZ(16,"content")(17,"div",9)(18,"div",10)(19,"div",11),n.YNc(20,B,3,0,"div",12),n.TgZ(21,"table",13)(22,"thead",14)(23,"tr")(24,"th",15),n._uU(25,"Product "),n._UZ(26,"br"),n.TgZ(27,"mat-slide-toggle",16),n.NdJ("toggleChange",function(){n.CHM(t);const a=n.oxw();return a.showDifferenceStock=!a.showDifferenceStock,n.KtG(a.onShowDifferenceStock())}),n.TgZ(28,"small",17),n._uU(29,"Filter Different Inventory"),n.qZA()()(),n.TgZ(30,"th",18),n._uU(31,"Variant"),n.qZA(),n.TgZ(32,"th",19),n._uU(33,"SKU"),n.qZA(),n.YNc(34,H,2,1,"th",3),n.ALo(35,"async"),n.TgZ(36,"th",20),n._uU(37,"POS"),n.qZA(),n.TgZ(38,"th")(39,"ng-select",21),n.NdJ("change",function(a){n.CHM(t);const o=n.oxw();return n.KtG(o.onFilterChannel(a))})("ngModelChange",function(a){n.CHM(t);const o=n.oxw();return n.KtG(o.searchFilter.ChannelID=a)}),n.YNc(40,j,3,3,"ng-option",22),n.qZA()(),n._UZ(41,"th",23),n.qZA()(),n.YNc(42,sn,2,1,"tbody",24),n.ALo(43,"async"),n.qZA(),n.TgZ(44,"div",25)(45,"div",26)(46,"div",27),n._uU(47),n.ALo(48,"number"),n.ALo(49,"async"),n.YNc(50,cn,3,0,"span",28),n.YNc(51,pn,3,3,"span",3),n.ALo(52,"async"),n._uU(53),n.qZA()(),n.YNc(54,_n,3,2,"div",29),n.ALo(55,"async"),n.qZA()()()()()()}if(2&e){const t=l.ngIf,i=n.oxw();let a,o;n.Q6J("headerTitle","Inventory Comparison")("pageData",i.pageData)("hideSearchBox",!1),n.xp6(3),n.Q6J("ngIf",n.lcZ(4,17,i.paginationService.data$)),n.xp6(8),n.Q6J("ngModel",i.searchFilter.PageNumber),n.xp6(4),n.Q6J("ngModel",i.searchFilter.RowCount),n.xp6(5),n.Q6J("ngIf",3==(null==i.searchFilter?null:i.searchFilter.filterModel)),n.xp6(14),n.Q6J("ngIf",n.lcZ(35,19,i.paginationService.data$)),n.xp6(5),n.Q6J("clearable",!1)("ngModel",i.searchFilter.ChannelID),n.xp6(1),n.Q6J("ngForOf",t.Options.Channel),n.xp6(2),n.Q6J("ngForOf",n.lcZ(43,21,i.paginationService.data$)),n.xp6(5),n.hij(" Showing 1 - ",n.lcZ(48,23,null==(a=n.lcZ(49,25,i.paginationService.data$))?null:a.length)," of "),n.xp6(3),n.Q6J("ngIf",i.paginationService.hideCount),n.xp6(1),n.Q6J("ngIf",n.lcZ(52,27,!i.paginationService.hideCount&&i.rowCount$)),n.xp6(2),n.hij(" records ~ ",i.paginationService.footerPageNumber," Page "),n.xp6(1),n.Q6J("ngIf",(null==(o=n.lcZ(55,29,i.paginationService.data$))?null:o.length)>0)}}let dn=(()=>{class e{constructor(t,i,a,o,r){this.http=t,this.toastr=i,this.dialog=a,this.paginationService=o,this.productService=r,this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="/api/InventoryLoader/Load",this.rowCountApi="/api/Inventory/GetInventoryByChannelRowCount",this.Options=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory Realtime",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory",Active:!1},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!0}]}}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint="Inventory/GetSingleChannelComparison",this.loader$=this.http.post(this.loaderApi,{}).pipe((0,I.b)(t=>{this.channelOptions=t.Options.Channel,this.searchFilter={RowCount:t.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:t.Filter.ChannelID},this.paginationService.resetToFirstPage(this.searchFilter),t.Filter.IsMarketplaceAppActive||this.toastr.warning("Automatic inventory sync disabled.\n Please enable Dealpos X Marketplace Apps integration in POS Configuration","Warning")}))}onSearch(t){this.searchFilter.text=t,this.paginationService.resetToFirstPage(this.searchFilter)}onFilterChannel(t){this.searchFilter.ChannelID=t,this.searchFilter.PageNumber=1,this.paginationService.resetToFirstPage(this.searchFilter)}updateStock(t){const i=this.productService.selectedVariantProduct(t);if(i.length>0){let o=i.map(c=>({ID:c.ID,Code:c.Code,Inventory:c.Inventory}));var a=[];a.push(this.searchFilter.ChannelID);let r={ListChannelID:a,List:o};this.http.post("/api/Inventory/UpdateChannel",r).subscribe(c=>{this.searchFilter.PageNumber=1,this.paginationService.resetToFirstPage(this.searchFilter),this.toastr.success("Successfully updated "+r.List.length+" variants in "+r.ListChannelID.length+" channels","Success")})}}openScanDialog(t){const i=JSON.parse(JSON.stringify(this.searchFilter));i.ChannelID=u.g.GuidEMpty,this.dialog.open(b.j,{data:{filter:i,Channel:t.Options.Channel},width:"40%"}).afterClosed().pipe((0,d.h)(o=>u.g.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.refreshChannel(t)})}refreshChannel(t){const i=this.productService.findChannelById(this.searchFilter.ChannelID,t.Options.Channel);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct).subscribe(a=>{this.searchFilter.ScanFull=!1,this.initPageLoader(),this.toastr.success("Successfully scanned from "+i?.Name,"Success")})}RefreshInventory(t,i,a,o){this.http.post("/api/Inventory/RefreshInventoryChannel",{ChannelItemID:t,ChannelVariationID:i,ChannelID:a,VariantID:o}).subscribe(c=>{this.toastr.success("Successfully updated","Success"),this.paginationService.resetToFirstPage(this.searchFilter)})}onCheckboxStateProduct(t){t.Variants=t.Variants.map(i=>(i.Inventory>=0&&(i.selected=t.selected),i))}onCheckboxStateChange(t){t=t.map(i=>(i.Variants=i.Variants.map(a=>(a.selected=this.checkboxState,a)),i))}openTableDialog(t,i,a){this.dialog.open(q.k,{data:{Name:t.Name,Variant:i,ChannelID:i?.Channel[0].ChannelID,Table:"inventory",ChannelItemID:t.ChannelItemID}}).afterClosed().pipe((0,d.h)(r=>u.g.IsNotEmpty(r))).subscribe(r=>{this.updateItemAfterDialog(r,a)})}updateItemAfterDialog(t,i){let a={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,NewQuantity:parseFloat(t.Inventory),VariantID:t.ID,SKU:t.Sku};const o=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.http.post("/api/Inventory/UpdateQuantityByItem",a).subscribe(r=>{this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") inventory in "+o?.Name+" to "+a.NewQuantity,"Success")})}onShowDifferenceStock(){this.searchFilter.filterModel=this.showDifferenceStock?g.v.DIFFERENCE:g.v.ALL,this.paginationService.resetToFirstPage(this.searchFilter)}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}getRowCount(){const t={ChannelID:this.searchFilter.ChannelID,PageNumber:1,text:this.searchFilter.text};this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`${this.rowCountApi}`,t)}onLastPage(){this.http.post(`${this.rowCountApi}`,{ChannelID:this.searchFilter.ChannelID,PageNumber:1}).subscribe({next:i=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,i.Total)}})}ngOnDestroy(){this.paginationService.destroy()}}return e.\u0275fac=function(t){return new(t||e)(n.Y36(S.O),n.Y36(y._W),n.Y36(T.uw),n.Y36(Z.b),n.Y36(F.M))},e.\u0275cmp=n.Xpm({type:e,selectors:[["app-single-channel-comparison"]],decls:2,vars:3,consts:[["textButton","Search",3,"headerTitle","pageData","hideSearchBox","onSubmit",4,"ngIf"],["textButton","Search",3,"headerTitle","pageData","hideSearchBox","onSubmit"],[1,"d-flex"],[4,"ngIf"],["container",""],["for","PageNumber"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control",3,"ngModel","ngModelChange"],["for","RowCount"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["class","alert alert-warning d-flex justify-content-between text-dark","role","alert",4,"ngIf"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","ps-12",2,"width","36%"],[3,"toggleChange"],[1,"fw-bold"],["scope","col",1,"text-start"],["scope","col",1,"text-end",2,"width","20%"],["scope","col",1,"text-end","w-10"],[3,"clearable","ngModel","change","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[2,"width","4%"],[4,"ngFor","ngForOf"],[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"],["class","btn-group",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-3",3,"click",4,"ngIf"],["class","btn btn-success",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],["role","alert",1,"alert","alert-warning","d-flex","justify-content-between","text-dark"],["type","checkbox",3,"ngModel","ngModelChange"],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"],[1,"text-start"],[1,"text-end"],[1,"align-middle"],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],["class","text-end",3,"ngClass",4,"ngIf"],[1,"col-12","ps-0","d-flex","justify-content-between"],["target","_blank",2,"color","#333333",3,"href"],[1,"fas","fa-lg","fa-external-link-alt","custom-size"],["matTooltip","Refresh stock according to seller center",1,"pl-5","cursor-pointer",3,"click"],[1,"fas","fa-sync","fa-lg","custom-size"],[1,"text-start",2,"width","0%",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-start"],["type","checkbox","class","me-3",3,"ngModel","ngModelChange",4,"ngIf"],["class","border rounded w-img","style","margin-left: 20px",3,"src",4,"ngIf","ngIfElse"],["elsePic",""],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],["type","checkbox",1,"me-3",3,"ngModel","ngModelChange"],[1,"border","rounded","w-img",2,"margin-left","20px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img",2,"margin-left","20px"],["title","Allocated"],["title","Inventory below minimum inventory"],[1,"text-end",3,"ngClass"],[1,"row","justify-content-end","me-0"],[1,"col-12","pe-12","text-end",3,"click"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],[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"],["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(t,i){1&t&&(n.YNc(0,gn,56,31,"mainpanel",0),n.ALo(1,"async")),2&t&&n.Q6J("ngIf",n.lcZ(1,1,i.loader$))},dependencies:[p.mk,p.sg,p.O5,_.Fj,_.wV,_.Wl,_.JJ,_.On,f.w9,f.jq,A.Rr,C.p,M.gM,p.Ov,p.JJ],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}i.fas.custom-size[_ngcontent-%COMP%]{font-size:13px}"]}),e})();var N=s(8063);const mn=[{path:"",component:D,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",component:$,canActivate:[N.a],data:{title:"Inventory Comparison"}},{path:"bychannel",component:dn,canActivate:[N.a],data:{title:"Inventory Comparison"}}]}];let Cn=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=n.oAB({type:e}),e.\u0275inj=n.cJS({imports:[p.ez,m.Bz.forChild(mn)]}),e})(),fn=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=n.oAB({type:e}),e.\u0275inj=n.cJS({imports:[p.ez,Cn,m.Bz,v.Z,_.u5,f.A0,A.rP,C.R,w.U,M.AV]}),e})()}}]);