marketplacepos 3.22.0 → 3.22.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/3rdpartylicenses.txt +224 -13
- package/Marketplace/{chunk-7NE7ZI6R.js → chunk-2DQJZ4SM.js} +3 -3
- package/Marketplace/chunk-2OOIDPNY.js +1 -0
- package/Marketplace/chunk-2UKRBTWA.js +1 -0
- package/Marketplace/{chunk-UX3GY5M2.js → chunk-3QG5QJ5P.js} +1 -1
- package/Marketplace/chunk-3Y4WD5EY.js +1 -0
- package/Marketplace/{chunk-LIPM3QTO.js → chunk-44YUSAMN.js} +1 -1
- package/Marketplace/chunk-46AOM3SM.js +149 -0
- package/Marketplace/chunk-4E6A74GC.js +1 -0
- package/Marketplace/chunk-4LFFAE2I.js +1 -0
- package/Marketplace/chunk-4SAJUEHO.js +1 -0
- package/Marketplace/chunk-4YWF6TMR.js +5 -0
- package/Marketplace/{chunk-GCHJ4FTF.js → chunk-5JOW2QWK.js} +1 -1
- package/Marketplace/chunk-6DNNP4QT.js +1 -0
- package/Marketplace/chunk-6L2IXOY3.js +1 -0
- package/Marketplace/chunk-6SF7AUOH.js +1 -0
- package/Marketplace/{chunk-45PCYYJD.js → chunk-6YZFSP2B.js} +1 -1
- package/Marketplace/chunk-75I4TWVV.js +5 -0
- package/Marketplace/chunk-7AFVU7XM.js +1 -0
- package/Marketplace/chunk-ADRVUMMW.js +1 -0
- package/Marketplace/chunk-B2TH5YJH.js +1142 -0
- package/Marketplace/chunk-BO4PPSB5.js +2 -0
- package/Marketplace/chunk-BQ7NR3ET.js +1 -0
- package/Marketplace/chunk-BSN7ZAXG.js +1 -0
- package/Marketplace/chunk-CCXKODFV.js +2 -0
- package/Marketplace/{chunk-AGKVS3IQ.js → chunk-CODNZKCM.js} +1 -1
- package/Marketplace/chunk-CSSLFHG7.js +1 -0
- package/Marketplace/chunk-DR4IU4JY.js +1 -0
- package/Marketplace/chunk-E5GGIVK7.js +1 -0
- package/Marketplace/{chunk-QFU3JTYR.js → chunk-EW5A6GIY.js} +1 -1
- package/Marketplace/{chunk-PCKZD4LZ.js → chunk-FGPSBTFS.js} +1 -1
- package/Marketplace/chunk-FKYJVN2C.js +1 -0
- package/Marketplace/{chunk-UOT5GPQI.js → chunk-FMV4LYKN.js} +1 -1
- package/Marketplace/chunk-FY3BLGYI.js +1 -0
- package/Marketplace/{chunk-OUJF6YWV.js → chunk-GCKSYCMI.js} +5 -11
- package/Marketplace/chunk-GJIFVUBA.js +1 -0
- package/Marketplace/chunk-GOXRLSEL.js +1 -0
- package/Marketplace/{chunk-C2SGQUOH.js → chunk-HCDKYABV.js} +1 -1
- package/Marketplace/chunk-HHYOM3XB.js +1 -0
- package/Marketplace/chunk-HT7RB66L.js +1 -0
- package/Marketplace/chunk-HUUFOAKH.js +1 -0
- package/Marketplace/chunk-HVVW4B4W.js +1 -0
- package/Marketplace/chunk-HXJF7C6Q.js +1 -0
- package/Marketplace/chunk-I5BQWXUB.js +8 -0
- package/Marketplace/chunk-IJYSJN63.js +443 -0
- package/Marketplace/chunk-ILVEM7H5.js +1 -0
- package/Marketplace/chunk-J5D7PMX5.js +2 -0
- package/Marketplace/chunk-JHV7PQGJ.js +1 -0
- package/Marketplace/chunk-JKLGOAB3.js +2 -0
- package/Marketplace/chunk-JP44SOP7.js +13 -0
- package/Marketplace/chunk-JXTGH22T.js +1 -0
- package/Marketplace/chunk-KNWBPJ23.js +1 -0
- package/Marketplace/chunk-LI6EUEGJ.js +1 -0
- package/Marketplace/chunk-LRU7GIXZ.js +1 -0
- package/Marketplace/chunk-LZXKPCX7.js +1 -0
- package/Marketplace/chunk-MFAJDQPX.js +1 -0
- package/Marketplace/chunk-MJ6RQDI4.js +1 -0
- package/Marketplace/{chunk-ZRW4OZGG.js → chunk-MY4B7K3R.js} +1 -1
- package/Marketplace/{chunk-GDA72XOJ.js → chunk-N6IHFFFZ.js} +1 -1
- package/Marketplace/chunk-NJKWLKN6.js +1 -0
- package/Marketplace/{chunk-4NXO2JYR.js → chunk-NYDPS33K.js} +1 -1
- package/Marketplace/chunk-OCYDG646.js +1494 -0
- package/Marketplace/chunk-OKR5PVTL.js +1 -0
- package/Marketplace/chunk-OSSJKXND.js +1 -0
- package/Marketplace/chunk-OTFJUSZU.js +8 -0
- package/Marketplace/chunk-OULUJ2IO.js +189 -0
- package/Marketplace/chunk-OVEJFFL6.js +2 -0
- package/Marketplace/chunk-P674TVHC.js +1 -0
- package/Marketplace/chunk-PD4CUVAW.js +1 -0
- package/Marketplace/chunk-POGKTX46.js +1 -0
- package/Marketplace/chunk-PQDPS2ID.js +7 -0
- package/Marketplace/chunk-QN5QWB3Z.js +1 -0
- package/Marketplace/chunk-QP6O4KGV.js +1 -0
- package/Marketplace/chunk-QW4P7RSU.js +1 -0
- package/Marketplace/chunk-RDHVV7FZ.js +1 -0
- package/Marketplace/{chunk-EYZIWEGE.js → chunk-RENQ3YZH.js} +1 -1
- package/Marketplace/chunk-RGGT2KKB.js +1 -0
- package/Marketplace/chunk-RI7RZYID.js +1 -0
- package/Marketplace/chunk-T32TE7CZ.js +1 -0
- package/Marketplace/chunk-TPGBOTD4.js +1 -0
- package/Marketplace/chunk-TVRKGWQB.js +1 -0
- package/Marketplace/chunk-UMNGKENU.js +1 -0
- package/Marketplace/chunk-UN2U4YFQ.js +1 -0
- package/Marketplace/chunk-WT6W7RAQ.js +1 -0
- package/Marketplace/chunk-WTR5UFZI.js +5 -0
- package/Marketplace/chunk-X5Q6FPWS.js +315 -0
- package/Marketplace/chunk-XB345KSK.js +2 -0
- package/Marketplace/{chunk-J7V5HHYR.js → chunk-Y2T3CEPZ.js} +1 -1
- package/Marketplace/chunk-YC44HHHF.js +2 -0
- package/Marketplace/chunk-YIB7FZAQ.js +7 -0
- package/Marketplace/chunk-Z6PE5TYH.js +1 -0
- package/Marketplace/{chunk-XSYSCEVJ.js → chunk-ZRPSM5PK.js} +1 -1
- package/Marketplace/index.html +4 -4
- package/Marketplace/main-MTZIDUMD.js +1 -0
- package/Marketplace/styles-BTL6DIRV.css +1 -0
- package/package.json +1 -1
- package/Marketplace/chunk-2KEQ33LI.js +0 -1
- package/Marketplace/chunk-2LJXM62F.js +0 -1
- package/Marketplace/chunk-47XYXHGL.js +0 -1
- package/Marketplace/chunk-4AUJZEST.js +0 -1
- package/Marketplace/chunk-5SIWWKAE.js +0 -1
- package/Marketplace/chunk-5SOVI5O5.js +0 -1
- package/Marketplace/chunk-633RG6PO.js +0 -15
- package/Marketplace/chunk-732MTT44.js +0 -1
- package/Marketplace/chunk-76JMXELT.js +0 -1
- package/Marketplace/chunk-7FSQ3UC2.js +0 -1
- package/Marketplace/chunk-7IIB5DLC.js +0 -2
- package/Marketplace/chunk-7N5WLZWW.js +0 -1
- package/Marketplace/chunk-AUBPDK26.js +0 -1
- package/Marketplace/chunk-BR6MS275.js +0 -1
- package/Marketplace/chunk-DAYV52M7.js +0 -9
- package/Marketplace/chunk-DSKMV7XY.js +0 -3
- package/Marketplace/chunk-EE7O2AZI.js +0 -1
- package/Marketplace/chunk-EJSGWKV7.js +0 -1
- package/Marketplace/chunk-ENIJ4MFV.js +0 -1
- package/Marketplace/chunk-EQIBEDOW.js +0 -1
- package/Marketplace/chunk-EXBAGUW2.js +0 -1
- package/Marketplace/chunk-F57GDDSE.js +0 -14
- package/Marketplace/chunk-FSOI4J4S.js +0 -1
- package/Marketplace/chunk-HDDGFXNT.js +0 -1
- package/Marketplace/chunk-HPD77AAI.js +0 -1
- package/Marketplace/chunk-IPSL7J32.js +0 -1
- package/Marketplace/chunk-IX4CXSQC.js +0 -1
- package/Marketplace/chunk-J5DBLKIA.js +0 -1
- package/Marketplace/chunk-JCKUKK6T.js +0 -1
- package/Marketplace/chunk-JXNW3RX5.js +0 -1
- package/Marketplace/chunk-KJ4SL5OX.js +0 -1
- package/Marketplace/chunk-KTXT25SP.js +0 -1
- package/Marketplace/chunk-KZ2VDCDO.js +0 -1
- package/Marketplace/chunk-L3JD55OC.js +0 -1
- package/Marketplace/chunk-LLLHVCIO.js +0 -1
- package/Marketplace/chunk-LQWFYVLD.js +0 -2
- package/Marketplace/chunk-LZVUS3GC.js +0 -3
- package/Marketplace/chunk-M4XSRDMC.js +0 -9
- package/Marketplace/chunk-MJH2IWI2.js +0 -1
- package/Marketplace/chunk-MTS7QNYE.js +0 -2
- package/Marketplace/chunk-NBSXPQ4I.js +0 -1
- package/Marketplace/chunk-NFEAHFS5.js +0 -1
- package/Marketplace/chunk-NLZCSTVO.js +0 -5
- package/Marketplace/chunk-NSXCPHWT.js +0 -52
- package/Marketplace/chunk-O4N2CCVN.js +0 -1
- package/Marketplace/chunk-OE7XFNYO.js +0 -1
- package/Marketplace/chunk-OI3SQ5ZO.js +0 -2
- package/Marketplace/chunk-OSRAARQQ.js +0 -1
- package/Marketplace/chunk-OZ7VTHZ5.js +0 -1
- package/Marketplace/chunk-P5VJV3CP.js +0 -2
- package/Marketplace/chunk-QBQUD3A5.js +0 -1
- package/Marketplace/chunk-QNL3BTRG.js +0 -8
- package/Marketplace/chunk-QNQ5QCZX.js +0 -1
- package/Marketplace/chunk-RQCGB4NH.js +0 -9
- package/Marketplace/chunk-RVEC755T.js +0 -1
- package/Marketplace/chunk-S66L7N22.js +0 -1
- package/Marketplace/chunk-SCVHFMF7.js +0 -1
- package/Marketplace/chunk-SF4KIL5M.js +0 -5
- package/Marketplace/chunk-TU4R4DL3.js +0 -1
- package/Marketplace/chunk-UAXJ7MHW.js +0 -1
- package/Marketplace/chunk-UEB6GFG5.js +0 -1
- package/Marketplace/chunk-UNLG5KU7.js +0 -1
- package/Marketplace/chunk-WYZ5MSYA.js +0 -1
- package/Marketplace/chunk-XNRK463Z.js +0 -1
- package/Marketplace/chunk-YUBBVFFI.js +0 -1
- package/Marketplace/chunk-ZGYDC5UC.js +0 -1
- package/Marketplace/chunk-ZSZQPMV2.js +0 -1
- package/Marketplace/main-HPUDU23P.js +0 -1
- package/Marketplace/media/color-3LUHUBGQ.png +0 -0
- package/Marketplace/media/hue-RMMBQOAC.png +0 -0
- package/Marketplace/styles-RZHRYK3K.css +0 -1
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import{A as K,D as bt,H as U,O as vt,S as J,aa as St,b as ht,ba as k,ca as P,d as B,da as w,ea as wt,k as mt,t as Y,w as gt,x as yt}from"./chunk-OULUJ2IO.js";import{m as ft}from"./chunk-BSN7ZAXG.js";import{$b as lt,Bb as H,Ca as tt,Ed as G,Fa as M,Fb as C,Fd as pt,Gb as st,Ha as h,Ib as rt,Ja as et,Kb as T,Na as q,Sb as x,Tb as I,Ua as _,Ub as E,Zc as ct,bd as W,cc as at,dc as dt,fd as ut,ja as D,jb as X,ka as V,kb as it,ld as Z,pa as f,qb as nt,sb as ot,ta as v,ua as z,uc as O,va as L,vc as S,zb as g}from"./chunk-PQDPS2ID.js";import{a as y}from"./chunk-GNOSNGXM.js";var Ct=(()=>{class o extends w{name="common";static \u0275fac=(()=>{let t;return function(i){return(t||(t=h(o)))(i||o)}})();static \u0275prov=D({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),$=(()=>{class o{document=f(Z);platformId=f(_);el=f(q);injector=f(et);cd=f(ct);renderer=f(nt);config=f(wt);baseComponentStyle=f(Ct);baseStyle=f(w);scopedStyleEl;rootEl;dt;get styleOptions(){return{nonce:this.config?.csp().nonce}}get _name(){return this.constructor.name.replace(/^_/,"").toLowerCase()}get componentStyle(){return this._componentStyle}attrSelector=J("pc");_getHostInstance(t){if(t)return t?this.hostName?t.name===this.hostName?t:this._getHostInstance(t.parentInstance):t.parentInstance:void 0}_getOptionValue(t,e="",i={}){return vt(t,e,i)}ngOnInit(){this.document&&this._loadStyles()}ngAfterViewInit(){this.rootEl=this.el?.nativeElement,this.rootEl&&this.rootEl?.setAttribute(this.attrSelector,"")}ngOnChanges(t){if(this.document&&!pt(this.platformId)){let{dt:e}=t;e&&e.currentValue&&(this._loadScopedThemeStyles(e.currentValue),this._themeChangeListener(()=>this._loadScopedThemeStyles(e.currentValue)))}}ngOnDestroy(){this._unloadScopedThemeStyles()}_loadStyles(){let t=()=>{P.isStyleNameLoaded("base")||(this.baseStyle.loadCSS(this.styleOptions),P.setLoadedStyleName("base")),this._loadThemeStyles()};t(),this._themeChangeListener(()=>t())}_loadCoreStyles(){!P.isStyleNameLoaded("base")&&this._name&&(this.baseComponentStyle.loadCSS(this.styleOptions),this.componentStyle&&this.componentStyle?.loadCSS(this.styleOptions),P.setLoadedStyleName(this.componentStyle?.name))}_loadThemeStyles(){if(!k.isStyleNameLoaded("common")){let{primitive:t,semantic:e,global:i,style:s}=this.componentStyle?.getCommonTheme?.()||{};this.baseStyle.load(t?.css,y({name:"primitive-variables"},this.styleOptions)),this.baseStyle.load(e?.css,y({name:"semantic-variables"},this.styleOptions)),this.baseStyle.load(i?.css,y({name:"global-variables"},this.styleOptions)),this.baseStyle.loadTheme(y({name:"global-style"},this.styleOptions),s),k.setLoadedStyleName("common")}if(!k.isStyleNameLoaded(this.componentStyle?.name)&&this.componentStyle?.name){let{css:t,style:e}=this.componentStyle?.getComponentTheme?.()||{};this.componentStyle?.load(t,y({name:`${this.componentStyle?.name}-variables`},this.styleOptions)),this.componentStyle?.loadTheme(y({name:`${this.componentStyle?.name}-style`},this.styleOptions),e),k.setLoadedStyleName(this.componentStyle?.name)}if(!k.isStyleNameLoaded("layer-order")){let t=this.componentStyle?.getLayerOrderThemeCSS?.();this.baseStyle.load(t,y({name:"layer-order",first:!0},this.styleOptions)),k.setLoadedStyleName("layer-order")}this.dt&&(this._loadScopedThemeStyles(this.dt),this._themeChangeListener(()=>this._loadScopedThemeStyles(this.dt)))}_loadScopedThemeStyles(t){let{css:e}=this.componentStyle?.getPresetTheme?.(t,`[${this.attrSelector}]`)||{},i=this.componentStyle?.load(e,y({name:`${this.attrSelector}-${this.componentStyle?.name}`},this.styleOptions));this.scopedStyleEl=i?.el}_unloadScopedThemeStyles(){this.scopedStyleEl?.remove()}_themeChangeListener(t=()=>{}){P.clearLoadedStyleNames(),St.on("theme:change",t)}cx(t,e){let i=this.parent?this.parent.componentStyle?.classes?.[t]:this.componentStyle?.classes?.[t];return typeof i=="function"?i({instance:this}):typeof i=="string"?i:t}sx(t){let e=this.componentStyle?.inlineStyles?.[t];return typeof e=="function"?e({instance:this}):typeof e=="string"?e:y({},e)}get parent(){return this.parentInstance}static \u0275fac=function(e){return new(e||o)};static \u0275dir=L({type:o,inputs:{dt:"dt"},standalone:!0,features:[O([Ct,w]),tt]})}return o})();var Q=(()=>{class o{static zindex=1e3;static calculatedScrollbarWidth=null;static calculatedScrollbarHeight=null;static browser;static addClass(t,e){t&&e&&(t.classList?t.classList.add(e):t.className+=" "+e)}static addMultipleClasses(t,e){if(t&&e)if(t.classList){let i=e.trim().split(" ");for(let s=0;s<i.length;s++)t.classList.add(i[s])}else{let i=e.split(" ");for(let s=0;s<i.length;s++)t.className+=" "+i[s]}}static removeClass(t,e){t&&e&&(t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," "))}static removeMultipleClasses(t,e){t&&e&&[e].flat().filter(Boolean).forEach(i=>i.split(" ").forEach(s=>this.removeClass(t,s)))}static hasClass(t,e){return t&&e?t.classList?t.classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(t.className):!1}static siblings(t){return Array.prototype.filter.call(t.parentNode.children,function(e){return e!==t})}static find(t,e){return Array.from(t.querySelectorAll(e))}static findSingle(t,e){return this.isElement(t)?t.querySelector(e):null}static index(t){let e=t.parentNode.childNodes,i=0;for(var s=0;s<e.length;s++){if(e[s]==t)return i;e[s].nodeType==1&&i++}return-1}static indexWithinGroup(t,e){let i=t.parentNode?t.parentNode.childNodes:[],s=0;for(var r=0;r<i.length;r++){if(i[r]==t)return s;i[r].attributes&&i[r].attributes[e]&&i[r].nodeType==1&&s++}return-1}static appendOverlay(t,e,i="self"){i!=="self"&&t&&e&&this.appendChild(t,e)}static alignOverlay(t,e,i="self",s=!0){t&&e&&(s&&(t.style.minWidth=`${o.getOuterWidth(e)}px`),i==="self"?this.relativePosition(t,e):this.absolutePosition(t,e))}static relativePosition(t,e,i=!0){let s=R=>{if(R)return getComputedStyle(R).getPropertyValue("position")==="relative"?R:s(R.parentElement)},r=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:this.getHiddenElementDimensions(t),l=e.offsetHeight,a=e.getBoundingClientRect(),u=this.getWindowScrollTop(),d=this.getWindowScrollLeft(),c=this.getViewport(),m=s(t)?.getBoundingClientRect()||{top:-1*u,left:-1*d},b,F;a.top+l+r.height>c.height?(b=a.top-m.top-r.height,t.style.transformOrigin="bottom",a.top+b<0&&(b=-1*a.top)):(b=l+a.top-m.top,t.style.transformOrigin="top");let j=a.left+r.width-c.width,Mt=a.left-m.left;r.width>c.width?F=(a.left-m.left)*-1:j>0?F=Mt-j:F=a.left-m.left,t.style.top=b+"px",t.style.left=F+"px",i&&(t.style.marginTop=origin==="bottom"?"calc(var(--p-anchor-gutter) * -1)":"calc(var(--p-anchor-gutter))")}static absolutePosition(t,e,i=!0){let s=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:this.getHiddenElementDimensions(t),r=s.height,l=s.width,a=e.offsetHeight,u=e.offsetWidth,d=e.getBoundingClientRect(),c=this.getWindowScrollTop(),p=this.getWindowScrollLeft(),m=this.getViewport(),b,F;d.top+a+r>m.height?(b=d.top+c-r,t.style.transformOrigin="bottom",b<0&&(b=c)):(b=a+d.top+c,t.style.transformOrigin="top"),d.left+l>m.width?F=Math.max(0,d.left+p+u-l):F=d.left+p,t.style.top=b+"px",t.style.left=F+"px",i&&(t.style.marginTop=origin==="bottom"?"calc(var(--p-anchor-gutter) * -1)":"calc(var(--p-anchor-gutter))")}static getParents(t,e=[]){return t.parentNode===null?e:this.getParents(t.parentNode,e.concat([t.parentNode]))}static getScrollableParents(t){let e=[];if(t){let i=this.getParents(t),s=/(auto|scroll)/,r=l=>{let a=window.getComputedStyle(l,null);return s.test(a.getPropertyValue("overflow"))||s.test(a.getPropertyValue("overflowX"))||s.test(a.getPropertyValue("overflowY"))};for(let l of i){let a=l.nodeType===1&&l.dataset.scrollselectors;if(a){let u=a.split(",");for(let d of u){let c=this.findSingle(l,d);c&&r(c)&&e.push(c)}}l.nodeType!==9&&r(l)&&e.push(l)}}return e}static getHiddenElementOuterHeight(t){t.style.visibility="hidden",t.style.display="block";let e=t.offsetHeight;return t.style.display="none",t.style.visibility="visible",e}static getHiddenElementOuterWidth(t){t.style.visibility="hidden",t.style.display="block";let e=t.offsetWidth;return t.style.display="none",t.style.visibility="visible",e}static getHiddenElementDimensions(t){let e={};return t.style.visibility="hidden",t.style.display="block",e.width=t.offsetWidth,e.height=t.offsetHeight,t.style.display="none",t.style.visibility="visible",e}static scrollInView(t,e){let i=getComputedStyle(t).getPropertyValue("borderTopWidth"),s=i?parseFloat(i):0,r=getComputedStyle(t).getPropertyValue("paddingTop"),l=r?parseFloat(r):0,a=t.getBoundingClientRect(),d=e.getBoundingClientRect().top+document.body.scrollTop-(a.top+document.body.scrollTop)-s-l,c=t.scrollTop,p=t.clientHeight,m=this.getOuterHeight(e);d<0?t.scrollTop=c+d:d+m>p&&(t.scrollTop=c+d-p+m)}static fadeIn(t,e){t.style.opacity=0;let i=+new Date,s=0,r=function(){s=+t.style.opacity.replace(",",".")+(new Date().getTime()-i)/e,t.style.opacity=s,i=+new Date,+s<1&&(window.requestAnimationFrame&&requestAnimationFrame(r)||setTimeout(r,16))};r()}static fadeOut(t,e){var i=1,s=50,r=e,l=s/r;let a=setInterval(()=>{i=i-l,i<=0&&(i=0,clearInterval(a)),t.style.opacity=i},s)}static getWindowScrollTop(){let t=document.documentElement;return(window.pageYOffset||t.scrollTop)-(t.clientTop||0)}static getWindowScrollLeft(){let t=document.documentElement;return(window.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}static matches(t,e){var i=Element.prototype,s=i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||function(r){return[].indexOf.call(document.querySelectorAll(r),this)!==-1};return s.call(t,e)}static getOuterWidth(t,e){let i=t.offsetWidth;if(e){let s=getComputedStyle(t);i+=parseFloat(s.marginLeft)+parseFloat(s.marginRight)}return i}static getHorizontalPadding(t){let e=getComputedStyle(t);return parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)}static getHorizontalMargin(t){let e=getComputedStyle(t);return parseFloat(e.marginLeft)+parseFloat(e.marginRight)}static innerWidth(t){let e=t.offsetWidth,i=getComputedStyle(t);return e+=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),e}static width(t){let e=t.offsetWidth,i=getComputedStyle(t);return e-=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),e}static getInnerHeight(t){let e=t.offsetHeight,i=getComputedStyle(t);return e+=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),e}static getOuterHeight(t,e){let i=t.offsetHeight;if(e){let s=getComputedStyle(t);i+=parseFloat(s.marginTop)+parseFloat(s.marginBottom)}return i}static getHeight(t){let e=t.offsetHeight,i=getComputedStyle(t);return e-=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom)+parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth),e}static getWidth(t){let e=t.offsetWidth,i=getComputedStyle(t);return e-=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight)+parseFloat(i.borderLeftWidth)+parseFloat(i.borderRightWidth),e}static getViewport(){let t=window,e=document,i=e.documentElement,s=e.getElementsByTagName("body")[0],r=t.innerWidth||i.clientWidth||s.clientWidth,l=t.innerHeight||i.clientHeight||s.clientHeight;return{width:r,height:l}}static getOffset(t){var e=t.getBoundingClientRect();return{top:e.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:e.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}static replaceElementWith(t,e){let i=t.parentNode;if(!i)throw"Can't replace element";return i.replaceChild(e,t)}static getUserAgent(){if(navigator&&this.isClient())return navigator.userAgent}static isIE(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return!0;var i=t.indexOf("Trident/");if(i>0){var s=t.indexOf("rv:");return!0}var r=t.indexOf("Edge/");return r>0}static isIOS(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}static isAndroid(){return/(android)/i.test(navigator.userAgent)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}static appendChild(t,e){if(this.isElement(e))e.appendChild(t);else if(e&&e.el&&e.el.nativeElement)e.el.nativeElement.appendChild(t);else throw"Cannot append "+e+" to "+t}static removeChild(t,e){if(this.isElement(e))e.removeChild(t);else if(e.el&&e.el.nativeElement)e.el.nativeElement.removeChild(t);else throw"Cannot remove "+t+" from "+e}static removeElement(t){"remove"in Element.prototype?t.remove():t.parentNode.removeChild(t)}static isElement(t){return typeof HTMLElement=="object"?t instanceof HTMLElement:t&&typeof t=="object"&&t!==null&&t.nodeType===1&&typeof t.nodeName=="string"}static calculateScrollbarWidth(t){if(t){let e=getComputedStyle(t);return t.offsetWidth-t.clientWidth-parseFloat(e.borderLeftWidth)-parseFloat(e.borderRightWidth)}else{if(this.calculatedScrollbarWidth!==null)return this.calculatedScrollbarWidth;let e=document.createElement("div");e.className="p-scrollbar-measure",document.body.appendChild(e);let i=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),this.calculatedScrollbarWidth=i,i}}static calculateScrollbarHeight(){if(this.calculatedScrollbarHeight!==null)return this.calculatedScrollbarHeight;let t=document.createElement("div");t.className="p-scrollbar-measure",document.body.appendChild(t);let e=t.offsetHeight-t.clientHeight;return document.body.removeChild(t),this.calculatedScrollbarWidth=e,e}static invokeElementMethod(t,e,i){t[e].apply(t,i)}static clearSelection(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch{}}static getBrowser(){if(!this.browser){let t=this.resolveUserAgent();this.browser={},t.browser&&(this.browser[t.browser]=!0,this.browser.version=t.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}static resolveUserAgent(){let t=navigator.userAgent.toLowerCase(),e=/(chrome)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[];return{browser:e[1]||"",version:e[2]||"0"}}static isInteger(t){return Number.isInteger?Number.isInteger(t):typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}static isHidden(t){return!t||t.offsetParent===null}static isVisible(t){return t&&t.offsetParent!=null}static isExist(t){return t!==null&&typeof t<"u"&&t.nodeName&&t.parentNode}static focus(t,e){t&&document.activeElement!==t&&t.focus(e)}static getFocusableSelectorString(t=""){return`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
|
2
|
+
[href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
|
3
|
+
input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
|
4
|
+
select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
|
5
|
+
textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
|
6
|
+
[tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
|
7
|
+
[contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
|
8
|
+
.p-inputtext:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
|
9
|
+
.p-button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t}`}static getFocusableElements(t,e=""){let i=this.find(t,this.getFocusableSelectorString(e)),s=[];for(let r of i){let l=getComputedStyle(r);this.isVisible(r)&&l.display!="none"&&l.visibility!="hidden"&&s.push(r)}return s}static getFocusableElement(t,e=""){let i=this.findSingle(t,this.getFocusableSelectorString(e));if(i){let s=getComputedStyle(i);if(this.isVisible(i)&&s.display!="none"&&s.visibility!="hidden")return i}return null}static getFirstFocusableElement(t,e=""){let i=this.getFocusableElements(t,e);return i.length>0?i[0]:null}static getLastFocusableElement(t,e){let i=this.getFocusableElements(t,e);return i.length>0?i[i.length-1]:null}static getNextFocusableElement(t,e=!1){let i=o.getFocusableElements(t),s=0;if(i&&i.length>0){let r=i.indexOf(i[0].ownerDocument.activeElement);e?r==-1||r===0?s=i.length-1:s=r-1:r!=-1&&r!==i.length-1&&(s=r+1)}return i[s]}static generateZIndex(){return this.zindex=this.zindex||999,++this.zindex}static getSelection(){return window.getSelection?window.getSelection().toString():document.getSelection?document.getSelection().toString():document.selection?document.selection.createRange().text:null}static getTargetElement(t,e){if(!t)return null;switch(t){case"document":return document;case"window":return window;case"@next":return e?.nextElementSibling;case"@prev":return e?.previousElementSibling;case"@parent":return e?.parentElement;case"@grandparent":return e?.parentElement.parentElement;default:let i=typeof t;if(i==="string")return document.querySelector(t);if(i==="object"&&t.hasOwnProperty("nativeElement"))return this.isExist(t.nativeElement)?t.nativeElement:void 0;let r=(l=>!!(l&&l.constructor&&l.call&&l.apply))(t)?t():t;return r&&r.nodeType===9||this.isExist(r)?r:null}}static isClient(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}static getAttribute(t,e){if(t){let i=t.getAttribute(e);return isNaN(i)?i==="true"||i==="false"?i==="true":i:+i}}static calculateBodyScrollbarWidth(){return window.innerWidth-document.documentElement.offsetWidth}static blockBodyScroll(t="p-overflow-hidden"){document.body.style.setProperty("--scrollbar-width",this.calculateBodyScrollbarWidth()+"px"),this.addClass(document.body,t)}static unblockBodyScroll(t="p-overflow-hidden"){document.body.style.removeProperty("--scrollbar-width"),this.removeClass(document.body,t)}static createElement(t,e={},...i){if(t){let s=document.createElement(t);return this.setAttributes(s,e),s.append(...i),s}}static setAttribute(t,e="",i){this.isElement(t)&&i!==null&&i!==void 0&&t.setAttribute(e,i)}static setAttributes(t,e={}){if(this.isElement(t)){let i=(s,r)=>{let l=t?.$attrs?.[s]?[t?.$attrs?.[s]]:[];return[r].flat().reduce((a,u)=>{if(u!=null){let d=typeof u;if(d==="string"||d==="number")a.push(u);else if(d==="object"){let c=Array.isArray(u)?i(s,u):Object.entries(u).map(([p,m])=>s==="style"&&(m||m===0)?`${p.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${m}`:m?p:void 0);a=c.length?a.concat(c.filter(p=>!!p)):a}}return a},l)};Object.entries(e).forEach(([s,r])=>{if(r!=null){let l=s.match(/^on(.+)/);l?t.addEventListener(l[1].toLowerCase(),r):s==="pBind"?this.setAttributes(t,r):(r=s==="class"?[...new Set(i("class",r))].join(" ").trim():s==="style"?i("style",r).join(";").trim():r,(t.$attrs=t.$attrs||{})&&(t.$attrs[s]=r),t.setAttribute(s,r))}})}}static isFocusableElement(t,e=""){return this.isElement(t)?t.matches(`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e},
|
|
10
|
+
[href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e},
|
|
11
|
+
input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e},
|
|
12
|
+
select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e},
|
|
13
|
+
textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e},
|
|
14
|
+
[tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e},
|
|
15
|
+
[contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}`):!1}}return o})(),xt=class{element;listener;scrollableParents;constructor(n,t=()=>{}){this.element=n,this.listener=t}bindScrollListener(){this.scrollableParents=Q.getScrollableParents(this.element);for(let n=0;n<this.scrollableParents.length;n++)this.scrollableParents[n].addEventListener("scroll",this.listener)}unbindScrollListener(){if(this.scrollableParents)for(let n=0;n<this.scrollableParents.length;n++)this.scrollableParents[n].removeEventListener("scroll",this.listener)}destroy(){this.unbindScrollListener(),this.element=null,this.listener=null,this.scrollableParents=null}};var ne=(()=>{class o extends ${autofocus=!1;_autofocus=!1;focused=!1;platformId=f(_);document=f(Z);host=f(q);ngAfterContentChecked(){this.autofocus===!1?this.host.nativeElement.removeAttribute("autofocus"):this.host.nativeElement.setAttribute("autofocus",!0),this.focused||this.autoFocus()}ngAfterViewChecked(){this.focused||this.autoFocus()}autoFocus(){G(this.platformId)&&this._autofocus&&setTimeout(()=>{let t=Q.getFocusableElements(this.host?.nativeElement);t.length===0&&this.host.nativeElement.focus(),t.length>0&&t[0].focus(),this.focused=!0})}static \u0275fac=(()=>{let t;return function(i){return(t||(t=h(o)))(i||o)}})();static \u0275dir=L({type:o,selectors:[["","pAutoFocus",""]],inputs:{autofocus:[2,"autofocus","autofocus",W],_autofocus:[0,"pAutoFocus","_autofocus"]},standalone:!0,features:[H,g]})}return o})();var Tt=`
|
|
16
|
+
.p-icon {
|
|
17
|
+
display: inline-block;
|
|
18
|
+
vertical-align: baseline;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.p-icon-spin {
|
|
22
|
+
-webkit-animation: p-icon-spin 2s infinite linear;
|
|
23
|
+
animation: p-icon-spin 2s infinite linear;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@-webkit-keyframes p-icon-spin {
|
|
27
|
+
0% {
|
|
28
|
+
-webkit-transform: rotate(0deg);
|
|
29
|
+
transform: rotate(0deg);
|
|
30
|
+
}
|
|
31
|
+
100% {
|
|
32
|
+
-webkit-transform: rotate(359deg);
|
|
33
|
+
transform: rotate(359deg);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@keyframes p-icon-spin {
|
|
38
|
+
0% {
|
|
39
|
+
-webkit-transform: rotate(0deg);
|
|
40
|
+
transform: rotate(0deg);
|
|
41
|
+
}
|
|
42
|
+
100% {
|
|
43
|
+
-webkit-transform: rotate(359deg);
|
|
44
|
+
transform: rotate(359deg);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
`,Ot=(()=>{class o extends w{name="baseicon";inlineStyles=Tt;static \u0275fac=(()=>{let t;return function(i){return(t||(t=h(o)))(i||o)}})();static \u0275prov=D({token:o,factory:o.\u0275fac})}return o})();var At=["*"],N=(()=>{class o extends ${label;spin=!1;styleClass;role;ariaLabel;ariaHidden;ngOnInit(){super.ngOnInit(),this.getAttributes()}getAttributes(){let t=U(this.label);this.role=t?void 0:"img",this.ariaLabel=t?void 0:this.label,this.ariaHidden=t}getClassNames(){return`p-icon ${this.styleClass?this.styleClass+" ":""}${this.spin?"p-icon-spin":""}`}static \u0275fac=(()=>{let t;return function(i){return(t||(t=h(o)))(i||o)}})();static \u0275cmp=v({type:o,selectors:[["ng-component"]],hostAttrs:[1,"p-component","p-iconwrapper"],inputs:{label:"label",spin:[2,"spin","spin",W],styleClass:"styleClass"},standalone:!0,features:[O([Ot]),H,g,S],ngContentSelectors:At,decls:1,vars:0,template:function(e,i){e&1&&(at(),dt(0))},encapsulation:2,changeDetection:0})}return o})();var ge=(()=>{class o extends N{static \u0275fac=(()=>{let t;return function(i){return(t||(t=h(o)))(i||o)}})();static \u0275cmp=v({type:o,selectors:[["ChevronDownIcon"]],standalone:!0,features:[g,S],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M7.01744 10.398C6.91269 10.3985 6.8089 10.378 6.71215 10.3379C6.61541 10.2977 6.52766 10.2386 6.45405 10.1641L1.13907 4.84913C1.03306 4.69404 0.985221 4.5065 1.00399 4.31958C1.02276 4.13266 1.10693 3.95838 1.24166 3.82747C1.37639 3.69655 1.55301 3.61742 1.74039 3.60402C1.92777 3.59062 2.11386 3.64382 2.26584 3.75424L7.01744 8.47394L11.769 3.75424C11.9189 3.65709 12.097 3.61306 12.2748 3.62921C12.4527 3.64535 12.6199 3.72073 12.7498 3.84328C12.8797 3.96582 12.9647 4.12842 12.9912 4.30502C13.0177 4.48162 12.9841 4.662 12.8958 4.81724L7.58083 10.1322C7.50996 10.2125 7.42344 10.2775 7.32656 10.3232C7.22968 10.3689 7.12449 10.3944 7.01744 10.398Z","fill","currentColor"]],template:function(e,i){e&1&&(M(),x(0,"svg",0),E(1,"path",1),I()),e&2&&(T(i.getClassNames()),C("aria-label",i.ariaLabel)("aria-hidden",i.ariaHidden)("role",i.role))},encapsulation:2})}return o})();var Se=(()=>{class o extends N{pathId;ngOnInit(){this.pathId="url(#"+J()+")"}static \u0275fac=(()=>{let t;return function(i){return(t||(t=h(o)))(i||o)}})();static \u0275cmp=v({type:o,selectors:[["SpinnerIcon"]],standalone:!0,features:[g,S],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M6.99701 14C5.85441 13.999 4.72939 13.7186 3.72012 13.1832C2.71084 12.6478 1.84795 11.8737 1.20673 10.9284C0.565504 9.98305 0.165424 8.89526 0.041387 7.75989C-0.0826496 6.62453 0.073125 5.47607 0.495122 4.4147C0.917119 3.35333 1.59252 2.4113 2.46241 1.67077C3.33229 0.930247 4.37024 0.413729 5.4857 0.166275C6.60117 -0.0811796 7.76026 -0.0520535 8.86188 0.251112C9.9635 0.554278 10.9742 1.12227 11.8057 1.90555C11.915 2.01493 11.9764 2.16319 11.9764 2.31778C11.9764 2.47236 11.915 2.62062 11.8057 2.73C11.7521 2.78503 11.688 2.82877 11.6171 2.85864C11.5463 2.8885 11.4702 2.90389 11.3933 2.90389C11.3165 2.90389 11.2404 2.8885 11.1695 2.85864C11.0987 2.82877 11.0346 2.78503 10.9809 2.73C9.9998 1.81273 8.73246 1.26138 7.39226 1.16876C6.05206 1.07615 4.72086 1.44794 3.62279 2.22152C2.52471 2.99511 1.72683 4.12325 1.36345 5.41602C1.00008 6.70879 1.09342 8.08723 1.62775 9.31926C2.16209 10.5513 3.10478 11.5617 4.29713 12.1803C5.48947 12.7989 6.85865 12.988 8.17414 12.7157C9.48963 12.4435 10.6711 11.7264 11.5196 10.6854C12.3681 9.64432 12.8319 8.34282 12.8328 7C12.8328 6.84529 12.8943 6.69692 13.0038 6.58752C13.1132 6.47812 13.2616 6.41667 13.4164 6.41667C13.5712 6.41667 13.7196 6.47812 13.8291 6.58752C13.9385 6.69692 14 6.84529 14 7C14 8.85651 13.2622 10.637 11.9489 11.9497C10.6356 13.2625 8.85432 14 6.99701 14Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(e,i){e&1&&(M(),x(0,"svg",0)(1,"g"),E(2,"path",1),I(),x(3,"defs")(4,"clipPath",2),E(5,"rect",3),I()()()),e&2&&(T(i.getClassNames()),C("aria-label",i.ariaLabel)("aria-hidden",i.ariaHidden)("role",i.role),X(),C("clip-path",i.pathId),X(3),st("id",i.pathId))},encapsulation:2})}return o})();var xe=(()=>{class o extends N{static \u0275fac=(()=>{let t;return function(i){return(t||(t=h(o)))(i||o)}})();static \u0275cmp=v({type:o,selectors:[["TimesIcon"]],standalone:!0,features:[g,S],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M8.01186 7.00933L12.27 2.75116C12.341 2.68501 12.398 2.60524 12.4375 2.51661C12.4769 2.42798 12.4982 2.3323 12.4999 2.23529C12.5016 2.13827 12.4838 2.0419 12.4474 1.95194C12.4111 1.86197 12.357 1.78024 12.2884 1.71163C12.2198 1.64302 12.138 1.58893 12.0481 1.55259C11.9581 1.51625 11.8617 1.4984 11.7647 1.50011C11.6677 1.50182 11.572 1.52306 11.4834 1.56255C11.3948 1.60204 11.315 1.65898 11.2488 1.72997L6.99067 5.98814L2.7325 1.72997C2.59553 1.60234 2.41437 1.53286 2.22718 1.53616C2.03999 1.53946 1.8614 1.61529 1.72901 1.74767C1.59663 1.88006 1.5208 2.05865 1.5175 2.24584C1.5142 2.43303 1.58368 2.61419 1.71131 2.75116L5.96948 7.00933L1.71131 11.2675C1.576 11.403 1.5 11.5866 1.5 11.7781C1.5 11.9696 1.576 12.1532 1.71131 12.2887C1.84679 12.424 2.03043 12.5 2.2219 12.5C2.41338 12.5 2.59702 12.424 2.7325 12.2887L6.99067 8.03052L11.2488 12.2887C11.3843 12.424 11.568 12.5 11.7594 12.5C11.9509 12.5 12.1346 12.424 12.27 12.2887C12.4053 12.1532 12.4813 11.9696 12.4813 11.7781C12.4813 11.5866 12.4053 11.403 12.27 11.2675L8.01186 7.00933Z","fill","currentColor"]],template:function(e,i){e&1&&(M(),x(0,"svg",0),E(1,"path",1),I()),e&2&&(T(i.getClassNames()),C("aria-label",i.ariaLabel)("aria-hidden",i.ariaHidden)("role",i.role))},encapsulation:2})}return o})();var Et=class o{static isArray(n,t=!0){return Array.isArray(n)&&(t||n.length!==0)}static isObject(n,t=!0){return typeof n=="object"&&!Array.isArray(n)&&n!=null&&(t||Object.keys(n).length!==0)}static equals(n,t,e){return e?this.resolveFieldData(n,e)===this.resolveFieldData(t,e):this.equalsByValue(n,t)}static equalsByValue(n,t){if(n===t)return!0;if(n&&t&&typeof n=="object"&&typeof t=="object"){var e=Array.isArray(n),i=Array.isArray(t),s,r,l;if(e&&i){if(r=n.length,r!=t.length)return!1;for(s=r;s--!==0;)if(!this.equalsByValue(n[s],t[s]))return!1;return!0}if(e!=i)return!1;var a=this.isDate(n),u=this.isDate(t);if(a!=u)return!1;if(a&&u)return n.getTime()==t.getTime();var d=n instanceof RegExp,c=t instanceof RegExp;if(d!=c)return!1;if(d&&c)return n.toString()==t.toString();var p=Object.keys(n);if(r=p.length,r!==Object.keys(t).length)return!1;for(s=r;s--!==0;)if(!Object.prototype.hasOwnProperty.call(t,p[s]))return!1;for(s=r;s--!==0;)if(l=p[s],!this.equalsByValue(n[l],t[l]))return!1;return!0}return n!==n&&t!==t}static resolveFieldData(n,t){if(n&&t){if(this.isFunction(t))return t(n);if(t.indexOf(".")==-1)return n[t];{let e=t.split("."),i=n;for(let s=0,r=e.length;s<r;++s){if(i==null)return null;i=i[e[s]]}return i}}else return null}static isFunction(n){return!!(n&&n.constructor&&n.call&&n.apply)}static reorderArray(n,t,e){let i;n&&t!==e&&(e>=n.length&&(e%=n.length,t%=n.length),n.splice(e,0,n.splice(t,1)[0]))}static insertIntoOrderedArray(n,t,e,i){if(e.length>0){let s=!1;for(let r=0;r<e.length;r++)if(this.findIndexInList(e[r],i)>t){e.splice(r,0,n),s=!0;break}s||e.push(n)}else e.push(n)}static findIndexInList(n,t){let e=-1;if(t){for(let i=0;i<t.length;i++)if(t[i]==n){e=i;break}}return e}static contains(n,t){if(n!=null&&t&&t.length){for(let e of t)if(this.equals(n,e))return!0}return!1}static removeAccents(n){return n&&(n=n.normalize("NFKD").replace(new RegExp("\\p{Diacritic}","gu"),"")),n}static isDate(n){return Object.prototype.toString.call(n)==="[object Date]"}static isEmpty(n){return n==null||n===""||Array.isArray(n)&&n.length===0||!this.isDate(n)&&typeof n=="object"&&Object.keys(n).length===0}static isNotEmpty(n){return!this.isEmpty(n)}static compare(n,t,e,i=1){let s=-1,r=this.isEmpty(n),l=this.isEmpty(t);return r&&l?s=0:r?s=i:l?s=-i:typeof n=="string"&&typeof t=="string"?s=n.localeCompare(t,e,{numeric:!0}):s=n<t?-1:n>t?1:0,s}static sort(n,t,e=1,i,s=1){let r=o.compare(n,t,i,e),l=e;return(o.isEmpty(n)||o.isEmpty(t))&&(l=s===1?e:s),l*r}static merge(n,t){if(!(n==null&&t==null)){{if((n==null||typeof n=="object")&&(t==null||typeof t=="object"))return y(y({},n||{}),t||{});if((n==null||typeof n=="string")&&(t==null||typeof t=="string"))return[n||"",t||""].join(" ")}return t||n}}static isPrintableCharacter(n=""){return this.isNotEmpty(n)&&n.length===1&&n.match(/\S| /)}static getItemValue(n,...t){return this.isFunction(n)?n(...t):n}static findLastIndex(n,t){let e=-1;if(this.isNotEmpty(n))try{e=n.findLastIndex(t)}catch{e=n.lastIndexOf([...n].reverse().find(t))}return e}static findLast(n,t){let e;if(this.isNotEmpty(n))try{e=n.findLast(t)}catch{e=[...n].reverse().find(t)}return e}static deepEquals(n,t){if(n===t)return!0;if(n&&t&&typeof n=="object"&&typeof t=="object"){var e=Array.isArray(n),i=Array.isArray(t),s,r,l;if(e&&i){if(r=n.length,r!=t.length)return!1;for(s=r;s--!==0;)if(!this.deepEquals(n[s],t[s]))return!1;return!0}if(e!=i)return!1;var a=n instanceof Date,u=t instanceof Date;if(a!=u)return!1;if(a&&u)return n.getTime()==t.getTime();var d=n instanceof RegExp,c=t instanceof RegExp;if(d!=c)return!1;if(d&&c)return n.toString()==t.toString();var p=Object.keys(n);if(r=p.length,r!==Object.keys(t).length)return!1;for(s=r;s--!==0;)if(!Object.prototype.hasOwnProperty.call(t,p[s]))return!1;for(s=r;s--!==0;)if(l=p[s],!this.deepEquals(n[l],t[l]))return!1;return!0}return n!==n&&t!==t}static minifyCSS(n){return n&&n.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,"").replace(/ {2,}/g," ").replace(/ ([{:}]) /g,"$1").replace(/([;,]) /g,"$1").replace(/ !/g,"!").replace(/: /g,":")}static toFlatCase(n){return this.isString(n)?n.replace(/(-|_)/g,"").toLowerCase():n}static isString(n,t=!0){return typeof n=="string"&&(t||n!=="")}},Ft=0;function Ee(o="pn_id_"){return Ft++,`${o}${Ft}`}function $t(){let o=[],n=(s,r)=>{let l=o.length>0?o[o.length-1]:{key:s,value:r},a=l.value+(l.key===s?0:r)+2;return o.push({key:s,value:a}),a},t=s=>{o=o.filter(r=>r.value!==s)},e=()=>o.length>0?o[o.length-1].value:0,i=s=>s&&parseInt(s.style.zIndex,10)||0;return{get:i,set:(s,r,l)=>{r&&(r.style.zIndex=String(n(s,l)))},clear:s=>{s&&(t(i(s)),s.style.zIndex="")},getCurrent:()=>e()}}var Fe=$t();var Nt=({dt:o})=>`
|
|
48
|
+
.p-inputtext {
|
|
49
|
+
font-family: inherit;
|
|
50
|
+
font-feature-settings: inherit;
|
|
51
|
+
font-size: 1rem;
|
|
52
|
+
color: ${o("inputtext.color")};
|
|
53
|
+
background: ${o("inputtext.background")};
|
|
54
|
+
padding-block: ${o("inputtext.padding.y")};
|
|
55
|
+
padding-inline: ${o("inputtext.padding.x")};
|
|
56
|
+
border: 1px solid ${o("inputtext.border.color")};
|
|
57
|
+
transition: background ${o("inputtext.transition.duration")}, color ${o("inputtext.transition.duration")}, border-color ${o("inputtext.transition.duration")}, outline-color ${o("inputtext.transition.duration")}, box-shadow ${o("inputtext.transition.duration")};
|
|
58
|
+
appearance: none;
|
|
59
|
+
border-radius: ${o("inputtext.border.radius")};
|
|
60
|
+
outline-color: transparent;
|
|
61
|
+
box-shadow: ${o("inputtext.shadow")};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.p-inputtext.ng-invalid.ng-dirty {
|
|
65
|
+
border-color: ${o("inputtext.invalid.border.color")};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.p-inputtext:enabled:hover {
|
|
69
|
+
border-color: ${o("inputtext.hover.border.color")};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.p-inputtext:enabled:focus {
|
|
73
|
+
border-color: ${o("inputtext.focus.border.color")};
|
|
74
|
+
box-shadow: ${o("inputtext.focus.ring.shadow")};
|
|
75
|
+
outline: ${o("inputtext.focus.ring.width")} ${o("inputtext.focus.ring.style")} ${o("inputtext.focus.ring.color")};
|
|
76
|
+
outline-offset: ${o("inputtext.focus.ring.offset")};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.p-inputtext.p-invalid {
|
|
80
|
+
border-color: ${o("inputtext.invalid.border.color")};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.p-inputtext.p-variant-filled {
|
|
84
|
+
background: ${o("inputtext.filled.background")};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.p-inputtext.p-variant-filled:enabled:focus {
|
|
88
|
+
background: ${o("inputtext.filled.focus.background")};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.p-inputtext:disabled {
|
|
92
|
+
opacity: 1;
|
|
93
|
+
background: ${o("inputtext.disabled.background")};
|
|
94
|
+
color: ${o("inputtext.disabled.color")};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.p-inputtext::placeholder {
|
|
98
|
+
color: ${o("inputtext.placeholder.color")};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.p-inputtext.ng-invalid.ng-dirty::placeholder {
|
|
102
|
+
color: ${o("inputtext.invalid.placeholder.color")};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.p-inputtext-sm {
|
|
106
|
+
font-size: ${o("inputtext.sm.font.size")};
|
|
107
|
+
padding-block: ${o("inputtext.sm.padding.y")};
|
|
108
|
+
padding-inline: ${o("inputtext.sm.padding.x")};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.p-inputtext-lg {
|
|
112
|
+
font-size: ${o("inputtext.lg.font.size")};
|
|
113
|
+
padding-block: ${o("inputtext.lg.padding.y")};
|
|
114
|
+
padding-inline: ${o("inputtext.lg.padding.x")};
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.p-inputtext-fluid {
|
|
118
|
+
width: 100%;
|
|
119
|
+
}
|
|
120
|
+
`,kt={root:({instance:o,props:n})=>["p-inputtext p-component",{"p-filled":o.filled,"p-inputtext-sm":n.size==="small","p-inputtext-lg":n.size==="large","p-invalid":n.invalid,"p-variant-filled":n.variant==="filled","p-inputtext-fluid":n.fluid}]},Dt=(()=>{class o extends w{name="inputtext";theme=Nt;classes=kt;static \u0275fac=(()=>{let t;return function(i){return(t||(t=h(o)))(i||o)}})();static \u0275prov=D({token:o,factory:o.\u0275fac})}return o})();var Re=(()=>{class o extends ${ngModel;variant="outlined";fluid;pSize;filled;_componentStyle=f(Dt);get hasFluid(){let e=this.el.nativeElement.closest("p-fluid");return U(this.fluid)?!!e:this.fluid}constructor(t){super(),this.ngModel=t}ngAfterViewInit(){super.ngAfterViewInit(),this.updateFilledState(),this.cd.detectChanges()}ngDoCheck(){this.updateFilledState()}onInput(){this.updateFilledState()}updateFilledState(){this.filled=this.el.nativeElement.value&&this.el.nativeElement.value.length||this.ngModel&&this.ngModel.model}static \u0275fac=function(e){return new(e||o)(it(ft,8))};static \u0275dir=L({type:o,selectors:[["","pInputText",""]],hostAttrs:[1,"p-inputtext","p-component"],hostVars:14,hostBindings:function(e,i){e&1&<("input",function(r){return i.onInput(r)}),e&2&&rt("p-filled",i.filled)("p-variant-filled",i.variant==="filled"||i.config.inputStyle()==="filled"||i.config.inputVariant()==="filled")("p-inputtext-fluid",i.hasFluid)("p-inputtext-sm",i.pSize==="small")("p-inputfield-sm",i.pSize==="small")("p-inputtext-lg",i.pSize==="large")("p-inputfield-lg",i.pSize==="large")},inputs:{variant:"variant",fluid:[2,"fluid","fluid",W],pSize:"pSize"},standalone:!0,features:[O([Dt]),H,g]})}return o})(),Ve=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=z({type:o});static \u0275inj=V({})}return o})();var Ht=({dt:o})=>`
|
|
121
|
+
/* For PrimeNG */
|
|
122
|
+
.p-ripple {
|
|
123
|
+
overflow: hidden;
|
|
124
|
+
position: relative;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.p-ink {
|
|
128
|
+
display: block;
|
|
129
|
+
position: absolute;
|
|
130
|
+
background: ${o("ripple.background")};
|
|
131
|
+
border-radius: 100%;
|
|
132
|
+
transform: scale(0);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.p-ink-active {
|
|
136
|
+
animation: ripple 0.4s linear;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.p-ripple-disabled .p-ink {
|
|
140
|
+
display: none !important;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@keyframes ripple {
|
|
144
|
+
100% {
|
|
145
|
+
opacity: 0;
|
|
146
|
+
transform: scale(2.5);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
`,Wt={root:"p-ink"},Lt=(()=>{class o extends w{name="ripple";theme=Ht;classes=Wt;static \u0275fac=(()=>{let t;return function(i){return(t||(t=h(o)))(i||o)}})();static \u0275prov=D({token:o,factory:o.\u0275fac})}return o})();var Ke=(()=>{class o extends ${zone=f(ot);_componentStyle=f(Lt);animationListener;mouseDownListener;timeout;constructor(){super(),ut(()=>{G(this.platformId)&&(this.config.ripple()?this.zone.runOutsideAngular(()=>{this.create(),this.mouseDownListener=this.renderer.listen(this.el.nativeElement,"mousedown",this.onMouseDown.bind(this))}):this.remove())})}ngAfterViewInit(){super.ngAfterViewInit()}onMouseDown(t){let e=this.getInk();if(!e||this.document.defaultView?.getComputedStyle(e,null).display==="none")return;if(B(e,"p-ink-active"),!Y(e)&&!K(e)){let l=Math.max(mt(this.el.nativeElement),yt(this.el.nativeElement));e.style.height=l+"px",e.style.width=l+"px"}let i=gt(this.el.nativeElement),s=t.pageX-i.left+this.document.body.scrollTop-K(e)/2,r=t.pageY-i.top+this.document.body.scrollLeft-Y(e)/2;this.renderer.setStyle(e,"top",r+"px"),this.renderer.setStyle(e,"left",s+"px"),ht(e,"p-ink-active"),this.timeout=setTimeout(()=>{let l=this.getInk();l&&B(l,"p-ink-active")},401)}getInk(){let t=this.el.nativeElement.children;for(let e=0;e<t.length;e++)if(typeof t[e].className=="string"&&t[e].className.indexOf("p-ink")!==-1)return t[e];return null}resetInk(){let t=this.getInk();t&&B(t,"p-ink-active")}onAnimationEnd(t){this.timeout&&clearTimeout(this.timeout),B(t.currentTarget,"p-ink-active")}create(){let t=this.renderer.createElement("span");this.renderer.addClass(t,"p-ink"),this.renderer.appendChild(this.el.nativeElement,t),this.renderer.setAttribute(t,"aria-hidden","true"),this.renderer.setAttribute(t,"role","presentation"),this.animationListener||(this.animationListener=this.renderer.listen(t,"animationend",this.onAnimationEnd.bind(this)))}remove(){let t=this.getInk();t&&(this.mouseDownListener&&this.mouseDownListener(),this.animationListener&&this.animationListener(),this.mouseDownListener=null,this.animationListener=null,bt(t))}ngOnDestroy(){this.config&&this.config.ripple()&&this.remove(),super.ngOnDestroy()}static \u0275fac=function(e){return new(e||o)};static \u0275dir=L({type:o,selectors:[["","pRipple",""]],hostAttrs:[1,"p-ripple"],standalone:!0,features:[O([Lt]),g]})}return o})();var ti=(()=>{class o extends N{static \u0275fac=(()=>{let t;return function(i){return(t||(t=h(o)))(i||o)}})();static \u0275cmp=v({type:o,selectors:[["ChevronRightIcon"]],standalone:!0,features:[g,S],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M4.38708 13C4.28408 13.0005 4.18203 12.9804 4.08691 12.9409C3.99178 12.9014 3.9055 12.8433 3.83313 12.7701C3.68634 12.6231 3.60388 12.4238 3.60388 12.2161C3.60388 12.0084 3.68634 11.8091 3.83313 11.6622L8.50507 6.99022L3.83313 2.31827C3.69467 2.16968 3.61928 1.97313 3.62287 1.77005C3.62645 1.56698 3.70872 1.37322 3.85234 1.22959C3.99596 1.08597 4.18972 1.00371 4.3928 1.00012C4.59588 0.996539 4.79242 1.07192 4.94102 1.21039L10.1669 6.43628C10.3137 6.58325 10.3962 6.78249 10.3962 6.99022C10.3962 7.19795 10.3137 7.39718 10.1669 7.54416L4.94102 12.7701C4.86865 12.8433 4.78237 12.9014 4.68724 12.9409C4.59212 12.9804 4.49007 13.0005 4.38708 13Z","fill","currentColor"]],template:function(e,i){e&1&&(M(),x(0,"svg",0),E(1,"path",1),I()),e&2&&(T(i.getClassNames()),C("aria-label",i.ariaLabel)("aria-hidden",i.ariaHidden)("role",i.role))},encapsulation:2})}return o})();export{$ as a,Q as b,xt as c,ne as d,N as e,ge as f,ti as g,Se as h,xe as i,Et as j,Ee as k,Fe as l,Re as m,Ve as n,Ke as o};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as c}from"./chunk-4SAJUEHO.js";import{ja as p,oa as a,v as s}from"./chunk-PQDPS2ID.js";var I=(()=>{let t=class t{constructor(e){this.httpService=e}getInventoryAsyncLog(e){return this.httpService.post("api/Inventory/GetAsyncLog",e).pipe(s(r=>(r.hits=r.hits.map(o=>{let i=JSON.parse(o._source?.log?.response);return o.DurationInSecond=parseInt(i.Duration)/1e3,o.respCode=i?.StatusCode,o}),r)))}getInventoryAsyncLogDetail(e){return this.httpService.post("api/Inventory/GetAsyncLogDetail",{ID:e})}};t.\u0275fac=function(r){return new(r||t)(a(c))},t.\u0275prov=p({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();export{I as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{K as w}from"./chunk-E5GGIVK7.js";import{c as q,k as G}from"./chunk-OVEJFFL6.js";import{B as A,Bb as z,Fb as H,Ia as U,Ib as k,J as N,Ka as I,Kb as W,Na as j,O as T,T as b,Y as L,a as y,bd as Y,cc as $,dc as B,ea as v,eb as d,ja as M,ka as O,kb as m,ld as F,ma as E,oa as g,pa as x,q as f,r as R,ta as P,ua as D,v as u,vc as V}from"./chunk-PQDPS2ID.js";var et=["*"],S;function nt(){if(S===void 0&&(S=null,typeof window<"u")){let r=window;r.trustedTypes!==void 0&&(S=r.trustedTypes.createPolicy("angular#components",{createHTML:s=>s}))}return S}function _(r){return nt()?.createHTML(r)||r}function J(r){return Error(`Unable to find icon with the name "${r}"`)}function it(){return Error("Could not find HttpClient provider for use with Angular Material icons. Please include the HttpClientModule from @angular/common/http in your app imports.")}function K(r){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${r}".`)}function Q(r){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${r}".`)}var a=class{constructor(s,tt,t){this.url=s,this.svgText=tt,this.options=t}},ot=(()=>{let s=class s{constructor(t,e,n,i){this._httpClient=t,this._sanitizer=e,this._errorHandler=i,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass=["material-icons","mat-ligature-font"],this._document=n}addSvgIcon(t,e,n){return this.addSvgIconInNamespace("",t,e,n)}addSvgIconLiteral(t,e,n){return this.addSvgIconLiteralInNamespace("",t,e,n)}addSvgIconInNamespace(t,e,n,i){return this._addSvgIconConfig(t,e,new a(n,null,i))}addSvgIconResolver(t){return this._resolvers.push(t),this}addSvgIconLiteralInNamespace(t,e,n,i){let o=this._sanitizer.sanitize(d.HTML,n);if(!o)throw Q(n);let c=_(o);return this._addSvgIconConfig(t,e,new a("",c,i))}addSvgIconSet(t,e){return this.addSvgIconSetInNamespace("",t,e)}addSvgIconSetLiteral(t,e){return this.addSvgIconSetLiteralInNamespace("",t,e)}addSvgIconSetInNamespace(t,e,n){return this._addSvgIconSetConfig(t,new a(e,null,n))}addSvgIconSetLiteralInNamespace(t,e,n){let i=this._sanitizer.sanitize(d.HTML,e);if(!i)throw Q(e);let o=_(i);return this._addSvgIconSetConfig(t,new a("",o,n))}registerFontClassAlias(t,e=t){return this._fontCssClassesByAlias.set(t,e),this}classNameForFontAlias(t){return this._fontCssClassesByAlias.get(t)||t}setDefaultFontSetClass(...t){return this._defaultFontSetClass=t,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(t){let e=this._sanitizer.sanitize(d.RESOURCE_URL,t);if(!e)throw K(t);let n=this._cachedIconsByUrl.get(e);return n?f(C(n)):this._loadSvgIconFromConfig(new a(t,null)).pipe(v(i=>this._cachedIconsByUrl.set(e,i)),u(i=>C(i)))}getNamedSvgIcon(t,e=""){let n=X(e,t),i=this._svgIconConfigs.get(n);if(i)return this._getSvgFromConfig(i);if(i=this._getIconConfigFromResolvers(e,t),i)return this._svgIconConfigs.set(n,i),this._getSvgFromConfig(i);let o=this._iconSetConfigs.get(e);return o?this._getSvgFromIconSetConfigs(t,o):R(J(n))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(t){return t.svgText?f(C(this._svgElementFromConfig(t))):this._loadSvgIconFromConfig(t).pipe(u(e=>C(e)))}_getSvgFromIconSetConfigs(t,e){let n=this._extractIconWithNameFromAnySet(t,e);if(n)return f(n);let i=e.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(N(c=>{let h=`Loading icon set URL: ${this._sanitizer.sanitize(d.RESOURCE_URL,o.url)} failed: ${c.message}`;return this._errorHandler.handleError(new Error(h)),f(null)})));return A(i).pipe(u(()=>{let o=this._extractIconWithNameFromAnySet(t,e);if(!o)throw J(t);return o}))}_extractIconWithNameFromAnySet(t,e){for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.svgText&&i.svgText.toString().indexOf(t)>-1){let o=this._svgElementFromConfig(i),c=this._extractSvgIconFromSet(o,t,i.options);if(c)return c}}return null}_loadSvgIconFromConfig(t){return this._fetchIcon(t).pipe(v(e=>t.svgText=e),u(()=>this._svgElementFromConfig(t)))}_loadSvgIconSetFromConfig(t){return t.svgText?f(null):this._fetchIcon(t).pipe(v(e=>t.svgText=e))}_extractSvgIconFromSet(t,e,n){let i=t.querySelector(`[id="${e}"]`);if(!i)return null;let o=i.cloneNode(!0);if(o.removeAttribute("id"),o.nodeName.toLowerCase()==="svg")return this._setSvgAttributes(o,n);if(o.nodeName.toLowerCase()==="symbol")return this._setSvgAttributes(this._toSvgElement(o),n);let c=this._svgElementFromString(_("<svg></svg>"));return c.appendChild(o),this._setSvgAttributes(c,n)}_svgElementFromString(t){let e=this._document.createElement("DIV");e.innerHTML=t;let n=e.querySelector("svg");if(!n)throw Error("<svg> tag not found");return n}_toSvgElement(t){let e=this._svgElementFromString(_("<svg></svg>")),n=t.attributes;for(let i=0;i<n.length;i++){let{name:o,value:c}=n[i];o!=="id"&&e.setAttribute(o,c)}for(let i=0;i<t.childNodes.length;i++)t.childNodes[i].nodeType===this._document.ELEMENT_NODE&&e.appendChild(t.childNodes[i].cloneNode(!0));return e}_setSvgAttributes(t,e){return t.setAttribute("fit",""),t.setAttribute("height","100%"),t.setAttribute("width","100%"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.setAttribute("focusable","false"),e&&e.viewBox&&t.setAttribute("viewBox",e.viewBox),t}_fetchIcon(t){let{url:e,options:n}=t,i=n?.withCredentials??!1;if(!this._httpClient)throw it();if(e==null)throw Error(`Cannot fetch icon from URL "${e}".`);let o=this._sanitizer.sanitize(d.RESOURCE_URL,e);if(!o)throw K(e);let c=this._inProgressUrlFetches.get(o);if(c)return c;let l=this._httpClient.get(o,{responseType:"text",withCredentials:i}).pipe(u(h=>_(h)),b(()=>this._inProgressUrlFetches.delete(o)),L());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(t,e,n){return this._svgIconConfigs.set(X(t,e),n),this}_addSvgIconSetConfig(t,e){let n=this._iconSetConfigs.get(t);return n?n.push(e):this._iconSetConfigs.set(t,[e]),this}_svgElementFromConfig(t){if(!t.svgElement){let e=this._svgElementFromString(t.svgText);this._setSvgAttributes(e,t.options),t.svgElement=e}return t.svgElement}_getIconConfigFromResolvers(t,e){for(let n=0;n<this._resolvers.length;n++){let i=this._resolvers[n](e,t);if(i)return rt(i)?new a(i.url,null,i.options):new a(i,null)}}};s.\u0275fac=function(e){return new(e||s)(g(q,8),g(G),g(F,8),g(I))},s.\u0275prov=M({token:s,factory:s.\u0275fac,providedIn:"root"});let r=s;return r})();function C(r){return r.cloneNode(!0)}function X(r,s){return r+":"+s}function rt(r){return!!(r.url&&r.options)}var st=new E("MAT_ICON_DEFAULT_OPTIONS"),ct=new E("mat-icon-location",{providedIn:"root",factory:at});function at(){let r=x(F),s=r?r.location:null;return{getPathname:()=>s?s.pathname+s.search:""}}var Z=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],lt=Z.map(r=>`[${r}]`).join(", "),ht=/^url\(['"]?#(.*?)['"]?\)$/,Tt=(()=>{let s=class s{get color(){return this._color||this._defaultColor}set color(t){this._color=t}get svgIcon(){return this._svgIcon}set svgIcon(t){t!==this._svgIcon&&(t?this._updateSvgIcon(t):this._svgIcon&&this._clearSvgElement(),this._svgIcon=t)}get fontSet(){return this._fontSet}set fontSet(t){let e=this._cleanupFontValue(t);e!==this._fontSet&&(this._fontSet=e,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(t){let e=this._cleanupFontValue(t);e!==this._fontIcon&&(this._fontIcon=e,this._updateFontIconClasses())}constructor(t,e,n,i,o,c){this._elementRef=t,this._iconRegistry=e,this._location=i,this._errorHandler=o,this.inline=!1,this._previousFontSetClass=[],this._currentIconFetch=y.EMPTY,c&&(c.color&&(this.color=this._defaultColor=c.color),c.fontSet&&(this.fontSet=c.fontSet)),n||t.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(t){if(!t)return["",""];let e=t.split(":");switch(e.length){case 1:return["",e[0]];case 2:return e;default:throw Error(`Invalid icon name: "${t}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){let t=this._elementsWithExternalReferences;if(t&&t.size){let e=this._location.getPathname();e!==this._previousPath&&(this._previousPath=e,this._prependPathToReferences(e))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(t){this._clearSvgElement();let e=this._location.getPathname();this._previousPath=e,this._cacheChildrenWithExternalReferences(t),this._prependPathToReferences(e),this._elementRef.nativeElement.appendChild(t)}_clearSvgElement(){let t=this._elementRef.nativeElement,e=t.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();e--;){let n=t.childNodes[e];(n.nodeType!==1||n.nodeName.toLowerCase()==="svg")&&n.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let t=this._elementRef.nativeElement,e=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(n=>n.length>0);this._previousFontSetClass.forEach(n=>t.classList.remove(n)),e.forEach(n=>t.classList.add(n)),this._previousFontSetClass=e,this.fontIcon!==this._previousFontIconClass&&!e.includes("mat-ligature-font")&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(t){return typeof t=="string"?t.trim().split(" ")[0]:t}_prependPathToReferences(t){let e=this._elementsWithExternalReferences;e&&e.forEach((n,i)=>{n.forEach(o=>{i.setAttribute(o.name,`url('${t}#${o.value}')`)})})}_cacheChildrenWithExternalReferences(t){let e=t.querySelectorAll(lt),n=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let i=0;i<e.length;i++)Z.forEach(o=>{let c=e[i],l=c.getAttribute(o),h=l?l.match(ht):null;if(h){let p=n.get(c);p||(p=[],n.set(c,p)),p.push({name:o,value:h[1]})}})}_updateSvgIcon(t){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),t){let[e,n]=this._splitIconName(t);e&&(this._svgNamespace=e),n&&(this._svgName=n),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(n,e).pipe(T(1)).subscribe(i=>this._setSvgElement(i),i=>{let o=`Error retrieving icon ${e}:${n}! ${i.message}`;this._errorHandler.handleError(new Error(o))})}}};s.\u0275fac=function(e){return new(e||s)(m(j),m(ot),U("aria-hidden"),m(ct),m(I),m(st,8))},s.\u0275cmp=P({type:s,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:10,hostBindings:function(e,n){e&2&&(H("data-mat-icon-type",n._usingFontIcon()?"font":"svg")("data-mat-icon-name",n._svgName||n.fontIcon)("data-mat-icon-namespace",n._svgNamespace||n.fontSet)("fontIcon",n._usingFontIcon()?n.fontIcon:null),W(n.color?"mat-"+n.color:""),k("mat-icon-inline",n.inline)("mat-icon-no-color",n.color!=="primary"&&n.color!=="accent"&&n.color!=="warn"))},inputs:{color:"color",inline:[2,"inline","inline",Y],svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],standalone:!0,features:[z,V],ngContentSelectors:et,decls:1,vars:0,template:function(e,n){e&1&&($(),B(0))},styles:["mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],encapsulation:2,changeDetection:0});let r=s;return r})(),bt=(()=>{let s=class s{};s.\u0275fac=function(e){return new(e||s)},s.\u0275mod=D({type:s}),s.\u0275inj=O({imports:[w,w]});let r=s;return r})();export{Tt as a,bt as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as _t,b as Ct,c as bt,k as yt}from"./chunk-OVEJFFL6.js";import{$b as j,Da as G,Ea as $,Eb as H,Fb as E,Gb as l,Hb as M,J as ht,Ja as N,Kb as f,Md as It,Nd as tt,Qd as B,Rd as F,Sb as d,Tb as v,Td as et,Ub as R,Uc as S,Vb as Y,Wb as q,Yb as J,_b as Tt,bc as c,c as ct,eb as vt,f as C,fb as Q,ja as w,jb as a,ka as dt,kb as b,ld as W,m as ut,ma as pt,nc as g,oa as m,ob as gt,pa as x,pc as y,sb as U,ta as L,u as Z,ua as mt,vc as K,vd as X,xa as ft,xb as A}from"./chunk-PQDPS2ID.js";import{a as u,b as I}from"./chunk-GNOSNGXM.js";var wt=["toast-component",""];function At(s,n){if(s&1){let e=J();d(0,"button",5),j("click",function(){G(e);let i=c();return $(i.remove())}),d(1,"span",6),g(2,"\xD7"),v()()}}function Ht(s,n){if(s&1&&(Y(0),g(1),q()),s&2){let e=c(2);a(),y("[",e.duplicatesCount+1,"]")}}function Et(s,n){if(s&1&&(d(0,"div"),g(1),H(2,Ht,2,1,"ng-container",4),v()),s&2){let e=c();f(e.options.titleClass),E("aria-label",e.title),a(),y(" ",e.title," "),a(),l("ngIf",e.duplicatesCount)}}function Mt(s,n){if(s&1&&R(0,"div",7),s&2){let e=c();f(e.options.messageClass),l("innerHTML",e.message,Q)}}function Rt(s,n){if(s&1&&(d(0,"div",8),g(1),v()),s&2){let e=c();f(e.options.messageClass),E("aria-label",e.message),a(),y(" ",e.message," ")}}function jt(s,n){if(s&1&&(d(0,"div"),R(1,"div",9),v()),s&2){let e=c();a(),M("width",e.width()+"%")}}function Nt(s,n){if(s&1){let e=J();d(0,"button",5),j("click",function(){G(e);let i=c();return $(i.remove())}),d(1,"span",6),g(2,"\xD7"),v()()}}function St(s,n){if(s&1&&(Y(0),g(1),q()),s&2){let e=c(2);a(),y("[",e.duplicatesCount+1,"]")}}function Bt(s,n){if(s&1&&(d(0,"div"),g(1),H(2,St,2,1,"ng-container",4),v()),s&2){let e=c();f(e.options.titleClass),E("aria-label",e.title),a(),y(" ",e.title," "),a(),l("ngIf",e.duplicatesCount)}}function Ft(s,n){if(s&1&&R(0,"div",7),s&2){let e=c();f(e.options.messageClass),l("innerHTML",e.message,Q)}}function Pt(s,n){if(s&1&&(d(0,"div",8),g(1),v()),s&2){let e=c();f(e.options.messageClass),E("aria-label",e.message),a(),y(" ",e.message," ")}}function kt(s,n){if(s&1&&(d(0,"div"),R(1,"div",9),v()),s&2){let e=c();a(),M("width",e.width()+"%")}}var it=class{_attachedHost;component;viewContainerRef;injector;constructor(n,e){this.component=n,this.injector=e}attach(n,e){return this._attachedHost=n,n.attach(this,e)}detach(){let n=this._attachedHost;if(n)return this._attachedHost=void 0,n.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(n){this._attachedHost=n}},st=class{_attachedPortal;_disposeFn;attach(n,e){return this._attachedPortal=n,this.attachComponentPortal(n,e)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(n){this._disposeFn=n}},nt=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new C;_activate=new C;_manualClose=new C;_resetTimeout=new C;_countDuplicate=new C;constructor(n){this._overlayRef=n}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(n,e){n&&this._resetTimeout.next(),e&&this._countDuplicate.next(++this.duplicatesCount)}},D=class{toastId;config;message;title;toastType;toastRef;_onTap=new C;_onAction=new C;constructor(n,e,t,i,o,r){this.toastId=n,this.config=e,this.message=t,this.title=i,this.toastType=o,this.toastRef=r,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(n){this._onAction.next(n)}onAction(){return this._onAction.asObservable()}},xt={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing"},Dt=new pt("ToastConfig"),ot=class extends st{_hostDomElement;_componentFactoryResolver;_appRef;constructor(n,e,t){super(),this._hostDomElement=n,this._componentFactoryResolver=e,this._appRef=t}attachComponentPortal(n,e){let t=this._componentFactoryResolver.resolveComponentFactory(n.component),i;return i=t.create(n.injector),this._appRef.attachView(i.hostView),this.setDisposeFn(()=>{this._appRef.detachView(i.hostView),i.destroy()}),e?this._hostDomElement.insertBefore(this._getComponentRootNode(i),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(i)),i}_getComponentRootNode(n){return n.hostView.rootNodes[0]}},Vt=(()=>{class s{_document=x(W);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let e=this._document.createElement("div");e.classList.add("overlay-container"),e.setAttribute("aria-live","polite"),this._document.body.appendChild(e),this._containerElement=e}static \u0275fac=function(t){return new(t||s)};static \u0275prov=w({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),at=class{_portalHost;constructor(n){this._portalHost=n}attach(n,e=!0){return this._portalHost.attach(n,e)}detach(){return this._portalHost.detach()}},zt=(()=>{class s{_overlayContainer=x(Vt);_componentFactoryResolver=x(gt);_appRef=x(S);_document=x(W);_paneElements=new Map;create(e,t){return this._createOverlayRef(this.getPaneElement(e,t))}getPaneElement(e="",t){return this._paneElements.get(t)||this._paneElements.set(t,{}),this._paneElements.get(t)[e]||(this._paneElements.get(t)[e]=this._createPaneElement(e,t)),this._paneElements.get(t)[e]}_createPaneElement(e,t){let i=this._document.createElement("div");return i.id="toast-container",i.classList.add(e),i.classList.add("toast-container"),t?t.getContainerElement().appendChild(i):this._overlayContainer.getContainerElement().appendChild(i),i}_createPortalHost(e){return new ot(e,this._componentFactoryResolver,this._appRef)}_createOverlayRef(e){return new at(this._createPortalHost(e))}static \u0275fac=function(t){return new(t||s)};static \u0275prov=w({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),P=(()=>{class s{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(e,t,i,o,r){this.overlay=t,this._injector=i,this.sanitizer=o,this.ngZone=r,this.toastrConfig=u(u({},e.default),e.config),e.config.iconClasses&&(this.toastrConfig.iconClasses=u(u({},e.default.iconClasses),e.config.iconClasses))}show(e,t,i={},o=""){return this._preBuildNotification(o,e,t,this.applyConfig(i))}success(e,t,i={}){let o=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(o,e,t,this.applyConfig(i))}error(e,t,i={}){let o=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(o,e,t,this.applyConfig(i))}info(e,t,i={}){let o=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(o,e,t,this.applyConfig(i))}warning(e,t,i={}){let o=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(o,e,t,this.applyConfig(i))}clear(e){for(let t of this.toasts)if(e!==void 0){if(t.toastId===e){t.toastRef.manualClose();return}}else t.toastRef.manualClose()}remove(e){let t=this._findToast(e);if(!t||(t.activeToast.toastRef.close(),this.toasts.splice(t.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){let i=this.toasts[this.currentlyActive].toastRef;i.isInactive()||(this.currentlyActive=this.currentlyActive+1,i.activate())}return!0}findDuplicate(e="",t="",i,o){let{includeTitleDuplicates:r}=this.toastrConfig;for(let p of this.toasts){let T=r&&p.title===e;if((!r||T)&&p.message===t)return p.toastRef.onDuplicate(i,o),p}return null}applyConfig(e={}){return u(u({},this.toastrConfig),e)}_findToast(e){for(let t=0;t<this.toasts.length;t++)if(this.toasts[t].toastId===e)return{index:t,activeToast:this.toasts[t]};return null}_preBuildNotification(e,t,i,o){return o.onActivateTick?this.ngZone.run(()=>this._buildNotification(e,t,i,o)):this._buildNotification(e,t,i,o)}_buildNotification(e,t,i,o){if(!o.toastComponent)throw new Error("toastComponent required");let r=this.findDuplicate(i,t,this.toastrConfig.resetTimeoutOnDuplicate&&o.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&i||t)&&this.toastrConfig.preventDuplicates&&r!==null)return r;this.previousToastMessage=t;let p=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(p=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let T=this.overlay.create(o.positionClass,this.overlayContainer);this.index=this.index+1;let h=t;t&&o.enableHtml&&(h=this.sanitizer.sanitize(vt.HTML,t));let _=new nt(T),O=new D(this.index,o,h,i,e,_),k=[{provide:D,useValue:O}],rt=N.create({providers:k,parent:this._injector}),V=new it(o.toastComponent,rt),lt=T.attach(V,o.newestOnTop);_.componentInstance=lt.instance;let z={toastId:this.index,title:i||"",message:t||"",toastRef:_,onShown:_.afterActivate(),onHidden:_.afterClosed(),onTap:O.onTap(),onAction:O.onAction(),portal:lt};return p||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{z.toastRef.activate()})),this.toasts.push(z),z}static \u0275fac=function(t){return new(t||s)(m(Dt),m(zt),m(N),m(yt),m(U))};static \u0275prov=w({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),Zt=(()=>{class s{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=A(-1);toastClasses="";state;get _state(){return this.state()}get displayStyle(){if(this.state().value==="inactive")return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(e,t,i){this.toastrService=e,this.toastPackage=t,this.ngZone=i,this.message=t.message,this.title=t.title,this.options=t.config,this.originalTimeout=t.config.timeOut,this.toastClasses=`${t.toastType} ${t.config.toastClass}`,this.sub=t.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=t.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=t.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=t.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o}),this.state=A({value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.update(e=>I(u({},e),{value:"active"})),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let e=new Date().getTime(),t=this.hideTime-e;this.width.set(t/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(i=>100-i),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.update(e=>I(u({},e),{value:"active"})),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){this.state().value!=="removed"&&(clearTimeout(this.timeout),this.state.update(e=>I(u({},e),{value:"removed"})),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){this.state().value!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state().value!=="removed"&&this.options.disableTimeOut!=="extendedTimeOut"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state().value==="removed"||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(e,t){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(e),t)):this.timeout=setTimeout(()=>e(),t)}outsideInterval(e,t){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(e),t)):this.intervalId=setInterval(()=>e(),t)}runInsideAngular(e){this.ngZone?this.ngZone.run(()=>e()):e()}static \u0275fac=function(t){return new(t||s)(b(P),b(D),b(U))};static \u0275cmp=L({type:s,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(t,i){t&1&&j("click",function(){return i.tapToast()})("mouseenter",function(){return i.stickAround()})("mouseleave",function(){return i.delayedHideToast()}),t&2&&(Tt("@flyInOut",i._state),f(i.toastClasses),M("display",i.displayStyle))},standalone:!0,features:[K],attrs:wt,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(t,i){t&1&&H(0,At,3,0,"button",0)(1,Et,3,5,"div",1)(2,Mt,1,3,"div",2)(3,Rt,2,4,"div",3)(4,jt,2,2,"div",4),t&2&&(l("ngIf",i.options.closeButton),a(),l("ngIf",i.title),a(),l("ngIf",i.message&&i.options.enableHtml),a(),l("ngIf",i.message&&!i.options.enableHtml),a(),l("ngIf",i.options.progressBar))},dependencies:[X],encapsulation:2,data:{animation:[It("flyInOut",[F("inactive",B({opacity:0})),F("active",B({opacity:1})),F("removed",B({opacity:0})),et("inactive => active",tt("{{ easeTime }}ms {{ easing }}")),et("active => removed",tt("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return s})(),Lt=I(u({},xt),{toastComponent:Zt}),Gt=(s={})=>ft([{provide:Dt,useValue:{default:Lt,config:s}}]),le=(()=>{class s{static forRoot(e={}){return{ngModule:s,providers:[Gt(e)]}}static \u0275fac=function(t){return new(t||s)};static \u0275mod=mt({type:s});static \u0275inj=dt({})}return s})();var $t=(()=>{class s{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=A(-1);toastClasses="";get displayStyle(){return this.state()==="inactive"?"none":null}state=A("inactive");timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(e,t,i){this.toastrService=e,this.toastPackage=t,this.appRef=i,this.message=t.message,this.title=t.title,this.options=t.config,this.originalTimeout=t.config.timeOut,this.toastClasses=`${t.toastType} ${t.config.toastClass}`,this.sub=t.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=t.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=t.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=t.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.set("active"),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.timeout=setTimeout(()=>{this.remove()},this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))),this.options.onActivateTick&&this.appRef.tick()}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let e=new Date().getTime(),t=this.hideTime-e;this.width.set(t/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(i=>100-i),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.set("active"),this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=new Date().getTime()+(this.originalTimeout||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.state.set("removed"),this.timeout=setTimeout(()=>this.toastrService.remove(this.toastPackage.toastId)))}tapToast(){this.state()!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state()==="removed"||(this.timeout=setTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}static \u0275fac=function(t){return new(t||s)(b(P),b(D),b(S))};static \u0275cmp=L({type:s,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(t,i){t&1&&j("click",function(){return i.tapToast()})("mouseenter",function(){return i.stickAround()})("mouseleave",function(){return i.delayedHideToast()}),t&2&&(f(i.toastClasses),M("display",i.displayStyle))},standalone:!0,features:[K],attrs:wt,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(t,i){t&1&&H(0,Nt,3,0,"button",0)(1,Bt,3,5,"div",1)(2,Ft,1,3,"div",2)(3,Pt,2,4,"div",3)(4,kt,2,2,"div",4),t&2&&(l("ngIf",i.options.closeButton),a(),l("ngIf",i.title),a(),l("ngIf",i.message&&i.options.enableHtml),a(),l("ngIf",i.message&&!i.options.enableHtml),a(),l("ngIf",i.options.progressBar))},dependencies:[X],encapsulation:2,changeDetection:0})}return s})(),ce=I(u({},xt),{toastComponent:$t});var fe=(()=>{let n=class n{constructor(t,i){this.http=t,this.toastr=i}get(t,i){let o=this.generateQueryParams(i);return this.http.get(t,{params:o}).pipe(ht(r=>ut))}generateQueryParams(t=[]){let i=new Ct;return t.forEach(o=>{i=i.append(o.key,o.value)}),i}post(t,i,o={},r=1e5){return this.http.post(t,i,o).pipe(Z(r))}postFile(t,i,o=1e5){return new ct(r=>{let p=localStorage.getItem("Token"),T=new _t({"Content-Type":"application/json","Cache-Control":"no-cache"});p&&(T=T.append("Authorization","Bearer "+p)),this.http.post(t,i,{headers:T,observe:"response",responseType:"blob"}).pipe(Z(o)).subscribe({next:h=>{r.next({title:h.headers.get("Content-Disposition"),file:h.body}),r.complete()},error:h=>{if(h.headers.get("Content-Type")==="application/json; charset=utf-8"){let _=new FileReader;_.addEventListener("loadend",O=>{let k=JSON.parse(O.srcElement.result)?.Message;if(!this.unauthorizedErrorHandling(h)){let V=this.errorMessageHandling(h);this.toastr.error(k??"An unknown error has occured!",V.header,{enableHtml:!0})}}),_.readAsText(h.error)}r.error(h)}})})}unauthorizedErrorHandling(t){let i=!1;return(t.status==401||t.status==403)&&(localStorage.getItem("Token")?this.toastr.error("Your session has expired. Please login again.","Unauthorized",{enableHtml:!0}):window.location.href="/",i=!0),i}errorMessageHandling(t){let i="API Error",o="Exception Message";return t.error?(i="API Error - "+t.status,t.status==451&&(i="Error"),t.error&&(o=t.error.Message)):t.Message&&(i="API Error - "+t.name,o=t.Message),{header:i,Message:o}}delete(t,i){return this.http.delete(t,i)}};n.\u0275fac=function(i){return new(i||n)(m(bt),m(P))},n.\u0275prov=w({token:n,factory:n.\u0275fac,providedIn:"root"});let s=n;return s})();export{D as a,P as b,Zt as c,le as d,fe as e};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{a as ne,b as oe,c as re,d as ae,e as le,f as pe,g as se}from"./chunk-TPGBOTD4.js";import{b as ie}from"./chunk-4LFFAE2I.js";import{a as ee,b as te}from"./chunk-UN2U4YFQ.js";import{a as X}from"./chunk-KNWBPJ23.js";import{i as Q}from"./chunk-2DQJZ4SM.js";import{e as J}from"./chunk-4SAJUEHO.js";import"./chunk-KCDL7SWP.js";import{m as Y,n as Z}from"./chunk-BO4PPSB5.js";import"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{c as G,h as z,m as K,y as q}from"./chunk-BSN7ZAXG.js";import"./chunk-6SF7AUOH.js";import{n as W,p as j,r as $}from"./chunk-OVEJFFL6.js";import{$b as y,Cd as H,Da as g,Ea as h,Eb as c,Gb as s,Pa as M,Sb as o,Tb as r,Ub as d,Vb as f,Wb as _,Yb as S,bc as u,fb as k,ja as D,jb as p,ka as T,kb as I,mc as v,nc as m,oa as U,oc as O,pc as B,rc as L,sc as F,ta as C,tc as R,ua as N,uc as P,ud as w,vd as V,wd as A,xc as x}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var ge=e=>[e];function he(e,t){if(e&1&&(f(0),o(1,"a",9),m(2),r(),_()),e&2){let a=t.$implicit;p(),s("routerLink",x(2,ge,a.url)),p(),B(" ",a.title,"")}}var ce=(()=>{let t=class t{constructor(){this.tabs=[{Title:"Download By Url",Url:"/menu/products/download/by-url",Description:"Download products information by product URL as a parameter"}],this.moreMenu=[{title:"Sold In Channel",url:"/menu/products/status/sold-in-channel"},{title:"In POS",url:"/menu/products/status/in-pos"},{title:"Not In Channel",url:"/menu/products/status/not-in-channel"},{title:"Duplicate SKU",url:"/menu/products/status/duplicate-sku"}]}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=C({type:t,selectors:[["app-download"]],decls:12,vars:2,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-block"],[4,"ngFor","ngForOf"],[1,"dropdown-item",3,"routerLink"]],template:function(i,l){i&1&&(o(0,"nav",0)(1,"div",1)(2,"div"),d(3,"nav-tab",2),r()(),o(4,"div")(5,"div",3)(6,"a",4),d(7,"i",5),r(),o(8,"div",6)(9,"div",7),c(10,he,3,4,"ng-container",8),r()()()()(),d(11,"router-outlet")),i&2&&(p(3),s("Tabs",l.tabs),p(7),s("ngForOf",l.moreMenu))},dependencies:[w,ee,W,j]});let e=t;return e})();var E=(()=>{let t=class t{constructor(n){this.httpService=n}download(n){return this.httpService.post("/api/Product/downloadurl",n)}};t.\u0275fac=function(i){return new(i||t)(U(J))},t.\u0275prov=D({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var Ce=e=>({"background-color":e});function ye(e,t){if(e&1&&(o(0,"th"),m(1),r()),e&2){let a=t.$implicit;p(),O(a.column)}}function ve(e,t){if(e&1&&(f(0),o(1,"td"),d(2,"span",6),r(),_()),e&2){let a=t.$implicit,n=u().$implicit;p(2),s("innerHTML",n[a.prop],k)}}function xe(e,t){if(e&1&&(o(0,"tr",5),c(1,ve,3,1,"ng-container",3),r()),e&2){let a=t.$implicit,n=u();s("ngStyle",x(2,Ce,a.Status>200?"#F4D6D5":"#DEE9C9")),p(),s("ngForOf",n.configs)}}var de=(()=>{let t=class t{constructor(){this.eventClose=new M}ngOnInit(){}onClose(){this.eventClose.emit()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=C({type:t,selectors:[["app-response-api-list"]],inputs:{configs:"configs",data:"data",status:"status"},outputs:{eventClose:"onClose"},decls:7,vars:2,consts:[[1,"table-responsive"],[1,"table"],[1,"thead-light"],[4,"ngFor","ngForOf"],[3,"ngStyle",4,"ngFor","ngForOf"],[3,"ngStyle"],[3,"innerHTML"]],template:function(i,l){i&1&&(o(0,"div",0)(1,"table",1)(2,"thead",2)(3,"tr"),c(4,ye,2,1,"th",3),r()(),o(5,"tbody"),c(6,xe,2,4,"tr",4),r()()()),i&2&&(p(4),s("ngForOf",l.configs),p(2),s("ngForOf",l.data))},dependencies:[w,A]});let e=t;return e})();function be(e,t){if(e&1){let a=S();f(0),o(1,"button",15),y("click",function(){g(a);let i=u(),l=v(11);return h(i.onNewStepperState(l))}),d(2,"i",16),m(3," New "),r(),_()}}function Ee(e,t){if(e&1){let a=S();f(0),o(1,"button",15),y("click",function(){g(a),u();let i=v(11);return h(i.previous())}),m(2," Back "),r(),_()}}function Ie(e,t){if(e&1){let a=S();f(0),o(1,"button",17),y("click",function(){g(a);let i=u(),l=v(11);return h(i.onStepperNext(l))}),m(2," Next "),r(),_()}}function De(e,t){if(e&1){let a=S();f(0),o(1,"button",18),y("click",function(){g(a);let i=u(),l=v(11);return h(i.onSubmit(l))}),m(2,"Download"),r(),_()}if(e&2){let a=u();p(),s("disabled",!a.urls)}}function Te(e,t){e&1&&(d(0,"i",19),o(1,"span"),m(2,"Instruction"),r())}function Ue(e,t){e&1&&(o(0,"div",20)(1,"div",21)(2,"div",22)(3,"h4",23),m(4,"Note"),r()(),o(5,"div",24)(6,"ol",25)(7,"li"),m(8," Use this form to Download Products from Tokopedia using product URL "),r(),o(9,"li"),m(10," Copy Product URL from "),o(11,"a",26),m(12,"https://seller.tokopedia.com/ "),r(),m(13," and paste in this form "),r(),o(14,"li"),m(15," Use New Line when you want to input several product URLs "),r()()()()())}function Ne(e,t){e&1&&(d(0,"i",27),o(1,"span"),m(2,"Download"),r())}function Me(e,t){if(e&1){let a=S();o(0,"div",20)(1,"textarea",28),R("ngModelChange",function(i){g(a);let l=u();return F(l.urls,i)||(l.urls=i),h(i)}),r()()}if(e&2){let a=u();p(),s("placeholder",a.urlPlaceholder),L("ngModel",a.urls)}}function ke(e,t){e&1&&(d(0,"i",29),o(1,"span"),m(2,"Finish"),r())}function Oe(e,t){if(e&1&&(o(0,"div",20),d(1,"app-response-api-list",30),r()),e&2){let a=u();p(),s("data",a.downloadResponses)("configs",a.configs)}}function Be(e,t){e&1&&(o(0,"h6"),m(1,"1"),r())}function Le(e,t){e&1&&(o(0,"h6"),m(1,"2"),r())}function Fe(e,t){e&1&&(o(0,"h6"),m(1,"3"),r())}var ue=(()=>{let t=class t{constructor(n,i){this.downloadService=n,this.authService=i,this.configs=[{column:"Url",prop:"URL"},{column:"POS",prop:"Name"},{column:"Exception",prop:"Message"}],this.downloadResponses=[],this.stepperState="DOWNLOAD",this.urlPlaceholder=`https://tokopedia.com/tokoriyanadi/kaos-polos-biru
|
|
2
|
+
https://tokopedia.com/tokoriyanadi/Celana-Chinos-Coklat`,this.currentDomain=this.authService.getDomain()}onStepperChange(n){this.stepperState=n.selectedStep.state}onSubmit(n){let i=this.urls.split(/\r?\n/);this.downloadService.download(i).subscribe(l=>{this.downloadResponses=l,this.mappingLinkToProduct(),this.onStepperNext(n)})}mappingLinkToProduct(){this.downloadResponses=this.downloadResponses.map(n=>(n.Name=n?.Name?`<a href="${this.currentDomain}/menu/Products/Catalog/Products/Info?ID=${n.ID}" target="_blank">
|
|
3
|
+
${n?.Name}
|
|
4
|
+
</a>`:"-",n))}onNewStepperState(n){this.downloadResponses=[],this.urls=null,this.stepperState="DOWNLOAD",n.reset(),this.onStepperNext(n)}onStepperNext(n){n.selected.completed=!0,n.next()}};t.\u0275fac=function(i){return new(i||t)(I(E),I(Q))},t.\u0275cmp=C({type:t,selectors:[["app-by-url"]],features:[P([{provide:ne,useValue:{displayDefaultIndicatorType:!1}}])],decls:24,vars:11,consts:[["stepper",""],["headerTitle","Tokopedia - Product Download By Url",3,"hideSearchBox","hideSearchDropdown"],[4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],["linear","",1,"stepper-downloadByUrl",3,"selectionChange","selectedIndex"],["state","GUIDE",3,"editable","completed"],["matStepLabel",""],["matStepContent",""],["state","DOWNLOAD",3,"editable","completed"],["state","FINISH"],["matStepperIcon","GUIDE"],["matStepperIcon","DOWNLOAD"],["matStepperIcon","FINISH"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-3",3,"click"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white","ms-3",3,"click","disabled"],[1,"fa-solid","fa-info","me-3"],[1,"mt-8"],[1,"card","border","w-50"],[1,"card-header","py-6"],[1,"text-primary"],[1,"card-body",2,"padding-left","0px"],[1,"mt-6"],["href","https://seller.tokopedia.com","target","_blank"],[1,"fa-solid","fa-download","me-3"],["name","url","cols","30","rows","25",1,"form-control",3,"ngModelChange","placeholder","ngModel"],[1,"fa-sharp","fa-solid","fa-flag","me-3"],["status","error",3,"data","configs"]],template:function(i,l){if(i&1){let fe=S();o(0,"mainpanel",1)(1,"actions"),c(2,be,4,0,"ng-container",2)(3,Ee,3,0,"ng-container",2)(4,Ie,3,0,"ng-container",2)(5,De,3,1,"ng-container",2),r(),o(6,"content")(7,"div",3)(8,"div",4)(9,"div",5)(10,"mat-stepper",6,0),y("selectionChange",function(_e){return g(fe),h(l.onStepperChange(_e))}),o(12,"mat-step",7),c(13,Te,3,0,"ng-template",8)(14,Ue,16,0,"ng-template",9),r(),o(15,"mat-step",10),c(16,Ne,3,0,"ng-template",8)(17,Me,2,2,"ng-template",9),r(),o(18,"mat-step",11),c(19,ke,3,0,"ng-template",8)(20,Oe,2,2,"ng-template",9),r(),c(21,Be,2,0,"ng-template",12)(22,Le,2,0,"ng-template",13)(23,Fe,2,0,"ng-template",14),r()()()()()()}i&2&&(s("hideSearchBox",!0)("hideSearchDropdown",!0),p(2),s("ngIf",l.stepperState=="FINISH"),p(),s("ngIf",l.stepperState=="DOWNLOAD"),p(),s("ngIf",l.stepperState=="GUIDE"),p(),s("ngIf",l.stepperState=="DOWNLOAD"),p(5),s("selectedIndex",1),p(2),s("editable",l.stepperState!="FINISH")("completed",!0),p(3),s("editable",l.stepperState!="FINISH")("completed",!1))},dependencies:[V,G,z,K,Y,le,oe,pe,re,ae,de],styles:[`@import"https://fonts.googleapis.com/icon?family=Material+Icons";.card-header{background-color:#00000008}mat-stepper.stepper-downloadByUrl>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%}
|
|
5
|
+
`],encapsulation:2});let e=t;return e})();var Re=[{path:"",component:ce,children:[{path:"by-url",component:ue,data:{title:"Download Product By Url"},canActivate:[X]},{pathMatch:"full",path:"",redirectTo:"by-url"}]}],dt=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=N({type:t}),t.\u0275inj=T({providers:[E],imports:[H,q,te,Z,se,ie,$.forChild(Re)]});let e=t;return e})();export{dt as DownloadModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{$b as d,Bd as w,Cd as y,Da as v,Ea as _,Eb as C,Gb as s,Gc as c,Hc as u,Pa as r,Sb as o,Tb as l,Ub as f,Yb as P,bc as h,jb as a,nc as m,oc as k,qc as N,ta as b,vc as S,vd as T}from"./chunk-PQDPS2ID.js";function I(t,i){if(t&1){let g=P();o(0,"span",10),d("click",function(){v(g);let n=h();return n.getTotal(),_(n.hasClicked=!0)}),o(1,"i",11),m(2,"?"),l()()}}function M(t,i){if(t&1&&(o(0,"span"),m(1),c(2,"number"),l()),t&2){let g=h();a(),k(u(2,1,g.paginationTotal))}}var O=(()=>{let i=class i{constructor(){this.get=new r,this.change=new r,this.next=new r,this.previous=new r,this.total=new r,this.hasClicked=!1}changePage(p){this.filter.PageNumber=p.pageIndex+1,this.change.emit(this.filter)}getTotal(){this.total.emit()}PreviousPage(){this.previous.emit()}NextPage(){this.next.emit()}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=b({type:i,selectors:[["app-mat-paginator-no-count"]],inputs:{filter:"filter",paginationTotal:"paginationTotal",totaldata:"totaldata",hasClicked:"hasClicked"},outputs:{get:"get",change:"change",next:"next",previous:"previous",total:"total"},standalone:!0,features:[S],decls:13,vars:10,consts:[[1,"d-flex","justify-content-end","mt-5"],[1,"d-sm-block","collapse","mt-3","me-5"],[1,"text-dark","hidden-xxs"],["style","cursor:pointer",3,"click",4,"ngIf"],[4,"ngIf"],[1,"btn-group"],["role","button",1,"btn","btn-outline-secondary","btn-sm","me-3","border-0",3,"click","disabled"],[1,"fa-solid","fa-chevron-left"],["role","button",1,"btn","btn-outline-secondary","btn-sm","border-0",3,"click","disabled"],[1,"fa-solid","fa-chevron-right"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"]],template:function(n,e){n&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),m(3),c(4,"number"),c(5,"number"),C(6,I,3,0,"span",3)(7,M,3,3,"span",4),l()(),o(8,"div",5)(9,"button",6),d("click",function(){return e.PreviousPage()}),f(10,"i",7),l(),o(11,"button",8),d("click",function(){return e.NextPage()}),f(12,"i",9),l()()()),n&2&&(a(3),N(" Showing ",u(4,6,e.filter.PageSize*(e.filter.PageNumber-1)+1)," - ",u(5,8,e.filter.PageSize*(e.filter.PageNumber-1)+e.totaldata)," of "),a(3),s("ngIf",!e.hasClicked),a(),s("ngIf",e.hasClicked),a(2),s("disabled",e.filter.PageNumber==1),a(2),s("disabled",e.filter.PageSize*(e.filter.PageNumber-1)+e.totaldata==e.paginationTotal||e.totaldata<e.filter.PageSize))},dependencies:[y,T,w]});let t=i;return t})();export{O as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as ct}from"./chunk-7AFVU7XM.js";import{a as Ct}from"./chunk-BQ7NR3ET.js";import{a as ht,b as ft}from"./chunk-UMNGKENU.js";import{f as gt}from"./chunk-HCDKYABV.js";import{b as D,c as E,i as k,j as w}from"./chunk-BO4PPSB5.js";import{t as P}from"./chunk-HUUFOAKH.js";import{X as mt}from"./chunk-E5GGIVK7.js";import{h as st,m as pt}from"./chunk-BSN7ZAXG.js";import{b as m,c as f}from"./chunk-6SF7AUOH.js";import{o as dt}from"./chunk-OVEJFFL6.js";import{$b as v,Bd as rt,Da as F,Ea as L,Eb as C,Fb as z,Gb as p,Gc as x,Hc as O,Jc as ot,Nb as G,Ob as et,Qb as nt,Rb as it,Sb as a,Tb as r,Ub as y,Vb as H,Wb as J,Yb as R,Z as X,bc as h,gb as I,jb as l,kb as g,mc as at,nc as s,oc as u,pa as Z,pc as S,rc as V,sc as U,sd as B,ta as T,tc as A,ud as K,v as Q,vd as $,xb as tt,xc as W,yd as lt}from"./chunk-PQDPS2ID.js";function bt(n,d){if(n&1&&(a(0,"mat-option",10)(1,"div",11),y(2,"img",12),a(3,"span"),s(4),r()()()),n&2){let t=d.$implicit;p("value",t.ID)("disabled",t.disabled),l(),p("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),l(),p("src",t.Img,I),l(2),u(t.Name)}}function Tt(n,d){if(n&1){let t=R();a(0,"div",13)(1,"label",14),s(2,"Scan Type"),r(),a(3,"mat-radio-group",15),A("ngModelChange",function(e){F(t);let o=h();return U(o.filter.ScanFull,e)||(o.filter.ScanFull=e),L(e)}),a(4,"mat-radio-button",16),s(5," Full (Include Inactive Products) "),r(),a(6,"mat-radio-button",17),s(7," Active "),r()()()}if(n&2){let t=h();l(3),V("ngModel",t.filter.ScanFull),l(),p("value",!0),l(2),p("value",!1)}}function It(n,d){n&1&&(a(0,"span"),s(1,"Never"),r())}function xt(n,d){if(n&1&&(a(0,"span"),s(1),x(2,"async"),r()),n&2){let t=h(2);l(),u(O(2,1,t.lastSync$))}}function Ot(n,d){if(n&1){let t=R();a(0,"div",8)(1,"label",3)(2,"span",18),s(3,"Last Scan:"),r(),C(4,It,2,0,"span"),x(5,"async"),C(6,xt,3,3,"span"),r(),a(7,"mat-radio-group",19),A("ngModelChange",function(e){F(t);let o=h();return U(o.filter.UpdatedProduct,e)||(o.filter.UpdatedProduct=e),L(e)}),a(8,"mat-radio-button",20),s(9," Scan All Products "),r(),a(10,"mat-radio-button",21),s(11),r()()()}if(n&2){let t=h();l(4),G(O(5,6,t.lastSync$)==null?4:6),l(3),V("ngModel",t.filter.UpdatedProduct),l(),p("value",!1),l(2),p("value",!0)("matTooltip",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Use Tokopedia URL for mapping SKU between POS and Tokopedia":"Scan only products that have been updated since the last channel scan"),l(),S(" ",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Product Download By URL":"Scan Updated Products"," ")}}function Pt(n,d){if(n&1){let t=R();a(0,"div",8)(1,"label",3),s(2," Scan Option "),r(),a(3,"mat-radio-group",22),A("ngModelChange",function(e){F(t);let o=h();return U(o.filter.Async,e)||(o.filter.Async=e),L(e)}),a(4,"mat-radio-button",23),s(5," Asynchronous (Get Notified when Complete) "),r(),a(6,"mat-radio-button",24),s(7," Synchronous (Wait until Complete) "),r()()()}if(n&2){let t=h();l(3),V("ngModel",t.filter.Async),l(),p("value",!0),l(2),p("value",!1)}}var te=(()=>{let d=class d{constructor(i,e,o){this.dialogRef=i,this.data=e,this.router=o,this.channelService=Z(ct),this.channelType=m,this.disabledChannelOption=!1,this.filter={ChannelID:f.GuidEMpty,ScanFull:!0,UpdatedProduct:!1,Async:!1},this.isSingleChannel=f.IsNotEmpty(e.isSingleChannel)?this.data.isSingleChannel:!1,this.disabledChannelOption=f.IsEmpty(e.disabledChannelOption)?!1:this.data.disabledChannelOption}ngOnInit(){this.initChannelOptions(),this.initFilter(),this.onSelectChannel(this.data?.filter?.ChannelID),this.initModalConfig()}initModalConfig(){this.modalConfig=new k,this.modalConfig.title=this.isSingleChannel?"Scan Single Product":"Scan Channel Marketplace",this.modalConfig.bodyScrollable=!0}initFilter(){this.filter.ChannelID=this.data?.filter?.ChannelID,this.filter.ScanFull=!1}initChannelOptions(){this.channelOptions=JSON.parse(JSON.stringify(this.data.channelOptions)),this.isSingleChannel&&(this.channelOptions=this.channelOptions.map(i=>(i.disabled=!0,(i.TypeID==m.Tiktok||i.TypeID==m.Tokopedia||i.TypeID==m.Lazada||i.TypeID==m.WooCommerce)&&(i.disabled=!1),i)).sort(i=>i.disabled?1:-1))}onSelectChannel(i){let e=this.filterChannelById(i);this.selectedChannel=e,this.filter.Async=!0,this.iniHasScanUpdate(),this.setDefaultConfigUpdate(),this.getLastSync(i)}getLastSync(i){this.lastSync$=this.channelService.getLastSync(i).pipe(Q(e=>f.IsNotEmpty(e.LastSync)?f.convertToReadableDate(e.LastSync):null),X(1))}setDefaultConfigUpdate(){this.filter.UpdatedProduct=!1,this.selectedChannel&&f.IsNotEmpty(this.selectedChannel.LastSync)&&(this.selectedChannel.TypeID==m.Shopee||this.selectedChannel.TypeID==m.Tiktok||this.selectedChannel.TypeID==m.Lazada)&&(this.filter.UpdatedProduct=!0)}iniHasScanUpdate(){this.selectedChannel?.TypeID!=m.WooCommerce&&this.selectedChannel?.TypeID!=m.KalCare&&this.selectedChannel?.TypeID!=m.None&&!this.isSingleChannel?this.hasScanUpdate=!0:this.hasScanUpdate=!1}filterChannelById(i){let e;return this.channelOptions&&(e=this.channelOptions.find(o=>o.ID==i)),e}submit(){this.selectedChannel.TypeID==m.Tokopedia&&this.filter.UpdatedProduct?this.router.navigate(["/menu/products/download/by-url"]).then(()=>{this.dialogRef.close()}):this.dialogRef.close(this.filter)}isNotEmpty(i){return f.IsNotEmpty(i)}onClose(){this.dialogRef.close()}};d.\u0275fac=function(e){return new(e||d)(g(D),g(E),g(dt))},d.\u0275cmp=T({type:d,selectors:[["app-scan-dialog"]],decls:11,vars:8,consts:[[3,"onOk","onClose","onCancel","dynamicValidated","config"],["content",""],[1,"mx-4"],[1,"mb-2","fw-bold"],["appearance","outline",1,"w-100"],["name","channelid","placeholder","Channel",1,"mat-select-channel",3,"ngModelChange","disabled","ngModel"],["class","channel-option",3,"value","disabled",4,"ngFor","ngForOf"],["class","mt-4",4,"ngIf"],[1,"mt-8"],["class","mt-8",4,"ngIf"],[1,"channel-option",3,"value","disabled"],["matTooltipPosition","above","matTooltipClass","custom-width-tooltip",3,"matTooltip"],[2,"width","18px","margin-right","10px",3,"src"],[1,"mt-4"],[1,"mb-2","fw-bold","mt-3"],["name","scanType",1,"form-control","h-100","round",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Full Scan Product",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Only Active Product",1,"me-5",3,"value"],[1,"me-2"],["name","ScanFull",1,"form-control","h-100","round",2,"line-height","2",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scan product from beginning ( use this if you haven't scanned at all)",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above",1,"me-5",3,"value","matTooltip"],["name","Async",1,"form-control","h-100","round",2,"line-height","2",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltip","Scan is running in the background, status will be visible in the notification menu","matTooltipPosition","above",1,"me-5",3,"value"],[1,"me-5",3,"value"]],template:function(e,o){e&1&&(a(0,"modal-material",0),v("onOk",function(){return o.submit()})("onClose",function(){return o.onClose()})("onCancel",function(){return o.onClose()}),a(1,"div",1)(2,"div",2)(3,"label",3),s(4,"Select a Channel"),r(),a(5,"mat-form-field",4)(6,"mat-select",5),A("ngModelChange",function(c){return U(o.filter.ChannelID,c)||(o.filter.ChannelID=c),c}),v("ngModelChange",function(c){return o.onSelectChannel(c)}),C(7,bt,5,5,"mat-option",6),r()(),C(8,Tt,8,3,"div",7)(9,Ot,12,8,"div",8)(10,Pt,8,3,"div",9),r()()()),e&2&&(p("dynamicValidated",o.isNotEmpty(o.filter.ChannelID))("config",o.modalConfig),l(6),p("disabled",o.disabledChannelOption),V("ngModel",o.filter.ChannelID),l(),p("ngForOf",o.channelOptions),l(),p("ngIf",!o.isSingleChannel&&o.isNotEmpty(o.filter.ChannelID)),l(),G(o.hasScanUpdate&&o.selectedChannel?9:-1),l(),p("ngIf",!o.isSingleChannel&&o.isNotEmpty(o.filter.ChannelID)))},dependencies:[K,$,st,pt,ht,ft,gt,Ct,mt,P,w,lt],encapsulation:2});let n=d;return n})();var M=function(n){return n.Tokopedia="https://seller.tokopedia.com",n.Shoope="https://seller.shopee.co.id",n.Tiktok="https://seller-id.tiktok.com",n.WooCommerce="https://woocommerce.dealpos.app",n.Lazada="https://sellercenter.lazada.co.id",n}(M||{});var Dt=n=>({"is-disabled":n});function Et(n,d){if(n&1&&(H(0),a(1,"tr")(2,"td",11),s(3),r(),a(4,"td",11),s(5),r(),a(6,"td",12)(7,"p",13),s(8,"Product Not in Channel!"),r()()(),J()),n&2){let t=h().$implicit;l(3),S(" ",t==null?null:t.Model,""),l(2),S(" ",t==null?null:t.Code,"")}}function kt(n,d){if(n&1&&(a(0,"td",11),s(1),r()),n&2){let t=h(3).$implicit;z("rowspan",t.Channel.length),l(),S(" ",t==null?null:t.Model,"")}}function wt(n,d){if(n&1&&(a(0,"td",11),s(1),r()),n&2){let t=h(3).$implicit;z("rowspan",t.Channel.length),l(),S(" ",t==null?null:t.Code,"")}}function Nt(n,d){if(n&1&&(a(0,"tr"),C(1,kt,2,2,"td",14)(2,wt,2,2,"td",14),a(3,"td",11)(4,"div",15)(5,"a",16),y(6,"img",17),r(),a(7,"div",18),s(8),r()()(),a(9,"td",11),s(10),x(11,"number"),r(),a(12,"td",19),s(13),x(14,"number"),r(),a(15,"td",19)(16,"a",20),y(17,"i",21),a(18,"span",22),s(19,"Edit"),r()()()()),n&2){let t=d.$implicit,i=d.index,e=h(3);l(),p("ngIf",i==0),l(),p("ngIf",i==0),l(3),p("href",t.Url,I)("title",t.Title),l(),p("src",e.getChannelLogo(t.TypeID),I),l(),p("matTooltip",(t==null||t.Name==null?null:t.Name.length)>55?t==null?null:t.Name:""),l(),S(" ",t.Name," "),l(2),u(O(11,12,t.Price)),l(3),u(O(14,14,t.Inventory)),l(3),p("href",e.getHyperlinkSellerCenter(t),I)("ngClass",W(16,Dt,t.TypeID==e.channelType.KalCare))("matTooltip",t.TypeID!=e.channelType.KalCare?"Edit this product in Seller Center, inventory changes must be done via DEALPOS":"")}}function Vt(n,d){if(n&1&&C(0,Nt,20,18,"tr",9),n&2){let t=h().$implicit;p("ngForOf",t==null?null:t.Channel)}}function Ut(n,d){if(n&1&&(H(0),C(1,Et,9,2,"ng-container",10)(2,Vt,1,1,"ng-template",null,0,ot),J()),n&2){let t=d.$implicit,i=at(3);l(),p("ngIf",!t.Channel||t.Channel.length<1)("ngIfElse",i)}}var de=(()=>{let d=class d{constructor(i,e){this.data=i,this.dialogRef=e,this.channelType=m,this.variants=i.variants,this.title=i.title}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new k,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0,this.modalConfig.hideCancel=!0,this.modalConfig.hideOk=!0}getChannelLogo(i){return f.getChannelLogoByTypeId(i)}getHyperlinkSellerCenter(i){let e="javascript:void(0)";switch(i.TypeID){case m.Shopee:e=`${M.Shoope}/portal/product/${i.ChannelItemID}`;break;case m.Tiktok:e=`${M.Tiktok}/product/edit/${i.ChannelItemID}`;break;case m.Tokopedia:e=`${M.Tokopedia}/edit-product/${i.ChannelItemID}`;break;case m.WooCommerce:e=`${M.WooCommerce}/wp-admin/post.php?post=${i.ChannelItemID}&action=edit`;break;case m.Lazada:e=`${M.Lazada}/apps/product/publish?productId=${i.ChannelItemID}`;break}return e}};d.\u0275fac=function(e){return new(e||d)(g(E),g(D))},d.\u0275cmp=T({type:d,selectors:[["app-modal-variant"]],decls:22,vars:2,consts:[["printChannelModal",""],[3,"onCancel","config"],["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"],[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,o){e&1&&(a(0,"modal-material",1),v("onCancel",function(){return o.dialogRef.close()}),a(1,"div",2)(2,"table",3)(3,"thead",4)(4,"tr")(5,"th",5),s(6," VARIANT "),a(7,"sup"),y(8,"i",6),r()(),a(9,"th",5),s(10,"SKU"),r(),a(11,"th",5),s(12," PRODUCT "),a(13,"sup"),y(14,"i",7),r()(),a(15,"th",5),s(16,"PRICE"),r(),a(17,"th",8),s(18,"INVENTORY"),r(),y(19,"th",5),r()(),a(20,"tbody"),C(21,Ut,4,2,"ng-container",9),r()()()()),e&2&&(p("config",o.modalConfig),l(21),p("ngForOf",o.variants))},dependencies:[B,K,$,P,w,rt],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}"]});let n=d;return n})();var At=n=>({"bg-gradient-warning":n});function Ft(n,d){if(n&1&&(a(0,"tr",5)(1,"td"),s(2),r(),a(3,"td",6),s(4),r()()),n&2){let t=d.$implicit;p("matTooltip",t.duplicateMessage),l(2),u(t==null?null:t.Name),l(),p("ngClass",W(4,At,t.isDuplicate)),l(),u(t!=null&&t.ChannelVariationSKU?t==null?null:t.ChannelVariationSKU:"Not Assigned")}}var Ce=(()=>{let d=class d{constructor(i,e){this.data=i,this.dialogRef=e,this.variants=tt([])}ngOnInit(){this.initModalConfig(),this.initVariants()}initVariants(){let i=this.data?.variants,e={},o=[],_=i.filter(c=>f.IsEmpty(c.ChannelVariationSKU));i.filter(c=>f.IsNotEmpty(c.ChannelVariationSKU)).forEach((c,b,Y)=>{e[c.ChannelVariationSKU]=Y.filter(N=>N.ChannelVariationSKU===c.ChannelVariationSKU)}),Object.keys(e).forEach(c=>{e[c].length>1&&(e[c]=e[c].map((b,Y,N)=>{let q=`SKU ${b.ChannelVariationSKU} is duplicated with variant`;return N.forEach((j,Mt)=>{j.Name!==b.Name&&(q+=` ${N.length>2?j.Name+(Mt!==N.length-1?",":""):j.Name}`)}),b.duplicateMessage=q,b.isDuplicate=!0,b})),o.push(...e[c])}),o.push(..._),this.variants.set(o)}initModalConfig(){this.modalConfig=new k,this.modalConfig.title=this.data?.title,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0,this.modalConfig.bodyScrollable=!0}};d.\u0275fac=function(e){return new(e||d)(g(E),g(D))},d.\u0275cmp=T({type:d,selectors:[["app-modal-variants"]],decls:12,vars:1,consts:[[3,"onCancel","config"],["content",""],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"sticky-top"],["matTooltipPosition","above",3,"matTooltip"],[3,"ngClass"]],template:function(e,o){e&1&&(a(0,"modal-material",0),v("onCancel",function(){return o.dialogRef.close()}),a(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),s(6,"Variant"),r(),a(7,"th",4),s(8,"SKU"),r()()(),a(9,"tbody"),nt(10,Ft,5,6,"tr",5,et),r()()()()),e&2&&(p("config",o.modalConfig),l(10),it(o.variants()))},dependencies:[B,P,w],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:#f6f6f6!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}"]});let n=d;return n})();export{te as a,de as b,Ce as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as J,b as K}from"./chunk-JXTGH22T.js";import{b as q,e as z}from"./chunk-4SAJUEHO.js";import{m as L,n as G}from"./chunk-BO4PPSB5.js";import"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{h as j,m as W,y as H}from"./chunk-BSN7ZAXG.js";import"./chunk-OVEJFFL6.js";import{$b as x,Cd as P,Da as d,Ea as u,Eb as f,Gb as l,Gc as S,Hc as v,Ob as I,Qb as k,Rb as T,Sb as a,Tb as c,Vb as _,Wb as C,Yb as g,Z as F,bc as p,ja as M,jb as s,nc as h,pa as m,pc as b,rc as V,sc as B,ta as E,tc as D,uc as R,vc as $,vd as A,xb as O,yd as N}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var w=(()=>{let t=class t{constructor(){this.httpService=m(z)}getClearCacheOptions$(){return this.httpService.get("/api/channelloader/OptionClearCache")}flushCache(o){return this.httpService.post("/api/Channel/RemoveCacheByRequest",o)}};t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=M({token:t,factory:t.\u0275fac});let i=t;return i})();function U(i,t){if(i&1){let r=g();_(0),a(1,"button",10),x("click",function(){let e=d(r).ngIf,n=p();return u(n.onFlushCache(e))}),h(2," Flush Cache "),c(),C()}if(i&2){let r,o=p();s(),l("disabled",((r=o.selectedOptions())==null?null:r.length)==0)}}function X(i,t){if(i&1){let r=g();_(0),a(1,"mat-checkbox",11),x("change",function(e){let n=d(r).ngIf,y=p();return u(y.onSelectAll(e.checked,n))}),c(),C()}}function Y(i,t){if(i&1){let r=g();a(0,"tr")(1,"td")(2,"div")(3,"mat-checkbox",12),D("ngModelChange",function(e){let n=d(r).$implicit;return B(n.selected,e)||(n.selected=e),u(e)}),x("ngModelChange",function(){d(r);let e=p().ngIf,n=p();return u(n.onSelectOption(e))}),c()()(),a(4,"td"),h(5),c(),a(6,"td")(7,"div",13),h(8),c()()()}if(i&2){let r=t.$implicit;s(3),V("ngModel",r.selected),s(2),b(" ",r.Name," "),s(3),b(" ",r.Description," ")}}function Z(i,t){if(i&1&&(_(0),k(1,Y,9,3,"tr",null,I),C()),i&2){let r=t.ngIf;s(),T(r)}}var ge=(()=>{let t=class t{constructor(){this.flushCacheService=m(w),this.toastr=m(q),this.clearCacheOptions$=this.flushCacheService.getClearCacheOptions$().pipe(F(1)),this.selectedOptions=O([])}onFlushCache(o){confirm("Are you sure you want to flush the cache?")&&this.flushCacheService.flushCache(this.selectedOptions()).subscribe(n=>{this.toastr.success(n.Message,"Successfully flushed the cache"),o.forEach(y=>y.selected=!1)})}onSelectAll(o,e){e.forEach(n=>n.selected=o),this.onSelectOption(e)}onSelectOption(o){let e=o.filter(n=>n.selected).map(n=>n.ID);this.selectedOptions.set(e)}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=E({type:t,selectors:[["app-flush-cache"]],standalone:!0,features:[R([w]),$],decls:22,vars:11,consts:[["headerTitle","Flush Cache",3,"hideSearchBox","hideSearchDropdown"],[4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[2,"width","20px"],[2,"width","300px"],[1,"btn","btn-success","btn-lg","text-success","me-2",3,"click","disabled"],["color","primary",2,"margin-bottom","-5px","margin-top","-5px",3,"change"],["color","primary",2,"margin-bottom","-5px","margin-top","-5px",3,"ngModelChange","ngModel"],[1,"text-capitalize"]],template:function(e,n){e&1&&(a(0,"mainpanel",0)(1,"actions"),f(2,U,3,1,"ng-container",1),S(3,"async"),c(),a(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"table",6)(10,"thead")(11,"tr",7)(12,"th",8),f(13,X,2,0,"ng-container",1),S(14,"async"),c(),a(15,"th",9),h(16,"Cache"),c(),a(17,"th"),h(18,"Description"),c()()(),a(19,"tbody"),f(20,Z,3,0,"ng-container",1),S(21,"async"),c()()()()()()()()),e&2&&(l("hideSearchBox",!0)("hideSearchDropdown",!0),s(2),l("ngIf",v(3,5,n.clearCacheOptions$)),s(11),l("ngIf",v(14,7,n.clearCacheOptions$)),s(7),l("ngIf",v(21,9,n.clearCacheOptions$)))},dependencies:[P,A,N,G,L,K,J,H,j,W]});let i=t;return i})();export{ge as FlushCacheComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as ee}from"./chunk-OVEJFFL6.js";import{B as M,Ca as q,F as z,J as F,O as H,Pa as $,S as G,U as v,Zc as _,_ as C,aa as j,ea as V,g as f,ja as P,ka as Y,ma as T,mb as Q,oa as d,p,pa as S,q as h,ua as Z,v as E,va as J,vb as X,x as y,y as U}from"./chunk-PQDPS2ID.js";import{a as m,b as A}from"./chunk-GNOSNGXM.js";var c=function(s){return s[s.Tokopedia=1]="Tokopedia",s[s.WooCommerce=2]="WooCommerce",s[s.None=3]="None",s[s.KalCare=4]="KalCare",s[s.Shopee=5]="Shopee",s[s.Tiktok=6]="Tiktok",s[s.Lazada=7]="Lazada",s[s.Shopify=8]="Shopify",s}(c||{});var u=function(s){return s.SHOOPE="https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png",s.WOOCOMMERCE="https://res.cloudinary.com/pos/image/upload/w_50/v1632447439/icons/WooCommerce/woocommerce-icon.webp",s.TOKOPEDIA="https://res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png",s.TIKTOK="https://res.cloudinary.com/pos/image/upload/w_30/v1645761611/icons/Marketplace%20logo/tiktok.png",s.LAZADA="https://res.cloudinary.com/pos/image/upload/v1680681836/icons/marketplace_icons/Lazadanew.png",s.KALCARE="https://res.cloudinary.com/pos/image/upload/v1654230268/icons/marketplace_icons/kalcare.png",s.SHOPIFY="https://res.cloudinary.com/pos/image/upload/v1707987435/icons/marketplace_icons/shopify.png",s}(u||{});var fe=(()=>{let r=class r{static IsNotEmpty(e){return e!=""&&e!=r.GuidEMpty&&e!=null&&e!=null}static IsEmpty(e){return e==""||e==null||e==null||e==r.GuidEMpty}static getChannelLogoByTypeId(e){let t;switch(e){case c.Tokopedia:t=u.TOKOPEDIA;break;case c.Shopee:t=u.SHOOPE;break;case c.WooCommerce:t=u.WOOCOMMERCE;break;case c.Lazada:t=u.LAZADA;break;case c.Tiktok:t=u.TIKTOK;break;case c.KalCare:t=u.KALCARE;break;case c.Shopify:t=u.SHOPIFY;break}return t}static getChannelLogoByName(e=""){e=e.toLowerCase();let t;switch(e){case"tokopedia":t=u.TOKOPEDIA;break;case"shoppe":t=u.SHOOPE;break;case"woocommerce":t=u.WOOCOMMERCE;break;case"tiktok":t=u.TIKTOK;break;case"lazada":t=u.LAZADA;break;case"kalCare":t=u.KALCARE;break}return t}static getChannelName(e){let t;switch(e){case c.Shopee:t="Shopee";break;case c.Tokopedia:t="Tokopedia";break;case c.Lazada:t="Lazada";break;case c.Tiktok:t="Tiktok";break;case c.WooCommerce:t="WooCommerce";break;case c.KalCare:t="WooCommerce";break}return t}static assignChannelLogo(e){return e=e.map(t=>(t.logo=this.getChannelLogoByTypeId(t.TypeID),t)),e}static getCssChannelColor(e){let t;switch(e){case c.Shopee:t="#ee4d2d";break;case c.Tokopedia:t="var(--G500,#03AC0E)";break;case c.Lazada:t="#FF00B2";break;case c.Tiktok:t="black";break;case c.WooCommerce:t="#674399";break;case c.KalCare:t="rgb(128, 188, 0)";break}return t}static getDaysDiff(e,t){var i=t.getTime()-e.getTime(),n=i/(1e3*60*60*24);return n}static addDays(e,t){let i=new Date(Number(e));return i.setDate(e.getDate()-t),i}static isValidDate(e){return e instanceof Date&&!isNaN(e)}static getImageInfo(e){return new Promise((t,i)=>{let n=new Image;n.src=e,n.decode().then(()=>{t({img:e,height:n.height,width:n.width})}).catch(()=>{i(new Error(`Image load error for ${e}`))})})}static formatTitleFromDate(e,t){let i=null,n=new Date(e),o=new Date(t);return n.getDate()!=o.getDate()&&(i="dd"),n.getMonth()!=o.getMonth()&&(i="dd MMM"),n.getFullYear()!=o.getFullYear()&&(i="dd MMM yyyy"),i}static openDownloadFile(e,t){var i=window.URL.createObjectURL(e),n=document.createElement("a");n.href=i,n.download=t,n.click()}static compare(e,t,i){return(e<t?-1:1)*(i?1:-1)}static isDateExpired(e){let t=new Date,i=!1;return e.getTime()<t.getTime()&&(i=!0),i}static getLabelPathTree(e){let t=[],i=e;for(;i;)t.unshift(i.label),i=i.parent;return t.join(" / ")}static searchByIdWithParentDFS(e,t){let i=[...e],n;for(typeof t=="number"?n=JSON.stringify(t):n=t;i.length>0;){let o=i.pop();if(o.id===n)return o;if(o.children&&o.children.length>0)for(let a of o.children)a.parent=o,i.push(a)}return null}static getTimeDifference(e){let t=new Date(e),i=new Date,n=Math.abs(t.getTime()-i.getTime()),o=1e3,a=6e4,g=60*a,x=24*g,ne=Math.floor(n/x),oe=Math.floor(n%x/g),ae=Math.floor(n%g/a),ce=Math.floor(n%a/o);return{days:ne,hours:oe,minutes:ae,seconds:ce}}static convertToReadableDate(e){let{days:t,hours:i,minutes:n,seconds:o}=r.getTimeDifference(e),a="";return t>0&&i>0&&n>0&&(a=`${t} days, ${i} hours and ${n} minutes ago`),t>0&&i>0&&n==0&&(a=`${t} days and ${i} hours ago`),t>0&&i==0&&(a=`${t} days ago`),t==0&&i>0&&n>0&&(a=`${i} hours and ${n} minutes ago`),t==0&&i>0&&n==0&&(a=`${i} hours ago`),t==0&&i==0&&n>0&&(a=`${n} minutes ago`),t==0&&i==0&&n==0&&o>0&&(a=`${o} seconds ago`),a}static isValidGUID(e){let t=new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$","i");return this.IsEmpty(e)?!1:!!t.test(e)}};r.GuidEMpty="00000000-0000-0000-0000-000000000000",r.MinDate="0001-01-01T00:00:00";let s=r;return s})();var w={REMOVE:"remove",SHOW:"show"},ie=(()=>{let r=class r{constructor(){this.strategiesSource=new f({}),this.strategies$=this.strategiesSource.asObservable()}};r.\u0275fac=function(t){return new(t||r)},r.\u0275prov=P({token:r,factory:r.\u0275fac});let s=r;return s})(),L=new T("USE_CONFIGURATION_STORE"),K=(()=>{let r=class r{constructor(e=!1,t){this.isolate=e,this.configurationStore=t,this.strategiesSource=this.isolate?new f({}):this.configurationStore.strategiesSource,this.strategies$=this.strategiesSource.asObservable(),this.onAuthorisedDefaultStrategy=this.isolate?void 0:this.configurationStore.onAuthorisedDefaultStrategy,this.onUnAuthorisedDefaultStrategy=this.isolate?void 0:this.configurationStore.onUnAuthorisedDefaultStrategy}setDefaultOnAuthorizedStrategy(e){this.isolate?this.onAuthorisedDefaultStrategy=this.getDefinedStrategy(e):(this.configurationStore.onAuthorisedDefaultStrategy=this.getDefinedStrategy(e),this.onAuthorisedDefaultStrategy=this.configurationStore.onAuthorisedDefaultStrategy)}setDefaultOnUnauthorizedStrategy(e){this.isolate?this.onUnAuthorisedDefaultStrategy=this.getDefinedStrategy(e):(this.configurationStore.onUnAuthorisedDefaultStrategy=this.getDefinedStrategy(e),this.onUnAuthorisedDefaultStrategy=this.configurationStore.onUnAuthorisedDefaultStrategy)}addPermissionStrategy(e,t){this.strategiesSource.value[e]=t}getStrategy(e){return this.strategiesSource.value[e]}getAllStrategies(){return this.strategiesSource.value}getDefinedStrategy(e){if(this.strategiesSource.value[e]||this.isPredefinedStrategy(e))return e;throw new Error(`No ' ${e} ' strategy is found please define one`)}isPredefinedStrategy(e){return e===w.SHOW||e===w.REMOVE}};r.\u0275fac=function(t){return new(t||r)(d(L),d(ie))},r.\u0275prov=P({token:r,factory:r.\u0275fac});let s=r;return s})();function l(s){return typeof s=="function"}function W(s){if(Object.prototype.toString.call(s)!=="[object Object]")return!1;{let r=Object.getPrototypeOf(s);return r===null||r===Object.prototype}}function se(s){return!!s&&typeof s=="string"}function R(s){return typeof s=="boolean"}function he(s){return Object.prototype.toString.call(s)==="[object Promise]"}function D(s){return Array.isArray(s)?s.length>0:!!s}function b(s){return se(s)?[s]:s}var re=(()=>{let r=class r{constructor(){this.permissionsSource=new f({}),this.permissions$=this.permissionsSource.asObservable()}};r.\u0275fac=function(t){return new(t||r)},r.\u0275prov=P({token:r,factory:r.\u0275fac});let s=r;return s})(),B=new T("USE_PERMISSIONS_STORE"),O=(()=>{let r=class r{constructor(e=!1,t){this.isolate=e,this.permissionsStore=t,this.permissionsSource=this.isolate?new f({}):this.permissionsStore.permissionsSource,this.permissions$=this.permissionsSource.asObservable()}flushPermissions(){this.permissionsSource.next({})}hasPermission(e){return!e||Array.isArray(e)&&e.length===0?Promise.resolve(!0):(e=b(e),this.hasArrayPermission(e))}loadPermissions(e,t){let i=e.reduce((n,o)=>this.reducePermission(n,o,t),{});this.permissionsSource.next(i)}addPermission(e,t){if(Array.isArray(e)){let i=e.reduce((n,o)=>this.reducePermission(n,o,t),this.permissionsSource.value);this.permissionsSource.next(i)}else{let i=this.reducePermission(this.permissionsSource.value,e,t);this.permissionsSource.next(i)}}removePermission(e){let t=m({},this.permissionsSource.value);delete t[e],this.permissionsSource.next(t)}getPermission(e){return this.permissionsSource.value[e]}getPermissions(){return this.permissionsSource.value}reducePermission(e,t,i){return i&&l(i)?A(m({},e),{[t]:{name:t,validationFunction:i}}):A(m({},e),{[t]:{name:t}})}hasArrayPermission(e){let t=e.map(i=>{if(this.hasPermissionValidationFunction(i)){let n=this.permissionsSource.value[i].validationFunction,o=m({},this.permissionsSource.value);return h(null).pipe(E(()=>n(i,o)),j(a=>R(a)?h(a):a),F(()=>h(!1)))}return h(!!this.permissionsSource.value[i])});return p(t).pipe(U(),v(i=>i!==!1,!1),E(i=>i!==!1)).toPromise().then(i=>i)}hasPermissionValidationFunction(e){return!!this.permissionsSource.value[e]&&!!this.permissionsSource.value[e].validationFunction&&l(this.permissionsSource.value[e].validationFunction)}};r.\u0275fac=function(t){return new(t||r)(d(B),d(re))},r.\u0275prov=P({token:r,factory:r.\u0275fac});let s=r;return s})(),k=class{constructor(){this.rolesSource=new f({}),this.roles$=this.rolesSource.asObservable()}},N=new T("USE_ROLES_STORE"),I=(()=>{let r=class r{constructor(e=!1,t,i){this.isolate=e,this.rolesStore=t,this.permissionsService=i,this.rolesSource=this.isolate?new f({}):this.rolesStore.rolesSource,this.roles$=this.rolesSource.asObservable()}addRole(e,t){let i=A(m({},this.rolesSource.value),{[e]:{name:e,validationFunction:t}});this.rolesSource.next(i)}addRoleWithPermissions(e,t){this.permissionsService.addPermission(t),this.addRole(e,t)}addRoles(e){Object.keys(e).forEach((t,i)=>{this.addRole(t,e[t])})}addRolesWithPermissions(e){Object.keys(e).forEach((t,i)=>{this.addRoleWithPermissions(t,e[t])})}flushRoles(){this.rolesSource.next({})}flushRolesAndPermissions(){this.flushRoles(),this.permissionsService.flushPermissions()}removeRole(e){let t=m({},this.rolesSource.value);delete t[e],this.rolesSource.next(t)}getRoles(){return this.rolesSource.value}getRole(e){return this.rolesSource.value[e]}hasOnlyRoles(e){return!e||Array.isArray(e)&&e.length===0?Promise.resolve(!0):(e=b(e),Promise.all([this.hasRoleKey(e),this.hasRolePermission(this.rolesSource.value,e)]).then(([i,n])=>i||n))}hasRoleKey(e){let t=e.map(i=>{if(!!this.rolesSource.value[i]&&!!this.rolesSource.value[i].validationFunction&&l(this.rolesSource.value[i].validationFunction)&&!he(this.rolesSource.value[i].validationFunction)){let o=this.rolesSource.value[i].validationFunction,a=m({},this.rolesSource.value);return h(null).pipe(E(()=>o(i,a)),j(g=>R(g)?h(g):g),F(()=>h(!1)))}return h(!1)});return p(t).pipe(U(),v(i=>i!==!1,!1),E(i=>i!==!1)).toPromise().then(i=>i)}hasRolePermission(e,t){return p(t).pipe(y(i=>e[i]&&Array.isArray(e[i].validationFunction)?p(e[i].validationFunction).pipe(y(n=>this.permissionsService.hasPermission(n)),G(n=>n===!0)):h(!1)),v(i=>i===!0,!1)).toPromise()}};r.\u0275fac=function(t){return new(t||r)(d(N),d(k),d(O))},r.\u0275prov=P({token:r,factory:r.\u0275fac});let s=r;return s})(),Re=(()=>{let r=class r{constructor(){this.permissionsAuthorized=new $,this.permissionsUnauthorized=new $,this.firstMergeUnusedRun=1,this.permissionsService=S(O),this.configurationService=S(K),this.rolesService=S(I),this.viewContainer=S(X),this.changeDetector=S(_),this.templateRef=S(Q)}ngOnInit(){this.viewContainer.clear(),this.initPermissionSubscription=this.validateExceptOnlyPermissions()}ngOnChanges(e){let t=e.ngxPermissionsOnly,i=e.ngxPermissionsExcept;if(t||i){if(t&&t.firstChange||i&&i.firstChange)return;z(this.permissionsService.permissions$,this.rolesService.roles$).pipe(C(this.firstMergeUnusedRun),H(1)).subscribe(()=>{if(D(this.ngxPermissionsExcept)){this.validateExceptAndOnlyPermissions();return}if(D(this.ngxPermissionsOnly)){this.validateOnlyPermissions();return}this.handleAuthorisedPermission(this.getAuthorisedTemplates())})}}ngOnDestroy(){this.initPermissionSubscription&&this.initPermissionSubscription.unsubscribe()}validateExceptOnlyPermissions(){return z(this.permissionsService.permissions$,this.rolesService.roles$).pipe(C(this.firstMergeUnusedRun)).subscribe(()=>{if(D(this.ngxPermissionsExcept)){this.validateExceptAndOnlyPermissions();return}if(D(this.ngxPermissionsOnly)){this.validateOnlyPermissions();return}this.handleAuthorisedPermission(this.getAuthorisedTemplates())})}validateExceptAndOnlyPermissions(){Promise.all([this.permissionsService.hasPermission(this.ngxPermissionsExcept),this.rolesService.hasOnlyRoles(this.ngxPermissionsExcept)]).then(([e,t])=>{if(e||t){this.handleUnauthorisedPermission(this.ngxPermissionsExceptElse||this.ngxPermissionsElse);return}if(this.ngxPermissionsOnly)throw!1;this.handleAuthorisedPermission(this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef)}).catch(()=>{this.ngxPermissionsOnly?this.validateOnlyPermissions():this.handleAuthorisedPermission(this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef)})}validateOnlyPermissions(){Promise.all([this.permissionsService.hasPermission(this.ngxPermissionsOnly),this.rolesService.hasOnlyRoles(this.ngxPermissionsOnly)]).then(([e,t])=>{e||t?this.handleAuthorisedPermission(this.ngxPermissionsOnlyThen||this.ngxPermissionsThen||this.templateRef):this.handleUnauthorisedPermission(this.ngxPermissionsOnlyElse||this.ngxPermissionsElse)}).catch(()=>{this.handleUnauthorisedPermission(this.ngxPermissionsOnlyElse||this.ngxPermissionsElse)})}handleUnauthorisedPermission(e){if(!(R(this.currentAuthorizedState)&&!this.currentAuthorizedState)){if(this.currentAuthorizedState=!1,this.permissionsUnauthorized.emit(),this.getUnAuthorizedStrategyInput()){this.applyStrategyAccordingToStrategyType(this.getUnAuthorizedStrategyInput());return}this.configurationService.onUnAuthorisedDefaultStrategy&&!this.elseBlockDefined()?this.applyStrategy(this.configurationService.onUnAuthorisedDefaultStrategy):this.showTemplateBlockInView(e)}}handleAuthorisedPermission(e){if(!(R(this.currentAuthorizedState)&&this.currentAuthorizedState)){if(this.currentAuthorizedState=!0,this.permissionsAuthorized.emit(),this.getAuthorizedStrategyInput()){this.applyStrategyAccordingToStrategyType(this.getAuthorizedStrategyInput());return}this.configurationService.onAuthorisedDefaultStrategy&&!this.thenBlockDefined()?this.applyStrategy(this.configurationService.onAuthorisedDefaultStrategy):this.showTemplateBlockInView(e)}}applyStrategyAccordingToStrategyType(e){if(se(e)){this.applyStrategy(e);return}if(l(e)){this.showTemplateBlockInView(this.templateRef),e(this.templateRef);return}}showTemplateBlockInView(e){this.viewContainer.clear(),e&&(this.viewContainer.createEmbeddedView(e),this.changeDetector.markForCheck())}getAuthorisedTemplates(){return this.ngxPermissionsOnlyThen||this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef}elseBlockDefined(){return!!this.ngxPermissionsExceptElse||!!this.ngxPermissionsElse}thenBlockDefined(){return!!this.ngxPermissionsExceptThen||!!this.ngxPermissionsThen}getAuthorizedStrategyInput(){return this.ngxPermissionsOnlyAuthorisedStrategy||this.ngxPermissionsExceptAuthorisedStrategy||this.ngxPermissionsAuthorisedStrategy}getUnAuthorizedStrategyInput(){return this.ngxPermissionsOnlyUnauthorisedStrategy||this.ngxPermissionsExceptUnauthorisedStrategy||this.ngxPermissionsUnauthorisedStrategy}applyStrategy(e){if(e===w.SHOW){this.showTemplateBlockInView(this.templateRef);return}if(e===w.REMOVE){this.viewContainer.clear();return}let t=this.configurationService.getStrategy(e);this.showTemplateBlockInView(this.templateRef),t(this.templateRef)}};r.\u0275fac=function(t){return new(t||r)},r.\u0275dir=J({type:r,selectors:[["","ngxPermissionsOnly",""],["","ngxPermissionsExcept",""]],inputs:{ngxPermissionsOnly:"ngxPermissionsOnly",ngxPermissionsOnlyThen:"ngxPermissionsOnlyThen",ngxPermissionsOnlyElse:"ngxPermissionsOnlyElse",ngxPermissionsExcept:"ngxPermissionsExcept",ngxPermissionsExceptElse:"ngxPermissionsExceptElse",ngxPermissionsExceptThen:"ngxPermissionsExceptThen",ngxPermissionsThen:"ngxPermissionsThen",ngxPermissionsElse:"ngxPermissionsElse",ngxPermissionsOnlyAuthorisedStrategy:"ngxPermissionsOnlyAuthorisedStrategy",ngxPermissionsOnlyUnauthorisedStrategy:"ngxPermissionsOnlyUnauthorisedStrategy",ngxPermissionsExceptUnauthorisedStrategy:"ngxPermissionsExceptUnauthorisedStrategy",ngxPermissionsExceptAuthorisedStrategy:"ngxPermissionsExceptAuthorisedStrategy",ngxPermissionsUnauthorisedStrategy:"ngxPermissionsUnauthorisedStrategy",ngxPermissionsAuthorisedStrategy:"ngxPermissionsAuthorisedStrategy"},outputs:{permissionsAuthorized:"permissionsAuthorized",permissionsUnauthorized:"permissionsUnauthorized"},features:[q]});let s=r;return s})(),ue="default";var te=(()=>{let r=class r{constructor(e,t,i){this.permissionsService=e,this.rolesService=t,this.router=i}canActivate(e,t){return this.hasPermissions(e,t)}canActivateChild(e,t){return this.hasPermissions(e,t)}canLoad(e){return this.hasPermissions(e)}canMatch(e){return this.hasPermissions(e)}hasPermissions(e,t){let i=e&&e.data?e.data.permissions:{},n=this.transformPermission(i,e,t);return this.isParameterAvailable(n.except)?this.passingExceptPermissionsValidation(n,e,t):this.isParameterAvailable(n.only)?this.passingOnlyPermissionsValidation(n,e,t):!0}transformPermission(e,t,i){let n=l(e.only)?e.only(t,i):b(e.only),o=l(e.except)?e.except(t,i):b(e.except),a=e.redirectTo;return{only:n,except:o,redirectTo:a}}isParameterAvailable(e){return!!e&&e.length>0}passingExceptPermissionsValidation(e,t,i){if(e.redirectTo&&(l(e.redirectTo)||W(e.redirectTo)&&!this.isRedirectionWithParameters(e.redirectTo))){let n="";return p(e.except).pipe(y(o=>M([this.permissionsService.hasPermission(o),this.rolesService.hasOnlyRoles(o)]).pipe(V(a=>{a.every(x=>x===!1)||(n=o)}))),v(o=>o.some(a=>a===!0),!1),y(o=>n?(this.handleRedirectOfFailedPermission(e,n,t,i),h(!1)):!o&&e.only?this.onlyRedirectCheck(e,t,i):h(!o))).toPromise()}return Promise.all([this.permissionsService.hasPermission(e.except),this.rolesService.hasOnlyRoles(e.except)]).then(([n,o])=>n||o?(e.redirectTo&&this.redirectToAnotherRoute(e.redirectTo,t,i),!1):e.only?this.checkOnlyPermissions(e,t,i):!0)}redirectToAnotherRoute(e,t,i,n){let o=l(e)?e(n,t,i):e;if(this.isRedirectionWithParameters(o)){o.navigationCommands=this.transformNavigationCommands(o.navigationCommands,t,i),o.navigationExtras=this.transformNavigationExtras(o.navigationExtras,t,i),this.router.navigate(o.navigationCommands,o.navigationExtras);return}Array.isArray(o)?this.router.navigate(o):this.router.navigate([o])}isRedirectionWithParameters(e){return W(e)&&(!!e.navigationCommands||!!e.navigationExtras)}transformNavigationCommands(e,t,i){return l(e)?e(t,i):e}transformNavigationExtras(e,t,i){return l(e)?e(t,i):e}onlyRedirectCheck(e,t,i){let n="";return p(e.only).pipe(y(o=>M([this.permissionsService.hasPermission(o),this.rolesService.hasOnlyRoles(o)]).pipe(V(a=>{a.every(x=>x===!1)&&(n=o)}))),v(o=>l(e.redirectTo)?o.some(a=>a===!0):o.every(a=>a===!1),!1),y(o=>l(e.redirectTo)?o?h(!0):(this.handleRedirectOfFailedPermission(e,n,t,i),h(!1)):(n&&this.handleRedirectOfFailedPermission(e,n,t,i),h(!o)))).toPromise()}handleRedirectOfFailedPermission(e,t,i,n){this.isFailedPermissionPropertyOfRedirectTo(e,t)?this.redirectToAnotherRoute(e.redirectTo[t],i,n,t):l(e.redirectTo)?this.redirectToAnotherRoute(e.redirectTo,i,n,t):this.redirectToAnotherRoute(e.redirectTo[ue],i,n,t)}isFailedPermissionPropertyOfRedirectTo(e,t){return!!e.redirectTo&&e.redirectTo[t]}checkOnlyPermissions(e,t,i){let n=m({},e);return Promise.all([this.permissionsService.hasPermission(n.only),this.rolesService.hasOnlyRoles(n.only)]).then(([o,a])=>o||a?!0:(n.redirectTo&&this.redirectToAnotherRoute(n.redirectTo,t,i),!1))}passingOnlyPermissionsValidation(e,t,i){return l(e.redirectTo)||W(e.redirectTo)&&!this.isRedirectionWithParameters(e.redirectTo)?this.onlyRedirectCheck(e,t,i):this.checkOnlyPermissions(e,t,i)}};r.\u0275fac=function(t){return new(t||r)(d(O),d(I),d(ee))},r.\u0275prov=P({token:r,factory:r.\u0275fac});let s=r;return s})();var be=(()=>{let r=class r{static forRoot(e={}){return{ngModule:r,providers:[re,k,ie,O,te,I,K,{provide:B,useValue:e.permissionsIsolate},{provide:N,useValue:e.rolesIsolate},{provide:L,useValue:e.configurationIsolate}]}}static forChild(e={}){return{ngModule:r,providers:[{provide:B,useValue:e.permissionsIsolate},{provide:N,useValue:e.rolesIsolate},{provide:L,useValue:e.configurationIsolate},K,O,I,te]}}};r.\u0275fac=function(t){return new(t||r)},r.\u0275mod=Z({type:r}),r.\u0275inj=Y({});let s=r;return s})();export{u as a,c as b,fe as c,O as d,Re as e,be as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{$b as m,Bd as N,Cd as T,Da as C,Ea as b,Eb as v,Gb as p,Gc as d,Hc as u,Pa as s,Sb as a,Tb as l,Ub as c,Yb as _,bc as g,jb as n,nc as o,oc as k,pc as w,qc as x,ta as P,vc as S,vd as y}from"./chunk-PQDPS2ID.js";function E(t,i){if(t&1){let f=_();a(0,"span",10),m("click",function(){C(f);let r=g();return b(r.onShowTotal())}),a(1,"i",11),o(2,"?"),l()()}}function z(t,i){if(t&1&&(a(0,"span"),o(1),d(2,"number"),l()),t&2){let f=g();n(),k(u(2,1,f.paginationTotal))}}var O=(()=>{let i=class i{constructor(){this.next=new s,this.filterChange=new s,this.previous=new s,this.total=new s,this.hasClicked=!1}onShowTotal(){this.total.emit()}onPreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.filterChange.emit(this.filter),this.previous.emit()}onNextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.filterChange.emit(this.filter),this.next.emit()}};i.\u0275fac=function(r){return new(r||i)},i.\u0275cmp=P({type:i,selectors:[["app-custom-paginator"]],inputs:{filter:"filter",paginationTotal:"paginationTotal",totaldata:"totaldata",hasClicked:"hasClicked"},outputs:{next:"next",filterChange:"filterChange",previous:"previous",total:"total"},standalone:!0,features:[S],decls:16,vars:11,consts:[[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"],[4,"ngIf"],[1,"btn-group"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click","hidden"],[1,"fas","fa-arrow-left"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click","hidden"],[1,"fas","fa-arrow-right"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"]],template:function(r,e){r&1&&(a(0,"div",0)(1,"div",1)(2,"div",2),o(3),d(4,"number"),d(5,"number"),v(6,E,3,0,"span",3)(7,z,3,3,"span",4),o(8),l()(),a(9,"div",5)(10,"a",6),m("click",function(){return e.onPreviousPage()}),c(11,"i",7),o(12," Prev"),l(),a(13,"a",8),m("click",function(){return e.onNextPage()}),c(14,"i",9),o(15," Next"),l()()()),r&2&&(n(3),x(" Showing ",u(4,7,e.filter.PageSize*(e.filter.PageNumber-1)+1)," - ",u(5,9,e.filter.PageSize*(e.filter.PageNumber-1)+e.totaldata)," of "),n(3),p("ngIf",!e.hasClicked),n(),p("ngIf",e.hasClicked),n(),w(" records ~ ",e.filter.PageNumber," Page "),n(2),p("hidden",e.filter.PageNumber==1),n(3),p("hidden",e.filter.PageSize*(e.filter.PageNumber-1)+e.totaldata==e.paginationTotal||e.totaldata<e.filter.PageSize))},dependencies:[T,y,N]});let t=i;return t})();export{O as a};
|