marketplacepos 2.7.7 → 2.7.9
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/213.cb4351cfb44ca3bf.js +1 -0
- package/Marketplace/360.8279e3b4ceab63e1.js +1 -0
- package/Marketplace/{369.8e0f0cb3753df1cb.js → 369.0575419486a72276.js} +1 -1
- package/Marketplace/397.55fafd1d8945185c.js +1 -0
- package/Marketplace/3rdpartylicenses.txt +6 -0
- package/Marketplace/408.b53797a5bda9f7f8.js +1 -0
- package/Marketplace/46.67982fb195b43a4d.js +1 -0
- package/Marketplace/{512.29e1a80c0261c3fd.js → 512.6ddd3191d13695a8.js} +1 -1
- package/Marketplace/53.7e8bb7325980dfd5.js +1 -0
- package/Marketplace/655.09b1b17f23a59b7e.js +1 -0
- package/Marketplace/{717.26634e93ca9b60ed.js → 717.2e5a78cf17e9bed1.js} +1 -1
- package/Marketplace/718.78930b2d3e9fc2bd.js +1 -0
- package/Marketplace/{72.b0c5b137e38d6dbc.js → 72.a5fd86c341c782ab.js} +1 -1
- package/Marketplace/{739.a22c3c892afd39b9.js → 739.0de1f18deac0ed90.js} +1 -1
- package/Marketplace/82.fecf4fa3a3743326.js +1 -0
- package/Marketplace/87.0c53ec1547d4d5d5.js +1 -0
- package/Marketplace/{874.8531eff61a70fef4.js → 874.7662257927081a57.js} +1 -1
- package/Marketplace/877.7e5f8104980e0168.js +1 -0
- package/Marketplace/884.45404dc14d1585a7.js +1 -0
- package/Marketplace/913.6b5b3db030c3bc49.js +1 -0
- package/Marketplace/993.5c22ca4b00b8c459.js +1 -0
- package/Marketplace/997.08e3f8cf0bafff67.js +1 -0
- package/Marketplace/common.df21aa97084954ce.js +1 -0
- package/Marketplace/index.html +2 -2
- package/Marketplace/main.add73bc6e206d464.js +1 -0
- package/Marketplace/runtime.4aba70544574ad58.js +1 -0
- package/package.json +1 -1
- package/Marketplace/25.b70d86f301c02577.js +0 -1
- package/Marketplace/360.35d9782330672e00.js +0 -1
- package/Marketplace/397.5272744096b3c1f6.js +0 -1
- package/Marketplace/408.37b4fc08ff0dec9d.js +0 -1
- package/Marketplace/516.62e0aa94b5bf1d69.js +0 -1
- package/Marketplace/61.868e35095821a091.js +0 -1
- package/Marketplace/616.b7e1ec6933570169.js +0 -1
- package/Marketplace/643.cb4d6fbf012ab5e2.js +0 -1
- package/Marketplace/716.986295839ef23655.js +0 -1
- package/Marketplace/833.ac6eaa6a9d4889f8.js +0 -1
- package/Marketplace/863.8a1ee5ad77c709bd.js +0 -1
- package/Marketplace/877.162c86da2be22c5c.js +0 -1
- package/Marketplace/913.08c7bf72f6b8e4f8.js +0 -1
- package/Marketplace/993.2e09a35cae6cb725.js +0 -1
- package/Marketplace/997.6b3f954f35ff3ac0.js +0 -1
- package/Marketplace/common.964b6e7314a0ac53.js +0 -1
- package/Marketplace/main.4b854eb9a27f62ed.js +0 -1
- package/Marketplace/runtime.8464b07500ba30ae.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[833],{3154:(Z,G,p)=>{p.d(G,{g:()=>w});var e=(()=>{return(x=e||(e={})).SHOOPE="//res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png",x.WOOCOMMERCE="//res.cloudinary.com/pos/image/upload/w_50/v1632447439/icons/WooCommerce/woocommerce-icon.webp",x.TOKOPEDIA="//res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png",x.TIKTOK="//res.cloudinary.com/pos/image/upload/w_30/v1645761611/icons/Marketplace%20logo/tiktok.png",x.LAZADA="//res.cloudinary.com/pos/image/upload/w_30/v1641528003/icons/marketplace_icons/lazada.png",x.KALCARE="//res.cloudinary.com/pos/image/upload/v1654230268/icons/marketplace_icons/kalcare.png",e;var x})(),E=p(9694);class w{static IsNotEmpty(_){return""!=_&&_!=w.GuidEMpty&&null!=_&&null!=_}static IsEmpty(_){return""==_||null==_||null==_||_==w.GuidEMpty}static getChannelLogoByTypeId(_){let F;switch(_){case E.x.Tokopedia:F=e.TOKOPEDIA;break;case E.x.ShopeeV2:F=e.SHOOPE;break;case E.x.WooCommerce:F=e.WOOCOMMERCE;break;case E.x.Lazada:F=e.LAZADA;break;case E.x.Tiktok:F=e.TIKTOK;break;case E.x.KalCare:F=e.KALCARE}return F}static getDaysDiff(_,F){return(F.getTime()-_.getTime())/864e5}static addDays(_,F){const V=new Date(Number(_));return V.setDate(_.getDate()-F),V}static isValidDate(_){return _ instanceof Date&&!isNaN(_)}static getImageInfo(_){return new Promise((F,V)=>{let C=new Image;C.src=_,C.decode().then(()=>{F({img:_,height:C.height,width:C.width})}).catch(()=>{V(new Error(`Image load error for ${_}`))})})}static formatTitleFromDate(_,F){let V=null;const C=new Date(_),S=new Date(F);return C.getDate()!=S.getDate()&&(V="dd"),C.getMonth()!=S.getMonth()&&(V="dd MMM"),C.getFullYear()!=S.getFullYear()&&(V="dd MMM yyyy"),V}static openDownloadFile(_,F){var V=window.URL.createObjectURL(_),C=document.createElement("a");C.href=V,C.download=F,C.click()}}w.GuidEMpty="00000000-0000-0000-0000-000000000000",w.MinDate="0001-01-01T00:00:00"},9694:(Z,G,p)=>{p.d(G,{x:()=>e});var e=(()=>{return(E=e||(e={}))[E.Shopee=0]="Shopee",E[E.Tokopedia=1]="Tokopedia",E[E.WooCommerce=2]="WooCommerce",E[E.None=3]="None",E[E.KalCare=4]="KalCare",E[E.ShopeeV2=5]="ShopeeV2",E[E.Tiktok=6]="Tiktok",E[E.Lazada=7]="Lazada",e;var E})()},4128:(Z,G,p)=>{p.d(G,{D:()=>C});var e=p(9751),E=p(4742),w=p(8421),x=p(3269),_=p(5403),F=p(3268),V=p(1810);function C(...S){const m=(0,x.jO)(S),{args:T,keys:b}=(0,E.D)(S),O=new e.y(N=>{const{length:v}=T;if(!v)return void N.complete();const D=new Array(v);let g=v,y=v;for(let A=0;A<v;A++){let H=!1;(0,w.Xf)(T[A]).subscribe((0,_.x)(N,j=>{H||(H=!0,y--),D[A]=j},()=>g--,void 0,()=>{(!g||!H)&&(y||N.next(b?(0,V.n)(b,D):D),N.complete())}))}});return m?O.pipe((0,F.Z)(m)):O}},4968:(Z,G,p)=>{p.d(G,{R:()=>m});var e=p(8421),E=p(9751),w=p(5577),x=p(1144),_=p(576),F=p(3268);const V=["addListener","removeListener"],C=["addEventListener","removeEventListener"],S=["on","off"];function m(v,D,g,y){if((0,_.m)(g)&&(y=g,g=void 0),y)return m(v,D,g).pipe((0,F.Z)(y));const[A,H]=function N(v){return(0,_.m)(v.addEventListener)&&(0,_.m)(v.removeEventListener)}(v)?C.map(j=>q=>v[j](D,q,g)):function b(v){return(0,_.m)(v.addListener)&&(0,_.m)(v.removeListener)}(v)?V.map(T(v,D)):function O(v){return(0,_.m)(v.on)&&(0,_.m)(v.off)}(v)?S.map(T(v,D)):[];if(!A&&(0,x.z)(v))return(0,w.z)(j=>m(j,D,g))((0,e.Xf)(v));if(!A)throw new TypeError("Invalid event target");return new E.y(j=>{const q=(...J)=>j.next(1<J.length?J:J[0]);return A(q),()=>H(q)})}function T(v,D){return g=>y=>v[g](D,y)}},3601:(Z,G,p)=>{p.d(G,{e:()=>V});var e=p(4986),E=p(4482),w=p(8421),x=p(5403),F=p(2805);function V(C,S=e.z){return function _(C){return(0,E.e)((S,m)=>{let T=!1,b=null,O=null,N=!1;const v=()=>{if(O?.unsubscribe(),O=null,T){T=!1;const g=b;b=null,m.next(g)}N&&m.complete()},D=()=>{O=null,N&&m.complete()};S.subscribe((0,x.x)(m,g=>{T=!0,b=g,O||(0,w.Xf)(C(g)).subscribe(O=(0,x.x)(m,v,D))},()=>{N=!0,(!T||!O||O.closed)&&m.complete()}))})}(()=>(0,F.H)(C,S))}},6406:(Z,G,p)=>{p.d(G,{Z:()=>V});var e=p(4408),E=p(727);const w={schedule(S){let m=requestAnimationFrame,T=cancelAnimationFrame;const{delegate:b}=w;b&&(m=b.requestAnimationFrame,T=b.cancelAnimationFrame);const O=m(N=>{T=void 0,S(N)});return new E.w0(()=>T?.(O))},requestAnimationFrame(...S){const{delegate:m}=w;return(m?.requestAnimationFrame||requestAnimationFrame)(...S)},cancelAnimationFrame(...S){const{delegate:m}=w;return(m?.cancelAnimationFrame||cancelAnimationFrame)(...S)},delegate:void 0};var _=p(7565);const V=new class F extends _.v{flush(m){this._active=!0;const T=this._scheduled;this._scheduled=void 0;const{actions:b}=this;let O;m=m||b.shift();do{if(O=m.execute(m.state,m.delay))break}while((m=b[0])&&m.id===T&&b.shift());if(this._active=!1,O){for(;(m=b[0])&&m.id===T&&b.shift();)m.unsubscribe();throw O}}}(class x extends e.o{constructor(m,T){super(m,T),this.scheduler=m,this.work=T}requestAsyncId(m,T,b=0){return null!==b&&b>0?super.requestAsyncId(m,T,b):(m.actions.push(this),m._scheduled||(m._scheduled=w.requestAnimationFrame(()=>m.flush(void 0))))}recycleAsyncId(m,T,b=0){if(null!=b&&b>0||null==b&&this.delay>0)return super.recycleAsyncId(m,T,b);m.actions.some(O=>O.id===T)||(w.cancelAnimationFrame(T),m._scheduled=void 0)}})},3101:(Z,G,p)=>{p.d(G,{E:()=>N});var e=p(4408);let w,E=1;const x={};function _(D){return D in x&&(delete x[D],!0)}const F={setImmediate(D){const g=E++;return x[g]=!0,w||(w=Promise.resolve()),w.then(()=>_(g)&&D()),g},clearImmediate(D){_(D)}},{setImmediate:C,clearImmediate:S}=F,m={setImmediate(...D){const{delegate:g}=m;return(g?.setImmediate||C)(...D)},clearImmediate(D){const{delegate:g}=m;return(g?.clearImmediate||S)(D)},delegate:void 0};var b=p(7565);const N=new class O extends b.v{flush(g){this._active=!0;const y=this._scheduled;this._scheduled=void 0;const{actions:A}=this;let H;g=g||A.shift();do{if(H=g.execute(g.state,g.delay))break}while((g=A[0])&&g.id===y&&A.shift());if(this._active=!1,H){for(;(g=A[0])&&g.id===y&&A.shift();)g.unsubscribe();throw H}}}(class T extends e.o{constructor(g,y){super(g,y),this.scheduler=g,this.work=y}requestAsyncId(g,y,A=0){return null!==A&&A>0?super.requestAsyncId(g,y,A):(g.actions.push(this),g._scheduled||(g._scheduled=m.setImmediate(g.flush.bind(g,void 0))))}recycleAsyncId(g,y,A=0){if(null!=A&&A>0||null==A&&this.delay>0)return super.recycleAsyncId(g,y,A);g.actions.some(H=>H.id===y)||(m.clearImmediate(y),g._scheduled=void 0)}})},4006:(Z,G,p)=>{p.d(G,{Cf:()=>y,EJ:()=>qe,F:()=>We,Fj:()=>N,JJ:()=>Le,JL:()=>Ge,JU:()=>C,Kr:()=>jt,On:()=>lt,Q7:()=>Ke,UX:()=>Mn,Wl:()=>m,YN:()=>Ut,Zs:()=>pt,_Y:()=>Nt,a5:()=>W,c5:()=>gt,gN:()=>P,kI:()=>j,on:()=>mt,sg:()=>ze,u5:()=>On,wV:()=>at});var e=p(4650),E=p(6895),w=p(8996),x=p(4128),_=p(4004);let F=(()=>{class s{constructor(t,r){this._renderer=t,this._elementRef=r,this.onChange=c=>{},this.onTouched=()=>{}}setProperty(t,r){this._renderer.setProperty(this._elementRef.nativeElement,t,r)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(e.Qsj),e.Y36(e.SBq))},s.\u0275dir=e.lG2({type:s}),s})(),V=(()=>{class s extends F{}return s.\u0275fac=function(){let n;return function(r){return(n||(n=e.n5z(s)))(r||s)}}(),s.\u0275dir=e.lG2({type:s,features:[e.qOj]}),s})();const C=new e.OlP("NgValueAccessor"),S={provide:C,useExisting:(0,e.Gpc)(()=>m),multi:!0};let m=(()=>{class s extends V{writeValue(t){this.setProperty("checked",t)}}return s.\u0275fac=function(){let n;return function(r){return(n||(n=e.n5z(s)))(r||s)}}(),s.\u0275dir=e.lG2({type:s,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(t,r){1&t&&e.NdJ("change",function(f){return r.onChange(f.target.checked)})("blur",function(){return r.onTouched()})},features:[e._Bn([S]),e.qOj]}),s})();const T={provide:C,useExisting:(0,e.Gpc)(()=>N),multi:!0},O=new e.OlP("CompositionEventMode");let N=(()=>{class s extends F{constructor(t,r,c){super(t,r),this._compositionMode=c,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function b(){const s=(0,E.q)()?(0,E.q)().getUserAgent():"";return/android (\d+)/.test(s.toLowerCase())}())}writeValue(t){this.setProperty("value",t??"")}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(e.Qsj),e.Y36(e.SBq),e.Y36(O,8))},s.\u0275dir=e.lG2({type:s,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(t,r){1&t&&e.NdJ("input",function(f){return r._handleInput(f.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(f){return r._compositionEnd(f.target.value)})},features:[e._Bn([T]),e.qOj]}),s})();function D(s){return null==s||("string"==typeof s||Array.isArray(s))&&0===s.length}function g(s){return null!=s&&"number"==typeof s.length}const y=new e.OlP("NgValidators"),A=new e.OlP("NgAsyncValidators"),H=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class j{static min(n){return function q(s){return n=>{if(D(n.value)||D(s))return null;const t=parseFloat(n.value);return!isNaN(t)&&t<s?{min:{min:s,actual:n.value}}:null}}(n)}static max(n){return function J(s){return n=>{if(D(n.value)||D(s))return null;const t=parseFloat(n.value);return!isNaN(t)&&t>s?{max:{max:s,actual:n.value}}:null}}(n)}static required(n){return ve(n)}static requiredTrue(n){return ye(n)}static email(n){return Ce(n)}static minLength(n){return function Ee(s){return n=>D(n.value)||!g(n.value)?null:n.value.length<s?{minlength:{requiredLength:s,actualLength:n.value.length}}:null}(n)}static maxLength(n){return function Ae(s){return n=>g(n.value)&&n.value.length>s?{maxlength:{requiredLength:s,actualLength:n.value.length}}:null}(n)}static pattern(n){return De(n)}static nullValidator(n){return null}static compose(n){return Oe(n)}static composeAsync(n){return Me(n)}}function ve(s){return D(s.value)?{required:!0}:null}function ye(s){return!0===s.value?null:{required:!0}}function Ce(s){return D(s.value)||H.test(s.value)?null:{email:!0}}function De(s){if(!s)return ie;let n,t;return"string"==typeof s?(t="","^"!==s.charAt(0)&&(t+="^"),t+=s,"$"!==s.charAt(s.length-1)&&(t+="$"),n=new RegExp(t)):(t=s.toString(),n=s),r=>{if(D(r.value))return null;const c=r.value;return n.test(c)?null:{pattern:{requiredPattern:t,actualValue:c}}}}function ie(s){return null}function be(s){return null!=s}function Te(s){return(0,e.QGY)(s)?(0,w.D)(s):s}function Fe(s){let n={};return s.forEach(t=>{n=null!=t?{...n,...t}:n}),0===Object.keys(n).length?null:n}function Ve(s,n){return n.map(t=>t(s))}function we(s){return s.map(n=>function Ze(s){return!s.validate}(n)?n:t=>n.validate(t))}function Oe(s){if(!s)return null;const n=s.filter(be);return 0==n.length?null:function(t){return Fe(Ve(t,n))}}function ue(s){return null!=s?Oe(we(s)):null}function Me(s){if(!s)return null;const n=s.filter(be);return 0==n.length?null:function(t){const r=Ve(t,n).map(Te);return(0,x.D)(r).pipe((0,_.U)(Fe))}}function ce(s){return null!=s?Me(we(s)):null}function Se(s,n){return null===s?[n]:Array.isArray(s)?[...s,n]:[s,n]}function Ie(s){return s._rawValidators}function xe(s){return s._rawAsyncValidators}function de(s){return s?Array.isArray(s)?s:[s]:[]}function se(s,n){return Array.isArray(s)?s.includes(n):s===n}function Ne(s,n){const t=de(n);return de(s).forEach(c=>{se(t,c)||t.push(c)}),t}function Be(s,n){return de(n).filter(t=>!se(s,t))}class ke{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(n){this._rawValidators=n||[],this._composedValidatorFn=ue(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=ce(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(n){this._onDestroyCallbacks.push(n)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(n=>n()),this._onDestroyCallbacks=[]}reset(n){this.control&&this.control.reset(n)}hasError(n,t){return!!this.control&&this.control.hasError(n,t)}getError(n,t){return this.control?this.control.getError(n,t):null}}class P extends ke{get formDirective(){return null}get path(){return null}}class W extends ke{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Pe{constructor(n){this._cd=n}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let Le=(()=>{class s extends Pe{constructor(t){super(t)}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(W,2))},s.\u0275dir=e.lG2({type:s,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,r){2&t&&e.ekj("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},features:[e.qOj]}),s})(),Ge=(()=>{class s extends Pe{constructor(t){super(t)}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(P,10))},s.\u0275dir=e.lG2({type:s,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(t,r){2&t&&e.ekj("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},features:[e.qOj]}),s})();const ee="VALID",K="INVALID",Q="PENDING",R="DISABLED";function le(s){return(te(s)?s.validators:s)||null}function me(s,n){return(te(n)?n.asyncValidators:s)||null}function te(s){return null!=s&&!Array.isArray(s)&&"object"==typeof s}class ge{constructor(n,t){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(n),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(n){this._rawValidators=this._composedValidatorFn=n}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(n){this._rawAsyncValidators=this._composedAsyncValidatorFn=n}get parent(){return this._parent}get valid(){return this.status===ee}get invalid(){return this.status===K}get pending(){return this.status==Q}get disabled(){return this.status===R}get enabled(){return this.status!==R}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(n){this._assignValidators(n)}setAsyncValidators(n){this._assignAsyncValidators(n)}addValidators(n){this.setValidators(Ne(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(Ne(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(Be(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(Be(n,this._rawAsyncValidators))}hasValidator(n){return se(this._rawValidators,n)}hasAsyncValidator(n){return se(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){this.touched=!0,this._parent&&!n.onlySelf&&this._parent.markAsTouched(n)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(n=>n.markAllAsTouched())}markAsUntouched(n={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}markAsDirty(n={}){this.pristine=!1,this._parent&&!n.onlySelf&&this._parent.markAsDirty(n)}markAsPristine(n={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}markAsPending(n={}){this.status=Q,!1!==n.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!n.onlySelf&&this._parent.markAsPending(n)}disable(n={}){const t=this._parentMarkedDirty(n.onlySelf);this.status=R,this.errors=null,this._forEachChild(r=>{r.disable({...n,onlySelf:!0})}),this._updateValue(),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...n,skipPristineCheck:t}),this._onDisabledChange.forEach(r=>r(!0))}enable(n={}){const t=this._parentMarkedDirty(n.onlySelf);this.status=ee,this._forEachChild(r=>{r.enable({...n,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors({...n,skipPristineCheck:t}),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(n){this._parent&&!n.onlySelf&&(this._parent.updateValueAndValidity(n),n.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(n){this._parent=n}getRawValue(){return this.value}updateValueAndValidity(n={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===ee||this.status===Q)&&this._runAsyncValidator(n.emitEvent)),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.updateValueAndValidity(n)}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?R:ee}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n){if(this.asyncValidator){this.status=Q,this._hasOwnPendingAsyncValidator=!0;const t=Te(this.asyncValidator(this));this._asyncValidationSubscription=t.subscribe(r=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(r,{emitEvent:n})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(n,t={}){this.errors=n,this._updateControlsErrors(!1!==t.emitEvent)}get(n){let t=n;return null==t||(Array.isArray(t)||(t=t.split(".")),0===t.length)?null:t.reduce((r,c)=>r&&r._find(c),this)}getError(n,t){const r=t?this.get(t):this;return r&&r.errors?r.errors[n]:null}hasError(n,t){return!!this.getError(n,t)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(n)}_initObservables(){this.valueChanges=new e.vpe,this.statusChanges=new e.vpe}_calculateStatus(){return this._allControlsDisabled()?R:this.errors?K:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Q)?Q:this._anyControlsHaveStatus(K)?K:ee}_anyControlsHaveStatus(n){return this._anyControls(t=>t.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n={}){this.pristine=!this._anyControlsDirty(),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}_updateTouched(n={}){this.touched=this._anyControlsTouched(),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){te(n)&&null!=n.updateOn&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){return!n&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(n){return null}_assignValidators(n){this._rawValidators=Array.isArray(n)?n.slice():n,this._composedValidatorFn=function He(s){return Array.isArray(s)?ue(s):s||null}(this._rawValidators)}_assignAsyncValidators(n){this._rawAsyncValidators=Array.isArray(n)?n.slice():n,this._composedAsyncValidatorFn=function Ue(s){return Array.isArray(s)?ce(s):s||null}(this._rawAsyncValidators)}}class fe extends ge{constructor(n,t,r){super(le(t),me(r,t)),this.controls=n,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(n,t){return this.controls[n]?this.controls[n]:(this.controls[n]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(n,t,r={}){this.registerControl(n,t),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}removeControl(n,t={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(n,t,r={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],t&&this.registerControl(n,t),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}contains(n){return this.controls.hasOwnProperty(n)&&this.controls[n].enabled}setValue(n,t={}){(function je(s,n,t){s._forEachChild((r,c)=>{if(void 0===t[c])throw new e.vHH(1002,"")})})(this,0,n),Object.keys(n).forEach(r=>{(function Ye(s,n,t){const r=s.controls;if(!(n?Object.keys(r):r).length)throw new e.vHH(1e3,"");if(!r[t])throw new e.vHH(1001,"")})(this,!0,r),this.controls[r].setValue(n[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(n,t={}){null!=n&&(Object.keys(n).forEach(r=>{const c=this.controls[r];c&&c.patchValue(n[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(n={},t={}){this._forEachChild((r,c)=>{r.reset(n[c],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(n,t,r)=>(n[r]=t.getRawValue(),n))}_syncPendingControls(){let n=this._reduceChildren(!1,(t,r)=>!!r._syncPendingControls()||t);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){Object.keys(this.controls).forEach(t=>{const r=this.controls[t];r&&n(r,t)})}_setUpControls(){this._forEachChild(n=>{n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(n){for(const[t,r]of Object.entries(this.controls))if(this.contains(t)&&n(r))return!0;return!1}_reduceValue(){return this._reduceChildren({},(t,r,c)=>((r.enabled||this.disabled)&&(t[c]=r.value),t))}_reduceChildren(n,t){let r=n;return this._forEachChild((c,f)=>{r=t(r,c,f)}),r}_allControlsDisabled(){for(const n of Object.keys(this.controls))if(this.controls[n].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(n){return this.controls.hasOwnProperty(n)?this.controls[n]:null}}const a=new e.OlP("CallSetDisabledState",{providedIn:"root",factory:()=>i}),i="always";function u(s,n,t=i){k(s,n),n.valueAccessor.writeValue(s.value),(s.disabled||"always"===t)&&n.valueAccessor.setDisabledState?.(s.disabled),function z(s,n){n.valueAccessor.registerOnChange(t=>{s._pendingValue=t,s._pendingChange=!0,s._pendingDirty=!0,"change"===s.updateOn&&U(s,n)})}(s,n),function ae(s,n){const t=(r,c)=>{n.valueAccessor.writeValue(r),c&&n.viewToModelUpdate(r)};s.registerOnChange(t),n._registerOnDestroy(()=>{s._unregisterOnChange(t)})}(s,n),function Y(s,n){n.valueAccessor.registerOnTouched(()=>{s._pendingTouched=!0,"blur"===s.updateOn&&s._pendingChange&&U(s,n),"submit"!==s.updateOn&&s.markAsTouched()})}(s,n),function M(s,n){if(n.valueAccessor.setDisabledState){const t=r=>{n.valueAccessor.setDisabledState(r)};s.registerOnDisabledChange(t),n._registerOnDestroy(()=>{s._unregisterOnDisabledChange(t)})}}(s,n)}function d(s,n,t=!0){const r=()=>{};n.valueAccessor&&(n.valueAccessor.registerOnChange(r),n.valueAccessor.registerOnTouched(r)),B(s,n),s&&(n._invokeOnDestroyCallbacks(),s._registerOnCollectionChange(()=>{}))}function h(s,n){s.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(n)})}function k(s,n){const t=Ie(s);null!==n.validator?s.setValidators(Se(t,n.validator)):"function"==typeof t&&s.setValidators([t]);const r=xe(s);null!==n.asyncValidator?s.setAsyncValidators(Se(r,n.asyncValidator)):"function"==typeof r&&s.setAsyncValidators([r]);const c=()=>s.updateValueAndValidity();h(n._rawValidators,c),h(n._rawAsyncValidators,c)}function B(s,n){let t=!1;if(null!==s){if(null!==n.validator){const c=Ie(s);if(Array.isArray(c)&&c.length>0){const f=c.filter(L=>L!==n.validator);f.length!==c.length&&(t=!0,s.setValidators(f))}}if(null!==n.asyncValidator){const c=xe(s);if(Array.isArray(c)&&c.length>0){const f=c.filter(L=>L!==n.asyncValidator);f.length!==c.length&&(t=!0,s.setAsyncValidators(f))}}}const r=()=>{};return h(n._rawValidators,r),h(n._rawAsyncValidators,r),t}function U(s,n){s._pendingDirty&&s.markAsDirty(),s.setValue(s._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(s._pendingValue),s._pendingChange=!1}function Ft(s,n){k(s,n)}function Vt(s,n){s._syncPendingControls(),n.forEach(t=>{const r=t.control;"submit"===r.updateOn&&r._pendingChange&&(t.viewToModelUpdate(r._pendingValue),r._pendingChange=!1)})}const nn={provide:P,useExisting:(0,e.Gpc)(()=>We)},_e=(()=>Promise.resolve())();let We=(()=>{class s extends P{constructor(t,r,c){super(),this.callSetDisabledState=c,this.submitted=!1,this._directives=new Set,this.ngSubmit=new e.vpe,this.form=new fe({},ue(t),ce(r))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){_e.then(()=>{const r=this._findContainer(t.path);t.control=r.registerControl(t.name,t.control),u(t.control,t,this.callSetDisabledState),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){_e.then(()=>{const r=this._findContainer(t.path);r&&r.removeControl(t.name),this._directives.delete(t)})}addFormGroup(t){_e.then(()=>{const r=this._findContainer(t.path),c=new fe({});Ft(c,t),r.registerControl(t.name,c),c.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){_e.then(()=>{const r=this._findContainer(t.path);r&&r.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,r){_e.then(()=>{this.form.get(t.path).setValue(r)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,Vt(this.form,this._directives),this.ngSubmit.emit(t),"dialog"===t?.target?.method}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(y,10),e.Y36(A,10),e.Y36(a,8))},s.\u0275dir=e.lG2({type:s,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,r){1&t&&e.NdJ("submit",function(f){return r.onSubmit(f)})("reset",function(){return r.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[e._Bn([nn]),e.qOj]}),s})();function wt(s,n){const t=s.indexOf(n);t>-1&&s.splice(t,1)}function Ot(s){return"object"==typeof s&&null!==s&&2===Object.keys(s).length&&"value"in s&&"disabled"in s}const Mt=class extends ge{constructor(n=null,t,r){super(le(t),me(r,t)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(n),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),te(t)&&(t.nonNullable||t.initialValueIsDefault)&&(this.defaultValue=Ot(n)?n.value:n)}setValue(n,t={}){this.value=this._pendingValue=n,this._onChange.length&&!1!==t.emitModelToViewChange&&this._onChange.forEach(r=>r(this.value,!1!==t.emitViewToModelChange)),this.updateValueAndValidity(t)}patchValue(n,t={}){this.setValue(n,t)}reset(n=this.defaultValue,t={}){this._applyFormState(n),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){wt(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){wt(this._onDisabledChange,n)}_forEachChild(n){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(n){Ot(n)?(this.value=this._pendingValue=n.value,n.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=n}},on={provide:W,useExisting:(0,e.Gpc)(()=>lt)},xt=(()=>Promise.resolve())();let lt=(()=>{class s extends W{constructor(t,r,c,f,L,$){super(),this._changeDetectorRef=L,this.callSetDisabledState=$,this.control=new Mt,this._registered=!1,this.update=new e.vpe,this._parent=t,this._setValidators(r),this._setAsyncValidators(c),this.valueAccessor=function ot(s,n){if(!n)return null;let t,r,c;return Array.isArray(n),n.forEach(f=>{f.constructor===N?t=f:function en(s){return Object.getPrototypeOf(s.constructor)===V}(f)?r=f:c=f}),c||r||t||null}(0,f)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){const r=t.name.previousValue;this.formDirective.removeControl({name:r,path:this._getPath(r)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),function rt(s,n){if(!s.hasOwnProperty("model"))return!1;const t=s.model;return!!t.isFirstChange()||!Object.is(n,t.currentValue)}(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){u(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(t){xt.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){const r=t.isDisabled.currentValue,c=0!==r&&(0,e.D6c)(r);xt.then(()=>{c&&!this.control.disabled?this.control.disable():!c&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?function o(s,n){return[...n.path,s]}(t,this._parent):[t]}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(P,9),e.Y36(y,10),e.Y36(A,10),e.Y36(C,10),e.Y36(e.sBO,8),e.Y36(a,8))},s.\u0275dir=e.lG2({type:s,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[e._Bn([on]),e.qOj,e.TTD]}),s})(),Nt=(()=>{class s{}return s.\u0275fac=function(t){return new(t||s)},s.\u0275dir=e.lG2({type:s,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),s})();const ln={provide:C,useExisting:(0,e.Gpc)(()=>at),multi:!0};let at=(()=>{class s extends V{writeValue(t){this.setProperty("value",t??"")}registerOnChange(t){this.onChange=r=>{t(""==r?null:parseFloat(r))}}}return s.\u0275fac=function(){let n;return function(r){return(n||(n=e.n5z(s)))(r||s)}}(),s.\u0275dir=e.lG2({type:s,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(t,r){1&t&&e.NdJ("input",function(f){return r.onChange(f.target.value)})("blur",function(){return r.onTouched()})},features:[e._Bn([ln]),e.qOj]}),s})(),Bt=(()=>{class s{}return s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=e.oAB({type:s}),s.\u0275inj=e.cJS({}),s})();const ut=new e.OlP("NgModelWithFormControlWarning"),hn={provide:P,useExisting:(0,e.Gpc)(()=>ze)};let ze=(()=>{class s extends P{constructor(t,r,c){super(),this.callSetDisabledState=c,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new e.vpe,this._setValidators(t),this._setAsyncValidators(r)}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(B(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){const r=this.form.get(t.path);return u(r,t,this.callSetDisabledState),r.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),r}getControl(t){return this.form.get(t.path)}removeControl(t){d(t.control||null,t,!1),function tn(s,n){const t=s.indexOf(n);t>-1&&s.splice(t,1)}(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,r){this.form.get(t.path).setValue(r)}onSubmit(t){return this.submitted=!0,Vt(this.form,this.directives),this.ngSubmit.emit(t),"dialog"===t?.target?.method}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{const r=t.control,c=this.form.get(t.path);r!==c&&(d(r||null,t),(s=>s instanceof Mt)(c)&&(u(c,t,this.callSetDisabledState),t.control=c))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){const r=this.form.get(t.path);Ft(r,t),r.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){const r=this.form.get(t.path);r&&function Qt(s,n){return B(s,n)}(r,t)&&r.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){k(this.form,this),this._oldForm&&B(this._oldForm,this)}_checkFormPresent(){}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(y,10),e.Y36(A,10),e.Y36(a,8))},s.\u0275dir=e.lG2({type:s,selectors:[["","formGroup",""]],hostBindings:function(t,r){1&t&&e.NdJ("submit",function(f){return r.onSubmit(f)})("reset",function(){return r.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[e._Bn([hn]),e.qOj,e.TTD]}),s})();const fn={provide:C,useExisting:(0,e.Gpc)(()=>qe),multi:!0};function Ht(s,n){return null==s?`${n}`:(n&&"object"==typeof n&&(n="Object"),`${s}: ${n}`.slice(0,50))}let qe=(()=>{class s extends V{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){this.value=t;const c=Ht(this._getOptionId(t),t);this.setProperty("value",c)}registerOnChange(t){this.onChange=r=>{this.value=this._getOptionValue(r),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(const r of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(r),t))return r;return null}_getOptionValue(t){const r=function _n(s){return s.split(":")[0]}(t);return this._optionMap.has(r)?this._optionMap.get(r):t}}return s.\u0275fac=function(){let n;return function(r){return(n||(n=e.n5z(s)))(r||s)}}(),s.\u0275dir=e.lG2({type:s,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(t,r){1&t&&e.NdJ("change",function(f){return r.onChange(f.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},features:[e._Bn([fn]),e.qOj]}),s})(),Ut=(()=>{class s{constructor(t,r,c){this._element=t,this._renderer=r,this._select=c,this._select&&(this.id=this._select._registerOption())}set ngValue(t){null!=this._select&&(this._select._optionMap.set(this.id,t),this._setElementValue(Ht(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._setElementValue(t),this._select&&this._select.writeValue(this._select.value)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(e.SBq),e.Y36(e.Qsj),e.Y36(qe,9))},s.\u0275dir=e.lG2({type:s,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),s})();const vn={provide:C,useExisting:(0,e.Gpc)(()=>ht),multi:!0};function Yt(s,n){return null==s?`${n}`:("string"==typeof n&&(n=`'${n}'`),n&&"object"==typeof n&&(n="Object"),`${s}: ${n}`.slice(0,50))}let ht=(()=>{class s extends V{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){let r;if(this.value=t,Array.isArray(t)){const c=t.map(f=>this._getOptionId(f));r=(f,L)=>{f._setSelected(c.indexOf(L.toString())>-1)}}else r=(c,f)=>{c._setSelected(!1)};this._optionMap.forEach(r)}registerOnChange(t){this.onChange=r=>{const c=[],f=r.selectedOptions;if(void 0!==f){const L=f;for(let $=0;$<L.length;$++){const ft=this._getOptionValue(L[$].value);c.push(ft)}}else{const L=r.options;for(let $=0;$<L.length;$++){const $e=L[$];if($e.selected){const ft=this._getOptionValue($e.value);c.push(ft)}}}this.value=c,t(c)}}_registerOption(t){const r=(this._idCounter++).toString();return this._optionMap.set(r,t),r}_getOptionId(t){for(const r of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(r)._value,t))return r;return null}_getOptionValue(t){const r=function yn(s){return s.split(":")[0]}(t);return this._optionMap.has(r)?this._optionMap.get(r)._value:t}}return s.\u0275fac=function(){let n;return function(r){return(n||(n=e.n5z(s)))(r||s)}}(),s.\u0275dir=e.lG2({type:s,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(t,r){1&t&&e.NdJ("change",function(f){return r.onChange(f.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},features:[e._Bn([vn]),e.qOj]}),s})(),jt=(()=>{class s{constructor(t,r,c){this._element=t,this._renderer=r,this._select=c,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){null!=this._select&&(this._value=t,this._setElementValue(Yt(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(Yt(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(e.SBq),e.Y36(e.Qsj),e.Y36(ht,9))},s.\u0275dir=e.lG2({type:s,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),s})(),ne=(()=>{class s{constructor(){this._validator=ie}ngOnChanges(t){if(this.inputName in t){const r=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(r),this._validator=this._enabled?this.createValidator(r):ie,this._onChange&&this._onChange()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return null!=t}}return s.\u0275fac=function(t){return new(t||s)},s.\u0275dir=e.lG2({type:s,features:[e.TTD]}),s})();const An={provide:y,useExisting:(0,e.Gpc)(()=>Ke),multi:!0},Dn={provide:y,useExisting:(0,e.Gpc)(()=>pt),multi:!0};let Ke=(()=>{class s extends ne{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=e.D6c,this.createValidator=t=>ve}enabled(t){return t}}return s.\u0275fac=function(){let n;return function(r){return(n||(n=e.n5z(s)))(r||s)}}(),s.\u0275dir=e.lG2({type:s,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(t,r){2&t&&e.uIk("required",r._enabled?"":null)},inputs:{required:"required"},features:[e._Bn([An]),e.qOj]}),s})(),pt=(()=>{class s extends Ke{constructor(){super(...arguments),this.createValidator=t=>ye}}return s.\u0275fac=function(){let n;return function(r){return(n||(n=e.n5z(s)))(r||s)}}(),s.\u0275dir=e.lG2({type:s,selectors:[["input","type","checkbox","required","","formControlName",""],["input","type","checkbox","required","","formControl",""],["input","type","checkbox","required","","ngModel",""]],hostVars:1,hostBindings:function(t,r){2&t&&e.uIk("required",r._enabled?"":null)},features:[e._Bn([Dn]),e.qOj]}),s})();const bn={provide:y,useExisting:(0,e.Gpc)(()=>mt),multi:!0};let mt=(()=>{class s extends ne{constructor(){super(...arguments),this.inputName="email",this.normalizeInput=e.D6c,this.createValidator=t=>Ce}enabled(t){return t}}return s.\u0275fac=function(){let n;return function(r){return(n||(n=e.n5z(s)))(r||s)}}(),s.\u0275dir=e.lG2({type:s,selectors:[["","email","","formControlName",""],["","email","","formControl",""],["","email","","ngModel",""]],inputs:{email:"email"},features:[e._Bn([bn]),e.qOj]}),s})();const Vn={provide:y,useExisting:(0,e.Gpc)(()=>gt),multi:!0};let gt=(()=>{class s extends ne{constructor(){super(...arguments),this.inputName="pattern",this.normalizeInput=t=>t,this.createValidator=t=>De(t)}}return s.\u0275fac=function(){let n;return function(r){return(n||(n=e.n5z(s)))(r||s)}}(),s.\u0275dir=e.lG2({type:s,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(t,r){2&t&&e.uIk("pattern",r._enabled?r.pattern:null)},inputs:{pattern:"pattern"},features:[e._Bn([Vn]),e.qOj]}),s})(),Jt=(()=>{class s{}return s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=e.oAB({type:s}),s.\u0275inj=e.cJS({imports:[Bt]}),s})(),On=(()=>{class s{static withConfig(t){return{ngModule:s,providers:[{provide:a,useValue:t.callSetDisabledState??i}]}}}return s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=e.oAB({type:s}),s.\u0275inj=e.cJS({imports:[Jt]}),s})(),Mn=(()=>{class s{static withConfig(t){return{ngModule:s,providers:[{provide:ut,useValue:t.warnOnNgModelWithFormControl??"always"},{provide:a,useValue:t.callSetDisabledState??i}]}}}return s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=e.oAB({type:s}),s.\u0275inj=e.cJS({imports:[Jt]}),s})()},8796:(Z,G,p)=>{p.d(G,{A0:()=>it,ir:()=>Qe,jq:()=>te,w9:()=>fe});var e=p(4650),E=p(4006),w=p(2722),x=p(3601),_=p(8675),F=p(8505),V=p(8372),C=p(9300),S=p(4004),m=p(6406),T=p(3101),b=p(7579),O=p(4968),N=p(6451),v=p(6895);const D=["content"],g=["scroll"],y=["padding"],A=function(l){return{searchTerm:l}};function H(l,a){if(1&l&&(e.TgZ(0,"div",6),e.GkF(1,7),e.qZA()),2&l){const i=e.oxw();e.xp6(1),e.Q6J("ngTemplateOutlet",i.headerTemplate)("ngTemplateOutletContext",e.VKq(2,A,i.filterValue))}}function j(l,a){if(1&l&&(e.TgZ(0,"div",8),e.GkF(1,7),e.qZA()),2&l){const i=e.oxw();e.xp6(1),e.Q6J("ngTemplateOutlet",i.footerTemplate)("ngTemplateOutletContext",e.VKq(2,A,i.filterValue))}}const q=["*"],J=["searchInput"];function ve(l,a){if(1&l){const i=e.EpF();e.TgZ(0,"span",15),e.NdJ("click",function(){e.CHM(i);const u=e.oxw().$implicit,d=e.oxw(2);return e.KtG(d.unselect(u))}),e._uU(1,"\xd7"),e.qZA(),e._UZ(2,"span",16)}if(2&l){const i=e.oxw().$implicit,o=e.oxw(2);e.xp6(2),e.Q6J("ngItemLabel",i.label)("escape",o.escapeHTML)}}function ye(l,a){}const Ce=function(l,a,i){return{item:l,clear:a,label:i}};function Ee(l,a){if(1&l&&(e.TgZ(0,"div",12),e.YNc(1,ve,3,2,"ng-template",null,13,e.W1O),e.YNc(3,ye,0,0,"ng-template",14),e.qZA()),2&l){const i=a.$implicit,o=e.MAs(2),u=e.oxw(2);e.ekj("ng-value-disabled",i.disabled),e.xp6(3),e.Q6J("ngTemplateOutlet",u.labelTemplate||o)("ngTemplateOutletContext",e.kEZ(4,Ce,i.value,u.clearItem,i.label))}}function Ae(l,a){if(1&l&&(e.ynx(0),e.YNc(1,Ee,4,8,"div",11),e.BQk()),2&l){const i=e.oxw();e.xp6(1),e.Q6J("ngForOf",i.selectedItems)("ngForTrackBy",i.trackByOption)}}function De(l,a){}const ie=function(l,a){return{items:l,clear:a}};function be(l,a){if(1&l&&e.YNc(0,De,0,0,"ng-template",14),2&l){const i=e.oxw();e.Q6J("ngTemplateOutlet",i.multiLabelTemplate)("ngTemplateOutletContext",e.WLB(2,ie,i.selectedValues,i.clearItem))}}function Te(l,a){1&l&&e._UZ(0,"div",19)}function Fe(l,a){}function Ve(l,a){if(1&l&&(e.ynx(0),e.YNc(1,Te,1,0,"ng-template",null,17,e.W1O),e.YNc(3,Fe,0,0,"ng-template",18),e.BQk()),2&l){const i=e.MAs(2),o=e.oxw();e.xp6(3),e.Q6J("ngTemplateOutlet",o.loadingSpinnerTemplate||i)}}function Ze(l,a){if(1&l&&(e.TgZ(0,"span",20)(1,"span",21),e._uU(2,"\xd7"),e.qZA()()),2&l){const i=e.oxw();e.s9C("title",i.clearAllText)}}function we(l,a){if(1&l&&e._UZ(0,"span",27),2&l){const i=e.oxw().$implicit,o=e.oxw(2);e.Q6J("ngItemLabel",i.label)("escape",o.escapeHTML)}}function Oe(l,a){}const ue=function(l,a,i,o){return{item:l,item$:a,index:i,searchTerm:o}};function Me(l,a){if(1&l){const i=e.EpF();e.TgZ(0,"div",25),e.NdJ("click",function(){const d=e.CHM(i).$implicit,h=e.oxw(2);return e.KtG(h.toggleItem(d))})("mouseover",function(){const d=e.CHM(i).$implicit,h=e.oxw(2);return e.KtG(h.onItemHover(d))}),e.YNc(1,we,1,2,"ng-template",null,26,e.W1O),e.YNc(3,Oe,0,0,"ng-template",14),e.qZA()}if(2&l){const i=a.$implicit,o=e.MAs(2),u=e.oxw(2);e.ekj("ng-option-disabled",i.disabled)("ng-option-selected",i.selected)("ng-optgroup",i.children)("ng-option",!i.children)("ng-option-child",!!i.parent)("ng-option-marked",i===u.itemsList.markedItem),e.uIk("role",i.children?"group":"option")("aria-selected",i.selected)("id",null==i?null:i.htmlId),e.xp6(3),e.Q6J("ngTemplateOutlet",i.children?u.optgroupTemplate||o:u.optionTemplate||o)("ngTemplateOutletContext",e.l5B(17,ue,i.value,i,i.index,u.searchTerm))}}function ce(l,a){if(1&l&&(e.TgZ(0,"span")(1,"span",30),e._uU(2),e.qZA(),e._uU(3),e.qZA()),2&l){const i=e.oxw(3);e.xp6(2),e.Oqu(i.addTagText),e.xp6(1),e.hij('"',i.searchTerm,'"')}}function Se(l,a){}function Ie(l,a){if(1&l){const i=e.EpF();e.TgZ(0,"div",28),e.NdJ("mouseover",function(){e.CHM(i);const u=e.oxw(2);return e.KtG(u.itemsList.unmarkItem())})("click",function(){e.CHM(i);const u=e.oxw(2);return e.KtG(u.selectTag())}),e.YNc(1,ce,4,2,"ng-template",null,29,e.W1O),e.YNc(3,Se,0,0,"ng-template",14),e.qZA()}if(2&l){const i=e.MAs(2),o=e.oxw(2);e.ekj("ng-option-marked",!o.itemsList.markedItem),e.xp6(3),e.Q6J("ngTemplateOutlet",o.tagTemplate||i)("ngTemplateOutletContext",e.VKq(4,A,o.searchTerm))}}function xe(l,a){if(1&l&&(e.TgZ(0,"div",32),e._uU(1),e.qZA()),2&l){const i=e.oxw(3);e.xp6(1),e.Oqu(i.notFoundText)}}function de(l,a){}function se(l,a){if(1&l&&(e.ynx(0),e.YNc(1,xe,2,1,"ng-template",null,31,e.W1O),e.YNc(3,de,0,0,"ng-template",14),e.BQk()),2&l){const i=e.MAs(2),o=e.oxw(2);e.xp6(3),e.Q6J("ngTemplateOutlet",o.notFoundTemplate||i)("ngTemplateOutletContext",e.VKq(2,A,o.searchTerm))}}function Ne(l,a){if(1&l&&(e.TgZ(0,"div",32),e._uU(1),e.qZA()),2&l){const i=e.oxw(3);e.xp6(1),e.Oqu(i.typeToSearchText)}}function Be(l,a){}function ke(l,a){if(1&l&&(e.ynx(0),e.YNc(1,Ne,2,1,"ng-template",null,33,e.W1O),e.YNc(3,Be,0,0,"ng-template",18),e.BQk()),2&l){const i=e.MAs(2),o=e.oxw(2);e.xp6(3),e.Q6J("ngTemplateOutlet",o.typeToSearchTemplate||i)}}function P(l,a){if(1&l&&(e.TgZ(0,"div",32),e._uU(1),e.qZA()),2&l){const i=e.oxw(3);e.xp6(1),e.Oqu(i.loadingText)}}function W(l,a){}function Pe(l,a){if(1&l&&(e.ynx(0),e.YNc(1,P,2,1,"ng-template",null,34,e.W1O),e.YNc(3,W,0,0,"ng-template",14),e.BQk()),2&l){const i=e.MAs(2),o=e.oxw(2);e.xp6(3),e.Q6J("ngTemplateOutlet",o.loadingTextTemplate||i)("ngTemplateOutletContext",e.VKq(2,A,o.searchTerm))}}function _t(l,a){if(1&l){const i=e.EpF();e.TgZ(0,"ng-dropdown-panel",22),e.NdJ("update",function(u){e.CHM(i);const d=e.oxw();return e.KtG(d.viewPortItems=u)})("scroll",function(u){e.CHM(i);const d=e.oxw();return e.KtG(d.scroll.emit(u))})("scrollToEnd",function(u){e.CHM(i);const d=e.oxw();return e.KtG(d.scrollToEnd.emit(u))})("outsideClick",function(){e.CHM(i);const u=e.oxw();return e.KtG(u.close())}),e.ynx(1),e.YNc(2,Me,4,22,"div",23),e.YNc(3,Ie,4,6,"div",24),e.BQk(),e.YNc(4,se,4,4,"ng-container",3),e.YNc(5,ke,4,1,"ng-container",3),e.YNc(6,Pe,4,4,"ng-container",3),e.qZA()}if(2&l){const i=e.oxw();e.ekj("ng-select-multiple",i.multiple),e.Q6J("virtualScroll",i.virtualScroll)("bufferAmount",i.bufferAmount)("appendTo",i.appendTo)("position",i.dropdownPosition)("headerTemplate",i.headerTemplate)("footerTemplate",i.footerTemplate)("filterValue",i.searchTerm)("items",i.itemsList.filteredItems)("markedItem",i.itemsList.markedItem)("ngClass",i.appendTo?i.classes:null)("id",i.dropdownId),e.xp6(2),e.Q6J("ngForOf",i.viewPortItems)("ngForTrackBy",i.trackByOption),e.xp6(1),e.Q6J("ngIf",i.showAddTag),e.xp6(1),e.Q6J("ngIf",i.showNoItemsFound()),e.xp6(1),e.Q6J("ngIf",i.showTypeToSearch()),e.xp6(1),e.Q6J("ngIf",i.loading&&0===i.itemsList.filteredItems.length)}}const Je=/[&<>"']/g,Le=RegExp(Je.source),Ge={"&":"&","<":"<",">":">",'"':""","'":"'"};function I(l){return null!=l}function X(l){return"object"==typeof l&&I(l)}function re(l){return l instanceof Function}let vt=(()=>{class l{constructor(i){this.element=i,this.escape=!0}ngOnChanges(i){this.element.nativeElement.innerHTML=this.escape?function he(l){return l&&Le.test(l)?l.replace(Je,a=>Ge[a]):l}(this.ngItemLabel):this.ngItemLabel}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.SBq))},l.\u0275dir=e.lG2({type:l,selectors:[["","ngItemLabel",""]],inputs:{ngItemLabel:"ngItemLabel",escape:"escape"},features:[e.TTD]}),l})(),Qe=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-option-tmp",""]]}),l})(),yt=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-optgroup-tmp",""]]}),l})(),Ct=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-label-tmp",""]]}),l})(),Et=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-multi-label-tmp",""]]}),l})(),At=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-header-tmp",""]]}),l})(),Dt=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-footer-tmp",""]]}),l})(),Xe=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-notfound-tmp",""]]}),l})(),Re=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-typetosearch-tmp",""]]}),l})(),et=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-loadingtext-tmp",""]]}),l})(),tt=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-tag-tmp",""]]}),l})(),nt=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Rgc))},l.\u0275dir=e.lG2({type:l,selectors:[["","ng-loadingspinner-tmp",""]]}),l})();function oe(){return"axxxxxxxxxxx".replace(/[x]/g,()=>(16*Math.random()|0).toString(16))}const ee={"\u24b6":"A",\uff21:"A",\u00c0:"A",\u00c1:"A",\u00c2:"A",\u1ea6:"A",\u1ea4:"A",\u1eaa:"A",\u1ea8:"A",\u00c3:"A",\u0100:"A",\u0102:"A",\u1eb0:"A",\u1eae:"A",\u1eb4:"A",\u1eb2:"A",\u0226:"A",\u01e0:"A",\u00c4:"A",\u01de:"A",\u1ea2:"A",\u00c5:"A",\u01fa:"A",\u01cd:"A",\u0200:"A",\u0202:"A",\u1ea0:"A",\u1eac:"A",\u1eb6:"A",\u1e00:"A",\u0104:"A",\u023a:"A",\u2c6f:"A",\ua732:"AA",\u00c6:"AE",\u01fc:"AE",\u01e2:"AE",\ua734:"AO",\ua736:"AU",\ua738:"AV",\ua73a:"AV",\ua73c:"AY","\u24b7":"B",\uff22:"B",\u1e02:"B",\u1e04:"B",\u1e06:"B",\u0243:"B",\u0182:"B",\u0181:"B","\u24b8":"C",\uff23:"C",\u0106:"C",\u0108:"C",\u010a:"C",\u010c:"C",\u00c7:"C",\u1e08:"C",\u0187:"C",\u023b:"C",\ua73e:"C","\u24b9":"D",\uff24:"D",\u1e0a:"D",\u010e:"D",\u1e0c:"D",\u1e10:"D",\u1e12:"D",\u1e0e:"D",\u0110:"D",\u018b:"D",\u018a:"D",\u0189:"D",\ua779:"D",\u01f1:"DZ",\u01c4:"DZ",\u01f2:"Dz",\u01c5:"Dz","\u24ba":"E",\uff25:"E",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u1ec0:"E",\u1ebe:"E",\u1ec4:"E",\u1ec2:"E",\u1ebc:"E",\u0112:"E",\u1e14:"E",\u1e16:"E",\u0114:"E",\u0116:"E",\u00cb:"E",\u1eba:"E",\u011a:"E",\u0204:"E",\u0206:"E",\u1eb8:"E",\u1ec6:"E",\u0228:"E",\u1e1c:"E",\u0118:"E",\u1e18:"E",\u1e1a:"E",\u0190:"E",\u018e:"E","\u24bb":"F",\uff26:"F",\u1e1e:"F",\u0191:"F",\ua77b:"F","\u24bc":"G",\uff27:"G",\u01f4:"G",\u011c:"G",\u1e20:"G",\u011e:"G",\u0120:"G",\u01e6:"G",\u0122:"G",\u01e4:"G",\u0193:"G",\ua7a0:"G",\ua77d:"G",\ua77e:"G","\u24bd":"H",\uff28:"H",\u0124:"H",\u1e22:"H",\u1e26:"H",\u021e:"H",\u1e24:"H",\u1e28:"H",\u1e2a:"H",\u0126:"H",\u2c67:"H",\u2c75:"H",\ua78d:"H","\u24be":"I",\uff29:"I",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u0128:"I",\u012a:"I",\u012c:"I",\u0130:"I",\u00cf:"I",\u1e2e:"I",\u1ec8:"I",\u01cf:"I",\u0208:"I",\u020a:"I",\u1eca:"I",\u012e:"I",\u1e2c:"I",\u0197:"I","\u24bf":"J",\uff2a:"J",\u0134:"J",\u0248:"J","\u24c0":"K",\uff2b:"K",\u1e30:"K",\u01e8:"K",\u1e32:"K",\u0136:"K",\u1e34:"K",\u0198:"K",\u2c69:"K",\ua740:"K",\ua742:"K",\ua744:"K",\ua7a2:"K","\u24c1":"L",\uff2c:"L",\u013f:"L",\u0139:"L",\u013d:"L",\u1e36:"L",\u1e38:"L",\u013b:"L",\u1e3c:"L",\u1e3a:"L",\u0141:"L",\u023d:"L",\u2c62:"L",\u2c60:"L",\ua748:"L",\ua746:"L",\ua780:"L",\u01c7:"LJ",\u01c8:"Lj","\u24c2":"M",\uff2d:"M",\u1e3e:"M",\u1e40:"M",\u1e42:"M",\u2c6e:"M",\u019c:"M","\u24c3":"N",\uff2e:"N",\u01f8:"N",\u0143:"N",\u00d1:"N",\u1e44:"N",\u0147:"N",\u1e46:"N",\u0145:"N",\u1e4a:"N",\u1e48:"N",\u0220:"N",\u019d:"N",\ua790:"N",\ua7a4:"N",\u01ca:"NJ",\u01cb:"Nj","\u24c4":"O",\uff2f:"O",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u1ed2:"O",\u1ed0:"O",\u1ed6:"O",\u1ed4:"O",\u00d5:"O",\u1e4c:"O",\u022c:"O",\u1e4e:"O",\u014c:"O",\u1e50:"O",\u1e52:"O",\u014e:"O",\u022e:"O",\u0230:"O",\u00d6:"O",\u022a:"O",\u1ece:"O",\u0150:"O",\u01d1:"O",\u020c:"O",\u020e:"O",\u01a0:"O",\u1edc:"O",\u1eda:"O",\u1ee0:"O",\u1ede:"O",\u1ee2:"O",\u1ecc:"O",\u1ed8:"O",\u01ea:"O",\u01ec:"O",\u00d8:"O",\u01fe:"O",\u0186:"O",\u019f:"O",\ua74a:"O",\ua74c:"O",\u01a2:"OI",\ua74e:"OO",\u0222:"OU","\u24c5":"P",\uff30:"P",\u1e54:"P",\u1e56:"P",\u01a4:"P",\u2c63:"P",\ua750:"P",\ua752:"P",\ua754:"P","\u24c6":"Q",\uff31:"Q",\ua756:"Q",\ua758:"Q",\u024a:"Q","\u24c7":"R",\uff32:"R",\u0154:"R",\u1e58:"R",\u0158:"R",\u0210:"R",\u0212:"R",\u1e5a:"R",\u1e5c:"R",\u0156:"R",\u1e5e:"R",\u024c:"R",\u2c64:"R",\ua75a:"R",\ua7a6:"R",\ua782:"R","\u24c8":"S",\uff33:"S",\u1e9e:"S",\u015a:"S",\u1e64:"S",\u015c:"S",\u1e60:"S",\u0160:"S",\u1e66:"S",\u1e62:"S",\u1e68:"S",\u0218:"S",\u015e:"S",\u2c7e:"S",\ua7a8:"S",\ua784:"S","\u24c9":"T",\uff34:"T",\u1e6a:"T",\u0164:"T",\u1e6c:"T",\u021a:"T",\u0162:"T",\u1e70:"T",\u1e6e:"T",\u0166:"T",\u01ac:"T",\u01ae:"T",\u023e:"T",\ua786:"T",\ua728:"TZ","\u24ca":"U",\uff35:"U",\u00d9:"U",\u00da:"U",\u00db:"U",\u0168:"U",\u1e78:"U",\u016a:"U",\u1e7a:"U",\u016c:"U",\u00dc:"U",\u01db:"U",\u01d7:"U",\u01d5:"U",\u01d9:"U",\u1ee6:"U",\u016e:"U",\u0170:"U",\u01d3:"U",\u0214:"U",\u0216:"U",\u01af:"U",\u1eea:"U",\u1ee8:"U",\u1eee:"U",\u1eec:"U",\u1ef0:"U",\u1ee4:"U",\u1e72:"U",\u0172:"U",\u1e76:"U",\u1e74:"U",\u0244:"U","\u24cb":"V",\uff36:"V",\u1e7c:"V",\u1e7e:"V",\u01b2:"V",\ua75e:"V",\u0245:"V",\ua760:"VY","\u24cc":"W",\uff37:"W",\u1e80:"W",\u1e82:"W",\u0174:"W",\u1e86:"W",\u1e84:"W",\u1e88:"W",\u2c72:"W","\u24cd":"X",\uff38:"X",\u1e8a:"X",\u1e8c:"X","\u24ce":"Y",\uff39:"Y",\u1ef2:"Y",\u00dd:"Y",\u0176:"Y",\u1ef8:"Y",\u0232:"Y",\u1e8e:"Y",\u0178:"Y",\u1ef6:"Y",\u1ef4:"Y",\u01b3:"Y",\u024e:"Y",\u1efe:"Y","\u24cf":"Z",\uff3a:"Z",\u0179:"Z",\u1e90:"Z",\u017b:"Z",\u017d:"Z",\u1e92:"Z",\u1e94:"Z",\u01b5:"Z",\u0224:"Z",\u2c7f:"Z",\u2c6b:"Z",\ua762:"Z","\u24d0":"a",\uff41:"a",\u1e9a:"a",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u1ea7:"a",\u1ea5:"a",\u1eab:"a",\u1ea9:"a",\u00e3:"a",\u0101:"a",\u0103:"a",\u1eb1:"a",\u1eaf:"a",\u1eb5:"a",\u1eb3:"a",\u0227:"a",\u01e1:"a",\u00e4:"a",\u01df:"a",\u1ea3:"a",\u00e5:"a",\u01fb:"a",\u01ce:"a",\u0201:"a",\u0203:"a",\u1ea1:"a",\u1ead:"a",\u1eb7:"a",\u1e01:"a",\u0105:"a",\u2c65:"a",\u0250:"a",\ua733:"aa",\u00e6:"ae",\u01fd:"ae",\u01e3:"ae",\ua735:"ao",\ua737:"au",\ua739:"av",\ua73b:"av",\ua73d:"ay","\u24d1":"b",\uff42:"b",\u1e03:"b",\u1e05:"b",\u1e07:"b",\u0180:"b",\u0183:"b",\u0253:"b","\u24d2":"c",\uff43:"c",\u0107:"c",\u0109:"c",\u010b:"c",\u010d:"c",\u00e7:"c",\u1e09:"c",\u0188:"c",\u023c:"c",\ua73f:"c",\u2184:"c","\u24d3":"d",\uff44:"d",\u1e0b:"d",\u010f:"d",\u1e0d:"d",\u1e11:"d",\u1e13:"d",\u1e0f:"d",\u0111:"d",\u018c:"d",\u0256:"d",\u0257:"d",\ua77a:"d",\u01f3:"dz",\u01c6:"dz","\u24d4":"e",\uff45:"e",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u1ec1:"e",\u1ebf:"e",\u1ec5:"e",\u1ec3:"e",\u1ebd:"e",\u0113:"e",\u1e15:"e",\u1e17:"e",\u0115:"e",\u0117:"e",\u00eb:"e",\u1ebb:"e",\u011b:"e",\u0205:"e",\u0207:"e",\u1eb9:"e",\u1ec7:"e",\u0229:"e",\u1e1d:"e",\u0119:"e",\u1e19:"e",\u1e1b:"e",\u0247:"e",\u025b:"e",\u01dd:"e","\u24d5":"f",\uff46:"f",\u1e1f:"f",\u0192:"f",\ua77c:"f","\u24d6":"g",\uff47:"g",\u01f5:"g",\u011d:"g",\u1e21:"g",\u011f:"g",\u0121:"g",\u01e7:"g",\u0123:"g",\u01e5:"g",\u0260:"g",\ua7a1:"g",\u1d79:"g",\ua77f:"g","\u24d7":"h",\uff48:"h",\u0125:"h",\u1e23:"h",\u1e27:"h",\u021f:"h",\u1e25:"h",\u1e29:"h",\u1e2b:"h",\u1e96:"h",\u0127:"h",\u2c68:"h",\u2c76:"h",\u0265:"h",\u0195:"hv","\u24d8":"i",\uff49:"i",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u0129:"i",\u012b:"i",\u012d:"i",\u00ef:"i",\u1e2f:"i",\u1ec9:"i",\u01d0:"i",\u0209:"i",\u020b:"i",\u1ecb:"i",\u012f:"i",\u1e2d:"i",\u0268:"i",\u0131:"i","\u24d9":"j",\uff4a:"j",\u0135:"j",\u01f0:"j",\u0249:"j","\u24da":"k",\uff4b:"k",\u1e31:"k",\u01e9:"k",\u1e33:"k",\u0137:"k",\u1e35:"k",\u0199:"k",\u2c6a:"k",\ua741:"k",\ua743:"k",\ua745:"k",\ua7a3:"k","\u24db":"l",\uff4c:"l",\u0140:"l",\u013a:"l",\u013e:"l",\u1e37:"l",\u1e39:"l",\u013c:"l",\u1e3d:"l",\u1e3b:"l",\u017f:"l",\u0142:"l",\u019a:"l",\u026b:"l",\u2c61:"l",\ua749:"l",\ua781:"l",\ua747:"l",\u01c9:"lj","\u24dc":"m",\uff4d:"m",\u1e3f:"m",\u1e41:"m",\u1e43:"m",\u0271:"m",\u026f:"m","\u24dd":"n",\uff4e:"n",\u01f9:"n",\u0144:"n",\u00f1:"n",\u1e45:"n",\u0148:"n",\u1e47:"n",\u0146:"n",\u1e4b:"n",\u1e49:"n",\u019e:"n",\u0272:"n",\u0149:"n",\ua791:"n",\ua7a5:"n",\u01cc:"nj","\u24de":"o",\uff4f:"o",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u1ed3:"o",\u1ed1:"o",\u1ed7:"o",\u1ed5:"o",\u00f5:"o",\u1e4d:"o",\u022d:"o",\u1e4f:"o",\u014d:"o",\u1e51:"o",\u1e53:"o",\u014f:"o",\u022f:"o",\u0231:"o",\u00f6:"o",\u022b:"o",\u1ecf:"o",\u0151:"o",\u01d2:"o",\u020d:"o",\u020f:"o",\u01a1:"o",\u1edd:"o",\u1edb:"o",\u1ee1:"o",\u1edf:"o",\u1ee3:"o",\u1ecd:"o",\u1ed9:"o",\u01eb:"o",\u01ed:"o",\u00f8:"o",\u01ff:"o",\u0254:"o",\ua74b:"o",\ua74d:"o",\u0275:"o",\u01a3:"oi",\u0223:"ou",\ua74f:"oo","\u24df":"p",\uff50:"p",\u1e55:"p",\u1e57:"p",\u01a5:"p",\u1d7d:"p",\ua751:"p",\ua753:"p",\ua755:"p","\u24e0":"q",\uff51:"q",\u024b:"q",\ua757:"q",\ua759:"q","\u24e1":"r",\uff52:"r",\u0155:"r",\u1e59:"r",\u0159:"r",\u0211:"r",\u0213:"r",\u1e5b:"r",\u1e5d:"r",\u0157:"r",\u1e5f:"r",\u024d:"r",\u027d:"r",\ua75b:"r",\ua7a7:"r",\ua783:"r","\u24e2":"s",\uff53:"s",\u00df:"s",\u015b:"s",\u1e65:"s",\u015d:"s",\u1e61:"s",\u0161:"s",\u1e67:"s",\u1e63:"s",\u1e69:"s",\u0219:"s",\u015f:"s",\u023f:"s",\ua7a9:"s",\ua785:"s",\u1e9b:"s","\u24e3":"t",\uff54:"t",\u1e6b:"t",\u1e97:"t",\u0165:"t",\u1e6d:"t",\u021b:"t",\u0163:"t",\u1e71:"t",\u1e6f:"t",\u0167:"t",\u01ad:"t",\u0288:"t",\u2c66:"t",\ua787:"t",\ua729:"tz","\u24e4":"u",\uff55:"u",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u0169:"u",\u1e79:"u",\u016b:"u",\u1e7b:"u",\u016d:"u",\u00fc:"u",\u01dc:"u",\u01d8:"u",\u01d6:"u",\u01da:"u",\u1ee7:"u",\u016f:"u",\u0171:"u",\u01d4:"u",\u0215:"u",\u0217:"u",\u01b0:"u",\u1eeb:"u",\u1ee9:"u",\u1eef:"u",\u1eed:"u",\u1ef1:"u",\u1ee5:"u",\u1e73:"u",\u0173:"u",\u1e77:"u",\u1e75:"u",\u0289:"u","\u24e5":"v",\uff56:"v",\u1e7d:"v",\u1e7f:"v",\u028b:"v",\ua75f:"v",\u028c:"v",\ua761:"vy","\u24e6":"w",\uff57:"w",\u1e81:"w",\u1e83:"w",\u0175:"w",\u1e87:"w",\u1e85:"w",\u1e98:"w",\u1e89:"w",\u2c73:"w","\u24e7":"x",\uff58:"x",\u1e8b:"x",\u1e8d:"x","\u24e8":"y",\uff59:"y",\u1ef3:"y",\u00fd:"y",\u0177:"y",\u1ef9:"y",\u0233:"y",\u1e8f:"y",\u00ff:"y",\u1ef7:"y",\u1e99:"y",\u1ef5:"y",\u01b4:"y",\u024f:"y",\u1eff:"y","\u24e9":"z",\uff5a:"z",\u017a:"z",\u1e91:"z",\u017c:"z",\u017e:"z",\u1e93:"z",\u1e95:"z",\u01b6:"z",\u0225:"z",\u0240:"z",\u2c6c:"z",\ua763:"z",\u0386:"\u0391",\u0388:"\u0395",\u0389:"\u0397",\u038a:"\u0399",\u03aa:"\u0399",\u038c:"\u039f",\u038e:"\u03a5",\u03ab:"\u03a5",\u038f:"\u03a9",\u03ac:"\u03b1",\u03ad:"\u03b5",\u03ae:"\u03b7",\u03af:"\u03b9",\u03ca:"\u03b9",\u0390:"\u03b9",\u03cc:"\u03bf",\u03cd:"\u03c5",\u03cb:"\u03c5",\u03b0:"\u03c5",\u03c9:"\u03c9",\u03c2:"\u03c3"};function K(l){return l.replace(/[^\u0000-\u007E]/g,i=>ee[i]||i)}class Q{constructor(a,i){this._ngSelect=a,this._selectionModel=i,this._items=[],this._filteredItems=[],this._markedIndex=-1}get items(){return this._items}get filteredItems(){return this._filteredItems}get markedIndex(){return this._markedIndex}get selectedItems(){return this._selectionModel.value}get markedItem(){return this._filteredItems[this._markedIndex]}get noItemsToSelect(){return this._ngSelect.hideSelected&&this._items.length===this.selectedItems.length}get maxItemsSelected(){return this._ngSelect.multiple&&this._ngSelect.maxSelectedItems<=this.selectedItems.length}get lastSelectedItem(){let a=this.selectedItems.length-1;for(;a>=0;a--){const i=this.selectedItems[a];if(!i.disabled)return i}return null}setItems(a){this._items=a.map((i,o)=>this.mapItem(i,o)),this._ngSelect.groupBy?(this._groups=this._groupBy(this._items,this._ngSelect.groupBy),this._items=this._flatten(this._groups)):(this._groups=new Map,this._groups.set(void 0,this._items)),this._filteredItems=[...this._items]}select(a){if(a.selected||this.maxItemsSelected)return;const i=this._ngSelect.multiple;i||this.clearSelected(),this._selectionModel.select(a,i,this._ngSelect.selectableGroupAsModel),this._ngSelect.hideSelected&&this._hideSelected(a)}unselect(a){a.selected&&(this._selectionModel.unselect(a,this._ngSelect.multiple),this._ngSelect.hideSelected&&I(a.index)&&this._ngSelect.multiple&&this._showSelected(a))}findItem(a){let i;return i=this._ngSelect.compareWith?o=>this._ngSelect.compareWith(o.value,a):this._ngSelect.bindValue?o=>!o.children&&this.resolveNested(o.value,this._ngSelect.bindValue)===a:o=>o.value===a||!o.children&&o.label&&o.label===this.resolveNested(a,this._ngSelect.bindLabel),this._items.find(o=>i(o))}addItem(a){const i=this.mapItem(a,this._items.length);return this._items.push(i),this._filteredItems.push(i),i}clearSelected(a=!1){this._selectionModel.clear(a),this._items.forEach(i=>{i.selected=a&&i.selected&&i.disabled,i.marked=!1}),this._ngSelect.hideSelected&&this.resetFilteredItems()}findByLabel(a){return a=K(a).toLocaleLowerCase(),this.filteredItems.find(i=>K(i.label).toLocaleLowerCase().substr(0,a.length)===a)}filter(a){if(!a)return void this.resetFilteredItems();this._filteredItems=[],a=this._ngSelect.searchFn?a:K(a).toLocaleLowerCase();const i=this._ngSelect.searchFn||this._defaultSearchFn,o=this._ngSelect.hideSelected;for(const u of Array.from(this._groups.keys())){const d=[];for(const h of this._groups.get(u))o&&(h.parent&&h.parent.selected||h.selected)||i(a,this._ngSelect.searchFn?h.value:h)&&d.push(h);if(d.length>0){const[h]=d.slice(-1);if(h.parent){const M=this._items.find(k=>k===h.parent);this._filteredItems.push(M)}this._filteredItems.push(...d)}}}resetFilteredItems(){this._filteredItems.length!==this._items.length&&(this._filteredItems=this._ngSelect.hideSelected&&this.selectedItems.length>0?this._items.filter(a=>!a.selected):this._items)}unmarkItem(){this._markedIndex=-1}markNextItem(){this._stepToItem(1)}markPreviousItem(){this._stepToItem(-1)}markItem(a){this._markedIndex=this._filteredItems.indexOf(a)}markSelectedOrDefault(a){if(0===this._filteredItems.length)return;const i=this._getLastMarkedIndex();this._markedIndex=i>-1?i:a?this.filteredItems.findIndex(o=>!o.disabled):-1}resolveNested(a,i){if(!X(a))return a;if(-1===i.indexOf("."))return a[i];{const o=i.split(".");let u=a;for(let d=0,h=o.length;d<h;++d){if(null==u)return null;u=u[o[d]]}return u}}mapItem(a,i){const o=I(a.$ngOptionLabel)?a.$ngOptionLabel:this.resolveNested(a,this._ngSelect.bindLabel),u=I(a.$ngOptionValue)?a.$ngOptionValue:a;return{index:i,label:I(o)?o.toString():"",value:u,disabled:a.disabled,htmlId:`${this._ngSelect.dropdownId}-${i}`}}mapSelectedItems(){const a=this._ngSelect.multiple;for(const i of this.selectedItems){const o=this._ngSelect.bindValue?this.resolveNested(i.value,this._ngSelect.bindValue):i.value,u=I(o)?this.findItem(o):null;this._selectionModel.unselect(i,a),this._selectionModel.select(u||i,a,this._ngSelect.selectableGroupAsModel)}this._ngSelect.hideSelected&&(this._filteredItems=this.filteredItems.filter(i=>-1===this.selectedItems.indexOf(i)))}_showSelected(a){if(this._filteredItems.push(a),a.parent){const i=a.parent;this._filteredItems.find(u=>u===i)||this._filteredItems.push(i)}else if(a.children)for(const i of a.children)i.selected=!1,this._filteredItems.push(i);this._filteredItems=[...this._filteredItems.sort((i,o)=>i.index-o.index)]}_hideSelected(a){this._filteredItems=this._filteredItems.filter(i=>i!==a),a.parent?a.parent.children.every(o=>o.selected)&&(this._filteredItems=this._filteredItems.filter(o=>o!==a.parent)):a.children&&(this._filteredItems=this.filteredItems.filter(i=>i.parent!==a))}_defaultSearchFn(a,i){return K(i.label).toLocaleLowerCase().indexOf(a)>-1}_getNextItemIndex(a){return a>0?this._markedIndex>=this._filteredItems.length-1?0:this._markedIndex+1:this._markedIndex<=0?this._filteredItems.length-1:this._markedIndex-1}_stepToItem(a){0===this._filteredItems.length||this._filteredItems.every(i=>i.disabled)||(this._markedIndex=this._getNextItemIndex(a),this.markedItem.disabled&&this._stepToItem(a))}_getLastMarkedIndex(){if(this._ngSelect.hideSelected||this._markedIndex>-1&&void 0===this.markedItem)return-1;const a=this._filteredItems.indexOf(this.lastSelectedItem);return this.lastSelectedItem&&a<0?-1:Math.max(this.markedIndex,a)}_groupBy(a,i){const o=new Map;if(0===a.length)return o;if(Array.isArray(a[0].value[i])){for(const h of a){const M=(h.value[i]||[]).map((k,B)=>this.mapItem(k,B));o.set(h,M)}return o}const u=re(this._ngSelect.groupBy),d=h=>{const M=u?i(h.value):h.value[i];return I(M)?M:void 0};for(const h of a){const M=d(h),k=o.get(M);k?k.push(h):o.set(M,[h])}return o}_flatten(a){const i=re(this._ngSelect.groupBy),o=[];for(const u of Array.from(a.keys())){let d=o.length;if(void 0===u){const Y=a.get(void 0)||[];o.push(...Y.map(U=>(U.index=d++,U)));continue}const h=X(u),M={label:h?"":String(u),children:void 0,parent:null,index:d++,disabled:!this._ngSelect.selectableGroup,htmlId:oe()},k=i?this._ngSelect.bindLabel:this._ngSelect.groupBy,B=this._ngSelect.groupValue||(()=>h?u.value:{[k]:u}),z=a.get(u).map(Y=>(Y.parent=M,Y.children=void 0,Y.index=d++,Y));M.children=z,M.value=B(u,z.map(Y=>Y.value)),o.push(M),o.push(...z)}return o}}var R=(()=>{return(l=R||(R={}))[l.Tab=9]="Tab",l[l.Enter=13]="Enter",l[l.Esc=27]="Esc",l[l.Space=32]="Space",l[l.ArrowUp=38]="ArrowUp",l[l.ArrowDown=40]="ArrowDown",l[l.Backspace=8]="Backspace",R;var l})();let le=(()=>{class l{constructor(){this._dimensions={itemHeight:0,panelHeight:0,itemsPerViewport:0}}get dimensions(){return this._dimensions}calculateItems(i,o,u){const d=this._dimensions,h=d.itemHeight*o,k=Math.max(0,i)/h*o;let B=Math.min(o,Math.ceil(k)+(d.itemsPerViewport+1));const Y=Math.max(0,B-d.itemsPerViewport);let U=Math.min(Y,Math.floor(k)),ae=d.itemHeight*Math.ceil(U)-d.itemHeight*Math.min(U,u);return ae=isNaN(ae)?0:ae,U=isNaN(U)?-1:U,B=isNaN(B)?-1:B,U-=u,U=Math.max(0,U),B+=u,B=Math.min(o,B),{topPadding:ae,scrollHeight:h,start:U,end:B}}setDimensions(i,o){const u=Math.max(1,Math.floor(o/i));this._dimensions={itemHeight:i,panelHeight:o,itemsPerViewport:u}}getScrollTo(i,o,u){const{panelHeight:d}=this.dimensions,h=i+o,k=u+d;return d>=h&&u===i?null:h>k?u+h-k:i<=u?i:null}}return l.\u0275fac=function(i){return new(i||l)},l.\u0275prov=e.Yz7({token:l,factory:l.\u0275fac}),l})();const He=["top","right","bottom","left"],me=typeof requestAnimationFrame<"u"?m.Z:T.E;let Ue=(()=>{class l{constructor(i,o,u,d,h){this._renderer=i,this._zone=o,this._panelService=u,this._document=h,this.items=[],this.position="auto",this.virtualScroll=!1,this.filterValue=null,this.update=new e.vpe,this.scroll=new e.vpe,this.scrollToEnd=new e.vpe,this.outsideClick=new e.vpe,this._destroy$=new b.x,this._scrollToEndFired=!1,this._updateScrollHeight=!1,this._lastScrollPosition=0,this._dropdown=d.nativeElement}get currentPosition(){return this._currentPosition}get itemsLength(){return this._itemsLength}set itemsLength(i){i!==this._itemsLength&&(this._itemsLength=i,this._onItemsLengthChanged())}get _startOffset(){if(this.markedItem){const{itemHeight:i,panelHeight:o}=this._panelService.dimensions,u=this.markedItem.index*i;return o>u?0:u}return 0}ngOnInit(){this._select=this._dropdown.parentElement,this._virtualPadding=this.paddingElementRef.nativeElement,this._scrollablePanel=this.scrollElementRef.nativeElement,this._contentPanel=this.contentElementRef.nativeElement,this._handleScroll(),this._handleOutsideClick(),this._appendDropdown(),this._setupMousedownListener()}ngOnChanges(i){if(i.items){const o=i.items;this._onItemsChange(o.currentValue,o.firstChange)}}ngOnDestroy(){this._destroy$.next(),this._destroy$.complete(),this._destroy$.unsubscribe(),this.appendTo&&this._renderer.removeChild(this._dropdown.parentNode,this._dropdown)}scrollTo(i,o=!1){if(!i)return;const u=this.items.indexOf(i);if(u<0||u>=this.itemsLength)return;let d;if(this.virtualScroll){const h=this._panelService.dimensions.itemHeight;d=this._panelService.getScrollTo(u*h,h,this._lastScrollPosition)}else{const h=this._dropdown.querySelector(`#${i.htmlId}`);d=this._panelService.getScrollTo(h.offsetTop,h.clientHeight,o?h.offsetTop:this._lastScrollPosition)}I(d)&&(this._scrollablePanel.scrollTop=d)}scrollToTag(){const i=this._scrollablePanel;i.scrollTop=i.scrollHeight-i.clientHeight}adjustPosition(){this._updateYPosition()}_handleDropdownPosition(){this._currentPosition=this._calculateCurrentPosition(this._dropdown),He.includes(this._currentPosition)?this._updateDropdownClass(this._currentPosition):this._updateDropdownClass("bottom"),this.appendTo&&this._updateYPosition(),this._dropdown.style.opacity="1"}_updateDropdownClass(i){He.forEach(u=>{const d=`ng-select-${u}`;this._renderer.removeClass(this._dropdown,d),this._renderer.removeClass(this._select,d)});const o=`ng-select-${i}`;this._renderer.addClass(this._dropdown,o),this._renderer.addClass(this._select,o)}_handleScroll(){this._zone.runOutsideAngular(()=>{(0,O.R)(this.scrollElementRef.nativeElement,"scroll").pipe((0,w.R)(this._destroy$),(0,x.e)(0,me)).subscribe(i=>{const o=i.path||i.composedPath&&i.composedPath();this._onContentScrolled(o&&0!==o.length?o[0].scrollTop:i.target.scrollTop)})})}_handleOutsideClick(){this._document&&this._zone.runOutsideAngular(()=>{(0,N.T)((0,O.R)(this._document,"touchstart",{capture:!0}),(0,O.R)(this._document,"mousedown",{capture:!0})).pipe((0,w.R)(this._destroy$)).subscribe(i=>this._checkToClose(i))})}_checkToClose(i){if(this._select.contains(i.target)||this._dropdown.contains(i.target))return;const o=i.path||i.composedPath&&i.composedPath();i.target&&i.target.shadowRoot&&o&&o[0]&&this._select.contains(o[0])||this._zone.run(()=>this.outsideClick.emit())}_onItemsChange(i,o){this.items=i||[],this._scrollToEndFired=!1,this.itemsLength=i.length,this.virtualScroll?this._updateItemsRange(o):(this._setVirtualHeight(),this._updateItems(o))}_updateItems(i){this.update.emit(this.items),!1!==i&&this._zone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this._panelService.setDimensions(0,this._scrollablePanel.clientHeight),this._handleDropdownPosition(),this.scrollTo(this.markedItem,i)})})}_updateItemsRange(i){this._zone.runOutsideAngular(()=>{this._measureDimensions().then(()=>{i?(this._renderItemsRange(this._startOffset),this._handleDropdownPosition()):this._renderItemsRange()})})}_onContentScrolled(i){this.virtualScroll&&this._renderItemsRange(i),this._lastScrollPosition=i,this._fireScrollToEnd(i)}_updateVirtualHeight(i){this._updateScrollHeight&&(this._virtualPadding.style.height=`${i}px`,this._updateScrollHeight=!1)}_setVirtualHeight(){this._virtualPadding&&(this._virtualPadding.style.height="0px")}_onItemsLengthChanged(){this._updateScrollHeight=!0}_renderItemsRange(i=null){if(i&&this._lastScrollPosition===i)return;const o=this._panelService.calculateItems(i=i||this._scrollablePanel.scrollTop,this.itemsLength,this.bufferAmount);this._updateVirtualHeight(o.scrollHeight),this._contentPanel.style.transform=`translateY(${o.topPadding}px)`,this._zone.run(()=>{this.update.emit(this.items.slice(o.start,o.end)),this.scroll.emit({start:o.start,end:o.end})}),I(i)&&0===this._lastScrollPosition&&(this._scrollablePanel.scrollTop=i,this._lastScrollPosition=i)}_measureDimensions(){if(this._panelService.dimensions.itemHeight>0||0===this.itemsLength)return Promise.resolve(this._panelService.dimensions);const[i]=this.items;return this.update.emit([i]),Promise.resolve().then(()=>{const u=this._dropdown.querySelector(`#${i.htmlId}`).clientHeight;return this._virtualPadding.style.height=u*this.itemsLength+"px",this._panelService.setDimensions(u,this._scrollablePanel.clientHeight),this._panelService.dimensions})}_fireScrollToEnd(i){this._scrollToEndFired||0===i||i+this._dropdown.clientHeight>=(this.virtualScroll?this._virtualPadding:this._contentPanel).clientHeight-1&&(this._zone.run(()=>this.scrollToEnd.emit()),this._scrollToEndFired=!0)}_calculateCurrentPosition(i){if("auto"!==this.position)return this.position;const o=this._select.getBoundingClientRect(),u=document.documentElement.scrollTop||document.body.scrollTop;return o.top+window.pageYOffset+o.height+i.getBoundingClientRect().height>u+document.documentElement.clientHeight?"top":"bottom"}_appendDropdown(){if(this.appendTo){if(this._parent=document.querySelector(this.appendTo),!this._parent)throw new Error(`appendTo selector ${this.appendTo} did not found any parent element`);this._updateXPosition(),this._parent.appendChild(this._dropdown)}}_updateXPosition(){const i=this._select.getBoundingClientRect(),o=this._parent.getBoundingClientRect();this._dropdown.style.left=i.left-o.left+"px",this._dropdown.style.width=i.width+"px",this._dropdown.style.minWidth=i.width+"px"}_updateYPosition(){const i=this._select.getBoundingClientRect(),o=this._parent.getBoundingClientRect(),u=i.height;"top"===this._currentPosition?(this._dropdown.style.bottom=o.bottom-i.bottom+u+"px",this._dropdown.style.top="auto"):"bottom"===this._currentPosition&&(this._dropdown.style.top=i.top-o.top+u+"px",this._dropdown.style.bottom="auto")}_setupMousedownListener(){this._zone.runOutsideAngular(()=>{(0,O.R)(this._dropdown,"mousedown").pipe((0,w.R)(this._destroy$)).subscribe(i=>{"INPUT"!==i.target.tagName&&i.preventDefault()})})}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.Qsj),e.Y36(e.R0b),e.Y36(le),e.Y36(e.SBq),e.Y36(v.K0,8))},l.\u0275cmp=e.Xpm({type:l,selectors:[["ng-dropdown-panel"]],viewQuery:function(i,o){if(1&i&&(e.Gf(D,7,e.SBq),e.Gf(g,7,e.SBq),e.Gf(y,7,e.SBq)),2&i){let u;e.iGM(u=e.CRH())&&(o.contentElementRef=u.first),e.iGM(u=e.CRH())&&(o.scrollElementRef=u.first),e.iGM(u=e.CRH())&&(o.paddingElementRef=u.first)}},inputs:{items:"items",markedItem:"markedItem",position:"position",appendTo:"appendTo",bufferAmount:"bufferAmount",virtualScroll:"virtualScroll",headerTemplate:"headerTemplate",footerTemplate:"footerTemplate",filterValue:"filterValue"},outputs:{update:"update",scroll:"scroll",scrollToEnd:"scrollToEnd",outsideClick:"outsideClick"},features:[e.TTD],ngContentSelectors:q,decls:9,vars:6,consts:[["class","ng-dropdown-header",4,"ngIf"],[1,"ng-dropdown-panel-items","scroll-host"],["scroll",""],["padding",""],["content",""],["class","ng-dropdown-footer",4,"ngIf"],[1,"ng-dropdown-header"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"ng-dropdown-footer"]],template:function(i,o){1&i&&(e.F$t(),e.YNc(0,H,2,4,"div",0),e.TgZ(1,"div",1,2),e._UZ(3,"div",null,3),e.TgZ(5,"div",null,4),e.Hsn(7),e.qZA()(),e.YNc(8,j,2,4,"div",5)),2&i&&(e.Q6J("ngIf",o.headerTemplate),e.xp6(3),e.ekj("total-padding",o.virtualScroll),e.xp6(2),e.ekj("scrollable-content",o.virtualScroll&&o.items.length),e.xp6(3),e.Q6J("ngIf",o.footerTemplate))},dependencies:[v.O5,v.tP],encapsulation:2,changeDetection:0}),l})(),te=(()=>{class l{constructor(i){this.elementRef=i,this.stateChange$=new b.x,this._disabled=!1}get disabled(){return this._disabled}set disabled(i){this._disabled=this._isDisabled(i)}get label(){return(this.elementRef.nativeElement.textContent||"").trim()}ngOnChanges(i){i.disabled&&this.stateChange$.next({value:this.value,disabled:this._disabled})}ngAfterViewChecked(){this.label!==this._previousLabel&&(this._previousLabel=this.label,this.stateChange$.next({value:this.value,disabled:this._disabled,label:this.elementRef.nativeElement.innerHTML}))}ngOnDestroy(){this.stateChange$.complete()}_isDisabled(i){return null!=i&&"false"!=`${i}`}}return l.\u0275fac=function(i){return new(i||l)(e.Y36(e.SBq))},l.\u0275cmp=e.Xpm({type:l,selectors:[["ng-option"]],inputs:{value:"value",disabled:"disabled"},features:[e.TTD],ngContentSelectors:q,decls:1,vars:0,template:function(i,o){1&i&&(e.F$t(),e.Hsn(0))},encapsulation:2,changeDetection:0}),l})(),Ye=(()=>{class l{constructor(){this.notFoundText="No items found",this.typeToSearchText="Type to search",this.addTagText="Add item",this.loadingText="Loading...",this.clearAllText="Clear all",this.disableVirtualScroll=!0,this.openOnEnter=!0,this.appearance="underline"}}return l.\u0275fac=function(i){return new(i||l)},l.\u0275prov=e.Yz7({token:l,factory:l.\u0275fac,providedIn:"root"}),l})(),je=(()=>{class l{warn(i){console.warn(i)}}return l.\u0275fac=function(i){return new(i||l)},l.\u0275prov=e.Yz7({token:l,factory:l.\u0275fac,providedIn:"root"}),l})();const ge=new e.OlP("ng-select-selection-model");let fe=(()=>{class l{constructor(i,o,u,d,h,M,k){this.classes=i,this.autoFocus=o,this.config=u,this._cd=M,this._console=k,this.markFirst=!0,this.dropdownPosition="auto",this.loading=!1,this.closeOnSelect=!0,this.hideSelected=!1,this.selectOnTab=!1,this.bufferAmount=4,this.selectableGroup=!1,this.selectableGroupAsModel=!0,this.searchFn=null,this.trackByFn=null,this.clearOnBackspace=!0,this.labelForId=null,this.inputAttrs={},this.readonly=!1,this.searchWhileComposing=!0,this.minTermLength=0,this.editableSearchTerm=!1,this.keyDownFn=B=>!0,this.multiple=!1,this.addTag=!1,this.searchable=!0,this.clearable=!0,this.isOpen=!1,this.blurEvent=new e.vpe,this.focusEvent=new e.vpe,this.changeEvent=new e.vpe,this.openEvent=new e.vpe,this.closeEvent=new e.vpe,this.searchEvent=new e.vpe,this.clearEvent=new e.vpe,this.addEvent=new e.vpe,this.removeEvent=new e.vpe,this.scroll=new e.vpe,this.scrollToEnd=new e.vpe,this.useDefaultClass=!0,this.viewPortItems=[],this.searchTerm=null,this.dropdownId=oe(),this.escapeHTML=!0,this._items=[],this._defaultLabel="label",this._pressedKeys=[],this._isComposing=!1,this._destroy$=new b.x,this._keyPress$=new b.x,this._onChange=B=>{},this._onTouched=()=>{},this.clearItem=B=>{const z=this.selectedItems.find(Y=>Y.value===B);this.unselect(z)},this.trackByOption=(B,z)=>this.trackByFn?this.trackByFn(z.value):z,this._mergeGlobalConfig(u),this.itemsList=new Q(this,d()),this.element=h.nativeElement}get items(){return this._items}set items(i){null===i&&(i=[]),this._itemsAreUsed=!0,this._items=i}get compareWith(){return this._compareWith}set compareWith(i){if(null!=i&&!re(i))throw Error("`compareWith` must be a function.");this._compareWith=i}get clearSearchOnAdd(){return I(this._clearSearchOnAdd)?this._clearSearchOnAdd:I(this.config.clearSearchOnAdd)?this.config.clearSearchOnAdd:this.closeOnSelect}set clearSearchOnAdd(i){this._clearSearchOnAdd=i}get disabled(){return this.readonly||this._disabled}get filtered(){return!!this.searchTerm&&this.searchable||this._isComposing}get single(){return!this.multiple}get _editableSearchTerm(){return this.editableSearchTerm&&!this.multiple}get selectedItems(){return this.itemsList.selectedItems}get selectedValues(){return this.selectedItems.map(i=>i.value)}get hasValue(){return this.selectedItems.length>0}get currentPanelPosition(){if(this.dropdownPanel)return this.dropdownPanel.currentPosition}ngOnInit(){this._handleKeyPresses(),this._setInputAttributes()}ngOnChanges(i){i.multiple&&this.itemsList.clearSelected(),i.items&&this._setItems(i.items.currentValue||[]),i.isOpen&&(this._manualOpen=I(i.isOpen.currentValue))}ngAfterViewInit(){this._itemsAreUsed||(this.escapeHTML=!1,this._setItemsFromNgOptions()),I(this.autoFocus)&&this.focus()}ngOnDestroy(){this._destroy$.next(),this._destroy$.complete()}handleKeyDown(i){if(R[i.which]){if(!1===this.keyDownFn(i))return;this.handleKeyCode(i)}else i.key&&1===i.key.length&&this._keyPress$.next(i.key.toLocaleLowerCase())}handleKeyCode(i){switch(i.which){case R.ArrowDown:this._handleArrowDown(i);break;case R.ArrowUp:this._handleArrowUp(i);break;case R.Space:this._handleSpace(i);break;case R.Enter:this._handleEnter(i);break;case R.Tab:this._handleTab(i);break;case R.Esc:this.close(),i.preventDefault();break;case R.Backspace:this._handleBackspace()}}handleMousedown(i){const o=i.target;"INPUT"!==o.tagName&&i.preventDefault(),o.classList.contains("ng-clear-wrapper")?this.handleClearClick():o.classList.contains("ng-arrow-wrapper")?this.handleArrowClick():o.classList.contains("ng-value-icon")||(this.focused||this.focus(),this.searchable?this.open():this.toggle())}handleArrowClick(){this.isOpen?this.close():this.open()}handleClearClick(){this.hasValue&&(this.itemsList.clearSelected(!0),this._updateNgModel()),this._clearSearch(),this.focus(),this.clearEvent.emit(),this._onSelectionChanged()}clearModel(){this.clearable&&(this.itemsList.clearSelected(),this._updateNgModel())}writeValue(i){this.itemsList.clearSelected(),this._handleWriteValue(i),this._cd.markForCheck()}registerOnChange(i){this._onChange=i}registerOnTouched(i){this._onTouched=i}setDisabledState(i){this._disabled=i,this._cd.markForCheck()}toggle(){this.isOpen?this.close():this.open()}open(){this.disabled||this.isOpen||this._manualOpen||!this._isTypeahead&&!this.addTag&&this.itemsList.noItemsToSelect||(this.isOpen=!0,this.itemsList.markSelectedOrDefault(this.markFirst),this.openEvent.emit(),this.searchTerm||this.focus(),this.detectChanges())}close(){!this.isOpen||this._manualOpen||(this.isOpen=!1,this._isComposing=!1,this._editableSearchTerm?this.itemsList.resetFilteredItems():this._clearSearch(),this.itemsList.unmarkItem(),this._onTouched(),this.closeEvent.emit(),this._cd.markForCheck())}toggleItem(i){!i||i.disabled||this.disabled||(this.multiple&&i.selected?this.unselect(i):this.select(i),this._editableSearchTerm&&this._setSearchTermFromItems(),this._onSelectionChanged())}select(i){i.selected||(this.itemsList.select(i),this.clearSearchOnAdd&&!this._editableSearchTerm&&this._clearSearch(),this._updateNgModel(),this.multiple&&this.addEvent.emit(i.value)),(this.closeOnSelect||this.itemsList.noItemsToSelect)&&this.close()}focus(){this.searchInput.nativeElement.focus()}blur(){this.searchInput.nativeElement.blur()}unselect(i){i&&(this.itemsList.unselect(i),this.focus(),this._updateNgModel(),this.removeEvent.emit(i))}selectTag(){let i;i=re(this.addTag)?this.addTag(this.searchTerm):this._primitive?this.searchTerm:{[this.bindLabel]:this.searchTerm};const o=u=>this._isTypeahead||!this.isOpen?this.itemsList.mapItem(u,null):this.itemsList.addItem(u);!function pe(l){return l instanceof Promise}(i)?i&&this.select(o(i)):i.then(u=>this.select(o(u))).catch(()=>{})}showClear(){return this.clearable&&(this.hasValue||this.searchTerm)&&!this.disabled}get showAddTag(){if(!this._validTerm)return!1;const i=this.searchTerm.toLowerCase().trim();return this.addTag&&!this.itemsList.filteredItems.some(o=>o.label.toLowerCase()===i)&&(!this.hideSelected&&this.isOpen||!this.selectedItems.some(o=>o.label.toLowerCase()===i))&&!this.loading}showNoItemsFound(){const i=0===this.itemsList.filteredItems.length;return(i&&!this._isTypeahead&&!this.loading||i&&this._isTypeahead&&this._validTerm&&!this.loading)&&!this.showAddTag}showTypeToSearch(){return 0===this.itemsList.filteredItems.length&&this._isTypeahead&&!this._validTerm&&!this.loading}onCompositionStart(){this._isComposing=!0}onCompositionEnd(i){this._isComposing=!1,!this.searchWhileComposing&&this.filter(i)}filter(i){this._isComposing&&!this.searchWhileComposing||(this.searchTerm=i,this._isTypeahead&&(this._validTerm||0===this.minTermLength)&&this.typeahead.next(i),this._isTypeahead||(this.itemsList.filter(this.searchTerm),this.isOpen&&this.itemsList.markSelectedOrDefault(this.markFirst)),this.searchEvent.emit({term:i,items:this.itemsList.filteredItems.map(o=>o.value)}),this.open())}onInputFocus(i){this.focused||(this._editableSearchTerm&&this._setSearchTermFromItems(),this.element.classList.add("ng-select-focused"),this.focusEvent.emit(i),this.focused=!0)}onInputBlur(i){this.element.classList.remove("ng-select-focused"),this.blurEvent.emit(i),!this.isOpen&&!this.disabled&&this._onTouched(),this._editableSearchTerm&&this._setSearchTermFromItems(),this.focused=!1}onItemHover(i){i.disabled||this.itemsList.markItem(i)}detectChanges(){this._cd.destroyed||this._cd.detectChanges()}_setSearchTermFromItems(){const i=this.selectedItems&&this.selectedItems[0];this.searchTerm=i&&i.label||null}_setItems(i){const o=i[0];this.bindLabel=this.bindLabel||this._defaultLabel,this._primitive=I(o)?!X(o):this._primitive||this.bindLabel===this._defaultLabel,this.itemsList.setItems(i),i.length>0&&this.hasValue&&this.itemsList.mapSelectedItems(),this.isOpen&&I(this.searchTerm)&&!this._isTypeahead&&this.itemsList.filter(this.searchTerm),(this._isTypeahead||this.isOpen)&&this.itemsList.markSelectedOrDefault(this.markFirst)}_setItemsFromNgOptions(){const i=u=>{this.items=u.map(d=>({$ngOptionValue:d.value,$ngOptionLabel:d.elementRef.nativeElement.innerHTML,disabled:d.disabled})),this.itemsList.setItems(this.items),this.hasValue&&this.itemsList.mapSelectedItems(),this.detectChanges()},o=()=>{const u=(0,N.T)(this.ngOptions.changes,this._destroy$);(0,N.T)(...this.ngOptions.map(d=>d.stateChange$)).pipe((0,w.R)(u)).subscribe(d=>{const h=this.itemsList.findItem(d.value);h.disabled=d.disabled,h.label=d.label||h.label,this._cd.detectChanges()})};this.ngOptions.changes.pipe((0,_.O)(this.ngOptions),(0,w.R)(this._destroy$)).subscribe(u=>{this.bindLabel=this._defaultLabel,i(u),o()})}_isValidWriteValue(i){if(!I(i)||this.multiple&&""===i||Array.isArray(i)&&0===i.length)return!1;const o=u=>!(!I(this.compareWith)&&X(u)&&this.bindValue&&(this._console.warn(`Setting object(${JSON.stringify(u)}) as your model with bindValue is not allowed unless [compareWith] is used.`),1));return this.multiple?Array.isArray(i)?i.every(u=>o(u)):(this._console.warn("Multiple select ngModel should be array."),!1):o(i)}_handleWriteValue(i){if(!this._isValidWriteValue(i))return;const o=u=>{let d=this.itemsList.findItem(u);if(d)this.itemsList.select(d);else{const h=X(u);h||!h&&!this.bindValue?this.itemsList.select(this.itemsList.mapItem(u,null)):this.bindValue&&(d={[this.bindLabel]:null,[this.bindValue]:u},this.itemsList.select(this.itemsList.mapItem(d,null)))}};this.multiple?i.forEach(u=>o(u)):o(i)}_handleKeyPresses(){this.searchable||this._keyPress$.pipe((0,w.R)(this._destroy$),(0,F.b)(i=>this._pressedKeys.push(i)),(0,V.b)(200),(0,C.h)(()=>this._pressedKeys.length>0),(0,S.U)(()=>this._pressedKeys.join(""))).subscribe(i=>{const o=this.itemsList.findByLabel(i);o&&(this.isOpen?(this.itemsList.markItem(o),this._scrollToMarked(),this._cd.markForCheck()):this.select(o)),this._pressedKeys=[]})}_setInputAttributes(){const i=this.searchInput.nativeElement,o={type:"text",autocorrect:"off",autocapitalize:"off",autocomplete:this.labelForId?"off":this.dropdownId,...this.inputAttrs};for(const u of Object.keys(o))i.setAttribute(u,o[u])}_updateNgModel(){const i=[];for(const u of this.selectedItems)if(this.bindValue){let d=null;d=u.children?u.value[(this.groupValue?this.bindValue:this.groupBy)||this.groupBy]:this.itemsList.resolveNested(u.value,this.bindValue),i.push(d)}else i.push(u.value);const o=this.selectedItems.map(u=>u.value);this.multiple?(this._onChange(i),this.changeEvent.emit(o)):(this._onChange(I(i[0])?i[0]:null),this.changeEvent.emit(o[0])),this._cd.markForCheck()}_clearSearch(){this.searchTerm&&(this._changeSearch(null),this.itemsList.resetFilteredItems())}_changeSearch(i){this.searchTerm=i,this._isTypeahead&&this.typeahead.next(i)}_scrollToMarked(){!this.isOpen||!this.dropdownPanel||this.dropdownPanel.scrollTo(this.itemsList.markedItem)}_scrollToTag(){!this.isOpen||!this.dropdownPanel||this.dropdownPanel.scrollToTag()}_onSelectionChanged(){this.isOpen&&this.multiple&&this.appendTo&&(this._cd.detectChanges(),this.dropdownPanel.adjustPosition())}_handleTab(i){!1===this.isOpen&&!this.addTag||(this.selectOnTab?this.itemsList.markedItem?(this.toggleItem(this.itemsList.markedItem),i.preventDefault()):this.showAddTag?(this.selectTag(),i.preventDefault()):this.close():this.close())}_handleEnter(i){if(this.isOpen||this._manualOpen)this.itemsList.markedItem?this.toggleItem(this.itemsList.markedItem):this.showAddTag&&this.selectTag();else{if(!this.openOnEnter)return;this.open()}i.preventDefault()}_handleSpace(i){this.isOpen||this._manualOpen||(this.open(),i.preventDefault())}_handleArrowDown(i){this._nextItemIsTag(1)?(this.itemsList.unmarkItem(),this._scrollToTag()):(this.itemsList.markNextItem(),this._scrollToMarked()),this.open(),i.preventDefault()}_handleArrowUp(i){this.isOpen&&(this._nextItemIsTag(-1)?(this.itemsList.unmarkItem(),this._scrollToTag()):(this.itemsList.markPreviousItem(),this._scrollToMarked()),i.preventDefault())}_nextItemIsTag(i){const o=this.itemsList.markedIndex+i;return this.addTag&&this.searchTerm&&this.itemsList.markedItem&&(o<0||o===this.itemsList.filteredItems.length)}_handleBackspace(){this.searchTerm||!this.clearable||!this.clearOnBackspace||!this.hasValue||(this.multiple?this.unselect(this.itemsList.lastSelectedItem):this.clearModel())}get _isTypeahead(){return this.typeahead&&this.typeahead.observers.length>0}get _validTerm(){const i=this.searchTerm&&this.searchTerm.trim();return i&&i.length>=this.minTermLength}_mergeGlobalConfig(i){this.placeholder=this.placeholder||i.placeholder,this.notFoundText=this.notFoundText||i.notFoundText,this.typeToSearchText=this.typeToSearchText||i.typeToSearchText,this.addTagText=this.addTagText||i.addTagText,this.loadingText=this.loadingText||i.loadingText,this.clearAllText=this.clearAllText||i.clearAllText,this.virtualScroll=I(this.virtualScroll)?this.virtualScroll:!!I(i.disableVirtualScroll)&&!i.disableVirtualScroll,this.openOnEnter=I(this.openOnEnter)?this.openOnEnter:i.openOnEnter,this.appendTo=this.appendTo||i.appendTo,this.bindValue=this.bindValue||i.bindValue,this.bindLabel=this.bindLabel||i.bindLabel,this.appearance=this.appearance||i.appearance}}return l.\u0275fac=function(i){return new(i||l)(e.$8M("class"),e.$8M("autofocus"),e.Y36(Ye),e.Y36(ge),e.Y36(e.SBq),e.Y36(e.sBO),e.Y36(je))},l.\u0275cmp=e.Xpm({type:l,selectors:[["ng-select"]],contentQueries:function(i,o,u){if(1&i&&(e.Suo(u,Qe,5,e.Rgc),e.Suo(u,yt,5,e.Rgc),e.Suo(u,Ct,5,e.Rgc),e.Suo(u,Et,5,e.Rgc),e.Suo(u,At,5,e.Rgc),e.Suo(u,Dt,5,e.Rgc),e.Suo(u,Xe,5,e.Rgc),e.Suo(u,Re,5,e.Rgc),e.Suo(u,et,5,e.Rgc),e.Suo(u,tt,5,e.Rgc),e.Suo(u,nt,5,e.Rgc),e.Suo(u,te,5)),2&i){let d;e.iGM(d=e.CRH())&&(o.optionTemplate=d.first),e.iGM(d=e.CRH())&&(o.optgroupTemplate=d.first),e.iGM(d=e.CRH())&&(o.labelTemplate=d.first),e.iGM(d=e.CRH())&&(o.multiLabelTemplate=d.first),e.iGM(d=e.CRH())&&(o.headerTemplate=d.first),e.iGM(d=e.CRH())&&(o.footerTemplate=d.first),e.iGM(d=e.CRH())&&(o.notFoundTemplate=d.first),e.iGM(d=e.CRH())&&(o.typeToSearchTemplate=d.first),e.iGM(d=e.CRH())&&(o.loadingTextTemplate=d.first),e.iGM(d=e.CRH())&&(o.tagTemplate=d.first),e.iGM(d=e.CRH())&&(o.loadingSpinnerTemplate=d.first),e.iGM(d=e.CRH())&&(o.ngOptions=d)}},viewQuery:function(i,o){if(1&i&&(e.Gf(Ue,5),e.Gf(J,7)),2&i){let u;e.iGM(u=e.CRH())&&(o.dropdownPanel=u.first),e.iGM(u=e.CRH())&&(o.searchInput=u.first)}},hostVars:20,hostBindings:function(i,o){1&i&&e.NdJ("keydown",function(d){return o.handleKeyDown(d)}),2&i&&e.ekj("ng-select-typeahead",o.typeahead)("ng-select-multiple",o.multiple)("ng-select-taggable",o.addTag)("ng-select-searchable",o.searchable)("ng-select-clearable",o.clearable)("ng-select-opened",o.isOpen)("ng-select",o.useDefaultClass)("ng-select-disabled",o.disabled)("ng-select-filtered",o.filtered)("ng-select-single",o.single)},inputs:{bindLabel:"bindLabel",bindValue:"bindValue",markFirst:"markFirst",placeholder:"placeholder",notFoundText:"notFoundText",typeToSearchText:"typeToSearchText",addTagText:"addTagText",loadingText:"loadingText",clearAllText:"clearAllText",appearance:"appearance",dropdownPosition:"dropdownPosition",appendTo:"appendTo",loading:"loading",closeOnSelect:"closeOnSelect",hideSelected:"hideSelected",selectOnTab:"selectOnTab",openOnEnter:"openOnEnter",maxSelectedItems:"maxSelectedItems",groupBy:"groupBy",groupValue:"groupValue",bufferAmount:"bufferAmount",virtualScroll:"virtualScroll",selectableGroup:"selectableGroup",selectableGroupAsModel:"selectableGroupAsModel",searchFn:"searchFn",trackByFn:"trackByFn",clearOnBackspace:"clearOnBackspace",labelForId:"labelForId",inputAttrs:"inputAttrs",tabIndex:"tabIndex",readonly:"readonly",searchWhileComposing:"searchWhileComposing",minTermLength:"minTermLength",editableSearchTerm:"editableSearchTerm",keyDownFn:"keyDownFn",typeahead:"typeahead",multiple:"multiple",addTag:"addTag",searchable:"searchable",clearable:"clearable",isOpen:"isOpen",items:"items",compareWith:"compareWith",clearSearchOnAdd:"clearSearchOnAdd"},outputs:{blurEvent:"blur",focusEvent:"focus",changeEvent:"change",openEvent:"open",closeEvent:"close",searchEvent:"search",clearEvent:"clear",addEvent:"add",removeEvent:"remove",scroll:"scroll",scrollToEnd:"scrollToEnd"},features:[e._Bn([{provide:E.JU,useExisting:(0,e.Gpc)(()=>l),multi:!0},le]),e.TTD],decls:14,vars:19,consts:[[1,"ng-select-container",3,"mousedown"],[1,"ng-value-container"],[1,"ng-placeholder"],[4,"ngIf"],["role","combobox","aria-haspopup","listbox",1,"ng-input"],["aria-autocomplete","list",3,"readOnly","disabled","value","input","compositionstart","compositionend","focus","blur","change"],["searchInput",""],["class","ng-clear-wrapper",3,"title",4,"ngIf"],[1,"ng-arrow-wrapper"],[1,"ng-arrow"],["class","ng-dropdown-panel","role","listbox","aria-label","Options list",3,"virtualScroll","bufferAmount","appendTo","position","headerTemplate","footerTemplate","filterValue","items","markedItem","ng-select-multiple","ngClass","id","update","scroll","scrollToEnd","outsideClick",4,"ngIf"],["class","ng-value",3,"ng-value-disabled",4,"ngFor","ngForOf","ngForTrackBy"],[1,"ng-value"],["defaultLabelTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["aria-hidden","true",1,"ng-value-icon","left",3,"click"],[1,"ng-value-label",3,"ngItemLabel","escape"],["defaultLoadingSpinnerTemplate",""],[3,"ngTemplateOutlet"],[1,"ng-spinner-loader"],[1,"ng-clear-wrapper",3,"title"],["aria-hidden","true",1,"ng-clear"],["role","listbox","aria-label","Options list",1,"ng-dropdown-panel",3,"virtualScroll","bufferAmount","appendTo","position","headerTemplate","footerTemplate","filterValue","items","markedItem","ngClass","id","update","scroll","scrollToEnd","outsideClick"],["class","ng-option",3,"ng-option-disabled","ng-option-selected","ng-optgroup","ng-option","ng-option-child","ng-option-marked","click","mouseover",4,"ngFor","ngForOf","ngForTrackBy"],["class","ng-option","role","option",3,"ng-option-marked","mouseover","click",4,"ngIf"],[1,"ng-option",3,"click","mouseover"],["defaultOptionTemplate",""],[1,"ng-option-label",3,"ngItemLabel","escape"],["role","option",1,"ng-option",3,"mouseover","click"],["defaultTagTemplate",""],[1,"ng-tag-label"],["defaultNotFoundTemplate",""],[1,"ng-option","ng-option-disabled"],["defaultTypeToSearchTemplate",""],["defaultLoadingTextTemplate",""]],template:function(i,o){if(1&i){const u=e.EpF();e.TgZ(0,"div",0),e.NdJ("mousedown",function(h){return o.handleMousedown(h)}),e.TgZ(1,"div",1)(2,"div",2),e._uU(3),e.qZA(),e.YNc(4,Ae,2,2,"ng-container",3),e.YNc(5,be,1,5,null,3),e.TgZ(6,"div",4)(7,"input",5,6),e.NdJ("input",function(){e.CHM(u);const h=e.MAs(8);return e.KtG(o.filter(h.value))})("compositionstart",function(){return o.onCompositionStart()})("compositionend",function(){e.CHM(u);const h=e.MAs(8);return e.KtG(o.onCompositionEnd(h.value))})("focus",function(h){return o.onInputFocus(h)})("blur",function(h){return o.onInputBlur(h)})("change",function(h){return h.stopPropagation()}),e.qZA()()(),e.YNc(9,Ve,4,1,"ng-container",3),e.YNc(10,Ze,3,1,"span",7),e.TgZ(11,"span",8),e._UZ(12,"span",9),e.qZA()(),e.YNc(13,_t,7,19,"ng-dropdown-panel",10)}2&i&&(e.ekj("ng-appearance-outline","outline"===o.appearance)("ng-has-value",o.hasValue),e.xp6(3),e.Oqu(o.placeholder),e.xp6(1),e.Q6J("ngIf",(!o.multiLabelTemplate||!o.multiple)&&o.selectedItems.length>0),e.xp6(1),e.Q6J("ngIf",o.multiple&&o.multiLabelTemplate&&o.selectedValues.length>0),e.xp6(1),e.uIk("aria-expanded",o.isOpen)("aria-owns",o.isOpen?o.dropdownId:null),e.xp6(1),e.Q6J("readOnly",!o.searchable||o.itemsList.maxItemsSelected)("disabled",o.disabled)("value",o.searchTerm?o.searchTerm:""),e.uIk("id",o.labelForId)("tabindex",o.tabIndex)("aria-activedescendant",o.isOpen?null==o.itemsList||null==o.itemsList.markedItem?null:o.itemsList.markedItem.htmlId:null)("aria-controls",o.isOpen?o.dropdownId:null),e.xp6(2),e.Q6J("ngIf",o.loading),e.xp6(1),e.Q6J("ngIf",o.showClear()),e.xp6(3),e.Q6J("ngIf",o.isOpen))},dependencies:[v.mk,v.sg,v.O5,v.tP,Ue,vt],styles:['@charset "UTF-8";.ng-select{position:relative;display:block;box-sizing:border-box}.ng-select div,.ng-select input,.ng-select span{box-sizing:border-box}.ng-select [hidden]{display:none}.ng-select.ng-select-searchable .ng-select-container .ng-value-container .ng-input{opacity:1}.ng-select.ng-select-opened .ng-select-container{z-index:1001}.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-placeholder,.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-value{-webkit-user-select:none;user-select:none;cursor:default}.ng-select.ng-select-disabled .ng-arrow-wrapper{cursor:default}.ng-select.ng-select-filtered .ng-placeholder{display:none}.ng-select .ng-select-container{cursor:default;display:flex;outline:none;overflow:hidden;position:relative;width:100%}.ng-select .ng-select-container .ng-value-container{display:flex;flex:1}.ng-select .ng-select-container .ng-value-container .ng-input{opacity:0}.ng-select .ng-select-container .ng-value-container .ng-input>input{box-sizing:content-box;background:none transparent;border:0 none;box-shadow:none;outline:none;padding:0;cursor:default;width:100%}.ng-select .ng-select-container .ng-value-container .ng-input>input::-ms-clear{display:none}.ng-select .ng-select-container .ng-value-container .ng-input>input[readonly]{-webkit-user-select:none;user-select:none;width:0;padding:0}.ng-select.ng-select-single.ng-select-filtered .ng-select-container .ng-value-container .ng-value{visibility:hidden}.ng-select.ng-select-single .ng-select-container .ng-value-container,.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{position:absolute;left:0;width:100%}.ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container{flex-wrap:wrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{position:absolute}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{white-space:nowrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{cursor:pointer}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{flex:1;z-index:2}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{z-index:1}.ng-select .ng-clear-wrapper{cursor:pointer;position:relative;width:17px;-webkit-user-select:none;user-select:none}.ng-select .ng-clear-wrapper .ng-clear{display:inline-block;font-size:18px;line-height:1;pointer-events:none}.ng-select .ng-spinner-loader{border-radius:50%;width:17px;height:17px;margin-right:5px;font-size:10px;position:relative;text-indent:-9999em;border-top:2px solid rgba(66,66,66,.2);border-right:2px solid rgba(66,66,66,.2);border-bottom:2px solid rgba(66,66,66,.2);border-left:2px solid #424242;transform:translateZ(0);animation:load8 .8s infinite linear}.ng-select .ng-spinner-loader:after{border-radius:50%;width:17px;height:17px}@keyframes load8{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ng-select .ng-arrow-wrapper{cursor:pointer;position:relative;text-align:center;-webkit-user-select:none;user-select:none}.ng-select .ng-arrow-wrapper .ng-arrow{pointer-events:none;display:inline-block;height:0;width:0;position:relative}.ng-dropdown-panel{box-sizing:border-box;position:absolute;opacity:0;width:100%;z-index:1050;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .ng-dropdown-panel-items{display:block;height:auto;box-sizing:border-box;max-height:240px;overflow-y:auto}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option{box-sizing:border-box;cursor:pointer;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-option-label:empty:before{content:"\\200b"}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .highlighted{font-weight:700;text-decoration:underline}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.disabled{cursor:default}.ng-dropdown-panel .scroll-host{overflow:hidden;overflow-y:auto;position:relative;display:block;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .scrollable-content{top:0;left:0;width:100%;height:100%;position:absolute}.ng-dropdown-panel .total-padding{width:1px;opacity:0}\n'],encapsulation:2,changeDetection:0}),l})();function bt(){return new Tt}class Tt{constructor(){this._selected=[]}get value(){return this._selected}select(a,i,o){if(a.selected=!0,(!a.children||!i&&o)&&this._selected.push(a),i)if(a.parent){const u=a.parent.children.length,d=a.parent.children.filter(h=>h.selected).length;a.parent.selected=u===d}else a.children&&(this._setChildrenSelectedState(a.children,!0),this._removeChildren(a),this._selected=o&&this._activeChildren(a)?[...this._selected.filter(u=>u.parent!==a),a]:[...this._selected,...a.children.filter(u=>!u.disabled)])}unselect(a,i){if(this._selected=this._selected.filter(o=>o!==a),a.selected=!1,i)if(a.parent&&a.parent.selected){const o=a.parent.children;this._removeParent(a.parent),this._removeChildren(a.parent),this._selected.push(...o.filter(u=>u!==a&&!u.disabled)),a.parent.selected=!1}else a.children&&(this._setChildrenSelectedState(a.children,!1),this._removeChildren(a))}clear(a){this._selected=a?this._selected.filter(i=>i.disabled):[]}_setChildrenSelectedState(a,i){for(const o of a)o.disabled||(o.selected=i)}_removeChildren(a){this._selected=[...this._selected.filter(i=>i.parent!==a),...a.children.filter(i=>i.parent===a&&i.disabled&&i.selected)]}_removeParent(a){this._selected=this._selected.filter(i=>i!==a)}_activeChildren(a){return a.children.every(i=>!i.disabled||i.selected)}}let it=(()=>{class l{}return l.\u0275fac=function(i){return new(i||l)},l.\u0275mod=e.oAB({type:l}),l.\u0275inj=e.cJS({providers:[{provide:ge,useValue:bt}],imports:[v.ez]}),l})()}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[863],{7398:(ot,w,l)=>{l.d(w,{Z:()=>P,e:()=>f});var p=l(6895),t=l(266),y=l(284),h=l(4650);function Q(_,u){if(1&_&&(h.TgZ(0,"li",2)(1,"a",3),h._uU(2),h.qZA()()),2&_){const r=u.$implicit;h.xp6(1),h.s9C("routerLink",r.Url),h.Q6J("title",r.Description?r.Description:""),h.xp6(1),h.hij(" ",r.Title," ")}}class f{}f.\u0275fac=function(u){return new(u||f)},f.\u0275cmp=h.Xpm({type:f,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(u,r){1&u&&(h.TgZ(0,"ul",0),h.YNc(1,Q,3,3,"li",1),h.qZA()),2&u&&(h.xp6(1),h.Q6J("ngForOf",r.Tabs))},dependencies:[p.sg,y.rH,y.Od]});class P{}P.\u0275fac=function(u){return new(u||P)},P.\u0275mod=h.oAB({type:P}),P.\u0275inj=h.cJS({imports:[p.ez,y.Bz,t.AV]})},9863:(ot,w,l)=>{l.r(w),l.d(w,{StatusModule:()=>E});var p=l(6895),t=l(4650),y=l(7398),h=l(284);const Q=function(){return["/menu/products/download/by-url"]};class f{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/status/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/status/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/status/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/status/in-pos",Description:"All products which is already available in POS"},{Title:"Multiple Listed SKU",Url:"/menu/products/status/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"}]}ngOnInit(){}}f.\u0275fac=function(e){return new(e||f)},f.\u0275cmp=t.Xpm({type:f,selectors:[["app-status"]],decls:13,vars:3,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-flex"],[1,"dropdown-item",3,"routerLink"]],template:function(e,n){1&e&&(t.TgZ(0,"nav",0)(1,"div",1)(2,"div"),t._UZ(3,"nav-tab",2),t.qZA()(),t.TgZ(4,"div")(5,"div",3)(6,"a",4),t._UZ(7,"i",5),t.qZA(),t.TgZ(8,"div",6)(9,"div",7)(10,"a",8),t._uU(11,"Download Product By Url"),t.qZA()()()()()(),t._UZ(12,"router-outlet")),2&e&&(t.xp6(3),t.Q6J("Tabs",n.productTabs),t.xp6(7),t.Q6J("routerLink",t.DdM(2,Q)))},dependencies:[y.e,h.lC,h.rH]});var P=l(1290),_=l(8231),u=l(5412),r=l(3154),g=l(9694),S=(()=>{return(i=S||(S={})).Tokopedia="https://seller.tokopedia.com",i.Shoope="https://seller.shopee.co.id",i.Tiktok="https://seller-id.tiktok.com",i.WooCommerce="https://woocommerce.dealpos.app",i.Lazada="https://sellercenter.lazada.co.id",S;var i})(),Y=l(6779),N=l(266),R=l(6401);function tt(i,e){if(1&i&&(t.ynx(0),t.TgZ(1,"tr")(2,"td",11),t._uU(3),t.qZA(),t.TgZ(4,"td",11),t._uU(5),t.qZA(),t.TgZ(6,"td",12)(7,"p",13),t._uU(8,"Product Not in Channel!"),t.qZA()()(),t.BQk()),2&i){const n=t.oxw().$implicit;t.xp6(3),t.hij(" ",null==n?null:n.Model,""),t.xp6(2),t.hij(" ",null==n?null:n.Code,"")}}function W(i,e){if(1&i&&(t.TgZ(0,"td",11),t._uU(1),t.qZA()),2&i){const n=t.oxw(3).$implicit;t.uIk("rowspan",n.Channel.length),t.xp6(1),t.hij(" ",null==n?null:n.Model,"")}}function nt(i,e){if(1&i&&(t.TgZ(0,"td",11),t._uU(1),t.qZA()),2&i){const n=t.oxw(3).$implicit;t.uIk("rowspan",n.Channel.length),t.xp6(1),t.hij(" ",null==n?null:n.Code,"")}}const T=function(i){return{"is-disabled":i}};function I(i,e){if(1&i&&(t.TgZ(0,"tr"),t.YNc(1,W,2,2,"td",14),t.YNc(2,nt,2,2,"td",14),t.TgZ(3,"td",11)(4,"div",15)(5,"a",16),t._UZ(6,"img",17),t.qZA(),t.TgZ(7,"div",18),t._uU(8),t.qZA()()(),t.TgZ(9,"td",11),t._uU(10),t.ALo(11,"number"),t.qZA(),t.TgZ(12,"td",19),t._uU(13),t.ALo(14,"number"),t.qZA(),t.TgZ(15,"td",19)(16,"a",20),t._UZ(17,"i",21),t.TgZ(18,"span",22),t._uU(19,"Edit"),t.qZA()()()()),2&i){const n=e.$implicit,o=e.index,a=t.oxw(3);t.xp6(1),t.Q6J("ngIf",0==o),t.xp6(1),t.Q6J("ngIf",0==o),t.xp6(3),t.Q6J("href",n.Url,t.LSH)("title",n.Title),t.xp6(1),t.Q6J("src",a.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.Q6J("matTooltip",(null==n||null==n.Name?null:n.Name.length)>55?null==n?null:n.Name:""),t.xp6(1),t.hij(" ",n.Name," "),t.xp6(2),t.Oqu(t.lcZ(11,12,n.Price)),t.xp6(3),t.Oqu(t.lcZ(14,14,n.Inventory)),t.xp6(3),t.Q6J("href",a.getHyperlinkSellerCenter(n),t.LSH)("ngClass",t.VKq(16,T,n.TypeID==a.channelType.KalCare))("matTooltip",n.TypeID!=a.channelType.KalCare?"Edit this product in Seller Center, inventory changes must be done via DEALPOS":"")}}function d(i,e){if(1&i&&t.YNc(0,I,20,18,"tr",8),2&i){const n=t.oxw().$implicit;t.Q6J("ngForOf",null==n?null:n.Channel)}}function C(i,e){if(1&i&&(t.ynx(0),t.YNc(1,tt,9,2,"ng-container",9),t.YNc(2,d,1,1,"ng-template",null,10,t.W1O),t.BQk()),2&i){const n=e.$implicit,o=t.MAs(3);t.xp6(1),t.Q6J("ngIf",!n.Channel||n.Channel.length<1)("ngIfElse",o)}}class b{constructor(e,n){this.data=e,this.dialogRef=n,this.channelType=g.x,this.variants=e.variants,this.title=e.title}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new Y.O,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0,this.modalConfig.hideCancel=!0,this.modalConfig.hideOk=!0}getChannelLogo(e){return r.g.getChannelLogoByTypeId(e)}getHyperlinkSellerCenter(e){let n="javascript:void(0)";switch(e.TypeID){case g.x.ShopeeV2:n=`${S.Shoope}/portal/product/${e.ChannelItemID}`;break;case g.x.Tiktok:n=`${S.Tiktok}/product/edit/${e.ChannelItemID}`;break;case g.x.Tokopedia:n=`${S.Tokopedia}/edit-product/${e.ChannelItemID}`;break;case g.x.WooCommerce:n=`${S.WooCommerce}/wp-admin/post.php?post=${e.ChannelItemID}&action=edit`;break;case g.x.Lazada:n=`${S.Lazada}/apps/product/publish?productId=${e.ChannelItemID}`}return n}}b.\u0275fac=function(e){return new(e||b)(t.Y36(u.WI),t.Y36(u.so))},b.\u0275cmp=t.Xpm({type:b,selectors:[["app-modal-variant"]],decls:22,vars:2,consts:[[3,"config","onCancel"],["content",""],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"text-start","sticky-top"],["matTooltip","Variant from POS",1,"fas","fa-info-circle","ms-1"],["matTooltip","Product and Variant from each Channel",1,"fas","fa-info-circle","ms-1"],[1,"text-start","sticky-top",2,"width","0%"],[4,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],["printChannelModal",""],[1,"text-start"],["colspan","3",1,"text-center"],[1,"my-auto"],["class","text-start",4,"ngIf"],[1,"d-flex"],["target","_blank",1,"me-1",3,"href","title"],[2,"width","20px","height","20px",3,"src"],[1,"text-ellipsis","ps-2",2,"max-width","18vw",3,"matTooltip"],[1,"text-center"],["target","_blank",1,"btn","btn-small","btn-light","px-4","py-2",3,"href","ngClass","matTooltip"],[1,"fa-solid","fa-pencil","me-2",2,"font-size","10px"],[1,"fs-6"]],template:function(e,n){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onCancel",function(){return n.dialogRef.close()}),t.TgZ(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),t._uU(6," VARIANT "),t.TgZ(7,"sup"),t._UZ(8,"i",5),t.qZA()(),t.TgZ(9,"th",4),t._uU(10,"SKU"),t.qZA(),t.TgZ(11,"th",4),t._uU(12," PRODUCT "),t.TgZ(13,"sup"),t._UZ(14,"i",6),t.qZA()(),t.TgZ(15,"th",4),t._uU(16,"PRICE"),t.qZA(),t.TgZ(17,"th",7),t._uU(18,"INVENTORY"),t.qZA(),t._UZ(19,"th",4),t.qZA()(),t.TgZ(20,"tbody"),t.YNc(21,C,4,2,"ng-container",8),t.qZA()()()()),2&e&&(t.Q6J("config",n.modalConfig),t.xp6(21),t.Q6J("ngForOf",n.variants))},dependencies:[p.mk,p.sg,p.O5,N.gM,R.M,p.JJ],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.sticky-top[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid!important}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#fff!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child:after{border-right:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child:before{border-left:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:before{border-top:0px}a.is-disabled[_ngcontent-%COMP%]{color:gray;cursor:default}a.is-disabled[_ngcontent-%COMP%]:hover{text-decoration:none}"]});var m=l(9300),Z=l(7579),F=l(2722),A=l(3900),v=l(9646),U=l(9568),D=l(1318);class k{constructor(e,n){this.LocalData=e,this.httpService=n}getCategoriesByTypeId(e,n){return this.LocalData.getCategoriesByChannelType(e).pipe((0,A.w)(o=>null!=o?(0,v.of)(o):this._getCategoriesByTypeID(e,n)))}_getCategoriesByTypeID(e,n){return this.httpService.post("/api/Channel/getCategoriesByTypeID",{TypeID:e,ID:n}).pipe((0,A.w)(a=>this.LocalData.saveCategoriesByChannelType(a,e)))}}k.\u0275fac=function(e){return new(e||k)(t.LFG(U.T),t.LFG(D.O))},k.\u0275prov=t.Yz7({token:k,factory:k.\u0275fac,providedIn:"root"});var J=l(6082),B=l(7185),x=l(4006),at=l(8158);function lt(i,e){if(1&i){const n=t.EpF();t.ynx(0),t.TgZ(1,"ng-select-infinite",16),t.NdJ("selectedChange",function(a){t.CHM(n);const c=t.oxw().index,s=t.oxw();return t.KtG(s.onSelectCategory(a,c))}),t.qZA(),t.BQk()}if(2&i){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("items",n.Categories)("clearable",!1)}}function rt(i,e){if(1&i&&(t.TgZ(0,"div",17),t._UZ(1,"input",18),t.qZA()),2&i){const n=t.oxw().$implicit,o=t.oxw();t.xp6(1),t.Q6J("placeholder",o.getChannelCategory(n.TypeID))}}function ct(i,e){if(1&i){const n=t.EpF();t.ynx(0),t.TgZ(1,"tr")(2,"td",9)(3,"input",10),t.NdJ("ngModelChange",function(a){const s=t.CHM(n).$implicit;return t.KtG(s.Selected=a)})("ngModelChange",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onSelectChannel())}),t.qZA()(),t.TgZ(4,"td")(5,"div",11),t._UZ(6,"img",12),t.TgZ(7,"span",13),t._uU(8),t.qZA()()(),t.TgZ(9,"td"),t.YNc(10,lt,2,2,"ng-container",14),t.YNc(11,rt,2,1,"ng-template",null,15,t.W1O),t.qZA()(),t.BQk()}if(2&i){const n=e.$implicit,o=t.MAs(12);t.xp6(3),t.Q6J("ngModel",n.Selected),t.xp6(3),t.Q6J("src",n.Img,t.LSH),t.xp6(2),t.Oqu(n.Name),t.xp6(2),t.Q6J("ngIf",n.Categories.length>0)("ngIfElse",o)}}class M{constructor(e,n,o,a,c){this.data=e,this.channelService=n,this.productService=o,this.dialogRef=a,this.toastrService=c,this.channelOptions=[],this.uploadResponse=[],this.channelType=g.x,this.enableBtnOk=!1,this.destroy$=new Z.x,this.uploadResponse=[],this.channels=this.data.channels,this.products=this.data.products,this.isMultipleProduct=e.multipleProduct}ngOnInit(){this.initModalConfig(),this.initChannelOptions(),this.initCategories()}initModalConfig(){this.modalConfig=new Y.O,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0}initCategories(){this.filterChannelTypeId().forEach(n=>{this.channelService.getCategoriesByTypeId(n.channelType,n.channelId).pipe((0,F.R)(this.destroy$)).subscribe(o=>{this.setCategoriesChannelOption(n.channelType,o)})})}setCategoriesChannelOption(e,n){this.channelOptions=this.channelOptions.map(o=>(o.TypeID==e&&(o.Categories=n),o))}initChannelOptions(){this.channelOptions=this.channels.map(e=>({Name:e.Name,Img:e.Img,ID:e.ID,Selected:!1,CategoryID:this.initDefaultChannelCategoryId(e.TypeID),TypeID:e.TypeID,Categories:[]}))}initDefaultChannelCategoryId(e){let n=0;return e===g.x.Lazada&&(n=6509),n}filterChannelTypeId(){return this.data.channels.map(n=>({channelType:n.TypeID,channelId:n.ID})).filter((n,o,a)=>a.findIndex(c=>n.channelType==c.channelType)==o).filter(n=>n.channelType==g.x.Tokopedia)}onSelectCategory(e,n){this.channelOptions[n].CategoryID=e,this.channelOptions[n].Selected=!0,this.onSelectChannel()}onSelectAllChannel(e){this.channelOptions=this.channelOptions.map(n=>(n.Selected=e,n)),this.enableBtnOk=e}onSelectChannel(){this.enableBtnOk=this.hasSelectedChannel()}hasSelectedChannel(){return-1!==this.channelOptions.findIndex(e=>e.Selected)}onClose(){this.dialogRef.close("CANCEL")}onSave(){if(!this.validateSelectedCategory())return void this.toastrService.warning("Category is required","Warning!");const e=this.channelOptions.filter(n=>n.Selected).map(n=>({CategoryID:n.CategoryID,ChannelID:n.ID}));this.submitToServer(e)}validateSelectedCategory(){return-1==this.channelOptions.filter(n=>n.Selected).filter(n=>n.TypeID==g.x.Tokopedia).findIndex(n=>0==n.CategoryID)}submitToServer(e){this.isMultipleProduct?this.uploadMultipleProduct(e):this.uploadSingleProduct(e)}uploadMultipleProduct(e){this.productService.uploadMultipleProduct(this.products,e).subscribe({next:n=>{this.dialogRef.close(n),console.log(n),this.productService.showToastrUploadMultiple(n.Message)},error:n=>{this.dialogRef.close("ERROR"),this.productService.showToastrUploadMultiple(n.error?.Message)}})}uploadSingleProduct(e){this.productService.uploadSingleProduct(this.products,e).subscribe({next:n=>{this.dialogRef.close(n),this.productService.showToastrSuccessUploadSingle(n,this.data.products[0])},error:n=>{this.dialogRef.close("ERROR"),this.productService.showToastErrorUploadSingle(n,this.data.products[0])}})}getChannelCategory(e){let n;switch(e){case g.x.ShopeeV2:n="Perlengkapan Rumah Lainnya";break;case g.x.Tiktok:n="Perlengkapan Rumah - Dekorasi Rumah - Poster & Produck Cetak";break;case g.x.WooCommerce:n="New Product";break;case g.x.Lazada:n="Fashion Accessories / Women Accessories / Others";break;default:n="Unavailable Category"}return n}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}}M.\u0275fac=function(e){return new(e||M)(t.Y36(u.WI),t.Y36(k),t.Y36(J.M),t.Y36(u.so),t.Y36(B._W))},M.\u0275cmp=t.Xpm({type:M,selectors:[["app-modal-uploadMultiple-product"]],decls:15,vars:3,consts:[[3,"dynamicValidated","config","onOk","onClose","onCancel"],["content",""],[1,"table"],[1,"text-center",2,"width","6%"],["type","checkbox",3,"change"],[2,"width","30%"],[1,"fs-6"],[2,"width","60%"],[4,"ngFor","ngForOf"],[1,"text-center"],["type","checkbox",3,"ngModel","ngModelChange"],[1,"d-flex","align-items-center"],["alt","",1,"channel-logo-size",3,"src"],[1,"ms-3","fs-6"],[4,"ngIf","ngIfElse"],["EMPTY",""],["bindValue","Key","bindLabel","Value","width","100%","parent","body","position","top","placeholder","Select Category",3,"items","clearable","selectedChange"],["matTooltip","Product Category is Harcoded, Please Change Product Category in Seller Center","matTooltipPosition","above","matTooltipClass","custom-width-tooltip"],["type","text","disabled","",1,"form-control","rounded",2,"height","40px",3,"placeholder"]],template:function(e,n){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return n.onSave()})("onClose",function(){return n.onClose()})("onCancel",function(){return n.onClose()}),t.TgZ(1,"div",1)(2,"table",2)(3,"thead")(4,"tr")(5,"th",3)(6,"input",4),t.NdJ("change",function(a){return n.onSelectAllChannel(a.target.checked)}),t.qZA()(),t.TgZ(7,"th",5)(8,"span",6),t._uU(9,"CHANNEL"),t.qZA()(),t.TgZ(10,"th",7)(11,"span",6),t._uU(12,"CATEGORY"),t.qZA()()()(),t.TgZ(13,"tbody"),t.YNc(14,ct,13,5,"ng-container",8),t.qZA()()()()),2&e&&(t.Q6J("dynamicValidated",n.enableBtnOk)("config",n.modalConfig),t.xp6(14),t.Q6J("ngForOf",n.channelOptions))},dependencies:[p.sg,p.O5,x.Wl,x.JJ,x.On,N.gM,R.M,at.R],styles:["input[type=checkbox]{width:15px;height:15px}img.channel-logo-size{width:24px;height:24px}table>thead>tr{border-top:none!important;border-left:none!important;border-right:none!important}\n"],encapsulation:2});var L=l(7481),O=l(8796),q=l(6732),X=l(6956);function st(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",11),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onOpenScanDialog())}),t._UZ(1,"i",12),t._uU(2," Scan Channel "),t.qZA()}}function dt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",13),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onScanMultipleProduct())}),t._UZ(1,"i",12),t._uU(2),t.qZA()}if(2&i){const n=t.oxw();let o;t.xp6(2),t.hij(" Scan (",null==(o=n.productService.selectedProduct(n.products))?null:o.length,") ")}}function pt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",14),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onUploadMultipleProduct())}),t._UZ(1,"i",15),t._uU(2),t.qZA()}if(2&i){const n=t.oxw();let o;t.xp6(2),t.hij(" Upload (",null==(o=n.productService.selectedProduct(n.products))?null:o.length,") ")}}function ht(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"div",16)(1,"app-product-card",17),t.NdJ("onUpload",function(){const c=t.CHM(n).$implicit,s=t.oxw();return t.KtG(s.onUploadToMultipleChannel(c))})("onScan",function(){const c=t.CHM(n).$implicit,s=t.oxw();return t.KtG(s.onScanSingleProduct(c))})("onDescEvent",function(){const c=t.CHM(n).index,s=t.oxw();return t.KtG(s.onOpenDialogVariant(c))})("onCheckBoxChange",function(a){const s=t.CHM(n).$implicit;return t.KtG(s.selected=a)}),t.qZA()()}if(2&i){const n=e.$implicit,o=t.oxw();t.xp6(1),t.Q6J("productId",n.ID)("title",null==n?null:n.Name)("image",null==n?null:n.ThumbnailUrl)("description",(null==n?null:n.Variants.length)>1?(null==n?null:n.Variants.length)+" Variants":null)("channels",o.productService.getChannelProduct(n))("code",o.getVariantCode(null==n?null:n.Variants))("showCheckBox",(null==n?null:n.Channel.length)<o.channelOptions.length)("scanButton",!0)("uploadButton",null==n?null:n.hasUpload)("imageForZoom",null==n?null:n.ImageUrl)}}function ut(i,e){1&i&&(t.ynx(0),t.TgZ(1,"div",18)(2,"div"),t._UZ(3,"i",19),t.qZA(),t.TgZ(4,"h4",20),t._uU(5,"No product found"),t.qZA(),t.TgZ(6,"h6",21),t._uU(7,"Once you have a product"),t.qZA(),t.TgZ(8,"h6",22),t._uU(9,"you`ll see them here"),t.qZA()(),t.BQk())}function gt(i,e){if(1&i){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",23)(2,"div",24)(3,"app-custom-paginator",25),t.NdJ("next",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onNextPage())})("previous",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onPrevPage())}),t.qZA()()(),t.BQk()}if(2&i){const n=t.oxw();t.xp6(3),t.Q6J("filter",n.searchFilter)("totaldata",null==n.products?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",!0)}}class V{constructor(e,n,o,a){this.http=e,this.toastr=n,this.dialog=o,this.productService=a,this.searchFilter=new P.k,this.products=[],this.rowCount=0,this.getLoaderPage()}getLoaderPage(){this.productService.LoadInPOS().subscribe(e=>{this.channelOptions=e.Options.Channel,this.Categories=e.Options.Categories,this.searchFilter.PageNumber=e.Filter.PageNumber,this.searchFilter.RowCount=e.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.Category=e.Filter.Category,this.searchFilter.PageSize=100,this.getProducts()})}getProducts(){this.http.post("/api/product/GetInPOS",{PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Category:this.searchFilter.Category}).subscribe(n=>{this.products=n.Data,this.rowCount=null==n.Total?this.searchFilter.RowCount:n.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=r.g.GuidEMpty,this.dialog.open(_.j,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe((0,m.h)(o=>r.g.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.Async=o.Async,this.scanAllProduct()})}scanAllProduct(){null!=this.searchFilter.ChannelID?this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{this.getLoaderPage();let n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(e,n,!this.searchFilter.UpdatedProduct)}}):this.toastr.error("Please Select Channel","Error")}onOpenDialogVariant(e){this.dialog.open(b,{data:{title:this.products[e].Name,variants:this.products[e].Variants},width:"800px"})}onUploadMultipleProduct(){let e=this.productService.selectedProduct(this.products),n=this.productService.filterUnselectedChannel(e,this.channelOptions);this.dialog.open(M,{width:"700px",data:{title:"Upload Multiple Product",channels:n,products:e,multipleProduct:!0}}).afterClosed().pipe((0,m.h)(o=>"CANCEL"!==o)).subscribe({next:o=>{this.getProducts()}})}onUploadToMultipleChannel(e){let n=this.productService.getChannelProduct(e);e.Channel=n;let o=this.productService.filterUnselectedChannel([e],this.channelOptions);this.dialog.open(M,{width:"700px",data:{title:`Upload - ${e.Name}`,channels:o,products:[e]}}).afterClosed().pipe((0,m.h)(a=>"CANCEL"!==a)).subscribe(a=>{this.getProducts()})}searchProduct(e){this.searchFilter.text=e,this.getProducts()}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPrevPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}onScanMultipleProduct(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=r.g.GuidEMpty;let n=this.productService.filterChannelByTypeId(this.channelOptions,[g.x.Tokopedia,g.x.Tiktok]);this.dialog.open(_.j,{data:{filter:e,channelOptions:n,isSingleChannel:!0},width:"600px"}).afterClosed().pipe((0,m.h)(a=>r.g.IsNotEmpty(a))).subscribe(a=>{this.searchFilter.ChannelID=a.ChannelID,this.searchFilter.ScanFull=a.ScanFull,this.searchFilter.UpdatedProduct=a.UpdatedProduct;let c=this.productService.selectedProduct(this.products),s=this.productService.getVariantCodesProducts(c);this.scanSingleProduct(s)})}onScanSingleProduct(e){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=r.g.GuidEMpty,this.dialog.open(_.j,{data:{filter:n,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe((0,m.h)(o=>r.g.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID;const a=this.productService.getVariantCodesProduct(e);this.scanSingleProduct(a)})}scanSingleProduct(e){this.productService.scanSingle(this.searchFilter.ChannelID,e).subscribe({next:n=>{if(n)this.toastr.success("Successfully Scan ","Success");else{let o=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${o?.Name} `,"Error")}this.searchFilter.ChannelID=r.g.GuidEMpty,n&&this.getProducts()},error:n=>{this.searchFilter.ChannelID=r.g.GuidEMpty}})}getVariantCode(e){let n;return e.length>1&&(n=(e[0].model?e[0].model:"")+e[0].Code),1==e.length&&(n=e[0].Code),n}}function mt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",13),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onOpenScanDialog())}),t._UZ(1,"i",14),t._uU(2," Scan Channel "),t.qZA()}}function _t(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",15),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onScanMultipleProduct())}),t._UZ(1,"i",14),t._uU(2),t.qZA()}if(2&i){const n=t.oxw();t.xp6(2),t.hij(" Scan (",n.productService.selectedProduct(n.products).length,") ")}}function Ct(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",16),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onUploadMultipleProduct())}),t._UZ(1,"i",17),t._uU(2),t.qZA()}if(2&i){const n=t.oxw();t.xp6(2),t.hij(" Upload (",n.productService.selectedProduct(n.products).length,") ")}}function ft(i,e){if(1&i&&(t.TgZ(0,"span",18),t._UZ(1,"img",19),t.qZA(),t._uU(2)),2&i){const n=e.item,o=t.oxw();t.xp6(1),t.Q6J("src",o.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.hij(" ",n.Name," ")}}function xt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"div")(1,"h6"),t._uU(2,"Item ID"),t.qZA(),t.TgZ(3,"input",20),t.NdJ("ngModelChange",function(a){t.CHM(n);const c=t.oxw();return t.KtG(c.searchFilter.Item_id=a)}),t.qZA()()}if(2&i){const n=t.oxw();t.xp6(3),t.Q6J("ngModel",n.searchFilter.Item_id)}}function Pt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"div",21)(1,"app-product-card",22),t.NdJ("onUpload",function(){const c=t.CHM(n).$implicit,s=t.oxw();return t.KtG(s.onUploadToMultipleChannel(c))})("onDescEvent",function(){const c=t.CHM(n).index,s=t.oxw();return t.KtG(s.onOpenVariantDetail(c))})("onScan",function(){const c=t.CHM(n).$implicit,s=t.oxw();return t.KtG(s.onScanSingleProduct(c))})("onCheckBoxChange",function(a){const s=t.CHM(n).$implicit;return t.KtG(s.selected=a)}),t.qZA()()}if(2&i){const n=e.$implicit,o=t.oxw();t.xp6(1),t.Q6J("productId",null==n?null:n.ID)("title",null==n?null:n.Name)("image",null==n?null:n.ThumbnailUrl)("description",(null==n||null==n.Variants?null:n.Variants.length)>1?(null==n||null==n.Variants?null:n.Variants.length)+" Variants":null)("channels",o.productService.getChannelProduct(n))("code",o.getVariantCode(null==n?null:n.Variants))("showCheckBox",null==n?null:n.hasScan)("scanButton",!0)("uploadButton",null==n?null:n.hasUpload)("imageForZoom",null==n?null:n.ImageUrl)}}function bt(i,e){1&i&&(t.ynx(0),t.TgZ(1,"div",23)(2,"div"),t._UZ(3,"i",24),t.qZA(),t.TgZ(4,"h4",25),t._uU(5,"No product found"),t.qZA(),t.TgZ(6,"h6",26),t._uU(7,"Once you have a product"),t.qZA(),t.TgZ(8,"h6",27),t._uU(9,"you`ll see them here"),t.qZA()(),t.BQk())}function St(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"div",28)(1,"div",29)(2,"app-custom-paginator",30),t.NdJ("total",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.getRowCount())})("next",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onNextPage())})("previous",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onPreviousPage())}),t.qZA()()()}if(2&i){const n=t.oxw();t.xp6(2),t.Q6J("filter",n.searchFilter)("totaldata",null==n.products?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}V.\u0275fac=function(e){return new(e||V)(t.Y36(D.O),t.Y36(B._W),t.Y36(u.uw),t.Y36(J.M))},V.\u0275cmp=t.Xpm({type:V,selectors:[["app-in-pos"]],decls:18,vars:10,consts:[["description","All products which is already available in POS",3,"headerTitle","onSubmit"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-2",3,"click",4,"ngIf"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","name","Name","bindValue","Name","placeholder","Select Category",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","onUpload","onScan","onDescEvent","onCheckBoxChange"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"],[1,"text-secondary","fw-normal","m-2"],[1,"text-secondary","fw-normal"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"filter","totaldata","paginationTotal","hasClicked","next","previous"]],template:function(e,n){1&e&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(a){return n.searchProduct(a)}),t.TgZ(1,"actions"),t.YNc(2,st,3,0,"button",1),t.YNc(3,dt,3,1,"button",2),t.YNc(4,pt,3,1,"button",3),t.qZA(),t.TgZ(5,"filters")(6,"div",4)(7,"div",5)(8,"div")(9,"h6"),t._uU(10,"Category "),t.qZA(),t.TgZ(11,"ng-select",6),t.NdJ("ngModelChange",function(a){return n.searchFilter.Category=a}),t.qZA()()()()(),t.TgZ(12,"content")(13,"div",7)(14,"div",8),t.YNc(15,ht,2,10,"div",9),t.YNc(16,ut,10,0,"ng-container",10),t.qZA(),t.YNc(17,gt,4,4,"ng-container",10),t.qZA()()()),2&e&&(t.Q6J("headerTitle","In POS ("+n.rowCount+")"),t.xp6(2),t.Q6J("ngIf",!n.productService.hasSelection(n.products)),t.xp6(1),t.Q6J("ngIf",n.productService.hasSelection(n.products)),t.xp6(1),t.Q6J("ngIf",n.productService.hasSelection(n.products)),t.xp6(7),t.Q6J("clearable",!0)("items",n.Categories)("ngModel",n.searchFilter.Category),t.xp6(4),t.Q6J("ngForOf",n.products),t.xp6(1),t.Q6J("ngIf",0==n.products.length),t.xp6(1),t.Q6J("ngIf",n.products.length>0))},dependencies:[p.sg,p.O5,x.JJ,x.On,L.p,O.w9,q.y,X.Y],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.img-logo[_ngcontent-%COMP%]{height:24px;width:24px}"]});class ${constructor(e,n,o,a,c){this.http=e,this.dialog=n,this.toastr=o,this.productService=a,this.activateRouter=c,this.searchFilter=new P.k,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=r.g.GuidEMpty}ngOnInit(){this.activateRouter.queryParams.subscribe(e=>{this.initPageLoader(e.ID?e.ID:r.g.GuidEMpty)})}initPageLoader(e){this.productService.loader(e).subscribe(n=>{this.channelOptions=n.Options.Channel,this.searchFilter=n.Filter,n.Filter.ChannelID!=r.g.GuidEMpty&&(this.searchFilter.ListChannelID=[],this.searchFilter.ListChannelID.push(n.Filter.ChannelID)),this.searchFilter.PageSize=n.Filter.RowCount,this.searchFilter.Item_id="",this.getProducts()})}getProducts(){this.productService.findAllSoldInChannel({ListChannelID:this.searchFilter.ListChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Item_id:this.searchFilter.Item_id}).subscribe(n=>{this.products=n.Data,this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions),this.products=this.productService.checkProductHasScanButton(this.products,this.channelOptions)})}searchProduct(e){this.searchFilter.text=e,this.hasClickRowCount=!1,this.getProducts()}onOpenVariantDetail(e){this.dialog.open(b,{data:{variants:this.products[e].Variants,title:this.products[e].Name},width:"800px"})}onOpenScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=r.g.GuidEMpty,this.dialog.open(_.j,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe((0,m.h)(o=>r.g.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.Async=o.Async,this.scanAllProduct()})}scanAllProduct(){let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).pipe((0,m.h)(n=>n)).subscribe(n=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(n,e,!this.searchFilter.UpdatedProduct),this.initPageLoader(r.g.GuidEMpty))})}onScanSingleProduct(e){e.Channel=this.productService.getChannelProduct(e);let n=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(_.j,{data:{filter:n,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe((0,m.h)(o=>r.g.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID;const a=this.productService.getVariantCodesProduct(e);this.scanProducts(a)})}onUploadToMultipleChannel(e){let n=this.productService.getChannelProduct(e);e.Channel=n;let o=this.productService.filterUnselectedChannel([e],this.channelOptions);this.dialog.open(M,{width:"700px",data:{title:`Upload - ${e.Name}`,channels:o,products:[e]}}).afterClosed().pipe((0,m.h)(a=>"CANCEL"!==a)).subscribe({next:a=>{this.getProducts()}})}onScanMultipleProduct(){let e=this.productService.filterChannelByTypeId(this.channelOptions,[g.x.Tokopedia,g.x.Tiktok]);this.searchFilter.ChannelID=r.g.GuidEMpty;let n=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(_.j,{data:{filter:n,channelOptions:e,isSingleChannel:!0},width:"600px"}).afterClosed().pipe((0,m.h)(a=>r.g.IsNotEmpty(a))).subscribe(a=>{this.searchFilter.ChannelID=a.ChannelID,this.searchFilter.ScanFull=a.ScanFull,this.searchFilter.UpdatedProduct=a.UpdatedProduct;let c=this.productService.selectedProduct(this.products),s=this.productService.getVariantCodesProducts(c);this.scanProducts(s)})}scanProducts(e){this.productService.scanSingle(this.searchFilter.ChannelID,e).subscribe({next:n=>{let o=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);n?this.toastr.success(`Product Successfully scan with ${o?.Name}`,"Success"):this.toastr.error(`This product is not existed in ${o?.Name} `,"Error"),this.searchFilter.ChannelID=r.g.GuidEMpty,n&&this.getProducts()},error:n=>{this.searchFilter.ChannelID=r.g.GuidEMpty}})}getVariantCode(e){let n;return e.length>1&&(n=(e[0].model?e[0].model:"")+e[0].Code),1==e.length&&(n=e[0].Code),n}onClearFilterChannel(){this.searchFilter.ChannelID=r.g.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProduct(){let e=this.productService.selectedProduct(this.products),n=this.productService.filterUnselectedChannel(e,this.channelOptions);this.dialog.open(M,{width:"700px",data:{title:"Upload Multiple Product",channels:n,products:e,multipleProduct:!0}}).afterClosed().pipe((0,m.h)(o=>"CANCEL"!==o)).subscribe({next:o=>{this.getProducts()}})}getRowCount(){this.http.post("/api/product/GetSoldInChannelRowCount",{ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text}).subscribe(n=>{this.hasClickRowCount=!0,this.rowCount=n.Total})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(e){return r.g.getChannelLogoByTypeId(e)}}$.\u0275fac=function(e){return new(e||$)(t.Y36(D.O),t.Y36(u.uw),t.Y36(B._W),t.Y36(J.M),t.Y36(h.gz))},$.\u0275cmp=t.Xpm({type:$,selectors:[["app-sold-in-channel"]],decls:20,vars:12,consts:[["description","SKU has been mapped between dealpos and marketplace",3,"headerTitle","onSubmit"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-2",3,"click",4,"ngIf"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","multiple","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],[4,"ngIf"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],["type","text","name","Item_id","id","Item_id",1,"form-control",3,"ngModel","ngModelChange"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","onUpload","onDescEvent","onScan","onCheckBoxChange"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"],[1,"text-secondary","fw-normal","m-2"],[1,"text-secondary","fw-normal"],[1,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(e,n){1&e&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(a){return n.searchProduct(a)}),t.TgZ(1,"actions"),t.YNc(2,mt,3,0,"button",1),t.YNc(3,_t,3,1,"button",2),t.YNc(4,Ct,3,1,"button",3),t.qZA(),t.TgZ(5,"filters")(6,"div",4)(7,"div",5)(8,"div")(9,"h6"),t._uU(10,"Channel"),t.qZA(),t.TgZ(11,"ng-select",6),t.NdJ("ngModelChange",function(a){return n.searchFilter.ListChannelID=a})("clear",function(){return n.onClearFilterChannel()}),t.YNc(12,ft,3,2,"ng-template",7),t.qZA()(),t.YNc(13,xt,4,1,"div",8),t.qZA()()(),t.TgZ(14,"content")(15,"div",9)(16,"div",10),t.YNc(17,Pt,2,10,"div",11),t.YNc(18,bt,10,0,"ng-container",8),t.qZA(),t.YNc(19,St,3,4,"div",12),t.qZA()()()),2&e&&(t.Q6J("headerTitle","Sold in Channel"),t.xp6(2),t.Q6J("ngIf",!n.productService.hasSelection(n.products)),t.xp6(1),t.Q6J("ngIf",n.productService.hasSelection(n.products)),t.xp6(1),t.Q6J("ngIf",n.productService.hasSelection(n.products)),t.xp6(7),t.Q6J("clearable",!0)("multiple",!0)("items",n.channelOptions)("ngModel",n.searchFilter.ListChannelID),t.xp6(2),t.Q6J("ngIf",null!=n.searchFilter.ListChannelID),t.xp6(4),t.Q6J("ngForOf",n.products),t.xp6(1),t.Q6J("ngIf",0==n.products.length),t.xp6(1),t.Q6J("ngIf",null==n.products?null:n.products.length))},dependencies:[p.sg,p.O5,x.Fj,x.JJ,x.On,L.p,O.w9,O.ir,q.y,X.Y],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]});var K=l(8063),vt=l(8505),yt=l(4004),Tt=l(9425),It=l(1739);function Mt(i,e){if(1&i){const n=t.EpF();t.ynx(0),t.TgZ(1,"img",29),t.NdJ("click",function(a){t.CHM(n);const c=t.oxw(3).$implicit,s=t.oxw(4);return t.KtG(s.onZoomImage(a,null==c?null:c.ImageUrl))}),t.qZA(),t.BQk()}if(2&i){const n=t.oxw(3).$implicit;t.xp6(1),t.Q6J("src",null==n?null:n.ImageUrl,t.LSH)}}function Ot(i,e){1&i&&t._UZ(0,"img",30)}function Zt(i,e){if(1&i&&(t.ynx(0),t.TgZ(1,"td",23)(2,"div",24),t.YNc(3,Mt,2,1,"ng-container",6),t.YNc(4,Ot,1,0,"ng-template",null,25,t.W1O),t.qZA()(),t.TgZ(6,"td",26)(7,"h4",27)(8,"span",28),t._uU(9),t.qZA()()(),t.BQk()),2&i){const n=t.MAs(5),o=t.oxw(2).$implicit;t.xp6(1),t.Q6J("rowSpan",null==o?null:o.Variants.length),t.xp6(2),t.Q6J("ngIf",null==o?null:o.ImageUrl)("ngIfElse",n),t.xp6(3),t.Q6J("rowSpan",null==o?null:o.Variants.length),t.xp6(2),t.Q6J("matTooltip",(null==o||null==o.Name?null:o.Name.length)>50?null==o?null:o.Name:""),t.xp6(1),t.hij(" ",null==o?null:o.Name," ")}}function wt(i,e){if(1&i&&(t.TgZ(0,"div")(1,"a",19),t._UZ(2,"img",31),t.qZA()()),2&i){const n=e.$implicit;t.xp6(1),t.Q6J("href",n.URL,t.LSH),t.xp6(1),t.Q6J("src",n.Img,t.LSH)("matTooltip",n.Name)}}function Nt(i,e){if(1&i&&(t.TgZ(0,"div"),t._UZ(1,"img",31),t.qZA()),2&i){const n=e.$implicit;t.xp6(1),t.Q6J("src",n.Img,t.LSH)("matTooltip",n.Name)}}function Ft(i,e){if(1&i&&(t.TgZ(0,"tr"),t.YNc(1,Zt,10,6,"ng-container",16),t.TgZ(2,"td"),t._uU(3),t.qZA(),t.TgZ(4,"td")(5,"span"),t._uU(6),t.qZA(),t.TgZ(7,"span",18)(8,"a",19),t._UZ(9,"i",20),t.qZA()()(),t.TgZ(10,"td",21)(11,"div",22),t.YNc(12,wt,3,3,"div",17),t.qZA()(),t.TgZ(13,"td",21)(14,"div",22),t.YNc(15,Nt,2,2,"div",17),t.qZA()()()),2&i){const n=e.$implicit,o=e.index,a=t.oxw(5);t.xp6(1),t.Q6J("ngIf",0==o),t.xp6(2),t.hij(" ",n.Name," "),t.xp6(3),t.hij(" ",n.Code," "),t.xp6(2),t.Q6J("href","https://"+a.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(null==n?null:n.ID),t.LSH),t.xp6(4),t.Q6J("ngForOf",null==n?null:n.Available),t.xp6(3),t.Q6J("ngForOf",null==n?null:n.NotAvailable)}}function At(i,e){if(1&i&&(t.ynx(0),t.YNc(1,Ft,16,6,"tr",17),t.BQk()),2&i){const n=e.$implicit;t.xp6(1),t.Q6J("ngForOf",n.Variants)}}function Ut(i,e){if(1&i&&(t.TgZ(0,"tbody"),t.YNc(1,At,2,1,"ng-container",17),t.qZA()),2&i){const n=e.ngIf;t.xp6(1),t.Q6J("ngForOf",n)}}function Dt(i,e){if(1&i&&(t.ynx(0),t.TgZ(1,"div",9)(2,"table",10)(3,"thead",11)(4,"tr")(5,"th",12),t._uU(6,"Product"),t.qZA(),t.TgZ(7,"th",13),t._uU(8,"Variant"),t.qZA(),t.TgZ(9,"th",13),t._uU(10,"SKU"),t.qZA(),t.TgZ(11,"th",14),t._uU(12,"Available In"),t.qZA(),t.TgZ(13,"th",15),t._uU(14,"Not Available In"),t.qZA()()(),t.YNc(15,Ut,2,1,"tbody",16),t.ALo(16,"async"),t.qZA()(),t.BQk()),2&i){const n=t.oxw(2);t.xp6(15),t.Q6J("ngIf",t.lcZ(16,1,n.data$))}}function kt(i,e){1&i&&(t.TgZ(0,"div",32)(1,"div"),t._UZ(2,"i",33),t.qZA(),t.TgZ(3,"h4",34),t._uU(4,"No product found"),t.qZA(),t.TgZ(5,"h6",35),t._uU(6,"Once you have a product"),t.qZA(),t.TgZ(7,"h6",36),t._uU(8,"you`ll see them here"),t.qZA()())}function Jt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"span",44),t.NdJ("click",function(){t.CHM(n);const a=t.oxw(3);return t.KtG(a.getRowCount())}),t.TgZ(1,"i",45),t._uU(2,"?"),t.qZA()()}}function Lt(i,e){if(1&i&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&i){const n=e.ngIf;t.xp6(1),t.Oqu(t.lcZ(2,1,null==n?null:n.Count))}}function Et(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"a",46),t.NdJ("click",function(){t.CHM(n);const a=t.oxw(3);return t.KtG(a.onNextPage())}),t._UZ(1,"i",47),t._uU(2," Next"),t.qZA()}}function Qt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"a",48),t.NdJ("click",function(){t.CHM(n);const a=t.oxw(3);return t.KtG(a.onLastPage())}),t._UZ(1,"i",49),t._uU(2," Last"),t.qZA()}}function Yt(i,e){if(1&i&&(t.TgZ(0,"div",37)(1,"div",38)(2,"div",39),t._uU(3),t.ALo(4,"number"),t.YNc(5,Jt,3,0,"span",40),t.YNc(6,Lt,3,3,"span",16),t.ALo(7,"async"),t._uU(8),t.qZA()(),t.TgZ(9,"div",41),t.YNc(10,Et,3,0,"a",42),t.YNc(11,Qt,3,0,"a",43),t.qZA()()),2&i){const n=e.ngIf,o=t.oxw(2);t.xp6(3),t.hij(" Showing 1 - ",t.lcZ(4,6,null==n?null:n.length)," of "),t.xp6(2),t.Q6J("ngIf",o.paginationService.hideCount),t.xp6(1),t.Q6J("ngIf",!o.paginationService.hideCount&&t.lcZ(7,8,o.rowCount$)),t.xp6(2),t.hij(" records ~ ",o.paginationService.footerPageNumber," Page "),t.xp6(2),t.Q6J("ngIf",o.paginationService.disableNextButton&&!o.paginationService.goToLastPage),t.xp6(1),t.Q6J("ngIf",o.paginationService.disableNextButton&&!o.paginationService.goToLastPage)}}function Rt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"mainpanel",1),t.NdJ("onSubmit",function(a){t.CHM(n);const c=t.oxw();return t.KtG(c.searchProduct(a))}),t.TgZ(1,"actions")(2,"button",2),t.NdJ("click",function(){const c=t.CHM(n).ngIf,s=t.oxw();return t.KtG(s.openScanDialog(c))}),t._UZ(3,"i",3),t._uU(4," Scan Channel "),t.qZA()(),t.TgZ(5,"content")(6,"div",4)(7,"div",5),t.YNc(8,Dt,17,3,"ng-container",6),t.ALo(9,"async"),t.YNc(10,kt,9,0,"ng-template",null,7,t.W1O),t.qZA(),t.YNc(12,Yt,12,10,"div",8),t.ALo(13,"async"),t.qZA()()()}if(2&i){const n=t.MAs(11),o=t.oxw();t.Q6J("hideSearchDropdown",!0),t.xp6(8),t.Q6J("ngIf",t.lcZ(9,4,o.data$).length>0)("ngIfElse",n),t.xp6(4),t.Q6J("ngIf",t.lcZ(13,6,o.data$))}}class G{constructor(e,n,o,a,c,s){this.http=e,this.dialog=n,this.toastr=o,this.productService=a,this.paginationService=c,this.biggerPictureService=s,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2"}ngOnInit(){this.initPageLoader(),this.iniData(),this.initHostName()}initHostName(){const e=localStorage.getItem("Authorization");this.hostName=JSON.parse(e)?.Host}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe((0,vt.b)(e=>{this.filterSearch=e.Filter,this.paginationService.resetToFirstPage(e.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe((0,yt.U)(e=>e.map(n=>(n.Variants=n.Variants.map(o=>(o.Available=this.productService.sortChannel(o.Available),o.NotAvailable=this.productService.sortChannel(o.NotAvailable),o.Available=this.assignLogoChannel(o.Available),o.NotAvailable=this.assignLogoChannel(o.NotAvailable),o)),n))))}assignLogoChannel(e){return e.map(n=>(n.Img=r.g.getChannelLogoByTypeId(n.TypeID),n))}searchProduct(e){this.filterSearch.text=e,this.paginationService.resetToFirstPage(this.filterSearch)}scanAllProduct(e){let n=this.productService.findChannelById(this.filterSearch.ChannelID,e.Options.Channel);this.productService.scanAll(this.filterSearch.ChannelID,this.filterSearch.ScanFull,this.filterSearch.UpdatedProduct,this.filterSearch.Async).subscribe(o=>{this.filterSearch.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(o,n,!this.filterSearch.UpdatedProduct),this.initPageLoader())})}openScanDialog(e){let n=JSON.parse(JSON.stringify(this.filterSearch));n.ChannelID=r.g.GuidEMpty,this.dialog.open(_.j,{data:{filter:n,channelOptions:e.Options.Channel},width:"600px"}).afterClosed().pipe((0,m.h)(a=>r.g.IsNotEmpty(a))).subscribe(a=>{this.filterSearch.ChannelID=a.ChannelID,this.filterSearch.ScanFull=a.ScanFull,this.filterSearch.UpdatedProduct=a.UpdatedProduct,this.filterSearch.Async=a.Async,this.scanAllProduct(e)})}getChannelLogoById(e){return r.g.getChannelLogoByTypeId(e)}getRowCount(){this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`/api/${this.rowCountAPI}`,this.filterSearch)}onNextPage(){this.paginationService.onNextPage(this.filterSearch)}onLastPage(){this.http.post(`/api/${this.rowCountAPI}`,{}).subscribe({next:e=>{this.filterSearch.PageNumber=1,this.paginationService.getAllData(this.filterSearch,e.Count)}})}onZoomImage(e,n){this.biggerPictureService.openBiggerPicture(e,n)}ngOnDestroy(){this.paginationService.destroy()}}function Bt(i,e){if(1&i&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA()()),2&i){const n=e.$implicit;t.xp6(2),t.Oqu(null==n?null:n.Name),t.xp6(2),t.Oqu(null==n?null:n.ChannelVariationSKU)}}G.\u0275fac=function(e){return new(e||G)(t.Y36(D.O),t.Y36(u.uw),t.Y36(B._W),t.Y36(J.M),t.Y36(Tt.b),t.Y36(It.k))},G.\u0275cmp=t.Xpm({type:G,selectors:[["app-not-in-channel"]],decls:2,vars:3,consts:[["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"hideSearchDropdown","onSubmit",4,"ngIf"],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"hideSearchDropdown","onSubmit"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"container-fluid","mt-3"],[1,"row"],[4,"ngIf","ngIfElse"],["EMPTY",""],["class","d-flex justify-content-between mt-5",4,"ngIf"],[1,"col-md-12"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"ms-5","text-center",2,"width","450px"],[2,"width","150px"],[2,"width","20%"],[2,"width","16%"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"ms-1"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt","external-link-custom"],[2,"padding-left","0px"],[1,"d-flex","flex-wrap","mb-1"],[1,"text-center",3,"rowSpan"],[2,"padding-right","0px"],["elsePic",""],[1,"text-start",3,"rowSpan"],[1,"ms-5","fw-normal","text-ellipsis",2,"max-width","26vw !important"],[3,"matTooltip"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"],[1,"text-secondary","fw-normal","m-2"],[1,"text-secondary","fw-normal"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(e,n){1&e&&(t.YNc(0,Rt,14,8,"mainpanel",0),t.ALo(1,"async")),2&e&&t.Q6J("ngIf",t.lcZ(1,1,n.loader$))},dependencies:[p.sg,p.O5,L.p,N.gM,p.Ov,p.JJ],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}thead[_ngcontent-%COMP%]{position:sticky;top:0}.channel-logo[_ngcontent-%COMP%]{width:20px}.w-img[_ngcontent-%COMP%]{width:100%}"]});class H{constructor(e,n){this.data=e,this.dialogRef=n}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new Y.O,this.modalConfig.title=this.data?.title,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0}}H.\u0275fac=function(e){return new(e||H)(t.Y36(u.WI),t.Y36(u.so))},H.\u0275cmp=t.Xpm({type:H,selectors:[["app-modal-variants"]],decls:11,vars:2,consts:[[3,"config","onCancel"],["content",""],[1,"table"],[1,"thead-light"],[4,"ngFor","ngForOf"]],template:function(e,n){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onCancel",function(){return n.dialogRef.close()}),t.TgZ(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th"),t._uU(6,"Variant"),t.qZA(),t.TgZ(7,"th"),t._uU(8,"SKU"),t.qZA()()(),t.TgZ(9,"tbody"),t.YNc(10,Bt,5,2,"tr",4),t.qZA()()()()),2&e&&(t.Q6J("config",n.modalConfig),t.xp6(10),t.Q6J("ngForOf",n.data.variants))},dependencies:[p.sg,R.M],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}"]});var et=l(1948);function qt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",14),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.openScanDialog())}),t._UZ(1,"i",15),t._uU(2," Scan Channel "),t.qZA()}}function Vt(i,e){if(1&i){const n=t.EpF();t.ynx(0),t.TgZ(1,"button",16),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onDownloadAllProduct("SELECTED"))}),t._UZ(2,"i",17),t._uU(3),t.qZA(),t.BQk()}if(2&i){const n=t.oxw();let o;t.xp6(3),t.hij(" Download (",null==(o=n.productService.selectedProduct(n.products))?null:o.length,") ")}}function $t(i,e){if(1&i&&(t.TgZ(0,"span",18),t._UZ(1,"img",19),t.qZA(),t._uU(2)),2&i){const n=e.item,o=t.oxw();t.xp6(1),t.Q6J("src",o.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.hij(" ",n.Name," ")}}const Kt=function(i){return[i]},Gt=function(){return[]};function Ht(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"div",20)(1,"app-product-card",21),t.NdJ("onCheckBoxChange",function(a){const s=t.CHM(n).index,an=t.oxw();return t.KtG(an.onSelectProduct(a,s))})("onDescEvent",function(){const c=t.CHM(n).index,s=t.oxw();return t.KtG(s.onShowVariantDetail(c))})("onDownload",function(){const c=t.CHM(n).$implicit,s=t.oxw();return t.KtG(s.onDownloadProduct(c))})("onScan",function(){const c=t.CHM(n).$implicit,s=t.oxw();return t.KtG(s.onScanChannel(c))}),t.qZA()()}if(2&i){const n=e.$implicit;t.xp6(1),t.Q6J("showRedirectIcon",!1)("title",null==n?null:n.Name)("image",null==n?null:n.Image)("imageForZoom",null==n?null:n.Image)("code",null==n?null:n.SKU)("description",(null==n||null==n.Variant?null:n.Variant.length)>0?(null==n||null==n.Variant?null:n.Variant.length)+" Variants":null)("downloadButton",!0)("channels",null!=n&&n.Channel?t.VKq(10,Kt,null==n?null:n.Channel):t.DdM(12,Gt))("showCheckBox",!0)("scanButton",!0)}}function jt(i,e){1&i&&(t.ynx(0),t.TgZ(1,"div",22)(2,"div"),t._UZ(3,"i",23),t.qZA(),t.TgZ(4,"h4",24),t._uU(5,"No product found"),t.qZA(),t.TgZ(6,"h6",25),t._uU(7,"Once you have a product"),t.qZA(),t.TgZ(8,"h6",26),t._uU(9,"you`ll see them here"),t.qZA()(),t.BQk())}function zt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"div",27)(1,"div",28)(2,"app-custom-paginator",29),t.NdJ("total",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.getRowCount())})("next",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onNextPage())})("previous",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onPreviousPage())}),t.qZA()()()}if(2&i){const n=t.oxw();t.xp6(2),t.Q6J("filter",n.searchFilter)("totaldata",null==n.products?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}class j{constructor(e,n,o,a,c){this.http=e,this.dialog=n,this.productService=o,this.toastrService=a,this.activateRouter=c,this.searchFilter=new P.k,this.products=[],this.hasClickRowCount=!1}ngOnInit(){this.activateRouter.queryParams.subscribe(e=>{this.initPageLoader(e.ID?e.ID:r.g.GuidEMpty)})}initPageLoader(e){this.productService.loader(e).subscribe(n=>{this.channelOptions=n.Options.Channel,this.searchFilter=n.Filter,this.searchFilter.PageSize=n.Filter.RowCount,this.getProducts()})}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",this.searchFilter).subscribe(e=>{this.products=e.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){this.products=this.products.map(e=>(e.Channel=JSON.parse(JSON.stringify(this.channelOptions.find(n=>n.ID==e.ChannelID))),e)).map(e=>(e.Channel.Url=e.Url,e))}setSkuProduct(){this.products=this.products.map(e=>(e.SKU=0==e?.Variant?.length?r.g.IsNotEmpty(e?.ChannelItemSKU)?e?.ChannelItemSKU:"SKU not assigned":e?.Variant[0]?.ChannelVariationSKU?e?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",e))}onSearch(e){this.searchFilter.text=e,this.hasClickRowCount=!1,this.getProducts()}onClearChannelFilter(){this.searchFilter.ChannelID=r.g.GuidEMpty}onScanAll(){let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(n=>{this.searchFilter.Async?this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(r.g.GuidEMpty),this.productService.successToastrScanAllProduct(n,e,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=r.g.GuidEMpty})}openScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=r.g.GuidEMpty,this.dialog.open(_.j,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe((0,m.h)(o=>r.g.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.Async=o.Async,this.onScanAll()})}onDownloadAllProduct(e){let n;n="ALL"==e?this.products:this.productService.selectedProduct(this.products),n.length>0&&this.productService.downloadMultipleProduct(n).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(e,n){this.products[n].selected=e}onDownloadProduct(e){confirm(`Are you sure you want to Retrieve product ${e?.Name} from ${e?.Channel.Name} to POS?`)&&this.productService.downloadProduct(e).subscribe({next:()=>{this.getProducts()}})}onScanChannel(e){let n=JSON.parse(JSON.stringify(e));delete n.Channel,this.productService.scanCompareToPos([n]).subscribe(o=>{o.Status?(this.initPageLoader(r.g.GuidEMpty),this.toastrService.success(`product ${e.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${e.Name} is not existed in POS`,"Error")})}onShowVariantDetail(e){let n=this.products[e].Variant;n.length>0&&this.dialog.open(H,{data:{title:this.products[e].Name,variants:n},width:"30%"})}getRowCount(){let e={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku)};this.http.post("/api/product/GetProductChannelNotPOSRowCount",e).subscribe(n=>{this.hasClickRowCount=!0,this.rowCount=n.Count})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(e){return r.g.getChannelLogoByTypeId(e)}}j.\u0275fac=function(e){return new(e||j)(t.Y36(D.O),t.Y36(u.uw),t.Y36(J.M),t.Y36(B._W),t.Y36(h.gz))},j.\u0275cmp=t.Xpm({type:j,selectors:[["app-not-in-pos"]],decls:32,vars:13,consts:[["headerTitle","Not in POS","textButton","Search","description","SKU sold in Marketplace but not exist in DEALPOS",3,"onSubmit"],["type","button","data-cy","scanNotInPos","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],[4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],["name","haveSKU",1,"form-control","h-100","pt-3","rounded",3,"ngModel","ngModelChange"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3",3,"click"],[1,"fa","fa-download"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton","onCheckBoxChange","onDescEvent","onDownload","onScan"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"],[1,"text-secondary","fw-normal","m-2"],[1,"text-secondary","fw-normal"],[1,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(e,n){1&e&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(a){return n.onSearch(a)}),t.TgZ(1,"actions"),t.YNc(2,qt,3,0,"button",1),t.YNc(3,Vt,4,1,"ng-container",2),t.qZA(),t.TgZ(4,"filters")(5,"div",3)(6,"div",4)(7,"div")(8,"h6"),t._uU(9,"Channel"),t.qZA(),t.TgZ(10,"ng-select",5),t.NdJ("ngModelChange",function(a){return n.searchFilter.ChannelID=a})("clear",function(){return n.onClearChannelFilter()}),t.YNc(11,$t,3,2,"ng-template",6),t.qZA()(),t.TgZ(12,"div")(13,"h6"),t._uU(14,"SKU Assigned"),t.qZA(),t.TgZ(15,"mat-radio-group",7),t.NdJ("ngModelChange",function(a){return n.searchFilter.HaveSku=a}),t.TgZ(16,"mat-radio-button",8),t._uU(17," All "),t.qZA(),t.TgZ(18,"mat-radio-button",8),t._uU(19," Yes "),t.qZA(),t.TgZ(20,"mat-radio-button",8),t._uU(21," No "),t.qZA()()(),t.TgZ(22,"div")(23,"h6"),t._uU(24,"Item ID"),t.qZA(),t.TgZ(25,"input",9),t.NdJ("ngModelChange",function(a){return n.searchFilter.Item_id=a}),t.qZA()()()()(),t.TgZ(26,"content")(27,"div",10)(28,"div",11),t.YNc(29,Ht,2,13,"div",12),t.YNc(30,jt,10,0,"ng-container",2),t.qZA(),t.YNc(31,zt,3,4,"div",13),t.qZA()()()),2&e&&(t.xp6(2),t.Q6J("ngIf",!n.productService.hasSelection(n.products)),t.xp6(1),t.Q6J("ngIf",n.productService.hasSelection(n.products)),t.xp6(7),t.Q6J("clearable",!0)("items",n.channelOptions)("ngModel",n.searchFilter.ChannelID),t.xp6(5),t.Q6J("ngModel",n.searchFilter.HaveSku),t.xp6(1),t.Q6J("value",0),t.xp6(2),t.Q6J("value",1),t.xp6(2),t.Q6J("value",2),t.xp6(5),t.Q6J("ngModel",n.searchFilter.Item_id),t.xp6(4),t.Q6J("ngForOf",n.products),t.xp6(1),t.Q6J("ngIf",0==n.products.length),t.xp6(1),t.Q6J("ngIf",(null==n.products?null:n.products.length)>0))},dependencies:[p.sg,p.O5,x.Fj,x.JJ,x.On,L.p,O.w9,O.ir,et.VQ,et.U0,q.y,X.Y],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.itemTitle[_ngcontent-%COMP%]{cursor:pointer}"]});var it=l(5631);function Wt(i,e){if(1&i&&(t.TgZ(0,"span",8),t._UZ(1,"img",9),t.qZA(),t._uU(2)),2&i){const n=e.item,o=t.oxw();t.xp6(1),t.Q6J("src",o.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.hij(" ",n.Name," ")}}function Xt(i,e){if(1&i&&(t.TgZ(0,"div",10),t._UZ(1,"app-duplicate-product-card",11),t.qZA()),2&i){const n=e.$implicit;t.xp6(1),t.Q6J("imageForZoom",n.ImageUrl)("title",n.Name)("code",n.Code)("image",n.ThumbnailURL)("channels",n.Channel)}}function tn(i,e){1&i&&(t.ynx(0),t.TgZ(1,"div",12)(2,"div"),t._UZ(3,"i",13),t.qZA(),t.TgZ(4,"h4",14),t._uU(5,"No product found"),t.qZA(),t.TgZ(6,"h6",15),t._uU(7,"Once you have a duplicate product"),t.qZA(),t.TgZ(8,"h6",16),t._uU(9,"you`ll see them here"),t.qZA()(),t.BQk())}function nn(i,e){if(1&i){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",17)(2,"div",18)(3,"app-custom-paginator",19),t.NdJ("next",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onNextPage())})("previous",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onPrevPage())})("total",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.getRowCount())}),t.qZA()()(),t.BQk()}if(2&i){const n=t.oxw();t.xp6(3),t.Q6J("filter",n.searchFilter)("totaldata",null==n.products?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickedRowCount)}}class z{constructor(e,n){this.httpService=e,this.productService=n,this.searchFilter=new P.k,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader()}getPageLoader(){this.productService.loader().subscribe(e=>{this.searchFilter=e.Filter,this.searchFilter.PageSize=e.Filter.RowCount,this.channelOptions=e.Options.Channel,this.getProducts()})}getProducts(){this.httpService.post("/api/product/GetDuplicateInChannel",{ChannelID:this.searchFilter.ChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text}).subscribe(n=>{this.products=n.Data})}onSearch(e){this.searchFilter.text=e,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=r.g.GuidEMpty}getChannelLogo(e){return r.g.getChannelLogoByTypeId(e)}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPrevPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getRowCount(){this.httpService.post("/api/product/GetDuplicateInChannelRowCount",{text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID}).subscribe(n=>{this.hasClickedRowCount=!0,this.rowCount=n.Total})}}z.\u0275fac=function(e){return new(e||z)(t.Y36(D.O),t.Y36(J.M))},z.\u0275cmp=t.Xpm({type:z,selectors:[["app-duplicate-sku"]],decls:14,vars:6,consts:[["headerTitle","Multiple Listed SKU","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],[1,"container-fluid"],[1,"row","mt-8","mx-1"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"imageForZoom","title","code","image","channels"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"],[1,"text-secondary","fw-normal","m-2"],[1,"text-secondary","fw-normal"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"filter","totaldata","paginationTotal","hasClicked","next","previous","total"]],template:function(e,n){1&e&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(a){return n.onSearch(a)}),t.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),t._uU(5,"Channel"),t.qZA(),t.TgZ(6,"ng-select",2),t.NdJ("ngModelChange",function(a){return n.searchFilter.ChannelID=a})("clear",function(){return n.onClearFilter()}),t.YNc(7,Wt,3,2,"ng-template",3),t.qZA()()()(),t.TgZ(8,"content")(9,"div",4)(10,"div",5),t.YNc(11,Xt,2,5,"div",6),t.YNc(12,tn,10,0,"ng-container",7),t.qZA(),t.YNc(13,nn,4,4,"ng-container",7),t.qZA()()()),2&e&&(t.xp6(6),t.Q6J("clearable",!0)("items",n.channelOptions)("ngModel",n.searchFilter.ChannelID),t.xp6(5),t.Q6J("ngForOf",n.products),t.xp6(1),t.Q6J("ngIf",0==(null==n.products?null:n.products.length)),t.xp6(1),t.Q6J("ngIf",(null==n.products?null:n.products.length)>0))},dependencies:[p.sg,p.O5,x.JJ,x.On,L.p,O.w9,O.ir,it._,q.y]});var en=l(8739);const on=[{component:f,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:V,canActivate:[K.a],data:{title:"Products in POS"}},{path:"sold-in-channel",component:$,canActivate:[K.a],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:G,canActivate:[K.a],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:j,canActivate:[K.a],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:z,canActivate:[K.a],data:{title:"Duplicate Sku in Channel"}}]}];class E{}E.\u0275fac=function(e){return new(e||E)},E.\u0275mod=t.oAB({type:E}),E.\u0275inj=t.cJS({imports:[p.ez,x.u5,L.R,N.AV,O.A0,en.TU,et.Fk,y.Z,it._,q.y,X.Y,h.Bz.forChild(on)]})},9425:(ot,w,l)=>{l.d(w,{b:()=>T});var p=l(1135),t=l(7579),y=l(2722),h=l(9300),Q=l(4351),f=l(4004),P=l(4482),_=l(5403),u=l(8421),r=l(4671),g=l(5032),S=l(3269),N=l(5026),R=l(8505),tt=l(4782),W=l(4650),nt=l(1318);class T{constructor(d){this.http=d,this.pagination$=new p.X(null),this.destroy$=new t.x,this.data$=this.paginationFunction()}onNextPage(d){d.PageNumber+=1,this.pagination$.next(d)}setPageNumberFooter(d){this.footerPageNumber=d.PageNumber}setPaginationButtonState(d,C){this.disableNextButton=0==C||!(C<d.RowCount*d.PageNumber)}resetToFirstPage(d){d.PageNumber=1,this.pagination$.next(d),this.hideCount=!0,this.goToLastPage=!1}getAllData(d,C){d.RowCount=C,this.pagination$.next(d),this.goToLastPage=!0}destroy(){this.destroy$.next(!0),this.destroy$.complete(),this.pagination$=null,this.pagination$=new p.X(null),this.data$=this.paginationFunction()}paginationFunction(){return this.pagination$.pipe((0,y.R)(this.destroy$),(0,h.h)(d=>null!=d),(0,Q.b)(d=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(d)).pipe((0,f.U)(C=>C.Data))),function Y(...I){const d=(0,S.jO)(I);return(0,P.e)((C,b)=>{const m=I.length,Z=new Array(m);let F=I.map(()=>!1),A=!1;for(let v=0;v<m;v++)(0,u.Xf)(I[v]).subscribe((0,_.x)(b,U=>{Z[v]=U,!A&&!F[v]&&(F[v]=!0,(A=F.every(r.y))&&(F=null))},g.Z));C.subscribe((0,_.x)(b,v=>{if(A){const U=[v,...Z];b.next(d?d(...U):U)}}))})}(this.pagination$),(0,N.R)((d,C)=>{const[b,m]=d,[Z]=C;return 1==m.PageNumber?[Z,m]:[b.concat(Z),m]}),(0,R.b)(([d,C])=>{this.setPageNumberFooter(C),this.setPaginationButtonState(C,d.length)}),(0,f.U)(([d])=>d),(0,tt.d)())}}T.\u0275fac=function(d){return new(d||T)(W.LFG(nt.O))},T.\u0275prov=W.Yz7({token:T,factory:T.\u0275fac,providedIn:"root"})}}]);
|