Files
server/opt/psa/admin/cp/public/javascript/components/pages/HomePage.js
2026-01-07 20:52:11 +01:00

2 lines
106 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(globalThis.webpackChunkPlesk=globalThis.webpackChunkPlesk||[]).push([["components/pages/HomePage"],{1435:(e,n,t)=>{"use strict";t.r(n),t.d(n,{SORT_ASC:()=>l,SORT_DESC:()=>d,default:()=>g});var i=t(296),a=t(668),s=t.n(a),o=t(297);const r=t(90).Locale.getSection("components.list"),l="ASC",d="DESC",c="all",u={set(e,n){localStorage.setItem(e,JSON.stringify(n))},get(e){const n=localStorage.getItem(e);return JSON.parse(n)}},m=e=>`list-sort_${e}`,p=e=>`list-page_${e}`,f=({id:e,data:n,columns:t,itemsPerPage:a=25,itemsPerPageOptions:s=[10,25,100,c],sortColumn:d,sortDirection:f=l,searchField:g,locale:v={},emptyView:h,emptyFilteredView:k,toolbar:S,selection:x=[],onSelectionChange:b,searchBarInputProps:y,rowKey:j="key",useStorage:N=!0,...w})=>{const{sortColumn:E,sortDirection:T,setSortState:P}=((e,{sortColumn:n,sortDirection:t})=>{const[{sortColumn:a,sortDirection:s},o]=(0,i.useState)({sortColumn:u.get(m(e))?.sortColumn??n,sortDirection:u.get(m(e))?.sortDirection??t});return{sortColumn:a,sortDirection:s,setSortState:n=>{o(e=>({...e,...n})),u.set(m(e),{...u.get(m(e)),...n})}}})(e,{sortColumn:d??t.find(({sortable:e})=>e)?.key,sortDirection:f}),{page:F,itemsPerPage:_,searchPattern:R,setPageState:D}=((e,{itemsPerPage:n},t=!0)=>{const a=t?{page:u.get(p(e))?.page,itemsPerPage:u.get(p(e))?.itemsPerPage,searchPattern:u.get(p(e))?.searchPattern}:{},[{page:s,itemsPerPage:o,searchPattern:r},l]=(0,i.useState)({page:a.page??1,itemsPerPage:a.itemsPerPage??n,searchPattern:a.searchPattern??""});return{page:s,itemsPerPage:o,searchPattern:r,setPageState:n=>{l(e=>({...e,...n})),t&&u.set(p(e),{...u.get(p(e)),...n})}}})(e,{itemsPerPage:s.includes(a)?a:s[0]},N),C=(0,i.useMemo)(()=>R?k??(0,i.jsx)(o.ListEmptyView,{reason:"filtered","data-testid":"list-empty-view-filtered"}):h??(0,i.jsx)(o.ListEmptyView,{}),[R,h,k]),O=(0,i.useMemo)(()=>t.map(({sortDataField:e,...n})=>n),[t]),L=(0,i.useMemo)(()=>g&&R?n.filter(e=>(Array.isArray(g)?g:[g]).some(n=>e[n]&&String(e[n]).toLowerCase().includes(R.toLowerCase()))):n,[n,R,g]),I=(0,i.useMemo)(()=>{if(!E)return L;const e=t.find(({key:e})=>e===E)?.sortDataField??E,n=t.find(({key:e})=>e===E)?.sort??((n,t)=>n[e]<t[e]?-1:n[e]>t[e]?1:0);return[...L].sort((e,t)=>l===T?n(e,t):n(t,e))},[L,E,T,t]),q=(0,i.useMemo)(()=>{if(_===c)return I;const e=_*(F-1),n=e+_;return I.slice(e,n)},[F,I,_]),H=(0,i.useCallback)(e=>{D({searchPattern:e}),e!==R&&D({page:1})},[R]),B=(0,i.useCallback)(e=>{D({itemsPerPage:e});(e===c?1:Math.ceil(L.length/e))<F&&D({page:1})},[L.length,F]);return(0,i.useEffect)(()=>{if("function"==typeof b&&x.length){const e=L.map(e=>{return n=e,"function"==typeof(t=j)?t(n):n[t];var n,t}).filter(e=>x.includes(e));b(e)}},[L]),(0,i.jsx)(o.List,{pagination:(0,i.jsx)(o.Pagination,{current:F,total:_===c?1:Math.ceil(L.length/_),onSelect:e=>D({page:e}),itemsPerPage:_,itemsPerPageOptions:s,onItemsPerPageChange:B}),toolbar:(S||g)&&(0,i.jsxs)(o.Toolbar,{children:[S,g&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.ToolbarExpander,{}),(0,i.jsx)(o.ToolbarGroup,{title:"",children:(0,i.jsx)(o.SearchBar,{inputProps:{placeholder:r.lmsg("searchPlaceholder"),"data-testid":"list-searchbar",value:R,...y??{}},onTyping:H})})]})]}),totalRows:L.length,sortColumn:E,sortDirection:T,onSortChange:P,columns:O,data:q,filtered:!!R,locale:{totalRows:({totalRows:e})=>r.formatMessage("recordsTotal",{total:e}),...v},emptyView:C,onSelectionChange:b,selection:x,rowKey:j,...w})};f.propTypes={id:s().string.isRequired,data:s().array.isRequired,columns:s().array.isRequired,itemsPerPage:s().number,itemsPerPageOptions:s().array,sortColumn:s().string,sortDirection:s().string,searchField:s().oneOfType([s().string,s().arrayOf(s().string.isRequired)]),locale:s().object,emptyView:s().node,emptyFilteredView:s().node,toolbar:s().node,onSelectionChange:s().func,selection:s().array,rowKey:s().oneOfType([s().string,s().func]),searchBarInputProps:s().object,useStorage:s().bool};const g=f},1449:(e,n,t)=>{"use strict";t.r(n),t.d(n,{getGraphQlErrorMessage:()=>i});const i=({graphQLErrors:e,message:n})=>{if(e.length){const{message:n,extensions:t}=e[0];return`${t?.debugMessage||n}`}return n}},1473:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>r});var i=t(297),a=t(90),s=t(296);const o=a.Locale.getSection("components.buttons"),r=({id:e,content:n,icon:t="copy",className:a,tooltip:r=o.lmsg("copyToClipboard"),onCopy:l=()=>{},children:d})=>(0,s.jsx)(i.Button,{className:a,ghost:!0,icon:t,tooltip:r,tooltipAsLabel:!0,onClick:()=>{(0,i.copyToClipboard)(n),l()},"data-action":"copy-to-clipboard"+(e?`-${e}`:""),children:d})},1560:e=>{e.exports=Jsw.skinUrl+"/images/wave.png?cb207b07fa5bec748d1d05473f492a23"},1561:e=>{var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SwitchHomeView"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"enableNewView"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"switchHomeView"},arguments:[{kind:"Argument",name:{kind:"Name",value:"enableNewView"},value:{kind:"Variable",name:{kind:"Name",value:"enableNewView"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enableNewView"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:134}};n.loc.source={body:"mutation SwitchHomeView($enableNewView: Boolean!) {\n switchHomeView(enableNewView: $enableNewView) {\n enableNewView\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&n.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}var i={};function a(e,n){for(var t=0;t<e.definitions.length;t++){var i=e.definitions[t];if(i.name&&i.name.value==n)return i}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),i[e.name.value]=n}}),e.exports=n,e.exports.SwitchHomeView=function(e,n){var t={kind:e.kind,definitions:[a(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var s=i[n]||new Set,o=new Set,r=new Set;for(s.forEach(function(e){r.add(e)});r.size>0;){var l=r;r=new Set,l.forEach(function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach(function(e){r.add(e)}))})}return o.forEach(function(n){var i=a(e,n);i&&t.definitions.push(i)}),t}(n,"SwitchHomeView")},1562:e=>{var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"HideHomeViewPromo"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hideHomeViewPromo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"query"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"viewer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"home"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"feedbackURL"},arguments:[],directives:[]}]}}]}}]}}]}}]}}],loc:{start:0,end:217}};n.loc.source={body:"mutation HideHomeViewPromo {\n hideHomeViewPromo {\n query {\n viewer {\n login\n home {\n feedbackURL\n }\n }\n }\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&n.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}var i={};function a(e,n){for(var t=0;t<e.definitions.length;t++){var i=e.definitions[t];if(i.name&&i.name.value==n)return i}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),i[e.name.value]=n}}),e.exports=n,e.exports.HideHomeViewPromo=function(e,n){var t={kind:e.kind,definitions:[a(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var s=i[n]||new Set,o=new Set,r=new Set;for(s.forEach(function(e){r.add(e)});r.size>0;){var l=r;r=new Set,l.forEach(function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach(function(e){r.add(e)}))})}return o.forEach(function(n){var i=a(e,n);i&&t.definitions.push(i)}),t}(n,"HideHomeViewPromo")},1618:(e,n,t)=>{"use strict";t.r(n),t.d(n,{PERIOD_DAILY:()=>m,PERIOD_HOURLY:()=>u,PERIOD_MONTHLY:()=>f,PERIOD_WEEKLY:()=>p,PERIOD_YEARLY:()=>g,default:()=>h});var i=t(297),a=t(90),s=t(668),o=t.n(s),r=t(296);const l=a.Locale.getTranslate("components.forms.backup.schedule"),d=a.Locale.getSection("components.forms.backup.schedule"),c=a.Locale.getTranslate("smb.components.days-of-week"),u=3600,m=86400,p=604800,f=2592e3,g=31536e3,v=({showHourlyOption:e=!1,period:n,timezone:t=null,hidePeriod:a=!1,values:s,handleFieldChange:o})=>(0,r.jsx)(i.FormField,{label:(0,r.jsx)(l,{content:"backupPeriod"}),name:"schedule[period]",description:(0,r.jsx)(l,{content:"backupTimeDescription",params:{timezone:t??(0,r.jsx)(l,{content:"systemTimeZone"})}}),children:({isDisabled:t})=>(0,r.jsxs)(r.Fragment,{children:[!a&&(0,r.jsxs)(i.Select,{size:"sm",name:"schedule[backupPeriod]",id:"schedule-backupPeriod",value:n,onChange:e=>o("backupPeriod",e),disabled:t(),children:[(e||(0,i.getIn)(s,"backupPeriod")===u)&&(0,r.jsx)(i.SelectOption,{value:u,label:"hourly",children:(0,r.jsx)(l,{content:"hourly"})}),(0,r.jsx)(i.SelectOption,{value:m,label:"daily",children:(0,r.jsx)(l,{content:"daily"})}),(0,r.jsx)(i.SelectOption,{value:p,label:"weekly",children:(0,r.jsx)(l,{content:"weekly"})}),(0,r.jsx)(i.SelectOption,{value:f,label:"monthly",children:(0,r.jsx)(l,{content:"monthly"})})]}),n===p&&(0,r.jsxs)(r.Fragment,{children:[" ",(0,r.jsx)(l,{content:"on"})," ",(0,r.jsx)(i.Select,{size:"sm",name:"schedule[dayOfWeek]",id:"schedule-dayOfWeek",value:(0,i.getIn)(s,"dayOfWeek"),onChange:e=>o("dayOfWeek",e),disabled:t(),children:[7,1,2,3,4,5,6].map(e=>(0,r.jsx)(i.SelectOption,{value:e,label:`${e}`,children:(0,r.jsx)(c,{content:Math.max((e+1)%8,1)})},e))})]}),n===f&&(0,r.jsxs)(r.Fragment,{children:[" ",(0,r.jsx)(l,{content:"on"})," ",(0,r.jsx)(i.Select,{size:"xs",name:"schedule[dayOfMonth]",id:"schedule-dayOfMonth",value:(0,i.getIn)(s,"dayOfMonth"),onChange:e=>o("dayOfMonth",e),disabled:t(),children:Object.keys(new Array(31).fill(0)).map(e=>{const n=+e+1;return(0,r.jsx)(i.SelectOption,{value:n,label:`${n}`,children:1===n||31===n?(0,r.jsx)(l,{content:1===n?"first":"last"}):n},n)})})," ",(0,r.jsx)(l,{content:"dayOfMonth"})]}),n===u?(0,r.jsxs)(r.Fragment,{children:[" ",(0,r.jsx)(l,{content:"every"})," ",(0,r.jsx)(i.Select,{size:"xs",name:"schedule[hourPerDay]",id:"schedule-hourPerDay",value:(0,i.getIn)(s,"hourPerDay"),onChange:e=>o("hourPerDay",e),disabled:t(),children:[1,2,3,4,6,8,12].map(e=>(0,r.jsx)(i.SelectOption,{value:e*u,label:`${e}`,children:e},e))})," ",d.formatMessage("hours",{period:(0,i.getIn)(s,"hourPerDay")/u})]}):(0,r.jsxs)(r.Fragment,{children:[" ",(0,r.jsx)(l,{content:"at"})," ",(0,r.jsx)(i.Select,{size:"xs",name:"schedule[hour]",id:"schedule-hour",value:(0,i.getIn)(s,"hour"),onChange:e=>o("hour",e),disabled:t(),children:Object.keys(new Array(24).fill(0)).map(e=>{const n=+e;return(0,r.jsx)(i.SelectOption,{value:n,label:`${n}`,children:`${n<10?"0":""}${n}`},n)})})," : ",(0,r.jsx)(i.Select,{size:"xs",name:"schedule[minute]",id:"schedule-minute",value:(0,i.getIn)(s,"minute"),onChange:e=>o("minute",e),disabled:t(),children:[0,15,30,45].map(e=>(0,r.jsx)(i.SelectOption,{value:e,label:`${e}`,children:`${e<10?"0":""}${e}`},e))})]})]})});v.propTypes={showHourlyOption:o().bool,period:o().number.isRequired,timezone:o().string,hidePeriod:o().bool,values:o().object.isRequired,handleFieldChange:o().func.isRequired};const h=v},1621:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>c});var i=t(297),a=t(90),s=t(668),o=t.n(s),r=t(296);const l=a.Locale.getTranslate("controllers.backup.schedule"),d=({showBuyLink:e,url:n,newWindow:t,onDetailsClick:a=null})=>e?(0,r.jsx)(i.Status,{icon:"dollar-filled",intent:"danger",children:(0,r.jsxs)(i.Text,{intent:"muted",fontSize:"sm",children:[(0,r.jsx)(l,{content:"cloudBackupRestrictionHintWithBuy"}),(0,r.jsx)("br",{}),a&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("a",{"data-testid":"readMore",id:"promo-banner-read-more",onClick:()=>a(),rel:"noopener noreferrer",children:(0,r.jsx)(l,{content:"showMoreButton"})}),"  "]}),(0,r.jsx)("a",{href:n,target:t?"_blank":null,rel:"noopener noreferrer",children:(0,r.jsx)(l,{content:"cloudBackupRestrictionBuyButton"})})]})}):(0,r.jsx)(i.Status,{intent:"warning",children:(0,r.jsxs)(i.Text,{intent:"muted",fontSize:"sm",children:[(0,r.jsx)(l,{content:"cloudBackupRestrictionHint"}),a&&(0,r.jsxs)(r.Fragment,{children:[" ",(0,r.jsx)("a",{"data-testid":"readMore",onClick:a,id:"promo-banner-read-more",rel:"noopener noreferrer",children:(0,r.jsx)(l,{content:"showMoreButton"})})]})]})});d.propTypes={showBuyLink:o().bool.isRequired,url:o().string.isRequired,newWindow:o().bool.isRequired,onDetailsClick:o().func};const c=d},1625:(e,n,t)=>{"use strict";t.r(n),t.d(n,{TYPE_CONFIGURATION:()=>d,TYPE_DATABASE:()=>m,TYPE_FILES:()=>u,TYPE_MAIL:()=>c,default:()=>f});var i=t(297),a=t(90),s=t(668),o=t.n(s),r=t(296);const l=a.Locale.getTranslate("components.forms.backup.subform"),d="configuration",c="backup_content_mail",u="backup_content_file",m="backup_content_database",p=({isMailServiceSupported:e,values:n,handleFieldChange:t})=>{const a=(0,i.getIn)(n,"content[content_type]"),s=(e,n)=>t("content_type","content",n?[...a,e]:a.filter(n=>n!==e));return(0,r.jsxs)(i.FormField,{label:(0,r.jsx)(l,{content:"content"}),name:"backup[content][content_type]",children:[(0,r.jsx)(i.FormFieldCheckbox,{label:(0,r.jsx)(l,{content:"domainConfiguration"}),id:`backup-content-content_type-${d}`,disabled:!0,value:a.includes(d)}),e&&(0,r.jsx)(i.FormFieldCheckbox,{label:(0,r.jsx)(l,{content:"domainConfigurationMail"}),id:`backup-content-content_type-${c}`,value:a.includes(c),onChange:e=>s(c,e)}),(0,r.jsx)(i.FormFieldCheckbox,{label:(0,r.jsx)(l,{content:"domainConfigurationFile"}),id:`backup-content-content_type-${u}`,value:a.includes(u),onChange:e=>s(u,e)}),(0,r.jsx)(i.FormFieldCheckbox,{label:(0,r.jsx)(l,{content:"domainConfigurationDatabase"}),id:`backup-content-content_type-${m}`,value:a.includes(m),onChange:e=>s(m,e)})]})};p.propTypes={isMailServiceSupported:o().bool.isRequired,values:o().object.isRequired,handleFieldChange:o().func.isRequired};const f=p},1626:(e,n,t)=>{"use strict";t.r(n),t.d(n,{TYPE_BOTH:()=>p,TYPE_LOCAL:()=>u,default:()=>g});var i=t(296),a=t(297),s=t(1621),o=t(90),r=t(668),l=t.n(r);const d=o.Locale.getTranslate("components.forms.backup.subform"),c=o.Locale.getSection("components.forms.backup.subform"),u="local",m="ext",p="local-and-ext",f=({settings:{localEnabled:e,ftpEnabled:n,ftpConfigured:t,ftpActive:r,ftpServer:l,ftpBaseDir:f},showCloudStorages:g,cloudStorages:v,isAdmin:h,dumpsRepoDir:k,urls:{ftpSettings:S,remoteStorages:x},promo:b,showPromo:y,setShowPromo:j,values:N,handleFieldChange:w})=>{const E=e,T=n&&t&&r,P=n&&g,F=(0,a.getIn)(N,"content[repository]"),_=(0,a.getIn)(N,"content[remote_storage]"),R=(0,a.getIn)(N,"content[split_backup]"),D=(0,i.useMemo)(()=>{const e=f||"";return`${l||""}/${e.startsWith("/")?e.substring(1):e}`},[l,f]),C=(0,i.useMemo)(()=>[E?{repo:u,value:u,label:c.lmsg(h?"localRepositoryPath":"localRepository",{path:k})}:null,T?{repo:m,value:"ftp",label:(0,i.jsx)("span",{dangerouslySetInnerHTML:{__html:c.lmsg("ftpRepository",{uri:D,link:S})}}),name:c.lmsg("ftpRepositoryText",{uri:D})}:null,...P?v.map(({id:e,description:n})=>({repo:m,value:e,label:n,name:n})):[]].filter(Boolean),[E,T,P,h,D,S,k,v]),O=(0,i.useMemo)(()=>C.filter(({value:e})=>e!==u),[C]);return(0,i.useEffect)(()=>{j&&j(b&&"ftp"!==_&&F!==u)},[F,_,b,j]),(0,i.useEffect)(()=>{y&&o.UAT.dispatchAction("SHOWPROMO",{promo:"backup_scheduler",destination:_})},[y,_]),0===C.length?null:1===C.length?(0,i.jsx)(a.FormField,{label:(0,i.jsx)(d,{content:"repository"}),name:"backup[content][repository]",description:E&&n?(0,i.jsx)(d,{content:g?"configureRemoteDesc":"configureFtpDesc",params:{link:(0,i.jsx)("a",{href:g?x:S,children:(0,i.jsx)(d,{content:g?"configureRemoteLink":"configureFtpLink"})})}}):null,children:C[0].label}):(0,i.jsxs)(i.Fragment,{children:[E&&(0,i.jsx)(a.FormFieldRadioButtons,{label:(0,i.jsx)(d,{content:"repository"}),name:"backup[content][repository]",options:2===C.length?[...C.map(({repo:e,label:n})=>({value:e,label:n,description:F===e&&y&&(0,i.jsx)(s.default,{...b})})),{value:p,label:c.lmsg("localAndSpecialRepositoryBackup",{name:C[1].name}),description:F===p&&y&&(0,i.jsx)(s.default,{...b})}]:[C[0],{value:m,label:c.lmsg("remoteRepositoryOption")},{value:p,label:c.lmsg("localAndSpecialRepositoryBackup",{name:c.lmsg("remoteRepository")})}]}),O.length>1&&(F!==u||!E)&&(0,i.jsx)(a.FormFieldSelect,{label:(0,i.jsx)(d,{content:"remoteRepositoryText"}),name:"backup[content][remote_storage]",description:y&&(0,i.jsx)(s.default,{...b}),children:O.map(({value:e,name:n})=>(0,i.jsx)(a.SelectOption,{value:e,label:`${e}`,children:n},e))}),(F!==u||!E)&&(0,i.jsx)(a.FormField,{label:null,name:"backup[content][split_backup_size]",children:({isDisabled:e})=>(0,i.jsxs)("span",{style:{display:"flex",flexGrow:"1",gap:"4px",alignItems:"center"},children:[(0,i.jsx)(a.Checkbox,{id:"split_backup",checked:R,onChange:e=>w("split_backup","content",e),disabled:e(),children:(0,i.jsx)(d,{content:"splitSize"})}),(0,i.jsx)(a.Input,{id:"backup-content-split_backup_size",value:(0,a.getIn)(N,"content[split_backup_size]"),onChange:e=>w("split_backup_size","content",e.target.value),disabled:!R||e(),size:"sm"})]})})]})};f.propTypes={settings:l().shape({localEnabled:l().bool.isRequired,ftpEnabled:l().bool.isRequired,ftpConfigured:l().bool.isRequired,ftpActive:l().bool.isRequired,ftpServer:l().string,ftpBaseDir:l().string}).isRequired,showCloudStorages:l().bool.isRequired,cloudStorages:l().array.isRequired,isAdmin:l().bool.isRequired,dumpsRepoDir:l().string.isRequired,urls:l().shape({ftpSettings:l().string.isRequired,remoteStorages:l().string.isRequired}).isRequired,promo:l().object,showPromo:l().bool.isRequired,setShowPromo:l().func,values:l().object.isRequired,handleFieldChange:l().func.isRequired};const g=f},1632:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>N,renderSchedule:()=>x});var i=t(668),a=t(297),s=t(90),o=t(1435),r=t(296),l=t(1618),d=t(1625),c=t(1626),u=t(546);const m=s.Locale.getTranslate("components.lists.backup.schedule"),p=s.Locale.getSection("components.lists.backup.schedule"),f=s.Locale.getSection("smb.components.days-of-week"),g=s.Locale.getSection("components.forms.backup.subform"),v=e=>`${e<10?"0":""}${e}`,h=e=>f.lmsg(Math.max((e+1)%8,1)),k=e=>{switch(e){case 1:return p.lmsg("dayFirst");case 31:return p.lmsg("dayLast");default:return p.formatMessage("day",{day:e})}},S=({type:e})=>{switch(e){case l.PERIOD_HOURLY:return p.lmsg("periodHourly");case l.PERIOD_DAILY:return p.lmsg("periodDaily");case l.PERIOD_WEEKLY:return p.lmsg("periodWeekly");case l.PERIOD_MONTHLY:return p.lmsg("periodMonthly");default:return p.lmsg("periodCustom")}},x=({type:e,period:n,time:{hours:t,minutes:i}={},day:a})=>{switch(e){case l.PERIOD_HOURLY:return p.formatMessage("periodHourlySchedule",{period:Math.max(Math.round(n/3600),1)});case l.PERIOD_DAILY:return p.lmsg("periodDailySchedule",{hours:v(t),minutes:v(i)});case l.PERIOD_WEEKLY:return p.lmsg("periodWeeklySchedule",{hours:v(t),minutes:v(i),day:h(a)});case l.PERIOD_MONTHLY:return p.lmsg("periodMonthlySchedule",{hours:v(t),minutes:v(i),day:k(a)});default:return""}},b=({content:e})=>e[d.TYPE_MAIL]&&e[d.TYPE_FILES]&&e[d.TYPE_DATABASE]?g.lmsg("backupAll"):e[d.TYPE_MAIL]&&e[d.TYPE_FILES]?g.lmsg("backupMailFile"):e[d.TYPE_MAIL]&&e[d.TYPE_DATABASE]?g.lmsg("backupMailDatabase"):e[d.TYPE_FILES]&&e[d.TYPE_DATABASE]?g.lmsg("backupVhost"):e[d.TYPE_MAIL]?g.lmsg("backupMail"):e[d.TYPE_FILES]?g.lmsg("backupFile"):e[d.TYPE_DATABASE]?g.lmsg("backupDatabase"):g.lmsg("backupConfiguration"),y=({repository:e,remoteStorage:n})=>{switch(e){case c.TYPE_LOCAL:return p.lmsg("storageLocal");case c.TYPE_BOTH:return p.lmsg("storageBoth",{remoteStorage:n});default:return n}},j=({data:e,onEdit:n,deactivateUrl:t})=>{const[i,l]=(0,r.useState)([]),[d,c]=(0,r.useState)(e);(0,r.useEffect)(()=>c(e),[e]);const p=(0,r.useMemo)(()=>(d||[]).sort((e,n)=>e.period<n.period),[d]),f=async e=>{try{l(n=>[...n,e]);const{status:n,message:i}=await s.api.post(t,{period:e});"error"===n?(0,u.addToast)({intent:"danger",message:i}):(c(n=>n.map(n=>({...n,status:n.type!==e&&n.status}))),(0,u.addToast)({intent:"success",message:(0,r.jsx)(m,{content:"deactivateSuccess"})}))}finally{l(n=>n.filter(n=>n!==e))}};return(0,r.jsx)(o.default,{id:"backup-schedule-list",rowKey:"type",columns:[{key:"status",width:"1%",render:e=>(0,r.jsx)(a.Switch,{id:`toggle-${e.type}`,"data-status":e.status,checked:e.status,onChange:t=>(({type:e},t)=>{t?n(e,!0):f(e)})(e,t),loading:i.includes(e.type)})},{key:"schedule",title:(0,r.jsx)(m,{content:"columnSchedule"}),type:"title",render:e=>(0,r.jsxs)("a",{id:`edit-${e.type}`,onClick:()=>n(e.type),children:[S(e),e.status&&(0,r.jsxs)(r.Fragment,{children:[" ",(0,r.jsx)(a.Text,{intent:"muted",children:`(${x(e)})`})]})]})},{key:"content",title:(0,r.jsx)(m,{content:"columnContent"}),render:b},{key:"storage",title:(0,r.jsx)(m,{content:"columnStorage"}),render:y}],data:p})};j.propTypes={data:i.PropTypes.array.isRequired,onEdit:i.PropTypes.func.isRequired,deactivateUrl:i.PropTypes.string.isRequired};const N=j},1896:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>o});var i=t(1897),a=t(1901),s=t(296);const o=({loading:e,fallback:n,children:t})=>(0,s.jsx)(a.default,{children:(0,s.jsx)(i.default,{classNames:"skeleton-wrapper",timeout:500,children:(0,s.jsx)("div",{children:e?n:t})},e.toString())})},1904:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>d});var i=t(668),a=t.n(i),s=t(297),o=t(1449),r=t(296);const l=({error:e})=>400===e.networkError?.statusCode?null:(0,r.jsx)(s.StatusMessage,{intent:"danger",children:(0,o.getGraphQlErrorMessage)(e)});l.propTypes={error:a().shape({message:a().string.isRequired,networkError:a().shape({statusCode:a().number})}).isRequired};const d=l},2741:(e,n,t)=>{"use strict";t.r(n),t.d(n,{getClientStatusReason:()=>a,getDomainStatusReason:()=>s,getResellerStatusReason:()=>o,getSubscriptionStatusReason:()=>r});const i=t(90).Locale.getSection("components.status.reason"),a=e=>l(+e,"client"),s=e=>l(+e,"domain"),o=e=>l(+e,"reseller"),r=e=>"0"===e?i.lmsg("subscription.active"):256===parseInt(e)?i.lmsg("subscription.inactiveExpired"):i.lmsg("subscription.inactive"),l=(e,n)=>0===e?i.lmsg(`${n}.active`):16&e?i.lmsg(`${n}.inactiveByAdmin`):32&e?i.lmsg(`${n}.inactiveByReseller`):64&e?i.lmsg(`${n}.inactiveByClient`):2&e?i.lmsg(`${n}.inactiveWithParent`):256&e?i.lmsg(`${n}.inactiveExpired`):4&e?i.lmsg(`${n}.inactiveBackupRestore`):i.lmsg(`${n}.inactive`)},2900:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>i.default});var i=t(2901)},2901:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>O});var i=t(296),a=t(668),s=t(2902),o=t(1286),r=t(2910),l=t(2918),d=t(2927),c=t(2931),u=t(2934),m=t(2936),p=t(2940),f=t(2945),g=t(2950),v=t(2964),h=t(2969),k=t(2972),S=(t(2979),t(696)),x=t(620),b=t(599),y=t(2980),j=t(1294),N=t(2983),w=t(1295),E=t.n(w),T=t(2957),P=t.n(T),F=t(2984),_=t.n(F);const R={[o.SERVER_INFO]:r.default,[o.IP_BAN]:m.default,[o.OVERUSED_SUBSCRIPTIONS]:c.default,[o.UPDATES]:l.default,[o.BACKUP]:d.default,[o.MY_SUBSCRIPTIONS]:u.default,[o.MAIL_QUEUE]:f.default,[o.PROMO]:g.default,[o.CHANGE_LOG]:v.default,[o.CUSTOM_BUTTONS]:h.default},D=({index:e,panels:n,data:t,systemMessages:a})=>(0,i.jsx)(s.Droppable,{droppableId:`${e}`,children:({innerRef:e,droppableProps:s,placeholder:r}={})=>(0,i.jsxs)("div",{className:"home-page-dashboard__section",ref:e,...s,children:[a,n.map((e,n)=>{const a=e.startsWith("ext:"),s=a?p.default:R[e];return s&&(0,i.jsx)(s,{data:t[a?o.EXTENSIONS:e],name:e,index:n},e)}),r]})});D.propTypes={index:a.PropTypes.number.isRequired,panels:a.PropTypes.array.isRequired,data:a.PropTypes.object.isRequired,systemMessages:a.PropTypes.node};const C=({data:e})=>{const n=(0,x.useQuery)(E()),[t,a]=(0,i.useState)([]),o=n.data?.viewer?.home?.systemMessages??[],r=n.data?.viewer?.home?.feedbackURL;(0,i.useEffect)(()=>{a(n.data?.viewer?.home?.layout??[])},[n]);const[l]=(0,S.useMutation)(_(),{refetchQueries:[{query:P()}]});return(0,i.jsxs)(i.Fragment,{children:[!!r&&(0,i.jsx)(N.default,{feedbackURL:r}),(0,j.default)(n)?(0,i.jsx)(y.default,{}):(0,i.jsx)(s.DragDropContext,{onDragEnd:({draggableId:e,source:n,destination:t})=>{t&&(n.droppableId===t.droppableId&&n.index===t.index||a(i=>{const a=i.map((i,a)=>{const s=[...i];return a===+n.droppableId&&s.splice(n.index,1),a===+t.droppableId&&s.splice(t.index,0,e),s});return l({variables:{layout:a}}),a}))},children:(0,i.jsx)("div",{className:"home-page",children:(0,i.jsx)("div",{className:"home-page-dashboard",children:t.map((n,t)=>(0,i.jsx)(D,{index:t,panels:n,data:e,systemMessages:0===t&&!!o.length&&(0,i.jsx)(k.default,{systemMessages:o})},t))})})}),(0,i.jsx)(b.Outlet,{})]})};C.propTypes={data:a.PropTypes.object.isRequired};const O=C},2910:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>i.default});var i=t(2911)},2911:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>v});var i=t(668),a=t.n(i),s=t(90),o=t(2912),r=t(2913),l=t(2917),d=t(718),c=t(617),u=t(297),m=t(296);const p=s.Locale.getTranslate("components.pages.Home.ServerInfo"),f=s.Locale.getSection("components.pages.Home.ServerInfo"),g=({server:{defaultIpAddress:e,settings:{fullHostName:n},information:t},os:{name:i},viewer:{permissions:{manageServerInfo:a}}})=>(0,m.jsxs)(m.Fragment,{children:[n&&(0,m.jsx)(o.default,{name:"hostname",content:n,copyTooltip:f.lmsg("copyHostname")}),e?.ipAddress&&(0,m.jsx)(o.default,{name:"ipAddress",content:e.ipAddress,copyTooltip:f.lmsg("copyIpAddress")}),e?.publicIpAddress&&(0,m.jsx)(o.default,{name:"publicIpAddress",content:e.publicIpAddress,copyTooltip:f.lmsg("copyPublicIpAddress")}),i&&(0,m.jsx)(o.default,{name:"os",content:i,copyTooltip:f.lmsg("copyOs")}),t?.sysUptime&&(0,m.jsx)(o.default,{name:"uptime",content:f.formatMessage("uptimeValue",(0,c.toDatePeriod)(t.sysUptime)),canCopy:!1}),a&&(0,m.jsx)(l.default,{children:(0,m.jsx)(u.Button,{ghost:!0,component:d.default,id:"toServerInfo",to:"/cp/server/information/",children:(0,m.jsx)(p,{content:"more"})})})]});g.propTypes={server:a().object.isRequired,os:a().object.isRequired,viewer:a().object.isRequired};const v=(0,r.default)(g)},2912:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>p});var i=t(668),a=t.n(i),s=t(683),o=t.n(s),r=t(297),l=t(90),d=t(1473),c=t(296);const u=l.Locale.getTranslate("components.pages.Home.ServerInfo"),m=({name:e,content:n,canCopy:t=!0,copyTooltip:i})=>(0,c.jsxs)("div",{className:"home-page-panel-block home-page-server-info-block",children:[(0,c.jsx)("div",{className:"home-page-server-info-block__title",children:(0,c.jsx)(r.Text,{intent:"muted",bold:!0,children:(0,c.jsx)(u,{content:e})})}),(0,c.jsxs)("div",{className:o()("home-page-server-info-block__content",{"home-page-server-info-block__content--copy":t}),children:[(0,c.jsx)("span",{className:"home-page-server-info-block__text",children:n}),t?(0,c.jsx)(d.default,{tooltip:i,className:"home-page-server-info-block__copy",id:e,content:n,icon:{name:"copy",size:12}}):null]})]});m.propTypes={name:a().string.isRequired,content:a().string.isRequired,canCopy:a().bool,copyTooltip:a().string};const p=m},2913:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>u});var i=t(668),a=t(297),s=t(2902),o=t(2914),r=t(683),l=t.n(r),d=t(296);const c=({name:e,title:n,icon:t,children:i,...a})=>(0,d.jsx)(s.Draggable,{draggableId:e,...a,children:({innerRef:a,draggableProps:s,dragHandleProps:r}={},{isDragging:c}={})=>(0,d.jsx)("div",{ref:a,...s,className:l()("home-page-dashboard__item",c&&"home-page-dashboard__panel-is-dragged"),children:(0,d.jsx)(o.default,{name:e,title:n,icon:t,dragHandleProps:r,children:i})})});c.propTypes={name:i.PropTypes.string.isRequired,title:i.PropTypes.node,icon:i.PropTypes.node,children:i.PropTypes.node};const u=(e,{title:n,icon:t}={})=>{const s=({data:{data:i,errors:s=[]}={},name:o,...r})=>(0,d.jsx)(c,{name:o,title:"function"==typeof n?n(i,o):n,icon:"function"==typeof t?t(i,o):t,...r,children:s.length?s.map(e=>(0,d.jsx)(a.StatusMessage,{intent:"danger",children:e},e)):(0,d.jsx)(e,{name:o,...i})});return s.propTypes={data:i.PropTypes.object,name:i.PropTypes.string.isRequired},s.displayName=`withPanelLayout(${e.displayName||e.name||"Component"})`,s.WrappedComponent=e,s}},2914:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>p});var i=t(297),a=t(2915),s=t(90),o=t(2916),r=t(668),l=t.n(r),d=t(296);const c=s.Locale.getTranslate("components.pages.Home.Customization"),u=s.Locale.getSection("components.pages.Home.Customization"),m=({name:e,title:n,icon:t,dragHandleProps:s={},children:r})=>(0,d.jsxs)(i.Panel,{className:"home-page-dashboard__panel","data-type":`panel-${e}`,children:[(0,d.jsxs)(i.Heading,{className:"home-page-dashboard__panel-heading",level:5,children:[t??(0,d.jsx)(o.default,{icon:a.default[e],className:"home-page-dashboard__panel-heading-icon"}),(0,d.jsx)("span",{className:"home-page-dashboard__panel-title",children:n??(0,d.jsx)(c,{content:e})}),(0,d.jsx)(i.Button,{className:"home-page-dashboard__panel-heading-control",component:"div","data-type":`handle-${e}`,ghost:!0,icon:(0,d.jsx)(i.Icon,{size:"12",children:(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 14",children:(0,d.jsx)("path",{d:"M0 0h2v2H0zm0 4h2v2H0zm0 4h2v2H0zm0 4h2v2H0zM4 0h2v2H4zm0 4h2v2H4zm0 4h2v2H4zm0 4h2v2H4z"})})}),"aria-label":u.lmsg("drag"),...s})]}),r]});m.propTypes={name:l().string.isRequired,title:l().node,icon:l().node,dragHandleProps:l().object,children:l().node};const p=m},2915:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>a});var i=t(1286);const a={[i.SERVER_INFO]:"server",[i.IP_BAN]:"security-check",[i.OVERUSED_SUBSCRIPTIONS]:"bar-chart-vertical-lock",[i.UPDATES]:"rocket",[i.BACKUP]:"backup2",[i.MY_SUBSCRIPTIONS]:"four-squares",[i.MAIL_QUEUE]:"mail",[i.PROMO]:"star",[i.CHANGE_LOG]:"web",[i.CUSTOM_BUTTONS]:"card-row"}},2916:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>r});var i=t(668),a=t(297),s=t(296);const o=({icon:e="plugins",...n})=>(0,s.jsx)(a.Icon,{name:e?.includes(".")?void 0:e,src:e,intent:"inactive",...n});o.propTypes={icon:i.PropTypes.string};const r=o},2917:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>o});var i=t(668),a=t(296);const s=({children:e})=>(0,a.jsx)("div",{className:"home-page-dashboard__panel-footer",children:e});s.propTypes={children:i.PropTypes.node.isRequired};const o=s},2918:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>i.default});var i=t(2919)},2919:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>g});var i=t(668),a=t(90),s=t(2920),o=t(2925),r=t(297),l=t(718),d=t(2913),c=t(2917),u=t(296);const m=a.Locale.getTranslate("components.pages.Home.Updates"),p=({server:{productVersion:{name:e,version:n,patch:t}},primaryKey:{editionName:i}})=>(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(m,{component:"div",content:"version",params:{name:e,version:n&&t?(0,u.jsx)(m,{content:"patch",params:{version:n,patch:t}}):n}}),i]});p.propTypes={server:i.PropTypes.object.isRequired,primaryKey:i.PropTypes.object.isRequired};const f=({server:{productVersion:{version:e},productUpdates:{lastUpdateDate:n,...t},pum:i},config:{updates:{showControls:a,visualNotifications:d}},mode:{isPumAllowed:p},viewer:{permissions:{manageServerUpdates:f}}})=>(0,u.jsxs)(u.Fragment,{children:[n&&(0,u.jsx)(r.Text,{component:"p",intent:"muted",fontSize:"sm",children:(0,u.jsx)(m,{content:"lastUpdated",params:{lastUpdateDate:n}})}),f&&(0,u.jsxs)(u.Fragment,{children:[a&&(0,u.jsx)(s.default,{currentVersion:e,updates:t,showAvailableUpgrade:d,settingsLink:p?"/admin/pum/settings":"/admin/update/settings"}),p&&(0,u.jsx)(o.default,{...i}),(0,u.jsx)(c.default,{children:(0,u.jsx)(r.Button,{ghost:!0,id:"toInstaller",component:l.default,to:"/admin/update/add-components",target:"_blank",icon:{name:"arrow-diagonal-out",style:{order:"1",marginInline:"4px 0"}},children:(0,u.jsx)(m,{content:"manageComponents"})})})]})]});f.propTypes={server:i.PropTypes.object.isRequired,config:i.PropTypes.object.isRequired,mode:i.PropTypes.object.isRequired,viewer:i.PropTypes.object.isRequired};const g=(0,d.default)(f,{title:e=>e?(0,u.jsx)(p,{...e}):(0,u.jsx)(m,{content:"title"})})},2920:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>k});var i=t(668),a=t(90),s=t(696),o=t(296),r=t(297),l=t(718),d=t(2921),c=t(2922),u=t(546),m=t(2923),p=t.n(m),f=t(2924),g=t.n(f);const v=a.Locale.getTranslate("components.pages.Home.Updates"),h=({currentVersion:e,updates:{isAutoupdateEnabled:n,...t},settingsLink:i,showAvailableUpgrade:m=!1})=>{const[f,h]=(0,o.useState)(t.availablePatch),[k,S]=(0,o.useState)(m?t.availableVersion:null),[x,b]=(0,o.useState)(t.lastCheckDate),[y,j]=(0,o.useState)(t.installingUpdatesTaskId),[N,{loading:w}]=(0,s.useMutation)(p(),{onCompleted:({checkProductUpdates:{productUpdates:{availablePatch:e,availableVersion:n,lastCheckDate:t}}})=>{h(e),S(n),b(t)},onError:({graphQLErrors:e})=>{e.forEach(({extensions:e,message:n})=>{(0,u.addToast)({intent:"danger",message:e?.debugMessage||n})})}}),[E,{loading:T}]=(0,s.useMutation)(g(),{onCompleted:({updateComponents:{id:e}})=>{j(e)},onError:({graphQLErrors:e})=>{e.forEach(({extensions:e,message:n})=>{(0,u.addToast)({intent:"danger",message:e?.debugMessage||n})})}});return(0,o.useEffect)(()=>{y&&a.Observer.append(({id:e})=>{+e===+y&&window.location.reload()},"plesk:taskComplete")},[y]),(0,o.jsxs)(o.Fragment,{children:[!n&&(0,o.jsx)(d.default,{intent:"warning",to:i,icon:"triangle-exclamation-mark-filled",children:(0,o.jsx)(v,{content:"enableAutoupdate"})}),(0,o.jsx)(c.default,{intent:x?void 0:null,button:(0,o.jsx)(r.Button,{id:"checkUpdates",onClick:N,state:w?"loading":void 0,children:(0,o.jsx)(v,{content:"checkUpdates"})}),children:x&&(0,o.jsx)(r.Text,{intent:"muted",children:(0,o.jsx)(v,{content:"lastChecked",params:{lastCheckDate:x}})})}),k&&(0,o.jsx)(c.default,{intent:"info",button:(0,o.jsx)(r.Button,{id:"installNewVersion",intent:"primary",component:l.default,target:"_blank",to:"/admin/update/product",children:(0,o.jsx)(v,{content:"installNewVersion"})}),children:(0,o.jsx)(v,{content:"newVersionAvailable",params:{availableVersion:k}})}),f&&!n&&(0,o.jsx)(c.default,{intent:"info",button:(0,o.jsx)(r.Button,{id:"installPatch",intent:"primary",onClick:E,state:T||y?"loading":void 0,children:(0,o.jsx)(v,{content:"installPatch"})}),children:(0,o.jsx)(v,{content:e?"patchAvailableVersion":"patchAvailable",params:{currentVersion:e}})})]})};h.propTypes={currentVersion:i.PropTypes.string.isRequired,updates:i.PropTypes.object.isRequired,settingsLink:i.PropTypes.string.isRequired,showAvailableUpgrade:i.PropTypes.bool};const k=h},2921:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>l});var i=t(668),a=t(297),s=t(718),o=t(296);const r=({children:e,...n})=>(0,o.jsx)(a.Label,{component:s.default,view:"light",size:"lg",...n,children:e});r.propTypes={children:i.PropTypes.node.isRequired};const l=r},2922:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>l});var i=t(668),a=t(297),s=t(296);const o=({button:e,children:n})=>(0,s.jsxs)(a.Media,{children:[n&&(0,s.jsx)(a.MediaSection,{children:n}),e&&(0,s.jsx)(a.MediaSection,{children:e})]});o.propTypes={button:i.PropTypes.node,children:i.PropTypes.node};const r=({intent:e,...n})=>null!==e?(0,s.jsx)(a.Alert,{intent:e,children:(0,s.jsx)(o,{...n})}):(0,s.jsx)("div",{style:{marginBlock:"16px"},children:(0,s.jsx)(o,{...n})});r.propTypes={intent:i.PropTypes.string};const l=r},2923:e=>{var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CheckProductUpdates"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"checkProductUpdates"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"productUpdates"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"availablePatch"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"availableVersion"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastCheckDate"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:182}};n.loc.source={body:"mutation CheckProductUpdates {\n checkProductUpdates {\n productUpdates {\n availablePatch\n availableVersion\n lastCheckDate\n }\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&n.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}var i={};function a(e,n){for(var t=0;t<e.definitions.length;t++){var i=e.definitions[t];if(i.name&&i.name.value==n)return i}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),i[e.name.value]=n}}),e.exports=n,e.exports.CheckProductUpdates=function(e,n){var t={kind:e.kind,definitions:[a(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var s=i[n]||new Set,o=new Set,r=new Set;for(s.forEach(function(e){r.add(e)});r.size>0;){var l=r;r=new Set,l.forEach(function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach(function(e){r.add(e)}))})}return o.forEach(function(n){var i=a(e,n);i&&t.definitions.push(i)}),t}(n,"CheckProductUpdates")},2924:e=>{var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateComponents"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateComponents"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:70}};n.loc.source={body:"mutation UpdateComponents {\n updateComponents {\n id\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&n.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}var i={};function a(e,n){for(var t=0;t<e.definitions.length;t++){var i=e.definitions[t];if(i.name&&i.name.value==n)return i}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),i[e.name.value]=n}}),e.exports=n,e.exports.UpdateComponents=function(e,n){var t={kind:e.kind,definitions:[a(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var s=i[n]||new Set,o=new Set,r=new Set;for(s.forEach(function(e){r.add(e)});r.size>0;){var l=r;r=new Set,l.forEach(function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach(function(e){r.add(e)}))})}return o.forEach(function(n){var i=a(e,n);i&&t.definitions.push(i)}),t}(n,"UpdateComponents")},2925:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>g});var i=t(668),a=t(296),s=t(726),o=t(90),r=t(297),l=t(718),d=t(2922),c=t(546),u=t(2926),m=t.n(u);const p=o.Locale.getSection("components.pages.Home.Updates"),f=({updates:{nodes:e,pageInfo:{total:n}},installingUpdatesTaskId:t})=>{const[i,u]=(0,a.useState)(t),[f,{loading:g}]=(0,s.useLazyQuery)(m(),{onCompleted:async({server:{pum:{updates:{nodes:e}}}})=>{const{PopupPackagesUpdate:n}=await Plesk.require("app/pum");new n({urls:{packageUpdateInfo:"/admin/pum/update-info",updatePackages:"/admin/pum/update"},packages:e.map(({isLocked:e,currentVersion:n,availableVersion:t,...i})=>({locked:e,version_from:n,version_to:t,...i})),onSuccess:({task:{id:e}})=>u(e)})},onError:({graphQLErrors:e})=>{e.forEach(({extensions:e,message:n})=>{(0,c.addToast)({intent:"danger",message:e?.debugMessage||n})})}});return(0,a.useEffect)(()=>{i&&o.Observer.append(({id:e})=>{+e===+i&&window.location.reload()},"plesk:taskComplete")},[i]),e.length?(0,a.jsx)(d.default,{intent:"info",button:(0,a.jsx)(r.Button,{id:"installPumUpdates",intent:"primary",state:g||i?"loading":void 0,onClick:f,children:p.formatMessage("installUpdates",{total:n})}),children:p.formatMessage("pumUpdates",{total:n,package:(0,a.jsx)(l.default,{to:"/admin/pum/updates-list",children:1===n?p.lmsg("pumPackage",e[0]):p.formatMessage("pumPackages",{total:n})})})}):null};f.propTypes={updates:i.PropTypes.object.isRequired,installingUpdatesTaskId:i.PropTypes.number};const g=f},2926:e=>{var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"PumUpdates"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"server"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pum"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updates"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currentVersion"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"availableVersion"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isLocked"},arguments:[],directives:[]}]}}]}}]}}]}}]}}],loc:{start:0,end:268}};n.loc.source={body:"query PumUpdates {\n server {\n pum {\n updates {\n nodes {\n name\n currentVersion\n availableVersion\n isLocked\n }\n }\n }\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&n.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}var i={};function a(e,n){for(var t=0;t<e.definitions.length;t++){var i=e.definitions[t];if(i.name&&i.name.value==n)return i}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),i[e.name.value]=n}}),e.exports=n,e.exports.PumUpdates=function(e,n){var t={kind:e.kind,definitions:[a(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var s=i[n]||new Set,o=new Set,r=new Set;for(s.forEach(function(e){r.add(e)});r.size>0;){var l=r;r=new Set,l.forEach(function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach(function(e){r.add(e)}))})}return o.forEach(function(n){var i=a(e,n);i&&t.definitions.push(i)}),t}(n,"PumUpdates")},2927:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>i.default});var i=t(2928)},2928:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>g});var i=t(90),a=t(620),s=t(297),o=t(1896),r=t(1904),l=t(718),d=t(2929),c=t(2913),u=t(2930),m=t.n(u),p=t(296);const f=i.Locale.getTranslate("components.pages.Home.Backup"),g=(0,c.default)(()=>{const{data:e,loading:n,error:t}=(0,a.useQuery)(m(),{context:{noBatch:!0}});return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(s.Paragraph,{component:"div",children:(0,p.jsxs)(o.default,{loading:n,fallback:(0,p.jsx)(s.SkeletonText,{lines:2}),children:[t&&(0,p.jsx)(r.default,{error:t}),e&&(0,p.jsx)(d.default,{data:e})]})}),(0,p.jsxs)("div",{className:"home-page-panel-buttons",children:[(0,p.jsx)(s.Button,{id:"createBackup",intent:"primary",component:l.default,to:"/admin/backup/backup",children:(0,p.jsx)(f,{content:"create"})}),(0,p.jsx)(s.Button,{id:"scheduleBackup",component:l.default,to:"/admin/backup/schedule",children:(0,p.jsx)(f,{content:"schedule"})})]})]})})},2929:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>v});var i=t(296),a=t(668),s=t(90),o=t(718),r=t(1242),l=t(297),d=t(1632);const c=s.Locale.getTranslate("components.pages.Home.Backup"),u={PERIOD_HOURLY:3600,PERIOD_EVERY_2_HOURS:7200,PERIOD_EVERY_3_HOURS:10800,PERIOD_EVERY_4_HOURS:14400,PERIOD_EVERY_6_HOURS:21600,PERIOD_EVERY_8_HOURS:28800,PERIOD_EVERY_12_HOURS:43200,PERIOD_DAILY:86400,PERIOD_WEEKLY:604800,PERIOD_MONTHLY:2592e3,PERIOD_YEARLY:31536e3},m=({id:e})=>{const[n,t,i]=e.split(":");if("task"===n)return(0,r.buildUrl)("/admin/backup/task-details",{taskId:t});const a={type:n,dumpId:t};return i&&(a.storageName=i),(0,r.buildUrl)("/admin/backup/restore",a)},p=({status:e})=>["off","task-failed"].includes(e),f=({minutes:e,hours:n,period:t,type:a,day:s})=>(0,i.jsx)(c,{content:a.toLowerCase(),params:{schedule:(0,d.renderSchedule)({time:{minutes:e,hours:n},period:u[t],type:u[a],day:s})}}),g=({data:{viewer:{client:{backup:{schedules:e,dumps:{nodes:n}}}}}})=>{const t=(0,i.useMemo)(()=>n[0],[n]),a=(0,i.useMemo)(()=>e.filter(({isEnabled:e})=>e).sort((e,n)=>e.period<n.period),[e]);return(0,i.jsxs)(i.Fragment,{children:[t&&(0,i.jsxs)("div",{style:{marginBottom:"5px"},children:[p(t)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.Tooltip,{title:(0,i.jsx)(c,{content:`${t.status}Status`}),children:(0,i.jsx)(l.Icon,{name:"exclamation-mark-circle-filled",intent:"danger"})})," "]}),(0,i.jsx)(o.default,{id:"toLastBackup",to:m(t),children:t.dateString})]}),(0,i.jsxs)(l.Text,{intent:t?"muted":void 0,fontSize:t?"sm":"md",component:"div",children:[0===a.length&&(0,i.jsx)(c,{content:"noSchedule"}),1===a.length&&(0,i.jsx)(c,{content:"activeSchedule",params:{schedule:f(a[0])}}),a.length>1&&(0,i.jsx)(c,{content:"activeSchedules",params:{schedules:(0,i.jsx)("ul",{children:a.map(e=>(0,i.jsx)("li",{children:f(e)},e.type))})}})]})]})};g.propTypes={data:a.PropTypes.object.isRequired};const v=g},2930:e=>{var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"HomeBackup"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"viewer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"client"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"backup"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"schedules"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"period"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"minutes"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hours"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"day"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"dumps"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"pagination"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"page"},value:{kind:"IntValue",value:"1"}},{kind:"ObjectField",name:{kind:"Name",value:"itemsPerPage"},value:{kind:"IntValue",value:"1"}}]}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dateString"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]}]}}]}}]}}]}}]}}]}}],loc:{start:0,end:575}};n.loc.source={body:"query HomeBackup {\n viewer {\n login\n client {\n id\n backup {\n schedules {\n type\n period\n isEnabled\n minutes\n hours\n day\n }\n dumps(input: { pagination: { page: 1, itemsPerPage: 1 } }) {\n nodes {\n id\n dateString\n status\n }\n }\n }\n }\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&n.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}var i={};function a(e,n){for(var t=0;t<e.definitions.length;t++){var i=e.definitions[t];if(i.name&&i.name.value==n)return i}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),i[e.name.value]=n}}),e.exports=n,e.exports.HomeBackup=function(e,n){var t={kind:e.kind,definitions:[a(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var s=i[n]||new Set,o=new Set,r=new Set;for(s.forEach(function(e){r.add(e)});r.size>0;){var l=r;r=new Set,l.forEach(function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach(function(e){r.add(e)}))})}return o.forEach(function(n){var i=a(e,n);i&&t.definitions.push(i)}),t}(n,"HomeBackup")},2931:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>i.default});var i=t(2932)},2932:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>m});var i=t(668),a=t.n(i),s=t(90),o=t(2933),r=t(297),l=t(2913),d=t(296);const c=s.Locale.getTranslate("components.pages.Home.OverusedSubscriptions"),u=({viewer:{client:{subscriptions:{pageInfo:{total:e},nodes:n}}}})=>0===e?(0,d.jsx)(r.Status,{intent:"success",children:(0,d.jsx)(c,{content:"empty"})}):(0,d.jsx)(o.default,{subscriptions:n,total:e});u.propTypes={viewer:a().object.isRequired};const m=(0,l.default)(u)},2933:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>f});var i=t(668),a=t.n(i),s=t(90),o=t(2917),r=t(718),l=t(666),d=t(2741),c=t(297),u=t(296);const m=s.Locale.getTranslate("components.pages.Home.OverusedSubscriptions"),p=({subscriptions:e,total:n})=>(0,u.jsxs)(u.Fragment,{children:[e.map(({status:e,mainDomain:{id:n,name:t},limits:{all:i}})=>(0,u.jsxs)("div",{className:"home-page-panel-block",children:["0"!==e&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(c.Tooltip,{title:(0,d.getSubscriptionStatusReason)(e),children:(0,u.jsx)(c.Icon,{name:"exclamation-mark-circle-filled",intent:"danger"})})," "]}),(0,u.jsx)(r.default,{to:`/admin/subscription/overview/id/${(0,l.getId)(n)}`,children:t}),(0,u.jsx)(c.Cuttable,{style:{marginTop:"5px"},children:i.map(({name:e,...n})=>(0,u.jsxs)(c.Text,{intent:"muted",component:"div",children:[(0,u.jsx)(c.Text,{bold:!0,children:`${e}: `}),(0,u.jsx)(m,{content:"usage",params:n})]},e))})]},n)),(0,u.jsx)(o.default,{children:(0,u.jsx)(c.Button,{ghost:!0,component:r.default,id:"toOverusedSubscriptions",to:"/admin/subscription/list?context=subscriptions&force-show-search=true&searchFilter[resourceUsage][searchText]=true",children:(0,u.jsx)(m,{content:n>e.length?"more":"list",params:{total:n}})})})]});p.propTypes={subscriptions:a().array.isRequired,total:a().number.isRequired};const f=p},2934:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>i.default});var i=t(2935)},2935:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>f});var i=t(668),a=t(90),s=t(2917),o=t(718),r=t(297),l=t(666),d=t(2741),c=t(2913),u=t(296);const m=a.Locale.getTranslate("components.pages.Home.Subscriptions"),p=({viewer:{permissions:{createDomains:e},client:{subscriptions:{nodes:n}}}})=>(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("ul",{className:"home-page-panel-list",children:n.length?n.map(({status:e,mainDomain:{id:n,name:t}})=>(0,u.jsxs)("li",{className:"home-page-panel-list__item",children:["0"!==e&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(r.Tooltip,{title:(0,d.getSubscriptionStatusReason)(e),children:(0,u.jsx)(r.Icon,{name:"exclamation-mark-circle-filled",intent:"danger"})})," "]}),(0,u.jsx)(o.default,{to:`/admin/subscription/overview/id/${(0,l.getId)(n)}`,children:t})]},n)):(0,u.jsx)("li",{className:"home-page-panel-list__item",children:(0,u.jsx)(m,{content:"empty",params:{link:(0,u.jsx)(r.Link,{href:"/help.php?context=home.admin.mywebspaces",target:"_blank",rel:"noopener noreferrer",children:(0,u.jsx)(m,{content:"help"})})}})})}),e&&(0,u.jsx)(s.default,{children:(0,u.jsx)(r.Button,{ghost:!0,id:"addSubscription",icon:"plus",component:o.default,to:"/admin/subscription/create?context=subscriptions",children:(0,u.jsx)(m,{content:"add"})})})]});p.propTypes={viewer:i.PropTypes.object.isRequired};const f=(0,c.default)(p)},2936:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>i.default});var i=t(2937)},2937:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>v});var i=t(90),a=t(620),s=t(2917),o=t(2938),r=t(297),l=t(1896),d=t(718),c=t(1904),u=t(2913),m=t(2939),p=t.n(m),f=t(296);const g=i.Locale.getTranslate("components.pages.Home.IpBan"),v=(0,u.default)(()=>{const{data:e,loading:n,error:t}=(0,a.useQuery)(p(),{context:{noBatch:!0}});return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(l.default,{loading:n,fallback:(0,f.jsx)(r.SkeletonText,{lines:2}),children:[t&&(0,f.jsx)(c.default,{error:t}),e&&(0,f.jsx)(o.default,{data:e})]}),(0,f.jsx)(s.default,{children:(0,f.jsx)(r.Button,{ghost:!0,id:"toIpBan",component:d.default,to:"/admin/server-protection",children:(0,f.jsx)(g,{content:"more"})})})]})})},2938:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>d});var i=t(668),a=t(90),s=t(2921),o=t(296);const r=a.Locale.getTranslate("components.pages.Home.IpBan"),l=({data:{server:{ipBan:{bannedIpsCount:e,trustedIpsCount:n}}}})=>(0,o.jsxs)("ul",{className:"home-page-panel-list home-page-panel-list--colums",children:[(0,o.jsxs)("li",{className:"home-page-panel-list__item",children:[(0,o.jsx)("span",{className:"home-page-panel-list__item-name",children:(0,o.jsx)(r,{content:"banned"})}),(0,o.jsx)(s.default,{id:"ipBanBanned",className:"home-page-panel-list__item-value",to:"/admin/server-protection/ban-list",children:e})]}),(0,o.jsxs)("li",{className:"home-page-panel-list__item",children:[(0,o.jsx)("span",{className:"home-page-panel-list__item-name",children:(0,o.jsx)(r,{content:"trusted"})}),(0,o.jsx)(s.default,{id:"ipBanTrusted",className:"home-page-panel-list__item-value",to:"/admin/server-protection/trusted-list",children:n})]})]});l.propTypes={data:i.PropTypes.object.isRequired};const d=l},2939:e=>{var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"HomeIpBan"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"server"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"ipBan"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bannedIpsCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trustedIpsCount"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:120}};n.loc.source={body:"query HomeIpBan {\n server {\n ipBan {\n bannedIpsCount\n trustedIpsCount\n }\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&n.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}var i={};function a(e,n){for(var t=0;t<e.definitions.length;t++){var i=e.definitions[t];if(i.name&&i.name.value==n)return i}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),i[e.name.value]=n}}),e.exports=n,e.exports.HomeIpBan=function(e,n){var t={kind:e.kind,definitions:[a(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var s=i[n]||new Set,o=new Set,r=new Set;for(s.forEach(function(e){r.add(e)});r.size>0;){var l=r;r=new Set,l.forEach(function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach(function(e){r.add(e)}))})}return o.forEach(function(n){var i=a(e,n);i&&t.definitions.push(i)}),t}(n,"HomeIpBan")},2940:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>i.default});var i=t(2941)},2941:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>S});var i=t(668),a=t(90),s=t(713),o=t(2913),r=t(2916),l=t(2942),d=t(2943),c=t(1291),u=t.n(c),m=t(620),p=t(296);const f=a.Locale.getTranslate("components.pages.Home.Extension"),g=(e,{viewer:{home:{extensions:n=[]}={}}={}}={})=>n.find(n=>n.name===e)??{},v=({name:e})=>{const n=(0,m.useQuery)(u()),{title:t}=g(e,n?.data);return t?(0,p.jsx)(s.default,{children:t},`${e}-title`):(0,p.jsx)(f,{content:"title"})};v.propTypes={name:i.PropTypes.string.isRequired};const h=({name:e})=>{const n=(0,m.useQuery)(u()),{icon:t}=g(e,n?.data);return(0,p.jsx)(r.default,{icon:t,className:"home-page-dashboard__panel-heading-icon"})};h.propTypes={name:i.PropTypes.string.isRequired};const k=({name:e})=>{const n=(0,m.useQuery)(u()),{async:t,content:i,footer:a,skeletonSize:s}=g(e,n?.data);return t?(0,p.jsx)(l.default,{name:e,skeletonSize:s}):(0,p.jsx)(d.default,{name:e,content:i,footer:a})};k.propTypes={name:i.PropTypes.string.isRequired};const S=(0,o.default)(k,{title:(e,n)=>(0,p.jsx)(v,{name:n}),icon:(e,n)=>(0,p.jsx)(h,{name:n})})},2942:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>p});var i=t(668),a=t(620),s=t(297),o=t(1896),r=t(1904),l=t(2943),d=t(2944),c=t.n(d),u=t(296);const m=({name:e,skeletonSize:n})=>{const{data:t,loading:i,error:d}=(0,a.useQuery)(c(),{context:{noBatch:!0},variables:{name:e}});return(0,u.jsxs)(o.default,{loading:i,fallback:(0,u.jsx)(s.SkeletonText,{lines:n}),children:[d&&(0,u.jsx)(r.default,{error:d}),t&&(0,u.jsx)(l.default,{name:e,...t.viewer.home.extensionBlockContent})]})};m.propTypes={name:i.PropTypes.string.isRequired,skeletonSize:i.PropTypes.number.isRequired};const p=m},2943:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>l});var i=t(668),a=t(713),s=t(2917),o=t(296);const r=({name:e,content:n,footer:t})=>(0,o.jsxs)(o.Fragment,{children:[n&&(0,o.jsx)(a.default,{children:n},`${e}-content`),t&&(0,o.jsx)(s.default,{children:(0,o.jsx)(a.default,{children:t},`${e}-footer`)})]});r.propTypes={name:i.PropTypes.string.isRequired,content:i.PropTypes.string,footer:i.PropTypes.string};const l=r},2944:e=>{var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"HomeExtension"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"viewer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"home"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"extensionBlockContent"},arguments:[{kind:"Argument",name:{kind:"Name",value:"filter"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"footer"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:215}};n.loc.source={body:"query HomeExtension($name: ID!) {\n viewer {\n login\n home {\n extensionBlockContent (filter: {name: $name}) {\n content\n footer\n }\n }\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&n.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}var i={};function a(e,n){for(var t=0;t<e.definitions.length;t++){var i=e.definitions[t];if(i.name&&i.name.value==n)return i}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),i[e.name.value]=n}}),e.exports=n,e.exports.HomeExtension=function(e,n){var t={kind:e.kind,definitions:[a(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var s=i[n]||new Set,o=new Set,r=new Set;for(s.forEach(function(e){r.add(e)});r.size>0;){var l=r;r=new Set,l.forEach(function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach(function(e){r.add(e)}))})}return o.forEach(function(n){var i=a(e,n);i&&t.definitions.push(i)}),t}(n,"HomeExtension")},2945:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>i.default});var i=t(2946)},2946:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>x});var i=t(90),a=t(2913),s=t(297),o=t(2917),r=t(718),l=t(1896),d=t(696),c=t(620),u=t(2947),m=t(1904),p=t(546),f=t(2948),g=t.n(f),v=t(2949),h=t.n(v),k=t(296);const S=i.Locale.getTranslate("components.pages.Home.MailQueue"),x=(0,a.default)(()=>{const{data:e,loading:n,error:t}=(0,c.useQuery)(g(),{variables:{extLogBrowser:btoa("Extension:log-browser"),extRepairKit:btoa("Extension:repair-kit")},context:{noBatch:!0}}),[i,a]=(0,k.useState)(!1),[f,{loading:v}]=(0,d.useMutation)(h(),{onCompleted:()=>{(0,p.addToast)({intent:"success",message:(0,k.jsx)(S,{content:"queueCleaned"})})},onError:({graphQLErrors:e})=>{e.forEach(({extensions:e,message:n})=>{(0,p.addToast)({intent:"danger",message:e?.debugMessage||n})})}}),x=e?.viewer.permissions.manageServerTroubleshootingEnable&&e?.extLog.isActive,b=e?.viewer.permissions.manageServerTroubleshootingEnable&&e?.extRepair.isActive;return(0,k.jsxs)("div",{className:"home-page-mail-queue",children:[(0,k.jsxs)(l.default,{loading:n,fallback:(0,k.jsx)(s.SkeletonText,{lines:3}),children:[t&&(0,k.jsx)(m.default,{error:t}),e?.serverMail?.queue&&(0,k.jsx)(u.default,{data:e})]}),(0,k.jsx)(l.default,{loading:n,fallback:(0,k.jsx)(s.SkeletonText,{lines:3}),children:(0,k.jsxs)("div",{className:"home-page-panel-block home-page-mail-queue__actions",children:[(0,k.jsxs)(s.Popover,{target:(0,k.jsx)(s.Button,{ghost:!0,id:"cleanMailQueue",icon:"clean",state:v?"loading":null,onClick:()=>a(!0),children:(0,k.jsx)(S,{content:"clean"})}),placement:"top-right",visible:i,onClose:()=>a(!1),children:[(0,k.jsx)(s.Paragraph,{children:(0,k.jsx)(S,{content:"cleanConfirmQuestion"})}),(0,k.jsx)(s.Button,{id:"cleanMailQueueYes",intent:"danger",onClick:()=>{a(!1),f()},children:(0,k.jsx)(S,{content:"cleanConfirmYes"})})," ",(0,k.jsx)(s.Button,{id:"cleanMailQueueNo",onClick:()=>a(!1),children:(0,k.jsx)(S,{content:"cleanConfirmNo"})})]}),x&&(0,k.jsx)(s.Button,{ghost:!0,id:"checkLogs",icon:"list",component:r.default,to:"/modules/log-browser/?tab=mail",children:(0,k.jsx)(S,{content:"checkLogs"})}),b&&(0,k.jsx)(s.Button,{ghost:!0,id:"repair",icon:"tools",component:r.default,to:"/modules/repair-kit/index.php/index",children:(0,k.jsx)(S,{content:"repair"})})]})}),(0,k.jsx)(o.default,{children:(0,k.jsx)(s.Button,{ghost:!0,id:"toMailQueue",component:r.default,to:"/admin/mail-settings/queue",children:(0,k.jsx)(S,{content:"more"})})})]})})},2947:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>d});var i=t(668),a=t(90),s=t(297),o=t(296);const r=a.Locale.getTranslate("components.pages.Home.MailQueue"),l=({data:{serverMail:{queue:{total:e,deferred:n,hold:t}}}})=>(0,o.jsxs)("ul",{className:"home-page-panel-list home-page-panel-list--colums",children:[(0,o.jsxs)("li",{className:"home-page-panel-list__item",children:[(0,o.jsx)("span",{className:"home-page-panel-list__item-name",children:(0,o.jsx)(r,{content:"total"})}),(0,o.jsx)(s.Label,{view:"light",size:"lg",className:"home-page-panel-list__item-value",children:e})]}),(0,o.jsxs)("li",{className:"home-page-panel-list__item",children:[(0,o.jsx)("span",{className:"home-page-panel-list__item-name",children:(0,o.jsx)(r,{content:"deferred"})}),(0,o.jsx)(s.Label,{view:"light",size:"lg",className:"home-page-panel-list__item-value",children:n})]}),(0,o.jsxs)("li",{className:"home-page-panel-list__item",children:[(0,o.jsx)("span",{className:"home-page-panel-list__item-name",children:(0,o.jsx)(r,{content:"held"})}),(0,o.jsx)(s.Label,{view:"light",size:"lg",className:"home-page-panel-list__item-value",children:t})]})]});l.propTypes={data:i.PropTypes.object.isRequired};const d=l},2948:e=>{var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"HomeMailQueue"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"extLogBrowser"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"extRepairKit"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serverMail"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"queue"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"total"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deferred"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hold"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"viewer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"permissions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"manageServerTroubleshootingEnable"},arguments:[],directives:[]}]}}]}},{kind:"Field",alias:{kind:"Name",value:"extLog"},name:{kind:"Name",value:"node"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"extLogBrowser"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Extension"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isActive"},arguments:[],directives:[]}]}}]}},{kind:"Field",alias:{kind:"Name",value:"extRepair"},name:{kind:"Name",value:"node"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"extRepairKit"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Extension"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isActive"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:520}};n.loc.source={body:"query HomeMailQueue ($extLogBrowser: ID!, $extRepairKit: ID!) {\n serverMail {\n queue {\n total\n deferred\n hold\n }\n }\n viewer {\n login\n permissions {\n manageServerTroubleshootingEnable\n }\n }\n extLog: node(id: $extLogBrowser) {\n ... on Extension {\n id\n isActive\n }\n }\n extRepair: node(id: $extRepairKit) {\n ... on Extension {\n id\n isActive\n }\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&n.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}var i={};function a(e,n){for(var t=0;t<e.definitions.length;t++){var i=e.definitions[t];if(i.name&&i.name.value==n)return i}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),i[e.name.value]=n}}),e.exports=n,e.exports.HomeMailQueue=function(e,n){var t={kind:e.kind,definitions:[a(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var s=i[n]||new Set,o=new Set,r=new Set;for(s.forEach(function(e){r.add(e)});r.size>0;){var l=r;r=new Set,l.forEach(function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach(function(e){r.add(e)}))})}return o.forEach(function(n){var i=a(e,n);i&&t.definitions.push(i)}),t}(n,"HomeMailQueue")},2949:e=>{var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CleanQueue"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"mailQueueClean"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"query"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serverMail"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"queue"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"total"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deferred"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hold"},arguments:[],directives:[]}]}}]}}]}}]}}]}}],loc:{start:0,end:238}};n.loc.source={body:"mutation CleanQueue {\n mailQueueClean {\n query {\n serverMail {\n queue {\n total\n deferred\n hold\n }\n }\n }\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&n.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}var i={};function a(e,n){for(var t=0;t<e.definitions.length;t++){var i=e.definitions[t];if(i.name&&i.name.value==n)return i}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),i[e.name.value]=n}}),e.exports=n,e.exports.CleanQueue=function(e,n){var t={kind:e.kind,definitions:[a(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var s=i[n]||new Set,o=new Set,r=new Set;for(s.forEach(function(e){r.add(e)});r.size>0;){var l=r;r=new Set,l.forEach(function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach(function(e){r.add(e)}))})}return o.forEach(function(n){var i=a(e,n);i&&t.definitions.push(i)}),t}(n,"CleanQueue")},2950:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>i.default});var i=t(2951)},2951:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>w});var i=t(296),a=t(683),s=t.n(a),o=t(297),r=t(696),l=t(620),d=t(2902),c=t(546),u=t(2952),m=t(90),p=(t(2954),t(2955)),f=t.n(p),g=t(2956),v=t.n(g),h=t(2957),k=t.n(h),S=t(1296),x=t.n(S),b=t(2958),y=t(2960),j=t(2963);const N=m.Locale.getSection("components.pages.Home.Promo"),w=()=>{const{data:{promos:e,viewer:{home:{showPuvPromo:n=!1,locked:t=!0}={}}={},config:{promos:{autoplay:a=!1}={}}={}}={}}=(0,l.useQuery)(f(),{context:{noBatch:!0}}),[m]=(0,r.useMutation)(v()),[p,g]=(0,i.useState)(0),[h,S]=(0,i.useState)(!1),w=async()=>{try{S(!0),await m({variables:{name:"promo",enable:!1},refetchQueries:[{query:x()},{query:k()}],awaitRefetchQueries:!0})}catch({graphQLErrors:e}){e.forEach(({message:e,extensions:n})=>{(0,c.addToast)({intent:"danger",message:n?.debugMessage||e})})}},E=e=>g(e),T=(0,i.useMemo)(()=>[(0,i.jsx)(b.default,{showCustomizeButton:!t},"customize"),n?(0,i.jsx)(y.default,{},"switchToPuv"):null,...(e??[]).filter(e=>e&&!/catalog\/$/.test(e.buttonUrl)).map((e,n)=>(0,i.jsx)(j.default,{...e,index:n},e.buttonUrl))].filter(Boolean).slice(0,6),[e,n,t]);return h?null:(0,i.jsx)(d.Draggable,{draggableId:"Promo",index:Number.MAX_SAFE_INTEGER,isDragDisabled:!0,children:({innerRef:e}={})=>(0,i.jsxs)("div",{className:s()(`home-page-dashboard__item home-page-promo home-page-promo--slide-${p}`,T.length>1&&"home-page-promo--with-dots"),ref:e,children:[(0,i.jsx)(u.default,{onSlide:E,autoplay:T.length>1&&a,children:T}),!t&&(0,i.jsx)(o.Button,{onClick:w,icon:"cross-mark",className:"home-page-promo__close-button","aria-label":N.lmsg("close")})]})})}},2952:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>l});var i=t(296),a=t(683),s=t.n(a),o=t(90);t(2953);const r=o.Locale.getSection("components.pages.Home.Promo"),l=({children:e,autoplay:n,onSlide:t})=>{const a=i.Children.count(e),[o,l]=(0,i.useState)(0),d=e=>{l(e),t?.(e)},c=(0,i.useRef)(d);return c.current=d,(0,i.useEffect)(()=>{if(!n||a<=1)return;const e=setTimeout(()=>{const e=o===a-1?0:o+1;c.current(e)},15e3);return()=>clearTimeout(e)},[n,a,o]),(0,i.jsxs)("div",{className:"home-page-carousel",children:[a>1&&(0,i.jsx)("div",{className:"home-page-carousel__dots",children:i.Children.map(e,(e,n)=>(0,i.jsx)("button",{type:"button",className:s()("home-page-carousel__dot",n===o&&"home-page-carousel__dot--active"),onClick:()=>d(n),"aria-label":r.lmsg("viewSlide",{slideNumber:n+1})},n))}),i.Children.map(e,(e,n)=>(0,i.jsx)("div",{hidden:n!==o,className:s()("home-page-carousel__slide",n===o&&"home-page-carousel__slide--active"),children:e},n))]})}},2953:(e,n,t)=>{"use strict";t.r(n)},2954:(e,n,t)=>{"use strict";t.r(n)},2955:e=>{var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"HomePromo"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"promos"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"buttonUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"buttonText"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"buttonTarget"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"text"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"iconUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"viewer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"home"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"showPuvPromo"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"locked"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"config"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"promos"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"autoplay"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:309}};n.loc.source={body:"query HomePromo {\n promos {\n title\n buttonUrl\n buttonText\n buttonTarget\n text\n iconUrl\n }\n viewer {\n login\n home {\n showPuvPromo\n locked\n }\n }\n config {\n promos {\n autoplay\n }\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&n.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}var i={};function a(e,n){for(var t=0;t<e.definitions.length;t++){var i=e.definitions[t];if(i.name&&i.name.value==n)return i}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),i[e.name.value]=n}}),e.exports=n,e.exports.HomePromo=function(e,n){var t={kind:e.kind,definitions:[a(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var s=i[n]||new Set,o=new Set,r=new Set;for(s.forEach(function(e){r.add(e)});r.size>0;){var l=r;r=new Set,l.forEach(function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach(function(e){r.add(e)}))})}return o.forEach(function(n){var i=a(e,n);i&&t.definitions.push(i)}),t}(n,"HomePromo")},2956:e=>{var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ToggleHomeBlock"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"enable"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"toggleHomeBlock"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"enable"},value:{kind:"Variable",name:{kind:"Name",value:"enable"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"enable"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:146}};n.loc.source={body:"mutation ToggleHomeBlock($name: ID!, $enable: Boolean!) {\n toggleHomeBlock(name: $name, enable: $enable) {\n name\n enable\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&n.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}var i={};function a(e,n){for(var t=0;t<e.definitions.length;t++){var i=e.definitions[t];if(i.name&&i.name.value==n)return i}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),i[e.name.value]=n}}),e.exports=n,e.exports.ToggleHomeBlock=function(e,n){var t={kind:e.kind,definitions:[a(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var s=i[n]||new Set,o=new Set,r=new Set;for(s.forEach(function(e){r.add(e)});r.size>0;){var l=r;r=new Set,l.forEach(function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach(function(e){r.add(e)}))})}return o.forEach(function(n){var i=a(e,n);i&&t.definitions.push(i)}),t}(n,"ToggleHomeBlock")},2957:e=>{var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"HomeLayout"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"viewer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"home"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"layout"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:98}};n.loc.source={body:"query HomeLayout {\n viewer {\n login\n home {\n layout\n }\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&n.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}var i={};function a(e,n){for(var t=0;t<e.definitions.length;t++){var i=e.definitions[t];if(i.name&&i.name.value==n)return i}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),i[e.name.value]=n}}),e.exports=n,e.exports.HomeLayout=function(e,n){var t={kind:e.kind,definitions:[a(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var s=i[n]||new Set,o=new Set,r=new Set;for(s.forEach(function(e){r.add(e)});r.size>0;){var l=r;r=new Set,l.forEach(function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach(function(e){r.add(e)}))})}return o.forEach(function(n){var i=a(e,n);i&&t.definitions.push(i)}),t}(n,"HomeLayout")},2958:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>m});var i=t(297),a=t(668),s=t.n(a),o=t(90),r=t(718),l=t(2959),d=t(296);const c=o.Locale.getTranslate("components.pages.Home.Promo.Customize"),u=({showCustomizeButton:e=!1})=>(0,d.jsxs)(l.default,{className:"home-page-promo__block--renovate",children:[(0,d.jsx)(i.Heading,{level:4,className:"home-page-promo__title",children:(0,d.jsx)(c,{content:"title"})}),(0,d.jsxs)("div",{className:"home-page-promo__content",children:[(0,d.jsx)(i.Paragraph,{children:(0,d.jsx)(c,{content:"content"})}),(0,d.jsx)("div",{className:"home-page-promo__media",children:(0,d.jsxs)("video",{preload:"auto",autoPlay:!0,muted:!0,controls:!1,loop:!0,children:[(0,d.jsx)("source",{src:"/cp/theme/images/home-promo.webm",type:"video/webm"}),(0,d.jsx)("source",{src:"/cp/theme/images/home-promo.mp4",type:"video/mp4"})]})})]}),(0,d.jsx)("div",{className:"home-page-promo__action",children:e&&(0,d.jsx)(i.Button,{id:"promoCustomize",component:r.default,to:"customize",icon:"gear",children:(0,d.jsx)(c,{content:"action"})})})]});u.propTypes={showCustomizeButton:s().bool};const m=u},2959:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>d});var i=t(683),a=t.n(i),s=t(668),o=t.n(s),r=t(296);const l=({children:e,classNames:n=null})=>(0,r.jsx)("div",{className:a()("home-page-promo__block",n),children:e});l.propTypes={children:o().node.isRequired,classNames:o().string};const d=l},2960:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>l});var i=t(296),a=t(297),s=t(90),o=t(2961);const r=s.Locale.getTranslate("components.pages.Home.Promo.SwitchToPuv"),l=()=>{const[e,n]=(0,i.useState)(!1);return(0,i.jsx)(o.default,{title:(0,i.jsx)(r,{content:"title"}),content:(0,i.jsx)(r,{content:"content"}),action:(0,i.jsx)(a.Button,{id:"switchToPUV",intent:"primary",onClick:()=>{n(!0),s.api.post("/admin/home/hide-promo-puv"),s.api.post("/admin/index/change-view").then(e=>(0,s.redirect)(e.redirect))},state:e?"loading":null,children:(0,i.jsx)(r,{content:"action"})}),iconUrl:t(2962)})}},2961:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>d});var i=t(668),a=t.n(i),s=t(297),o=t(2959),r=t(296);const l=({title:e,content:n,action:t,iconUrl:i})=>(0,r.jsxs)(o.default,{children:[(0,r.jsx)(s.Icon,{className:"home-page-promo__header-icon",size:"48",src:i}),(0,r.jsx)(s.Heading,{level:4,className:"home-page-promo__title",children:e}),(0,r.jsx)("div",{className:"home-page-promo__content",children:n}),(0,r.jsx)("div",{className:"home-page-promo__action",children:t})]});l.propTypes={title:a().node.isRequired,content:a().node.isRequired,action:a().node.isRequired,iconUrl:a().string.isRequired};const d=l},2962:e=>{e.exports=Jsw.skinUrl+"/images/home-switch-to-puv.svg?ad32dc23b5d4ca9daad5ff5a8cc58793"},2963:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>d});var i=t(668),a=t.n(i),s=t(297),o=t(2961),r=t(296);const l=({title:e,buttonUrl:n,buttonText:t,buttonTarget:i=null,text:a,iconUrl:l,index:d}={})=>(0,r.jsx)(o.default,{title:e,iconUrl:l,content:a,action:(0,r.jsx)(s.Button,{id:`promo-action-${d}`,intent:"primary",component:"a",href:n,target:i,children:t})});l.propTypes={title:a().string.isRequired,iconUrl:a().string.isRequired,text:a().string.isRequired,buttonText:a().string.isRequired,buttonUrl:a().string.isRequired,buttonTarget:a().string,index:a().number.isRequired};const d=l},2964:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>i.default});var i=t(2965)},2965:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>k});var i=t(668),a=t(90),s=t(620),o=t(297),r=t(1896),l=t(1904),d=t(718),c=t(2966),u=t(2917),m=t(2913),p=t(2968),f=t.n(p),g=t(296);const v=a.Locale.getTranslate("components.pages.Home.ChangeLog"),h=({server:{productUpdates:{changeLogUrl:e}}})=>{const{data:n,loading:t,error:i}=(0,s.useQuery)(f(),{context:{noBatch:!0}});return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(r.default,{loading:t,fallback:(0,g.jsx)(o.SkeletonText,{lines:9}),children:[i&&(0,g.jsx)(l.default,{error:i}),n&&(0,g.jsx)(c.default,{data:n})]}),(0,g.jsx)(u.default,{children:(0,g.jsx)(o.Button,{ghost:!0,id:"toChangeLog",component:d.default,to:e,target:"_blank",icon:{name:"arrow-diagonal-out",style:{order:"1",marginInline:"4px 0"}},children:(0,g.jsx)(v,{content:"seeHistory"})})})]})};h.propTypes={server:i.PropTypes.object.isRequired};const k=(0,m.default)(h)},2966:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>c});var i=t(296),a=t(668),s=t(297),o=t(617),r=t(718);const l=({title:e,date:n})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.Text,{intent:"muted",component:"div",children:(0,o.formatDate)(n)}),(0,i.jsx)(s.Text,{fontSize:"md",component:"div",children:e})]});l.propTypes={title:a.PropTypes.string.isRequired,date:a.PropTypes.string.isRequired};const d=({data:{server:{productUpdates:{changeLogFeed:e}}}})=>{const n=(0,i.useMemo)(()=>{const n=e.find(({product:e,isPatch:n})=>"plesk"===e&&!n);return[n?{...n,isPrimary:!0}:null,...e.filter(({title:e})=>e!==n?.title)].filter(Boolean).slice(0,4)},[e]);return(0,i.jsx)("div",{className:"home-page-item-list-block",children:(0,i.jsx)(s.ItemList,{className:"home-page-item-list-block__list",children:n.map(({url:e,product:n,version:a,title:o,date:d,isPrimary:c})=>(0,i.jsx)(s.Item,{component:r.default,to:e,target:"_blank","data-type":`change-log-${n}-${a}`,hoverable:!c,className:c?"home-page-item-list-block__item--primary":null,children:c?(0,i.jsx)(s.Alert,{intent:"info",children:(0,i.jsx)(s.Media,{image:(0,i.jsx)(s.Icon,{style:{padding:"8px",borderRadius:"6px",backgroundColor:"#fff"},src:t(2967),size:"24"}),align:"center",imageAlign:"start",children:(0,i.jsx)(l,{title:o,date:d})})}):(0,i.jsx)(l,{title:o,date:d})},o))})})};d.propTypes={data:a.PropTypes.object.isRequired};const c=d},2967:e=>{e.exports=Jsw.skinUrl+"/images/rocket.svg?56fadbd90bfc0719c2796abfaa5c4369"},2968:e=>{var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"HomeChangeLog"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"server"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"productUpdates"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"changeLogFeed"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"product"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"version"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"date"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isPatch"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:255}};n.loc.source={body:"query HomeChangeLog {\n server {\n productUpdates {\n changeLogFeed {\n product\n title\n version\n date\n url\n isPatch\n }\n }\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&n.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}var i={};function a(e,n){for(var t=0;t<e.definitions.length;t++){var i=e.definitions[t];if(i.name&&i.name.value==n)return i}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),i[e.name.value]=n}}),e.exports=n,e.exports.HomeChangeLog=function(e,n){var t={kind:e.kind,definitions:[a(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var s=i[n]||new Set,o=new Set,r=new Set;for(s.forEach(function(e){r.add(e)});r.size>0;){var l=r;r=new Set,l.forEach(function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach(function(e){r.add(e)}))})}return o.forEach(function(n){var i=a(e,n);i&&t.definitions.push(i)}),t}(n,"HomeChangeLog")},2969:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>i.default});var i=t(2970)},2970:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>g});var i=t(90),a=t(620),s=t(2913),o=t(297),r=t(2917),l=t(718),d=t(1896),c=t(2971),u=t.n(c),m=t(1904),p=t(296);const f=i.Locale.getTranslate("components.pages.Home.CustomButtons"),g=(0,s.default)(()=>{const{data:e,loading:n,error:t}=(0,a.useQuery)(u(),{context:{noBatch:!0}});return(0,p.jsxs)(d.default,{loading:n,fallback:(0,p.jsx)(o.Media,{image:(0,p.jsx)(o.Skeleton,{width:32,height:32}),children:(0,p.jsx)(o.SkeletonText,{lines:2})}),children:[t?(0,p.jsx)(m.default,{error:t}):e?.viewer.home.customButtons.length?(0,p.jsx)("div",{className:"home-page-item-list-block",children:(0,p.jsx)(o.ItemList,{className:"home-page-item-list-block__list",children:e?.viewer.home.customButtons.map(({id:e,title:n,description:t,image:a,href:s,target:r})=>(0,p.jsx)(o.Item,{icon:(0,p.jsx)(o.Icon,{src:a}),title:n,description:t,"data-action":`custom-button-${e}`,onClick:()=>((e,n)=>{"_blank"===n?window.open(e,"_blank"):(0,i.redirect)(e)})(s,r)},e))})}):(0,p.jsx)(f,{content:"noButtons"}),e?.viewer.permissions.manageServerCustomButtons&&(0,p.jsx)(r.default,{children:(0,p.jsx)(o.Button,{ghost:!0,id:"addCustomButtons",icon:"plus",component:l.default,to:"/admin/custom-buttons/create",children:(0,p.jsx)(f,{content:"add"})})})]})})},2971:e=>{var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"HomeCustomButtons"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"viewer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"permissions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"manageServerCustomButtons"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"home"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"customButtons"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"image"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"href"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"target"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:333}};n.loc.source={body:"query HomeCustomButtons {\n viewer {\n login\n permissions {\n manageServerCustomButtons\n }\n home {\n customButtons {\n id\n title\n description\n image\n href\n target\n }\n }\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&n.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}var i={};function a(e,n){for(var t=0;t<e.definitions.length;t++){var i=e.definitions[t];if(i.name&&i.name.value==n)return i}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),i[e.name.value]=n}}),e.exports=n,e.exports.HomeCustomButtons=function(e,n){var t={kind:e.kind,definitions:[a(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var s=i[n]||new Set,o=new Set,r=new Set;for(s.forEach(function(e){r.add(e)});r.size>0;){var l=r;r=new Set,l.forEach(function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach(function(e){r.add(e)}))})}return o.forEach(function(n){var i=a(e,n);i&&t.definitions.push(i)}),t}(n,"HomeCustomButtons")},2972:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>i.default});var i=t(2973)},2973:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>k});var i=t(296),a=t(2902),s=t(668),o=t.n(s),r=t(696),l=t(546),d=t(2974),c=t(2975),u=t(2976),m=t.n(u),p=t(2977),f=t(2978);const g={WebserverConfigurationFailure:p.default,UpgradeFailureNotification:f.default},v={[c.ERROR]:0,[c.WARNING]:1},h=({systemMessages:e})=>{const[n,t]=(0,i.useState)([...e].sort((e,n)=>v[e.type]-v[n.type])),[s]=(0,r.useMutation)(m()),o=e=>{t(n.filter(({key:n})=>n!==e.key))},c=(e,n)=>{switch(e.component){case"WebserverConfigurationFailure":case"UpgradeFailureNotification":const t=g[e.component];return(0,i.jsx)(t,{id:e.key,message:e.content,type:e.type,params:e.params,isHideable:e.isHideable,onClose:()=>o(e)},n);default:return(0,i.jsx)(d.default,{id:e.key,isHideable:e.isHideable,type:e.type,onClose:()=>(e=>{s({variables:{input:{key:e.key}}}).catch(e=>{(0,l.addToast)({intent:"danger",message:e.toString()})}),o(e)})(e),children:(0,i.jsx)("div",{dangerouslySetInnerHTML:{__html:e.content}})},n)}};if(n.length)return(0,i.jsx)(a.Draggable,{draggableId:"Status",index:Number.MAX_SAFE_INTEGER,isDragDisabled:!0,children:({innerRef:e}={})=>(0,i.jsx)("div",{className:"home-page-dashboard__item home-page-status",ref:e,children:n.map(c)})})};h.propTypes={systemMessages:o().arrayOf(o().shape({type:o().oneOf(Object.keys(c.statusesMap)).isRequired,key:o().string.isRequired,isHideable:o().bool,content:o().string,component:o().string,params:o().string})).isRequired};const k=h},2974:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>u});var i=t(297),a=t(668),s=t.n(a),o=t(90),r=t(2975),l=t(296);const d=o.Locale.getSection("components.pages.Home.Status"),c=({id:e,isHideable:n=!1,type:t,onClose:a=()=>{},children:s,...o})=>(0,l.jsxs)(i.Panel,{...o,className:`home-page-status__panel home-page-status__panel--${r.statusesMap[t]}`,children:[(0,l.jsxs)(i.Heading,{className:"home-page-dashboard__panel-heading",level:5,children:[(0,l.jsx)("span",{className:"home-page-dashboard__panel-title",children:(0,l.jsx)(i.Status,{intent:r.statusesMap[t],children:d.lmsg(t.toLowerCase())})}),n&&(0,l.jsx)(i.Button,{ghost:!0,icon:"cross-mark",id:`close-${e}`,className:"home-page-dashboard__panel-heading-control",onClick:a})]}),(0,l.jsx)(i.Text,{component:"div",children:s})]});c.propTypes={children:s().node.isRequired,id:s().string.isRequired,type:s().oneOf(Object.keys(r.statusesMap)).isRequired,isHideable:s().bool,onClose:s().func};const u=c},2975:(e,n,t)=>{"use strict";t.r(n),t.d(n,{ERROR:()=>i,INFO:()=>a,WARNING:()=>s,statusesMap:()=>o});const i="ERROR",a="INFO",s="WARNING",o={[i]:"danger",[a]:"success",[s]:"warning"}},2976:e=>{var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"HideSystemMessage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"HideSystemMessageInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hideSystemMessage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"query"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"viewer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"home"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"systemMessages"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isHideable"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"component"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"params"},arguments:[],directives:[]}]}}]}}]}}]}}]}}]}}],loc:{start:0,end:481}};n.loc.source={body:"mutation HideSystemMessage($input: HideSystemMessageInput!) {\n hideSystemMessage(input: $input) {\n query {\n viewer {\n login\n home {\n systemMessages {\n type\n key\n content\n isHideable\n component\n params\n }\n }\n }\n }\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&n.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}var i={};function a(e,n){for(var t=0;t<e.definitions.length;t++){var i=e.definitions[t];if(i.name&&i.name.value==n)return i}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),i[e.name.value]=n}}),e.exports=n,e.exports.HideSystemMessage=function(e,n){var t={kind:e.kind,definitions:[a(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var s=i[n]||new Set,o=new Set,r=new Set;for(s.forEach(function(e){r.add(e)});r.size>0;){var l=r;r=new Set,l.forEach(function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach(function(e){r.add(e)}))})}return o.forEach(function(n){var i=a(e,n);i&&t.definitions.push(i)}),t}(n,"HideSystemMessage")},2977:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>g});var i=t(296),a=t(297),s=t(2974),o=t(2917),r=t(90),l=t(668),d=t.n(l),c=t(2975);const u=r.Locale.getSection("components.webserver-configuration-failure"),m=r.Locale.getTranslate("components.webserver-configuration-failure"),p="system-message-webserver",f=({params:e="",message:n,type:t,...l})=>{const[d,f]=(0,i.useState)(t),[g,v]=(0,i.useState)(!1),[h,k]=(0,i.useState)(),S=(0,i.useMemo)(()=>{try{return JSON.parse(e)}catch{return{}}},[e]),x=async()=>{f(c.WARNING),k((0,i.jsx)(a.ContentLoader,{text:u.lmsg("messageInProgress")}));try{const e=await r.api.post("/admin/subscription/webserver-configuration-rebuild-all/");"success"===e.status?(f(c.INFO),k(u.lmsg("messageSuccess")),v(!0)):(f(c.ERROR),k((0,i.jsx)(a.Cuttable,{children:u.lmsg("messageFailure")+e.message})))}catch(e){""===window.location.port?(f(c.INFO),k(u.lmsg("messageSuccess"))):(f(c.ERROR),k((0,i.jsx)(a.Cuttable,{children:u.lmsg("messageFailure")+e})))}},b=()=>{(0,r.redirectPost)("/admin/subscription/webserver-configuration-rebuild/?returnUrl=/")};return(0,i.jsx)(s.default,{type:d,...l,isHideable:g,children:h??(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(m,{content:"message",params:{error:(0,r.escapeHtml)(n),link:(0,i.jsx)("a",{id:`${p}-rebuild-failed`,onClick:b,children:u.lmsg("link")}),linkAll:(0,i.jsx)("a",{id:`${p}-rebuild-all`,onClick:x,children:u.lmsg("linkAll")}),howToFix:S.kbArticle?(0,i.jsx)(m,{content:"knownIssue",params:{kbArticle:(0,i.jsx)("a",{id:`${p}-go-to-kb-article`,href:S.kbArticle,target:"_blank",rel:"noreferrer",children:S.kbArticle})}}):""}}),S.moduleInstalled&&(0,i.jsx)(o.default,{children:(0,i.jsx)(a.Button,{ghost:!0,component:"a",href:"/modules/configurations-troubleshooter/",id:`${p}-go-to-troubleshooter`,children:(0,i.jsx)(m,{content:"moduleLink"})})})]})})};f.propTypes={message:d().string.isRequired,type:d().oneOf(Object.keys(c.statusesMap)).isRequired,params:d().string};const g=f},2978:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>m});var i=t(296),a=t(668),s=t.n(a),o=t(2917),r=t(2974),l=t(297),d=t(90);const c=d.Locale.getTranslate("components.upgrade-failure-notification"),u=({params:e,message:n,type:t,...a})=>{const s=(0,i.useRef)(),u=(0,i.useMemo)(()=>{try{return JSON.parse(e)}catch{return{}}},[e]),[m,p]=(0,i.useState)(u.isBootstrapRunning),f=(0,i.useCallback)(e=>{s.current=setTimeout(e,5e3)},[]),g=(0,i.useCallback)(()=>{d.api.get(u.bootstrapStatusUrl).finally(()=>{f(g)})},[u.bootstrapStatusUrl,f]);(0,i.useEffect)(()=>(u.isBootstrapRunning&&f(g),()=>clearTimeout(s.current)),[u.isBootstrapRunning,f,g]);return(0,i.jsx)(r.default,{type:t,...a,children:m?(0,i.jsx)(l.ContentLoader,{text:(0,i.jsx)(c,{content:"bootstrapInProgressMessage"})}):(0,i.jsxs)(i.Fragment,{children:[n,(0,i.jsx)(o.default,{children:(0,i.jsx)(l.Button,{ghost:!0,onClick:()=>{p(!0),d.api.post(u.bootstrapExecutionUrl).finally(()=>{f(g)})},id:"system-message-update-failure-bootstrap",children:(0,i.jsx)(c,{content:"bootstrapLinkTitle"})})})]})})};u.propTypes={params:s().string.isRequired,message:s().string.isRequired,type:s().string.isRequired};const m=u},2979:(e,n,t)=>{"use strict";t.r(n)},2980:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>g});var i=t(297),a=t(620),s=t(90),o=t(718),r=t(2981),l=t.n(r),d=t(2982),c=t.n(d),u=t(1295),m=t.n(u),p=t(296);const f=s.Locale.getTranslate("components.pages.Home.EmptyView"),g=()=>{const e=(0,a.useQuery)(m()),n=e.data?.viewer?.home?.locked;return(0,p.jsx)(i.ListEmptyView,{title:(0,p.jsx)(f,{content:n?"titleLocked":"title"}),image:(0,p.jsx)("img",{src:n?c():l(),height:"320",alt:"emptyView"}),actions:!n&&(0,p.jsx)(i.Button,{id:"emptyViewCustomize",intent:"primary",icon:"gear",component:o.default,to:"/cp/home/customize",children:(0,p.jsx)(f,{content:"customize"})})})}},2981:e=>{e.exports=Jsw.skinUrl+"/images/home-empty.png?7399f1d4c0cfd2e9fb9035098c85bc60"},2982:e=>{e.exports=Jsw.skinUrl+"/images/home-empty-locked.png?52e070d1fbdced45508805a9f0e7ba2b"},2983:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>S});var i=t(668),a=t.n(i),s=t(90),o=t(297),r=t(696),l=t(599),d=t(296),c=t(1560),u=t.n(c),m=t(1561),p=t.n(m),f=t(1562),g=t.n(f);const v=s.Locale.getTranslate("components.pages.Home.PromoNewHomeView"),h=({feedbackURL:e,progress:n=!1,switchView:t})=>(0,d.jsxs)(o.Columns,{gap:"md",children:[(0,d.jsx)(o.Column,{children:(0,d.jsx)(o.Action,{id:"feedback",icon:"feedback",href:e,target:"_blank",children:(0,d.jsx)(v,{content:"feedback"})})}),(0,d.jsx)(o.Column,{children:(0,d.jsx)(o.Action,{id:"switchBack",icon:"arrow-back",onClick:t,progress:n,children:(0,d.jsx)(v,{content:"switch"})})})]});h.propTypes={feedbackURL:a().string.isRequired,progress:a().bool,switchView:a().func.isRequired};const k=({feedbackURL:e})=>{const n=(0,l.useNavigate)(),[t,i]=(0,d.useState)(!1),[a,{loading:s}]=(0,r.useMutation)(p(),{variables:{enableNewView:!1},onCompleted:()=>n("/admin/home")}),[c]=(0,r.useMutation)(g());return(0,d.useEffect)(()=>{s&&i(!0)},[s]),(0,d.jsx)(o.Alert,{"data-type":"promo-new-home-view",intent:"success",onClose:c,children:(0,d.jsxs)(o.Media,{title:(0,d.jsx)(o.Heading,{level:4,children:(0,d.jsx)(v,{content:"title"})}),image:(0,d.jsx)(o.Icon,{size:"32",src:u()}),children:[(0,d.jsx)(o.MediaSection,{children:(0,d.jsx)(v,{content:"description"})}),(0,d.jsx)(o.MediaSection,{children:(0,d.jsx)(h,{feedbackURL:e,progress:t,switchView:a})})]})})};k.propTypes={feedbackURL:a().string.isRequired};const S=k},2984:e=>{var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateHomeLayout"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"layout"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateHomeLayout"},arguments:[{kind:"Argument",name:{kind:"Name",value:"layout"},value:{kind:"Variable",name:{kind:"Name",value:"layout"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"layout"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:115}};n.loc.source={body:"mutation UpdateHomeLayout($layout: [[String!]!]!) {\n updateHomeLayout(layout: $layout) {\n layout\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&n.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}var i={};function a(e,n){for(var t=0;t<e.definitions.length;t++){var i=e.definitions[t];if(i.name&&i.name.value==n)return i}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),i[e.name.value]=n}}),e.exports=n,e.exports.UpdateHomeLayout=function(e,n){var t={kind:e.kind,definitions:[a(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var s=i[n]||new Set,o=new Set,r=new Set;for(s.forEach(function(e){r.add(e)});r.size>0;){var l=r;r=new Set,l.forEach(function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach(function(e){r.add(e)}))})}return o.forEach(function(n){var i=a(e,n);i&&t.definitions.push(i)}),t}(n,"UpdateHomeLayout")}}]);
//# sourceMappingURL=HomePage.js.map?cc684a6938729a7670ef