| Server IP : 151.101.66.159 / Your IP : 216.73.216.66 Web Server : Flywheel/5.1.0 System : Linux wordpress 6.12.113+ #1 SMP Thu Oct 22 02:38:20 UTC 2026 x86_64 User : root ( ) PHP Version : 7.4.33.18 Disable Function : disk_free_space,diskfreespace,dl,exec,fpassthru,getmypid,getmyuid,highlight_file,link,opcache_compile_file,opcache_get_configuration,opcache_is_script_cached,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifcontinued,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,phpinfo,popen,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,socket_listen,source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wp-content/plugins/file-manager-advanced/application/assets/dist/ |
Upload File : |
/*! For license information please see 787.2863b2a1.chunk.js.LICENSE.txt */
"use strict";(self.webpackChunkafm_react_admin=self.webpackChunkafm_react_admin||[]).push([[787],{787(e,n,t){t.r(n),t.d(n,{default:()=>S});var a=t(6540),s=t(5688),o=t(7554),i=t(4848);function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function c(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?l(Object(t),!0).forEach(function(n){d(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function d(e,n,t){return(n=function(e){var n=function(e){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=r(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(n)?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function u(){var e,n,t="function"==typeof Symbol?Symbol:{},a=t.iterator||"@@iterator",s=t.toStringTag||"@@toStringTag";function o(t,a,s,o){var l=a&&a.prototype instanceof r?a:r,c=Object.create(l.prototype);return f(c,"_invoke",function(t,a,s){var o,r,l,c=0,d=s||[],u=!1,f={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(n,t){return o=n,r=0,l=e,f.n=t,i}};function m(t,a){for(r=t,l=a,n=0;!u&&c&&!s&&n<d.length;n++){var s,o=d[n],m=f.p,h=o[2];t>3?(s=h===a)&&(l=o[(r=o[4])?5:(r=3,3)],o[4]=o[5]=e):o[0]<=m&&((s=t<2&&m<o[1])?(r=0,f.v=a,f.n=o[1]):m<h&&(s=t<3||o[0]>a||a>h)&&(o[4]=t,o[5]=a,f.n=h,r=0))}if(s||t>1)return i;throw u=!0,a}return function(s,d,h){if(c>1)throw TypeError("Generator is already running");for(u&&1===d&&m(d,h),r=d,l=h;(n=r<2?e:l)||!u;){o||(r?r<3?(r>1&&(f.n=-1),m(r,l)):f.n=l:f.v=l);try{if(c=2,o){if(r||(s="next"),n=o[s]){if(!(n=n.call(o,l)))throw TypeError("iterator result is not an object");if(!n.done)return n;l=n.value,r<2&&(r=0)}else 1===r&&(n=o.return)&&n.call(o),r<2&&(l=TypeError("The iterator does not provide a '"+s+"' method"),r=1);o=e}else if((n=(u=f.n<0)?l:t.call(a,f))!==i)break}catch(n){o=e,r=1,l=n}finally{c=1}}return{value:n,done:u}}}(t,s,o),!0),c}var i={};function r(){}function l(){}function c(){}n=Object.getPrototypeOf;var d=[][a]?n(n([][a]())):(f(n={},a,function(){return this}),n),m=c.prototype=r.prototype=Object.create(d);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,f(e,s,"GeneratorFunction")),e.prototype=Object.create(m),e}return l.prototype=c,f(m,"constructor",c),f(c,"constructor",l),l.displayName="GeneratorFunction",f(c,s,"GeneratorFunction"),f(m),f(m,s,"Generator"),f(m,a,function(){return this}),f(m,"toString",function(){return"[object Generator]"}),(u=function(){return{w:o,m:h}})()}function f(e,n,t,a){var s=Object.defineProperty;try{s({},"",{})}catch(e){s=0}f=function(e,n,t,a){function o(n,t){f(e,n,function(e){return this._invoke(n,t,e)})}n?s?s(e,n,{value:t,enumerable:!a,configurable:!a,writable:!a}):e[n]=t:(o("next",0),o("throw",1),o("return",2))},f(e,n,t,a)}function m(e,n,t,a,s,o,i){try{var r=e[o](i),l=r.value}catch(e){return void t(e)}r.done?n(l):Promise.resolve(l).then(a,s)}function h(e){return function(){var n=this,t=arguments;return new Promise(function(a,s){var o=e.apply(n,t);function i(e){m(o,a,s,i,r,"next",e)}function r(e){m(o,a,s,i,r,"throw",e)}i(void 0)})}}function g(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var a,s,o,i,r=[],l=!0,c=!1;try{if(o=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;l=!1}else for(;!(l=(a=o.call(t)).done)&&(r.push(a.value),r.length!==n);l=!0);}catch(e){c=!0,s=e}finally{try{if(!l&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(c)throw s}}return r}}(e,n)||function(e,n){if(e){if("string"==typeof e)return v(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?v(e,n):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=Array(n);t<n;t++)a[t]=e[t];return a}var p="afm_storage_usage_v3",x="#E17351",j="#FBBC04",b="#3F6972",y="#A9E5BB",w="#CED4DA";function k(e){var n,t;return((null===(n=window.afmReact)||void 0===n?void 0:n.pluginUrl)||(null===(t=window.afm_object)||void 0===t?void 0:t.plugin_url)||"/wp-content/plugins/file-manager-advanced/")+"application/assets/images/dashboard/"+e}function N(e){var n,t;return((null===(n=window.afmReact)||void 0===n?void 0:n.pluginUrl)||(null===(t=window.afm_object)||void 0===t?void 0:t.plugin_url)||"/wp-content/plugins/file-manager-advanced/")+"application/assets/images/shell/"+e}function _(e){if(!e)return"—";var n=String(e),t=Number(n),a=null;if(isNaN(t)||""===n.trim())a=new Date(n);else{var s=n.length<=10?1e3*t:t;a=new Date(s)}if(!a||isNaN(a.getTime()))return n;var o=a.getHours(),i=String(a.getMinutes()).padStart(2,"0"),r=o>=12?"pm":"am";return 0==(o%=12)&&(o=12),"".concat(["January","February","March","April","May","June","July","August","September","October","November","December"][a.getMonth()]," ").concat(a.getDate(),", ").concat(a.getFullYear()," ").concat(o,":").concat(i).concat(r)}function S(){var e,n,t,r,l,d,f=(null===(e=window.afmReact)||void 0===e?void 0:e.hasPro)||!1,m=(null===(n=window.afmReact)||void 0===n?void 0:n.currentPlan)||"free",v=(null===(t=window.afmReact)||void 0===t?void 0:t.pricingUrl)||"https://advancedfilemanager.com/pricing/",S=g((0,a.useState)(!0),2),A=S[0],O=S[1],C=g((0,a.useState)(!0),2),P=C[0],D=C[1],I=g((0,a.useState)(!0),2),T=I[0],M=I[1],E=g((0,a.useState)(!0),2),R=E[0],q=E[1],F=g((0,a.useState)({roles:(null===(r=window.afmReact)||void 0===r?void 0:r.roles)||{},storage:null,logs:[],integrations:{},pluginSettings:null}),2),U=F[0],G=F[1],B=g((0,a.useState)(null),2),W=B[0],L=B[1],X=g((0,a.useState)(null),2),z=X[0],H=X[1],V=g((0,a.useState)({x:0,y:0}),2),Y=V[0],J=V[1],Q=g((0,a.useState)(null),2),$=Q[0],K=Q[1],Z=function(){var e=h(u().m(function e(n){var t,a,s;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:if(t=String(n||"")){e.n=1;break}return e.a(2,!1);case 1:if(e.p=1,!navigator.clipboard||!window.isSecureContext){e.n=3;break}return e.n=2,navigator.clipboard.writeText(t);case 2:return e.a(2,!0);case 3:e.n=5;break;case 4:e.p=4,e.v;case 5:return e.p=5,(a=document.createElement("textarea")).value=t,a.setAttribute("readonly",""),a.style.position="fixed",a.style.left="-9999px",a.style.opacity="0",document.body.appendChild(a),a.select(),s=document.execCommand("copy"),document.body.removeChild(a),e.a(2,s);case 6:return e.p=6,e.v,e.a(2,!1)}},e,null,[[5,6],[1,4]])}));return function(n){return e.apply(this,arguments)}}(),ee=function(){var e,n;return{root:(0,s.lA)(),nonce:(null===(e=window.wpApiSettings)||void 0===e?void 0:e.nonce)||(null===(n=window.afmReact)||void 0===n?void 0:n.nonce)||""}},ne=(0,a.useCallback)(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=ee(),t=n.root,a=n.nonce;if(t&&a){e&&sessionStorage.removeItem(p);var o=e||!sessionStorage.getItem(p),i=(0,s._H)("file-manager-advanced/v1/storage-usage",o?{refresh:"1"}:{});O(!0),fetch(i,{method:"GET",credentials:"same-origin",headers:{"X-WP-Nonce":a}}).then(function(e){return e.ok?e.json():Promise.reject({status:e.status})}).then(function(e){e&&e.breakdown?(sessionStorage.setItem(p,"1"),G(function(n){return c(c({},n),{},{storage:e})})):G(function(e){return c(c({},e),{},{storage:null})}),O(!1)}).catch(function(){G(function(e){return c(c({},e),{},{storage:null})}),O(!1)})}else O(!1)},[]);(0,a.useEffect)(function(){ne(!1)},[ne]),(0,a.useEffect)(function(){if(f){var e=ee(),n=e.root,t=e.nonce;n&&t?setTimeout(function(){fetch((0,s._H)("file-manager-advanced/v1/activity-logs"),{credentials:"same-origin",headers:{"X-WP-Nonce":t},method:"GET"}).then(function(e){return e.ok?e.json():{logs:[]}}).then(function(e){var n,t=(null==e?void 0:e.logs)||(null==e||null===(n=e.data)||void 0===n?void 0:n.logs)||[];G(function(e){return c(c({},e),{},{logs:t})}),D(!1)}).catch(function(){G(function(e){return c(c({},e),{},{logs:[]})}),D(!1)})},100):D(!1)}else D(!1)},[f]),(0,a.useEffect)(function(){if(f){var e=ee(),n=e.root,t=e.nonce;n&&t?setTimeout(function(){fetch("".concat(n,"file-manager-advanced/v1/integrations-status"),{credentials:"same-origin",headers:{"X-WP-Nonce":t},method:"GET"}).then(function(e){return e.ok?e.json():{connected:{}}}).then(function(e){var n,t=(null==e?void 0:e.connected)||(null==e||null===(n=e.data)||void 0===n?void 0:n.connected)||{};G(function(e){return c(c({},e),{},{integrations:t})}),M(!1)}).catch(function(){G(function(e){return c(c({},e),{},{integrations:{}})}),M(!1)})},150):M(!1)}else M(!1)},[f]),(0,a.useEffect)(function(){var e=ee(),n=e.root,t=e.nonce;n&&t?setTimeout(function(){fetch("".concat(n,"file-manager-advanced/v1/plugin-settings"),{credentials:"same-origin",headers:{"X-WP-Nonce":t},method:"GET"}).then(function(e){return e.ok?e.json():null}).then(function(e){G(function(n){return c(c({},n),{},{pluginSettings:e})}),q(!1)}).catch(function(){G(function(e){return c(c({},e),{},{pluginSettings:null})}),q(!1)})},200):q(!1)},[]);var te,ae,se=function(e){if(!e)return"0 B";var n=Math.floor(Math.log(e)/Math.log(1024));return(e/Math.pow(1024,n)).toFixed(2)+" "+["B","KB","MB","GB","TB"][n]},oe=U.storage,ie=[],re={},le=0,ce=[];if(oe&&oe.breakdown){var de,ue,fe,me,he,ge,ve,pe,xe,je,be,ye,we,ke,Ne,_e,Se,Ae,Oe,Ce,Pe,De,Ie,Te,Me,Ee,Re,qe,Fe,Ue=oe.breakdown,Ge=Math.max(1,((null===(de=Ue.video)||void 0===de?void 0:de.bytes)||0)+((null===(ue=Ue.images)||void 0===ue?void 0:ue.bytes)||0)+((null===(fe=Ue.documents)||void 0===fe?void 0:fe.bytes)||0)+((null===(me=Ue.code)||void 0===me?void 0:me.bytes)||0)+((null===(he=Ue.other)||void 0===he?void 0:he.bytes)||0)),Be=function(e){return e/Ge*100},We=Be((null===(ge=Ue.video)||void 0===ge?void 0:ge.bytes)||0),Le=We+Be((null===(ve=Ue.images)||void 0===ve?void 0:ve.bytes)||0),Xe=Le+Be((null===(pe=Ue.documents)||void 0===pe?void 0:pe.bytes)||0),ze=Xe+Be((null===(xe=Ue.code)||void 0===xe?void 0:xe.bytes)||0);re={background:"conic-gradient(".concat(x," 0 ").concat(We,"%, ").concat(j," ").concat(We,"% ").concat(Le,"%, ").concat(b," ").concat(Le,"% ").concat(Xe,"%, ").concat(y," ").concat(Xe,"% ").concat(ze,"%, ").concat(w," ").concat(ze,"% 100%)")},ie=[{color:x,label:"Video",bytes:null===(je=Ue.video)||void 0===je?void 0:je.bytes,files:null===(be=Ue.video)||void 0===be?void 0:be.files},{color:j,label:"Images",bytes:null===(ye=Ue.images)||void 0===ye?void 0:ye.bytes,files:null===(we=Ue.images)||void 0===we?void 0:we.files},{color:b,label:"Documents",bytes:null===(ke=Ue.documents)||void 0===ke?void 0:ke.bytes,files:null===(Ne=Ue.documents)||void 0===Ne?void 0:Ne.files},{color:y,label:"Code",bytes:null===(_e=Ue.code)||void 0===_e?void 0:_e.bytes,files:null===(Se=Ue.code)||void 0===Se?void 0:Se.files},{color:w,label:"Other",bytes:null===(Ae=Ue.other)||void 0===Ae?void 0:Ae.bytes,files:null===(Oe=Ue.other)||void 0===Oe?void 0:Oe.files}],ce=[{color:x,label:"Video",bytes:(null===(Ce=Ue.video)||void 0===Ce?void 0:Ce.bytes)||0,files:(null===(Pe=Ue.video)||void 0===Pe?void 0:Pe.files)||0,start:0,end:We},{color:j,label:"Images",bytes:(null===(De=Ue.images)||void 0===De?void 0:De.bytes)||0,files:(null===(Ie=Ue.images)||void 0===Ie?void 0:Ie.files)||0,start:We,end:Le},{color:b,label:"Documents",bytes:(null===(Te=Ue.documents)||void 0===Te?void 0:Te.bytes)||0,files:(null===(Me=Ue.documents)||void 0===Me?void 0:Me.files)||0,start:Le,end:Xe},{color:y,label:"Code",bytes:(null===(Ee=Ue.code)||void 0===Ee?void 0:Ee.bytes)||0,files:(null===(Re=Ue.code)||void 0===Re?void 0:Re.files)||0,start:Xe,end:ze},{color:w,label:"Other",bytes:(null===(qe=Ue.other)||void 0===qe?void 0:qe.bytes)||0,files:(null===(Fe=Ue.other)||void 0===Fe?void 0:Fe.files)||0,start:ze,end:100}],le=oe.fs&&oe.fs.total>0?Math.max(0,Math.round(oe.fs.free/oe.fs.total*100)):Math.max(0,Math.round(100-ze))}return(0,i.jsxs)("div",{className:"afm-dashboard",children:[(0,i.jsxs)("div",{className:"afm-card",children:[(0,i.jsxs)("div",{className:"afm-card__header",children:["Storage Usage",(0,i.jsx)("button",{type:"button",className:"afm-storage-refresh",onClick:function(e){e.preventDefault(),A||ne(!0)},disabled:A,children:"Refresh"})]}),(0,i.jsx)("div",{className:"afm-card__body afm-storage-flex",children:A?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"afm-storage-stats",children:[(0,i.jsxs)("div",{className:"afm-storage-stats__head",children:[(0,i.jsx)("div",{className:"afm-skeleton afm-skeleton--label"}),(0,i.jsx)("div",{className:"afm-skeleton afm-skeleton--total"})]}),(0,i.jsx)("div",{className:"afm-donut-legend afm-donut-legend--skeleton",children:[1,2,3,4,5].map(function(e){return(0,i.jsxs)("div",{className:"afm-legend-skeleton-row",children:[(0,i.jsx)("div",{className:"afm-skeleton afm-skeleton--dot"}),(0,i.jsx)("div",{className:"afm-skeleton afm-skeleton--legend-label"}),(0,i.jsx)("div",{className:"afm-skeleton afm-skeleton--legend-value"})]},e)})})]}),(0,i.jsx)("div",{className:"afm-donut-container afm-donut-container--skeleton","aria-hidden":"true",children:(0,i.jsx)("div",{className:"afm-skeleton afm-skeleton--donut"})})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"afm-storage-stats",children:[(0,i.jsx)("div",{className:"afm-storage-stats__label",children:"Total Local Bytes / Files"}),(0,i.jsxs)("div",{className:"afm-storage-stats__total",children:[oe?se((null===(l=oe.total)||void 0===l?void 0:l.bytes)||0):"—"," ",oe&&(0,i.jsxs)("span",{className:"afm-storage-stats__files",children:["/ ",null!==(d=oe.total)&&void 0!==d&&d.files?oe.total.files.toLocaleString():"0"]})]}),(0,i.jsx)("div",{className:"afm-donut-legend",children:ie.map(function(e,n){return[(0,i.jsx)("span",{className:"afm-dot",style:{background:e.color}},"dot-".concat(n)),(0,i.jsx)("span",{children:e.label},"label-".concat(n)),(0,i.jsx)("span",{children:oe?se(e.bytes||0)+" / "+(e.files||0):"—"},"value-".concat(n))]})})]}),(0,i.jsxs)("div",{className:"afm-donut-container",onMouseMove:function(e){if(oe&&oe.breakdown&&0!==ce.length){var n=e.currentTarget.getBoundingClientRect(),t=n.left+n.width/2,a=n.top+n.height/2,s=e.clientX-t,o=e.clientY-a,i=Math.sqrt(s*s+o*o),r=n.width/2;if(i<.32*r||i>r)H(null);else{var l=Math.atan2(o,s)*(180/Math.PI),c=(l=(l+90+360)%360)/360*100,d=ce.find(function(e){return(0!==e.start||0!==e.end)&&(e.start>e.end?c>=e.start||c<e.end:c>=e.start&&c<e.end)});d&&(d.bytes>0||d.files>0)?(H(d),J({x:e.clientX,y:e.clientY})):H(null)}}},onMouseLeave:function(){H(null)},children:[(0,i.jsx)("div",{className:"afm-donut",style:c(c({},re),{},{pointerEvents:"none"})}),(0,i.jsxs)("div",{className:"afm-donut-center",children:[le,"%",(0,i.jsx)("div",{className:"afm-donut-center__sub",children:"Unused"})]}),z&&(0,i.jsxs)("div",{className:"afm-donut-tooltip",style:{left:"".concat(Y.x+10,"px"),top:"".concat(Y.y-10,"px")},children:[(0,i.jsxs)("div",{className:"afm-donut-tooltip__title",children:[(0,i.jsx)("div",{className:"afm-dot",style:{background:z.color}}),(0,i.jsx)("div",{children:z.label})]}),(0,i.jsxs)("div",{className:"afm-donut-tooltip__body",children:[(0,i.jsxs)("div",{children:["Size: ",se(z.bytes)]}),(0,i.jsxs)("div",{children:["Files: ",z.files.toLocaleString()]}),(0,i.jsxs)("div",{className:"afm-donut-tooltip__pct",children:[(z.end-z.start).toFixed(1),"% of storage"]})]})]})]})]})})]}),(0,i.jsxs)("div",{className:"afm-card afm-plugin-settings",children:[(0,i.jsx)("div",{className:"afm-card__header",children:"Plugin Settings & Quick Access"}),(0,i.jsx)("div",{className:"afm-card__body",children:R?(0,i.jsxs)("div",{className:"afm-plugin-settings-skeleton",children:[(0,i.jsxs)("div",{className:"afm-plugin-info-section",children:[(0,i.jsx)("div",{className:"afm-skeleton afm-skeleton--section-title"}),(0,i.jsx)("div",{className:"afm-plugin-info-list",children:[1,2,3].map(function(e){return(0,i.jsxs)("div",{className:"afm-plugin-info-row afm-plugin-info-row--skeleton",children:[(0,i.jsx)("div",{className:"afm-skeleton afm-skeleton--info-label"}),(0,i.jsx)("div",{className:"afm-skeleton afm-skeleton--info-value"})]},e)})})]}),(0,i.jsxs)("div",{className:"afm-quick-actions-section",children:[(0,i.jsx)("div",{className:"afm-skeleton afm-skeleton--section-title"}),(0,i.jsx)("div",{className:"afm-quick-actions-grid",children:[1,2,3,4].map(function(e){return(0,i.jsx)("div",{className:"afm-skeleton afm-skeleton--action"},e)})})]})]}):(ae=U.pluginSettings||{},(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{className:"afm-plugin-info-section",children:[(0,i.jsx)("div",{className:"afm-section-title",children:"Plugin Information"}),(0,i.jsxs)("div",{className:"afm-plugin-info-list",children:[(0,i.jsxs)("div",{className:"afm-plugin-info-row",children:[(0,i.jsx)("span",{className:"afm-plugin-info-row__label",children:"Theme:"}),(0,i.jsx)("span",{className:"afm-plugin-info-row__value",children:ae.theme_display||"—"})]}),(0,i.jsxs)("div",{className:"afm-plugin-info-row",children:[(0,i.jsx)("span",{className:"afm-plugin-info-row__label",children:"Root Directory:"}),(0,i.jsx)("span",{className:"afm-plugin-info-row__value afm-plugin-info-row__value--path",title:ae.root_directory||"",children:ae.root_directory||"—"})]}),(0,i.jsxs)("div",{className:"afm-plugin-info-row",children:[(0,i.jsx)("span",{className:"afm-plugin-info-row__label",children:"Who Can Access:"}),(0,i.jsx)("span",{className:"afm-plugin-info-row__value",children:ae.allowed_roles_display&&ae.allowed_roles_display.length?ae.allowed_roles_display.join(", "):"Administrator"})]})]})]}),(0,i.jsxs)("div",{className:"afm-quick-actions-section",children:[(0,i.jsx)("div",{className:"afm-section-title",children:"Quick Actions"}),(0,i.jsxs)("div",{className:"afm-quick-actions-grid",children:[(0,i.jsx)("a",{href:"#/filemanager",className:"afm-quick-action-btn",onClick:function(e){e.preventDefault(),window.location.hash="#/filemanager"},children:"Open File Manager"}),(0,i.jsx)("a",{href:"#/settings/general-settings",className:"afm-quick-action-btn",onClick:function(e){e.preventDefault(),sessionStorage.setItem("afm-settings-hash-just-set","true"),sessionStorage.setItem("afm-settings-subtab","general-settings"),window.location.hash="#/settings/general-settings",setTimeout(function(){sessionStorage.removeItem("afm-settings-hash-just-set")},2e3)},children:"Configure Settings"}),(0,i.jsx)("a",{href:window.afmReact&&window.afmReact.docsUrl||"https://advancedfilemanager.com/documentation/",className:"afm-quick-action-btn",target:"_blank",rel:"noopener noreferrer",children:"Documentation"}),(0,i.jsx)("a",{href:window.afmReact&&window.afmReact.supportUrl||"https://advancedfilemanager.com/contact/",className:"afm-quick-action-btn",target:"_blank",rel:"noopener noreferrer",children:"Get Support"})]})]})]}))})]}),!f&&(0,i.jsx)("div",{className:"afm-card afm-pro-upgrade-banner",children:(0,i.jsxs)("div",{className:"afm-pro-upgrade-banner__inner",children:[(0,i.jsxs)("div",{className:"afm-pro-upgrade-banner__content",children:[(0,i.jsxs)("div",{className:"afm-pro-upgrade-banner__badge",children:[(0,i.jsx)("img",{src:k("bolt.svg"),alt:"",width:10,height:13}),(0,i.jsx)("span",{children:"Unlock AFM Pro"})]}),(0,i.jsx)("h2",{className:"afm-pro-upgrade-banner__title",children:"Take Complete Control of Your WordPress Files"}),(0,i.jsx)("p",{className:"afm-pro-upgrade-banner__desc",children:"Unlock powerful file management, cloud storage, database tools, AI assistance, and 5+ integrations — all from your WordPress dashboard."}),(0,i.jsx)("div",{className:"afm-pro-upgrade-banner__features",children:[["DB Adminer Database Support","AI CodePilot"],["Front-end Block Support","5+ Cloud Storage Integrations"],["Notifications","And More Pro Features"]].map(function(e,n){return(0,i.jsx)("div",{className:"afm-pro-upgrade-banner__feature-row",children:e.map(function(e){return(0,i.jsxs)("div",{className:"afm-pro-upgrade-banner__feature",children:[(0,i.jsx)("img",{src:k("check.svg"),alt:"",width:15,height:13}),(0,i.jsx)("span",{children:e})]},e)})},n)})}),(0,i.jsx)("a",{href:v,target:"_blank",rel:"noopener noreferrer",className:"afm-pro-upgrade-banner__cta",children:"Upgrade Now"})]}),(0,i.jsx)("div",{className:"afm-pro-upgrade-banner__art",children:(0,i.jsx)("img",{src:k("promo-art.png"),alt:"AFM Pro features preview",width:532,height:360})})]})}),f&&(0,i.jsxs)("div",{className:"afm-card afm-activity",children:[(0,i.jsxs)("div",{className:"afm-card__header",children:[(0,i.jsx)("span",{children:"Activity Logs"}),(0,i.jsx)("a",{href:"#/logs",className:"afm-card__header-link",children:"View All Logs"})]}),(0,i.jsx)("div",{className:"afm-card__body",children:P?(0,i.jsx)("div",{className:"afm-logs-table-wrap afm-logs-table-wrap--skeleton","aria-hidden":"true",children:(0,i.jsxs)("div",{className:"afm-dash-logs-skeleton",children:[(0,i.jsxs)("div",{className:"afm-dash-logs-skeleton__head",children:[(0,i.jsx)("span",{className:"afm-skeleton afm-skeleton--check"}),(0,i.jsx)("span",{className:"afm-skeleton afm-skeleton--col-id"}),(0,i.jsx)("span",{className:"afm-skeleton afm-skeleton--col-user"}),(0,i.jsx)("span",{className:"afm-skeleton afm-skeleton--col-datetime"}),(0,i.jsx)("span",{className:"afm-skeleton afm-skeleton--col-event"}),(0,i.jsx)("span",{className:"afm-skeleton afm-skeleton--col-path"}),(0,i.jsx)("span",{className:"afm-skeleton afm-skeleton--col-type"}),(0,i.jsx)("span",{className:"afm-skeleton afm-skeleton--col-created"}),(0,i.jsx)("span",{className:"afm-skeleton afm-skeleton--col-actions"})]}),[1,2].map(function(e){return(0,i.jsxs)("div",{className:"afm-dash-logs-skeleton__row",children:[(0,i.jsx)("span",{className:"afm-skeleton afm-skeleton--check"}),(0,i.jsx)("span",{className:"afm-skeleton afm-skeleton--col-id"}),(0,i.jsxs)("span",{className:"afm-skeleton afm-skeleton--col-user afm-skeleton--col-user-stack",children:[(0,i.jsx)("span",{className:"afm-skeleton afm-skeleton--line"}),(0,i.jsx)("span",{className:"afm-skeleton afm-skeleton--line afm-skeleton--line-wide"})]}),(0,i.jsx)("span",{className:"afm-skeleton afm-skeleton--col-datetime"}),(0,i.jsx)("span",{className:"afm-skeleton afm-skeleton--col-event"}),(0,i.jsx)("span",{className:"afm-skeleton afm-skeleton--col-path"}),(0,i.jsx)("span",{className:"afm-skeleton afm-skeleton--col-type"}),(0,i.jsx)("span",{className:"afm-skeleton afm-skeleton--col-created"}),(0,i.jsx)("span",{className:"afm-skeleton afm-skeleton--col-actions"})]},e)})]})}):(0,i.jsx)("div",{className:"afm-logs-table-wrap",children:(0,i.jsxs)("table",{className:"afm-logs-table",children:[(0,i.jsxs)("colgroup",{children:[(0,i.jsx)("col",{style:{width:"55px"}}),(0,i.jsx)("col",{style:{width:"80px"}}),(0,i.jsx)("col",{style:{width:"200px"}}),(0,i.jsx)("col",{style:{width:"200px"}}),(0,i.jsx)("col",{style:{width:"130px"}}),(0,i.jsx)("col",{style:{width:"150px"}}),(0,i.jsx)("col",{style:{width:"150px"}}),(0,i.jsx)("col",{style:{width:"130px"}}),(0,i.jsx)("col",{style:{width:"135px"}})]}),(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{className:"afm-logs-col-check",scope:"col",children:(0,i.jsx)("input",{type:"checkbox",disabled:!0,"aria-label":"Select all logs"})}),(0,i.jsxs)("th",{scope:"col",children:[(0,i.jsx)("span",{children:"ID"})," ",(0,i.jsxs)("span",{className:"afm-logs-sort","aria-hidden":"true",children:[(0,i.jsx)("img",{src:N("logs-sort.svg"),alt:"",width:"12",height:"12"}),(0,i.jsx)("img",{src:N("logs-sort.svg"),alt:"",width:"12",height:"12",className:"afm-logs-sort__up"})]})]}),(0,i.jsxs)("th",{scope:"col",children:[(0,i.jsx)("span",{children:"User"})," ",(0,i.jsxs)("span",{className:"afm-logs-sort","aria-hidden":"true",children:[(0,i.jsx)("img",{src:N("logs-sort.svg"),alt:"",width:"12",height:"12"}),(0,i.jsx)("img",{src:N("logs-sort.svg"),alt:"",width:"12",height:"12",className:"afm-logs-sort__up"})]})]}),(0,i.jsxs)("th",{scope:"col",children:[(0,i.jsx)("span",{children:"Date & Time"})," ",(0,i.jsxs)("span",{className:"afm-logs-sort","aria-hidden":"true",children:[(0,i.jsx)("img",{src:N("logs-sort.svg"),alt:"",width:"12",height:"12"}),(0,i.jsx)("img",{src:N("logs-sort.svg"),alt:"",width:"12",height:"12",className:"afm-logs-sort__up"})]})]}),(0,i.jsxs)("th",{scope:"col",children:[(0,i.jsx)("span",{children:"Event"})," ",(0,i.jsxs)("span",{className:"afm-logs-sort","aria-hidden":"true",children:[(0,i.jsx)("img",{src:N("logs-sort.svg"),alt:"",width:"12",height:"12"}),(0,i.jsx)("img",{src:N("logs-sort.svg"),alt:"",width:"12",height:"12",className:"afm-logs-sort__up"})]})]}),(0,i.jsxs)("th",{scope:"col",children:[(0,i.jsx)("span",{children:"File Path"})," ",(0,i.jsxs)("span",{className:"afm-logs-sort","aria-hidden":"true",children:[(0,i.jsx)("img",{src:N("logs-sort.svg"),alt:"",width:"12",height:"12"}),(0,i.jsx)("img",{src:N("logs-sort.svg"),alt:"",width:"12",height:"12",className:"afm-logs-sort__up"})]})]}),(0,i.jsx)("th",{scope:"col",children:"Type"}),(0,i.jsx)("th",{scope:"col",children:"IP Address"}),(0,i.jsx)("th",{scope:"col",children:"Actions"})]})}),(0,i.jsx)("tbody",{children:(te=(U.logs||[]).slice(0,5),0===te.length?(0,i.jsx)("tr",{children:(0,i.jsx)("td",{colSpan:"9",className:"afm-logs-empty",children:"No logs found."})}):te.map(function(e){return(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{className:"afm-logs-col-check",children:(0,i.jsx)("input",{type:"checkbox",disabled:!0,"aria-label":"Select log ".concat(e.id)})}),(0,i.jsx)("td",{children:String(e.id||"")}),(0,i.jsx)("td",{children:(0,i.jsxs)("div",{className:"afm-logs-user",children:[(0,i.jsx)("span",{className:"afm-logs-user__name",children:e.user||"—"}),e.email?(0,i.jsx)("span",{className:"afm-logs-user__email",children:e.email}):null]})}),(0,i.jsx)("td",{children:_(e.time)}),(0,i.jsx)("td",{children:e.event||"—"}),(0,i.jsx)("td",{children:(0,i.jsxs)("div",{className:"afm-logs-path",children:[(0,i.jsx)("span",{className:"afm-logs-path__text",title:e.file_path||"",children:e.file_path||"—"}),e.file_path?(0,i.jsx)("button",{type:"button",className:"afm-logs-icon-btn",onClick:function(){var n=h(u().m(function n(t){return u().w(function(n){for(;;)switch(n.n){case 0:return t.preventDefault(),n.n=1,Z(e.file_path||"");case 1:n.v&&(K(e.id),setTimeout(function(){return K(null)},2e3));case 2:return n.a(2)}},n)}));return function(e){return n.apply(this,arguments)}}(),title:$===e.id?"Copied!":"Copy file path",children:$===e.id?(0,i.jsx)("span",{className:"dashicons dashicons-yes"}):(0,i.jsx)("img",{src:N("logs-copy.svg"),alt:"",width:"14",height:"14"})}):null]})}),(0,i.jsx)("td",{children:e.type||"—"}),(0,i.jsx)("td",{className:"afm-logs-col-ip",children:(0,i.jsx)("span",{className:"afm-logs-ip",title:e.ip||"",children:e.ip||"—"})}),(0,i.jsx)("td",{children:(0,i.jsxs)("div",{className:"afm-logs-row-actions",children:[(0,i.jsx)("button",{type:"button",className:"afm-logs-icon-btn",onClick:function(n){n.preventDefault(),L(e)},title:"View details",children:(0,i.jsx)("img",{src:N("logs-view.svg"),alt:"",width:"14",height:"14"})}),(0,i.jsx)("button",{type:"button",className:"afm-logs-icon-btn",onClick:function(n){if(n.preventDefault(),window.confirm("Are you sure you want to delete this log?")){var t=ee().nonce;G(function(n){return c(c({},n),{},{logs:(n.logs||[]).filter(function(n){return String(n.id)!==String(e.id)})})}),fetch((0,s._H)("file-manager-advanced/v1/activity-logs/".concat(String(e.id))),{method:"POST",credentials:"same-origin",headers:{"X-WP-Nonce":t}}).then(function(e){return e.json()}).then(function(){return fetch((0,s._H)("file-manager-advanced/v1/activity-logs"),{credentials:"same-origin",headers:{"X-WP-Nonce":t}})}).then(function(e){return e.ok?e.json():{logs:[]}}).then(function(e){G(function(n){return c(c({},n),{},{logs:Array.isArray(e.logs)?e.logs:[]})})})}},title:"Delete log",children:(0,i.jsx)("img",{src:N("logs-row-trash.svg"),alt:"",width:"14",height:"14"})})]})})]},e.id)}))})]})})})]}),f&&(0,i.jsxs)("div",{className:"afm-card afm-quick",style:{position:"relative"},children:[(0,i.jsxs)("div",{className:"afm-card__header",children:[(0,i.jsx)("span",{children:"Integrations"}),(0,i.jsx)("a",{href:"#/extension",className:"afm-card__header-link",onClick:function(e){e.preventDefault(),window.location.hash="#/extension"},children:"Manage Settings"})]}),(0,i.jsx)("div",{className:"afm-card__body",style:{position:"relative"},children:T?(0,i.jsx)("div",{className:"qa-grid afm-card-content","aria-hidden":"true",children:[1,2,3,4,5,6,7,8,9,10].map(function(e){return(0,i.jsxs)("div",{className:"qa-card qa-card--skeleton",children:[(0,i.jsx)("div",{className:"afm-skeleton afm-skeleton--qa-icon"}),(0,i.jsx)("div",{className:"afm-skeleton afm-skeleton--qa-name"})]},e)})}):function(e,n){var t=((null===(e=window.afmReact)||void 0===e?void 0:e.pluginUrl)||(null===(n=window.afm_object)||void 0===n?void 0:n.plugin_url)||"/wp-content/plugins/file-manager-advanced/")+"application/assets/images/",a=[{key:"github",name:"Github",img:t+"github.svg",href:"#/extension/github"},{key:"onedrive",name:"One Drive",img:t+"onedrive.svg",href:"#/extension/onedrive"},{key:"googledrive",name:"Google Drive",img:t+"googledrive.svg",href:"#/extension/google-drive"},{key:"googlecloud",name:"Google Cloud",img:t+"googlecloud.svg",href:"#/extension/google-cloud-storage"},{key:"dropbox",name:"Dropbox",img:t+"dropbox.svg",href:"#/extension/dropbox"},{key:"amazonses",name:"Amazon S3",img:t+"amazons3.svg",href:"#/extension/amazon-s3"},{key:"pcloud",name:"pCloud",img:t+"pcloud.svg",href:"#/extension/pcloud"},{key:"cloudflarer2",name:"Cloudflare R2",img:t+"cloudflarer2.svg",href:"#/extension/cloudflare-r2"},{key:"wasabi",name:"Wasabi",img:t+"wasabi.svg",href:"#/extension/wasabi"},{key:"ai",name:"AI Integration",img:t+"ai_integration.svg",href:"#/extension/ai-code-assistent"}];a.sort(function(e,n){var t=!(!U.integrations||!(U.integrations[e.key]||"cloudflarer2"===e.key&&U.integrations["cloudflare-r2"]));return t===!(!U.integrations||!(U.integrations[n.key]||"cloudflarer2"===n.key&&U.integrations["cloudflare-r2"]))?0:t?-1:1});var s=f&&"business"!==m;return(0,i.jsx)(o.A,{shouldShow:s,children:(0,i.jsx)("div",{className:"qa-grid afm-card-content",children:a.map(function(e){var n=!(!U.integrations||!(U.integrations[e.key]||"cloudflarer2"===e.key&&U.integrations["cloudflare-r2"]));return(0,i.jsxs)("a",{className:"qa-card".concat(n?" connected":""),href:e.href,onClick:function(n){var t;n.preventDefault(),s||(t="googledrive"===e.key?"google-drive":"googlecloud"===e.key?"google-cloud-storage":"amazonses"===e.key?"amazon-s3":"cloudflarer2"===e.key?"cloudflare-r2":"wasabi"===e.key?"wasabi":"ai"===e.key?"ai-code-assistent":e.key,sessionStorage.setItem("afm-extension-integration",t),sessionStorage.setItem("afm-extension-hash-just-set","true"),window.location.hash=e.href,setTimeout(function(){sessionStorage.removeItem("afm-extension-hash-just-set")},2e3))},children:[(0,i.jsx)("div",{className:"qa-icon",children:e.img&&(0,i.jsx)("img",{src:e.img,alt:""})}),(0,i.jsx)("div",{className:"qa-name",children:e.name}),n?(0,i.jsxs)("span",{className:"qa-connected-badge",children:[(0,i.jsx)("span",{className:"qa-connected-badge__dot","aria-hidden":"true"}),"Connected"]}):null]},e.key)})})})}()})]}),W&&(0,i.jsx)("div",{className:"afm-log-detail-modal",onClick:function(){return L(null)},children:(0,i.jsxs)("div",{className:"afm-log-detail-dialog",onClick:function(e){return e.stopPropagation()},children:[(0,i.jsx)("button",{type:"button",className:"afm-log-detail-close",onClick:function(){return L(null)},"aria-label":"Close",children:"×"}),(0,i.jsx)("h3",{children:"Log Detail"}),(0,i.jsx)("div",{className:"afm-log-detail-body",children:W.message||""})]})})]})}},5688(e,n,t){function a(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var a,s,o,i,r=[],l=!0,c=!1;try{if(o=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;l=!1}else for(;!(l=(a=o.call(t)).done)&&(r.push(a.value),r.length!==n);l=!0);}catch(e){c=!0,s=e}finally{try{if(!l&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(c)throw s}}return r}}(e,n)||function(e,n){if(e){if("string"==typeof e)return s(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?s(e,n):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=Array(n);t<n;t++)a[t]=e[t];return a}function o(){var e,n;return function(e){if(!e||"string"!=typeof e)return e;try{var n=new URL(e,window.location.origin);return n.protocol=window.location.protocol,n.host=window.location.host,n.toString()}catch(n){return e.startsWith("/")?"".concat(window.location.origin).concat(e):e}}((null===(e=window.wpApiSettings)||void 0===e?void 0:e.root)||(null===(n=window.afmReact)||void 0===n?void 0:n.jsonURL)||"".concat(window.location.origin,"/?rest_route=/"))}function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=o(),s=t.endsWith("/")?t:"".concat(t,"/"),i=String(e||"").replace(/^\//,""),r=Object.entries(n).filter(function(e){var n=a(e,2)[1];return null!=n&&""!==n}).map(function(e){var n=a(e,2),t=n[0],s=n[1];return"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(String(s)))});if(s.includes("rest_route=")){var l="".concat(s.split("rest_route=")[0],"rest_route="),c="".concat(l,"/").concat(i);return r.length&&(c+="&".concat(r.join("&"))),c}if(s.includes("/wp-json")){var d=function(e){try{return new URL(e,window.location.origin).origin}catch(e){return window.location.origin}}(s),u="".concat(d,"/?rest_route=/").concat(i);return r.length&&(u+="&".concat(r.join("&"))),u}var f="".concat(s).concat(i);return r.length&&(f+="?".concat(r.join("&"))),f}t.d(n,{_H:()=>i,lA:()=>o})}}]);
//# sourceMappingURL=787.2863b2a1.chunk.js.map