marketplacepos 2.7.0 → 2.7.2

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 (35) hide show
  1. package/package.json +1 -1
  2. package/Marketplace/174.082310afa1c1c06a.js +0 -1
  3. package/Marketplace/25.03de7055fb683c5f.js +0 -1
  4. package/Marketplace/291.67c6826480f4b3c1.js +0 -1
  5. package/Marketplace/360.9a9cbdee19ee7208.js +0 -1
  6. package/Marketplace/369.a968c4c1bfa84822.js +0 -1
  7. package/Marketplace/397.4fa90ebd3b5a5dcb.js +0 -1
  8. package/Marketplace/3rdpartylicenses.txt +0 -631
  9. package/Marketplace/455.fc7663306b753727.js +0 -1
  10. package/Marketplace/463.d4a9bce757f2c5a7.js +0 -1
  11. package/Marketplace/475.74988a4c87dd8e84.js +0 -1
  12. package/Marketplace/512.945d0618102b5e2d.js +0 -1
  13. package/Marketplace/516.89b482db0546fec8.js +0 -1
  14. package/Marketplace/545.4cff8354a6569325.js +0 -1
  15. package/Marketplace/566.d37fed063c54abb7.js +0 -1
  16. package/Marketplace/585.41532f91419a22f2.js +0 -1
  17. package/Marketplace/616.f27780a637620732.js +0 -1
  18. package/Marketplace/663.dc31188909c42de4.js +0 -1
  19. package/Marketplace/717.b73519cb10db4efc.js +0 -1
  20. package/Marketplace/72.301ee2586eacb84b.js +0 -1
  21. package/Marketplace/739.8a763e7ab64fe945.js +0 -1
  22. package/Marketplace/785.e0040d021febffb1.js +0 -1
  23. package/Marketplace/796.d34bd45b5a924fca.js +0 -1
  24. package/Marketplace/874.89ed6b644dee8914.js +0 -1
  25. package/Marketplace/877.14904bfeb2339fd8.js +0 -1
  26. package/Marketplace/913.b0ba75db695ec705.js +0 -1
  27. package/Marketplace/997.8e08fe9c3e557dc1.js +0 -1
  28. package/Marketplace/common.b609a3050c08de6d.js +0 -1
  29. package/Marketplace/favicon.ico +0 -0
  30. package/Marketplace/index.html +0 -22
  31. package/Marketplace/main.144164a58a7199fb.js +0 -1
  32. package/Marketplace/polyfills.8d85b0533e3f867a.js +0 -1
  33. package/Marketplace/runtime.c70efb35ba59d538.js +0 -1
  34. package/Marketplace/scripts.09af772bfa77d50d.js +0 -1
  35. package/Marketplace/styles.dff58ae3c0783953.css +0 -20
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[463],{6463:(it,K,h)=>{h.r(K),h.d(K,{ChannelsModule:()=>tn});var _=h(6895),u=h(4006),E=h(7398),f=h(7481),Z=h(1948),G=h(8796),C=h(6806),e=h(4650);let x=(()=>{class o{constructor(){this.channelTabs=[{Title:"Marketplace",Url:"/menu/channel/marketplace"},{Title:"POS",Url:"/menu/channel/pos"}]}ngOnInit(){}}return o.\u0275fac=function(t){return new(t||o)},o.\u0275cmp=e.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(t,i){1&t&&(e.TgZ(0,"nav",0)(1,"div",1)(2,"div"),e._UZ(3,"nav-tab",2),e.qZA()()(),e._UZ(4,"router-outlet")),2&t&&(e.xp6(3),e.Q6J("Tabs",i.channelTabs))},dependencies:[E.e,C.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 y=h(7376),T=h(3353),g=h(1281),oe=h(2687),v=h(7579),H=h(727),nt=h(4986),ot=h(2805),at=h(6406),fe=h(8306),R=h(6451),O=h(2722),W=h(8675),rt=h(4004),se=h(5698),lt=h(8505),dt=h(3900),ae=h(445);function re(o,n,t){for(let i in n)if(n.hasOwnProperty(i)){const s=n[i];s?o.setProperty(i,s,t?.has(i)?"important":""):o.removeProperty(i)}return o}function q(o,n){const t=n?"":"none";re(o.style,{"touch-action":n?"":"none","-webkit-user-drag":n?"":"none","-webkit-tap-highlight-color":n?"":"transparent","user-select":t,"-ms-user-select":t,"-webkit-user-select":t,"-moz-user-select":t})}function ve(o,n,t){re(o.style,{position:n?"":"fixed",top:n?"":"0",opacity:n?"":"0",left:n?"":"-999em"},t)}function j(o,n){return n&&"none"!=n?o+" "+n:o}function Ce(o){const n=o.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(o)*n}function le(o,n){return o.getPropertyValue(n).split(",").map(i=>i.trim())}function de(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 ce(o,n,t){const{top:i,bottom:s,left:a,right:r}=o;return t>=i&&t<=s&&n>=a&&n<=r}function Q(o,n,t){o.top+=n,o.bottom=o.top+o.height,o.left+=t,o.right=o.left+o.width}function be(o,n,t,i){const{top:s,right:a,bottom:r,left:l,width:d,height:c}=o,p=d*n,m=c*n;return i>s-m&&i<r+m&&t>l-p&&t<a+p}class ye{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(t=>{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:de(t)})})}handleScroll(n){const t=(0,T.sA)(n),i=this.positions.get(t);if(!i)return null;const s=i.scrollPosition;let a,r;if(t===this._document){const c=this.getViewportScrollPosition();a=c.top,r=c.left}else a=t.scrollTop,r=t.scrollLeft;const l=s.top-a,d=s.left-r;return this.positions.forEach((c,p)=>{c.clientRect&&t!==p&&t.contains(p)&&Q(c.clientRect,l,d)}),s.top=a,s.left=r,{top:l,left:d}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}}function Te(o){const n=o.cloneNode(!0),t=n.querySelectorAll("[id]"),i=o.nodeName.toLowerCase();n.removeAttribute("id");for(let s=0;s<t.length;s++)t[s].removeAttribute("id");return"canvas"===i?Me(o,n):("input"===i||"select"===i||"textarea"===i)&&De(o,n),Se("canvas",o,n,Me),Se("input, textarea, select",o,n,De),n}function Se(o,n,t,i){const s=n.querySelectorAll(o);if(s.length){const a=t.querySelectorAll(o);for(let r=0;r<s.length;r++)i(s[r],a[r])}}let ht=0;function De(o,n){"file"!==n.type&&(n.value=o.value),"radio"===n.type&&n.name&&(n.name=`mat-clone-${n.name}-${ht++}`)}function Me(o,n){const t=n.getContext("2d");if(t)try{t.drawImage(o,0,0)}catch{}}const Ie=(0,T.i$)({passive:!0}),X=(0,T.i$)({passive:!1}),he=new Set(["position"]);class ut{constructor(n,t,i,s,a,r){this._config=t,this._document=i,this._ngZone=s,this._viewportRuler=a,this._dragDropRegistry=r,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._hasStartedDragging=!1,this._moveEvents=new v.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 v.x,this.started=new v.x,this.released=new v.x,this.ended=new v.x,this.entered=new v.x,this.exited=new v.x,this.dropped=new v.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 A=Date.now()>=this._dragStartTime+this._getDragStartDelay(l),k=this._dropContainer;if(!A)return void this._endDragSequence(l);(!k||!k.isDragging()&&!k.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 p=this.constrainPosition?this._initialClientRect:this._pickupPositionOnPage,m=this._activeTransform;m.x=c.x-p.x+this._passiveTransform.x,m.y=c.y-p.y+this._passiveTransform.y,this._applyRootElementTransform(m.x,m.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(t.parentDragRef||null),this._parentPositions=new ye(i),r.registerDragItem(this)}get disabled(){return this._disabled||!(!this._dropContainer||!this._dropContainer.disabled)}set disabled(n){const t=(0,g.Ig)(n);t!==this._disabled&&(this._disabled=t,this._toggleNativeDragInteractions(),this._handles.forEach(i=>q(i,t)))}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(n){this._handles=n.map(i=>(0,g.fI)(i)),this._handles.forEach(i=>q(i,this.disabled)),this._toggleNativeDragInteractions();const t=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&t.add(i)}),this._disabledHandles=t,this}withPreviewTemplate(n){return this._previewTemplate=n,this}withPlaceholderTemplate(n){return this._placeholderTemplate=n,this}withRootElement(n){const t=(0,g.fI)(n);return t!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{t.addEventListener("mousedown",this._pointerDown,X),t.addEventListener("touchstart",this._pointerDown,Ie),t.addEventListener("dragstart",this._nativeDragStart,X)}),this._initialTransform=void 0,this._rootElement=t),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(n){return this._boundaryElement=n?(0,g.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),q(n,!0))}enableHandle(n){this._disabledHandles.has(n)&&(this._disabledHandles.delete(n),q(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 t=this._getPointerPositionOnPage(n);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:n})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(n){Y(n)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const t=this._dropContainer;if(t){const i=this._rootElement,s=i.parentNode,a=this._placeholder=this._createPlaceholderElement(),r=this._anchor=this._anchor||this._document.createComment(""),l=this._getShadowRoot();s.insertBefore(r,i),this._initialTransform=i.style.transform||"",this._preview=this._createPreviewElement(),ve(i,!1,he),this._document.body.appendChild(s.replaceChild(a,i)),this._getPreviewInsertionPoint(s,l).appendChild(this._preview),this.started.next({source:this,event:n}),t.start(),this._initialContainer=t,this._initialIndex=t.getItemIndex(this)}else this.started.next({source:this,event:n}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(t?t.getScrollableParents():[])}_initializeDragSequence(n,t){this._parentDragRef&&t.stopPropagation();const i=this.isDragging(),s=Y(t),a=!s&&0!==t.button,r=this._rootElement,l=(0,T.sA)(t),d=!s&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now(),c=s?(0,oe.yG)(t):(0,oe.X6)(t);if(l&&l.draggable&&"mousedown"===t.type&&t.preventDefault(),i||a||d||c)return;if(this._handles.length){const b=r.style;this._rootElementTapHighlight=b.webkitTapHighlightColor||"",b.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(b=>this._updateOnScroll(b)),this._boundaryElement&&(this._boundaryRect=de(this._boundaryElement));const p=this._previewTemplate;this._pickupPositionInElement=p&&p.template&&!p.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialClientRect,n,t);const m=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:m.x,y:m.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(n){ve(this._rootElement,!0,he),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 t=this._dropContainer,i=t.getItemIndex(this),s=this._getPointerPositionOnPage(n),a=this._getDragDistance(s),r=t._isOverContainer(s.x,s.y);this.ended.next({source:this,distance:a,dropPoint:s,event:n}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:r,distance:a,dropPoint:s,event:n}),t.drop(this,i,this._initialIndex,this._initialContainer,r,a,s),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:n,y:t},{x:i,y:s}){let a=this._initialContainer._getSiblingContainerFromPosition(this,n,t);!a&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(n,t)&&(a=this._initialContainer),a&&a!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=a,this._dropContainer.enter(this,n,t,a===this._initialContainer&&a.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:a,currentIndex:a.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,s),this._dropContainer._sortItem(this,n,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(n,t):this._applyPreviewTransform(n-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_createPreviewElement(){const n=this._previewTemplate,t=this.previewClass,i=n?n.template:null;let s;if(i&&n){const a=n.matchSize?this._initialClientRect:null,r=n.viewContainer.createEmbeddedView(i,n.context);r.detectChanges(),s=we(r,this._document),this._previewRef=r,n.matchSize?Ze(s,a):s.style.transform=$(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else s=Te(this._rootElement),Ze(s,this._initialClientRect),this._initialTransform&&(s.style.transform=this._initialTransform);return re(s.style,{"pointer-events":"none",margin:"0",position:"fixed",top:"0",left:"0","z-index":`${this._config.zIndex||1e3}`},he),q(s,!1),s.classList.add("cdk-drag-preview"),s.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(a=>s.classList.add(a)):s.classList.add(t)),s}_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 t=function ct(o){const n=getComputedStyle(o),t=le(n,"transition-property"),i=t.find(l=>"transform"===l||"all"===l);if(!i)return 0;const s=t.indexOf(i),a=le(n,"transition-duration"),r=le(n,"transition-delay");return Ce(a[s])+Ce(r[s])}(this._preview);return 0===t?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{const s=r=>{(!r||(0,T.sA)(r)===this._preview&&"transform"===r.propertyName)&&(this._preview?.removeEventListener("transitionend",s),i(),clearTimeout(a))},a=setTimeout(s,1.5*t);this._preview.addEventListener("transitionend",s)}))}_createPlaceholderElement(){const n=this._placeholderTemplate,t=n?n.template:null;let i;return t?(this._placeholderRef=n.viewContainer.createEmbeddedView(t,n.context),this._placeholderRef.detectChanges(),i=we(this._placeholderRef,this._document)):i=Te(this._rootElement),i.style.pointerEvents="none",i.classList.add("cdk-drag-placeholder"),i}_getPointerPositionInElement(n,t,i){const s=t===this._rootElement?null:t,a=s?s.getBoundingClientRect():n,r=Y(i)?i.targetTouches[0]:i,l=this._getViewportScrollPosition();return{x:a.left-n.left+(r.pageX-a.left-l.left),y:a.top-n.top+(r.pageY-a.top-l.top)}}_getPointerPositionOnPage(n){const t=this._getViewportScrollPosition(),i=Y(n)?n.touches[0]||n.changedTouches[0]||{pageX:0,pageY:0}:n,s=i.pageX-t.left,a=i.pageY-t.top;if(this._ownerSVGElement){const r=this._ownerSVGElement.getScreenCTM();if(r){const l=this._ownerSVGElement.createSVGPoint();return l.x=s,l.y=a,l.matrixTransform(r.inverse())}}return{x:s,y:a}}_getConstrainedPointerPosition(n){const t=this._dropContainer?this._dropContainer.lockAxis:null;let{x:i,y:s}=this.constrainPosition?this.constrainPosition(n,this,this._initialClientRect):n;if("x"===this.lockAxis||"x"===t?s=this._pickupPositionOnPage.y:("y"===this.lockAxis||"y"===t)&&(i=this._pickupPositionOnPage.x),this._boundaryRect){const{x:a,y:r}=this._pickupPositionInElement,l=this._boundaryRect,{width:d,height:c}=this._getPreviewRect(),p=l.top+r,m=l.bottom-(c-r);i=xe(i,l.left+a,l.right-(d-a)),s=xe(s,p,m)}return{x:i,y:s}}_updatePointerDirectionDelta(n){const{x:t,y:i}=n,s=this._pointerDirectionDelta,a=this._pointerPositionAtLastDirectionChange,r=Math.abs(t-a.x),l=Math.abs(i-a.y);return r>this._config.pointerDirectionChangeThreshold&&(s.x=t>a.x?1:-1,a.x=t),l>this._config.pointerDirectionChangeThreshold&&(s.y=i>a.y?1:-1,a.y=i),s}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const n=this._handles.length>0||!this.isDragging();n!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=n,q(this._rootElement,n))}_removeRootElementListeners(n){n.removeEventListener("mousedown",this._pointerDown,X),n.removeEventListener("touchstart",this._pointerDown,Ie),n.removeEventListener("dragstart",this._nativeDragStart,X)}_applyRootElementTransform(n,t){const i=$(n,t),s=this._rootElement.style;null==this._initialTransform&&(this._initialTransform=s.transform&&"none"!=s.transform?s.transform:""),s.transform=j(i,this._initialTransform)}_applyPreviewTransform(n,t){const i=this._previewTemplate?.template?void 0:this._initialTransform,s=$(n,t);this._preview.style.transform=j(s,i)}_getDragDistance(n){const t=this._pickupPositionOnPage;return t?{x:n.x-t.x,y:n.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:n,y:t}=this._passiveTransform;if(0===n&&0===t||this.isDragging()||!this._boundaryElement)return;const i=this._rootElement.getBoundingClientRect(),s=this._boundaryElement.getBoundingClientRect();if(0===s.width&&0===s.height||0===i.width&&0===i.height)return;const a=s.left-i.left,r=i.right-s.right,l=s.top-i.top,d=i.bottom-s.bottom;s.width>i.width?(a>0&&(n+=a),r>0&&(n-=r)):n=0,s.height>i.height?(l>0&&(t+=l),d>0&&(t-=d)):t=0,(n!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:n})}_getDragStartDelay(n){const t=this.dragStartDelay;return"number"==typeof t?t:Y(n)?t.touch:t?t.mouse:0}_updateOnScroll(n){const t=this._parentPositions.handleScroll(n);if(t){const i=(0,T.sA)(n);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&Q(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.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,T.kV)(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(n,t){const i=this._previewContainer||"global";if("parent"===i)return n;if("global"===i){const s=this._document;return t||s.fullscreenElement||s.webkitFullscreenElement||s.mozFullScreenElement||s.msFullscreenElement||s.body}return(0,g.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(t=>n.target&&(n.target===t||t.contains(n.target)))}}function $(o,n){return`translate3d(${Math.round(o)}px, ${Math.round(n)}px, 0)`}function xe(o,n,t){return Math.max(n,Math.min(t,o))}function Y(o){return"t"===o.type[0]}function we(o,n){const t=o.rootNodes;if(1===t.length&&t[0].nodeType===n.ELEMENT_NODE)return t[0];const i=n.createElement("div");return t.forEach(s=>i.appendChild(s)),i}function Ze(o,n){o.style.width=`${n.width}px`,o.style.height=`${n.height}px`,o.style.transform=$(n.left,n.top)}function Oe(o,n,t){const i=V(n,o.length-1),s=V(t,o.length-1);if(i===s)return;const a=o[i],r=s<i?-1:1;for(let l=i;l!==s;l+=r)o[l]=o[l+r];o[s]=a}function V(o,n){return Math.max(0,Math.min(n,o))}class gt{constructor(n,t){this._element=n,this._dragDropRegistry=t,this._itemPositions=[],this.orientation="vertical",this._previousSwap={drag:null,delta:0,overlaps:!1}}start(n){this.withItems(n)}sort(n,t,i,s){const a=this._itemPositions,r=this._getItemIndexFromPointerPosition(n,t,i,s);if(-1===r&&a.length>0)return null;const l="horizontal"===this.orientation,d=a.findIndex(S=>S.drag===n),c=a[r],m=c.clientRect,b=d>r?1:-1,A=this._getItemOffsetPx(a[d].clientRect,m,b),k=this._getSiblingOffsetPx(d,a,b),J=a.slice();return Oe(a,d,r),a.forEach((S,nn)=>{if(J[nn]===S)return;const et=S.drag===n,_e=et?A:k,tt=et?n.getPlaceholderElement():S.drag.getRootElement();S.offset+=_e,l?(tt.style.transform=j(`translate3d(${Math.round(S.offset)}px, 0, 0)`,S.initialTransform),Q(S.clientRect,0,_e)):(tt.style.transform=j(`translate3d(0, ${Math.round(S.offset)}px, 0)`,S.initialTransform),Q(S.clientRect,_e,0))}),this._previousSwap.overlaps=ce(m,t,i),this._previousSwap.drag=c.drag,this._previousSwap.delta=l?s.x:s.y,{previousIndex:d,currentIndex:r}}enter(n,t,i,s){const a=null==s||s<0?this._getItemIndexFromPointerPosition(n,t,i):s,r=this._activeDraggables,l=r.indexOf(n),d=n.getPlaceholderElement();let c=r[a];if(c===n&&(c=r[a+1]),!c&&(null==a||-1===a||a<r.length-1)&&this._shouldEnterAsFirstChild(t,i)&&(c=r[0]),l>-1&&r.splice(l,1),c&&!this._dragDropRegistry.isDragging(c)){const p=c.getRootElement();p.parentElement.insertBefore(d,p),r.splice(a,0,n)}else(0,g.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 t=n.getRootElement();if(t){const i=this._itemPositions.find(s=>s.drag===n)?.initialTransform;t.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,t){this._itemPositions.forEach(({clientRect:i})=>{Q(i,n,t)}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}_cacheItemPositions(){const n="horizontal"===this.orientation;this._itemPositions=this._activeDraggables.map(t=>{const i=t.getVisibleElement();return{drag:t,offset:0,initialTransform:i.style.transform||"",clientRect:de(i)}}).sort((t,i)=>n?t.clientRect.left-i.clientRect.left:t.clientRect.top-i.clientRect.top)}_getItemOffsetPx(n,t,i){const s="horizontal"===this.orientation;let a=s?t.left-n.left:t.top-n.top;return-1===i&&(a+=s?t.width-n.width:t.height-n.height),a}_getSiblingOffsetPx(n,t,i){const s="horizontal"===this.orientation,a=t[n].clientRect,r=t[n+-1*i];let l=a[s?"width":"height"]*i;if(r){const d=s?"left":"top",c=s?"right":"bottom";-1===i?l-=r.clientRect[d]-a[c]:l+=a[d]-r.clientRect[c]}return l}_shouldEnterAsFirstChild(n,t){if(!this._activeDraggables.length)return!1;const i=this._itemPositions,s="horizontal"===this.orientation;if(i[0].drag!==this._activeDraggables[0]){const r=i[i.length-1].clientRect;return s?n>=r.right:t>=r.bottom}{const r=i[0].clientRect;return s?n<=r.left:t<=r.top}}_getItemIndexFromPointerPosition(n,t,i,s){const a="horizontal"===this.orientation,r=this._itemPositions.findIndex(({drag:l,clientRect:d})=>{if(l===n)return!1;if(s){const c=a?s.x:s.y;if(l===this._previousSwap.drag&&this._previousSwap.overlaps&&c===this._previousSwap.delta)return!1}return a?t>=Math.floor(d.left)&&t<Math.floor(d.right):i>=Math.floor(d.top)&&i<Math.floor(d.bottom)});return-1!==r&&this._sortPredicate(r,n)?r:-1}}class mt{constructor(n,t,i,s,a){this._dragDropRegistry=t,this._ngZone=s,this._viewportRuler=a,this.disabled=!1,this.sortingDisabled=!1,this.autoScrollDisabled=!1,this.autoScrollStep=2,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.beforeStarted=new v.x,this.entered=new v.x,this.exited=new v.x,this.dropped=new v.x,this.sorted=new v.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 v.x,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),function st(o=0,n=nt.z){return o<0&&(o=0),(0,ot.H)(o,o,n)}(0,at.Z).pipe((0,O.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,g.fI)(n),this._document=i,this.withScrollableParents([this.element]),t.registerDropContainer(this),this._parentPositions=new ye(i),this._sortStrategy=new gt(this.element,t),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,t,i,s){this._draggingStarted(),null==s&&this.sortingDisabled&&(s=this._draggables.indexOf(n)),this._sortStrategy.enter(n,t,i,s),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,t,i,s,a,r,l,d={}){this._reset(),this.dropped.next({item:n,currentIndex:t,previousIndex:i,container:this,previousContainer:s,isPointerOverContainer:a,distance:r,dropPoint:l,event:d})}withItems(n){const t=this._draggables;return this._draggables=n,n.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(t.filter(s=>s.isDragging()).every(s=>-1===n.indexOf(s))?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 t=(0,g.fI)(this.element);return this._scrollableElements=-1===n.indexOf(t)?[t,...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,t,i,s){if(this.sortingDisabled||!this._clientRect||!be(this._clientRect,.05,t,i))return;const a=this._sortStrategy.sort(n,t,i,s);a&&this.sorted.next({previousIndex:a.previousIndex,currentIndex:a.currentIndex,container:this,item:n})}_startScrollingIfNecessary(n,t){if(this.autoScrollDisabled)return;let i,s=0,a=0;if(this._parentPositions.positions.forEach((r,l)=>{l===this._document||!r.clientRect||i||be(r.clientRect,.05,n,t)&&([s,a]=function _t(o,n,t,i){const s=ke(n,i),a=Ee(n,t);let r=0,l=0;if(s){const d=o.scrollTop;1===s?d>0&&(r=1):o.scrollHeight-d>o.clientHeight&&(r=2)}if(a){const d=o.scrollLeft;1===a?d>0&&(l=1):o.scrollWidth-d>o.clientWidth&&(l=2)}return[r,l]}(l,r.clientRect,n,t),(s||a)&&(i=l))}),!s&&!a){const{width:r,height:l}=this._viewportRuler.getViewportSize(),d={width:r,height:l,top:0,right:r,bottom:l,left:0};s=ke(d,t),a=Ee(d,n),i=window}i&&(s!==this._verticalScrollDirection||a!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=s,this._horizontalScrollDirection=a,this._scrollNode=i,(s||a)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){const n=(0,g.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,g.fI)(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(n).clientRect}_reset(){this._isDragging=!1;const n=(0,g.fI)(this.element).style;n.scrollSnapType=n.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(t=>t._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_isOverContainer(n,t){return null!=this._clientRect&&ce(this._clientRect,n,t)}_getSiblingContainerFromPosition(n,t,i){return this._siblings.find(s=>s._canReceive(n,t,i))}_canReceive(n,t,i){if(!this._clientRect||!ce(this._clientRect,t,i)||!this.enterPredicate(n,this))return!1;const s=this._getShadowRoot().elementFromPoint(t,i);if(!s)return!1;const a=(0,g.fI)(this.element);return s===a||a.contains(s)}_startReceiving(n,t){const i=this._activeSiblings;!i.has(n)&&t.every(s=>this.enterPredicate(s,this)||this._draggables.indexOf(s)>-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 t=this._parentPositions.handleScroll(n);t&&this._sortStrategy.updateOnScroll(t.top,t.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const n=(0,T.kV)((0,g.fI)(this.element));this._cachedShadowRoot=n||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){const n=this._sortStrategy.getActiveItemsSnapshot().filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,n))}}function ke(o,n){const{top:t,bottom:i,height:s}=o,a=.05*s;return n>=t-a&&n<=t+a?1:n>=i-a&&n<=i+a?2:0}function Ee(o,n){const{left:t,right:i,width:s}=o,a=.05*s;return n>=t-a&&n<=t+a?1:n>=i-a&&n<=i+a?2:0}const ee=(0,T.i$)({passive:!1,capture:!0});let ft=(()=>{class o{constructor(t,i){this._ngZone=t,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=[],this._globalListeners=new Map,this._draggingPredicate=s=>s.isDragging(),this.pointerMove=new v.x,this.pointerUp=new v.x,this.scroll=new v.x,this._preventDefaultWhileDragging=s=>{this._activeDragInstances.length>0&&s.preventDefault()},this._persistentTouchmoveListener=s=>{this._activeDragInstances.length>0&&(this._activeDragInstances.some(this._draggingPredicate)&&s.preventDefault(),this.pointerMove.next(s))},this._document=i}registerDropContainer(t){this._dropInstances.has(t)||this._dropInstances.add(t)}registerDragItem(t){this._dragInstances.add(t),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,ee)})}removeDropContainer(t){this._dropInstances.delete(t)}removeDragItem(t){this._dragInstances.delete(t),this.stopDragging(t),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,ee)}startDragging(t,i){if(!(this._activeDragInstances.indexOf(t)>-1)&&(this._activeDragInstances.push(t),1===this._activeDragInstances.length)){const s=i.type.startsWith("touch");this._globalListeners.set(s?"touchend":"mouseup",{handler:a=>this.pointerUp.next(a),options:!0}).set("scroll",{handler:a=>this.scroll.next(a),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:ee}),s||this._globalListeners.set("mousemove",{handler:a=>this.pointerMove.next(a),options:ee}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((a,r)=>{this._document.addEventListener(r,a.handler,a.options)})})}}stopDragging(t){const i=this._activeDragInstances.indexOf(t);i>-1&&(this._activeDragInstances.splice(i,1),0===this._activeDragInstances.length&&this._clearGlobalListeners())}isDragging(t){return this._activeDragInstances.indexOf(t)>-1}scrolled(t){const i=[this.scroll];return t&&t!==this._document&&i.push(new fe.y(s=>this._ngZone.runOutsideAngular(()=>{const r=l=>{this._activeDragInstances.length&&s.next(l)};return t.addEventListener("scroll",r,!0),()=>{t.removeEventListener("scroll",r,!0)}}))),(0,R.T)(...i)}ngOnDestroy(){this._dragInstances.forEach(t=>this.removeDragItem(t)),this._dropInstances.forEach(t=>this.removeDropContainer(t)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((t,i)=>{this._document.removeEventListener(i,t.handler,t.options)}),this._globalListeners.clear()}}return o.\u0275fac=function(t){return new(t||o)(e.LFG(e.R0b),e.LFG(_.K0))},o.\u0275prov=e.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();const vt={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let pe=(()=>{class o{constructor(t,i,s,a){this._document=t,this._ngZone=i,this._viewportRuler=s,this._dragDropRegistry=a}createDrag(t,i=vt){return new ut(t,i,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(t){return new mt(t,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}}return o.\u0275fac=function(t){return new(t||o)(e.LFG(_.K0),e.LFG(e.R0b),e.LFG(y.rL),e.LFG(ft))},o.\u0275prov=e.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();const Re=new e.OlP("CDK_DRAG_PARENT"),qe=new e.OlP("CdkDropListGroup"),Ue=new e.OlP("CDK_DRAG_CONFIG");let Ct=0;const Le=new e.OlP("CdkDropList");let bt=(()=>{class o{constructor(t,i,s,a,r,l,d){this.element=t,this._changeDetectorRef=s,this._scrollDispatcher=a,this._dir=r,this._group=l,this._destroyed=new v.x,this.connectedTo=[],this.id="cdk-drop-list-"+Ct++,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.dropped=new e.vpe,this.entered=new e.vpe,this.exited=new e.vpe,this.sorted=new e.vpe,this._unsortedItems=new Set,this._dropListRef=i.createDropList(t),this._dropListRef.data=this,d&&this._assignDefaults(d),this._dropListRef.enterPredicate=(c,p)=>this.enterPredicate(c.data,p.data),this._dropListRef.sortPredicate=(c,p,m)=>this.sortPredicate(c,p.data,m.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(t){this._dropListRef.disabled=this._disabled=(0,g.Ig)(t)}addItem(t){this._unsortedItems.add(t),this._dropListRef.isDragging()&&this._syncItemsWithRef()}removeItem(t){this._unsortedItems.delete(t),this._dropListRef.isDragging()&&this._syncItemsWithRef()}getSortedItems(){return Array.from(this._unsortedItems).sort((t,i)=>t._dragRef.getVisibleElement().compareDocumentPosition(i._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){const t=o._dropLists.indexOf(this);t>-1&&o._dropLists.splice(t,1),this._group&&this._group._items.delete(this),this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(t){this._dir&&this._dir.change.pipe((0,W.O)(this._dir.value),(0,O.R)(this._destroyed)).subscribe(i=>t.withDirection(i)),t.beforeStarted.subscribe(()=>{const i=(0,g.Eq)(this.connectedTo).map(s=>"string"==typeof s?o._dropLists.find(r=>r.id===s):s);if(this._group&&this._group._items.forEach(s=>{-1===i.indexOf(s)&&i.push(s)}),!this._scrollableParentsResolved){const s=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(a=>a.getElementRef().nativeElement);this._dropListRef.withScrollableParents(s),this._scrollableParentsResolved=!0}t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.sortingDisabled=(0,g.Ig)(this.sortingDisabled),t.autoScrollDisabled=(0,g.Ig)(this.autoScrollDisabled),t.autoScrollStep=(0,g.su)(this.autoScrollStep,2),t.connectedTo(i.filter(s=>s&&s!==this).map(s=>s._dropListRef)).withOrientation(this.orientation)})}_handleEvents(t){t.beforeStarted.subscribe(()=>{this._syncItemsWithRef(),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(i=>{this.entered.emit({container:this,item:i.item.data,currentIndex:i.currentIndex})}),t.exited.subscribe(i=>{this.exited.emit({container:this,item:i.item.data}),this._changeDetectorRef.markForCheck()}),t.sorted.subscribe(i=>{this.sorted.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:i.item.data})}),t.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(t){const{lockAxis:i,draggingDisabled:s,sortingDisabled:a,listAutoScrollDisabled:r,listOrientation:l}=t;this.disabled=s??!1,this.sortingDisabled=a??!1,this.autoScrollDisabled=r??!1,this.orientation=l||"vertical",i&&(this.lockAxis=i)}_syncItemsWithRef(){this._dropListRef.withItems(this.getSortedItems().map(t=>t._dragRef))}}return o._dropLists=[],o.\u0275fac=function(t){return new(t||o)(e.Y36(e.SBq),e.Y36(pe),e.Y36(e.sBO),e.Y36(y.mF),e.Y36(ae.Is,8),e.Y36(qe,12),e.Y36(Ue,8))},o.\u0275dir=e.lG2({type:o,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(t,i){2&t&&(e.uIk("id",i.id),e.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:[e._Bn([{provide:qe,useValue:void 0},{provide:Le,useExisting:o}])]}),o})();const Fe=new e.OlP("CdkDragHandle"),yt=new e.OlP("CdkDragPlaceholder"),Tt=new e.OlP("CdkDragPreview");let Dt=(()=>{class o{constructor(t,i,s,a,r,l,d,c,p,m,b){this.element=t,this.dropContainer=i,this._ngZone=a,this._viewContainerRef=r,this._dir=d,this._changeDetectorRef=p,this._selfHandle=m,this._parentDrag=b,this._destroyed=new v.x,this.started=new e.vpe,this.released=new e.vpe,this.ended=new e.vpe,this.entered=new e.vpe,this.exited=new e.vpe,this.dropped=new e.vpe,this.moved=new fe.y(A=>{const k=this._dragRef.moved.pipe((0,rt.U)(J=>({source:this,pointerPosition:J.pointerPosition,event:J.event,delta:J.delta,distance:J.distance}))).subscribe(A);return()=>{k.unsubscribe()}}),this._dragRef=c.createDrag(t,{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(t){this._disabled=(0,g.Ig)(t),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(t){this._dragRef.setFreeDragPosition(t)}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe((0,se.q)(1),(0,O.R)(this._destroyed)).subscribe(()=>{this._updateRootElement(),this._setupHandlesListener(),this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)})})}ngOnChanges(t){const i=t.rootElementSelector,s=t.freeDragPosition;i&&!i.firstChange&&this._updateRootElement(),s&&!s.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this);const t=o._dragInstances.indexOf(this);t>-1&&o._dragInstances.splice(t,1),this._ngZone.runOutsideAngular(()=>{this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_updateRootElement(){const t=this.element.nativeElement;let i=t;this.rootElementSelector&&(i=void 0!==t.closest?t.closest(this.rootElementSelector):t.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(i||t)}_getBoundaryElement(){const t=this.boundaryElement;return t?"string"==typeof t?this.element.nativeElement.closest(t):(0,g.fI)(t):null}_syncInputs(t){t.beforeStarted.subscribe(()=>{if(!t.isDragging()){const i=this._dir,s=this.dragStartDelay,a=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;t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.dragStartDelay="object"==typeof s&&s?s:(0,g.su)(s),t.constrainPosition=this.constrainPosition,t.previewClass=this.previewClass,t.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(a).withPreviewTemplate(r).withPreviewContainer(this.previewContainer||"global"),i&&t.withDirection(i.value)}}),t.beforeStarted.pipe((0,se.q)(1)).subscribe(()=>{if(this._parentDrag)return void t.withParent(this._parentDrag._dragRef);let i=this.element.nativeElement.parentElement;for(;i;){if(i.classList.contains("cdk-drag")){t.withParent(o._dragInstances.find(s=>s.element.nativeElement===i)?._dragRef||null);break}i=i.parentElement}})}_handleEvents(t){t.started.subscribe(i=>{this.started.emit({source:this,event:i.event}),this._changeDetectorRef.markForCheck()}),t.released.subscribe(i=>{this.released.emit({source:this,event:i.event})}),t.ended.subscribe(i=>{this.ended.emit({source:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(i=>{this.entered.emit({container:i.container.data,item:this,currentIndex:i.currentIndex})}),t.exited.subscribe(i=>{this.exited.emit({container:i.container.data,item:this})}),t.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(t){const{lockAxis:i,dragStartDelay:s,constrainPosition:a,previewClass:r,boundaryElement:l,draggingDisabled:d,rootElementSelector:c,previewContainer:p}=t;this.disabled=d??!1,this.dragStartDelay=s||0,i&&(this.lockAxis=i),a&&(this.constrainPosition=a),r&&(this.previewClass=r),l&&(this.boundaryElement=l),c&&(this.rootElementSelector=c),p&&(this.previewContainer=p)}_setupHandlesListener(){this._handles.changes.pipe((0,W.O)(this._handles),(0,lt.b)(t=>{const i=t.filter(s=>s._parentDrag===this).map(s=>s.element);this._selfHandle&&this.rootElementSelector&&i.push(this.element),this._dragRef.withHandles(i)}),(0,dt.w)(t=>(0,R.T)(...t.map(i=>i._stateChanges.pipe((0,W.O)(i))))),(0,O.R)(this._destroyed)).subscribe(t=>{const i=this._dragRef,s=t.element.nativeElement;t.disabled?i.disableHandle(s):i.enableHandle(s)})}}return o._dragInstances=[],o.\u0275fac=function(t){return new(t||o)(e.Y36(e.SBq),e.Y36(Le,12),e.Y36(_.K0),e.Y36(e.R0b),e.Y36(e.s_b),e.Y36(Ue,8),e.Y36(ae.Is,8),e.Y36(pe),e.Y36(e.sBO),e.Y36(Fe,10),e.Y36(Re,12))},o.\u0275dir=e.lG2({type:o,selectors:[["","cdkDrag",""]],contentQueries:function(t,i,s){if(1&t&&(e.Suo(s,Tt,5),e.Suo(s,yt,5),e.Suo(s,Fe,5)),2&t){let a;e.iGM(a=e.CRH())&&(i._previewTemplate=a.first),e.iGM(a=e.CRH())&&(i._placeholderTemplate=a.first),e.iGM(a=e.CRH())&&(i._handles=a)}},hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(t,i){2&t&&e.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:[e._Bn([{provide:Re,useExisting:o}]),e.TTD]}),o})(),Mt=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({providers:[pe],imports:[y.ZD]}),o})();var D=h(3154),U=h(7185),Ne=h(8002),B=h(1318);let It=(()=>{class o{constructor(t){this.httpService=t}getChannel(){return this.httpService.post("/api/Channel/GetChannel",{})}testShopID(t){return this.httpService.post("/api/Channel/TestShopID",t)}updateChannelIndex(t){return this.httpService.post("/api/Channel/UpdateChannelIndex",t)}deleteChannel(t){return this.httpService.post("/api/Channel/DeleteChannel",t)}}return o.\u0275fac=function(t){return new(t||o)(e.LFG(B.O))},o.\u0275prov=e.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();var te=h(266);function xt(o,n){1&o&&(e.TgZ(0,"a",12),e._uU(1,"Add"),e.qZA())}function wt(o,n){if(1&o){const t=e.EpF();e.ynx(0),e.TgZ(1,"button",13),e.NdJ("click",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.onSaveDragAndDrop())}),e._UZ(2,"i",14),e._uU(3,"Save Changes "),e.qZA(),e.BQk()}}function Zt(o,n){if(1&o){const t=e.EpF();e.TgZ(0,"button",13),e.NdJ("click",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.cdkDragDisabled=!s.cdkDragDisabled)}),e._UZ(1,"i",14),e._uU(2,"Sort "),e.qZA()}}function Ot(o,n){if(1&o&&(e.TgZ(0,"div"),e._uU(1," Expiration: "),e.TgZ(2,"span",32),e._uU(3),e.ALo(4,"date"),e.qZA()()),2&o){const t=e.oxw().$implicit;e.xp6(3),e.Oqu(e.xi3(4,1,null==t?null:t.ExpiredTime,"dd MMM yyyy"))}}function Pt(o,n){if(1&o&&(e.TgZ(0,"span",34)(1,"button",35),e._uU(2),e.qZA()()),2&o){const t=e.oxw(2).$implicit,i=e.oxw();e.Q6J("matTooltip",i.filterProductInventory(t.POSInventoryOutletArray,4,t.POSInventoryOutletArray.length)),e.xp6(2),e.hij(" ",t.POSInventoryOutletArray.length-3," ")}}function At(o,n){if(1&o&&(e.TgZ(0,"span",23),e._uU(1),e.YNc(2,Pt,3,2,"span",33),e.qZA()),2&o){const t=e.oxw().$implicit,i=e.oxw();e.xp6(1),e.hij(" ",i.filterProductInventory(t.POSInventoryOutletArray,1,3)," "),e.xp6(1),e.Q6J("ngIf",t.POSInventoryOutletArray.length>3)}}function kt(o,n){1&o&&(e.TgZ(0,"span",23),e._uU(1," [SUM All Outlet] "),e.qZA())}function Et(o,n){if(1&o&&(e.TgZ(0,"div",22),e._uU(1,"Additional Item: "),e.TgZ(2,"span",23),e._uU(3),e.qZA()()),2&o){const t=e.oxw().$implicit;e.xp6(3),e.hij(" ",null==t?null:t.Additionalitem,"")}}const P=function(o){return{"bg-gradient-warning":o}},Je=function(){return["/menu/channel/marketplace/view"]},He=function(o){return{ID:o}};function Rt(o,n){if(1&o){const t=e.EpF();e.TgZ(0,"tr",15)(1,"td",16)(2,"a",17),e._UZ(3,"img",18),e.qZA()(),e.TgZ(4,"td",19)(5,"a",17)(6,"span",20),e._uU(7),e.qZA()(),e._UZ(8,"br"),e._uU(9),e._UZ(10,"br"),e.qZA(),e.TgZ(11,"td",21)(12,"div",22),e._uU(13,"Sync Orders: "),e.TgZ(14,"span",23),e._uU(15),e.qZA()(),e.TgZ(16,"div",22),e._uU(17," Product Sync: "),e.TgZ(18,"span",23),e._uU(19),e.ALo(20,"date"),e.qZA()(),e.YNc(21,Ot,5,4,"div",24),e.qZA(),e.TgZ(22,"td",21)(23,"div",25),e._uU(24,"New Order To: "),e.TgZ(25,"span",23),e._uU(26),e.qZA()(),e.TgZ(27,"div",25),e._uU(28," Dispatch Orders From: "),e.TgZ(29,"span",23),e._uU(30),e.qZA()(),e.TgZ(31,"div",26),e._uU(32,"Product Inventory: "),e.YNc(33,At,3,2,"span",27),e.YNc(34,kt,2,0,"ng-template",null,28,e.W1O),e.qZA(),e.TgZ(36,"div",22),e._uU(37,"Minimum Inventory: "),e.TgZ(38,"span",23),e._uU(39),e.qZA()(),e.YNc(40,Et,4,1,"div",29),e.qZA(),e.TgZ(41,"td",21)(42,"div",30)(43,"div",25),e._uU(44,"Payment: "),e.TgZ(45,"span",23),e._uU(46),e.qZA()(),e.TgZ(47,"div",25),e._uU(48,"Tag: "),e.TgZ(49,"span",23),e._uU(50),e.qZA()(),e.TgZ(51,"div",25),e._uU(52,"Tax : "),e.TgZ(53,"span",23),e._uU(54),e.qZA()()()(),e.TgZ(55,"td")(56,"button",31),e.NdJ("click",function(){const a=e.CHM(t).$implicit,r=e.oxw();return e.KtG(r.onTestChannel(a))}),e._uU(57,"Test"),e.qZA()()()}if(2&o){const t=n.$implicit,i=e.MAs(35),s=e.oxw();e.Q6J("cdkDragDisabled",s.cdkDragDisabled)("matTooltip",null!=t&&t.isComplete?"":"Please complete your channel configuration"),e.xp6(1),e.Q6J("ngClass",e.VKq(32,P,s.isEmpty(null==t?null:t.isComplete))),e.xp6(1),e.Q6J("routerLink",e.DdM(34,Je))("queryParams",e.VKq(35,He,t.ID)),e.xp6(1),e.Q6J("src",s.getChannelLogo(null==t?null:t.TypeID),e.LSH),e.xp6(1),e.Q6J("ngClass",e.VKq(37,P,s.isEmpty(null==t?null:t.isComplete))),e.xp6(1),e.Q6J("routerLink",e.DdM(39,Je))("queryParams",e.VKq(40,He,t.ID)),e.xp6(2),e.Oqu(null==t?null:t.Name),e.xp6(2),e.hij(" ",null==t?null:t.URL," "),e.xp6(6),e.hij(" ",null==t?null:t.SyncOrder,""),e.xp6(4),e.Oqu(e.xi3(20,29,null==t?null:t.LastSync,"dd MMM yyyy HH:mm")),e.xp6(2),e.Q6J("ngIf",(0==t.TypeID||5==t.TypeID||6==t.TypeID)&&(null==t?null:t.ExpiredTime)),e.xp6(2),e.Q6J("ngClass",e.VKq(42,P,s.isEmpty(null==t?null:t.POSOutlet))),e.xp6(3),e.hij(" ",null==t?null:t.POSOutlet,""),e.xp6(1),e.Q6J("ngClass",e.VKq(44,P,s.isEmpty(null==t?null:t.POSDeliveryOutlet))),e.xp6(3),e.hij(" ",null==t?null:t.POSDeliveryOutlet,""),e.xp6(3),e.Q6J("ngIf",null==t?null:t.POSInventoryOutlet)("ngIfElse",i),e.xp6(6),e.hij(" ",null==t?null:t.MinimumInventory,""),e.xp6(1),e.Q6J("ngIf",null==t?null:t.Additionalitem),e.xp6(3),e.Q6J("ngClass",e.VKq(46,P,s.isEmpty(null==t?null:t.POSInvoicePaymentMethod))),e.xp6(3),e.Oqu(null==t?null:t.POSInvoicePaymentMethod),e.xp6(1),e.Q6J("ngClass",e.VKq(48,P,s.isEmpty(null==t?null:t.POSSalesOrderType))),e.xp6(3),e.hij(" ",null==t?null:t.POSSalesOrderType,""),e.xp6(1),e.Q6J("ngClass",e.VKq(50,P,s.isEmpty(null==t?null:t.POSTax))),e.xp6(3),e.Oqu(null!=t&&t.POSTax?null==t?null:t.POSTax:"-"),e.xp6(2),e.Q6J("hidden",4==(null==t?null:t.TypeID))}}let qt=(()=>{class o{constructor(t,i,s){this.toastr=t,this.konversi=i,this.channelService=s,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.channelService.getChannel().subscribe(t=>{this.channels=t.Data,this.checkFieldComplete()})}checkFieldComplete(){this.channels=this.channels.map(t=>(t.isComplete=!1,D.g.IsNotEmpty(t.POSOutlet)&&D.g.IsNotEmpty(t.POSTax)&&D.g.IsNotEmpty(t.POSInvoicePaymentMethod)&&D.g.IsNotEmpty(t.POSSalesOrderType)&&D.g.IsNotEmpty(t.POSDeliveryOutlet)&&(t.isComplete=!0),t))}isEmpty(t){return D.g.IsEmpty(t)}onTestChannel(t){this.channelService.testShopID(t).subscribe(i=>{this.channel(),this.showTostrSuccessTestShopID(i)})}showTostrSuccessTestShopID(t){let i="";for(var s in t)i+=s+" : "+t[s]+"<br/>";this.toastr.success(i,"Success",{enableHtml:!0,closeButton:!0,positionClass:"toast-bottom-right"})}onDeleteChannel(t){confirm("Want to delete?")&&this.channelService.deleteChannel(t).subscribe(s=>{this.channel()})}onDrop(t){Oe(this.channels,t.previousIndex,t.currentIndex)}onSaveDragAndDrop(){this.cdkDragDisabled=!0,this.channelService.updateChannelIndex(this.channels).subscribe({next:()=>{this.toastr.success("Channel list successfully saved","Success")}})}filterProductInventory(t,i,s){let a=t;return a=a.filter((l,d)=>(d+=1)>=i&&d<=s),a.join(", ")}getChannelLogo(t){return D.g.getChannelLogoByTypeId(t)}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(U._W),e.Y36(Ne.e),e.Y36(It))},o.\u0275cmp=e.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","matTooltip",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","matTooltip"],[1,"text-end",3,"ngClass"],[3,"routerLink","queryParams"],[2,"width","30px",3,"src"],[3,"ngClass"],[2,"font-size","16px"],[1,"vertical-align-top",2,"font-size","12px"],[1,"mb-3"],[2,"color","blue"],[4,"ngIf"],[1,"mb-3",3,"ngClass"],[1,"mb-3","d-flex","align-items-center"],["style","color: blue;",4,"ngIf","ngIfElse"],["SUM_Outlet",""],["class","mb-3",4,"ngIf"],[1,"d-inline-block","align-items-start"],[1,"btn","btn-outline-success","mb-3","ms-2","btn-sm",3,"hidden","click"],[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(t,i){if(1&t&&(e.TgZ(0,"mainpanel",0)(1,"actions"),e.YNc(2,xt,2,0,"a",1),e.YNc(3,wt,4,0,"ng-container",2),e.YNc(4,Zt,3,0,"ng-template",null,3,e.W1O),e.qZA(),e.TgZ(6,"content")(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"table",8)(12,"thead")(13,"tr",9),e._UZ(14,"th"),e.TgZ(15,"th"),e._uU(16,"Channel"),e.qZA(),e.TgZ(17,"th"),e._uU(18,"Sync Info"),e.qZA(),e.TgZ(19,"th"),e._uU(20,"POS Outlet"),e.qZA(),e.TgZ(21,"th"),e._uU(22,"POS Orders"),e.qZA(),e._UZ(23,"th"),e.qZA()(),e.TgZ(24,"tbody",10),e.NdJ("cdkDropListDropped",function(a){return i.onDrop(a)}),e.YNc(25,Rt,58,52,"tr",11),e.qZA()()()()()()()()),2&t){const s=e.MAs(5);e.Q6J("headerTitle","Marketplace")("pageData",i.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(2),e.Q6J("ngIf",i.setup),e.xp6(1),e.Q6J("ngIf",!i.cdkDragDisabled)("ngIfElse",s),e.xp6(22),e.Q6J("ngForOf",i.channels)}},dependencies:[_.mk,_.sg,_.O5,f.p,C.yS,bt,Dt,te.gM,_.uU],styles:[".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}table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] > td.vertical-align-top[_ngcontent-%COMP%]{vertical-align:inherit}"]}),o})();var L=h(8063);class Ut{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,this.ServiceFeeWriteOffReason="",this.ServiceFeeWriteOff=!1}}class ue{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 M=h(9521),I=h(3238),Lt=h(5017),ge=h(9549);const Ft=["*"],Qe=new e.OlP("MatChipRemove"),Ye=new e.OlP("MatChipAvatar"),Ve=new e.OlP("MatChipTrailingIcon");class Nt{constructor(n){this._elementRef=n}}const Jt=(0,I.sb)((0,I.pj)((0,I.Kr)(Nt),"primary"),-1);let ie=(()=>{class o extends Jt{constructor(t,i,s,a,r,l,d,c){super(t),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 v.x,this._onBlur=new v.x,this.selectionChange=new e.vpe,this.destroyed=new e.vpe,this.removed=new e.vpe,this._addHostClassName(),this._chipRippleTarget=l.createElement("div"),this._chipRippleTarget.classList.add("mat-chip-ripple"),this._elementRef.nativeElement.appendChild(this._chipRippleTarget),this._chipRipple=new I.IR(this,i,this._chipRippleTarget,s),this._chipRipple.setupTriggerEvents(t),this.rippleConfig=a||{},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(t){const i=(0,g.Ig)(t);i!==this._selected&&(this._selected=i,this._dispatchSelectionChange())}get value(){return void 0!==this._value?this._value:this._elementRef.nativeElement.textContent}set value(t){this._value=t}get selectable(){return this._selectable&&this.chipListSelectable}set selectable(t){this._selectable=(0,g.Ig)(t)}get disabled(){return this._chipListDisabled||this._disabled}set disabled(t){this._disabled=(0,g.Ig)(t)}get removable(){return this._removable}set removable(t){this._removable=(0,g.Ig)(t)}get ariaSelected(){return this.selectable&&(this._chipListMultiple||this.selected)?this.selected.toString():null}_addHostClassName(){const t="mat-basic-chip",i=this._elementRef.nativeElement;i.hasAttribute(t)||i.tagName.toLowerCase()===t?i.classList.add(t):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(t=!1){return this._selected=!this.selected,this._dispatchSelectionChange(t),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(t){this.disabled&&t.preventDefault()}_handleKeydown(t){if(!this.disabled)switch(t.keyCode){case M.yY:case M.ZH:this.remove(),t.preventDefault();break;case M.L_:this.selectable&&this.toggleSelected(!0),t.preventDefault()}}_blur(){this._ngZone.onStable.pipe((0,se.q)(1)).subscribe(()=>{this._ngZone.run(()=>{this._hasFocus=!1,this._onBlur.next({chip:this})})})}_dispatchSelectionChange(t=!1){this.selectionChange.emit({source:this,isUserInput:t,selected:this._selected})}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(e.SBq),e.Y36(e.R0b),e.Y36(T.t4),e.Y36(I.Y2,8),e.Y36(e.sBO),e.Y36(_.K0),e.Y36(e.QbO,8),e.$8M("tabindex"))},o.\u0275dir=e.lG2({type:o,selectors:[["mat-basic-chip"],["","mat-basic-chip",""],["mat-chip"],["","mat-chip",""]],contentQueries:function(t,i,s){if(1&t&&(e.Suo(s,Ye,5),e.Suo(s,Ve,5),e.Suo(s,Qe,5)),2&t){let a;e.iGM(a=e.CRH())&&(i.avatar=a.first),e.iGM(a=e.CRH())&&(i.trailingIcon=a.first),e.iGM(a=e.CRH())&&(i.removeIcon=a.first)}},hostAttrs:[1,"mat-chip","mat-focus-indicator"],hostVars:15,hostBindings:function(t,i){1&t&&e.NdJ("click",function(a){return i._handleClick(a)})("keydown",function(a){return i._handleKeydown(a)})("focus",function(){return i.focus()})("blur",function(){return i._blur()}),2&t&&(e.uIk("tabindex",i.disabled?null:i.tabIndex)("role",i.role)("disabled",i.disabled||null)("aria-disabled",i.disabled.toString())("aria-selected",i.ariaSelected),e.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:[e.qOj]}),o})(),Be=(()=>{class o{constructor(t,i){this._parentChip=t,"BUTTON"===i.nativeElement.nodeName&&i.nativeElement.setAttribute("type","button")}_handleClick(t){const i=this._parentChip;i.removable&&!i.disabled&&i.remove(),t.stopPropagation(),t.preventDefault()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(ie),e.Y36(e.SBq))},o.\u0275dir=e.lG2({type:o,selectors:[["","matChipRemove",""]],hostAttrs:[1,"mat-chip-remove","mat-chip-trailing-icon"],hostBindings:function(t,i){1&t&&e.NdJ("click",function(a){return i._handleClick(a)})},features:[e._Bn([{provide:Qe,useExisting:o}])]}),o})();const ze=new e.OlP("mat-chips-default-options"),Yt=(0,I.FD)(class{constructor(o,n,t,i){this._defaultErrorStateMatcher=o,this._parentForm=n,this._parentFormGroup=t,this.ngControl=i,this.stateChanges=new v.x}});let Vt=0;class Bt{constructor(n,t){this.source=n,this.value=t}}let Ke=(()=>{class o extends Yt{constructor(t,i,s,a,r,l,d){super(l,a,r,d),this._elementRef=t,this._changeDetectorRef=i,this._dir=s,this.controlType="mat-chip-list",this._lastDestroyedChipIndex=null,this._destroyed=new v.x,this._uid="mat-chip-list-"+Vt++,this._tabIndex=0,this._userTabIndex=null,this._onTouched=()=>{},this._onChange=()=>{},this._multiple=!1,this._compareWith=(c,p)=>c===p,this._disabled=!1,this.ariaOrientation="horizontal",this._selectable=!0,this.change=new e.vpe,this.valueChange=new e.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(t){this._explicitRole=t}get multiple(){return this._multiple}set multiple(t){this._multiple=(0,g.Ig)(t),this._syncChipsState()}get compareWith(){return this._compareWith}set compareWith(t){this._compareWith=t,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(t){this.writeValue(t),this._value=t}get id(){return this._chipInput?this._chipInput.id:this._uid}get required(){return this._required??this.ngControl?.control?.hasValidator(u.kI.required)??!1}set required(t){this._required=(0,g.Ig)(t),this.stateChanges.next()}get placeholder(){return this._chipInput?this._chipInput.placeholder:this._placeholder}set placeholder(t){this._placeholder=t,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(t){this._disabled=(0,g.Ig)(t),this._syncChipsState()}get selectable(){return this._selectable}set selectable(t){this._selectable=(0,g.Ig)(t),this.chips&&this.chips.forEach(i=>i.chipListSelectable=this._selectable)}set tabIndex(t){this._userTabIndex=t,this._tabIndex=t}get chipSelectionChanges(){return(0,R.T)(...this.chips.map(t=>t.selectionChange))}get chipFocusChanges(){return(0,R.T)(...this.chips.map(t=>t._onFocus))}get chipBlurChanges(){return(0,R.T)(...this.chips.map(t=>t._onBlur))}get chipRemoveChanges(){return(0,R.T)(...this.chips.map(t=>t.destroyed))}ngAfterContentInit(){this._keyManager=new oe.Em(this.chips).withWrap().withVerticalOrientation().withHomeAndEnd().withHorizontalOrientation(this._dir?this._dir.value:"ltr"),this._dir&&this._dir.change.pipe((0,O.R)(this._destroyed)).subscribe(t=>this._keyManager.withHorizontalOrientation(t)),this._keyManager.tabOut.pipe((0,O.R)(this._destroyed)).subscribe(()=>{this._allowFocusEscape()}),this.chips.changes.pipe((0,W.O)(null),(0,O.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 Lt.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(t){this._chipInput=t,this._elementRef.nativeElement.setAttribute("data-mat-chip-input",t.id)}setDescribedByIds(t){t.length?this._elementRef.nativeElement.setAttribute("aria-describedby",t.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}writeValue(t){this.chips&&this._setSelectionByValue(t,!1)}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t,this.stateChanges.next()}onContainerClick(t){this._originatesFromChip(t)||this.focus()}focus(t){this.disabled||this._chipInput&&this._chipInput.focused||(this.chips.length>0?(this._keyManager.setFirstItemActive(),this.stateChanges.next()):(this._focusInput(t),this.stateChanges.next()))}_focusInput(t){this._chipInput&&this._chipInput.focus(t)}_keydown(t){const i=t.target;i&&i.classList.contains("mat-chip")&&(this._keyManager.onKeydown(t),this.stateChanges.next())}_updateTabIndex(){this._tabIndex=this._userTabIndex||(0===this.chips.length?-1:0)}_updateFocusForDestroyedChips(){if(null!=this._lastDestroyedChipIndex)if(this.chips.length){const t=Math.min(this._lastDestroyedChipIndex,this.chips.length-1);this._keyManager.setActiveItem(t)}else this.focus();this._lastDestroyedChipIndex=null}_isValidIndex(t){return t>=0&&t<this.chips.length}_setSelectionByValue(t,i=!0){if(this._clearSelection(),this.chips.forEach(s=>s.deselect()),Array.isArray(t))t.forEach(s=>this._selectValue(s,i)),this._sortValues();else{const s=this._selectValue(t,i);s&&i&&this._keyManager.setActiveItem(s)}}_selectValue(t,i=!0){const s=this.chips.find(a=>null!=a.value&&this._compareWith(a.value,t));return s&&(i?s.selectViaInteraction():s.select(),this._selectionModel.select(s)),s}_initializeSelection(){Promise.resolve().then(()=>{(this.ngControl||this._value)&&(this._setSelectionByValue(this.ngControl?this.ngControl.value:this._value,!1),this.stateChanges.next())})}_clearSelection(t){this._selectionModel.clear(),this.chips.forEach(i=>{i!==t&&i.deselect()}),this.stateChanges.next()}_sortValues(){this._multiple&&(this._selectionModel.clear(),this.chips.forEach(t=>{t.selected&&this._selectionModel.select(t)}),this.stateChanges.next())}_propagateChanges(t){let i=null;i=Array.isArray(this.selected)?this.selected.map(s=>s.value):this.selected?this.selected.value:t,this._value=i,this.change.emit(new Bt(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(t=>{t.source.selected?this._selectionModel.select(t.source):this._selectionModel.deselect(t.source),this.multiple||this.chips.forEach(i=>{!this._selectionModel.isSelected(i)&&i.selected&&i.deselect()}),t.isUserInput&&this._propagateChanges()})}_listenToChipsFocus(){this._chipFocusSubscription=this.chipFocusChanges.subscribe(t=>{let i=this.chips.toArray().indexOf(t.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(t=>{const i=t.chip,s=this.chips.toArray().indexOf(t.chip);this._isValidIndex(s)&&i._hasFocus&&(this._lastDestroyedChipIndex=s)})}_originatesFromChip(t){let i=t.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(t=>t._hasFocus)}_syncChipsState(){this.chips&&this.chips.forEach(t=>{t._chipListDisabled=this._disabled,t._chipListMultiple=this.multiple})}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(e.SBq),e.Y36(e.sBO),e.Y36(ae.Is,8),e.Y36(u.F,8),e.Y36(u.sg,8),e.Y36(I.rD),e.Y36(u.a5,10))},o.\u0275cmp=e.Xpm({type:o,selectors:[["mat-chip-list"]],contentQueries:function(t,i,s){if(1&t&&e.Suo(s,ie,5),2&t){let a;e.iGM(a=e.CRH())&&(i.chips=a)}},hostAttrs:[1,"mat-chip-list"],hostVars:14,hostBindings:function(t,i){1&t&&e.NdJ("focus",function(){return i.focus()})("blur",function(){return i._blur()})("keydown",function(a){return i._keydown(a)}),2&t&&(e.Ikx("id",i._uid),e.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),e.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:[e._Bn([{provide:ge.Eo,useExisting:o}]),e.qOj],ngContentSelectors:Ft,decls:2,vars:0,consts:[[1,"mat-chip-list-wrapper"]],template:function(t,i){1&t&&(e.F$t(),e.TgZ(0,"div",0),e.Hsn(1),e.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})(),zt=0,Ge=(()=>{class o{constructor(t,i){this._elementRef=t,this._defaultOptions=i,this.focused=!1,this._addOnBlur=!1,this.separatorKeyCodes=this._defaultOptions.separatorKeyCodes,this.chipEnd=new e.vpe,this.placeholder="",this.id="mat-chip-list-input-"+zt++,this._disabled=!1,this.inputElement=this._elementRef.nativeElement}set chipList(t){t&&(this._chipList=t,this._chipList.registerInput(this))}get addOnBlur(){return this._addOnBlur}set addOnBlur(t){this._addOnBlur=(0,g.Ig)(t)}get disabled(){return this._disabled||this._chipList&&this._chipList.disabled}set disabled(t){this._disabled=(0,g.Ig)(t)}get empty(){return!this.inputElement.value}ngOnChanges(){this._chipList.stateChanges.next()}ngOnDestroy(){this.chipEnd.complete()}ngAfterContentInit(){this._focusLastChipOnBackspace=this.empty}_keydown(t){if(t){if(t.keyCode===M.Mf&&!(0,M.Vb)(t,"shiftKey")&&this._chipList._allowFocusEscape(),t.keyCode===M.ZH&&this._focusLastChipOnBackspace)return this._chipList._keyManager.setLastItemActive(),void t.preventDefault();this._focusLastChipOnBackspace=!1}this._emitChipEnd(t)}_keyup(t){!this._focusLastChipOnBackspace&&t.keyCode===M.ZH&&this.empty&&(this._focusLastChipOnBackspace=!0,t.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(t){!this.inputElement.value&&!!t&&this._chipList._keydown(t),(!t||this._isSeparatorKey(t))&&(this.chipEnd.emit({input:this.inputElement,value:this.inputElement.value,chipInput:this}),t?.preventDefault())}_onInput(){this._chipList.stateChanges.next()}focus(t){this.inputElement.focus(t)}clear(){this.inputElement.value="",this._focusLastChipOnBackspace=!0}_isSeparatorKey(t){return!(0,M.Vb)(t)&&new Set(this.separatorKeyCodes).has(t.keyCode)}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(e.SBq),e.Y36(ze))},o.\u0275dir=e.lG2({type:o,selectors:[["input","matChipInputFor",""]],hostAttrs:[1,"mat-chip-input","mat-input-element"],hostVars:5,hostBindings:function(t,i){1&t&&e.NdJ("keydown",function(a){return i._keydown(a)})("keyup",function(a){return i._keyup(a)})("blur",function(){return i._blur()})("focus",function(){return i._focus()})("input",function(){return i._onInput()}),2&t&&(e.Ikx("id",i.id),e.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:[e.TTD]}),o})(),Kt=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({providers:[I.rD,{provide:ze,useValue:{separatorKeyCodes:[M.K5]}}],imports:[I.BQ]}),o})();var We=h(7392);function Gt(o,n){if(1&o){const t=e.EpF();e.TgZ(0,"a",77),e.NdJ("click",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.Submit())}),e._uU(1,"Submit"),e.qZA()}}function Wt(o,n){1&o&&(e.TgZ(0,"div",78)(1,"span"),e._uU(2,"Channel name is required!"),e.qZA()())}function jt(o,n){if(1&o){const t=e.EpF();e.TgZ(0,"input",82),e.NdJ("ngModelChange",function(s){e.CHM(t);const a=e.oxw(2);return e.KtG(a.model.ShopID=s)}),e.qZA()}if(2&o){const t=e.oxw(2);e.Q6J("ngModel",t.model.ShopID)}}function Xt(o,n){if(1&o){const t=e.EpF();e.TgZ(0,"input",83),e.NdJ("ngModelChange",function(s){e.CHM(t);const a=e.oxw(2);return e.KtG(a.model.ShopIDString=s)}),e.qZA()}if(2&o){const t=e.oxw(2);e.Q6J("ngModel",t.model.ShopIDString)}}function $t(o,n){if(1&o&&(e.TgZ(0,"div",13),e.YNc(1,jt,1,1,"input",79),e.YNc(2,Xt,1,1,"input",80),e.TgZ(3,"label",81),e._uU(4,"Shop ID"),e.qZA()()),2&o){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",null==t.model.ShopIDString||""==t.model.ShopIDString),e.xp6(1),e.Q6J("ngIf",t.model.ShopIDString)}}function ei(o,n){1&o&&(e.TgZ(0,"span"),e._uU(1,"Please enter a valid URL!"),e.qZA())}function ti(o,n){if(1&o&&(e.TgZ(0,"div",78),e.YNc(1,ei,2,0,"span",61),e.qZA()),2&o){e.oxw();const t=e.MAs(36);e.xp6(1),e.Q6J("ngIf",t.errors.pattern)}}function ii(o,n){if(1&o){const t=e.EpF();e.TgZ(0,"div",12)(1,"div",13)(2,"input",84,85),e.NdJ("ngModelChange",function(s){e.CHM(t);const a=e.oxw();return e.KtG(a.model.ConsumerKey=s)}),e.qZA(),e.TgZ(4,"label",25),e._uU(5,"Consumer Key"),e.qZA()()()}if(2&o){const t=e.oxw();e.xp6(2),e.Q6J("ngModel",t.model.ConsumerKey)}}function ni(o,n){if(1&o){const t=e.EpF();e.TgZ(0,"div",12)(1,"div",13)(2,"input",86,87),e.NdJ("ngModelChange",function(s){e.CHM(t);const a=e.oxw();return e.KtG(a.model.ConsumerSecret=s)}),e.qZA(),e.TgZ(4,"label",25),e._uU(5,"Consumer Secret"),e.qZA()()()}if(2&o){const t=e.oxw();e.xp6(2),e.Q6J("ngModel",t.model.ConsumerSecret)}}function oi(o,n){1&o&&(e.TgZ(0,"p"),e._uU(1," Email is not valid "),e.qZA())}function si(o,n){if(1&o&&(e.TgZ(0,"div",88),e.YNc(1,oi,2,0,"p",61),e.qZA()),2&o){e.oxw();const t=e.MAs(103);e.xp6(1),e.Q6J("ngIf",t.errors.pattern)}}function ai(o,n){if(1&o){const t=e.EpF();e.TgZ(0,"mat-chip",89),e.NdJ("removed",function(){const a=e.CHM(t).$implicit,r=e.oxw();return e.KtG(r.removeAdditonalItem(a))}),e._uU(1),e.TgZ(2,"button",90)(3,"mat-icon"),e._uU(4,"cancel"),e.qZA()()()}if(2&o){const t=n.$implicit;e.xp6(1),e.hij(" ",t," ")}}const w=function(o){return{empty:o}},F=function(o){return{danger:o}};function ri(o,n){if(1&o){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",34)(2,"div",19)(3,"ng-select",91),e.NdJ("ngModelChange",function(s){e.CHM(t);const a=e.oxw();return e.KtG(a.model.ServiceFeeWriteOffReason=s)}),e.qZA(),e.TgZ(4,"label",92),e._uU(5,"Write Off Reason"),e.qZA()()(),e.BQk()}if(2&o){const t=e.oxw();e.xp6(2),e.Q6J("ngClass",e.VKq(4,w,t.isEmpty(t.model.ServiceFeeWriteOffReason))),e.xp6(1),e.Q6J("ngClass",e.VKq(6,F,t.isEmpty(t.model.ServiceFeeWriteOffReason)))("items",t.ListWriteOff)("ngModel",t.model.ServiceFeeWriteOffReason)}}function li(o,n){1&o&&(e.TgZ(0,"div",78)(1,"span"),e._uU(2,"Outlet is required!"),e.qZA()())}function di(o,n){1&o&&(e.TgZ(0,"div",78)(1,"span"),e._uU(2,"Outlet is required!"),e.qZA()())}function ci(o,n){1&o&&(e.TgZ(0,"div",78)(1,"span"),e._uU(2,"Payment Method is required!"),e.qZA()())}function hi(o,n){1&o&&(e.TgZ(0,"div",78)(1,"span"),e._uU(2,"Sales Orders is required!"),e.qZA()())}function pi(o,n){1&o&&(e.TgZ(0,"div",78)(1,"span"),e._uU(2,"Tax Type is required!"),e.qZA()())}const ui=function(o){return{"is-invalid border border-danger":o}},gi=function(){return{updateOn:"blur"}};let mi=(()=>{class o{constructor(t,i,s,a){this.http=i,this.service=s,this.Toastr=a,this.model=new Ut,this.form=new ue,this.loading=!1,this.ListCategory=[],this.ListWriteOff=[],this.advance=!1,this.additionalItems=[],this.advance=!1;let r=t.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(t){this.http.post("/api/ChannelLoader/GetPOSProperties",{ID:t}).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 t=this.model.Additionalitem;t&&(this.additionalItems=t.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(","),null!=this.model.MinimumInventory?null!=this.model.Index?!this.isEmpty(this.model.ShopID)||0!==this.model.TypeID&&5!==this.model.TypeID&&1!==this.model.TypeID?this.model.ServiceFeeWriteOff&&this.isEmpty(this.model.ServiceFeeWriteOffReason)?this.Toastr.error("Your write off reason is Empty, please fill the Write off reason","Error!"):(this.model.ServiceFeeWriteOff||(this.model.ServiceFeeWriteOffReason=null),this.http.post("/api/Channel/SubmitChannel",this.model).subscribe(t=>{this.Toastr.success("Successfully submitted the Channel","Success!"),this.service.navigate(["/menu/channel"])})):this.Toastr.error("Your Shop ID is Empty, please fill the shop ID","Error!"):this.Toastr.error("Index is mandatory","Error!"):this.Toastr.error("Your Minimum Inventory is Empty, please fill minimum inventory","Error!")}SubmitHost(){this.http.post("/api/Channel/SubmitConfig",this.form).subscribe(t=>{this.Toastr.success("Successfully submitted the Channel","Success!"),this.service.navigate(["/menu/channel"])})}Channel(){this.http.post("/api/Channel/GetChannel",{}).subscribe(t=>{this.List=t.Data})}changeOutlet(){this.model.SyncOrder=!D.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(t){const i=(t.value||"").trim();this.additionalItems.includes(i)||this.additionalItems.push(i),t.chipInput.clear()}removeAdditonalItem(t){const i=this.additionalItems.indexOf(t);i>=0&&this.additionalItems.splice(i,1)}isEmpty(t){return D.g.IsEmpty(t)}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(C.gz),e.Y36(B.O),e.Y36(C.F0),e.Y36(U._W))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-marketplace-form"]],decls:200,vars:94,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/channel",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],["role","button","class","btn btn-success btn-fill btn-lg text-white",3,"click",4,"ngIf"],[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"],["for","ServiceFeeWriteOff"],["name","ServiceFeeWriteOff",3,"ngModel","ngModelChange"],[1,"me-5",3,"value"],[4,"ngIf"],[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,"ngClass","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,"ngClass","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","ngClass","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","ngClass","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","ngClass","ngModel","ngModelChange"],["tax","ngModel"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"click"],[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"],["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",""],["id","outletOrder","clearable","true","bindLabel","Name","bindValue","Name","placeholder","Write Off Reason","data-toggle","tooltip","data-placement","top","matTooltip","Choose reason to writeoff","name","Outlet",1,"center-text","tall",3,"ngClass","items","ngModel","ngModelChange"],["for","ServiceFeeWriteOffReason"]],template:function(t,i){if(1&t&&(e.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),e._uU(3,"Cancel"),e.qZA(),e.YNc(4,Gt,2,0,"a",2),e.qZA(),e.TgZ(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"form",6,7)(11,"div",4)(12,"div",8)(13,"div",9)(14,"div",10)(15,"h3"),e._uU(16,"Marketplace Setup"),e.qZA()(),e.TgZ(17,"div",11)(18,"div",4)(19,"div",12)(20,"div",13)(21,"input",14,15),e.NdJ("ngModelChange",function(a){return i.model.Name=a}),e.qZA(),e.TgZ(23,"label",16),e._uU(24,"Name"),e.qZA()(),e.YNc(25,Wt,3,0,"div",17),e.qZA(),e.TgZ(26,"div",18)(27,"div",19)(28,"ng-select",20),e.NdJ("ngModelChange",function(a){return i.model.TypeID=a})("change",function(){return i.LoadCategory()}),e.qZA(),e.TgZ(29,"label",21),e._uU(30,"Type"),e.qZA()()(),e.TgZ(31,"div",12),e.YNc(32,$t,5,2,"div",22),e.qZA(),e.TgZ(33,"div",12)(34,"div",13)(35,"input",23,24),e.NdJ("ngModelChange",function(a){return i.model.URL=a}),e.qZA(),e.TgZ(37,"label",25),e._uU(38,"Marketplace URL"),e.qZA()(),e.YNc(39,ti,2,1,"div",17),e.qZA(),e.YNc(40,ii,6,1,"div",26),e.YNc(41,ni,6,1,"div",26),e.qZA()()()(),e.TgZ(42,"div",12)(43,"div",9)(44,"div",10)(45,"h3"),e._uU(46,"Sync"),e.qZA()(),e.TgZ(47,"div",11)(48,"div",4)(49,"div",8)(50,"div",27)(51,"label",28),e._uU(52,"Sync Order"),e.qZA(),e.TgZ(53,"div",29)(54,"mat-radio-group",30),e.NdJ("ngModelChange",function(a){return i.model.SyncOrder=a}),e.TgZ(55,"mat-radio-button",31),e._uU(56," No "),e.qZA(),e.TgZ(57,"mat-radio-button",32),e._uU(58," Yes "),e.qZA()()()()(),e.TgZ(59,"div",8)(60,"div",27)(61,"label",28),e._uU(62,"Sync Inventory"),e.qZA(),e.TgZ(63,"div",29)(64,"mat-radio-group",33),e.NdJ("ngModelChange",function(a){return i.model.SyncInventory=a}),e.TgZ(65,"mat-radio-button",31),e._uU(66," No "),e.qZA(),e.TgZ(67,"mat-radio-button",32),e._uU(68," Yes "),e.qZA()()()()()()()()(),e.TgZ(69,"div",12)(70,"div",9)(71,"div",10)(72,"h3"),e._uU(73,"Log"),e.qZA()(),e.TgZ(74,"div",11)(75,"div",4)(76,"div",34)(77,"div",35)(78,"label",36),e._uU(79,"Inventory Log Mode"),e.qZA(),e.TgZ(80,"div",29)(81,"mat-radio-group",37),e.NdJ("ngModelChange",function(a){return i.model.InventoryLog=a}),e.TgZ(82,"mat-radio-button",38),e._uU(83," None "),e.qZA(),e.TgZ(84,"mat-radio-button",39),e._uU(85," Error "),e.qZA(),e.TgZ(86,"mat-radio-button",40),e._uU(87," Full "),e.qZA()()()()()()()()(),e.TgZ(88,"div",41)(89,"div",9)(90,"div",42)(91,"h3"),e._uU(92,"Advance"),e.qZA()(),e.TgZ(93,"div",11)(94,"div",4)(95,"div",34)(96,"div",13)(97,"input",43),e.NdJ("ngModelChange",function(a){return i.model.Register=a}),e.qZA(),e.TgZ(98,"label",44),e._uU(99,"Register"),e.qZA()()(),e.TgZ(100,"div",8)(101,"div",13)(102,"input",45,46),e.NdJ("ngModelChange",function(a){return i.model.CustomerDefaultEmail=a}),e.qZA(),e.TgZ(104,"label",16),e._uU(105,"Customer Default Email"),e.qZA()(),e.YNc(106,si,2,1,"div",47),e.qZA(),e.TgZ(107,"div",8)(108,"div",13)(109,"input",48),e.NdJ("ngModelChange",function(a){return i.model.MinimumInventory=a}),e.qZA(),e.TgZ(110,"label",49),e._uU(111,"Minimum Inventory"),e.qZA()()(),e.TgZ(112,"div",50)(113,"mat-form-field",51)(114,"mat-label"),e._uU(115,"Additional Item"),e.qZA(),e.TgZ(116,"mat-chip-list",52,53),e.YNc(118,ai,5,1,"mat-chip",54),e.TgZ(119,"input",55),e.NdJ("matChipInputTokenEnd",function(a){return i.addAdditonalItem(a)}),e.qZA()()()(),e.TgZ(120,"div",8)(121,"div",13)(122,"input",56),e.NdJ("ngModelChange",function(a){return i.model.Index=a}),e.qZA(),e.TgZ(123,"label",57),e._uU(124,"Index"),e.qZA()()()()()()(),e.TgZ(125,"div",41)(126,"div",9)(127,"div",42)(128,"h3"),e._uU(129,"Service Fee Configuration"),e.qZA()(),e.TgZ(130,"div",11)(131,"div",4)(132,"div",8)(133,"div",27)(134,"label",58),e._uU(135,"Enable Write Off"),e.qZA(),e.TgZ(136,"div",29)(137,"mat-radio-group",59),e.NdJ("ngModelChange",function(a){return i.model.ServiceFeeWriteOff=a}),e.TgZ(138,"mat-radio-button",60),e._uU(139," No "),e.qZA(),e.TgZ(140,"mat-radio-button",60),e._uU(141," Yes "),e.qZA()()()()(),e.YNc(142,ri,6,8,"ng-container",61),e.qZA()()()()()()(),e.TgZ(143,"div",62)(144,"form")(145,"div",4)(146,"div",8)(147,"div",9)(148,"div",10)(149,"h3"),e._uU(150,"POS Outlet Configuration"),e.qZA()(),e.TgZ(151,"div",11)(152,"div",4)(153,"div",34)(154,"div",19)(155,"ng-select",63,64),e.NdJ("ngModelChange",function(a){return i.model.POSOutlet=a})("change",function(){return i.changeOutlet()}),e.qZA(),e.TgZ(157,"label",65),e._uU(158,"New Order To"),e.qZA()(),e.YNc(159,li,3,0,"div",17),e.qZA(),e.TgZ(160,"div",34)(161,"div",19)(162,"ng-select",66,67),e.NdJ("ngModelChange",function(a){return i.model.POSDeliveryOutlet=a}),e.qZA(),e.TgZ(164,"label",68),e._uU(165,"Dispatch Orders From"),e.qZA()(),e.YNc(166,di,3,0,"div",17),e.qZA(),e.TgZ(167,"div",34)(168,"div",13)(169,"ng-select",69),e.NdJ("ngModelChange",function(a){return i.model.POSInventoryOutletArray=a}),e.qZA(),e.TgZ(170,"label",70),e._uU(171,"Product Inventory"),e.qZA()()()()()()(),e.TgZ(172,"div",8)(173,"div",9)(174,"div",10)(175,"h3"),e._uU(176,"POS Orders Configuration"),e.qZA()(),e.TgZ(177,"div",11)(178,"div",4)(179,"div",34)(180,"div",19)(181,"ng-select",71,72),e.NdJ("ngModelChange",function(a){return i.model.POSInvoicePaymentMethod=a}),e.qZA(),e.TgZ(183,"label"),e._uU(184,"Payment Method"),e.qZA()(),e.YNc(185,ci,3,0,"div",17),e.qZA(),e.TgZ(186,"div",34)(187,"div",19)(188,"ng-select",73,74),e.NdJ("ngModelChange",function(a){return i.model.POSSalesOrderType=a}),e.qZA(),e.TgZ(190,"label"),e._uU(191,"Sales Orders Tag"),e.qZA()(),e.YNc(192,hi,3,0,"div",17),e.qZA(),e.TgZ(193,"div",34)(194,"div",19)(195,"ng-select",75,76),e.NdJ("ngModelChange",function(a){return i.model.POSTax=a}),e.qZA(),e.TgZ(197,"label"),e._uU(198,"Tax"),e.qZA()(),e.YNc(199,pi,3,0,"div",17),e.qZA()()()()()()()()()()()()),2&t){const s=e.MAs(22),a=e.MAs(36),r=e.MAs(103),l=e.MAs(117),d=e.MAs(156),c=e.MAs(163),p=e.MAs(182),m=e.MAs(189),b=e.MAs(196);e.Q6J("headerTitle","Configure Channel")("pageData",i.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(4),e.Q6J("ngIf",!s.invalid),e.xp6(17),e.Q6J("ngModel",i.model.Name),e.xp6(4),e.Q6J("ngIf",s.invalid&&(s.dirty||s.touched)),e.xp6(2),e.Q6J("ngClass",e.VKq(67,w,i.isEmpty(i.model.TypeID))),e.xp6(1),e.Q6J("items",i.TypeMarket)("ngModel",i.model.TypeID),e.xp6(4),e.Q6J("ngIf",2!=i.model.TypeID),e.xp6(3),e.Q6J("ngModel",i.model.URL),e.xp6(4),e.Q6J("ngIf",a.invalid&&(a.dirty||a.touched)),e.xp6(1),e.Q6J("ngIf",2==i.model.TypeID),e.xp6(1),e.Q6J("ngIf",2==i.model.TypeID),e.xp6(13),e.Q6J("ngModel",i.model.SyncOrder),e.xp6(1),e.Q6J("value",!1),e.xp6(2),e.Q6J("value",!0),e.xp6(7),e.Q6J("ngModel",i.model.SyncInventory),e.xp6(1),e.Q6J("value",!1),e.xp6(2),e.Q6J("value",!0),e.xp6(10),e.Q6J("ngClass",e.VKq(69,w,i.isEmpty(i.model.InventoryLog))),e.xp6(4),e.Q6J("ngModel",i.model.InventoryLog),e.xp6(1),e.Q6J("value",1),e.xp6(2),e.Q6J("value",2),e.xp6(2),e.Q6J("value",3),e.xp6(11),e.Q6J("ngModel",i.model.Register),e.xp6(5),e.Q6J("ngClass",e.VKq(71,ui,r.invalid))("ngModelOptions",e.DdM(73,gi))("ngModel",i.model.CustomerDefaultEmail),e.xp6(4),e.Q6J("ngIf",r.invalid&&(r.dirty||r.touched)),e.xp6(3),e.Q6J("ngModel",i.model.MinimumInventory),e.xp6(9),e.Q6J("ngForOf",i.additionalItems),e.xp6(1),e.Q6J("matChipInputFor",l)("matChipInputFor",l),e.xp6(3),e.Q6J("ngModel",i.model.Index),e.xp6(15),e.Q6J("ngModel",i.model.ServiceFeeWriteOff),e.xp6(1),e.Q6J("value",!1),e.xp6(2),e.Q6J("value",!0),e.xp6(2),e.Q6J("ngIf",i.model.ServiceFeeWriteOff),e.xp6(12),e.Q6J("ngClass",e.VKq(74,w,i.isEmpty(i.model.POSOutlet))),e.xp6(1),e.Q6J("ngClass",e.VKq(76,F,i.isEmpty(i.model.POSOutlet)))("items",i.ListOutlet)("ngModel",i.model.POSOutlet),e.xp6(4),e.Q6J("ngIf",d.invalid&&(d.dirty||d.touched)),e.xp6(2),e.Q6J("ngClass",e.VKq(78,w,i.isEmpty(i.model.POSDeliveryOutlet))),e.xp6(1),e.Q6J("ngClass",e.VKq(80,F,i.isEmpty(i.model.POSDeliveryOutlet)))("items",i.ListOutlet)("ngModel",i.model.POSDeliveryOutlet),e.xp6(4),e.Q6J("ngIf",c.invalid&&(c.dirty||c.touched)),e.xp6(3),e.Q6J("items",i.ListOutlet)("ngModel",i.model.POSInventoryOutletArray),e.xp6(11),e.Q6J("ngClass",e.VKq(82,w,i.isEmpty(i.model.POSInvoicePaymentMethod))),e.xp6(1),e.Q6J("items",i.ListPaymentMethod)("ngClass",e.VKq(84,F,i.isEmpty(i.model.POSInvoicePaymentMethod)))("ngModel",i.model.POSInvoicePaymentMethod),e.xp6(4),e.Q6J("ngIf",p.invalid&&(p.dirty||p.touched)),e.xp6(2),e.Q6J("ngClass",e.VKq(86,w,i.isEmpty(i.model.POSSalesOrderType))),e.xp6(1),e.Q6J("items",i.ListSalesType)("ngClass",e.VKq(88,F,i.isEmpty(i.model.POSSalesOrderType)))("ngModel",i.model.POSSalesOrderType),e.xp6(4),e.Q6J("ngIf",m.invalid&&(m.dirty||m.touched)),e.xp6(2),e.Q6J("ngClass",e.VKq(90,w,i.isEmpty(i.model.POSTax))),e.xp6(1),e.Q6J("items",i.ListTax)("ngClass",e.VKq(92,F,i.isEmpty(i.model.POSTax)))("ngModel",i.model.POSTax),e.xp6(4),e.Q6J("ngIf",b.invalid&&(b.dirty||b.touched))}},dependencies:[_.mk,_.sg,_.O5,u._Y,u.Fj,u.wV,u.JJ,u.JL,u.Q7,u.c5,u.on,u.On,u.F,f.p,Z.VQ,Z.U0,G.w9,C.yS,Ke,ie,Ge,Be,ge.KE,ge.hX,We.Hw,te.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:-10px!important} ng-select.multiple-select>div.ng-select-container input{padding-top:0!important} ng-select.danger>div.ng-select-container{background:repeating-linear-gradient(-60deg,#FCF3CF,#FCF3CF 15px,#F9E79F 15px,#F9E79F 30px)!important}"]}),o})();function _i(o,n){if(1&o&&(e.TgZ(0,"div",14)(1,"div",15)(2,"label"),e._uU(3,"Shop ID"),e.qZA(),e.TgZ(4,"div",35)(5,"span"),e._uU(6),e.qZA()()()()),2&o){const t=e.oxw(2);e.xp6(6),e.Oqu(0!=t.data.ShopID?t.data.ShopID:t.data.ShopIDString)}}function fi(o,n){1&o&&e._UZ(0,"a",41)}function vi(o,n){if(1&o){const t=e.EpF();e.TgZ(0,"a",42),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(3);return e.KtG(s.Authorize(s.data.TypeID))}),e.qZA()}}function Ci(o,n){if(1&o&&(e.TgZ(0,"div",14)(1,"div",15)(2,"label"),e._uU(3,"Expired Date"),e.qZA(),e.TgZ(4,"div",36)(5,"span",37),e._uU(6),e.ALo(7,"date"),e.ALo(8,"date"),e.qZA()(),e.TgZ(9,"div",38),e.YNc(10,fi,1,0,"a",39),e.YNc(11,vi,1,0,"a",40),e.qZA()()()),2&o){const t=e.oxw(2);e.xp6(6),e.hij(" ",t.data.ExpiredTime?e.xi3(7,4,t.data.ExpiredTime,"dd MMM yyyy HH:mm"):e.xi3(8,7,t.data.TokenExpired,"dd MMM yyyy HH:mm")," "),e.xp6(3),e.s9C("matTooltip",5==t.data.TypeID?"Extend Shopee Authorization Duration for an additional 1 year":"Update Token Expired date"),e.xp6(1),e.Q6J("ngIf",0==t.data.TypeID),e.xp6(1),e.Q6J("ngIf",5==t.data.TypeID||6==t.data.TypeID)}}function bi(o,n){if(1&o&&(e.TgZ(0,"div",14)(1,"div",15)(2,"label"),e._uU(3,"Consumer Key"),e.qZA(),e.TgZ(4,"div",43)(5,"span"),e._uU(6),e.qZA()()()()),2&o){const t=e.oxw(2);e.xp6(6),e.Oqu(t.data.ConsumerKey)}}function yi(o,n){if(1&o&&(e.TgZ(0,"div",14)(1,"div",15)(2,"label"),e._uU(3,"Consumer Secret"),e.qZA(),e.TgZ(4,"div",44)(5,"span"),e._uU(6),e.qZA()()()()),2&o){const t=e.oxw(2);e.xp6(6),e.Oqu(t.data.ConsumerSecret)}}function Ti(o,n){if(1&o&&(e.TgZ(0,"div",13)(1,"div",45)(2,"label"),e._uU(3,"Sync Order"),e.qZA(),e.TgZ(4,"div")(5,"span"),e._uU(6),e.qZA()()(),e.TgZ(7,"div",46)(8,"label"),e._uU(9,"Sync Inventory"),e.qZA(),e.TgZ(10,"div")(11,"span"),e._uU(12),e.qZA()()()()),2&o){const t=e.oxw(2);e.xp6(6),e.Oqu(t.data.SyncOrder),e.xp6(6),e.Oqu(t.data.SyncInventory)}}function Si(o,n){1&o&&(e.TgZ(0,"span"),e._uU(1,"None"),e.qZA())}function Di(o,n){1&o&&(e.TgZ(0,"span"),e._uU(1,"Error"),e.qZA())}function Mi(o,n){1&o&&(e.TgZ(0,"span"),e._uU(1,"Full"),e.qZA())}function Ii(o,n){if(1&o&&(e.TgZ(0,"div",13)(1,"div",47)(2,"label",48),e._uU(3,"Inventory Log"),e.qZA(),e.TgZ(4,"div"),e.YNc(5,Si,2,0,"span",32),e.YNc(6,Di,2,0,"span",32),e.YNc(7,Mi,2,0,"span",32),e.qZA()()()),2&o){const t=e.oxw(2);e.xp6(5),e.Q6J("ngIf",1==t.data.InventoryLog),e.xp6(1),e.Q6J("ngIf",2==t.data.InventoryLog),e.xp6(1),e.Q6J("ngIf",3==t.data.InventoryLog)}}function xi(o,n){if(1&o&&(e.ynx(0),e.TgZ(1,"div",15)(2,"label"),e._uU(3,"Write Off Reason"),e.qZA(),e.TgZ(4,"div")(5,"span"),e._uU(6),e.qZA()()(),e.BQk()),2&o){const t=e.oxw(2);e.xp6(6),e.Oqu(t.data.ServiceFeeWriteOffReason)}}const z=function(o){return{"input-danger":o}};function wi(o,n){if(1&o&&(e.TgZ(0,"div",13)(1,"div",49)(2,"label"),e._uU(3,"New Order To"),e.qZA(),e.TgZ(4,"div",50)(5,"span"),e._uU(6),e.qZA()()(),e.TgZ(7,"div",49)(8,"label"),e._uU(9,"Dispatch Orders From"),e.qZA(),e.TgZ(10,"div",51)(11,"span"),e._uU(12),e.qZA()()(),e.TgZ(13,"div",15)(14,"label"),e._uU(15,"Product Inventory"),e.qZA(),e.TgZ(16,"div",52)(17,"span"),e._uU(18),e.qZA()()()()),2&o){const t=e.oxw(2);e.xp6(1),e.Q6J("ngClass",e.VKq(5,z,t.isEmpty(t.data.POSOutlet))),e.xp6(5),e.Oqu(t.data.POSOutlet),e.xp6(1),e.Q6J("ngClass",e.VKq(7,z,t.isEmpty(t.data.POSDeliveryOutlet))),e.xp6(5),e.Oqu(t.data.POSDeliveryOutlet),e.xp6(6),e.Oqu(t.data.POSInventoryOutlet)}}function Zi(o,n){if(1&o&&(e.TgZ(0,"div",53)(1,"div",54)(2,"label"),e._uU(3,"Payment Method"),e.qZA(),e.TgZ(4,"div",55)(5,"span"),e._uU(6),e.qZA()()(),e.TgZ(7,"div",49)(8,"label"),e._uU(9,"Tag"),e.qZA(),e.TgZ(10,"div",56)(11,"span"),e._uU(12),e.qZA()()(),e.TgZ(13,"div",49)(14,"label"),e._uU(15,"Tax"),e.qZA(),e.TgZ(16,"div",57)(17,"span"),e._uU(18),e.qZA()()()()),2&o){const t=e.oxw(2);e.xp6(1),e.Q6J("ngClass",e.VKq(6,z,t.isEmpty(t.data.POSInvoicePaymentMethod))),e.xp6(5),e.Oqu(t.data.POSInvoicePaymentMethod),e.xp6(1),e.Q6J("ngClass",e.VKq(8,z,t.isEmpty(t.data.POSSalesOrderType))),e.xp6(5),e.Oqu(t.data.POSSalesOrderType),e.xp6(1),e.Q6J("ngClass",e.VKq(10,z,t.isEmpty(t.data.POSTax))),e.xp6(5),e.Oqu(t.data.POSTax)}}function Oi(o,n){if(1&o&&(e.TgZ(0,"div",7)(1,"div",8)(2,"div",9)(3,"div",8)(4,"div",10)(5,"div",11)(6,"div",12)(7,"h3"),e._uU(8,"Marketplace Setup"),e.qZA()(),e.TgZ(9,"div",13)(10,"div",8)(11,"div",14)(12,"div",15)(13,"label"),e._uU(14,"Name"),e.qZA(),e.TgZ(15,"div",16)(16,"span"),e._uU(17),e.qZA()()()(),e.TgZ(18,"div",17)(19,"div",15)(20,"label"),e._uU(21,"Type"),e.qZA(),e.TgZ(22,"div")(23,"span"),e._uU(24),e.qZA()()()(),e.YNc(25,_i,7,1,"div",18),e.YNc(26,Ci,12,10,"div",18),e.TgZ(27,"div",14)(28,"div",15)(29,"label"),e._uU(30,"Marketplace URL"),e.qZA(),e.TgZ(31,"div",19)(32,"span"),e._uU(33),e.qZA()()()(),e.TgZ(34,"div",14)(35,"div",15)(36,"label"),e._uU(37,"Product Sync"),e.qZA(),e.TgZ(38,"div",19)(39,"span"),e._uU(40),e.ALo(41,"date"),e.qZA()()()(),e.YNc(42,bi,7,1,"div",18),e.YNc(43,yi,7,1,"div",18),e.qZA()()()(),e.TgZ(44,"div",14)(45,"div",11)(46,"div",12)(47,"div",20)(48,"h3"),e._uU(49,"Sync"),e.qZA()()(),e.YNc(50,Ti,13,2,"div",21),e.qZA()(),e.TgZ(51,"div",14)(52,"div",11)(53,"div",12)(54,"div",20)(55,"h3"),e._uU(56,"Log"),e.qZA()()(),e.YNc(57,Ii,8,3,"div",21),e.qZA()(),e.TgZ(58,"div",22)(59,"div",11)(60,"div",23)(61,"h3"),e._uU(62,"Advance"),e.qZA()(),e.TgZ(63,"div",13)(64,"div",24)(65,"label"),e._uU(66,"Register"),e.qZA(),e.TgZ(67,"div")(68,"span"),e._uU(69),e.qZA()()(),e.TgZ(70,"div",15)(71,"label"),e._uU(72,"Customer Default Email"),e.qZA(),e.TgZ(73,"div",25)(74,"span"),e._uU(75),e.qZA()()(),e.TgZ(76,"div",26)(77,"label"),e._uU(78,"Minimum Inventory"),e.qZA(),e.TgZ(79,"div",27)(80,"span"),e._uU(81),e.ALo(82,"number"),e.qZA()()(),e.TgZ(83,"div",15)(84,"label"),e._uU(85,"Additional Item"),e.qZA(),e.TgZ(86,"div",28)(87,"span"),e._uU(88),e.qZA()()(),e.TgZ(89,"div",15)(90,"label"),e._uU(91,"Index"),e.qZA(),e.TgZ(92,"div",29)(93,"span"),e._uU(94),e.qZA()()()()()(),e.TgZ(95,"div",22)(96,"div",11)(97,"div",23)(98,"h3"),e._uU(99,"History"),e.qZA()(),e.TgZ(100,"div",13)(101,"div",30)(102,"label"),e._uU(103,"Created "),e.qZA(),e.TgZ(104,"div")(105,"span"),e._uU(106),e.ALo(107,"date"),e.qZA()()(),e.TgZ(108,"div",31)(109,"label"),e._uU(110,"Modified "),e.qZA(),e.TgZ(111,"div")(112,"span"),e._uU(113),e.ALo(114,"date"),e.qZA()()()()(),e.TgZ(115,"div",11)(116,"div",23)(117,"h3"),e._uU(118,"Service Fee Configuration"),e.qZA()(),e.TgZ(119,"div",13)(120,"div",15)(121,"label"),e._uU(122,"Enable Write Off"),e.qZA(),e.TgZ(123,"div")(124,"span"),e._uU(125),e.qZA()()(),e.YNc(126,xi,7,1,"ng-container",32),e.qZA()()()()(),e.TgZ(127,"div",33)(128,"div",8)(129,"div",10)(130,"div",11)(131,"div",12)(132,"h3"),e._uU(133,"POS Outlet Configuration"),e.qZA()(),e.YNc(134,wi,19,9,"div",21),e.qZA()(),e.TgZ(135,"div",10)(136,"div",11)(137,"div",12)(138,"div",20)(139,"h3"),e._uU(140,"POS Orders Configuration"),e.qZA()()(),e.YNc(141,Zi,19,12,"div",34),e.qZA()()()()()()),2&o){const t=e.oxw();e.xp6(17),e.Oqu(t.data.Name),e.xp6(7),e.Oqu(t.data.TypeString),e.xp6(1),e.Q6J("ngIf",2!=t.data.TypeID),e.xp6(1),e.Q6J("ngIf",0==t.data.TypeID||5==t.data.TypeID||6==t.data.TypeID),e.xp6(7),e.Oqu(t.data.URL),e.xp6(7),e.Oqu(t.data.LastSync?e.xi3(41,21,t.data.LastSync,"dd MMM yyyy HH:mm"):"-"),e.xp6(2),e.Q6J("ngIf",2==t.data.TypeID),e.xp6(1),e.Q6J("ngIf",2==t.data.TypeID),e.xp6(7),e.Q6J("ngIf",t.data),e.xp6(7),e.Q6J("ngIf",t.data),e.xp6(12),e.Oqu(null==t.data?null:t.data.Register),e.xp6(6),e.Oqu(null==t.data?null:t.data.CustomerDefaultEmail),e.xp6(6),e.Oqu(e.lcZ(82,24,null==t.data?null:t.data.MinimumInventory)),e.xp6(7),e.Oqu(null==t.data?null:t.data.Additionalitem),e.xp6(6),e.Oqu(null==t.data?null:t.data.Index),e.xp6(12),e.Oqu(e.xi3(107,26,t.data.Created,"dd MMM yyyy HH:mm")),e.xp6(7),e.Oqu(e.xi3(114,29,t.data.Modified,"dd MMM yyyy HH:mm")),e.xp6(12),e.Oqu(1==t.data.ServiceFeeWriteOff?"YES":"NO"),e.xp6(1),e.Q6J("ngIf",t.data.ServiceFeeWriteOff),e.xp6(8),e.Q6J("ngIf",t.data),e.xp6(7),e.Q6J("ngIf",t.data)}}const Pi=function(o){return{ID:o}},Ai=function(o){return["/menu/channel/marketplace/form",o]};let ki=(()=>{class o{constructor(t,i,s,a,r){this.route=t,this.http=i,this.router=s,this.toastr=a,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(s=>{this.toastr.success("Successfully cleared cache","Success",{closeButton:!0,positionClass:"toast-bottom-right"}),this.Load()})}Authorize(t){let i="";5==t&&(i="ChannelAuthorization/ShopeeV2_URL"),6==t&&(i="ChannelAuthorization/Tiktok_URL"),this.http.post(`/api/${i}`).subscribe(s=>{window.location.href=s.Url})}delete(t){confirm("Delete channel "+t.Name+" ?")&&this.http.post("/api/Channel/DeleteChannel",{ID:t.ID}).subscribe(a=>{this.toastr.success("Channel "+t.Name+" is deleted!","Success",{closeButton:!0,positionClass:"toast-bottom-right"}),this.router.navigate(["menu/channel"])})}isEmpty(t){return D.g.IsEmpty(t)}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(C.gz),e.Y36(B.O),e.Y36(C.F0),e.Y36(U._W),e.Y36(Ne.e))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-marketplace-view"]],decls:11,vars:12,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["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"],[4,"ngIf"],[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"],[1,"info-label-group",3,"ngClass"],["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",3,"ngClass"],["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"]],template:function(t,i){1&t&&(e.TgZ(0,"mainpanel",0)(1,"actions")(2,"div",1)(3,"a",2),e._UZ(4,"i",3),e._uU(5,"Configure"),e.qZA(),e.TgZ(6,"a",4),e.NdJ("click",function(){return i.delete(i.data)}),e._UZ(7,"i",5),e._uU(8," Delete"),e.qZA()()(),e.TgZ(9,"content"),e.YNc(10,Oi,142,32,"div",6),e.qZA()()),2&t&&(e.Q6J("headerTitle","Marketplace Configuration View")("pageData",i.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(3),e.Q6J("hidden",!i.Setup)("routerLink",e.VKq(10,Ai,e.VKq(8,Pi,null==i.data?null:i.data.ID))),e.xp6(3),e.Q6J("hidden",!i.Setup),e.xp6(4),e.Q6J("ngIf",i.data))},dependencies:[_.mk,_.O5,f.p,C.yS,te.gM,_.JJ,_.uU],styles:[".input-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#FCF3CF,#FCF3CF 15px,#F9E79F 15px,#F9E79F 30px)!important}"]}),o})();var ne=h(6779),N=h(5412),me=h(6401);function Ei(o,n){1&o&&(e.TgZ(0,"p"),e._uU(1," URL is required "),e.qZA())}function Ri(o,n){if(1&o&&(e.TgZ(0,"div",13),e.YNc(1,Ei,2,0,"p",14),e.qZA()),2&o){e.oxw();const t=e.MAs(10);e.xp6(1),e.Q6J("ngIf",t.errors.required)}}function qi(o,n){1&o&&(e.TgZ(0,"p"),e._uU(1," Email is required "),e.qZA())}function Ui(o,n){1&o&&(e.TgZ(0,"p"),e._uU(1," Email is not valid "),e.qZA())}function Li(o,n){if(1&o&&(e.TgZ(0,"div",13),e.YNc(1,qi,2,0,"p",14),e.YNc(2,Ui,2,0,"p",14),e.qZA()),2&o){e.oxw();const t=e.MAs(16);e.xp6(1),e.Q6J("ngIf",t.errors.required),e.xp6(1),e.Q6J("ngIf",t.errors.pattern)}}const Fi=function(o){return{invalid:o}},Ni=function(){return{updateOn:"blur"}};let Ji=(()=>{class o{constructor(t){this.dialogRef=t}ngOnInit(){this.data={},this.initModalConfig()}initModalConfig(){this.modalConfig=new ne.O,this.modalConfig.title="Fill data for Customer Support"}onSubmit(){this.dialogRef.close(this.data)}onClose(){this.dialogRef.close()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(N.so))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-contact-support"]],decls:18,vars:11,consts:[[3,"dynamicValidated","config","onClose","onCancel","onOk"],["content",""],[1,"mx-4"],["for","customerURL"],[1,"input-group","mb-5"],[1,"input-group-prepend"],["id","tokopediaUrl",1,"border-start-0","rounded-start","input-group-text","pointer-default","bg-light",2,"height","58px",3,"ngClass"],["required","","type","text","id","customerURL","name","customerURL","data-toggle","tooltip","title","customerURL",1,"form-control","border-start-0","customerUrl",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,"text-danger"],[4,"ngIf"]],template:function(t,i){if(1&t&&(e.TgZ(0,"modal-material",0),e.NdJ("onClose",function(){return i.onClose()})("onCancel",function(){return i.onClose()})("onOk",function(){return i.onSubmit()}),e.TgZ(1,"div",1)(2,"div",2)(3,"label",3),e._uU(4,"Tokopedia URL"),e.qZA(),e.TgZ(5,"div",4)(6,"div",5)(7,"span",6),e._uU(8,"https://tokopedia.com/"),e.qZA()(),e.TgZ(9,"input",7,8),e.NdJ("ngModelChange",function(a){return i.data.URL=a}),e.qZA()(),e.YNc(11,Ri,2,1,"div",9),e.TgZ(12,"label",10),e._uU(13,"Requester's Email"),e.qZA(),e.TgZ(14,"div",4)(15,"input",11,12),e.NdJ("ngModelChange",function(a){return i.data.Email=a}),e.qZA()(),e.YNc(17,Li,3,2,"div",9),e.qZA()()()),2&t){const s=e.MAs(10),a=e.MAs(16);e.Q6J("dynamicValidated",!s.invalid&&!a.invalid)("config",i.modalConfig),e.xp6(7),e.Q6J("ngClass",e.VKq(8,Fi,s.invalid&&(s.dirty||s.touched))),e.xp6(2),e.Q6J("ngModel",i.data.URL),e.xp6(2),e.Q6J("ngIf",s.invalid&&(s.dirty||s.touched)),e.xp6(4),e.Q6J("ngModel",i.data.Email)("ngModelOptions",e.DdM(10,Ni)),e.xp6(2),e.Q6J("ngIf",a.invalid&&(a.dirty||a.touched))}},dependencies:[_.mk,_.O5,u.Fj,u.JJ,u.Q7,u.c5,u.On,me.M],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}.input-group[_ngcontent-%COMP%] > input.customerUrl[_ngcontent-%COMP%]{border-top-left-radius:0!important;border-bottom-left-radius:0!important}.invalid[_ngcontent-%COMP%]{border-color:#fb404b}.pointer-default[_ngcontent-%COMP%]{cursor:default}"]}),o})(),je=(()=>{class o{constructor(t,i){this.dialogRef=t,this.data=i}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new ne.O,this.modalConfig.title=this.data?.title,this.modalConfig.okText="SAVE"}onSubmit(){this.dialogRef.close(this.data)}onClose(){this.dialogRef.close()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(N.so),e.Y36(N.WI))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-modal-dialog-tokopedia"]],decls:7,vars:3,consts:[[3,"dynamicValidated","config","onClose","onCancel","onOk"],["content",""],[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"]],template:function(t,i){1&t&&(e.TgZ(0,"modal-material",0),e.NdJ("onClose",function(){return i.onClose()})("onCancel",function(){return i.onClose()})("onOk",function(){return i.onSubmit()}),e.TgZ(1,"div",1)(2,"div",2)(3,"input",3,4),e.NdJ("ngModelChange",function(a){return i.data.ShopID=a}),e.qZA(),e.TgZ(5,"label",5),e._uU(6,"Shop ID"),e.qZA()()()()),2&t&&(e.Q6J("dynamicValidated",i.data.ShopID)("config",i.modalConfig),e.xp6(3),e.Q6J("ngModel",i.data.ShopID))},dependencies:[u.Fj,u.JJ,u.On,me.M],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})(),Hi=(()=>{class o{constructor(t,i){this.dialogRef=t,this.data=i,this.modalConfig=new ne.O}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new ne.O,this.modalConfig.title="WooCommerce",this.modalConfig.okText="SAVE"}onSubmit(){this.data.TypeID=2,this.dialogRef.close(this.data)}onClose(){this.dialogRef.close()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(N.so),e.Y36(N.WI))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-modal-dialog-woocommerce"]],decls:17,vars:5,consts:[[3,"dynamicValidated","config","onClose","onCancel","onOk"],["content",""],[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"]],template:function(t,i){1&t&&(e.TgZ(0,"modal-material",0),e.NdJ("onClose",function(){return i.onClose()})("onCancel",function(){return i.onClose()})("onOk",function(){return i.onSubmit()}),e.TgZ(1,"div",1)(2,"div",2)(3,"input",3,4),e.NdJ("ngModelChange",function(a){return i.data.URL=a}),e.qZA(),e.TgZ(5,"label",5),e._uU(6,"URL"),e.qZA()(),e.TgZ(7,"div",2)(8,"input",6,4),e.NdJ("ngModelChange",function(a){return i.data.ConsumerKey=a}),e.qZA(),e.TgZ(10,"label",7),e._uU(11,"Consumer Key"),e.qZA()(),e.TgZ(12,"div",2)(13,"input",8,4),e.NdJ("ngModelChange",function(a){return i.data.ConsumerSecret=a}),e.qZA(),e.TgZ(15,"label",9),e._uU(16,"Consumer Secret"),e.qZA()()()()),2&t&&(e.Q6J("dynamicValidated",i.data.ConsumerKey&&i.data.URL&&i.data.ConsumerSecret)("config",i.modalConfig),e.xp6(3),e.Q6J("ngModel",i.data.URL),e.xp6(5),e.Q6J("ngModel",i.data.ConsumerKey),e.xp6(5),e.Q6J("ngModel",i.data.ConsumerSecret))},dependencies:[u.Fj,u.JJ,u.On,me.M],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 Qi=h(9300),Xe=h(455);function Yi(o,n){if(1&o){const t=e.EpF();e.TgZ(0,"div",3)(1,"div",4)(2,"div",5)(3,"div",26)(4,"span"),e._uU(5,"BETA"),e.qZA()(),e.TgZ(6,"div",6),e._UZ(7,"img",27),e.qZA(),e.TgZ(8,"div",8)(9,"div",9)(10,"p"),e._uU(11,"Authorize DEALPOS to manage your KALCare Shop. You will need to fill your KALCare ShopID."),e.qZA(),e.TgZ(12,"p"),e._uU(13,"Please request your shopID by "),e.TgZ(14,"a",28),e._uU(15,"contacting"),e.qZA(),e._uU(16," the KALCare team"),e.qZA()(),e.TgZ(17,"button",29),e.NdJ("click",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.openKalcareDialog())}),e._uU(18,"Submit Shop ID"),e.qZA()()()()()}}let Vi=(()=>{class o{constructor(t,i,s,a,r){this.route=t,this.http=i,this.service=s,this.dialog=a,this.toastr=r,this.newFeatureVisible=!1}saveTokopedia(){let t={ShopID:Number(this.shopID)};this.http.post("/api/ChannelAdd/Tokopedia",t).subscribe(i=>{this.service.navigate(["/menu/channel"])})}saveWooCommerce(t){this.http.post("/api/ChannelAdd/AddWooCommerce",t).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(t=>{window.location.href=t.Url})}tiktokAuthorize(){this.http.post("/api/ChannelAuthorization/Tiktok_URL").subscribe(t=>{window.location.href=t.Url})}lazadaAuthorize(){this.http.post("/api/ChannelAuthorization/Lazada_URL").subscribe(t=>{window.location.href=t.Url})}openTokopediaDialog(){this.dialog.open(je,{data:{title:"Tokopedia",ShopID:this.shopID},width:"30%"}).afterClosed().subscribe(i=>{null!=i&&(this.shopID=i.ShopID,this.saveTokopedia())})}openKalcareDialog(){this.dialog.open(je,{data:{title:"KAL Care",ShopID:this.shopIDString},width:"30%"}).afterClosed().subscribe(i=>{null!=i&&(this.shopIDString=i.ShopID,this.saveKalCare())})}openWooCommerceDialog(){this.dialog.open(Hi,{data:{ShopID:this.shopID},width:"30%"}).afterClosed().pipe((0,Qi.h)(i=>D.g.IsNotEmpty(i))).subscribe(i=>{this.saveWooCommerce(i)})}contactSupport(){this.dialog.open(Ji,{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:a=>{console.log("Failed to submit customer support!",a)}})}})}onToggleNewVersion(t){this.newFeatureVisible=t}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(C.gz),e.Y36(B.O),e.Y36(C.F0),e.Y36(N.uw),e.Y36(U._W))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-marketplace-add"]],decls:77,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"],["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"],["class","row mt-12",4,"ngIf"],[1,"p-5","text-start"],[3,"change"],[1,"ribbon","ribbon-top-right"],["src","data:image/png;base64,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",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"]],template:function(t,i){1&t&&(e.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),e._uU(3,"Cancel"),e.qZA()(),e.TgZ(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6),e._UZ(10,"img",7),e.qZA(),e.TgZ(11,"div",8)(12,"div",9)(13,"p"),e._uU(14,"Authorize DEALPOS versi V2 to manage your shopee, you will be redirected to shopee website to complete this process."),e.qZA(),e.TgZ(15,"p"),e._uU(16,"You will need to sign in to Shopee using your Seller account and confirm the authorization."),e.qZA()(),e.TgZ(17,"a",10),e.NdJ("click",function(){return i.shopeeAuthorize()}),e._uU(18,"Authorize Account"),e.qZA()()()(),e.TgZ(19,"div",11)(20,"div",12)(21,"div",6),e._UZ(22,"img",13),e.qZA(),e.TgZ(23,"div",8)(24,"div",9)(25,"p"),e._uU(26,"Authorize DEALPOS to manage your tokopedia, please "),e.TgZ(27,"a",14),e.NdJ("click",function(){return i.contactSupport()}),e._uU(28,"contact our customer support"),e.qZA(),e._uU(29," to complete this process."),e.qZA(),e.TgZ(30,"p"),e._uU(31,"Our team will send an invitation email which needs to be approved."),e.qZA()(),e.TgZ(32,"button",15),e.NdJ("click",function(){return i.openTokopediaDialog()}),e._uU(33,"Submit Shop ID"),e.qZA()()()(),e.TgZ(34,"div",11)(35,"div",12)(36,"div",6),e._UZ(37,"img",16),e.qZA(),e.TgZ(38,"div",8)(39,"div",9)(40,"p"),e._uU(41,"Authorize DEALPOS to manage your Personal Website"),e.qZA(),e.TgZ(42,"p"),e._uU(43,"Configure woocommerce integration by visiting "),e.TgZ(44,"a",17),e._uU(45,"this article"),e.qZA()()(),e.TgZ(46,"button",18),e.NdJ("click",function(){return i.openWooCommerceDialog()}),e._uU(47,"Register"),e.qZA()()()()(),e.TgZ(48,"div",3)(49,"div",4)(50,"div",12)(51,"div",6),e._UZ(52,"img",19),e.qZA(),e.TgZ(53,"div",8)(54,"div",9)(55,"p"),e._uU(56,"Authorize DEALPOS to manage your Tiktok Seller, you will be redirected to Tiktok website to complete this process."),e.qZA(),e.TgZ(57,"p"),e._uU(58,"You will need to sign in to Tiktok using your Seller account and confirm the authorization."),e.qZA()(),e.TgZ(59,"a",20),e.NdJ("click",function(){return i.tiktokAuthorize()}),e._uU(60,"Authorize Account"),e.qZA()()()(),e.TgZ(61,"div",11)(62,"div",5)(63,"div",6),e._UZ(64,"img",21),e.qZA(),e.TgZ(65,"div",8)(66,"div",9)(67,"p"),e._uU(68,"Authorize DEALPOS versi V2 to manage your lazada, you will be redirected to lazada website to complete this process."),e.qZA(),e.TgZ(69,"p"),e._uU(70,"You will need to sign in to Lazada using your Seller account and confirm the authorization."),e.qZA()(),e.TgZ(71,"a",22),e.NdJ("click",function(){return i.lazadaAuthorize()}),e._uU(72,"Authorize Account"),e.qZA()()()()(),e.YNc(73,Yi,19,0,"div",23),e.qZA(),e.TgZ(74,"div",24)(75,"mat-slide-toggle",25),e.NdJ("change",function(a){return i.onToggleNewVersion(a.checked)}),e._uU(76,"Show Beta Channel Integration "),e.qZA()()()()),2&t&&(e.Q6J("headerTitle","Add New Channel")("pageData",i.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(73),e.Q6J("ngIf",i.newFeatureVisible))},dependencies:[_.O5,f.p,C.yS,Xe.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})(),$e=(()=>{class o{constructor(t){this.httpService=t}getLoader(){return this.httpService.post("/api/ChannelLoader/GetConfig",{})}submitConfig(t){return this.httpService.post("/api/Channel/SubmitConfig",t)}testChannel(t){return this.httpService.post("/api/POSAccount/Test",t)}refreshToken(t){return this.httpService.post("/api/POSAccount/Remove",t)}}return o.\u0275fac=function(t){return new(t||o)(e.LFG(B.O))},o.\u0275prov=e.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();const Bi=function(){return["/menu/channel/pos/edit"]};function Ki(o,n){if(1&o){const t=e.EpF();e.TgZ(0,"div",16)(1,"label",17),e._uU(2,"Include Parent"),e.qZA(),e.TgZ(3,"div",18)(4,"mat-radio-group",19),e.NdJ("ngModelChange",function(s){e.CHM(t);const a=e.oxw();return e.KtG(a.form.IncludeParentInventory=s)}),e.TgZ(5,"mat-radio-button",25),e._uU(6," No "),e.qZA(),e.TgZ(7,"mat-radio-button",26),e._uU(8," Yes "),e.qZA()()()()}if(2&o){const t=e.oxw();e.xp6(4),e.Q6J("ngModel",t.form.IncludeParentInventory),e.xp6(1),e.Q6J("value",!1),e.xp6(2),e.Q6J("value",!0)}}function Gi(o,n){if(1&o){const t=e.EpF();e.TgZ(0,"div",16)(1,"label",17),e._uU(2,"Include Child"),e.qZA(),e.TgZ(3,"div",18)(4,"mat-radio-group",19),e.NdJ("ngModelChange",function(s){e.CHM(t);const a=e.oxw();return e.KtG(a.form.IncludeChildrenInventory=s)}),e.TgZ(5,"mat-radio-button",27),e._uU(6," No "),e.qZA(),e.TgZ(7,"mat-radio-button",28),e._uU(8," Yes "),e.qZA()()()()}if(2&o){const t=e.oxw();e.xp6(4),e.Q6J("ngModel",t.form.IncludeChildrenInventory),e.xp6(1),e.Q6J("value",!1),e.xp6(2),e.Q6J("value",!0)}}const ji=[{path:"",component:x,children:[{path:"",redirectTo:"marketplace",pathMatch:"full"},{path:"marketplace",component:qt,canActivate:[L.a],data:{title:"List"}},{path:"marketplace/form",component:mi,canActivate:[L.a],data:{title:"Add new Channel"}},{path:"marketplace/view",component:ki,canActivate:[L.a],data:{title:"Marketplace View"}},{path:"marketplace/add",component:Vi,canActivate:[L.a],data:{title:"Marketplace Add"}},{path:"pos",component:(()=>{class o{constructor(t,i){this.toastr=t,this.posService=i,this.form=new ue,this.pageData={Title:"POS",Nav:[{Title:"Channel",Url:"/menu/channel",Active:!1},{Title:"POS",Url:"/menu/channel/config",Active:!0}]},this.initPageLoader()}initPageLoader(){this.posService.getLoader().subscribe(t=>{this.form=t.Form})}onRefreshToken(){this.posService.refreshToken(this.form).subscribe(t=>{this.toastr.success("Token has been refreshed!","Success",{closeButton:!0,positionClass:"toast-bottom-right"})})}onTestChannel(){this.posService.testChannel(this.form).subscribe(t=>{this.toastr.success("Test was successful!","Success",{closeButton:!0,positionClass:"toast-bottom-right"})})}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(U._W),e.Y36($e))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-pos"]],decls:60,vars:13,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"],[1,"info-label-group"]],template:function(t,i){1&t&&(e.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),e.NdJ("click",function(){return i.onRefreshToken()}),e._uU(3,"Refresh Token"),e.qZA(),e.TgZ(4,"a",1),e.NdJ("click",function(){return i.onTestChannel()}),e._uU(5,"Validate Client Secret Guid"),e.qZA(),e.TgZ(6,"a",2),e._UZ(7,"i",3),e._uU(8," Edit"),e.qZA()(),e.TgZ(9,"content")(10,"div",4)(11,"div",5)(12,"div",6)(13,"div",7)(14,"div",8)(15,"h4"),e._uU(16,"Credentials"),e.qZA()(),e.TgZ(17,"div",9)(18,"div",10)(19,"input",11),e.NdJ("ngModelChange",function(a){return i.form.Host=a}),e.qZA(),e.TgZ(20,"label",12),e._uU(21,"Host"),e.qZA()(),e.TgZ(22,"div",10)(23,"input",13),e.NdJ("ngModelChange",function(a){return i.form.Username=a}),e.qZA(),e.TgZ(24,"label",14),e._uU(25,"Username"),e.qZA()(),e.TgZ(26,"div",10)(27,"input",15),e.NdJ("ngModelChange",function(a){return i.form.ClientSecretGuid=a}),e.qZA(),e.TgZ(28,"label",16),e._uU(29,"ClientSecretGuid"),e.qZA()()()()(),e.TgZ(30,"div",6)(31,"div",7)(32,"div",8)(33,"h4"),e._uU(34,"Configuration"),e.qZA()(),e.TgZ(35,"div",9)(36,"div",17)(37,"label"),e._uU(38,"Composite Inventory"),e.qZA(),e.TgZ(39,"div")(40,"span"),e._uU(41),e.qZA()()(),e.TgZ(42,"div",17)(43,"label"),e._uU(44,"Include Parent"),e.qZA(),e.TgZ(45,"div")(46,"span"),e._uU(47),e.qZA()()(),e.TgZ(48,"div",17)(49,"label"),e._uU(50,"Include Child"),e.qZA(),e.TgZ(51,"div")(52,"span"),e._uU(53),e.qZA()()(),e.TgZ(54,"div",17)(55,"label"),e._uU(56,"Identify Order Channel by"),e.qZA(),e.TgZ(57,"div")(58,"span"),e._uU(59),e.qZA()()()()()()()()()()),2&t&&(e.Q6J("headerTitle","POS")("pageData",i.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(6),e.Q6J("routerLink",e.DdM(12,Bi)),e.xp6(13),e.Q6J("ngModel",i.form.Host),e.xp6(4),e.Q6J("ngModel",i.form.Username),e.xp6(4),e.Q6J("ngModel",i.form.ClientSecretGuid),e.xp6(14),e.hij(" ",i.form.CompositeVisible,""),e.xp6(6),e.Oqu(i.form.IncludeChildrenInventory),e.xp6(6),e.Oqu(i.form.IncludeParentInventory),e.xp6(6),e.hij(" ",0==i.form.InvoiceType?"Outlet":"Tag",""))},dependencies:[u.Fj,u.JJ,u.On,f.p,C.yS]}),o})(),canActivate:[L.a],data:{title:"POS"}},{path:"pos/edit",component:(()=>{class o{constructor(t,i,s){this._router=t,this.toastr=i,this.posService=s,this.form=new ue,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}]}}ngOnInit(){this.initPageLoader()}hideShowPassword(){this.passwordType="text"===this.passwordType?"password":"text",this.passwordIcon="eye-off"===this.passwordIcon?"eye":"eye-off"}initPageLoader(){this.posService.getLoader().subscribe(t=>{this.form=t.Form})}onSubmitHost(){this.posService.submitConfig(this.form).subscribe(t=>{this.toastr.success("Successfully Edited POS Config!","Success!"),this._router.navigate(["menu/channel"])})}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(C.F0),e.Y36(U._W),e.Y36($e))},o.\u0275cmp=e.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","No support composite and trigger component",1,"me-5",3,"value"],["data-toggle","tootip","title","Support composite and trigger component",1,"ms-8",3,"value"],["class","form-label-group radio",4,"ngIf"],["data-toggle","tooltip","title","Order Origin is traced via Outlet",1,"me-5",3,"value"],["data-toggle","tootip","title","Order Origin is traced via Tag",1,"me-5",3,"value"],["data-toggle","tooltip","title","No include variant parent component",1,"me-5",3,"value"],["data-toggle","tootip","title","include variant parent component",1,"ms-8",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,"ms-8",3,"value"]],template:function(t,i){1&t&&(e.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),e._uU(3,"Cancel"),e.qZA(),e.TgZ(4,"a",2),e.NdJ("click",function(){return i.onSubmitHost()}),e._uU(5,"Save"),e.qZA()(),e.TgZ(6,"content")(7,"div",3)(8,"div",4)(9,"div",5)(10,"div",6)(11,"div",7)(12,"h4"),e._uU(13,"Credentials"),e.qZA()(),e.TgZ(14,"div",8)(15,"div",9)(16,"input",10),e.NdJ("ngModelChange",function(a){return i.form.Host=a}),e.qZA(),e.TgZ(17,"label",11),e._uU(18,"Host"),e.qZA()(),e.TgZ(19,"div",9)(20,"input",12),e.NdJ("ngModelChange",function(a){return i.form.Username=a}),e.qZA(),e.TgZ(21,"label",13),e._uU(22,"Username"),e.qZA()(),e.TgZ(23,"div",9)(24,"input",14),e.NdJ("ngModelChange",function(a){return i.form.ClientSecretGuid=a}),e.qZA(),e.TgZ(25,"label",15),e._uU(26,"ClientSecretGuid"),e.qZA()()()()(),e.TgZ(27,"div",5)(28,"div",6)(29,"div",7)(30,"h4"),e._uU(31,"Configuration"),e.qZA()(),e.TgZ(32,"div",8)(33,"div",16)(34,"label",17),e._uU(35,"Composite Inventory"),e.qZA(),e.TgZ(36,"div",18)(37,"mat-radio-group",19),e.NdJ("ngModelChange",function(a){return i.form.CompositeVisible=a}),e.TgZ(38,"mat-radio-button",20),e._uU(39," No "),e.qZA(),e.TgZ(40,"mat-radio-button",21),e._uU(41," Yes "),e.qZA()()()(),e.YNc(42,Ki,9,3,"div",22),e.YNc(43,Gi,9,3,"div",22),e.TgZ(44,"div",16)(45,"label",17),e._uU(46,"Identify Order Channel by"),e.qZA(),e.TgZ(47,"div",18)(48,"mat-radio-group",19),e.NdJ("ngModelChange",function(a){return i.form.InvoiceType=a}),e.TgZ(49,"mat-radio-button",23),e._uU(50," Outlet "),e.qZA(),e.TgZ(51,"mat-radio-button",24),e._uU(52," Tag "),e.qZA()()()()()()()()()()()),2&t&&(e.Q6J("headerTitle","POS Edit")("pageData",i.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(16),e.Q6J("ngModel",i.form.Host),e.xp6(4),e.Q6J("ngModel",i.form.Username),e.xp6(4),e.Q6J("ngModel",i.form.ClientSecretGuid),e.xp6(13),e.Q6J("ngModel",i.form.CompositeVisible),e.xp6(1),e.Q6J("value",!1),e.xp6(2),e.Q6J("value",!0),e.xp6(2),e.Q6J("ngIf",i.form.CompositeVisible),e.xp6(1),e.Q6J("ngIf",i.form.CompositeVisible),e.xp6(5),e.Q6J("ngModel",i.form.InvoiceType),e.xp6(1),e.Q6J("value",0),e.xp6(2),e.Q6J("value",1))},dependencies:[_.O5,u.Fj,u.JJ,u.On,f.p,Z.VQ,Z.U0,C.yS],styles:[".passwordIcon[_ngcontent-%COMP%]{top:1.5rem;right:1rem;position:absolute;margin:0 auto!important;cursor:pointer}"]}),o})(),canActivate:[L.a],data:{title:"POS Edit"}}]}];let Xi=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({imports:[_.ez,C.Bz.forChild(ji)]}),o})();var $i=h(4144),en=h(9101);let tn=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({imports:[_.ez,u.u5,E.Z,f.R,Z.Fk,G.A0,Xi,C.Bz,Mt,Kt,$i.c,en.ot,We.Ps,te.AV,Xe.rP]}),o})()},7398:(it,K,h)=>{h.d(K,{Z:()=>C,e:()=>G});var _=h(6895),u=h(266),E=h(6806),f=h(4650);function Z(e,x){if(1&e&&(f.TgZ(0,"li",2)(1,"a",3),f._uU(2),f.qZA()()),2&e){const y=x.$implicit;f.xp6(1),f.s9C("routerLink",y.Url),f.Q6J("title",y.Description?y.Description:""),f.xp6(1),f.hij(" ",y.Title," ")}}let G=(()=>{class e{}return e.\u0275fac=function(y){return new(y||e)},e.\u0275cmp=f.Xpm({type:e,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(y,T){1&y&&(f.TgZ(0,"ul",0),f.YNc(1,Z,3,3,"li",1),f.qZA()),2&y&&(f.xp6(1),f.Q6J("ngForOf",T.Tabs))},dependencies:[_.sg,E.yS,E.Od]}),e})(),C=(()=>{class e{}return e.\u0275fac=function(y){return new(y||e)},e.\u0275mod=f.oAB({type:e}),e.\u0275inj=f.cJS({imports:[_.ez,E.Bz,u.AV]}),e})()}}]);