marketplacepos 2.6.9 → 2.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[587],{3587:(lt,G,d)=>{d.r(G),d.d(G,{ChannelsModule:()=>Si});var u=d(6895),h=d(4006),L=d(7398),f=d(7481),D=d(1948),A=d(8796),C=d(6806),e=d(4650);let Z=(()=>{class i{constructor(){this.channelTabs=[{Title:"Marketplace",Url:"/menu/channel/marketplace"},{Title:"POS",Url:"/menu/channel/pos"}]}ngOnInit(){}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,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,n){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",n.channelTabs))},dependencies:[L.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:1002;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}"]}),i})();var b=d(7376),T=d(3353),m=d(1281),oe=d(2687),_=d(7579),V=d(727),ct=d(4986),dt=d(2805),ht=d(6406),ve=d(8306),F=d(6451),k=d(2722),j=d(8675),ut=d(4004),ae=d(5698),gt=d(8505),mt=d(3900),se=d(445);function re(i,o,t){for(let n in o)if(o.hasOwnProperty(n)){const a=o[n];a?i.setProperty(n,a,t?.has(n)?"important":""):i.removeProperty(n)}return i}function N(i,o){const t=o?"":"none";re(i.style,{"touch-action":o?"":"none","-webkit-user-drag":o?"":"none","-webkit-tap-highlight-color":o?"":"transparent","user-select":t,"-ms-user-select":t,"-webkit-user-select":t,"-moz-user-select":t})}function Ce(i,o,t){re(i.style,{position:o?"":"fixed",top:o?"":"0",opacity:o?"":"0",left:o?"":"-999em"},t)}function X(i,o){return o&&"none"!=o?i+" "+o:i}function be(i){const o=i.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(i)*o}function le(i,o){return i.getPropertyValue(o).split(",").map(n=>n.trim())}function ce(i){const o=i.getBoundingClientRect();return{top:o.top,right:o.right,bottom:o.bottom,left:o.left,width:o.width,height:o.height,x:o.x,y:o.y}}function de(i,o,t){const{top:n,bottom:a,left:s,right:r}=i;return t>=n&&t<=a&&o>=s&&o<=r}function B(i,o,t){i.top+=o,i.bottom=i.top+i.height,i.left+=t,i.right=i.left+i.width}function ye(i,o,t,n){const{top:a,right:s,bottom:r,left:l,width:c,height:p}=i,g=c*o,v=p*o;return n>a-v&&n<r+v&&t>l-g&&t<s+g}class Te{constructor(o){this._document=o,this.positions=new Map}clear(){this.positions.clear()}cache(o){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),o.forEach(t=>{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:ce(t)})})}handleScroll(o){const t=(0,T.sA)(o),n=this.positions.get(t);if(!n)return null;const a=n.scrollPosition;let s,r;if(t===this._document){const p=this.getViewportScrollPosition();s=p.top,r=p.left}else s=t.scrollTop,r=t.scrollLeft;const l=a.top-s,c=a.left-r;return this.positions.forEach((p,g)=>{p.clientRect&&t!==g&&t.contains(g)&&B(p.clientRect,l,c)}),a.top=s,a.left=r,{top:l,left:c}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}}function Se(i){const o=i.cloneNode(!0),t=o.querySelectorAll("[id]"),n=i.nodeName.toLowerCase();o.removeAttribute("id");for(let a=0;a<t.length;a++)t[a].removeAttribute("id");return"canvas"===n?Me(i,o):("input"===n||"select"===n||"textarea"===n)&&De(i,o),Ie("canvas",i,o,Me),Ie("input, textarea, select",i,o,De),o}function Ie(i,o,t,n){const a=o.querySelectorAll(i);if(a.length){const s=t.querySelectorAll(i);for(let r=0;r<a.length;r++)n(a[r],s[r])}}let _t=0;function De(i,o){"file"!==o.type&&(o.value=i.value),"radio"===o.type&&o.name&&(o.name=`mat-clone-${o.name}-${_t++}`)}function Me(i,o){const t=o.getContext("2d");if(t)try{t.drawImage(i,0,0)}catch{}}const Oe=(0,T.i$)({passive:!0}),$=(0,T.i$)({passive:!1}),pe=new Set(["position"]);class Ct{constructor(o,t,n,a,s,r){this._config=t,this._document=n,this._ngZone=a,this._viewportRuler=s,this._dragDropRegistry=r,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._hasStartedDragging=!1,this._moveEvents=new _.x,this._pointerMoveSubscription=V.w0.EMPTY,this._pointerUpSubscription=V.w0.EMPTY,this._scrollSubscription=V.w0.EMPTY,this._resizeSubscription=V.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 _.x,this.started=new _.x,this.released=new _.x,this.ended=new _.x,this.entered=new _.x,this.exited=new _.x,this.dropped=new _.x,this.moved=this._moveEvents,this._pointerDown=l=>{if(this.beforeStarted.next(),this._handles.length){const c=this._getTargetHandle(l);c&&!this._disabledHandles.has(c)&&!this.disabled&&this._initializeDragSequence(c,l)}else this.disabled||this._initializeDragSequence(this._rootElement,l)},this._pointerMove=l=>{const c=this._getPointerPositionOnPage(l);if(!this._hasStartedDragging){if(Math.abs(c.x-this._pickupPositionOnPage.x)+Math.abs(c.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){const q=Date.now()>=this._dragStartTime+this._getDragStartDelay(l),U=this._dropContainer;if(!q)return void this._endDragSequence(l);(!U||!U.isDragging()&&!U.isReceiving())&&(l.preventDefault(),this._hasStartedDragging=!0,this._ngZone.run(()=>this._startDragSequence(l)))}return}l.preventDefault();const p=this._getConstrainedPointerPosition(c);if(this._hasMoved=!0,this._lastKnownPointerPosition=c,this._updatePointerDirectionDelta(p),this._dropContainer)this._updateActiveDropContainer(p,c);else{const g=this.constrainPosition?this._initialClientRect:this._pickupPositionOnPage,v=this._activeTransform;v.x=p.x-g.x+this._passiveTransform.x,v.y=p.y-g.y+this._passiveTransform.y,this._applyRootElementTransform(v.x,v.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:p,event:l,distance:this._getDragDistance(p),delta:this._pointerDirectionDelta})})},this._pointerUp=l=>{this._endDragSequence(l)},this._nativeDragStart=l=>{if(this._handles.length){const c=this._getTargetHandle(l);c&&!this._disabledHandles.has(c)&&!this.disabled&&l.preventDefault()}else this.disabled||l.preventDefault()},this.withRootElement(o).withParent(t.parentDragRef||null),this._parentPositions=new Te(n),r.registerDragItem(this)}get disabled(){return this._disabled||!(!this._dropContainer||!this._dropContainer.disabled)}set disabled(o){const t=(0,m.Ig)(o);t!==this._disabled&&(this._disabled=t,this._toggleNativeDragInteractions(),this._handles.forEach(n=>N(n,t)))}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(o){this._handles=o.map(n=>(0,m.fI)(n)),this._handles.forEach(n=>N(n,this.disabled)),this._toggleNativeDragInteractions();const t=new Set;return this._disabledHandles.forEach(n=>{this._handles.indexOf(n)>-1&&t.add(n)}),this._disabledHandles=t,this}withPreviewTemplate(o){return this._previewTemplate=o,this}withPlaceholderTemplate(o){return this._placeholderTemplate=o,this}withRootElement(o){const t=(0,m.fI)(o);return t!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{t.addEventListener("mousedown",this._pointerDown,$),t.addEventListener("touchstart",this._pointerDown,Oe),t.addEventListener("dragstart",this._nativeDragStart,$)}),this._initialTransform=void 0,this._rootElement=t),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(o){return this._boundaryElement=o?(0,m.fI)(o):null,this._resizeSubscription.unsubscribe(),o&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(o){return this._parentDragRef=o,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(o){!this._disabledHandles.has(o)&&this._handles.indexOf(o)>-1&&(this._disabledHandles.add(o),N(o,!0))}enableHandle(o){this._disabledHandles.has(o)&&(this._disabledHandles.delete(o),N(o,this.disabled))}withDirection(o){return this._direction=o,this}_withDropContainer(o){this._dropContainer=o}getFreeDragPosition(){const o=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:o.x,y:o.y}}setFreeDragPosition(o){return this._activeTransform={x:0,y:0},this._passiveTransform.x=o.x,this._passiveTransform.y=o.y,this._dropContainer||this._applyRootElementTransform(o.x,o.y),this}withPreviewContainer(o){return this._previewContainer=o,this}_sortFromLastPointerPosition(){const o=this._lastKnownPointerPosition;o&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(o),o)}_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(o){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:o}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(o),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;const t=this._getPointerPositionOnPage(o);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:o})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(o){z(o)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const t=this._dropContainer;if(t){const n=this._rootElement,a=n.parentNode,s=this._placeholder=this._createPlaceholderElement(),r=this._anchor=this._anchor||this._document.createComment(""),l=this._getShadowRoot();a.insertBefore(r,n),this._initialTransform=n.style.transform||"",this._preview=this._createPreviewElement(),Ce(n,!1,pe),this._document.body.appendChild(a.replaceChild(s,n)),this._getPreviewInsertionPoint(a,l).appendChild(this._preview),this.started.next({source:this,event:o}),t.start(),this._initialContainer=t,this._initialIndex=t.getItemIndex(this)}else this.started.next({source:this,event:o}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(t?t.getScrollableParents():[])}_initializeDragSequence(o,t){this._parentDragRef&&t.stopPropagation();const n=this.isDragging(),a=z(t),s=!a&&0!==t.button,r=this._rootElement,l=(0,T.sA)(t),c=!a&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now(),p=a?(0,oe.yG)(t):(0,oe.X6)(t);if(l&&l.draggable&&"mousedown"===t.type&&t.preventDefault(),n||s||c||p)return;if(this._handles.length){const S=r.style;this._rootElementTapHighlight=S.webkitTapHighlightColor||"",S.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(S=>this._updateOnScroll(S)),this._boundaryElement&&(this._boundaryRect=ce(this._boundaryElement));const g=this._previewTemplate;this._pickupPositionInElement=g&&g.template&&!g.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialClientRect,o,t);const v=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:v.x,y:v.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(o){Ce(this._rootElement,!0,pe),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,n=t.getItemIndex(this),a=this._getPointerPositionOnPage(o),s=this._getDragDistance(a),r=t._isOverContainer(a.x,a.y);this.ended.next({source:this,distance:s,dropPoint:a,event:o}),this.dropped.next({item:this,currentIndex:n,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:r,distance:s,dropPoint:a,event:o}),t.drop(this,n,this._initialIndex,this._initialContainer,r,s,a),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:o,y:t},{x:n,y:a}){let s=this._initialContainer._getSiblingContainerFromPosition(this,o,t);!s&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(o,t)&&(s=this._initialContainer),s&&s!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=s,this._dropContainer.enter(this,o,t,s===this._initialContainer&&s.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:s,currentIndex:s.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(n,a),this._dropContainer._sortItem(this,o,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(o,t):this._applyPreviewTransform(o-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_createPreviewElement(){const o=this._previewTemplate,t=this.previewClass,n=o?o.template:null;let a;if(n&&o){const s=o.matchSize?this._initialClientRect:null,r=o.viewContainer.createEmbeddedView(n,o.context);r.detectChanges(),a=Pe(r,this._document),this._previewRef=r,o.matchSize?Ze(a,s):a.style.transform=ee(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else a=Se(this._rootElement),Ze(a,this._initialClientRect),this._initialTransform&&(a.style.transform=this._initialTransform);return re(a.style,{"pointer-events":"none",margin:"0",position:"fixed",top:"0",left:"0","z-index":`${this._config.zIndex||1e3}`},pe),N(a,!1),a.classList.add("cdk-drag-preview"),a.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(s=>a.classList.add(s)):a.classList.add(t)),a}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const o=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._applyPreviewTransform(o.left,o.top);const t=function ft(i){const o=getComputedStyle(i),t=le(o,"transition-property"),n=t.find(l=>"transform"===l||"all"===l);if(!n)return 0;const a=t.indexOf(n),s=le(o,"transition-duration"),r=le(o,"transition-delay");return be(s[a])+be(r[a])}(this._preview);return 0===t?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(n=>{const a=r=>{(!r||(0,T.sA)(r)===this._preview&&"transform"===r.propertyName)&&(this._preview?.removeEventListener("transitionend",a),n(),clearTimeout(s))},s=setTimeout(a,1.5*t);this._preview.addEventListener("transitionend",a)}))}_createPlaceholderElement(){const o=this._placeholderTemplate,t=o?o.template:null;let n;return t?(this._placeholderRef=o.viewContainer.createEmbeddedView(t,o.context),this._placeholderRef.detectChanges(),n=Pe(this._placeholderRef,this._document)):n=Se(this._rootElement),n.style.pointerEvents="none",n.classList.add("cdk-drag-placeholder"),n}_getPointerPositionInElement(o,t,n){const a=t===this._rootElement?null:t,s=a?a.getBoundingClientRect():o,r=z(n)?n.targetTouches[0]:n,l=this._getViewportScrollPosition();return{x:s.left-o.left+(r.pageX-s.left-l.left),y:s.top-o.top+(r.pageY-s.top-l.top)}}_getPointerPositionOnPage(o){const t=this._getViewportScrollPosition(),n=z(o)?o.touches[0]||o.changedTouches[0]||{pageX:0,pageY:0}:o,a=n.pageX-t.left,s=n.pageY-t.top;if(this._ownerSVGElement){const r=this._ownerSVGElement.getScreenCTM();if(r){const l=this._ownerSVGElement.createSVGPoint();return l.x=a,l.y=s,l.matrixTransform(r.inverse())}}return{x:a,y:s}}_getConstrainedPointerPosition(o){const t=this._dropContainer?this._dropContainer.lockAxis:null;let{x:n,y:a}=this.constrainPosition?this.constrainPosition(o,this,this._initialClientRect):o;if("x"===this.lockAxis||"x"===t?a=this._pickupPositionOnPage.y:("y"===this.lockAxis||"y"===t)&&(n=this._pickupPositionOnPage.x),this._boundaryRect){const{x:s,y:r}=this._pickupPositionInElement,l=this._boundaryRect,{width:c,height:p}=this._getPreviewRect(),g=l.top+r,v=l.bottom-(p-r);n=we(n,l.left+s,l.right-(c-s)),a=we(a,g,v)}return{x:n,y:a}}_updatePointerDirectionDelta(o){const{x:t,y:n}=o,a=this._pointerDirectionDelta,s=this._pointerPositionAtLastDirectionChange,r=Math.abs(t-s.x),l=Math.abs(n-s.y);return r>this._config.pointerDirectionChangeThreshold&&(a.x=t>s.x?1:-1,s.x=t),l>this._config.pointerDirectionChangeThreshold&&(a.y=n>s.y?1:-1,s.y=n),a}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const o=this._handles.length>0||!this.isDragging();o!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=o,N(this._rootElement,o))}_removeRootElementListeners(o){o.removeEventListener("mousedown",this._pointerDown,$),o.removeEventListener("touchstart",this._pointerDown,Oe),o.removeEventListener("dragstart",this._nativeDragStart,$)}_applyRootElementTransform(o,t){const n=ee(o,t),a=this._rootElement.style;null==this._initialTransform&&(this._initialTransform=a.transform&&"none"!=a.transform?a.transform:""),a.transform=X(n,this._initialTransform)}_applyPreviewTransform(o,t){const n=this._previewTemplate?.template?void 0:this._initialTransform,a=ee(o,t);this._preview.style.transform=X(a,n)}_getDragDistance(o){const t=this._pickupPositionOnPage;return t?{x:o.x-t.x,y:o.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:o,y:t}=this._passiveTransform;if(0===o&&0===t||this.isDragging()||!this._boundaryElement)return;const n=this._rootElement.getBoundingClientRect(),a=this._boundaryElement.getBoundingClientRect();if(0===a.width&&0===a.height||0===n.width&&0===n.height)return;const s=a.left-n.left,r=n.right-a.right,l=a.top-n.top,c=n.bottom-a.bottom;a.width>n.width?(s>0&&(o+=s),r>0&&(o-=r)):o=0,a.height>n.height?(l>0&&(t+=l),c>0&&(t-=c)):t=0,(o!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:o})}_getDragStartDelay(o){const t=this.dragStartDelay;return"number"==typeof t?t:z(o)?t.touch:t?t.mouse:0}_updateOnScroll(o){const t=this._parentPositions.handleScroll(o);if(t){const n=(0,T.sA)(o);this._boundaryRect&&n!==this._boundaryElement&&n.contains(this._boundaryElement)&&B(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(o,t){const n=this._previewContainer||"global";if("parent"===n)return o;if("global"===n){const a=this._document;return t||a.fullscreenElement||a.webkitFullscreenElement||a.mozFullScreenElement||a.msFullscreenElement||a.body}return(0,m.fI)(n)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialClientRect),this._previewRect}_getTargetHandle(o){return this._handles.find(t=>o.target&&(o.target===t||t.contains(o.target)))}}function ee(i,o){return`translate3d(${Math.round(i)}px, ${Math.round(o)}px, 0)`}function we(i,o,t){return Math.max(o,Math.min(t,i))}function z(i){return"t"===i.type[0]}function Pe(i,o){const t=i.rootNodes;if(1===t.length&&t[0].nodeType===o.ELEMENT_NODE)return t[0];const n=o.createElement("div");return t.forEach(a=>n.appendChild(a)),n}function Ze(i,o){i.style.width=`${o.width}px`,i.style.height=`${o.height}px`,i.style.transform=ee(o.left,o.top)}function xe(i,o,t){const n=W(o,i.length-1),a=W(t,i.length-1);if(n===a)return;const s=i[n],r=a<n?-1:1;for(let l=n;l!==a;l+=r)i[l]=i[l+r];i[a]=s}function W(i,o){return Math.max(0,Math.min(o,i))}class bt{constructor(o,t){this._element=o,this._dragDropRegistry=t,this._itemPositions=[],this.orientation="vertical",this._previousSwap={drag:null,delta:0,overlaps:!1}}start(o){this.withItems(o)}sort(o,t,n,a){const s=this._itemPositions,r=this._getItemIndexFromPointerPosition(o,t,n,a);if(-1===r&&s.length>0)return null;const l="horizontal"===this.orientation,c=s.findIndex(I=>I.drag===o),p=s[r],v=p.clientRect,S=c>r?1:-1,q=this._getItemOffsetPx(s[c].clientRect,v,S),U=this._getSiblingOffsetPx(c,s,S),Y=s.slice();return xe(s,c,r),s.forEach((I,Ii)=>{if(Y[Ii]===I)return;const st=I.drag===o,_e=st?q:U,rt=st?o.getPlaceholderElement():I.drag.getRootElement();I.offset+=_e,l?(rt.style.transform=X(`translate3d(${Math.round(I.offset)}px, 0, 0)`,I.initialTransform),B(I.clientRect,0,_e)):(rt.style.transform=X(`translate3d(0, ${Math.round(I.offset)}px, 0)`,I.initialTransform),B(I.clientRect,_e,0))}),this._previousSwap.overlaps=de(v,t,n),this._previousSwap.drag=p.drag,this._previousSwap.delta=l?a.x:a.y,{previousIndex:c,currentIndex:r}}enter(o,t,n,a){const s=null==a||a<0?this._getItemIndexFromPointerPosition(o,t,n):a,r=this._activeDraggables,l=r.indexOf(o),c=o.getPlaceholderElement();let p=r[s];if(p===o&&(p=r[s+1]),!p&&(null==s||-1===s||s<r.length-1)&&this._shouldEnterAsFirstChild(t,n)&&(p=r[0]),l>-1&&r.splice(l,1),p&&!this._dragDropRegistry.isDragging(p)){const g=p.getRootElement();g.parentElement.insertBefore(c,g),r.splice(s,0,o)}else(0,m.fI)(this._element).appendChild(c),r.push(o);c.style.transform="",this._cacheItemPositions()}withItems(o){this._activeDraggables=o.slice(),this._cacheItemPositions()}withSortPredicate(o){this._sortPredicate=o}reset(){this._activeDraggables.forEach(o=>{const t=o.getRootElement();if(t){const n=this._itemPositions.find(a=>a.drag===o)?.initialTransform;t.style.transform=n||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(o){return("horizontal"===this.orientation&&"rtl"===this.direction?this._itemPositions.slice().reverse():this._itemPositions).findIndex(n=>n.drag===o)}updateOnScroll(o,t){this._itemPositions.forEach(({clientRect:n})=>{B(n,o,t)}),this._itemPositions.forEach(({drag:n})=>{this._dragDropRegistry.isDragging(n)&&n._sortFromLastPointerPosition()})}_cacheItemPositions(){const o="horizontal"===this.orientation;this._itemPositions=this._activeDraggables.map(t=>{const n=t.getVisibleElement();return{drag:t,offset:0,initialTransform:n.style.transform||"",clientRect:ce(n)}}).sort((t,n)=>o?t.clientRect.left-n.clientRect.left:t.clientRect.top-n.clientRect.top)}_getItemOffsetPx(o,t,n){const a="horizontal"===this.orientation;let s=a?t.left-o.left:t.top-o.top;return-1===n&&(s+=a?t.width-o.width:t.height-o.height),s}_getSiblingOffsetPx(o,t,n){const a="horizontal"===this.orientation,s=t[o].clientRect,r=t[o+-1*n];let l=s[a?"width":"height"]*n;if(r){const c=a?"left":"top",p=a?"right":"bottom";-1===n?l-=r.clientRect[c]-s[p]:l+=s[c]-r.clientRect[p]}return l}_shouldEnterAsFirstChild(o,t){if(!this._activeDraggables.length)return!1;const n=this._itemPositions,a="horizontal"===this.orientation;if(n[0].drag!==this._activeDraggables[0]){const r=n[n.length-1].clientRect;return a?o>=r.right:t>=r.bottom}{const r=n[0].clientRect;return a?o<=r.left:t<=r.top}}_getItemIndexFromPointerPosition(o,t,n,a){const s="horizontal"===this.orientation,r=this._itemPositions.findIndex(({drag:l,clientRect:c})=>{if(l===o)return!1;if(a){const p=s?a.x:a.y;if(l===this._previousSwap.drag&&this._previousSwap.overlaps&&p===this._previousSwap.delta)return!1}return s?t>=Math.floor(c.left)&&t<Math.floor(c.right):n>=Math.floor(c.top)&&n<Math.floor(c.bottom)});return-1!==r&&this._sortPredicate(r,o)?r:-1}}class yt{constructor(o,t,n,a,s){this._dragDropRegistry=t,this._ngZone=a,this._viewportRuler=s,this.disabled=!1,this.sortingDisabled=!1,this.autoScrollDisabled=!1,this.autoScrollStep=2,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.beforeStarted=new _.x,this.entered=new _.x,this.exited=new _.x,this.dropped=new _.x,this.sorted=new _.x,this._isDragging=!1,this._draggables=[],this._siblings=[],this._activeSiblings=new Set,this._viewportScrollSubscription=V.w0.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new _.x,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),function pt(i=0,o=ct.z){return i<0&&(i=0),(0,dt.H)(i,i,o)}(0,ht.Z).pipe((0,k.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,m.fI)(o),this._document=n,this.withScrollableParents([this.element]),t.registerDropContainer(this),this._parentPositions=new Te(n),this._sortStrategy=new bt(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(o,t,n,a){this._draggingStarted(),null==a&&this.sortingDisabled&&(a=this._draggables.indexOf(o)),this._sortStrategy.enter(o,t,n,a),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:o,container:this,currentIndex:this.getItemIndex(o)})}exit(o){this._reset(),this.exited.next({item:o,container:this})}drop(o,t,n,a,s,r,l,c={}){this._reset(),this.dropped.next({item:o,currentIndex:t,previousIndex:n,container:this,previousContainer:a,isPointerOverContainer:s,distance:r,dropPoint:l,event:c})}withItems(o){const t=this._draggables;return this._draggables=o,o.forEach(n=>n._withDropContainer(this)),this.isDragging()&&(t.filter(a=>a.isDragging()).every(a=>-1===o.indexOf(a))?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(o){return this._sortStrategy.direction=o,this}connectedTo(o){return this._siblings=o.slice(),this}withOrientation(o){return this._sortStrategy.orientation=o,this}withScrollableParents(o){const t=(0,m.fI)(this.element);return this._scrollableElements=-1===o.indexOf(t)?[t,...o]:o.slice(),this}getScrollableParents(){return this._scrollableElements}getItemIndex(o){return this._isDragging?this._sortStrategy.getItemIndex(o):this._draggables.indexOf(o)}isReceiving(){return this._activeSiblings.size>0}_sortItem(o,t,n,a){if(this.sortingDisabled||!this._clientRect||!ye(this._clientRect,.05,t,n))return;const s=this._sortStrategy.sort(o,t,n,a);s&&this.sorted.next({previousIndex:s.previousIndex,currentIndex:s.currentIndex,container:this,item:o})}_startScrollingIfNecessary(o,t){if(this.autoScrollDisabled)return;let n,a=0,s=0;if(this._parentPositions.positions.forEach((r,l)=>{l===this._document||!r.clientRect||n||ye(r.clientRect,.05,o,t)&&([a,s]=function Tt(i,o,t,n){const a=Re(o,n),s=Ee(o,t);let r=0,l=0;if(a){const c=i.scrollTop;1===a?c>0&&(r=1):i.scrollHeight-c>i.clientHeight&&(r=2)}if(s){const c=i.scrollLeft;1===s?c>0&&(l=1):i.scrollWidth-c>i.clientWidth&&(l=2)}return[r,l]}(l,r.clientRect,o,t),(a||s)&&(n=l))}),!a&&!s){const{width:r,height:l}=this._viewportRuler.getViewportSize(),c={width:r,height:l,top:0,right:r,bottom:l,left:0};a=Re(c,t),s=Ee(c,o),n=window}n&&(a!==this._verticalScrollDirection||s!==this._horizontalScrollDirection||n!==this._scrollNode)&&(this._verticalScrollDirection=a,this._horizontalScrollDirection=s,this._scrollNode=n,(a||s)&&n?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){const o=(0,m.fI)(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=o.msScrollSnapType||o.scrollSnapType||"",o.scrollSnapType=o.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){const o=(0,m.fI)(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(o).clientRect}_reset(){this._isDragging=!1;const o=(0,m.fI)(this.element).style;o.scrollSnapType=o.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(t=>t._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_isOverContainer(o,t){return null!=this._clientRect&&de(this._clientRect,o,t)}_getSiblingContainerFromPosition(o,t,n){return this._siblings.find(a=>a._canReceive(o,t,n))}_canReceive(o,t,n){if(!this._clientRect||!de(this._clientRect,t,n)||!this.enterPredicate(o,this))return!1;const a=this._getShadowRoot().elementFromPoint(t,n);if(!a)return!1;const s=(0,m.fI)(this.element);return a===s||s.contains(a)}_startReceiving(o,t){const n=this._activeSiblings;!n.has(o)&&t.every(a=>this.enterPredicate(a,this)||this._draggables.indexOf(a)>-1)&&(n.add(o),this._cacheParentPositions(),this._listenToScrollEvents())}_stopReceiving(o){this._activeSiblings.delete(o),this._viewportScrollSubscription.unsubscribe()}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(o=>{if(this.isDragging()){const t=this._parentPositions.handleScroll(o);t&&this._sortStrategy.updateOnScroll(t.top,t.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const o=(0,T.kV)((0,m.fI)(this.element));this._cachedShadowRoot=o||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){const o=this._sortStrategy.getActiveItemsSnapshot().filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,o))}}function Re(i,o){const{top:t,bottom:n,height:a}=i,s=.05*a;return o>=t-s&&o<=t+s?1:o>=n-s&&o<=n+s?2:0}function Ee(i,o){const{left:t,right:n,width:a}=i,s=.05*a;return o>=t-s&&o<=t+s?1:o>=n-s&&o<=n+s?2:0}const te=(0,T.i$)({passive:!1,capture:!0});let St=(()=>{class i{constructor(t,n){this._ngZone=t,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=[],this._globalListeners=new Map,this._draggingPredicate=a=>a.isDragging(),this.pointerMove=new _.x,this.pointerUp=new _.x,this.scroll=new _.x,this._preventDefaultWhileDragging=a=>{this._activeDragInstances.length>0&&a.preventDefault()},this._persistentTouchmoveListener=a=>{this._activeDragInstances.length>0&&(this._activeDragInstances.some(this._draggingPredicate)&&a.preventDefault(),this.pointerMove.next(a))},this._document=n}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,te)})}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,te)}startDragging(t,n){if(!(this._activeDragInstances.indexOf(t)>-1)&&(this._activeDragInstances.push(t),1===this._activeDragInstances.length)){const a=n.type.startsWith("touch");this._globalListeners.set(a?"touchend":"mouseup",{handler:s=>this.pointerUp.next(s),options:!0}).set("scroll",{handler:s=>this.scroll.next(s),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:te}),a||this._globalListeners.set("mousemove",{handler:s=>this.pointerMove.next(s),options:te}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((s,r)=>{this._document.addEventListener(r,s.handler,s.options)})})}}stopDragging(t){const n=this._activeDragInstances.indexOf(t);n>-1&&(this._activeDragInstances.splice(n,1),0===this._activeDragInstances.length&&this._clearGlobalListeners())}isDragging(t){return this._activeDragInstances.indexOf(t)>-1}scrolled(t){const n=[this.scroll];return t&&t!==this._document&&n.push(new ve.y(a=>this._ngZone.runOutsideAngular(()=>{const r=l=>{this._activeDragInstances.length&&a.next(l)};return t.addEventListener("scroll",r,!0),()=>{t.removeEventListener("scroll",r,!0)}}))),(0,F.T)(...n)}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,n)=>{this._document.removeEventListener(n,t.handler,t.options)}),this._globalListeners.clear()}}return i.\u0275fac=function(t){return new(t||i)(e.LFG(e.R0b),e.LFG(u.K0))},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const It={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let he=(()=>{class i{constructor(t,n,a,s){this._document=t,this._ngZone=n,this._viewportRuler=a,this._dragDropRegistry=s}createDrag(t,n=It){return new Ct(t,n,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(t){return new yt(t,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}}return i.\u0275fac=function(t){return new(t||i)(e.LFG(u.K0),e.LFG(e.R0b),e.LFG(b.rL),e.LFG(St))},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const qe=new e.OlP("CDK_DRAG_PARENT"),Ue=new e.OlP("CdkDropListGroup"),Le=new e.OlP("CDK_DRAG_CONFIG");let Dt=0;const Fe=new e.OlP("CdkDropList");let Mt=(()=>{class i{constructor(t,n,a,s,r,l,c){this.element=t,this._changeDetectorRef=a,this._scrollDispatcher=s,this._dir=r,this._group=l,this._destroyed=new _.x,this.connectedTo=[],this.id="cdk-drop-list-"+Dt++,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=n.createDropList(t),this._dropListRef.data=this,c&&this._assignDefaults(c),this._dropListRef.enterPredicate=(p,g)=>this.enterPredicate(p.data,g.data),this._dropListRef.sortPredicate=(p,g,v)=>this.sortPredicate(p,g.data,v.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),i._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,m.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,n)=>t._dragRef.getVisibleElement().compareDocumentPosition(n._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){const t=i._dropLists.indexOf(this);t>-1&&i._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,j.O)(this._dir.value),(0,k.R)(this._destroyed)).subscribe(n=>t.withDirection(n)),t.beforeStarted.subscribe(()=>{const n=(0,m.Eq)(this.connectedTo).map(a=>"string"==typeof a?i._dropLists.find(r=>r.id===a):a);if(this._group&&this._group._items.forEach(a=>{-1===n.indexOf(a)&&n.push(a)}),!this._scrollableParentsResolved){const a=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(s=>s.getElementRef().nativeElement);this._dropListRef.withScrollableParents(a),this._scrollableParentsResolved=!0}t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.sortingDisabled=(0,m.Ig)(this.sortingDisabled),t.autoScrollDisabled=(0,m.Ig)(this.autoScrollDisabled),t.autoScrollStep=(0,m.su)(this.autoScrollStep,2),t.connectedTo(n.filter(a=>a&&a!==this).map(a=>a._dropListRef)).withOrientation(this.orientation)})}_handleEvents(t){t.beforeStarted.subscribe(()=>{this._syncItemsWithRef(),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(n=>{this.entered.emit({container:this,item:n.item.data,currentIndex:n.currentIndex})}),t.exited.subscribe(n=>{this.exited.emit({container:this,item:n.item.data}),this._changeDetectorRef.markForCheck()}),t.sorted.subscribe(n=>{this.sorted.emit({previousIndex:n.previousIndex,currentIndex:n.currentIndex,container:this,item:n.item.data})}),t.dropped.subscribe(n=>{this.dropped.emit({previousIndex:n.previousIndex,currentIndex:n.currentIndex,previousContainer:n.previousContainer.data,container:n.container.data,item:n.item.data,isPointerOverContainer:n.isPointerOverContainer,distance:n.distance,dropPoint:n.dropPoint,event:n.event}),this._changeDetectorRef.markForCheck()})}_assignDefaults(t){const{lockAxis:n,draggingDisabled:a,sortingDisabled:s,listAutoScrollDisabled:r,listOrientation:l}=t;this.disabled=a??!1,this.sortingDisabled=s??!1,this.autoScrollDisabled=r??!1,this.orientation=l||"vertical",n&&(this.lockAxis=n)}_syncItemsWithRef(){this._dropListRef.withItems(this.getSortedItems().map(t=>t._dragRef))}}return i._dropLists=[],i.\u0275fac=function(t){return new(t||i)(e.Y36(e.SBq),e.Y36(he),e.Y36(e.sBO),e.Y36(b.mF),e.Y36(se.Is,8),e.Y36(Ue,12),e.Y36(Le,8))},i.\u0275dir=e.lG2({type:i,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(t,n){2&t&&(e.uIk("id",n.id),e.ekj("cdk-drop-list-disabled",n.disabled)("cdk-drop-list-dragging",n._dropListRef.isDragging())("cdk-drop-list-receiving",n._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:Ue,useValue:void 0},{provide:Fe,useExisting:i}])]}),i})();const Ne=new e.OlP("CdkDragHandle"),Ot=new e.OlP("CdkDragPlaceholder"),wt=new e.OlP("CdkDragPreview");let Zt=(()=>{class i{constructor(t,n,a,s,r,l,c,p,g,v,S){this.element=t,this.dropContainer=n,this._ngZone=s,this._viewContainerRef=r,this._dir=c,this._changeDetectorRef=g,this._selfHandle=v,this._parentDrag=S,this._destroyed=new _.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 ve.y(q=>{const U=this._dragRef.moved.pipe((0,ut.U)(Y=>({source:this,pointerPosition:Y.pointerPosition,event:Y.event,delta:Y.delta,distance:Y.distance}))).subscribe(q);return()=>{U.unsubscribe()}}),this._dragRef=p.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,i._dragInstances.push(this),l&&this._assignDefaults(l),n&&(this._dragRef._withDropContainer(n._dropListRef),n.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,m.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,ae.q)(1),(0,k.R)(this._destroyed)).subscribe(()=>{this._updateRootElement(),this._setupHandlesListener(),this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)})})}ngOnChanges(t){const n=t.rootElementSelector,a=t.freeDragPosition;n&&!n.firstChange&&this._updateRootElement(),a&&!a.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this);const t=i._dragInstances.indexOf(this);t>-1&&i._dragInstances.splice(t,1),this._ngZone.runOutsideAngular(()=>{this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_updateRootElement(){const t=this.element.nativeElement;let n=t;this.rootElementSelector&&(n=void 0!==t.closest?t.closest(this.rootElementSelector):t.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(n||t)}_getBoundaryElement(){const t=this.boundaryElement;return t?"string"==typeof t?this.element.nativeElement.closest(t):(0,m.fI)(t):null}_syncInputs(t){t.beforeStarted.subscribe(()=>{if(!t.isDragging()){const n=this._dir,a=this.dragStartDelay,s=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,r=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.dragStartDelay="object"==typeof a&&a?a:(0,m.su)(a),t.constrainPosition=this.constrainPosition,t.previewClass=this.previewClass,t.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(s).withPreviewTemplate(r).withPreviewContainer(this.previewContainer||"global"),n&&t.withDirection(n.value)}}),t.beforeStarted.pipe((0,ae.q)(1)).subscribe(()=>{if(this._parentDrag)return void t.withParent(this._parentDrag._dragRef);let n=this.element.nativeElement.parentElement;for(;n;){if(n.classList.contains("cdk-drag")){t.withParent(i._dragInstances.find(a=>a.element.nativeElement===n)?._dragRef||null);break}n=n.parentElement}})}_handleEvents(t){t.started.subscribe(n=>{this.started.emit({source:this,event:n.event}),this._changeDetectorRef.markForCheck()}),t.released.subscribe(n=>{this.released.emit({source:this,event:n.event})}),t.ended.subscribe(n=>{this.ended.emit({source:this,distance:n.distance,dropPoint:n.dropPoint,event:n.event}),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(n=>{this.entered.emit({container:n.container.data,item:this,currentIndex:n.currentIndex})}),t.exited.subscribe(n=>{this.exited.emit({container:n.container.data,item:this})}),t.dropped.subscribe(n=>{this.dropped.emit({previousIndex:n.previousIndex,currentIndex:n.currentIndex,previousContainer:n.previousContainer.data,container:n.container.data,isPointerOverContainer:n.isPointerOverContainer,item:this,distance:n.distance,dropPoint:n.dropPoint,event:n.event})})}_assignDefaults(t){const{lockAxis:n,dragStartDelay:a,constrainPosition:s,previewClass:r,boundaryElement:l,draggingDisabled:c,rootElementSelector:p,previewContainer:g}=t;this.disabled=c??!1,this.dragStartDelay=a||0,n&&(this.lockAxis=n),s&&(this.constrainPosition=s),r&&(this.previewClass=r),l&&(this.boundaryElement=l),p&&(this.rootElementSelector=p),g&&(this.previewContainer=g)}_setupHandlesListener(){this._handles.changes.pipe((0,j.O)(this._handles),(0,gt.b)(t=>{const n=t.filter(a=>a._parentDrag===this).map(a=>a.element);this._selfHandle&&this.rootElementSelector&&n.push(this.element),this._dragRef.withHandles(n)}),(0,mt.w)(t=>(0,F.T)(...t.map(n=>n._stateChanges.pipe((0,j.O)(n))))),(0,k.R)(this._destroyed)).subscribe(t=>{const n=this._dragRef,a=t.element.nativeElement;t.disabled?n.disableHandle(a):n.enableHandle(a)})}}return i._dragInstances=[],i.\u0275fac=function(t){return new(t||i)(e.Y36(e.SBq),e.Y36(Fe,12),e.Y36(u.K0),e.Y36(e.R0b),e.Y36(e.s_b),e.Y36(Le,8),e.Y36(se.Is,8),e.Y36(he),e.Y36(e.sBO),e.Y36(Ne,10),e.Y36(qe,12))},i.\u0275dir=e.lG2({type:i,selectors:[["","cdkDrag",""]],contentQueries:function(t,n,a){if(1&t&&(e.Suo(a,wt,5),e.Suo(a,Ot,5),e.Suo(a,Ne,5)),2&t){let s;e.iGM(s=e.CRH())&&(n._previewTemplate=s.first),e.iGM(s=e.CRH())&&(n._placeholderTemplate=s.first),e.iGM(s=e.CRH())&&(n._handles=s)}},hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(t,n){2&t&&e.ekj("cdk-drag-disabled",n.disabled)("cdk-drag-dragging",n._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:qe,useExisting:i}]),e.TTD]}),i})(),xt=(()=>{class i{}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.oAB({type:i}),i.\u0275inj=e.cJS({providers:[he],imports:[b.ZD]}),i})();var M=d(3154),J=d(7185),Je=d(8002),Q=d(1318);let At=(()=>{class i{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 i.\u0275fac=function(t){return new(t||i)(e.LFG(Q.O))},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var y=d(266);function kt(i,o){1&i&&(e.TgZ(0,"a",12),e._uU(1,"Add"),e.qZA())}function Rt(i,o){if(1&i){const t=e.EpF();e.ynx(0),e.TgZ(1,"button",13),e.NdJ("click",function(){e.CHM(t);const a=e.oxw();return e.KtG(a.onSaveDragAndDrop())}),e._UZ(2,"i",14),e._uU(3,"Save Changes "),e.qZA(),e.BQk()}}function Et(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"button",13),e.NdJ("click",function(){e.CHM(t);const a=e.oxw();return e.KtG(a.cdkDragDisabled=!a.cdkDragDisabled)}),e._UZ(1,"i",14),e._uU(2,"Sort "),e.qZA()}}function qt(i,o){if(1&i&&(e.TgZ(0,"div"),e._uU(1," Expiration: "),e.TgZ(2,"span",32),e._uU(3),e.ALo(4,"date"),e.qZA()()),2&i){const t=e.oxw().$implicit;e.xp6(3),e.Oqu(e.xi3(4,1,null==t?null:t.ExpiredTime,"dd MMM yyyy"))}}function Ut(i,o){if(1&i&&(e.TgZ(0,"span",34)(1,"button",35),e._uU(2),e.qZA()()),2&i){const t=e.oxw(2).$implicit,n=e.oxw();e.Q6J("matTooltip",n.filterProductInventory(t.POSInventoryOutletArray,4,t.POSInventoryOutletArray.length)),e.xp6(2),e.hij(" ",t.POSInventoryOutletArray.length-3," ")}}function Lt(i,o){if(1&i&&(e.TgZ(0,"span",23),e._uU(1),e.YNc(2,Ut,3,2,"span",33),e.qZA()),2&i){const t=e.oxw().$implicit,n=e.oxw();e.xp6(1),e.hij(" ",n.filterProductInventory(t.POSInventoryOutletArray,1,3)," "),e.xp6(1),e.Q6J("ngIf",t.POSInventoryOutletArray.length>3)}}function Ft(i,o){1&i&&(e.TgZ(0,"span",23),e._uU(1," [SUM All Outlet] "),e.qZA())}function Nt(i,o){if(1&i&&(e.TgZ(0,"div",22),e._uU(1,"Additional Item: "),e.TgZ(2,"span",23),e._uU(3),e.qZA()()),2&i){const t=e.oxw().$implicit;e.xp6(3),e.hij(" ",null==t?null:t.Additionalitem,"")}}const R=function(i){return{"bg-gradient-warning":i}},Qe=function(){return["/menu/channel/marketplace/view"]},He=function(i){return{ID:i}};function Jt(i,o){if(1&i){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,qt,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,Lt,3,2,"span",27),e.YNc(34,Ft,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,Nt,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 s=e.CHM(t).$implicit,r=e.oxw();return e.KtG(r.onTestChannel(s))}),e._uU(57,"Test"),e.qZA()()()}if(2&i){const t=o.$implicit,n=e.MAs(35),a=e.oxw();e.Q6J("cdkDragDisabled",a.cdkDragDisabled)("matTooltip",null!=t&&t.isComplete?"":"Please complete your channel configuration"),e.xp6(1),e.Q6J("ngClass",e.VKq(32,R,a.isEmpty(null==t?null:t.isComplete))),e.xp6(1),e.Q6J("routerLink",e.DdM(34,Qe))("queryParams",e.VKq(35,He,t.ID)),e.xp6(1),e.Q6J("src",a.getChannelLogo(null==t?null:t.TypeID),e.LSH),e.xp6(1),e.Q6J("ngClass",e.VKq(37,R,a.isEmpty(null==t?null:t.isComplete))),e.xp6(1),e.Q6J("routerLink",e.DdM(39,Qe))("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,R,a.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,R,a.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",n),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,R,a.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,R,a.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,R,a.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 i{constructor(t,n,a){this.toastr=t,this.konversi=n,this.channelService=a,this.setup=!1,this.channel(),this.pageData={Title:"Channel",Nav:[{Title:"Channel",Url:"/menu/channel",Active:!0},{Title:"POS",Url:"/menu/channel/config",Active:!1}]},this.cdkDragDisabled=!0}ngOnInit(){this.konversi.GetRoles().filter(n=>"Setup"==n||"Stp"==n).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,M.g.IsNotEmpty(t.POSOutlet)&&M.g.IsNotEmpty(t.POSTax)&&M.g.IsNotEmpty(t.POSInvoicePaymentMethod)&&M.g.IsNotEmpty(t.POSSalesOrderType)&&M.g.IsNotEmpty(t.POSDeliveryOutlet)&&(t.isComplete=!0),t))}isEmpty(t){return M.g.IsEmpty(t)}onTestChannel(t){this.channelService.testShopID(t).subscribe(n=>{this.channel(),this.showTostrSuccessTestShopID(n)})}showTostrSuccessTestShopID(t){let n="";for(var a in t)n+=a+" : "+t[a]+"<br/>";this.toastr.success(n,"Success",{enableHtml:!0,closeButton:!0,positionClass:"toast-bottom-right"})}onDeleteChannel(t){confirm("Want to delete?")&&this.channelService.deleteChannel(t).subscribe(a=>{this.channel()})}onDrop(t){xe(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,n,a){let s=t;return s=s.filter((l,c)=>(c+=1)>=n&&c<=a),s.join(", ")}getChannelLogo(t){return M.g.getChannelLogoByTypeId(t)}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(J._W),e.Y36(Je.e),e.Y36(At))},i.\u0275cmp=e.Xpm({type:i,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,n){if(1&t&&(e.TgZ(0,"mainpanel",0)(1,"actions"),e.YNc(2,kt,2,0,"a",1),e.YNc(3,Rt,4,0,"ng-container",2),e.YNc(4,Et,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(s){return n.onDrop(s)}),e.YNc(25,Jt,58,52,"tr",11),e.qZA()()()()()()()()),2&t){const a=e.MAs(5);e.Q6J("headerTitle","Marketplace")("pageData",n.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(2),e.Q6J("ngIf",n.setup),e.xp6(1),e.Q6J("ngIf",!n.cdkDragDisabled)("ngIfElse",a),e.xp6(22),e.Q6J("ngForOf",n.channels)}},dependencies:[u.mk,u.sg,u.O5,f.p,C.yS,Mt,Zt,y.gM,u.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}"]}),i})();var H=d(8063);class E{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}}function Ht(i,o){1&i&&(e.TgZ(0,"div",17)(1,"span"),e._uU(2,"Outlet is required!"),e.qZA()())}function Yt(i,o){1&i&&(e.TgZ(0,"div",17)(1,"span"),e._uU(2,"Outlet is required!"),e.qZA()())}const Ye=function(i){return{empty:i}},Ve=function(i){return{danger:i}};let Vt=(()=>{class i{constructor(){this.channel=new E,this.channelChange=new e.vpe}ngOnInit(){}onSelectOutlet(){this.channel.SyncOrder=!M.g.IsEmpty(this.channel.POSOutlet),this.channelChange.emit(this.channel)}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-outle-config"]],inputs:{channel:"channel",outlets:"outlets"},outputs:{channelChange:"channelChange"},decls:23,vars:20,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[1,"card-body"],[1,"row"],[1,"col-6"],["matTooltip","Outlet where the transaction is recorded in POS","matTooltipPosition","above",1,"form-label-group",3,"ngClass"],["id","outletOrder","bindLabel","Outlet","bindValue","Outlet","placeholder","New Order To","name","Outlet","required","",1,"center-text","tall",3,"ngClass","items","ngModel","ngModelChange","change"],["outlet","ngModel"],["for","outletOrder"],["class","alert alert-danger",4,"ngIf"],["matTooltip","Outlet where the stock is deducted in POS","matTooltipPosition","above",1,"form-label-group",3,"ngClass"],["id","inventorySource","bindLabel","Outlet","bindValue","Outlet","placeholder","Dispatch Orders From","name","Delivery","required","",1,"center-text","tall",3,"ngClass","items","ngModel","ngModelChange"],["delivery","ngModel"],["for","inventorySource"],[1,"col-12"],["matTooltip","Choose Outlet where inventory is recorded","matTooltipPosition","above",1,"form-label-group"],["id","ProductInventory","multiple","true","bindLabel","Outlet","bindValue","Outlet","placeholder","Product Inventory","name","POSInventoryOutletArray",1,"center-text","tall","multiple-select",3,"items","ngModel","ngModelChange"],["for","ProductInventory"],[1,"alert","alert-danger"]],template:function(t,n){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"ng-select",5,6),e.NdJ("ngModelChange",function(s){return n.channel.POSOutlet=s})("change",function(){return n.onSelectOutlet()}),e.qZA(),e.TgZ(7,"label",7),e._uU(8,"New Order To"),e.qZA()(),e.YNc(9,Ht,3,0,"div",8),e.qZA(),e.TgZ(10,"div",3)(11,"div",9)(12,"ng-select",10,11),e.NdJ("ngModelChange",function(s){return n.channel.POSDeliveryOutlet=s}),e.qZA(),e.TgZ(14,"label",12),e._uU(15,"Dispatch Orders From"),e.qZA()(),e.YNc(16,Yt,3,0,"div",8),e.qZA()(),e.TgZ(17,"div",2)(18,"div",13)(19,"div",14)(20,"ng-select",15),e.NdJ("ngModelChange",function(s){return n.channel.POSInventoryOutletArray=s}),e.qZA(),e.TgZ(21,"label",16),e._uU(22,"Product Inventory"),e.qZA()()()()()()),2&t){const a=e.MAs(6),s=e.MAs(13);e.xp6(4),e.Q6J("ngClass",e.VKq(12,Ye,!n.channel.POSOutlet)),e.xp6(1),e.Q6J("ngClass",e.VKq(14,Ve,!n.channel.POSOutlet))("items",n.outlets)("ngModel",n.channel.POSOutlet),e.xp6(4),e.Q6J("ngIf",a.invalid&&(a.dirty||a.touched)),e.xp6(2),e.Q6J("ngClass",e.VKq(16,Ye,!n.channel.POSDeliveryOutlet)),e.xp6(1),e.Q6J("ngClass",e.VKq(18,Ve,!n.channel.POSDeliveryOutlet))("items",n.outlets)("ngModel",n.channel.POSDeliveryOutlet),e.xp6(4),e.Q6J("ngIf",s.invalid&&(s.dirty||s.touched)),e.xp6(4),e.Q6J("items",n.outlets)("ngModel",n.channel.POSInventoryOutletArray)}},dependencies:[u.mk,u.O5,h.JJ,h.Q7,h.On,A.w9,y.gM]}),i})();function Bt(i,o){1&i&&(e.TgZ(0,"div",14)(1,"span"),e._uU(2,"Payment Method is required!"),e.qZA()())}function zt(i,o){1&i&&(e.TgZ(0,"div",14)(1,"span"),e._uU(2,"Tax Type is required!"),e.qZA()())}function Wt(i,o){1&i&&(e.TgZ(0,"div",14)(1,"span"),e._uU(2,"Sales Orders is required!"),e.qZA()())}const ue=function(i){return{empty:i}},ge=function(i){return{danger:i}};let Kt=(()=>{class i{constructor(){this.channel=new E,this.channelChange=new e.vpe}ngOnInit(){}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-orders-config"]],inputs:{channel:"channel",paymentMethods:"paymentMethods",taxes:"taxes",salesTypes:"salesTypes"},outputs:{channelChange:"channelChange"},decls:25,vars:27,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[1,"card-body"],[1,"row"],[1,"col-6"],["matTooltipPosition","above","matTooltip","Payment that will be recorded in POS if there is a transaction from the marketplace",1,"form-label-group",3,"ngClass"],["bindLabel","Name","bindValue","Name","placeholder","Payment Method","name","InvoicePaymentMethod","required","",1,"center-text","tall",3,"items","ngClass","ngModel","ngModelChange"],["method","ngModel"],["class","alert alert-danger",4,"ngIf"],["matTooltip","Tax Type that will be recorded in POS if there is a transaction from the marketplace","matTooltipPosition","above",1,"form-label-group",3,"ngClass"],["bindLabel","Name","bindValue","Name","placeholder","Tax","name","POSTax","required","",1,"center-text","tall",3,"items","ngClass","ngModel","ngModelChange"],["tax","ngModel"],["matTooltip","Tag Type that will be recorded in POS if there is a transaction from the marketplace","matTooltipPosition","above",1,"form-label-group",3,"ngClass"],["bindLabel","Name","bindValue","Name","placeholder","Sales Orders Tag","name","SalesType","required","",1,"center-text","tall",3,"items","ngClass","ngModel","ngModelChange"],["sales","ngModel"],[1,"alert","alert-danger"]],template:function(t,n){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"ng-select",5,6),e.NdJ("ngModelChange",function(s){return n.channel.POSInvoicePaymentMethod=s}),e.qZA(),e.TgZ(7,"label"),e._uU(8,"Payment Method"),e.qZA()(),e.YNc(9,Bt,3,0,"div",7),e.qZA(),e.TgZ(10,"div",3)(11,"div",8)(12,"ng-select",9,10),e.NdJ("ngModelChange",function(s){return n.channel.POSTax=s}),e.qZA(),e.TgZ(14,"label"),e._uU(15,"Tax"),e.qZA()(),e.YNc(16,zt,3,0,"div",7),e.qZA()(),e.TgZ(17,"div",2)(18,"div",3)(19,"div",11)(20,"ng-select",12,13),e.NdJ("ngModelChange",function(s){return n.channel.POSSalesOrderType=s}),e.qZA(),e.TgZ(22,"label"),e._uU(23,"Sales Orders Tag"),e.qZA()(),e.YNc(24,Wt,3,0,"div",7),e.qZA()()()()),2&t){const a=e.MAs(6),s=e.MAs(13),r=e.MAs(21);e.xp6(4),e.Q6J("ngClass",e.VKq(15,ue,!n.channel.POSInvoicePaymentMethod)),e.xp6(1),e.Q6J("items",n.paymentMethods)("ngClass",e.VKq(17,ge,!n.channel.POSInvoicePaymentMethod))("ngModel",n.channel.POSInvoicePaymentMethod),e.xp6(4),e.Q6J("ngIf",a.invalid&&(a.dirty||a.touched)),e.xp6(2),e.Q6J("ngClass",e.VKq(19,ue,!n.channel.POSTax)),e.xp6(1),e.Q6J("items",n.taxes)("ngClass",e.VKq(21,ge,!n.channel.POSTax))("ngModel",n.channel.POSTax),e.xp6(4),e.Q6J("ngIf",s.invalid&&(s.dirty||s.touched)),e.xp6(3),e.Q6J("ngClass",e.VKq(23,ue,!n.channel.POSSalesOrderType)),e.xp6(1),e.Q6J("items",n.salesTypes)("ngClass",e.VKq(25,ge,!n.channel.POSSalesOrderType))("ngModel",n.channel.POSSalesOrderType),e.xp6(4),e.Q6J("ngIf",r.invalid&&(r.dirty||r.touched))}},dependencies:[u.mk,u.O5,h.JJ,h.Q7,h.On,A.w9,y.gM]}),i})();var Be=d(9300),K=d(6779),x=d(5412),ne=d(6401);let Gt=(()=>{class i{constructor(t,n){this.dialogRef=t,this.httpService=n,this.modalConfig=new K.O,this.modalConfig.title="Write Off Reason"}onSubmit(){const t={Name:this.reason};this.subscription=this.httpService.post("/api/v3/WriteOff/Option",t).subscribe(n=>{this.dialogRef.close(t)})}onClose(){this.dialogRef.close(!1)}ngOnDestroy(){this.subscription.unsubscribe()}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(x.so),e.Y36(Q.O))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-dialog-writeOff-reason"]],decls:7,vars:3,consts:[[3,"dynamicValidated","config","onClose","onCancel","onOk"],["content",""],[1,"form-label-group"],["type","text","id","writeOffReason","placeholder","Write Off Reason","name","writeOffReason",1,"form-control",3,"ngModel","ngModelChange"],["name","ngModel"],["for","shopid"]],template:function(t,n){1&t&&(e.TgZ(0,"modal-material",0),e.NdJ("onClose",function(){return n.onClose()})("onCancel",function(){return n.onClose()})("onOk",function(){return n.onSubmit()}),e.TgZ(1,"div",1)(2,"div",2)(3,"input",3,4),e.NdJ("ngModelChange",function(s){return n.reason=s}),e.qZA(),e.TgZ(5,"label",5),e._uU(6,"Reason"),e.qZA()()()()),2&t&&(e.Q6J("dynamicValidated",n.reason)("config",n.modalConfig),e.xp6(3),e.Q6J("ngModel",n.reason))},dependencies:[h.Fj,h.JJ,h.On,ne.M],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}"]}),i})();const jt=function(i){return{empty:i}},Xt=function(i){return{danger:i}};function $t(i,o){if(1&i){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",3)(2,"div",10)(3,"div",11)(4,"ng-select",12),e.NdJ("ngModelChange",function(a){e.CHM(t);const s=e.oxw();return e.KtG(s.channel.ServiceFeeWriteOffReason=a)}),e.qZA(),e.TgZ(5,"label",13),e._uU(6,"Write Off Reason"),e.qZA()(),e.TgZ(7,"div",14)(8,"a",15),e.NdJ("click",function(){e.CHM(t);const a=e.oxw();return e.KtG(a.onAddWriteOffReason())}),e.qZA()()()(),e.BQk()}if(2&i){const t=e.oxw();e.xp6(3),e.Q6J("ngClass",e.VKq(4,jt,!t.channel.ServiceFeeWriteOffReason)),e.xp6(1),e.Q6J("ngClass",e.VKq(6,Xt,!t.channel.ServiceFeeWriteOffReason))("items",t.listWriteOff)("ngModel",t.channel.ServiceFeeWriteOffReason)}}let en=(()=>{class i{constructor(t){this.dialog=t,this.channel=new E,this.channelChange=new e.vpe}ngOnInit(){}onAddWriteOffReason(){this.dialog.open(Gt,{width:"450px"}).afterClosed().pipe((0,Be.h)(t=>t)).subscribe(t=>{this.listWriteOff=[t,...this.listWriteOff]})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(x.uw))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-invoice-fee-config"]],inputs:{channel:"channel",listWriteOff:"listWriteOff"},outputs:{channelChange:"channelChange"},decls:14,vars:4,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[1,"card-body"],[1,"row"],[1,"col-6"],["matTooltipPosition","above","matTooltip","Enable for record marketplace service fee in POS as Write off",1,"form-label-group","radio"],["for","enableWriteOff"],[1,"mt-3"],["name","enableWriteOff",3,"ngModel","ngModelChange"],[1,"me-5",3,"value"],[4,"ngIf"],[1,"d-flex","align-items-center","justify-content-between"],["matTooltipPosition","above","matTooltip","Choose Reason to Write Off",1,"form-label-group","w-100",3,"ngClass"],["id","writeOffReason","clearable","true","bindLabel","Name","bindValue","Name","placeholder","Write Off Reason","name","writeOffReason",1,"center-text","tall",3,"ngClass","items","ngModel","ngModelChange"],["for","ServiceFeeWriteOffReason"],[1,"mb-5","ms-4"],["title","Add new write off reason",1,"fas","fa-plus-circle","fa-lg","fs-1",2,"cursor","pointer",3,"click"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"label",5),e._uU(6,"Enable Write Off"),e.qZA(),e.TgZ(7,"div",6)(8,"mat-radio-group",7),e.NdJ("ngModelChange",function(s){return n.channel.ServiceFeeWriteOff=s}),e.TgZ(9,"mat-radio-button",8),e._uU(10," No "),e.qZA(),e.TgZ(11,"mat-radio-button",8),e._uU(12," Yes "),e.qZA()()()()(),e.YNc(13,$t,9,8,"ng-container",9),e.qZA()()()),2&t&&(e.xp6(8),e.Q6J("ngModel",n.channel.ServiceFeeWriteOff),e.xp6(1),e.Q6J("value",!1),e.xp6(2),e.Q6J("value",!0),e.xp6(2),e.Q6J("ngIf",n.channel.ServiceFeeWriteOff))},dependencies:[u.mk,u.O5,h.JJ,h.On,D.VQ,D.U0,A.w9,y.gM]}),i})();var O=d(9521),w=d(3238),tn=d(5017),me=d(9549);const nn=["*"],ze=new e.OlP("MatChipRemove"),We=new e.OlP("MatChipAvatar"),Ke=new e.OlP("MatChipTrailingIcon");class on{constructor(o){this._elementRef=o}}const an=(0,w.sb)((0,w.pj)((0,w.Kr)(on),"primary"),-1);let ie=(()=>{class i extends an{constructor(t,n,a,s,r,l,c,p){super(t),this._ngZone=n,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 _.x,this._onBlur=new _.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 w.IR(this,n,this._chipRippleTarget,a),this._chipRipple.setupTriggerEvents(t),this.rippleConfig=s||{},this._animationsDisabled="NoopAnimations"===c,this.tabIndex=null!=p&&parseInt(p)||-1}get rippleDisabled(){return this.disabled||this.disableRipple||this._animationsDisabled||!!this.rippleConfig.disabled}get selected(){return this._selected}set selected(t){const n=(0,m.Ig)(t);n!==this._selected&&(this._selected=n,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,m.Ig)(t)}get disabled(){return this._chipListDisabled||this._disabled}set disabled(t){this._disabled=(0,m.Ig)(t)}get removable(){return this._removable}set removable(t){this._removable=(0,m.Ig)(t)}get ariaSelected(){return this.selectable&&(this._chipListMultiple||this.selected)?this.selected.toString():null}_addHostClassName(){const t="mat-basic-chip",n=this._elementRef.nativeElement;n.hasAttribute(t)||n.tagName.toLowerCase()===t?n.classList.add(t):n.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 O.yY:case O.ZH:this.remove(),t.preventDefault();break;case O.L_:this.selectable&&this.toggleSelected(!0),t.preventDefault()}}_blur(){this._ngZone.onStable.pipe((0,ae.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 i.\u0275fac=function(t){return new(t||i)(e.Y36(e.SBq),e.Y36(e.R0b),e.Y36(T.t4),e.Y36(w.Y2,8),e.Y36(e.sBO),e.Y36(u.K0),e.Y36(e.QbO,8),e.$8M("tabindex"))},i.\u0275dir=e.lG2({type:i,selectors:[["mat-basic-chip"],["","mat-basic-chip",""],["mat-chip"],["","mat-chip",""]],contentQueries:function(t,n,a){if(1&t&&(e.Suo(a,We,5),e.Suo(a,Ke,5),e.Suo(a,ze,5)),2&t){let s;e.iGM(s=e.CRH())&&(n.avatar=s.first),e.iGM(s=e.CRH())&&(n.trailingIcon=s.first),e.iGM(s=e.CRH())&&(n.removeIcon=s.first)}},hostAttrs:[1,"mat-chip","mat-focus-indicator"],hostVars:15,hostBindings:function(t,n){1&t&&e.NdJ("click",function(s){return n._handleClick(s)})("keydown",function(s){return n._handleKeydown(s)})("focus",function(){return n.focus()})("blur",function(){return n._blur()}),2&t&&(e.uIk("tabindex",n.disabled?null:n.tabIndex)("role",n.role)("disabled",n.disabled||null)("aria-disabled",n.disabled.toString())("aria-selected",n.ariaSelected),e.ekj("mat-chip-selected",n.selected)("mat-chip-with-avatar",n.avatar)("mat-chip-with-trailing-icon",n.trailingIcon||n.removeIcon)("mat-chip-disabled",n.disabled)("_mat-animation-noopable",n._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]}),i})(),Ge=(()=>{class i{constructor(t,n){this._parentChip=t,"BUTTON"===n.nativeElement.nodeName&&n.nativeElement.setAttribute("type","button")}_handleClick(t){const n=this._parentChip;n.removable&&!n.disabled&&n.remove(),t.stopPropagation(),t.preventDefault()}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(ie),e.Y36(e.SBq))},i.\u0275dir=e.lG2({type:i,selectors:[["","matChipRemove",""]],hostAttrs:[1,"mat-chip-remove","mat-chip-trailing-icon"],hostBindings:function(t,n){1&t&&e.NdJ("click",function(s){return n._handleClick(s)})},features:[e._Bn([{provide:ze,useExisting:i}])]}),i})();const je=new e.OlP("mat-chips-default-options"),ln=(0,w.FD)(class{constructor(i,o,t,n){this._defaultErrorStateMatcher=i,this._parentForm=o,this._parentFormGroup=t,this.ngControl=n,this.stateChanges=new _.x}});let cn=0;class dn{constructor(o,t){this.source=o,this.value=t}}let Xe=(()=>{class i extends ln{constructor(t,n,a,s,r,l,c){super(l,s,r,c),this._elementRef=t,this._changeDetectorRef=n,this._dir=a,this.controlType="mat-chip-list",this._lastDestroyedChipIndex=null,this._destroyed=new _.x,this._uid="mat-chip-list-"+cn++,this._tabIndex=0,this._userTabIndex=null,this._onTouched=()=>{},this._onChange=()=>{},this._multiple=!1,this._compareWith=(p,g)=>p===g,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,m.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(h.kI.required)??!1}set required(t){this._required=(0,m.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,m.Ig)(t),this._syncChipsState()}get selectable(){return this._selectable}set selectable(t){this._selectable=(0,m.Ig)(t),this.chips&&this.chips.forEach(n=>n.chipListSelectable=this._selectable)}set tabIndex(t){this._userTabIndex=t,this._tabIndex=t}get chipSelectionChanges(){return(0,F.T)(...this.chips.map(t=>t.selectionChange))}get chipFocusChanges(){return(0,F.T)(...this.chips.map(t=>t._onFocus))}get chipBlurChanges(){return(0,F.T)(...this.chips.map(t=>t._onBlur))}get chipRemoveChanges(){return(0,F.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,k.R)(this._destroyed)).subscribe(t=>this._keyManager.withHorizontalOrientation(t)),this._keyManager.tabOut.pipe((0,k.R)(this._destroyed)).subscribe(()=>{this._allowFocusEscape()}),this.chips.changes.pipe((0,j.O)(null),(0,k.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 tn.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 n=t.target;n&&n.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,n=!0){if(this._clearSelection(),this.chips.forEach(a=>a.deselect()),Array.isArray(t))t.forEach(a=>this._selectValue(a,n)),this._sortValues();else{const a=this._selectValue(t,n);a&&n&&this._keyManager.setActiveItem(a)}}_selectValue(t,n=!0){const a=this.chips.find(s=>null!=s.value&&this._compareWith(s.value,t));return a&&(n?a.selectViaInteraction():a.select(),this._selectionModel.select(a)),a}_initializeSelection(){Promise.resolve().then(()=>{(this.ngControl||this._value)&&(this._setSelectionByValue(this.ngControl?this.ngControl.value:this._value,!1),this.stateChanges.next())})}_clearSelection(t){this._selectionModel.clear(),this.chips.forEach(n=>{n!==t&&n.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 n=null;n=Array.isArray(this.selected)?this.selected.map(a=>a.value):this.selected?this.selected.value:t,this._value=n,this.change.emit(new dn(this,n)),this.valueChange.emit(n),this._onChange(n),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(n=>{!this._selectionModel.isSelected(n)&&n.selected&&n.deselect()}),t.isUserInput&&this._propagateChanges()})}_listenToChipsFocus(){this._chipFocusSubscription=this.chipFocusChanges.subscribe(t=>{let n=this.chips.toArray().indexOf(t.chip);this._isValidIndex(n)&&this._keyManager.updateActiveItem(n),this.stateChanges.next()}),this._chipBlurSubscription=this.chipBlurChanges.subscribe(()=>{this._blur(),this.stateChanges.next()})}_listenToChipsRemoved(){this._chipRemoveSubscription=this.chipRemoveChanges.subscribe(t=>{const n=t.chip,a=this.chips.toArray().indexOf(t.chip);this._isValidIndex(a)&&n._hasFocus&&(this._lastDestroyedChipIndex=a)})}_originatesFromChip(t){let n=t.target;for(;n&&n!==this._elementRef.nativeElement;){if(n.classList.contains("mat-chip"))return!0;n=n.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 i.\u0275fac=function(t){return new(t||i)(e.Y36(e.SBq),e.Y36(e.sBO),e.Y36(se.Is,8),e.Y36(h.F,8),e.Y36(h.sg,8),e.Y36(w.rD),e.Y36(h.a5,10))},i.\u0275cmp=e.Xpm({type:i,selectors:[["mat-chip-list"]],contentQueries:function(t,n,a){if(1&t&&e.Suo(a,ie,5),2&t){let s;e.iGM(s=e.CRH())&&(n.chips=s)}},hostAttrs:[1,"mat-chip-list"],hostVars:14,hostBindings:function(t,n){1&t&&e.NdJ("focus",function(){return n.focus()})("blur",function(){return n._blur()})("keydown",function(s){return n._keydown(s)}),2&t&&(e.Ikx("id",n._uid),e.uIk("tabindex",n.disabled?null:n._tabIndex)("aria-required",n.role?n.required:null)("aria-disabled",n.disabled.toString())("aria-invalid",n.errorState)("aria-multiselectable",n.multiple)("role",n.role)("aria-orientation",n.ariaOrientation),e.ekj("mat-chip-list-disabled",n.disabled)("mat-chip-list-invalid",n.errorState)("mat-chip-list-required",n.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:me.Eo,useExisting:i}]),e.qOj],ngContentSelectors:nn,decls:2,vars:0,consts:[[1,"mat-chip-list-wrapper"]],template:function(t,n){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}),i})(),pn=0,$e=(()=>{class i{constructor(t,n){this._elementRef=t,this._defaultOptions=n,this.focused=!1,this._addOnBlur=!1,this.separatorKeyCodes=this._defaultOptions.separatorKeyCodes,this.chipEnd=new e.vpe,this.placeholder="",this.id="mat-chip-list-input-"+pn++,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,m.Ig)(t)}get disabled(){return this._disabled||this._chipList&&this._chipList.disabled}set disabled(t){this._disabled=(0,m.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===O.Mf&&!(0,O.Vb)(t,"shiftKey")&&this._chipList._allowFocusEscape(),t.keyCode===O.ZH&&this._focusLastChipOnBackspace)return this._chipList._keyManager.setLastItemActive(),void t.preventDefault();this._focusLastChipOnBackspace=!1}this._emitChipEnd(t)}_keyup(t){!this._focusLastChipOnBackspace&&t.keyCode===O.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,O.Vb)(t)&&new Set(this.separatorKeyCodes).has(t.keyCode)}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(e.SBq),e.Y36(je))},i.\u0275dir=e.lG2({type:i,selectors:[["input","matChipInputFor",""]],hostAttrs:[1,"mat-chip-input","mat-input-element"],hostVars:5,hostBindings:function(t,n){1&t&&e.NdJ("keydown",function(s){return n._keydown(s)})("keyup",function(s){return n._keyup(s)})("blur",function(){return n._blur()})("focus",function(){return n._focus()})("input",function(){return n._onInput()}),2&t&&(e.Ikx("id",n.id),e.uIk("disabled",n.disabled||null)("placeholder",n.placeholder||null)("aria-invalid",n._chipList&&n._chipList.ngControl?n._chipList.ngControl.invalid:null)("aria-required",n._chipList&&n._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]}),i})(),hn=(()=>{class i{}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.oAB({type:i}),i.\u0275inj=e.cJS({providers:[w.rD,{provide:je,useValue:{separatorKeyCodes:[O.K5]}}],imports:[w.BQ]}),i})();var et=d(7392);function un(i,o){1&i&&(e.TgZ(0,"p"),e._uU(1," Email is not valid "),e.qZA())}function gn(i,o){if(1&i&&(e.TgZ(0,"div",31),e.YNc(1,un,2,0,"p",32),e.qZA()),2&i){e.oxw();const t=e.MAs(11);e.xp6(1),e.Q6J("ngIf",t.errors.pattern)}}function mn(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"mat-chip",33),e.NdJ("removed",function(){const s=e.CHM(t).$implicit,r=e.oxw();return e.KtG(r.removeAdditonalItem(s))}),e._uU(1),e.TgZ(2,"button",34)(3,"mat-icon"),e._uU(4,"cancel"),e.qZA()()()}if(2&i){const t=o.$implicit;e.xp6(1),e.hij(" ",t," ")}}const fn=function(i){return{"is-invalid border border-danger":i}},_n=function(){return{updateOn:"blur"}},vn=function(i){return{empty:i}};let Cn=(()=>{class i{constructor(){this._channel=new E,this.additionalItems=[],this.channelChange=new e.vpe,this.additionalItemsChange=new e.vpe}set channel(t){t&&(this._channel=t,this.initAdditionalItems())}get channel(){return this._channel}initAdditionalItems(){let t=this.channel.Additionalitem;t&&(this.additionalItems=t.split(","),this.additionalItemsChange.emit(this.additionalItems))}addAdditonalItem(t){const n=(t.value||"").trim();this.additionalItems.includes(n)||(this.additionalItems.push(n),this.additionalItemsChange.emit(this.additionalItems)),t.chipInput.clear()}removeAdditonalItem(t){const n=this.additionalItems.indexOf(t);n>=0&&(this.additionalItems.splice(n,1),this.additionalItemsChange.emit(this.additionalItems))}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-advanced-config"]],inputs:{channel:"channel",additionalItems:"additionalItems"},outputs:{channelChange:"channelChange",additionalItemsChange:"additionalItemsChange"},decls:47,vars:20,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[1,"card-body"],[1,"row"],[1,"col-6"],["matTooltipPosition","above","matTooltip","Register where the transaction is recorded in POS",1,"form-label-group"],["type","text","id","Register","placeholder","Register","name","Register",1,"form-control",3,"ngModel","ngModelChange"],["for","Register"],["matTooltipPosition","above","matTooltip","Change the customer's name from the order in the marketplace according this email",1,"form-label-group"],["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"],["for","Name"],["class","text-danger",4,"ngIf"],["matTooltipPosition","above","matTooltip","Minimal inventory on channel, if product inventory is bellow minimum inventory will automatically update to 0",1,"form-label-group"],["type","number","name","MinimumInventory","placeholder","Minimum Inventory","id","MinimumInventory",1,"form-control",3,"ngModel","ngModelChange"],["for","MinimumInventory"],[1,"form-label-group"],["type","number","name","Index","placeholder","Additional item","id","Additionalitem",1,"form-control",3,"ngModel","ngModelChange"],["for","Index"],[1,"col-6","mat-chip-custom"],["appearance","outline","matTooltipPosition","above","matTooltip","Additional item",1,"w-100","add-item"],["aria-label","Additional Item"],["chipList",""],["style","font-size: 12px;",3,"removed",4,"ngFor","ngForOf"],["placeholder","New Item",3,"matChipInputFor","matChipInputTokenEnd"],["matTooltipPosition","above","matTooltip","Your Inventory log status",1,"form-label-group","radio",3,"ngClass"],[2,"top","-11px","background","white"],[1,"mt-3"],["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,"text-danger"],[4,"ngIf"],[2,"font-size","12px",3,"removed"],["matChipRemove",""]],template:function(t,n){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"input",5),e.NdJ("ngModelChange",function(s){return n.channel.Register=s}),e.qZA(),e.TgZ(6,"label",6),e._uU(7,"Register"),e.qZA()()(),e.TgZ(8,"div",3)(9,"div",7)(10,"input",8,9),e.NdJ("ngModelChange",function(s){return n.channel.CustomerDefaultEmail=s}),e.qZA(),e.TgZ(12,"label",10),e._uU(13,"Customer Default Email"),e.qZA()(),e.YNc(14,gn,2,1,"div",11),e.qZA()(),e.TgZ(15,"div",2)(16,"div",3)(17,"div",12)(18,"input",13),e.NdJ("ngModelChange",function(s){return n.channel.MinimumInventory=s}),e.qZA(),e.TgZ(19,"label",14),e._uU(20,"Minimum Inventory"),e.qZA()()(),e.TgZ(21,"div",3)(22,"div",15)(23,"input",16),e.NdJ("ngModelChange",function(s){return n.channel.Index=s}),e.qZA(),e.TgZ(24,"label",17),e._uU(25,"Index"),e.qZA()()()(),e.TgZ(26,"div",2)(27,"div",18)(28,"mat-form-field",19)(29,"mat-label"),e._uU(30,"Additional Item"),e.qZA(),e.TgZ(31,"mat-chip-list",20,21),e.YNc(33,mn,5,1,"mat-chip",22),e.TgZ(34,"input",23),e.NdJ("matChipInputTokenEnd",function(s){return n.addAdditonalItem(s)}),e.qZA()()()(),e.TgZ(35,"div",3)(36,"div",24)(37,"label",25),e._uU(38,"Inventory Log Mode"),e.qZA(),e.TgZ(39,"div",26)(40,"mat-radio-group",27),e.NdJ("ngModelChange",function(s){return n.channel.InventoryLog=s}),e.TgZ(41,"mat-radio-button",28),e._uU(42," None "),e.qZA(),e.TgZ(43,"mat-radio-button",29),e._uU(44," Error "),e.qZA(),e.TgZ(45,"mat-radio-button",30),e._uU(46," Full "),e.qZA()()()()()()()()),2&t){const a=e.MAs(11),s=e.MAs(32);e.xp6(5),e.Q6J("ngModel",n.channel.Register),e.xp6(5),e.Q6J("ngClass",e.VKq(15,fn,a.invalid))("ngModelOptions",e.DdM(17,_n))("ngModel",n.channel.CustomerDefaultEmail),e.xp6(4),e.Q6J("ngIf",a.invalid&&(a.dirty||a.touched)),e.xp6(4),e.Q6J("ngModel",n.channel.MinimumInventory),e.xp6(5),e.Q6J("ngModel",n.channel.Index),e.xp6(10),e.Q6J("ngForOf",n.additionalItems),e.xp6(1),e.Q6J("matChipInputFor",s)("matChipInputFor",s),e.xp6(2),e.Q6J("ngClass",e.VKq(18,vn,n.channel.InventoryLog)),e.xp6(4),e.Q6J("ngModel",n.channel.InventoryLog),e.xp6(1),e.Q6J("value",1),e.xp6(2),e.Q6J("value",2),e.xp6(2),e.Q6J("value",3)}},dependencies:[u.mk,u.sg,u.O5,h.Fj,h.wV,h.JJ,h.c5,h.on,h.On,D.VQ,D.U0,Xe,ie,$e,Ge,me.KE,me.hX,et.Hw,y.gM],styles:["mat-form-field.add-item.mat-form-field-appearance-outline .mat-form-field-label{top:2.4em;margin-top:-.64em}mat-form-field.add-item.mat-form-field-appearance-outline .mat-form-field-infix{padding:16px 0}\n"],encapsulation:2}),i})();var P=d(9694);function bn(i,o){1&i&&(e.TgZ(0,"div",20)(1,"span"),e._uU(2,"Channel name is required!"),e.qZA()())}function yn(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"input",25),e.NdJ("ngModelChange",function(a){e.CHM(t);const s=e.oxw(2);return e.KtG(s.channel.ShopID=a)}),e.qZA()}if(2&i){const t=e.oxw(2);e.Q6J("ngModel",t.channel.ShopID)}}function Tn(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"input",26),e.NdJ("ngModelChange",function(a){e.CHM(t);const s=e.oxw(2);return e.KtG(s.channel.ShopIDString=a)}),e.qZA()}if(2&i){const t=e.oxw(2);e.Q6J("ngModel",t.channel.ShopIDString)}}function Sn(i,o){if(1&i&&(e.TgZ(0,"div",21),e.YNc(1,yn,1,1,"input",22),e.YNc(2,Tn,1,1,"input",23),e.TgZ(3,"label",24),e._uU(4,"Shop ID"),e.qZA()()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",null==t.channel.ShopIDString||""==t.channel.ShopIDString),e.xp6(1),e.Q6J("ngIf",t.channel.ShopIDString)}}function In(i,o){1&i&&(e.TgZ(0,"span"),e._uU(1,"Please enter a valid URL!"),e.qZA())}function Dn(i,o){if(1&i&&(e.TgZ(0,"div",20),e.YNc(1,In,2,0,"span",27),e.qZA()),2&i){e.oxw();const t=e.MAs(23);e.xp6(1),e.Q6J("ngIf",t.errors.pattern)}}function Mn(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",4)(1,"div",28)(2,"input",29,30),e.NdJ("ngModelChange",function(a){e.CHM(t);const s=e.oxw();return e.KtG(s.channel.ConsumerKey=a)}),e.qZA(),e.TgZ(4,"label",18),e._uU(5,"Consumer Key"),e.qZA()()()}if(2&i){const t=e.oxw();e.xp6(2),e.Q6J("ngModel",t.channel.ConsumerKey)}}function On(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",4)(1,"div",31)(2,"input",32,33),e.NdJ("ngModelChange",function(a){e.CHM(t);const s=e.oxw();return e.KtG(s.channel.ConsumerSecret=a)}),e.qZA(),e.TgZ(4,"label",18),e._uU(5,"Consumer Secret"),e.qZA()()()}if(2&i){const t=e.oxw();e.xp6(2),e.Q6J("ngModel",t.channel.ConsumerSecret)}}const wn=function(i){return{empty:i}};let Pn=(()=>{class i{constructor(){this.channel=new E,this.channelChange=new e.vpe}ngOnInit(){this.initChannels()}initChannels(){this.channels=[{Name:"Shopee",ID:P.x.Shopee},{Name:"Tokopedia",ID:P.x.Tokopedia},{Name:"WooCommerce",ID:P.x.WooCommerce},{Name:"KalCare",ID:P.x.KalCare},{Name:"ShopeeV2",ID:P.x.ShopeeV2},{Name:"Tiktok",ID:P.x.Tiktok},{Name:"Lazada",ID:P.x.Lazada}]}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-marketplace-config"]],inputs:{channel:"channel"},outputs:{channelChange:"channelChange"},decls:29,vars:12,consts:[[1,"card"],[1,"card-header"],[1,"card-body","mt-8"],[1,"row"],[1,"col-sm-6"],["matTooltipPosition","above","matTooltip","Your shop name in marketplace channel",1,"form-label-group"],["type","text","id","Name","placeholder","Name","name","Name","required","",1,"form-control","tall",3,"ngModel","ngModelChange"],["channelName","ngModel"],["for","Name"],["class","alert alert-danger",4,"ngIf"],[1,"col-sm-6","me-0"],["matTooltipPosition","above","matTooltip","Marketplace / Website where your product is Sold / Distributed",1,"form-label-group",3,"ngClass"],["id","Type","bindLabel","Name","bindValue","ID","placeholder","Type","name","Market",1,"center-text","tall",3,"items","ngModel","ngModelChange"],["for","type"],["class","form-label-group","matTooltipPosition","above","matTooltip","Fill with your Shop ID",4,"ngIf"],["matTooltipPosition","above","matTooltip","Fill with your Marketplace URL",1,"form-label-group"],["type","text","id","URL","placeholder","URL","name","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,"alert","alert-danger"],["matTooltipPosition","above","matTooltip","Fill with your Shop ID",1,"form-label-group"],["type","number","id","ShopID","placeholder","Shop ID","class","form-control","name","ShopID",3,"ngModel","ngModelChange",4,"ngIf"],["type","text","id","ShopIDString","placeholder","Shop ID String","class","form-control","name","ShopIDString",3,"ngModel","ngModelChange",4,"ngIf"],["for","ShopID"],["type","number","id","ShopID","placeholder","Shop ID","name","ShopID",1,"form-control",3,"ngModel","ngModelChange"],["type","text","id","ShopIDString","placeholder","Shop ID String","name","ShopIDString",1,"form-control",3,"ngModel","ngModelChange"],[4,"ngIf"],["matTooltipPosition","above","matTooltip","Fill with your Marketplace Consumer Key",1,"form-label-group"],["type","text","id","ConsumerKey","placeholder","Consumer Key","name","ConsumerKey",1,"form-control",3,"ngModel","ngModelChange"],["ConsumerKey","ngModel"],["matTooltipPosition","above","matTooltip","Fill with your Marketplace Consumer Secret",1,"form-label-group"],["type","text","id","ConsumerSecret","placeholder","Consumer Secret","name","ConsumerSecret",1,"form-control",3,"ngModel","ngModelChange"],["ConsumerSecret","ngModel"]],template:function(t,n){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"h3"),e._uU(3,"Marketplace Setup"),e.qZA()(),e.TgZ(4,"div",2)(5,"div",3)(6,"div",4)(7,"div",5)(8,"input",6,7),e.NdJ("ngModelChange",function(s){return n.channel.Name=s}),e.qZA(),e.TgZ(10,"label",8),e._uU(11,"Name"),e.qZA()(),e.YNc(12,bn,3,0,"div",9),e.qZA(),e.TgZ(13,"div",10)(14,"div",11)(15,"ng-select",12),e.NdJ("ngModelChange",function(s){return n.channel.TypeID=s}),e.qZA(),e.TgZ(16,"label",13),e._uU(17,"Type"),e.qZA()()(),e.TgZ(18,"div",4),e.YNc(19,Sn,5,2,"div",14),e.qZA(),e.TgZ(20,"div",4)(21,"div",15)(22,"input",16,17),e.NdJ("ngModelChange",function(s){return n.channel.URL=s}),e.qZA(),e.TgZ(24,"label",18),e._uU(25,"Marketplace URL"),e.qZA()(),e.YNc(26,Dn,2,1,"div",9),e.qZA(),e.YNc(27,Mn,6,1,"div",19),e.YNc(28,On,6,1,"div",19),e.qZA()()()),2&t){const a=e.MAs(9),s=e.MAs(23);e.xp6(8),e.Q6J("ngModel",n.channel.Name),e.xp6(4),e.Q6J("ngIf",a.invalid&&(a.dirty||a.touched)),e.xp6(2),e.Q6J("ngClass",e.VKq(10,wn,!n.channel.TypeID)),e.xp6(1),e.Q6J("items",n.channels)("ngModel",n.channel.TypeID),e.xp6(4),e.Q6J("ngIf",2!=n.channel.TypeID),e.xp6(3),e.Q6J("ngModel",n.channel.URL),e.xp6(4),e.Q6J("ngIf",s.invalid&&(s.dirty||s.touched)),e.xp6(1),e.Q6J("ngIf",2==n.channel.TypeID),e.xp6(1),e.Q6J("ngIf",2==n.channel.TypeID)}},dependencies:[u.mk,u.O5,h.Fj,h.wV,h.JJ,h.Q7,h.c5,h.On,A.w9,y.gM]}),i})(),Zn=(()=>{class i{constructor(){this.channel=new E,this.channelChange=new e.vpe}ngOnInit(){}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-sync-config"]],inputs:{channel:"channel"},outputs:{channelChange:"channelChange"},decls:26,vars:6,consts:[[1,"card"],[1,"card-header"],[1,"card-body","mt-8"],[1,"row"],[1,"col-sm-12"],["matTooltipPosition","above","matTooltip","Automatically sync your orders from channel to POS",1,"form-label-group","radio"],["for","SyncOrder"],[1,"mt-3"],["name","SyncOrder",3,"ngModel","ngModelChange"],["matTooltip","No Include if the channel makes a transaction",1,"me-5",3,"value"],["matTooltip","Include if the channel makes a transaction",1,"me-5",3,"value"],["matTooltipPosition","above","matTooltip","Automatically sync your POS inventory to channel inventory",1,"form-label-group","radio"],["name","SyncInventory",3,"ngModel","ngModelChange"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"h3"),e._uU(3,"Synchronize"),e.qZA()(),e.TgZ(4,"div",2)(5,"div",3)(6,"div",4)(7,"div",5)(8,"label",6),e._uU(9,"Synchronize Order"),e.qZA(),e.TgZ(10,"div",7)(11,"mat-radio-group",8),e.NdJ("ngModelChange",function(s){return n.channel.SyncOrder=s}),e.TgZ(12,"mat-radio-button",9),e._uU(13," No "),e.qZA(),e.TgZ(14,"mat-radio-button",10),e._uU(15," Yes "),e.qZA()()()()(),e.TgZ(16,"div",4)(17,"div",11)(18,"label",6),e._uU(19,"Synchronize Inventory"),e.qZA(),e.TgZ(20,"div",7)(21,"mat-radio-group",12),e.NdJ("ngModelChange",function(s){return n.channel.SyncInventory=s}),e.TgZ(22,"mat-radio-button",9),e._uU(23," No "),e.qZA(),e.TgZ(24,"mat-radio-button",10),e._uU(25," Yes "),e.qZA()()()()()()()()),2&t&&(e.xp6(11),e.Q6J("ngModel",n.channel.SyncOrder),e.xp6(1),e.Q6J("value",!1),e.xp6(2),e.Q6J("value",!0),e.xp6(7),e.Q6J("ngModel",n.channel.SyncInventory),e.xp6(1),e.Q6J("value",!1),e.xp6(2),e.Q6J("value",!0))},dependencies:[h.JJ,h.On,D.VQ,D.U0,y.gM]}),i})(),xn=(()=>{class i{constructor(t,n,a,s){this.route=t,this.http=n,this.service=a,this.Toastr=s,this.channel=new E,this.listWriteOff=[],this.addtionalItems=[];let r=t.snapshot.params;null!=r&&(this.channel.ID=null!=r.ID?r.ID:"00000000-0000-0000-0000-000000000000")}ngOnInit(){this.onLoadForm(this.channel.ID)}onLoadForm(t){this.http.post("/api/ChannelLoader/GetPOSProperties",{ID:t}).subscribe(n=>{this.channel=n.Model,this.salesTypes=n.Options.ListSalesOrderType,this.outlets=n.Options.ListOutlet,this.taxes=n.Options.ListTax,this.paymentMethods=n.Options.ListPaymentMethod,this.listWriteOff=n.Options.ListWriteOff})}onSubmit(){!this.submitValidation()||(this.channel.ServiceFeeWriteOff||(this.channel.ServiceFeeWriteOffReason=null),this.channel.Additionalitem=this.addtionalItems.join(","),this.setInventoryOutlet(),this.setDefaultProductCategory(),this.http.post("/api/Channel/SubmitChannel",this.channel).subscribe(t=>{this.Toastr.success("Successfully submitted the Channel","Success!"),this.service.navigate(["/menu/channel"])}))}setInventoryOutlet(){this.channel.POSInventoryOutlet=null!=this.channel.POSInventoryOutletArray&&this.channel.POSInventoryOutletArray.length>0?this.channel.POSInventoryOutletArray.join(","):null}setDefaultProductCategory(){null==this.channel.ProductCategoryDefault&&(this.channel.ProductCategoryDefault=0)}submitValidation(){return null==this.channel.MinimumInventory?(this.Toastr.error("Your Minimum Inventory is Empty, please fill minimum inventory","Error!"),!1):null==this.channel.Index?(this.Toastr.error("Index is mandatory","Error!"),!1):!this.isEmpty(this.channel.ShopID)||0!==this.channel.TypeID&&5!==this.channel.TypeID&&1!==this.channel.TypeID?!this.channel.ServiceFeeWriteOff||!this.isEmpty(this.channel.ServiceFeeWriteOffReason)||(this.Toastr.error("Your write off reason is Empty, please fill the Write off reason","Error!"),!1):(this.Toastr.error("Your Shop ID is Empty, please fill the shop ID","Error!"),!1)}isEmpty(t){return M.g.IsEmpty(t)}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(C.gz),e.Y36(Q.O),e.Y36(C.F0),e.Y36(J._W))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-marketplace-form"]],decls:34,vars:15,consts:[["headerTitle","Configure Channel",3,"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,"disabled","click"],[1,"container-fluid","py-5","bg-light-gray"],[1,"row"],[1,"col-8"],[3,"channel","channelChange"],[1,"col-4"],[1,"col-12"],["id","nav-tab","role","tablist",1,"nav","nav-tabs"],["id","nav-outlet-config-tab","data-bs-toggle","tab","data-bs-target","#nav-outlet-config","type","button","role","tab","aria-controls","nav-outlet-config","aria-selected","true",1,"nav-link","active"],["id","nav-order-config-tab","data-bs-toggle","tab","data-bs-target","#nav-order-config","type","button","role","tab","aria-controls","nav-order-config","aria-selected","false",1,"nav-link"],["id","nav-invoice-fee-tab","data-bs-toggle","tab","data-bs-target","#nav-invoice-fee","type","button","role","tab","aria-controls","nav-invoice-fee","aria-selected","false",1,"nav-link"],["id","nav-advanced-tab","data-bs-toggle","tab","data-bs-target","#nav-advanced","type","button","role","tab","aria-controls","nav-advanced","aria-selected","false",1,"nav-link"],["id","nav-tabContent",1,"tab-content"],["id","nav-outlet-config","role","tabpanel","aria-labelledby","nav-outlet-config-tab",1,"tab-pane","fade","show","active"],[3,"channel","outlets","channelChange"],["id","nav-order-config","role","tabpanel","aria-labelledby","nav-order-config-tab",1,"tab-pane","fade"],[3,"channel","taxes","salesTypes","paymentMethods","channelChange"],["id","nav-invoice-fee","role","tabpanel","aria-labelledby","nav-invoice-fee-tab",1,"tab-pane","fade"],[3,"channel","listWriteOff","channelChange"],["id","nav-advanced","role","tabpanel","aria-labelledby","nav-advanced-tab",1,"tab-pane","fade"],[3,"channel","additionalItems","channelChange","additionalItemsChange"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0)(1,"actions")(2,"button",1),e._uU(3,"Cancel"),e.qZA(),e.TgZ(4,"button",2),e.NdJ("click",function(){return n.onSubmit()}),e._uU(5,"Submit"),e.qZA()(),e.TgZ(6,"content")(7,"div",3)(8,"div",4)(9,"div",5)(10,"app-marketplace-config",6),e.NdJ("channelChange",function(s){return n.channel=s}),e.qZA()(),e.TgZ(11,"div",7)(12,"app-sync-config",6),e.NdJ("channelChange",function(s){return n.channel=s}),e.qZA()()(),e.TgZ(13,"div",4)(14,"div",8)(15,"nav")(16,"div",9)(17,"button",10),e._uU(18,"Outlet"),e.qZA(),e.TgZ(19,"button",11),e._uU(20,"Orders"),e.qZA(),e.TgZ(21,"button",12),e._uU(22,"Service Fee"),e.qZA(),e.TgZ(23,"button",13),e._uU(24,"Advanced"),e.qZA()()(),e.TgZ(25,"div",14)(26,"div",15)(27,"app-outle-config",16),e.NdJ("channelChange",function(s){return n.channel=s}),e.qZA()(),e.TgZ(28,"div",17)(29,"app-orders-config",18),e.NdJ("channelChange",function(s){return n.channel=s}),e.qZA()(),e.TgZ(30,"div",19)(31,"app-invoice-fee-config",20),e.NdJ("channelChange",function(s){return n.channel=s}),e.qZA()(),e.TgZ(32,"div",21)(33,"app-advanced-config",22),e.NdJ("channelChange",function(s){return n.channel=s})("additionalItemsChange",function(s){return n.addtionalItems=s}),e.qZA()()()()()()()()),2&t&&(e.Q6J("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(4),e.Q6J("disabled",!(null!=n.channel&&n.channel.Name)),e.xp6(6),e.Q6J("channel",n.channel),e.xp6(2),e.Q6J("channel",n.channel),e.xp6(15),e.Q6J("channel",n.channel)("outlets",n.outlets),e.xp6(2),e.Q6J("channel",n.channel)("taxes",n.taxes)("salesTypes",n.salesTypes)("paymentMethods",n.paymentMethods),e.xp6(2),e.Q6J("channel",n.channel)("listWriteOff",n.listWriteOff),e.xp6(2),e.Q6J("channel",n.channel)("additionalItems",n.addtionalItems))},dependencies:[f.p,C.rH,Vt,Kt,en,Cn,Pn,Zn],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}.tab-pane[_ngcontent-%COMP%]{margin-top:0!important}"]}),i})();const tt=function(i){return{"input-danger":i}};function An(i,o){if(1&i&&(e.TgZ(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"label"),e._uU(5,"New Order To"),e.qZA(),e.TgZ(6,"div")(7,"span"),e._uU(8),e.qZA()()()(),e.TgZ(9,"div",4)(10,"div",6)(11,"label"),e._uU(12,"Dispatch Orders From"),e.qZA(),e.TgZ(13,"div")(14,"span"),e._uU(15),e.qZA()()()()(),e.TgZ(16,"div",3)(17,"div",7)(18,"div",8)(19,"label"),e._uU(20,"Product Inventory"),e.qZA(),e.TgZ(21,"div")(22,"span"),e._uU(23),e.qZA()()()()()()),2&i){const t=e.oxw();e.xp6(3),e.Q6J("ngClass",e.VKq(5,tt,!t.data.POSOutlet)),e.xp6(5),e.Oqu(t.data.POSOutlet),e.xp6(2),e.Q6J("ngClass",e.VKq(7,tt,!t.data.POSDeliveryOutlet)),e.xp6(5),e.Oqu(t.data.POSDeliveryOutlet),e.xp6(8),e.Oqu(t.data.POSInventoryOutlet)}}let kn=(()=>{class i{constructor(){}ngOnInit(){}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-outlet-config-info"]],inputs:{data:"data"},decls:2,vars:1,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],["class","card-body",4,"ngIf"],[1,"card-body"],[1,"row"],[1,"col-6"],["matTooltipPosition","above","matTooltip","Outlet where the transaction is recorded in POS",1,"info-label-group",3,"ngClass"],["matTooltipPosition","above","matTooltip","Outlet where the stock is deducted in POS",1,"info-label-group",3,"ngClass"],[1,"col-12"],["matTooltipPosition","above","matTooltip","Outlet where the inventory will displayed as inventory in Inventory Comparison Menu",1,"info-label-group"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0),e.YNc(1,An,24,9,"div",1),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf",n.data))},dependencies:[u.mk,u.O5,y.gM]}),i})();const fe=function(i){return{"input-danger":i}};function Rn(i,o){if(1&i&&(e.TgZ(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"label"),e._uU(5,"Payment Method"),e.qZA(),e.TgZ(6,"div")(7,"span"),e._uU(8),e.qZA()()()(),e.TgZ(9,"div",4)(10,"div",6)(11,"label"),e._uU(12,"Tax"),e.qZA(),e.TgZ(13,"div")(14,"span"),e._uU(15),e.qZA()()()()(),e.TgZ(16,"div",3)(17,"div",4)(18,"div",7)(19,"label"),e._uU(20,"Tag"),e.qZA(),e.TgZ(21,"div")(22,"span"),e._uU(23),e.qZA()()()()()()),2&i){const t=e.oxw();e.xp6(3),e.Q6J("ngClass",e.VKq(6,fe,!t.data.POSInvoicePaymentMethod)),e.xp6(5),e.Oqu(t.data.POSInvoicePaymentMethod),e.xp6(2),e.Q6J("ngClass",e.VKq(8,fe,!t.data.POSTax)),e.xp6(5),e.Oqu(t.data.POSTax),e.xp6(3),e.Q6J("ngClass",e.VKq(10,fe,!t.data.POSSalesOrderType)),e.xp6(5),e.Oqu(t.data.POSSalesOrderType)}}let En=(()=>{class i{constructor(){}ngOnInit(){}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-orders-config-info"]],inputs:{data:"data"},decls:2,vars:1,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],["class","card-body",4,"ngIf"],[1,"card-body"],[1,"row"],[1,"col-6"],["matTooltipPosition","above","matTooltip","Payment that will be recorded in POS if there is a transaction from the marketplace",1,"info-label-group",3,"ngClass"],["matTooltipPosition","above","matTooltip","Tax Type that will be recorded in POS if there is a transaction from the marketplace",1,"info-label-group",3,"ngClass"],["matTooltipPosition","above","matTooltip","Tag Type that will be recorded in POS if there is a transaction from the marketplace",1,"info-label-group",3,"ngClass"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0),e.YNc(1,Rn,24,12,"div",1),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf",n.data))},dependencies:[u.mk,u.O5,y.gM]}),i})();function qn(i,o){if(1&i&&(e.ynx(0),e.TgZ(1,"div",6)(2,"label"),e._uU(3,"Write Off Reason"),e.qZA(),e.TgZ(4,"div")(5,"span"),e._uU(6),e.qZA()()(),e.BQk()),2&i){const t=e.oxw();e.xp6(6),e.Oqu(t.data.ServiceFeeWriteOffReason)}}let Un=(()=>{class i{constructor(){}ngOnInit(){}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-invoiceFee-config-info"]],inputs:{data:"data"},decls:12,vars:2,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[1,"card-body"],[1,"row"],[1,"col-6"],["matTooltipPosition","above","matTooltip","Enable for record marketplace service fee in POS as Write off",1,"info-label-group"],[4,"ngIf"],["matTooltipPosition","above","matTooltip","Choose Reason to Write Off",1,"info-label-group"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"label"),e._uU(6,"Enable Write Off"),e.qZA(),e.TgZ(7,"div")(8,"span"),e._uU(9),e.qZA()()()(),e.TgZ(10,"div",3),e.YNc(11,qn,7,1,"ng-container",5),e.qZA()()()()),2&t&&(e.xp6(9),e.Oqu(1==n.data.ServiceFeeWriteOff?"YES":"NO"),e.xp6(2),e.Q6J("ngIf",n.data.ServiceFeeWriteOff))},dependencies:[u.O5,y.gM]}),i})();function Ln(i,o){1&i&&(e.TgZ(0,"span"),e._uU(1,"None"),e.qZA())}function Fn(i,o){1&i&&(e.TgZ(0,"span"),e._uU(1,"Error"),e.qZA())}function Nn(i,o){1&i&&(e.TgZ(0,"span"),e._uU(1,"Full"),e.qZA())}let Jn=(()=>{class i{constructor(){}ngOnInit(){}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-advanced-config-info"]],inputs:{data:"data"},decls:49,vars:10,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[1,"card-body"],[1,"row"],[1,"col-6"],["matTooltipPosition","above","matTooltip","Register where the transaction is recorded in POS",1,"info-label-group"],["matTooltipPosition","above","matTooltip","Change the customer's name from the order in the marketplace according this email",1,"info-label-group"],["matTooltipPosition","above","matTooltip","Minimal inventory on channel, if product inventory is bellow minimum inventory will automatically update to 0 ",1,"info-label-group"],["matTooltipPosition","above","matTooltip","Index",1,"info-label-group"],["matTooltipPosition","above","matTooltip","Additional item",1,"info-label-group"],["matTooltipPosition","above","matTooltip","Your Inventory log status",1,"info-label-group"],[4,"ngIf"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"label"),e._uU(6,"Register"),e.qZA(),e.TgZ(7,"div")(8,"span"),e._uU(9),e.qZA()()()(),e.TgZ(10,"div",3)(11,"div",5)(12,"label"),e._uU(13,"Customer Default Email"),e.qZA(),e.TgZ(14,"div")(15,"span"),e._uU(16),e.qZA()()()()(),e.TgZ(17,"div",2)(18,"div",3)(19,"div",6)(20,"label"),e._uU(21,"Minimum Inventory"),e.qZA(),e.TgZ(22,"div")(23,"span"),e._uU(24),e.ALo(25,"number"),e.qZA()()()(),e.TgZ(26,"div",3)(27,"div",7)(28,"label"),e._uU(29,"Index"),e.qZA(),e.TgZ(30,"div")(31,"span"),e._uU(32),e.qZA()()()()(),e.TgZ(33,"div",2)(34,"div",3)(35,"div",8)(36,"label"),e._uU(37,"Additional Item"),e.qZA(),e.TgZ(38,"div")(39,"span"),e._uU(40),e.qZA()()()(),e.TgZ(41,"div",3)(42,"div",9)(43,"label"),e._uU(44,"Inventory Log Mode"),e.qZA(),e.TgZ(45,"div"),e.YNc(46,Ln,2,0,"span",10),e.YNc(47,Fn,2,0,"span",10),e.YNc(48,Nn,2,0,"span",10),e.qZA()()()()()()),2&t&&(e.xp6(9),e.Oqu(null==n.data?null:n.data.Register),e.xp6(7),e.Oqu(null==n.data?null:n.data.CustomerDefaultEmail),e.xp6(8),e.Oqu(e.lcZ(25,8,null==n.data?null:n.data.MinimumInventory)),e.xp6(8),e.Oqu(null==n.data?null:n.data.Index),e.xp6(8),e.Oqu(null==n.data?null:n.data.Additionalitem),e.xp6(6),e.Q6J("ngIf",1==(null==n.data?null:n.data.InventoryLog)),e.xp6(1),e.Q6J("ngIf",2==(null==n.data?null:n.data.InventoryLog)),e.xp6(1),e.Q6J("ngIf",3==(null==n.data?null:n.data.InventoryLog)))},dependencies:[u.O5,y.gM,u.JJ]}),i})();var Qn=d(529);function Hn(i,o){if(1&i&&(e.TgZ(0,"div",4)(1,"div",10)(2,"label"),e._uU(3,"Shop ID"),e.qZA(),e.TgZ(4,"div")(5,"span"),e._uU(6),e.qZA()()()()),2&i){const t=e.oxw();e.xp6(6),e.Oqu(0!=t.channel.ShopID?t.channel.ShopID:t.channel.ShopIDString)}}function Yn(i,o){1&i&&e._UZ(0,"a",17)}function Vn(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"a",18),e.NdJ("click",function(){e.CHM(t);const a=e.oxw(2);return e.KtG(a.onAuthorize(a.channel.TypeID))}),e.qZA()}}function Bn(i,o){if(1&i&&(e.TgZ(0,"div",4)(1,"div",11)(2,"label"),e._uU(3,"Expired Date"),e.qZA(),e.TgZ(4,"div",12)(5,"div",13),e._uU(6),e.ALo(7,"date"),e.ALo(8,"date"),e.qZA(),e.TgZ(9,"div",14),e.YNc(10,Yn,1,0,"a",15),e.YNc(11,Vn,1,0,"a",16),e.qZA()()()()),2&i){const t=e.oxw();e.xp6(6),e.hij(" ",t.channel.ExpiredTime?e.xi3(7,4,t.channel.ExpiredTime,"dd MMM yyyy HH:mm"):e.xi3(8,7,t.channel.TokenExpired,"dd MMM yyyy HH:mm")," "),e.xp6(3),e.s9C("matTooltip",5==t.channel.TypeID?"Extend Shopee Authorization Duration for an additional 1 year":"Update Token Expired date"),e.xp6(1),e.Q6J("ngIf",0==t.channel.TypeID),e.xp6(1),e.Q6J("ngIf",5==t.channel.TypeID||6==t.channel.TypeID)}}function zn(i,o){if(1&i&&(e.TgZ(0,"div",4)(1,"div",19)(2,"label"),e._uU(3,"Consumer Key"),e.qZA(),e.TgZ(4,"div")(5,"span"),e._uU(6),e.qZA()()()()),2&i){const t=e.oxw();e.xp6(6),e.Oqu(t.channel.ConsumerKey)}}function Wn(i,o){if(1&i&&(e.TgZ(0,"div",4)(1,"div",20)(2,"label"),e._uU(3,"Consumer Secret"),e.qZA(),e.TgZ(4,"div")(5,"span"),e._uU(6),e.qZA()()()()),2&i){const t=e.oxw();e.xp6(6),e.Oqu(t.channel.ConsumerSecret)}}let Kn=(()=>{class i{constructor(t){this.http=t}onAuthorize(t){const n=this.getApiAuthorize(t);this.http.post(`/api/${n}`,null).subscribe(a=>{window.location.href=a.Url})}getApiAuthorize(t){let n;switch(t){case P.x.ShopeeV2:n="ChannelAuthorization/ShopeeV2_URL";break;case P.x.Tiktok:n="ChannelAuthorization/Tiktok_URL"}return n}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(Qn.eN))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-marketplace-config-info"]],inputs:{channel:"channel"},decls:39,vars:11,consts:[[1,"card"],[1,"card-header"],[1,"card-body","mt-8"],[1,"row"],[1,"col-sm-6"],["matTooltipPosition","above","matTooltip","Your shop name in marketplace channel",1,"info-label-group"],["matTooltipPosition","above","matTooltip","Marketplace / Website where your product is Sold / Distributed",1,"info-label-group"],["class","col-sm-6",4,"ngIf"],["matTooltipPosition","above","matTooltip","Your Marketplace URL",1,"info-label-group"],["matTooltipPosition","above","matTooltip","Last Sync Product",1,"info-label-group"],["matTooltipPosition","above","matTooltip","Your shop ID",1,"info-label-group"],["matTooltipPosition","above","matTooltip","Your expired time shop",1,"info-label-group"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[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"],["matTooltipPosition","above","matTooltip","Consumer Key",1,"info-label-group"],["matTooltipPosition","above","matTooltip","Consumer Secret",1,"info-label-group"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"h3"),e._uU(3,"Marketplace Setup"),e.qZA()(),e.TgZ(4,"div",2)(5,"div",3)(6,"div",4)(7,"div",5)(8,"label"),e._uU(9,"Name"),e.qZA(),e.TgZ(10,"div")(11,"span"),e._uU(12),e.qZA()()()(),e.TgZ(13,"div",4)(14,"div",6)(15,"label"),e._uU(16,"Type"),e.qZA(),e.TgZ(17,"div")(18,"span"),e._uU(19),e.qZA()()()(),e.YNc(20,Hn,7,1,"div",7),e.YNc(21,Bn,12,10,"div",7),e.TgZ(22,"div",4)(23,"div",8)(24,"label"),e._uU(25,"Marketplace URL"),e.qZA(),e.TgZ(26,"div")(27,"span"),e._uU(28),e.qZA()()()(),e.TgZ(29,"div",4)(30,"div",9)(31,"label"),e._uU(32,"Product Sync"),e.qZA(),e.TgZ(33,"div")(34,"span"),e._uU(35),e.ALo(36,"date"),e.qZA()()()(),e.YNc(37,zn,7,1,"div",7),e.YNc(38,Wn,7,1,"div",7),e.qZA()()()),2&t&&(e.xp6(12),e.Oqu(n.channel.Name),e.xp6(7),e.Oqu(n.channel.TypeString),e.xp6(1),e.Q6J("ngIf",2!=n.channel.TypeID),e.xp6(1),e.Q6J("ngIf",0==n.channel.TypeID||5==n.channel.TypeID||6==n.channel.TypeID),e.xp6(7),e.Oqu(n.channel.URL),e.xp6(7),e.Oqu(n.channel.LastSync?e.xi3(36,8,n.channel.LastSync,"dd MMM yyyy HH:mm"):"-"),e.xp6(2),e.Q6J("ngIf",2==n.channel.TypeID),e.xp6(1),e.Q6J("ngIf",2==n.channel.TypeID))},dependencies:[u.O5,y.gM,u.uU]}),i})();function Gn(i,o){if(1&i&&(e.TgZ(0,"div",3)(1,"div",4)(2,"label"),e._uU(3,"Synchronize Order"),e.qZA(),e.TgZ(4,"div")(5,"span"),e._uU(6),e.qZA()()(),e.TgZ(7,"div",5)(8,"label"),e._uU(9,"Synchronize Inventory"),e.qZA(),e.TgZ(10,"div")(11,"span"),e._uU(12),e.qZA()()()()),2&i){const t=e.oxw();e.xp6(6),e.Oqu(t.channel.SyncOrder?"YES":"NO"),e.xp6(6),e.Oqu(t.channel.SyncInventory?"YES":"NO")}}let jn=(()=>{class i{constructor(){}ngOnInit(){}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-sync-config-info"]],inputs:{channel:"channel"},decls:5,vars:1,consts:[[1,"card"],[1,"card-header"],["class","card-body mt-8",4,"ngIf"],[1,"card-body","mt-8"],["matTooltipPosition","above","matTooltip","Automatically sync your orders from channel to POS",1,"info-label-group"],["matTooltipPosition","above","matTooltip","Automatically sync your POS inventory to channel inventory",1,"info-label-group"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"h3"),e._uU(3,"Synchronize"),e.qZA()(),e.YNc(4,Gn,13,2,"div",2),e.qZA()),2&t&&(e.xp6(4),e.Q6J("ngIf",n.channel))},dependencies:[u.O5,y.gM]}),i})();function Xn(i,o){if(1&i&&(e.ynx(0),e.TgZ(1,"div")(2,"span",28),e._uU(3,"Modified:"),e.qZA(),e._uU(4),e.ALo(5,"date"),e.qZA(),e.BQk()),2&i){const t=e.oxw(2);e.xp6(4),e.hij(" ",e.xi3(5,1,t.channel.Modified,"dd MMM yyyy HH:mm")," ")}}function $n(i,o){if(1&i&&(e.TgZ(0,"div",7)(1,"div",8)(2,"div",9),e._UZ(3,"app-marketplace-config-info",10),e.qZA(),e.TgZ(4,"div",11),e._UZ(5,"app-sync-config-info",10),e.qZA()(),e.TgZ(6,"div",8)(7,"div",12)(8,"nav")(9,"div",13)(10,"button",14),e._uU(11,"Outlet"),e.qZA(),e.TgZ(12,"button",15),e._uU(13,"Orders"),e.qZA(),e.TgZ(14,"button",16),e._uU(15,"Service Fee"),e.qZA(),e.TgZ(16,"button",17),e._uU(17,"Advanced"),e.qZA()()(),e.TgZ(18,"div",18)(19,"div",19),e._UZ(20,"app-outlet-config-info",20),e.qZA(),e.TgZ(21,"div",21),e._UZ(22,"app-orders-config-info",20),e.qZA(),e.TgZ(23,"div",22),e._UZ(24,"app-invoiceFee-config-info",20),e.qZA(),e.TgZ(25,"div",23),e._UZ(26,"app-advanced-config-info",20),e.qZA()()()(),e.TgZ(27,"div",24)(28,"div",25),e._UZ(29,"i",26),e.TgZ(30,"div",27)(31,"span",28),e._uU(32,"Created:"),e.qZA(),e._uU(33),e.ALo(34,"date"),e.qZA(),e.YNc(35,Xn,6,4,"ng-container",29),e.qZA()()()),2&i){const t=e.oxw();e.xp6(3),e.Q6J("channel",t.channel),e.xp6(2),e.Q6J("channel",t.channel),e.xp6(15),e.Q6J("data",t.channel),e.xp6(2),e.Q6J("data",t.channel),e.xp6(2),e.Q6J("data",t.channel),e.xp6(2),e.Q6J("data",t.channel),e.xp6(7),e.hij(" ",e.xi3(34,8,t.channel.Created,"dd MMM yyyy HH:mm")," "),e.xp6(2),e.Q6J("ngIf",t.channel.Modified)}}const ei=function(i){return{ID:i}},ti=function(i){return["/menu/channel/marketplace/form",i]};let ni=(()=>{class i{constructor(t,n,a,s,r){this.route=t,this.http=n,this.router=a,this.toastr=s,this.konversi=r,this.setup=!1,this.route.queryParams.subscribe(l=>{this.ID=l.ID}),null!=this.ID&&this.onLoadInfo()}ngOnInit(){this.initSetupRole()}initSetupRole(){this.konversi.GetRoles().filter(n=>"Setup"==n||"Stp"==n).length>0&&(this.setup=!0)}onLoadInfo(){this.http.post("/api/ChannelLoader/GetChannelView",{ID:this.ID}).subscribe(n=>{this.channel=n.Model,1==this.channel.LogMode?this.channel.LogModeLabel="None":2==this.channel.LogMode?this.channel.LogModeLabel="Error":3==this.channel.LogMode&&(this.channel.LogModeLabel="Full")})}onDelete(t){confirm("Delete channel "+t.Name+" ?")&&this.http.post("/api/Channel/DeleteChannel",{ID:t.ID}).subscribe(s=>{this.toastr.success("Channel "+t.Name+" is deleted!","Success",{closeButton:!0,positionClass:"toast-bottom-right"}),this.router.navigate(["menu/channel"])})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(C.gz),e.Y36(Q.O),e.Y36(C.F0),e.Y36(J._W),e.Y36(Je.e))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-marketplace-view"]],decls:11,vars:11,consts:[[3,"headerTitle","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-8"],[3,"channel"],[1,"col-4"],[1,"col-12"],["id","nav-tab","role","tablist",1,"nav","nav-tabs"],["id","nav-outlet-config-tab","data-bs-toggle","tab","data-bs-target","#nav-outlet-config","type","button","role","tab","aria-controls","nav-outlet-config","aria-selected","true",1,"nav-link","active"],["id","nav-order-config-tab","data-bs-toggle","tab","data-bs-target","#nav-order-config","type","button","role","tab","aria-controls","nav-order-config","aria-selected","false",1,"nav-link"],["id","nav-service-fee-tab","data-bs-toggle","tab","data-bs-target","#nav-service-fee","type","button","role","tab","aria-controls","nav-service-fee","aria-selected","false",1,"nav-link"],["id","nav-advanced-tab","data-bs-toggle","tab","data-bs-target","#nav-advanced","type","button","role","tab","aria-controls","nav-advanced","aria-selected","false",1,"nav-link"],["id","nav-tabContent",1,"tab-content"],["id","nav-outlet-config","role","tabpanel","aria-labelledby","nav-outlet-config-tab",1,"tab-pane","fade","show","active"],[3,"data"],["id","nav-order-config","role","tabpanel","aria-labelledby","nav-order-config-tab",1,"tab-pane","fade"],["id","nav-service-fee","role","tabpanel","aria-labelledby","nav-service-fee-tab",1,"tab-pane","fade"],["id","nav-advanced","role","tabpanel","aria-labelledby","nav-advanced-tab",1,"tab-pane","fade"],[1,"alert","alert-warning","w-100"],[1,"d-flex","align-items-center","justify-content-start","p-4"],["aria-hidden","true",1,"fa-regular","fa-file","me-5"],[1,"me-2"],[1,"fw-bold"],[4,"ngIf"]],template:function(t,n){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 n.onDelete(n.channel)}),e._UZ(7,"i",5),e._uU(8," Delete"),e.qZA()()(),e.TgZ(9,"content"),e.YNc(10,$n,36,11,"div",6),e.qZA()()),2&t&&(e.Q6J("headerTitle","Marketplace Configuration View")("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(3),e.Q6J("hidden",!n.setup)("routerLink",e.VKq(9,ti,e.VKq(7,ei,null==n.channel?null:n.channel.ID))),e.xp6(3),e.Q6J("hidden",!n.setup),e.xp6(4),e.Q6J("ngIf",n.channel))},dependencies:[u.O5,f.p,C.yS,kn,En,Un,Jn,Kn,jn,u.uU],styles:[".input-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#FCF3CF,#FCF3CF 15px,#F9E79F 15px,#F9E79F 30px)!important}.tab-pane[_ngcontent-%COMP%]{margin-top:0!important}"]}),i})();function ii(i,o){1&i&&(e.TgZ(0,"p"),e._uU(1," URL is required "),e.qZA())}function oi(i,o){if(1&i&&(e.TgZ(0,"div",13),e.YNc(1,ii,2,0,"p",14),e.qZA()),2&i){e.oxw();const t=e.MAs(10);e.xp6(1),e.Q6J("ngIf",t.errors.required)}}function ai(i,o){1&i&&(e.TgZ(0,"p"),e._uU(1," Email is required "),e.qZA())}function si(i,o){1&i&&(e.TgZ(0,"p"),e._uU(1," Email is not valid "),e.qZA())}function ri(i,o){if(1&i&&(e.TgZ(0,"div",13),e.YNc(1,ai,2,0,"p",14),e.YNc(2,si,2,0,"p",14),e.qZA()),2&i){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 li=function(i){return{invalid:i}},ci=function(){return{updateOn:"blur"}};let di=(()=>{class i{constructor(t){this.dialogRef=t}ngOnInit(){this.data={},this.initModalConfig()}initModalConfig(){this.modalConfig=new K.O,this.modalConfig.title="Fill data for Customer Support"}onSubmit(){this.dialogRef.close(this.data)}onClose(){this.dialogRef.close()}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(x.so))},i.\u0275cmp=e.Xpm({type:i,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,n){if(1&t&&(e.TgZ(0,"modal-material",0),e.NdJ("onClose",function(){return n.onClose()})("onCancel",function(){return n.onClose()})("onOk",function(){return n.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(s){return n.data.URL=s}),e.qZA()(),e.YNc(11,oi,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(s){return n.data.Email=s}),e.qZA()(),e.YNc(17,ri,3,2,"div",9),e.qZA()()()),2&t){const a=e.MAs(10),s=e.MAs(16);e.Q6J("dynamicValidated",!a.invalid&&!s.invalid)("config",n.modalConfig),e.xp6(7),e.Q6J("ngClass",e.VKq(8,li,a.invalid&&(a.dirty||a.touched))),e.xp6(2),e.Q6J("ngModel",n.data.URL),e.xp6(2),e.Q6J("ngIf",a.invalid&&(a.dirty||a.touched)),e.xp6(4),e.Q6J("ngModel",n.data.Email)("ngModelOptions",e.DdM(10,ci)),e.xp6(2),e.Q6J("ngIf",s.invalid&&(s.dirty||s.touched))}},dependencies:[u.mk,u.O5,h.Fj,h.JJ,h.Q7,h.c5,h.On,ne.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}"]}),i})(),nt=(()=>{class i{constructor(t,n){this.dialogRef=t,this.data=n}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new K.O,this.modalConfig.title=this.data?.title,this.modalConfig.okText="SAVE"}onSubmit(){this.dialogRef.close(this.data)}onClose(){this.dialogRef.close()}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(x.so),e.Y36(x.WI))},i.\u0275cmp=e.Xpm({type:i,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,n){1&t&&(e.TgZ(0,"modal-material",0),e.NdJ("onClose",function(){return n.onClose()})("onCancel",function(){return n.onClose()})("onOk",function(){return n.onSubmit()}),e.TgZ(1,"div",1)(2,"div",2)(3,"input",3,4),e.NdJ("ngModelChange",function(s){return n.data.ShopID=s}),e.qZA(),e.TgZ(5,"label",5),e._uU(6,"Shop ID"),e.qZA()()()()),2&t&&(e.Q6J("dynamicValidated",n.data.ShopID)("config",n.modalConfig),e.xp6(3),e.Q6J("ngModel",n.data.ShopID))},dependencies:[h.Fj,h.JJ,h.On,ne.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}"]}),i})(),pi=(()=>{class i{constructor(t,n){this.dialogRef=t,this.data=n,this.modalConfig=new K.O}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new K.O,this.modalConfig.title="WooCommerce",this.modalConfig.okText="SAVE"}onSubmit(){this.data.TypeID=2,this.dialogRef.close(this.data)}onClose(){this.dialogRef.close()}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(x.so),e.Y36(x.WI))},i.\u0275cmp=e.Xpm({type:i,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,n){1&t&&(e.TgZ(0,"modal-material",0),e.NdJ("onClose",function(){return n.onClose()})("onCancel",function(){return n.onClose()})("onOk",function(){return n.onSubmit()}),e.TgZ(1,"div",1)(2,"div",2)(3,"input",3,4),e.NdJ("ngModelChange",function(s){return n.data.URL=s}),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(s){return n.data.ConsumerKey=s}),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(s){return n.data.ConsumerSecret=s}),e.qZA(),e.TgZ(15,"label",9),e._uU(16,"Consumer Secret"),e.qZA()()()()),2&t&&(e.Q6J("dynamicValidated",n.data.ConsumerKey&&n.data.URL&&n.data.ConsumerSecret)("config",n.modalConfig),e.xp6(3),e.Q6J("ngModel",n.data.URL),e.xp6(5),e.Q6J("ngModel",n.data.ConsumerKey),e.xp6(5),e.Q6J("ngModel",n.data.ConsumerSecret))},dependencies:[h.Fj,h.JJ,h.On,ne.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}"]}),i})();var it=d(455);function hi(i,o){if(1&i){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 a=e.oxw();return e.KtG(a.openKalcareDialog())}),e._uU(18,"Submit Shop ID"),e.qZA()()()()()}}let ui=(()=>{class i{constructor(t,n,a,s,r){this.route=t,this.http=n,this.service=a,this.dialog=s,this.toastr=r,this.newFeatureVisible=!1}saveTokopedia(){let t={ShopID:Number(this.shopID)};this.http.post("/api/ChannelAdd/Tokopedia",t).subscribe(n=>{this.service.navigate(["/menu/channel"])})}saveWooCommerce(t){this.http.post("/api/ChannelAdd/AddWooCommerce",t).subscribe(n=>{this.service.navigate(["/menu/channel"])})}saveKalCare(){this.http.post("/api/ChannelAdd/AddKalCare",{ShopIDString:this.shopIDString}).subscribe(n=>{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(nt,{data:{title:"Tokopedia",ShopID:this.shopID},width:"30%"}).afterClosed().subscribe(n=>{null!=n&&(this.shopID=n.ShopID,this.saveTokopedia())})}openKalcareDialog(){this.dialog.open(nt,{data:{title:"KAL Care",ShopID:this.shopIDString},width:"30%"}).afterClosed().subscribe(n=>{null!=n&&(this.shopIDString=n.ShopID,this.saveKalCare())})}openWooCommerceDialog(){this.dialog.open(pi,{data:{ShopID:this.shopID},width:"30%"}).afterClosed().pipe((0,Be.h)(n=>M.g.IsNotEmpty(n))).subscribe(n=>{this.saveWooCommerce(n)})}contactSupport(){this.dialog.open(di,{width:"30%"}).afterClosed().subscribe(n=>{if(null!=n){if(null==n.Email)return void this.toastr.error("Email cannot be empty!","Error!");if(null==n.URL)return void this.toastr.error("Email cannot be empty!","URL!");this.http.post("Api/ChannelAuthorization/Tokopedia_Intercom",{URL:n.URL,Email:n.Email}).subscribe({next:()=>{this.toastr.success("Your request has been received, we will be in touch at "+n.Email,"Thank you!")},error:s=>{console.log("Failed to submit customer support!",s)}})}})}onToggleNewVersion(t){this.newFeatureVisible=t}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(C.gz),e.Y36(Q.O),e.Y36(C.F0),e.Y36(x.uw),e.Y36(J._W))},i.\u0275cmp=e.Xpm({type:i,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,iVBORw0KGgoAAAANSUhEUgAAAYwAAAB/CAMAAADLlgV7AAABIFBMVEX///8jHyCAvAAAZUgAAACdyUTD3YwAYEEAY0V6uQAAXT0AWzoAWDUVDxCAfn94uAC7urulpKUMAAQZFBUPBwnf6+ecu7Cjw7jf39/3+vmZmZnn8e4pdl5om4oGblIZblOpvrZNi3draWnc7LxOS0w7gmy/19AAYEhaj3zK3NbW5N+Twk272Immy32Ih4cydFwrdlGgzFE+hEZvnY30+em+2Z4ATiW4ycLI4ZzD27Pu9t2izUTn8tJ9qJrv7+8/PD3U09NZV1gtKSqPxCTP5ar3+vDCwcG42X+kzl3R48TW6bWw1HLk7uLE35aRunidvrMxe00ufDoBakBjYWF/sISWvKdsp0Glz1et0nVvqFFWlzQAUTV8rmlbmUeLr6IARhVkELW6AAAVU0lEQVR4nO1dj3/aOJYnONTGdkqbBKgLhFIKDTTT2QxsyCaQpCFp2GTa7O7cXTs3N8z//1+cnmRLT7L8C5rZ9M7f3c802PKz/L7S+yUZCoUcOXLk+C7RGPUkLP/dHfp/DK9tWxLcVvqLL14GeB46d/b8JcKz1IK8NPd9HuBF+s5+B5i4hgI3jTooLja3d31svlfOnW1s7gpsb8Zq7Zlou3l+lnjfZ5vbPjbj5X5vqNshMqppr322uRFg54N8yjvf2UDYfhonx8Ntt1Vaw3i6xVtvJky57wvfiow38qkPu5iLrQ+xs+35Jm58mTg1EBnbYfuYBt71eNq9vb3qjq9T24E/AQ9DxlNJvTsJpueNNIuSB/t6ZIyvvh4WyxWCMvlvcb44mF5nFvIweBAyXspcXMYb9hdS65DFC2MNMqYHc8JBEYNQUrwZZxPzQHgIMp4r2r2IF/NSMmnEqCU55VXJuL4qVWQiAlT+z5LxTOZiO8nsbCjYfZlwwYpkXM0rWibI5Fikl/KQ+PZkXChcJKn2o9weXEyCU12JjGkpigoyMa7SSnlYBGS8/cdf3n4TMl5I3jghqAW8li8g2PwYf8UqZBzo7ZOPR+LBfTLe/vTuB5+N9cg4u5R0u/s6SYinTgziNBIuyk7GOGZaPB4r5ZPx9qfSuycHjI21yFCSva03iUnD8+0QGUmpRmYyToqx8+KxWClGBuHi9N2Bz8ZaZHzYwkpNCmoB5yErRexUvIqzkjENzwWIquZz9u+jsVKUDMJFqUTIYGysQ8ZrZZhfJMpASYZgJSHVyEjGWGWiSPK88Xh8fT0ed58s5pXHYqWADMoFJYOysQYZ72X7v5vgiOklu4KBc3Fl7IzKSMZcpmJ+LCcV19Npsow/B3WbccHIADZWJ0NJ9hKMDYNI+LYvRPa3G1stzEbGoizNiqvHVIxSUP+NceGTQdhYmQw12Usuv0pJxiU2WbGpRiYyrnAcVT48Sftw/w7U/1mSyHhy8K8VyVCSveSgFvALdxRbTwueqBjGphpZyLiW5kU27zCeTo+PP93dHF9Np8kkjrufbu4+6YRcHR/fagQ0air+o6SQ8eTgP9U2k4jb46nw5kKOihKq5j7OhITdC1ylik01spDxpbwaF9fdmxIUERnI7JofHnSRsxkf+ih16eeTBTSuHMpSTg6IkAoVUZwfyHwMLceW8FswLxAZZG4orZyeXrHPwvkanykpFuwKUpJxWZDrtzHXZyBjioxUuZTaXUxBtaF4uFy8ES2C85Vb+HjDPpaPsZRuqSj7qzscQ/dMuQzl+26Kv//tCWcjqIwEcGraLseRkW459FJMDPAw2E7FaDkDGSWsjbT+olsKM1FUdN0NWlRILHYd3KbcFVJODsN04i7sWdFcFArRbJj6TQrRZGxepHrqC9lKYTsVl2qkJ+MET4ywPddifBhZOqmIIPiWk0H0O+dqF8o+1hMqGshkKFzEsJGVjLQr0++FVs/pAcROzFaD9GTg8uA8XZ+u4konwmlwyRU8/cQ9FlFSuKWSyAhxEc1GRjI2k6rmAdDEYHEwKm3FpBrpyUBKKN+m6tJNXEWxJNrdBcouo0vKX4LTYRMVNOFuB5OBuDj9e9Aggo1sZCRXzX18VK0UTsg3okOA1GR0sUpSdSlyQFNF3omGJT4ZkCnkPgVzQUMpgUowNRAZmnkB+NsNpwOxkYmMrcQ17AAfRDR87h/Cdioy1UhNBrJS5YM0PZKz9UqxdHiKD6BYiddYDkuoge9T7tB9i3d/vbpCcQQvEQsy3v50Gp4XADE3nvxlJTIS1+k4zkJWCuyUEBSZaqQmYx7WUywOsI2qfGXO9lAcEd73Wi54BWANbpEYX/W3oiOBnRJk/OMdh8QFYeMHjn+tQsZ2iuogA0oyAisl+fStKDuVlozrjFaqKyUlvrO+RjKE/z4J8QCbf4rKFeU5v0JMlsDxIDP1mU+Av0oj+ed3pwH+6+0qZGylKUlRiCSDZnwMyE5FKjotGVNExmlyf7DaK9w9IJeA0mt1iaRSuu2ejJnqhd7nIsk75geDnmCfoWfj51JgvhAX2XxG2rj2QmOlZDv1JuLKtGTcItN9F9POx522udAiliGFBmQGoGTuRJya6oRryDAsHRt6LjJGU0n7CXxglV6Iw8hORaWOack4RtpNDmzRPCqjGPZGkIFWZ6X9DZUbLEcEveiwMGu8QCblGRo2fj7UcpE5z7hIfHIyBdDWtUt0HE2YKIuXloyvSL3dmHYMKJIqo4qgCJbKaPhL9UeJC+SoRPsr1DocTWn9RhQXmTPw+IU6/2K0Qnv+QgALjdiYkJaMuyxkIOuCQ1i9/0YUSalgAU9H6mK8k+7xXRFFBjwkU8hQ2CC+W89FZjJ2NpLZ+IBL7psI+LDe4KUl40sWMrDhQYenWv89RpGtsjVURML0JN1fjQ6UuRSVDIkNxMWvStXWHGn7H10o3Enc1/9Cs0MnLEafaqQl4zALGUK9Uh0c+W9kjVAwJRspOZzWQOQqM0dmw8J+A3Mhv1lmOQNt/yUylLWlpA1T6m5nPba1UtKSscjgwJF6K3jVQfgdvLsKBVPKxOjG1bZIa0G01zJUcDZ+4Bn5r20FzYilPunNJWWlbzdhpe9yIw30G3VX8RlJ1RAUeUk+AE0Y5L9RiKWs7X2KnRny4lNVxfKzQsbpfw89BVEPgMl4HdrwHLsGfpHGSkGqobt5WjKwGyjFtAMcaiPYwlgM9LnWf1cU+xe3p7c8T6jJ1J3PEhmnv/620oaE16GdOrHF26fSzsNoaKPkFZK+xF2DYgZUsMbQhEEL6KgyVVHkRJZ9y+V54i7SuuNbqh8Cf7HaVh2YB/ILSxuhN2AFzjR7OrXY0jG6SjkkwWmgXYeSExCxEc6/UWVKLbPgmFfwUCmWblJUKmF752dOxunvq+4opEbpqWx8oheZnqWzUhv6VCN11RZrJN5OYf+NDuvWKgrYf4fWctVq7nxeWtx9SrHTB0A3Pn/2yQAu1iGj8Ea2PpGqepN2ZmgrXanJkPLkWCOBJhEmA4UA2Hod6B0MQJCxuB4DsmyqZq8EfKZkUC7WIsO7VGIqfdHwBeZsJwx89pfw5YiM3VgyJKcRuzlET8ZJWX+5domD4Qs/pYRZaeC/LPOZkMG4WIuMwpkysLe0OTROMnbevA7hHEnQbExAZOy8eaEC2TVcy5DDIRVd7RTAq6f4ahTvqoJE0Jt6Z5BA8BrZ55vS7+u8uRQEshdqVn6huRAlGdo6Oc4mNakGDsV2tpRZtYXfCbmRKhHz6DQcl2y5G5AW/krC3iD/Hdpy8kmbsacEf8Hyf35f652+15qD9ITmfZmPyH1rjf4ZZus8dDo+LsZhw1jOh8t3ckgzvg0ULy0W+Wo/lowcimynMQqfhpdcxbmkgOpbve0qUjz1LfDwLo/XSJmbSQUPTaoRT4ZUeFdysHK59ARW5E5OTqbHd4dFvjcWv1BTLoGBGX+VLsWR7XG0/5YsY/krMm0nV6VK0ja6b0+G8l0V4TIV9isRGwexsQunGhnICIWasOeDghVTufHB7crFxWKh7GXDc0AkdpXwWL8rS4KOpwTdTwvYdpu4p/EByCj8IhcB1TIVTjIi3tiX3tPcUUsiWchQ3yFTwFep1Snk/yuW7Z4ImagYEu76VLKMJN+j/2fbopPWfh+CDOWVV/VVDZxk6K2UtJktnGpkIUNKwzUIDMmJrln54IqTIQwS4le3ZTRmH1xSgewhyFBfBpeLhjjJiNzejJc7Qo0ykUF8c1ztTrOXRpwsieAIFQSR/9YN9Zi5mLTd90HICBVl8StlsYOeAy8EqqnG+9i1kNDK+fg05osqeDIQ1mGZTBuxvxktaAsyjgsahN905khQ6MOQEfpCEBFvenglYzOyPI/f1Ve/2UX3Hn8MGST8ifgyHWnAq8tCdP+Njgwxh9T6uY/IuahxMRLqzupkII2H6uVKgLux/SJ8kbbW4UP6CpJL+dzZZlxpS7cgNV3o6SijlTf5Vcxi5QtYsIWGDOS/IwpP2lc8ypW5diIhDNUvjLSshCuQUp6e+5sIti4v1JPPtzYlBA2e4YMx+xbe43bKBPp4vhkN/WaI8Sf1W7+gsH0nFdZP5gFl5BRz2IeVADyIHRf5sWiz0y1Jd6NfMJa8W6hQcx0M19avdz8ynIVKUgGiV3vHx4u5r0jiS0s3V+EkobugDYqLgKRp18ctnwTXXY64jPrkeBGwViT3SlmoavQlPOJ31v8UXJ98w1fFIdV/LF9MkiNHjhw5cuTIkSNHjhw5cuTIkSNHjhw5cuTIkSNHjhw5cuTIkSNHjhw5cuTIkSNHjhw5cuTIkSNHjhw5cuTIkSNHjhw5cnzXQF89H/st9CkleZklectabXkfPt6vkeOxQrzGcJ3++kK8xlmkFK+2JP9Ld49hfe0v+qjSX9RowJ990zAs/W/IpMIrcr35ikqyiaROyssaR7bttMPHW65tHzUiL6vOmo7ruuZshZ5yeJP9PSLEaS4jzhuO7RjRnUBYuo67hvIYWrZlsd/7bpmW5a7B7iuHSHoFf/XJX2ZqMlzCXJN/9IJHbxFu3Sg9eCPHpsPIqa/cX0JozzWpFFv/0zkFb88yrHYcGby7RJBlrTtPhzCKeyC2bRmpNajDKyIpIMNILwqTMbwfNXv+8TgyGm34zjLTcVxnuHqHq3tgCxzTdFyNmQTEk+ENaq29YDb0HMtuRjRMjw7pETwS2Ba3v4ag9ck4O7JNfl0MGV4btGi1JoNBSoOuRYt02OxNhsPBfsQXnsWTMSHd5XOq0eq1UtmzWIDmbGJ5Rya2FitgfTI8+HPfPx5Dxghms7HOwKE3Bk0340OEeDKcyN8GWxVej9zwR89rWobj/7hS4340Gi25AbgnqHtgqGezGXUvjRo5QpQ+GqFniSLjbDIbje75E3nVSW02W/aDA5yM4f0SlPxj/b4Gt6ZknBXIxTPFkcEVhomdhVftg8wJl0n6RzranwXMDpdEjPJdWlVTo0v50QUZXt1XQoPoYAZWrX8/gvnZI3dq+Eq6D25QrREptSqXSXszXKJjUYCvKXQGQzIx2kxYzSB21LTdjv9sJoQUHlgRYl6pjodHtmM2SLxjJZNRa7vE+DimH7D0m45DPtuONROqpWTUXfrllZZtuzAogAxn0HGhJ3LIVLMNeRL3m3Ygk/VnAJGY13LNI6abDj3tNiVWq/RrAGWfszTZo+97ChmNPaKEPfLXkIhygGMi3e/uEYi1HFAJu2pmUSm2P1SHpHdHgxHtg5kwn2FO2Mt723CYGxu5pAcO2FN/gtIeeUxtJh1r8M2GFphcQyHDfkUCd4mMkUOkm+CPGBsD8sEB6YYfCQoyjuiXV1que1T3ySACabjjSr+HBl7OrqEDQ9eXaTlM5tCCX3qEm7JPJnH2JPoyZdWDHMuoo0fYh47DmLCZ+UJkNMGmNXzRoIR9NnZM0t1Bwf8NRHYRkwJjqUMPVOFcm9BDny7BsRDrYHU6lrVH21FL2BvWqHeLIgPkkid0HYUM68ceQdPiZNSINKvemIFJYFO0t38/6S/p94QOJDLOhgNo3KsOh15AhtkZIWE+4NlsPMI8kDlhMvsBGdA/549CECZWB001WhxaFvDX40zX6SAaQp/tVhIZ1SpV0b7fXUEGXG62hjMwFDNOhmW2WtBEGkUaNNos2GZDFx7eafg2e6gng6WK5miATSCQYbBfWTQC/YFoiA4KPSuQz0YGfJ8uO4CjKdWBw++YDqg03F/qMiSLg2TOOBlEof2qrxxI3EDVljQ1+gYdrE7HfwwDWCYPug+3biSQoThwToZnUB9MH9miCSMlw75n9jUxsJkxY00fCQY9vYBGWbUYMhyFYx0Z1B/Bo5KpYQZqLjSGg6XJ+VLIwKGtA+P8RyLOxb6XkqHmF4HMfU6GT34hyJ8gVnPk33+s7jtsjlNpA9u/HrRMW65CRh+0BENiGeQKlAzTY7q1eoV4sFk943egjzHkqteTEYoKmZnqEPS4ZQHzZNTq9ToZbFaPXTDp7NnUabB+xZIxCMjAU5COetkR1gOZggzLYKdYvEy6QCeOaiQGPZg3Jg1dXgXDDx6dTrFVyAAOaF2AaxLIsIy0ZBQ6lj8KUY+o6jvRZIiBjsggDryAoymI/gziXGEAMvYaHce0bOaqM5CBJwKd9XiIN3pcJiLDf2r6NcqWw4IGO1yEqkMXaeyyDB6AP+gqZMyCflMtzLKTsR8I8PlMRYYaoutC2336pP73FwMZXo9EC0atUbVWJ2NkykMhkDkEgxQiY+CyygnFkcZ9vvKdk0JG65GQQXOCAb8V+DWjynSVkQw6MyYDhqEvHuZgw1ydDJBhWMJwgWMCs9XQksGG0NDvgyawrAYTituVQfCHQkY7rZkCb826VVuLDD5kqdqobiHYAodJ6clGBo0SceBDRzU85hpk0NFh9jwkk4blejIKphFf5xmYAQdBzRS8C7XaKAOHINOuYiUwMoJCoezAQTcwRWj0vjoZhZ5fOOz5IS5Ljoh4b9/MTEaVagJ535EfMPd1ZNA6h+H3I4aMCbU87fthdTjwZQLjAyma4k89srW+gmhrMmx41QmMNZby7Pl36vnKw7UpmmnOCl5H2Mg+jRgaChmQ1ljtKqWPuck1yAAbaxkzWsxlj1CjN223TSszGYUlldaZzVpNGq3BaLL2ljMY3NaeQgYdfpbR7jXiySjMqFO2yYwAa1V3kcxOiAwPVj7MZms56rSxmIZBwoq2AWf9esuEPToMR1ZUR2TMQkooNGhIaLSbEhmsO+1Z0wwqB2uQUai5cD9yves7yQZdx7FMEzjvZCPDa1Fppm0yu+JBKGnZtrMHk0AhgzwHvVM7iQzCMVsVoubTa9pcJhuLEhmFoQ3noQtSWYV6dhrU89rXjD86O4LIqFpMCVbT4tHDiM5kNqYEGVSKRaWwwZyRjJ7rukc8ch804Wcc3D1eFx3skQNue1A7cl32sPA5RAY5e8TIIH+5wU0nTfajEC6rthB24Ich6hPS5g9Kxh+k8Z7f+N6CszRv3Sd/0T61yfk/1ByvOtpzoSlt0YC2rjVZEpkW75/wE42RQ/vgHmFr1acSHNccCeF99uhtnzTPIvdmyXBhYFChQglU7XCMlgdsWL5t4Ed2m75Gq/QckEH+dROXKaoAlMM1+vW69PgD+tmDZrST8OMOoRyYC6HtRNwC0uq8ZF5okA+ekFUYEgivMiSSq8Ef9CK1c1zOoN8feEKm2j+pYDKALgwUKd4guBlShfToVdw3RQlcAps5+DCVIhoF5xS95MiRI8ejxf8CaCHBz1xZMMgAAAAASUVORK5CYII=",1,"w-100"],["href","https://www.kalcare.com/kania",1,"button","text-primary","fw-bold"],[1,"h4","btn-bottom","fw-bold","btn","btn-kalcare","text-white","btn-md","btn-block",3,"click"]],template:function(t,n){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 n.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 n.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 n.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 n.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 n.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 n.lazadaAuthorize()}),e._uU(72,"Authorize Account"),e.qZA()()()()(),e.YNc(73,hi,19,0,"div",23),e.qZA(),e.TgZ(74,"div",24)(75,"mat-slide-toggle",25),e.NdJ("change",function(s){return n.onToggleNewVersion(s.checked)}),e._uU(76,"Show Beta Channel Integration "),e.qZA()()()()),2&t&&(e.Q6J("headerTitle","Add New Channel")("pageData",n.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(73),e.Q6J("ngIf",n.newFeatureVisible))},dependencies:[u.O5,f.p,C.yS,it.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)}']}),i})();class ot{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}}let at=(()=>{class i{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 i.\u0275fac=function(t){return new(t||i)(e.LFG(Q.O))},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const gi=function(){return["/menu/channel/pos/edit"]};function fi(i,o){if(1&i){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(a){e.CHM(t);const s=e.oxw();return e.KtG(s.form.IncludeParentInventory=a)}),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&i){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 _i(i,o){if(1&i){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(a){e.CHM(t);const s=e.oxw();return e.KtG(s.form.IncludeChildrenInventory=a)}),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&i){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 Ci=[{path:"",component:Z,children:[{path:"",redirectTo:"marketplace",pathMatch:"full"},{path:"marketplace",component:Qt,canActivate:[H.a],data:{title:"List"}},{path:"marketplace/form",component:xn,canActivate:[H.a],data:{title:"Add new Channel"}},{path:"marketplace/view",component:ni,canActivate:[H.a],data:{title:"Marketplace View"}},{path:"marketplace/add",component:ui,canActivate:[H.a],data:{title:"Marketplace Add"}},{path:"pos",component:(()=>{class i{constructor(t,n){this.toastr=t,this.posService=n,this.form=new ot,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 i.\u0275fac=function(t){return new(t||i)(e.Y36(J._W),e.Y36(at))},i.\u0275cmp=e.Xpm({type:i,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,n){1&t&&(e.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),e.NdJ("click",function(){return n.onRefreshToken()}),e._uU(3,"Refresh Token"),e.qZA(),e.TgZ(4,"a",1),e.NdJ("click",function(){return n.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(s){return n.form.Host=s}),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(s){return n.form.Username=s}),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(s){return n.form.ClientSecretGuid=s}),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",n.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(6),e.Q6J("routerLink",e.DdM(12,gi)),e.xp6(13),e.Q6J("ngModel",n.form.Host),e.xp6(4),e.Q6J("ngModel",n.form.Username),e.xp6(4),e.Q6J("ngModel",n.form.ClientSecretGuid),e.xp6(14),e.hij(" ",n.form.CompositeVisible,""),e.xp6(6),e.Oqu(n.form.IncludeChildrenInventory),e.xp6(6),e.Oqu(n.form.IncludeParentInventory),e.xp6(6),e.hij(" ",0==n.form.InvoiceType?"Outlet":"Tag",""))},dependencies:[h.Fj,h.JJ,h.On,f.p,C.yS]}),i})(),canActivate:[H.a],data:{title:"POS"}},{path:"pos/edit",component:(()=>{class i{constructor(t,n,a){this._router=t,this.toastr=n,this.posService=a,this.form=new ot,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 i.\u0275fac=function(t){return new(t||i)(e.Y36(C.F0),e.Y36(J._W),e.Y36(at))},i.\u0275cmp=e.Xpm({type:i,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,n){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 n.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(s){return n.form.Host=s}),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(s){return n.form.Username=s}),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(s){return n.form.ClientSecretGuid=s}),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(s){return n.form.CompositeVisible=s}),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,fi,9,3,"div",22),e.YNc(43,_i,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(s){return n.form.InvoiceType=s}),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",n.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(16),e.Q6J("ngModel",n.form.Host),e.xp6(4),e.Q6J("ngModel",n.form.Username),e.xp6(4),e.Q6J("ngModel",n.form.ClientSecretGuid),e.xp6(13),e.Q6J("ngModel",n.form.CompositeVisible),e.xp6(1),e.Q6J("value",!1),e.xp6(2),e.Q6J("value",!0),e.xp6(2),e.Q6J("ngIf",n.form.CompositeVisible),e.xp6(1),e.Q6J("ngIf",n.form.CompositeVisible),e.xp6(5),e.Q6J("ngModel",n.form.InvoiceType),e.xp6(1),e.Q6J("value",0),e.xp6(2),e.Q6J("value",1))},dependencies:[u.O5,h.Fj,h.JJ,h.On,f.p,D.VQ,D.U0,C.yS],styles:[".passwordIcon[_ngcontent-%COMP%]{top:1.5rem;right:1rem;position:absolute;margin:0 auto!important;cursor:pointer}"]}),i})(),canActivate:[H.a],data:{title:"POS Edit"}}]}];let bi=(()=>{class i{}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.oAB({type:i}),i.\u0275inj=e.cJS({imports:[u.ez,C.Bz.forChild(Ci)]}),i})();var yi=d(4144),Ti=d(9101);let Si=(()=>{class i{}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.oAB({type:i}),i.\u0275inj=e.cJS({imports:[u.ez,h.u5,L.Z,f.R,D.Fk,A.A0,bi,C.Bz,xt,hn,yi.c,Ti.ot,et.Ps,y.AV,it.rP]}),i})()},7398:(lt,G,d)=>{d.d(G,{Z:()=>C,e:()=>A});var u=d(6895),h=d(266),L=d(6806),f=d(4650);function D(e,Z){if(1&e&&(f.TgZ(0,"li",2)(1,"a",3),f._uU(2),f.qZA()()),2&e){const b=Z.$implicit;f.xp6(1),f.s9C("routerLink",b.Url),f.Q6J("title",b.Description?b.Description:""),f.xp6(1),f.hij(" ",b.Title," ")}}let A=(()=>{class e{}return e.\u0275fac=function(b){return new(b||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(b,T){1&b&&(f.TgZ(0,"ul",0),f.YNc(1,D,3,3,"li",1),f.qZA()),2&b&&(f.xp6(1),f.Q6J("ngForOf",T.Tabs))},dependencies:[u.sg,L.yS,L.Od]}),e})(),C=(()=>{class e{}return e.\u0275fac=function(b){return new(b||e)},e.\u0275mod=f.oAB({type:e}),e.\u0275inj=f.cJS({imports:[u.ez,L.Bz,h.AV]}),e})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[72],{5072:(bn,v,s)=>{s.r(v),s.d(v,{InventoryModule:()=>In});var h=s(6895),n=s(4650),d=s(6806),y=s(7398);let P=(()=>{class e{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"}]}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=n.Xpm({type:e,selectors:[["app-inventory"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(t,a){1&t&&(n.TgZ(0,"nav",0)(1,"div",1)(2,"div"),n._UZ(3,"nav-tab",2),n.qZA()()(),n._UZ(4,"router-outlet")),2&t&&(n.xp6(3),n.Q6J("Tabs",a.inventoryTabs))},dependencies:[d.lC,y.e]}),e})();var S=s(8231),U=s(6304),I=s(8505),m=s(9300),u=s(3154),_=s(8705),b=s(1318),C=s(7185),T=s(5412),Z=s(9425),w=s(6082),f=s(7481),F=s(488);function k(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"button",17),n.NdJ("click",function(){n.CHM(t);const i=n.oxw(3);return n.KtG(i.openScanDialog())}),n._UZ(1,"i",18),n._uU(2," Scan Channel "),n.qZA()}}function J(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"button",19),n.NdJ("click",function(){n.CHM(t);const i=n.oxw().ngIf,o=n.oxw(2);return n.KtG(o.onUpdateItems(i))}),n._UZ(1,"i",20),n._uU(2," Update "),n.qZA()}}function L(e,l){if(1&e&&(n.TgZ(0,"actions")(1,"div",14)(2,"div"),n.YNc(3,k,3,0,"button",15),n.YNc(4,J,3,0,"button",16),n.qZA()()()),2&e){const t=l.ngIf,a=n.oxw(2);n.xp6(3),n.Q6J("ngIf",!a.productService.hasSelectionVariant(t)),n.xp6(1),n.Q6J("ngIf",a.productService.hasSelectionVariant(t))}}function Q(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"app-table",21),n.NdJ("onToggle",function(i){n.CHM(t);const o=n.oxw(2);return n.KtG(o.onShowDifferenceStock(i))})("onSubmit",function(i){const r=n.CHM(t).ngIf,p=n.oxw(2);return n.KtG(p.updateStockByVariant(i,r))}),n.qZA()}if(2&e){const t=l.ngIf,a=n.oxw(2);n.Q6J("data",t)("channel",a.channelOptions)("showProductToggle",!0)("filter",a.searchFilter)}}function O(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"span",22),n.NdJ("click",function(){n.CHM(t);const i=n.oxw(2);return n.KtG(i.getRowCount())}),n.TgZ(1,"i",23),n._uU(2,"?"),n.qZA()()}}function E(e,l){if(1&e&&(n.TgZ(0,"span"),n._uU(1),n.ALo(2,"number"),n.qZA()),2&e){const t=l.ngIf;n.xp6(1),n.Oqu(n.lcZ(2,1,t))}}function Y(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"a",24),n.NdJ("click",function(){n.CHM(t);const i=n.oxw(2);return n.KtG(i.nextPage())}),n._UZ(1,"i",25),n._uU(2," Next"),n.qZA()}}function $(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"a",26),n.NdJ("click",function(){n.CHM(t);const i=n.oxw(2);return n.KtG(i.getAllData())}),n._UZ(1,"i",27),n._uU(2," Last"),n.qZA()}}function q(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"mainpanel",1),n.NdJ("onSubmit",function(i){n.CHM(t);const o=n.oxw();return n.KtG(o.onSearch(i))}),n.YNc(1,L,5,2,"actions",2),n.ALo(2,"async"),n.TgZ(3,"content")(4,"div",3)(5,"div",4)(6,"div",5),n.YNc(7,Q,1,4,"app-table",6),n.ALo(8,"async"),n.ynx(9),n.TgZ(10,"div",7)(11,"div",8)(12,"div",9),n._uU(13),n.ALo(14,"number"),n.ALo(15,"async"),n.YNc(16,O,3,0,"span",10),n.YNc(17,E,3,3,"span",2),n.ALo(18,"async"),n._uU(19),n.qZA()(),n.TgZ(20,"div",11),n.YNc(21,Y,3,0,"a",12),n.YNc(22,$,3,0,"a",13),n.qZA()(),n.BQk(),n.qZA()()()()()}if(2&e){const t=n.oxw();let a;n.Q6J("pageData",t.pageData)("hideSearchBox",!1)("hideSearchDropdown",!0)("textButton","Search"),n.xp6(1),n.Q6J("ngIf",n.lcZ(2,12,t.paginationService.data$)),n.xp6(6),n.Q6J("ngIf",n.lcZ(8,14,t.paginationService.data$)),n.xp6(6),n.hij(" Showing 1 - ",n.lcZ(14,16,null==(a=n.lcZ(15,18,t.paginationService.data$))?null:a.length)," of "),n.xp6(3),n.Q6J("ngIf",t.paginationService.hideCount),n.xp6(1),n.Q6J("ngIf",n.lcZ(18,20,!t.paginationService.hideCount&&t.allDataCount$)),n.xp6(2),n.hij(" records ~ ",t.paginationService.footerPageNumber," Page "),n.xp6(2),n.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),n.xp6(1),n.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}let H=(()=>{class e{constructor(t,a,i,o,r){this.http=t,this.toastr=a,this.dialog=i,this.paginationService=o,this.productService=r,this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.filterTypeOptions=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory/pos",Active:!0},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!1}]}}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe((0,I.b)(t=>{this.channelOptions=t.Options.Channel,t.Filter={PageNumber:t.Filter.PageNumber,filterModel:_.v.ALL,RowCount:t.Filter.PageSize,HiddenIPOSInventory:t.Filter.HiddenIPOSInventory},this.searchFilter=t.Filter,this.paginationService.resetToFirstPage(this.searchFilter)}))}onSearch(t){this.searchFilter.text=t,this.paginationService.resetToFirstPage(this.searchFilter)}updateStock(t,a){let i=this.productService.selectedVariantProduct(t);if(i.length>0){let r=i.map(c=>({ID:c.ID,Code:c.Code,Inventory:c.Inventory})),p={ListChannelID:a.filter(c=>c.selected).map(c=>c.ID),List:r};this.http.post("/api/Inventory/UpdateChannel",p).subscribe(c=>{this.paginationService.resetToFirstPage(this.searchFilter),this.toastr.success("Successfully updated "+p.List.length+" variants in "+p.ListChannelID.length+" channels","Success")})}}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(S.j,{data:{filter:t,channelOptions:this.channelOptions},width:"40%"}).afterClosed().pipe((0,m.h)(i=>u.g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAll()})}scanAll(){this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(t=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{let a=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(t,a,!this.searchFilter.UpdatedProduct),this.initPageLoader()}this.searchFilter.ChannelID=u.g.GuidEMpty})}updateStockByVariant(t,a){let i={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,NewQuantity:parseFloat(t.Inventory),VariantID:t.ID,SKU:t.Sku};this.http.post("/api/Inventory/UpdateQuantityByItem",i).subscribe(o=>{let r=this.productService.findChannelById(i.ID,this.channelOptions);this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") inventory in "+r.Name+" to "+i.NewQuantity,"Success")})}onShowDifferenceStock(t){this.searchFilter.filterModel=t?_.v.DIFFERENCE:_.v.ALL,this.paginationService.resetToFirstPage(this.searchFilter)}onUpdateItems(t){const a=this.productService.selectedVariantProduct(t);this.dialog.open(U.j,{data:{selectedItems:a,channels:JSON.parse(JSON.stringify(this.channelOptions))},width:"40%"}).afterClosed().pipe((0,m.h)(i=>u.g.IsNotEmpty(i))).subscribe(i=>{this.updateStock(t,i)})}getRowCount(){this.paginationService.hideCount=!1,this.allDataCount$=this.http.post(`/API/${this.allDataCountEndpoint}`,{text:this.searchFilter.text})}nextPage(){this.paginationService.onNextPage(this.searchFilter)}getAllData(){this.http.post(`/API/${this.allDataCountEndpoint}`,{}).subscribe({next:t=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,t)}})}ngOnDestroy(){this.paginationService.destroy()}}return e.\u0275fac=function(t){return new(t||e)(n.Y36(b.O),n.Y36(C._W),n.Y36(T.uw),n.Y36(Z.b),n.Y36(w.M))},e.\u0275cmp=n.Xpm({type:e,selectors:[["app-multi-channel-comparison"]],decls:2,vars:3,consts:[["headerTitle","Inventory Comparison",3,"pageData","hideSearchBox","hideSearchDropdown","textButton","onSubmit",4,"ngIf"],["headerTitle","Inventory Comparison",3,"pageData","hideSearchBox","hideSearchDropdown","textButton","onSubmit"],[4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["table","inventory",3,"data","channel","showProductToggle","filter","onToggle","onSubmit",4,"ngIf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],[1,"d-flex"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-3",3,"click",4,"ngIf"],["type","button","class","btn btn-success shadow-sm rounded me-3",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"data","channel","showProductToggle","filter","onToggle","onSubmit"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(t,a){1&t&&(n.YNc(0,q,23,22,"mainpanel",0),n.ALo(1,"async")),2&t&&n.Q6J("ngIf",n.lcZ(1,1,a.loader$))},dependencies:[h.O5,f.p,F.a,h.Ov,h.JJ],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]}),e})();var V=s(7945),G=s(1739);let A=(()=>{class e{constructor(t){this.toastrService=t}showToastrUpdateInventory(t,a){const i=t.length>0,o=a.length>0;if(!o&&i&&this.toastrService.success(`${this.generateSuccessMessage(t.length)}`,"Success",{enableHtml:!0}),o&&i){const r=`<li>${this.generateSuccessMessage(t.length)}</li>`,p=this.generateErrorMessage(a);this.toastrService.warning(`<ol>${r} ${p}</ol>`,"Warning",{enableHtml:!0})}if(o&&!i){const r=`<ol>${this.generateErrorMessage(a)}</ol>`;this.toastrService.error(r,"Error",{enableHtml:!0})}}generateSuccessMessage(t){return`<span class="fw-bold">Successfully</span> updated ${t} variants in 1 channels`}generateErrorMessage(t=[]){let a="";return t.forEach((i,o)=>{a+=`<li><span class="fw-bold">Error</span> Updating stock for [${i.Name}] - <b>${i.Message}</b></li>`}),a}}return e.\u0275fac=function(t){return new(t||e)(n.LFG(C._W))},e.\u0275prov=n.Yz7({token:e,factory:e.\u0275fac}),e})();var g=s(4006),x=s(8796),M=s(455),N=s(266);function K(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"button",33),n.NdJ("click",function(){n.CHM(t);const i=n.oxw(2).ngIf,o=n.oxw();return n.KtG(o.openScanDialog(i))}),n._UZ(1,"i",34),n._uU(2," Scan Channel "),n.qZA()}}function R(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"button",35),n.NdJ("click",function(){n.CHM(t);const i=n.oxw().ngIf,o=n.oxw(2);return n.KtG(o.updateStock(i))}),n._UZ(1,"i",36),n._uU(2," Update"),n.qZA()}}function B(e,l){if(1&e&&(n.TgZ(0,"div"),n.YNc(1,K,3,0,"button",31),n.YNc(2,R,3,0,"button",32),n.qZA()),2&e){const t=l.ngIf,a=n.oxw(2);n.xp6(1),n.Q6J("ngIf",!a.productService.hasSelectionVariant(t)),n.xp6(1),n.Q6J("ngIf",a.productService.hasSelectionVariant(t))}}function j(e,l){1&e&&(n.TgZ(0,"div",37)(1,"span"),n._uU(2," showing only different stock, please press next to populate more data "),n.qZA()())}function z(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"th")(1,"input",38),n.NdJ("ngModelChange",function(i){n.CHM(t);const o=n.oxw(2);return n.KtG(o.checkboxState=i)})("ngModelChange",function(){const o=n.CHM(t).ngIf,r=n.oxw(2);return n.KtG(r.onCheckboxStateChange(o))}),n.qZA()()}if(2&e){const t=n.oxw(2);n.xp6(1),n.Q6J("ngModel",t.checkboxState)}}function W(e,l){if(1&e&&(n.TgZ(0,"ng-option",39),n._UZ(1,"img",40),n._uU(2),n.qZA()),2&e){const t=l.$implicit;n.Q6J("value",t.ID),n.xp6(1),n.s9C("src",t.Img,n.LSH),n.xp6(1),n.hij("",t.Name," ")}}function X(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"input",64),n.NdJ("ngModelChange",function(i){n.CHM(t);const o=n.oxw(3).$implicit;return n.KtG(o.selected=i)})("ngModelChange",function(){n.CHM(t);const i=n.oxw(3).$implicit,o=n.oxw(2);return n.KtG(o.onCheckboxStateProduct(i))}),n.qZA()}if(2&e){const t=n.oxw(3).$implicit;n.Q6J("ngModel",t.selected)}}function nn(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"img",65),n.NdJ("click",function(i){n.CHM(t);const o=n.oxw(3).$implicit,r=n.oxw(2);return n.KtG(r.onZoomImage(i,null==o?null:o.ImageUrl))}),n.qZA()}if(2&e){const t=n.oxw(3).$implicit;n.s9C("src",null==t?null:t.ThumbnailUrl,n.LSH)}}function tn(e,l){1&e&&n._UZ(0,"img",66)}function en(e,l){if(1&e&&(n.ynx(0),n.TgZ(1,"td",55)(2,"div",56),n.YNc(3,X,1,1,"input",57),n.YNc(4,nn,1,1,"img",58),n.YNc(5,tn,1,0,"ng-template",null,59,n.W1O),n.qZA()(),n.TgZ(7,"td",60)(8,"span",61),n._uU(9),n.qZA(),n._UZ(10,"br"),n.TgZ(11,"div",62),n._UZ(12,"i",63),n.TgZ(13,"small"),n._uU(14),n.qZA()()(),n.BQk()),2&e){const t=n.MAs(6),a=n.oxw().$implicit,i=n.oxw().$implicit;n.xp6(1),n.Q6J("rowSpan",null==i?null:i.Variants.length),n.xp6(2),n.Q6J("ngIf",(null==a?null:a.Inventory)>=0||i.Variants.length>1),n.xp6(1),n.Q6J("ngIf",null==i?null:i.ThumbnailUrl)("ngIfElse",t),n.xp6(3),n.Q6J("rowSpan",null==i?null:i.Variants.length),n.xp6(2),n.Oqu(null==i?null:i.Name),n.xp6(5),n.hij("(",null==i?null:i.Category,")")}}function an(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"input",38),n.NdJ("ngModelChange",function(i){n.CHM(t);const o=n.oxw().$implicit;return n.KtG(o.selected=i)}),n.qZA()}if(2&e){const t=n.oxw().$implicit;n.Q6J("ngModel",t.selected)}}function on(e,l){if(1&e&&(n.TgZ(0,"span")(1,"span",67),n._uU(2),n.ALo(3,"number"),n.qZA(),n._uU(4," => "),n.TgZ(5,"span",68),n._uU(6),n.ALo(7,"number"),n.qZA()()),2&e){const t=n.oxw().$implicit;n.xp6(2),n.hij(" ",n.lcZ(3,2,null==t||null==t.I?null:t.I.Available),""),n.xp6(4),n.Oqu(n.lcZ(7,4,null==t?null:t.Inventory))}}function ln(e,l){if(1&e&&(n.TgZ(0,"span"),n._uU(1),n.ALo(2,"number"),n.qZA()),2&e){const t=n.oxw().$implicit;n.xp6(1),n.hij(" ",n.lcZ(2,1,null==t?null:t.Inventory)," ")}}function rn(e,l){if(1&e&&(n.ynx(0),n.TgZ(1,"span",71),n._uU(2),n.ALo(3,"number"),n.qZA(),n.BQk()),2&e){const t=n.oxw(2).$implicit;n.xp6(2),n.hij(" (",n.lcZ(3,1,null==t||null==t.Channel[0]?null:t.Channel[0].InventoryReserved),") ")}}const sn=function(e){return{"bg-gradient-warning":e}};function cn(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"td",69),n.YNc(1,rn,4,3,"ng-container",3),n.TgZ(2,"span",70),n.NdJ("click",function(){n.CHM(t);const i=n.oxw().$implicit,o=n.oxw(),r=o.$implicit,p=o.ngForOf,c=n.oxw(2);return n.KtG(c.openTableDialog(r,i,p))}),n._uU(3),n.ALo(4,"number"),n.qZA()()}if(2&e){const t=n.oxw().$implicit;n.Q6J("ngClass",n.VKq(5,sn,(null==t?null:t.Inventory)!=(null==t||null==t.Channel[0]?null:t.Channel[0].Inventory))),n.xp6(1),n.Q6J("ngIf",null==t||null==t.Channel[0]?null:t.Channel[0].InventoryReserved),n.xp6(2),n.hij(" ",n.lcZ(4,3,null==t||null==t.Channel[0]?null:t.Channel[0].Inventory)," ")}}function pn(e,l){1&e&&(n.ynx(0),n._uU(1," - "),n.BQk())}function hn(e,l){if(1&e&&(n.TgZ(0,"span",72),n.ALo(1,"date"),n._uU(2),n.ALo(3,"date"),n.qZA()),2&e){const t=n.oxw().$implicit;n.Q6J("matTooltip",n.xi3(1,2,null==t||null==t.Channel[0]?null:t.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),n.xp6(2),n.hij(" ",n.xi3(3,5,null==t||null==t.Channel[0]?null:t.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function un(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"tr"),n.YNc(1,en,15,7,"ng-container",3),n.TgZ(2,"td",41),n._uU(3),n.qZA(),n.TgZ(4,"td",42)(5,"div",43)(6,"span"),n._uU(7),n.qZA(),n.TgZ(8,"span",44)(9,"a",45),n._UZ(10,"i",46),n.qZA()()()(),n.TgZ(11,"td",47),n.YNc(12,an,1,1,"input",48),n.qZA(),n.TgZ(13,"td",42),n.YNc(14,on,8,6,"span",3),n.YNc(15,ln,3,3,"span",3),n.qZA(),n.YNc(16,cn,5,7,"td",49),n.TgZ(17,"td",23),n.YNc(18,pn,2,0,"ng-container",50),n.YNc(19,hn,4,8,"ng-template",null,51,n.W1O),n.qZA(),n.TgZ(21,"td")(22,"div",10)(23,"div",52)(24,"a",45),n._UZ(25,"i",46),n.qZA(),n._uU(26," \xa0\xa0 "),n.TgZ(27,"span",53),n.NdJ("click",function(){const o=n.CHM(t).$implicit,r=n.oxw(3);return n.KtG(r.refreshInventory(null==o||null==o.Channel[0]?null:o.Channel[0].ChannelItemID,null==o||null==o.Channel[0]?null:o.Channel[0].ChannelVariationID,null==o||null==o.Channel[0]?null:o.Channel[0].ChannelID,null==o?null:o.ID))}),n._UZ(28,"i",54),n.qZA()()()()()}if(2&e){const t=l.$implicit,a=l.index,i=n.MAs(20),o=n.oxw(3);n.xp6(1),n.Q6J("ngIf",0==a),n.xp6(2),n.Oqu(null==t?null:t.Model),n.xp6(4),n.Oqu(null==t?null:t.Code),n.xp6(2),n.Q6J("href","https://"+o.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(null==t?null:t.ID),n.LSH),n.xp6(3),n.Q6J("ngIf",(null==t?null:t.Inventory)>=0),n.xp6(2),n.Q6J("ngIf",(null==t?null:t.Inventory)!=(null==t||null==t.I?null:t.I.Available)),n.xp6(1),n.Q6J("ngIf",(null==t?null:t.Inventory)==(null==t||null==t.I?null:t.I.Available)),n.xp6(1),n.Q6J("ngIf",null==t?null:t.Channel),n.xp6(2),n.Q6J("ngIf",(null==t||null==t.Channel[0]?null:t.Channel[0].LastInventorySync)==o.minDate)("ngIfElse",i),n.xp6(6),n.Q6J("href",null==t||null==t.Channel[0]?null:t.Channel[0].Url,n.LSH)}}function gn(e,l){if(1&e&&(n.TgZ(0,"tbody"),n.YNc(1,un,29,11,"tr",25),n.qZA()),2&e){const t=l.$implicit;n.xp6(1),n.Q6J("ngForOf",t.Variants)}}function _n(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"span",73),n.NdJ("click",function(){n.CHM(t);const i=n.oxw(2);return n.KtG(i.getRowCount())}),n.TgZ(1,"i",74),n._uU(2,"?"),n.qZA()()}}function mn(e,l){if(1&e&&(n.TgZ(0,"span"),n._uU(1),n.ALo(2,"number"),n.qZA()),2&e){const t=l.ngIf;n.xp6(1),n.Oqu(n.lcZ(2,1,null==t?null:t.Total))}}function dn(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"a",78),n.NdJ("click",function(){n.CHM(t);const i=n.oxw(3);return n.KtG(i.onNextPage())}),n._UZ(1,"i",79),n._uU(2," Next"),n.qZA()}}function Cn(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"a",80),n.NdJ("click",function(){n.CHM(t);const i=n.oxw(3);return n.KtG(i.onLastPage())}),n._UZ(1,"i",81),n._uU(2," Last"),n.qZA()}}function fn(e,l){if(1&e&&(n.TgZ(0,"div",75),n.YNc(1,dn,3,0,"a",76),n.YNc(2,Cn,3,0,"a",77),n.qZA()),2&e){const t=n.oxw(2);n.xp6(1),n.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),n.xp6(1),n.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}function xn(e,l){if(1&e){const t=n.EpF();n.TgZ(0,"mainpanel",1),n.NdJ("onSubmit",function(i){n.CHM(t);const o=n.oxw();return n.KtG(o.onSearch(i))}),n.TgZ(1,"actions")(2,"div",2),n.YNc(3,B,3,2,"div",3),n.ALo(4,"async"),n.qZA()(),n.TgZ(5,"filters")(6,"div",2)(7,"div",4)(8,"div")(9,"label",5),n._uU(10,"PageNumber"),n.qZA(),n.TgZ(11,"input",6),n.NdJ("ngModelChange",function(i){n.CHM(t);const o=n.oxw();return n.KtG(o.searchFilter.PageNumber=i)}),n.qZA()(),n.TgZ(12,"div")(13,"label",7),n._uU(14,"Page Size"),n.qZA(),n.TgZ(15,"input",8),n.NdJ("ngModelChange",function(i){n.CHM(t);const o=n.oxw();return n.KtG(o.searchFilter.RowCount=i)}),n.qZA()()()()(),n.TgZ(16,"content")(17,"div",9)(18,"div",10)(19,"div",11),n.YNc(20,j,3,0,"div",12),n.TgZ(21,"table",13)(22,"thead",14)(23,"tr")(24,"th",15),n._uU(25,"Product "),n._UZ(26,"br"),n.TgZ(27,"mat-slide-toggle",16),n.NdJ("toggleChange",function(){n.CHM(t);const i=n.oxw();return i.showDifferenceStock=!i.showDifferenceStock,n.KtG(i.onShowDifferenceStock())}),n.TgZ(28,"small",17),n._uU(29,"Filter Different Inventory"),n.qZA()()(),n.TgZ(30,"th",18),n._uU(31,"Variant"),n.qZA(),n.TgZ(32,"th",19),n._uU(33,"SKU"),n.qZA(),n.YNc(34,z,2,1,"th",3),n.ALo(35,"async"),n.TgZ(36,"th",20),n._uU(37,"POS"),n.qZA(),n.TgZ(38,"th")(39,"ng-select",21),n.NdJ("change",function(i){n.CHM(t);const o=n.oxw();return n.KtG(o.onFilterChannel(i))})("ngModelChange",function(i){n.CHM(t);const o=n.oxw();return n.KtG(o.searchFilter.ChannelID=i)}),n.YNc(40,W,3,3,"ng-option",22),n.qZA()(),n.TgZ(41,"th",23),n._uU(42,"Last Sync"),n.qZA(),n._UZ(43,"th",24),n.qZA()(),n.YNc(44,gn,2,1,"tbody",25),n.ALo(45,"async"),n.qZA(),n.TgZ(46,"div",26)(47,"div",27)(48,"div",28),n._uU(49),n.ALo(50,"number"),n.ALo(51,"async"),n.YNc(52,_n,3,0,"span",29),n.YNc(53,mn,3,3,"span",3),n.ALo(54,"async"),n._uU(55),n.qZA()(),n.YNc(56,fn,3,2,"div",30),n.ALo(57,"async"),n.qZA()()()()()()}if(2&e){const t=l.ngIf,a=n.oxw();let i,o;n.Q6J("headerTitle","Inventory Comparison")("pageData",a.pageData)("hideSearchBox",!1),n.xp6(3),n.Q6J("ngIf",n.lcZ(4,17,a.paginationService.data$)),n.xp6(8),n.Q6J("ngModel",a.searchFilter.PageNumber),n.xp6(4),n.Q6J("ngModel",a.searchFilter.RowCount),n.xp6(5),n.Q6J("ngIf",3==(null==a.searchFilter?null:a.searchFilter.filterModel)),n.xp6(14),n.Q6J("ngIf",n.lcZ(35,19,a.paginationService.data$)),n.xp6(5),n.Q6J("clearable",!1)("ngModel",a.searchFilter.ChannelID),n.xp6(1),n.Q6J("ngForOf",t.Options.Channel),n.xp6(4),n.Q6J("ngForOf",n.lcZ(45,21,a.paginationService.data$)),n.xp6(5),n.hij(" Showing 1 - ",n.lcZ(50,23,null==(i=n.lcZ(51,25,a.paginationService.data$))?null:i.length)," of "),n.xp6(3),n.Q6J("ngIf",a.paginationService.hideCount),n.xp6(1),n.Q6J("ngIf",n.lcZ(54,27,!a.paginationService.hideCount&&a.rowCount$)),n.xp6(2),n.hij(" records ~ ",a.paginationService.footerPageNumber," Page "),n.xp6(1),n.Q6J("ngIf",(null==(o=n.lcZ(57,29,a.paginationService.data$))?null:o.length)>0)}}let vn=(()=>{class e{constructor(t,a,i,o,r,p,c){this.http=t,this.toastr=a,this.dialog=i,this.paginationService=o,this.productService=r,this.biggerPictureService=p,this.inventoryService=c,this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="/api/InventoryLoader/Load",this.rowCountApi="/api/Inventory/GetInventoryByChannelRowCount",this.minDate=u.g.MinDate,this.Options=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory Realtime",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory",Active:!1},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!0}]},this.hostName=r.getHostName()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint="Inventory/GetSingleChannelComparison",this.loader$=this.http.post(this.loaderApi,{}).pipe((0,I.b)(t=>{this.channelOptions=t.Options.Channel,this.searchFilter={RowCount:t.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:t.Filter.ChannelID},this.paginationService.resetToFirstPage(this.searchFilter),t.Filter.IsMarketplaceAppActive||this.toastr.warning("Automatic inventory sync disabled.\n Please enable Dealpos X Marketplace Apps integration in POS Configuration","Warning")}))}onSearch(t){this.searchFilter.text=t,this.paginationService.resetToFirstPage(this.searchFilter)}onFilterChannel(t){this.searchFilter.ChannelID=t,this.searchFilter.PageNumber=1,this.paginationService.resetToFirstPage(this.searchFilter)}updateStock(t){const a=this.productService.selectedVariantProduct(t);if(a.length>0){let i=a.map(r=>({ID:r.ID,Code:r.Code,Inventory:r.Inventory}));this.http.post("/api/Inventory/UpdateChannel",{ListChannelID:[this.searchFilter.ChannelID],List:i}).subscribe(r=>{this.searchFilter.PageNumber=1,this.paginationService.resetToFirstPage(this.searchFilter),this.checkboxState=!1,this.handlingUpdateStock(r)})}}handlingUpdateStock(t){t[0]?.StatusProduct?this.inventoryService.showToastrUpdateInventory(t[0].StatusProduct.Success_list,t[0].StatusProduct.Fail_list):this.toastr.error(t[0]?.Exception,"Error")}openScanDialog(t){const a=JSON.parse(JSON.stringify(this.searchFilter));a.ChannelID=u.g.GuidEMpty,this.dialog.open(S.j,{data:{filter:a,channelOptions:t.Options.Channel},width:"40%"}).afterClosed().pipe((0,m.h)(o=>u.g.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.Async=o.Async,this.scannALl(t)})}scannALl(t){const a=this.productService.findChannelById(this.searchFilter.ChannelID,t.Options.Channel);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(i=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.searchFilter.ScanFull=!1,this.initPageLoader(),this.toastr.success("Successfully scanned from "+a?.Name,"Success"))})}refreshInventory(t,a,i,o){this.http.post("/api/Inventory/RefreshInventoryChannel",{ChannelItemID:t,ChannelVariationID:a,ChannelID:i,VariantID:o}).subscribe(p=>{this.toastr.success("Successfully updated","Success"),this.paginationService.resetToFirstPage(this.searchFilter)})}onCheckboxStateProduct(t){t.Variants=t.Variants.map(a=>(a.Inventory>=0&&(a.selected=t.selected),a))}onCheckboxStateChange(t){t=t.map(a=>(a.Variants=a.Variants.map(i=>(i.selected=this.checkboxState,i)),a))}openTableDialog(t,a,i){this.dialog.open(V.k,{data:{Name:t.Name,Variant:a,ChannelID:a?.Channel[0].ChannelID,Table:"inventory",ChannelItemID:t.ChannelItemID}}).afterClosed().pipe((0,m.h)(r=>u.g.IsNotEmpty(r))).subscribe(r=>{this.updateItemAfterDialog(r,i)})}updateItemAfterDialog(t,a){let i={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,NewQuantity:parseFloat(t.Inventory),VariantID:t.ID,SKU:t.Sku};const o=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.http.post("/api/Inventory/UpdateQuantityByItem",i).subscribe(r=>{this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") inventory in "+o?.Name+" to "+i.NewQuantity,"Success")})}onShowDifferenceStock(){this.searchFilter.filterModel=this.showDifferenceStock?_.v.DIFFERENCE:_.v.ALL,this.paginationService.resetToFirstPage(this.searchFilter)}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}getRowCount(){const t={ChannelID:this.searchFilter.ChannelID,PageNumber:1,text:this.searchFilter.text};this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`${this.rowCountApi}`,t)}onLastPage(){this.http.post(`${this.rowCountApi}`,{ChannelID:this.searchFilter.ChannelID,PageNumber:1}).subscribe({next:a=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,a.Total)}})}onZoomImage(t,a){this.biggerPictureService.openBiggerPicture(t,a)}ngOnDestroy(){this.paginationService.destroy()}}return e.\u0275fac=function(t){return new(t||e)(n.Y36(b.O),n.Y36(C._W),n.Y36(T.uw),n.Y36(Z.b),n.Y36(w.M),n.Y36(G.k),n.Y36(A))},e.\u0275cmp=n.Xpm({type:e,selectors:[["app-single-channel-comparison"]],decls:2,vars:3,consts:[["textButton","Search",3,"headerTitle","pageData","hideSearchBox","onSubmit",4,"ngIf"],["textButton","Search",3,"headerTitle","pageData","hideSearchBox","onSubmit"],[1,"d-flex"],[4,"ngIf"],["container",""],["for","PageNumber"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control",3,"ngModel","ngModelChange"],["for","RowCount"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["class","alert alert-warning d-flex justify-content-between text-dark","role","alert",4,"ngIf"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","ps-12",2,"width","25%"],[3,"toggleChange"],[1,"fw-bold"],["scope","col",1,"text-start"],["scope","col",1,"text-end",2,"width","10%"],["scope","col",1,"text-end","w-10",2,"width","8%"],[3,"clearable","ngModel","change","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"text-center"],[2,"width","4%"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],["class","btn-group",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-3",3,"click",4,"ngIf"],["class","btn btn-success",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],["role","alert",1,"alert","alert-warning","d-flex","justify-content-between","text-dark"],["type","checkbox",3,"ngModel","ngModelChange"],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"],[1,"text-start"],[1,"text-end"],[1,"d-flex","align-items-center","justify-content-end"],[1,"ms-2"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt","external-link-custom"],[1,"align-middle"],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],["class","text-end",3,"ngClass",4,"ngIf"],[4,"ngIf","ngIfElse"],["SYNCDATE",""],[1,"col-12","ps-0","d-flex","justify-content-between"],["matTooltip","Refresh stock according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","fa-sync","fa-lg","external-link-custom"],[1,"text-start",2,"width","0%",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-start"],["type","checkbox","class","me-3",3,"ngModel","ngModelChange",4,"ngIf"],["class","border rounded w-img cursor-pointer","style","margin-left: 20px",3,"src","click",4,"ngIf","ngIfElse"],["elsePic",""],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[1,"d-flex","align-items-center"],["title","Category",1,"fa-solid","fa-tags","me-2",2,"opacity","60%"],["type","checkbox",1,"me-3",3,"ngModel","ngModelChange"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img",2,"margin-left","20px"],["title","Allocated"],["title","Inventory below minimum inventory"],[1,"text-end",3,"ngClass"],[1,"cursor",3,"click"],["matTooltip","Reserved Stock","matTooltipPosition","above",1,"text-danger"],["matTooltipShowDelay","500",3,"matTooltip"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(t,a){1&t&&(n.YNc(0,xn,58,31,"mainpanel",0),n.ALo(1,"async")),2&t&&n.Q6J("ngIf",n.lcZ(1,1,a.loader$))},dependencies:[h.mk,h.sg,h.O5,g.Fj,g.wV,g.Wl,g.JJ,g.On,x.w9,x.jq,M.Rr,f.p,N.gM,h.Ov,h.JJ,h.uU],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}"]}),e})();var D=s(8063);const yn=[{path:"",component:P,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",component:H,canActivate:[D.a],data:{title:"Inventory Comparison"}},{path:"bychannel",component:vn,canActivate:[D.a],data:{title:"Inventory Comparison"}}]}];let Sn=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=n.oAB({type:e}),e.\u0275inj=n.cJS({imports:[h.ez,d.Bz.forChild(yn)]}),e})(),In=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=n.oAB({type:e}),e.\u0275inj=n.cJS({providers:[A],imports:[h.ez,Sn,d.Bz,y.Z,g.u5,x.A0,M.rP,f.R,F.U,N.AV]}),e})()}}]);