marketplacepos 2.5.9 → 2.6.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.
- package/Marketplace/{117.6aab9cf870275665.js → 117.7936760fc208d523.js} +1 -1
- package/Marketplace/180.cc94448b2211cb4a.js +1 -0
- package/Marketplace/{397.7fd0ad9d4bf07277.js → 397.39d258c71c3fff64.js} +1 -1
- package/Marketplace/{463.20f700792417e3ee.js → 463.d5db8443b197d470.js} +1 -1
- package/Marketplace/656.1d7641755cc6e994.js +1 -0
- package/Marketplace/877.14904bfeb2339fd8.js +1 -0
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main.60acf6953d678e06.js → main.f039f644ef145436.js} +1 -1
- package/Marketplace/{runtime.820b56b87cfd43ef.js → runtime.812f0a7e50e882a8.js} +1 -1
- package/package.json +1 -1
- package/Marketplace/180.dbbf0c10ee5511ad.js +0 -1
- package/Marketplace/716.8753639575454fc2.js +0 -1
- package/Marketplace/832.886dc486c5a4ff32.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[463],{6463:(ie,G,h)=>{h.r(G),h.d(G,{ChannelsModule:()=>tn});var m=h(6895),u=h(4006),E=h(7398),f=h(7481),w=h(1948),K=h(8796),C=h(6806),t=h(4650);let x=(()=>{class o{constructor(){this.channelTabs=[{Title:"Marketplace",Url:"/menu/channel/marketplace"},{Title:"POS",Url:"/menu/channel/pos"}]}ngOnInit(){}}return o.\u0275fac=function(e){return new(e||o)},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-channels"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(e,i){1&e&&(t.TgZ(0,"nav",0)(1,"div",1)(2,"div"),t._UZ(3,"nav-tab",2),t.qZA()()(),t._UZ(4,"router-outlet")),2&e&&(t.xp6(3),t.Q6J("Tabs",i.channelTabs))},dependencies:[E.e,C.lC],styles:[".form-label-group[_ngcontent-%COMP%]{position:relative;margin-bottom:1rem}.form-label-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-radius:.25rem!important;border-color:#c8d3df}.form-label-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{width:auto;position:absolute;top:1.125rem;left:.75rem;display:block;margin-bottom:0;line-height:1.5;color:#ccc;pointer-events:none;cursor:text;border:1px solid transparent;border-radius:.25rem;transition:all .1s ease-in-out;font-size:.875rem}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]{padding:.75rem;color:#343434;resize:both;font-size:.875rem;border-radius:.25rem;border-color:#c8d3df}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%] ~ label[_ngcontent-%COMP%]{top:.9375rem}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]:focus ~ label[_ngcontent-%COMP%]{top:1rem;left:.78125rem}.form-label-group[_ngcontent-%COMP%] > ng-select[_ngcontent-%COMP%] .ng-select-container{min-height:3.625rem;border-color:#c8d3df;box-shadow:none}.form-label-group[_ngcontent-%COMP%] > ng-select[_ngcontent-%COMP%] ~ label[_ngcontent-%COMP%]{display:inline-block;top:-.625rem;background-color:#fff;font-size:.75rem!important;color:#9da2a6;padding:0 .25rem;z-index:2000;left:.5rem}.form-label-group.multiple[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-input{padding-left:.25rem!important}.form-label-group.multiple[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-placeholder{top:18px!important}.form-label-group.radio[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;border-radius:.25rem!important;border:solid 1px #c8d3df}.form-label-group.radio[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{background-color:#fff;font-size:.75rem!important;color:#9da2a6;top:-10px!important;padding:0 .25rem;left:.5rem}.form-label-group.empty[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] ~ label[_ngcontent-%COMP%]{display:none}.form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:not(:placeholder-shown) ~ label[_ngcontent-%COMP%], .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:not(:placeholder-shown) ~ label[_ngcontent-%COMP%]{background-color:#fff;font-size:.75rem!important;color:#9da2a6;top:-10px!important;padding:0 .25rem;left:.5rem}.form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:not(:placeholder-shown):focus ~ label[_ngcontent-%COMP%], .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:not(:placeholder-shown):focus ~ label[_ngcontent-%COMP%]{color:#3f8aec}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-placeholder{padding-left:.25rem;color:#ccc!important;font-size:.875rem}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-has-value .ng-value{padding-left:.25rem;font-size:.875rem}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-value-container{overflow:initial!important}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-input{top:auto!important;padding-left:.875rem!important;font-size:.875rem}"]}),o})();var y=h(7376),T=h(3353),g=h(1281),ot=h(2687),v=h(7579),J=h(727),ne=h(4986),oe=h(2805),ae=h(6406),ft=h(8306),R=h(6451),P=h(2722),W=h(8675),re=h(4004),st=h(5698),le=h(8505),de=h(3900),at=h(445);function rt(o,n,e){for(let i in n)if(n.hasOwnProperty(i)){const s=n[i];s?o.setProperty(i,s,e?.has(i)?"important":""):o.removeProperty(i)}return o}function L(o,n){const e=n?"":"none";rt(o.style,{"touch-action":n?"":"none","-webkit-user-drag":n?"":"none","-webkit-tap-highlight-color":n?"":"transparent","user-select":e,"-ms-user-select":e,"-webkit-user-select":e,"-moz-user-select":e})}function vt(o,n,e){rt(o.style,{position:n?"":"fixed",top:n?"":"0",opacity:n?"":"0",left:n?"":"-999em"},e)}function j(o,n){return n&&"none"!=n?o+" "+n:o}function Ct(o){const n=o.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(o)*n}function lt(o,n){return o.getPropertyValue(n).split(",").map(i=>i.trim())}function dt(o){const n=o.getBoundingClientRect();return{top:n.top,right:n.right,bottom:n.bottom,left:n.left,width:n.width,height:n.height,x:n.x,y:n.y}}function ct(o,n,e){const{top:i,bottom:s,left:a,right:r}=o;return e>=i&&e<=s&&n>=a&&n<=r}function H(o,n,e){o.top+=n,o.bottom=o.top+o.height,o.left+=e,o.right=o.left+o.width}function bt(o,n,e,i){const{top:s,right:a,bottom:r,left:l,width:d,height:c}=o,p=d*n,_=c*n;return i>s-_&&i<r+_&&e>l-p&&e<a+p}class yt{constructor(n){this._document=n,this.positions=new Map}clear(){this.positions.clear()}cache(n){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),n.forEach(e=>{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:dt(e)})})}handleScroll(n){const e=(0,T.sA)(n),i=this.positions.get(e);if(!i)return null;const s=i.scrollPosition;let a,r;if(e===this._document){const c=this.getViewportScrollPosition();a=c.top,r=c.left}else a=e.scrollTop,r=e.scrollLeft;const l=s.top-a,d=s.left-r;return this.positions.forEach((c,p)=>{c.clientRect&&e!==p&&e.contains(p)&&H(c.clientRect,l,d)}),s.top=a,s.left=r,{top:l,left:d}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}}function Tt(o){const n=o.cloneNode(!0),e=n.querySelectorAll("[id]"),i=o.nodeName.toLowerCase();n.removeAttribute("id");for(let s=0;s<e.length;s++)e[s].removeAttribute("id");return"canvas"===i?Mt(o,n):("input"===i||"select"===i||"textarea"===i)&&Dt(o,n),St("canvas",o,n,Mt),St("input, textarea, select",o,n,Dt),n}function St(o,n,e,i){const s=n.querySelectorAll(o);if(s.length){const a=e.querySelectorAll(o);for(let r=0;r<s.length;r++)i(s[r],a[r])}}let he=0;function Dt(o,n){"file"!==n.type&&(n.value=o.value),"radio"===n.type&&n.name&&(n.name=`mat-clone-${n.name}-${he++}`)}function Mt(o,n){const e=n.getContext("2d");if(e)try{e.drawImage(o,0,0)}catch{}}const It=(0,T.i$)({passive:!0}),X=(0,T.i$)({passive:!1}),ht=new Set(["position"]);class ue{constructor(n,e,i,s,a,r){this._config=e,this._document=i,this._ngZone=s,this._viewportRuler=a,this._dragDropRegistry=r,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._hasStartedDragging=!1,this._moveEvents=new v.x,this._pointerMoveSubscription=J.w0.EMPTY,this._pointerUpSubscription=J.w0.EMPTY,this._scrollSubscription=J.w0.EMPTY,this._resizeSubscription=J.w0.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new v.x,this.started=new v.x,this.released=new v.x,this.ended=new v.x,this.entered=new v.x,this.exited=new v.x,this.dropped=new v.x,this.moved=this._moveEvents,this._pointerDown=l=>{if(this.beforeStarted.next(),this._handles.length){const d=this._getTargetHandle(l);d&&!this._disabledHandles.has(d)&&!this.disabled&&this._initializeDragSequence(d,l)}else this.disabled||this._initializeDragSequence(this._rootElement,l)},this._pointerMove=l=>{const d=this._getPointerPositionOnPage(l);if(!this._hasStartedDragging){if(Math.abs(d.x-this._pickupPositionOnPage.x)+Math.abs(d.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){const k=Date.now()>=this._dragStartTime+this._getDragStartDelay(l),O=this._dropContainer;if(!k)return void this._endDragSequence(l);(!O||!O.isDragging()&&!O.isReceiving())&&(l.preventDefault(),this._hasStartedDragging=!0,this._ngZone.run(()=>this._startDragSequence(l)))}return}l.preventDefault();const c=this._getConstrainedPointerPosition(d);if(this._hasMoved=!0,this._lastKnownPointerPosition=d,this._updatePointerDirectionDelta(c),this._dropContainer)this._updateActiveDropContainer(c,d);else{const p=this.constrainPosition?this._initialClientRect:this._pickupPositionOnPage,_=this._activeTransform;_.x=c.x-p.x+this._passiveTransform.x,_.y=c.y-p.y+this._passiveTransform.y,this._applyRootElementTransform(_.x,_.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:c,event:l,distance:this._getDragDistance(c),delta:this._pointerDirectionDelta})})},this._pointerUp=l=>{this._endDragSequence(l)},this._nativeDragStart=l=>{if(this._handles.length){const d=this._getTargetHandle(l);d&&!this._disabledHandles.has(d)&&!this.disabled&&l.preventDefault()}else this.disabled||l.preventDefault()},this.withRootElement(n).withParent(e.parentDragRef||null),this._parentPositions=new yt(i),r.registerDragItem(this)}get disabled(){return this._disabled||!(!this._dropContainer||!this._dropContainer.disabled)}set disabled(n){const e=(0,g.Ig)(n);e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(i=>L(i,e)))}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(n){this._handles=n.map(i=>(0,g.fI)(i)),this._handles.forEach(i=>L(i,this.disabled)),this._toggleNativeDragInteractions();const e=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&e.add(i)}),this._disabledHandles=e,this}withPreviewTemplate(n){return this._previewTemplate=n,this}withPlaceholderTemplate(n){return this._placeholderTemplate=n,this}withRootElement(n){const e=(0,g.fI)(n);return e!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{e.addEventListener("mousedown",this._pointerDown,X),e.addEventListener("touchstart",this._pointerDown,It),e.addEventListener("dragstart",this._nativeDragStart,X)}),this._initialTransform=void 0,this._rootElement=e),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(n){return this._boundaryElement=n?(0,g.fI)(n):null,this._resizeSubscription.unsubscribe(),n&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(n){return this._parentDragRef=n,this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(n){!this._disabledHandles.has(n)&&this._handles.indexOf(n)>-1&&(this._disabledHandles.add(n),L(n,!0))}enableHandle(n){this._disabledHandles.has(n)&&(this._disabledHandles.delete(n),L(n,this.disabled))}withDirection(n){return this._direction=n,this}_withDropContainer(n){this._dropContainer=n}getFreeDragPosition(){const n=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:n.x,y:n.y}}setFreeDragPosition(n){return this._activeTransform={x:0,y:0},this._passiveTransform.x=n.x,this._passiveTransform.y=n.y,this._dropContainer||this._applyRootElementTransform(n.x,n.y),this}withPreviewContainer(n){return this._previewContainer=n,this}_sortFromLastPointerPosition(){const n=this._lastKnownPointerPosition;n&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(n),n)}_removeSubscriptions(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}_destroyPreview(){this._preview?.remove(),this._previewRef?.destroy(),this._preview=this._previewRef=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(n){if(this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging))if(this.released.next({source:this,event:n}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(n),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;const e=this._getPointerPositionOnPage(n);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:n})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(n){Q(n)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const e=this._dropContainer;if(e){const i=this._rootElement,s=i.parentNode,a=this._placeholder=this._createPlaceholderElement(),r=this._anchor=this._anchor||this._document.createComment(""),l=this._getShadowRoot();s.insertBefore(r,i),this._initialTransform=i.style.transform||"",this._preview=this._createPreviewElement(),vt(i,!1,ht),this._document.body.appendChild(s.replaceChild(a,i)),this._getPreviewInsertionPoint(s,l).appendChild(this._preview),this.started.next({source:this,event:n}),e.start(),this._initialContainer=e,this._initialIndex=e.getItemIndex(this)}else this.started.next({source:this,event:n}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(e?e.getScrollableParents():[])}_initializeDragSequence(n,e){this._parentDragRef&&e.stopPropagation();const i=this.isDragging(),s=Q(e),a=!s&&0!==e.button,r=this._rootElement,l=(0,T.sA)(e),d=!s&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now(),c=s?(0,ot.yG)(e):(0,ot.X6)(e);if(l&&l.draggable&&"mousedown"===e.type&&e.preventDefault(),i||a||d||c)return;if(this._handles.length){const b=r.style;this._rootElementTapHighlight=b.webkitTapHighlightColor||"",b.webkitTapHighlightColor="transparent"}this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._initialClientRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(b=>this._updateOnScroll(b)),this._boundaryElement&&(this._boundaryRect=dt(this._boundaryElement));const p=this._previewTemplate;this._pickupPositionInElement=p&&p.template&&!p.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialClientRect,n,e);const _=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:_.x,y:_.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(n){vt(this._rootElement,!0,ht),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialClientRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{const e=this._dropContainer,i=e.getItemIndex(this),s=this._getPointerPositionOnPage(n),a=this._getDragDistance(s),r=e._isOverContainer(s.x,s.y);this.ended.next({source:this,distance:a,dropPoint:s,event:n}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:r,distance:a,dropPoint:s,event:n}),e.drop(this,i,this._initialIndex,this._initialContainer,r,a,s),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:n,y:e},{x:i,y:s}){let a=this._initialContainer._getSiblingContainerFromPosition(this,n,e);!a&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(n,e)&&(a=this._initialContainer),a&&a!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=a,this._dropContainer.enter(this,n,e,a===this._initialContainer&&a.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:a,currentIndex:a.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,s),this._dropContainer._sortItem(this,n,e,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(n,e):this._applyPreviewTransform(n-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y))}_createPreviewElement(){const n=this._previewTemplate,e=this.previewClass,i=n?n.template:null;let s;if(i&&n){const a=n.matchSize?this._initialClientRect:null,r=n.viewContainer.createEmbeddedView(i,n.context);r.detectChanges(),s=wt(r,this._document),this._previewRef=r,n.matchSize?Pt(s,a):s.style.transform=$(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else s=Tt(this._rootElement),Pt(s,this._initialClientRect),this._initialTransform&&(s.style.transform=this._initialTransform);return rt(s.style,{"pointer-events":"none",margin:"0",position:"fixed",top:"0",left:"0","z-index":`${this._config.zIndex||1e3}`},ht),L(s,!1),s.classList.add("cdk-drag-preview"),s.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(a=>s.classList.add(a)):s.classList.add(e)),s}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const n=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._applyPreviewTransform(n.left,n.top);const e=function ce(o){const n=getComputedStyle(o),e=lt(n,"transition-property"),i=e.find(l=>"transform"===l||"all"===l);if(!i)return 0;const s=e.indexOf(i),a=lt(n,"transition-duration"),r=lt(n,"transition-delay");return Ct(a[s])+Ct(r[s])}(this._preview);return 0===e?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{const s=r=>{(!r||(0,T.sA)(r)===this._preview&&"transform"===r.propertyName)&&(this._preview?.removeEventListener("transitionend",s),i(),clearTimeout(a))},a=setTimeout(s,1.5*e);this._preview.addEventListener("transitionend",s)}))}_createPlaceholderElement(){const n=this._placeholderTemplate,e=n?n.template:null;let i;return e?(this._placeholderRef=n.viewContainer.createEmbeddedView(e,n.context),this._placeholderRef.detectChanges(),i=wt(this._placeholderRef,this._document)):i=Tt(this._rootElement),i.style.pointerEvents="none",i.classList.add("cdk-drag-placeholder"),i}_getPointerPositionInElement(n,e,i){const s=e===this._rootElement?null:e,a=s?s.getBoundingClientRect():n,r=Q(i)?i.targetTouches[0]:i,l=this._getViewportScrollPosition();return{x:a.left-n.left+(r.pageX-a.left-l.left),y:a.top-n.top+(r.pageY-a.top-l.top)}}_getPointerPositionOnPage(n){const e=this._getViewportScrollPosition(),i=Q(n)?n.touches[0]||n.changedTouches[0]||{pageX:0,pageY:0}:n,s=i.pageX-e.left,a=i.pageY-e.top;if(this._ownerSVGElement){const r=this._ownerSVGElement.getScreenCTM();if(r){const l=this._ownerSVGElement.createSVGPoint();return l.x=s,l.y=a,l.matrixTransform(r.inverse())}}return{x:s,y:a}}_getConstrainedPointerPosition(n){const e=this._dropContainer?this._dropContainer.lockAxis:null;let{x:i,y:s}=this.constrainPosition?this.constrainPosition(n,this,this._initialClientRect):n;if("x"===this.lockAxis||"x"===e?s=this._pickupPositionOnPage.y:("y"===this.lockAxis||"y"===e)&&(i=this._pickupPositionOnPage.x),this._boundaryRect){const{x:a,y:r}=this._pickupPositionInElement,l=this._boundaryRect,{width:d,height:c}=this._getPreviewRect(),p=l.top+r,_=l.bottom-(c-r);i=xt(i,l.left+a,l.right-(d-a)),s=xt(s,p,_)}return{x:i,y:s}}_updatePointerDirectionDelta(n){const{x:e,y:i}=n,s=this._pointerDirectionDelta,a=this._pointerPositionAtLastDirectionChange,r=Math.abs(e-a.x),l=Math.abs(i-a.y);return r>this._config.pointerDirectionChangeThreshold&&(s.x=e>a.x?1:-1,a.x=e),l>this._config.pointerDirectionChangeThreshold&&(s.y=i>a.y?1:-1,a.y=i),s}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const n=this._handles.length>0||!this.isDragging();n!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=n,L(this._rootElement,n))}_removeRootElementListeners(n){n.removeEventListener("mousedown",this._pointerDown,X),n.removeEventListener("touchstart",this._pointerDown,It),n.removeEventListener("dragstart",this._nativeDragStart,X)}_applyRootElementTransform(n,e){const i=$(n,e),s=this._rootElement.style;null==this._initialTransform&&(this._initialTransform=s.transform&&"none"!=s.transform?s.transform:""),s.transform=j(i,this._initialTransform)}_applyPreviewTransform(n,e){const i=this._previewTemplate?.template?void 0:this._initialTransform,s=$(n,e);this._preview.style.transform=j(s,i)}_getDragDistance(n){const e=this._pickupPositionOnPage;return e?{x:n.x-e.x,y:n.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:n,y:e}=this._passiveTransform;if(0===n&&0===e||this.isDragging()||!this._boundaryElement)return;const i=this._rootElement.getBoundingClientRect(),s=this._boundaryElement.getBoundingClientRect();if(0===s.width&&0===s.height||0===i.width&&0===i.height)return;const a=s.left-i.left,r=i.right-s.right,l=s.top-i.top,d=i.bottom-s.bottom;s.width>i.width?(a>0&&(n+=a),r>0&&(n-=r)):n=0,s.height>i.height?(l>0&&(e+=l),d>0&&(e-=d)):e=0,(n!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:n})}_getDragStartDelay(n){const e=this.dragStartDelay;return"number"==typeof e?e:Q(n)?e.touch:e?e.mouse:0}_updateOnScroll(n){const e=this._parentPositions.handleScroll(n);if(e){const i=(0,T.sA)(n);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&H(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return void 0===this._cachedShadowRoot&&(this._cachedShadowRoot=(0,T.kV)(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(n,e){const i=this._previewContainer||"global";if("parent"===i)return n;if("global"===i){const s=this._document;return e||s.fullscreenElement||s.webkitFullscreenElement||s.mozFullScreenElement||s.msFullscreenElement||s.body}return(0,g.fI)(i)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialClientRect),this._previewRect}_getTargetHandle(n){return this._handles.find(e=>n.target&&(n.target===e||e.contains(n.target)))}}function $(o,n){return`translate3d(${Math.round(o)}px, ${Math.round(n)}px, 0)`}function xt(o,n,e){return Math.max(n,Math.min(e,o))}function Q(o){return"t"===o.type[0]}function wt(o,n){const e=o.rootNodes;if(1===e.length&&e[0].nodeType===n.ELEMENT_NODE)return e[0];const i=n.createElement("div");return e.forEach(s=>i.appendChild(s)),i}function Pt(o,n){o.style.width=`${n.width}px`,o.style.height=`${n.height}px`,o.style.transform=$(n.left,n.top)}function Zt(o,n,e){const i=Y(n,o.length-1),s=Y(e,o.length-1);if(i===s)return;const a=o[i],r=s<i?-1:1;for(let l=i;l!==s;l+=r)o[l]=o[l+r];o[s]=a}function Y(o,n){return Math.max(0,Math.min(n,o))}class ge{constructor(n,e){this._element=n,this._dragDropRegistry=e,this._itemPositions=[],this.orientation="vertical",this._previousSwap={drag:null,delta:0,overlaps:!1}}start(n){this.withItems(n)}sort(n,e,i,s){const a=this._itemPositions,r=this._getItemIndexFromPointerPosition(n,e,i,s);if(-1===r&&a.length>0)return null;const l="horizontal"===this.orientation,d=a.findIndex(S=>S.drag===n),c=a[r],_=c.clientRect,b=d>r?1:-1,k=this._getItemOffsetPx(a[d].clientRect,_,b),O=this._getSiblingOffsetPx(d,a,b),N=a.slice();return Zt(a,d,r),a.forEach((S,en)=>{if(N[en]===S)return;const te=S.drag===n,_t=te?k:O,ee=te?n.getPlaceholderElement():S.drag.getRootElement();S.offset+=_t,l?(ee.style.transform=j(`translate3d(${Math.round(S.offset)}px, 0, 0)`,S.initialTransform),H(S.clientRect,0,_t)):(ee.style.transform=j(`translate3d(0, ${Math.round(S.offset)}px, 0)`,S.initialTransform),H(S.clientRect,_t,0))}),this._previousSwap.overlaps=ct(_,e,i),this._previousSwap.drag=c.drag,this._previousSwap.delta=l?s.x:s.y,{previousIndex:d,currentIndex:r}}enter(n,e,i,s){const a=null==s||s<0?this._getItemIndexFromPointerPosition(n,e,i):s,r=this._activeDraggables,l=r.indexOf(n),d=n.getPlaceholderElement();let c=r[a];if(c===n&&(c=r[a+1]),!c&&(null==a||-1===a||a<r.length-1)&&this._shouldEnterAsFirstChild(e,i)&&(c=r[0]),l>-1&&r.splice(l,1),c&&!this._dragDropRegistry.isDragging(c)){const p=c.getRootElement();p.parentElement.insertBefore(d,p),r.splice(a,0,n)}else(0,g.fI)(this._element).appendChild(d),r.push(n);d.style.transform="",this._cacheItemPositions()}withItems(n){this._activeDraggables=n.slice(),this._cacheItemPositions()}withSortPredicate(n){this._sortPredicate=n}reset(){this._activeDraggables.forEach(n=>{const e=n.getRootElement();if(e){const i=this._itemPositions.find(s=>s.drag===n)?.initialTransform;e.style.transform=i||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(n){return("horizontal"===this.orientation&&"rtl"===this.direction?this._itemPositions.slice().reverse():this._itemPositions).findIndex(i=>i.drag===n)}updateOnScroll(n,e){this._itemPositions.forEach(({clientRect:i})=>{H(i,n,e)}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}_cacheItemPositions(){const n="horizontal"===this.orientation;this._itemPositions=this._activeDraggables.map(e=>{const i=e.getVisibleElement();return{drag:e,offset:0,initialTransform:i.style.transform||"",clientRect:dt(i)}}).sort((e,i)=>n?e.clientRect.left-i.clientRect.left:e.clientRect.top-i.clientRect.top)}_getItemOffsetPx(n,e,i){const s="horizontal"===this.orientation;let a=s?e.left-n.left:e.top-n.top;return-1===i&&(a+=s?e.width-n.width:e.height-n.height),a}_getSiblingOffsetPx(n,e,i){const s="horizontal"===this.orientation,a=e[n].clientRect,r=e[n+-1*i];let l=a[s?"width":"height"]*i;if(r){const d=s?"left":"top",c=s?"right":"bottom";-1===i?l-=r.clientRect[d]-a[c]:l+=a[d]-r.clientRect[c]}return l}_shouldEnterAsFirstChild(n,e){if(!this._activeDraggables.length)return!1;const i=this._itemPositions,s="horizontal"===this.orientation;if(i[0].drag!==this._activeDraggables[0]){const r=i[i.length-1].clientRect;return s?n>=r.right:e>=r.bottom}{const r=i[0].clientRect;return s?n<=r.left:e<=r.top}}_getItemIndexFromPointerPosition(n,e,i,s){const a="horizontal"===this.orientation,r=this._itemPositions.findIndex(({drag:l,clientRect:d})=>{if(l===n)return!1;if(s){const c=a?s.x:s.y;if(l===this._previousSwap.drag&&this._previousSwap.overlaps&&c===this._previousSwap.delta)return!1}return a?e>=Math.floor(d.left)&&e<Math.floor(d.right):i>=Math.floor(d.top)&&i<Math.floor(d.bottom)});return-1!==r&&this._sortPredicate(r,n)?r:-1}}class me{constructor(n,e,i,s,a){this._dragDropRegistry=e,this._ngZone=s,this._viewportRuler=a,this.disabled=!1,this.sortingDisabled=!1,this.autoScrollDisabled=!1,this.autoScrollStep=2,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.beforeStarted=new v.x,this.entered=new v.x,this.exited=new v.x,this.dropped=new v.x,this.sorted=new v.x,this._isDragging=!1,this._draggables=[],this._siblings=[],this._activeSiblings=new Set,this._viewportScrollSubscription=J.w0.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new v.x,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),function se(o=0,n=ne.z){return o<0&&(o=0),(0,oe.H)(o,o,n)}(0,ae.Z).pipe((0,P.R)(this._stopScrollTimers)).subscribe(()=>{const r=this._scrollNode,l=this.autoScrollStep;1===this._verticalScrollDirection?r.scrollBy(0,-l):2===this._verticalScrollDirection&&r.scrollBy(0,l),1===this._horizontalScrollDirection?r.scrollBy(-l,0):2===this._horizontalScrollDirection&&r.scrollBy(l,0)})},this.element=(0,g.fI)(n),this._document=i,this.withScrollableParents([this.element]),e.registerDropContainer(this),this._parentPositions=new yt(i),this._sortStrategy=new ge(this.element,e),this._sortStrategy.withSortPredicate((r,l)=>this.sortPredicate(r,l,this))}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(n,e,i,s){this._draggingStarted(),null==s&&this.sortingDisabled&&(s=this._draggables.indexOf(n)),this._sortStrategy.enter(n,e,i,s),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:n,container:this,currentIndex:this.getItemIndex(n)})}exit(n){this._reset(),this.exited.next({item:n,container:this})}drop(n,e,i,s,a,r,l,d={}){this._reset(),this.dropped.next({item:n,currentIndex:e,previousIndex:i,container:this,previousContainer:s,isPointerOverContainer:a,distance:r,dropPoint:l,event:d})}withItems(n){const e=this._draggables;return this._draggables=n,n.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(e.filter(s=>s.isDragging()).every(s=>-1===n.indexOf(s))?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(n){return this._sortStrategy.direction=n,this}connectedTo(n){return this._siblings=n.slice(),this}withOrientation(n){return this._sortStrategy.orientation=n,this}withScrollableParents(n){const e=(0,g.fI)(this.element);return this._scrollableElements=-1===n.indexOf(e)?[e,...n]:n.slice(),this}getScrollableParents(){return this._scrollableElements}getItemIndex(n){return this._isDragging?this._sortStrategy.getItemIndex(n):this._draggables.indexOf(n)}isReceiving(){return this._activeSiblings.size>0}_sortItem(n,e,i,s){if(this.sortingDisabled||!this._clientRect||!bt(this._clientRect,.05,e,i))return;const a=this._sortStrategy.sort(n,e,i,s);a&&this.sorted.next({previousIndex:a.previousIndex,currentIndex:a.currentIndex,container:this,item:n})}_startScrollingIfNecessary(n,e){if(this.autoScrollDisabled)return;let i,s=0,a=0;if(this._parentPositions.positions.forEach((r,l)=>{l===this._document||!r.clientRect||i||bt(r.clientRect,.05,n,e)&&([s,a]=function _e(o,n,e,i){const s=Ot(n,i),a=Et(n,e);let r=0,l=0;if(s){const d=o.scrollTop;1===s?d>0&&(r=1):o.scrollHeight-d>o.clientHeight&&(r=2)}if(a){const d=o.scrollLeft;1===a?d>0&&(l=1):o.scrollWidth-d>o.clientWidth&&(l=2)}return[r,l]}(l,r.clientRect,n,e),(s||a)&&(i=l))}),!s&&!a){const{width:r,height:l}=this._viewportRuler.getViewportSize(),d={width:r,height:l,top:0,right:r,bottom:l,left:0};s=Ot(d,e),a=Et(d,n),i=window}i&&(s!==this._verticalScrollDirection||a!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=s,this._horizontalScrollDirection=a,this._scrollNode=i,(s||a)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){const n=(0,g.fI)(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=n.msScrollSnapType||n.scrollSnapType||"",n.scrollSnapType=n.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){const n=(0,g.fI)(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(n).clientRect}_reset(){this._isDragging=!1;const n=(0,g.fI)(this.element).style;n.scrollSnapType=n.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(e=>e._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_isOverContainer(n,e){return null!=this._clientRect&&ct(this._clientRect,n,e)}_getSiblingContainerFromPosition(n,e,i){return this._siblings.find(s=>s._canReceive(n,e,i))}_canReceive(n,e,i){if(!this._clientRect||!ct(this._clientRect,e,i)||!this.enterPredicate(n,this))return!1;const s=this._getShadowRoot().elementFromPoint(e,i);if(!s)return!1;const a=(0,g.fI)(this.element);return s===a||a.contains(s)}_startReceiving(n,e){const i=this._activeSiblings;!i.has(n)&&e.every(s=>this.enterPredicate(s,this)||this._draggables.indexOf(s)>-1)&&(i.add(n),this._cacheParentPositions(),this._listenToScrollEvents())}_stopReceiving(n){this._activeSiblings.delete(n),this._viewportScrollSubscription.unsubscribe()}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(n=>{if(this.isDragging()){const e=this._parentPositions.handleScroll(n);e&&this._sortStrategy.updateOnScroll(e.top,e.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const n=(0,T.kV)((0,g.fI)(this.element));this._cachedShadowRoot=n||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){const n=this._sortStrategy.getActiveItemsSnapshot().filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,n))}}function Ot(o,n){const{top:e,bottom:i,height:s}=o,a=.05*s;return n>=e-a&&n<=e+a?1:n>=i-a&&n<=i+a?2:0}function Et(o,n){const{left:e,right:i,width:s}=o,a=.05*s;return n>=e-a&&n<=e+a?1:n>=i-a&&n<=i+a?2:0}const tt=(0,T.i$)({passive:!1,capture:!0});let fe=(()=>{class o{constructor(e,i){this._ngZone=e,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=[],this._globalListeners=new Map,this._draggingPredicate=s=>s.isDragging(),this.pointerMove=new v.x,this.pointerUp=new v.x,this.scroll=new v.x,this._preventDefaultWhileDragging=s=>{this._activeDragInstances.length>0&&s.preventDefault()},this._persistentTouchmoveListener=s=>{this._activeDragInstances.length>0&&(this._activeDragInstances.some(this._draggingPredicate)&&s.preventDefault(),this.pointerMove.next(s))},this._document=i}registerDropContainer(e){this._dropInstances.has(e)||this._dropInstances.add(e)}registerDragItem(e){this._dragInstances.add(e),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,tt)})}removeDropContainer(e){this._dropInstances.delete(e)}removeDragItem(e){this._dragInstances.delete(e),this.stopDragging(e),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,tt)}startDragging(e,i){if(!(this._activeDragInstances.indexOf(e)>-1)&&(this._activeDragInstances.push(e),1===this._activeDragInstances.length)){const s=i.type.startsWith("touch");this._globalListeners.set(s?"touchend":"mouseup",{handler:a=>this.pointerUp.next(a),options:!0}).set("scroll",{handler:a=>this.scroll.next(a),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:tt}),s||this._globalListeners.set("mousemove",{handler:a=>this.pointerMove.next(a),options:tt}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((a,r)=>{this._document.addEventListener(r,a.handler,a.options)})})}}stopDragging(e){const i=this._activeDragInstances.indexOf(e);i>-1&&(this._activeDragInstances.splice(i,1),0===this._activeDragInstances.length&&this._clearGlobalListeners())}isDragging(e){return this._activeDragInstances.indexOf(e)>-1}scrolled(e){const i=[this.scroll];return e&&e!==this._document&&i.push(new ft.y(s=>this._ngZone.runOutsideAngular(()=>{const r=l=>{this._activeDragInstances.length&&s.next(l)};return e.addEventListener("scroll",r,!0),()=>{e.removeEventListener("scroll",r,!0)}}))),(0,R.T)(...i)}ngOnDestroy(){this._dragInstances.forEach(e=>this.removeDragItem(e)),this._dropInstances.forEach(e=>this.removeDropContainer(e)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((e,i)=>{this._document.removeEventListener(i,e.handler,e.options)}),this._globalListeners.clear()}}return o.\u0275fac=function(e){return new(e||o)(t.LFG(t.R0b),t.LFG(m.K0))},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();const ve={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let pt=(()=>{class o{constructor(e,i,s,a){this._document=e,this._ngZone=i,this._viewportRuler=s,this._dragDropRegistry=a}createDrag(e,i=ve){return new ue(e,i,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(e){return new me(e,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}}return o.\u0275fac=function(e){return new(e||o)(t.LFG(m.K0),t.LFG(t.R0b),t.LFG(y.rL),t.LFG(fe))},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();const Rt=new t.OlP("CDK_DRAG_PARENT"),Lt=new t.OlP("CdkDropListGroup"),Ut=new t.OlP("CDK_DRAG_CONFIG");let Ce=0;const qt=new t.OlP("CdkDropList");let be=(()=>{class o{constructor(e,i,s,a,r,l,d){this.element=e,this._changeDetectorRef=s,this._scrollDispatcher=a,this._dir=r,this._group=l,this._destroyed=new v.x,this.connectedTo=[],this.id="cdk-drop-list-"+Ce++,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.dropped=new t.vpe,this.entered=new t.vpe,this.exited=new t.vpe,this.sorted=new t.vpe,this._unsortedItems=new Set,this._dropListRef=i.createDropList(e),this._dropListRef.data=this,d&&this._assignDefaults(d),this._dropListRef.enterPredicate=(c,p)=>this.enterPredicate(c.data,p.data),this._dropListRef.sortPredicate=(c,p,_)=>this.sortPredicate(c,p.data,_.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),o._dropLists.push(this),l&&l._items.add(this)}get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(e){this._dropListRef.disabled=this._disabled=(0,g.Ig)(e)}addItem(e){this._unsortedItems.add(e),this._dropListRef.isDragging()&&this._syncItemsWithRef()}removeItem(e){this._unsortedItems.delete(e),this._dropListRef.isDragging()&&this._syncItemsWithRef()}getSortedItems(){return Array.from(this._unsortedItems).sort((e,i)=>e._dragRef.getVisibleElement().compareDocumentPosition(i._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){const e=o._dropLists.indexOf(this);e>-1&&o._dropLists.splice(e,1),this._group&&this._group._items.delete(this),this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(e){this._dir&&this._dir.change.pipe((0,W.O)(this._dir.value),(0,P.R)(this._destroyed)).subscribe(i=>e.withDirection(i)),e.beforeStarted.subscribe(()=>{const i=(0,g.Eq)(this.connectedTo).map(s=>"string"==typeof s?o._dropLists.find(r=>r.id===s):s);if(this._group&&this._group._items.forEach(s=>{-1===i.indexOf(s)&&i.push(s)}),!this._scrollableParentsResolved){const s=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(a=>a.getElementRef().nativeElement);this._dropListRef.withScrollableParents(s),this._scrollableParentsResolved=!0}e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.sortingDisabled=(0,g.Ig)(this.sortingDisabled),e.autoScrollDisabled=(0,g.Ig)(this.autoScrollDisabled),e.autoScrollStep=(0,g.su)(this.autoScrollStep,2),e.connectedTo(i.filter(s=>s&&s!==this).map(s=>s._dropListRef)).withOrientation(this.orientation)})}_handleEvents(e){e.beforeStarted.subscribe(()=>{this._syncItemsWithRef(),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(i=>{this.entered.emit({container:this,item:i.item.data,currentIndex:i.currentIndex})}),e.exited.subscribe(i=>{this.exited.emit({container:this,item:i.item.data}),this._changeDetectorRef.markForCheck()}),e.sorted.subscribe(i=>{this.sorted.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:i.item.data})}),e.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,item:i.item.data,isPointerOverContainer:i.isPointerOverContainer,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()})}_assignDefaults(e){const{lockAxis:i,draggingDisabled:s,sortingDisabled:a,listAutoScrollDisabled:r,listOrientation:l}=e;this.disabled=s??!1,this.sortingDisabled=a??!1,this.autoScrollDisabled=r??!1,this.orientation=l||"vertical",i&&(this.lockAxis=i)}_syncItemsWithRef(){this._dropListRef.withItems(this.getSortedItems().map(e=>e._dragRef))}}return o._dropLists=[],o.\u0275fac=function(e){return new(e||o)(t.Y36(t.SBq),t.Y36(pt),t.Y36(t.sBO),t.Y36(y.mF),t.Y36(at.Is,8),t.Y36(Lt,12),t.Y36(Ut,8))},o.\u0275dir=t.lG2({type:o,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(e,i){2&e&&(t.uIk("id",i.id),t.ekj("cdk-drop-list-disabled",i.disabled)("cdk-drop-list-dragging",i._dropListRef.isDragging())("cdk-drop-list-receiving",i._dropListRef.isReceiving()))},inputs:{connectedTo:["cdkDropListConnectedTo","connectedTo"],data:["cdkDropListData","data"],orientation:["cdkDropListOrientation","orientation"],id:"id",lockAxis:["cdkDropListLockAxis","lockAxis"],disabled:["cdkDropListDisabled","disabled"],sortingDisabled:["cdkDropListSortingDisabled","sortingDisabled"],enterPredicate:["cdkDropListEnterPredicate","enterPredicate"],sortPredicate:["cdkDropListSortPredicate","sortPredicate"],autoScrollDisabled:["cdkDropListAutoScrollDisabled","autoScrollDisabled"],autoScrollStep:["cdkDropListAutoScrollStep","autoScrollStep"]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[t._Bn([{provide:Lt,useValue:void 0},{provide:qt,useExisting:o}])]}),o})();const Ft=new t.OlP("CdkDragHandle"),ye=new t.OlP("CdkDragPlaceholder"),Te=new t.OlP("CdkDragPreview");let De=(()=>{class o{constructor(e,i,s,a,r,l,d,c,p,_,b){this.element=e,this.dropContainer=i,this._ngZone=a,this._viewContainerRef=r,this._dir=d,this._changeDetectorRef=p,this._selfHandle=_,this._parentDrag=b,this._destroyed=new v.x,this.started=new t.vpe,this.released=new t.vpe,this.ended=new t.vpe,this.entered=new t.vpe,this.exited=new t.vpe,this.dropped=new t.vpe,this.moved=new ft.y(k=>{const O=this._dragRef.moved.pipe((0,re.U)(N=>({source:this,pointerPosition:N.pointerPosition,event:N.event,delta:N.delta,distance:N.distance}))).subscribe(k);return()=>{O.unsubscribe()}}),this._dragRef=c.createDrag(e,{dragStartThreshold:l&&null!=l.dragStartThreshold?l.dragStartThreshold:5,pointerDirectionChangeThreshold:l&&null!=l.pointerDirectionChangeThreshold?l.pointerDirectionChangeThreshold:5,zIndex:l?.zIndex}),this._dragRef.data=this,o._dragInstances.push(this),l&&this._assignDefaults(l),i&&(this._dragRef._withDropContainer(i._dropListRef),i.addItem(this)),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}get disabled(){return this._disabled||this.dropContainer&&this.dropContainer.disabled}set disabled(e){this._disabled=(0,g.Ig)(e),this._dragRef.disabled=this._disabled}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(e){this._dragRef.setFreeDragPosition(e)}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe((0,st.q)(1),(0,P.R)(this._destroyed)).subscribe(()=>{this._updateRootElement(),this._setupHandlesListener(),this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)})})}ngOnChanges(e){const i=e.rootElementSelector,s=e.freeDragPosition;i&&!i.firstChange&&this._updateRootElement(),s&&!s.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this);const e=o._dragInstances.indexOf(this);e>-1&&o._dragInstances.splice(e,1),this._ngZone.runOutsideAngular(()=>{this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_updateRootElement(){const e=this.element.nativeElement;let i=e;this.rootElementSelector&&(i=void 0!==e.closest?e.closest(this.rootElementSelector):e.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(i||e)}_getBoundaryElement(){const e=this.boundaryElement;return e?"string"==typeof e?this.element.nativeElement.closest(e):(0,g.fI)(e):null}_syncInputs(e){e.beforeStarted.subscribe(()=>{if(!e.isDragging()){const i=this._dir,s=this.dragStartDelay,a=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,r=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.dragStartDelay="object"==typeof s&&s?s:(0,g.su)(s),e.constrainPosition=this.constrainPosition,e.previewClass=this.previewClass,e.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(a).withPreviewTemplate(r).withPreviewContainer(this.previewContainer||"global"),i&&e.withDirection(i.value)}}),e.beforeStarted.pipe((0,st.q)(1)).subscribe(()=>{if(this._parentDrag)return void e.withParent(this._parentDrag._dragRef);let i=this.element.nativeElement.parentElement;for(;i;){if(i.classList.contains("cdk-drag")){e.withParent(o._dragInstances.find(s=>s.element.nativeElement===i)?._dragRef||null);break}i=i.parentElement}})}_handleEvents(e){e.started.subscribe(i=>{this.started.emit({source:this,event:i.event}),this._changeDetectorRef.markForCheck()}),e.released.subscribe(i=>{this.released.emit({source:this,event:i.event})}),e.ended.subscribe(i=>{this.ended.emit({source:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(i=>{this.entered.emit({container:i.container.data,item:this,currentIndex:i.currentIndex})}),e.exited.subscribe(i=>{this.exited.emit({container:i.container.data,item:this})}),e.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,isPointerOverContainer:i.isPointerOverContainer,item:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event})})}_assignDefaults(e){const{lockAxis:i,dragStartDelay:s,constrainPosition:a,previewClass:r,boundaryElement:l,draggingDisabled:d,rootElementSelector:c,previewContainer:p}=e;this.disabled=d??!1,this.dragStartDelay=s||0,i&&(this.lockAxis=i),a&&(this.constrainPosition=a),r&&(this.previewClass=r),l&&(this.boundaryElement=l),c&&(this.rootElementSelector=c),p&&(this.previewContainer=p)}_setupHandlesListener(){this._handles.changes.pipe((0,W.O)(this._handles),(0,le.b)(e=>{const i=e.filter(s=>s._parentDrag===this).map(s=>s.element);this._selfHandle&&this.rootElementSelector&&i.push(this.element),this._dragRef.withHandles(i)}),(0,de.w)(e=>(0,R.T)(...e.map(i=>i._stateChanges.pipe((0,W.O)(i))))),(0,P.R)(this._destroyed)).subscribe(e=>{const i=this._dragRef,s=e.element.nativeElement;e.disabled?i.disableHandle(s):i.enableHandle(s)})}}return o._dragInstances=[],o.\u0275fac=function(e){return new(e||o)(t.Y36(t.SBq),t.Y36(qt,12),t.Y36(m.K0),t.Y36(t.R0b),t.Y36(t.s_b),t.Y36(Ut,8),t.Y36(at.Is,8),t.Y36(pt),t.Y36(t.sBO),t.Y36(Ft,10),t.Y36(Rt,12))},o.\u0275dir=t.lG2({type:o,selectors:[["","cdkDrag",""]],contentQueries:function(e,i,s){if(1&e&&(t.Suo(s,Te,5),t.Suo(s,ye,5),t.Suo(s,Ft,5)),2&e){let a;t.iGM(a=t.CRH())&&(i._previewTemplate=a.first),t.iGM(a=t.CRH())&&(i._placeholderTemplate=a.first),t.iGM(a=t.CRH())&&(i._handles=a)}},hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(e,i){2&e&&t.ekj("cdk-drag-disabled",i.disabled)("cdk-drag-dragging",i._dragRef.isDragging())},inputs:{data:["cdkDragData","data"],lockAxis:["cdkDragLockAxis","lockAxis"],rootElementSelector:["cdkDragRootElement","rootElementSelector"],boundaryElement:["cdkDragBoundary","boundaryElement"],dragStartDelay:["cdkDragStartDelay","dragStartDelay"],freeDragPosition:["cdkDragFreeDragPosition","freeDragPosition"],disabled:["cdkDragDisabled","disabled"],constrainPosition:["cdkDragConstrainPosition","constrainPosition"],previewClass:["cdkDragPreviewClass","previewClass"],previewContainer:["cdkDragPreviewContainer","previewContainer"]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[t._Bn([{provide:Rt,useExisting:o}]),t.TTD]}),o})(),Me=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({providers:[pt],imports:[y.ZD]}),o})();var D=h(3154),U=h(7185),Nt=h(8002),V=h(1318);let Ie=(()=>{class o{constructor(e){this.httpService=e}getChannel(){return this.httpService.post("/api/Channel/GetChannel",{})}testShopID(e){return this.httpService.post("/api/Channel/TestShopID",e)}updateChannelIndex(e){return this.httpService.post("/api/Channel/UpdateChannelIndex",e)}deleteChannel(e){return this.httpService.post("/api/Channel/DeleteChannel",e)}}return o.\u0275fac=function(e){return new(e||o)(t.LFG(V.O))},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();var et=h(266);function xe(o,n){1&o&&(t.TgZ(0,"a",12),t._uU(1,"Add"),t.qZA())}function we(o,n){if(1&o){const e=t.EpF();t.ynx(0),t.TgZ(1,"button",13),t.NdJ("click",function(){t.CHM(e);const s=t.oxw();return t.KtG(s.onSaveDragAndDrop())}),t._UZ(2,"i",14),t._uU(3,"Save Changes "),t.qZA(),t.BQk()}}function Pe(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"button",13),t.NdJ("click",function(){t.CHM(e);const s=t.oxw();return t.KtG(s.cdkDragDisabled=!s.cdkDragDisabled)}),t._UZ(1,"i",14),t._uU(2,"Sort "),t.qZA()}}function Ze(o,n){if(1&o&&(t.TgZ(0,"div"),t._uU(1," Expiration: "),t.TgZ(2,"span",32),t._uU(3),t.ALo(4,"date"),t.qZA()()),2&o){const e=t.oxw().$implicit;t.xp6(3),t.Oqu(t.xi3(4,1,null==e?null:e.ExpiredTime,"dd MMM yyyy"))}}function Ae(o,n){if(1&o&&(t.TgZ(0,"span",34)(1,"button",35),t._uU(2),t.qZA()()),2&o){const e=t.oxw(2).$implicit,i=t.oxw();t.Q6J("matTooltip",i.filterProductInventory(e.POSInventoryOutletArray,4,e.POSInventoryOutletArray.length)),t.xp6(2),t.hij(" ",e.POSInventoryOutletArray.length-3," ")}}function ke(o,n){if(1&o&&(t.TgZ(0,"span",23),t._uU(1),t.YNc(2,Ae,3,2,"span",33),t.qZA()),2&o){const e=t.oxw().$implicit,i=t.oxw();t.xp6(1),t.hij(" ",i.filterProductInventory(e.POSInventoryOutletArray,1,3)," "),t.xp6(1),t.Q6J("ngIf",e.POSInventoryOutletArray.length>3)}}function Oe(o,n){1&o&&(t.TgZ(0,"span",23),t._uU(1," [SUM All Outlet] "),t.qZA())}function Ee(o,n){if(1&o&&(t.TgZ(0,"div",22),t._uU(1,"Additional Item: "),t.TgZ(2,"span",23),t._uU(3),t.qZA()()),2&o){const e=t.oxw().$implicit;t.xp6(3),t.hij(" ",null==e?null:e.Additionalitem,"")}}const Z=function(o){return{"bg-gradient-warning":o}},Jt=function(){return["/menu/channel/marketplace/view"]},Ht=function(o){return{ID:o}};function Re(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"tr",15)(1,"td",16)(2,"a",17),t._UZ(3,"img",18),t.qZA()(),t.TgZ(4,"td",19)(5,"a",17)(6,"span",20),t._uU(7),t.qZA()(),t._UZ(8,"br"),t._uU(9),t._UZ(10,"br"),t.qZA(),t.TgZ(11,"td",21)(12,"div",22),t._uU(13,"Sync Orders: "),t.TgZ(14,"span",23),t._uU(15),t.qZA()(),t.TgZ(16,"div",22),t._uU(17," Product Sync: "),t.TgZ(18,"span",23),t._uU(19),t.ALo(20,"date"),t.qZA()(),t.YNc(21,Ze,5,4,"div",24),t.qZA(),t.TgZ(22,"td",21)(23,"div",25),t._uU(24,"New Order To: "),t.TgZ(25,"span",23),t._uU(26),t.qZA()(),t.TgZ(27,"div",25),t._uU(28," Dispatch Orders From: "),t.TgZ(29,"span",23),t._uU(30),t.qZA()(),t.TgZ(31,"div",26),t._uU(32,"Product Inventory: "),t.YNc(33,ke,3,2,"span",27),t.YNc(34,Oe,2,0,"ng-template",null,28,t.W1O),t.qZA(),t.TgZ(36,"div",22),t._uU(37,"Minimum Inventory: "),t.TgZ(38,"span",23),t._uU(39),t.qZA()(),t.YNc(40,Ee,4,1,"div",29),t.qZA(),t.TgZ(41,"td",21)(42,"div",30)(43,"div",25),t._uU(44,"Payment: "),t.TgZ(45,"span",23),t._uU(46),t.qZA()(),t.TgZ(47,"div",25),t._uU(48,"Tag: "),t.TgZ(49,"span",23),t._uU(50),t.qZA()(),t.TgZ(51,"div",25),t._uU(52,"Tax : "),t.TgZ(53,"span",23),t._uU(54),t.qZA()()()(),t.TgZ(55,"td")(56,"button",31),t.NdJ("click",function(){const a=t.CHM(e).$implicit,r=t.oxw();return t.KtG(r.onTestChannel(a))}),t._uU(57,"Test"),t.qZA()()()}if(2&o){const e=n.$implicit,i=t.MAs(35),s=t.oxw();t.Q6J("cdkDragDisabled",s.cdkDragDisabled)("matTooltip",null!=e&&e.isComplete?"":"Please complete your channel configuration"),t.xp6(1),t.Q6J("ngClass",t.VKq(32,Z,s.isEmpty(null==e?null:e.isComplete))),t.xp6(1),t.Q6J("routerLink",t.DdM(34,Jt))("queryParams",t.VKq(35,Ht,e.ID)),t.xp6(1),t.Q6J("src",s.getChannelLogo(null==e?null:e.TypeID),t.LSH),t.xp6(1),t.Q6J("ngClass",t.VKq(37,Z,s.isEmpty(null==e?null:e.isComplete))),t.xp6(1),t.Q6J("routerLink",t.DdM(39,Jt))("queryParams",t.VKq(40,Ht,e.ID)),t.xp6(2),t.Oqu(null==e?null:e.Name),t.xp6(2),t.hij(" ",null==e?null:e.URL," "),t.xp6(6),t.hij(" ",null==e?null:e.SyncOrder,""),t.xp6(4),t.Oqu(t.xi3(20,29,null==e?null:e.LastSync,"dd MMM yyyy HH:mm")),t.xp6(2),t.Q6J("ngIf",(0==e.TypeID||5==e.TypeID||6==e.TypeID)&&(null==e?null:e.ExpiredTime)),t.xp6(2),t.Q6J("ngClass",t.VKq(42,Z,s.isEmpty(null==e?null:e.POSOutlet))),t.xp6(3),t.hij(" ",null==e?null:e.POSOutlet,""),t.xp6(1),t.Q6J("ngClass",t.VKq(44,Z,s.isEmpty(null==e?null:e.POSDeliveryOutlet))),t.xp6(3),t.hij(" ",null==e?null:e.POSDeliveryOutlet,""),t.xp6(3),t.Q6J("ngIf",null==e?null:e.POSInventoryOutlet)("ngIfElse",i),t.xp6(6),t.hij(" ",null==e?null:e.MinimumInventory,""),t.xp6(1),t.Q6J("ngIf",null==e?null:e.Additionalitem),t.xp6(3),t.Q6J("ngClass",t.VKq(46,Z,s.isEmpty(null==e?null:e.POSInvoicePaymentMethod))),t.xp6(3),t.Oqu(null==e?null:e.POSInvoicePaymentMethod),t.xp6(1),t.Q6J("ngClass",t.VKq(48,Z,s.isEmpty(null==e?null:e.POSSalesOrderType))),t.xp6(3),t.hij(" ",null==e?null:e.POSSalesOrderType,""),t.xp6(1),t.Q6J("ngClass",t.VKq(50,Z,s.isEmpty(null==e?null:e.POSTax))),t.xp6(3),t.Oqu(null!=e&&e.POSTax?null==e?null:e.POSTax:"-"),t.xp6(2),t.Q6J("hidden",4==(null==e?null:e.TypeID))}}let Le=(()=>{class o{constructor(e,i,s){this.toastr=e,this.konversi=i,this.channelService=s,this.setup=!1,this.channel(),this.pageData={Title:"Channel",Nav:[{Title:"Channel",Url:"/menu/channel",Active:!0},{Title:"POS",Url:"/menu/channel/config",Active:!1}]},this.cdkDragDisabled=!0}ngOnInit(){this.konversi.GetRoles().filter(i=>"Setup"==i||"Stp"==i).length>0&&(this.setup=!0)}channel(){this.channelService.getChannel().subscribe(e=>{this.channels=e.Data,this.checkFieldComplete()})}checkFieldComplete(){this.channels=this.channels.map(e=>(e.isComplete=!1,D.g.IsNotEmpty(e.POSOutlet)&&D.g.IsNotEmpty(e.POSTax)&&D.g.IsNotEmpty(e.POSInvoicePaymentMethod)&&D.g.IsNotEmpty(e.POSSalesOrderType)&&D.g.IsNotEmpty(e.POSDeliveryOutlet)&&(e.isComplete=!0),e))}isEmpty(e){return D.g.IsEmpty(e)}onTestChannel(e){this.channelService.testShopID(e).subscribe(i=>{this.channel(),this.showTostrSuccessTestShopID(i)})}showTostrSuccessTestShopID(e){let i="";for(var s in e)i+=s+" : "+e[s]+"<br/>";this.toastr.success(i,"Success",{enableHtml:!0,closeButton:!0,positionClass:"toast-bottom-right"})}onDeleteChannel(e){confirm("Want to delete?")&&this.channelService.deleteChannel(e).subscribe(s=>{this.channel()})}onDrop(e){Zt(this.channels,e.previousIndex,e.currentIndex)}onSaveDragAndDrop(){this.cdkDragDisabled=!0,this.channelService.updateChannelIndex(this.channels).subscribe({next:()=>{this.toastr.success("Channel list successfully saved","Success")}})}filterProductInventory(e,i,s){let a=e;return a=a.filter((l,d)=>(d+=1)>=i&&d<=s),a.join(", ")}getChannelLogo(e){return D.g.getChannelLogoByTypeId(e)}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(U._W),t.Y36(Nt.e),t.Y36(Ie))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-marketplace"]],decls:26,vars:8,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","class","btn btn-success btn-fill btn-lg text-white","routerLink","/menu/channel/marketplace/add",4,"ngIf"],[4,"ngIf","ngIfElse"],["SORT_BTN",""],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],["cdkDropList","",3,"cdkDropListDropped"],["cdkDrag","",3,"cdkDragDisabled","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(e,i){if(1&e&&(t.TgZ(0,"mainpanel",0)(1,"actions"),t.YNc(2,xe,2,0,"a",1),t.YNc(3,we,4,0,"ng-container",2),t.YNc(4,Pe,3,0,"ng-template",null,3,t.W1O),t.qZA(),t.TgZ(6,"content")(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"table",8)(12,"thead")(13,"tr",9),t._UZ(14,"th"),t.TgZ(15,"th"),t._uU(16,"Channel"),t.qZA(),t.TgZ(17,"th"),t._uU(18,"Sync Info"),t.qZA(),t.TgZ(19,"th"),t._uU(20,"POS Outlet"),t.qZA(),t.TgZ(21,"th"),t._uU(22,"POS Orders"),t.qZA(),t._UZ(23,"th"),t.qZA()(),t.TgZ(24,"tbody",10),t.NdJ("cdkDropListDropped",function(a){return i.onDrop(a)}),t.YNc(25,Re,58,52,"tr",11),t.qZA()()()()()()()()),2&e){const s=t.MAs(5);t.Q6J("headerTitle","Marketplace")("pageData",i.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("ngIf",i.setup),t.xp6(1),t.Q6J("ngIf",!i.cdkDragDisabled)("ngIfElse",s),t.xp6(22),t.Q6J("ngForOf",i.channels)}},dependencies:[m.mk,m.sg,m.O5,f.p,C.yS,be,De,et.gM,m.uU],styles:[".btn-circle.btn-sm[_ngcontent-%COMP%]{width:18px;height:18px;padding:0;border-radius:60px;font-size:10px;text-align:center;background-color:#00f;border-color:#00f;color:#fff}table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] > td.vertical-align-top[_ngcontent-%COMP%]{vertical-align:inherit}"]}),o})();var q=h(8063);class Ue{constructor(){this.ID="00000000-0000-0000-0000-000000000000",this.ShopID=0,this.Name="",this.TypeID=0,this.LastProductSync=new Date,this.POSOutlet="",this.POSTax="",this.POSInvoicePaymentMethod="",this.POSSalesOrderType="",this.URL="",this.POSDeliveryOutlet="",this.ProductCategoryDefault=null,this.SyncOrder=!0,this.CustomerDefaultEmail=null,this.InventoryLog=2,this.IsComplete=!1,this.OrderLog=3,this.SyncInventory=!0,this.POSInventoryOutlet="",this.POSWriteOff="",this.Register="",this.POSInventoryOutletArray=[],this.MinimumInventory="",this.Additionalitem="",this.ConsumerKey="",this.ConsumerSecret="",this.ShopIDString="",this.Index=0}}class ut{constructor(){this.Host="",this.Username="",this.Password="",this.HostNotification="",this.UsernameNotification="",this.PasswordNotification="",this.ChannelInventoryOutlet="",this.OrderPaymentAmountType=0,this.ClientSecretGuid="",this.IncludeParentInventory=!1,this.IncludeChildrenInventory=!1,this.CompositeVisible=!1}}var M=h(9521),I=h(3238),qe=h(5017),gt=h(9549);const Fe=["*"],Qt=new t.OlP("MatChipRemove"),Yt=new t.OlP("MatChipAvatar"),Vt=new t.OlP("MatChipTrailingIcon");class Ne{constructor(n){this._elementRef=n}}const Je=(0,I.sb)((0,I.pj)((0,I.Kr)(Ne),"primary"),-1);let it=(()=>{class o extends Je{constructor(e,i,s,a,r,l,d,c){super(e),this._ngZone=i,this._changeDetectorRef=r,this._hasFocus=!1,this.chipListSelectable=!0,this._chipListMultiple=!1,this._chipListDisabled=!1,this.role="option",this._selected=!1,this._selectable=!0,this._disabled=!1,this._removable=!0,this._onFocus=new v.x,this._onBlur=new v.x,this.selectionChange=new t.vpe,this.destroyed=new t.vpe,this.removed=new t.vpe,this._addHostClassName(),this._chipRippleTarget=l.createElement("div"),this._chipRippleTarget.classList.add("mat-chip-ripple"),this._elementRef.nativeElement.appendChild(this._chipRippleTarget),this._chipRipple=new I.IR(this,i,this._chipRippleTarget,s),this._chipRipple.setupTriggerEvents(e),this.rippleConfig=a||{},this._animationsDisabled="NoopAnimations"===d,this.tabIndex=null!=c&&parseInt(c)||-1}get rippleDisabled(){return this.disabled||this.disableRipple||this._animationsDisabled||!!this.rippleConfig.disabled}get selected(){return this._selected}set selected(e){const i=(0,g.Ig)(e);i!==this._selected&&(this._selected=i,this._dispatchSelectionChange())}get value(){return void 0!==this._value?this._value:this._elementRef.nativeElement.textContent}set value(e){this._value=e}get selectable(){return this._selectable&&this.chipListSelectable}set selectable(e){this._selectable=(0,g.Ig)(e)}get disabled(){return this._chipListDisabled||this._disabled}set disabled(e){this._disabled=(0,g.Ig)(e)}get removable(){return this._removable}set removable(e){this._removable=(0,g.Ig)(e)}get ariaSelected(){return this.selectable&&(this._chipListMultiple||this.selected)?this.selected.toString():null}_addHostClassName(){const e="mat-basic-chip",i=this._elementRef.nativeElement;i.hasAttribute(e)||i.tagName.toLowerCase()===e?i.classList.add(e):i.classList.add("mat-standard-chip")}ngOnDestroy(){this.destroyed.emit({chip:this}),this._chipRipple._removeTriggerEvents()}select(){this._selected||(this._selected=!0,this._dispatchSelectionChange(),this._changeDetectorRef.markForCheck())}deselect(){this._selected&&(this._selected=!1,this._dispatchSelectionChange(),this._changeDetectorRef.markForCheck())}selectViaInteraction(){this._selected||(this._selected=!0,this._dispatchSelectionChange(!0),this._changeDetectorRef.markForCheck())}toggleSelected(e=!1){return this._selected=!this.selected,this._dispatchSelectionChange(e),this._changeDetectorRef.markForCheck(),this.selected}focus(){this._hasFocus||(this._elementRef.nativeElement.focus(),this._onFocus.next({chip:this})),this._hasFocus=!0}remove(){this.removable&&this.removed.emit({chip:this})}_handleClick(e){this.disabled&&e.preventDefault()}_handleKeydown(e){if(!this.disabled)switch(e.keyCode){case M.yY:case M.ZH:this.remove(),e.preventDefault();break;case M.L_:this.selectable&&this.toggleSelected(!0),e.preventDefault()}}_blur(){this._ngZone.onStable.pipe((0,st.q)(1)).subscribe(()=>{this._ngZone.run(()=>{this._hasFocus=!1,this._onBlur.next({chip:this})})})}_dispatchSelectionChange(e=!1){this.selectionChange.emit({source:this,isUserInput:e,selected:this._selected})}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(t.SBq),t.Y36(t.R0b),t.Y36(T.t4),t.Y36(I.Y2,8),t.Y36(t.sBO),t.Y36(m.K0),t.Y36(t.QbO,8),t.$8M("tabindex"))},o.\u0275dir=t.lG2({type:o,selectors:[["mat-basic-chip"],["","mat-basic-chip",""],["mat-chip"],["","mat-chip",""]],contentQueries:function(e,i,s){if(1&e&&(t.Suo(s,Yt,5),t.Suo(s,Vt,5),t.Suo(s,Qt,5)),2&e){let a;t.iGM(a=t.CRH())&&(i.avatar=a.first),t.iGM(a=t.CRH())&&(i.trailingIcon=a.first),t.iGM(a=t.CRH())&&(i.removeIcon=a.first)}},hostAttrs:[1,"mat-chip","mat-focus-indicator"],hostVars:15,hostBindings:function(e,i){1&e&&t.NdJ("click",function(a){return i._handleClick(a)})("keydown",function(a){return i._handleKeydown(a)})("focus",function(){return i.focus()})("blur",function(){return i._blur()}),2&e&&(t.uIk("tabindex",i.disabled?null:i.tabIndex)("role",i.role)("disabled",i.disabled||null)("aria-disabled",i.disabled.toString())("aria-selected",i.ariaSelected),t.ekj("mat-chip-selected",i.selected)("mat-chip-with-avatar",i.avatar)("mat-chip-with-trailing-icon",i.trailingIcon||i.removeIcon)("mat-chip-disabled",i.disabled)("_mat-animation-noopable",i._animationsDisabled))},inputs:{color:"color",disableRipple:"disableRipple",tabIndex:"tabIndex",role:"role",selected:"selected",value:"value",selectable:"selectable",disabled:"disabled",removable:"removable"},outputs:{selectionChange:"selectionChange",destroyed:"destroyed",removed:"removed"},exportAs:["matChip"],features:[t.qOj]}),o})(),Bt=(()=>{class o{constructor(e,i){this._parentChip=e,"BUTTON"===i.nativeElement.nodeName&&i.nativeElement.setAttribute("type","button")}_handleClick(e){const i=this._parentChip;i.removable&&!i.disabled&&i.remove(),e.stopPropagation(),e.preventDefault()}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(it),t.Y36(t.SBq))},o.\u0275dir=t.lG2({type:o,selectors:[["","matChipRemove",""]],hostAttrs:[1,"mat-chip-remove","mat-chip-trailing-icon"],hostBindings:function(e,i){1&e&&t.NdJ("click",function(a){return i._handleClick(a)})},features:[t._Bn([{provide:Qt,useExisting:o}])]}),o})();const zt=new t.OlP("mat-chips-default-options"),Ye=(0,I.FD)(class{constructor(o,n,e,i){this._defaultErrorStateMatcher=o,this._parentForm=n,this._parentFormGroup=e,this.ngControl=i,this.stateChanges=new v.x}});let Ve=0;class Be{constructor(n,e){this.source=n,this.value=e}}let Gt=(()=>{class o extends Ye{constructor(e,i,s,a,r,l,d){super(l,a,r,d),this._elementRef=e,this._changeDetectorRef=i,this._dir=s,this.controlType="mat-chip-list",this._lastDestroyedChipIndex=null,this._destroyed=new v.x,this._uid="mat-chip-list-"+Ve++,this._tabIndex=0,this._userTabIndex=null,this._onTouched=()=>{},this._onChange=()=>{},this._multiple=!1,this._compareWith=(c,p)=>c===p,this._disabled=!1,this.ariaOrientation="horizontal",this._selectable=!0,this.change=new t.vpe,this.valueChange=new t.vpe,this.ngControl&&(this.ngControl.valueAccessor=this)}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get role(){return this._explicitRole?this._explicitRole:this.empty?null:"listbox"}set role(e){this._explicitRole=e}get multiple(){return this._multiple}set multiple(e){this._multiple=(0,g.Ig)(e),this._syncChipsState()}get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this.writeValue(e),this._value=e}get id(){return this._chipInput?this._chipInput.id:this._uid}get required(){return this._required??this.ngControl?.control?.hasValidator(u.kI.required)??!1}set required(e){this._required=(0,g.Ig)(e),this.stateChanges.next()}get placeholder(){return this._chipInput?this._chipInput.placeholder:this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}get focused(){return this._chipInput&&this._chipInput.focused||this._hasFocusedChip()}get empty(){return(!this._chipInput||this._chipInput.empty)&&(!this.chips||0===this.chips.length)}get shouldLabelFloat(){return!this.empty||this.focused}get disabled(){return this.ngControl?!!this.ngControl.disabled:this._disabled}set disabled(e){this._disabled=(0,g.Ig)(e),this._syncChipsState()}get selectable(){return this._selectable}set selectable(e){this._selectable=(0,g.Ig)(e),this.chips&&this.chips.forEach(i=>i.chipListSelectable=this._selectable)}set tabIndex(e){this._userTabIndex=e,this._tabIndex=e}get chipSelectionChanges(){return(0,R.T)(...this.chips.map(e=>e.selectionChange))}get chipFocusChanges(){return(0,R.T)(...this.chips.map(e=>e._onFocus))}get chipBlurChanges(){return(0,R.T)(...this.chips.map(e=>e._onBlur))}get chipRemoveChanges(){return(0,R.T)(...this.chips.map(e=>e.destroyed))}ngAfterContentInit(){this._keyManager=new ot.Em(this.chips).withWrap().withVerticalOrientation().withHomeAndEnd().withHorizontalOrientation(this._dir?this._dir.value:"ltr"),this._dir&&this._dir.change.pipe((0,P.R)(this._destroyed)).subscribe(e=>this._keyManager.withHorizontalOrientation(e)),this._keyManager.tabOut.pipe((0,P.R)(this._destroyed)).subscribe(()=>{this._allowFocusEscape()}),this.chips.changes.pipe((0,W.O)(null),(0,P.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 qe.Ov(this.multiple,void 0,!1),this.stateChanges.next()}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==this._disabled&&(this.disabled=!!this.ngControl.disabled))}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete(),this.stateChanges.complete(),this._dropSubscriptions()}registerInput(e){this._chipInput=e,this._elementRef.nativeElement.setAttribute("data-mat-chip-input",e.id)}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}writeValue(e){this.chips&&this._setSelectionByValue(e,!1)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this.stateChanges.next()}onContainerClick(e){this._originatesFromChip(e)||this.focus()}focus(e){this.disabled||this._chipInput&&this._chipInput.focused||(this.chips.length>0?(this._keyManager.setFirstItemActive(),this.stateChanges.next()):(this._focusInput(e),this.stateChanges.next()))}_focusInput(e){this._chipInput&&this._chipInput.focus(e)}_keydown(e){const i=e.target;i&&i.classList.contains("mat-chip")&&(this._keyManager.onKeydown(e),this.stateChanges.next())}_updateTabIndex(){this._tabIndex=this._userTabIndex||(0===this.chips.length?-1:0)}_updateFocusForDestroyedChips(){if(null!=this._lastDestroyedChipIndex)if(this.chips.length){const e=Math.min(this._lastDestroyedChipIndex,this.chips.length-1);this._keyManager.setActiveItem(e)}else this.focus();this._lastDestroyedChipIndex=null}_isValidIndex(e){return e>=0&&e<this.chips.length}_setSelectionByValue(e,i=!0){if(this._clearSelection(),this.chips.forEach(s=>s.deselect()),Array.isArray(e))e.forEach(s=>this._selectValue(s,i)),this._sortValues();else{const s=this._selectValue(e,i);s&&i&&this._keyManager.setActiveItem(s)}}_selectValue(e,i=!0){const s=this.chips.find(a=>null!=a.value&&this._compareWith(a.value,e));return s&&(i?s.selectViaInteraction():s.select(),this._selectionModel.select(s)),s}_initializeSelection(){Promise.resolve().then(()=>{(this.ngControl||this._value)&&(this._setSelectionByValue(this.ngControl?this.ngControl.value:this._value,!1),this.stateChanges.next())})}_clearSelection(e){this._selectionModel.clear(),this.chips.forEach(i=>{i!==e&&i.deselect()}),this.stateChanges.next()}_sortValues(){this._multiple&&(this._selectionModel.clear(),this.chips.forEach(e=>{e.selected&&this._selectionModel.select(e)}),this.stateChanges.next())}_propagateChanges(e){let i=null;i=Array.isArray(this.selected)?this.selected.map(s=>s.value):this.selected?this.selected.value:e,this._value=i,this.change.emit(new Be(this,i)),this.valueChange.emit(i),this._onChange(i),this._changeDetectorRef.markForCheck()}_blur(){this._hasFocusedChip()||this._keyManager.setActiveItem(-1),this.disabled||(this._chipInput?setTimeout(()=>{this.focused||this._markAsTouched()}):this._markAsTouched())}_markAsTouched(){this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next()}_allowFocusEscape(){-1!==this._tabIndex&&(this._tabIndex=-1,setTimeout(()=>{this._tabIndex=this._userTabIndex||0,this._changeDetectorRef.markForCheck()}))}_resetChips(){this._dropSubscriptions(),this._listenToChipsFocus(),this._listenToChipsSelection(),this._listenToChipsRemoved()}_dropSubscriptions(){this._chipFocusSubscription&&(this._chipFocusSubscription.unsubscribe(),this._chipFocusSubscription=null),this._chipBlurSubscription&&(this._chipBlurSubscription.unsubscribe(),this._chipBlurSubscription=null),this._chipSelectionSubscription&&(this._chipSelectionSubscription.unsubscribe(),this._chipSelectionSubscription=null),this._chipRemoveSubscription&&(this._chipRemoveSubscription.unsubscribe(),this._chipRemoveSubscription=null)}_listenToChipsSelection(){this._chipSelectionSubscription=this.chipSelectionChanges.subscribe(e=>{e.source.selected?this._selectionModel.select(e.source):this._selectionModel.deselect(e.source),this.multiple||this.chips.forEach(i=>{!this._selectionModel.isSelected(i)&&i.selected&&i.deselect()}),e.isUserInput&&this._propagateChanges()})}_listenToChipsFocus(){this._chipFocusSubscription=this.chipFocusChanges.subscribe(e=>{let i=this.chips.toArray().indexOf(e.chip);this._isValidIndex(i)&&this._keyManager.updateActiveItem(i),this.stateChanges.next()}),this._chipBlurSubscription=this.chipBlurChanges.subscribe(()=>{this._blur(),this.stateChanges.next()})}_listenToChipsRemoved(){this._chipRemoveSubscription=this.chipRemoveChanges.subscribe(e=>{const i=e.chip,s=this.chips.toArray().indexOf(e.chip);this._isValidIndex(s)&&i._hasFocus&&(this._lastDestroyedChipIndex=s)})}_originatesFromChip(e){let i=e.target;for(;i&&i!==this._elementRef.nativeElement;){if(i.classList.contains("mat-chip"))return!0;i=i.parentElement}return!1}_hasFocusedChip(){return this.chips&&this.chips.some(e=>e._hasFocus)}_syncChipsState(){this.chips&&this.chips.forEach(e=>{e._chipListDisabled=this._disabled,e._chipListMultiple=this.multiple})}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(t.SBq),t.Y36(t.sBO),t.Y36(at.Is,8),t.Y36(u.F,8),t.Y36(u.sg,8),t.Y36(I.rD),t.Y36(u.a5,10))},o.\u0275cmp=t.Xpm({type:o,selectors:[["mat-chip-list"]],contentQueries:function(e,i,s){if(1&e&&t.Suo(s,it,5),2&e){let a;t.iGM(a=t.CRH())&&(i.chips=a)}},hostAttrs:[1,"mat-chip-list"],hostVars:14,hostBindings:function(e,i){1&e&&t.NdJ("focus",function(){return i.focus()})("blur",function(){return i._blur()})("keydown",function(a){return i._keydown(a)}),2&e&&(t.Ikx("id",i._uid),t.uIk("tabindex",i.disabled?null:i._tabIndex)("aria-required",i.role?i.required:null)("aria-disabled",i.disabled.toString())("aria-invalid",i.errorState)("aria-multiselectable",i.multiple)("role",i.role)("aria-orientation",i.ariaOrientation),t.ekj("mat-chip-list-disabled",i.disabled)("mat-chip-list-invalid",i.errorState)("mat-chip-list-required",i.required))},inputs:{role:"role",userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],errorStateMatcher:"errorStateMatcher",multiple:"multiple",compareWith:"compareWith",value:"value",required:"required",placeholder:"placeholder",disabled:"disabled",ariaOrientation:["aria-orientation","ariaOrientation"],selectable:"selectable",tabIndex:"tabIndex"},outputs:{change:"change",valueChange:"valueChange"},exportAs:["matChipList"],features:[t._Bn([{provide:gt.Eo,useExisting:o}]),t.qOj],ngContentSelectors:Fe,decls:2,vars:0,consts:[[1,"mat-chip-list-wrapper"]],template:function(e,i){1&e&&(t.F$t(),t.TgZ(0,"div",0),t.Hsn(1),t.qZA())},styles:['.mat-chip{position:relative;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);border:none;-webkit-appearance:none;-moz-appearance:none}.mat-standard-chip{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);display:inline-flex;padding:7px 12px;border-radius:16px;align-items:center;cursor:default;min-height:32px;height:1px}.mat-standard-chip._mat-animation-noopable{transition:none !important;animation:none !important}.mat-standard-chip .mat-chip-remove{border:none;-webkit-appearance:none;-moz-appearance:none;padding:0;background:none}.mat-standard-chip .mat-chip-remove.mat-icon,.mat-standard-chip .mat-chip-remove .mat-icon{width:18px;height:18px;font-size:18px}.mat-standard-chip::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;opacity:0;content:"";pointer-events:none;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-standard-chip:hover::after{opacity:.12}.mat-standard-chip:focus{outline:none}.mat-standard-chip:focus::after{opacity:.16}.cdk-high-contrast-active .mat-standard-chip{outline:solid 1px}.cdk-high-contrast-active .mat-standard-chip:focus{outline:dotted 2px}.cdk-high-contrast-active .mat-standard-chip.mat-chip-selected{outline-width:3px}.mat-standard-chip.mat-chip-disabled::after{opacity:0}.mat-standard-chip.mat-chip-disabled .mat-chip-remove,.mat-standard-chip.mat-chip-disabled .mat-chip-trailing-icon{cursor:default}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar,.mat-standard-chip.mat-chip-with-avatar{padding-top:0;padding-bottom:0}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-right:8px;padding-left:0}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-left:8px;padding-right:0}.mat-standard-chip.mat-chip-with-trailing-icon{padding-top:7px;padding-bottom:7px;padding-right:8px;padding-left:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon{padding-left:8px;padding-right:12px}.mat-standard-chip.mat-chip-with-avatar{padding-left:0;padding-right:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-avatar{padding-right:0;padding-left:12px}.mat-standard-chip .mat-chip-avatar{width:24px;height:24px;margin-right:8px;margin-left:4px}[dir=rtl] .mat-standard-chip .mat-chip-avatar{margin-left:8px;margin-right:4px}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{width:18px;height:18px;cursor:pointer}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-standard-chip .mat-chip-remove,[dir=rtl] .mat-standard-chip .mat-chip-trailing-icon{margin-right:8px;margin-left:0}.mat-chip-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit;overflow:hidden;transform:translateZ(0)}.mat-chip-list-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;margin:-4px}.mat-chip-list-wrapper input.mat-input-element,.mat-chip-list-wrapper .mat-standard-chip{margin:4px}.mat-chip-list-stacked .mat-chip-list-wrapper{flex-direction:column;align-items:flex-start}.mat-chip-list-stacked .mat-chip-list-wrapper .mat-standard-chip{width:100%}.mat-chip-avatar{border-radius:50%;justify-content:center;align-items:center;display:flex;overflow:hidden;object-fit:cover}input.mat-chip-input{width:150px;margin:4px;flex:1 0 150px}'],encapsulation:2,changeDetection:0}),o})(),ze=0,Kt=(()=>{class o{constructor(e,i){this._elementRef=e,this._defaultOptions=i,this.focused=!1,this._addOnBlur=!1,this.separatorKeyCodes=this._defaultOptions.separatorKeyCodes,this.chipEnd=new t.vpe,this.placeholder="",this.id="mat-chip-list-input-"+ze++,this._disabled=!1,this.inputElement=this._elementRef.nativeElement}set chipList(e){e&&(this._chipList=e,this._chipList.registerInput(this))}get addOnBlur(){return this._addOnBlur}set addOnBlur(e){this._addOnBlur=(0,g.Ig)(e)}get disabled(){return this._disabled||this._chipList&&this._chipList.disabled}set disabled(e){this._disabled=(0,g.Ig)(e)}get empty(){return!this.inputElement.value}ngOnChanges(){this._chipList.stateChanges.next()}ngOnDestroy(){this.chipEnd.complete()}ngAfterContentInit(){this._focusLastChipOnBackspace=this.empty}_keydown(e){if(e){if(e.keyCode===M.Mf&&!(0,M.Vb)(e,"shiftKey")&&this._chipList._allowFocusEscape(),e.keyCode===M.ZH&&this._focusLastChipOnBackspace)return this._chipList._keyManager.setLastItemActive(),void e.preventDefault();this._focusLastChipOnBackspace=!1}this._emitChipEnd(e)}_keyup(e){!this._focusLastChipOnBackspace&&e.keyCode===M.ZH&&this.empty&&(this._focusLastChipOnBackspace=!0,e.preventDefault())}_blur(){this.addOnBlur&&this._emitChipEnd(),this.focused=!1,this._chipList.focused||this._chipList._blur(),this._chipList.stateChanges.next()}_focus(){this.focused=!0,this._focusLastChipOnBackspace=this.empty,this._chipList.stateChanges.next()}_emitChipEnd(e){!this.inputElement.value&&!!e&&this._chipList._keydown(e),(!e||this._isSeparatorKey(e))&&(this.chipEnd.emit({input:this.inputElement,value:this.inputElement.value,chipInput:this}),e?.preventDefault())}_onInput(){this._chipList.stateChanges.next()}focus(e){this.inputElement.focus(e)}clear(){this.inputElement.value="",this._focusLastChipOnBackspace=!0}_isSeparatorKey(e){return!(0,M.Vb)(e)&&new Set(this.separatorKeyCodes).has(e.keyCode)}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(t.SBq),t.Y36(zt))},o.\u0275dir=t.lG2({type:o,selectors:[["input","matChipInputFor",""]],hostAttrs:[1,"mat-chip-input","mat-input-element"],hostVars:5,hostBindings:function(e,i){1&e&&t.NdJ("keydown",function(a){return i._keydown(a)})("keyup",function(a){return i._keyup(a)})("blur",function(){return i._blur()})("focus",function(){return i._focus()})("input",function(){return i._onInput()}),2&e&&(t.Ikx("id",i.id),t.uIk("disabled",i.disabled||null)("placeholder",i.placeholder||null)("aria-invalid",i._chipList&&i._chipList.ngControl?i._chipList.ngControl.invalid:null)("aria-required",i._chipList&&i._chipList.required||null))},inputs:{chipList:["matChipInputFor","chipList"],addOnBlur:["matChipInputAddOnBlur","addOnBlur"],separatorKeyCodes:["matChipInputSeparatorKeyCodes","separatorKeyCodes"],placeholder:"placeholder",id:"id",disabled:"disabled"},outputs:{chipEnd:"matChipInputTokenEnd"},exportAs:["matChipInput","matChipInputFor"],features:[t.TTD]}),o})(),Ge=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({providers:[I.rD,{provide:zt,useValue:{separatorKeyCodes:[M.K5]}}],imports:[I.BQ]}),o})();var Wt=h(7392);function Ke(o,n){1&o&&(t.TgZ(0,"div",73)(1,"span"),t._uU(2,"Channel name is required!"),t.qZA()())}function We(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"input",77),t.NdJ("ngModelChange",function(s){t.CHM(e);const a=t.oxw(2);return t.KtG(a.model.ShopID=s)}),t.qZA()}if(2&o){const e=t.oxw(2);t.Q6J("ngModel",e.model.ShopID)}}function je(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"input",78),t.NdJ("ngModelChange",function(s){t.CHM(e);const a=t.oxw(2);return t.KtG(a.model.ShopIDString=s)}),t.qZA()}if(2&o){const e=t.oxw(2);t.Q6J("ngModel",e.model.ShopIDString)}}function Xe(o,n){if(1&o&&(t.TgZ(0,"div",13),t.YNc(1,We,1,1,"input",74),t.YNc(2,je,1,1,"input",75),t.TgZ(3,"label",76),t._uU(4,"Shop ID"),t.qZA()()),2&o){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",null==e.model.ShopIDString||""==e.model.ShopIDString),t.xp6(1),t.Q6J("ngIf",e.model.ShopIDString)}}function $e(o,n){1&o&&(t.TgZ(0,"span"),t._uU(1,"Please enter a valid URL!"),t.qZA())}function ti(o,n){if(1&o&&(t.TgZ(0,"div",73),t.YNc(1,$e,2,0,"span",79),t.qZA()),2&o){t.oxw();const e=t.MAs(37);t.xp6(1),t.Q6J("ngIf",e.errors.pattern)}}function ei(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"div",12)(1,"div",13)(2,"input",80,81),t.NdJ("ngModelChange",function(s){t.CHM(e);const a=t.oxw();return t.KtG(a.model.ConsumerKey=s)}),t.qZA(),t.TgZ(4,"label",25),t._uU(5,"Consumer Key"),t.qZA()()()}if(2&o){const e=t.oxw();t.xp6(2),t.Q6J("ngModel",e.model.ConsumerKey)}}function ii(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"div",12)(1,"div",13)(2,"input",82,83),t.NdJ("ngModelChange",function(s){t.CHM(e);const a=t.oxw();return t.KtG(a.model.ConsumerSecret=s)}),t.qZA(),t.TgZ(4,"label",25),t._uU(5,"Consumer Secret"),t.qZA()()()}if(2&o){const e=t.oxw();t.xp6(2),t.Q6J("ngModel",e.model.ConsumerSecret)}}function ni(o,n){1&o&&(t.TgZ(0,"p"),t._uU(1," Email is not valid "),t.qZA())}function oi(o,n){if(1&o&&(t.TgZ(0,"div",84),t.YNc(1,ni,2,0,"p",79),t.qZA()),2&o){t.oxw();const e=t.MAs(104);t.xp6(1),t.Q6J("ngIf",e.errors.pattern)}}function si(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"mat-chip",85),t.NdJ("removed",function(){const a=t.CHM(e).$implicit,r=t.oxw();return t.KtG(r.removeAdditonalItem(a))}),t._uU(1),t.TgZ(2,"button",86)(3,"mat-icon"),t._uU(4,"cancel"),t.qZA()()()}if(2&o){const e=n.$implicit;t.xp6(1),t.hij(" ",e," ")}}function ai(o,n){1&o&&(t.TgZ(0,"div",73)(1,"span"),t._uU(2,"Outlet is required!"),t.qZA()())}function ri(o,n){1&o&&(t.TgZ(0,"div",73)(1,"span"),t._uU(2,"Outlet is required!"),t.qZA()())}function li(o,n){1&o&&(t.TgZ(0,"div",73)(1,"span"),t._uU(2,"Payment Method is required!"),t.qZA()())}function di(o,n){1&o&&(t.TgZ(0,"div",73)(1,"span"),t._uU(2,"Sales Orders is required!"),t.qZA()())}function ci(o,n){1&o&&(t.TgZ(0,"div",73)(1,"span"),t._uU(2,"Tax Type is required!"),t.qZA()())}const A=function(o){return{empty:o}},hi=function(o){return{"is-invalid border border-danger":o}},pi=function(){return{updateOn:"blur"}},B=function(o){return{danger:o}};let ui=(()=>{class o{constructor(e,i,s,a){this.http=i,this.service=s,this.Toastr=a,this.model=new Ue,this.form=new ut,this.loading=!1,this.ListCategory=[],this.ListWriteOff=[],this.advance=!1,this.additionalItems=[],this.advance=!1;let r=e.snapshot.params;null!=r&&(this.model.ID=null!=r.ID?r.ID:"00000000-0000-0000-0000-000000000000"),this.TypeMarket=[{Name:"Shopee",ID:0},{Name:"Tokopedia",ID:1},{Name:"WooCommerce",ID:2},{Name:"KalCare",ID:4},{Name:"ShopeeV2",ID:5},{Name:"Tiktok",ID:6},{Name:"Lazada",ID:7}]}ngOnInit(){this.loaderChannel(this.model.ID)}loaderChannel(e){this.http.post("/api/ChannelLoader/GetPOSProperties",{ID:e}).subscribe(i=>{this.model=i.Model,this.form=i.Form,this.ListSalesType=i.Options.ListSalesOrderType,this.ListOutlet=i.Options.ListOutlet,this.ListTax=i.Options.ListTax,this.ListPaymentMethod=i.Options.ListPaymentMethod,this.Modes=i.Options.Modes,this.ListWriteOff=i.Options.ListWriteOff,this.initAdditionalItems()})}initAdditionalItems(){let e=this.model.Additionalitem;e&&(this.additionalItems=e.split(","))}Submit(){null==this.model.ProductCategoryDefault&&(this.model.ProductCategoryDefault=0),this.model.POSInventoryOutlet=null!=this.model.POSInventoryOutletArray&&this.model.POSInventoryOutletArray.length>0?this.model.POSInventoryOutletArray.join(","):null,this.model.Additionalitem=this.additionalItems.join(","),this.http.post("/api/Channel/SubmitChannel",this.model).subscribe(e=>{this.Toastr.success("Successfully submitted the Channel","Success!"),this.service.navigate(["/menu/channel"])})}SubmitHost(){this.http.post("/api/Channel/SubmitConfig",this.form).subscribe(e=>{this.Toastr.success("Successfully submitted the Channel","Success!"),this.service.navigate(["/menu/channel"])})}Channel(){this.http.post("/api/Channel/GetChannel",{}).subscribe(e=>{this.List=e.Data})}changeOutlet(){this.model.SyncOrder=!D.g.IsEmpty(this.model.POSOutlet)}Cancel(){this.Channel()}LoadCategory(){0!=this.model.TypeID&&1!=this.model.TypeID||this.http.post("/api/Channel/GetChannelCategory",{TypeID:this.model.TypeID}).subscribe(i=>{this.ListCategory=i})}addAdditonalItem(e){const i=(e.value||"").trim();this.additionalItems.includes(i)||this.additionalItems.push(i),e.chipInput.clear()}removeAdditonalItem(e){const i=this.additionalItems.indexOf(e);i>=0&&this.additionalItems.splice(i,1)}isEmpty(e){return D.g.IsEmpty(e)}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(C.gz),t.Y36(V.O),t.Y36(C.F0),t.Y36(U._W))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-marketplace-form"]],decls:183,vars:89,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","py-5","bg-light-gray"],[1,"row"],[1,"col-sm-8"],["name","form"],["f","ngForm"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body","mt-8"],[1,"col-sm-6"],[1,"form-label-group"],["type","text","id","Name","placeholder","Name","name","Name","matTooltip","Channel Name","required","",1,"form-control","tall",3,"ngModel","ngModelChange"],["name","ngModel"],["for","Name"],["class","alert alert-danger",4,"ngIf"],[1,"col-sm-6","me-0"],[1,"form-label-group",3,"ngClass"],["id","Type","bindLabel","Name","bindValue","ID","placeholder","Type","name","Market","matTooltip","Channel type","data-toggle","tooltip",1,"center-text","tall",3,"items","ngModel","ngModelChange","change"],["for","type"],["class","form-label-group",4,"ngIf"],["type","text","id","URL","placeholder","URL","name","URL","data-toggle","tooltip","matTooltip","Fill with your Marketplace URL","pattern","^((https?|ftp|smtp):\\/\\/)?(www.)?[a-z0-9]+(.[a-z]+)(.id)?(\\/[-~$_.+!*'(),a-zA-Z0-9#]+\\/?)+$",1,"form-control",3,"ngModel","ngModelChange"],["url","ngModel"],["for","URL"],["class","col-sm-6",4,"ngIf"],[1,"form-label-group","radio"],["for","SyncOrder"],[1,"mt-3"],["name","SyncOrder",3,"ngModel","ngModelChange"],["data-toggle","tooltip","matTooltip","No Include if the channel makes a transaction",1,"me-5",3,"value"],["data-toggle","tootip","matTooltip","Include if the channel makes a transaction",1,"me-5",3,"value"],["name","SyncInventory",3,"ngModel","ngModelChange"],[1,"col-md-12"],[1,"form-label-group","radio",3,"ngClass"],[2,"top","-11px","background","white"],["name","InventoryLog",3,"ngModel","ngModelChange"],["data-toggle","tooltip","matTooltip","Not record any log from transaction",1,"me-5",3,"value"],["data-toggle","tooltip","matTooltip","Only record error log from transaction",1,"me-5",3,"value"],["data-toggle","tooltip","matTooltip","Record all log from transaction",1,"me-5",3,"value"],[1,"col-md-6"],[1,"card-header","cursor","mb-3"],["type","text","id","Register","placeholder","Register","name","Register","data-toggle","tooltip","matTooltip","Outlet register name",1,"form-control",3,"ngModel","ngModelChange"],["for","Register"],["type","email","name","Email","placeholder","Email","email","","pattern","\\b[\\w\\.-]+@[\\w\\.-]+\\.\\w{2,4}\\b",1,"form-control",3,"ngClass","ngModelOptions","ngModel","ngModelChange"],["Email","ngModel"],["class","text-danger",4,"ngIf"],["type","number","name","MinimumInventory","placeholder","Minimum Inventory","id","MinimumInventory","data-toggle","tooltip","matTooltip","Minimal inventory on channel, if product inventory is bellow minimum inventory will automatically update to 0 ",1,"form-control",3,"ngModel","ngModelChange"],["for","MinimumInventory"],[1,"col-sm-12","mat-chip-custom"],["appearance","outline",1,"w-100"],["aria-label","Additional Item"],["chipList",""],["style","font-size: 12px;",3,"removed",4,"ngFor","ngForOf"],["placeholder","New Item",3,"matChipInputFor","matChipInputTokenEnd"],["type","number","name","Index","placeholder","Additional item","id","Additionalitem",1,"form-control",3,"ngModel","ngModelChange"],["for","Index"],[1,"col-sm-4"],["id","outletOrder","bindLabel","Outlet","bindValue","Outlet","placeholder","New Order To","data-toggle","tooltip","data-placement","top","matTooltip","Choose Outlet where transaction is recorded","name","Outlet","required","",1,"center-text","tall",3,"ngClass","items","ngModel","ngModelChange","change"],["outlet","ngModel"],["for","outletOrder"],["id","inventorySource","bindLabel","Outlet","bindValue","Outlet","placeholder","Dispatch Orders From","data-toggle","tooltip","data-placement","top","matTooltip","Choose outlet to be inventory source for marketplace ","name","Delivery","required","",1,"center-text","tall",3,"ngClass","items","ngModel","ngModelChange"],["delivery","ngModel"],["for","inventorySource"],["id","ProductInventory","multiple","true","bindLabel","Outlet","bindValue","Outlet","placeholder","Product Inventory","data-toggle","tooltip","data-placement","top","matTooltip","Choose Outlet where inventory is recorded","name","POSInventoryOutletArray",1,"center-text","tall","multiple-select",3,"items","ngModel","ngModelChange"],["for","ProductInventory"],["bindLabel","Name","bindValue","Name","placeholder","Payment Method","data-toggle","tootlip","matTooltip","Choose your payment method","name","InvoicePaymentMethod","required","",1,"center-text","tall",3,"items","ngClass","ngModel","ngModelChange"],["method","ngModel"],["bindLabel","Name","bindValue","Name","placeholder","Sales Orders Tag","data-toggle","tooltip","matTooltip","Choose sales order type for marketplace","name","SalesType","required","",1,"center-text","tall",3,"items","ngClass","ngModel","ngModelChange"],["sales","ngModel"],["bindLabel","Name","bindValue","Name","placeholder","Tax","data-toggle","tooltip","matTooltip","Choose tax type for marketplace","name","POSTax","required","",1,"center-text","tall",3,"items","ngClass","ngModel","ngModelChange"],["tax","ngModel"],[1,"alert","alert-danger"],["type","number","id","ShopID","placeholder","Shop ID","class","form-control","name","ShopID","data-toggle","tooltip","matTooltip","Fill with your Shop ID",3,"ngModel","ngModelChange",4,"ngIf"],["type","text","id","ShopIDString","placeholder","Shop ID String","class","form-control","name","ShopIDString","data-toggle","tooltip","matTooltip","Fill with your Shop ID String",3,"ngModel","ngModelChange",4,"ngIf"],["for","ShopID"],["type","number","id","ShopID","placeholder","Shop ID","name","ShopID","data-toggle","tooltip","matTooltip","Fill with your Shop ID",1,"form-control",3,"ngModel","ngModelChange"],["type","text","id","ShopIDString","placeholder","Shop ID String","name","ShopIDString","data-toggle","tooltip","matTooltip","Fill with your Shop ID String",1,"form-control",3,"ngModel","ngModelChange"],[4,"ngIf"],["type","text","id","ConsumerKey","placeholder","Consumer Key","name","ConsumerKey","data-toggle","tooltip","matTooltip","Fill with your Marketplace Consumer Key",1,"form-control",3,"ngModel","ngModelChange"],["ConsumerKey","ngModel"],["type","text","id","ConsumerSecret","placeholder","Consumer Secret","name","ConsumerSecret","data-toggle","tooltip","matTooltip","Fill with your Marketplace Consumer Secret",1,"form-control",3,"ngModel","ngModelChange"],["ConsumerSecret","ngModel"],[1,"text-danger"],[2,"font-size","12px",3,"removed"],["matChipRemove",""]],template:function(e,i){if(1&e&&(t.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),t._uU(3,"Cancel"),t.qZA(),t.TgZ(4,"a",2),t.NdJ("click",function(){return i.Submit()}),t._uU(5,"Submit"),t.qZA()(),t.TgZ(6,"content")(7,"div",3)(8,"div",4)(9,"div",5)(10,"form",6,7)(12,"div",4)(13,"div",8)(14,"div",9)(15,"div",10)(16,"h3"),t._uU(17,"Marketplace Setup"),t.qZA()(),t.TgZ(18,"div",11)(19,"div",4)(20,"div",12)(21,"div",13)(22,"input",14,15),t.NdJ("ngModelChange",function(a){return i.model.Name=a}),t.qZA(),t.TgZ(24,"label",16),t._uU(25,"Name"),t.qZA()(),t.YNc(26,Ke,3,0,"div",17),t.qZA(),t.TgZ(27,"div",18)(28,"div",19)(29,"ng-select",20),t.NdJ("ngModelChange",function(a){return i.model.TypeID=a})("change",function(){return i.LoadCategory()}),t.qZA(),t.TgZ(30,"label",21),t._uU(31,"Type"),t.qZA()()(),t.TgZ(32,"div",12),t.YNc(33,Xe,5,2,"div",22),t.qZA(),t.TgZ(34,"div",12)(35,"div",13)(36,"input",23,24),t.NdJ("ngModelChange",function(a){return i.model.URL=a}),t.qZA(),t.TgZ(38,"label",25),t._uU(39,"Marketplace URL"),t.qZA()(),t.YNc(40,ti,2,1,"div",17),t.qZA(),t.YNc(41,ei,6,1,"div",26),t.YNc(42,ii,6,1,"div",26),t.qZA()()()(),t.TgZ(43,"div",12)(44,"div",9)(45,"div",10)(46,"h3"),t._uU(47,"Sync"),t.qZA()(),t.TgZ(48,"div",11)(49,"div",4)(50,"div",8)(51,"div",27)(52,"label",28),t._uU(53,"Sync Order"),t.qZA(),t.TgZ(54,"div",29)(55,"mat-radio-group",30),t.NdJ("ngModelChange",function(a){return i.model.SyncOrder=a}),t.TgZ(56,"mat-radio-button",31),t._uU(57," No "),t.qZA(),t.TgZ(58,"mat-radio-button",32),t._uU(59," Yes "),t.qZA()()()()(),t.TgZ(60,"div",8)(61,"div",27)(62,"label",28),t._uU(63,"Sync Inventory"),t.qZA(),t.TgZ(64,"div",29)(65,"mat-radio-group",33),t.NdJ("ngModelChange",function(a){return i.model.SyncInventory=a}),t.TgZ(66,"mat-radio-button",31),t._uU(67," No "),t.qZA(),t.TgZ(68,"mat-radio-button",32),t._uU(69," Yes "),t.qZA()()()()()()()()(),t.TgZ(70,"div",12)(71,"div",9)(72,"div",10)(73,"h3"),t._uU(74,"Log"),t.qZA()(),t.TgZ(75,"div",11)(76,"div",4)(77,"div",34)(78,"div",35)(79,"label",36),t._uU(80,"Inventory Log Mode"),t.qZA(),t.TgZ(81,"div",29)(82,"mat-radio-group",37),t.NdJ("ngModelChange",function(a){return i.model.InventoryLog=a}),t.TgZ(83,"mat-radio-button",38),t._uU(84," None "),t.qZA(),t.TgZ(85,"mat-radio-button",39),t._uU(86," Error "),t.qZA(),t.TgZ(87,"mat-radio-button",40),t._uU(88," Full "),t.qZA()()()()()()()()(),t.TgZ(89,"div",41)(90,"div",9)(91,"div",42)(92,"h3"),t._uU(93,"Advance"),t.qZA()(),t.TgZ(94,"div",11)(95,"div",4)(96,"div",34)(97,"div",13)(98,"input",43),t.NdJ("ngModelChange",function(a){return i.model.Register=a}),t.qZA(),t.TgZ(99,"label",44),t._uU(100,"Register"),t.qZA()()(),t.TgZ(101,"div",8)(102,"div",13)(103,"input",45,46),t.NdJ("ngModelChange",function(a){return i.model.CustomerDefaultEmail=a}),t.qZA(),t.TgZ(105,"label",16),t._uU(106,"Customer Default Email"),t.qZA()(),t.YNc(107,oi,2,1,"div",47),t.qZA(),t.TgZ(108,"div",8)(109,"div",13)(110,"input",48),t.NdJ("ngModelChange",function(a){return i.model.MinimumInventory=a}),t.qZA(),t.TgZ(111,"label",49),t._uU(112,"Minimum Inventory"),t.qZA()()(),t.TgZ(113,"div",50)(114,"mat-form-field",51)(115,"mat-label"),t._uU(116,"Additional Item"),t.qZA(),t.TgZ(117,"mat-chip-list",52,53),t.YNc(119,si,5,1,"mat-chip",54),t.TgZ(120,"input",55),t.NdJ("matChipInputTokenEnd",function(a){return i.addAdditonalItem(a)}),t.qZA()()()(),t.TgZ(121,"div",8)(122,"div",13)(123,"input",56),t.NdJ("ngModelChange",function(a){return i.model.Index=a}),t.qZA(),t.TgZ(124,"label",57),t._uU(125,"Index"),t.qZA()()()()()()()()()(),t.TgZ(126,"div",58)(127,"form")(128,"div",4)(129,"div",8)(130,"div",9)(131,"div",10)(132,"h3"),t._uU(133,"POS Outlet Configuration"),t.qZA()(),t.TgZ(134,"div",11)(135,"div",4)(136,"div",34)(137,"div",19)(138,"ng-select",59,60),t.NdJ("ngModelChange",function(a){return i.model.POSOutlet=a})("change",function(){return i.changeOutlet()}),t.qZA(),t.TgZ(140,"label",61),t._uU(141,"New Order To"),t.qZA()(),t.YNc(142,ai,3,0,"div",17),t.qZA(),t.TgZ(143,"div",34)(144,"div",19)(145,"ng-select",62,63),t.NdJ("ngModelChange",function(a){return i.model.POSDeliveryOutlet=a}),t.qZA(),t.TgZ(147,"label",64),t._uU(148,"Dispatch Orders From"),t.qZA()(),t.YNc(149,ri,3,0,"div",17),t.qZA(),t.TgZ(150,"div",34)(151,"div",13)(152,"ng-select",65),t.NdJ("ngModelChange",function(a){return i.model.POSInventoryOutletArray=a}),t.qZA(),t.TgZ(153,"label",66),t._uU(154,"Product Inventory"),t.qZA()()()()()()(),t.TgZ(155,"div",8)(156,"div",9)(157,"div",10)(158,"h3"),t._uU(159,"POS Orders Configuration"),t.qZA()(),t.TgZ(160,"div",11)(161,"div",4)(162,"div",34)(163,"div",19)(164,"ng-select",67,68),t.NdJ("ngModelChange",function(a){return i.model.POSInvoicePaymentMethod=a}),t.qZA(),t.TgZ(166,"label"),t._uU(167,"Payment Method"),t.qZA()(),t.YNc(168,li,3,0,"div",17),t.qZA(),t.TgZ(169,"div",34)(170,"div",19)(171,"ng-select",69,70),t.NdJ("ngModelChange",function(a){return i.model.POSSalesOrderType=a}),t.qZA(),t.TgZ(173,"label"),t._uU(174,"Sales Orders Tag"),t.qZA()(),t.YNc(175,di,3,0,"div",17),t.qZA(),t.TgZ(176,"div",34)(177,"div",19)(178,"ng-select",71,72),t.NdJ("ngModelChange",function(a){return i.model.POSTax=a}),t.qZA(),t.TgZ(180,"label"),t._uU(181,"Tax"),t.qZA()(),t.YNc(182,ci,3,0,"div",17),t.qZA()()()()()()()()()()()()),2&e){const s=t.MAs(23),a=t.MAs(37),r=t.MAs(104),l=t.MAs(118),d=t.MAs(139),c=t.MAs(146),p=t.MAs(165),_=t.MAs(172),b=t.MAs(179);t.Q6J("headerTitle","Configure Channel")("pageData",i.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(22),t.Q6J("ngModel",i.model.Name),t.xp6(4),t.Q6J("ngIf",s.invalid&&(s.dirty||s.touched)),t.xp6(2),t.Q6J("ngClass",t.VKq(62,A,i.isEmpty(i.model.TypeID))),t.xp6(1),t.Q6J("items",i.TypeMarket)("ngModel",i.model.TypeID),t.xp6(4),t.Q6J("ngIf",2!=i.model.TypeID),t.xp6(3),t.Q6J("ngModel",i.model.URL),t.xp6(4),t.Q6J("ngIf",a.invalid&&(a.dirty||a.touched)),t.xp6(1),t.Q6J("ngIf",2==i.model.TypeID),t.xp6(1),t.Q6J("ngIf",2==i.model.TypeID),t.xp6(13),t.Q6J("ngModel",i.model.SyncOrder),t.xp6(1),t.Q6J("value",!1),t.xp6(2),t.Q6J("value",!0),t.xp6(7),t.Q6J("ngModel",i.model.SyncInventory),t.xp6(1),t.Q6J("value",!1),t.xp6(2),t.Q6J("value",!0),t.xp6(10),t.Q6J("ngClass",t.VKq(64,A,i.isEmpty(i.model.InventoryLog))),t.xp6(4),t.Q6J("ngModel",i.model.InventoryLog),t.xp6(1),t.Q6J("value",1),t.xp6(2),t.Q6J("value",2),t.xp6(2),t.Q6J("value",3),t.xp6(11),t.Q6J("ngModel",i.model.Register),t.xp6(5),t.Q6J("ngClass",t.VKq(66,hi,r.invalid))("ngModelOptions",t.DdM(68,pi))("ngModel",i.model.CustomerDefaultEmail),t.xp6(4),t.Q6J("ngIf",r.invalid&&(r.dirty||r.touched)),t.xp6(3),t.Q6J("ngModel",i.model.MinimumInventory),t.xp6(9),t.Q6J("ngForOf",i.additionalItems),t.xp6(1),t.Q6J("matChipInputFor",l)("matChipInputFor",l),t.xp6(3),t.Q6J("ngModel",i.model.Index),t.xp6(14),t.Q6J("ngClass",t.VKq(69,A,i.isEmpty(i.model.POSOutlet))),t.xp6(1),t.Q6J("ngClass",t.VKq(71,B,i.isEmpty(i.model.POSOutlet)))("items",i.ListOutlet)("ngModel",i.model.POSOutlet),t.xp6(4),t.Q6J("ngIf",d.invalid&&(d.dirty||d.touched)),t.xp6(2),t.Q6J("ngClass",t.VKq(73,A,i.isEmpty(i.model.POSDeliveryOutlet))),t.xp6(1),t.Q6J("ngClass",t.VKq(75,B,i.isEmpty(i.model.POSDeliveryOutlet)))("items",i.ListOutlet)("ngModel",i.model.POSDeliveryOutlet),t.xp6(4),t.Q6J("ngIf",c.invalid&&(c.dirty||c.touched)),t.xp6(3),t.Q6J("items",i.ListOutlet)("ngModel",i.model.POSInventoryOutletArray),t.xp6(11),t.Q6J("ngClass",t.VKq(77,A,i.isEmpty(i.model.POSInvoicePaymentMethod))),t.xp6(1),t.Q6J("items",i.ListPaymentMethod)("ngClass",t.VKq(79,B,i.isEmpty(i.model.POSInvoicePaymentMethod)))("ngModel",i.model.POSInvoicePaymentMethod),t.xp6(4),t.Q6J("ngIf",p.invalid&&(p.dirty||p.touched)),t.xp6(2),t.Q6J("ngClass",t.VKq(81,A,i.isEmpty(i.model.POSSalesOrderType))),t.xp6(1),t.Q6J("items",i.ListSalesType)("ngClass",t.VKq(83,B,i.isEmpty(i.model.POSSalesOrderType)))("ngModel",i.model.POSSalesOrderType),t.xp6(4),t.Q6J("ngIf",_.invalid&&(_.dirty||_.touched)),t.xp6(2),t.Q6J("ngClass",t.VKq(85,A,i.isEmpty(i.model.POSTax))),t.xp6(1),t.Q6J("items",i.ListTax)("ngClass",t.VKq(87,B,i.isEmpty(i.model.POSTax)))("ngModel",i.model.POSTax),t.xp6(4),t.Q6J("ngIf",b.invalid&&(b.dirty||b.touched))}},dependencies:[m.mk,m.sg,m.O5,u._Y,u.Fj,u.wV,u.JJ,u.JL,u.Q7,u.c5,u.on,u.On,u.F,f.p,w.VQ,w.U0,K.w9,C.yS,Gt,it,Kt,Bt,gt.KE,gt.hX,Wt.Hw,et.gM],styles:[".mb-1rem[_ngcontent-%COMP%]{margin-bottom:1rem} .mat-form-field-appearance-outline .mat-form-field-outline-thick{color:solid 1.5px #1a73e8!important} ng-select.multiple-select>div.ng-select-container div.ng-value-container div.ng-placeholder{top:-10px!important} ng-select.multiple-select>div.ng-select-container input{padding-top:0!important} ng-select.danger>div.ng-select-container{background:repeating-linear-gradient(-60deg,#FCF3CF,#FCF3CF 15px,#F9E79F 15px,#F9E79F 30px)!important}"]}),o})();function gi(o,n){if(1&o&&(t.TgZ(0,"div",14)(1,"div",15)(2,"label"),t._uU(3,"Shop ID"),t.qZA(),t.TgZ(4,"div",34)(5,"span"),t._uU(6),t.qZA()()()()),2&o){const e=t.oxw(2);t.xp6(6),t.Oqu(0!=e.data.ShopID?e.data.ShopID:e.data.ShopIDString)}}function mi(o,n){1&o&&t._UZ(0,"a",40)}function _i(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"a",41),t.NdJ("click",function(){t.CHM(e);const s=t.oxw(3);return t.KtG(s.Authorize(s.data.TypeID))}),t.qZA()}}function fi(o,n){if(1&o&&(t.TgZ(0,"div",14)(1,"div",15)(2,"label"),t._uU(3,"Expired Date"),t.qZA(),t.TgZ(4,"div",35)(5,"span",36),t._uU(6),t.ALo(7,"date"),t.ALo(8,"date"),t.qZA()(),t.TgZ(9,"div",37),t.YNc(10,mi,1,0,"a",38),t.YNc(11,_i,1,0,"a",39),t.qZA()()()),2&o){const e=t.oxw(2);t.xp6(6),t.hij(" ",e.data.ExpiredTime?t.xi3(7,4,e.data.ExpiredTime,"dd MMM yyyy HH:mm"):t.xi3(8,7,e.data.TokenExpired,"dd MMM yyyy HH:mm")," "),t.xp6(3),t.s9C("matTooltip",5==e.data.TypeID?"Extend Shopee Authorization Duration for an additional 1 year":"Update Token Expired date"),t.xp6(1),t.Q6J("ngIf",0==e.data.TypeID),t.xp6(1),t.Q6J("ngIf",5==e.data.TypeID||6==e.data.TypeID)}}function vi(o,n){if(1&o&&(t.TgZ(0,"div",14)(1,"div",15)(2,"label"),t._uU(3,"Consumer Key"),t.qZA(),t.TgZ(4,"div",42)(5,"span"),t._uU(6),t.qZA()()()()),2&o){const e=t.oxw(2);t.xp6(6),t.Oqu(e.data.ConsumerKey)}}function Ci(o,n){if(1&o&&(t.TgZ(0,"div",14)(1,"div",15)(2,"label"),t._uU(3,"Consumer Secret"),t.qZA(),t.TgZ(4,"div",43)(5,"span"),t._uU(6),t.qZA()()()()),2&o){const e=t.oxw(2);t.xp6(6),t.Oqu(e.data.ConsumerSecret)}}function bi(o,n){if(1&o&&(t.TgZ(0,"div",13)(1,"div",44)(2,"label"),t._uU(3,"Sync Order"),t.qZA(),t.TgZ(4,"div")(5,"span"),t._uU(6),t.qZA()()(),t.TgZ(7,"div",45)(8,"label"),t._uU(9,"Sync Inventory"),t.qZA(),t.TgZ(10,"div")(11,"span"),t._uU(12),t.qZA()()()()),2&o){const e=t.oxw(2);t.xp6(6),t.Oqu(e.data.SyncOrder),t.xp6(6),t.Oqu(e.data.SyncInventory)}}function yi(o,n){1&o&&(t.TgZ(0,"span"),t._uU(1,"None"),t.qZA())}function Ti(o,n){1&o&&(t.TgZ(0,"span"),t._uU(1,"Error"),t.qZA())}function Si(o,n){1&o&&(t.TgZ(0,"span"),t._uU(1,"Full"),t.qZA())}function Di(o,n){if(1&o&&(t.TgZ(0,"div",13)(1,"div",46)(2,"label",47),t._uU(3,"Inventory Log"),t.qZA(),t.TgZ(4,"div"),t.YNc(5,yi,2,0,"span",48),t.YNc(6,Ti,2,0,"span",48),t.YNc(7,Si,2,0,"span",48),t.qZA()()()),2&o){const e=t.oxw(2);t.xp6(5),t.Q6J("ngIf",1==e.data.InventoryLog),t.xp6(1),t.Q6J("ngIf",2==e.data.InventoryLog),t.xp6(1),t.Q6J("ngIf",3==e.data.InventoryLog)}}const z=function(o){return{"input-danger":o}};function Mi(o,n){if(1&o&&(t.TgZ(0,"div",13)(1,"div",49)(2,"label"),t._uU(3,"New Order To"),t.qZA(),t.TgZ(4,"div",50)(5,"span"),t._uU(6),t.qZA()()(),t.TgZ(7,"div",49)(8,"label"),t._uU(9,"Dispatch Orders From"),t.qZA(),t.TgZ(10,"div",51)(11,"span"),t._uU(12),t.qZA()()(),t.TgZ(13,"div",15)(14,"label"),t._uU(15,"Product Inventory"),t.qZA(),t.TgZ(16,"div",52)(17,"span"),t._uU(18),t.qZA()()()()),2&o){const e=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(5,z,e.isEmpty(e.data.POSOutlet))),t.xp6(5),t.Oqu(e.data.POSOutlet),t.xp6(1),t.Q6J("ngClass",t.VKq(7,z,e.isEmpty(e.data.POSDeliveryOutlet))),t.xp6(5),t.Oqu(e.data.POSDeliveryOutlet),t.xp6(6),t.Oqu(e.data.POSInventoryOutlet)}}function Ii(o,n){if(1&o&&(t.TgZ(0,"div",53)(1,"div",54)(2,"label"),t._uU(3,"Payment Method"),t.qZA(),t.TgZ(4,"div",55)(5,"span"),t._uU(6),t.qZA()()(),t.TgZ(7,"div",49)(8,"label"),t._uU(9,"Tag"),t.qZA(),t.TgZ(10,"div",56)(11,"span"),t._uU(12),t.qZA()()(),t.TgZ(13,"div",49)(14,"label"),t._uU(15,"Tax"),t.qZA(),t.TgZ(16,"div",57)(17,"span"),t._uU(18),t.qZA()()()()),2&o){const e=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(6,z,e.isEmpty(e.data.POSInvoicePaymentMethod))),t.xp6(5),t.Oqu(e.data.POSInvoicePaymentMethod),t.xp6(1),t.Q6J("ngClass",t.VKq(8,z,e.isEmpty(e.data.POSSalesOrderType))),t.xp6(5),t.Oqu(e.data.POSSalesOrderType),t.xp6(1),t.Q6J("ngClass",t.VKq(10,z,e.isEmpty(e.data.POSTax))),t.xp6(5),t.Oqu(e.data.POSTax)}}function xi(o,n){if(1&o&&(t.TgZ(0,"div",7)(1,"div",8)(2,"div",9)(3,"div",8)(4,"div",10)(5,"div",11)(6,"div",12)(7,"h3"),t._uU(8,"Marketplace Setup"),t.qZA()(),t.TgZ(9,"div",13)(10,"div",8)(11,"div",14)(12,"div",15)(13,"label"),t._uU(14,"Name"),t.qZA(),t.TgZ(15,"div",16)(16,"span"),t._uU(17),t.qZA()()()(),t.TgZ(18,"div",17)(19,"div",15)(20,"label"),t._uU(21,"Type"),t.qZA(),t.TgZ(22,"div")(23,"span"),t._uU(24),t.qZA()()()(),t.YNc(25,gi,7,1,"div",18),t.YNc(26,fi,12,10,"div",18),t.TgZ(27,"div",14)(28,"div",15)(29,"label"),t._uU(30,"Marketplace URL"),t.qZA(),t.TgZ(31,"div",19)(32,"span"),t._uU(33),t.qZA()()()(),t.TgZ(34,"div",14)(35,"div",15)(36,"label"),t._uU(37,"Product Sync"),t.qZA(),t.TgZ(38,"div",19)(39,"span"),t._uU(40),t.ALo(41,"date"),t.qZA()()()(),t.YNc(42,vi,7,1,"div",18),t.YNc(43,Ci,7,1,"div",18),t.qZA()()()(),t.TgZ(44,"div",14)(45,"div",11)(46,"div",12)(47,"div",20)(48,"h3"),t._uU(49,"Sync"),t.qZA()()(),t.YNc(50,bi,13,2,"div",21),t.qZA()(),t.TgZ(51,"div",14)(52,"div",11)(53,"div",12)(54,"div",20)(55,"h3"),t._uU(56,"Log"),t.qZA()()(),t.YNc(57,Di,8,3,"div",21),t.qZA()(),t.TgZ(58,"div",22)(59,"div",11)(60,"div",23)(61,"h3"),t._uU(62,"Advance"),t.qZA()(),t.TgZ(63,"div",13)(64,"div",24)(65,"label"),t._uU(66,"Register"),t.qZA(),t.TgZ(67,"div")(68,"span"),t._uU(69),t.qZA()()(),t.TgZ(70,"div",15)(71,"label"),t._uU(72,"Customer Default Email"),t.qZA(),t.TgZ(73,"div",25)(74,"span"),t._uU(75),t.qZA()()(),t.TgZ(76,"div",26)(77,"label"),t._uU(78,"Minimum Inventory"),t.qZA(),t.TgZ(79,"div",27)(80,"span"),t._uU(81),t.ALo(82,"number"),t.qZA()()(),t.TgZ(83,"div",15)(84,"label"),t._uU(85,"Additional Item"),t.qZA(),t.TgZ(86,"div",28)(87,"span"),t._uU(88),t.qZA()()(),t.TgZ(89,"div",15)(90,"label"),t._uU(91,"Index"),t.qZA(),t.TgZ(92,"div",29)(93,"span"),t._uU(94),t.qZA()()()()()(),t.TgZ(95,"div",22)(96,"div",11)(97,"div",23)(98,"h3"),t._uU(99,"History"),t.qZA()(),t.TgZ(100,"div",13)(101,"div",30)(102,"label"),t._uU(103,"Created "),t.qZA(),t.TgZ(104,"div")(105,"span"),t._uU(106),t.ALo(107,"date"),t.qZA()()(),t.TgZ(108,"div",31)(109,"label"),t._uU(110,"Modified "),t.qZA(),t.TgZ(111,"div")(112,"span"),t._uU(113),t.ALo(114,"date"),t.qZA()()()()()()()(),t.TgZ(115,"div",32)(116,"div",8)(117,"div",10)(118,"div",11)(119,"div",12)(120,"h3"),t._uU(121,"POS Outlet Configuration"),t.qZA()(),t.YNc(122,Mi,19,9,"div",21),t.qZA()(),t.TgZ(123,"div",10)(124,"div",11)(125,"div",12)(126,"div",20)(127,"h3"),t._uU(128,"POS Orders Configuration"),t.qZA()()(),t.YNc(129,Ii,19,12,"div",33),t.qZA()()()()()()),2&o){const e=t.oxw();t.xp6(17),t.Oqu(e.data.Name),t.xp6(7),t.Oqu(e.data.TypeString),t.xp6(1),t.Q6J("ngIf",2!=e.data.TypeID),t.xp6(1),t.Q6J("ngIf",0==e.data.TypeID||5==e.data.TypeID||6==e.data.TypeID),t.xp6(7),t.Oqu(e.data.URL),t.xp6(7),t.Oqu(e.data.LastSync?t.xi3(41,19,e.data.LastSync,"dd MMM yyyy HH:mm"):"-"),t.xp6(2),t.Q6J("ngIf",2==e.data.TypeID),t.xp6(1),t.Q6J("ngIf",2==e.data.TypeID),t.xp6(7),t.Q6J("ngIf",e.data),t.xp6(7),t.Q6J("ngIf",e.data),t.xp6(12),t.Oqu(null==e.data?null:e.data.Register),t.xp6(6),t.Oqu(null==e.data?null:e.data.CustomerDefaultEmail),t.xp6(6),t.Oqu(t.lcZ(82,22,null==e.data?null:e.data.MinimumInventory)),t.xp6(7),t.Oqu(null==e.data?null:e.data.Additionalitem),t.xp6(6),t.Oqu(null==e.data?null:e.data.Index),t.xp6(12),t.Oqu(t.xi3(107,24,e.data.Created,"dd MMM yyyy HH:mm")),t.xp6(7),t.Oqu(t.xi3(114,27,e.data.Modified,"dd MMM yyyy HH:mm")),t.xp6(9),t.Q6J("ngIf",e.data),t.xp6(7),t.Q6J("ngIf",e.data)}}const wi=function(o){return{ID:o}},Pi=function(o){return["/menu/channel/marketplace/form",o]};let Zi=(()=>{class o{constructor(e,i,s,a,r){this.route=e,this.http=i,this.router=s,this.toastr=a,this.konversi=r,this.Setup=!1,this.advance=!1,this.advance=!1,this.route.queryParams.subscribe(l=>{this.ID=l.ID}),null!=this.ID&&this.Load()}ngOnInit(){this.konversi.GetRoles().filter(i=>"Setup"==i||"Stp"==i).length>0&&(this.Setup=!0)}Load(){this.http.post("/api/ChannelLoader/GetChannelView",{ID:this.ID}).subscribe(i=>{this.data=i.Model,1==this.data.LogMode?this.data.LogModeLabel="None":2==this.data.LogMode?this.data.LogModeLabel="Error":3==this.data.LogMode&&(this.data.LogModeLabel="Full")})}clear(){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.http.post("/api/Channel/ClearCacheChannel",{ID:this.ID}).subscribe(s=>{this.toastr.success("Successfully cleared cache","Success",{closeButton:!0,positionClass:"toast-bottom-right"}),this.Load()})}Authorize(e){let i="";5==e&&(i="ChannelAuthorization/ShopeeV2_URL"),6==e&&(i="ChannelAuthorization/Tiktok_URL"),this.http.post(`/api/${i}`).subscribe(s=>{window.location.href=s.Url})}delete(e){confirm("Delete channel "+e.Name+" ?")&&this.http.post("/api/Channel/DeleteChannel",{ID:e.ID}).subscribe(a=>{this.toastr.success("Channel "+e.Name+" is deleted!","Success",{closeButton:!0,positionClass:"toast-bottom-right"}),this.router.navigate(["menu/channel"])})}isEmpty(e){return D.g.IsEmpty(e)}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(C.gz),t.Y36(V.O),t.Y36(C.F0),t.Y36(U._W),t.Y36(Nt.e))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-marketplace-view"]],decls:11,vars:12,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","group","aria-label","Basic example",1,"btn-group"],["role","button",1,"btn","btn-outline-secondary","btn-lg",3,"hidden","routerLink"],[1,"fas","fa-edit",2,"font-size","20px"],["role","button",1,"btn","btn-danger","btn-lg","text-white",3,"hidden","click"],[1,"fas","fa-trash-alt",2,"font-size","20px"],["class","container-fluid py-5 bg-light-gray",4,"ngIf"],[1,"container-fluid","py-5","bg-light-gray"],[1,"row"],[1,"col-sm-8"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body","mt-8"],[1,"col-sm-6"],[1,"info-label-group"],["data-toggle","title","matTooltip","Your shop name in marketplace channel"],["data-toggle","tooltip","matTooltip","Marketplace / Website where your product is Sold / Distributed",1,"col-sm-6"],["class","col-sm-6",4,"ngIf"],["data-toggle","title","matTooltip","Your Marketplace URL"],[1,"d-flex","justify-content-between"],["class","card-body mt-8",4,"ngIf"],[1,"col-md-6"],[1,"card-header","cursor"],["data-toggle","title","matTooltip","regiter name from outlet",1,"info-label-group"],["data-toggle","title","matTooltip","Default Email for all of customer for orders from channel"],["data-toggle","title","matTooltip","Minimal inventory on channel, if product inventory is bellow minimum inventory will automatically update to 0 ",1,"info-label-group"],["data-toggle","title","title","Minimum Inventory"],["data-toggle","title","matTooltip","Additional item"],["data-toggle","title","matTooltip","Index"],["data-toggle","title","matTooltip","the first date the channel was created ",1,"info-label-group"],["data-toggle","title","matTooltip","last date of data in channel",1,"info-label-group"],[1,"col-sm-4"],["class","card-body",4,"ngIf"],["data-toggle","title","matTooltip","Your shop ID"],["data-toggle","title","matTooltip","Your expired time shop",1,"w-100","d-flex","justify-content-between"],[1,"text-primary"],["matTooltipClass","unset-max-width-tooltip","matTooltipPosition","above",3,"matTooltip"],["class","fas fa-plus-circle fa-lg ml-12","style","cursor:pointer;","href","https://partner.shopeemobile.com/api/v1/shop/auth_partner?id=845458&token=af8476104ba1e0ec3052adc6a2682f59bf0eb5304970727b9848760edc97ae1e&redirect=https%3A%2F%2Fmarketplace.dealpos.app%2Fshopee",4,"ngIf"],["class","fas fa-plus-circle fa-lg ml-12","style","cursor:pointer;",3,"click",4,"ngIf"],["href","https://partner.shopeemobile.com/api/v1/shop/auth_partner?id=845458&token=af8476104ba1e0ec3052adc6a2682f59bf0eb5304970727b9848760edc97ae1e&redirect=https%3A%2F%2Fmarketplace.dealpos.app%2Fshopee",1,"fas","fa-plus-circle","fa-lg","ml-12",2,"cursor","pointer"],[1,"fas","fa-plus-circle","fa-lg","ml-12",2,"cursor","pointer",3,"click"],["data-toggle","title","matTooltip","Consumer Key"],["data-toggle","title","matTooltip","Consumer Secret"],["data-toggle","title","matTooltip","Automatically sync your orders from channel to POS",1,"info-label-group"],["data-toggle","title","matTooltip","Automatically sync your POS inventory to channel inventory",1,"info-label-group"],["data-toggle","title","matTooltip","Your Inventory log status",1,"info-label-group"],[2,"top","-11px","background","white"],[4,"ngIf"],[1,"info-label-group",3,"ngClass"],["data-toggle","title","matTooltip","Outlet to record your order form marketplace"],["data-toggle","title","matTooltip","Outlet that will be inventory source for your channel inventory"],["data-toggle","title","matTooltip","Outlet where the inventory will displayed as inventory in Inventory Comparison Menu"],[1,"card-body"],[1,"info-label-group","mt-5",3,"ngClass"],["data-toggle","title","matTooltip","Your payment method for orders from channel"],["data-toggle","title","matTooltip","Your orders tag in POS for orders from channel"],["data-toggle","title","matTooltip","Tax for orders from channel"]],template:function(e,i){1&e&&(t.TgZ(0,"mainpanel",0)(1,"actions")(2,"div",1)(3,"a",2),t._UZ(4,"i",3),t._uU(5,"Configure"),t.qZA(),t.TgZ(6,"a",4),t.NdJ("click",function(){return i.delete(i.data)}),t._UZ(7,"i",5),t._uU(8," Delete"),t.qZA()()(),t.TgZ(9,"content"),t.YNc(10,xi,130,30,"div",6),t.qZA()()),2&e&&(t.Q6J("headerTitle","Marketplace Configuration View")("pageData",i.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(3),t.Q6J("hidden",!i.Setup)("routerLink",t.VKq(10,Pi,t.VKq(8,wi,null==i.data?null:i.data.ID))),t.xp6(3),t.Q6J("hidden",!i.Setup),t.xp6(4),t.Q6J("ngIf",i.data))},dependencies:[m.mk,m.O5,f.p,C.yS,et.gM,m.JJ,m.uU],styles:[".input-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#FCF3CF,#FCF3CF 15px,#F9E79F 15px,#F9E79F 30px)!important}"]}),o})();var nt=h(6779),F=h(5412),mt=h(6401);function Ai(o,n){1&o&&(t.TgZ(0,"p"),t._uU(1," URL is required "),t.qZA())}function ki(o,n){if(1&o&&(t.TgZ(0,"div",13),t.YNc(1,Ai,2,0,"p",14),t.qZA()),2&o){t.oxw();const e=t.MAs(10);t.xp6(1),t.Q6J("ngIf",e.errors.required)}}function Oi(o,n){1&o&&(t.TgZ(0,"p"),t._uU(1," Email is required "),t.qZA())}function Ei(o,n){1&o&&(t.TgZ(0,"p"),t._uU(1," Email is not valid "),t.qZA())}function Ri(o,n){if(1&o&&(t.TgZ(0,"div",13),t.YNc(1,Oi,2,0,"p",14),t.YNc(2,Ei,2,0,"p",14),t.qZA()),2&o){t.oxw();const e=t.MAs(16);t.xp6(1),t.Q6J("ngIf",e.errors.required),t.xp6(1),t.Q6J("ngIf",e.errors.pattern)}}const Li=function(o){return{invalid:o}},Ui=function(){return{updateOn:"blur"}};let qi=(()=>{class o{constructor(e){this.dialogRef=e}ngOnInit(){this.data={},this.initModalConfig()}initModalConfig(){this.modalConfig=new nt.O,this.modalConfig.title="Fill data for Customer Support"}onSubmit(){this.dialogRef.close(this.data)}onClose(){this.dialogRef.close()}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(F.so))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-contact-support"]],decls:18,vars:11,consts:[[3,"dynamicValidated","config","onClose","onCancel","onOk"],["content",""],[1,"mx-4"],["for","customerURL"],[1,"input-group","mb-5"],[1,"input-group-prepend"],["id","tokopediaUrl",1,"border-start-0","rounded-start","input-group-text","pointer-default","bg-light",2,"height","58px",3,"ngClass"],["required","","type","text","id","customerURL","name","customerURL","data-toggle","tooltip","title","customerURL",1,"form-control","border-start-0","customerUrl",3,"ngModel","ngModelChange"],["url","ngModel"],["class","text-danger",4,"ngIf"],["for","customerEmail"],["required","","type","text","id","customerEmail","name","customerEmail","data-toggle","tooltip","title","customerEmail","pattern","\\b[\\w\\.-]+@[\\w\\.-]+\\.\\w{2,4}\\b",1,"form-control",3,"ngModel","ngModelOptions","ngModelChange"],["email","ngModel"],[1,"text-danger"],[4,"ngIf"]],template:function(e,i){if(1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onClose",function(){return i.onClose()})("onCancel",function(){return i.onClose()})("onOk",function(){return i.onSubmit()}),t.TgZ(1,"div",1)(2,"div",2)(3,"label",3),t._uU(4,"Tokopedia URL"),t.qZA(),t.TgZ(5,"div",4)(6,"div",5)(7,"span",6),t._uU(8,"https://tokopedia.com/"),t.qZA()(),t.TgZ(9,"input",7,8),t.NdJ("ngModelChange",function(a){return i.data.URL=a}),t.qZA()(),t.YNc(11,ki,2,1,"div",9),t.TgZ(12,"label",10),t._uU(13,"Requester's Email"),t.qZA(),t.TgZ(14,"div",4)(15,"input",11,12),t.NdJ("ngModelChange",function(a){return i.data.Email=a}),t.qZA()(),t.YNc(17,Ri,3,2,"div",9),t.qZA()()()),2&e){const s=t.MAs(10),a=t.MAs(16);t.Q6J("dynamicValidated",!s.invalid&&!a.invalid)("config",i.modalConfig),t.xp6(7),t.Q6J("ngClass",t.VKq(8,Li,s.invalid&&(s.dirty||s.touched))),t.xp6(2),t.Q6J("ngModel",i.data.URL),t.xp6(2),t.Q6J("ngIf",s.invalid&&(s.dirty||s.touched)),t.xp6(4),t.Q6J("ngModel",i.data.Email)("ngModelOptions",t.DdM(10,Ui)),t.xp6(2),t.Q6J("ngIf",a.invalid&&(a.dirty||a.touched))}},dependencies:[m.mk,m.O5,u.Fj,u.JJ,u.Q7,u.c5,u.On,mt.M],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.input-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-radius:.25rem!important;border-color:#c8d3df}.input-group[_ngcontent-%COMP%] > input.ng-invalid.ng-touched[_ngcontent-%COMP%]{border-color:#fb404b}.input-group[_ngcontent-%COMP%] > input.customerUrl[_ngcontent-%COMP%]{border-top-left-radius:0!important;border-bottom-left-radius:0!important}.invalid[_ngcontent-%COMP%]{border-color:#fb404b}.pointer-default[_ngcontent-%COMP%]{cursor:default}"]}),o})(),jt=(()=>{class o{constructor(e,i){this.dialogRef=e,this.data=i}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new nt.O,this.modalConfig.title=this.data?.title,this.modalConfig.okText="SAVE"}onSubmit(){this.dialogRef.close(this.data)}onClose(){this.dialogRef.close()}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(F.so),t.Y36(F.WI))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-modal-dialog-tokopedia"]],decls:7,vars:3,consts:[[3,"dynamicValidated","config","onClose","onCancel","onOk"],["content",""],[1,"form-label-group"],["type","text","id","shopid","placeholder","Shop ID","name","ShopID","data-toggle","tooltip","title","Channel Name",1,"form-control",3,"ngModel","ngModelChange"],["name","ngModel"],["for","shopid"]],template:function(e,i){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onClose",function(){return i.onClose()})("onCancel",function(){return i.onClose()})("onOk",function(){return i.onSubmit()}),t.TgZ(1,"div",1)(2,"div",2)(3,"input",3,4),t.NdJ("ngModelChange",function(a){return i.data.ShopID=a}),t.qZA(),t.TgZ(5,"label",5),t._uU(6,"Shop ID"),t.qZA()()()()),2&e&&(t.Q6J("dynamicValidated",i.data.ShopID)("config",i.modalConfig),t.xp6(3),t.Q6J("ngModel",i.data.ShopID))},dependencies:[u.Fj,u.JJ,u.On,mt.M],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"]}),o})(),Fi=(()=>{class o{constructor(e,i){this.dialogRef=e,this.data=i,this.modalConfig=new nt.O}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new nt.O,this.modalConfig.title="WooCommerce",this.modalConfig.okText="SAVE"}onSubmit(){this.data.TypeID=2,this.dialogRef.close(this.data)}onClose(){this.dialogRef.close()}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(F.so),t.Y36(F.WI))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-modal-dialog-woocommerce"]],decls:17,vars:5,consts:[[3,"dynamicValidated","config","onClose","onCancel","onOk"],["content",""],[1,"form-label-group"],["type","text","id","shopid","placeholder","Shop ID","name","URL","data-toggle","tooltip","title","URL",1,"form-control",3,"ngModel","ngModelChange"],["name","ngModel"],["for","shopid"],["type","text","id","ConsumerKey","placeholder","Consumer Key","name","ConsumerKey","data-toggle","tooltip","title","ConsumerKey",1,"form-control",3,"ngModel","ngModelChange"],["for","ConsumerKey"],["type","text","id","ConsumerSecret","placeholder","Consumer Secret","name","ConsumerSecret","data-toggle","tooltip","title","ConsumerSecret",1,"form-control",3,"ngModel","ngModelChange"],["for","ConsumerSecret"]],template:function(e,i){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onClose",function(){return i.onClose()})("onCancel",function(){return i.onClose()})("onOk",function(){return i.onSubmit()}),t.TgZ(1,"div",1)(2,"div",2)(3,"input",3,4),t.NdJ("ngModelChange",function(a){return i.data.URL=a}),t.qZA(),t.TgZ(5,"label",5),t._uU(6,"URL"),t.qZA()(),t.TgZ(7,"div",2)(8,"input",6,4),t.NdJ("ngModelChange",function(a){return i.data.ConsumerKey=a}),t.qZA(),t.TgZ(10,"label",7),t._uU(11,"Consumer Key"),t.qZA()(),t.TgZ(12,"div",2)(13,"input",8,4),t.NdJ("ngModelChange",function(a){return i.data.ConsumerSecret=a}),t.qZA(),t.TgZ(15,"label",9),t._uU(16,"Consumer Secret"),t.qZA()()()()),2&e&&(t.Q6J("dynamicValidated",i.data.ConsumerKey&&i.data.URL&&i.data.ConsumerSecret)("config",i.modalConfig),t.xp6(3),t.Q6J("ngModel",i.data.URL),t.xp6(5),t.Q6J("ngModel",i.data.ConsumerKey),t.xp6(5),t.Q6J("ngModel",i.data.ConsumerSecret))},dependencies:[u.Fj,u.JJ,u.On,mt.M],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"]}),o})();var Ni=h(9300),Xt=h(455);function Ji(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"div",3)(1,"div",4)(2,"div",5)(3,"div",24)(4,"span"),t._uU(5,"BETA"),t.qZA()(),t.TgZ(6,"div",6),t._UZ(7,"img",25),t.qZA(),t.TgZ(8,"div",8)(9,"div",9)(10,"p"),t._uU(11,"Authorize DEALPOS to manage your KALCare Shop. You will need to fill your KALCare ShopID."),t.qZA(),t.TgZ(12,"p"),t._uU(13,"Please request your shopID by "),t.TgZ(14,"a",26),t._uU(15,"contacting"),t.qZA(),t._uU(16," the KALCare team"),t.qZA()(),t.TgZ(17,"button",27),t.NdJ("click",function(){t.CHM(e);const s=t.oxw();return t.KtG(s.openKalcareDialog())}),t._uU(18,"Submit Shop ID"),t.qZA()()()(),t.TgZ(19,"div",11)(20,"div",5)(21,"div",24)(22,"span"),t._uU(23,"BETA"),t.qZA()(),t.TgZ(24,"div",6),t._UZ(25,"img",28),t.qZA(),t.TgZ(26,"div",8)(27,"div",9)(28,"p"),t._uU(29,"Authorize DEALPOS versi V2 to manage your lazada, you will be redirected to lazada website to complete this process."),t.qZA(),t.TgZ(30,"p"),t._uU(31,"You will need to sign in to Lazada using your Seller account and confirm the authorization."),t.qZA()(),t.TgZ(32,"a",29),t.NdJ("click",function(){t.CHM(e);const s=t.oxw();return t.KtG(s.lazadaAuthorize())}),t._uU(33,"Authorize Account"),t.qZA()()()()()}}let Hi=(()=>{class o{constructor(e,i,s,a,r){this.route=e,this.http=i,this.service=s,this.dialog=a,this.toastr=r,this.newFeatureVisible=!1}saveTokopedia(){let e={ShopID:Number(this.shopID)};this.http.post("/api/ChannelAdd/Tokopedia",e).subscribe(i=>{this.service.navigate(["/menu/channel"])})}saveWooCommerce(e){this.http.post("/api/ChannelAdd/AddWooCommerce",e).subscribe(i=>{this.service.navigate(["/menu/channel"])})}saveKalCare(){this.http.post("/api/ChannelAdd/AddKalCare",{ShopIDString:this.shopIDString}).subscribe(i=>{this.service.navigate(["/menu/channel"])})}shopeeAuthorize(){this.http.post("/api/ChannelAuthorization/ShopeeV2_URL").subscribe(e=>{window.location.href=e.Url})}tiktokAuthorize(){this.http.post("/api/ChannelAuthorization/Tiktok_URL").subscribe(e=>{window.location.href=e.Url})}lazadaAuthorize(){this.http.post("/api/ChannelAuthorization/Lazada_URL").subscribe(e=>{window.location.href=e.Url})}openTokopediaDialog(){this.dialog.open(jt,{data:{title:"Tokopedia",ShopID:this.shopID},width:"30%"}).afterClosed().subscribe(i=>{null!=i&&(this.shopID=i.ShopID,this.saveTokopedia())})}openKalcareDialog(){this.dialog.open(jt,{data:{title:"KAL Care",ShopID:this.shopIDString},width:"30%"}).afterClosed().subscribe(i=>{null!=i&&(this.shopIDString=i.ShopID,this.saveKalCare())})}openWooCommerceDialog(){this.dialog.open(Fi,{data:{ShopID:this.shopID},width:"30%"}).afterClosed().pipe((0,Ni.h)(i=>D.g.IsNotEmpty(i))).subscribe(i=>{this.saveWooCommerce(i)})}contactSupport(){this.dialog.open(qi,{width:"30%"}).afterClosed().subscribe(i=>{if(null!=i){if(null==i.Email)return void this.toastr.error("Email cannot be empty!","Error!");if(null==i.URL)return void this.toastr.error("Email cannot be empty!","URL!");this.http.post("Api/ChannelAuthorization/Tokopedia_Intercom",{URL:i.URL,Email:i.Email}).subscribe({next:()=>{this.toastr.success("Your request has been received, we will be in touch at "+i.Email,"Thank you!")},error:a=>{console.log("Failed to submit customer support!",a)}})}})}onToggleNewVersion(e){this.newFeatureVisible=e}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(C.gz),t.Y36(V.O),t.Y36(C.F0),t.Y36(F.uw),t.Y36(U._W))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-marketplace-add"]],decls:65,vars:5,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/channel",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container"],[1,"row","mt-12"],[1,"col-md-4","ps-md-0"],[1,"card","h-100","ribbon-box"],[1,"card-header"],["src","https://res.cloudinary.com/pos/image/upload/v1605249851/icons/Marketplace%20logo/shopee-logo.png",1,"w-100"],[1,"card-body"],[1,"mt-4","mb-4","h-auto",2,"font-size","larger"],[1,"h4","btn-bottom","fw-bold","btn","btn-shopee","text-white","btn-md","btn-block",3,"click"],[1,"col-md-4","pe-md-0"],[1,"card","h-100"],["src","https://res.cloudinary.com/pos/image/upload/v1605249861/icons/Marketplace%20logo/download_tkpd.png",1,"w-100"],["type","button",1,"button","text-primary","fw-bold",3,"click"],["data-cy","submitChannelTokopedia",1,"h4","btn-bottom","fw-bold","btn","btn-success","text-white","btn-md","btn-block",3,"click"],["src","https://woocommerce.com/wp-content/themes/woo/images/logo-woocommerce.svg",1,"w-100"],["href","https://support.dealpos.com/en/articles/5733019-woocommerce-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"],[1,"h4","btn-bottom","fw-bold","btn","btn-woocommerce","text-white","btn-md","btn-block",3,"click"],["src","https://res.cloudinary.com/pos/image/upload/v1645761565/icons/Marketplace%20logo/tiktok-logo.png",1,"w-100"],[1,"h4","btn-bottom","fw-bold","btn","btn-tiktok","text-white","btn-md","btn-block",3,"click"],["class","row mt-12",4,"ngIf"],[1,"p-5","text-start"],[3,"change"],[1,"ribbon","ribbon-top-right"],["src","data:image/png;base64,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",1,"w-100"],["href","https://www.kalcare.com/kania",1,"button","text-primary","fw-bold"],[1,"h4","btn-bottom","fw-bold","btn","btn-kalcare","text-white","btn-md","btn-block",3,"click"],["src","https://res.cloudinary.com/pos/image/upload/v1641528116/icons/Marketplace%20logo/lazada.png",1,"w-100"],[1,"h4","btn-bottom","fw-bold","btn","btn-primary","text-white","btn-md","btn-block",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),t._uU(3,"Cancel"),t.qZA()(),t.TgZ(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6),t._UZ(10,"img",7),t.qZA(),t.TgZ(11,"div",8)(12,"div",9)(13,"p"),t._uU(14,"Authorize DEALPOS versi V2 to manage your shopee, you will be redirected to shopee website to complete this process."),t.qZA(),t.TgZ(15,"p"),t._uU(16,"You will need to sign in to Shopee using your Seller account and confirm the authorization."),t.qZA()(),t.TgZ(17,"a",10),t.NdJ("click",function(){return i.shopeeAuthorize()}),t._uU(18,"Authorize Account"),t.qZA()()()(),t.TgZ(19,"div",11)(20,"div",12)(21,"div",6),t._UZ(22,"img",13),t.qZA(),t.TgZ(23,"div",8)(24,"div",9)(25,"p"),t._uU(26,"Authorize DEALPOS to manage your tokopedia, please "),t.TgZ(27,"a",14),t.NdJ("click",function(){return i.contactSupport()}),t._uU(28,"contact our customer support"),t.qZA(),t._uU(29," to complete this process."),t.qZA(),t.TgZ(30,"p"),t._uU(31,"Our team will send an invitation email which needs to be approved."),t.qZA()(),t.TgZ(32,"button",15),t.NdJ("click",function(){return i.openTokopediaDialog()}),t._uU(33,"Submit Shop ID"),t.qZA()()()(),t.TgZ(34,"div",11)(35,"div",12)(36,"div",6),t._UZ(37,"img",16),t.qZA(),t.TgZ(38,"div",8)(39,"div",9)(40,"p"),t._uU(41,"Authorize DEALPOS to manage your Personal Website"),t.qZA(),t.TgZ(42,"p"),t._uU(43,"Configure woocommerce integration by visiting "),t.TgZ(44,"a",17),t._uU(45,"this article"),t.qZA()()(),t.TgZ(46,"button",18),t.NdJ("click",function(){return i.openWooCommerceDialog()}),t._uU(47,"Register"),t.qZA()()()()(),t.TgZ(48,"div",3)(49,"div",4)(50,"div",12)(51,"div",6),t._UZ(52,"img",19),t.qZA(),t.TgZ(53,"div",8)(54,"div",9)(55,"p"),t._uU(56,"Authorize DEALPOS to manage your Tiktok Seller, you will be redirected to Tiktok website to complete this process."),t.qZA(),t.TgZ(57,"p"),t._uU(58,"You will need to sign in to Tiktok using your Seller account and confirm the authorization."),t.qZA()(),t.TgZ(59,"a",20),t.NdJ("click",function(){return i.tiktokAuthorize()}),t._uU(60,"Authorize Account"),t.qZA()()()()(),t.YNc(61,Ji,34,0,"div",21),t.qZA(),t.TgZ(62,"div",22)(63,"mat-slide-toggle",23),t.NdJ("change",function(a){return i.onToggleNewVersion(a.checked)}),t._uU(64,"Show Beta Channel Integration "),t.qZA()()()()),2&e&&(t.Q6J("headerTitle","Add New Channel")("pageData",i.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(61),t.Q6J("ngIf",i.newFeatureVisible))},dependencies:[m.O5,f.p,C.yS,Xt.Rr],styles:['.bg-shopee[_ngcontent-%COMP%], .btn-shopee[_ngcontent-%COMP%]{background:linear-gradient(-180deg,#f53d2d,#f63)!important}.bg-tiktok[_ngcontent-%COMP%], .btn-tiktok[_ngcontent-%COMP%]{background:linear-gradient(-173deg,#ee1d52,#69c9d0)!important}.bg-woocommerce[_ngcontent-%COMP%], .btn-woocommerce[_ngcontent-%COMP%]{background:#8053b4!important}.bg-kalcare[_ngcontent-%COMP%], .btn-kalcare[_ngcontent-%COMP%]{background:#016648!important}.pointer-help[_ngcontent-%COMP%]{cursor:help}.btn-bottom[_ngcontent-%COMP%]{position:absolute;bottom:.5rem;left:.5rem;width:96%}.ribbon-box[_ngcontent-%COMP%]{position:relative}.ribbon[_ngcontent-%COMP%]{width:150px;height:150px;overflow:hidden;position:absolute}.ribbon[_ngcontent-%COMP%]:before, .ribbon[_ngcontent-%COMP%]:after{position:absolute;z-index:1;content:"";display:block;border:5px solid #78c424}.ribbon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:absolute;display:block;width:225px;padding:15px 0;background-color:#78c424;box-shadow:0 5px 10px #0000001a;color:#fff;font:700 18px/1 Lato,sans-serif;text-shadow:0 1px 1px rgba(0,0,0,.2);text-transform:uppercase;text-align:center}.ribbon-top-right[_ngcontent-%COMP%]{top:-10px;right:-10px}.ribbon-top-right[_ngcontent-%COMP%]:before, .ribbon-top-right[_ngcontent-%COMP%]:after{border-top-color:transparent;border-right-color:transparent}.ribbon-top-right[_ngcontent-%COMP%]:before{top:0;left:0}.ribbon-top-right[_ngcontent-%COMP%]:after{bottom:0;right:0}.ribbon-top-right[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{left:-25px;top:30px;transform:rotate(45deg)}']}),o})(),$t=(()=>{class o{constructor(e){this.httpService=e}getLoader(){return this.httpService.post("/api/ChannelLoader/GetConfig",{})}submitConfig(e){return this.httpService.post("/api/Channel/SubmitConfig",e)}testChannel(e){return this.httpService.post("/api/POSAccount/Test",e)}refreshToken(e){return this.httpService.post("/api/POSAccount/Remove",e)}}return o.\u0275fac=function(e){return new(e||o)(t.LFG(V.O))},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();function Qi(o,n){1&o&&(t.TgZ(0,"div",18)(1,"label"),t._uU(2,"Order Payment Type"),t.qZA(),t.TgZ(3,"div")(4,"span"),t._uU(5,"Full Amount"),t.qZA()()())}function Yi(o,n){1&o&&(t.TgZ(0,"div",18)(1,"label"),t._uU(2,"Order Payment Type"),t.qZA(),t.TgZ(3,"div")(4,"span"),t._uU(5," Escrow Amount"),t.qZA()()())}const Vi=function(){return["/menu/channel/pos/edit"]};function zi(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"div",16)(1,"label",17),t._uU(2,"Include Parent"),t.qZA(),t.TgZ(3,"div",18)(4,"mat-radio-group",19),t.NdJ("ngModelChange",function(s){t.CHM(e);const a=t.oxw();return t.KtG(a.form.IncludeParentInventory=s)}),t.TgZ(5,"mat-radio-button",23),t._uU(6," No "),t.qZA(),t.TgZ(7,"mat-radio-button",24),t._uU(8," Yes "),t.qZA()()()()}if(2&o){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.form.IncludeParentInventory),t.xp6(1),t.Q6J("value",!1),t.xp6(2),t.Q6J("value",!0)}}function Gi(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"div",16)(1,"label",17),t._uU(2,"Include Child"),t.qZA(),t.TgZ(3,"div",18)(4,"mat-radio-group",19),t.NdJ("ngModelChange",function(s){t.CHM(e);const a=t.oxw();return t.KtG(a.form.IncludeChildrenInventory=s)}),t.TgZ(5,"mat-radio-button",25),t._uU(6," No "),t.qZA(),t.TgZ(7,"mat-radio-button",26),t._uU(8," Yes "),t.qZA()()()()}if(2&o){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.form.IncludeChildrenInventory),t.xp6(1),t.Q6J("value",!1),t.xp6(2),t.Q6J("value",!0)}}const Wi=[{path:"",component:x,children:[{path:"",redirectTo:"marketplace",pathMatch:"full"},{path:"marketplace",component:Le,canActivate:[q.a],data:{title:"List"}},{path:"marketplace/form",component:ui,canActivate:[q.a],data:{title:"Add new Channel"}},{path:"marketplace/view",component:Zi,canActivate:[q.a],data:{title:"Marketplace View"}},{path:"marketplace/add",component:Hi,canActivate:[q.a],data:{title:"Marketplace Add"}},{path:"pos",component:(()=>{class o{constructor(e,i){this.toastr=e,this.posService=i,this.form=new ut,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(e=>{this.form=e.Form})}onRefreshToken(){this.posService.refreshToken(this.form).subscribe(e=>{this.toastr.success("Token has been refreshed!","Success",{closeButton:!0,positionClass:"toast-bottom-right"})})}onTestChannel(){this.posService.testChannel(this.form).subscribe(e=>{this.toastr.success("Test was successful!","Success",{closeButton:!0,positionClass:"toast-bottom-right"})})}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(U._W),t.Y36($t))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-pos"]],decls:44,vars:12,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button",1,"btn","btn-outline-success","btn-lg","text-success","me-2",3,"click"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"routerLink"],[1,"fas","fa-edit",2,"font-size","20px"],[1,"container-fluid","mt-3"],[1,"row","mt-5"],[1,"col-md-6"],[1,"card"],[1,"card-header"],[1,"card-body","mt-8"],[1,"form-label-group"],["type","text","id","Host","name","Host","data-toggle","tooltip","title","Host","readonly","",1,"form-control",3,"ngModel","ngModelChange"],["for","Host"],["type","text","id","Username","name","Username","data-toggle","tooltip","title","Username","readonly","",1,"form-control",3,"ngModel","ngModelChange"],["for","Username"],["type","text","id","ClientSecretGuid","name","ClientSecretGuid","data-toggle","tooltip","title","ClientSecretGuid","readonly","",1,"form-control",3,"ngModel","ngModelChange"],["for","ClientSecretGuid"],["class","info-label-group",4,"ngIf"],[1,"info-label-group"]],template:function(e,i){1&e&&(t.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),t.NdJ("click",function(){return i.onRefreshToken()}),t._uU(3,"Refresh Token"),t.qZA(),t.TgZ(4,"a",1),t.NdJ("click",function(){return i.onTestChannel()}),t._uU(5,"Validate Client Secret Guid"),t.qZA(),t.TgZ(6,"a",2),t._UZ(7,"i",3),t._uU(8," Edit"),t.qZA()(),t.TgZ(9,"content")(10,"div",4)(11,"div",5)(12,"div",6)(13,"div",7)(14,"div",8)(15,"h4"),t._uU(16,"Credentials"),t.qZA()(),t.TgZ(17,"div",9)(18,"div",10)(19,"input",11),t.NdJ("ngModelChange",function(a){return i.form.Host=a}),t.qZA(),t.TgZ(20,"label",12),t._uU(21,"Host"),t.qZA()(),t.TgZ(22,"div",10)(23,"input",13),t.NdJ("ngModelChange",function(a){return i.form.Username=a}),t.qZA(),t.TgZ(24,"label",14),t._uU(25,"Username"),t.qZA()(),t.TgZ(26,"div",10)(27,"input",15),t.NdJ("ngModelChange",function(a){return i.form.ClientSecretGuid=a}),t.qZA(),t.TgZ(28,"label",16),t._uU(29,"ClientSecretGuid"),t.qZA()()()()(),t.TgZ(30,"div",6)(31,"div",7)(32,"div",8)(33,"h4"),t._uU(34,"Configuration"),t.qZA()(),t.TgZ(35,"div",9),t.YNc(36,Qi,6,0,"div",17),t.YNc(37,Yi,6,0,"div",17),t.TgZ(38,"div",18)(39,"label"),t._uU(40,"Composite Inventory"),t.qZA(),t.TgZ(41,"div")(42,"span"),t._uU(43),t.qZA()()()()()()()()()()),2&e&&(t.Q6J("headerTitle","POS")("pageData",i.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(6),t.Q6J("routerLink",t.DdM(11,Vi)),t.xp6(13),t.Q6J("ngModel",i.form.Host),t.xp6(4),t.Q6J("ngModel",i.form.Username),t.xp6(4),t.Q6J("ngModel",i.form.ClientSecretGuid),t.xp6(9),t.Q6J("ngIf",1==i.form.OrderPaymentAmountType),t.xp6(1),t.Q6J("ngIf",0==i.form.OrderPaymentAmountType),t.xp6(6),t.hij(" ",i.form.CompositeVisible,""))},dependencies:[m.O5,u.Fj,u.JJ,u.On,f.p,C.yS]}),o})(),canActivate:[q.a],data:{title:"POS"}},{path:"pos/edit",component:(()=>{class o{constructor(e,i,s){this._router=e,this.toastr=i,this.posService=s,this.form=new ut,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(e=>{this.form=e.Form})}onSubmitHost(){this.posService.submitConfig(this.form).subscribe(e=>{this.toastr.success("Successfully Edited POS Config!","Success!"),this._router.navigate(["menu/channel"])})}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(C.F0),t.Y36(U._W),t.Y36($t))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-edit"]],decls:44,vars:12,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,"me-5",3,"value"],["class","form-label-group radio",4,"ngIf"],["data-toggle","tooltip","title","No include variant parent component",1,"me-5",3,"value"],["data-toggle","tootip","title","include variant parent component",1,"me-5",3,"value"],["data-toggle","tooltip","title","No Include variant child component",1,"me-5",3,"value"],["data-toggle","tootip","title","Include Include variant child component",1,"me-5",3,"value"]],template:function(e,i){1&e&&(t.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),t._uU(3,"Cancel"),t.qZA(),t.TgZ(4,"a",2),t.NdJ("click",function(){return i.onSubmitHost()}),t._uU(5,"Save"),t.qZA()(),t.TgZ(6,"content")(7,"div",3)(8,"div",4)(9,"div",5)(10,"div",6)(11,"div",7)(12,"h4"),t._uU(13,"Credentials"),t.qZA()(),t.TgZ(14,"div",8)(15,"div",9)(16,"input",10),t.NdJ("ngModelChange",function(a){return i.form.Host=a}),t.qZA(),t.TgZ(17,"label",11),t._uU(18,"Host"),t.qZA()(),t.TgZ(19,"div",9)(20,"input",12),t.NdJ("ngModelChange",function(a){return i.form.Username=a}),t.qZA(),t.TgZ(21,"label",13),t._uU(22,"Username"),t.qZA()(),t.TgZ(23,"div",9)(24,"input",14),t.NdJ("ngModelChange",function(a){return i.form.ClientSecretGuid=a}),t.qZA(),t.TgZ(25,"label",15),t._uU(26,"ClientSecretGuid"),t.qZA()()()()(),t.TgZ(27,"div",5)(28,"div",6)(29,"div",7)(30,"h4"),t._uU(31,"Configuration"),t.qZA()(),t.TgZ(32,"div",8)(33,"div",16)(34,"label",17),t._uU(35,"Composite Inventory"),t.qZA(),t.TgZ(36,"div",18)(37,"mat-radio-group",19),t.NdJ("ngModelChange",function(a){return i.form.CompositeVisible=a}),t.TgZ(38,"mat-radio-button",20),t._uU(39," No "),t.qZA(),t.TgZ(40,"mat-radio-button",21),t._uU(41," Yes "),t.qZA()()()(),t.YNc(42,zi,9,3,"div",22),t.YNc(43,Gi,9,3,"div",22),t.qZA()()()()()()()),2&e&&(t.Q6J("headerTitle","POS Edit")("pageData",i.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(16),t.Q6J("ngModel",i.form.Host),t.xp6(4),t.Q6J("ngModel",i.form.Username),t.xp6(4),t.Q6J("ngModel",i.form.ClientSecretGuid),t.xp6(13),t.Q6J("ngModel",i.form.CompositeVisible),t.xp6(1),t.Q6J("value",!1),t.xp6(2),t.Q6J("value",!0),t.xp6(2),t.Q6J("ngIf",i.form.CompositeVisible),t.xp6(1),t.Q6J("ngIf",i.form.CompositeVisible))},dependencies:[m.O5,u.Fj,u.JJ,u.On,f.p,w.VQ,w.U0,C.yS],styles:[".passwordIcon[_ngcontent-%COMP%]{top:1.5rem;right:1rem;position:absolute;margin:0 auto!important;cursor:pointer}"]}),o})(),canActivate:[q.a],data:{title:"POS Edit"}}]}];let ji=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({imports:[m.ez,C.Bz.forChild(Wi)]}),o})();var Xi=h(4144),$i=h(9101);let tn=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({imports:[m.ez,u.u5,E.Z,f.R,w.Fk,K.A0,ji,C.Bz,Me,Ge,Xi.c,$i.ot,Wt.Ps,et.AV,Xt.rP]}),o})()},7398:(ie,G,h)=>{h.d(G,{Z:()=>C,e:()=>K});var m=h(6895),u=h(266),E=h(6806),f=h(4650);function w(t,x){if(1&t&&(f.TgZ(0,"li",2)(1,"a",3),f._uU(2),f.qZA()()),2&t){const y=x.$implicit;f.xp6(1),f.s9C("routerLink",y.Url),f.Q6J("title",y.Description?y.Description:""),f.xp6(1),f.hij(" ",y.Title," ")}}let K=(()=>{class t{}return t.\u0275fac=function(y){return new(y||t)},t.\u0275cmp=f.Xpm({type:t,selectors:[["nav-tab"]],inputs:{Tabs:"Tabs"},decls:2,vars:1,consts:[[1,"nav","navbar-nav","navbar-left","nav-tab-arrow"],["routerLinkActive","active","class","nav-item me-6",4,"ngFor","ngForOf"],["routerLinkActive","active",1,"nav-item","me-6"],[1,"nav-link","nav-link-arrow","mb-0",3,"routerLink","title"]],template:function(y,T){1&y&&(f.TgZ(0,"ul",0),f.YNc(1,w,3,3,"li",1),f.qZA()),2&y&&(f.xp6(1),f.Q6J("ngForOf",T.Tabs))},dependencies:[m.sg,E.yS,E.Od]}),t})(),C=(()=>{class t{}return t.\u0275fac=function(y){return new(y||t)},t.\u0275mod=f.oAB({type:t}),t.\u0275inj=f.cJS({imports:[m.ez,E.Bz,u.AV]}),t})()}}]);
|
|
1
|
+
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[463],{6463:(ie,G,h)=>{h.r(G),h.d(G,{ChannelsModule:()=>en});var m=h(6895),u=h(4006),E=h(7398),f=h(7481),w=h(1948),K=h(8796),C=h(6806),t=h(4650);let x=(()=>{class o{constructor(){this.channelTabs=[{Title:"Marketplace",Url:"/menu/channel/marketplace"},{Title:"POS",Url:"/menu/channel/pos"}]}ngOnInit(){}}return o.\u0275fac=function(e){return new(e||o)},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-channels"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(e,i){1&e&&(t.TgZ(0,"nav",0)(1,"div",1)(2,"div"),t._UZ(3,"nav-tab",2),t.qZA()()(),t._UZ(4,"router-outlet")),2&e&&(t.xp6(3),t.Q6J("Tabs",i.channelTabs))},dependencies:[E.e,C.lC],styles:[".form-label-group[_ngcontent-%COMP%]{position:relative;margin-bottom:1rem}.form-label-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-radius:.25rem!important;border-color:#c8d3df}.form-label-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{width:auto;position:absolute;top:1.125rem;left:.75rem;display:block;margin-bottom:0;line-height:1.5;color:#ccc;pointer-events:none;cursor:text;border:1px solid transparent;border-radius:.25rem;transition:all .1s ease-in-out;font-size:.875rem}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]{padding:.75rem;color:#343434;resize:both;font-size:.875rem;border-radius:.25rem;border-color:#c8d3df}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%] ~ label[_ngcontent-%COMP%]{top:.9375rem}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]:focus ~ label[_ngcontent-%COMP%]{top:1rem;left:.78125rem}.form-label-group[_ngcontent-%COMP%] > ng-select[_ngcontent-%COMP%] .ng-select-container{min-height:3.625rem;border-color:#c8d3df;box-shadow:none}.form-label-group[_ngcontent-%COMP%] > ng-select[_ngcontent-%COMP%] ~ label[_ngcontent-%COMP%]{display:inline-block;top:-.625rem;background-color:#fff;font-size:.75rem!important;color:#9da2a6;padding:0 .25rem;z-index:2000;left:.5rem}.form-label-group.multiple[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-input{padding-left:.25rem!important}.form-label-group.multiple[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-placeholder{top:18px!important}.form-label-group.radio[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;border-radius:.25rem!important;border:solid 1px #c8d3df}.form-label-group.radio[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{background-color:#fff;font-size:.75rem!important;color:#9da2a6;top:-10px!important;padding:0 .25rem;left:.5rem}.form-label-group.empty[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] ~ label[_ngcontent-%COMP%]{display:none}.form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:not(:placeholder-shown) ~ label[_ngcontent-%COMP%], .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:not(:placeholder-shown) ~ label[_ngcontent-%COMP%]{background-color:#fff;font-size:.75rem!important;color:#9da2a6;top:-10px!important;padding:0 .25rem;left:.5rem}.form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:not(:placeholder-shown):focus ~ label[_ngcontent-%COMP%], .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:not(:placeholder-shown):focus ~ label[_ngcontent-%COMP%]{color:#3f8aec}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-placeholder{padding-left:.25rem;color:#ccc!important;font-size:.875rem}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-has-value .ng-value{padding-left:.25rem;font-size:.875rem}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-value-container{overflow:initial!important}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-input{top:auto!important;padding-left:.875rem!important;font-size:.875rem}"]}),o})();var y=h(7376),T=h(3353),g=h(1281),ot=h(2687),v=h(7579),J=h(727),ne=h(4986),oe=h(2805),ae=h(6406),ft=h(8306),R=h(6451),Z=h(2722),W=h(8675),re=h(4004),st=h(5698),le=h(8505),de=h(3900),at=h(445);function rt(o,n,e){for(let i in n)if(n.hasOwnProperty(i)){const s=n[i];s?o.setProperty(i,s,e?.has(i)?"important":""):o.removeProperty(i)}return o}function U(o,n){const e=n?"":"none";rt(o.style,{"touch-action":n?"":"none","-webkit-user-drag":n?"":"none","-webkit-tap-highlight-color":n?"":"transparent","user-select":e,"-ms-user-select":e,"-webkit-user-select":e,"-moz-user-select":e})}function vt(o,n,e){rt(o.style,{position:n?"":"fixed",top:n?"":"0",opacity:n?"":"0",left:n?"":"-999em"},e)}function j(o,n){return n&&"none"!=n?o+" "+n:o}function Ct(o){const n=o.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(o)*n}function lt(o,n){return o.getPropertyValue(n).split(",").map(i=>i.trim())}function dt(o){const n=o.getBoundingClientRect();return{top:n.top,right:n.right,bottom:n.bottom,left:n.left,width:n.width,height:n.height,x:n.x,y:n.y}}function ct(o,n,e){const{top:i,bottom:s,left:a,right:r}=o;return e>=i&&e<=s&&n>=a&&n<=r}function H(o,n,e){o.top+=n,o.bottom=o.top+o.height,o.left+=e,o.right=o.left+o.width}function bt(o,n,e,i){const{top:s,right:a,bottom:r,left:l,width:d,height:c}=o,p=d*n,_=c*n;return i>s-_&&i<r+_&&e>l-p&&e<a+p}class yt{constructor(n){this._document=n,this.positions=new Map}clear(){this.positions.clear()}cache(n){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),n.forEach(e=>{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:dt(e)})})}handleScroll(n){const e=(0,T.sA)(n),i=this.positions.get(e);if(!i)return null;const s=i.scrollPosition;let a,r;if(e===this._document){const c=this.getViewportScrollPosition();a=c.top,r=c.left}else a=e.scrollTop,r=e.scrollLeft;const l=s.top-a,d=s.left-r;return this.positions.forEach((c,p)=>{c.clientRect&&e!==p&&e.contains(p)&&H(c.clientRect,l,d)}),s.top=a,s.left=r,{top:l,left:d}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}}function Tt(o){const n=o.cloneNode(!0),e=n.querySelectorAll("[id]"),i=o.nodeName.toLowerCase();n.removeAttribute("id");for(let s=0;s<e.length;s++)e[s].removeAttribute("id");return"canvas"===i?Mt(o,n):("input"===i||"select"===i||"textarea"===i)&&Dt(o,n),St("canvas",o,n,Mt),St("input, textarea, select",o,n,Dt),n}function St(o,n,e,i){const s=n.querySelectorAll(o);if(s.length){const a=e.querySelectorAll(o);for(let r=0;r<s.length;r++)i(s[r],a[r])}}let he=0;function Dt(o,n){"file"!==n.type&&(n.value=o.value),"radio"===n.type&&n.name&&(n.name=`mat-clone-${n.name}-${he++}`)}function Mt(o,n){const e=n.getContext("2d");if(e)try{e.drawImage(o,0,0)}catch{}}const It=(0,T.i$)({passive:!0}),X=(0,T.i$)({passive:!1}),ht=new Set(["position"]);class ue{constructor(n,e,i,s,a,r){this._config=e,this._document=i,this._ngZone=s,this._viewportRuler=a,this._dragDropRegistry=r,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._hasStartedDragging=!1,this._moveEvents=new v.x,this._pointerMoveSubscription=J.w0.EMPTY,this._pointerUpSubscription=J.w0.EMPTY,this._scrollSubscription=J.w0.EMPTY,this._resizeSubscription=J.w0.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new v.x,this.started=new v.x,this.released=new v.x,this.ended=new v.x,this.entered=new v.x,this.exited=new v.x,this.dropped=new v.x,this.moved=this._moveEvents,this._pointerDown=l=>{if(this.beforeStarted.next(),this._handles.length){const d=this._getTargetHandle(l);d&&!this._disabledHandles.has(d)&&!this.disabled&&this._initializeDragSequence(d,l)}else this.disabled||this._initializeDragSequence(this._rootElement,l)},this._pointerMove=l=>{const d=this._getPointerPositionOnPage(l);if(!this._hasStartedDragging){if(Math.abs(d.x-this._pickupPositionOnPage.x)+Math.abs(d.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){const k=Date.now()>=this._dragStartTime+this._getDragStartDelay(l),O=this._dropContainer;if(!k)return void this._endDragSequence(l);(!O||!O.isDragging()&&!O.isReceiving())&&(l.preventDefault(),this._hasStartedDragging=!0,this._ngZone.run(()=>this._startDragSequence(l)))}return}l.preventDefault();const c=this._getConstrainedPointerPosition(d);if(this._hasMoved=!0,this._lastKnownPointerPosition=d,this._updatePointerDirectionDelta(c),this._dropContainer)this._updateActiveDropContainer(c,d);else{const p=this.constrainPosition?this._initialClientRect:this._pickupPositionOnPage,_=this._activeTransform;_.x=c.x-p.x+this._passiveTransform.x,_.y=c.y-p.y+this._passiveTransform.y,this._applyRootElementTransform(_.x,_.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:c,event:l,distance:this._getDragDistance(c),delta:this._pointerDirectionDelta})})},this._pointerUp=l=>{this._endDragSequence(l)},this._nativeDragStart=l=>{if(this._handles.length){const d=this._getTargetHandle(l);d&&!this._disabledHandles.has(d)&&!this.disabled&&l.preventDefault()}else this.disabled||l.preventDefault()},this.withRootElement(n).withParent(e.parentDragRef||null),this._parentPositions=new yt(i),r.registerDragItem(this)}get disabled(){return this._disabled||!(!this._dropContainer||!this._dropContainer.disabled)}set disabled(n){const e=(0,g.Ig)(n);e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(i=>U(i,e)))}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(n){this._handles=n.map(i=>(0,g.fI)(i)),this._handles.forEach(i=>U(i,this.disabled)),this._toggleNativeDragInteractions();const e=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&e.add(i)}),this._disabledHandles=e,this}withPreviewTemplate(n){return this._previewTemplate=n,this}withPlaceholderTemplate(n){return this._placeholderTemplate=n,this}withRootElement(n){const e=(0,g.fI)(n);return e!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{e.addEventListener("mousedown",this._pointerDown,X),e.addEventListener("touchstart",this._pointerDown,It),e.addEventListener("dragstart",this._nativeDragStart,X)}),this._initialTransform=void 0,this._rootElement=e),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(n){return this._boundaryElement=n?(0,g.fI)(n):null,this._resizeSubscription.unsubscribe(),n&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(n){return this._parentDragRef=n,this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(n){!this._disabledHandles.has(n)&&this._handles.indexOf(n)>-1&&(this._disabledHandles.add(n),U(n,!0))}enableHandle(n){this._disabledHandles.has(n)&&(this._disabledHandles.delete(n),U(n,this.disabled))}withDirection(n){return this._direction=n,this}_withDropContainer(n){this._dropContainer=n}getFreeDragPosition(){const n=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:n.x,y:n.y}}setFreeDragPosition(n){return this._activeTransform={x:0,y:0},this._passiveTransform.x=n.x,this._passiveTransform.y=n.y,this._dropContainer||this._applyRootElementTransform(n.x,n.y),this}withPreviewContainer(n){return this._previewContainer=n,this}_sortFromLastPointerPosition(){const n=this._lastKnownPointerPosition;n&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(n),n)}_removeSubscriptions(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}_destroyPreview(){this._preview?.remove(),this._previewRef?.destroy(),this._preview=this._previewRef=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(n){if(this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging))if(this.released.next({source:this,event:n}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(n),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;const e=this._getPointerPositionOnPage(n);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:n})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(n){Q(n)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const e=this._dropContainer;if(e){const i=this._rootElement,s=i.parentNode,a=this._placeholder=this._createPlaceholderElement(),r=this._anchor=this._anchor||this._document.createComment(""),l=this._getShadowRoot();s.insertBefore(r,i),this._initialTransform=i.style.transform||"",this._preview=this._createPreviewElement(),vt(i,!1,ht),this._document.body.appendChild(s.replaceChild(a,i)),this._getPreviewInsertionPoint(s,l).appendChild(this._preview),this.started.next({source:this,event:n}),e.start(),this._initialContainer=e,this._initialIndex=e.getItemIndex(this)}else this.started.next({source:this,event:n}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(e?e.getScrollableParents():[])}_initializeDragSequence(n,e){this._parentDragRef&&e.stopPropagation();const i=this.isDragging(),s=Q(e),a=!s&&0!==e.button,r=this._rootElement,l=(0,T.sA)(e),d=!s&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now(),c=s?(0,ot.yG)(e):(0,ot.X6)(e);if(l&&l.draggable&&"mousedown"===e.type&&e.preventDefault(),i||a||d||c)return;if(this._handles.length){const b=r.style;this._rootElementTapHighlight=b.webkitTapHighlightColor||"",b.webkitTapHighlightColor="transparent"}this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._initialClientRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(b=>this._updateOnScroll(b)),this._boundaryElement&&(this._boundaryRect=dt(this._boundaryElement));const p=this._previewTemplate;this._pickupPositionInElement=p&&p.template&&!p.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialClientRect,n,e);const _=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:_.x,y:_.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(n){vt(this._rootElement,!0,ht),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialClientRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{const e=this._dropContainer,i=e.getItemIndex(this),s=this._getPointerPositionOnPage(n),a=this._getDragDistance(s),r=e._isOverContainer(s.x,s.y);this.ended.next({source:this,distance:a,dropPoint:s,event:n}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:r,distance:a,dropPoint:s,event:n}),e.drop(this,i,this._initialIndex,this._initialContainer,r,a,s),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:n,y:e},{x:i,y:s}){let a=this._initialContainer._getSiblingContainerFromPosition(this,n,e);!a&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(n,e)&&(a=this._initialContainer),a&&a!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=a,this._dropContainer.enter(this,n,e,a===this._initialContainer&&a.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:a,currentIndex:a.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,s),this._dropContainer._sortItem(this,n,e,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(n,e):this._applyPreviewTransform(n-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y))}_createPreviewElement(){const n=this._previewTemplate,e=this.previewClass,i=n?n.template:null;let s;if(i&&n){const a=n.matchSize?this._initialClientRect:null,r=n.viewContainer.createEmbeddedView(i,n.context);r.detectChanges(),s=wt(r,this._document),this._previewRef=r,n.matchSize?Zt(s,a):s.style.transform=$(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else s=Tt(this._rootElement),Zt(s,this._initialClientRect),this._initialTransform&&(s.style.transform=this._initialTransform);return rt(s.style,{"pointer-events":"none",margin:"0",position:"fixed",top:"0",left:"0","z-index":`${this._config.zIndex||1e3}`},ht),U(s,!1),s.classList.add("cdk-drag-preview"),s.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(a=>s.classList.add(a)):s.classList.add(e)),s}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const n=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._applyPreviewTransform(n.left,n.top);const e=function ce(o){const n=getComputedStyle(o),e=lt(n,"transition-property"),i=e.find(l=>"transform"===l||"all"===l);if(!i)return 0;const s=e.indexOf(i),a=lt(n,"transition-duration"),r=lt(n,"transition-delay");return Ct(a[s])+Ct(r[s])}(this._preview);return 0===e?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{const s=r=>{(!r||(0,T.sA)(r)===this._preview&&"transform"===r.propertyName)&&(this._preview?.removeEventListener("transitionend",s),i(),clearTimeout(a))},a=setTimeout(s,1.5*e);this._preview.addEventListener("transitionend",s)}))}_createPlaceholderElement(){const n=this._placeholderTemplate,e=n?n.template:null;let i;return e?(this._placeholderRef=n.viewContainer.createEmbeddedView(e,n.context),this._placeholderRef.detectChanges(),i=wt(this._placeholderRef,this._document)):i=Tt(this._rootElement),i.style.pointerEvents="none",i.classList.add("cdk-drag-placeholder"),i}_getPointerPositionInElement(n,e,i){const s=e===this._rootElement?null:e,a=s?s.getBoundingClientRect():n,r=Q(i)?i.targetTouches[0]:i,l=this._getViewportScrollPosition();return{x:a.left-n.left+(r.pageX-a.left-l.left),y:a.top-n.top+(r.pageY-a.top-l.top)}}_getPointerPositionOnPage(n){const e=this._getViewportScrollPosition(),i=Q(n)?n.touches[0]||n.changedTouches[0]||{pageX:0,pageY:0}:n,s=i.pageX-e.left,a=i.pageY-e.top;if(this._ownerSVGElement){const r=this._ownerSVGElement.getScreenCTM();if(r){const l=this._ownerSVGElement.createSVGPoint();return l.x=s,l.y=a,l.matrixTransform(r.inverse())}}return{x:s,y:a}}_getConstrainedPointerPosition(n){const e=this._dropContainer?this._dropContainer.lockAxis:null;let{x:i,y:s}=this.constrainPosition?this.constrainPosition(n,this,this._initialClientRect):n;if("x"===this.lockAxis||"x"===e?s=this._pickupPositionOnPage.y:("y"===this.lockAxis||"y"===e)&&(i=this._pickupPositionOnPage.x),this._boundaryRect){const{x:a,y:r}=this._pickupPositionInElement,l=this._boundaryRect,{width:d,height:c}=this._getPreviewRect(),p=l.top+r,_=l.bottom-(c-r);i=xt(i,l.left+a,l.right-(d-a)),s=xt(s,p,_)}return{x:i,y:s}}_updatePointerDirectionDelta(n){const{x:e,y:i}=n,s=this._pointerDirectionDelta,a=this._pointerPositionAtLastDirectionChange,r=Math.abs(e-a.x),l=Math.abs(i-a.y);return r>this._config.pointerDirectionChangeThreshold&&(s.x=e>a.x?1:-1,a.x=e),l>this._config.pointerDirectionChangeThreshold&&(s.y=i>a.y?1:-1,a.y=i),s}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const n=this._handles.length>0||!this.isDragging();n!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=n,U(this._rootElement,n))}_removeRootElementListeners(n){n.removeEventListener("mousedown",this._pointerDown,X),n.removeEventListener("touchstart",this._pointerDown,It),n.removeEventListener("dragstart",this._nativeDragStart,X)}_applyRootElementTransform(n,e){const i=$(n,e),s=this._rootElement.style;null==this._initialTransform&&(this._initialTransform=s.transform&&"none"!=s.transform?s.transform:""),s.transform=j(i,this._initialTransform)}_applyPreviewTransform(n,e){const i=this._previewTemplate?.template?void 0:this._initialTransform,s=$(n,e);this._preview.style.transform=j(s,i)}_getDragDistance(n){const e=this._pickupPositionOnPage;return e?{x:n.x-e.x,y:n.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:n,y:e}=this._passiveTransform;if(0===n&&0===e||this.isDragging()||!this._boundaryElement)return;const i=this._rootElement.getBoundingClientRect(),s=this._boundaryElement.getBoundingClientRect();if(0===s.width&&0===s.height||0===i.width&&0===i.height)return;const a=s.left-i.left,r=i.right-s.right,l=s.top-i.top,d=i.bottom-s.bottom;s.width>i.width?(a>0&&(n+=a),r>0&&(n-=r)):n=0,s.height>i.height?(l>0&&(e+=l),d>0&&(e-=d)):e=0,(n!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:n})}_getDragStartDelay(n){const e=this.dragStartDelay;return"number"==typeof e?e:Q(n)?e.touch:e?e.mouse:0}_updateOnScroll(n){const e=this._parentPositions.handleScroll(n);if(e){const i=(0,T.sA)(n);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&H(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return void 0===this._cachedShadowRoot&&(this._cachedShadowRoot=(0,T.kV)(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(n,e){const i=this._previewContainer||"global";if("parent"===i)return n;if("global"===i){const s=this._document;return e||s.fullscreenElement||s.webkitFullscreenElement||s.mozFullScreenElement||s.msFullscreenElement||s.body}return(0,g.fI)(i)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialClientRect),this._previewRect}_getTargetHandle(n){return this._handles.find(e=>n.target&&(n.target===e||e.contains(n.target)))}}function $(o,n){return`translate3d(${Math.round(o)}px, ${Math.round(n)}px, 0)`}function xt(o,n,e){return Math.max(n,Math.min(e,o))}function Q(o){return"t"===o.type[0]}function wt(o,n){const e=o.rootNodes;if(1===e.length&&e[0].nodeType===n.ELEMENT_NODE)return e[0];const i=n.createElement("div");return e.forEach(s=>i.appendChild(s)),i}function Zt(o,n){o.style.width=`${n.width}px`,o.style.height=`${n.height}px`,o.style.transform=$(n.left,n.top)}function Pt(o,n,e){const i=Y(n,o.length-1),s=Y(e,o.length-1);if(i===s)return;const a=o[i],r=s<i?-1:1;for(let l=i;l!==s;l+=r)o[l]=o[l+r];o[s]=a}function Y(o,n){return Math.max(0,Math.min(n,o))}class ge{constructor(n,e){this._element=n,this._dragDropRegistry=e,this._itemPositions=[],this.orientation="vertical",this._previousSwap={drag:null,delta:0,overlaps:!1}}start(n){this.withItems(n)}sort(n,e,i,s){const a=this._itemPositions,r=this._getItemIndexFromPointerPosition(n,e,i,s);if(-1===r&&a.length>0)return null;const l="horizontal"===this.orientation,d=a.findIndex(S=>S.drag===n),c=a[r],_=c.clientRect,b=d>r?1:-1,k=this._getItemOffsetPx(a[d].clientRect,_,b),O=this._getSiblingOffsetPx(d,a,b),N=a.slice();return Pt(a,d,r),a.forEach((S,nn)=>{if(N[nn]===S)return;const te=S.drag===n,_t=te?k:O,ee=te?n.getPlaceholderElement():S.drag.getRootElement();S.offset+=_t,l?(ee.style.transform=j(`translate3d(${Math.round(S.offset)}px, 0, 0)`,S.initialTransform),H(S.clientRect,0,_t)):(ee.style.transform=j(`translate3d(0, ${Math.round(S.offset)}px, 0)`,S.initialTransform),H(S.clientRect,_t,0))}),this._previousSwap.overlaps=ct(_,e,i),this._previousSwap.drag=c.drag,this._previousSwap.delta=l?s.x:s.y,{previousIndex:d,currentIndex:r}}enter(n,e,i,s){const a=null==s||s<0?this._getItemIndexFromPointerPosition(n,e,i):s,r=this._activeDraggables,l=r.indexOf(n),d=n.getPlaceholderElement();let c=r[a];if(c===n&&(c=r[a+1]),!c&&(null==a||-1===a||a<r.length-1)&&this._shouldEnterAsFirstChild(e,i)&&(c=r[0]),l>-1&&r.splice(l,1),c&&!this._dragDropRegistry.isDragging(c)){const p=c.getRootElement();p.parentElement.insertBefore(d,p),r.splice(a,0,n)}else(0,g.fI)(this._element).appendChild(d),r.push(n);d.style.transform="",this._cacheItemPositions()}withItems(n){this._activeDraggables=n.slice(),this._cacheItemPositions()}withSortPredicate(n){this._sortPredicate=n}reset(){this._activeDraggables.forEach(n=>{const e=n.getRootElement();if(e){const i=this._itemPositions.find(s=>s.drag===n)?.initialTransform;e.style.transform=i||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(n){return("horizontal"===this.orientation&&"rtl"===this.direction?this._itemPositions.slice().reverse():this._itemPositions).findIndex(i=>i.drag===n)}updateOnScroll(n,e){this._itemPositions.forEach(({clientRect:i})=>{H(i,n,e)}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}_cacheItemPositions(){const n="horizontal"===this.orientation;this._itemPositions=this._activeDraggables.map(e=>{const i=e.getVisibleElement();return{drag:e,offset:0,initialTransform:i.style.transform||"",clientRect:dt(i)}}).sort((e,i)=>n?e.clientRect.left-i.clientRect.left:e.clientRect.top-i.clientRect.top)}_getItemOffsetPx(n,e,i){const s="horizontal"===this.orientation;let a=s?e.left-n.left:e.top-n.top;return-1===i&&(a+=s?e.width-n.width:e.height-n.height),a}_getSiblingOffsetPx(n,e,i){const s="horizontal"===this.orientation,a=e[n].clientRect,r=e[n+-1*i];let l=a[s?"width":"height"]*i;if(r){const d=s?"left":"top",c=s?"right":"bottom";-1===i?l-=r.clientRect[d]-a[c]:l+=a[d]-r.clientRect[c]}return l}_shouldEnterAsFirstChild(n,e){if(!this._activeDraggables.length)return!1;const i=this._itemPositions,s="horizontal"===this.orientation;if(i[0].drag!==this._activeDraggables[0]){const r=i[i.length-1].clientRect;return s?n>=r.right:e>=r.bottom}{const r=i[0].clientRect;return s?n<=r.left:e<=r.top}}_getItemIndexFromPointerPosition(n,e,i,s){const a="horizontal"===this.orientation,r=this._itemPositions.findIndex(({drag:l,clientRect:d})=>{if(l===n)return!1;if(s){const c=a?s.x:s.y;if(l===this._previousSwap.drag&&this._previousSwap.overlaps&&c===this._previousSwap.delta)return!1}return a?e>=Math.floor(d.left)&&e<Math.floor(d.right):i>=Math.floor(d.top)&&i<Math.floor(d.bottom)});return-1!==r&&this._sortPredicate(r,n)?r:-1}}class me{constructor(n,e,i,s,a){this._dragDropRegistry=e,this._ngZone=s,this._viewportRuler=a,this.disabled=!1,this.sortingDisabled=!1,this.autoScrollDisabled=!1,this.autoScrollStep=2,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.beforeStarted=new v.x,this.entered=new v.x,this.exited=new v.x,this.dropped=new v.x,this.sorted=new v.x,this._isDragging=!1,this._draggables=[],this._siblings=[],this._activeSiblings=new Set,this._viewportScrollSubscription=J.w0.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new v.x,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),function se(o=0,n=ne.z){return o<0&&(o=0),(0,oe.H)(o,o,n)}(0,ae.Z).pipe((0,Z.R)(this._stopScrollTimers)).subscribe(()=>{const r=this._scrollNode,l=this.autoScrollStep;1===this._verticalScrollDirection?r.scrollBy(0,-l):2===this._verticalScrollDirection&&r.scrollBy(0,l),1===this._horizontalScrollDirection?r.scrollBy(-l,0):2===this._horizontalScrollDirection&&r.scrollBy(l,0)})},this.element=(0,g.fI)(n),this._document=i,this.withScrollableParents([this.element]),e.registerDropContainer(this),this._parentPositions=new yt(i),this._sortStrategy=new ge(this.element,e),this._sortStrategy.withSortPredicate((r,l)=>this.sortPredicate(r,l,this))}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(n,e,i,s){this._draggingStarted(),null==s&&this.sortingDisabled&&(s=this._draggables.indexOf(n)),this._sortStrategy.enter(n,e,i,s),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:n,container:this,currentIndex:this.getItemIndex(n)})}exit(n){this._reset(),this.exited.next({item:n,container:this})}drop(n,e,i,s,a,r,l,d={}){this._reset(),this.dropped.next({item:n,currentIndex:e,previousIndex:i,container:this,previousContainer:s,isPointerOverContainer:a,distance:r,dropPoint:l,event:d})}withItems(n){const e=this._draggables;return this._draggables=n,n.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(e.filter(s=>s.isDragging()).every(s=>-1===n.indexOf(s))?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(n){return this._sortStrategy.direction=n,this}connectedTo(n){return this._siblings=n.slice(),this}withOrientation(n){return this._sortStrategy.orientation=n,this}withScrollableParents(n){const e=(0,g.fI)(this.element);return this._scrollableElements=-1===n.indexOf(e)?[e,...n]:n.slice(),this}getScrollableParents(){return this._scrollableElements}getItemIndex(n){return this._isDragging?this._sortStrategy.getItemIndex(n):this._draggables.indexOf(n)}isReceiving(){return this._activeSiblings.size>0}_sortItem(n,e,i,s){if(this.sortingDisabled||!this._clientRect||!bt(this._clientRect,.05,e,i))return;const a=this._sortStrategy.sort(n,e,i,s);a&&this.sorted.next({previousIndex:a.previousIndex,currentIndex:a.currentIndex,container:this,item:n})}_startScrollingIfNecessary(n,e){if(this.autoScrollDisabled)return;let i,s=0,a=0;if(this._parentPositions.positions.forEach((r,l)=>{l===this._document||!r.clientRect||i||bt(r.clientRect,.05,n,e)&&([s,a]=function _e(o,n,e,i){const s=Ot(n,i),a=Et(n,e);let r=0,l=0;if(s){const d=o.scrollTop;1===s?d>0&&(r=1):o.scrollHeight-d>o.clientHeight&&(r=2)}if(a){const d=o.scrollLeft;1===a?d>0&&(l=1):o.scrollWidth-d>o.clientWidth&&(l=2)}return[r,l]}(l,r.clientRect,n,e),(s||a)&&(i=l))}),!s&&!a){const{width:r,height:l}=this._viewportRuler.getViewportSize(),d={width:r,height:l,top:0,right:r,bottom:l,left:0};s=Ot(d,e),a=Et(d,n),i=window}i&&(s!==this._verticalScrollDirection||a!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=s,this._horizontalScrollDirection=a,this._scrollNode=i,(s||a)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){const n=(0,g.fI)(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=n.msScrollSnapType||n.scrollSnapType||"",n.scrollSnapType=n.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){const n=(0,g.fI)(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(n).clientRect}_reset(){this._isDragging=!1;const n=(0,g.fI)(this.element).style;n.scrollSnapType=n.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(e=>e._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_isOverContainer(n,e){return null!=this._clientRect&&ct(this._clientRect,n,e)}_getSiblingContainerFromPosition(n,e,i){return this._siblings.find(s=>s._canReceive(n,e,i))}_canReceive(n,e,i){if(!this._clientRect||!ct(this._clientRect,e,i)||!this.enterPredicate(n,this))return!1;const s=this._getShadowRoot().elementFromPoint(e,i);if(!s)return!1;const a=(0,g.fI)(this.element);return s===a||a.contains(s)}_startReceiving(n,e){const i=this._activeSiblings;!i.has(n)&&e.every(s=>this.enterPredicate(s,this)||this._draggables.indexOf(s)>-1)&&(i.add(n),this._cacheParentPositions(),this._listenToScrollEvents())}_stopReceiving(n){this._activeSiblings.delete(n),this._viewportScrollSubscription.unsubscribe()}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(n=>{if(this.isDragging()){const e=this._parentPositions.handleScroll(n);e&&this._sortStrategy.updateOnScroll(e.top,e.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const n=(0,T.kV)((0,g.fI)(this.element));this._cachedShadowRoot=n||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){const n=this._sortStrategy.getActiveItemsSnapshot().filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,n))}}function Ot(o,n){const{top:e,bottom:i,height:s}=o,a=.05*s;return n>=e-a&&n<=e+a?1:n>=i-a&&n<=i+a?2:0}function Et(o,n){const{left:e,right:i,width:s}=o,a=.05*s;return n>=e-a&&n<=e+a?1:n>=i-a&&n<=i+a?2:0}const tt=(0,T.i$)({passive:!1,capture:!0});let fe=(()=>{class o{constructor(e,i){this._ngZone=e,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=[],this._globalListeners=new Map,this._draggingPredicate=s=>s.isDragging(),this.pointerMove=new v.x,this.pointerUp=new v.x,this.scroll=new v.x,this._preventDefaultWhileDragging=s=>{this._activeDragInstances.length>0&&s.preventDefault()},this._persistentTouchmoveListener=s=>{this._activeDragInstances.length>0&&(this._activeDragInstances.some(this._draggingPredicate)&&s.preventDefault(),this.pointerMove.next(s))},this._document=i}registerDropContainer(e){this._dropInstances.has(e)||this._dropInstances.add(e)}registerDragItem(e){this._dragInstances.add(e),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,tt)})}removeDropContainer(e){this._dropInstances.delete(e)}removeDragItem(e){this._dragInstances.delete(e),this.stopDragging(e),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,tt)}startDragging(e,i){if(!(this._activeDragInstances.indexOf(e)>-1)&&(this._activeDragInstances.push(e),1===this._activeDragInstances.length)){const s=i.type.startsWith("touch");this._globalListeners.set(s?"touchend":"mouseup",{handler:a=>this.pointerUp.next(a),options:!0}).set("scroll",{handler:a=>this.scroll.next(a),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:tt}),s||this._globalListeners.set("mousemove",{handler:a=>this.pointerMove.next(a),options:tt}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((a,r)=>{this._document.addEventListener(r,a.handler,a.options)})})}}stopDragging(e){const i=this._activeDragInstances.indexOf(e);i>-1&&(this._activeDragInstances.splice(i,1),0===this._activeDragInstances.length&&this._clearGlobalListeners())}isDragging(e){return this._activeDragInstances.indexOf(e)>-1}scrolled(e){const i=[this.scroll];return e&&e!==this._document&&i.push(new ft.y(s=>this._ngZone.runOutsideAngular(()=>{const r=l=>{this._activeDragInstances.length&&s.next(l)};return e.addEventListener("scroll",r,!0),()=>{e.removeEventListener("scroll",r,!0)}}))),(0,R.T)(...i)}ngOnDestroy(){this._dragInstances.forEach(e=>this.removeDragItem(e)),this._dropInstances.forEach(e=>this.removeDropContainer(e)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((e,i)=>{this._document.removeEventListener(i,e.handler,e.options)}),this._globalListeners.clear()}}return o.\u0275fac=function(e){return new(e||o)(t.LFG(t.R0b),t.LFG(m.K0))},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();const ve={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let pt=(()=>{class o{constructor(e,i,s,a){this._document=e,this._ngZone=i,this._viewportRuler=s,this._dragDropRegistry=a}createDrag(e,i=ve){return new ue(e,i,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(e){return new me(e,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}}return o.\u0275fac=function(e){return new(e||o)(t.LFG(m.K0),t.LFG(t.R0b),t.LFG(y.rL),t.LFG(fe))},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();const Rt=new t.OlP("CDK_DRAG_PARENT"),Ut=new t.OlP("CdkDropListGroup"),Lt=new t.OlP("CDK_DRAG_CONFIG");let Ce=0;const qt=new t.OlP("CdkDropList");let be=(()=>{class o{constructor(e,i,s,a,r,l,d){this.element=e,this._changeDetectorRef=s,this._scrollDispatcher=a,this._dir=r,this._group=l,this._destroyed=new v.x,this.connectedTo=[],this.id="cdk-drop-list-"+Ce++,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.dropped=new t.vpe,this.entered=new t.vpe,this.exited=new t.vpe,this.sorted=new t.vpe,this._unsortedItems=new Set,this._dropListRef=i.createDropList(e),this._dropListRef.data=this,d&&this._assignDefaults(d),this._dropListRef.enterPredicate=(c,p)=>this.enterPredicate(c.data,p.data),this._dropListRef.sortPredicate=(c,p,_)=>this.sortPredicate(c,p.data,_.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),o._dropLists.push(this),l&&l._items.add(this)}get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(e){this._dropListRef.disabled=this._disabled=(0,g.Ig)(e)}addItem(e){this._unsortedItems.add(e),this._dropListRef.isDragging()&&this._syncItemsWithRef()}removeItem(e){this._unsortedItems.delete(e),this._dropListRef.isDragging()&&this._syncItemsWithRef()}getSortedItems(){return Array.from(this._unsortedItems).sort((e,i)=>e._dragRef.getVisibleElement().compareDocumentPosition(i._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){const e=o._dropLists.indexOf(this);e>-1&&o._dropLists.splice(e,1),this._group&&this._group._items.delete(this),this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(e){this._dir&&this._dir.change.pipe((0,W.O)(this._dir.value),(0,Z.R)(this._destroyed)).subscribe(i=>e.withDirection(i)),e.beforeStarted.subscribe(()=>{const i=(0,g.Eq)(this.connectedTo).map(s=>"string"==typeof s?o._dropLists.find(r=>r.id===s):s);if(this._group&&this._group._items.forEach(s=>{-1===i.indexOf(s)&&i.push(s)}),!this._scrollableParentsResolved){const s=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(a=>a.getElementRef().nativeElement);this._dropListRef.withScrollableParents(s),this._scrollableParentsResolved=!0}e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.sortingDisabled=(0,g.Ig)(this.sortingDisabled),e.autoScrollDisabled=(0,g.Ig)(this.autoScrollDisabled),e.autoScrollStep=(0,g.su)(this.autoScrollStep,2),e.connectedTo(i.filter(s=>s&&s!==this).map(s=>s._dropListRef)).withOrientation(this.orientation)})}_handleEvents(e){e.beforeStarted.subscribe(()=>{this._syncItemsWithRef(),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(i=>{this.entered.emit({container:this,item:i.item.data,currentIndex:i.currentIndex})}),e.exited.subscribe(i=>{this.exited.emit({container:this,item:i.item.data}),this._changeDetectorRef.markForCheck()}),e.sorted.subscribe(i=>{this.sorted.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:i.item.data})}),e.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,item:i.item.data,isPointerOverContainer:i.isPointerOverContainer,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()})}_assignDefaults(e){const{lockAxis:i,draggingDisabled:s,sortingDisabled:a,listAutoScrollDisabled:r,listOrientation:l}=e;this.disabled=s??!1,this.sortingDisabled=a??!1,this.autoScrollDisabled=r??!1,this.orientation=l||"vertical",i&&(this.lockAxis=i)}_syncItemsWithRef(){this._dropListRef.withItems(this.getSortedItems().map(e=>e._dragRef))}}return o._dropLists=[],o.\u0275fac=function(e){return new(e||o)(t.Y36(t.SBq),t.Y36(pt),t.Y36(t.sBO),t.Y36(y.mF),t.Y36(at.Is,8),t.Y36(Ut,12),t.Y36(Lt,8))},o.\u0275dir=t.lG2({type:o,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(e,i){2&e&&(t.uIk("id",i.id),t.ekj("cdk-drop-list-disabled",i.disabled)("cdk-drop-list-dragging",i._dropListRef.isDragging())("cdk-drop-list-receiving",i._dropListRef.isReceiving()))},inputs:{connectedTo:["cdkDropListConnectedTo","connectedTo"],data:["cdkDropListData","data"],orientation:["cdkDropListOrientation","orientation"],id:"id",lockAxis:["cdkDropListLockAxis","lockAxis"],disabled:["cdkDropListDisabled","disabled"],sortingDisabled:["cdkDropListSortingDisabled","sortingDisabled"],enterPredicate:["cdkDropListEnterPredicate","enterPredicate"],sortPredicate:["cdkDropListSortPredicate","sortPredicate"],autoScrollDisabled:["cdkDropListAutoScrollDisabled","autoScrollDisabled"],autoScrollStep:["cdkDropListAutoScrollStep","autoScrollStep"]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[t._Bn([{provide:Ut,useValue:void 0},{provide:qt,useExisting:o}])]}),o})();const Ft=new t.OlP("CdkDragHandle"),ye=new t.OlP("CdkDragPlaceholder"),Te=new t.OlP("CdkDragPreview");let De=(()=>{class o{constructor(e,i,s,a,r,l,d,c,p,_,b){this.element=e,this.dropContainer=i,this._ngZone=a,this._viewContainerRef=r,this._dir=d,this._changeDetectorRef=p,this._selfHandle=_,this._parentDrag=b,this._destroyed=new v.x,this.started=new t.vpe,this.released=new t.vpe,this.ended=new t.vpe,this.entered=new t.vpe,this.exited=new t.vpe,this.dropped=new t.vpe,this.moved=new ft.y(k=>{const O=this._dragRef.moved.pipe((0,re.U)(N=>({source:this,pointerPosition:N.pointerPosition,event:N.event,delta:N.delta,distance:N.distance}))).subscribe(k);return()=>{O.unsubscribe()}}),this._dragRef=c.createDrag(e,{dragStartThreshold:l&&null!=l.dragStartThreshold?l.dragStartThreshold:5,pointerDirectionChangeThreshold:l&&null!=l.pointerDirectionChangeThreshold?l.pointerDirectionChangeThreshold:5,zIndex:l?.zIndex}),this._dragRef.data=this,o._dragInstances.push(this),l&&this._assignDefaults(l),i&&(this._dragRef._withDropContainer(i._dropListRef),i.addItem(this)),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}get disabled(){return this._disabled||this.dropContainer&&this.dropContainer.disabled}set disabled(e){this._disabled=(0,g.Ig)(e),this._dragRef.disabled=this._disabled}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(e){this._dragRef.setFreeDragPosition(e)}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe((0,st.q)(1),(0,Z.R)(this._destroyed)).subscribe(()=>{this._updateRootElement(),this._setupHandlesListener(),this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)})})}ngOnChanges(e){const i=e.rootElementSelector,s=e.freeDragPosition;i&&!i.firstChange&&this._updateRootElement(),s&&!s.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this);const e=o._dragInstances.indexOf(this);e>-1&&o._dragInstances.splice(e,1),this._ngZone.runOutsideAngular(()=>{this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_updateRootElement(){const e=this.element.nativeElement;let i=e;this.rootElementSelector&&(i=void 0!==e.closest?e.closest(this.rootElementSelector):e.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(i||e)}_getBoundaryElement(){const e=this.boundaryElement;return e?"string"==typeof e?this.element.nativeElement.closest(e):(0,g.fI)(e):null}_syncInputs(e){e.beforeStarted.subscribe(()=>{if(!e.isDragging()){const i=this._dir,s=this.dragStartDelay,a=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,r=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.dragStartDelay="object"==typeof s&&s?s:(0,g.su)(s),e.constrainPosition=this.constrainPosition,e.previewClass=this.previewClass,e.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(a).withPreviewTemplate(r).withPreviewContainer(this.previewContainer||"global"),i&&e.withDirection(i.value)}}),e.beforeStarted.pipe((0,st.q)(1)).subscribe(()=>{if(this._parentDrag)return void e.withParent(this._parentDrag._dragRef);let i=this.element.nativeElement.parentElement;for(;i;){if(i.classList.contains("cdk-drag")){e.withParent(o._dragInstances.find(s=>s.element.nativeElement===i)?._dragRef||null);break}i=i.parentElement}})}_handleEvents(e){e.started.subscribe(i=>{this.started.emit({source:this,event:i.event}),this._changeDetectorRef.markForCheck()}),e.released.subscribe(i=>{this.released.emit({source:this,event:i.event})}),e.ended.subscribe(i=>{this.ended.emit({source:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(i=>{this.entered.emit({container:i.container.data,item:this,currentIndex:i.currentIndex})}),e.exited.subscribe(i=>{this.exited.emit({container:i.container.data,item:this})}),e.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,isPointerOverContainer:i.isPointerOverContainer,item:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event})})}_assignDefaults(e){const{lockAxis:i,dragStartDelay:s,constrainPosition:a,previewClass:r,boundaryElement:l,draggingDisabled:d,rootElementSelector:c,previewContainer:p}=e;this.disabled=d??!1,this.dragStartDelay=s||0,i&&(this.lockAxis=i),a&&(this.constrainPosition=a),r&&(this.previewClass=r),l&&(this.boundaryElement=l),c&&(this.rootElementSelector=c),p&&(this.previewContainer=p)}_setupHandlesListener(){this._handles.changes.pipe((0,W.O)(this._handles),(0,le.b)(e=>{const i=e.filter(s=>s._parentDrag===this).map(s=>s.element);this._selfHandle&&this.rootElementSelector&&i.push(this.element),this._dragRef.withHandles(i)}),(0,de.w)(e=>(0,R.T)(...e.map(i=>i._stateChanges.pipe((0,W.O)(i))))),(0,Z.R)(this._destroyed)).subscribe(e=>{const i=this._dragRef,s=e.element.nativeElement;e.disabled?i.disableHandle(s):i.enableHandle(s)})}}return o._dragInstances=[],o.\u0275fac=function(e){return new(e||o)(t.Y36(t.SBq),t.Y36(qt,12),t.Y36(m.K0),t.Y36(t.R0b),t.Y36(t.s_b),t.Y36(Lt,8),t.Y36(at.Is,8),t.Y36(pt),t.Y36(t.sBO),t.Y36(Ft,10),t.Y36(Rt,12))},o.\u0275dir=t.lG2({type:o,selectors:[["","cdkDrag",""]],contentQueries:function(e,i,s){if(1&e&&(t.Suo(s,Te,5),t.Suo(s,ye,5),t.Suo(s,Ft,5)),2&e){let a;t.iGM(a=t.CRH())&&(i._previewTemplate=a.first),t.iGM(a=t.CRH())&&(i._placeholderTemplate=a.first),t.iGM(a=t.CRH())&&(i._handles=a)}},hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(e,i){2&e&&t.ekj("cdk-drag-disabled",i.disabled)("cdk-drag-dragging",i._dragRef.isDragging())},inputs:{data:["cdkDragData","data"],lockAxis:["cdkDragLockAxis","lockAxis"],rootElementSelector:["cdkDragRootElement","rootElementSelector"],boundaryElement:["cdkDragBoundary","boundaryElement"],dragStartDelay:["cdkDragStartDelay","dragStartDelay"],freeDragPosition:["cdkDragFreeDragPosition","freeDragPosition"],disabled:["cdkDragDisabled","disabled"],constrainPosition:["cdkDragConstrainPosition","constrainPosition"],previewClass:["cdkDragPreviewClass","previewClass"],previewContainer:["cdkDragPreviewContainer","previewContainer"]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[t._Bn([{provide:Rt,useExisting:o}]),t.TTD]}),o})(),Me=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({providers:[pt],imports:[y.ZD]}),o})();var D=h(3154),L=h(7185),Nt=h(8002),V=h(1318);let Ie=(()=>{class o{constructor(e){this.httpService=e}getChannel(){return this.httpService.post("/api/Channel/GetChannel",{})}testShopID(e){return this.httpService.post("/api/Channel/TestShopID",e)}updateChannelIndex(e){return this.httpService.post("/api/Channel/UpdateChannelIndex",e)}deleteChannel(e){return this.httpService.post("/api/Channel/DeleteChannel",e)}}return o.\u0275fac=function(e){return new(e||o)(t.LFG(V.O))},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();var et=h(266);function xe(o,n){1&o&&(t.TgZ(0,"a",12),t._uU(1,"Add"),t.qZA())}function we(o,n){if(1&o){const e=t.EpF();t.ynx(0),t.TgZ(1,"button",13),t.NdJ("click",function(){t.CHM(e);const s=t.oxw();return t.KtG(s.onSaveDragAndDrop())}),t._UZ(2,"i",14),t._uU(3,"Save Changes "),t.qZA(),t.BQk()}}function Ze(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"button",13),t.NdJ("click",function(){t.CHM(e);const s=t.oxw();return t.KtG(s.cdkDragDisabled=!s.cdkDragDisabled)}),t._UZ(1,"i",14),t._uU(2,"Sort "),t.qZA()}}function Pe(o,n){if(1&o&&(t.TgZ(0,"div"),t._uU(1," Expiration: "),t.TgZ(2,"span",32),t._uU(3),t.ALo(4,"date"),t.qZA()()),2&o){const e=t.oxw().$implicit;t.xp6(3),t.Oqu(t.xi3(4,1,null==e?null:e.ExpiredTime,"dd MMM yyyy"))}}function Ae(o,n){if(1&o&&(t.TgZ(0,"span",34)(1,"button",35),t._uU(2),t.qZA()()),2&o){const e=t.oxw(2).$implicit,i=t.oxw();t.Q6J("matTooltip",i.filterProductInventory(e.POSInventoryOutletArray,4,e.POSInventoryOutletArray.length)),t.xp6(2),t.hij(" ",e.POSInventoryOutletArray.length-3," ")}}function ke(o,n){if(1&o&&(t.TgZ(0,"span",23),t._uU(1),t.YNc(2,Ae,3,2,"span",33),t.qZA()),2&o){const e=t.oxw().$implicit,i=t.oxw();t.xp6(1),t.hij(" ",i.filterProductInventory(e.POSInventoryOutletArray,1,3)," "),t.xp6(1),t.Q6J("ngIf",e.POSInventoryOutletArray.length>3)}}function Oe(o,n){1&o&&(t.TgZ(0,"span",23),t._uU(1," [SUM All Outlet] "),t.qZA())}function Ee(o,n){if(1&o&&(t.TgZ(0,"div",22),t._uU(1,"Additional Item: "),t.TgZ(2,"span",23),t._uU(3),t.qZA()()),2&o){const e=t.oxw().$implicit;t.xp6(3),t.hij(" ",null==e?null:e.Additionalitem,"")}}const P=function(o){return{"bg-gradient-warning":o}},Jt=function(){return["/menu/channel/marketplace/view"]},Ht=function(o){return{ID:o}};function Re(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"tr",15)(1,"td",16)(2,"a",17),t._UZ(3,"img",18),t.qZA()(),t.TgZ(4,"td",19)(5,"a",17)(6,"span",20),t._uU(7),t.qZA()(),t._UZ(8,"br"),t._uU(9),t._UZ(10,"br"),t.qZA(),t.TgZ(11,"td",21)(12,"div",22),t._uU(13,"Sync Orders: "),t.TgZ(14,"span",23),t._uU(15),t.qZA()(),t.TgZ(16,"div",22),t._uU(17," Product Sync: "),t.TgZ(18,"span",23),t._uU(19),t.ALo(20,"date"),t.qZA()(),t.YNc(21,Pe,5,4,"div",24),t.qZA(),t.TgZ(22,"td",21)(23,"div",25),t._uU(24,"New Order To: "),t.TgZ(25,"span",23),t._uU(26),t.qZA()(),t.TgZ(27,"div",25),t._uU(28," Dispatch Orders From: "),t.TgZ(29,"span",23),t._uU(30),t.qZA()(),t.TgZ(31,"div",26),t._uU(32,"Product Inventory: "),t.YNc(33,ke,3,2,"span",27),t.YNc(34,Oe,2,0,"ng-template",null,28,t.W1O),t.qZA(),t.TgZ(36,"div",22),t._uU(37,"Minimum Inventory: "),t.TgZ(38,"span",23),t._uU(39),t.qZA()(),t.YNc(40,Ee,4,1,"div",29),t.qZA(),t.TgZ(41,"td",21)(42,"div",30)(43,"div",25),t._uU(44,"Payment: "),t.TgZ(45,"span",23),t._uU(46),t.qZA()(),t.TgZ(47,"div",25),t._uU(48,"Tag: "),t.TgZ(49,"span",23),t._uU(50),t.qZA()(),t.TgZ(51,"div",25),t._uU(52,"Tax : "),t.TgZ(53,"span",23),t._uU(54),t.qZA()()()(),t.TgZ(55,"td")(56,"button",31),t.NdJ("click",function(){const a=t.CHM(e).$implicit,r=t.oxw();return t.KtG(r.onTestChannel(a))}),t._uU(57,"Test"),t.qZA()()()}if(2&o){const e=n.$implicit,i=t.MAs(35),s=t.oxw();t.Q6J("cdkDragDisabled",s.cdkDragDisabled)("matTooltip",null!=e&&e.isComplete?"":"Please complete your channel configuration"),t.xp6(1),t.Q6J("ngClass",t.VKq(32,P,s.isEmpty(null==e?null:e.isComplete))),t.xp6(1),t.Q6J("routerLink",t.DdM(34,Jt))("queryParams",t.VKq(35,Ht,e.ID)),t.xp6(1),t.Q6J("src",s.getChannelLogo(null==e?null:e.TypeID),t.LSH),t.xp6(1),t.Q6J("ngClass",t.VKq(37,P,s.isEmpty(null==e?null:e.isComplete))),t.xp6(1),t.Q6J("routerLink",t.DdM(39,Jt))("queryParams",t.VKq(40,Ht,e.ID)),t.xp6(2),t.Oqu(null==e?null:e.Name),t.xp6(2),t.hij(" ",null==e?null:e.URL," "),t.xp6(6),t.hij(" ",null==e?null:e.SyncOrder,""),t.xp6(4),t.Oqu(t.xi3(20,29,null==e?null:e.LastSync,"dd MMM yyyy HH:mm")),t.xp6(2),t.Q6J("ngIf",(0==e.TypeID||5==e.TypeID||6==e.TypeID)&&(null==e?null:e.ExpiredTime)),t.xp6(2),t.Q6J("ngClass",t.VKq(42,P,s.isEmpty(null==e?null:e.POSOutlet))),t.xp6(3),t.hij(" ",null==e?null:e.POSOutlet,""),t.xp6(1),t.Q6J("ngClass",t.VKq(44,P,s.isEmpty(null==e?null:e.POSDeliveryOutlet))),t.xp6(3),t.hij(" ",null==e?null:e.POSDeliveryOutlet,""),t.xp6(3),t.Q6J("ngIf",null==e?null:e.POSInventoryOutlet)("ngIfElse",i),t.xp6(6),t.hij(" ",null==e?null:e.MinimumInventory,""),t.xp6(1),t.Q6J("ngIf",null==e?null:e.Additionalitem),t.xp6(3),t.Q6J("ngClass",t.VKq(46,P,s.isEmpty(null==e?null:e.POSInvoicePaymentMethod))),t.xp6(3),t.Oqu(null==e?null:e.POSInvoicePaymentMethod),t.xp6(1),t.Q6J("ngClass",t.VKq(48,P,s.isEmpty(null==e?null:e.POSSalesOrderType))),t.xp6(3),t.hij(" ",null==e?null:e.POSSalesOrderType,""),t.xp6(1),t.Q6J("ngClass",t.VKq(50,P,s.isEmpty(null==e?null:e.POSTax))),t.xp6(3),t.Oqu(null!=e&&e.POSTax?null==e?null:e.POSTax:"-"),t.xp6(2),t.Q6J("hidden",4==(null==e?null:e.TypeID))}}let Ue=(()=>{class o{constructor(e,i,s){this.toastr=e,this.konversi=i,this.channelService=s,this.setup=!1,this.channel(),this.pageData={Title:"Channel",Nav:[{Title:"Channel",Url:"/menu/channel",Active:!0},{Title:"POS",Url:"/menu/channel/config",Active:!1}]},this.cdkDragDisabled=!0}ngOnInit(){this.konversi.GetRoles().filter(i=>"Setup"==i||"Stp"==i).length>0&&(this.setup=!0)}channel(){this.channelService.getChannel().subscribe(e=>{this.channels=e.Data,this.checkFieldComplete()})}checkFieldComplete(){this.channels=this.channels.map(e=>(e.isComplete=!1,D.g.IsNotEmpty(e.POSOutlet)&&D.g.IsNotEmpty(e.POSTax)&&D.g.IsNotEmpty(e.POSInvoicePaymentMethod)&&D.g.IsNotEmpty(e.POSSalesOrderType)&&D.g.IsNotEmpty(e.POSDeliveryOutlet)&&(e.isComplete=!0),e))}isEmpty(e){return D.g.IsEmpty(e)}onTestChannel(e){this.channelService.testShopID(e).subscribe(i=>{this.channel(),this.showTostrSuccessTestShopID(i)})}showTostrSuccessTestShopID(e){let i="";for(var s in e)i+=s+" : "+e[s]+"<br/>";this.toastr.success(i,"Success",{enableHtml:!0,closeButton:!0,positionClass:"toast-bottom-right"})}onDeleteChannel(e){confirm("Want to delete?")&&this.channelService.deleteChannel(e).subscribe(s=>{this.channel()})}onDrop(e){Pt(this.channels,e.previousIndex,e.currentIndex)}onSaveDragAndDrop(){this.cdkDragDisabled=!0,this.channelService.updateChannelIndex(this.channels).subscribe({next:()=>{this.toastr.success("Channel list successfully saved","Success")}})}filterProductInventory(e,i,s){let a=e;return a=a.filter((l,d)=>(d+=1)>=i&&d<=s),a.join(", ")}getChannelLogo(e){return D.g.getChannelLogoByTypeId(e)}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(L._W),t.Y36(Nt.e),t.Y36(Ie))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-marketplace"]],decls:26,vars:8,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","class","btn btn-success btn-fill btn-lg text-white","routerLink","/menu/channel/marketplace/add",4,"ngIf"],[4,"ngIf","ngIfElse"],["SORT_BTN",""],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],["cdkDropList","",3,"cdkDropListDropped"],["cdkDrag","",3,"cdkDragDisabled","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(e,i){if(1&e&&(t.TgZ(0,"mainpanel",0)(1,"actions"),t.YNc(2,xe,2,0,"a",1),t.YNc(3,we,4,0,"ng-container",2),t.YNc(4,Ze,3,0,"ng-template",null,3,t.W1O),t.qZA(),t.TgZ(6,"content")(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"table",8)(12,"thead")(13,"tr",9),t._UZ(14,"th"),t.TgZ(15,"th"),t._uU(16,"Channel"),t.qZA(),t.TgZ(17,"th"),t._uU(18,"Sync Info"),t.qZA(),t.TgZ(19,"th"),t._uU(20,"POS Outlet"),t.qZA(),t.TgZ(21,"th"),t._uU(22,"POS Orders"),t.qZA(),t._UZ(23,"th"),t.qZA()(),t.TgZ(24,"tbody",10),t.NdJ("cdkDropListDropped",function(a){return i.onDrop(a)}),t.YNc(25,Re,58,52,"tr",11),t.qZA()()()()()()()()),2&e){const s=t.MAs(5);t.Q6J("headerTitle","Marketplace")("pageData",i.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("ngIf",i.setup),t.xp6(1),t.Q6J("ngIf",!i.cdkDragDisabled)("ngIfElse",s),t.xp6(22),t.Q6J("ngForOf",i.channels)}},dependencies:[m.mk,m.sg,m.O5,f.p,C.yS,be,De,et.gM,m.uU],styles:[".btn-circle.btn-sm[_ngcontent-%COMP%]{width:18px;height:18px;padding:0;border-radius:60px;font-size:10px;text-align:center;background-color:#00f;border-color:#00f;color:#fff}table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] > td.vertical-align-top[_ngcontent-%COMP%]{vertical-align:inherit}"]}),o})();var q=h(8063);class Le{constructor(){this.ID="00000000-0000-0000-0000-000000000000",this.ShopID=0,this.Name="",this.TypeID=0,this.LastProductSync=new Date,this.POSOutlet="",this.POSTax="",this.POSInvoicePaymentMethod="",this.POSSalesOrderType="",this.URL="",this.POSDeliveryOutlet="",this.ProductCategoryDefault=null,this.SyncOrder=!0,this.CustomerDefaultEmail=null,this.InventoryLog=2,this.IsComplete=!1,this.OrderLog=3,this.SyncInventory=!0,this.POSInventoryOutlet="",this.POSWriteOff="",this.Register="",this.POSInventoryOutletArray=[],this.MinimumInventory="",this.Additionalitem="",this.ConsumerKey="",this.ConsumerSecret="",this.ShopIDString="",this.Index=0}}class ut{constructor(){this.Host="",this.Username="",this.Password="",this.HostNotification="",this.UsernameNotification="",this.PasswordNotification="",this.ChannelInventoryOutlet="",this.OrderPaymentAmountType=0,this.ClientSecretGuid="",this.IncludeParentInventory=!1,this.IncludeChildrenInventory=!1,this.CompositeVisible=!1}}var M=h(9521),I=h(3238),qe=h(5017),gt=h(9549);const Fe=["*"],Qt=new t.OlP("MatChipRemove"),Yt=new t.OlP("MatChipAvatar"),Vt=new t.OlP("MatChipTrailingIcon");class Ne{constructor(n){this._elementRef=n}}const Je=(0,I.sb)((0,I.pj)((0,I.Kr)(Ne),"primary"),-1);let it=(()=>{class o extends Je{constructor(e,i,s,a,r,l,d,c){super(e),this._ngZone=i,this._changeDetectorRef=r,this._hasFocus=!1,this.chipListSelectable=!0,this._chipListMultiple=!1,this._chipListDisabled=!1,this.role="option",this._selected=!1,this._selectable=!0,this._disabled=!1,this._removable=!0,this._onFocus=new v.x,this._onBlur=new v.x,this.selectionChange=new t.vpe,this.destroyed=new t.vpe,this.removed=new t.vpe,this._addHostClassName(),this._chipRippleTarget=l.createElement("div"),this._chipRippleTarget.classList.add("mat-chip-ripple"),this._elementRef.nativeElement.appendChild(this._chipRippleTarget),this._chipRipple=new I.IR(this,i,this._chipRippleTarget,s),this._chipRipple.setupTriggerEvents(e),this.rippleConfig=a||{},this._animationsDisabled="NoopAnimations"===d,this.tabIndex=null!=c&&parseInt(c)||-1}get rippleDisabled(){return this.disabled||this.disableRipple||this._animationsDisabled||!!this.rippleConfig.disabled}get selected(){return this._selected}set selected(e){const i=(0,g.Ig)(e);i!==this._selected&&(this._selected=i,this._dispatchSelectionChange())}get value(){return void 0!==this._value?this._value:this._elementRef.nativeElement.textContent}set value(e){this._value=e}get selectable(){return this._selectable&&this.chipListSelectable}set selectable(e){this._selectable=(0,g.Ig)(e)}get disabled(){return this._chipListDisabled||this._disabled}set disabled(e){this._disabled=(0,g.Ig)(e)}get removable(){return this._removable}set removable(e){this._removable=(0,g.Ig)(e)}get ariaSelected(){return this.selectable&&(this._chipListMultiple||this.selected)?this.selected.toString():null}_addHostClassName(){const e="mat-basic-chip",i=this._elementRef.nativeElement;i.hasAttribute(e)||i.tagName.toLowerCase()===e?i.classList.add(e):i.classList.add("mat-standard-chip")}ngOnDestroy(){this.destroyed.emit({chip:this}),this._chipRipple._removeTriggerEvents()}select(){this._selected||(this._selected=!0,this._dispatchSelectionChange(),this._changeDetectorRef.markForCheck())}deselect(){this._selected&&(this._selected=!1,this._dispatchSelectionChange(),this._changeDetectorRef.markForCheck())}selectViaInteraction(){this._selected||(this._selected=!0,this._dispatchSelectionChange(!0),this._changeDetectorRef.markForCheck())}toggleSelected(e=!1){return this._selected=!this.selected,this._dispatchSelectionChange(e),this._changeDetectorRef.markForCheck(),this.selected}focus(){this._hasFocus||(this._elementRef.nativeElement.focus(),this._onFocus.next({chip:this})),this._hasFocus=!0}remove(){this.removable&&this.removed.emit({chip:this})}_handleClick(e){this.disabled&&e.preventDefault()}_handleKeydown(e){if(!this.disabled)switch(e.keyCode){case M.yY:case M.ZH:this.remove(),e.preventDefault();break;case M.L_:this.selectable&&this.toggleSelected(!0),e.preventDefault()}}_blur(){this._ngZone.onStable.pipe((0,st.q)(1)).subscribe(()=>{this._ngZone.run(()=>{this._hasFocus=!1,this._onBlur.next({chip:this})})})}_dispatchSelectionChange(e=!1){this.selectionChange.emit({source:this,isUserInput:e,selected:this._selected})}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(t.SBq),t.Y36(t.R0b),t.Y36(T.t4),t.Y36(I.Y2,8),t.Y36(t.sBO),t.Y36(m.K0),t.Y36(t.QbO,8),t.$8M("tabindex"))},o.\u0275dir=t.lG2({type:o,selectors:[["mat-basic-chip"],["","mat-basic-chip",""],["mat-chip"],["","mat-chip",""]],contentQueries:function(e,i,s){if(1&e&&(t.Suo(s,Yt,5),t.Suo(s,Vt,5),t.Suo(s,Qt,5)),2&e){let a;t.iGM(a=t.CRH())&&(i.avatar=a.first),t.iGM(a=t.CRH())&&(i.trailingIcon=a.first),t.iGM(a=t.CRH())&&(i.removeIcon=a.first)}},hostAttrs:[1,"mat-chip","mat-focus-indicator"],hostVars:15,hostBindings:function(e,i){1&e&&t.NdJ("click",function(a){return i._handleClick(a)})("keydown",function(a){return i._handleKeydown(a)})("focus",function(){return i.focus()})("blur",function(){return i._blur()}),2&e&&(t.uIk("tabindex",i.disabled?null:i.tabIndex)("role",i.role)("disabled",i.disabled||null)("aria-disabled",i.disabled.toString())("aria-selected",i.ariaSelected),t.ekj("mat-chip-selected",i.selected)("mat-chip-with-avatar",i.avatar)("mat-chip-with-trailing-icon",i.trailingIcon||i.removeIcon)("mat-chip-disabled",i.disabled)("_mat-animation-noopable",i._animationsDisabled))},inputs:{color:"color",disableRipple:"disableRipple",tabIndex:"tabIndex",role:"role",selected:"selected",value:"value",selectable:"selectable",disabled:"disabled",removable:"removable"},outputs:{selectionChange:"selectionChange",destroyed:"destroyed",removed:"removed"},exportAs:["matChip"],features:[t.qOj]}),o})(),Bt=(()=>{class o{constructor(e,i){this._parentChip=e,"BUTTON"===i.nativeElement.nodeName&&i.nativeElement.setAttribute("type","button")}_handleClick(e){const i=this._parentChip;i.removable&&!i.disabled&&i.remove(),e.stopPropagation(),e.preventDefault()}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(it),t.Y36(t.SBq))},o.\u0275dir=t.lG2({type:o,selectors:[["","matChipRemove",""]],hostAttrs:[1,"mat-chip-remove","mat-chip-trailing-icon"],hostBindings:function(e,i){1&e&&t.NdJ("click",function(a){return i._handleClick(a)})},features:[t._Bn([{provide:Qt,useExisting:o}])]}),o})();const zt=new t.OlP("mat-chips-default-options"),Ye=(0,I.FD)(class{constructor(o,n,e,i){this._defaultErrorStateMatcher=o,this._parentForm=n,this._parentFormGroup=e,this.ngControl=i,this.stateChanges=new v.x}});let Ve=0;class Be{constructor(n,e){this.source=n,this.value=e}}let Gt=(()=>{class o extends Ye{constructor(e,i,s,a,r,l,d){super(l,a,r,d),this._elementRef=e,this._changeDetectorRef=i,this._dir=s,this.controlType="mat-chip-list",this._lastDestroyedChipIndex=null,this._destroyed=new v.x,this._uid="mat-chip-list-"+Ve++,this._tabIndex=0,this._userTabIndex=null,this._onTouched=()=>{},this._onChange=()=>{},this._multiple=!1,this._compareWith=(c,p)=>c===p,this._disabled=!1,this.ariaOrientation="horizontal",this._selectable=!0,this.change=new t.vpe,this.valueChange=new t.vpe,this.ngControl&&(this.ngControl.valueAccessor=this)}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get role(){return this._explicitRole?this._explicitRole:this.empty?null:"listbox"}set role(e){this._explicitRole=e}get multiple(){return this._multiple}set multiple(e){this._multiple=(0,g.Ig)(e),this._syncChipsState()}get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this.writeValue(e),this._value=e}get id(){return this._chipInput?this._chipInput.id:this._uid}get required(){return this._required??this.ngControl?.control?.hasValidator(u.kI.required)??!1}set required(e){this._required=(0,g.Ig)(e),this.stateChanges.next()}get placeholder(){return this._chipInput?this._chipInput.placeholder:this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}get focused(){return this._chipInput&&this._chipInput.focused||this._hasFocusedChip()}get empty(){return(!this._chipInput||this._chipInput.empty)&&(!this.chips||0===this.chips.length)}get shouldLabelFloat(){return!this.empty||this.focused}get disabled(){return this.ngControl?!!this.ngControl.disabled:this._disabled}set disabled(e){this._disabled=(0,g.Ig)(e),this._syncChipsState()}get selectable(){return this._selectable}set selectable(e){this._selectable=(0,g.Ig)(e),this.chips&&this.chips.forEach(i=>i.chipListSelectable=this._selectable)}set tabIndex(e){this._userTabIndex=e,this._tabIndex=e}get chipSelectionChanges(){return(0,R.T)(...this.chips.map(e=>e.selectionChange))}get chipFocusChanges(){return(0,R.T)(...this.chips.map(e=>e._onFocus))}get chipBlurChanges(){return(0,R.T)(...this.chips.map(e=>e._onBlur))}get chipRemoveChanges(){return(0,R.T)(...this.chips.map(e=>e.destroyed))}ngAfterContentInit(){this._keyManager=new ot.Em(this.chips).withWrap().withVerticalOrientation().withHomeAndEnd().withHorizontalOrientation(this._dir?this._dir.value:"ltr"),this._dir&&this._dir.change.pipe((0,Z.R)(this._destroyed)).subscribe(e=>this._keyManager.withHorizontalOrientation(e)),this._keyManager.tabOut.pipe((0,Z.R)(this._destroyed)).subscribe(()=>{this._allowFocusEscape()}),this.chips.changes.pipe((0,W.O)(null),(0,Z.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 qe.Ov(this.multiple,void 0,!1),this.stateChanges.next()}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==this._disabled&&(this.disabled=!!this.ngControl.disabled))}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete(),this.stateChanges.complete(),this._dropSubscriptions()}registerInput(e){this._chipInput=e,this._elementRef.nativeElement.setAttribute("data-mat-chip-input",e.id)}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}writeValue(e){this.chips&&this._setSelectionByValue(e,!1)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this.stateChanges.next()}onContainerClick(e){this._originatesFromChip(e)||this.focus()}focus(e){this.disabled||this._chipInput&&this._chipInput.focused||(this.chips.length>0?(this._keyManager.setFirstItemActive(),this.stateChanges.next()):(this._focusInput(e),this.stateChanges.next()))}_focusInput(e){this._chipInput&&this._chipInput.focus(e)}_keydown(e){const i=e.target;i&&i.classList.contains("mat-chip")&&(this._keyManager.onKeydown(e),this.stateChanges.next())}_updateTabIndex(){this._tabIndex=this._userTabIndex||(0===this.chips.length?-1:0)}_updateFocusForDestroyedChips(){if(null!=this._lastDestroyedChipIndex)if(this.chips.length){const e=Math.min(this._lastDestroyedChipIndex,this.chips.length-1);this._keyManager.setActiveItem(e)}else this.focus();this._lastDestroyedChipIndex=null}_isValidIndex(e){return e>=0&&e<this.chips.length}_setSelectionByValue(e,i=!0){if(this._clearSelection(),this.chips.forEach(s=>s.deselect()),Array.isArray(e))e.forEach(s=>this._selectValue(s,i)),this._sortValues();else{const s=this._selectValue(e,i);s&&i&&this._keyManager.setActiveItem(s)}}_selectValue(e,i=!0){const s=this.chips.find(a=>null!=a.value&&this._compareWith(a.value,e));return s&&(i?s.selectViaInteraction():s.select(),this._selectionModel.select(s)),s}_initializeSelection(){Promise.resolve().then(()=>{(this.ngControl||this._value)&&(this._setSelectionByValue(this.ngControl?this.ngControl.value:this._value,!1),this.stateChanges.next())})}_clearSelection(e){this._selectionModel.clear(),this.chips.forEach(i=>{i!==e&&i.deselect()}),this.stateChanges.next()}_sortValues(){this._multiple&&(this._selectionModel.clear(),this.chips.forEach(e=>{e.selected&&this._selectionModel.select(e)}),this.stateChanges.next())}_propagateChanges(e){let i=null;i=Array.isArray(this.selected)?this.selected.map(s=>s.value):this.selected?this.selected.value:e,this._value=i,this.change.emit(new Be(this,i)),this.valueChange.emit(i),this._onChange(i),this._changeDetectorRef.markForCheck()}_blur(){this._hasFocusedChip()||this._keyManager.setActiveItem(-1),this.disabled||(this._chipInput?setTimeout(()=>{this.focused||this._markAsTouched()}):this._markAsTouched())}_markAsTouched(){this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next()}_allowFocusEscape(){-1!==this._tabIndex&&(this._tabIndex=-1,setTimeout(()=>{this._tabIndex=this._userTabIndex||0,this._changeDetectorRef.markForCheck()}))}_resetChips(){this._dropSubscriptions(),this._listenToChipsFocus(),this._listenToChipsSelection(),this._listenToChipsRemoved()}_dropSubscriptions(){this._chipFocusSubscription&&(this._chipFocusSubscription.unsubscribe(),this._chipFocusSubscription=null),this._chipBlurSubscription&&(this._chipBlurSubscription.unsubscribe(),this._chipBlurSubscription=null),this._chipSelectionSubscription&&(this._chipSelectionSubscription.unsubscribe(),this._chipSelectionSubscription=null),this._chipRemoveSubscription&&(this._chipRemoveSubscription.unsubscribe(),this._chipRemoveSubscription=null)}_listenToChipsSelection(){this._chipSelectionSubscription=this.chipSelectionChanges.subscribe(e=>{e.source.selected?this._selectionModel.select(e.source):this._selectionModel.deselect(e.source),this.multiple||this.chips.forEach(i=>{!this._selectionModel.isSelected(i)&&i.selected&&i.deselect()}),e.isUserInput&&this._propagateChanges()})}_listenToChipsFocus(){this._chipFocusSubscription=this.chipFocusChanges.subscribe(e=>{let i=this.chips.toArray().indexOf(e.chip);this._isValidIndex(i)&&this._keyManager.updateActiveItem(i),this.stateChanges.next()}),this._chipBlurSubscription=this.chipBlurChanges.subscribe(()=>{this._blur(),this.stateChanges.next()})}_listenToChipsRemoved(){this._chipRemoveSubscription=this.chipRemoveChanges.subscribe(e=>{const i=e.chip,s=this.chips.toArray().indexOf(e.chip);this._isValidIndex(s)&&i._hasFocus&&(this._lastDestroyedChipIndex=s)})}_originatesFromChip(e){let i=e.target;for(;i&&i!==this._elementRef.nativeElement;){if(i.classList.contains("mat-chip"))return!0;i=i.parentElement}return!1}_hasFocusedChip(){return this.chips&&this.chips.some(e=>e._hasFocus)}_syncChipsState(){this.chips&&this.chips.forEach(e=>{e._chipListDisabled=this._disabled,e._chipListMultiple=this.multiple})}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(t.SBq),t.Y36(t.sBO),t.Y36(at.Is,8),t.Y36(u.F,8),t.Y36(u.sg,8),t.Y36(I.rD),t.Y36(u.a5,10))},o.\u0275cmp=t.Xpm({type:o,selectors:[["mat-chip-list"]],contentQueries:function(e,i,s){if(1&e&&t.Suo(s,it,5),2&e){let a;t.iGM(a=t.CRH())&&(i.chips=a)}},hostAttrs:[1,"mat-chip-list"],hostVars:14,hostBindings:function(e,i){1&e&&t.NdJ("focus",function(){return i.focus()})("blur",function(){return i._blur()})("keydown",function(a){return i._keydown(a)}),2&e&&(t.Ikx("id",i._uid),t.uIk("tabindex",i.disabled?null:i._tabIndex)("aria-required",i.role?i.required:null)("aria-disabled",i.disabled.toString())("aria-invalid",i.errorState)("aria-multiselectable",i.multiple)("role",i.role)("aria-orientation",i.ariaOrientation),t.ekj("mat-chip-list-disabled",i.disabled)("mat-chip-list-invalid",i.errorState)("mat-chip-list-required",i.required))},inputs:{role:"role",userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],errorStateMatcher:"errorStateMatcher",multiple:"multiple",compareWith:"compareWith",value:"value",required:"required",placeholder:"placeholder",disabled:"disabled",ariaOrientation:["aria-orientation","ariaOrientation"],selectable:"selectable",tabIndex:"tabIndex"},outputs:{change:"change",valueChange:"valueChange"},exportAs:["matChipList"],features:[t._Bn([{provide:gt.Eo,useExisting:o}]),t.qOj],ngContentSelectors:Fe,decls:2,vars:0,consts:[[1,"mat-chip-list-wrapper"]],template:function(e,i){1&e&&(t.F$t(),t.TgZ(0,"div",0),t.Hsn(1),t.qZA())},styles:['.mat-chip{position:relative;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);border:none;-webkit-appearance:none;-moz-appearance:none}.mat-standard-chip{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);display:inline-flex;padding:7px 12px;border-radius:16px;align-items:center;cursor:default;min-height:32px;height:1px}.mat-standard-chip._mat-animation-noopable{transition:none !important;animation:none !important}.mat-standard-chip .mat-chip-remove{border:none;-webkit-appearance:none;-moz-appearance:none;padding:0;background:none}.mat-standard-chip .mat-chip-remove.mat-icon,.mat-standard-chip .mat-chip-remove .mat-icon{width:18px;height:18px;font-size:18px}.mat-standard-chip::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;opacity:0;content:"";pointer-events:none;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-standard-chip:hover::after{opacity:.12}.mat-standard-chip:focus{outline:none}.mat-standard-chip:focus::after{opacity:.16}.cdk-high-contrast-active .mat-standard-chip{outline:solid 1px}.cdk-high-contrast-active .mat-standard-chip:focus{outline:dotted 2px}.cdk-high-contrast-active .mat-standard-chip.mat-chip-selected{outline-width:3px}.mat-standard-chip.mat-chip-disabled::after{opacity:0}.mat-standard-chip.mat-chip-disabled .mat-chip-remove,.mat-standard-chip.mat-chip-disabled .mat-chip-trailing-icon{cursor:default}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar,.mat-standard-chip.mat-chip-with-avatar{padding-top:0;padding-bottom:0}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-right:8px;padding-left:0}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-left:8px;padding-right:0}.mat-standard-chip.mat-chip-with-trailing-icon{padding-top:7px;padding-bottom:7px;padding-right:8px;padding-left:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon{padding-left:8px;padding-right:12px}.mat-standard-chip.mat-chip-with-avatar{padding-left:0;padding-right:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-avatar{padding-right:0;padding-left:12px}.mat-standard-chip .mat-chip-avatar{width:24px;height:24px;margin-right:8px;margin-left:4px}[dir=rtl] .mat-standard-chip .mat-chip-avatar{margin-left:8px;margin-right:4px}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{width:18px;height:18px;cursor:pointer}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-standard-chip .mat-chip-remove,[dir=rtl] .mat-standard-chip .mat-chip-trailing-icon{margin-right:8px;margin-left:0}.mat-chip-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit;overflow:hidden;transform:translateZ(0)}.mat-chip-list-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;margin:-4px}.mat-chip-list-wrapper input.mat-input-element,.mat-chip-list-wrapper .mat-standard-chip{margin:4px}.mat-chip-list-stacked .mat-chip-list-wrapper{flex-direction:column;align-items:flex-start}.mat-chip-list-stacked .mat-chip-list-wrapper .mat-standard-chip{width:100%}.mat-chip-avatar{border-radius:50%;justify-content:center;align-items:center;display:flex;overflow:hidden;object-fit:cover}input.mat-chip-input{width:150px;margin:4px;flex:1 0 150px}'],encapsulation:2,changeDetection:0}),o})(),ze=0,Kt=(()=>{class o{constructor(e,i){this._elementRef=e,this._defaultOptions=i,this.focused=!1,this._addOnBlur=!1,this.separatorKeyCodes=this._defaultOptions.separatorKeyCodes,this.chipEnd=new t.vpe,this.placeholder="",this.id="mat-chip-list-input-"+ze++,this._disabled=!1,this.inputElement=this._elementRef.nativeElement}set chipList(e){e&&(this._chipList=e,this._chipList.registerInput(this))}get addOnBlur(){return this._addOnBlur}set addOnBlur(e){this._addOnBlur=(0,g.Ig)(e)}get disabled(){return this._disabled||this._chipList&&this._chipList.disabled}set disabled(e){this._disabled=(0,g.Ig)(e)}get empty(){return!this.inputElement.value}ngOnChanges(){this._chipList.stateChanges.next()}ngOnDestroy(){this.chipEnd.complete()}ngAfterContentInit(){this._focusLastChipOnBackspace=this.empty}_keydown(e){if(e){if(e.keyCode===M.Mf&&!(0,M.Vb)(e,"shiftKey")&&this._chipList._allowFocusEscape(),e.keyCode===M.ZH&&this._focusLastChipOnBackspace)return this._chipList._keyManager.setLastItemActive(),void e.preventDefault();this._focusLastChipOnBackspace=!1}this._emitChipEnd(e)}_keyup(e){!this._focusLastChipOnBackspace&&e.keyCode===M.ZH&&this.empty&&(this._focusLastChipOnBackspace=!0,e.preventDefault())}_blur(){this.addOnBlur&&this._emitChipEnd(),this.focused=!1,this._chipList.focused||this._chipList._blur(),this._chipList.stateChanges.next()}_focus(){this.focused=!0,this._focusLastChipOnBackspace=this.empty,this._chipList.stateChanges.next()}_emitChipEnd(e){!this.inputElement.value&&!!e&&this._chipList._keydown(e),(!e||this._isSeparatorKey(e))&&(this.chipEnd.emit({input:this.inputElement,value:this.inputElement.value,chipInput:this}),e?.preventDefault())}_onInput(){this._chipList.stateChanges.next()}focus(e){this.inputElement.focus(e)}clear(){this.inputElement.value="",this._focusLastChipOnBackspace=!0}_isSeparatorKey(e){return!(0,M.Vb)(e)&&new Set(this.separatorKeyCodes).has(e.keyCode)}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(t.SBq),t.Y36(zt))},o.\u0275dir=t.lG2({type:o,selectors:[["input","matChipInputFor",""]],hostAttrs:[1,"mat-chip-input","mat-input-element"],hostVars:5,hostBindings:function(e,i){1&e&&t.NdJ("keydown",function(a){return i._keydown(a)})("keyup",function(a){return i._keyup(a)})("blur",function(){return i._blur()})("focus",function(){return i._focus()})("input",function(){return i._onInput()}),2&e&&(t.Ikx("id",i.id),t.uIk("disabled",i.disabled||null)("placeholder",i.placeholder||null)("aria-invalid",i._chipList&&i._chipList.ngControl?i._chipList.ngControl.invalid:null)("aria-required",i._chipList&&i._chipList.required||null))},inputs:{chipList:["matChipInputFor","chipList"],addOnBlur:["matChipInputAddOnBlur","addOnBlur"],separatorKeyCodes:["matChipInputSeparatorKeyCodes","separatorKeyCodes"],placeholder:"placeholder",id:"id",disabled:"disabled"},outputs:{chipEnd:"matChipInputTokenEnd"},exportAs:["matChipInput","matChipInputFor"],features:[t.TTD]}),o})(),Ge=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({providers:[I.rD,{provide:zt,useValue:{separatorKeyCodes:[M.K5]}}],imports:[I.BQ]}),o})();var Wt=h(7392);function Ke(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"a",73),t.NdJ("click",function(){t.CHM(e);const s=t.oxw();return t.KtG(s.Submit())}),t._uU(1,"Submit"),t.qZA()}}function We(o,n){1&o&&(t.TgZ(0,"div",74)(1,"span"),t._uU(2,"Channel name is required!"),t.qZA()())}function je(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"input",78),t.NdJ("ngModelChange",function(s){t.CHM(e);const a=t.oxw(2);return t.KtG(a.model.ShopID=s)}),t.qZA()}if(2&o){const e=t.oxw(2);t.Q6J("ngModel",e.model.ShopID)}}function Xe(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"input",79),t.NdJ("ngModelChange",function(s){t.CHM(e);const a=t.oxw(2);return t.KtG(a.model.ShopIDString=s)}),t.qZA()}if(2&o){const e=t.oxw(2);t.Q6J("ngModel",e.model.ShopIDString)}}function $e(o,n){if(1&o&&(t.TgZ(0,"div",13),t.YNc(1,je,1,1,"input",75),t.YNc(2,Xe,1,1,"input",76),t.TgZ(3,"label",77),t._uU(4,"Shop ID"),t.qZA()()),2&o){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",null==e.model.ShopIDString||""==e.model.ShopIDString),t.xp6(1),t.Q6J("ngIf",e.model.ShopIDString)}}function ti(o,n){1&o&&(t.TgZ(0,"span"),t._uU(1,"Please enter a valid URL!"),t.qZA())}function ei(o,n){if(1&o&&(t.TgZ(0,"div",74),t.YNc(1,ti,2,0,"span",80),t.qZA()),2&o){t.oxw();const e=t.MAs(36);t.xp6(1),t.Q6J("ngIf",e.errors.pattern)}}function ii(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"div",12)(1,"div",13)(2,"input",81,82),t.NdJ("ngModelChange",function(s){t.CHM(e);const a=t.oxw();return t.KtG(a.model.ConsumerKey=s)}),t.qZA(),t.TgZ(4,"label",25),t._uU(5,"Consumer Key"),t.qZA()()()}if(2&o){const e=t.oxw();t.xp6(2),t.Q6J("ngModel",e.model.ConsumerKey)}}function ni(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"div",12)(1,"div",13)(2,"input",83,84),t.NdJ("ngModelChange",function(s){t.CHM(e);const a=t.oxw();return t.KtG(a.model.ConsumerSecret=s)}),t.qZA(),t.TgZ(4,"label",25),t._uU(5,"Consumer Secret"),t.qZA()()()}if(2&o){const e=t.oxw();t.xp6(2),t.Q6J("ngModel",e.model.ConsumerSecret)}}function oi(o,n){1&o&&(t.TgZ(0,"p"),t._uU(1," Email is not valid "),t.qZA())}function si(o,n){if(1&o&&(t.TgZ(0,"div",85),t.YNc(1,oi,2,0,"p",80),t.qZA()),2&o){t.oxw();const e=t.MAs(103);t.xp6(1),t.Q6J("ngIf",e.errors.pattern)}}function ai(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"mat-chip",86),t.NdJ("removed",function(){const a=t.CHM(e).$implicit,r=t.oxw();return t.KtG(r.removeAdditonalItem(a))}),t._uU(1),t.TgZ(2,"button",87)(3,"mat-icon"),t._uU(4,"cancel"),t.qZA()()()}if(2&o){const e=n.$implicit;t.xp6(1),t.hij(" ",e," ")}}function ri(o,n){1&o&&(t.TgZ(0,"div",74)(1,"span"),t._uU(2,"Outlet is required!"),t.qZA()())}function li(o,n){1&o&&(t.TgZ(0,"div",74)(1,"span"),t._uU(2,"Outlet is required!"),t.qZA()())}function di(o,n){1&o&&(t.TgZ(0,"div",74)(1,"span"),t._uU(2,"Payment Method is required!"),t.qZA()())}function ci(o,n){1&o&&(t.TgZ(0,"div",74)(1,"span"),t._uU(2,"Sales Orders is required!"),t.qZA()())}function hi(o,n){1&o&&(t.TgZ(0,"div",74)(1,"span"),t._uU(2,"Tax Type is required!"),t.qZA()())}const A=function(o){return{empty:o}},pi=function(o){return{"is-invalid border border-danger":o}},ui=function(){return{updateOn:"blur"}},B=function(o){return{danger:o}};let gi=(()=>{class o{constructor(e,i,s,a){this.http=i,this.service=s,this.Toastr=a,this.model=new Le,this.form=new ut,this.loading=!1,this.ListCategory=[],this.ListWriteOff=[],this.advance=!1,this.additionalItems=[],this.advance=!1;let r=e.snapshot.params;null!=r&&(this.model.ID=null!=r.ID?r.ID:"00000000-0000-0000-0000-000000000000"),this.TypeMarket=[{Name:"Shopee",ID:0},{Name:"Tokopedia",ID:1},{Name:"WooCommerce",ID:2},{Name:"KalCare",ID:4},{Name:"ShopeeV2",ID:5},{Name:"Tiktok",ID:6},{Name:"Lazada",ID:7}]}ngOnInit(){this.loaderChannel(this.model.ID)}loaderChannel(e){this.http.post("/api/ChannelLoader/GetPOSProperties",{ID:e}).subscribe(i=>{this.model=i.Model,this.form=i.Form,this.ListSalesType=i.Options.ListSalesOrderType,this.ListOutlet=i.Options.ListOutlet,this.ListTax=i.Options.ListTax,this.ListPaymentMethod=i.Options.ListPaymentMethod,this.Modes=i.Options.Modes,this.ListWriteOff=i.Options.ListWriteOff,this.initAdditionalItems()})}initAdditionalItems(){let e=this.model.Additionalitem;e&&(this.additionalItems=e.split(","))}Submit(){null==this.model.ProductCategoryDefault&&(this.model.ProductCategoryDefault=0),this.model.POSInventoryOutlet=null!=this.model.POSInventoryOutletArray&&this.model.POSInventoryOutletArray.length>0?this.model.POSInventoryOutletArray.join(","):null,this.model.Additionalitem=this.additionalItems.join(","),null!=this.model.MinimumInventory?null!=this.model.Index?!this.isEmpty(this.model.ShopID)||0!==this.model.TypeID&&5!==this.model.TypeID&&1!==this.model.TypeID?this.http.post("/api/Channel/SubmitChannel",this.model).subscribe(e=>{this.Toastr.success("Successfully submitted the Channel","Success!"),this.service.navigate(["/menu/channel"])}):this.Toastr.error("Your Shop ID is Empty, please fill the shop ID","Error!"):this.Toastr.error("Index is mandatory","Error!"):this.Toastr.error("Your Minimum Inventory is Empty, please fill minimum inventory","Error!")}SubmitHost(){this.http.post("/api/Channel/SubmitConfig",this.form).subscribe(e=>{this.Toastr.success("Successfully submitted the Channel","Success!"),this.service.navigate(["/menu/channel"])})}Channel(){this.http.post("/api/Channel/GetChannel",{}).subscribe(e=>{this.List=e.Data})}changeOutlet(){this.model.SyncOrder=!D.g.IsEmpty(this.model.POSOutlet)}Cancel(){this.Channel()}LoadCategory(){0!=this.model.TypeID&&1!=this.model.TypeID||this.http.post("/api/Channel/GetChannelCategory",{TypeID:this.model.TypeID}).subscribe(i=>{this.ListCategory=i})}addAdditonalItem(e){const i=(e.value||"").trim();this.additionalItems.includes(i)||this.additionalItems.push(i),e.chipInput.clear()}removeAdditonalItem(e){const i=this.additionalItems.indexOf(e);i>=0&&this.additionalItems.splice(i,1)}isEmpty(e){return D.g.IsEmpty(e)}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(C.gz),t.Y36(V.O),t.Y36(C.F0),t.Y36(L._W))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-marketplace-form"]],decls:182,vars:90,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/channel",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],["role","button","class","btn btn-success btn-fill btn-lg text-white",3,"click",4,"ngIf"],[1,"container-fluid","py-5","bg-light-gray"],[1,"row"],[1,"col-sm-8"],["name","form"],["f","ngForm"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body","mt-8"],[1,"col-sm-6"],[1,"form-label-group"],["type","text","id","Name","placeholder","Name","name","Name","matTooltip","Channel Name","required","",1,"form-control","tall",3,"ngModel","ngModelChange"],["name","ngModel"],["for","Name"],["class","alert alert-danger",4,"ngIf"],[1,"col-sm-6","me-0"],[1,"form-label-group",3,"ngClass"],["id","Type","bindLabel","Name","bindValue","ID","placeholder","Type","name","Market","matTooltip","Channel type","data-toggle","tooltip",1,"center-text","tall",3,"items","ngModel","ngModelChange","change"],["for","type"],["class","form-label-group",4,"ngIf"],["type","text","id","URL","placeholder","URL","name","URL","data-toggle","tooltip","matTooltip","Fill with your Marketplace URL","pattern","^((https?|ftp|smtp):\\/\\/)?(www.)?[a-z0-9]+(.[a-z]+)(.id)?(\\/[-~$_.+!*'(),a-zA-Z0-9#]+\\/?)+$",1,"form-control",3,"ngModel","ngModelChange"],["url","ngModel"],["for","URL"],["class","col-sm-6",4,"ngIf"],[1,"form-label-group","radio"],["for","SyncOrder"],[1,"mt-3"],["name","SyncOrder",3,"ngModel","ngModelChange"],["data-toggle","tooltip","matTooltip","No Include if the channel makes a transaction",1,"me-5",3,"value"],["data-toggle","tootip","matTooltip","Include if the channel makes a transaction",1,"me-5",3,"value"],["name","SyncInventory",3,"ngModel","ngModelChange"],[1,"col-md-12"],[1,"form-label-group","radio",3,"ngClass"],[2,"top","-11px","background","white"],["name","InventoryLog",3,"ngModel","ngModelChange"],["data-toggle","tooltip","matTooltip","Not record any log from transaction",1,"me-5",3,"value"],["data-toggle","tooltip","matTooltip","Only record error log from transaction",1,"me-5",3,"value"],["data-toggle","tooltip","matTooltip","Record all log from transaction",1,"me-5",3,"value"],[1,"col-md-6"],[1,"card-header","cursor","mb-3"],["type","text","id","Register","placeholder","Register","name","Register","data-toggle","tooltip","matTooltip","Outlet register name",1,"form-control",3,"ngModel","ngModelChange"],["for","Register"],["type","email","name","Email","placeholder","Email","email","","pattern","\\b[\\w\\.-]+@[\\w\\.-]+\\.\\w{2,4}\\b",1,"form-control",3,"ngClass","ngModelOptions","ngModel","ngModelChange"],["Email","ngModel"],["class","text-danger",4,"ngIf"],["type","number","name","MinimumInventory","placeholder","Minimum Inventory","id","MinimumInventory","data-toggle","tooltip","matTooltip","Minimal inventory on channel, if product inventory is bellow minimum inventory will automatically update to 0 ",1,"form-control",3,"ngModel","ngModelChange"],["for","MinimumInventory"],[1,"col-sm-12","mat-chip-custom"],["appearance","outline",1,"w-100"],["aria-label","Additional Item"],["chipList",""],["style","font-size: 12px;",3,"removed",4,"ngFor","ngForOf"],["placeholder","New Item",3,"matChipInputFor","matChipInputTokenEnd"],["type","number","name","Index","placeholder","Additional item","id","Additionalitem",1,"form-control",3,"ngModel","ngModelChange"],["for","Index"],[1,"col-sm-4"],["id","outletOrder","bindLabel","Outlet","bindValue","Outlet","placeholder","New Order To","data-toggle","tooltip","data-placement","top","matTooltip","Choose Outlet where transaction is recorded","name","Outlet","required","",1,"center-text","tall",3,"ngClass","items","ngModel","ngModelChange","change"],["outlet","ngModel"],["for","outletOrder"],["id","inventorySource","bindLabel","Outlet","bindValue","Outlet","placeholder","Dispatch Orders From","data-toggle","tooltip","data-placement","top","matTooltip","Choose outlet to be inventory source for marketplace ","name","Delivery","required","",1,"center-text","tall",3,"ngClass","items","ngModel","ngModelChange"],["delivery","ngModel"],["for","inventorySource"],["id","ProductInventory","multiple","true","bindLabel","Outlet","bindValue","Outlet","placeholder","Product Inventory","data-toggle","tooltip","data-placement","top","matTooltip","Choose Outlet where inventory is recorded","name","POSInventoryOutletArray",1,"center-text","tall","multiple-select",3,"items","ngModel","ngModelChange"],["for","ProductInventory"],["bindLabel","Name","bindValue","Name","placeholder","Payment Method","data-toggle","tootlip","matTooltip","Choose your payment method","name","InvoicePaymentMethod","required","",1,"center-text","tall",3,"items","ngClass","ngModel","ngModelChange"],["method","ngModel"],["bindLabel","Name","bindValue","Name","placeholder","Sales Orders Tag","data-toggle","tooltip","matTooltip","Choose sales order type for marketplace","name","SalesType","required","",1,"center-text","tall",3,"items","ngClass","ngModel","ngModelChange"],["sales","ngModel"],["bindLabel","Name","bindValue","Name","placeholder","Tax","data-toggle","tooltip","matTooltip","Choose tax type for marketplace","name","POSTax","required","",1,"center-text","tall",3,"items","ngClass","ngModel","ngModelChange"],["tax","ngModel"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"click"],[1,"alert","alert-danger"],["type","number","id","ShopID","placeholder","Shop ID","class","form-control","name","ShopID","data-toggle","tooltip","matTooltip","Fill with your Shop ID",3,"ngModel","ngModelChange",4,"ngIf"],["type","text","id","ShopIDString","placeholder","Shop ID String","class","form-control","name","ShopIDString","data-toggle","tooltip","matTooltip","Fill with your Shop ID String",3,"ngModel","ngModelChange",4,"ngIf"],["for","ShopID"],["type","number","id","ShopID","placeholder","Shop ID","name","ShopID","data-toggle","tooltip","matTooltip","Fill with your Shop ID",1,"form-control",3,"ngModel","ngModelChange"],["type","text","id","ShopIDString","placeholder","Shop ID String","name","ShopIDString","data-toggle","tooltip","matTooltip","Fill with your Shop ID String",1,"form-control",3,"ngModel","ngModelChange"],[4,"ngIf"],["type","text","id","ConsumerKey","placeholder","Consumer Key","name","ConsumerKey","data-toggle","tooltip","matTooltip","Fill with your Marketplace Consumer Key",1,"form-control",3,"ngModel","ngModelChange"],["ConsumerKey","ngModel"],["type","text","id","ConsumerSecret","placeholder","Consumer Secret","name","ConsumerSecret","data-toggle","tooltip","matTooltip","Fill with your Marketplace Consumer Secret",1,"form-control",3,"ngModel","ngModelChange"],["ConsumerSecret","ngModel"],[1,"text-danger"],[2,"font-size","12px",3,"removed"],["matChipRemove",""]],template:function(e,i){if(1&e&&(t.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),t._uU(3,"Cancel"),t.qZA(),t.YNc(4,Ke,2,0,"a",2),t.qZA(),t.TgZ(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"form",6,7)(11,"div",4)(12,"div",8)(13,"div",9)(14,"div",10)(15,"h3"),t._uU(16,"Marketplace Setup"),t.qZA()(),t.TgZ(17,"div",11)(18,"div",4)(19,"div",12)(20,"div",13)(21,"input",14,15),t.NdJ("ngModelChange",function(a){return i.model.Name=a}),t.qZA(),t.TgZ(23,"label",16),t._uU(24,"Name"),t.qZA()(),t.YNc(25,We,3,0,"div",17),t.qZA(),t.TgZ(26,"div",18)(27,"div",19)(28,"ng-select",20),t.NdJ("ngModelChange",function(a){return i.model.TypeID=a})("change",function(){return i.LoadCategory()}),t.qZA(),t.TgZ(29,"label",21),t._uU(30,"Type"),t.qZA()()(),t.TgZ(31,"div",12),t.YNc(32,$e,5,2,"div",22),t.qZA(),t.TgZ(33,"div",12)(34,"div",13)(35,"input",23,24),t.NdJ("ngModelChange",function(a){return i.model.URL=a}),t.qZA(),t.TgZ(37,"label",25),t._uU(38,"Marketplace URL"),t.qZA()(),t.YNc(39,ei,2,1,"div",17),t.qZA(),t.YNc(40,ii,6,1,"div",26),t.YNc(41,ni,6,1,"div",26),t.qZA()()()(),t.TgZ(42,"div",12)(43,"div",9)(44,"div",10)(45,"h3"),t._uU(46,"Sync"),t.qZA()(),t.TgZ(47,"div",11)(48,"div",4)(49,"div",8)(50,"div",27)(51,"label",28),t._uU(52,"Sync Order"),t.qZA(),t.TgZ(53,"div",29)(54,"mat-radio-group",30),t.NdJ("ngModelChange",function(a){return i.model.SyncOrder=a}),t.TgZ(55,"mat-radio-button",31),t._uU(56," No "),t.qZA(),t.TgZ(57,"mat-radio-button",32),t._uU(58," Yes "),t.qZA()()()()(),t.TgZ(59,"div",8)(60,"div",27)(61,"label",28),t._uU(62,"Sync Inventory"),t.qZA(),t.TgZ(63,"div",29)(64,"mat-radio-group",33),t.NdJ("ngModelChange",function(a){return i.model.SyncInventory=a}),t.TgZ(65,"mat-radio-button",31),t._uU(66," No "),t.qZA(),t.TgZ(67,"mat-radio-button",32),t._uU(68," Yes "),t.qZA()()()()()()()()(),t.TgZ(69,"div",12)(70,"div",9)(71,"div",10)(72,"h3"),t._uU(73,"Log"),t.qZA()(),t.TgZ(74,"div",11)(75,"div",4)(76,"div",34)(77,"div",35)(78,"label",36),t._uU(79,"Inventory Log Mode"),t.qZA(),t.TgZ(80,"div",29)(81,"mat-radio-group",37),t.NdJ("ngModelChange",function(a){return i.model.InventoryLog=a}),t.TgZ(82,"mat-radio-button",38),t._uU(83," None "),t.qZA(),t.TgZ(84,"mat-radio-button",39),t._uU(85," Error "),t.qZA(),t.TgZ(86,"mat-radio-button",40),t._uU(87," Full "),t.qZA()()()()()()()()(),t.TgZ(88,"div",41)(89,"div",9)(90,"div",42)(91,"h3"),t._uU(92,"Advance"),t.qZA()(),t.TgZ(93,"div",11)(94,"div",4)(95,"div",34)(96,"div",13)(97,"input",43),t.NdJ("ngModelChange",function(a){return i.model.Register=a}),t.qZA(),t.TgZ(98,"label",44),t._uU(99,"Register"),t.qZA()()(),t.TgZ(100,"div",8)(101,"div",13)(102,"input",45,46),t.NdJ("ngModelChange",function(a){return i.model.CustomerDefaultEmail=a}),t.qZA(),t.TgZ(104,"label",16),t._uU(105,"Customer Default Email"),t.qZA()(),t.YNc(106,si,2,1,"div",47),t.qZA(),t.TgZ(107,"div",8)(108,"div",13)(109,"input",48),t.NdJ("ngModelChange",function(a){return i.model.MinimumInventory=a}),t.qZA(),t.TgZ(110,"label",49),t._uU(111,"Minimum Inventory"),t.qZA()()(),t.TgZ(112,"div",50)(113,"mat-form-field",51)(114,"mat-label"),t._uU(115,"Additional Item"),t.qZA(),t.TgZ(116,"mat-chip-list",52,53),t.YNc(118,ai,5,1,"mat-chip",54),t.TgZ(119,"input",55),t.NdJ("matChipInputTokenEnd",function(a){return i.addAdditonalItem(a)}),t.qZA()()()(),t.TgZ(120,"div",8)(121,"div",13)(122,"input",56),t.NdJ("ngModelChange",function(a){return i.model.Index=a}),t.qZA(),t.TgZ(123,"label",57),t._uU(124,"Index"),t.qZA()()()()()()()()()(),t.TgZ(125,"div",58)(126,"form")(127,"div",4)(128,"div",8)(129,"div",9)(130,"div",10)(131,"h3"),t._uU(132,"POS Outlet Configuration"),t.qZA()(),t.TgZ(133,"div",11)(134,"div",4)(135,"div",34)(136,"div",19)(137,"ng-select",59,60),t.NdJ("ngModelChange",function(a){return i.model.POSOutlet=a})("change",function(){return i.changeOutlet()}),t.qZA(),t.TgZ(139,"label",61),t._uU(140,"New Order To"),t.qZA()(),t.YNc(141,ri,3,0,"div",17),t.qZA(),t.TgZ(142,"div",34)(143,"div",19)(144,"ng-select",62,63),t.NdJ("ngModelChange",function(a){return i.model.POSDeliveryOutlet=a}),t.qZA(),t.TgZ(146,"label",64),t._uU(147,"Dispatch Orders From"),t.qZA()(),t.YNc(148,li,3,0,"div",17),t.qZA(),t.TgZ(149,"div",34)(150,"div",13)(151,"ng-select",65),t.NdJ("ngModelChange",function(a){return i.model.POSInventoryOutletArray=a}),t.qZA(),t.TgZ(152,"label",66),t._uU(153,"Product Inventory"),t.qZA()()()()()()(),t.TgZ(154,"div",8)(155,"div",9)(156,"div",10)(157,"h3"),t._uU(158,"POS Orders Configuration"),t.qZA()(),t.TgZ(159,"div",11)(160,"div",4)(161,"div",34)(162,"div",19)(163,"ng-select",67,68),t.NdJ("ngModelChange",function(a){return i.model.POSInvoicePaymentMethod=a}),t.qZA(),t.TgZ(165,"label"),t._uU(166,"Payment Method"),t.qZA()(),t.YNc(167,di,3,0,"div",17),t.qZA(),t.TgZ(168,"div",34)(169,"div",19)(170,"ng-select",69,70),t.NdJ("ngModelChange",function(a){return i.model.POSSalesOrderType=a}),t.qZA(),t.TgZ(172,"label"),t._uU(173,"Sales Orders Tag"),t.qZA()(),t.YNc(174,ci,3,0,"div",17),t.qZA(),t.TgZ(175,"div",34)(176,"div",19)(177,"ng-select",71,72),t.NdJ("ngModelChange",function(a){return i.model.POSTax=a}),t.qZA(),t.TgZ(179,"label"),t._uU(180,"Tax"),t.qZA()(),t.YNc(181,hi,3,0,"div",17),t.qZA()()()()()()()()()()()()),2&e){const s=t.MAs(22),a=t.MAs(36),r=t.MAs(103),l=t.MAs(117),d=t.MAs(138),c=t.MAs(145),p=t.MAs(164),_=t.MAs(171),b=t.MAs(178);t.Q6J("headerTitle","Configure Channel")("pageData",i.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(4),t.Q6J("ngIf",!s.invalid),t.xp6(17),t.Q6J("ngModel",i.model.Name),t.xp6(4),t.Q6J("ngIf",s.invalid&&(s.dirty||s.touched)),t.xp6(2),t.Q6J("ngClass",t.VKq(63,A,i.isEmpty(i.model.TypeID))),t.xp6(1),t.Q6J("items",i.TypeMarket)("ngModel",i.model.TypeID),t.xp6(4),t.Q6J("ngIf",2!=i.model.TypeID),t.xp6(3),t.Q6J("ngModel",i.model.URL),t.xp6(4),t.Q6J("ngIf",a.invalid&&(a.dirty||a.touched)),t.xp6(1),t.Q6J("ngIf",2==i.model.TypeID),t.xp6(1),t.Q6J("ngIf",2==i.model.TypeID),t.xp6(13),t.Q6J("ngModel",i.model.SyncOrder),t.xp6(1),t.Q6J("value",!1),t.xp6(2),t.Q6J("value",!0),t.xp6(7),t.Q6J("ngModel",i.model.SyncInventory),t.xp6(1),t.Q6J("value",!1),t.xp6(2),t.Q6J("value",!0),t.xp6(10),t.Q6J("ngClass",t.VKq(65,A,i.isEmpty(i.model.InventoryLog))),t.xp6(4),t.Q6J("ngModel",i.model.InventoryLog),t.xp6(1),t.Q6J("value",1),t.xp6(2),t.Q6J("value",2),t.xp6(2),t.Q6J("value",3),t.xp6(11),t.Q6J("ngModel",i.model.Register),t.xp6(5),t.Q6J("ngClass",t.VKq(67,pi,r.invalid))("ngModelOptions",t.DdM(69,ui))("ngModel",i.model.CustomerDefaultEmail),t.xp6(4),t.Q6J("ngIf",r.invalid&&(r.dirty||r.touched)),t.xp6(3),t.Q6J("ngModel",i.model.MinimumInventory),t.xp6(9),t.Q6J("ngForOf",i.additionalItems),t.xp6(1),t.Q6J("matChipInputFor",l)("matChipInputFor",l),t.xp6(3),t.Q6J("ngModel",i.model.Index),t.xp6(14),t.Q6J("ngClass",t.VKq(70,A,i.isEmpty(i.model.POSOutlet))),t.xp6(1),t.Q6J("ngClass",t.VKq(72,B,i.isEmpty(i.model.POSOutlet)))("items",i.ListOutlet)("ngModel",i.model.POSOutlet),t.xp6(4),t.Q6J("ngIf",d.invalid&&(d.dirty||d.touched)),t.xp6(2),t.Q6J("ngClass",t.VKq(74,A,i.isEmpty(i.model.POSDeliveryOutlet))),t.xp6(1),t.Q6J("ngClass",t.VKq(76,B,i.isEmpty(i.model.POSDeliveryOutlet)))("items",i.ListOutlet)("ngModel",i.model.POSDeliveryOutlet),t.xp6(4),t.Q6J("ngIf",c.invalid&&(c.dirty||c.touched)),t.xp6(3),t.Q6J("items",i.ListOutlet)("ngModel",i.model.POSInventoryOutletArray),t.xp6(11),t.Q6J("ngClass",t.VKq(78,A,i.isEmpty(i.model.POSInvoicePaymentMethod))),t.xp6(1),t.Q6J("items",i.ListPaymentMethod)("ngClass",t.VKq(80,B,i.isEmpty(i.model.POSInvoicePaymentMethod)))("ngModel",i.model.POSInvoicePaymentMethod),t.xp6(4),t.Q6J("ngIf",p.invalid&&(p.dirty||p.touched)),t.xp6(2),t.Q6J("ngClass",t.VKq(82,A,i.isEmpty(i.model.POSSalesOrderType))),t.xp6(1),t.Q6J("items",i.ListSalesType)("ngClass",t.VKq(84,B,i.isEmpty(i.model.POSSalesOrderType)))("ngModel",i.model.POSSalesOrderType),t.xp6(4),t.Q6J("ngIf",_.invalid&&(_.dirty||_.touched)),t.xp6(2),t.Q6J("ngClass",t.VKq(86,A,i.isEmpty(i.model.POSTax))),t.xp6(1),t.Q6J("items",i.ListTax)("ngClass",t.VKq(88,B,i.isEmpty(i.model.POSTax)))("ngModel",i.model.POSTax),t.xp6(4),t.Q6J("ngIf",b.invalid&&(b.dirty||b.touched))}},dependencies:[m.mk,m.sg,m.O5,u._Y,u.Fj,u.wV,u.JJ,u.JL,u.Q7,u.c5,u.on,u.On,u.F,f.p,w.VQ,w.U0,K.w9,C.yS,Gt,it,Kt,Bt,gt.KE,gt.hX,Wt.Hw,et.gM],styles:[".mb-1rem[_ngcontent-%COMP%]{margin-bottom:1rem} .mat-form-field-appearance-outline .mat-form-field-outline-thick{color:solid 1.5px #1a73e8!important} ng-select.multiple-select>div.ng-select-container div.ng-value-container div.ng-placeholder{top:-10px!important} ng-select.multiple-select>div.ng-select-container input{padding-top:0!important} ng-select.danger>div.ng-select-container{background:repeating-linear-gradient(-60deg,#FCF3CF,#FCF3CF 15px,#F9E79F 15px,#F9E79F 30px)!important}"]}),o})();function mi(o,n){if(1&o&&(t.TgZ(0,"div",14)(1,"div",15)(2,"label"),t._uU(3,"Shop ID"),t.qZA(),t.TgZ(4,"div",34)(5,"span"),t._uU(6),t.qZA()()()()),2&o){const e=t.oxw(2);t.xp6(6),t.Oqu(0!=e.data.ShopID?e.data.ShopID:e.data.ShopIDString)}}function _i(o,n){1&o&&t._UZ(0,"a",40)}function fi(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"a",41),t.NdJ("click",function(){t.CHM(e);const s=t.oxw(3);return t.KtG(s.Authorize(s.data.TypeID))}),t.qZA()}}function vi(o,n){if(1&o&&(t.TgZ(0,"div",14)(1,"div",15)(2,"label"),t._uU(3,"Expired Date"),t.qZA(),t.TgZ(4,"div",35)(5,"span",36),t._uU(6),t.ALo(7,"date"),t.ALo(8,"date"),t.qZA()(),t.TgZ(9,"div",37),t.YNc(10,_i,1,0,"a",38),t.YNc(11,fi,1,0,"a",39),t.qZA()()()),2&o){const e=t.oxw(2);t.xp6(6),t.hij(" ",e.data.ExpiredTime?t.xi3(7,4,e.data.ExpiredTime,"dd MMM yyyy HH:mm"):t.xi3(8,7,e.data.TokenExpired,"dd MMM yyyy HH:mm")," "),t.xp6(3),t.s9C("matTooltip",5==e.data.TypeID?"Extend Shopee Authorization Duration for an additional 1 year":"Update Token Expired date"),t.xp6(1),t.Q6J("ngIf",0==e.data.TypeID),t.xp6(1),t.Q6J("ngIf",5==e.data.TypeID||6==e.data.TypeID)}}function Ci(o,n){if(1&o&&(t.TgZ(0,"div",14)(1,"div",15)(2,"label"),t._uU(3,"Consumer Key"),t.qZA(),t.TgZ(4,"div",42)(5,"span"),t._uU(6),t.qZA()()()()),2&o){const e=t.oxw(2);t.xp6(6),t.Oqu(e.data.ConsumerKey)}}function bi(o,n){if(1&o&&(t.TgZ(0,"div",14)(1,"div",15)(2,"label"),t._uU(3,"Consumer Secret"),t.qZA(),t.TgZ(4,"div",43)(5,"span"),t._uU(6),t.qZA()()()()),2&o){const e=t.oxw(2);t.xp6(6),t.Oqu(e.data.ConsumerSecret)}}function yi(o,n){if(1&o&&(t.TgZ(0,"div",13)(1,"div",44)(2,"label"),t._uU(3,"Sync Order"),t.qZA(),t.TgZ(4,"div")(5,"span"),t._uU(6),t.qZA()()(),t.TgZ(7,"div",45)(8,"label"),t._uU(9,"Sync Inventory"),t.qZA(),t.TgZ(10,"div")(11,"span"),t._uU(12),t.qZA()()()()),2&o){const e=t.oxw(2);t.xp6(6),t.Oqu(e.data.SyncOrder),t.xp6(6),t.Oqu(e.data.SyncInventory)}}function Ti(o,n){1&o&&(t.TgZ(0,"span"),t._uU(1,"None"),t.qZA())}function Si(o,n){1&o&&(t.TgZ(0,"span"),t._uU(1,"Error"),t.qZA())}function Di(o,n){1&o&&(t.TgZ(0,"span"),t._uU(1,"Full"),t.qZA())}function Mi(o,n){if(1&o&&(t.TgZ(0,"div",13)(1,"div",46)(2,"label",47),t._uU(3,"Inventory Log"),t.qZA(),t.TgZ(4,"div"),t.YNc(5,Ti,2,0,"span",48),t.YNc(6,Si,2,0,"span",48),t.YNc(7,Di,2,0,"span",48),t.qZA()()()),2&o){const e=t.oxw(2);t.xp6(5),t.Q6J("ngIf",1==e.data.InventoryLog),t.xp6(1),t.Q6J("ngIf",2==e.data.InventoryLog),t.xp6(1),t.Q6J("ngIf",3==e.data.InventoryLog)}}const z=function(o){return{"input-danger":o}};function Ii(o,n){if(1&o&&(t.TgZ(0,"div",13)(1,"div",49)(2,"label"),t._uU(3,"New Order To"),t.qZA(),t.TgZ(4,"div",50)(5,"span"),t._uU(6),t.qZA()()(),t.TgZ(7,"div",49)(8,"label"),t._uU(9,"Dispatch Orders From"),t.qZA(),t.TgZ(10,"div",51)(11,"span"),t._uU(12),t.qZA()()(),t.TgZ(13,"div",15)(14,"label"),t._uU(15,"Product Inventory"),t.qZA(),t.TgZ(16,"div",52)(17,"span"),t._uU(18),t.qZA()()()()),2&o){const e=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(5,z,e.isEmpty(e.data.POSOutlet))),t.xp6(5),t.Oqu(e.data.POSOutlet),t.xp6(1),t.Q6J("ngClass",t.VKq(7,z,e.isEmpty(e.data.POSDeliveryOutlet))),t.xp6(5),t.Oqu(e.data.POSDeliveryOutlet),t.xp6(6),t.Oqu(e.data.POSInventoryOutlet)}}function xi(o,n){if(1&o&&(t.TgZ(0,"div",53)(1,"div",54)(2,"label"),t._uU(3,"Payment Method"),t.qZA(),t.TgZ(4,"div",55)(5,"span"),t._uU(6),t.qZA()()(),t.TgZ(7,"div",49)(8,"label"),t._uU(9,"Tag"),t.qZA(),t.TgZ(10,"div",56)(11,"span"),t._uU(12),t.qZA()()(),t.TgZ(13,"div",49)(14,"label"),t._uU(15,"Tax"),t.qZA(),t.TgZ(16,"div",57)(17,"span"),t._uU(18),t.qZA()()()()),2&o){const e=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(6,z,e.isEmpty(e.data.POSInvoicePaymentMethod))),t.xp6(5),t.Oqu(e.data.POSInvoicePaymentMethod),t.xp6(1),t.Q6J("ngClass",t.VKq(8,z,e.isEmpty(e.data.POSSalesOrderType))),t.xp6(5),t.Oqu(e.data.POSSalesOrderType),t.xp6(1),t.Q6J("ngClass",t.VKq(10,z,e.isEmpty(e.data.POSTax))),t.xp6(5),t.Oqu(e.data.POSTax)}}function wi(o,n){if(1&o&&(t.TgZ(0,"div",7)(1,"div",8)(2,"div",9)(3,"div",8)(4,"div",10)(5,"div",11)(6,"div",12)(7,"h3"),t._uU(8,"Marketplace Setup"),t.qZA()(),t.TgZ(9,"div",13)(10,"div",8)(11,"div",14)(12,"div",15)(13,"label"),t._uU(14,"Name"),t.qZA(),t.TgZ(15,"div",16)(16,"span"),t._uU(17),t.qZA()()()(),t.TgZ(18,"div",17)(19,"div",15)(20,"label"),t._uU(21,"Type"),t.qZA(),t.TgZ(22,"div")(23,"span"),t._uU(24),t.qZA()()()(),t.YNc(25,mi,7,1,"div",18),t.YNc(26,vi,12,10,"div",18),t.TgZ(27,"div",14)(28,"div",15)(29,"label"),t._uU(30,"Marketplace URL"),t.qZA(),t.TgZ(31,"div",19)(32,"span"),t._uU(33),t.qZA()()()(),t.TgZ(34,"div",14)(35,"div",15)(36,"label"),t._uU(37,"Product Sync"),t.qZA(),t.TgZ(38,"div",19)(39,"span"),t._uU(40),t.ALo(41,"date"),t.qZA()()()(),t.YNc(42,Ci,7,1,"div",18),t.YNc(43,bi,7,1,"div",18),t.qZA()()()(),t.TgZ(44,"div",14)(45,"div",11)(46,"div",12)(47,"div",20)(48,"h3"),t._uU(49,"Sync"),t.qZA()()(),t.YNc(50,yi,13,2,"div",21),t.qZA()(),t.TgZ(51,"div",14)(52,"div",11)(53,"div",12)(54,"div",20)(55,"h3"),t._uU(56,"Log"),t.qZA()()(),t.YNc(57,Mi,8,3,"div",21),t.qZA()(),t.TgZ(58,"div",22)(59,"div",11)(60,"div",23)(61,"h3"),t._uU(62,"Advance"),t.qZA()(),t.TgZ(63,"div",13)(64,"div",24)(65,"label"),t._uU(66,"Register"),t.qZA(),t.TgZ(67,"div")(68,"span"),t._uU(69),t.qZA()()(),t.TgZ(70,"div",15)(71,"label"),t._uU(72,"Customer Default Email"),t.qZA(),t.TgZ(73,"div",25)(74,"span"),t._uU(75),t.qZA()()(),t.TgZ(76,"div",26)(77,"label"),t._uU(78,"Minimum Inventory"),t.qZA(),t.TgZ(79,"div",27)(80,"span"),t._uU(81),t.ALo(82,"number"),t.qZA()()(),t.TgZ(83,"div",15)(84,"label"),t._uU(85,"Additional Item"),t.qZA(),t.TgZ(86,"div",28)(87,"span"),t._uU(88),t.qZA()()(),t.TgZ(89,"div",15)(90,"label"),t._uU(91,"Index"),t.qZA(),t.TgZ(92,"div",29)(93,"span"),t._uU(94),t.qZA()()()()()(),t.TgZ(95,"div",22)(96,"div",11)(97,"div",23)(98,"h3"),t._uU(99,"History"),t.qZA()(),t.TgZ(100,"div",13)(101,"div",30)(102,"label"),t._uU(103,"Created "),t.qZA(),t.TgZ(104,"div")(105,"span"),t._uU(106),t.ALo(107,"date"),t.qZA()()(),t.TgZ(108,"div",31)(109,"label"),t._uU(110,"Modified "),t.qZA(),t.TgZ(111,"div")(112,"span"),t._uU(113),t.ALo(114,"date"),t.qZA()()()()()()()(),t.TgZ(115,"div",32)(116,"div",8)(117,"div",10)(118,"div",11)(119,"div",12)(120,"h3"),t._uU(121,"POS Outlet Configuration"),t.qZA()(),t.YNc(122,Ii,19,9,"div",21),t.qZA()(),t.TgZ(123,"div",10)(124,"div",11)(125,"div",12)(126,"div",20)(127,"h3"),t._uU(128,"POS Orders Configuration"),t.qZA()()(),t.YNc(129,xi,19,12,"div",33),t.qZA()()()()()()),2&o){const e=t.oxw();t.xp6(17),t.Oqu(e.data.Name),t.xp6(7),t.Oqu(e.data.TypeString),t.xp6(1),t.Q6J("ngIf",2!=e.data.TypeID),t.xp6(1),t.Q6J("ngIf",0==e.data.TypeID||5==e.data.TypeID||6==e.data.TypeID),t.xp6(7),t.Oqu(e.data.URL),t.xp6(7),t.Oqu(e.data.LastSync?t.xi3(41,19,e.data.LastSync,"dd MMM yyyy HH:mm"):"-"),t.xp6(2),t.Q6J("ngIf",2==e.data.TypeID),t.xp6(1),t.Q6J("ngIf",2==e.data.TypeID),t.xp6(7),t.Q6J("ngIf",e.data),t.xp6(7),t.Q6J("ngIf",e.data),t.xp6(12),t.Oqu(null==e.data?null:e.data.Register),t.xp6(6),t.Oqu(null==e.data?null:e.data.CustomerDefaultEmail),t.xp6(6),t.Oqu(t.lcZ(82,22,null==e.data?null:e.data.MinimumInventory)),t.xp6(7),t.Oqu(null==e.data?null:e.data.Additionalitem),t.xp6(6),t.Oqu(null==e.data?null:e.data.Index),t.xp6(12),t.Oqu(t.xi3(107,24,e.data.Created,"dd MMM yyyy HH:mm")),t.xp6(7),t.Oqu(t.xi3(114,27,e.data.Modified,"dd MMM yyyy HH:mm")),t.xp6(9),t.Q6J("ngIf",e.data),t.xp6(7),t.Q6J("ngIf",e.data)}}const Zi=function(o){return{ID:o}},Pi=function(o){return["/menu/channel/marketplace/form",o]};let Ai=(()=>{class o{constructor(e,i,s,a,r){this.route=e,this.http=i,this.router=s,this.toastr=a,this.konversi=r,this.Setup=!1,this.advance=!1,this.advance=!1,this.route.queryParams.subscribe(l=>{this.ID=l.ID}),null!=this.ID&&this.Load()}ngOnInit(){this.konversi.GetRoles().filter(i=>"Setup"==i||"Stp"==i).length>0&&(this.Setup=!0)}Load(){this.http.post("/api/ChannelLoader/GetChannelView",{ID:this.ID}).subscribe(i=>{this.data=i.Model,1==this.data.LogMode?this.data.LogModeLabel="None":2==this.data.LogMode?this.data.LogModeLabel="Error":3==this.data.LogMode&&(this.data.LogModeLabel="Full")})}clear(){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.http.post("/api/Channel/ClearCacheChannel",{ID:this.ID}).subscribe(s=>{this.toastr.success("Successfully cleared cache","Success",{closeButton:!0,positionClass:"toast-bottom-right"}),this.Load()})}Authorize(e){let i="";5==e&&(i="ChannelAuthorization/ShopeeV2_URL"),6==e&&(i="ChannelAuthorization/Tiktok_URL"),this.http.post(`/api/${i}`).subscribe(s=>{window.location.href=s.Url})}delete(e){confirm("Delete channel "+e.Name+" ?")&&this.http.post("/api/Channel/DeleteChannel",{ID:e.ID}).subscribe(a=>{this.toastr.success("Channel "+e.Name+" is deleted!","Success",{closeButton:!0,positionClass:"toast-bottom-right"}),this.router.navigate(["menu/channel"])})}isEmpty(e){return D.g.IsEmpty(e)}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(C.gz),t.Y36(V.O),t.Y36(C.F0),t.Y36(L._W),t.Y36(Nt.e))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-marketplace-view"]],decls:11,vars:12,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","group","aria-label","Basic example",1,"btn-group"],["role","button",1,"btn","btn-outline-secondary","btn-lg",3,"hidden","routerLink"],[1,"fas","fa-edit",2,"font-size","20px"],["role","button",1,"btn","btn-danger","btn-lg","text-white",3,"hidden","click"],[1,"fas","fa-trash-alt",2,"font-size","20px"],["class","container-fluid py-5 bg-light-gray",4,"ngIf"],[1,"container-fluid","py-5","bg-light-gray"],[1,"row"],[1,"col-sm-8"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body","mt-8"],[1,"col-sm-6"],[1,"info-label-group"],["data-toggle","title","matTooltip","Your shop name in marketplace channel"],["data-toggle","tooltip","matTooltip","Marketplace / Website where your product is Sold / Distributed",1,"col-sm-6"],["class","col-sm-6",4,"ngIf"],["data-toggle","title","matTooltip","Your Marketplace URL"],[1,"d-flex","justify-content-between"],["class","card-body mt-8",4,"ngIf"],[1,"col-md-6"],[1,"card-header","cursor"],["data-toggle","title","matTooltip","regiter name from outlet",1,"info-label-group"],["data-toggle","title","matTooltip","Default Email for all of customer for orders from channel"],["data-toggle","title","matTooltip","Minimal inventory on channel, if product inventory is bellow minimum inventory will automatically update to 0 ",1,"info-label-group"],["data-toggle","title","title","Minimum Inventory"],["data-toggle","title","matTooltip","Additional item"],["data-toggle","title","matTooltip","Index"],["data-toggle","title","matTooltip","the first date the channel was created ",1,"info-label-group"],["data-toggle","title","matTooltip","last date of data in channel",1,"info-label-group"],[1,"col-sm-4"],["class","card-body",4,"ngIf"],["data-toggle","title","matTooltip","Your shop ID"],["data-toggle","title","matTooltip","Your expired time shop",1,"w-100","d-flex","justify-content-between"],[1,"text-primary"],["matTooltipClass","unset-max-width-tooltip","matTooltipPosition","above",3,"matTooltip"],["class","fas fa-plus-circle fa-lg ml-12","style","cursor:pointer;","href","https://partner.shopeemobile.com/api/v1/shop/auth_partner?id=845458&token=af8476104ba1e0ec3052adc6a2682f59bf0eb5304970727b9848760edc97ae1e&redirect=https%3A%2F%2Fmarketplace.dealpos.app%2Fshopee",4,"ngIf"],["class","fas fa-plus-circle fa-lg ml-12","style","cursor:pointer;",3,"click",4,"ngIf"],["href","https://partner.shopeemobile.com/api/v1/shop/auth_partner?id=845458&token=af8476104ba1e0ec3052adc6a2682f59bf0eb5304970727b9848760edc97ae1e&redirect=https%3A%2F%2Fmarketplace.dealpos.app%2Fshopee",1,"fas","fa-plus-circle","fa-lg","ml-12",2,"cursor","pointer"],[1,"fas","fa-plus-circle","fa-lg","ml-12",2,"cursor","pointer",3,"click"],["data-toggle","title","matTooltip","Consumer Key"],["data-toggle","title","matTooltip","Consumer Secret"],["data-toggle","title","matTooltip","Automatically sync your orders from channel to POS",1,"info-label-group"],["data-toggle","title","matTooltip","Automatically sync your POS inventory to channel inventory",1,"info-label-group"],["data-toggle","title","matTooltip","Your Inventory log status",1,"info-label-group"],[2,"top","-11px","background","white"],[4,"ngIf"],[1,"info-label-group",3,"ngClass"],["data-toggle","title","matTooltip","Outlet to record your order form marketplace"],["data-toggle","title","matTooltip","Outlet that will be inventory source for your channel inventory"],["data-toggle","title","matTooltip","Outlet where the inventory will displayed as inventory in Inventory Comparison Menu"],[1,"card-body"],[1,"info-label-group","mt-5",3,"ngClass"],["data-toggle","title","matTooltip","Your payment method for orders from channel"],["data-toggle","title","matTooltip","Your orders tag in POS for orders from channel"],["data-toggle","title","matTooltip","Tax for orders from channel"]],template:function(e,i){1&e&&(t.TgZ(0,"mainpanel",0)(1,"actions")(2,"div",1)(3,"a",2),t._UZ(4,"i",3),t._uU(5,"Configure"),t.qZA(),t.TgZ(6,"a",4),t.NdJ("click",function(){return i.delete(i.data)}),t._UZ(7,"i",5),t._uU(8," Delete"),t.qZA()()(),t.TgZ(9,"content"),t.YNc(10,wi,130,30,"div",6),t.qZA()()),2&e&&(t.Q6J("headerTitle","Marketplace Configuration View")("pageData",i.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(3),t.Q6J("hidden",!i.Setup)("routerLink",t.VKq(10,Pi,t.VKq(8,Zi,null==i.data?null:i.data.ID))),t.xp6(3),t.Q6J("hidden",!i.Setup),t.xp6(4),t.Q6J("ngIf",i.data))},dependencies:[m.mk,m.O5,f.p,C.yS,et.gM,m.JJ,m.uU],styles:[".input-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#FCF3CF,#FCF3CF 15px,#F9E79F 15px,#F9E79F 30px)!important}"]}),o})();var nt=h(6779),F=h(5412),mt=h(6401);function ki(o,n){1&o&&(t.TgZ(0,"p"),t._uU(1," URL is required "),t.qZA())}function Oi(o,n){if(1&o&&(t.TgZ(0,"div",13),t.YNc(1,ki,2,0,"p",14),t.qZA()),2&o){t.oxw();const e=t.MAs(10);t.xp6(1),t.Q6J("ngIf",e.errors.required)}}function Ei(o,n){1&o&&(t.TgZ(0,"p"),t._uU(1," Email is required "),t.qZA())}function Ri(o,n){1&o&&(t.TgZ(0,"p"),t._uU(1," Email is not valid "),t.qZA())}function Ui(o,n){if(1&o&&(t.TgZ(0,"div",13),t.YNc(1,Ei,2,0,"p",14),t.YNc(2,Ri,2,0,"p",14),t.qZA()),2&o){t.oxw();const e=t.MAs(16);t.xp6(1),t.Q6J("ngIf",e.errors.required),t.xp6(1),t.Q6J("ngIf",e.errors.pattern)}}const Li=function(o){return{invalid:o}},qi=function(){return{updateOn:"blur"}};let Fi=(()=>{class o{constructor(e){this.dialogRef=e}ngOnInit(){this.data={},this.initModalConfig()}initModalConfig(){this.modalConfig=new nt.O,this.modalConfig.title="Fill data for Customer Support"}onSubmit(){this.dialogRef.close(this.data)}onClose(){this.dialogRef.close()}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(F.so))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-contact-support"]],decls:18,vars:11,consts:[[3,"dynamicValidated","config","onClose","onCancel","onOk"],["content",""],[1,"mx-4"],["for","customerURL"],[1,"input-group","mb-5"],[1,"input-group-prepend"],["id","tokopediaUrl",1,"border-start-0","rounded-start","input-group-text","pointer-default","bg-light",2,"height","58px",3,"ngClass"],["required","","type","text","id","customerURL","name","customerURL","data-toggle","tooltip","title","customerURL",1,"form-control","border-start-0","customerUrl",3,"ngModel","ngModelChange"],["url","ngModel"],["class","text-danger",4,"ngIf"],["for","customerEmail"],["required","","type","text","id","customerEmail","name","customerEmail","data-toggle","tooltip","title","customerEmail","pattern","\\b[\\w\\.-]+@[\\w\\.-]+\\.\\w{2,4}\\b",1,"form-control",3,"ngModel","ngModelOptions","ngModelChange"],["email","ngModel"],[1,"text-danger"],[4,"ngIf"]],template:function(e,i){if(1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onClose",function(){return i.onClose()})("onCancel",function(){return i.onClose()})("onOk",function(){return i.onSubmit()}),t.TgZ(1,"div",1)(2,"div",2)(3,"label",3),t._uU(4,"Tokopedia URL"),t.qZA(),t.TgZ(5,"div",4)(6,"div",5)(7,"span",6),t._uU(8,"https://tokopedia.com/"),t.qZA()(),t.TgZ(9,"input",7,8),t.NdJ("ngModelChange",function(a){return i.data.URL=a}),t.qZA()(),t.YNc(11,Oi,2,1,"div",9),t.TgZ(12,"label",10),t._uU(13,"Requester's Email"),t.qZA(),t.TgZ(14,"div",4)(15,"input",11,12),t.NdJ("ngModelChange",function(a){return i.data.Email=a}),t.qZA()(),t.YNc(17,Ui,3,2,"div",9),t.qZA()()()),2&e){const s=t.MAs(10),a=t.MAs(16);t.Q6J("dynamicValidated",!s.invalid&&!a.invalid)("config",i.modalConfig),t.xp6(7),t.Q6J("ngClass",t.VKq(8,Li,s.invalid&&(s.dirty||s.touched))),t.xp6(2),t.Q6J("ngModel",i.data.URL),t.xp6(2),t.Q6J("ngIf",s.invalid&&(s.dirty||s.touched)),t.xp6(4),t.Q6J("ngModel",i.data.Email)("ngModelOptions",t.DdM(10,qi)),t.xp6(2),t.Q6J("ngIf",a.invalid&&(a.dirty||a.touched))}},dependencies:[m.mk,m.O5,u.Fj,u.JJ,u.Q7,u.c5,u.On,mt.M],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.input-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-radius:.25rem!important;border-color:#c8d3df}.input-group[_ngcontent-%COMP%] > input.ng-invalid.ng-touched[_ngcontent-%COMP%]{border-color:#fb404b}.input-group[_ngcontent-%COMP%] > input.customerUrl[_ngcontent-%COMP%]{border-top-left-radius:0!important;border-bottom-left-radius:0!important}.invalid[_ngcontent-%COMP%]{border-color:#fb404b}.pointer-default[_ngcontent-%COMP%]{cursor:default}"]}),o})(),jt=(()=>{class o{constructor(e,i){this.dialogRef=e,this.data=i}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new nt.O,this.modalConfig.title=this.data?.title,this.modalConfig.okText="SAVE"}onSubmit(){this.dialogRef.close(this.data)}onClose(){this.dialogRef.close()}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(F.so),t.Y36(F.WI))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-modal-dialog-tokopedia"]],decls:7,vars:3,consts:[[3,"dynamicValidated","config","onClose","onCancel","onOk"],["content",""],[1,"form-label-group"],["type","text","id","shopid","placeholder","Shop ID","name","ShopID","data-toggle","tooltip","title","Channel Name",1,"form-control",3,"ngModel","ngModelChange"],["name","ngModel"],["for","shopid"]],template:function(e,i){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onClose",function(){return i.onClose()})("onCancel",function(){return i.onClose()})("onOk",function(){return i.onSubmit()}),t.TgZ(1,"div",1)(2,"div",2)(3,"input",3,4),t.NdJ("ngModelChange",function(a){return i.data.ShopID=a}),t.qZA(),t.TgZ(5,"label",5),t._uU(6,"Shop ID"),t.qZA()()()()),2&e&&(t.Q6J("dynamicValidated",i.data.ShopID)("config",i.modalConfig),t.xp6(3),t.Q6J("ngModel",i.data.ShopID))},dependencies:[u.Fj,u.JJ,u.On,mt.M],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"]}),o})(),Ni=(()=>{class o{constructor(e,i){this.dialogRef=e,this.data=i,this.modalConfig=new nt.O}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new nt.O,this.modalConfig.title="WooCommerce",this.modalConfig.okText="SAVE"}onSubmit(){this.data.TypeID=2,this.dialogRef.close(this.data)}onClose(){this.dialogRef.close()}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(F.so),t.Y36(F.WI))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-modal-dialog-woocommerce"]],decls:17,vars:5,consts:[[3,"dynamicValidated","config","onClose","onCancel","onOk"],["content",""],[1,"form-label-group"],["type","text","id","shopid","placeholder","Shop ID","name","URL","data-toggle","tooltip","title","URL",1,"form-control",3,"ngModel","ngModelChange"],["name","ngModel"],["for","shopid"],["type","text","id","ConsumerKey","placeholder","Consumer Key","name","ConsumerKey","data-toggle","tooltip","title","ConsumerKey",1,"form-control",3,"ngModel","ngModelChange"],["for","ConsumerKey"],["type","text","id","ConsumerSecret","placeholder","Consumer Secret","name","ConsumerSecret","data-toggle","tooltip","title","ConsumerSecret",1,"form-control",3,"ngModel","ngModelChange"],["for","ConsumerSecret"]],template:function(e,i){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onClose",function(){return i.onClose()})("onCancel",function(){return i.onClose()})("onOk",function(){return i.onSubmit()}),t.TgZ(1,"div",1)(2,"div",2)(3,"input",3,4),t.NdJ("ngModelChange",function(a){return i.data.URL=a}),t.qZA(),t.TgZ(5,"label",5),t._uU(6,"URL"),t.qZA()(),t.TgZ(7,"div",2)(8,"input",6,4),t.NdJ("ngModelChange",function(a){return i.data.ConsumerKey=a}),t.qZA(),t.TgZ(10,"label",7),t._uU(11,"Consumer Key"),t.qZA()(),t.TgZ(12,"div",2)(13,"input",8,4),t.NdJ("ngModelChange",function(a){return i.data.ConsumerSecret=a}),t.qZA(),t.TgZ(15,"label",9),t._uU(16,"Consumer Secret"),t.qZA()()()()),2&e&&(t.Q6J("dynamicValidated",i.data.ConsumerKey&&i.data.URL&&i.data.ConsumerSecret)("config",i.modalConfig),t.xp6(3),t.Q6J("ngModel",i.data.URL),t.xp6(5),t.Q6J("ngModel",i.data.ConsumerKey),t.xp6(5),t.Q6J("ngModel",i.data.ConsumerSecret))},dependencies:[u.Fj,u.JJ,u.On,mt.M],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"]}),o})();var Ji=h(9300),Xt=h(455);function Hi(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"div",3)(1,"div",4)(2,"div",5)(3,"div",24)(4,"span"),t._uU(5,"BETA"),t.qZA()(),t.TgZ(6,"div",6),t._UZ(7,"img",25),t.qZA(),t.TgZ(8,"div",8)(9,"div",9)(10,"p"),t._uU(11,"Authorize DEALPOS to manage your KALCare Shop. You will need to fill your KALCare ShopID."),t.qZA(),t.TgZ(12,"p"),t._uU(13,"Please request your shopID by "),t.TgZ(14,"a",26),t._uU(15,"contacting"),t.qZA(),t._uU(16," the KALCare team"),t.qZA()(),t.TgZ(17,"button",27),t.NdJ("click",function(){t.CHM(e);const s=t.oxw();return t.KtG(s.openKalcareDialog())}),t._uU(18,"Submit Shop ID"),t.qZA()()()(),t.TgZ(19,"div",11)(20,"div",5)(21,"div",24)(22,"span"),t._uU(23,"BETA"),t.qZA()(),t.TgZ(24,"div",6),t._UZ(25,"img",28),t.qZA(),t.TgZ(26,"div",8)(27,"div",9)(28,"p"),t._uU(29,"Authorize DEALPOS versi V2 to manage your lazada, you will be redirected to lazada website to complete this process."),t.qZA(),t.TgZ(30,"p"),t._uU(31,"You will need to sign in to Lazada using your Seller account and confirm the authorization."),t.qZA()(),t.TgZ(32,"a",29),t.NdJ("click",function(){t.CHM(e);const s=t.oxw();return t.KtG(s.lazadaAuthorize())}),t._uU(33,"Authorize Account"),t.qZA()()()()()}}let Qi=(()=>{class o{constructor(e,i,s,a,r){this.route=e,this.http=i,this.service=s,this.dialog=a,this.toastr=r,this.newFeatureVisible=!1}saveTokopedia(){let e={ShopID:Number(this.shopID)};this.http.post("/api/ChannelAdd/Tokopedia",e).subscribe(i=>{this.service.navigate(["/menu/channel"])})}saveWooCommerce(e){this.http.post("/api/ChannelAdd/AddWooCommerce",e).subscribe(i=>{this.service.navigate(["/menu/channel"])})}saveKalCare(){this.http.post("/api/ChannelAdd/AddKalCare",{ShopIDString:this.shopIDString}).subscribe(i=>{this.service.navigate(["/menu/channel"])})}shopeeAuthorize(){this.http.post("/api/ChannelAuthorization/ShopeeV2_URL").subscribe(e=>{window.location.href=e.Url})}tiktokAuthorize(){this.http.post("/api/ChannelAuthorization/Tiktok_URL").subscribe(e=>{window.location.href=e.Url})}lazadaAuthorize(){this.http.post("/api/ChannelAuthorization/Lazada_URL").subscribe(e=>{window.location.href=e.Url})}openTokopediaDialog(){this.dialog.open(jt,{data:{title:"Tokopedia",ShopID:this.shopID},width:"30%"}).afterClosed().subscribe(i=>{null!=i&&(this.shopID=i.ShopID,this.saveTokopedia())})}openKalcareDialog(){this.dialog.open(jt,{data:{title:"KAL Care",ShopID:this.shopIDString},width:"30%"}).afterClosed().subscribe(i=>{null!=i&&(this.shopIDString=i.ShopID,this.saveKalCare())})}openWooCommerceDialog(){this.dialog.open(Ni,{data:{ShopID:this.shopID},width:"30%"}).afterClosed().pipe((0,Ji.h)(i=>D.g.IsNotEmpty(i))).subscribe(i=>{this.saveWooCommerce(i)})}contactSupport(){this.dialog.open(Fi,{width:"30%"}).afterClosed().subscribe(i=>{if(null!=i){if(null==i.Email)return void this.toastr.error("Email cannot be empty!","Error!");if(null==i.URL)return void this.toastr.error("Email cannot be empty!","URL!");this.http.post("Api/ChannelAuthorization/Tokopedia_Intercom",{URL:i.URL,Email:i.Email}).subscribe({next:()=>{this.toastr.success("Your request has been received, we will be in touch at "+i.Email,"Thank you!")},error:a=>{console.log("Failed to submit customer support!",a)}})}})}onToggleNewVersion(e){this.newFeatureVisible=e}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(C.gz),t.Y36(V.O),t.Y36(C.F0),t.Y36(F.uw),t.Y36(L._W))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-marketplace-add"]],decls:65,vars:5,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/channel",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container"],[1,"row","mt-12"],[1,"col-md-4","ps-md-0"],[1,"card","h-100","ribbon-box"],[1,"card-header"],["src","https://res.cloudinary.com/pos/image/upload/v1605249851/icons/Marketplace%20logo/shopee-logo.png",1,"w-100"],[1,"card-body"],[1,"mt-4","mb-4","h-auto",2,"font-size","larger"],[1,"h4","btn-bottom","fw-bold","btn","btn-shopee","text-white","btn-md","btn-block",3,"click"],[1,"col-md-4","pe-md-0"],[1,"card","h-100"],["src","https://res.cloudinary.com/pos/image/upload/v1605249861/icons/Marketplace%20logo/download_tkpd.png",1,"w-100"],["type","button",1,"button","text-primary","fw-bold",3,"click"],["data-cy","submitChannelTokopedia",1,"h4","btn-bottom","fw-bold","btn","btn-success","text-white","btn-md","btn-block",3,"click"],["src","https://woocommerce.com/wp-content/themes/woo/images/logo-woocommerce.svg",1,"w-100"],["href","https://support.dealpos.com/en/articles/5733019-woocommerce-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"],[1,"h4","btn-bottom","fw-bold","btn","btn-woocommerce","text-white","btn-md","btn-block",3,"click"],["src","https://res.cloudinary.com/pos/image/upload/v1645761565/icons/Marketplace%20logo/tiktok-logo.png",1,"w-100"],[1,"h4","btn-bottom","fw-bold","btn","btn-tiktok","text-white","btn-md","btn-block",3,"click"],["class","row mt-12",4,"ngIf"],[1,"p-5","text-start"],[3,"change"],[1,"ribbon","ribbon-top-right"],["src","data:image/png;base64,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",1,"w-100"],["href","https://www.kalcare.com/kania",1,"button","text-primary","fw-bold"],[1,"h4","btn-bottom","fw-bold","btn","btn-kalcare","text-white","btn-md","btn-block",3,"click"],["src","https://res.cloudinary.com/pos/image/upload/v1641528116/icons/Marketplace%20logo/lazada.png",1,"w-100"],[1,"h4","btn-bottom","fw-bold","btn","btn-primary","text-white","btn-md","btn-block",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),t._uU(3,"Cancel"),t.qZA()(),t.TgZ(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6),t._UZ(10,"img",7),t.qZA(),t.TgZ(11,"div",8)(12,"div",9)(13,"p"),t._uU(14,"Authorize DEALPOS versi V2 to manage your shopee, you will be redirected to shopee website to complete this process."),t.qZA(),t.TgZ(15,"p"),t._uU(16,"You will need to sign in to Shopee using your Seller account and confirm the authorization."),t.qZA()(),t.TgZ(17,"a",10),t.NdJ("click",function(){return i.shopeeAuthorize()}),t._uU(18,"Authorize Account"),t.qZA()()()(),t.TgZ(19,"div",11)(20,"div",12)(21,"div",6),t._UZ(22,"img",13),t.qZA(),t.TgZ(23,"div",8)(24,"div",9)(25,"p"),t._uU(26,"Authorize DEALPOS to manage your tokopedia, please "),t.TgZ(27,"a",14),t.NdJ("click",function(){return i.contactSupport()}),t._uU(28,"contact our customer support"),t.qZA(),t._uU(29," to complete this process."),t.qZA(),t.TgZ(30,"p"),t._uU(31,"Our team will send an invitation email which needs to be approved."),t.qZA()(),t.TgZ(32,"button",15),t.NdJ("click",function(){return i.openTokopediaDialog()}),t._uU(33,"Submit Shop ID"),t.qZA()()()(),t.TgZ(34,"div",11)(35,"div",12)(36,"div",6),t._UZ(37,"img",16),t.qZA(),t.TgZ(38,"div",8)(39,"div",9)(40,"p"),t._uU(41,"Authorize DEALPOS to manage your Personal Website"),t.qZA(),t.TgZ(42,"p"),t._uU(43,"Configure woocommerce integration by visiting "),t.TgZ(44,"a",17),t._uU(45,"this article"),t.qZA()()(),t.TgZ(46,"button",18),t.NdJ("click",function(){return i.openWooCommerceDialog()}),t._uU(47,"Register"),t.qZA()()()()(),t.TgZ(48,"div",3)(49,"div",4)(50,"div",12)(51,"div",6),t._UZ(52,"img",19),t.qZA(),t.TgZ(53,"div",8)(54,"div",9)(55,"p"),t._uU(56,"Authorize DEALPOS to manage your Tiktok Seller, you will be redirected to Tiktok website to complete this process."),t.qZA(),t.TgZ(57,"p"),t._uU(58,"You will need to sign in to Tiktok using your Seller account and confirm the authorization."),t.qZA()(),t.TgZ(59,"a",20),t.NdJ("click",function(){return i.tiktokAuthorize()}),t._uU(60,"Authorize Account"),t.qZA()()()()(),t.YNc(61,Hi,34,0,"div",21),t.qZA(),t.TgZ(62,"div",22)(63,"mat-slide-toggle",23),t.NdJ("change",function(a){return i.onToggleNewVersion(a.checked)}),t._uU(64,"Show Beta Channel Integration "),t.qZA()()()()),2&e&&(t.Q6J("headerTitle","Add New Channel")("pageData",i.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(61),t.Q6J("ngIf",i.newFeatureVisible))},dependencies:[m.O5,f.p,C.yS,Xt.Rr],styles:['.bg-shopee[_ngcontent-%COMP%], .btn-shopee[_ngcontent-%COMP%]{background:linear-gradient(-180deg,#f53d2d,#f63)!important}.bg-tiktok[_ngcontent-%COMP%], .btn-tiktok[_ngcontent-%COMP%]{background:linear-gradient(-173deg,#ee1d52,#69c9d0)!important}.bg-woocommerce[_ngcontent-%COMP%], .btn-woocommerce[_ngcontent-%COMP%]{background:#8053b4!important}.bg-kalcare[_ngcontent-%COMP%], .btn-kalcare[_ngcontent-%COMP%]{background:#016648!important}.pointer-help[_ngcontent-%COMP%]{cursor:help}.btn-bottom[_ngcontent-%COMP%]{position:absolute;bottom:.5rem;left:.5rem;width:96%}.ribbon-box[_ngcontent-%COMP%]{position:relative}.ribbon[_ngcontent-%COMP%]{width:150px;height:150px;overflow:hidden;position:absolute}.ribbon[_ngcontent-%COMP%]:before, .ribbon[_ngcontent-%COMP%]:after{position:absolute;z-index:1;content:"";display:block;border:5px solid #78c424}.ribbon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:absolute;display:block;width:225px;padding:15px 0;background-color:#78c424;box-shadow:0 5px 10px #0000001a;color:#fff;font:700 18px/1 Lato,sans-serif;text-shadow:0 1px 1px rgba(0,0,0,.2);text-transform:uppercase;text-align:center}.ribbon-top-right[_ngcontent-%COMP%]{top:-10px;right:-10px}.ribbon-top-right[_ngcontent-%COMP%]:before, .ribbon-top-right[_ngcontent-%COMP%]:after{border-top-color:transparent;border-right-color:transparent}.ribbon-top-right[_ngcontent-%COMP%]:before{top:0;left:0}.ribbon-top-right[_ngcontent-%COMP%]:after{bottom:0;right:0}.ribbon-top-right[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{left:-25px;top:30px;transform:rotate(45deg)}']}),o})(),$t=(()=>{class o{constructor(e){this.httpService=e}getLoader(){return this.httpService.post("/api/ChannelLoader/GetConfig",{})}submitConfig(e){return this.httpService.post("/api/Channel/SubmitConfig",e)}testChannel(e){return this.httpService.post("/api/POSAccount/Test",e)}refreshToken(e){return this.httpService.post("/api/POSAccount/Remove",e)}}return o.\u0275fac=function(e){return new(e||o)(t.LFG(V.O))},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();function Yi(o,n){1&o&&(t.TgZ(0,"div",18)(1,"label"),t._uU(2,"Order Payment Type"),t.qZA(),t.TgZ(3,"div")(4,"span"),t._uU(5,"Full Amount"),t.qZA()()())}function Vi(o,n){1&o&&(t.TgZ(0,"div",18)(1,"label"),t._uU(2,"Order Payment Type"),t.qZA(),t.TgZ(3,"div")(4,"span"),t._uU(5," Escrow Amount"),t.qZA()()())}const Bi=function(){return["/menu/channel/pos/edit"]};function Gi(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"div",16)(1,"label",17),t._uU(2,"Include Parent"),t.qZA(),t.TgZ(3,"div",18)(4,"mat-radio-group",19),t.NdJ("ngModelChange",function(s){t.CHM(e);const a=t.oxw();return t.KtG(a.form.IncludeParentInventory=s)}),t.TgZ(5,"mat-radio-button",25),t._uU(6," No "),t.qZA(),t.TgZ(7,"mat-radio-button",26),t._uU(8," Yes "),t.qZA()()()()}if(2&o){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.form.IncludeParentInventory),t.xp6(1),t.Q6J("value",!1),t.xp6(2),t.Q6J("value",!0)}}function Ki(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"div",16)(1,"label",17),t._uU(2,"Include Child"),t.qZA(),t.TgZ(3,"div",18)(4,"mat-radio-group",19),t.NdJ("ngModelChange",function(s){t.CHM(e);const a=t.oxw();return t.KtG(a.form.IncludeChildrenInventory=s)}),t.TgZ(5,"mat-radio-button",27),t._uU(6," No "),t.qZA(),t.TgZ(7,"mat-radio-button",28),t._uU(8," Yes "),t.qZA()()()()}if(2&o){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.form.IncludeChildrenInventory),t.xp6(1),t.Q6J("value",!1),t.xp6(2),t.Q6J("value",!0)}}const ji=[{path:"",component:x,children:[{path:"",redirectTo:"marketplace",pathMatch:"full"},{path:"marketplace",component:Ue,canActivate:[q.a],data:{title:"List"}},{path:"marketplace/form",component:gi,canActivate:[q.a],data:{title:"Add new Channel"}},{path:"marketplace/view",component:Ai,canActivate:[q.a],data:{title:"Marketplace View"}},{path:"marketplace/add",component:Qi,canActivate:[q.a],data:{title:"Marketplace Add"}},{path:"pos",component:(()=>{class o{constructor(e,i){this.toastr=e,this.posService=i,this.form=new ut,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(e=>{this.form=e.Form})}onRefreshToken(){this.posService.refreshToken(this.form).subscribe(e=>{this.toastr.success("Token has been refreshed!","Success",{closeButton:!0,positionClass:"toast-bottom-right"})})}onTestChannel(){this.posService.testChannel(this.form).subscribe(e=>{this.toastr.success("Test was successful!","Success",{closeButton:!0,positionClass:"toast-bottom-right"})})}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(L._W),t.Y36($t))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-pos"]],decls:50,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"],["class","info-label-group",4,"ngIf"],[1,"info-label-group"]],template:function(e,i){1&e&&(t.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),t.NdJ("click",function(){return i.onRefreshToken()}),t._uU(3,"Refresh Token"),t.qZA(),t.TgZ(4,"a",1),t.NdJ("click",function(){return i.onTestChannel()}),t._uU(5,"Validate Client Secret Guid"),t.qZA(),t.TgZ(6,"a",2),t._UZ(7,"i",3),t._uU(8," Edit"),t.qZA()(),t.TgZ(9,"content")(10,"div",4)(11,"div",5)(12,"div",6)(13,"div",7)(14,"div",8)(15,"h4"),t._uU(16,"Credentials"),t.qZA()(),t.TgZ(17,"div",9)(18,"div",10)(19,"input",11),t.NdJ("ngModelChange",function(a){return i.form.Host=a}),t.qZA(),t.TgZ(20,"label",12),t._uU(21,"Host"),t.qZA()(),t.TgZ(22,"div",10)(23,"input",13),t.NdJ("ngModelChange",function(a){return i.form.Username=a}),t.qZA(),t.TgZ(24,"label",14),t._uU(25,"Username"),t.qZA()(),t.TgZ(26,"div",10)(27,"input",15),t.NdJ("ngModelChange",function(a){return i.form.ClientSecretGuid=a}),t.qZA(),t.TgZ(28,"label",16),t._uU(29,"ClientSecretGuid"),t.qZA()()()()(),t.TgZ(30,"div",6)(31,"div",7)(32,"div",8)(33,"h4"),t._uU(34,"Configuration"),t.qZA()(),t.TgZ(35,"div",9),t.YNc(36,Yi,6,0,"div",17),t.YNc(37,Vi,6,0,"div",17),t.TgZ(38,"div",18)(39,"label"),t._uU(40,"Composite Inventory"),t.qZA(),t.TgZ(41,"div")(42,"span"),t._uU(43),t.qZA()()(),t.TgZ(44,"div",18)(45,"label"),t._uU(46,"Invoice Type Configuration"),t.qZA(),t.TgZ(47,"div")(48,"span"),t._uU(49),t.qZA()()()()()()()()()()),2&e&&(t.Q6J("headerTitle","POS")("pageData",i.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(6),t.Q6J("routerLink",t.DdM(12,Bi)),t.xp6(13),t.Q6J("ngModel",i.form.Host),t.xp6(4),t.Q6J("ngModel",i.form.Username),t.xp6(4),t.Q6J("ngModel",i.form.ClientSecretGuid),t.xp6(9),t.Q6J("ngIf",1==i.form.OrderPaymentAmountType),t.xp6(1),t.Q6J("ngIf",0==i.form.OrderPaymentAmountType),t.xp6(6),t.hij(" ",i.form.CompositeVisible,""),t.xp6(6),t.hij(" ",0==i.form.InvoiceType?"Outlet":"Sales Order Tags",""))},dependencies:[m.O5,u.Fj,u.JJ,u.On,f.p,C.yS]}),o})(),canActivate:[q.a],data:{title:"POS"}},{path:"pos/edit",component:(()=>{class o{constructor(e,i,s){this._router=e,this.toastr=i,this.posService=s,this.form=new ut,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(e=>{this.form=e.Form})}onSubmitHost(){this.posService.submitConfig(this.form).subscribe(e=>{this.toastr.success("Successfully Edited POS Config!","Success!"),this._router.navigate(["menu/channel"])})}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(C.F0),t.Y36(L._W),t.Y36($t))},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-edit"]],decls:53,vars:15,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/channel",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"click"],[1,"container-fluid","mt-3"],[1,"row","mt-5"],[1,"col-md-6"],[1,"card"],[1,"card-header"],[1,"card-body","mt-8"],[1,"form-label-group"],["type","text","id","Host","name","Host","data-toggle","tooltip","title","Host",1,"form-control",3,"ngModel","ngModelChange"],["for","Host"],["type","text","id","Username","name","Username","data-toggle","tooltip","title","Username",1,"form-control",3,"ngModel","ngModelChange"],["for","Username"],["type","text","id","ClientSecretGuid","name","ClientSecretGuid","data-toggle","tooltip","title","ClientSecretGuid",1,"form-control",3,"ngModel","ngModelChange"],["for","ClientSecretGuid"],[1,"form-label-group","radio"],["for","OrderPaymentAmountType"],[1,"mt-3"],[3,"ngModel","ngModelChange"],["data-toggle","tooltip","title","No support composite and trigger component",1,"me-5",3,"value"],["data-toggle","tootip","title","Support composite and trigger component",1,"me-5",3,"value"],["class","form-label-group radio",4,"ngIf"],["data-toggle","tooltip","title","invoice using outlet",1,"me-5",3,"value"],["data-toggle","tootip","title","invoice using sales order tags",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,"me-5",3,"value"],["data-toggle","tooltip","title","No Include variant child component",1,"me-5",3,"value"],["data-toggle","tootip","title","Include Include variant child component",1,"me-5",3,"value"]],template:function(e,i){1&e&&(t.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),t._uU(3,"Cancel"),t.qZA(),t.TgZ(4,"a",2),t.NdJ("click",function(){return i.onSubmitHost()}),t._uU(5,"Save"),t.qZA()(),t.TgZ(6,"content")(7,"div",3)(8,"div",4)(9,"div",5)(10,"div",6)(11,"div",7)(12,"h4"),t._uU(13,"Credentials"),t.qZA()(),t.TgZ(14,"div",8)(15,"div",9)(16,"input",10),t.NdJ("ngModelChange",function(a){return i.form.Host=a}),t.qZA(),t.TgZ(17,"label",11),t._uU(18,"Host"),t.qZA()(),t.TgZ(19,"div",9)(20,"input",12),t.NdJ("ngModelChange",function(a){return i.form.Username=a}),t.qZA(),t.TgZ(21,"label",13),t._uU(22,"Username"),t.qZA()(),t.TgZ(23,"div",9)(24,"input",14),t.NdJ("ngModelChange",function(a){return i.form.ClientSecretGuid=a}),t.qZA(),t.TgZ(25,"label",15),t._uU(26,"ClientSecretGuid"),t.qZA()()()()(),t.TgZ(27,"div",5)(28,"div",6)(29,"div",7)(30,"h4"),t._uU(31,"Configuration"),t.qZA()(),t.TgZ(32,"div",8)(33,"div",16)(34,"label",17),t._uU(35,"Composite Inventory"),t.qZA(),t.TgZ(36,"div",18)(37,"mat-radio-group",19),t.NdJ("ngModelChange",function(a){return i.form.CompositeVisible=a}),t.TgZ(38,"mat-radio-button",20),t._uU(39," No "),t.qZA(),t.TgZ(40,"mat-radio-button",21),t._uU(41," Yes "),t.qZA()()()(),t.YNc(42,Gi,9,3,"div",22),t.YNc(43,Ki,9,3,"div",22),t.TgZ(44,"div",16)(45,"label",17),t._uU(46,"Invoice Type Configuration"),t.qZA(),t.TgZ(47,"div",18)(48,"mat-radio-group",19),t.NdJ("ngModelChange",function(a){return i.form.InvoiceType=a}),t.TgZ(49,"mat-radio-button",23),t._uU(50," Outlet "),t.qZA(),t.TgZ(51,"mat-radio-button",24),t._uU(52," Sales order tags "),t.qZA()()()()()()()()()()()),2&e&&(t.Q6J("headerTitle","POS Edit")("pageData",i.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(16),t.Q6J("ngModel",i.form.Host),t.xp6(4),t.Q6J("ngModel",i.form.Username),t.xp6(4),t.Q6J("ngModel",i.form.ClientSecretGuid),t.xp6(13),t.Q6J("ngModel",i.form.CompositeVisible),t.xp6(1),t.Q6J("value",!1),t.xp6(2),t.Q6J("value",!0),t.xp6(2),t.Q6J("ngIf",i.form.CompositeVisible),t.xp6(1),t.Q6J("ngIf",i.form.CompositeVisible),t.xp6(5),t.Q6J("ngModel",i.form.InvoiceType),t.xp6(1),t.Q6J("value",0),t.xp6(2),t.Q6J("value",1))},dependencies:[m.O5,u.Fj,u.JJ,u.On,f.p,w.VQ,w.U0,C.yS],styles:[".passwordIcon[_ngcontent-%COMP%]{top:1.5rem;right:1rem;position:absolute;margin:0 auto!important;cursor:pointer}"]}),o})(),canActivate:[q.a],data:{title:"POS Edit"}}]}];let Xi=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({imports:[m.ez,C.Bz.forChild(ji)]}),o})();var $i=h(4144),tn=h(9101);let en=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({imports:[m.ez,u.u5,E.Z,f.R,w.Fk,K.A0,Xi,C.Bz,Me,Ge,$i.c,tn.ot,Wt.Ps,et.AV,Xt.rP]}),o})()},7398:(ie,G,h)=>{h.d(G,{Z:()=>C,e:()=>K});var m=h(6895),u=h(266),E=h(6806),f=h(4650);function w(t,x){if(1&t&&(f.TgZ(0,"li",2)(1,"a",3),f._uU(2),f.qZA()()),2&t){const y=x.$implicit;f.xp6(1),f.s9C("routerLink",y.Url),f.Q6J("title",y.Description?y.Description:""),f.xp6(1),f.hij(" ",y.Title," ")}}let K=(()=>{class t{}return t.\u0275fac=function(y){return new(y||t)},t.\u0275cmp=f.Xpm({type:t,selectors:[["nav-tab"]],inputs:{Tabs:"Tabs"},decls:2,vars:1,consts:[[1,"nav","navbar-nav","navbar-left","nav-tab-arrow"],["routerLinkActive","active","class","nav-item me-6",4,"ngFor","ngForOf"],["routerLinkActive","active",1,"nav-item","me-6"],[1,"nav-link","nav-link-arrow","mb-0",3,"routerLink","title"]],template:function(y,T){1&y&&(f.TgZ(0,"ul",0),f.YNc(1,w,3,3,"li",1),f.qZA()),2&y&&(f.xp6(1),f.Q6J("ngForOf",T.Tabs))},dependencies:[m.sg,E.yS,E.Od]}),t})(),C=(()=>{class t{}return t.\u0275fac=function(y){return new(y||t)},t.\u0275mod=f.oAB({type:t}),t.\u0275inj=f.cJS({imports:[m.ez,E.Bz,u.AV]}),t})()}}]);
|