Viewing File: /usr/local/cpanel/whostmgr/docroot/templates/whm-marketplace/main.min.js

"use strict";(self.webpackChunkwhm_marketplace=self.webpackChunkwhm_marketplace||[]).push([[792],{5179:(h,E,l)=>{var f=l(345),t=l(3953),u=l(1562),c=l(177),j=l(8658),d=l(6805),p=l(6381),G=l(7410),g=l(3209);let T=(()=>{class e{constructor(n){this.locale=n,this.title="whm-marketplace",G.uv.locale=this.locale}static#t=this.ɵfac=function(a){return new(a||e)(t.rXU(p.h))};static#n=this.ɵcmp=t.VBU({type:e,selectors:[["whm-marketplace-root"]],decls:3,vars:1,consts:[[1,"description"]],template:function(a,o){1&a&&(t.j41(0,"div",0),t.EFF(1),t.k0s(),t.nrm(2,"router-outlet")),2&a&&(t.R7$(),t.SpI(" ",o.locale.maketext("This interface enables you to manage licenses on your server as well as install products with active licenses."),"\n"))},dependencies:[g.n3],encapsulation:2})}return e})(),C=(()=>{class e{get nativeWindow(){return window}static#t=this.ɵfac=function(a){return new(a||e)};static#n=this.ɵprov=t.jDH({token:e,factory:e.ɵfac,providedIn:"root"})}return e})();class L{constructor(s){this.product=s.product,this.addDate=this.assignDate(s.adddate),this.basepkg=s.basepkg,this.company=s.company,this.expDate=this.assignDate(s.expdate),this.package=s.package,this.productType=s.producttype,this.status=s.status,this.valid=!!s.valid,this.logo=s.logo,this.productDescription=s.productDescription,this.productName=s.productName}assignDate(s){if(s)return"unknown"===s?"N/A":new Date(s.replace(" ","T"))}}class _{constructor(s){this.current=_.fromList(s.current),this.history=_.fromList(s.history),this.ip=s.ip}static fromList(s){return s?s.map((n=>new L(n))):[]}}var D=l(5964),A=l(7376),N=l.n(A);let x=(()=>{class e{constructor(n){this.winRef=n}get rootUrl(){return this.winRef.nativeWindow.origin}property(n,a="PAGE"){const o=[a,...n];return N().get(this.winRef.nativeWindow,o)}static#t=this.ɵfac=function(a){return new(a||e)(t.KVO(C))};static#n=this.ɵprov=t.jDH({token:e,factory:e.ɵfac,providedIn:"root"})}return e})();var M=function(e){return e[e.free=-1]="free",e[e.notUsed=0]="notUsed",e[e.active=1]="active",e[e.expired=2]="expired",e}(M||{}),X=l(1985);let Y=(()=>{class e{constructor(n){this._zone=n}getServerSentEvent(n){return new X.c((a=>{const o=this.getEventSource(n);o.addEventListener("status",(i=>{this._zone.run((()=>{a.next(i)}))})),o.addEventListener("cp-error",(i=>{this._zone.run((()=>{a.error(i)}))})),o.onerror=i=>{this._zone.run((()=>(o.close(),!1)))}}))}getEventSource(n){return new EventSource(n)}static#t=this.ɵfac=function(a){return new(a||e)(t.KVO(t.SKi))};static#n=this.ɵprov=t.jDH({token:e,factory:e.ɵfac,providedIn:"root"})}return e})(),O=(()=>{class e{constructor(n,a,o){this._preFetch=n,this._sseInstall=a,this._window=o}sendToInstall(n){const a=this._preFetch.rootUrl,o=this._preFetch.property(["modules",n,"urls"]),i=this._preFetch.property(["securityToken"]);if(o.sse_install)return this._sseInstall.getServerSentEvent(`${a}${i}${o.sse_install}`).pipe((0,D.p)((w=>"complete"===w.data)));this._window.nativeWindow.location.href=`${i}${o.install}`}isInstalled(n){return n.status!==M.active||this._preFetch.property(["modules",n.product,"isInstalled"])}isSseInstall(n){const a=this._preFetch.property(["modules"]);return Object.keys(a).some((o=>{const i=a[o];if(i.productName===n)return!!i.urls.sse_install}))}static#t=this.ɵfac=function(a){return new(a||e)(t.KVO(x),t.KVO(Y),t.KVO(C))};static#n=this.ɵprov=t.jDH({token:e,factory:e.ɵfac,providedIn:"root"})}return e})();var m=l(6354),I=l(8141),b=function(e){return e[e.cpanel=1]="cpanel",e[e.enkomp=2]="enkomp",e[e.null=4]="null",e[e.siteZen=8]="siteZen",e[e.cloudLinux=16]="cloudLinux",e[e.kernelCare=32]="kernelCare",e[e.dnsOnly=64]="dnsOnly",e[e.litespeed=128]="litespeed",e[e.imunify360=256]="imunify360",e[e.whmcs=512]="whmcs",e[e.jetBackup=1024]="jetBackup",e[e.dnsNode=2048]="dnsNode",e[e.mailNode=4096]="mailNode",e[e.databaseNode=8192]="databaseNode",e[e.webNode=16384]="webNode",e[e.solusVm=32768]="solusVm",e[e.imunifyAv=65536]="imunifyAv",e[e.wptk=131072]="wptk",e}(b||{});let F=(()=>{class e{constructor(){}get isLoading(){return this._isLoading}set isLoading(n){this._isLoading=n}static#t=this.ɵfac=function(a){return new(a||e)};static#n=this.ɵprov=t.jDH({token:e,factory:e.ɵfac,providedIn:"root"})}return e})(),R=(()=>{class e{constructor(n,a,o){this._http=n,this._preFetch=a,this._loading=o}get _ip(){return this._preFetch.property(["ip_address"])}get baseVerifyUrl(){return`${this._preFetch.property(["urls","verify"])}api`}get moduleObj(){return this._preFetch.property(["modules"])}fetchLicenses(){return this._loading.isLoading=!0,this._http.get(`${this.baseVerifyUrl}/ipaddrs`,{params:(new u.Nl).set("ip",this._ip)}).pipe((0,m.T)((n=>null===n.current?{...n,current:[]}:n)),(0,m.T)((n=>this._removeWPTKLicenses(n))),(0,m.T)((n=>this._addPropertiesFromWhostmgr(n))),(0,m.T)((n=>new _(n))),(0,I.M)((()=>this._loading.isLoading=!1)))}_removeWPTKLicenses(n){return n.current=n.current.filter((a=>Number(a.producttype)!=b.wptk)),n.history=n.history.filter((a=>Number(a.producttype)!=b.wptk)),n}fetchLatestLicenseInstances(){return this.fetchLicenses().pipe((0,m.T)((n=>{const a={};return n.history.sort(((i,r)=>i.expDate<r.expDate?-1:i.expDate>r.expDate?1:0)).forEach((i=>{a[i.product]=i})),n.history=Object.values(a),n})))}_addPropertiesFromWhostmgr(n){const a=Object.keys(n).filter((i=>Array.isArray(n[i]))).reduce(((i,r)=>{const Gt=this._updateProductList(n[r]);return{...i,[r]:Gt}}),{});return{...this._addWordPressToolkit(a),ip:n.ip}}_updateProductList(n){return n.filter((o=>void 0!==this._preFetch.property(["modules",o.product]))).map((o=>{const i=this._preFetch.property(["modules",o.product]);return{...o,logo:i.logo,productName:i.productName,productDescription:i.productDescription}}))}_addWordPressToolkit(n){const a=this.moduleObj["WP Toolkit"];if(!a?.isInstalled)return n;const o={status:M.free,product:a.productName,...a};return{current:[...n.current,o],history:[...n.history]}}static#t=this.ɵfac=function(a){return new(a||e)(t.KVO(u.Qq),t.KVO(x),t.KVO(F))};static#n=this.ɵprov=t.jDH({token:e,factory:e.ɵfac,providedIn:"root"})}return e})();function B(e,s){if(1&e){const n=t.RV6();t.j41(0,"div")(1,"cp-action-button",2),t.bIt("click",(function(){t.eBV(n);const o=t.XpG();return t.Njj(o.sseInstall())})),t.nrm(2,"i",3),t.EFF(3),t.k0s()()}if(2&e){const n=t.XpG();t.R7$(),t.Mz_("id","action-install-button-",n.index,""),t.Y8G("buttonClass","btn-outline-primary")("buttonState",n.buttonLoadingState),t.R7$(2),t.SpI(" ",n.locale.maketext("Install")," ")}}function V(e,s){if(1&e){const n=t.RV6();t.j41(0,"button",4),t.bIt("click",(function(){t.eBV(n);const o=t.XpG();return t.Njj(o.outOfAppInstall())})),t.nrm(1,"i",3),t.EFF(2),t.k0s()}if(2&e){const n=t.XpG();t.x72("aria-label","Install the ",n.product.productName," extension"),t.Mz_("id","install-button-",n.index,""),t.R7$(2),t.SpI(" ",n.locale.maketext("Install")," ")}}let $=(()=>{class e{constructor(n,a,o,i){this._installService=n,this._window=a,this._alertService=o,this.locale=i,this._buttonLoadingState=d.kj.enabled}get showActionButton(){return this._installService.isSseInstall(this.product.productName)}get buttonLoadingState(){return this._buttonLoadingState}set buttonLoadingState(n){this._buttonLoadingState=n}sseInstall(){this.buttonLoadingState=d.kj.loading,this._installService.sendToInstall(this.product.product||this.product.productName).subscribe((()=>{this._window.nativeWindow.location.reload();const a=this.locale.maketext("Installation successful.");this._alertService.success(a)}),(a=>{const o=this.locale.maketext("There was a problem with the install. Refresh the page and try again.");this._alertService.error(`${o}: ${a.data}`),this.buttonLoadingState=d.kj.disabled}))}outOfAppInstall(){this._installService.sendToInstall(this.product.product)}static#t=this.ɵfac=function(a){return new(a||e)(t.rXU(O),t.rXU(C),t.rXU(d.uE),t.rXU(p.h))};static#n=this.ɵcmp=t.VBU({type:e,selectors:[["whm-marketplace-app-install-button"]],inputs:{product:"product",index:"index"},decls:3,vars:2,consts:[["normalButton",""],[4,"ngIf","ngIfElse"],[3,"click","id","buttonClass","buttonState"],["aria-hidden","true",1,"fas","fa-cloud-download-alt"],["type","button",1,"btn","btn-outline-primary",3,"click","id"]],template:function(a,o){if(1&a&&t.DNE(0,B,4,5,"div",1)(1,V,3,5,"ng-template",null,0,t.C5r),2&a){const i=t.sdS(2);t.Y8G("ngIf",o.showActionButton)("ngIfElse",i)}},dependencies:[c.bT,d.C7],encapsulation:2})}return e})();var U=l(2584),P=function(e){return e.manage="https://manage2.cpanel.net/lookup.cgi",e.store="https://store.cpanel.net",e}(P||{}),k=function(e){return e.manage="manage2",e.store="store-cpanel",e}(k||{});let H=(()=>{class e{constructor(n,a){this._prefetch=n,this.locale=a}get isPartner(){return(0,U.G)(this._prefetch.property(["is_partner"]))}get buttonUrl(){return this.isPartner?P.manage:P.store}get buttonTarget(){return this.isPartner?k.manage:k.store}get buttonAriaLabel(){return this.locale.maketext("Manage the “[_1]” extension.",this.product.productName)}static#t=this.ɵfac=function(a){return new(a||e)(t.rXU(x),t.rXU(p.h))};static#n=this.ɵcmp=t.VBU({type:e,selectors:[["whm-marketplace-app-manage-button"]],inputs:{product:"product",index:"index"},decls:3,vars:6,consts:[["type","button",1,"btn","btn-outline-primary",3,"id","href","target"],["aria-hidden","true",1,"fas","fa-external-link-alt"]],template:function(a,o){1&a&&(t.j41(0,"a",0),t.nrm(1,"i",1),t.EFF(2),t.k0s()),2&a&&(t.Mz_("id","manage-button-",o.index,""),t.Y8G("href",o.buttonUrl,t.B4B)("target",o.buttonTarget),t.BMQ("aria-label",o.buttonAriaLabel),t.R7$(2),t.SpI(" ",o.locale.maketext("Manage"),"\n"))},encapsulation:2})}return e})(),W=(()=>{class e{constructor(n){this.locale=n}transform(n){return"N/A"!==n&&n?this.locale.maketext("[datetime,_1]",n):this.locale.maketext("N/A")}static#t=this.ɵfac=function(a){return new(a||e)(t.rXU(p.h,16))};static#n=this.ɵpipe=t.EJ8({name:"marketplaceDate",type:e,pure:!0})}return e})();function z(e,s){if(1&e&&(t.j41(0,"div",35),t.nrm(1,"img",36),t.k0s()),2&e){const n=t.XpG().$implicit;t.R7$(),t.Mz_("alt","",null==n?null:n.product," logo"),t.Y8G("src",null==n?null:n.logo,t.B4B)}}function K(e,s){if(1&e&&(t.j41(0,"span"),t.nrm(1,"i",37),t.EFF(2),t.k0s()),2&e){const n=t.XpG(2);t.R7$(2),t.SpI(" ",n.locale.maketext("Active")," ")}}function J(e,s){if(1&e&&(t.j41(0,"span"),t.nrm(1,"i",37),t.EFF(2),t.k0s()),2&e){const n=t.XpG(2);t.R7$(2),t.SpI(" ",n.locale.maketext("Free")," ")}}function Q(e,s){if(1&e&&(t.j41(0,"span"),t.nrm(1,"i",38),t.EFF(2),t.k0s()),2&e){const n=t.XpG(2);t.R7$(2),t.SpI(" ",n.locale.maketext("Inactive")," ")}}function Z(e,s){if(1&e&&t.nrm(0,"whm-marketplace-app-manage-button",39),2&e){const n=t.XpG(),o=n.index;t.Y8G("product",n.$implicit)("index",o)}}function q(e,s){if(1&e&&t.nrm(0,"whm-marketplace-app-install-button",40),2&e){const n=t.XpG(),o=n.index;t.Y8G("product",n.$implicit)("index",o)}}function tt(e,s){if(1&e&&(t.j41(0,"span"),t.nrm(1,"i",37),t.EFF(2),t.k0s()),2&e){const n=t.XpG(3);t.R7$(2),t.SpI(" ",n.locale.maketext("Active")," ")}}function nt(e,s){if(1&e&&(t.j41(0,"span"),t.nrm(1,"i",37),t.EFF(2),t.k0s()),2&e){const n=t.XpG(3);t.R7$(2),t.SpI(" ",n.locale.maketext("Free")," ")}}function et(e,s){if(1&e&&(t.j41(0,"span"),t.nrm(1,"i",38),t.EFF(2),t.k0s()),2&e){const n=t.XpG(3);t.R7$(2),t.SpI(" ",n.locale.maketext("Inactive")," ")}}function at(e,s){if(1&e&&(t.j41(0,"div",30),t.qex(1,20),t.DNE(2,tt,3,1,"span",21)(3,nt,3,1,"span",21)(4,et,3,1,"span",22),t.bVm(),t.k0s()),2&e){const n=t.XpG().$implicit,a=t.XpG();t.R7$(),t.Y8G("ngSwitch",null==n?null:n.status),t.R7$(),t.Y8G("ngSwitchCase",a.productStatus.active),t.R7$(),t.Y8G("ngSwitchCase",a.productStatus.free)}}function ot(e,s){if(1&e&&(t.j41(0,"dd"),t.nrm(1,"i",37),t.EFF(2),t.k0s()),2&e){const n=t.XpG(3);t.R7$(2),t.SpI(" ",n.locale.maketext("Active")," ")}}function it(e,s){if(1&e&&(t.j41(0,"dd"),t.nrm(1,"i",37),t.EFF(2),t.k0s()),2&e){const n=t.XpG(3);t.R7$(2),t.SpI(" ",n.locale.maketext("Free")," ")}}function st(e,s){if(1&e&&(t.j41(0,"dd"),t.nrm(1,"i",38),t.EFF(2),t.k0s()),2&e){const n=t.XpG(3);t.R7$(2),t.SpI(" ",n.locale.maketext("Inactive")," ")}}function rt(e,s){if(1&e&&(t.j41(0,"div",30)(1,"dt"),t.EFF(2),t.k0s(),t.qex(3,20),t.DNE(4,ot,3,1,"dd",21)(5,it,3,1,"dd",21)(6,st,3,1,"dd",22),t.bVm(),t.k0s()),2&e){const n=t.XpG().$implicit,a=t.XpG();t.R7$(2),t.SpI(" ",a.locale.maketext("License Status")," "),t.R7$(),t.Y8G("ngSwitch",null==n?null:n.status),t.R7$(),t.Y8G("ngSwitchCase",a.productStatus.active),t.R7$(),t.Y8G("ngSwitchCase",a.productStatus.free)}}function lt(e,s){if(1&e&&t.nrm(0,"whm-marketplace-app-manage-button",41),2&e){const n=t.XpG(),o=n.index;t.Y8G("product",n.$implicit)("index",o)}}function ct(e,s){if(1&e){const n=t.RV6();t.qex(0),t.j41(1,"tr",13)(2,"td",14),t.bIt("click",(function(){const o=t.eBV(n).$implicit,i=t.XpG();return t.Njj(i.updateExpandState(o.product))})),t.nrm(3,"i",15),t.k0s(),t.j41(4,"td",16),t.DNE(5,z,2,3,"div",17),t.k0s(),t.j41(6,"td",18),t.EFF(7),t.k0s(),t.j41(8,"td",19),t.qex(9,20),t.DNE(10,K,3,1,"span",21)(11,J,3,1,"span",21)(12,Q,3,1,"span",22),t.bVm(),t.k0s(),t.j41(13,"td",23),t.EFF(14),t.nI1(15,"marketplaceDate"),t.k0s(),t.j41(16,"td",24),t.DNE(17,Z,1,2,"whm-marketplace-app-manage-button",25)(18,q,1,2,"whm-marketplace-app-install-button",26)(19,at,5,3,"ng-template",null,0,t.C5r),t.k0s()(),t.j41(21,"tr",15)(22,"td",27)(23,"div",28),t.DNE(24,rt,7,4,"div",29),t.j41(25,"div",30)(26,"dt"),t.EFF(27),t.k0s(),t.j41(28,"dd",31),t.EFF(29),t.nI1(30,"marketplaceDate"),t.k0s()(),t.nrm(31,"div",32),t.j41(32,"dt",33),t.EFF(33),t.k0s(),t.j41(34,"dd",31),t.EFF(35),t.nI1(36,"marketplaceDate"),t.k0s(),t.DNE(37,lt,1,2,"whm-marketplace-app-manage-button",34),t.k0s()()(),t.bVm()}if(2&e){const n=s.$implicit,a=s.index,o=t.sdS(20),i=t.XpG();t.R7$(2),t.Mz_("id","marketplace-col-icon-",a,""),t.R7$(),t.Y8G("ngClass",i.expandedArrowClass(n.product)),t.BMQ("aria-label",i.isExpanded(n.product)?i.locale.maketext("Expanded"):i.locale.maketext("Collapsed")),t.R7$(2),t.Y8G("ngIf",null==n?null:n.logo),t.R7$(2),t.SpI(" ",null==n?null:n.productName," "),t.R7$(),t.Mz_("id","",null==n?null:n.product,"-status"),t.R7$(),t.Y8G("ngSwitch",null==n?null:n.status),t.R7$(),t.Y8G("ngSwitchCase",i.productStatus.active),t.R7$(),t.Y8G("ngSwitchCase",i.productStatus.free),t.R7$(3),t.SpI(" ",t.bMT(15,23,null==n?null:n.expDate)," "),t.R7$(3),t.Y8G("ngIf",i.showManage(n)),t.R7$(),t.Y8G("ngIf",i.showInstall(n))("ngIfElse",o),t.R7$(3),t.Y8G("ngClass",i.isExpanded(n.product)?"":"collapsed-row"),t.R7$(3),t.Y8G("ngIf",i.showInstall(n)),t.R7$(3),t.SpI(" ",i.locale.maketext("Expiration Date")," "),t.R7$(2),t.SpI(" ",t.bMT(30,25,null==n?null:n.expDate)," "),t.R7$(2),t.Y8G("innerHtml",null==n?null:n.productDescription,t.npT),t.R7$(2),t.SpI(" ",i.locale.maketext("Activation Date")," "),t.R7$(2),t.SpI(" ",t.bMT(36,27,null==n?null:n.addDate)," "),t.R7$(2),t.Y8G("ngIf",i.showManage(n))}}function dt(e,s){if(1&e&&(t.j41(0,"tr",42)(1,"td",43),t.nrm(2,"span",44)(3,"span",32),t.k0s()()),2&e){const n=t.XpG();t.R7$(3),t.Y8G("innerHtml",n.locale.maketext("Loading licenses for this [output,abbr,IP,Internet Protocol] address."),t.npT)}}function pt(e,s){if(1&e&&(t.j41(0,"tr",45),t.nrm(1,"td",46),t.k0s()),2&e){const n=t.XpG();t.R7$(),t.Y8G("innerHtml",n.locale.maketext("There are not any licenses associated with this [output,abbr,IP,Internet Protocol] address."),t.npT)}}let mt=(()=>{class e{constructor(n,a,o,i){this._licenseService=n,this._fetchLicenseService=a,this._loading=o,this.locale=i,this.productStatus=M,this._licenses=new _({}),this._expandedRows={}}get allLicenses(){return[...this._activeLicenses,...this._inactiveLicenses]}get showNoLicensesMessage(){return!this.isLoading&&0===this._licenses.current.length&&0===this._licenses.history.length}get isLoading(){return this._loading.isLoading}get htmlDir(){return this.locale.isRtl?"rtl":"ltr"}get _activeLicenses(){return this._sortToFront(this._licenses.current,"cPanel/WHM")}get _inactiveLicenses(){return this._licenses.history.filter((n=>!this._activeLicenses.some((a=>a.product===n.product))))}ngOnInit(){this._getLicenses()}updateExpandState(n){const a=this._expandedRows[n];this._expandedRows={...this._expandedRows,[n]:!a}}isExpanded(n){return!!this._expandedRows[n]}expandedArrowClass(n){return this._expandedRows[n]?"fas fa-chevron-down chevron":"rtl"===this.htmlDir?"fas fa-chevron-left chevron":"fas fa-chevron-right chevron"}showManage(n){return!!n.package}showInstall(n){return!this._licenseService.isInstalled(n)}_getLicenses(){this._fetchLicenseService.fetchLatestLicenseInstances().subscribe((n=>this._licenses=n))}_sortToFront(n,a){if(n.length<1)return[];const o=n.findIndex((r=>r.product===a)),i=n.splice(o,1);return n.unshift(...i),n}static#t=this.ɵfac=function(a){return new(a||e)(t.rXU(O),t.rXU(R),t.rXU(F),t.rXU(p.h))};static#n=this.ɵcmp=t.VBU({type:e,selectors:[["whm-marketplace-manage-extensions-table"]],decls:25,vars:8,consts:[["showStatusMobile",""],[1,"col-lg-8","col-sm-12"],[1,"row","action-bar"],[1,"col-xs-12"],[1,"col-xs-6","col-sm-4","col-sm-offset-4","table-title"],[1,"pull-right","flip","add-ext-button"],["routerLink","/add","type","button",1,"btn","btn-primary","btn-sm"],["aria-hidden","true",1,"fas","fa-plus"],[1,"table","table-striped","table-striped-child"],[1,"hidden-xs"],[4,"ngFor","ngForOf"],["class","info empty-row","id","loading-row",4,"ngIf"],["class","info empty-row","id","no-license-row",4,"ngIf"],[1,"data-row"],["role","button",1,"icon-link",3,"click","id"],[3,"ngClass"],[1,"img-cell","hidden-xs","col-sm-3","col-md-3"],["class","img-container",4,"ngIf"],[1,"col-xs-8","col-sm-3","col-md-2"],[1,"hidden-xs","col-sm-2","col-md-2",3,"id"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[1,"exp-date-cell","hidden-xs","col-sm-2","col-md-2"],[1,"col-xs-4","col-sm-2","col-md-4"],["class","hidden-xs hidden-sm manage-button",3,"product","index",4,"ngIf"],[3,"product","index",4,"ngIf","ngIfElse"],["colspan","6",1,"expand-panel-data"],["id","expand-panel",1,"list-panel","col-xs-12","col-sm-9"],["class","hidden-sm hidden-md hidden-lg",4,"ngIf"],[1,"hidden-sm","hidden-md","hidden-lg"],[1,"activation-date"],[3,"innerHtml"],[1,"activation-date-title"],["class","hidden-md hidden-lg manage-button-expanded",3,"product","index",4,"ngIf"],[1,"img-container"],["aria-hidden","true",1,"img-logo",3,"src","alt"],["aria-hidden","true",1,"fas","fa-check"],["aria-hidden","true",1,"fas","fa-ban"],[1,"hidden-xs","hidden-sm","manage-button",3,"product","index"],[3,"product","index"],[1,"hidden-md","hidden-lg","manage-button-expanded",3,"product","index"],["id","loading-row",1,"info","empty-row"],["colspan","6"],["aria-hidden","true",1,"fas","fa-spinner","fa-spin"],["id","no-license-row",1,"info","empty-row"],["colspan","6",3,"innerHtml"]],template:function(a,o){1&a&&(t.j41(0,"div",1)(1,"div",2)(2,"div",3)(3,"h2",4),t.EFF(4),t.k0s(),t.j41(5,"div",5)(6,"a",6),t.nrm(7,"i",7),t.EFF(8),t.k0s()()()(),t.j41(9,"table",8)(10,"thead")(11,"tr"),t.nrm(12,"th")(13,"th",9),t.j41(14,"th"),t.EFF(15),t.k0s(),t.j41(16,"th",9),t.EFF(17),t.k0s(),t.j41(18,"th",9),t.EFF(19),t.k0s(),t.nrm(20,"th"),t.k0s()(),t.j41(21,"tbody"),t.DNE(22,ct,38,29,"ng-container",10)(23,dt,4,1,"tr",11)(24,pt,2,1,"tr",12),t.k0s()()()),2&a&&(t.R7$(4),t.SpI(" ",o.locale.maketext("Manage Your Extensions")," "),t.R7$(4),t.SpI(" ",o.locale.maketext("Add Extensions")," "),t.R7$(7),t.JRh(o.locale.maketext("Product")),t.R7$(2),t.SpI(" ",o.locale.maketext("License Status")," "),t.R7$(2),t.SpI(" ",o.locale.maketext("Expiration Date")," "),t.R7$(3),t.Y8G("ngForOf",o.allLicenses),t.R7$(),t.Y8G("ngIf",o.isLoading),t.R7$(),t.Y8G("ngIf",o.showNoLicensesMessage))},dependencies:[c.YU,c.Sq,c.bT,c.ux,c.e1,c.fG,g.Wk,$,H,W],styles:[".action-bar[_ngcontent-%COMP%]{margin-bottom:5px}.table-title[_ngcontent-%COMP%]{margin-bottom:0;margin-top:10px}.icon-link[_ngcontent-%COMP%]{cursor:pointer}.chevron[_ngcontent-%COMP%]{color:#3989cf}.img-cell[_ngcontent-%COMP%]{width:20%}.img-container[_ngcontent-%COMP%]{max-width:130px}.img-logo[_ngcontent-%COMP%]{max-height:100%;max-width:100%}html[dir=ltr][_ngcontent-%COMP%]   .manage-button[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%]   .manage-button[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .manage-button[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%]   .manage-button[_ngcontent-%COMP%], html[dir=ltr]   [_nghost-%COMP%]   .manage-button[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .manage-button[_ngcontent-%COMP%], [dir=ltr]   [_nghost-%COMP%]   .manage-button[_ngcontent-%COMP%]{margin-right:10px}html[dir=rtl][_ngcontent-%COMP%]   .manage-button[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%]   .manage-button[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .manage-button[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%]   .manage-button[_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   .manage-button[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .manage-button[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .manage-button[_ngcontent-%COMP%]{margin-left:10px}.collapsed-row[_ngcontent-%COMP%]{display:none}.activation-date-title[_ngcontent-%COMP%]{margin-top:8px}.activation-date[_ngcontent-%COMP%]{margin-top:3px;margin-bottom:5px}@media (max-width: 992px){html[dir=ltr][_ngcontent-%COMP%]   .manage-button-expanded[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%]   .manage-button-expanded[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .manage-button-expanded[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%]   .manage-button-expanded[_ngcontent-%COMP%], html[dir=ltr]   [_nghost-%COMP%]   .manage-button-expanded[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .manage-button-expanded[_ngcontent-%COMP%], [dir=ltr]   [_nghost-%COMP%]   .manage-button-expanded[_ngcontent-%COMP%]{margin:1px 5px 1px 0}html[dir=rtl][_ngcontent-%COMP%]   .manage-button-expanded[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%]   .manage-button-expanded[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .manage-button-expanded[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%]   .manage-button-expanded[_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   .manage-button-expanded[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .manage-button-expanded[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .manage-button-expanded[_ngcontent-%COMP%]{margin:1px 0 1px 5px}html[dir=ltr][_ngcontent-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], html[dir=ltr]   [_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=ltr]   [_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%]{padding:8px 8px 8px 30px}html[dir=rtl][_ngcontent-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%]{padding:8px 30px 8px 8px}}@media (max-width: 767px){html[dir=ltr][_ngcontent-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], html[dir=ltr]   [_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=ltr]   [_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%]{padding:8px 8px 8px 20px}html[dir=rtl][_ngcontent-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%]{padding:8px 20px 8px 8px}.table-title[_ngcontent-%COMP%]{font-size:16px;padding:0;margin:0}.list-panel[_ngcontent-%COMP%]   dd[_ngcontent-%COMP%]{margin:0 0 15px}.add-ext-button[_ngcontent-%COMP%]{margin-top:5px}}"]})}return e})();var ht=l(6697);let ut=(()=>{class e{constructor(n,a){this._preFetch=n,this._fetchLicense=a}get _moduleObj(){return this._preFetch.property(["modules"])}fetchExtensions(){return this._fetchLicense.fetchLicenses().pipe((0,m.T)((n=>Object.keys(this._moduleObj).reduce(((a,o)=>{const i=this._moduleObj[o];return this._inFetchedLicenseList(n,o)?a:i.isShownWithoutLicense&&!i.isInstalled?[...a,i]:a}),[]))))}_inFetchedLicenseList(n,a){const o=n.current.some((r=>r.product===a)),i=n.history.some((r=>r.product===a));return o||i}static#t=this.ɵfac=function(a){return new(a||e)(t.KVO(x),t.KVO(R))};static#n=this.ɵprov=t.jDH({token:e,factory:e.ɵfac,providedIn:"root"})}return e})();function gt(e,s){1&e&&t.nrm(0,"th",10)}function _t(e,s){if(1&e&&(t.j41(0,"div",32),t.nrm(1,"img",33),t.k0s()),2&e){const n=t.XpG(2).$implicit;t.R7$(),t.Y8G("src",null==n?null:n.logo,t.B4B)}}function xt(e,s){1&e&&t.nrm(0,"div",34)}function ft(e,s){if(1&e&&(t.j41(0,"td",30),t.DNE(1,_t,2,1,"div",31)(2,xt,1,0,"ng-template",null,2,t.C5r),t.k0s()),2&e){const n=t.sdS(3),a=t.XpG(),o=a.$implicit;t.Mz_("id","marketplace-col-logo-",a.index,""),t.R7$(),t.Y8G("ngIf",null==o?null:o.logo)("ngIfElse",n)}}function Ct(e,s){if(1&e&&(t.j41(0,"div"),t.nrm(1,"i",28),t.EFF(2),t.k0s()),2&e){const n=t.XpG(2);t.R7$(2),t.SpI(" ",n.locale.maketext("Featured")," ")}}function Mt(e,s){if(1&e&&(t.j41(0,"div"),t.EFF(1),t.k0s()),2&e){const n=t.XpG(2);t.R7$(),t.SpI(" ",n.locale.maketext("Paid[comment,not free of charge]")," ")}}function Ot(e,s){if(1&e&&(t.j41(0,"div"),t.EFF(1),t.k0s()),2&e){const n=t.XpG(2);t.R7$(),t.SpI(" ",n.locale.maketext("Free[comment,without cost]")," ")}}function bt(e,s){if(1&e&&(t.j41(0,"div")(1,"a",35),t.nrm(2,"i",36),t.EFF(3),t.k0s()()),2&e){const n=t.XpG().$implicit,a=t.XpG();t.R7$(),t.Y8G("href",null==n||null==n.urls?null:n.urls.purchase,t.B4B),t.R7$(2),t.SpI(" ",a.locale.maketext("Purchase")," ")}}function Pt(e,s){if(1&e&&t.nrm(0,"whm-marketplace-app-install-button",37),2&e){const n=t.XpG(),o=n.index;t.Y8G("product",n.$implicit)("index",o)}}function kt(e,s){if(1&e){const n=t.RV6();t.qex(0),t.j41(1,"tr")(2,"td",15),t.bIt("click",(function(){const o=t.eBV(n).$implicit,i=t.XpG();return t.Njj(i.updateExpandState(o.commonName))})),t.nrm(3,"i",16),t.k0s(),t.DNE(4,ft,4,4,"td",17),t.j41(5,"td",18),t.DNE(6,Ct,3,1,"div",19),t.k0s(),t.j41(7,"td",20),t.EFF(8),t.k0s(),t.j41(9,"td",21),t.DNE(10,Mt,2,1,"div",22)(11,Ot,2,1,"ng-template",null,0,t.C5r),t.k0s(),t.j41(13,"td",23),t.DNE(14,bt,4,2,"div",22)(15,Pt,1,2,"ng-template",null,1,t.C5r),t.k0s()(),t.j41(17,"tr",24)(18,"td",25)(19,"div",26)(20,"div",27)(21,"dt"),t.EFF(22),t.k0s(),t.j41(23,"dd"),t.nrm(24,"i",28),t.EFF(25),t.k0s()(),t.j41(26,"div",27)(27,"dt"),t.EFF(28),t.k0s(),t.j41(29,"dd"),t.EFF(30),t.k0s()(),t.nrm(31,"div",29),t.k0s()()(),t.bVm()}if(2&e){const n=s.$implicit,a=s.index,o=t.sdS(12),i=t.sdS(16),r=t.XpG();t.R7$(2),t.Mz_("id","marketplace-col-icon-",a,""),t.R7$(),t.Y8G("ngClass",r.expandedArrowClass(n.commonName)),t.BMQ("aria-label",r.isExpanded(n.commonName)?r.locale.maketext("Expanded"):r.locale.maketext("Collapsed")),t.R7$(),t.Y8G("ngIf",r.showImageCol),t.R7$(),t.Mz_("id","marketplace-col-featured-",a,""),t.R7$(),t.Y8G("ngIf",null==n?null:n.isFeatured),t.R7$(2),t.SpI(" ",null==n?null:n.productName," "),t.R7$(),t.Mz_("id","marketplace-col-paid-",a,""),t.R7$(),t.Y8G("ngIf",r.isPaid(n))("ngIfElse",o),t.R7$(3),t.Mz_("id","marketplace-col-actions-",a,""),t.R7$(),t.Y8G("ngIf",r.isPaid(n))("ngIfElse",i),t.R7$(3),t.Mz_("id","marketplace-col-expanded-",a,""),t.Y8G("ngClass",r.isExpanded(n.commonName)?"":"collapsed-row"),t.R7$(2),t.Mz_("id","expand-panel-",a,""),t.R7$(3),t.SpI(" ",r.locale.maketext("Featured")," "),t.R7$(3),t.SpI(" ",r.locale.maketext("Featured")," "),t.R7$(3),t.SpI(" ",r.locale.maketext("Paid[comment,not free of charge]")," "),t.R7$(2),t.SpI(" ",r.locale.maketext("Paid[comment,not free of charge]")," "),t.R7$(),t.Y8G("innerHtml",null==n?null:n.productDescription,t.npT)}}function vt(e,s){if(1&e&&(t.j41(0,"tr",38)(1,"td",39),t.EFF(2),t.k0s()()),2&e){const n=t.XpG();t.R7$(2),t.SpI(" ",n.locale.maketext("There are no new extensions for you to purchase or install. Check back later as we continue to grow our catalog.")," ")}}const wt=[{path:"manage",component:mt},{path:"add",component:(()=>{class e{constructor(n,a){this._addExtensionsSerivce=n,this.locale=a,this._unsortedExtensions=[],this._expandedRows={}}get extensions(){return this._sortFeaturedItemsFirst(this._unsortedExtensions)}get showNoExtensionsMessage(){return this.extensions.length<=0}get alertPosition(){return this.locale.isRtl?d.iP.topLeft:d.iP.topRight}get showImageCol(){return this.extensions.some((n=>n.logo))}get htmlDir(){return this.locale.isRtl?"rtl":"ltr"}ngOnInit(){this._addExtensionsSerivce.fetchExtensions().pipe((0,ht.s)(1)).subscribe((n=>{this._unsortedExtensions=n,this._autoExpandItems()}))}updateExpandState(n){const a=this._expandedRows[n];this._expandedRows={...this._expandedRows,[n]:!a}}isExpanded(n){return!!this._expandedRows[n]}expandedArrowClass(n){return this._expandedRows[n]?"fas fa-chevron-down chevron":"rtl"===this.htmlDir?"fas fa-chevron-left chevron":"fas fa-chevron-right chevron"}isPaid(n){return Object.keys(n.urls).includes("purchase")}_sortFeaturedItemsFirst(n){return n.length<1?[]:n.reduce(((a,o)=>o.isFeatured?[o,...a]:[...a,o]),[])}_autoExpandItems(){this._unsortedExtensions.forEach((n=>{n.isFeatured&&this.updateExpandState(n.commonName)}))}static#t=this.ɵfac=function(a){return new(a||e)(t.rXU(ut),t.rXU(p.h))};static#n=this.ɵcmp=t.VBU({type:e,selectors:[["whm-marketplace-add-extensions-table"]],decls:25,vars:9,consts:[["freeBlock",""],["installButton",""],["noImage",""],[1,"col-lg-8","col-sm-12"],[3,"position"],[1,"row","title-row"],[1,"col-xs-12"],[1,"col-xs-12","col-xs-offset-2","col-sm-4","col-sm-offset-4","table-title"],[1,"table","table-striped","table-striped-child"],["class","hidden-xs",4,"ngIf"],[1,"hidden-xs"],[4,"ngFor","ngForOf"],["class","info empty-row","id","no-license-row",4,"ngIf"],["routerLink","/manage"],["aria-hidden","true",1,"fas","fa-chevron-left"],["role","button",1,"icon-link",3,"click","id"],[3,"ngClass"],["class","img-cell hidden-xs col-sm-3 col-md-2",3,"id",4,"ngIf"],["ngClass","{hidden: !showImageCol}",1,"hidden-xs","col-sm-3","col-md-2",3,"id"],[4,"ngIf"],[1,"col-xs-8","col-sm-3"],[1,"hidden-xs","col-sm-3","col-md-1",3,"id"],[4,"ngIf","ngIfElse"],[1,"col-xs-4",3,"id"],[3,"ngClass","id"],["colspan","6",1,"expand-panel-data"],[1,"list-panel","col-sm-9",3,"id"],[1,"hidden-sm","hidden-md","hidden-lg"],["aria-hidden","true",1,"fas","fa-star","feature-icon"],[3,"innerHtml"],[1,"img-cell","hidden-xs","col-sm-3","col-md-2",3,"id"],["class","img-container",4,"ngIf","ngIfElse"],[1,"img-container"],["alt","extension logo",1,"img-logo",3,"src"],["aria-label","No logo image",1,"img-container"],["target","cpanel","type","button",1,"btn","btn-outline-primary",3,"href"],["aria-hidden","true",1,"fas","fa-shopping-cart"],[3,"product","index"],["id","no-license-row",1,"info","empty-row"],["colspan","6"]],template:function(a,o){1&a&&(t.j41(0,"div",3),t.nrm(1,"cp-alert-list",4),t.j41(2,"div",5)(3,"div",6)(4,"h2",7),t.EFF(5),t.k0s()()(),t.j41(6,"table",8)(7,"thead")(8,"tr"),t.nrm(9,"th"),t.DNE(10,gt,1,0,"th",9),t.j41(11,"th",10),t.EFF(12),t.k0s(),t.j41(13,"th"),t.EFF(14),t.k0s(),t.j41(15,"th",10),t.EFF(16),t.k0s(),t.nrm(17,"th"),t.k0s()(),t.j41(18,"tbody"),t.DNE(19,kt,32,27,"ng-container",11)(20,vt,3,1,"tr",12),t.k0s()(),t.j41(21,"div")(22,"a",13),t.nrm(23,"i",14),t.EFF(24),t.k0s()()()),2&a&&(t.R7$(),t.Y8G("position",o.alertPosition),t.R7$(4),t.SpI(" ",o.locale.maketext("Add Available Extensions")," "),t.R7$(5),t.Y8G("ngIf",o.showImageCol),t.R7$(2),t.JRh(o.locale.maketext("Featured")),t.R7$(2),t.JRh(o.locale.maketext("Extension")),t.R7$(2),t.SpI(" ",o.locale.maketext("Paid[comment,not free of charge]")," "),t.R7$(3),t.Y8G("ngForOf",o.extensions),t.R7$(),t.Y8G("ngIf",o.showNoExtensionsMessage),t.R7$(4),t.SpI(" ",o.locale.maketext("Back to Manage Your Extensions")," "))},dependencies:[c.YU,c.Sq,c.bT,g.Wk,d.Ab,$],styles:[".title-row[_ngcontent-%COMP%]{margin-bottom:5px}.table-title[_ngcontent-%COMP%]{margin-bottom:0;margin-top:10px}.icon-link[_ngcontent-%COMP%]{cursor:pointer;width:2%}.chevron[_ngcontent-%COMP%]{color:#3989cf}.img-cell[_ngcontent-%COMP%]{width:20%}.img-container[_ngcontent-%COMP%]{max-width:130px}.img-logo[_ngcontent-%COMP%]{max-height:100%;max-width:100%}.feature-icon[_ngcontent-%COMP%]{color:#ff6c2c}.collapsed-row[_ngcontent-%COMP%]{display:none}@media (max-width: 992px){html[dir=ltr][_ngcontent-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], html[dir=ltr]   [_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=ltr]   [_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%]{padding:8px 8px 8px 30px}html[dir=rtl][_ngcontent-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%]{padding:8px 30px 8px 8px}}@media (max-width: 767px){html[dir=ltr][_ngcontent-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], html[dir=ltr]   [_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=ltr]   [_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%]{padding:8px 8px 8px 20px}html[dir=rtl][_ngcontent-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   #expand-panel[_ngcontent-%COMP%]{padding:8px 20px 8px 8px}.table-title[_ngcontent-%COMP%]{padding:0}.list-panel[_ngcontent-%COMP%]   dd[_ngcontent-%COMP%]{margin:0 0 15px}}"]})}return e})()},{path:"",redirectTo:"manage",pathMatch:"full"},{path:"**",redirectTo:"manage",pathMatch:"full"}];let Et=(()=>{class e{static#t=this.ɵfac=function(a){return new(a||e)};static#n=this.ɵmod=t.$C({type:e});static#e=this.ɵinj=t.G2t({imports:[g.iI.forRoot(wt),g.iI]})}return e})();class It{}const S=12e4;let v=(()=>{class e{constructor(){this.cacheMap=new Map}get(n){const a=this.cacheMap.get(n.urlWithParams);return a?Date.now()-a.entryTime>S?null:a.response:null}put(n,a){const o={url:n.urlWithParams,response:a,entryTime:Date.now()};this.cacheMap.set(n.urlWithParams,o),this.deleteExpiredCache()}clearCache(){this.cacheMap.clear()}deleteExpiredCache(){this.cacheMap.forEach((n=>{Date.now()-n.entryTime>S&&this.cacheMap.delete(n.url)}))}static#t=this.ɵfac=function(a){return new(a||e)};static#n=this.ɵprov=t.jDH({token:e,factory:e.ɵfac,providedIn:"root"})}return e})();var Ft=l(7673);let $t=(()=>{class e{constructor(n){this._cacheService=n}intercept(n,a){if(!this.isRequestCachable(n))return a.handle(n);const o=this._cacheService.get(n);return null!==o?(0,Ft.of)(o):a.handle(n).pipe((0,I.M)((i=>{i instanceof u.cS&&this._cacheService.put(n,i)})))}isRequestCachable(n){return"GET"===n.method&&n.url.indexOf("/api/ipaddrs")>-1}static#t=this.ɵfac=function(a){return new(a||e)(t.KVO(v))};static#n=this.ɵprov=t.jDH({token:e,factory:e.ɵfac})}return e})();const St=window&&window.PAGE?window.PAGE.base:"";let jt=(()=>{class e{static#t=this.ɵfac=function(a){return new(a||e)};static#n=this.ɵmod=t.$C({type:e,bootstrap:[T]});static#e=this.ɵinj=t.G2t({providers:[{provide:c.kB,useValue:St},C,{provide:u.a7,useClass:$t,multi:!0},x,O,c.vh,v,{provide:It,useClass:v},{provide:c.kB,useValue:window.PAGE.base}],imports:[f.Bb,u.q1,j.B,Et,d.pt,d.sb]})}return e})();(0,t.SmG)(),f.sG().bootstrapModule(jt).catch((e=>console.error(e)))}},h=>{h.O(0,[502],(()=>h(h.s=5179))),h.O()}]);
Back to Directory File Manager