vuefinder 2.5.10 → 2.5.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";var xr=Object.defineProperty;var wr=(n,t,o)=>t in n?xr(n,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[t]=o;var Rn=(n,t,o)=>wr(n,typeof t!="symbol"?t+"":t,o);const e=require("vue"),br=require("mitt"),Er=require("dragselect"),Vr=require("@uppy/core"),Nr=require("@uppy/xhr-upload"),Sr=require("vanilla-lazyload");require("cropperjs/dist/cropper.css");const Br=require("cropperjs");var co;const Gt=(co=document.querySelector('meta[name="csrf-token"]'))==null?void 0:co.getAttribute("content");class $r{constructor(t){Rn(this,"config");this.config=t}get config(){return this.config}transformRequestParams(t){const o=this.config,s={};Gt!=null&&Gt!==""&&(s[o.xsrfHeaderName]=Gt);const r=Object.assign({},o.headers,s,t.headers),c=Object.assign({},o.params,t.params),a=t.body,i=o.baseUrl+t.url,l=t.method;let d;l!=="get"&&(a instanceof FormData?(d=a,o.body!=null&&Object.entries(this.config.body).forEach(([u,p])=>{d.append(u,p)})):(d={...a},o.body!=null&&Object.assign(d,this.config.body)));const f={url:i,method:l,headers:r,params:c,body:d};if(o.transformRequest!=null){const u=o.transformRequest({url:i,method:l,headers:r,params:c,body:d});u.url!=null&&(f.url=u.url),u.method!=null&&(f.method=u.method),u.params!=null&&(f.params=u.params??{}),u.headers!=null&&(f.headers=u.headers??{}),u.body!=null&&(f.body=u.body)}return f}getDownloadUrl(t,o){if(o.url!=null)return o.url;const s=this.transformRequestParams({url:"",method:"get",params:{q:"download",adapter:t,path:o.path}});return s.url+"?"+new URLSearchParams(s.params).toString()}getPreviewUrl(t,o){if(o.url!=null)return o.url;const s=this.transformRequestParams({url:"",method:"get",params:{q:"preview",adapter:t,path:o.path}});return s.url+"?"+new URLSearchParams(s.params).toString()}async send(t){const o=this.transformRequestParams(t),s=t.responseType||"json",r={method:t.method,headers:o.headers,signal:t.abortSignal},c=o.url+"?"+new URLSearchParams(o.params);if(o.method!=="get"&&o.body!=null){let i;o.body instanceof FormData?i=t.body:(i=JSON.stringify(o.body),r.headers["Content-Type"]="application/json"),r.body=i}const a=await fetch(c,r);if(a.ok)return await a[s]();throw await a.json()}}function Cr(n){const t={baseUrl:"",headers:{},params:{},body:{},xsrfHeaderName:"X-CSRF-Token"};return typeof n=="string"?Object.assign(t,{baseUrl:n}):Object.assign(t,n),new $r(t)}function Dr(n){let t=localStorage.getItem(n+"_storage");const o=e.reactive(JSON.parse(t??"{}"));e.watch(o,s);function s(){Object.keys(o).length?localStorage.setItem(n+"_storage",JSON.stringify(o)):localStorage.removeItem(n+"_storage")}function r(l,d){o[l]=d}function c(l){delete o[l]}function a(){Object.keys(o).map(l=>c(l))}return{getStore:(l,d=null)=>o.hasOwnProperty(l)?o[l]:d,setStore:r,removeStore:c,clearStore:a}}async function Tr(n,t){const o=t[n];return typeof o=="function"?(await o()).default:o}function Mr(n,t,o,s){const{getStore:r,setStore:c}=n,a=e.ref({}),i=e.ref(r("locale",t)),l=(u,p=t)=>{Tr(u,s).then(m=>{a.value=m,c("locale",u),i.value=u,c("translations",m),Object.values(s).length>1&&(o.emit("vf-toast-push",{label:"The language is set to "+u}),o.emit("vf-language-saved"))}).catch(m=>{p?(o.emit("vf-toast-push",{label:"The selected locale is not yet supported!",type:"error"}),l(p,null)):o.emit("vf-toast-push",{label:"Locale cannot be loaded!",type:"error"})})};!r("locale")&&!s.length?l(t):a.value=r("translations");const d=(u,...p)=>p.length?d(u=u.replace("%s",p.shift()),...p):u;function f(u,...p){return a.value&&a.value.hasOwnProperty(u)?d(a.value[u],...p):d(u,...p)}return e.reactive({t:f,changeLocale:l,locale:i})}const ne={EDIT:"edit",NEW_FILE:"newfile",NEW_FOLDER:"newfolder",PREVIEW:"preview",ARCHIVE:"archive",UNARCHIVE:"unarchive",SEARCH:"search",RENAME:"rename",UPLOAD:"upload",DELETE:"delete",FULL_SCREEN:"fullscreen",DOWNLOAD:"download",LANGUAGE:"language"},Ar=Object.values(ne),Lr="2.5.10";function io(n,t,o,s,r){return(t=Math,o=t.log,s=1024,r=o(n)/o(s)|0,n/t.pow(s,r)).toFixed(0)+" "+(r?"KMGTPEZY"[--r]+"iB":"B")}function uo(n,t,o,s,r){return(t=Math,o=t.log,s=1e3,r=o(n)/o(s)|0,n/t.pow(s,r)).toFixed(0)+" "+(r?"KMGTPEZY"[--r]+"B":"B")}function Or(n){const t={k:1,m:2,g:3,t:4},s=/(\d+(?:\.\d+)?)\s?(k|m|g|t)?b?/i.exec(n);return s[1]*Math.pow(1024,t[s[2].toLowerCase()])}const Re={SYSTEM:"system",LIGHT:"light",DARK:"dark"};function Fr(n,t){const o=e.ref(Re.SYSTEM),s=e.ref(Re.LIGHT);o.value=n.getStore("theme",t??Re.SYSTEM);const r=window.matchMedia("(prefers-color-scheme: dark)"),c=a=>{o.value===Re.DARK||o.value===Re.SYSTEM&&a.matches?s.value=Re.DARK:s.value=Re.LIGHT};return c(r),r.addEventListener("change",c),{value:o,actualValue:s,set(a){o.value=a,a!==Re.SYSTEM?n.setStore("theme",a):n.removeStore("theme"),c(r)}}}function Rr(){const n=e.shallowRef(null),t=e.ref(!1),o=e.ref();return{visible:t,type:n,data:o,open:(c,a=null)=>{document.querySelector("body").style.overflow="hidden",t.value=!0,n.value=c,o.value=a},close:()=>{document.querySelector("body").style.overflow="",t.value=!1,n.value=null}}}/*!
1
+ "use strict";var xr=Object.defineProperty;var wr=(n,t,o)=>t in n?xr(n,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[t]=o;var Rn=(n,t,o)=>wr(n,typeof t!="symbol"?t+"":t,o);const e=require("vue"),br=require("mitt"),Er=require("dragselect"),Vr=require("@uppy/core"),Nr=require("@uppy/xhr-upload"),Sr=require("vanilla-lazyload");require("cropperjs/dist/cropper.css");const Br=require("cropperjs");var co;const Gt=(co=document.querySelector('meta[name="csrf-token"]'))==null?void 0:co.getAttribute("content");class $r{constructor(t){Rn(this,"config");this.config=t}get config(){return this.config}transformRequestParams(t){const o=this.config,s={};Gt!=null&&Gt!==""&&(s[o.xsrfHeaderName]=Gt);const r=Object.assign({},o.headers,s,t.headers),c=Object.assign({},o.params,t.params),a=t.body,i=o.baseUrl+t.url,l=t.method;let d;l!=="get"&&(a instanceof FormData?(d=a,o.body!=null&&Object.entries(this.config.body).forEach(([u,p])=>{d.append(u,p)})):(d={...a},o.body!=null&&Object.assign(d,this.config.body)));const f={url:i,method:l,headers:r,params:c,body:d};if(o.transformRequest!=null){const u=o.transformRequest({url:i,method:l,headers:r,params:c,body:d});u.url!=null&&(f.url=u.url),u.method!=null&&(f.method=u.method),u.params!=null&&(f.params=u.params??{}),u.headers!=null&&(f.headers=u.headers??{}),u.body!=null&&(f.body=u.body)}return f}getDownloadUrl(t,o){if(o.url!=null)return o.url;const s=this.transformRequestParams({url:"",method:"get",params:{q:"download",adapter:t,path:o.path}});return s.url+"?"+new URLSearchParams(s.params).toString()}getPreviewUrl(t,o){if(o.url!=null)return o.url;const s=this.transformRequestParams({url:"",method:"get",params:{q:"preview",adapter:t,path:o.path}});return s.url+"?"+new URLSearchParams(s.params).toString()}async send(t){const o=this.transformRequestParams(t),s=t.responseType||"json",r={method:t.method,headers:o.headers,signal:t.abortSignal},c=o.url+"?"+new URLSearchParams(o.params);if(o.method!=="get"&&o.body!=null){let i;o.body instanceof FormData?i=t.body:(i=JSON.stringify(o.body),r.headers["Content-Type"]="application/json"),r.body=i}const a=await fetch(c,r);if(a.ok)return await a[s]();throw await a.json()}}function Cr(n){const t={baseUrl:"",headers:{},params:{},body:{},xsrfHeaderName:"X-CSRF-Token"};return typeof n=="string"?Object.assign(t,{baseUrl:n}):Object.assign(t,n),new $r(t)}function Dr(n){let t=localStorage.getItem(n+"_storage");const o=e.reactive(JSON.parse(t??"{}"));e.watch(o,s);function s(){Object.keys(o).length?localStorage.setItem(n+"_storage",JSON.stringify(o)):localStorage.removeItem(n+"_storage")}function r(l,d){o[l]=d}function c(l){delete o[l]}function a(){Object.keys(o).map(l=>c(l))}return{getStore:(l,d=null)=>o.hasOwnProperty(l)?o[l]:d,setStore:r,removeStore:c,clearStore:a}}async function Tr(n,t){const o=t[n];return typeof o=="function"?(await o()).default:o}function Mr(n,t,o,s){const{getStore:r,setStore:c}=n,a=e.ref({}),i=e.ref(r("locale",t)),l=(u,p=t)=>{Tr(u,s).then(m=>{a.value=m,c("locale",u),i.value=u,c("translations",m),Object.values(s).length>1&&(o.emit("vf-toast-push",{label:"The language is set to "+u}),o.emit("vf-language-saved"))}).catch(m=>{p?(o.emit("vf-toast-push",{label:"The selected locale is not yet supported!",type:"error"}),l(p,null)):o.emit("vf-toast-push",{label:"Locale cannot be loaded!",type:"error"})})};!r("locale")&&!s.length?l(t):a.value=r("translations");const d=(u,...p)=>p.length?d(u=u.replace("%s",p.shift()),...p):u;function f(u,...p){return a.value&&a.value.hasOwnProperty(u)?d(a.value[u],...p):d(u,...p)}return e.reactive({t:f,changeLocale:l,locale:i})}const ne={EDIT:"edit",NEW_FILE:"newfile",NEW_FOLDER:"newfolder",PREVIEW:"preview",ARCHIVE:"archive",UNARCHIVE:"unarchive",SEARCH:"search",RENAME:"rename",UPLOAD:"upload",DELETE:"delete",FULL_SCREEN:"fullscreen",DOWNLOAD:"download",LANGUAGE:"language"},Ar=Object.values(ne),Lr="2.5.11";function io(n,t,o,s,r){return(t=Math,o=t.log,s=1024,r=o(n)/o(s)|0,n/t.pow(s,r)).toFixed(0)+" "+(r?"KMGTPEZY"[--r]+"iB":"B")}function uo(n,t,o,s,r){return(t=Math,o=t.log,s=1e3,r=o(n)/o(s)|0,n/t.pow(s,r)).toFixed(0)+" "+(r?"KMGTPEZY"[--r]+"B":"B")}function Or(n){const t={k:1,m:2,g:3,t:4},s=/(\d+(?:\.\d+)?)\s?(k|m|g|t)?b?/i.exec(n);return s[1]*Math.pow(1024,t[s[2].toLowerCase()])}const Re={SYSTEM:"system",LIGHT:"light",DARK:"dark"};function Fr(n,t){const o=e.ref(Re.SYSTEM),s=e.ref(Re.LIGHT);o.value=n.getStore("theme",t??Re.SYSTEM);const r=window.matchMedia("(prefers-color-scheme: dark)"),c=a=>{o.value===Re.DARK||o.value===Re.SYSTEM&&a.matches?s.value=Re.DARK:s.value=Re.LIGHT};return c(r),r.addEventListener("change",c),{value:o,actualValue:s,set(a){o.value=a,a!==Re.SYSTEM?n.setStore("theme",a):n.removeStore("theme"),c(r)}}}function Rr(){const n=e.shallowRef(null),t=e.ref(!1),o=e.ref();return{visible:t,type:n,data:o,open:(c,a=null)=>{document.querySelector("body").style.overflow="hidden",t.value=!0,n.value=c,o.value=a},close:()=>{document.querySelector("body").style.overflow="",t.value=!1,n.value=null}}}/*!
2
2
  * OverlayScrollbars
3
3
  * Version: 2.8.3
4
4
  *
@@ -6,4 +6,4 @@
6
6
  * https://github.com/KingSora
7
7
  *
8
8
  * Released under the MIT license.
9
- */const ge=(n,t)=>{const{o,i:s,u:r}=n;let c=o,a;const i=(f,u)=>{const p=c,m=f,h=u||(s?!s(p,m):p!==m);return(h||r)&&(c=m,a=p),[c,h,a]};return[t?f=>i(t(c,a),f):i,f=>[c,!!f,a]]},mo=typeof window<"u"&&typeof document<"u",pe=mo?window:{},fo=Math.max,Hr=Math.min,Zt=Math.round,Nt=Math.abs,Hn=Math.sign,po=pe.cancelAnimationFrame,yn=pe.requestAnimationFrame,St=pe.setTimeout,en=pe.clearTimeout,Mt=n=>typeof pe[n]<"u"?pe[n]:void 0,zr=Mt("MutationObserver"),zn=Mt("IntersectionObserver"),Bt=Mt("ResizeObserver"),tn=Mt("ScrollTimeline"),ho=mo&&Node.ELEMENT_NODE,{toString:Cf,hasOwnProperty:Kt}=Object.prototype,At=n=>n===void 0,_n=n=>n===null,Se=n=>typeof n=="number",Lt=n=>typeof n=="string",vo=n=>typeof n=="boolean",we=n=>typeof n=="function",Be=n=>Array.isArray(n),it=n=>typeof n=="object"&&!Be(n)&&!_n(n),Ot=n=>{const t=!!n&&n.length,o=Se(t)&&t>-1&&t%1==0;return Be(n)||!we(n)&&o?t>0&&it(n)?t-1 in n:!0:!1},$t=n=>{if(!n||!it(n))return!1;let t;const o="constructor",s=n[o],r=s&&s.prototype,c=Kt.call(n,o),a=r&&Kt.call(r,"isPrototypeOf");if(s&&!c&&!a)return!1;for(t in n);return At(t)||Kt.call(n,t)},Ct=n=>{const t=HTMLElement;return n?t?n instanceof t:n.nodeType===ho:!1},Ft=n=>{const t=Element;return n?t?n instanceof t:n.nodeType===ho:!1};function Q(n,t){if(Ot(n))for(let o=0;o<n.length&&t(n[o],o,n)!==!1;o++);else n&&Q(Object.keys(n),o=>t(n[o],o,n));return n}const xn=(n,t)=>n.indexOf(t)>=0,Ae=(n,t)=>n.concat(t),se=(n,t,o)=>(!Lt(t)&&Ot(t)?Array.prototype.push.apply(n,t):n.push(t),n),Pe=n=>Array.from(n||[]),go=n=>Be(n)?n:[n],nn=n=>!!n&&!n.length,In=n=>Pe(new Set(n)),be=(n,t,o)=>{Q(n,r=>r&&r.apply(void 0,t||[])),!o&&(n.length=0)},ko="paddingTop",yo="paddingRight",_o="paddingLeft",xo="paddingBottom",wo="marginLeft",bo="marginRight",Eo="marginBottom",Ir="overflowX",jr="overflowY",et="width",tt="height",ze="visible",Ge="hidden",nt="scroll",Ur=n=>{const t=String(n||"");return t?t[0].toUpperCase()+t.slice(1):""},Rt=(n,t,o,s)=>{if(n&&t){let r=!0;return Q(o,c=>{const a=n[c],i=t[c];a!==i&&(r=!1)}),r}return!1},Vo=(n,t)=>Rt(n,t,["w","h"]),bt=(n,t)=>Rt(n,t,["x","y"]),qr=(n,t)=>Rt(n,t,["t","r","b","l"]),Ie=()=>{},U=(n,...t)=>n.bind(0,...t),Ke=n=>{let t;const o=n?St:yn,s=n?en:po;return[r=>{s(t),t=o(()=>r(),we(n)?n():n)},()=>s(t)]},on=(n,t)=>{const{_:o,p:s,v:r,m:c}=t||{};let a,i,l,d,f=Ie;const u=function(v){f(),en(a),d=a=i=void 0,f=Ie,n.apply(this,v)},p=g=>c&&i?c(i,g):g,m=()=>{f!==Ie&&u(p(l)||l)},h=function(){const v=Pe(arguments),V=we(o)?o():o;if(Se(V)&&V>=0){const O=we(s)?s():s,D=Se(O)&&O>=0,N=V>0?St:yn,S=V>0?en:po,b=p(v)||v,$=u.bind(0,b);let E;f(),r&&!d?($(),d=!0,E=N(()=>d=void 0,V)):(E=N($,V),D&&!a&&(a=St(m,O))),f=()=>S(E),i=l=b}else u(v)};return h.S=m,h},No=(n,t)=>Object.prototype.hasOwnProperty.call(n,t),Le=n=>n?Object.keys(n):[],Y=(n,t,o,s,r,c,a)=>{const i=[t,o,s,r,c,a];return(typeof n!="object"||_n(n))&&!we(n)&&(n={}),Q(i,l=>{Q(l,(d,f)=>{const u=l[f];if(n===u)return!0;const p=Be(u);if(u&&$t(u)){const m=n[f];let h=m;p&&!Be(m)?h=[]:!p&&!$t(m)&&(h={}),n[f]=Y(h,u)}else n[f]=p?u.slice():u})}),n},So=(n,t)=>Q(Y({},n),(o,s,r)=>{o===void 0?delete r[s]:o&&$t(o)&&(r[s]=So(o))}),wn=n=>{for(const t in n)return!1;return!0},rn=(n,t,o)=>fo(n,Hr(t,o)),We=n=>Pe(new Set((Be(n)?n:(n||"").split(" ")).filter(t=>t))),bn=(n,t)=>n&&n.getAttribute(t),jn=(n,t)=>n&&n.hasAttribute(t),Me=(n,t,o)=>{Q(We(t),s=>{n&&n.setAttribute(s,String(o||""))})},Ve=(n,t)=>{Q(We(t),o=>n&&n.removeAttribute(o))},Ht=(n,t)=>{const o=We(bn(n,t)),s=U(Me,n,t),r=(c,a)=>{const i=new Set(o);return Q(We(c),l=>{i[a](l)}),Pe(i).join(" ")};return{O:c=>s(r(c,"delete")),$:c=>s(r(c,"add")),C:c=>{const a=We(c);return a.reduce((i,l)=>i&&o.includes(l),a.length>0)}}},Bo=(n,t,o)=>(Ht(n,t).O(o),U(En,n,t,o)),En=(n,t,o)=>(Ht(n,t).$(o),U(Bo,n,t,o)),sn=(n,t,o,s)=>(s?En:Bo)(n,t,o),Vn=(n,t,o)=>Ht(n,t).C(o),$o=n=>Ht(n,"class"),Co=(n,t)=>{$o(n).O(t)},Nn=(n,t)=>($o(n).$(t),U(Co,n,t)),Do=(n,t)=>{const o=[],s=t?Ft(t)&&t:document;return s?se(o,s.querySelectorAll(n)):o},Pr=(n,t)=>{const o=t?Ft(t)&&t:document;return o?o.querySelector(n):null},Dt=(n,t)=>Ft(n)?n.matches(t):!1,To=n=>Dt(n,"body"),ln=n=>n?Pe(n.childNodes):[],ot=n=>n&&n.parentElement,Qe=(n,t)=>Ft(n)&&n.closest(t),an=n=>document.activeElement,Gr=(n,t,o)=>{const s=Qe(n,t),r=n&&Pr(o,s),c=Qe(r,t)===s;return s&&r?s===n||r===n||c&&Qe(Qe(n,o),t)!==s:!1},Ue=n=>{if(Ot(n))Q(Pe(n),t=>Ue(t));else if(n){const t=ot(n);t&&t.removeChild(n)}},Mo=(n,t,o)=>{if(o&&n){let s=t,r;return Ot(o)?(r=document.createDocumentFragment(),Q(o,c=>{c===s&&(s=c.previousSibling),r.appendChild(c)})):r=o,t&&(s?s!==t&&(s=s.nextSibling):s=n.firstChild),n.insertBefore(r,s||null),()=>Ue(o)}return Ie},ke=(n,t)=>Mo(n,null,t),Un=(n,t)=>Mo(ot(n),n&&n.nextSibling,t),Ze=n=>{const t=document.createElement("div");return Me(t,"class",n),t},Ao=n=>{const t=Ze();return t.innerHTML=n.trim(),Q(ln(t),o=>Ue(o))},Kr=/^--/,qn=(n,t)=>n.getPropertyValue(t)||n[t]||"",Sn=n=>{const t=n||0;return isFinite(t)?t:0},_t=n=>Sn(parseFloat(n||"")),Pn=n=>`${(Sn(n)*100).toFixed(3)}%`,cn=n=>`${Sn(n)}px`;function dt(n,t){n&&t&&Q(t,(o,s)=>{try{const r=n.style,c=Se(o)?cn(o):(o||"")+"";Kr.test(s)?r.setProperty(s,c):r[s]=c}catch{}})}function Ye(n,t,o){const s=Lt(t);let r=s?"":{};if(n){const c=pe.getComputedStyle(n,o)||n.style;r=s?qn(c,t):Pe(t).reduce((a,i)=>(a[i]=qn(c,i),a),r)}return r}const Gn=(n,t,o)=>{const s=t?`${t}-`:"",r=o?`-${o}`:"",c=`${s}top${r}`,a=`${s}right${r}`,i=`${s}bottom${r}`,l=`${s}left${r}`,d=Ye(n,[c,a,i,l]);return{t:_t(d[c]),r:_t(d[a]),b:_t(d[i]),l:_t(d[l])}},Wt=(n,t)=>`translate${it(n)?`(${n.x},${n.y})`:`${t?"X":"Y"}(${n})`}`,Wr=n=>!!(n.offsetWidth||n.offsetHeight||n.getClientRects().length),Yr={w:0,h:0},zt=(n,t)=>t?{w:t[`${n}Width`],h:t[`${n}Height`]}:Yr,Xr=n=>zt("inner",n||pe),at=U(zt,"offset"),Lo=U(zt,"client"),dn=U(zt,"scroll"),Bn=n=>{const t=parseFloat(Ye(n,et))||0,o=parseFloat(Ye(n,tt))||0;return{w:t-Zt(t),h:o-Zt(o)}},ct=n=>n.getBoundingClientRect(),Jr=n=>!!n&&Wr(n),un=n=>!!(n&&(n[tt]||n[et])),Oo=(n,t)=>{const o=un(n);return!un(t)&&o},Kn=(n,t,o,s)=>{Q(We(t),r=>{n&&n.removeEventListener(r,o,s)})},te=(n,t,o,s)=>{var r;const c=(r=s&&s.H)!=null?r:!0,a=s&&s.I||!1,i=s&&s.A||!1,l={passive:c,capture:a};return U(be,We(t).map(d=>{const f=i?u=>{Kn(n,d,f,a),o&&o(u)}:o;return n&&n.addEventListener(d,f,l),U(Kn,n,d,f,a)}))},Fo=n=>n.stopPropagation(),mn=n=>n.preventDefault(),Ro=n=>Fo(n)||mn(n),Ne=(n,t)=>{const{x:o,y:s}=Se(t)?{x:t,y:t}:t||{};Se(o)&&(n.scrollLeft=o),Se(s)&&(n.scrollTop=s)},ye=n=>({x:n.scrollLeft,y:n.scrollTop}),Ho=()=>({T:{x:0,y:0},D:{x:0,y:0}}),Qr=(n,t)=>{const{T:o,D:s}=n,{w:r,h:c}=t,a=(u,p,m)=>{let h=Hn(u)*m,g=Hn(p)*m;if(h===g){const v=Nt(u),V=Nt(p);g=v>V?0:g,h=v<V?0:h}return h=h===g?0:h,[h+0,g+0]},[i,l]=a(o.x,s.x,r),[d,f]=a(o.y,s.y,c);return{T:{x:i,y:d},D:{x:l,y:f}}},Wn=({T:n,D:t})=>{const o=(s,r)=>s===0&&s<=r;return{x:o(n.x,t.x),y:o(n.y,t.y)}},Yn=({T:n,D:t},o)=>{const s=(r,c,a)=>rn(0,1,(r-a)/(r-c)||0);return{x:s(n.x,t.x,o.x),y:s(n.y,t.y,o.y)}},fn=n=>{n&&n.focus&&n.focus({preventScroll:!0})},Xn=(n,t)=>{Q(go(t),n)},pn=n=>{const t=new Map,o=(c,a)=>{if(c){const i=t.get(c);Xn(l=>{i&&i[l?"delete":"clear"](l)},a)}else t.forEach(i=>{i.clear()}),t.clear()},s=(c,a)=>{if(Lt(c)){const d=t.get(c)||new Set;return t.set(c,d),Xn(f=>{we(f)&&d.add(f)},a),U(o,c,a)}vo(a)&&a&&o();const i=Le(c),l=[];return Q(i,d=>{const f=c[d];f&&se(l,s(d,f))}),U(be,l)},r=(c,a)=>{Q(Pe(t.get(c)),i=>{a&&!nn(a)?i.apply(0,a):i()})};return s(n||{}),[s,o,r]},Jn=n=>JSON.stringify(n,(t,o)=>{if(we(o))throw 0;return o}),Qn=(n,t)=>n?`${t}`.split(".").reduce((o,s)=>o&&No(o,s)?o[s]:void 0,n):void 0,Zr={paddingAbsolute:!1,showNativeOverlaidScrollbars:!1,update:{elementEvents:[["img","load"]],debounce:[0,33],attributes:null,ignoreMutation:null},overflow:{x:"scroll",y:"scroll"},scrollbars:{theme:"os-theme-dark",visibility:"auto",autoHide:"never",autoHideDelay:1300,autoHideSuspend:!1,dragScroll:!0,clickScroll:!1,pointers:["mouse","touch","pen"]}},zo=(n,t)=>{const o={},s=Ae(Le(t),Le(n));return Q(s,r=>{const c=n[r],a=t[r];if(it(c)&&it(a))Y(o[r]={},zo(c,a)),wn(o[r])&&delete o[r];else if(No(t,r)&&a!==c){let i=!0;if(Be(c)||Be(a))try{Jn(c)===Jn(a)&&(i=!1)}catch{}i&&(o[r]=a)}}),o},Zn=(n,t,o)=>s=>[Qn(n,s),o||Qn(t,s)!==void 0],rt="data-overlayscrollbars",Et="os-environment",xt=`${Et}-scrollbar-hidden`,Yt=`${rt}-initialize`,Vt="noClipping",eo=`${rt}-body`,je=rt,es="host",He=`${rt}-viewport`,ts=Ir,ns=jr,os="arrange",Io="measuring",jo="scrollbarHidden",rs="scrollbarPressed",ss="noContent",hn=`${rt}-padding`,to=`${rt}-content`,$n="os-size-observer",ls=`${$n}-appear`,as=`${$n}-listener`,cs="os-trinsic-observer",is="os-theme-none",_e="os-scrollbar",ds=`${_e}-rtl`,us=`${_e}-horizontal`,ms=`${_e}-vertical`,Uo=`${_e}-track`,Cn=`${_e}-handle`,fs=`${_e}-visible`,ps=`${_e}-cornerless`,no=`${_e}-interaction`,oo=`${_e}-unusable`,vn=`${_e}-auto-hide`,ro=`${vn}-hidden`,so=`${_e}-wheel`,hs=`${Uo}-interactive`,vs=`${Cn}-interactive`;let Xt;const gs=()=>{const n=(y,O,D)=>{ke(document.body,y),ke(document.body,y);const N=Lo(y),S=at(y),B=Bn(O);return D&&Ue(y),{x:S.h-N.h+B.h,y:S.w-N.w+B.w}},t=y=>{let O=!1;const D=Nn(y,xt);try{O=Ye(y,"scrollbar-width")==="none"||Ye(y,"display","::-webkit-scrollbar")==="none"}catch{}return D(),O},o=`.${Et}{scroll-behavior:auto!important;position:fixed;opacity:0;visibility:hidden;overflow:scroll;height:200px;width:200px;z-index:-1}.${Et} div{width:200%;height:200%;margin:10px 0}.${xt}{scrollbar-width:none!important}.${xt}::-webkit-scrollbar,.${xt}::-webkit-scrollbar-corner{appearance:none!important;display:none!important;width:0!important;height:0!important}`,r=Ao(`<div class="${Et}"><div></div><style>${o}</style></div>`)[0],c=r.firstChild,[a,,i]=pn(),[l,d]=ge({o:n(r,c),i:bt},U(n,r,c,!0)),[f]=d(),u=t(r),p={x:f.x===0,y:f.y===0},m={elements:{host:null,padding:!u,viewport:y=>u&&To(y)&&y,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},h=Y({},Zr),g=U(Y,{},h),v=U(Y,{},m),V={k:f,M:p,R:u,V:!!tn,L:U(a,"r"),P:v,U:y=>Y(m,y)&&v(),N:g,q:y=>Y(h,y)&&g(),B:Y({},m),F:Y({},h)};if(Ve(r,"style"),Ue(r),te(pe,"resize",()=>{i("r",[])}),we(pe.matchMedia)&&!u&&(!p.x||!p.y)){const y=O=>{const D=pe.matchMedia(`(resolution: ${pe.devicePixelRatio}dppx)`);te(D,"change",()=>{O(),y(O)},{A:!0})};y(()=>{const[O,D]=l();Y(V.k,O),i("r",[D])})}return V},$e=()=>(Xt||(Xt=gs()),Xt),qo=(n,t)=>we(t)?t.apply(0,n):t,ks=(n,t,o,s)=>{const r=At(s)?o:s;return qo(n,r)||t.apply(0,n)},Po=(n,t,o,s)=>{const r=At(s)?o:s,c=qo(n,r);return!!c&&(Ct(c)?c:t.apply(0,n))},ys=(n,t)=>{const{nativeScrollbarsOverlaid:o,body:s}=t||{},{M:r,R:c,P:a}=$e(),{nativeScrollbarsOverlaid:i,body:l}=a().cancel,d=o??i,f=At(s)?l:s,u=(r.x||r.y)&&d,p=n&&(_n(f)?!c:f);return!!u||!!p},Dn=new WeakMap,_s=(n,t)=>{Dn.set(n,t)},xs=n=>{Dn.delete(n)},Go=n=>Dn.get(n),ws=(n,t,o)=>{let s=!1;const r=o?new WeakMap:!1,c=()=>{s=!0},a=i=>{if(r&&o){const l=o.map(d=>{const[f,u]=d||[];return[u&&f?(i||Do)(f,n):[],u]});Q(l,d=>Q(d[0],f=>{const u=d[1],p=r.get(f)||[];if(n.contains(f)&&u){const h=te(f,u,g=>{s?(h(),r.delete(f)):t(g)});r.set(f,se(p,h))}else be(p),r.delete(f)}))}};return a(),[c,a]},lo=(n,t,o,s)=>{let r=!1;const{j:c,X:a,Y:i,W:l,J:d,K:f}=s||{},u=on(()=>r&&o(!0),{_:33,p:99}),[p,m]=ws(n,u,i),h=c||[],g=a||[],v=Ae(h,g),V=(O,D)=>{if(!nn(D)){const N=d||Ie,S=f||Ie,B=[],b=[];let $=!1,E=!1;if(Q(D,x=>{const{attributeName:C,target:_,type:k,oldValue:A,addedNodes:T,removedNodes:K}=x,Z=k==="attributes",X=k==="childList",M=n===_,P=Z&&C,G=P&&bn(_,C||""),j=Lt(G)?G:null,ee=P&&A!==j,F=xn(g,C)&&ee;if(t&&(X||!M)){const H=Z&&ee,R=H&&l&&Dt(_,l),L=(R?!N(_,C,A,j):!Z||H)&&!S(x,!!R,n,s);Q(T,z=>se(B,z)),Q(K,z=>se(B,z)),E=E||L}!t&&M&&ee&&!N(_,C,A,j)&&(se(b,C),$=$||F)}),m(x=>In(B).reduce((C,_)=>(se(C,Do(x,_)),Dt(_,x)?se(C,_):C),[])),t)return!O&&E&&o(!1),[!1];if(!nn(b)||$){const x=[In(b),$];return!O&&o.apply(0,x),x}}},y=new zr(U(V,!1));return[()=>(y.observe(n,{attributes:!0,attributeOldValue:!0,attributeFilter:v,subtree:t,childList:t,characterData:t}),r=!0,()=>{r&&(p(),y.disconnect(),r=!1)}),()=>{if(r)return u.S(),V(!0,y.takeRecords())}]},Ko={},Wo={},bs=n=>{Q(n,t=>Q(t,(o,s)=>{Ko[s]=t[s]}))},Yo=(n,t,o)=>Le(n).map(s=>{const{static:r,instance:c}=n[s],[a,i,l]=o||[],d=o?c:r;if(d){const f=o?d(a,i,t):d(t);return(l||Wo)[s]=f}}),ut=n=>Wo[n],Es="__osOptionsValidationPlugin",Vs="__osSizeObserverPlugin",Ns=(n,t)=>{const{M:o}=t,[s,r]=n("showNativeOverlaidScrollbars");return[s&&o.x&&o.y,r]},Tt=n=>n.indexOf(ze)===0,Ss=(n,t)=>{const o=(r,c,a,i)=>{const l=r===ze?Ge:r.replace(`${ze}-`,""),d=Tt(r),f=Tt(a);return!c&&!i?Ge:d&&f?ze:d?c&&i?l:c?ze:Ge:c?l:f&&i?ze:Ge},s={x:o(t.x,n.x,t.y,n.y),y:o(t.y,n.y,t.x,n.x)};return{G:s,Z:{x:s.x===nt,y:s.y===nt}}},Xo="__osScrollbarsHidingPlugin",Bs="__osClickScrollPlugin",Jo=(n,t,o)=>{const{dt:s}=o||{},r=ut(Vs),[c]=ge({o:!1,u:!0});return()=>{const a=[],l=Ao(`<div class="${$n}"><div class="${as}"></div></div>`)[0],d=l.firstChild,f=u=>{const p=u instanceof ResizeObserverEntry;let m=!1,h=!1;if(p){const[g,,v]=c(u.contentRect),V=un(g);h=Oo(g,v),m=!h&&!V}else h=u===!0;m||t({ft:!0,dt:h})};if(Bt){const u=new Bt(p=>f(p.pop()));u.observe(d),se(a,()=>{u.disconnect()})}else if(r){const[u,p]=r(d,f,s);se(a,Ae([Nn(l,ls),te(l,"animationstart",u)],p))}else return Ie;return U(be,se(a,ke(n,l)))}},$s=(n,t)=>{let o;const s=l=>l.h===0||l.isIntersecting||l.intersectionRatio>0,r=Ze(cs),[c]=ge({o:!1}),a=(l,d)=>{if(l){const f=c(s(l)),[,u]=f;return u&&!d&&t(f)&&[f]}},i=(l,d)=>a(d.pop(),l);return[()=>{const l=[];if(zn)o=new zn(U(i,!1),{root:n}),o.observe(r),se(l,()=>{o.disconnect()});else{const d=()=>{const f=at(r);a(f)};se(l,Jo(r,d)()),d()}return U(be,se(l,ke(n,r)))},()=>o&&i(!0,o.takeRecords())]},Cs=(n,t,o,s)=>{let r,c,a,i,l,d;const f=`[${je}]`,u=`[${He}]`,p=[],m=["wrap","cols","rows"],h=["id","class","style","open"],{vt:g,ht:v,ot:V,gt:y,bt:O,wt:D,nt:N,yt:S,St:B,Ot:b}=n,$=w=>Ye(w,"direction")==="rtl",E={$t:!1,ct:$(g)},x=$e(),C=ut(Xo),[_]=ge({i:Vo,o:{w:0,h:0}},()=>{const w=C&&C.tt(n,t,E,x,o).ut,z=!(S&&N)&&Vn(v,je,Vt),I=!N&&B(os),q=I&&ye(y),J=b(Io,z),ae=I&&w&&w()[0],de=dn(V),W=Bn(V);return ae&&ae(),Ne(y,q),z&&J(),{w:de.w+W.w,h:de.h+W.h}}),k=D?m:Ae(h,m),A=on(s,{_:()=>r,p:()=>c,m(w,L){const[z]=w,[I]=L;return[Ae(Le(z),Le(I)).reduce((q,J)=>(q[J]=z[J]||I[J],q),{})]}}),T=w=>{const L=$(g);Y(w,{Ct:d!==L}),Y(E,{ct:L}),d=L},K=(w,L)=>{const[z,I]=w,q={xt:I};return Y(E,{$t:z}),!L&&s(q),q},Z=({ft:w,dt:L})=>{const I=!(w&&!L)&&x.R?A:s,q={ft:w||L,dt:L};T(q),I(q)},X=(w,L)=>{const[,z]=_(),I={Ht:z};return T(I),z&&!L&&(w?s:A)(I),I},M=(w,L,z)=>{const I={Et:L};return T(I),L&&!z&&A(I),I},[P,G]=O?$s(v,K):[],j=!N&&Jo(v,Z,{dt:!0}),[ee,F]=lo(v,!1,M,{X:h,j:Ae(h,p)}),H=N&&Bt&&new Bt(w=>{const L=w[w.length-1].contentRect;Z({ft:!0,dt:Oo(L,l)}),l=L}),R=on(()=>{const[,w]=_();s({Ht:w})},{_:222,v:!0});return[()=>{H&&H.observe(v);const w=j&&j(),L=P&&P(),z=ee(),I=x.L(q=>{q?A({zt:q}):R()});return()=>{H&&H.disconnect(),w&&w(),L&&L(),i&&i(),z(),I()}},({It:w,At:L,Tt:z})=>{const I={},[q]=w("update.ignoreMutation"),[J,ae]=w("update.attributes"),[de,W]=w("update.elementEvents"),[ce,ue]=w("update.debounce"),xe=W||ae,ie=L||z,he=le=>we(q)&&q(le);if(xe){a&&a(),i&&i();const[le,oe]=lo(O||V,!0,X,{j:Ae(k,J||[]),Y:de,W:f,K:(me,re)=>{const{target:fe,attributeName:ve}=me;return(!re&&ve&&!N?Gr(fe,f,u):!1)||!!Qe(fe,`.${_e}`)||!!he(me)}});i=le(),a=oe}if(ue)if(A.S(),Be(ce)){const le=ce[0],oe=ce[1];r=Se(le)&&le,c=Se(oe)&&oe}else Se(ce)?(r=ce,c=!1):(r=!1,c=!1);if(ie){const le=F(),oe=G&&G(),me=a&&a();le&&Y(I,M(le[0],le[1],ie)),oe&&Y(I,K(oe[0],ie)),me&&Y(I,X(me[0],ie))}return T(I),I},E]},Ds=(n,t,o,s)=>{const{P:r}=$e(),{scrollbars:c}=r(),{slot:a}=c,{vt:i,ht:l,ot:d,Dt:f,gt:u,yt:p,nt:m}=t,{scrollbars:h}=f?{}:n,{slot:g}=h||{},v=new Map,V=F=>tn&&new tn({source:u,axis:F}),y={x:V("x"),y:V("y")},O=Po([i,l,d],()=>m&&p?i:l,a,g),D=(F,H)=>{if(H){const q=F?et:tt,{kt:J,Mt:ae}=H,de=ct(ae)[q],W=ct(J)[q];return rn(0,1,de/W||0)}const R=F?"x":"y",{Rt:w,Vt:L}=o,z=L[R],I=w[R];return rn(0,1,z/(z+I)||0)},N=(F,H,R)=>{const w=D(R,F);return 1/w*(1-w)*H},S=F=>Y(F,{clear:["left"]}),B=F=>{v.forEach((H,R)=>{(F?xn(go(F),R):!0)&&(Q(H||[],L=>{L&&L.cancel()}),v.delete(R))})},b=(F,H,R,w)=>{const L=v.get(F)||[],z=L.find(I=>I&&I.timeline===H);z?z.effect=new KeyframeEffect(F,R,{composite:w}):v.set(F,Ae(L,[F.animate(R,{timeline:H,composite:w})]))},$=(F,H,R)=>{const w=R?Nn:Co;Q(F,L=>{w(L.Lt,H)})},E=(F,H)=>{Q(F,R=>{const[w,L]=H(R);dt(w,L)})},x=(F,H)=>{E(F,R=>{const{Mt:w}=R;return[w,{[H?et:tt]:Pn(D(H))}]})},C=(F,H)=>{const{Pt:R}=o,w=H?"x":"y",L=y[w],z=Wn(R)[w],I=(q,J)=>Wt(Pn(N(q,z?J:1-J,H)),H);L?Q(F,q=>{const{Mt:J}=q;b(J,L,S({transform:[0,1].map(ae=>I(q,ae))}))}):E(F,q=>[q.Mt,{transform:I(q,Yn(R,ye(u))[w])}])},_=F=>m&&!p&&ot(F)===d,k=[],A=[],T=[],K=(F,H,R)=>{const w=vo(R),L=w?R:!0,z=w?!R:!0;L&&$(A,F,H),z&&$(T,F,H)},Z=()=>{x(A,!0),x(T)},X=()=>{C(A,!0),C(T)},M=()=>{if(m){const{Rt:F,Pt:H}=o,R=Wn(H),w=.5;if(y.x&&y.y)Q(Ae(T,A),({Lt:L})=>{if(_(L)){const z=I=>b(L,y[I],S({transform:[0,R[I]?1:-1].map(q=>Wt(cn(q*(F[I]-w)),I==="x"))}),"add");z("x"),z("y")}else B(L)});else{const L=Yn(H,ye(u)),z=I=>{const{Lt:q}=I,J=_(q)&&q,ae=(de,W,ce)=>{const ue=W*de;return cn(ce?ue:-ue)};return[J,J&&{transform:Wt({x:ae(L.x,F.x,R.x),y:ae(L.y,F.y,R.y)})}]};E(A,z),E(T,z)}}},P=F=>{const R=Ze(`${_e} ${F?us:ms}`),w=Ze(Uo),L=Ze(Cn),z={Lt:R,kt:w,Mt:L};return se(F?A:T,z),se(k,[ke(R,w),ke(w,L),U(Ue,R),B,s(z,K,C,F)]),z},G=U(P,!0),j=U(P,!1),ee=()=>(ke(O,A[0].Lt),ke(O,T[0].Lt),U(be,k));return G(),j(),[{Ut:Z,Nt:X,qt:M,Bt:K,Ft:{V:y.x,jt:A,Xt:G,Yt:U(E,A)},Wt:{V:y.y,jt:T,Xt:j,Yt:U(E,T)}},ee]},Ts=(n,t,o,s)=>(r,c,a,i)=>{const{ht:l,ot:d,nt:f,gt:u,Jt:p,Ot:m}=t,{Lt:h,kt:g,Mt:v}=r,[V,y]=Ke(333),[O,D]=Ke(444),[N,S]=Ke(),B=U(a,[r],i),b=_=>{we(u.scrollBy)&&u.scrollBy({behavior:"smooth",left:_.x,top:_.y})},$=i?et:tt,E=()=>{const _="pointerup pointercancel lostpointercapture",k=`client${i?"X":"Y"}`,A=i?"left":"top",T=i?"w":"h",K=i?"x":"y",Z=(X,M)=>P=>{const{Rt:G}=o,j=at(g)[T]-at(v)[T],F=M*P/j*G[K];Ne(u,{[K]:X+F})};return te(g,"pointerdown",X=>{const M=Qe(X.target,`.${Cn}`)===v,P=M?v:g,G=n.scrollbars,{button:j,isPrimary:ee,pointerType:F}=X,{pointers:H}=G;if(j===0&&ee&&G[M?"dragScroll":"clickScroll"]&&(H||[]).includes(F)){D();const w=!M&&X.shiftKey,L=U(ct,v),z=U(ct,g),I=(re,fe)=>(re||L())[A]-(fe||z())[A],q=Zt(ct(u)[$])/at(u)[T]||1,J=Z(ye(u)[K],1/q),ae=X[k],de=L(),W=z(),ce=de[$],ue=I(de,W)+ce/2,xe=ae-W[A],ie=M?0:xe-ue,he=re=>{be(me),P.releasePointerCapture(re.pointerId)},le=()=>m(rs,!0),oe=le(),me=[()=>{const re=ye(u);oe();const fe=ye(u),ve={x:fe.x-re.x,y:fe.y-re.y};(Nt(ve.x)>3||Nt(ve.y)>3)&&(le(),Ne(u,re),b(ve),O(oe))},te(p,_,he),te(p,"selectstart",re=>mn(re),{H:!1}),te(g,_,he),te(g,"pointermove",re=>{const fe=re[k]-ae;(M||w)&&J(ie+fe)})];if(P.setPointerCapture(X.pointerId),w)J(ie);else if(!M){const re=ut(Bs);re&&se(me,re(J,I,ie,ce,xe))}}})};let x=!0;const C=_=>_.propertyName.indexOf($)>-1;return U(be,[te(v,"pointermove pointerleave",s),te(h,"pointerenter",()=>{c(no,!0)}),te(h,"pointerleave pointercancel",()=>{c(no,!1)}),!f&&te(h,"mousedown",()=>{const _=an();(jn(_,He)||jn(_,je)||_===document.body)&&St(U(fn,d),25)}),te(h,"wheel",_=>{const{deltaX:k,deltaY:A,deltaMode:T}=_;x&&T===0&&ot(h)===l&&b({x:k,y:A}),x=!1,c(so,!0),V(()=>{x=!0,c(so)}),mn(_)},{H:!1,I:!0}),te(v,"transitionstart",_=>{if(C(_)){const k=()=>{B(),N(k)};k()}}),te(v,"transitionend transitioncancel",_=>{C(_)&&(S(),B())}),te(h,"pointerdown",U(te,p,"click",Ro,{A:!0,I:!0,H:!1}),{I:!0}),E(),y,D,S])},Ms=(n,t,o,s,r,c)=>{let a,i,l,d,f,u=Ie,p=0;const m=M=>M.pointerType==="mouse",[h,g]=Ke(),[v,V]=Ke(100),[y,O]=Ke(100),[D,N]=Ke(()=>p),[S,B]=Ds(n,r,s,Ts(t,r,s,M=>m(M)&&T())),{ht:b,Kt:$,yt:E}=r,{Bt:x,Ut:C,Nt:_,qt:k}=S,A=(M,P)=>{if(N(),M)x(ro);else{const G=U(x,ro,!0);p>0&&!P?D(G):G()}},T=()=>{(l?!a:!d)&&(A(!0),v(()=>{A(!1)}))},K=M=>{x(vn,M,!0),x(vn,M,!1)},Z=M=>{m(M)&&(a=l,l&&A(!0))},X=[N,V,O,g,()=>u(),te(b,"pointerover",Z,{A:!0}),te(b,"pointerenter",Z),te(b,"pointerleave",M=>{m(M)&&(a=!1,l&&A(!1))}),te(b,"pointermove",M=>{m(M)&&i&&T()}),te($,"scroll",M=>{h(()=>{_(),T()}),c(M),k()})];return[()=>U(be,se(X,B())),({It:M,Tt:P,Gt:G,Qt:j})=>{const{Zt:ee,tn:F,nn:H,sn:R}=j||{},{Ct:w,dt:L}=G||{},{ct:z}=o,{M:I}=$e(),{G:q,en:J}=s,[ae,de]=M("showNativeOverlaidScrollbars"),[W,ce]=M("scrollbars.theme"),[ue,xe]=M("scrollbars.visibility"),[ie,he]=M("scrollbars.autoHide"),[le,oe]=M("scrollbars.autoHideSuspend"),[me]=M("scrollbars.autoHideDelay"),[re,fe]=M("scrollbars.dragScroll"),[ve,Xe]=M("scrollbars.clickScroll"),[mt,jt]=M("overflow"),Ut=L&&!P,qt=J.x||J.y,Ee=ee||F||R||w||P,Pt=H||xe||jt,ft=ae&&I.x&&I.y,pt=(Fe,st,lt)=>{const ht=Fe.includes(nt)&&(ue===ze||ue==="auto"&&st===nt);return x(fs,ht,lt),ht};if(p=me,Ut&&(le&&qt?(K(!1),u(),y(()=>{u=te($,"scroll",U(K,!0),{A:!0})})):K(!0)),de&&x(is,ft),ce&&(x(f),x(W,!0),f=W),oe&&!le&&K(!0),he&&(i=ie==="move",l=ie==="leave",d=ie==="never",A(d,!0)),fe&&x(vs,re),Xe&&x(hs,ve),Pt){const Fe=pt(mt.x,q.x,!0),st=pt(mt.y,q.y,!1);x(ps,!(Fe&&st))}Ee&&(C(),_(),k(),x(oo,!J.x,!0),x(oo,!J.y,!1),x(ds,z&&!E))},{},S]},As=n=>{const t=$e(),{P:o,R:s}=t,{elements:r}=o(),{host:c,padding:a,viewport:i,content:l}=r,d=Ct(n),f=d?{}:n,{elements:u}=f,{host:p,padding:m,viewport:h,content:g}=u||{},v=d?n:f.target,V=To(v),y=Dt(v,"textarea"),O=v.ownerDocument,D=O.documentElement,N=()=>O.defaultView||pe,S=U(ks,[v]),B=U(Po,[v]),b=U(Ze,""),$=U(S,b,i),E=U(B,b,l),x=$(h),C=x===v,_=C&&V,k=!C&&E(g),A=!C&&x===k,T=_?D:x,K=y?S(b,c,p):v,Z=_?T:K,X=!C&&B(b,a,m),M=!A&&k,P=[M,T,X,Z].map(W=>Ct(W)&&!ot(W)&&W),G=W=>W&&xn(P,W),j=G(T)?v:T,ee={vt:v,ht:Z,ot:T,cn:X,bt:M,gt:_?D:T,Kt:_?O:T,rn:V?D:j,Jt:O,wt:y,yt:V,Dt:d,nt:C,ln:N,St:W=>Vn(T,He,W),Ot:(W,ce)=>sn(T,He,W,ce)},{vt:F,ht:H,cn:R,ot:w,bt:L}=ee,z=[()=>{Ve(H,[je,Yt]),Ve(F,Yt),V&&Ve(D,[Yt,je])}],I=y&&G(H);let q=y?F:ln([L,w,R,H,F].find(W=>W&&!G(W)));const J=_?F:L||w,ae=U(be,z);return[ee,()=>{const W=N(),ce=an(),ue=oe=>{ke(ot(oe),ln(oe)),Ue(oe)},xe=oe=>te(oe,"focusin focusout focus blur",Ro,{I:!0,H:!1}),ie="tabindex",he=bn(w,ie),le=xe(ce);return Me(H,je,C?"":es),Me(R,hn,""),Me(w,He,""),Me(L,to,""),C||(Me(w,ie,he||"-1"),V&&Me(D,eo,"")),I&&(Un(F,H),se(z,()=>{Un(H,F),Ue(H)})),ke(J,q),ke(H,R),ke(R||H,!C&&w),ke(w,L),se(z,[le,()=>{const oe=an(),me=G(w),re=me&&oe===w?F:oe,fe=xe(re);Ve(R,hn),Ve(L,to),Ve(w,He),V&&Ve(D,eo),he?Me(w,ie,he):Ve(w,ie),G(L)&&ue(L),me&&ue(w),G(R)&&ue(R),fn(re),fe()}]),s&&!C&&(En(w,He,jo),se(z,U(Ve,w,He))),fn(!C&&V&&ce===F&&W.top===W?w:ce),le(),q=0,ae},ae]},Ls=({bt:n})=>({Gt:t,an:o,Tt:s})=>{const{xt:r}=t||{},{$t:c}=o;n&&(r||s)&&dt(n,{[tt]:c&&"100%"})},Os=({ht:n,cn:t,ot:o,nt:s},r)=>{const[c,a]=ge({i:qr,o:Gn()},U(Gn,n,"padding",""));return({It:i,Gt:l,an:d,Tt:f})=>{let[u,p]=a(f);const{R:m}=$e(),{ft:h,Ht:g,Ct:v}=l||{},{ct:V}=d,[y,O]=i("paddingAbsolute");(h||p||(f||g))&&([u,p]=c(f));const N=!s&&(O||v||p);if(N){const S=!y||!t&&!m,B=u.r+u.l,b=u.t+u.b,$={[bo]:S&&!V?-B:0,[Eo]:S?-b:0,[wo]:S&&V?-B:0,top:S?-u.t:0,right:S?V?-u.r:"auto":0,left:S?V?"auto":-u.l:0,[et]:S&&`calc(100% + ${B}px)`},E={[ko]:S?u.t:0,[yo]:S?u.r:0,[xo]:S?u.b:0,[_o]:S?u.l:0};dt(t||o,$),dt(o,E),Y(r,{cn:u,un:!S,rt:t?E:Y({},$,E)})}return{_n:N}}},Fs=(n,t)=>{const o=$e(),{ht:s,cn:r,ot:c,nt:a,Kt:i,gt:l,yt:d,Ot:f,ln:u}=n,{R:p}=o,m=d&&a,h=U(fo,0),g=["display","direction","flexDirection","writingMode"],v={i:Vo,o:{w:0,h:0}},V={i:bt,o:{}},y=M=>{f(Io,!m&&M)},O=(M,P)=>{const G=pe.devicePixelRatio%1!==0?1:0,j={w:h(M.w-P.w),h:h(M.h-P.h)};return{w:j.w>G?j.w:0,h:j.h>G?j.h:0}},[D,N]=ge(v,U(Bn,c)),[S,B]=ge(v,U(dn,c)),[b,$]=ge(v),[E]=ge(V),[x,C]=ge(v),[_]=ge(V),[k]=ge({i:(M,P)=>Rt(M,P,g),o:{}},()=>Jr(c)?Ye(c,g):{}),[A,T]=ge({i:(M,P)=>bt(M.T,P.T)&&bt(M.D,P.D),o:Ho()},()=>{y(!0);const M=ye(l),P=f(ss,!0),G=te(i,nt,R=>{const w=ye(l);R.isTrusted&&w.x===M.x&&w.y===M.y&&Fo(R)},{I:!0,A:!0});Ne(l,{x:0,y:0}),P();const j=ye(l),ee=dn(l);Ne(l,{x:ee.w,y:ee.h});const F=ye(l);Ne(l,{x:F.x-j.x<1&&-ee.w,y:F.y-j.y<1&&-ee.h});const H=ye(l);return Ne(l,M),yn(()=>G()),{T:j,D:H}}),K=ut(Xo),Z=(M,P)=>`${P?ts:ns}${Ur(M)}`,X=M=>{const P=j=>[ze,Ge,nt].map(ee=>Z(ee,j)),G=P(!0).concat(P()).join(" ");f(G),f(Le(M).map(j=>Z(M[j],j==="x")).join(" "),!0)};return({It:M,Gt:P,an:G,Tt:j},{_n:ee})=>{const{ft:F,Ht:H,Ct:R,dt:w,zt:L}=P||{},z=K&&K.tt(n,t,G,o,M),{it:I,ut:q,_t:J}=z||{},[ae,de]=Ns(M,o),[W,ce]=M("overflow"),ue=Tt(W.x),xe=Tt(W.y),ie=F||ee||H||R||L||de;let he=N(j),le=B(j),oe=$(j),me=C(j);if(de&&p&&f(jo,!ae),ie){Vn(s,je,Vt)&&y(!0);const[On]=q?q():[],[vt]=he=D(j),[gt]=le=S(j),kt=Lo(c),yt=m&&Xr(u()),_r={w:h(gt.w+vt.w),h:h(gt.h+vt.h)},Fn={w:h((yt?yt.w:kt.w+h(kt.w-gt.w))+vt.w),h:h((yt?yt.h:kt.h+h(kt.h-gt.h))+vt.h)};On&&On(),me=x(Fn),oe=b(O(_r,Fn),j)}const[re,fe]=me,[ve,Xe]=oe,[mt,jt]=le,[Ut,qt]=he,[Ee,Pt]=E({x:ve.w>0,y:ve.h>0}),ft=ue&&xe&&(Ee.x||Ee.y)||ue&&Ee.x&&!Ee.y||xe&&Ee.y&&!Ee.x,pt=ee||R||L||qt||jt||fe||Xe||ce||de||ie,Fe=Ss(Ee,W),[st,lt]=_(Fe.G),[,ht]=k(j),Ln=R||w||ht||Pt||j,[kr,yr]=Ln?A(j):T();return pt&&(lt&&X(Fe.G),J&&I&&dt(c,J(Fe,G,I(Fe,mt,Ut)))),y(!1),sn(s,je,Vt,ft),sn(r,hn,Vt,ft),Y(t,{G:st,Vt:{x:re.w,y:re.h},Rt:{x:ve.w,y:ve.h},en:Ee,Pt:Qr(kr,ve)}),{nn:lt,Zt:fe,tn:Xe,sn:yr||Xe,dn:Ln}}},Rs=n=>{const[t,o,s]=As(n),r={cn:{t:0,r:0,b:0,l:0},un:!1,rt:{[bo]:0,[Eo]:0,[wo]:0,[ko]:0,[yo]:0,[xo]:0,[_o]:0},Vt:{x:0,y:0},Rt:{x:0,y:0},G:{x:Ge,y:Ge},en:{x:!1,y:!1},Pt:Ho()},{vt:c,gt:a,nt:i}=t,{R:l,M:d}=$e(),f=!l&&(d.x||d.y),u=[Ls(t),Os(t,r),Fs(t,r)];return[o,p=>{const m={},g=f&&ye(a);return Q(u,v=>{Y(m,v(p,m)||{})}),Ne(a,g),!i&&Ne(c,0),m},r,t,s]},Hs=(n,t,o,s,r)=>{const c=Zn(t,{}),[a,i,l,d,f]=Rs(n),[u,p,m]=Cs(d,l,c,O=>{y({},O)}),[h,g,,v]=Ms(n,t,m,l,d,r),V=O=>Le(O).some(D=>!!O[D]),y=(O,D)=>{if(o())return!1;const{fn:N,Tt:S,At:B,pn:b}=O,$=N||{},E=!!S,x={It:Zn(t,$,E),fn:$,Tt:E};if(b)return g(x),!1;const C=D||p(Y({},x,{At:B})),_=i(Y({},x,{an:m,Gt:C}));g(Y({},x,{Gt:C,Qt:_}));const k=V(C),A=V(_),T=k||A||!wn($)||E;return T&&s(O,{Gt:C,Qt:_}),T};return[()=>{const{rn:O,gt:D}=d,N=ye(O),S=[u(),a(),h()];return Ne(D,N),U(be,S)},y,()=>({vn:m,hn:l}),{gn:d,bn:v},f]},qe=(n,t,o)=>{const{N:s}=$e(),r=Ct(n),c=r?n:n.target,a=Go(c);if(t&&!a){let i=!1;const l=[],d={},f=E=>{const x=So(E),C=ut(Es);return C?C(x,!0):x},u=Y({},s(),f(t)),[p,m,h]=pn(),[g,v,V]=pn(o),y=(E,x)=>{V(E,x),h(E,x)},[O,D,N,S,B]=Hs(n,u,()=>i,({fn:E,Tt:x},{Gt:C,Qt:_})=>{const{ft:k,Ct:A,xt:T,Ht:K,Et:Z,dt:X}=C,{Zt:M,tn:P,nn:G,sn:j}=_;y("updated",[$,{updateHints:{sizeChanged:!!k,directionChanged:!!A,heightIntrinsicChanged:!!T,overflowEdgeChanged:!!M,overflowAmountChanged:!!P,overflowStyleChanged:!!G,scrollCoordinatesChanged:!!j,contentMutation:!!K,hostMutation:!!Z,appear:!!X},changedOptions:E||{},force:!!x}])},E=>y("scroll",[$,E])),b=E=>{xs(c),be(l),i=!0,y("destroyed",[$,E]),m(),v()},$={options(E,x){if(E){const C=x?s():{},_=zo(u,Y(C,f(E)));wn(_)||(Y(u,_),D({fn:_}))}return Y({},u)},on:g,off:(E,x)=>{E&&x&&v(E,x)},state(){const{vn:E,hn:x}=N(),{ct:C}=E,{Vt:_,Rt:k,G:A,en:T,cn:K,un:Z,Pt:X}=x;return Y({},{overflowEdge:_,overflowAmount:k,overflowStyle:A,hasOverflow:T,scrollCoordinates:{start:X.T,end:X.D},padding:K,paddingAbsolute:Z,directionRTL:C,destroyed:i})},elements(){const{vt:E,ht:x,cn:C,ot:_,bt:k,gt:A,Kt:T}=S.gn,{Ft:K,Wt:Z}=S.bn,X=P=>{const{Mt:G,kt:j,Lt:ee}=P;return{scrollbar:ee,track:j,handle:G}},M=P=>{const{jt:G,Xt:j}=P,ee=X(G[0]);return Y({},ee,{clone:()=>{const F=X(j());return D({pn:!0}),F}})};return Y({},{target:E,host:x,padding:C||_,viewport:_,content:k||_,scrollOffsetElement:A,scrollEventElement:T,scrollbarHorizontal:M(K),scrollbarVertical:M(Z)})},update:E=>D({Tt:E,At:!0}),destroy:U(b,!1),plugin:E=>d[Le(E)[0]]};return se(l,[B]),_s(c,$),Yo(Ko,qe,[$,p,d]),ys(S.gn.yt,!r&&n.cancel)?(b(!0),$):(se(l,O()),y("initialized",[$]),$.update(!0),$)}return a};qe.plugin=n=>{const t=Be(n),o=t?n:[n],s=o.map(r=>Yo(r,qe)[0]);return bs(o),t?s:s[0]};qe.valid=n=>{const t=n&&n.elements,o=we(t)&&t();return $t(o)&&!!Go(o.target)};qe.env=()=>{const{k:n,M:t,R:o,V:s,B:r,F:c,P:a,U:i,N:l,q:d}=$e();return Y({},{scrollbarsSize:n,scrollbarsOverlaid:t,scrollbarsHiding:o,scrollTimeline:s,staticDefaultInitialization:r,staticDefaultOptions:c,getDefaultInitialization:a,setDefaultInitialization:i,getDefaultOptions:l,setDefaultOptions:d})};function zs(){let n;const t=e.ref(null),o=Math.floor(Math.random()*2**32),s=e.ref(!1),r=e.ref([]),c=()=>r.value,a=()=>n.getSelection(),i=()=>r.value.length,l=()=>n.clearSelection(!0),d=e.ref(),f=e.ref(null),u=e.ref(null),p=e.ref(null);function m(){n=new Er({area:t.value,keyboardDrag:!1,selectedClass:"vf-explorer-selected",selectorClass:"vf-explorer-selector"}),n.subscribe("DS:start:pre",({items:D,event:N,isDragging:S})=>{if(S)n.Interaction._reset(N);else{s.value=!1;const B=t.value.offsetWidth-N.offsetX,b=t.value.offsetHeight-N.offsetY;B<15&&b<15&&n.Interaction._reset(N),N.target.classList.contains("os-scrollbar-handle")&&n.Interaction._reset(N)}}),document.addEventListener("dragleave",D=>{!D.buttons&&s.value&&(s.value=!1)})}const h=()=>e.nextTick(()=>{n.addSelection(n.getSelectables()),g()}),g=()=>{r.value=n.getSelection().map(D=>JSON.parse(D.dataset.item)),d.value(r.value)},v=()=>e.nextTick(()=>{const D=c().map(N=>N.path);l(),n.setSettings({selectables:document.getElementsByClassName("vf-item-"+o)}),n.addSelection(n.getSelectables().filter(N=>D.includes(JSON.parse(N.dataset.item).path))),g(),y()}),V=D=>{d.value=D,n.subscribe("DS:end",({items:N,event:S,isDragging:B})=>{r.value=N.map(b=>JSON.parse(b.dataset.item)),D(N.map(b=>JSON.parse(b.dataset.item)))})},y=()=>{f.value&&(t.value.getBoundingClientRect().height<t.value.scrollHeight?(u.value.style.height=t.value.scrollHeight+"px",u.value.style.display="block"):(u.value.style.height="100%",u.value.style.display="none"))},O=D=>{if(!f.value)return;const{scrollOffsetElement:N}=f.value.elements();N.scrollTo({top:t.value.scrollTop,left:0})};return e.onMounted(()=>{qe(p.value,{scrollbars:{theme:"vf-theme-dark dark:vf-theme-light"},plugins:{OverlayScrollbars:qe}},{initialized:D=>{f.value=D},scroll:(D,N)=>{const{scrollOffsetElement:S}=D.elements();t.value.scrollTo({top:S.scrollTop,left:0})}}),m(),y(),new ResizeObserver(y).observe(t.value),t.value.addEventListener("scroll",O),n.subscribe("DS:scroll",({isDragging:D})=>D||O())}),e.onUnmounted(()=>{n&&n.stop()}),e.onUpdated(()=>{n&&n.Area.reset()}),{area:t,explorerId:o,isDraggingRef:s,scrollBar:u,scrollBarContainer:p,getSelected:c,getSelection:a,selectAll:h,clearSelection:l,refreshSelection:v,getCount:i,onSelect:V}}function Is(n,t){const o=e.ref(n),s=e.ref(t),r=e.ref([]),c=e.ref([]),a=e.ref([]),i=e.ref(!1),l=e.ref(5);let d=!1,f=!1;const u=e.reactive({adapter:o,storages:[],dirname:s,files:[]});function p(){let y=[],O=[],D=s.value??o.value+"://";D.length===0&&(r.value=[]),D.replace(o.value+"://","").split("/").forEach(function(B){y.push(B),y.join("/")!==""&&O.push({basename:B,name:B,path:o.value+"://"+y.join("/"),type:"dir"})}),c.value=O;const[N,S]=h(O,l.value);a.value=S,r.value=N}function m(y){l.value=y,p()}function h(y,O){return y.length>O?[y.slice(-O),y.slice(0,-O)]:[y,[]]}function g(y=null){i.value=y??!i.value}function v(){return r.value&&r.value.length&&!f}const V=e.computed(()=>{var y;return((y=r.value[r.value.length-2])==null?void 0:y.path)??o.value+"://"});return e.onMounted(()=>{}),e.watch(s,p),e.onMounted(p),{adapter:o,path:s,loading:d,searchMode:f,data:u,breadcrumbs:r,breadcrumbItems:c,limitBreadcrumbItems:m,hiddenBreadcrumbs:a,showHiddenBreadcrumbs:i,toggleHiddenBreadcrumbs:g,isGoUpAvailable:v,parentFolderPath:V}}const js=(n,t)=>{const o=Dr(n.id),s=br(),r=o.getStore("metricUnits",!1),c=Fr(o,n.theme),a=t.i18n,i=n.locale??t.locale,l=o.getStore("adapter"),d=p=>Array.isArray(p)?p:Ar,f=o.getStore("persist-path",n.persist),u=f?o.getStore("path",n.path):n.path;return e.reactive({version:Lr,root:null,debug:n.debug,emitter:s,storage:o,i18n:Mr(o,i,s,a),modal:Rr(),dragSelect:e.computed(()=>zs()),requester:Cr(n.request),features:d(n.features),view:o.getStore("viewport","grid"),fullScreen:o.getStore("full-screen",n.fullScreen),showTreeView:o.getStore("show-tree-view",n.showTreeView),pinnedFolders:o.getStore("pinned-folders",n.pinnedFolders),treeViewData:[],selectButton:n.selectButton,maxFileSize:n.maxFileSize,theme:c,metricUnits:r,filesize:r?uo:io,compactListView:o.getStore("compact-list-view",!0),persist:f,showThumbnails:o.getStore("show-thumbnails",n.showThumbnails),fs:Is(l,u)})},Us=e.createElementVNode("div",{class:"fixed inset-0 bg-gray-500 dark:bg-gray-600 dark:bg-opacity-75 bg-opacity-75 transition-opacity"},null,-1),qs={class:"fixed z-10 inset-0 overflow-hidden"},Ps={class:"bg-white dark:bg-gray-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},Gs={class:"bg-gray-50 dark:bg-gray-800 dark:border-t dark:border-gray-700 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"},Ce={__name:"ModalLayout",setup(n){const t=e.ref(null),o=e.inject("ServiceContainer");return e.onMounted(()=>{const s=document.querySelector(".v-f-modal input");s&&s.focus(),e.nextTick(()=>{if(document.querySelector(".v-f-modal input")&&window.innerWidth<768){const r=t.value.getBoundingClientRect().bottom+16;window.scrollTo({top:r,left:0,behavior:"smooth"})}})}),(s,r)=>(e.openBlock(),e.createElementBlock("div",{class:"v-f-modal relative z-30","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",onKeyup:r[1]||(r[1]=e.withKeys(c=>e.unref(o).modal.close(),["esc"])),tabindex:"0"},[Us,e.createElementVNode("div",qs,[e.createElementVNode("div",{class:"flex items-end sm:items-center justify-center min-h-full p-4 text-center sm:p-0",onMousedown:r[0]||(r[0]=e.withModifiers(c=>e.unref(o).modal.close(),["self"]))},[e.createElementVNode("div",{ref_key:"modalBody",ref:t,class:"relative bg-white dark:bg-gray-800 rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:max-w-4xl md:max-w-2xl lg:max-w-3xl xl:max-w-3xl w-full"},[e.createElementVNode("div",Ps,[e.renderSlot(s.$slots,"default")]),e.createElementVNode("div",Gs,[e.renderSlot(s.$slots,"buttons")])],512)],32)])],32))}},Ks=(n,t)=>{const o=n.__vccOpts||n;for(const[s,r]of t)o[s]=r;return o},Ws={props:{on:{type:String,required:!0}},setup(n,{emit:t,slots:o}){const s=e.inject("ServiceContainer"),r=e.ref(!1),{t:c}=s.i18n;let a=null;const i=()=>{clearTimeout(a),r.value=!0,a=setTimeout(()=>{r.value=!1},2e3)};return e.onMounted(()=>{s.emitter.on(n.on,i)}),e.onUnmounted(()=>{clearTimeout(a)}),{shown:r,t:c}}},Ys={key:1};function Xs(n,t,o,s,r,c){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["text-sm text-green-600 dark:text-green-600 transition-opacity duration-500 ease-out",[{"opacity-0":!s.shown}]])},[n.$slots.default?e.renderSlot(n.$slots,"default",{key:0}):(e.openBlock(),e.createElementBlock("span",Ys,e.toDisplayString(s.t("Saved.")),1))],2)}const Je=Ks(Ws,[["render",Xs]]),Js={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",viewBox:"0 0 24 24"},Qs=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87q.11.06.22.127c.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a8 8 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a7 7 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a7 7 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a7 7 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124q.108-.066.22-.128c.332-.183.582-.495.644-.869z"},null,-1),Zs=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0"},null,-1),el=[Qs,Zs];function tl(n,t){return e.openBlock(),e.createElementBlock("svg",Js,[...el])}const nl={render:tl},ol={class:"flex items-center my-1 space-x-2"},rl={class:"flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},sl={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Oe={__name:"ModalHeader",props:{title:{type:String,required:!0},icon:{type:Object,required:!0}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",ol,[e.createElementVNode("div",rl,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.icon),{class:"p-0.5 h-6 w-6 stroke-blue-600 dark:stroke-blue-100"}))]),e.createElementVNode("h3",sl,e.toDisplayString(n.title),1)]))}},ll={class:"sm:items-start select-none"},al={class:"mt-3 sm:mt-0 sm:ml-4 sm:text-left w-full"},cl={class:"flex overflow-auto","aria-label":"Tabs"},il=["onClick","aria-current"],dl={key:0,class:"mt-4"},ul={class:"m-1 text-sm text-gray-500"},ml={href:"https://vuefinder.ozdemir.be",class:"block mt-2 text-sm text-blue-500 dark:text-blue-400",target:"_blank"},fl={href:"https://github.com/n1crack/vuefinder",class:"block mt-2 text-sm text-blue-500 dark:text-blue-400",target:"_blank"},pl={key:1,class:"mt-2"},hl={class:"m-1 text-sm text-gray-500"},vl={class:"mt-3 text-left"},gl={class:"space-y-2"},kl={class:"flex relative gap-x-3"},yl={class:"h-6 items-center"},_l={class:"flex-1 block text-sm"},xl={for:"metric_unit",class:"flex w-full font-medium text-gray-900 dark:text-gray-400"},wl={class:"flex relative gap-x-3"},bl={class:"h-6 items-center"},El={class:"flex-1 block text-sm"},Vl={for:"large_icons",class:"flex w-full font-medium text-gray-900 dark:text-gray-400"},Nl={class:"flex relative gap-x-3"},Sl={class:"h-6 items-center"},Bl={class:"flex-1 block text-sm"},$l={for:"persist_path",class:"flex w-full font-medium text-gray-900 dark:text-gray-400"},Cl={class:"flex relative gap-x-3"},Dl={class:"h-6 items-center"},Tl={class:"flex-1 block text-sm"},Ml={for:"show_thumbnails",class:"flex w-full font-medium text-gray-900 dark:text-gray-400"},Al={class:""},Ll={class:"h-6 items-center"},Ol={for:"theme",class:"flex w-full font-medium text-gray-900 dark:text-gray-400 text-sm"},Fl={class:"flex text-sm"},Rl=["label"],Hl=["value"],zl={key:0,class:""},Il={class:"h-6 items-center"},jl={for:"language",class:"flex w-full font-medium text-gray-900 dark:text-gray-400 text-sm text-nowrap"},Ul={class:"flex text-sm"},ql=["label"],Pl=["value"],Gl={key:2,class:"mt-3"},Kl={class:"space-y-2 sm:w-1/2"},Wl={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Yl=e.createElementVNode("kbd",null,"F2",-1),Xl={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Jl=e.createElementVNode("kbd",null,"F5",-1),Ql={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Zl=e.createElementVNode("kbd",null,"Del",-1),ea={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},ta=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Esc")],-1),na={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},oa=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"A")],-1),ra={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},sa=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"F")],-1),la={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},aa=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"E")],-1),ca={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},ia=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,",")],-1),da={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},ua=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"Enter")],-1),ma={key:3,class:"mt-3"},fa={class:"m-1 text-sm text-gray-500"},Qo={__name:"ModalAbout",setup(n){const t=e.inject("ServiceContainer"),{setStore:o,clearStore:s}=t.storage,{t:r,changeLocale:c,locale:a}=t.i18n,i={ABOUT:"about",SETTINGS:"settings",SHORTCUTS:"shortcuts",RESET:"reset"},l=e.computed(()=>[{name:r("About"),key:i.ABOUT},{name:r("Settings"),key:i.SETTINGS},{name:r("Shortcuts"),key:i.SHORTCUTS},{name:r("Reset"),key:i.RESET}]),d=e.ref("about"),f=async()=>{s(),location.reload()},u=D=>{t.theme.set(D),t.emitter.emit("vf-theme-saved")},p=()=>{t.metricUnits=!t.metricUnits,t.filesize=t.metricUnits?uo:io,o("metricUnits",t.metricUnits),t.emitter.emit("vf-metric-units-saved")},m=()=>{t.compactListView=!t.compactListView,o("compactListView",t.compactListView),t.emitter.emit("vf-compact-view-saved")},h=()=>{t.showThumbnails=!t.showThumbnails,o("show-thumbnails",t.showThumbnails),t.emitter.emit("vf-show-thumbnails-saved")},g=()=>{t.persist=!t.persist,o("persist-path",t.persist),t.emitter.emit("vf-persist-path-saved")},{i18n:v}=e.inject("VueFinderOptions"),y=Object.fromEntries(Object.entries({en:"English",fr:"French (Français)",de:"German (Deutsch)",fa:"Persian (فارسی)",he:"Hebrew (עִברִית)",hi:"Hindi (हिंदी)",ru:"Russian (Pусский)",sv:"Swedish (Svenska)",tr:"Turkish (Türkçe)",zhCN:"Simplified Chinese (简体中文)",zhTW:"Traditional Chinese (繁體中文)"}).filter(([D])=>Object.keys(v).includes(D))),O=e.computed(()=>({system:r("System"),light:r("Light"),dark:r("Dark")}));return(D,N)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:N[8]||(N[8]=S=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(r)("Close")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",ll,[e.createVNode(Oe,{icon:e.unref(nl),title:"Vuefinder "+e.unref(t).version},null,8,["icon","title"]),e.createElementVNode("div",al,[e.createElementVNode("div",null,[e.createElementVNode("div",null,[e.createElementVNode("nav",cl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,S=>(e.openBlock(),e.createElementBlock("button",{key:S.name,onClick:B=>d.value=S.key,class:e.normalizeClass([S.key===d.value?"bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300 border-sky-500":"text-gray-500 dark:text-gray-500 hover:text-gray-700 border-gray-300 dark:border-gray-600","px-3 py-2 border-b font-medium text-sm"]),"aria-current":S.current?"page":void 0},e.toDisplayString(S.name),11,il))),128))])])]),d.value===i.ABOUT?(e.openBlock(),e.createElementBlock("div",dl,[e.createElementVNode("div",ul,e.toDisplayString(e.unref(r)("Vuefinder is a simple, lightweight, and fast file manager library for Vue.js applications")),1),e.createElementVNode("a",ml,e.toDisplayString(e.unref(r)("Project home")),1),e.createElementVNode("a",fl,e.toDisplayString(e.unref(r)("Follow on GitHub")),1)])):e.createCommentVNode("",!0),d.value===i.SETTINGS?(e.openBlock(),e.createElementBlock("div",pl,[e.createElementVNode("div",hl,e.toDisplayString(e.unref(r)("Customize your experience with the following settings.")),1),e.createElementVNode("div",vl,[e.createElementVNode("fieldset",null,[e.createElementVNode("div",gl,[e.createElementVNode("div",kl,[e.createElementVNode("div",yl,[e.withDirectives(e.createElementVNode("input",{id:"metric_unit",name:"metric_unit",type:"checkbox","onUpdate:modelValue":N[0]||(N[0]=S=>e.unref(t).metricUnits=S),onClick:p,class:"h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600"},null,512),[[e.vModelCheckbox,e.unref(t).metricUnits]])]),e.createElementVNode("div",_l,[e.createElementVNode("label",xl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Use Metric Units"))+" ",1),e.createVNode(Je,{class:"ms-3",on:"vf-metric-units-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])])]),e.createElementVNode("div",wl,[e.createElementVNode("div",bl,[e.withDirectives(e.createElementVNode("input",{id:"large_icons",name:"large_icons",type:"checkbox","onUpdate:modelValue":N[1]||(N[1]=S=>e.unref(t).compactListView=S),onClick:m,class:"h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600"},null,512),[[e.vModelCheckbox,e.unref(t).compactListView]])]),e.createElementVNode("div",El,[e.createElementVNode("label",Vl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Compact list view"))+" ",1),e.createVNode(Je,{class:"ms-3",on:"vf-compact-view-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])])]),e.createElementVNode("div",Nl,[e.createElementVNode("div",Sl,[e.withDirectives(e.createElementVNode("input",{id:"persist_path",name:"persist_path",type:"checkbox","onUpdate:modelValue":N[2]||(N[2]=S=>e.unref(t).persist=S),onClick:g,class:"h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600"},null,512),[[e.vModelCheckbox,e.unref(t).persist]])]),e.createElementVNode("div",Bl,[e.createElementVNode("label",$l,[e.createTextVNode(e.toDisplayString(e.unref(r)("Persist path on reload"))+" ",1),e.createVNode(Je,{class:"ms-3",on:"vf-persist-path-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])])]),e.createElementVNode("div",Cl,[e.createElementVNode("div",Dl,[e.withDirectives(e.createElementVNode("input",{id:"show_thumbnails",name:"show_thumbnails",type:"checkbox","onUpdate:modelValue":N[3]||(N[3]=S=>e.unref(t).showThumbnails=S),onClick:h,class:"h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600"},null,512),[[e.vModelCheckbox,e.unref(t).showThumbnails]])]),e.createElementVNode("div",Tl,[e.createElementVNode("label",Ml,[e.createTextVNode(e.toDisplayString(e.unref(r)("Show thumbnails"))+" ",1),e.createVNode(Je,{class:"ms-3",on:"vf-show-thumbnails-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])])]),e.createElementVNode("div",Al,[e.createElementVNode("div",Ll,[e.createElementVNode("label",Ol,e.toDisplayString(e.unref(r)("Theme")),1)]),e.createElementVNode("div",Fl,[e.withDirectives(e.createElementVNode("select",{id:"theme","onUpdate:modelValue":N[4]||(N[4]=S=>e.unref(t).theme.value=S),onChange:N[5]||(N[5]=S=>u(S.target.value)),class:"flex-shrink-0 sm:w-1/2 w-full text-sm text-slate-500 border dark:border-gray-600 dark:text-neutral-50 dark:bg-gray-700 rounded"},[e.createElementVNode("optgroup",{label:e.unref(r)("Theme")},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,(S,B)=>(e.openBlock(),e.createElementBlock("option",{value:B},e.toDisplayString(S),9,Hl))),256))],8,Rl)],544),[[e.vModelSelect,e.unref(t).theme.value]]),e.createVNode(Je,{class:"ms-3 flex-shrink-0 flex-grow basis-full",on:"vf-theme-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])]),e.unref(t).features.includes(e.unref(ne).LANGUAGE)&&Object.keys(e.unref(y)).length>1?(e.openBlock(),e.createElementBlock("div",zl,[e.createElementVNode("div",Il,[e.createElementVNode("label",jl,e.toDisplayString(e.unref(r)("Language")),1)]),e.createElementVNode("div",Ul,[e.withDirectives(e.createElementVNode("select",{id:"language","onUpdate:modelValue":N[6]||(N[6]=S=>e.isRef(a)?a.value=S:null),onChange:N[7]||(N[7]=S=>e.unref(c)(S.target.value)),class:"flex-shrink-0 sm:w-1/2 w-full text-sm text-slate-500 border dark:border-gray-600 dark:text-neutral-50 dark:bg-gray-700 rounded"},[e.createElementVNode("optgroup",{label:e.unref(r)("Language")},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(y),(S,B)=>(e.openBlock(),e.createElementBlock("option",{value:B},e.toDisplayString(S),9,Pl))),256))],8,ql)],544),[[e.vModelSelect,e.unref(a)]]),e.createVNode(Je,{class:"ms-3 flex-shrink-0 flex-grow basis-full",on:"vf-language-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])])):e.createCommentVNode("",!0)])])])])):e.createCommentVNode("",!0),d.value===i.SHORTCUTS?(e.openBlock(),e.createElementBlock("div",Gl,[e.createElementVNode("div",Kl,[e.createElementVNode("div",Wl,[e.createElementVNode("div",null,e.toDisplayString(e.unref(r)("Rename")),1),Yl]),e.createElementVNode("div",Xl,[e.createElementVNode("div",null,e.toDisplayString(e.unref(r)("Refresh")),1),Jl]),e.createElementVNode("div",Ql,[e.createTextVNode(e.toDisplayString(e.unref(r)("Delete"))+" ",1),Zl]),e.createElementVNode("div",ea,[e.createTextVNode(e.toDisplayString(e.unref(r)("Escape"))+" ",1),ta]),e.createElementVNode("div",na,[e.createTextVNode(e.toDisplayString(e.unref(r)("Select All"))+" ",1),oa]),e.createElementVNode("div",ra,[e.createTextVNode(e.toDisplayString(e.unref(r)("Search"))+" ",1),sa]),e.createElementVNode("div",la,[e.createTextVNode(e.toDisplayString(e.unref(r)("Toggle Sidebar"))+" ",1),aa]),e.createElementVNode("div",ca,[e.createTextVNode(e.toDisplayString(e.unref(r)("Open Settings"))+" ",1),ia]),e.createElementVNode("div",da,[e.createTextVNode(e.toDisplayString(e.unref(r)("Toggle Full Screen"))+" ",1),ua])])])):e.createCommentVNode("",!0),d.value===i.RESET?(e.openBlock(),e.createElementBlock("div",ma,[e.createElementVNode("div",fa,e.toDisplayString(e.unref(r)("Reset all settings to default")),1),e.createElementVNode("button",{onClick:f,type:"button",class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(r)("Reset Settings")),1)])):e.createCommentVNode("",!0)])])]),_:1}))}},pa=["title"],ha=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-5 h-5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1),va=[ha],De={__name:"Message",props:{error:{type:Boolean,default:!1}},emits:["hidden"],setup(n,{emit:t}){var d;const o=t,s=e.inject("ServiceContainer"),{t:r}=s.i18n,c=e.ref(!1),a=e.ref(null),i=e.ref((d=a.value)==null?void 0:d.strMessage);e.watch(i,()=>c.value=!1);const l=()=>{o("hidden"),c.value=!0};return(f,u)=>(e.openBlock(),e.createElementBlock("div",null,[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"strMessage",ref:a,class:e.normalizeClass(["flex mt-2 p-1 px-2 rounded text-sm break-all dark:opacity-75",n.error?"bg-red-100 text-red-600 ":"bg-emerald-100 text-emerald-600"])},[e.renderSlot(f.$slots,"default"),e.createElementVNode("div",{class:"ml-auto cursor-pointer",onClick:l,title:e.unref(r)("Close")},va,8,pa)],2))]))}},ga={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"},ka=e.createElementVNode("path",{d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21q.512.078 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48 48 0 0 0-3.478-.397m-12 .562q.51-.089 1.022-.165m0 0a48 48 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a52 52 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a49 49 0 0 0-7.5 0"},null,-1),ya=[ka];function _a(n,t){return e.openBlock(),e.createElementBlock("svg",ga,[...ya])}const Zo={render:_a},xa={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},wa={class:"mt-2"},ba={class:"text-sm text-gray-500"},Ea={class:"text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar",style:{"max-height":"200px"}},Va={class:"flex text-sm text-gray-800 dark:text-gray-400"},Na={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Sa=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1),Ba=[Sa],$a={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Ca=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1),Da=[Ca],Ta={class:"ml-1.5"},Ma={class:"m-auto font-bold text-red-500 text-sm dark:text-red-200 text-center"},Tn={__name:"ModalDelete",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(t.modal.data.items),r=e.ref(""),c=()=>{s.value.length&&t.emitter.emit("vf-fetch",{params:{q:"delete",m:"post",adapter:t.fs.adapter,path:t.fs.data.dirname},body:{items:s.value.map(({path:a,type:i})=>({path:a,type:i}))},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:o("Files deleted.")})},onError:a=>{r.value=o(a.message)}})};return(a,i)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:c,class:"vf-btn vf-btn-danger"},e.toDisplayString(e.unref(o)("Yes, Delete!")),1),e.createElementVNode("button",{type:"button",onClick:i[1]||(i[1]=l=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1),e.createElementVNode("div",Ma,e.toDisplayString(e.unref(o)("This action cannot be undone.")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(Oe,{icon:e.unref(Zo),title:e.unref(o)("Delete files")},null,8,["icon","title"]),e.createElementVNode("div",xa,[e.createElementVNode("div",wa,[e.createElementVNode("p",ba,e.toDisplayString(e.unref(o)("Are you sure you want to delete these files?")),1),e.createElementVNode("div",Ea,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,l=>(e.openBlock(),e.createElementBlock("p",Va,[l.type==="dir"?(e.openBlock(),e.createElementBlock("svg",Na,Ba)):(e.openBlock(),e.createElementBlock("svg",$a,Da)),e.createElementVNode("span",Ta,e.toDisplayString(l.basename),1)]))),256))]),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:i[0]||(i[0]=l=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},Aa={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"},La=e.createElementVNode("path",{d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"},null,-1),Oa=[La];function Fa(n,t){return e.openBlock(),e.createElementBlock("svg",Aa,[...Oa])}const er={render:Fa},Ra={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Ha={class:"mt-2"},za={class:"flex text-sm text-gray-800 dark:text-gray-400 py-2"},Ia={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},ja=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1),Ua=[ja],qa={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Pa=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1),Ga=[Pa],Ka={class:"ml-1.5"},Mn={__name:"ModalRename",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(t.modal.data.items[0]),r=e.ref(t.modal.data.items[0].basename),c=e.ref(""),a=()=>{r.value!=""&&t.emitter.emit("vf-fetch",{params:{q:"rename",m:"post",adapter:t.fs.adapter,path:t.fs.data.dirname},body:{item:s.value.path,name:r.value},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:o("%s is renamed.",r.value)})},onError:i=>{c.value=o(i.message)}})};return(i,l)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:a,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Rename")),1),e.createElementVNode("button",{type:"button",onClick:l[2]||(l[2]=d=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(Oe,{icon:e.unref(er),title:e.unref(o)("Rename")},null,8,["icon","title"]),e.createElementVNode("div",Ra,[e.createElementVNode("div",Ha,[e.createElementVNode("p",za,[s.value.type==="dir"?(e.openBlock(),e.createElementBlock("svg",Ia,Ua)):(e.openBlock(),e.createElementBlock("svg",qa,Ga)),e.createElementVNode("span",Ka,e.toDisplayString(s.value.basename),1)]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=d=>r.value=d),onKeyup:e.withKeys(a,["enter"]),class:"px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",placeholder:"Name",type:"text"},null,544),[[e.vModelText,r.value]]),c.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:l[1]||(l[1]=d=>c.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},Te={ESCAPE:"Escape",F2:"F2",F5:"F5",DELETE:"Delete",ENTER:"Enter",BACKSLASH:"Backslash",KEY_A:"KeyA",KEY_E:"KeyE",KEY_F:"KeyF"};function Wa(n){const t=o=>{o.code===Te.ESCAPE&&(n.modal.close(),n.root.focus()),!n.modal.visible&&(n.fs.searchMode||(o.code===Te.F2&&n.features.includes(ne.RENAME)&&(n.dragSelect.getCount()!==1||n.modal.open(Mn,{items:n.dragSelect.getSelected()})),o.code===Te.F5&&n.emitter.emit("vf-fetch",{params:{q:"index",adapter:n.fs.adapter,path:n.fs.data.dirname}}),o.code===Te.DELETE&&(!n.dragSelect.getCount()||n.modal.open(Tn,{items:n.dragSelect.getSelected()})),o.metaKey&&o.code===Te.BACKSLASH&&n.modal.open(Qo),o.metaKey&&o.code===Te.KEY_F&&n.features.includes(ne.SEARCH)&&(n.fs.searchMode=!0,o.preventDefault()),o.metaKey&&o.code===Te.KEY_E&&(n.showTreeView=!n.showTreeView,n.storage.setStore("show-tree-view",n.showTreeView)),o.metaKey&&o.code===Te.ENTER&&(n.fullScreen=!n.fullScreen,n.root.focus()),o.metaKey&&o.code===Te.KEY_A&&(n.dragSelect.selectAll(),o.preventDefault())))};e.onMounted(()=>{n.root.addEventListener("keydown",t)}),e.onUnmounted(()=>{n.root.removeEventListener("keydown",t)})}const Ya={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"},Xa=e.createElementVNode("path",{d:"M12 10.5v6m3-3H9m4.06-7.19-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44z"},null,-1),Ja=[Xa];function Qa(n,t){return e.openBlock(),e.createElementBlock("svg",Ya,[...Ja])}const tr={render:Qa},Za={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},ec={class:"mt-2"},tc={class:"text-sm text-gray-500"},nc=["placeholder"],nr={__name:"ModalNewFolder",setup(n){const t=e.inject("ServiceContainer");t.storage;const{t:o}=t.i18n,s=e.ref(""),r=e.ref(""),c=()=>{s.value!==""&&t.emitter.emit("vf-fetch",{params:{q:"newfolder",m:"post",adapter:t.fs.adapter,path:t.fs.data.dirname},body:{name:s.value},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:o("%s is created.",s.value)})},onError:a=>{r.value=o(a.message)}})};return(a,i)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:c,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Create")),1),e.createElementVNode("button",{type:"button",onClick:i[2]||(i[2]=l=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(Oe,{icon:e.unref(tr),title:e.unref(o)("New Folder")},null,8,["icon","title"]),e.createElementVNode("div",Za,[e.createElementVNode("div",ec,[e.createElementVNode("p",tc,e.toDisplayString(e.unref(o)("Create a new folder")),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=l=>s.value=l),onKeyup:e.withKeys(c,["enter"]),class:"px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",placeholder:e.unref(o)("Folder Name"),type:"text"},null,40,nc),[[e.vModelText,s.value]]),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:i[1]||(i[1]=l=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},oc={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"},rc=e.createElementVNode("path",{d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m3.75 9v6m3-3H9m1.5-12H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9"},null,-1),sc=[rc];function lc(n,t){return e.openBlock(),e.createElementBlock("svg",oc,[...sc])}const or={render:lc},ac={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},cc={class:"mt-2"},ic={class:"text-sm text-gray-500"},dc=["placeholder"],uc={__name:"ModalNewFile",setup(n){const t=e.inject("ServiceContainer");t.storage;const{t:o}=t.i18n,s=e.ref(""),r=e.ref(""),c=()=>{s.value!==""&&t.emitter.emit("vf-fetch",{params:{q:"newfile",m:"post",adapter:t.fs.adapter,path:t.fs.data.dirname},body:{name:s.value},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:o("%s is created.",s.value)})},onError:a=>{r.value=o(a.message)}})};return(a,i)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:c,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Create")),1),e.createElementVNode("button",{type:"button",onClick:i[2]||(i[2]=l=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(Oe,{icon:e.unref(or),title:e.unref(o)("New File")},null,8,["icon","title"]),e.createElementVNode("div",ac,[e.createElementVNode("div",cc,[e.createElementVNode("p",ic,e.toDisplayString(e.unref(o)("Create a new file")),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=l=>s.value=l),onKeyup:e.withKeys(c,["enter"]),class:"px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",placeholder:e.unref(o)("File Name"),type:"text"},null,40,dc),[[e.vModelText,s.value]]),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:i[1]||(i[1]=l=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}};function gn(n,t=14){let o=`((?=([\\w\\W]{0,${t}}))([\\w\\W]{${t+1},})([\\w\\W]{8,}))`;return n.replace(new RegExp(o),"$2..$4")}const mc={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"},fc=e.createElementVNode("path",{d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"},null,-1),pc=[fc];function hc(n,t){return e.openBlock(),e.createElementBlock("svg",mc,[...pc])}const rr={render:hc},vc={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},gc={class:"mt-2"},kc={key:0,class:"pointer-events-none"},yc={key:1,class:"pointer-events-none"},_c=["disabled"],xc=["disabled"],wc={class:"text-gray-500 text-sm mb-1 pr-1 max-h-[200px] overflow-y-auto vf-scrollbar"},bc={class:"rounded flex flex-shrink-0 w-6 h-6 border bg-gray-50 text-xs cursor-default dark:border-gray-700 dark:bg-gray-800 dark:text-gray-50"},Ec=["textContent"],Vc={class:"ml-1 w-full h-fit"},Nc={class:"text-left hidden md:block"},Sc={class:"text-left md:hidden"},Bc={key:0,class:"ml-auto"},$c=["title","disabled","onClick"],Cc=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-5 h-5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1),Dc=[Cc],Tc={key:0,class:"py-2"},Mc=["disabled"],Ac={__name:"ModalUpload",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=o("uppy"),r={PENDING:0,CANCELED:1,UPLOADING:2,ERROR:3,DONE:10},c=e.ref({QUEUE_ENTRY_STATUS:r}),a=e.ref(null),i=e.ref(null),l=e.ref(null),d=e.ref(null),f=e.ref(null),u=e.ref(null),p=e.ref([]),m=e.ref(""),h=e.ref(!1),g=e.ref(!1);let v;function V(C){return p.value.findIndex(_=>_.id===C)}function y(C,_=null){_=_??(C.webkitRelativePath||C.name),v.addFile({name:_,type:C.type,data:C,source:"Local"})}function O(C){switch(C.status){case r.DONE:return"text-green-600";case r.ERROR:return"text-red-600";case r.CANCELED:return"text-red-600";case r.PENDING:default:return""}}const D=C=>{switch(C.status){case r.DONE:return"✓";case r.ERROR:case r.CANCELED:return"!";case r.PENDING:default:return"..."}};function N(){d.value.click()}function S(){if(!h.value){if(!p.value.filter(C=>C.status!==r.DONE).length){m.value=o("Please select file to upload first.");return}m.value="",v.retryAll(),v.upload()}}function B(){v.cancelAll({reason:"user"}),p.value.forEach(C=>{C.status!==r.DONE&&(C.status=r.CANCELED,C.statusName=o("Canceled"))}),h.value=!1}function b(C){h.value||(v.removeFile(C.id,"removed-by-user"),p.value.splice(V(C.id),1))}function $(C){if(!h.value){if(v.cancelAll({reason:"user"}),C){const _=[];p.value.forEach(k=>{k.status!==r.DONE&&_.push(k)}),p.value=[],_.forEach(k=>{y(k.originalFile,k.name)});return}p.value.splice(0)}}function E(){t.modal.close()}function x(){return t.requester.transformRequestParams({url:"",method:"post",params:{q:"upload",adapter:t.fs.adapter,path:t.fs.data.dirname}})}return e.onMounted(async()=>{v=new Vr({debug:t.debug,restrictions:{maxFileSize:Or(t.maxFileSize)},locale:s,onBeforeFileAdded(k,A){if(A[k.id]!=null){const K=V(k.id);p.value[K].status===r.PENDING&&(m.value=v.i18n("noDuplicates",{fileName:k.name})),p.value=p.value.filter(Z=>Z.id!==k.id)}return p.value.push({id:k.id,name:k.name,size:t.filesize(k.size),status:r.PENDING,statusName:o("Pending upload"),percent:null,originalFile:k.data}),!0}}),v.use(Nr,{endpoint:"WILL_BE_REPLACED_BEFORE_UPLOAD",limit:5,timeout:0,getResponseError(k,A){let T;try{T=JSON.parse(k).message}catch{T=o("Cannot parse server response.")}return new Error(T)}}),v.on("restriction-failed",(k,A)=>{const T=p.value[V(k.id)];b(T),m.value=A.message}),v.on("upload",()=>{const k=x();v.setMeta({...k.body});const A=v.getPlugin("XHRUpload");A.opts.method=k.method,A.opts.endpoint=k.url+"?"+new URLSearchParams(k.params),A.opts.headers=k.headers,delete k.headers["Content-Type"],h.value=!0,p.value.forEach(T=>{T.status!==r.DONE&&(T.percent=null,T.status=r.UPLOADING,T.statusName=o("Pending upload"))})}),v.on("upload-progress",(k,A)=>{const T=Math.floor(A.bytesUploaded/A.bytesTotal*100);p.value[V(k.id)].percent=`${T}%`}),v.on("upload-success",k=>{const A=p.value[V(k.id)];A.status=r.DONE,A.statusName=o("Done")}),v.on("upload-error",(k,A)=>{const T=p.value[V(k.id)];T.percent=null,T.status=r.ERROR,A.isNetworkError?T.statusName=o("Network Error, Unable establish connection to the server or interrupted."):T.statusName=A?A.message:o("Unknown Error")}),v.on("error",k=>{m.value=k.message,h.value=!1,t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.data.dirname},noCloseModal:!0})}),v.on("complete",()=>{h.value=!1,t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.data.dirname},noCloseModal:!0})}),d.value.addEventListener("click",()=>{i.value.click()}),f.value.addEventListener("click",()=>{l.value.click()}),u.value.addEventListener("dragover",k=>{k.preventDefault(),g.value=!0}),u.value.addEventListener("dragleave",k=>{k.preventDefault(),g.value=!1});function C(k,A){A.isFile&&A.file(T=>k(A,T)),A.isDirectory&&A.createReader().readEntries(T=>{T.forEach(K=>{C(k,K)})})}u.value.addEventListener("drop",k=>{k.preventDefault(),g.value=!1;const A=/^[/\\](.+)/;[...k.dataTransfer.items].forEach(T=>{T.kind==="file"&&C((K,Z)=>{const X=A.exec(K.fullPath);y(Z,X[1])},T.webkitGetAsEntry())})});const _=({target:k})=>{const A=k.files;for(const T of A)y(T);k.value=""};i.value.addEventListener("change",_),l.value.addEventListener("change",_)}),e.onBeforeUnmount(()=>{v==null||v.close({reason:"unmount"})}),(C,_)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["vf-btn vf-btn-primary",h.value?"bg-blue-200 hover:bg-blue-200 dark:bg-gray-700/50 dark:hover:bg-gray-700/50 dark:text-gray-500":"bg-blue-600 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-500"]),disabled:h.value,onClick:e.withModifiers(S,["prevent"])},e.toDisplayString(e.unref(o)("Upload")),11,Mc),h.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"vf-btn vf-btn-secondary",onClick:e.withModifiers(B,["prevent"])},e.toDisplayString(e.unref(o)("Cancel")),1)):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"vf-btn vf-btn-secondary",onClick:e.withModifiers(E,["prevent"])},e.toDisplayString(e.unref(o)("Close")),1))]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(Oe,{icon:e.unref(rr),title:e.unref(o)("Upload Files")},null,8,["icon","title"]),e.createElementVNode("div",vc,[e.createElementVNode("div",gc,[e.createElementVNode("div",{ref_key:"dropArea",ref:u,class:"flex items-center justify-center text-lg mb-4 text-gray-500 border-2 border-gray-300 rounded border-dashed select-none cursor-pointer dark:border-gray-600 h-[120px]",onClick:N},[g.value?(e.openBlock(),e.createElementBlock("div",kc,e.toDisplayString(e.unref(o)("Release to drop these files.")),1)):(e.openBlock(),e.createElementBlock("div",yc,e.toDisplayString(e.unref(o)("Drag and drop the files/folders to here or click here.")),1))],512),e.createElementVNode("div",{ref_key:"container",ref:a,class:"text-gray-500 mb-1"},[e.createElementVNode("button",{ref_key:"pickFiles",ref:d,type:"button",class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Select Files")),513),e.createElementVNode("button",{ref_key:"pickFolders",ref:f,type:"button",class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Select Folders")),513),e.createElementVNode("button",{type:"button",class:"vf-btn vf-btn-secondary",disabled:h.value,onClick:_[0]||(_[0]=k=>$(!1))},e.toDisplayString(e.unref(o)("Clear all")),9,_c),e.createElementVNode("button",{type:"button",class:"vf-btn vf-btn-secondary",disabled:h.value,onClick:_[1]||(_[1]=k=>$(!0))},e.toDisplayString(e.unref(o)("Clear only successful")),9,xc)],512),e.createElementVNode("div",wc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,k=>(e.openBlock(),e.createElementBlock("div",{class:"flex hover:bg-gray-100 dark:hover:bg-gray-800 dark:hover:text-gray-300",key:k.id},[e.createElementVNode("span",bc,[e.createElementVNode("span",{class:e.normalizeClass(["text-base m-auto",O(k)]),textContent:e.toDisplayString(D(k))},null,10,Ec)]),e.createElementVNode("div",Vc,[e.createElementVNode("div",Nc,e.toDisplayString(e.unref(gn)(k.name,40))+" ("+e.toDisplayString(k.size)+")",1),e.createElementVNode("div",Sc,e.toDisplayString(e.unref(gn)(k.name,16))+" ("+e.toDisplayString(k.size)+")",1),e.createElementVNode("div",{class:e.normalizeClass(["flex break-all text-left",O(k)])},[e.createTextVNode(e.toDisplayString(k.statusName)+" ",1),k.status===c.value.QUEUE_ENTRY_STATUS.UPLOADING?(e.openBlock(),e.createElementBlock("b",Bc,e.toDisplayString(k.percent),1)):e.createCommentVNode("",!0)],2)]),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["rounded w-5 h-5 border-1 text-base leading-none font-medium focus:outline-none dark:border-gray-200 dark:text-gray-400 dark:hover:text-gray-200 dark:bg-gray-600 ml-auto sm:text-xs hover:text-red-600",h.value?"disabled:bg-gray-100 text-white text-opacity-50":"bg-gray-100"]),title:e.unref(o)("Delete"),disabled:h.value,onClick:A=>b(k)},Dc,10,$c)]))),128)),p.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Tc,e.toDisplayString(e.unref(o)("No files selected!")),1))]),m.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:_[2]||(_[2]=k=>m.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.value),1)]),_:1})):e.createCommentVNode("",!0)])])]),e.createElementVNode("input",{ref_key:"internalFileInput",ref:i,type:"file",multiple:"",class:"hidden"},null,512),e.createElementVNode("input",{ref_key:"internalFolderInput",ref:l,type:"file",multiple:"",webkitdirectory:"",class:"hidden"},null,512)]),_:1}))}},Lc={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"},Oc=e.createElementVNode("path",{d:"m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5m6 4.125 2.25 2.25m0 0 2.25 2.25M12 13.875l2.25-2.25M12 13.875l-2.25 2.25M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125"},null,-1),Fc=[Oc];function Rc(n,t){return e.openBlock(),e.createElementBlock("svg",Lc,[...Fc])}const sr={render:Rc},Hc={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},zc={class:"mt-2"},Ic={class:"flex text-sm text-gray-800 dark:text-gray-400"},jc={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Uc=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1),qc=[Uc],Pc={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Gc=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1),Kc=[Gc],Wc={class:"ml-1.5"},Yc={class:"my-1 text-sm text-gray-500"},lr={__name:"ModalUnarchive",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(t.modal.data.items[0]),r=e.ref(""),c=e.ref([]),a=()=>{t.emitter.emit("vf-fetch",{params:{q:"unarchive",m:"post",adapter:t.fs.adapter,path:t.fs.data.dirname},body:{item:s.value.path},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:o("The file unarchived.")})},onError:i=>{r.value=o(i.message)}})};return(i,l)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:a,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Unarchive")),1),e.createElementVNode("button",{type:"button",onClick:l[1]||(l[1]=d=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(Oe,{icon:e.unref(sr),title:e.unref(o)("Unarchive")},null,8,["icon","title"]),e.createElementVNode("div",Hc,[e.createElementVNode("div",zc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,d=>(e.openBlock(),e.createElementBlock("p",Ic,[d.type==="dir"?(e.openBlock(),e.createElementBlock("svg",jc,qc)):(e.openBlock(),e.createElementBlock("svg",Pc,Kc)),e.createElementVNode("span",Wc,e.toDisplayString(d.basename),1)]))),256)),e.createElementVNode("p",Yc,e.toDisplayString(e.unref(o)("The archive will be unarchived at"))+" ("+e.toDisplayString(e.unref(t).fs.data.dirname)+")",1),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:l[0]||(l[0]=d=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},Xc={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"},Jc=e.createElementVNode("path",{d:"m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125"},null,-1),Qc=[Jc];function Zc(n,t){return e.openBlock(),e.createElementBlock("svg",Xc,[...Qc])}const ar={render:Zc},ei={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},ti={class:"mt-2"},ni={class:"text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar",style:{"max-height":"200px"}},oi={class:"flex text-sm text-gray-800 dark:text-gray-400"},ri={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},si=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1),li=[si],ai={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},ci=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1),ii=[ci],di={class:"ml-1.5"},ui=["placeholder"],cr={__name:"ModalArchive",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(""),r=e.ref(""),c=e.ref(t.modal.data.items),a=()=>{c.value.length&&t.emitter.emit("vf-fetch",{params:{q:"archive",m:"post",adapter:t.fs.adapter,path:t.fs.data.dirname},body:{items:c.value.map(({path:i,type:l})=>({path:i,type:l})),name:s.value},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:o("The file(s) archived.")})},onError:i=>{r.value=o(i.message)}})};return(i,l)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:a,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Archive")),1),e.createElementVNode("button",{type:"button",onClick:l[2]||(l[2]=d=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(Oe,{icon:e.unref(ar),title:e.unref(o)("Archive the files")},null,8,["icon","title"]),e.createElementVNode("div",ei,[e.createElementVNode("div",ti,[e.createElementVNode("div",ni,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,d=>(e.openBlock(),e.createElementBlock("p",oi,[d.type==="dir"?(e.openBlock(),e.createElementBlock("svg",ri,li)):(e.openBlock(),e.createElementBlock("svg",ai,ii)),e.createElementVNode("span",di,e.toDisplayString(d.basename),1)]))),256))]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=d=>s.value=d),onKeyup:e.withKeys(a,["enter"]),class:"my-1 px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",placeholder:e.unref(o)("Archive name. (.zip file will be created)"),type:"text"},null,40,ui),[[e.vModelText,s.value]]),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:l[1]||(l[1]=d=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},mi={xmlns:"http://www.w3.org/2000/svg",fill:"none",class:"animate-spin p-0.5 h-5 w-5 text-white ml-auto",viewBox:"0 0 24 24"},fi=e.createElementVNode("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",class:"opacity-25 stroke-blue-900 dark:stroke-blue-100"},null,-1),pi=e.createElementVNode("path",{fill:"currentColor",d:"M4 12a8 8 0 0 1 8-8V0C5.373 0 0 5.373 0 12zm2 5.291A7.96 7.96 0 0 1 4 12H0c0 3.042 1.135 5.824 3 7.938z",class:"opacity-75"},null,-1),hi=[fi,pi];function vi(n,t){return e.openBlock(),e.createElementBlock("svg",mi,[...hi])}const An={render:vi},gi={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"},ki=e.createElementVNode("path",{d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"},null,-1),yi=[ki];function _i(n,t){return e.openBlock(),e.createElementBlock("svg",gi,[...yi])}const xi={render:_i},wi={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"},bi=e.createElementVNode("path",{d:"M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25"},null,-1),Ei=[bi];function Vi(n,t){return e.openBlock(),e.createElementBlock("svg",wi,[...Ei])}const Ni={render:Vi},Si={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"},Bi=e.createElementVNode("path",{d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25zm0 9.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18zM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25zm0 9.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18z"},null,-1),$i=[Bi];function Ci(n,t){return e.openBlock(),e.createElementBlock("svg",Si,[...$i])}const Di={render:Ci},Ti={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"},Mi=e.createElementVNode("path",{d:"M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 0 1 0 3.75H5.625a1.875 1.875 0 0 1 0-3.75"},null,-1),Ai=[Mi];function Li(n,t){return e.openBlock(),e.createElementBlock("svg",Ti,[...Ai])}const Oi={render:Li},Fi={class:"border-neutral-300 flex justify-between items-center py-1 text-sm grow-0"},Ri={key:0,class:"flex text-center"},Hi=["title"],zi=["title"],Ii=["title"],ji=["title"],Ui=["title"],qi=["title"],Pi=["title"],Gi={key:1,class:"flex text-center"},Ki={class:"pl-2"},Wi={class:"dark:bg-gray-700 bg-gray-200 text-xs px-2 py-1 rounded"},Yi={class:"flex text-center items-center justify-end"},Xi=["title"],Ji=["title"],Qi={__name:"Toolbar",setup(n){const t=e.inject("ServiceContainer"),{setStore:o}=t.storage,{t:s}=t.i18n,r=t.dragSelect,c=e.ref("");t.emitter.on("vf-search-query",({newQuery:l})=>{c.value=l});const a=()=>{t.fullScreen=!t.fullScreen};e.watch(()=>t.fullScreen,()=>{t.fullScreen?document.querySelector("body").style.overflow="hidden":document.querySelector("body").style.overflow="",o("full-screen",t.fullScreen),t.emitter.emit("vf-fullscreen-toggle")});const i=()=>{t.view=t.view==="list"?"grid":"list",r.refreshSelection(),o("viewport",t.view)};return(l,d)=>(e.openBlock(),e.createElementBlock("div",Fi,[c.value.length?(e.openBlock(),e.createElementBlock("div",Gi,[e.createElementVNode("div",Ki,[e.createTextVNode(e.toDisplayString(e.unref(s)("Search results for"))+" ",1),e.createElementVNode("span",Wi,e.toDisplayString(c.value),1)]),e.unref(t).fs.loading?(e.openBlock(),e.createBlock(e.unref(An),{key:0})):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",Ri,[e.unref(t).features.includes(e.unref(ne).NEW_FOLDER)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mx-1.5",title:e.unref(s)("New Folder"),onClick:d[0]||(d[0]=f=>e.unref(t).modal.open(nr,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(tr))],8,Hi)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(ne).NEW_FILE)?(e.openBlock(),e.createElementBlock("div",{key:1,class:"mx-1.5",title:e.unref(s)("New File"),onClick:d[1]||(d[1]=f=>e.unref(t).modal.open(uc,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(or))],8,zi)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(ne).RENAME)?(e.openBlock(),e.createElementBlock("div",{key:2,class:"mx-1.5",title:e.unref(s)("Rename"),onClick:d[2]||(d[2]=f=>e.unref(r).getCount()!==1||e.unref(t).modal.open(Mn,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(er),{class:e.normalizeClass(e.unref(r).getCount()===1?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,Ii)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(ne).DELETE)?(e.openBlock(),e.createElementBlock("div",{key:3,class:"mx-1.5",title:e.unref(s)("Delete"),onClick:d[3]||(d[3]=f=>!e.unref(r).getCount()||e.unref(t).modal.open(Tn,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(Zo),{class:e.normalizeClass(e.unref(r).getCount()?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,ji)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(ne).UPLOAD)?(e.openBlock(),e.createElementBlock("div",{key:4,class:"mx-1.5",title:e.unref(s)("Upload"),onClick:d[4]||(d[4]=f=>e.unref(t).modal.open(Ac,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(rr))],8,Ui)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(ne).UNARCHIVE)&&e.unref(r).getCount()===1&&e.unref(r).getSelected()[0].mime_type==="application/zip"?(e.openBlock(),e.createElementBlock("div",{key:5,class:"mx-1.5",title:e.unref(s)("Unarchive"),onClick:d[5]||(d[5]=f=>!e.unref(r).getCount()||e.unref(t).modal.open(lr,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(sr),{class:e.normalizeClass(e.unref(r).getCount()?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,qi)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(ne).ARCHIVE)?(e.openBlock(),e.createElementBlock("div",{key:6,class:"mx-1.5",title:e.unref(s)("Archive"),onClick:d[6]||(d[6]=f=>!e.unref(r).getCount()||e.unref(t).modal.open(cr,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(ar),{class:e.normalizeClass(e.unref(r).getCount()?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,Pi)):e.createCommentVNode("",!0)])),e.createElementVNode("div",Yi,[e.unref(t).features.includes(e.unref(ne).FULL_SCREEN)?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:a,class:"mx-1.5",title:e.unref(s)("Toggle Full Screen")},[e.unref(t).fullScreen?(e.openBlock(),e.createBlock(e.unref(Ni),{key:0})):(e.openBlock(),e.createBlock(e.unref(xi),{key:1}))],8,Xi)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"mx-1.5",title:e.unref(s)("Change View"),onClick:d[7]||(d[7]=f=>c.value.length||i())},[e.unref(t).view==="grid"?(e.openBlock(),e.createBlock(e.unref(Di),{key:0,class:e.normalizeClass(c.value.length?"vf-toolbar-icon-disabled":"vf-toolbar-icon")},null,8,["class"])):e.createCommentVNode("",!0),e.unref(t).view==="list"?(e.openBlock(),e.createBlock(e.unref(Oi),{key:1,class:e.normalizeClass(c.value.length?"vf-toolbar-icon-disabled":"vf-toolbar-icon")},null,8,["class"])):e.createCommentVNode("",!0)],8,Ji)])]))}},Zi=(n,t=0,o=!1)=>{let s;return(...r)=>{o&&!s&&n(...r),clearTimeout(s),s=setTimeout(()=>{n(...r)},t)}},ao=(n,t,o)=>{const s=e.ref(n);return e.customRef((r,c)=>({get(){return r(),s.value},set:Zi(a=>{s.value=a,c()},t,o)}))},ed={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",viewBox:"0 0 24 24"},td=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3"},null,-1),nd=[td];function od(n,t){return e.openBlock(),e.createElementBlock("svg",ed,[...nd])}const rd={render:od},sd={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},ld={class:"text-sm text-gray-500 pb-1"},ad={class:"max-h-[200px] overflow-y-auto vf-scrollbar text-left"},cd={class:"flex text-sm text-gray-800 dark:text-gray-400"},id={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},dd=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1),ud=[dd],md={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},fd=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1),pd=[fd],hd={class:"ml-1.5"},vd={class:"font-bold text-xs text-gray-700 dark:text-gray-500 mt-3 tracking-wider"},gd={class:"flex text-sm text-gray-800 dark:text-gray-400 border dark:border-gray-700 p-1 rounded"},kd=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})],-1),yd={class:"ml-1.5 overflow-auto"},_d={class:"m-1 mr-auto font-bold text-gray-500 text-sm dark:text-gray-200 self-center"},kn={__name:"ModalMove",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(t.modal.data.items.from),r=e.ref(""),c=()=>{s.value.length&&t.emitter.emit("vf-fetch",{params:{q:"move",m:"post",adapter:t.fs.adapter,path:t.fs.data.dirname},body:{items:s.value.map(({path:a,type:i})=>({path:a,type:i})),item:t.modal.data.items.to.path},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:o("Files moved.",t.modal.data.items.to.name)})},onError:a=>{r.value=o(a.message)}})};return(a,i)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:c,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Yes, Move!")),1),e.createElementVNode("button",{type:"button",onClick:i[1]||(i[1]=l=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1),e.createElementVNode("div",_d,e.toDisplayString(e.unref(o)("%s item(s) selected.",s.value.length)),1)]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(Oe,{icon:e.unref(rd),title:e.unref(o)("Move files")},null,8,["icon","title"]),e.createElementVNode("div",sd,[e.createElementVNode("p",ld,e.toDisplayString(e.unref(o)("Are you sure you want to move these files?")),1),e.createElementVNode("div",ad,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,l=>(e.openBlock(),e.createElementBlock("div",cd,[e.createElementVNode("div",null,[l.type==="dir"?(e.openBlock(),e.createElementBlock("svg",id,ud)):(e.openBlock(),e.createElementBlock("svg",md,pd))]),e.createElementVNode("div",hd,e.toDisplayString(l.path),1)]))),256))]),e.createElementVNode("h4",vd,e.toDisplayString(e.unref(o)("Target Directory")),1),e.createElementVNode("p",gd,[kd,e.createElementVNode("span",yd,e.toDisplayString(e.unref(t).modal.data.items.to.path),1)]),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:i[0]||(i[0]=l=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])]),_:1}))}},xd={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-6 w-6 p-1 rounded text-slate-700 hover:bg-neutral-300 dark:text-neutral-200 dark:hover:bg-gray-700 cursor-pointer",viewBox:"-40 -40 580 580"},wd=e.createElementVNode("path",{d:"M463.5 224h8.5c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2S461.9 48.1 455 55l-41.6 41.6c-87.6-86.5-228.7-86.2-315.8 1-87.5 87.5-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2S334.3 224 344 224z"},null,-1),bd=[wd];function Ed(n,t){return e.openBlock(),e.createElementBlock("svg",xd,[...bd])}const Vd={render:Ed},Nd={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-6 w-6 p-0.5 rounded",viewBox:"0 0 20 20"},Sd=e.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.293 9.707a1 1 0 0 1 0-1.414l4-4a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1-1.414 1.414L11 7.414V15a1 1 0 1 1-2 0V7.414L6.707 9.707a1 1 0 0 1-1.414 0",class:"pointer-events-none","clip-rule":"evenodd"},null,-1),Bd=[Sd];function $d(n,t){return e.openBlock(),e.createElementBlock("svg",Nd,[...Bd])}const Cd={render:$d},Dd={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"h-6 w-6 p-1 rounded text-slate-700 hover:bg-neutral-300 dark:text-neutral-200 dark:hover:bg-gray-700 cursor-pointer",viewBox:"0 0 24 24"},Td=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"},null,-1),Md=[Td];function Ad(n,t){return e.openBlock(),e.createElementBlock("svg",Dd,[...Md])}const Ld={render:Ad},Od={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-6 w-6 p-1 rounded text-slate-700 hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-gray-800 cursor-pointer",viewBox:"0 0 20 20"},Fd=e.createElementVNode("path",{d:"M10.707 2.293a1 1 0 0 0-1.414 0l-7 7a1 1 0 0 0 1.414 1.414L4 10.414V17a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-6.586l.293.293a1 1 0 0 0 1.414-1.414z",class:"pointer-events-none"},null,-1),Rd=[Fd];function Hd(n,t){return e.openBlock(),e.createElementBlock("svg",Od,[...Rd])}const zd={render:Hd},Id={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-6 w-6 p-1 m-auto stroke-gray-400 fill-gray-100 dark:stroke-gray-400 dark:fill-gray-400/20",viewBox:"0 0 20 20"},jd=e.createElementVNode("path",{d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607"},null,-1),Ud=[jd];function qd(n,t){return e.openBlock(),e.createElementBlock("svg",Id,[...Ud])}const Pd={render:qd},Gd={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"w-6 h-6 cursor-pointer",viewBox:"0 0 24 24"},Kd=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"},null,-1),Wd=[Kd];function Yd(n,t){return e.openBlock(),e.createElementBlock("svg",Gd,[...Wd])}const Xd={render:Yd},Jd={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",class:"text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",viewBox:"0 0 24 24"},Qd=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-6l-2-2H5a2 2 0 0 0-2 2"},null,-1),Zd=[Qd];function eu(n,t){return e.openBlock(),e.createElementBlock("svg",Jd,[...Zd])}const It={render:eu},tu={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",class:"h-6 w-6 p-1 rounded text-slate-700 dark:text-neutral-300 cursor-pointer",viewBox:"0 0 24 24"},nu=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),ou=e.createElementVNode("path",{d:"M9 6h11M12 12h8M15 18h5M5 6v.01M8 12v.01M11 18v.01"},null,-1),ru=[nu,ou];function su(n,t){return e.openBlock(),e.createElementBlock("svg",tu,[...ru])}const lu={render:su},au={xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 rounded text-slate-700 hover:bg-neutral-100 dark:fill-neutral-300 dark:hover:bg-gray-800 cursor-pointer",viewBox:"0 0 448 512"},cu=e.createElementVNode("path",{d:"M8 256a56 56 0 1 1 112 0 56 56 0 1 1-112 0m160 0a56 56 0 1 1 112 0 56 56 0 1 1-112 0m216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112"},null,-1),iu=[cu];function du(n,t){return e.openBlock(),e.createElementBlock("svg",au,[...iu])}const uu={render:du},mu={class:"space-x-0.5 flex p-1.5 bg-neutral-100 dark:bg-gray-800 border-t border-b border-neutral-300 dark:border-gray-700/50 items-center select-none text-sm grow-0"},fu=["title"],pu=["title"],hu=["title"],vu=["title"],gu={class:"flex leading-6"},ku={key:0,class:"flex"},yu=e.createElementVNode("div",{class:"text-neutral-300 dark:text-gray-600 mx-0.5"},"/",-1),_u={class:"relative"},xu=e.createElementVNode("span",{class:"text-neutral-300 dark:text-gray-600 mx-0.5"},"/",-1),wu=["onDragover","onDragleave","onDrop","title","onClick"],bu={class:"relative flex bg-white dark:bg-gray-700 justify-between items-center rounded p-1 ml-2 w-full"},Eu=["placeholder"],Vu={class:"z-30 absolute top-[65px] md:top-[75px] left-[90px] rounded -mx-1.5 mt-1 bg-neutral-50 dark:bg-gray-800 max-w-80 max-h-50 shadow overflow-y-auto text-gray-700 dark:text-gray-200 border border-neutral-300 dark:border-gray-600"},Nu=["onDrop","onClick"],Su={class:"flex pointer-events-none"},Bu={class:"inline-block w-full text-ellipsis overflow-hidden"},$u={__name:"Breadcrumb",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=t.dragSelect,{setStore:r}=t.storage,c=e.ref(null),a=ao(0,100);e.watch(a,B=>{const b=c.value.children;let $=0,E=0,x=5,C=1;t.fs.limitBreadcrumbItems(x),e.nextTick(()=>{for(let _=b.length-1;_>=0&&!($+b[_].offsetWidth>a.value-40);_--)$+=parseInt(b[_].offsetWidth,10),E++;E<C&&(E=C),E>x&&(E=x),t.fs.limitBreadcrumbItems(E)})});const i=()=>{a.value=c.value.offsetWidth};e.onMounted(()=>{new ResizeObserver(i).observe(c.value)});const l=(B,b=null)=>{B.preventDefault(),s.isDraggingRef.value=!1,u(B),b??(b=t.fs.hiddenBreadcrumbs.length-1);let $=JSON.parse(B.dataTransfer.getData("items"));if($.find(E=>E.storage!==t.fs.adapter)){alert("Moving items between different storages is not supported yet.");return}t.modal.open(kn,{items:{from:$,to:t.fs.hiddenBreadcrumbs[b]??{path:t.fs.adapter+"://"}}})},d=(B,b=null)=>{B.preventDefault(),s.isDraggingRef.value=!1,u(B),b??(b=t.fs.breadcrumbs.length-2);let $=JSON.parse(B.dataTransfer.getData("items"));if($.find(E=>E.storage!==t.fs.adapter)){alert("Moving items between different storages is not supported yet.");return}t.modal.open(kn,{items:{from:$,to:t.fs.breadcrumbs[b]??{path:t.fs.adapter+"://"}}})},f=B=>{B.preventDefault(),t.fs.isGoUpAvailable()?(B.dataTransfer.dropEffect="copy",B.currentTarget.classList.add("bg-blue-200","dark:bg-slate-600")):(B.dataTransfer.dropEffect="none",B.dataTransfer.effectAllowed="none")},u=B=>{B.preventDefault(),B.currentTarget.classList.remove("bg-blue-200","dark:bg-slate-600"),t.fs.isGoUpAvailable()&&B.currentTarget.classList.remove("bg-blue-200","dark:bg-slate-600")},p=()=>{N(),t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.data.dirname}})},m=()=>{N(),!t.fs.isGoUpAvailable()||t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.parentFolderPath}})},h=B=>{t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:B.path}}),t.fs.toggleHiddenBreadcrumbs(!1)},g=()=>{t.fs.showHiddenBreadcrumbs&&t.fs.toggleHiddenBreadcrumbs(!1)},v={mounted(B,b,$,E){B.clickOutsideEvent=function(x){B===x.target||B.contains(x.target)||b.value()},document.body.addEventListener("click",B.clickOutsideEvent)},beforeUnmount(B,b,$,E){document.body.removeEventListener("click",B.clickOutsideEvent)}},V=()=>{t.showTreeView=!t.showTreeView};e.watch(()=>t.showTreeView,(B,b)=>{B!==b&&r("show-tree-view",B)});const y=e.ref(null),O=()=>{t.features.includes(ne.SEARCH)&&(t.fs.searchMode=!0,e.nextTick(()=>y.value.focus()))},D=ao("",400);e.watch(D,B=>{t.emitter.emit("vf-toast-clear"),t.emitter.emit("vf-search-query",{newQuery:B})}),e.watch(()=>t.fs.searchMode,B=>{B&&e.nextTick(()=>y.value.focus())});const N=()=>{t.fs.searchMode=!1,D.value=""};t.emitter.on("vf-search-exit",()=>{N()});const S=()=>{D.value===""&&N()};return(B,b)=>(e.openBlock(),e.createElementBlock("div",mu,[e.createElementVNode("span",{title:e.unref(o)("Toggle Tree View")},[e.createVNode(e.unref(lu),{onClick:V,class:e.normalizeClass(["h-6 w-6 p-0.5 rounded cursor-pointer text-slate-700",e.unref(t).showTreeView?"bg-gray-300 dark:bg-gray-700":""])},null,8,["class"])],8,fu),e.createElementVNode("span",{title:e.unref(o)("Go up a directory")},[e.createVNode(e.unref(Cd),{onDragover:b[0]||(b[0]=$=>f($)),onDragleave:b[1]||(b[1]=$=>u($)),onDrop:b[2]||(b[2]=$=>d($)),onClick:m,class:e.normalizeClass(e.unref(t).fs.isGoUpAvailable()?"text-slate-700 hover:bg-neutral-300 dark:text-neutral-200 dark:hover:bg-gray-700 cursor-pointer":"text-gray-400 dark:text-neutral-500")},null,8,["class"])],8,pu),e.unref(t).fs.loading?(e.openBlock(),e.createElementBlock("span",{key:1,title:e.unref(o)("Cancel")},[e.createVNode(e.unref(Ld),{onClick:b[3]||(b[3]=$=>e.unref(t).emitter.emit("vf-fetch-abort"))})],8,vu)):(e.openBlock(),e.createElementBlock("span",{key:0,title:e.unref(o)("Refresh")},[e.createVNode(e.unref(Vd),{onClick:p})],8,hu)),e.withDirectives(e.createElementVNode("div",{onClick:e.withModifiers(O,["self"]),class:"group flex bg-white dark:bg-gray-700 items-center rounded p-1 ml-2 w-full overflow-hidden"},[e.createElementVNode("div",null,[e.createVNode(e.unref(zd),{onDragover:b[4]||(b[4]=$=>f($)),onDragleave:b[5]||(b[5]=$=>u($)),onDrop:b[6]||(b[6]=$=>d($,-1)),onClick:b[7]||(b[7]=$=>e.unref(t).emitter.emit("vf-fetch",{params:{q:"index",adapter:e.unref(t).fs.adapter}}))})]),e.createElementVNode("div",gu,[e.unref(t).fs.hiddenBreadcrumbs.length?e.withDirectives((e.openBlock(),e.createElementBlock("div",ku,[yu,e.createElementVNode("div",_u,[e.createElementVNode("span",{onDragenter:b[8]||(b[8]=$=>e.unref(t).fs.toggleHiddenBreadcrumbs(!0)),onClick:b[9]||(b[9]=$=>e.unref(t).fs.toggleHiddenBreadcrumbs()),class:"text-slate-700 dark:text-slate-200 hover:bg-neutral-100 dark:hover:bg-gray-800 rounded cursor-pointer"},[e.createVNode(e.unref(uu),{class:"px-1 pointer-events-none"})],32)])])),[[v,g]]):e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"breadcrumbContainer",ref:c,class:"flex leading-6 w-full overflow-hidden",onClick:e.withModifiers(O,["self"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).fs.breadcrumbs,($,E)=>(e.openBlock(),e.createElementBlock("div",{key:E},[xu,e.createElementVNode("span",{onDragover:x=>E===e.unref(t).fs.breadcrumbs.length-1||f(x),onDragleave:x=>E===e.unref(t).fs.breadcrumbs.length-1||u(x),onDrop:x=>E===e.unref(t).fs.breadcrumbs.length-1||d(x,E),class:"px-1.5 py-1 text-slate-700 dark:text-slate-200 hover:bg-neutral-100 dark:hover:bg-gray-800 rounded cursor-pointer whitespace-nowrap",title:$.basename,onClick:x=>e.unref(t).emitter.emit("vf-fetch",{params:{q:"index",adapter:e.unref(t).fs.adapter,path:$.path}})},e.toDisplayString($.name),41,wu)]))),128))],512),e.unref(t).fs.loading?(e.openBlock(),e.createBlock(e.unref(An),{key:0})):e.createCommentVNode("",!0)],512),[[e.vShow,!e.unref(t).fs.searchMode]]),e.withDirectives(e.createElementVNode("div",bu,[e.createElementVNode("div",null,[e.createVNode(e.unref(Pd))]),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:y,onKeydown:e.withKeys(N,["esc"]),onBlur:S,"onUpdate:modelValue":b[10]||(b[10]=$=>e.isRef(D)?D.value=$:null),placeholder:e.unref(o)("Search anything.."),class:"w-full pb-0 px-1 border-0 text-base ring-0 outline-0 text-gray-600 focus:ring-transparent focus:border-transparent dark:focus:ring-transparent dark:focus:border-transparent dark:text-gray-300 bg-transparent",type:"text"},null,40,Eu),[[e.vModelText,e.unref(D)]]),e.createVNode(e.unref(Xd),{onClick:N})],512),[[e.vShow,e.unref(t).fs.searchMode]]),e.withDirectives(e.createElementVNode("div",Vu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).fs.hiddenBreadcrumbs,($,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,onDragover:b[11]||(b[11]=x=>f(x)),onDragleave:b[12]||(b[12]=x=>u(x)),onDrop:x=>l(x,E),onClick:x=>h($),class:"px-2 py-0.5 hover:bg-gray-400/20 cursor-pointer items-center whitespace-nowrap"},[e.createElementVNode("div",Su,[e.createElementVNode("span",null,[e.createVNode(e.unref(It),{class:"h-5 w-5"})]),e.createTextVNode(),e.createElementVNode("span",Bu,e.toDisplayString($.name),1)])],40,Nu))),128))],512),[[e.vShow,e.unref(t).fs.showHiddenBreadcrumbs]])]))}},ir=(n,t=null)=>new Date(n*1e3).toLocaleString(t??navigator.language??"en-US"),Cu=["onClick"],Du={__name:"Toast",setup(n){const t=e.inject("ServiceContainer"),{getStore:o}=t.storage,s=e.ref(o("full-screen",!1)),r=e.ref([]),c=l=>l==="error"?"text-red-400 border-red-400 dark:text-red-300 dark:border-red-300":"text-lime-600 border-lime-600 dark:text-lime-300 dark:border-lime-1300",a=l=>{r.value.splice(l,1)},i=l=>{let d=r.value.findIndex(f=>f.id===l);d!==-1&&a(d)};return t.emitter.on("vf-toast-clear",()=>{r.value=[]}),t.emitter.on("vf-toast-push",l=>{let d=new Date().getTime().toString(36).concat(performance.now().toString(),Math.random().toString()).replace(/\./g,"");l.id=d,r.value.push(l),setTimeout(()=>{i(d)},5e3)}),(l,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([s.value.value?"fixed":"absolute","max-w-fit flex flex-col bottom-0 left-1/2 -translate-x-1/2 z-10"])},[e.createVNode(e.TransitionGroup,{name:"vf-toast-item","leave-active-class":"transition-all duration-1000","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(f,u)=>(e.openBlock(),e.createElementBlock("div",{onClick:p=>a(u),key:f,class:e.normalizeClass([c(f.type),"inline-block mx-auto my-0.5 py-0.5 px-2 min-w-max bg-gray-50 dark:bg-gray-600 border text-xs sm:text-sm rounded cursor-pointer"])},e.toDisplayString(f.label),11,Cu))),128))]),_:1})],2))}},Tu={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-5 w-5",viewBox:"0 0 20 20"},Mu=e.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 0 1 1.414 0L10 10.586l3.293-3.293a1 1 0 1 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 0-1.414","clip-rule":"evenodd"},null,-1),Au=[Mu];function Lu(n,t){return e.openBlock(),e.createElementBlock("svg",Tu,[...Au])}const Ou={render:Lu},Fu={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-5 w-5",viewBox:"0 0 20 20"},Ru=e.createElementVNode("path",{"fill-rule":"evenodd",d:"M14.707 12.707a1 1 0 0 1-1.414 0L10 9.414l-3.293 3.293a1 1 0 0 1-1.414-1.414l4-4a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1 0 1.414","clip-rule":"evenodd"},null,-1),Hu=[Ru];function zu(n,t){return e.openBlock(),e.createElementBlock("svg",Fu,[...Hu])}const Iu={render:zu},wt={__name:"SortIcon",props:{direction:String},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",null,[n.direction==="asc"?(e.openBlock(),e.createBlock(e.unref(Ou),{key:0})):e.createCommentVNode("",!0),n.direction==="desc"?(e.openBlock(),e.createBlock(e.unref(Iu),{key:1})):e.createCommentVNode("",!0)]))}},ju={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",class:"text-neutral-500",viewBox:"0 0 24 24"},Uu=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 0 0 2-2V9.414a1 1 0 0 0-.293-.707l-5.414-5.414A1 1 0 0 0 12.586 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2"},null,-1),qu=[Uu];function Pu(n,t){return e.openBlock(),e.createElementBlock("svg",ju,[...qu])}const Gu={render:Pu},Jt={__name:"ItemIcon",props:{type:{type:String,required:!0},small:{type:Boolean,default:!1}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("span",null,[n.type==="dir"?(e.openBlock(),e.createBlock(e.unref(It),{key:0,class:e.normalizeClass({"h-5 w-5":n.small,"h-10 w-10 md:h-12 md:w-12 m-auto":!n.small})},null,8,["class"])):(e.openBlock(),e.createBlock(e.unref(Gu),{key:1,class:e.normalizeClass({"h-5 w-5":n.small,"h-10 w-10 md:h-12 md:w-12 m-auto":!n.small})},null,8,["class"]))]))}},Ku={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",class:"absolute h-6 w-6 md:h-12 md:w-12 m-auto stroke-neutral-500 fill-white dark:fill-gray-700 dark:stroke-gray-600 z-10",viewBox:"0 0 24 24"},Wu=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 0 0 2-2V9.414a1 1 0 0 0-.293-.707l-5.414-5.414A1 1 0 0 0 12.586 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2"},null,-1),Yu=[Wu];function Xu(n,t){return e.openBlock(),e.createElementBlock("svg",Ku,[...Yu])}const Ju={render:Xu},Qu={class:"absolute -z-50 -top-96"},Zu={class:"text-neutral-700 dark:text-neutral-300 p-1 absolute text-center top-4 right-[-2rem] md:top-5 md:right-[-2.4rem] z-20 text-xs"},em={__name:"DragItem",props:{count:{type:Number,default:0}},setup(n){const t=n;return(o,s)=>(e.openBlock(),e.createElementBlock("div",Qu,[e.createVNode(e.unref(Ju)),e.createElementVNode("div",Zu,e.toDisplayString(t.count),1)]))}},tm={class:"flex"},nm=["title"],om={class:"ml-auto mb-2"},rm={key:0,class:"p-2 border font-normal whitespace-pre-wrap border-gray-200 dark:border-gray-700/50 dark:text-gray-200 rounded min-h-[200px] max-h-[60vh] text-xs overflow-auto"},sm={key:1},lm={__name:"Text",emits:["success"],setup(n,{emit:t}){const o=t,s=e.ref(""),r=e.ref(""),c=e.ref(null),a=e.ref(!1),i=e.ref(""),l=e.ref(!1),d=e.inject("ServiceContainer"),{t:f}=d.i18n;e.onMounted(()=>{d.requester.send({url:"",method:"get",params:{q:"preview",adapter:d.modal.data.adapter,path:d.modal.data.item.path},responseType:"text"}).then(m=>{s.value=m,o("success")})});const u=()=>{a.value=!a.value,r.value=s.value},p=()=>{i.value="",l.value=!1,d.requester.send({url:"",method:"post",params:{q:"save",adapter:d.modal.data.adapter,path:d.modal.data.item.path},body:{content:r.value},responseType:"text"}).then(m=>{i.value=f("Updated."),s.value=m,o("success"),a.value=!a.value}).catch(m=>{i.value=f(m.message),l.value=!0})};return(m,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",tm,[e.createElementVNode("div",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title",title:e.unref(d).modal.data.item.path},e.toDisplayString(e.unref(d).modal.data.item.basename),9,nm),e.createElementVNode("div",om,[a.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:p,class:"ml-1 px-2 py-1 rounded border border-transparent shadow-sm bg-blue-700/75 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-700/50 text-base font-medium text-white sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(f)("Save")),1)):e.createCommentVNode("",!0),e.unref(d).features.includes(e.unref(ne).EDIT)?(e.openBlock(),e.createElementBlock("button",{key:1,class:"ml-1 px-2 py-1 text-blue-500",onClick:h[0]||(h[0]=g=>u())},e.toDisplayString(a.value?e.unref(f)("Cancel"):e.unref(f)("Edit")),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",null,[a.value?(e.openBlock(),e.createElementBlock("div",sm,[e.withDirectives(e.createElementVNode("textarea",{ref_key:"editInput",ref:c,"onUpdate:modelValue":h[1]||(h[1]=g=>r.value=g),class:"w-full p-2 rounded dark:bg-gray-700 dark:text-gray-200 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:selection:bg-gray-500 min-h-[200px] max-h-[60vh]",name:"text",id:"",cols:"30",rows:"10"},null,512),[[e.vModelText,r.value]])])):(e.openBlock(),e.createElementBlock("pre",rm,e.toDisplayString(s.value),1)),i.value.length?(e.openBlock(),e.createBlock(De,{key:2,onHidden:h[2]||(h[2]=g=>i.value=""),error:l.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value),1)]),_:1},8,["error"])):e.createCommentVNode("",!0)])],64))}},am={class:"flex"},cm=["title"],im={class:"ml-auto mb-2"},dm={class:"w-full flex justify-center"},um=["src"],mm={__name:"Image",emits:["success"],setup(n,{emit:t}){const o=t,s=e.inject("ServiceContainer"),{t:r}=s.i18n,c=e.ref(null),a=e.ref(null),i=e.ref(!1),l=e.ref(""),d=e.ref(!1),f=()=>{i.value=!i.value,i.value?a.value=new Br(c.value,{crop(p){}}):a.value.destroy()},u=()=>{a.value.getCroppedCanvas({width:795,height:341}).toBlob(p=>{l.value="",d.value=!1;const m=new FormData;m.set("file",p),s.requester.send({url:"",method:"post",params:{q:"upload",adapter:s.modal.data.adapter,path:s.modal.data.item.path},body:m}).then(h=>{l.value=r("Updated."),c.value.src=s.requester.getPreviewUrl(s.modal.data.adapter,s.modal.data.item),f(),o("success")}).catch(h=>{l.value=r(h.message),d.value=!0})})};return e.onMounted(()=>{o("success")}),(p,m)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",am,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title",title:e.unref(s).modal.data.item.path},e.toDisplayString(e.unref(s).modal.data.item.basename),9,cm),e.createElementVNode("div",im,[i.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:u,class:"ml-1 px-2 py-1 rounded border border-transparent shadow-sm bg-blue-700/75 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-700/50 text-base font-medium text-white sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(r)("Crop")),1)):e.createCommentVNode("",!0),e.unref(s).features.includes(e.unref(ne).EDIT)?(e.openBlock(),e.createElementBlock("button",{key:1,class:"ml-1 px-2 py-1 text-blue-500",onClick:m[0]||(m[0]=h=>f())},e.toDisplayString(i.value?e.unref(r)("Cancel"):e.unref(r)("Edit")),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",dm,[e.createElementVNode("img",{ref_key:"image",ref:c,class:"max-w-[50vh] max-h-[50vh]",src:e.unref(s).requester.getPreviewUrl(e.unref(s).modal.data.adapter,e.unref(s).modal.data.item),alt:""},null,8,um)]),l.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:m[1]||(m[1]=h=>l.value=""),error:d.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value),1)]),_:1},8,["error"])):e.createCommentVNode("",!0)],64))}},fm={class:"flex"},pm=["title"],hm=e.createElementVNode("div",null,null,-1),vm={__name:"Default",emits:["success"],setup(n,{emit:t}){const o=e.inject("ServiceContainer"),s=t;return e.onMounted(()=>{s("success")}),(r,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",fm,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title",title:e.unref(o).modal.data.item.path},e.toDisplayString(e.unref(o).modal.data.item.basename),9,pm)]),hm],64))}},gm=["title"],km={class:"w-full aspect-video",preload:"",controls:""},ym=["src"],_m={__name:"Video",emits:["success"],setup(n,{emit:t}){const o=e.inject("ServiceContainer"),s=t,r=()=>o.requester.getPreviewUrl(o.modal.data.adapter,o.modal.data.item);return e.onMounted(()=>{s("success")}),(c,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title",title:e.unref(o).modal.data.item.path},e.toDisplayString(e.unref(o).modal.data.item.basename),9,gm),e.createElementVNode("div",null,[e.createElementVNode("video",km,[e.createElementVNode("source",{src:r(),type:"video/mp4"},null,8,ym),e.createTextVNode(" Your browser does not support the video tag. ")])])]))}},xm=["title"],wm={class:"w-full",controls:""},bm=["src"],Em={__name:"Audio",emits:["success"],setup(n,{emit:t}){const o=t,s=e.inject("ServiceContainer"),r=()=>s.requester.getPreviewUrl(s.modal.data.adapter,s.modal.data.item);return e.onMounted(()=>{o("success")}),(c,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title",title:e.unref(s).modal.data.item.path},e.toDisplayString(e.unref(s).modal.data.item.basename),9,xm),e.createElementVNode("div",null,[e.createElementVNode("audio",wm,[e.createElementVNode("source",{src:r(),type:"audio/mpeg"},null,8,bm),e.createTextVNode(" Your browser does not support the audio element. ")])])],64))}},Vm=["title"],Nm=["data"],Sm=["src"],Bm=e.createElementVNode("p",null,[e.createTextVNode(" Your browser does not support PDFs. "),e.createElementVNode("a",{href:"https://example.com/test.pdf"},"Download the PDF"),e.createTextVNode(" . ")],-1),$m=[Bm],Cm={__name:"Pdf",emits:["success"],setup(n,{emit:t}){const o=e.inject("ServiceContainer"),s=t,r=()=>o.requester.getPreviewUrl(o.modal.data.adapter,o.modal.data.item);return e.onMounted(()=>{s("success")}),(c,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title",title:e.unref(o).modal.data.item.path},e.toDisplayString(e.unref(o).modal.data.item.basename),9,Vm),e.createElementVNode("div",null,[e.createElementVNode("object",{class:"h-[60vh]",data:r(),type:"application/pdf",width:"100%",height:"100%"},[e.createElementVNode("iframe",{class:"border-0",src:r(),width:"100%",height:"100%"},$m,8,Sm)],8,Nm)])],64))}},Dm={class:"mt-3 sm:mt-0 sm:text-left w-full"},Tm={key:0},Mm={class:"text-gray-700 dark:text-gray-200 text-sm"},Am={key:0,class:"flex leading-5"},Lm=e.createElementVNode("svg",{class:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e.createElementVNode("circle",{class:"opacity-25 stroke-blue-900 dark:stroke-blue-100",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1),Om={class:"py-2 flex font-normal break-all text-gray-800 dark:text-gray-200 rounded text-xs"},Fm={class:"font-bold"},Rm={class:"font-bold pl-2"},Hm={key:0,class:"text-xs text-gray-600 dark:text-gray-400"},zm=["download","href"],dr={__name:"ModalPreview",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(!1),r=a=>(t.modal.data.item.mime_type??"").startsWith(a),c=t.features.includes(ne.PREVIEW);return c||(s.value=!0),(a,i)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:i[6]||(i[6]=l=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Close")),1),e.unref(t).features.includes(e.unref(ne).DOWNLOAD)?(e.openBlock(),e.createElementBlock("a",{key:0,target:"_blank",class:"vf-btn vf-btn-primary",download:e.unref(t).requester.getDownloadUrl(e.unref(t).modal.data.adapter,e.unref(t).modal.data.item),href:e.unref(t).requester.getDownloadUrl(e.unref(t).modal.data.adapter,e.unref(t).modal.data.item)},e.toDisplayString(e.unref(o)("Download")),9,zm)):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("div",Dm,[e.unref(c)?(e.openBlock(),e.createElementBlock("div",Tm,[r("text")?(e.openBlock(),e.createBlock(lm,{key:0,onSuccess:i[0]||(i[0]=l=>s.value=!0)})):r("image")?(e.openBlock(),e.createBlock(mm,{key:1,onSuccess:i[1]||(i[1]=l=>s.value=!0)})):r("video")?(e.openBlock(),e.createBlock(_m,{key:2,onSuccess:i[2]||(i[2]=l=>s.value=!0)})):r("audio")?(e.openBlock(),e.createBlock(Em,{key:3,onSuccess:i[3]||(i[3]=l=>s.value=!0)})):r("application/pdf")?(e.openBlock(),e.createBlock(Cm,{key:4,onSuccess:i[4]||(i[4]=l=>s.value=!0)})):(e.openBlock(),e.createBlock(vm,{key:5,onSuccess:i[5]||(i[5]=l=>s.value=!0)}))])):e.createCommentVNode("",!0),e.createElementVNode("div",Mm,[s.value===!1?(e.openBlock(),e.createElementBlock("div",Am,[Lm,e.createElementVNode("span",null,e.toDisplayString(e.unref(o)("Loading")),1)])):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",Om,[e.createElementVNode("div",null,[e.createElementVNode("span",Fm,e.toDisplayString(e.unref(o)("File Size"))+": ",1),e.createTextVNode(e.toDisplayString(e.unref(t).filesize(e.unref(t).modal.data.item.file_size)),1)]),e.createElementVNode("div",null,[e.createElementVNode("span",Rm,e.toDisplayString(e.unref(o)("Last Modified"))+": ",1),e.createTextVNode(" "+e.toDisplayString(e.unref(ir)(e.unref(t).modal.data.item.last_modified)),1)])]),e.unref(t).features.includes(e.unref(ne).DOWNLOAD)?(e.openBlock(),e.createElementBlock("div",Hm,[e.createElementVNode("span",null,e.toDisplayString(e.unref(o)(`Download doesn't work? You can try right-click "Download" button, select "Save link as...".`)),1)])):e.createCommentVNode("",!0)]),_:1}))}},Im={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",class:"h-5 w-5",viewBox:"0 0 24 24"},jm=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),Um=e.createElementVNode("path",{d:"m15 4.5-4 4L7 10l-1.5 1.5 7 7L14 17l1.5-4 4-4M9 15l-4.5 4.5M14.5 4 20 9.5"},null,-1),qm=[jm,Um];function Pm(n,t){return e.openBlock(),e.createElementBlock("svg",Im,[...qm])}const ur={render:Pm},Gm=["data-type","data-item","data-index"],Qt={__name:"Item",props:{item:{type:Object},index:{type:Number},dragImage:{type:Object}},setup(n){const t=e.inject("ServiceContainer"),o=t.dragSelect,s=n,r=m=>{m.type==="dir"?(t.emitter.emit("vf-search-exit"),t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:m.path}})):t.modal.open(dr,{adapter:t.fs.adapter,item:m})},c={mounted(m,h,g,v){g.props.draggable&&(m.addEventListener("dragstart",V=>a(V,h.value)),m.addEventListener("dragover",V=>l(V,h.value)),m.addEventListener("drop",V=>i(V,h.value)))},beforeUnmount(m,h,g,v){g.props.draggable&&(m.removeEventListener("dragstart",a),m.removeEventListener("dragover",l),m.removeEventListener("drop",i))}},a=(m,h)=>{if(m.altKey||m.ctrlKey||m.metaKey)return m.preventDefault(),!1;o.isDraggingRef.value=!0,m.dataTransfer.setDragImage(s.dragImage.$el,0,15),m.dataTransfer.effectAllowed="all",m.dataTransfer.dropEffect="copy",m.dataTransfer.setData("items",JSON.stringify(o.getSelected()))},i=(m,h)=>{m.preventDefault(),o.isDraggingRef.value=!1;let g=JSON.parse(m.dataTransfer.getData("items"));if(g.find(v=>v.storage!==t.fs.adapter)){alert("Moving items between different storages is not supported yet.");return}t.modal.open(kn,{items:{from:g,to:h}})},l=(m,h)=>{m.preventDefault(),!h||h.type!=="dir"||o.getSelection().find(g=>g===m.currentTarget)?(m.dataTransfer.dropEffect="none",m.dataTransfer.effectAllowed="none"):m.dataTransfer.dropEffect="copy"};let d=null,f=!1;const u=()=>{d&&clearTimeout(d)},p=m=>{if(!f)f=!0,setTimeout(()=>f=!1,300);else return f=!1,r(s.item),clearTimeout(d),!1;d=setTimeout(()=>{const h=new MouseEvent("contextmenu",{bubbles:!0,cancelable:!1,view:window,button:2,buttons:0,clientX:m.target.getBoundingClientRect().x,clientY:m.target.getBoundingClientRect().y});m.target.dispatchEvent(h)},500)};return(m,h)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({opacity:e.unref(o).isDraggingRef.value&&e.unref(o).getSelection().find(g=>m.$el===g)?"0.5 !important":""}),class:e.normalizeClass(["vf-item-"+e.unref(o).explorerId,"relative"]),"data-type":n.item.type,key:n.item.path,"data-item":JSON.stringify(n.item),"data-index":n.index,onDblclick:h[0]||(h[0]=g=>r(n.item)),onTouchstart:h[1]||(h[1]=g=>p(g)),onTouchend:h[2]||(h[2]=g=>u()),onContextmenu:h[3]||(h[3]=e.withModifiers(g=>e.unref(t).emitter.emit("vf-contextmenu-show",{event:g,items:e.unref(o).getSelected(),target:n.item}),["prevent"]))},[e.renderSlot(m.$slots,"default"),e.unref(t).pinnedFolders.find(g=>g.path===n.item.path)?(e.openBlock(),e.createBlock(e.unref(ur),{key:0,class:"absolute top-0 right-0 text-amber-600"})):e.createCommentVNode("",!0)],46,Gm)),[[c,n.item]])}},Km={class:"relative flex-auto flex flex-col"},Wm={key:0,class:"grid grid-cols-12 px-1 bg-neutral-50 dark:bg-gray-800 border-b border-neutral-300 dark:border-gray-700 text-xs select-none divide-x"},Ym={class:"relative"},Xm={class:"grid grid-cols-12 items-center"},Jm={class:"flex col-span-7 items-center"},Qm={class:"overflow-ellipsis overflow-hidden whitespace-nowrap"},Zm={class:"col-span-5 overflow-ellipsis overflow-hidden whitespace-nowrap"},e0={class:"grid grid-cols-12 items-center"},t0={class:"flex col-span-7 items-center"},n0={class:"overflow-ellipsis overflow-hidden whitespace-nowrap"},o0={class:"col-span-2 text-center"},r0={class:"col-span-3 overflow-ellipsis overflow-hidden whitespace-nowrap px-1 md:px-3"},s0={class:"relative"},l0=["data-src","alt"],a0={key:2,class:"absolute hidden md:block top-1/2 w-full text-center text-neutral-500"},c0={class:"break-all"},i0={__name:"Explorer",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=u=>u==null?void 0:u.substring(0,3),r=e.ref(null),c=e.ref(""),a=t.dragSelect;let i;t.emitter.on("vf-fullscreen-toggle",()=>{a.area.value.style.height=null}),t.emitter.on("vf-search-query",({newQuery:u})=>{c.value=u,u?t.emitter.emit("vf-fetch",{params:{q:"search",adapter:t.fs.adapter,path:t.fs.data.dirname,filter:u},onSuccess:p=>{p.files.length||t.emitter.emit("vf-toast-push",{label:o("No search result found.")})}}):t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.data.dirname}})});const l=e.reactive({active:!1,column:"",order:""}),d=(u=!0)=>{let p=[...t.fs.data.files],m=l.column,h=l.order==="asc"?1:-1;if(!u)return p;const g=(v,V)=>typeof v=="string"&&typeof V=="string"?v.toLowerCase().localeCompare(V.toLowerCase()):v<V?-1:v>V?1:0;return l.active&&(p=p.slice().sort((v,V)=>g(v[m],V[m])*h)),p},f=u=>{l.active&&l.column===u?(l.active=l.order==="asc",l.column=u,l.order="desc"):(l.active=!0,l.column=u,l.order="asc")};return e.onMounted(()=>{i=new Sr(a.area.value)}),e.onUpdated(()=>{i.update()}),e.onBeforeUnmount(()=>{i.destroy()}),(u,p)=>(e.openBlock(),e.createElementBlock("div",Km,[e.unref(t).view==="list"||c.value.length?(e.openBlock(),e.createElementBlock("div",Wm,[e.createElementVNode("div",{onClick:p[0]||(p[0]=m=>f("basename")),class:"col-span-7 vf-sort-button"},[e.createTextVNode(e.toDisplayString(e.unref(o)("Name"))+" ",1),e.withDirectives(e.createVNode(wt,{direction:l.order},null,8,["direction"]),[[e.vShow,l.active&&l.column==="basename"]])]),c.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:p[1]||(p[1]=m=>f("file_size")),class:"justify-center col-span-2 vf-sort-button"},[e.createTextVNode(e.toDisplayString(e.unref(o)("Size"))+" ",1),e.withDirectives(e.createVNode(wt,{direction:l.order},null,8,["direction"]),[[e.vShow,l.active&&l.column==="file_size"]])])),c.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:p[2]||(p[2]=m=>f("last_modified")),class:"justify-center col-span-3 vf-sort-button"},[e.createTextVNode(e.toDisplayString(e.unref(o)("Date"))+" ",1),e.withDirectives(e.createVNode(wt,{direction:l.order},null,8,["direction"]),[[e.vShow,l.active&&l.column==="last_modified"]])])),c.value.length?(e.openBlock(),e.createElementBlock("div",{key:2,onClick:p[3]||(p[3]=m=>f("path")),class:"justify-center col-span-5 vf-sort-button"},[e.createTextVNode(e.toDisplayString(e.unref(o)("Filepath"))+" ",1),e.withDirectives(e.createVNode(wt,{direction:l.order},null,8,["direction"]),[[e.vShow,l.active&&l.column==="path"]])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Ym,[e.createVNode(em,{ref_key:"dragImage",ref:r,count:e.unref(a).getCount()},null,8,["count"])]),e.createElementVNode("div",{ref:e.unref(a).scrollBarContainer,class:e.normalizeClass(["vf-explorer-scrollbar-container",[{"grid-view":e.unref(t).view==="grid"},{"search-active":c.value.length}]])},[e.createElementVNode("div",{ref:e.unref(a).scrollBar,class:"w-5 bg-transparent pointer-events-none"},null,512)],2),e.createElementVNode("div",{ref:e.unref(a).area,class:"h-full w-full text-xs p-1 vf-explorer-scrollbar vf-selector-area z-0 overflow-y-auto",onContextmenu:p[4]||(p[4]=e.withModifiers(m=>e.unref(t).emitter.emit("vf-contextmenu-show",{event:m,items:e.unref(a).getSelected()}),["self","prevent"]))},[c.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(d(),(m,h)=>(e.openBlock(),e.createBlock(Qt,{item:m,index:h,dragImage:r.value,class:"vf-item vf-item-list"},{default:e.withCtx(()=>[e.createElementVNode("div",Xm,[e.createElementVNode("div",Jm,[e.createVNode(Jt,{type:m.type,small:e.unref(t).compactListView},null,8,["type","small"]),e.createElementVNode("span",Qm,e.toDisplayString(m.basename),1)]),e.createElementVNode("div",Zm,e.toDisplayString(m.path),1)])]),_:2},1032,["item","index","dragImage"]))),256)):e.createCommentVNode("",!0),e.unref(t).view==="list"&&!c.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(d(),(m,h)=>(e.openBlock(),e.createBlock(Qt,{item:m,index:h,dragImage:r.value,class:"vf-item vf-item-list",draggable:"true",key:m.path},{default:e.withCtx(()=>[e.createElementVNode("div",e0,[e.createElementVNode("div",t0,[e.createVNode(Jt,{type:m.type,small:e.unref(t).compactListView},null,8,["type","small"]),e.createElementVNode("span",n0,e.toDisplayString(m.basename),1)]),e.createElementVNode("div",o0,e.toDisplayString(m.file_size?e.unref(t).filesize(m.file_size):""),1),e.createElementVNode("div",r0,e.toDisplayString(e.unref(ir)(m.last_modified)),1)])]),_:2},1032,["item","index","dragImage"]))),128)):e.createCommentVNode("",!0),e.unref(t).view==="grid"&&!c.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(d(!1),(m,h)=>(e.openBlock(),e.createBlock(Qt,{item:m,index:h,dragImage:r.value,class:"vf-item vf-item-grid",draggable:"true"},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("div",s0,[(m.mime_type??"").startsWith("image")&&e.unref(t).showThumbnails?(e.openBlock(),e.createElementBlock("img",{src:"data:image/png;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",class:"lazy h-10 md:h-12 m-auto","data-src":e.unref(t).requester.getPreviewUrl(e.unref(t).fs.adapter,m),alt:m.basename,key:m.path},null,8,l0)):(e.openBlock(),e.createBlock(Jt,{key:1,type:m.type},null,8,["type"])),!((m.mime_type??"").startsWith("image")&&e.unref(t).showThumbnails)&&m.type!=="dir"?(e.openBlock(),e.createElementBlock("div",a0,e.toDisplayString(s(m.extension)),1)):e.createCommentVNode("",!0)]),e.createElementVNode("span",c0,e.toDisplayString(e.unref(gn)(m.basename)),1)])]),_:2},1032,["item","index","dragImage"]))),256)):e.createCommentVNode("",!0)],544),e.createVNode(Du)]))}},d0=["href","download"],u0=["onClick"],m0={__name:"ContextMenu",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(null),r=e.ref([]),c=e.ref(""),a=e.reactive({active:!1,items:[],positions:{left:0,top:0}}),i=e.computed(()=>a.items.filter(u=>u.key==null||t.features.includes(u.key)));t.emitter.on("vf-context-selected",u=>{r.value=u});const l={newfolder:{key:ne.NEW_FOLDER,title:()=>o("New Folder"),action:()=>t.modal.open(nr)},selectAll:{title:()=>o("Select All"),action:()=>t.dragSelect.selectAll()},pinFolder:{title:()=>o("Pin Folder"),action:()=>{t.pinnedFolders=t.pinnedFolders.concat(r.value),t.storage.setStore("pinned-folders",t.pinnedFolders)}},unpinFolder:{title:()=>o("Unpin Folder"),action:()=>{t.pinnedFolders=t.pinnedFolders.filter(u=>!r.value.find(p=>p.path===u.path)),t.storage.setStore("pinned-folders",t.pinnedFolders)}},delete:{key:ne.DELETE,title:()=>o("Delete"),action:()=>{t.modal.open(Tn,{items:r})}},refresh:{title:()=>o("Refresh"),action:()=>{t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.data.dirname}})}},preview:{key:ne.PREVIEW,title:()=>o("Preview"),action:()=>t.modal.open(dr,{adapter:t.fs.adapter,item:r.value[0]})},open:{title:()=>o("Open"),action:()=>{t.emitter.emit("vf-search-exit"),t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:r.value[0].path}})}},openDir:{title:()=>o("Open containing folder"),action:()=>{t.emitter.emit("vf-search-exit"),t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:r.value[0].dir}})}},download:{key:ne.DOWNLOAD,link:e.computed(()=>t.requester.getDownloadUrl(t.fs.adapter,r.value[0])),title:()=>o("Download"),action:()=>{}},archive:{key:ne.ARCHIVE,title:()=>o("Archive"),action:()=>t.modal.open(cr,{items:r})},unarchive:{key:ne.UNARCHIVE,title:()=>o("Unarchive"),action:()=>t.modal.open(lr,{items:r})},rename:{key:ne.RENAME,title:()=>o("Rename"),action:()=>t.modal.open(Mn,{items:r})}},d=u=>{t.emitter.emit("vf-contextmenu-hide"),u.action()};t.emitter.on("vf-search-query",({newQuery:u})=>{c.value=u}),t.emitter.on("vf-contextmenu-show",({event:u,items:p,target:m=null})=>{if(a.items=[],c.value)if(m)a.items.push(l.openDir),t.emitter.emit("vf-context-selected",[m]);else return;else!m&&!c.value?(a.items.push(l.refresh),a.items.push(l.selectAll),a.items.push(l.newfolder),t.emitter.emit("vf-context-selected",[])):p.length>1&&p.some(h=>h.path===m.path)?(a.items.push(l.refresh),a.items.push(l.archive),a.items.push(l.delete),t.emitter.emit("vf-context-selected",p)):(m.type==="dir"?(a.items.push(l.open),t.pinnedFolders.findIndex(h=>h.path===m.path)!==-1?a.items.push(l.unpinFolder):a.items.push(l.pinFolder)):(a.items.push(l.preview),a.items.push(l.download)),a.items.push(l.rename),m.mime_type==="application/zip"?a.items.push(l.unarchive):a.items.push(l.archive),a.items.push(l.delete),t.emitter.emit("vf-context-selected",[m]));f(u)}),t.emitter.on("vf-contextmenu-hide",()=>{a.active=!1});const f=u=>{const p=t.dragSelect.area.value,m=t.root.getBoundingClientRect(),h=p.getBoundingClientRect();let g=u.clientX-m.left,v=u.clientY-m.top;a.active=!0,e.nextTick(()=>{var D;const V=(D=s.value)==null?void 0:D.getBoundingClientRect();let y=(V==null?void 0:V.height)??0,O=(V==null?void 0:V.width)??0;g=h.right-u.pageX+window.scrollX<O?g-O:g,v=h.bottom-u.pageY+window.scrollY<y?v-y:v,a.positions={left:g+"px",top:v+"px"}})};return(u,p)=>e.withDirectives((e.openBlock(),e.createElementBlock("ul",{ref_key:"contextmenu",ref:s,style:e.normalizeStyle(a.positions),class:"z-30 absolute text-xs bg-neutral-50 dark:bg-gray-800 text-gray-700 dark:text-gray-200 border border-neutral-300 dark:border-gray-600 shadow rounded-sm select-none"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,m=>(e.openBlock(),e.createElementBlock("li",{class:"cursor-pointer hover:bg-neutral-200 dark:hover:bg-gray-700",key:m.title},[m.link?(e.openBlock(),e.createElementBlock("a",{key:0,class:"block pl-2 pr-3 py-2",target:"_blank",href:m.link,download:m.link,onClick:p[0]||(p[0]=h=>e.unref(t).emitter.emit("vf-contextmenu-hide"))},[e.createElementVNode("span",null,e.toDisplayString(m.title()),1)],8,d0)):(e.openBlock(),e.createElementBlock("div",{key:1,class:"pl-2 pr-3 py-1.5",onClick:h=>d(m)},[e.createElementVNode("span",null,e.toDisplayString(m.title()),1)],8,u0))]))),128))],4)),[[e.vShow,a.active]])}},f0={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",class:"h-5 w-5",viewBox:"0 0 24 24"},p0=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"},null,-1),h0=[p0];function v0(n,t){return e.openBlock(),e.createElementBlock("svg",f0,[...h0])}const mr={render:v0},g0={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"2",class:"h-5 w-5 stroke-slate-500 cursor-pointer",viewBox:"0 0 24 24"},k0=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0"},null,-1),y0=[k0];function _0(n,t){return e.openBlock(),e.createElementBlock("svg",g0,[...y0])}const x0={render:_0},w0={class:"p-1 text-xs border-t border-neutral-300 dark:border-gray-700/50 flex justify-between select-none grow-0"},b0={class:"flex leading-5 items-center"},E0=["title"],V0={class:"z-[1] pointer-events-none"},N0=["value"],S0={class:"ml-3"},B0={key:0},$0={class:"ml-1"},C0={class:"flex leading-5 items-center justify-end"},D0=["disabled"],T0=["title"],M0={__name:"Statusbar",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,{setStore:s}=t.storage,r=t.dragSelect,c=()=>{t.emitter.emit("vf-search-exit"),t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter}}),s("adapter",t.fs.adapter)},a=e.ref("");t.emitter.on("vf-search-query",({newQuery:l})=>{a.value=l});const i=e.computed(()=>{const l=t.selectButton.multiple?r.getSelected().length>0:r.getSelected().length===1;return t.selectButton.active&&l});return(l,d)=>(e.openBlock(),e.createElementBlock("div",w0,[e.createElementVNode("div",b0,[e.createElementVNode("div",{class:"flex leading-5 items-center rounded border dark:bg-gray-700 dark:border-gray-600",title:e.unref(o)("Storage")},[e.createElementVNode("div",V0,[e.createVNode(e.unref(mr))]),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":d[0]||(d[0]=f=>e.unref(t).fs.adapter=f),onChange:c,class:"border-0 py-0.5 text-xs text-slate-500 bg-white dark:text-neutral-50 dark:bg-gray-700 rounded uppercase focus:outline-0 cursor-pointer",tabindex:"-1"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).fs.data.storages,f=>(e.openBlock(),e.createElementBlock("option",{value:f},e.toDisplayString(f),9,N0))),256))],544),[[e.vModelSelect,e.unref(t).fs.adapter]])],8,E0),e.createElementVNode("div",S0,[a.value.length?(e.openBlock(),e.createElementBlock("span",B0,e.toDisplayString(e.unref(t).fs.data.files.length)+" items found. ",1)):e.createCommentVNode("",!0),e.createElementVNode("span",$0,e.toDisplayString(e.unref(t).dragSelect.getCount()>0?e.unref(o)("%s item(s) selected.",e.unref(t).dragSelect.getCount()):""),1)])]),e.createElementVNode("div",C0,[e.unref(t).selectButton.active?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["vf-btn py-0 vf-btn-primary",{disabled:!i.value}]),disabled:!i.value,onClick:d[1]||(d[1]=f=>e.unref(t).selectButton.click(e.unref(r).getSelected(),f))},e.toDisplayString(e.unref(o)("Select")),11,D0)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:"mr-1",title:e.unref(o)("About"),onClick:d[2]||(d[2]=f=>e.unref(t).modal.open(Qo))},[e.createVNode(e.unref(x0))],8,T0)])]))}},A0={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"text-neutral-500 fill-sky-500 stroke-gray-100/50 dark:stroke-slate-700/50 dark:fill-slate-500",viewBox:"0 0 24 24"},L0=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 9.776q.168-.026.344-.026h15.812q.176 0 .344.026m-16.5 0a2.25 2.25 0 0 0-1.883 2.542l.857 6a2.25 2.25 0 0 0 2.227 1.932H19.05a2.25 2.25 0 0 0 2.227-1.932l.857-6a2.25 2.25 0 0 0-1.883-2.542m-16.5 0V6A2.25 2.25 0 0 1 6 3.75h3.879a1.5 1.5 0 0 1 1.06.44l2.122 2.12a1.5 1.5 0 0 0 1.06.44H18A2.25 2.25 0 0 1 20.25 9v.776"},null,-1),O0=[L0];function F0(n,t){return e.openBlock(),e.createElementBlock("svg",A0,[...O0])}const fr={render:F0},R0={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-5 w-5",viewBox:"0 0 24 24"},H0=e.createElementVNode("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),z0=e.createElementVNode("path",{d:"M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2m3.6 5.2a1 1 0 0 0-1.4.2L12 10.333 9.8 7.4a1 1 0 1 0-1.6 1.2l2.55 3.4-2.55 3.4a1 1 0 1 0 1.6 1.2l2.2-2.933 2.2 2.933a1 1 0 0 0 1.6-1.2L13.25 12l2.55-3.4a1 1 0 0 0-.2-1.4"},null,-1),I0=[H0,z0];function j0(n,t){return e.openBlock(),e.createElementBlock("svg",R0,[...I0])}const U0={render:j0},q0={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24"},P0=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),G0=e.createElementVNode("path",{d:"M15 12H9M12 9v6"},null,-1),K0=[P0,G0];function W0(n,t){return e.openBlock(),e.createElementBlock("svg",q0,[...K0])}const pr={render:W0},Y0={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24"},X0=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),J0=e.createElementVNode("path",{d:"M9 12h6"},null,-1),Q0=[X0,J0];function Z0(n,t){return e.openBlock(),e.createElementBlock("svg",Y0,[...Q0])}const hr={render:Z0};function vr(n,t){const o=n.findIndex(s=>s.path===t.path);o>-1?n[o]=t:n.push(t)}const ef={class:"h-5 w-5 shrink-0"},tf={key:1,class:"cursor-pointer"},gr={__name:"FolderLoaderIndicator",props:e.mergeModels({adapter:{type:String,required:!0},path:{type:String,required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const t=n,o=e.inject("ServiceContainer");o.i18n;const s=e.useModel(n,"modelValue"),r=e.ref(!1);e.watch(()=>s.value,()=>{var i;return((i=c())==null?void 0:i.folders.length)||a()});function c(){return o.treeViewData.find(i=>i.path===t.path)}const a=()=>{r.value=!0,o.requester.send({url:"",method:"get",params:{q:"subfolders",adapter:t.adapter,path:t.path}}).then(i=>{vr(o.treeViewData,{path:t.path,...i})}).catch(i=>{}).finally(()=>{r.value=!1})};return(i,l)=>{var d;return e.openBlock(),e.createElementBlock("div",ef,[r.value?(e.openBlock(),e.createBlock(e.unref(An),{key:0,class:"p-1"})):(e.openBlock(),e.createElementBlock("div",tf,[s.value&&((d=c())!=null&&d.folders.length)?(e.openBlock(),e.createBlock(e.unref(hr),{key:0,class:"text-gray-600"})):e.createCommentVNode("",!0),s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(pr),{key:1,class:"text-gray-400"}))]))])}}},nf={class:"block"},of={class:"flex hover:text-sky-700 dark:hover:text-sky-200/50 rounded"},rf=["onClick"],sf=["onClick"],lf={class:"h-5 w-5 shrink-0"},af={class:"pl-4"},cf={__name:"TreeSubfolderList",props:{adapter:{type:String,required:!0},path:{type:String,required:!0}},setup(n){const t=e.inject("ServiceContainer"),o=e.ref([]),s=n,r=e.computed(()=>{var c;return((c=t.treeViewData.find(a=>a.path===s.path))==null?void 0:c.folders)||[]});return(c,a)=>{const i=e.resolveComponent("TreeSubfolderList",!0);return e.openBlock(),e.createElementBlock("ul",nf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(l,d)=>(e.openBlock(),e.createElementBlock("li",{class:"flex flex-col space-x-0.5 py-0.5 text-sm",key:l.path},[e.createElementVNode("div",of,[e.createElementVNode("div",{class:"h-5 w-5 shrink-0",onClick:f=>o.value[l.path]=!o.value[l.path]},[e.createVNode(gr,{adapter:n.adapter,path:l.path,modelValue:o.value[l.path],"onUpdate:modelValue":f=>o.value[l.path]=f},null,8,["adapter","path","modelValue","onUpdate:modelValue"])],8,rf),e.createElementVNode("div",{class:"flex cursor-pointer",onClick:f=>e.unref(t).emitter.emit("vf-fetch",{params:{q:"index",adapter:s.adapter,path:l.path}})},[e.createElementVNode("div",lf,[e.unref(t).fs.path===l.path?(e.openBlock(),e.createBlock(e.unref(fr),{key:0})):(e.openBlock(),e.createBlock(e.unref(It),{key:1}))]),e.createElementVNode("div",{class:e.normalizeClass(["text-nowrap",{"underline decoration-blue-300 dark:decoration-gray-400":e.unref(t).fs.path===l.path}])},e.toDisplayString(l.basename),3)],8,sf)]),e.createElementVNode("div",af,[e.withDirectives(e.createVNode(i,{adapter:s.adapter,path:l.path},null,8,["adapter","path"]),[[e.vShow,o.value[l.path]]])])]))),128))])}}},df={class:"pointer-events-none pr-1"},uf={__name:"TreeStorageItem",props:{storage:{type:String,required:!0}},setup(n){const t=e.inject("ServiceContainer"),o=e.ref(!1);return(s,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{onClick:r[1]||(r[1]=c=>o.value=!o.value),class:"p-1 py-1.5 uppercase font-bold text-gray-400 dark:text-gray-500 text-xs flex justify-between bg-gray-100 dark:bg-[#2e3c51] border-b dark:border-gray-600 cursor-pointer"},[e.createElementVNode("div",{class:e.normalizeClass(["flex flex-1 space-x-1 items-center",n.storage===e.unref(t).fs.adapter?"text-gray-700/80 dark:text-gray-300/80 text-bold":""])},[e.createElementVNode("div",{class:e.normalizeClass(["h-5 w-5 shrink-0",n.storage===e.unref(t).fs.adapter?"text-sky-500 dark:text-slate-300":""])},[e.createVNode(e.unref(mr))],2),e.createElementVNode("div",null,e.toDisplayString(n.storage),1)],2),e.createElementVNode("div",df,[e.createVNode(gr,{adapter:n.storage,path:n.storage+"://",modelValue:o.value,"onUpdate:modelValue":r[0]||(r[0]=c=>o.value=c)},null,8,["adapter","path","modelValue"])])]),e.withDirectives(e.createVNode(cf,{adapter:n.storage,path:n.storage+"://",class:"overflow-x-auto my-1"},null,8,["adapter","path"]),[[e.vShow,o.value]])],64))}},mf={class:"h-5 w-5 shrink-0"},ff={class:"cursor-pointer"},pf={__name:"FolderIndicator",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(n){const t=e.useModel(n,"modelValue");return(o,s)=>(e.openBlock(),e.createElementBlock("div",mf,[e.createElementVNode("div",ff,[t.value?(e.openBlock(),e.createBlock(e.unref(hr),{key:0,class:"text-gray-600"})):e.createCommentVNode("",!0),t.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(pr),{key:1,class:"text-gray-400"}))])]))}},hf={class:"sticky left-0 dark:border-gray-600"},vf={class:"flex items-center space-x-1"},gf={class:"text-nowrap"},kf={key:0,class:"block my-1"},yf={class:"flex pl-2 py-0.5 text-sm justify-between pr-2"},_f=["onClick"],xf=["title"],wf=["onClick"],bf={key:0},Ef={class:"p-1 text-xs text-center"},Vf={__name:"TreeView",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,{getStore:s,setStore:r}=t.storage,c=e.ref(190),a=e.ref(s("pinned-folders-opened",!0));e.watch(a,f=>r("pinned-folders-opened",f));const i=f=>{t.pinnedFolders=t.pinnedFolders.filter(u=>u.path!==f.path),t.storage.setStore("pinned-folders",t.pinnedFolders)},l=f=>{const u=f.clientX,p=f.target.parentElement,m=p.getBoundingClientRect().width;p.classList.remove("transition-[width]"),p.classList.add("transition-none");const h=v=>{c.value=m+v.clientX-u,c.value<50&&(c.value=0,t.showTreeView=!1),c.value>50&&(t.showTreeView=!0)},g=()=>{const v=p.getBoundingClientRect();c.value=v.width,p.classList.add("transition-[width]"),p.classList.remove("transition-none"),window.removeEventListener("mousemove",h),window.removeEventListener("mouseup",g)};window.addEventListener("mousemove",h),window.addEventListener("mouseup",g)},d=e.ref(null);return e.onMounted(()=>{qe(d.value,{})}),e.watch(t.fs.data,(f,u)=>{const p=f.files.filter(m=>m.type==="dir");vr(t.treeViewData,{path:t.fs.path,folders:p.map(m=>({adapter:m.storage,path:m.path,basename:m.basename}))})}),(f,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{onClick:u[0]||(u[0]=p=>e.unref(t).showTreeView=!e.unref(t).showTreeView),class:e.normalizeClass(["w-full h-full bg-gray-300/10 dark:bg-gray-700/10 z-[1]",e.unref(t).showTreeView?"backdrop-blur-sm absolute md:hidden":"hidden"])},null,2),e.createElementVNode("div",{style:e.normalizeStyle(e.unref(t).showTreeView?"min-width:100px;max-width:75%; width: "+c.value+"px":"width: 0"),class:"absolute h-full md:h-auto md:relative shadow-lg shrink-0 transition-[width] ease-in-out duration-200 z-[1] bg-gray-50 dark:bg-[#242f41]"},[e.createElementVNode("div",{ref_key:"treeViewScrollElement",ref:d,class:"h-full border-r dark:border-gray-600/50 pb-4"},[e.createElementVNode("div",hf,[e.createElementVNode("div",{onClick:u[2]||(u[2]=p=>a.value=!a.value),class:"pr-2 bg-gray-100 dark:bg-[#2e3c51] dark:border-gray-600 border-b p-1 py-1.5 uppercase font-bold text-gray-400 dark:text-gray-400 text-xs flex items-center justify-between cursor-pointer"},[e.createElementVNode("div",vf,[e.createVNode(e.unref(ur),{class:"text-amber-600"}),e.createElementVNode("div",gf,e.toDisplayString(e.unref(o)("Pinned Folders")),1)]),e.createVNode(pf,{modelValue:a.value,"onUpdate:modelValue":u[1]||(u[1]=p=>a.value=p)},null,8,["modelValue"])]),a.value?(e.openBlock(),e.createElementBlock("ul",kf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).pinnedFolders,p=>(e.openBlock(),e.createElementBlock("li",yf,[e.createElementVNode("div",{class:"flex hover:text-sky-500 dark:hover:text-sky-200/50 rounded cursor-pointer",onClick:m=>e.unref(t).emitter.emit("vf-fetch",{params:{q:"index",adapter:p.storage,path:p.path}})},[e.unref(t).fs.path!==p.path?(e.openBlock(),e.createBlock(e.unref(It),{key:0,class:"h-5 w-5"})):e.createCommentVNode("",!0),e.unref(t).fs.path===p.path?(e.openBlock(),e.createBlock(e.unref(fr),{key:1,class:"h-5 w-5"})):e.createCommentVNode("",!0),e.createElementVNode("div",{title:p.path,class:e.normalizeClass(["text-nowrap",{"underline decoration-blue-300 dark:decoration-gray-400":e.unref(t).fs.path===p.path}])},e.toDisplayString(p.basename),11,xf)],8,_f),e.createElementVNode("div",{class:"cursor-pointer",onClick:m=>i(p)},[e.createVNode(e.unref(U0),{class:"p-0.5 text-gray-300 hover:text-gray-400 dark:text-gray-600 hover:dark:text-gray-400"})],8,wf)]))),256)),e.unref(t).pinnedFolders.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",bf,[e.createElementVNode("div",Ef,e.toDisplayString(e.unref(o)("No folders pinned")),1)]))])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).fs.data.storages,p=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(uf,{storage:p},null,8,["storage"])]))),256))],512),e.createElementVNode("div",{onMousedown:l,class:e.normalizeClass([(e.unref(t).showTreeView,""),"transition-colors ease-in-out duration-200 top-0 hover:bg-slate-600/10 dark:hover:bg-slate-300/10 w-1 h-full absolute -right-0.5 cursor-ew-resize"])},null,34)],4)],64))}},Nf={class:"relative flex overflow-hidden h-full"},Sf={__name:"VueFinder",props:{id:{type:String,default:"vf"},request:{type:[String,Object],required:!0},persist:{type:Boolean,default:!1},path:{type:String,default:""},features:{type:[Array,Boolean],default:!0},debug:{type:Boolean,default:!1},theme:{type:String,default:"system"},locale:{type:String,default:null},maxHeight:{type:String,default:"600px"},maxFileSize:{type:String,default:"10mb"},fullScreen:{type:Boolean,default:!1},showTreeView:{type:Boolean,default:!1},pinnedFolders:{type:Array,default:[]},showThumbnails:{type:Boolean,default:!0},selectButton:{type:Object,default(n){return{active:!1,multiple:!1,click:t=>{},...n}}}},emits:["select"],setup(n,{emit:t}){const o=t,r=js(n,e.inject("VueFinderOptions"));e.provide("ServiceContainer",r);const{setStore:c}=r.storage,a=e.ref(null);r.root=a;const i=r.dragSelect;Wa(r);const l=f=>{Object.assign(r.fs.data,f),i.clearSelection(),i.refreshSelection()};let d;return r.emitter.on("vf-fetch-abort",()=>{d.abort(),r.fs.loading=!1}),r.emitter.on("vf-fetch",({params:f,body:u=null,onSuccess:p=null,onError:m=null,noCloseModal:h=!1})=>{["index","search"].includes(f.q)&&(d&&d.abort(),r.fs.loading=!0),d=new AbortController;const g=d.signal;r.requester.send({url:"",method:f.m||"get",params:f,body:u,abortSignal:g}).then(v=>{r.fs.adapter=v.adapter,r.persist&&(r.fs.path=v.dirname,c("path",r.fs.path)),["index","search"].includes(f.q)&&(r.fs.loading=!1),h||r.modal.close(),l(v),p&&p(v)}).catch(v=>{console.error(v),m&&m(v)})}),e.onMounted(()=>{let f={};r.fs.path.includes("://")&&(f={adapter:r.fs.path.split("://")[0],path:r.fs.path}),r.emitter.emit("vf-fetch",{params:{q:"index",adapter:r.fs.adapter,...f}}),i.onSelect(u=>{o("select",u)})}),(f,u)=>(e.openBlock(),e.createElementBlock("div",{class:"vuefinder",ref_key:"root",ref:a,tabindex:"0"},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).theme.actualValue)},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(r).fullScreen?"fixed w-screen inset-0 z-20":"relative rounded resize-y ","overflow-hidden min-h-44 border flex flex-col bg-white dark:bg-gray-800 text-gray-700 dark:text-neutral-400 border-neutral-300 dark:border-gray-900 select-none"]),style:e.normalizeStyle(e.unref(r).fullScreen?"":"max-height: "+n.maxHeight),onMousedown:u[0]||(u[0]=p=>e.unref(r).emitter.emit("vf-contextmenu-hide")),onTouchstart:u[1]||(u[1]=p=>e.unref(r).emitter.emit("vf-contextmenu-hide"))},[e.createVNode(Qi),e.createVNode($u),e.createElementVNode("div",Nf,[e.createVNode(Vf),e.createVNode(i0)]),e.createVNode(M0)],38),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[e.unref(r).modal.visible?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(r).modal.type),{key:0})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(m0)],2)],512))}},Bf={install(n,t={}){t.i18n=t.i18n??{};let[o]=Object.keys(t.i18n);t.locale=t.locale??o??"en",n.provide("VueFinderOptions",t),n.component("VueFinder",Sf)}};module.exports=Bf;
9
+ */const ge=(n,t)=>{const{o,i:s,u:r}=n;let c=o,a;const i=(f,u)=>{const p=c,m=f,h=u||(s?!s(p,m):p!==m);return(h||r)&&(c=m,a=p),[c,h,a]};return[t?f=>i(t(c,a),f):i,f=>[c,!!f,a]]},mo=typeof window<"u"&&typeof document<"u",pe=mo?window:{},fo=Math.max,Hr=Math.min,Zt=Math.round,Nt=Math.abs,Hn=Math.sign,po=pe.cancelAnimationFrame,yn=pe.requestAnimationFrame,St=pe.setTimeout,en=pe.clearTimeout,Mt=n=>typeof pe[n]<"u"?pe[n]:void 0,zr=Mt("MutationObserver"),zn=Mt("IntersectionObserver"),Bt=Mt("ResizeObserver"),tn=Mt("ScrollTimeline"),ho=mo&&Node.ELEMENT_NODE,{toString:Cf,hasOwnProperty:Kt}=Object.prototype,At=n=>n===void 0,_n=n=>n===null,Se=n=>typeof n=="number",Lt=n=>typeof n=="string",vo=n=>typeof n=="boolean",we=n=>typeof n=="function",Be=n=>Array.isArray(n),it=n=>typeof n=="object"&&!Be(n)&&!_n(n),Ot=n=>{const t=!!n&&n.length,o=Se(t)&&t>-1&&t%1==0;return Be(n)||!we(n)&&o?t>0&&it(n)?t-1 in n:!0:!1},$t=n=>{if(!n||!it(n))return!1;let t;const o="constructor",s=n[o],r=s&&s.prototype,c=Kt.call(n,o),a=r&&Kt.call(r,"isPrototypeOf");if(s&&!c&&!a)return!1;for(t in n);return At(t)||Kt.call(n,t)},Ct=n=>{const t=HTMLElement;return n?t?n instanceof t:n.nodeType===ho:!1},Ft=n=>{const t=Element;return n?t?n instanceof t:n.nodeType===ho:!1};function Q(n,t){if(Ot(n))for(let o=0;o<n.length&&t(n[o],o,n)!==!1;o++);else n&&Q(Object.keys(n),o=>t(n[o],o,n));return n}const xn=(n,t)=>n.indexOf(t)>=0,Ae=(n,t)=>n.concat(t),se=(n,t,o)=>(!Lt(t)&&Ot(t)?Array.prototype.push.apply(n,t):n.push(t),n),Pe=n=>Array.from(n||[]),go=n=>Be(n)?n:[n],nn=n=>!!n&&!n.length,In=n=>Pe(new Set(n)),be=(n,t,o)=>{Q(n,r=>r&&r.apply(void 0,t||[])),!o&&(n.length=0)},ko="paddingTop",yo="paddingRight",_o="paddingLeft",xo="paddingBottom",wo="marginLeft",bo="marginRight",Eo="marginBottom",Ir="overflowX",jr="overflowY",et="width",tt="height",ze="visible",Ge="hidden",nt="scroll",Ur=n=>{const t=String(n||"");return t?t[0].toUpperCase()+t.slice(1):""},Rt=(n,t,o,s)=>{if(n&&t){let r=!0;return Q(o,c=>{const a=n[c],i=t[c];a!==i&&(r=!1)}),r}return!1},Vo=(n,t)=>Rt(n,t,["w","h"]),bt=(n,t)=>Rt(n,t,["x","y"]),qr=(n,t)=>Rt(n,t,["t","r","b","l"]),Ie=()=>{},U=(n,...t)=>n.bind(0,...t),Ke=n=>{let t;const o=n?St:yn,s=n?en:po;return[r=>{s(t),t=o(()=>r(),we(n)?n():n)},()=>s(t)]},on=(n,t)=>{const{_:o,p:s,v:r,m:c}=t||{};let a,i,l,d,f=Ie;const u=function(v){f(),en(a),d=a=i=void 0,f=Ie,n.apply(this,v)},p=g=>c&&i?c(i,g):g,m=()=>{f!==Ie&&u(p(l)||l)},h=function(){const v=Pe(arguments),V=we(o)?o():o;if(Se(V)&&V>=0){const O=we(s)?s():s,D=Se(O)&&O>=0,N=V>0?St:yn,S=V>0?en:po,b=p(v)||v,$=u.bind(0,b);let E;f(),r&&!d?($(),d=!0,E=N(()=>d=void 0,V)):(E=N($,V),D&&!a&&(a=St(m,O))),f=()=>S(E),i=l=b}else u(v)};return h.S=m,h},No=(n,t)=>Object.prototype.hasOwnProperty.call(n,t),Le=n=>n?Object.keys(n):[],Y=(n,t,o,s,r,c,a)=>{const i=[t,o,s,r,c,a];return(typeof n!="object"||_n(n))&&!we(n)&&(n={}),Q(i,l=>{Q(l,(d,f)=>{const u=l[f];if(n===u)return!0;const p=Be(u);if(u&&$t(u)){const m=n[f];let h=m;p&&!Be(m)?h=[]:!p&&!$t(m)&&(h={}),n[f]=Y(h,u)}else n[f]=p?u.slice():u})}),n},So=(n,t)=>Q(Y({},n),(o,s,r)=>{o===void 0?delete r[s]:o&&$t(o)&&(r[s]=So(o))}),wn=n=>{for(const t in n)return!1;return!0},rn=(n,t,o)=>fo(n,Hr(t,o)),We=n=>Pe(new Set((Be(n)?n:(n||"").split(" ")).filter(t=>t))),bn=(n,t)=>n&&n.getAttribute(t),jn=(n,t)=>n&&n.hasAttribute(t),Me=(n,t,o)=>{Q(We(t),s=>{n&&n.setAttribute(s,String(o||""))})},Ve=(n,t)=>{Q(We(t),o=>n&&n.removeAttribute(o))},Ht=(n,t)=>{const o=We(bn(n,t)),s=U(Me,n,t),r=(c,a)=>{const i=new Set(o);return Q(We(c),l=>{i[a](l)}),Pe(i).join(" ")};return{O:c=>s(r(c,"delete")),$:c=>s(r(c,"add")),C:c=>{const a=We(c);return a.reduce((i,l)=>i&&o.includes(l),a.length>0)}}},Bo=(n,t,o)=>(Ht(n,t).O(o),U(En,n,t,o)),En=(n,t,o)=>(Ht(n,t).$(o),U(Bo,n,t,o)),sn=(n,t,o,s)=>(s?En:Bo)(n,t,o),Vn=(n,t,o)=>Ht(n,t).C(o),$o=n=>Ht(n,"class"),Co=(n,t)=>{$o(n).O(t)},Nn=(n,t)=>($o(n).$(t),U(Co,n,t)),Do=(n,t)=>{const o=[],s=t?Ft(t)&&t:document;return s?se(o,s.querySelectorAll(n)):o},Pr=(n,t)=>{const o=t?Ft(t)&&t:document;return o?o.querySelector(n):null},Dt=(n,t)=>Ft(n)?n.matches(t):!1,To=n=>Dt(n,"body"),ln=n=>n?Pe(n.childNodes):[],ot=n=>n&&n.parentElement,Qe=(n,t)=>Ft(n)&&n.closest(t),an=n=>document.activeElement,Gr=(n,t,o)=>{const s=Qe(n,t),r=n&&Pr(o,s),c=Qe(r,t)===s;return s&&r?s===n||r===n||c&&Qe(Qe(n,o),t)!==s:!1},Ue=n=>{if(Ot(n))Q(Pe(n),t=>Ue(t));else if(n){const t=ot(n);t&&t.removeChild(n)}},Mo=(n,t,o)=>{if(o&&n){let s=t,r;return Ot(o)?(r=document.createDocumentFragment(),Q(o,c=>{c===s&&(s=c.previousSibling),r.appendChild(c)})):r=o,t&&(s?s!==t&&(s=s.nextSibling):s=n.firstChild),n.insertBefore(r,s||null),()=>Ue(o)}return Ie},ke=(n,t)=>Mo(n,null,t),Un=(n,t)=>Mo(ot(n),n&&n.nextSibling,t),Ze=n=>{const t=document.createElement("div");return Me(t,"class",n),t},Ao=n=>{const t=Ze();return t.innerHTML=n.trim(),Q(ln(t),o=>Ue(o))},Kr=/^--/,qn=(n,t)=>n.getPropertyValue(t)||n[t]||"",Sn=n=>{const t=n||0;return isFinite(t)?t:0},_t=n=>Sn(parseFloat(n||"")),Pn=n=>`${(Sn(n)*100).toFixed(3)}%`,cn=n=>`${Sn(n)}px`;function dt(n,t){n&&t&&Q(t,(o,s)=>{try{const r=n.style,c=Se(o)?cn(o):(o||"")+"";Kr.test(s)?r.setProperty(s,c):r[s]=c}catch{}})}function Ye(n,t,o){const s=Lt(t);let r=s?"":{};if(n){const c=pe.getComputedStyle(n,o)||n.style;r=s?qn(c,t):Pe(t).reduce((a,i)=>(a[i]=qn(c,i),a),r)}return r}const Gn=(n,t,o)=>{const s=t?`${t}-`:"",r=o?`-${o}`:"",c=`${s}top${r}`,a=`${s}right${r}`,i=`${s}bottom${r}`,l=`${s}left${r}`,d=Ye(n,[c,a,i,l]);return{t:_t(d[c]),r:_t(d[a]),b:_t(d[i]),l:_t(d[l])}},Wt=(n,t)=>`translate${it(n)?`(${n.x},${n.y})`:`${t?"X":"Y"}(${n})`}`,Wr=n=>!!(n.offsetWidth||n.offsetHeight||n.getClientRects().length),Yr={w:0,h:0},zt=(n,t)=>t?{w:t[`${n}Width`],h:t[`${n}Height`]}:Yr,Xr=n=>zt("inner",n||pe),at=U(zt,"offset"),Lo=U(zt,"client"),dn=U(zt,"scroll"),Bn=n=>{const t=parseFloat(Ye(n,et))||0,o=parseFloat(Ye(n,tt))||0;return{w:t-Zt(t),h:o-Zt(o)}},ct=n=>n.getBoundingClientRect(),Jr=n=>!!n&&Wr(n),un=n=>!!(n&&(n[tt]||n[et])),Oo=(n,t)=>{const o=un(n);return!un(t)&&o},Kn=(n,t,o,s)=>{Q(We(t),r=>{n&&n.removeEventListener(r,o,s)})},te=(n,t,o,s)=>{var r;const c=(r=s&&s.H)!=null?r:!0,a=s&&s.I||!1,i=s&&s.A||!1,l={passive:c,capture:a};return U(be,We(t).map(d=>{const f=i?u=>{Kn(n,d,f,a),o&&o(u)}:o;return n&&n.addEventListener(d,f,l),U(Kn,n,d,f,a)}))},Fo=n=>n.stopPropagation(),mn=n=>n.preventDefault(),Ro=n=>Fo(n)||mn(n),Ne=(n,t)=>{const{x:o,y:s}=Se(t)?{x:t,y:t}:t||{};Se(o)&&(n.scrollLeft=o),Se(s)&&(n.scrollTop=s)},ye=n=>({x:n.scrollLeft,y:n.scrollTop}),Ho=()=>({T:{x:0,y:0},D:{x:0,y:0}}),Qr=(n,t)=>{const{T:o,D:s}=n,{w:r,h:c}=t,a=(u,p,m)=>{let h=Hn(u)*m,g=Hn(p)*m;if(h===g){const v=Nt(u),V=Nt(p);g=v>V?0:g,h=v<V?0:h}return h=h===g?0:h,[h+0,g+0]},[i,l]=a(o.x,s.x,r),[d,f]=a(o.y,s.y,c);return{T:{x:i,y:d},D:{x:l,y:f}}},Wn=({T:n,D:t})=>{const o=(s,r)=>s===0&&s<=r;return{x:o(n.x,t.x),y:o(n.y,t.y)}},Yn=({T:n,D:t},o)=>{const s=(r,c,a)=>rn(0,1,(r-a)/(r-c)||0);return{x:s(n.x,t.x,o.x),y:s(n.y,t.y,o.y)}},fn=n=>{n&&n.focus&&n.focus({preventScroll:!0})},Xn=(n,t)=>{Q(go(t),n)},pn=n=>{const t=new Map,o=(c,a)=>{if(c){const i=t.get(c);Xn(l=>{i&&i[l?"delete":"clear"](l)},a)}else t.forEach(i=>{i.clear()}),t.clear()},s=(c,a)=>{if(Lt(c)){const d=t.get(c)||new Set;return t.set(c,d),Xn(f=>{we(f)&&d.add(f)},a),U(o,c,a)}vo(a)&&a&&o();const i=Le(c),l=[];return Q(i,d=>{const f=c[d];f&&se(l,s(d,f))}),U(be,l)},r=(c,a)=>{Q(Pe(t.get(c)),i=>{a&&!nn(a)?i.apply(0,a):i()})};return s(n||{}),[s,o,r]},Jn=n=>JSON.stringify(n,(t,o)=>{if(we(o))throw 0;return o}),Qn=(n,t)=>n?`${t}`.split(".").reduce((o,s)=>o&&No(o,s)?o[s]:void 0,n):void 0,Zr={paddingAbsolute:!1,showNativeOverlaidScrollbars:!1,update:{elementEvents:[["img","load"]],debounce:[0,33],attributes:null,ignoreMutation:null},overflow:{x:"scroll",y:"scroll"},scrollbars:{theme:"os-theme-dark",visibility:"auto",autoHide:"never",autoHideDelay:1300,autoHideSuspend:!1,dragScroll:!0,clickScroll:!1,pointers:["mouse","touch","pen"]}},zo=(n,t)=>{const o={},s=Ae(Le(t),Le(n));return Q(s,r=>{const c=n[r],a=t[r];if(it(c)&&it(a))Y(o[r]={},zo(c,a)),wn(o[r])&&delete o[r];else if(No(t,r)&&a!==c){let i=!0;if(Be(c)||Be(a))try{Jn(c)===Jn(a)&&(i=!1)}catch{}i&&(o[r]=a)}}),o},Zn=(n,t,o)=>s=>[Qn(n,s),o||Qn(t,s)!==void 0],rt="data-overlayscrollbars",Et="os-environment",xt=`${Et}-scrollbar-hidden`,Yt=`${rt}-initialize`,Vt="noClipping",eo=`${rt}-body`,je=rt,es="host",He=`${rt}-viewport`,ts=Ir,ns=jr,os="arrange",Io="measuring",jo="scrollbarHidden",rs="scrollbarPressed",ss="noContent",hn=`${rt}-padding`,to=`${rt}-content`,$n="os-size-observer",ls=`${$n}-appear`,as=`${$n}-listener`,cs="os-trinsic-observer",is="os-theme-none",_e="os-scrollbar",ds=`${_e}-rtl`,us=`${_e}-horizontal`,ms=`${_e}-vertical`,Uo=`${_e}-track`,Cn=`${_e}-handle`,fs=`${_e}-visible`,ps=`${_e}-cornerless`,no=`${_e}-interaction`,oo=`${_e}-unusable`,vn=`${_e}-auto-hide`,ro=`${vn}-hidden`,so=`${_e}-wheel`,hs=`${Uo}-interactive`,vs=`${Cn}-interactive`;let Xt;const gs=()=>{const n=(y,O,D)=>{ke(document.body,y),ke(document.body,y);const N=Lo(y),S=at(y),B=Bn(O);return D&&Ue(y),{x:S.h-N.h+B.h,y:S.w-N.w+B.w}},t=y=>{let O=!1;const D=Nn(y,xt);try{O=Ye(y,"scrollbar-width")==="none"||Ye(y,"display","::-webkit-scrollbar")==="none"}catch{}return D(),O},o=`.${Et}{scroll-behavior:auto!important;position:fixed;opacity:0;visibility:hidden;overflow:scroll;height:200px;width:200px;z-index:-1}.${Et} div{width:200%;height:200%;margin:10px 0}.${xt}{scrollbar-width:none!important}.${xt}::-webkit-scrollbar,.${xt}::-webkit-scrollbar-corner{appearance:none!important;display:none!important;width:0!important;height:0!important}`,r=Ao(`<div class="${Et}"><div></div><style>${o}</style></div>`)[0],c=r.firstChild,[a,,i]=pn(),[l,d]=ge({o:n(r,c),i:bt},U(n,r,c,!0)),[f]=d(),u=t(r),p={x:f.x===0,y:f.y===0},m={elements:{host:null,padding:!u,viewport:y=>u&&To(y)&&y,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},h=Y({},Zr),g=U(Y,{},h),v=U(Y,{},m),V={k:f,M:p,R:u,V:!!tn,L:U(a,"r"),P:v,U:y=>Y(m,y)&&v(),N:g,q:y=>Y(h,y)&&g(),B:Y({},m),F:Y({},h)};if(Ve(r,"style"),Ue(r),te(pe,"resize",()=>{i("r",[])}),we(pe.matchMedia)&&!u&&(!p.x||!p.y)){const y=O=>{const D=pe.matchMedia(`(resolution: ${pe.devicePixelRatio}dppx)`);te(D,"change",()=>{O(),y(O)},{A:!0})};y(()=>{const[O,D]=l();Y(V.k,O),i("r",[D])})}return V},$e=()=>(Xt||(Xt=gs()),Xt),qo=(n,t)=>we(t)?t.apply(0,n):t,ks=(n,t,o,s)=>{const r=At(s)?o:s;return qo(n,r)||t.apply(0,n)},Po=(n,t,o,s)=>{const r=At(s)?o:s,c=qo(n,r);return!!c&&(Ct(c)?c:t.apply(0,n))},ys=(n,t)=>{const{nativeScrollbarsOverlaid:o,body:s}=t||{},{M:r,R:c,P:a}=$e(),{nativeScrollbarsOverlaid:i,body:l}=a().cancel,d=o??i,f=At(s)?l:s,u=(r.x||r.y)&&d,p=n&&(_n(f)?!c:f);return!!u||!!p},Dn=new WeakMap,_s=(n,t)=>{Dn.set(n,t)},xs=n=>{Dn.delete(n)},Go=n=>Dn.get(n),ws=(n,t,o)=>{let s=!1;const r=o?new WeakMap:!1,c=()=>{s=!0},a=i=>{if(r&&o){const l=o.map(d=>{const[f,u]=d||[];return[u&&f?(i||Do)(f,n):[],u]});Q(l,d=>Q(d[0],f=>{const u=d[1],p=r.get(f)||[];if(n.contains(f)&&u){const h=te(f,u,g=>{s?(h(),r.delete(f)):t(g)});r.set(f,se(p,h))}else be(p),r.delete(f)}))}};return a(),[c,a]},lo=(n,t,o,s)=>{let r=!1;const{j:c,X:a,Y:i,W:l,J:d,K:f}=s||{},u=on(()=>r&&o(!0),{_:33,p:99}),[p,m]=ws(n,u,i),h=c||[],g=a||[],v=Ae(h,g),V=(O,D)=>{if(!nn(D)){const N=d||Ie,S=f||Ie,B=[],b=[];let $=!1,E=!1;if(Q(D,x=>{const{attributeName:C,target:_,type:k,oldValue:A,addedNodes:T,removedNodes:K}=x,Z=k==="attributes",X=k==="childList",M=n===_,P=Z&&C,G=P&&bn(_,C||""),j=Lt(G)?G:null,ee=P&&A!==j,F=xn(g,C)&&ee;if(t&&(X||!M)){const H=Z&&ee,R=H&&l&&Dt(_,l),L=(R?!N(_,C,A,j):!Z||H)&&!S(x,!!R,n,s);Q(T,z=>se(B,z)),Q(K,z=>se(B,z)),E=E||L}!t&&M&&ee&&!N(_,C,A,j)&&(se(b,C),$=$||F)}),m(x=>In(B).reduce((C,_)=>(se(C,Do(x,_)),Dt(_,x)?se(C,_):C),[])),t)return!O&&E&&o(!1),[!1];if(!nn(b)||$){const x=[In(b),$];return!O&&o.apply(0,x),x}}},y=new zr(U(V,!1));return[()=>(y.observe(n,{attributes:!0,attributeOldValue:!0,attributeFilter:v,subtree:t,childList:t,characterData:t}),r=!0,()=>{r&&(p(),y.disconnect(),r=!1)}),()=>{if(r)return u.S(),V(!0,y.takeRecords())}]},Ko={},Wo={},bs=n=>{Q(n,t=>Q(t,(o,s)=>{Ko[s]=t[s]}))},Yo=(n,t,o)=>Le(n).map(s=>{const{static:r,instance:c}=n[s],[a,i,l]=o||[],d=o?c:r;if(d){const f=o?d(a,i,t):d(t);return(l||Wo)[s]=f}}),ut=n=>Wo[n],Es="__osOptionsValidationPlugin",Vs="__osSizeObserverPlugin",Ns=(n,t)=>{const{M:o}=t,[s,r]=n("showNativeOverlaidScrollbars");return[s&&o.x&&o.y,r]},Tt=n=>n.indexOf(ze)===0,Ss=(n,t)=>{const o=(r,c,a,i)=>{const l=r===ze?Ge:r.replace(`${ze}-`,""),d=Tt(r),f=Tt(a);return!c&&!i?Ge:d&&f?ze:d?c&&i?l:c?ze:Ge:c?l:f&&i?ze:Ge},s={x:o(t.x,n.x,t.y,n.y),y:o(t.y,n.y,t.x,n.x)};return{G:s,Z:{x:s.x===nt,y:s.y===nt}}},Xo="__osScrollbarsHidingPlugin",Bs="__osClickScrollPlugin",Jo=(n,t,o)=>{const{dt:s}=o||{},r=ut(Vs),[c]=ge({o:!1,u:!0});return()=>{const a=[],l=Ao(`<div class="${$n}"><div class="${as}"></div></div>`)[0],d=l.firstChild,f=u=>{const p=u instanceof ResizeObserverEntry;let m=!1,h=!1;if(p){const[g,,v]=c(u.contentRect),V=un(g);h=Oo(g,v),m=!h&&!V}else h=u===!0;m||t({ft:!0,dt:h})};if(Bt){const u=new Bt(p=>f(p.pop()));u.observe(d),se(a,()=>{u.disconnect()})}else if(r){const[u,p]=r(d,f,s);se(a,Ae([Nn(l,ls),te(l,"animationstart",u)],p))}else return Ie;return U(be,se(a,ke(n,l)))}},$s=(n,t)=>{let o;const s=l=>l.h===0||l.isIntersecting||l.intersectionRatio>0,r=Ze(cs),[c]=ge({o:!1}),a=(l,d)=>{if(l){const f=c(s(l)),[,u]=f;return u&&!d&&t(f)&&[f]}},i=(l,d)=>a(d.pop(),l);return[()=>{const l=[];if(zn)o=new zn(U(i,!1),{root:n}),o.observe(r),se(l,()=>{o.disconnect()});else{const d=()=>{const f=at(r);a(f)};se(l,Jo(r,d)()),d()}return U(be,se(l,ke(n,r)))},()=>o&&i(!0,o.takeRecords())]},Cs=(n,t,o,s)=>{let r,c,a,i,l,d;const f=`[${je}]`,u=`[${He}]`,p=[],m=["wrap","cols","rows"],h=["id","class","style","open"],{vt:g,ht:v,ot:V,gt:y,bt:O,wt:D,nt:N,yt:S,St:B,Ot:b}=n,$=w=>Ye(w,"direction")==="rtl",E={$t:!1,ct:$(g)},x=$e(),C=ut(Xo),[_]=ge({i:Vo,o:{w:0,h:0}},()=>{const w=C&&C.tt(n,t,E,x,o).ut,z=!(S&&N)&&Vn(v,je,Vt),I=!N&&B(os),q=I&&ye(y),J=b(Io,z),ae=I&&w&&w()[0],de=dn(V),W=Bn(V);return ae&&ae(),Ne(y,q),z&&J(),{w:de.w+W.w,h:de.h+W.h}}),k=D?m:Ae(h,m),A=on(s,{_:()=>r,p:()=>c,m(w,L){const[z]=w,[I]=L;return[Ae(Le(z),Le(I)).reduce((q,J)=>(q[J]=z[J]||I[J],q),{})]}}),T=w=>{const L=$(g);Y(w,{Ct:d!==L}),Y(E,{ct:L}),d=L},K=(w,L)=>{const[z,I]=w,q={xt:I};return Y(E,{$t:z}),!L&&s(q),q},Z=({ft:w,dt:L})=>{const I=!(w&&!L)&&x.R?A:s,q={ft:w||L,dt:L};T(q),I(q)},X=(w,L)=>{const[,z]=_(),I={Ht:z};return T(I),z&&!L&&(w?s:A)(I),I},M=(w,L,z)=>{const I={Et:L};return T(I),L&&!z&&A(I),I},[P,G]=O?$s(v,K):[],j=!N&&Jo(v,Z,{dt:!0}),[ee,F]=lo(v,!1,M,{X:h,j:Ae(h,p)}),H=N&&Bt&&new Bt(w=>{const L=w[w.length-1].contentRect;Z({ft:!0,dt:Oo(L,l)}),l=L}),R=on(()=>{const[,w]=_();s({Ht:w})},{_:222,v:!0});return[()=>{H&&H.observe(v);const w=j&&j(),L=P&&P(),z=ee(),I=x.L(q=>{q?A({zt:q}):R()});return()=>{H&&H.disconnect(),w&&w(),L&&L(),i&&i(),z(),I()}},({It:w,At:L,Tt:z})=>{const I={},[q]=w("update.ignoreMutation"),[J,ae]=w("update.attributes"),[de,W]=w("update.elementEvents"),[ce,ue]=w("update.debounce"),xe=W||ae,ie=L||z,he=le=>we(q)&&q(le);if(xe){a&&a(),i&&i();const[le,oe]=lo(O||V,!0,X,{j:Ae(k,J||[]),Y:de,W:f,K:(me,re)=>{const{target:fe,attributeName:ve}=me;return(!re&&ve&&!N?Gr(fe,f,u):!1)||!!Qe(fe,`.${_e}`)||!!he(me)}});i=le(),a=oe}if(ue)if(A.S(),Be(ce)){const le=ce[0],oe=ce[1];r=Se(le)&&le,c=Se(oe)&&oe}else Se(ce)?(r=ce,c=!1):(r=!1,c=!1);if(ie){const le=F(),oe=G&&G(),me=a&&a();le&&Y(I,M(le[0],le[1],ie)),oe&&Y(I,K(oe[0],ie)),me&&Y(I,X(me[0],ie))}return T(I),I},E]},Ds=(n,t,o,s)=>{const{P:r}=$e(),{scrollbars:c}=r(),{slot:a}=c,{vt:i,ht:l,ot:d,Dt:f,gt:u,yt:p,nt:m}=t,{scrollbars:h}=f?{}:n,{slot:g}=h||{},v=new Map,V=F=>tn&&new tn({source:u,axis:F}),y={x:V("x"),y:V("y")},O=Po([i,l,d],()=>m&&p?i:l,a,g),D=(F,H)=>{if(H){const q=F?et:tt,{kt:J,Mt:ae}=H,de=ct(ae)[q],W=ct(J)[q];return rn(0,1,de/W||0)}const R=F?"x":"y",{Rt:w,Vt:L}=o,z=L[R],I=w[R];return rn(0,1,z/(z+I)||0)},N=(F,H,R)=>{const w=D(R,F);return 1/w*(1-w)*H},S=F=>Y(F,{clear:["left"]}),B=F=>{v.forEach((H,R)=>{(F?xn(go(F),R):!0)&&(Q(H||[],L=>{L&&L.cancel()}),v.delete(R))})},b=(F,H,R,w)=>{const L=v.get(F)||[],z=L.find(I=>I&&I.timeline===H);z?z.effect=new KeyframeEffect(F,R,{composite:w}):v.set(F,Ae(L,[F.animate(R,{timeline:H,composite:w})]))},$=(F,H,R)=>{const w=R?Nn:Co;Q(F,L=>{w(L.Lt,H)})},E=(F,H)=>{Q(F,R=>{const[w,L]=H(R);dt(w,L)})},x=(F,H)=>{E(F,R=>{const{Mt:w}=R;return[w,{[H?et:tt]:Pn(D(H))}]})},C=(F,H)=>{const{Pt:R}=o,w=H?"x":"y",L=y[w],z=Wn(R)[w],I=(q,J)=>Wt(Pn(N(q,z?J:1-J,H)),H);L?Q(F,q=>{const{Mt:J}=q;b(J,L,S({transform:[0,1].map(ae=>I(q,ae))}))}):E(F,q=>[q.Mt,{transform:I(q,Yn(R,ye(u))[w])}])},_=F=>m&&!p&&ot(F)===d,k=[],A=[],T=[],K=(F,H,R)=>{const w=vo(R),L=w?R:!0,z=w?!R:!0;L&&$(A,F,H),z&&$(T,F,H)},Z=()=>{x(A,!0),x(T)},X=()=>{C(A,!0),C(T)},M=()=>{if(m){const{Rt:F,Pt:H}=o,R=Wn(H),w=.5;if(y.x&&y.y)Q(Ae(T,A),({Lt:L})=>{if(_(L)){const z=I=>b(L,y[I],S({transform:[0,R[I]?1:-1].map(q=>Wt(cn(q*(F[I]-w)),I==="x"))}),"add");z("x"),z("y")}else B(L)});else{const L=Yn(H,ye(u)),z=I=>{const{Lt:q}=I,J=_(q)&&q,ae=(de,W,ce)=>{const ue=W*de;return cn(ce?ue:-ue)};return[J,J&&{transform:Wt({x:ae(L.x,F.x,R.x),y:ae(L.y,F.y,R.y)})}]};E(A,z),E(T,z)}}},P=F=>{const R=Ze(`${_e} ${F?us:ms}`),w=Ze(Uo),L=Ze(Cn),z={Lt:R,kt:w,Mt:L};return se(F?A:T,z),se(k,[ke(R,w),ke(w,L),U(Ue,R),B,s(z,K,C,F)]),z},G=U(P,!0),j=U(P,!1),ee=()=>(ke(O,A[0].Lt),ke(O,T[0].Lt),U(be,k));return G(),j(),[{Ut:Z,Nt:X,qt:M,Bt:K,Ft:{V:y.x,jt:A,Xt:G,Yt:U(E,A)},Wt:{V:y.y,jt:T,Xt:j,Yt:U(E,T)}},ee]},Ts=(n,t,o,s)=>(r,c,a,i)=>{const{ht:l,ot:d,nt:f,gt:u,Jt:p,Ot:m}=t,{Lt:h,kt:g,Mt:v}=r,[V,y]=Ke(333),[O,D]=Ke(444),[N,S]=Ke(),B=U(a,[r],i),b=_=>{we(u.scrollBy)&&u.scrollBy({behavior:"smooth",left:_.x,top:_.y})},$=i?et:tt,E=()=>{const _="pointerup pointercancel lostpointercapture",k=`client${i?"X":"Y"}`,A=i?"left":"top",T=i?"w":"h",K=i?"x":"y",Z=(X,M)=>P=>{const{Rt:G}=o,j=at(g)[T]-at(v)[T],F=M*P/j*G[K];Ne(u,{[K]:X+F})};return te(g,"pointerdown",X=>{const M=Qe(X.target,`.${Cn}`)===v,P=M?v:g,G=n.scrollbars,{button:j,isPrimary:ee,pointerType:F}=X,{pointers:H}=G;if(j===0&&ee&&G[M?"dragScroll":"clickScroll"]&&(H||[]).includes(F)){D();const w=!M&&X.shiftKey,L=U(ct,v),z=U(ct,g),I=(re,fe)=>(re||L())[A]-(fe||z())[A],q=Zt(ct(u)[$])/at(u)[T]||1,J=Z(ye(u)[K],1/q),ae=X[k],de=L(),W=z(),ce=de[$],ue=I(de,W)+ce/2,xe=ae-W[A],ie=M?0:xe-ue,he=re=>{be(me),P.releasePointerCapture(re.pointerId)},le=()=>m(rs,!0),oe=le(),me=[()=>{const re=ye(u);oe();const fe=ye(u),ve={x:fe.x-re.x,y:fe.y-re.y};(Nt(ve.x)>3||Nt(ve.y)>3)&&(le(),Ne(u,re),b(ve),O(oe))},te(p,_,he),te(p,"selectstart",re=>mn(re),{H:!1}),te(g,_,he),te(g,"pointermove",re=>{const fe=re[k]-ae;(M||w)&&J(ie+fe)})];if(P.setPointerCapture(X.pointerId),w)J(ie);else if(!M){const re=ut(Bs);re&&se(me,re(J,I,ie,ce,xe))}}})};let x=!0;const C=_=>_.propertyName.indexOf($)>-1;return U(be,[te(v,"pointermove pointerleave",s),te(h,"pointerenter",()=>{c(no,!0)}),te(h,"pointerleave pointercancel",()=>{c(no,!1)}),!f&&te(h,"mousedown",()=>{const _=an();(jn(_,He)||jn(_,je)||_===document.body)&&St(U(fn,d),25)}),te(h,"wheel",_=>{const{deltaX:k,deltaY:A,deltaMode:T}=_;x&&T===0&&ot(h)===l&&b({x:k,y:A}),x=!1,c(so,!0),V(()=>{x=!0,c(so)}),mn(_)},{H:!1,I:!0}),te(v,"transitionstart",_=>{if(C(_)){const k=()=>{B(),N(k)};k()}}),te(v,"transitionend transitioncancel",_=>{C(_)&&(S(),B())}),te(h,"pointerdown",U(te,p,"click",Ro,{A:!0,I:!0,H:!1}),{I:!0}),E(),y,D,S])},Ms=(n,t,o,s,r,c)=>{let a,i,l,d,f,u=Ie,p=0;const m=M=>M.pointerType==="mouse",[h,g]=Ke(),[v,V]=Ke(100),[y,O]=Ke(100),[D,N]=Ke(()=>p),[S,B]=Ds(n,r,s,Ts(t,r,s,M=>m(M)&&T())),{ht:b,Kt:$,yt:E}=r,{Bt:x,Ut:C,Nt:_,qt:k}=S,A=(M,P)=>{if(N(),M)x(ro);else{const G=U(x,ro,!0);p>0&&!P?D(G):G()}},T=()=>{(l?!a:!d)&&(A(!0),v(()=>{A(!1)}))},K=M=>{x(vn,M,!0),x(vn,M,!1)},Z=M=>{m(M)&&(a=l,l&&A(!0))},X=[N,V,O,g,()=>u(),te(b,"pointerover",Z,{A:!0}),te(b,"pointerenter",Z),te(b,"pointerleave",M=>{m(M)&&(a=!1,l&&A(!1))}),te(b,"pointermove",M=>{m(M)&&i&&T()}),te($,"scroll",M=>{h(()=>{_(),T()}),c(M),k()})];return[()=>U(be,se(X,B())),({It:M,Tt:P,Gt:G,Qt:j})=>{const{Zt:ee,tn:F,nn:H,sn:R}=j||{},{Ct:w,dt:L}=G||{},{ct:z}=o,{M:I}=$e(),{G:q,en:J}=s,[ae,de]=M("showNativeOverlaidScrollbars"),[W,ce]=M("scrollbars.theme"),[ue,xe]=M("scrollbars.visibility"),[ie,he]=M("scrollbars.autoHide"),[le,oe]=M("scrollbars.autoHideSuspend"),[me]=M("scrollbars.autoHideDelay"),[re,fe]=M("scrollbars.dragScroll"),[ve,Xe]=M("scrollbars.clickScroll"),[mt,jt]=M("overflow"),Ut=L&&!P,qt=J.x||J.y,Ee=ee||F||R||w||P,Pt=H||xe||jt,ft=ae&&I.x&&I.y,pt=(Fe,st,lt)=>{const ht=Fe.includes(nt)&&(ue===ze||ue==="auto"&&st===nt);return x(fs,ht,lt),ht};if(p=me,Ut&&(le&&qt?(K(!1),u(),y(()=>{u=te($,"scroll",U(K,!0),{A:!0})})):K(!0)),de&&x(is,ft),ce&&(x(f),x(W,!0),f=W),oe&&!le&&K(!0),he&&(i=ie==="move",l=ie==="leave",d=ie==="never",A(d,!0)),fe&&x(vs,re),Xe&&x(hs,ve),Pt){const Fe=pt(mt.x,q.x,!0),st=pt(mt.y,q.y,!1);x(ps,!(Fe&&st))}Ee&&(C(),_(),k(),x(oo,!J.x,!0),x(oo,!J.y,!1),x(ds,z&&!E))},{},S]},As=n=>{const t=$e(),{P:o,R:s}=t,{elements:r}=o(),{host:c,padding:a,viewport:i,content:l}=r,d=Ct(n),f=d?{}:n,{elements:u}=f,{host:p,padding:m,viewport:h,content:g}=u||{},v=d?n:f.target,V=To(v),y=Dt(v,"textarea"),O=v.ownerDocument,D=O.documentElement,N=()=>O.defaultView||pe,S=U(ks,[v]),B=U(Po,[v]),b=U(Ze,""),$=U(S,b,i),E=U(B,b,l),x=$(h),C=x===v,_=C&&V,k=!C&&E(g),A=!C&&x===k,T=_?D:x,K=y?S(b,c,p):v,Z=_?T:K,X=!C&&B(b,a,m),M=!A&&k,P=[M,T,X,Z].map(W=>Ct(W)&&!ot(W)&&W),G=W=>W&&xn(P,W),j=G(T)?v:T,ee={vt:v,ht:Z,ot:T,cn:X,bt:M,gt:_?D:T,Kt:_?O:T,rn:V?D:j,Jt:O,wt:y,yt:V,Dt:d,nt:C,ln:N,St:W=>Vn(T,He,W),Ot:(W,ce)=>sn(T,He,W,ce)},{vt:F,ht:H,cn:R,ot:w,bt:L}=ee,z=[()=>{Ve(H,[je,Yt]),Ve(F,Yt),V&&Ve(D,[Yt,je])}],I=y&&G(H);let q=y?F:ln([L,w,R,H,F].find(W=>W&&!G(W)));const J=_?F:L||w,ae=U(be,z);return[ee,()=>{const W=N(),ce=an(),ue=oe=>{ke(ot(oe),ln(oe)),Ue(oe)},xe=oe=>te(oe,"focusin focusout focus blur",Ro,{I:!0,H:!1}),ie="tabindex",he=bn(w,ie),le=xe(ce);return Me(H,je,C?"":es),Me(R,hn,""),Me(w,He,""),Me(L,to,""),C||(Me(w,ie,he||"-1"),V&&Me(D,eo,"")),I&&(Un(F,H),se(z,()=>{Un(H,F),Ue(H)})),ke(J,q),ke(H,R),ke(R||H,!C&&w),ke(w,L),se(z,[le,()=>{const oe=an(),me=G(w),re=me&&oe===w?F:oe,fe=xe(re);Ve(R,hn),Ve(L,to),Ve(w,He),V&&Ve(D,eo),he?Me(w,ie,he):Ve(w,ie),G(L)&&ue(L),me&&ue(w),G(R)&&ue(R),fn(re),fe()}]),s&&!C&&(En(w,He,jo),se(z,U(Ve,w,He))),fn(!C&&V&&ce===F&&W.top===W?w:ce),le(),q=0,ae},ae]},Ls=({bt:n})=>({Gt:t,an:o,Tt:s})=>{const{xt:r}=t||{},{$t:c}=o;n&&(r||s)&&dt(n,{[tt]:c&&"100%"})},Os=({ht:n,cn:t,ot:o,nt:s},r)=>{const[c,a]=ge({i:qr,o:Gn()},U(Gn,n,"padding",""));return({It:i,Gt:l,an:d,Tt:f})=>{let[u,p]=a(f);const{R:m}=$e(),{ft:h,Ht:g,Ct:v}=l||{},{ct:V}=d,[y,O]=i("paddingAbsolute");(h||p||(f||g))&&([u,p]=c(f));const N=!s&&(O||v||p);if(N){const S=!y||!t&&!m,B=u.r+u.l,b=u.t+u.b,$={[bo]:S&&!V?-B:0,[Eo]:S?-b:0,[wo]:S&&V?-B:0,top:S?-u.t:0,right:S?V?-u.r:"auto":0,left:S?V?"auto":-u.l:0,[et]:S&&`calc(100% + ${B}px)`},E={[ko]:S?u.t:0,[yo]:S?u.r:0,[xo]:S?u.b:0,[_o]:S?u.l:0};dt(t||o,$),dt(o,E),Y(r,{cn:u,un:!S,rt:t?E:Y({},$,E)})}return{_n:N}}},Fs=(n,t)=>{const o=$e(),{ht:s,cn:r,ot:c,nt:a,Kt:i,gt:l,yt:d,Ot:f,ln:u}=n,{R:p}=o,m=d&&a,h=U(fo,0),g=["display","direction","flexDirection","writingMode"],v={i:Vo,o:{w:0,h:0}},V={i:bt,o:{}},y=M=>{f(Io,!m&&M)},O=(M,P)=>{const G=pe.devicePixelRatio%1!==0?1:0,j={w:h(M.w-P.w),h:h(M.h-P.h)};return{w:j.w>G?j.w:0,h:j.h>G?j.h:0}},[D,N]=ge(v,U(Bn,c)),[S,B]=ge(v,U(dn,c)),[b,$]=ge(v),[E]=ge(V),[x,C]=ge(v),[_]=ge(V),[k]=ge({i:(M,P)=>Rt(M,P,g),o:{}},()=>Jr(c)?Ye(c,g):{}),[A,T]=ge({i:(M,P)=>bt(M.T,P.T)&&bt(M.D,P.D),o:Ho()},()=>{y(!0);const M=ye(l),P=f(ss,!0),G=te(i,nt,R=>{const w=ye(l);R.isTrusted&&w.x===M.x&&w.y===M.y&&Fo(R)},{I:!0,A:!0});Ne(l,{x:0,y:0}),P();const j=ye(l),ee=dn(l);Ne(l,{x:ee.w,y:ee.h});const F=ye(l);Ne(l,{x:F.x-j.x<1&&-ee.w,y:F.y-j.y<1&&-ee.h});const H=ye(l);return Ne(l,M),yn(()=>G()),{T:j,D:H}}),K=ut(Xo),Z=(M,P)=>`${P?ts:ns}${Ur(M)}`,X=M=>{const P=j=>[ze,Ge,nt].map(ee=>Z(ee,j)),G=P(!0).concat(P()).join(" ");f(G),f(Le(M).map(j=>Z(M[j],j==="x")).join(" "),!0)};return({It:M,Gt:P,an:G,Tt:j},{_n:ee})=>{const{ft:F,Ht:H,Ct:R,dt:w,zt:L}=P||{},z=K&&K.tt(n,t,G,o,M),{it:I,ut:q,_t:J}=z||{},[ae,de]=Ns(M,o),[W,ce]=M("overflow"),ue=Tt(W.x),xe=Tt(W.y),ie=F||ee||H||R||L||de;let he=N(j),le=B(j),oe=$(j),me=C(j);if(de&&p&&f(jo,!ae),ie){Vn(s,je,Vt)&&y(!0);const[On]=q?q():[],[vt]=he=D(j),[gt]=le=S(j),kt=Lo(c),yt=m&&Xr(u()),_r={w:h(gt.w+vt.w),h:h(gt.h+vt.h)},Fn={w:h((yt?yt.w:kt.w+h(kt.w-gt.w))+vt.w),h:h((yt?yt.h:kt.h+h(kt.h-gt.h))+vt.h)};On&&On(),me=x(Fn),oe=b(O(_r,Fn),j)}const[re,fe]=me,[ve,Xe]=oe,[mt,jt]=le,[Ut,qt]=he,[Ee,Pt]=E({x:ve.w>0,y:ve.h>0}),ft=ue&&xe&&(Ee.x||Ee.y)||ue&&Ee.x&&!Ee.y||xe&&Ee.y&&!Ee.x,pt=ee||R||L||qt||jt||fe||Xe||ce||de||ie,Fe=Ss(Ee,W),[st,lt]=_(Fe.G),[,ht]=k(j),Ln=R||w||ht||Pt||j,[kr,yr]=Ln?A(j):T();return pt&&(lt&&X(Fe.G),J&&I&&dt(c,J(Fe,G,I(Fe,mt,Ut)))),y(!1),sn(s,je,Vt,ft),sn(r,hn,Vt,ft),Y(t,{G:st,Vt:{x:re.w,y:re.h},Rt:{x:ve.w,y:ve.h},en:Ee,Pt:Qr(kr,ve)}),{nn:lt,Zt:fe,tn:Xe,sn:yr||Xe,dn:Ln}}},Rs=n=>{const[t,o,s]=As(n),r={cn:{t:0,r:0,b:0,l:0},un:!1,rt:{[bo]:0,[Eo]:0,[wo]:0,[ko]:0,[yo]:0,[xo]:0,[_o]:0},Vt:{x:0,y:0},Rt:{x:0,y:0},G:{x:Ge,y:Ge},en:{x:!1,y:!1},Pt:Ho()},{vt:c,gt:a,nt:i}=t,{R:l,M:d}=$e(),f=!l&&(d.x||d.y),u=[Ls(t),Os(t,r),Fs(t,r)];return[o,p=>{const m={},g=f&&ye(a);return Q(u,v=>{Y(m,v(p,m)||{})}),Ne(a,g),!i&&Ne(c,0),m},r,t,s]},Hs=(n,t,o,s,r)=>{const c=Zn(t,{}),[a,i,l,d,f]=Rs(n),[u,p,m]=Cs(d,l,c,O=>{y({},O)}),[h,g,,v]=Ms(n,t,m,l,d,r),V=O=>Le(O).some(D=>!!O[D]),y=(O,D)=>{if(o())return!1;const{fn:N,Tt:S,At:B,pn:b}=O,$=N||{},E=!!S,x={It:Zn(t,$,E),fn:$,Tt:E};if(b)return g(x),!1;const C=D||p(Y({},x,{At:B})),_=i(Y({},x,{an:m,Gt:C}));g(Y({},x,{Gt:C,Qt:_}));const k=V(C),A=V(_),T=k||A||!wn($)||E;return T&&s(O,{Gt:C,Qt:_}),T};return[()=>{const{rn:O,gt:D}=d,N=ye(O),S=[u(),a(),h()];return Ne(D,N),U(be,S)},y,()=>({vn:m,hn:l}),{gn:d,bn:v},f]},qe=(n,t,o)=>{const{N:s}=$e(),r=Ct(n),c=r?n:n.target,a=Go(c);if(t&&!a){let i=!1;const l=[],d={},f=E=>{const x=So(E),C=ut(Es);return C?C(x,!0):x},u=Y({},s(),f(t)),[p,m,h]=pn(),[g,v,V]=pn(o),y=(E,x)=>{V(E,x),h(E,x)},[O,D,N,S,B]=Hs(n,u,()=>i,({fn:E,Tt:x},{Gt:C,Qt:_})=>{const{ft:k,Ct:A,xt:T,Ht:K,Et:Z,dt:X}=C,{Zt:M,tn:P,nn:G,sn:j}=_;y("updated",[$,{updateHints:{sizeChanged:!!k,directionChanged:!!A,heightIntrinsicChanged:!!T,overflowEdgeChanged:!!M,overflowAmountChanged:!!P,overflowStyleChanged:!!G,scrollCoordinatesChanged:!!j,contentMutation:!!K,hostMutation:!!Z,appear:!!X},changedOptions:E||{},force:!!x}])},E=>y("scroll",[$,E])),b=E=>{xs(c),be(l),i=!0,y("destroyed",[$,E]),m(),v()},$={options(E,x){if(E){const C=x?s():{},_=zo(u,Y(C,f(E)));wn(_)||(Y(u,_),D({fn:_}))}return Y({},u)},on:g,off:(E,x)=>{E&&x&&v(E,x)},state(){const{vn:E,hn:x}=N(),{ct:C}=E,{Vt:_,Rt:k,G:A,en:T,cn:K,un:Z,Pt:X}=x;return Y({},{overflowEdge:_,overflowAmount:k,overflowStyle:A,hasOverflow:T,scrollCoordinates:{start:X.T,end:X.D},padding:K,paddingAbsolute:Z,directionRTL:C,destroyed:i})},elements(){const{vt:E,ht:x,cn:C,ot:_,bt:k,gt:A,Kt:T}=S.gn,{Ft:K,Wt:Z}=S.bn,X=P=>{const{Mt:G,kt:j,Lt:ee}=P;return{scrollbar:ee,track:j,handle:G}},M=P=>{const{jt:G,Xt:j}=P,ee=X(G[0]);return Y({},ee,{clone:()=>{const F=X(j());return D({pn:!0}),F}})};return Y({},{target:E,host:x,padding:C||_,viewport:_,content:k||_,scrollOffsetElement:A,scrollEventElement:T,scrollbarHorizontal:M(K),scrollbarVertical:M(Z)})},update:E=>D({Tt:E,At:!0}),destroy:U(b,!1),plugin:E=>d[Le(E)[0]]};return se(l,[B]),_s(c,$),Yo(Ko,qe,[$,p,d]),ys(S.gn.yt,!r&&n.cancel)?(b(!0),$):(se(l,O()),y("initialized",[$]),$.update(!0),$)}return a};qe.plugin=n=>{const t=Be(n),o=t?n:[n],s=o.map(r=>Yo(r,qe)[0]);return bs(o),t?s:s[0]};qe.valid=n=>{const t=n&&n.elements,o=we(t)&&t();return $t(o)&&!!Go(o.target)};qe.env=()=>{const{k:n,M:t,R:o,V:s,B:r,F:c,P:a,U:i,N:l,q:d}=$e();return Y({},{scrollbarsSize:n,scrollbarsOverlaid:t,scrollbarsHiding:o,scrollTimeline:s,staticDefaultInitialization:r,staticDefaultOptions:c,getDefaultInitialization:a,setDefaultInitialization:i,getDefaultOptions:l,setDefaultOptions:d})};function zs(){let n;const t=e.ref(null),o=Math.floor(Math.random()*2**32),s=e.ref(!1),r=e.ref([]),c=()=>r.value,a=()=>n.getSelection(),i=()=>r.value.length,l=()=>n.clearSelection(!0),d=e.ref(),f=e.ref(null),u=e.ref(null),p=e.ref(null);function m(){n=new Er({area:t.value,keyboardDrag:!1,selectedClass:"vf-explorer-selected",selectorClass:"vf-explorer-selector"}),n.subscribe("DS:start:pre",({items:D,event:N,isDragging:S})=>{if(S)n.Interaction._reset(N);else{s.value=!1;const B=t.value.offsetWidth-N.offsetX,b=t.value.offsetHeight-N.offsetY;B<15&&b<15&&n.Interaction._reset(N),N.target.classList.contains("os-scrollbar-handle")&&n.Interaction._reset(N)}}),document.addEventListener("dragleave",D=>{!D.buttons&&s.value&&(s.value=!1)})}const h=()=>e.nextTick(()=>{n.addSelection(n.getSelectables()),g()}),g=()=>{r.value=n.getSelection().map(D=>JSON.parse(D.dataset.item)),d.value(r.value)},v=()=>e.nextTick(()=>{const D=c().map(N=>N.path);l(),n.setSettings({selectables:document.getElementsByClassName("vf-item-"+o)}),n.addSelection(n.getSelectables().filter(N=>D.includes(JSON.parse(N.dataset.item).path))),g(),y()}),V=D=>{d.value=D,n.subscribe("DS:end",({items:N,event:S,isDragging:B})=>{r.value=N.map(b=>JSON.parse(b.dataset.item)),D(N.map(b=>JSON.parse(b.dataset.item)))})},y=()=>{f.value&&(t.value.getBoundingClientRect().height<t.value.scrollHeight?(u.value.style.height=t.value.scrollHeight+"px",u.value.style.display="block"):(u.value.style.height="100%",u.value.style.display="none"))},O=D=>{if(!f.value)return;const{scrollOffsetElement:N}=f.value.elements();N.scrollTo({top:t.value.scrollTop,left:0})};return e.onMounted(()=>{qe(p.value,{scrollbars:{theme:"vf-theme-dark dark:vf-theme-light"},plugins:{OverlayScrollbars:qe}},{initialized:D=>{f.value=D},scroll:(D,N)=>{const{scrollOffsetElement:S}=D.elements();t.value.scrollTo({top:S.scrollTop,left:0})}}),m(),y(),new ResizeObserver(y).observe(t.value),t.value.addEventListener("scroll",O),n.subscribe("DS:scroll",({isDragging:D})=>D||O())}),e.onUnmounted(()=>{n&&n.stop()}),e.onUpdated(()=>{n&&n.Area.reset()}),{area:t,explorerId:o,isDraggingRef:s,scrollBar:u,scrollBarContainer:p,getSelected:c,getSelection:a,selectAll:h,clearSelection:l,refreshSelection:v,getCount:i,onSelect:V}}function Is(n,t){const o=e.ref(n),s=e.ref(t),r=e.ref([]),c=e.ref([]),a=e.ref([]),i=e.ref(!1),l=e.ref(5);let d=!1,f=!1;const u=e.reactive({adapter:o,storages:[],dirname:s,files:[]});function p(){let y=[],O=[],D=s.value??o.value+"://";D.length===0&&(r.value=[]),D.replace(o.value+"://","").split("/").forEach(function(B){y.push(B),y.join("/")!==""&&O.push({basename:B,name:B,path:o.value+"://"+y.join("/"),type:"dir"})}),c.value=O;const[N,S]=h(O,l.value);a.value=S,r.value=N}function m(y){l.value=y,p()}function h(y,O){return y.length>O?[y.slice(-O),y.slice(0,-O)]:[y,[]]}function g(y=null){i.value=y??!i.value}function v(){return r.value&&r.value.length&&!f}const V=e.computed(()=>{var y;return((y=r.value[r.value.length-2])==null?void 0:y.path)??o.value+"://"});return e.onMounted(()=>{}),e.watch(s,p),e.onMounted(p),{adapter:o,path:s,loading:d,searchMode:f,data:u,breadcrumbs:r,breadcrumbItems:c,limitBreadcrumbItems:m,hiddenBreadcrumbs:a,showHiddenBreadcrumbs:i,toggleHiddenBreadcrumbs:g,isGoUpAvailable:v,parentFolderPath:V}}const js=(n,t)=>{const o=Dr(n.id),s=br(),r=o.getStore("metricUnits",!1),c=Fr(o,n.theme),a=t.i18n,i=n.locale??t.locale,l=o.getStore("adapter"),d=p=>Array.isArray(p)?p:Ar,f=o.getStore("persist-path",n.persist),u=f?o.getStore("path",n.path):n.path;return e.reactive({version:Lr,root:null,debug:n.debug,emitter:s,storage:o,i18n:Mr(o,i,s,a),modal:Rr(),dragSelect:e.computed(()=>zs()),requester:Cr(n.request),features:d(n.features),view:o.getStore("viewport","grid"),fullScreen:o.getStore("full-screen",n.fullScreen),showTreeView:o.getStore("show-tree-view",n.showTreeView),pinnedFolders:o.getStore("pinned-folders",n.pinnedFolders),treeViewData:[],selectButton:n.selectButton,maxFileSize:n.maxFileSize,theme:c,metricUnits:r,filesize:r?uo:io,compactListView:o.getStore("compact-list-view",!0),persist:f,showThumbnails:o.getStore("show-thumbnails",n.showThumbnails),fs:Is(l,u)})},Us=e.createElementVNode("div",{class:"fixed inset-0 bg-gray-500 dark:bg-gray-600 dark:bg-opacity-75 bg-opacity-75 transition-opacity"},null,-1),qs={class:"fixed z-10 inset-0 overflow-hidden"},Ps={class:"bg-white dark:bg-gray-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},Gs={class:"bg-gray-50 dark:bg-gray-800 dark:border-t dark:border-gray-700 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"},Ce={__name:"ModalLayout",setup(n){const t=e.ref(null),o=e.inject("ServiceContainer");return e.onMounted(()=>{const s=document.querySelector(".v-f-modal input");s&&s.focus(),e.nextTick(()=>{if(document.querySelector(".v-f-modal input")&&window.innerWidth<768){const r=t.value.getBoundingClientRect().bottom+16;window.scrollTo({top:r,left:0,behavior:"smooth"})}})}),(s,r)=>(e.openBlock(),e.createElementBlock("div",{class:"v-f-modal relative z-30","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",onKeyup:r[1]||(r[1]=e.withKeys(c=>e.unref(o).modal.close(),["esc"])),tabindex:"0"},[Us,e.createElementVNode("div",qs,[e.createElementVNode("div",{class:"flex items-end sm:items-center justify-center min-h-full p-4 text-center sm:p-0",onMousedown:r[0]||(r[0]=e.withModifiers(c=>e.unref(o).modal.close(),["self"]))},[e.createElementVNode("div",{ref_key:"modalBody",ref:t,class:"relative bg-white dark:bg-gray-800 rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:max-w-4xl md:max-w-2xl lg:max-w-3xl xl:max-w-3xl w-full"},[e.createElementVNode("div",Ps,[e.renderSlot(s.$slots,"default")]),e.createElementVNode("div",Gs,[e.renderSlot(s.$slots,"buttons")])],512)],32)])],32))}},Ks=(n,t)=>{const o=n.__vccOpts||n;for(const[s,r]of t)o[s]=r;return o},Ws={props:{on:{type:String,required:!0}},setup(n,{emit:t,slots:o}){const s=e.inject("ServiceContainer"),r=e.ref(!1),{t:c}=s.i18n;let a=null;const i=()=>{clearTimeout(a),r.value=!0,a=setTimeout(()=>{r.value=!1},2e3)};return e.onMounted(()=>{s.emitter.on(n.on,i)}),e.onUnmounted(()=>{clearTimeout(a)}),{shown:r,t:c}}},Ys={key:1};function Xs(n,t,o,s,r,c){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["text-sm text-green-600 dark:text-green-600 transition-opacity duration-500 ease-out",[{"opacity-0":!s.shown}]])},[n.$slots.default?e.renderSlot(n.$slots,"default",{key:0}):(e.openBlock(),e.createElementBlock("span",Ys,e.toDisplayString(s.t("Saved.")),1))],2)}const Je=Ks(Ws,[["render",Xs]]),Js={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",viewBox:"0 0 24 24"},Qs=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87q.11.06.22.127c.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a8 8 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a7 7 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a7 7 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a7 7 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124q.108-.066.22-.128c.332-.183.582-.495.644-.869z"},null,-1),Zs=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0"},null,-1),el=[Qs,Zs];function tl(n,t){return e.openBlock(),e.createElementBlock("svg",Js,[...el])}const nl={render:tl},ol={class:"flex items-center my-1 space-x-2"},rl={class:"flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},sl={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Oe={__name:"ModalHeader",props:{title:{type:String,required:!0},icon:{type:Object,required:!0}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",ol,[e.createElementVNode("div",rl,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.icon),{class:"p-0.5 h-6 w-6 stroke-blue-600 dark:stroke-blue-100"}))]),e.createElementVNode("h3",sl,e.toDisplayString(n.title),1)]))}},ll={class:"sm:items-start select-none"},al={class:"mt-3 sm:mt-0 sm:ml-4 sm:text-left w-full"},cl={class:"flex overflow-auto","aria-label":"Tabs"},il=["onClick","aria-current"],dl={key:0,class:"mt-4"},ul={class:"m-1 text-sm text-gray-500"},ml={href:"https://vuefinder.ozdemir.be",class:"block mt-2 text-sm text-blue-500 dark:text-blue-400",target:"_blank"},fl={href:"https://github.com/n1crack/vuefinder",class:"block mt-2 text-sm text-blue-500 dark:text-blue-400",target:"_blank"},pl={key:1,class:"mt-2"},hl={class:"m-1 text-sm text-gray-500"},vl={class:"mt-3 text-left"},gl={class:"space-y-2"},kl={class:"flex relative gap-x-3"},yl={class:"h-6 items-center"},_l={class:"flex-1 block text-sm"},xl={for:"metric_unit",class:"flex w-full font-medium text-gray-900 dark:text-gray-400"},wl={class:"flex relative gap-x-3"},bl={class:"h-6 items-center"},El={class:"flex-1 block text-sm"},Vl={for:"large_icons",class:"flex w-full font-medium text-gray-900 dark:text-gray-400"},Nl={class:"flex relative gap-x-3"},Sl={class:"h-6 items-center"},Bl={class:"flex-1 block text-sm"},$l={for:"persist_path",class:"flex w-full font-medium text-gray-900 dark:text-gray-400"},Cl={class:"flex relative gap-x-3"},Dl={class:"h-6 items-center"},Tl={class:"flex-1 block text-sm"},Ml={for:"show_thumbnails",class:"flex w-full font-medium text-gray-900 dark:text-gray-400"},Al={class:""},Ll={class:"h-6 items-center"},Ol={for:"theme",class:"flex w-full font-medium text-gray-900 dark:text-gray-400 text-sm"},Fl={class:"flex text-sm"},Rl=["label"],Hl=["value"],zl={key:0,class:""},Il={class:"h-6 items-center"},jl={for:"language",class:"flex w-full font-medium text-gray-900 dark:text-gray-400 text-sm text-nowrap"},Ul={class:"flex text-sm"},ql=["label"],Pl=["value"],Gl={key:2,class:"mt-3"},Kl={class:"space-y-2 sm:w-1/2"},Wl={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Yl=e.createElementVNode("kbd",null,"F2",-1),Xl={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Jl=e.createElementVNode("kbd",null,"F5",-1),Ql={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},Zl=e.createElementVNode("kbd",null,"Del",-1),ea={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},ta=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Esc")],-1),na={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},oa=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"A")],-1),ra={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},sa=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"F")],-1),la={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},aa=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"E")],-1),ca={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},ia=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,",")],-1),da={class:"flex justify-between text-sm text-gray-500 dark:text-gray-400"},ua=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"Enter")],-1),ma={key:3,class:"mt-3"},fa={class:"m-1 text-sm text-gray-500"},Qo={__name:"ModalAbout",setup(n){const t=e.inject("ServiceContainer"),{setStore:o,clearStore:s}=t.storage,{t:r,changeLocale:c,locale:a}=t.i18n,i={ABOUT:"about",SETTINGS:"settings",SHORTCUTS:"shortcuts",RESET:"reset"},l=e.computed(()=>[{name:r("About"),key:i.ABOUT},{name:r("Settings"),key:i.SETTINGS},{name:r("Shortcuts"),key:i.SHORTCUTS},{name:r("Reset"),key:i.RESET}]),d=e.ref("about"),f=async()=>{s(),location.reload()},u=D=>{t.theme.set(D),t.emitter.emit("vf-theme-saved")},p=()=>{t.metricUnits=!t.metricUnits,t.filesize=t.metricUnits?uo:io,o("metricUnits",t.metricUnits),t.emitter.emit("vf-metric-units-saved")},m=()=>{t.compactListView=!t.compactListView,o("compactListView",t.compactListView),t.emitter.emit("vf-compact-view-saved")},h=()=>{t.showThumbnails=!t.showThumbnails,o("show-thumbnails",t.showThumbnails),t.emitter.emit("vf-show-thumbnails-saved")},g=()=>{t.persist=!t.persist,o("persist-path",t.persist),t.emitter.emit("vf-persist-path-saved")},{i18n:v}=e.inject("VueFinderOptions"),y=Object.fromEntries(Object.entries({en:"English",fr:"French (Français)",de:"German (Deutsch)",fa:"Persian (فارسی)",he:"Hebrew (עִברִית)",hi:"Hindi (हिंदी)",ru:"Russian (Pусский)",sv:"Swedish (Svenska)",tr:"Turkish (Türkçe)",zhCN:"Simplified Chinese (简体中文)",zhTW:"Traditional Chinese (繁體中文)"}).filter(([D])=>Object.keys(v).includes(D))),O=e.computed(()=>({system:r("System"),light:r("Light"),dark:r("Dark")}));return(D,N)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:N[8]||(N[8]=S=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(r)("Close")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",ll,[e.createVNode(Oe,{icon:e.unref(nl),title:"Vuefinder "+e.unref(t).version},null,8,["icon","title"]),e.createElementVNode("div",al,[e.createElementVNode("div",null,[e.createElementVNode("div",null,[e.createElementVNode("nav",cl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,S=>(e.openBlock(),e.createElementBlock("button",{key:S.name,onClick:B=>d.value=S.key,class:e.normalizeClass([S.key===d.value?"bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300 border-sky-500":"text-gray-500 dark:text-gray-500 hover:text-gray-700 border-gray-300 dark:border-gray-600","px-3 py-2 border-b font-medium text-sm"]),"aria-current":S.current?"page":void 0},e.toDisplayString(S.name),11,il))),128))])])]),d.value===i.ABOUT?(e.openBlock(),e.createElementBlock("div",dl,[e.createElementVNode("div",ul,e.toDisplayString(e.unref(r)("Vuefinder is a simple, lightweight, and fast file manager library for Vue.js applications")),1),e.createElementVNode("a",ml,e.toDisplayString(e.unref(r)("Project home")),1),e.createElementVNode("a",fl,e.toDisplayString(e.unref(r)("Follow on GitHub")),1)])):e.createCommentVNode("",!0),d.value===i.SETTINGS?(e.openBlock(),e.createElementBlock("div",pl,[e.createElementVNode("div",hl,e.toDisplayString(e.unref(r)("Customize your experience with the following settings.")),1),e.createElementVNode("div",vl,[e.createElementVNode("fieldset",null,[e.createElementVNode("div",gl,[e.createElementVNode("div",kl,[e.createElementVNode("div",yl,[e.withDirectives(e.createElementVNode("input",{id:"metric_unit",name:"metric_unit",type:"checkbox","onUpdate:modelValue":N[0]||(N[0]=S=>e.unref(t).metricUnits=S),onClick:p,class:"h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600"},null,512),[[e.vModelCheckbox,e.unref(t).metricUnits]])]),e.createElementVNode("div",_l,[e.createElementVNode("label",xl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Use Metric Units"))+" ",1),e.createVNode(Je,{class:"ms-3",on:"vf-metric-units-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])])]),e.createElementVNode("div",wl,[e.createElementVNode("div",bl,[e.withDirectives(e.createElementVNode("input",{id:"large_icons",name:"large_icons",type:"checkbox","onUpdate:modelValue":N[1]||(N[1]=S=>e.unref(t).compactListView=S),onClick:m,class:"h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600"},null,512),[[e.vModelCheckbox,e.unref(t).compactListView]])]),e.createElementVNode("div",El,[e.createElementVNode("label",Vl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Compact list view"))+" ",1),e.createVNode(Je,{class:"ms-3",on:"vf-compact-view-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])])]),e.createElementVNode("div",Nl,[e.createElementVNode("div",Sl,[e.withDirectives(e.createElementVNode("input",{id:"persist_path",name:"persist_path",type:"checkbox","onUpdate:modelValue":N[2]||(N[2]=S=>e.unref(t).persist=S),onClick:g,class:"h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600"},null,512),[[e.vModelCheckbox,e.unref(t).persist]])]),e.createElementVNode("div",Bl,[e.createElementVNode("label",$l,[e.createTextVNode(e.toDisplayString(e.unref(r)("Persist path on reload"))+" ",1),e.createVNode(Je,{class:"ms-3",on:"vf-persist-path-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])])]),e.createElementVNode("div",Cl,[e.createElementVNode("div",Dl,[e.withDirectives(e.createElementVNode("input",{id:"show_thumbnails",name:"show_thumbnails",type:"checkbox","onUpdate:modelValue":N[3]||(N[3]=S=>e.unref(t).showThumbnails=S),onClick:h,class:"h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600"},null,512),[[e.vModelCheckbox,e.unref(t).showThumbnails]])]),e.createElementVNode("div",Tl,[e.createElementVNode("label",Ml,[e.createTextVNode(e.toDisplayString(e.unref(r)("Show thumbnails"))+" ",1),e.createVNode(Je,{class:"ms-3",on:"vf-show-thumbnails-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])])]),e.createElementVNode("div",Al,[e.createElementVNode("div",Ll,[e.createElementVNode("label",Ol,e.toDisplayString(e.unref(r)("Theme")),1)]),e.createElementVNode("div",Fl,[e.withDirectives(e.createElementVNode("select",{id:"theme","onUpdate:modelValue":N[4]||(N[4]=S=>e.unref(t).theme.value=S),onChange:N[5]||(N[5]=S=>u(S.target.value)),class:"flex-shrink-0 sm:w-1/2 w-full text-sm text-slate-500 border dark:border-gray-600 dark:text-neutral-50 dark:bg-gray-700 rounded"},[e.createElementVNode("optgroup",{label:e.unref(r)("Theme")},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,(S,B)=>(e.openBlock(),e.createElementBlock("option",{value:B},e.toDisplayString(S),9,Hl))),256))],8,Rl)],544),[[e.vModelSelect,e.unref(t).theme.value]]),e.createVNode(Je,{class:"ms-3 flex-shrink-0 flex-grow basis-full",on:"vf-theme-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])]),e.unref(t).features.includes(e.unref(ne).LANGUAGE)&&Object.keys(e.unref(y)).length>1?(e.openBlock(),e.createElementBlock("div",zl,[e.createElementVNode("div",Il,[e.createElementVNode("label",jl,e.toDisplayString(e.unref(r)("Language")),1)]),e.createElementVNode("div",Ul,[e.withDirectives(e.createElementVNode("select",{id:"language","onUpdate:modelValue":N[6]||(N[6]=S=>e.isRef(a)?a.value=S:null),onChange:N[7]||(N[7]=S=>e.unref(c)(S.target.value)),class:"flex-shrink-0 sm:w-1/2 w-full text-sm text-slate-500 border dark:border-gray-600 dark:text-neutral-50 dark:bg-gray-700 rounded"},[e.createElementVNode("optgroup",{label:e.unref(r)("Language")},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(y),(S,B)=>(e.openBlock(),e.createElementBlock("option",{value:B},e.toDisplayString(S),9,Pl))),256))],8,ql)],544),[[e.vModelSelect,e.unref(a)]]),e.createVNode(Je,{class:"ms-3 flex-shrink-0 flex-grow basis-full",on:"vf-language-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])])):e.createCommentVNode("",!0)])])])])):e.createCommentVNode("",!0),d.value===i.SHORTCUTS?(e.openBlock(),e.createElementBlock("div",Gl,[e.createElementVNode("div",Kl,[e.createElementVNode("div",Wl,[e.createElementVNode("div",null,e.toDisplayString(e.unref(r)("Rename")),1),Yl]),e.createElementVNode("div",Xl,[e.createElementVNode("div",null,e.toDisplayString(e.unref(r)("Refresh")),1),Jl]),e.createElementVNode("div",Ql,[e.createTextVNode(e.toDisplayString(e.unref(r)("Delete"))+" ",1),Zl]),e.createElementVNode("div",ea,[e.createTextVNode(e.toDisplayString(e.unref(r)("Escape"))+" ",1),ta]),e.createElementVNode("div",na,[e.createTextVNode(e.toDisplayString(e.unref(r)("Select All"))+" ",1),oa]),e.createElementVNode("div",ra,[e.createTextVNode(e.toDisplayString(e.unref(r)("Search"))+" ",1),sa]),e.createElementVNode("div",la,[e.createTextVNode(e.toDisplayString(e.unref(r)("Toggle Sidebar"))+" ",1),aa]),e.createElementVNode("div",ca,[e.createTextVNode(e.toDisplayString(e.unref(r)("Open Settings"))+" ",1),ia]),e.createElementVNode("div",da,[e.createTextVNode(e.toDisplayString(e.unref(r)("Toggle Full Screen"))+" ",1),ua])])])):e.createCommentVNode("",!0),d.value===i.RESET?(e.openBlock(),e.createElementBlock("div",ma,[e.createElementVNode("div",fa,e.toDisplayString(e.unref(r)("Reset all settings to default")),1),e.createElementVNode("button",{onClick:f,type:"button",class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(r)("Reset Settings")),1)])):e.createCommentVNode("",!0)])])]),_:1}))}},pa=["title"],ha=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-5 h-5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1),va=[ha],De={__name:"Message",props:{error:{type:Boolean,default:!1}},emits:["hidden"],setup(n,{emit:t}){var d;const o=t,s=e.inject("ServiceContainer"),{t:r}=s.i18n,c=e.ref(!1),a=e.ref(null),i=e.ref((d=a.value)==null?void 0:d.strMessage);e.watch(i,()=>c.value=!1);const l=()=>{o("hidden"),c.value=!0};return(f,u)=>(e.openBlock(),e.createElementBlock("div",null,[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"strMessage",ref:a,class:e.normalizeClass(["flex mt-2 p-1 px-2 rounded text-sm break-all dark:opacity-75",n.error?"bg-red-100 text-red-600 ":"bg-emerald-100 text-emerald-600"])},[e.renderSlot(f.$slots,"default"),e.createElementVNode("div",{class:"ml-auto cursor-pointer",onClick:l,title:e.unref(r)("Close")},va,8,pa)],2))]))}},ga={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"},ka=e.createElementVNode("path",{d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21q.512.078 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48 48 0 0 0-3.478-.397m-12 .562q.51-.089 1.022-.165m0 0a48 48 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a52 52 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a49 49 0 0 0-7.5 0"},null,-1),ya=[ka];function _a(n,t){return e.openBlock(),e.createElementBlock("svg",ga,[...ya])}const Zo={render:_a},xa={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},wa={class:"mt-2"},ba={class:"text-sm text-gray-500"},Ea={class:"text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar",style:{"max-height":"200px"}},Va={class:"flex text-sm text-gray-800 dark:text-gray-400"},Na={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Sa=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1),Ba=[Sa],$a={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Ca=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1),Da=[Ca],Ta={class:"ml-1.5"},Ma={class:"m-auto font-bold text-red-500 text-sm dark:text-red-200 text-center"},Tn={__name:"ModalDelete",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(t.modal.data.items),r=e.ref(""),c=()=>{s.value.length&&t.emitter.emit("vf-fetch",{params:{q:"delete",m:"post",adapter:t.fs.adapter,path:t.fs.data.dirname},body:{items:s.value.map(({path:a,type:i})=>({path:a,type:i}))},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:o("Files deleted.")})},onError:a=>{r.value=o(a.message)}})};return(a,i)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:c,class:"vf-btn vf-btn-danger"},e.toDisplayString(e.unref(o)("Yes, Delete!")),1),e.createElementVNode("button",{type:"button",onClick:i[1]||(i[1]=l=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1),e.createElementVNode("div",Ma,e.toDisplayString(e.unref(o)("This action cannot be undone.")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(Oe,{icon:e.unref(Zo),title:e.unref(o)("Delete files")},null,8,["icon","title"]),e.createElementVNode("div",xa,[e.createElementVNode("div",wa,[e.createElementVNode("p",ba,e.toDisplayString(e.unref(o)("Are you sure you want to delete these files?")),1),e.createElementVNode("div",Ea,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,l=>(e.openBlock(),e.createElementBlock("p",Va,[l.type==="dir"?(e.openBlock(),e.createElementBlock("svg",Na,Ba)):(e.openBlock(),e.createElementBlock("svg",$a,Da)),e.createElementVNode("span",Ta,e.toDisplayString(l.basename),1)]))),256))]),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:i[0]||(i[0]=l=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},Aa={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"},La=e.createElementVNode("path",{d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"},null,-1),Oa=[La];function Fa(n,t){return e.openBlock(),e.createElementBlock("svg",Aa,[...Oa])}const er={render:Fa},Ra={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Ha={class:"mt-2"},za={class:"flex text-sm text-gray-800 dark:text-gray-400 py-2"},Ia={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},ja=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1),Ua=[ja],qa={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Pa=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1),Ga=[Pa],Ka={class:"ml-1.5"},Mn={__name:"ModalRename",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(t.modal.data.items[0]),r=e.ref(t.modal.data.items[0].basename),c=e.ref(""),a=()=>{r.value!=""&&t.emitter.emit("vf-fetch",{params:{q:"rename",m:"post",adapter:t.fs.adapter,path:t.fs.data.dirname},body:{item:s.value.path,name:r.value},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:o("%s is renamed.",r.value)})},onError:i=>{c.value=o(i.message)}})};return(i,l)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:a,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Rename")),1),e.createElementVNode("button",{type:"button",onClick:l[2]||(l[2]=d=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(Oe,{icon:e.unref(er),title:e.unref(o)("Rename")},null,8,["icon","title"]),e.createElementVNode("div",Ra,[e.createElementVNode("div",Ha,[e.createElementVNode("p",za,[s.value.type==="dir"?(e.openBlock(),e.createElementBlock("svg",Ia,Ua)):(e.openBlock(),e.createElementBlock("svg",qa,Ga)),e.createElementVNode("span",Ka,e.toDisplayString(s.value.basename),1)]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=d=>r.value=d),onKeyup:e.withKeys(a,["enter"]),class:"px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",placeholder:"Name",type:"text"},null,544),[[e.vModelText,r.value]]),c.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:l[1]||(l[1]=d=>c.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},Te={ESCAPE:"Escape",F2:"F2",F5:"F5",DELETE:"Delete",ENTER:"Enter",BACKSLASH:"Backslash",KEY_A:"KeyA",KEY_E:"KeyE",KEY_F:"KeyF"};function Wa(n){const t=o=>{o.code===Te.ESCAPE&&(n.modal.close(),n.root.focus()),!n.modal.visible&&(n.fs.searchMode||(o.code===Te.F2&&n.features.includes(ne.RENAME)&&(n.dragSelect.getCount()!==1||n.modal.open(Mn,{items:n.dragSelect.getSelected()})),o.code===Te.F5&&n.emitter.emit("vf-fetch",{params:{q:"index",adapter:n.fs.adapter,path:n.fs.data.dirname}}),o.code===Te.DELETE&&(!n.dragSelect.getCount()||n.modal.open(Tn,{items:n.dragSelect.getSelected()})),o.metaKey&&o.code===Te.BACKSLASH&&n.modal.open(Qo),o.metaKey&&o.code===Te.KEY_F&&n.features.includes(ne.SEARCH)&&(n.fs.searchMode=!0,o.preventDefault()),o.metaKey&&o.code===Te.KEY_E&&(n.showTreeView=!n.showTreeView,n.storage.setStore("show-tree-view",n.showTreeView)),o.metaKey&&o.code===Te.ENTER&&(n.fullScreen=!n.fullScreen,n.root.focus()),o.metaKey&&o.code===Te.KEY_A&&(n.dragSelect.selectAll(),o.preventDefault())))};e.onMounted(()=>{n.root.addEventListener("keydown",t)}),e.onUnmounted(()=>{n.root.removeEventListener("keydown",t)})}const Ya={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"},Xa=e.createElementVNode("path",{d:"M12 10.5v6m3-3H9m4.06-7.19-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44z"},null,-1),Ja=[Xa];function Qa(n,t){return e.openBlock(),e.createElementBlock("svg",Ya,[...Ja])}const tr={render:Qa},Za={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},ec={class:"mt-2"},tc={class:"text-sm text-gray-500"},nc=["placeholder"],nr={__name:"ModalNewFolder",setup(n){const t=e.inject("ServiceContainer");t.storage;const{t:o}=t.i18n,s=e.ref(""),r=e.ref(""),c=()=>{s.value!==""&&t.emitter.emit("vf-fetch",{params:{q:"newfolder",m:"post",adapter:t.fs.adapter,path:t.fs.data.dirname},body:{name:s.value},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:o("%s is created.",s.value)})},onError:a=>{r.value=o(a.message)}})};return(a,i)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:c,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Create")),1),e.createElementVNode("button",{type:"button",onClick:i[2]||(i[2]=l=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(Oe,{icon:e.unref(tr),title:e.unref(o)("New Folder")},null,8,["icon","title"]),e.createElementVNode("div",Za,[e.createElementVNode("div",ec,[e.createElementVNode("p",tc,e.toDisplayString(e.unref(o)("Create a new folder")),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=l=>s.value=l),onKeyup:e.withKeys(c,["enter"]),class:"px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",placeholder:e.unref(o)("Folder Name"),type:"text"},null,40,nc),[[e.vModelText,s.value]]),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:i[1]||(i[1]=l=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},oc={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"},rc=e.createElementVNode("path",{d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m3.75 9v6m3-3H9m1.5-12H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9"},null,-1),sc=[rc];function lc(n,t){return e.openBlock(),e.createElementBlock("svg",oc,[...sc])}const or={render:lc},ac={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},cc={class:"mt-2"},ic={class:"text-sm text-gray-500"},dc=["placeholder"],uc={__name:"ModalNewFile",setup(n){const t=e.inject("ServiceContainer");t.storage;const{t:o}=t.i18n,s=e.ref(""),r=e.ref(""),c=()=>{s.value!==""&&t.emitter.emit("vf-fetch",{params:{q:"newfile",m:"post",adapter:t.fs.adapter,path:t.fs.data.dirname},body:{name:s.value},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:o("%s is created.",s.value)})},onError:a=>{r.value=o(a.message)}})};return(a,i)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:c,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Create")),1),e.createElementVNode("button",{type:"button",onClick:i[2]||(i[2]=l=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(Oe,{icon:e.unref(or),title:e.unref(o)("New File")},null,8,["icon","title"]),e.createElementVNode("div",ac,[e.createElementVNode("div",cc,[e.createElementVNode("p",ic,e.toDisplayString(e.unref(o)("Create a new file")),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=l=>s.value=l),onKeyup:e.withKeys(c,["enter"]),class:"px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",placeholder:e.unref(o)("File Name"),type:"text"},null,40,dc),[[e.vModelText,s.value]]),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:i[1]||(i[1]=l=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}};function gn(n,t=14){let o=`((?=([\\w\\W]{0,${t}}))([\\w\\W]{${t+1},})([\\w\\W]{8,}))`;return n.replace(new RegExp(o),"$2..$4")}const mc={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"},fc=e.createElementVNode("path",{d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"},null,-1),pc=[fc];function hc(n,t){return e.openBlock(),e.createElementBlock("svg",mc,[...pc])}const rr={render:hc},vc={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},gc={class:"mt-2"},kc={key:0,class:"pointer-events-none"},yc={key:1,class:"pointer-events-none"},_c=["disabled"],xc=["disabled"],wc={class:"text-gray-500 text-sm mb-1 pr-1 max-h-[200px] overflow-y-auto vf-scrollbar"},bc={class:"rounded flex flex-shrink-0 w-6 h-6 border bg-gray-50 text-xs cursor-default dark:border-gray-700 dark:bg-gray-800 dark:text-gray-50"},Ec=["textContent"],Vc={class:"ml-1 w-full h-fit"},Nc={class:"text-left hidden md:block"},Sc={class:"text-left md:hidden"},Bc={key:0,class:"ml-auto"},$c=["title","disabled","onClick"],Cc=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-5 h-5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1),Dc=[Cc],Tc={key:0,class:"py-2"},Mc=["disabled"],Ac={__name:"ModalUpload",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=o("uppy"),r={PENDING:0,CANCELED:1,UPLOADING:2,ERROR:3,DONE:10},c=e.ref({QUEUE_ENTRY_STATUS:r}),a=e.ref(null),i=e.ref(null),l=e.ref(null),d=e.ref(null),f=e.ref(null),u=e.ref(null),p=e.ref([]),m=e.ref(""),h=e.ref(!1),g=e.ref(!1);let v;function V(C){return p.value.findIndex(_=>_.id===C)}function y(C,_=null){_=_??(C.webkitRelativePath||C.name),v.addFile({name:_,type:C.type,data:C,source:"Local"})}function O(C){switch(C.status){case r.DONE:return"text-green-600";case r.ERROR:return"text-red-600";case r.CANCELED:return"text-red-600";case r.PENDING:default:return""}}const D=C=>{switch(C.status){case r.DONE:return"✓";case r.ERROR:case r.CANCELED:return"!";case r.PENDING:default:return"..."}};function N(){d.value.click()}function S(){if(!h.value){if(!p.value.filter(C=>C.status!==r.DONE).length){m.value=o("Please select file to upload first.");return}m.value="",v.retryAll(),v.upload()}}function B(){v.cancelAll({reason:"user"}),p.value.forEach(C=>{C.status!==r.DONE&&(C.status=r.CANCELED,C.statusName=o("Canceled"))}),h.value=!1}function b(C){h.value||(v.removeFile(C.id,"removed-by-user"),p.value.splice(V(C.id),1))}function $(C){if(!h.value){if(v.cancelAll({reason:"user"}),C){const _=[];p.value.forEach(k=>{k.status!==r.DONE&&_.push(k)}),p.value=[],_.forEach(k=>{y(k.originalFile,k.name)});return}p.value.splice(0)}}function E(){t.modal.close()}function x(){return t.requester.transformRequestParams({url:"",method:"post",params:{q:"upload",adapter:t.fs.adapter,path:t.fs.data.dirname}})}return e.onMounted(async()=>{v=new Vr({debug:t.debug,restrictions:{maxFileSize:Or(t.maxFileSize)},locale:s,onBeforeFileAdded(k,A){if(A[k.id]!=null){const K=V(k.id);p.value[K].status===r.PENDING&&(m.value=v.i18n("noDuplicates",{fileName:k.name})),p.value=p.value.filter(Z=>Z.id!==k.id)}return p.value.push({id:k.id,name:k.name,size:t.filesize(k.size),status:r.PENDING,statusName:o("Pending upload"),percent:null,originalFile:k.data}),!0}}),v.use(Nr,{endpoint:"WILL_BE_REPLACED_BEFORE_UPLOAD",limit:5,timeout:0,getResponseError(k,A){let T;try{T=JSON.parse(k).message}catch{T=o("Cannot parse server response.")}return new Error(T)}}),v.on("restriction-failed",(k,A)=>{const T=p.value[V(k.id)];b(T),m.value=A.message}),v.on("upload",()=>{const k=x();v.setMeta({...k.body});const A=v.getPlugin("XHRUpload");A.opts.method=k.method,A.opts.endpoint=k.url+"?"+new URLSearchParams(k.params),A.opts.headers=k.headers,delete k.headers["Content-Type"],h.value=!0,p.value.forEach(T=>{T.status!==r.DONE&&(T.percent=null,T.status=r.UPLOADING,T.statusName=o("Pending upload"))})}),v.on("upload-progress",(k,A)=>{const T=Math.floor(A.bytesUploaded/A.bytesTotal*100);p.value[V(k.id)].percent=`${T}%`}),v.on("upload-success",k=>{const A=p.value[V(k.id)];A.status=r.DONE,A.statusName=o("Done")}),v.on("upload-error",(k,A)=>{const T=p.value[V(k.id)];T.percent=null,T.status=r.ERROR,A.isNetworkError?T.statusName=o("Network Error, Unable establish connection to the server or interrupted."):T.statusName=A?A.message:o("Unknown Error")}),v.on("error",k=>{m.value=k.message,h.value=!1,t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.data.dirname},noCloseModal:!0})}),v.on("complete",()=>{h.value=!1,t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.data.dirname},noCloseModal:!0})}),d.value.addEventListener("click",()=>{i.value.click()}),f.value.addEventListener("click",()=>{l.value.click()}),u.value.addEventListener("dragover",k=>{k.preventDefault(),g.value=!0}),u.value.addEventListener("dragleave",k=>{k.preventDefault(),g.value=!1});function C(k,A){A.isFile&&A.file(T=>k(A,T)),A.isDirectory&&A.createReader().readEntries(T=>{T.forEach(K=>{C(k,K)})})}u.value.addEventListener("drop",k=>{k.preventDefault(),g.value=!1;const A=/^[/\\](.+)/;[...k.dataTransfer.items].forEach(T=>{T.kind==="file"&&C((K,Z)=>{const X=A.exec(K.fullPath);y(Z,X[1])},T.webkitGetAsEntry())})});const _=({target:k})=>{const A=k.files;for(const T of A)y(T);k.value=""};i.value.addEventListener("change",_),l.value.addEventListener("change",_)}),e.onBeforeUnmount(()=>{v==null||v.close({reason:"unmount"})}),(C,_)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["vf-btn vf-btn-primary",h.value?"bg-blue-200 hover:bg-blue-200 dark:bg-gray-700/50 dark:hover:bg-gray-700/50 dark:text-gray-500":"bg-blue-600 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-500"]),disabled:h.value,onClick:e.withModifiers(S,["prevent"])},e.toDisplayString(e.unref(o)("Upload")),11,Mc),h.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"vf-btn vf-btn-secondary",onClick:e.withModifiers(B,["prevent"])},e.toDisplayString(e.unref(o)("Cancel")),1)):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"vf-btn vf-btn-secondary",onClick:e.withModifiers(E,["prevent"])},e.toDisplayString(e.unref(o)("Close")),1))]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(Oe,{icon:e.unref(rr),title:e.unref(o)("Upload Files")},null,8,["icon","title"]),e.createElementVNode("div",vc,[e.createElementVNode("div",gc,[e.createElementVNode("div",{ref_key:"dropArea",ref:u,class:"flex items-center justify-center text-lg mb-4 text-gray-500 border-2 border-gray-300 rounded border-dashed select-none cursor-pointer dark:border-gray-600 h-[120px]",onClick:N},[g.value?(e.openBlock(),e.createElementBlock("div",kc,e.toDisplayString(e.unref(o)("Release to drop these files.")),1)):(e.openBlock(),e.createElementBlock("div",yc,e.toDisplayString(e.unref(o)("Drag and drop the files/folders to here or click here.")),1))],512),e.createElementVNode("div",{ref_key:"container",ref:a,class:"text-gray-500 mb-1"},[e.createElementVNode("button",{ref_key:"pickFiles",ref:d,type:"button",class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Select Files")),513),e.createElementVNode("button",{ref_key:"pickFolders",ref:f,type:"button",class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Select Folders")),513),e.createElementVNode("button",{type:"button",class:"vf-btn vf-btn-secondary",disabled:h.value,onClick:_[0]||(_[0]=k=>$(!1))},e.toDisplayString(e.unref(o)("Clear all")),9,_c),e.createElementVNode("button",{type:"button",class:"vf-btn vf-btn-secondary",disabled:h.value,onClick:_[1]||(_[1]=k=>$(!0))},e.toDisplayString(e.unref(o)("Clear only successful")),9,xc)],512),e.createElementVNode("div",wc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,k=>(e.openBlock(),e.createElementBlock("div",{class:"flex hover:bg-gray-100 dark:hover:bg-gray-800 dark:hover:text-gray-300",key:k.id},[e.createElementVNode("span",bc,[e.createElementVNode("span",{class:e.normalizeClass(["text-base m-auto",O(k)]),textContent:e.toDisplayString(D(k))},null,10,Ec)]),e.createElementVNode("div",Vc,[e.createElementVNode("div",Nc,e.toDisplayString(e.unref(gn)(k.name,40))+" ("+e.toDisplayString(k.size)+")",1),e.createElementVNode("div",Sc,e.toDisplayString(e.unref(gn)(k.name,16))+" ("+e.toDisplayString(k.size)+")",1),e.createElementVNode("div",{class:e.normalizeClass(["flex break-all text-left",O(k)])},[e.createTextVNode(e.toDisplayString(k.statusName)+" ",1),k.status===c.value.QUEUE_ENTRY_STATUS.UPLOADING?(e.openBlock(),e.createElementBlock("b",Bc,e.toDisplayString(k.percent),1)):e.createCommentVNode("",!0)],2)]),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["rounded w-5 h-5 border-1 text-base leading-none font-medium focus:outline-none dark:border-gray-200 dark:text-gray-400 dark:hover:text-gray-200 dark:bg-gray-600 ml-auto sm:text-xs hover:text-red-600",h.value?"disabled:bg-gray-100 text-white text-opacity-50":"bg-gray-100"]),title:e.unref(o)("Delete"),disabled:h.value,onClick:A=>b(k)},Dc,10,$c)]))),128)),p.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Tc,e.toDisplayString(e.unref(o)("No files selected!")),1))]),m.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:_[2]||(_[2]=k=>m.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.value),1)]),_:1})):e.createCommentVNode("",!0)])])]),e.createElementVNode("input",{ref_key:"internalFileInput",ref:i,type:"file",multiple:"",class:"hidden"},null,512),e.createElementVNode("input",{ref_key:"internalFolderInput",ref:l,type:"file",multiple:"",webkitdirectory:"",class:"hidden"},null,512)]),_:1}))}},Lc={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"},Oc=e.createElementVNode("path",{d:"m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5m6 4.125 2.25 2.25m0 0 2.25 2.25M12 13.875l2.25-2.25M12 13.875l-2.25 2.25M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125"},null,-1),Fc=[Oc];function Rc(n,t){return e.openBlock(),e.createElementBlock("svg",Lc,[...Fc])}const sr={render:Rc},Hc={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},zc={class:"mt-2"},Ic={class:"flex text-sm text-gray-800 dark:text-gray-400"},jc={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Uc=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1),qc=[Uc],Pc={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Gc=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1),Kc=[Gc],Wc={class:"ml-1.5"},Yc={class:"my-1 text-sm text-gray-500"},lr={__name:"ModalUnarchive",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(t.modal.data.items[0]),r=e.ref(""),c=e.ref([]),a=()=>{t.emitter.emit("vf-fetch",{params:{q:"unarchive",m:"post",adapter:t.fs.adapter,path:t.fs.data.dirname},body:{item:s.value.path},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:o("The file unarchived.")})},onError:i=>{r.value=o(i.message)}})};return(i,l)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:a,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Unarchive")),1),e.createElementVNode("button",{type:"button",onClick:l[1]||(l[1]=d=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(Oe,{icon:e.unref(sr),title:e.unref(o)("Unarchive")},null,8,["icon","title"]),e.createElementVNode("div",Hc,[e.createElementVNode("div",zc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,d=>(e.openBlock(),e.createElementBlock("p",Ic,[d.type==="dir"?(e.openBlock(),e.createElementBlock("svg",jc,qc)):(e.openBlock(),e.createElementBlock("svg",Pc,Kc)),e.createElementVNode("span",Wc,e.toDisplayString(d.basename),1)]))),256)),e.createElementVNode("p",Yc,e.toDisplayString(e.unref(o)("The archive will be unarchived at"))+" ("+e.toDisplayString(e.unref(t).fs.data.dirname)+")",1),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:l[0]||(l[0]=d=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},Xc={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"},Jc=e.createElementVNode("path",{d:"m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125"},null,-1),Qc=[Jc];function Zc(n,t){return e.openBlock(),e.createElementBlock("svg",Xc,[...Qc])}const ar={render:Zc},ei={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},ti={class:"mt-2"},ni={class:"text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar",style:{"max-height":"200px"}},oi={class:"flex text-sm text-gray-800 dark:text-gray-400"},ri={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},si=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1),li=[si],ai={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},ci=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1),ii=[ci],di={class:"ml-1.5"},ui=["placeholder"],cr={__name:"ModalArchive",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(""),r=e.ref(""),c=e.ref(t.modal.data.items),a=()=>{c.value.length&&t.emitter.emit("vf-fetch",{params:{q:"archive",m:"post",adapter:t.fs.adapter,path:t.fs.data.dirname},body:{items:c.value.map(({path:i,type:l})=>({path:i,type:l})),name:s.value},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:o("The file(s) archived.")})},onError:i=>{r.value=o(i.message)}})};return(i,l)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:a,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Archive")),1),e.createElementVNode("button",{type:"button",onClick:l[2]||(l[2]=d=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(Oe,{icon:e.unref(ar),title:e.unref(o)("Archive the files")},null,8,["icon","title"]),e.createElementVNode("div",ei,[e.createElementVNode("div",ti,[e.createElementVNode("div",ni,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,d=>(e.openBlock(),e.createElementBlock("p",oi,[d.type==="dir"?(e.openBlock(),e.createElementBlock("svg",ri,li)):(e.openBlock(),e.createElementBlock("svg",ai,ii)),e.createElementVNode("span",di,e.toDisplayString(d.basename),1)]))),256))]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=d=>s.value=d),onKeyup:e.withKeys(a,["enter"]),class:"my-1 px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",placeholder:e.unref(o)("Archive name. (.zip file will be created)"),type:"text"},null,40,ui),[[e.vModelText,s.value]]),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:l[1]||(l[1]=d=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},mi={xmlns:"http://www.w3.org/2000/svg",fill:"none",class:"animate-spin p-0.5 h-5 w-5 text-white ml-auto",viewBox:"0 0 24 24"},fi=e.createElementVNode("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",class:"opacity-25 stroke-blue-900 dark:stroke-blue-100"},null,-1),pi=e.createElementVNode("path",{fill:"currentColor",d:"M4 12a8 8 0 0 1 8-8V0C5.373 0 0 5.373 0 12zm2 5.291A7.96 7.96 0 0 1 4 12H0c0 3.042 1.135 5.824 3 7.938z",class:"opacity-75"},null,-1),hi=[fi,pi];function vi(n,t){return e.openBlock(),e.createElementBlock("svg",mi,[...hi])}const An={render:vi},gi={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"},ki=e.createElementVNode("path",{d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"},null,-1),yi=[ki];function _i(n,t){return e.openBlock(),e.createElementBlock("svg",gi,[...yi])}const xi={render:_i},wi={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"},bi=e.createElementVNode("path",{d:"M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25"},null,-1),Ei=[bi];function Vi(n,t){return e.openBlock(),e.createElementBlock("svg",wi,[...Ei])}const Ni={render:Vi},Si={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"},Bi=e.createElementVNode("path",{d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25zm0 9.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18zM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25zm0 9.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18z"},null,-1),$i=[Bi];function Ci(n,t){return e.openBlock(),e.createElementBlock("svg",Si,[...$i])}const Di={render:Ci},Ti={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"},Mi=e.createElementVNode("path",{d:"M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 0 1 0 3.75H5.625a1.875 1.875 0 0 1 0-3.75"},null,-1),Ai=[Mi];function Li(n,t){return e.openBlock(),e.createElementBlock("svg",Ti,[...Ai])}const Oi={render:Li},Fi={class:"border-neutral-300 flex justify-between items-center py-1 text-sm grow-0"},Ri={key:0,class:"flex text-center"},Hi=["title"],zi=["title"],Ii=["title"],ji=["title"],Ui=["title"],qi=["title"],Pi=["title"],Gi={key:1,class:"flex text-center"},Ki={class:"pl-2"},Wi={class:"dark:bg-gray-700 bg-gray-200 text-xs px-2 py-1 rounded"},Yi={class:"flex text-center items-center justify-end"},Xi=["title"],Ji=["title"],Qi={__name:"Toolbar",setup(n){const t=e.inject("ServiceContainer"),{setStore:o}=t.storage,{t:s}=t.i18n,r=t.dragSelect,c=e.ref("");t.emitter.on("vf-search-query",({newQuery:l})=>{c.value=l});const a=()=>{t.fullScreen=!t.fullScreen};e.watch(()=>t.fullScreen,()=>{t.fullScreen?document.querySelector("body").style.overflow="hidden":document.querySelector("body").style.overflow="",o("full-screen",t.fullScreen),t.emitter.emit("vf-fullscreen-toggle")});const i=()=>{t.view=t.view==="list"?"grid":"list",r.refreshSelection(),o("viewport",t.view)};return(l,d)=>(e.openBlock(),e.createElementBlock("div",Fi,[c.value.length?(e.openBlock(),e.createElementBlock("div",Gi,[e.createElementVNode("div",Ki,[e.createTextVNode(e.toDisplayString(e.unref(s)("Search results for"))+" ",1),e.createElementVNode("span",Wi,e.toDisplayString(c.value),1)]),e.unref(t).fs.loading?(e.openBlock(),e.createBlock(e.unref(An),{key:0})):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",Ri,[e.unref(t).features.includes(e.unref(ne).NEW_FOLDER)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mx-1.5",title:e.unref(s)("New Folder"),onClick:d[0]||(d[0]=f=>e.unref(t).modal.open(nr,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(tr))],8,Hi)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(ne).NEW_FILE)?(e.openBlock(),e.createElementBlock("div",{key:1,class:"mx-1.5",title:e.unref(s)("New File"),onClick:d[1]||(d[1]=f=>e.unref(t).modal.open(uc,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(or))],8,zi)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(ne).RENAME)?(e.openBlock(),e.createElementBlock("div",{key:2,class:"mx-1.5",title:e.unref(s)("Rename"),onClick:d[2]||(d[2]=f=>e.unref(r).getCount()!==1||e.unref(t).modal.open(Mn,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(er),{class:e.normalizeClass(e.unref(r).getCount()===1?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,Ii)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(ne).DELETE)?(e.openBlock(),e.createElementBlock("div",{key:3,class:"mx-1.5",title:e.unref(s)("Delete"),onClick:d[3]||(d[3]=f=>!e.unref(r).getCount()||e.unref(t).modal.open(Tn,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(Zo),{class:e.normalizeClass(e.unref(r).getCount()?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,ji)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(ne).UPLOAD)?(e.openBlock(),e.createElementBlock("div",{key:4,class:"mx-1.5",title:e.unref(s)("Upload"),onClick:d[4]||(d[4]=f=>e.unref(t).modal.open(Ac,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(rr))],8,Ui)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(ne).UNARCHIVE)&&e.unref(r).getCount()===1&&e.unref(r).getSelected()[0].mime_type==="application/zip"?(e.openBlock(),e.createElementBlock("div",{key:5,class:"mx-1.5",title:e.unref(s)("Unarchive"),onClick:d[5]||(d[5]=f=>!e.unref(r).getCount()||e.unref(t).modal.open(lr,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(sr),{class:e.normalizeClass(e.unref(r).getCount()?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,qi)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(ne).ARCHIVE)?(e.openBlock(),e.createElementBlock("div",{key:6,class:"mx-1.5",title:e.unref(s)("Archive"),onClick:d[6]||(d[6]=f=>!e.unref(r).getCount()||e.unref(t).modal.open(cr,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(ar),{class:e.normalizeClass(e.unref(r).getCount()?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,Pi)):e.createCommentVNode("",!0)])),e.createElementVNode("div",Yi,[e.unref(t).features.includes(e.unref(ne).FULL_SCREEN)?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:a,class:"mx-1.5",title:e.unref(s)("Toggle Full Screen")},[e.unref(t).fullScreen?(e.openBlock(),e.createBlock(e.unref(Ni),{key:0})):(e.openBlock(),e.createBlock(e.unref(xi),{key:1}))],8,Xi)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"mx-1.5",title:e.unref(s)("Change View"),onClick:d[7]||(d[7]=f=>c.value.length||i())},[e.unref(t).view==="grid"?(e.openBlock(),e.createBlock(e.unref(Di),{key:0,class:e.normalizeClass(c.value.length?"vf-toolbar-icon-disabled":"vf-toolbar-icon")},null,8,["class"])):e.createCommentVNode("",!0),e.unref(t).view==="list"?(e.openBlock(),e.createBlock(e.unref(Oi),{key:1,class:e.normalizeClass(c.value.length?"vf-toolbar-icon-disabled":"vf-toolbar-icon")},null,8,["class"])):e.createCommentVNode("",!0)],8,Ji)])]))}},Zi=(n,t=0,o=!1)=>{let s;return(...r)=>{o&&!s&&n(...r),clearTimeout(s),s=setTimeout(()=>{n(...r)},t)}},ao=(n,t,o)=>{const s=e.ref(n);return e.customRef((r,c)=>({get(){return r(),s.value},set:Zi(a=>{s.value=a,c()},t,o)}))},ed={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",viewBox:"0 0 24 24"},td=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3"},null,-1),nd=[td];function od(n,t){return e.openBlock(),e.createElementBlock("svg",ed,[...nd])}const rd={render:od},sd={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},ld={class:"text-sm text-gray-500 pb-1"},ad={class:"max-h-[200px] overflow-y-auto vf-scrollbar text-left"},cd={class:"flex text-sm text-gray-800 dark:text-gray-400"},id={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},dd=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1),ud=[dd],md={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},fd=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1),pd=[fd],hd={class:"ml-1.5"},vd={class:"font-bold text-xs text-gray-700 dark:text-gray-500 mt-3 tracking-wider"},gd={class:"flex text-sm text-gray-800 dark:text-gray-400 border dark:border-gray-700 p-1 rounded"},kd=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})],-1),yd={class:"ml-1.5 overflow-auto"},_d={class:"m-1 mr-auto font-bold text-gray-500 text-sm dark:text-gray-200 self-center"},kn={__name:"ModalMove",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(t.modal.data.items.from),r=e.ref(""),c=()=>{s.value.length&&t.emitter.emit("vf-fetch",{params:{q:"move",m:"post",adapter:t.fs.adapter,path:t.fs.data.dirname},body:{items:s.value.map(({path:a,type:i})=>({path:a,type:i})),item:t.modal.data.items.to.path},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:o("Files moved.",t.modal.data.items.to.name)})},onError:a=>{r.value=o(a.message)}})};return(a,i)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:c,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Yes, Move!")),1),e.createElementVNode("button",{type:"button",onClick:i[1]||(i[1]=l=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1),e.createElementVNode("div",_d,e.toDisplayString(e.unref(o)("%s item(s) selected.",s.value.length)),1)]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(Oe,{icon:e.unref(rd),title:e.unref(o)("Move files")},null,8,["icon","title"]),e.createElementVNode("div",sd,[e.createElementVNode("p",ld,e.toDisplayString(e.unref(o)("Are you sure you want to move these files?")),1),e.createElementVNode("div",ad,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,l=>(e.openBlock(),e.createElementBlock("div",cd,[e.createElementVNode("div",null,[l.type==="dir"?(e.openBlock(),e.createElementBlock("svg",id,ud)):(e.openBlock(),e.createElementBlock("svg",md,pd))]),e.createElementVNode("div",hd,e.toDisplayString(l.path),1)]))),256))]),e.createElementVNode("h4",vd,e.toDisplayString(e.unref(o)("Target Directory")),1),e.createElementVNode("p",gd,[kd,e.createElementVNode("span",yd,e.toDisplayString(e.unref(t).modal.data.items.to.path),1)]),r.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:i[0]||(i[0]=l=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])]),_:1}))}},xd={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-6 w-6 p-1 rounded text-slate-700 hover:bg-neutral-300 dark:text-neutral-200 dark:hover:bg-gray-700 cursor-pointer",viewBox:"-40 -40 580 580"},wd=e.createElementVNode("path",{d:"M463.5 224h8.5c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2S461.9 48.1 455 55l-41.6 41.6c-87.6-86.5-228.7-86.2-315.8 1-87.5 87.5-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2S334.3 224 344 224z"},null,-1),bd=[wd];function Ed(n,t){return e.openBlock(),e.createElementBlock("svg",xd,[...bd])}const Vd={render:Ed},Nd={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-6 w-6 p-0.5 rounded",viewBox:"0 0 20 20"},Sd=e.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.293 9.707a1 1 0 0 1 0-1.414l4-4a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1-1.414 1.414L11 7.414V15a1 1 0 1 1-2 0V7.414L6.707 9.707a1 1 0 0 1-1.414 0",class:"pointer-events-none","clip-rule":"evenodd"},null,-1),Bd=[Sd];function $d(n,t){return e.openBlock(),e.createElementBlock("svg",Nd,[...Bd])}const Cd={render:$d},Dd={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"h-6 w-6 p-1 rounded text-slate-700 hover:bg-neutral-300 dark:text-neutral-200 dark:hover:bg-gray-700 cursor-pointer",viewBox:"0 0 24 24"},Td=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"},null,-1),Md=[Td];function Ad(n,t){return e.openBlock(),e.createElementBlock("svg",Dd,[...Md])}const Ld={render:Ad},Od={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-6 w-6 p-1 rounded text-slate-700 hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-gray-800 cursor-pointer",viewBox:"0 0 20 20"},Fd=e.createElementVNode("path",{d:"M10.707 2.293a1 1 0 0 0-1.414 0l-7 7a1 1 0 0 0 1.414 1.414L4 10.414V17a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-6.586l.293.293a1 1 0 0 0 1.414-1.414z",class:"pointer-events-none"},null,-1),Rd=[Fd];function Hd(n,t){return e.openBlock(),e.createElementBlock("svg",Od,[...Rd])}const zd={render:Hd},Id={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-6 w-6 p-1 m-auto stroke-gray-400 fill-gray-100 dark:stroke-gray-400 dark:fill-gray-400/20",viewBox:"0 0 20 20"},jd=e.createElementVNode("path",{d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607"},null,-1),Ud=[jd];function qd(n,t){return e.openBlock(),e.createElementBlock("svg",Id,[...Ud])}const Pd={render:qd},Gd={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"w-6 h-6 cursor-pointer",viewBox:"0 0 24 24"},Kd=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"},null,-1),Wd=[Kd];function Yd(n,t){return e.openBlock(),e.createElementBlock("svg",Gd,[...Wd])}const Xd={render:Yd},Jd={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",class:"text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",viewBox:"0 0 24 24"},Qd=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-6l-2-2H5a2 2 0 0 0-2 2"},null,-1),Zd=[Qd];function eu(n,t){return e.openBlock(),e.createElementBlock("svg",Jd,[...Zd])}const It={render:eu},tu={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",class:"h-6 w-6 p-1 rounded text-slate-700 dark:text-neutral-300 cursor-pointer",viewBox:"0 0 24 24"},nu=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),ou=e.createElementVNode("path",{d:"M9 6h11M12 12h8M15 18h5M5 6v.01M8 12v.01M11 18v.01"},null,-1),ru=[nu,ou];function su(n,t){return e.openBlock(),e.createElementBlock("svg",tu,[...ru])}const lu={render:su},au={xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 rounded text-slate-700 hover:bg-neutral-100 dark:fill-neutral-300 dark:hover:bg-gray-800 cursor-pointer",viewBox:"0 0 448 512"},cu=e.createElementVNode("path",{d:"M8 256a56 56 0 1 1 112 0 56 56 0 1 1-112 0m160 0a56 56 0 1 1 112 0 56 56 0 1 1-112 0m216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112"},null,-1),iu=[cu];function du(n,t){return e.openBlock(),e.createElementBlock("svg",au,[...iu])}const uu={render:du},mu={class:"space-x-0.5 flex p-1.5 bg-neutral-100 dark:bg-gray-800 border-t border-b border-neutral-300 dark:border-gray-700/50 items-center select-none text-sm grow-0"},fu=["title"],pu=["title"],hu=["title"],vu=["title"],gu={class:"flex leading-6"},ku={key:0,class:"flex"},yu=e.createElementVNode("div",{class:"text-neutral-300 dark:text-gray-600 mx-0.5"},"/",-1),_u={class:"relative"},xu=e.createElementVNode("span",{class:"text-neutral-300 dark:text-gray-600 mx-0.5"},"/",-1),wu=["onDragover","onDragleave","onDrop","title","onClick"],bu={class:"relative flex bg-white dark:bg-gray-700 justify-between items-center rounded p-1 ml-2 w-full"},Eu=["placeholder"],Vu={class:"z-30 absolute top-[65px] md:top-[75px] left-[90px] rounded -mx-1.5 mt-1 bg-neutral-50 dark:bg-gray-800 max-w-80 max-h-50 shadow overflow-y-auto text-gray-700 dark:text-gray-200 border border-neutral-300 dark:border-gray-600"},Nu=["onDrop","onClick"],Su={class:"flex pointer-events-none"},Bu={class:"inline-block w-full text-ellipsis overflow-hidden"},$u={__name:"Breadcrumb",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=t.dragSelect,{setStore:r}=t.storage,c=e.ref(null),a=ao(0,100);e.watch(a,B=>{const b=c.value.children;let $=0,E=0,x=5,C=1;t.fs.limitBreadcrumbItems(x),e.nextTick(()=>{for(let _=b.length-1;_>=0&&!($+b[_].offsetWidth>a.value-40);_--)$+=parseInt(b[_].offsetWidth,10),E++;E<C&&(E=C),E>x&&(E=x),t.fs.limitBreadcrumbItems(E)})});const i=()=>{a.value=c.value.offsetWidth};e.onMounted(()=>{new ResizeObserver(i).observe(c.value)});const l=(B,b=null)=>{B.preventDefault(),s.isDraggingRef.value=!1,u(B),b??(b=t.fs.hiddenBreadcrumbs.length-1);let $=JSON.parse(B.dataTransfer.getData("items"));if($.find(E=>E.storage!==t.fs.adapter)){alert("Moving items between different storages is not supported yet.");return}t.modal.open(kn,{items:{from:$,to:t.fs.hiddenBreadcrumbs[b]??{path:t.fs.adapter+"://"}}})},d=(B,b=null)=>{B.preventDefault(),s.isDraggingRef.value=!1,u(B),b??(b=t.fs.breadcrumbs.length-2);let $=JSON.parse(B.dataTransfer.getData("items"));if($.find(E=>E.storage!==t.fs.adapter)){alert("Moving items between different storages is not supported yet.");return}t.modal.open(kn,{items:{from:$,to:t.fs.breadcrumbs[b]??{path:t.fs.adapter+"://"}}})},f=B=>{B.preventDefault(),t.fs.isGoUpAvailable()?(B.dataTransfer.dropEffect="copy",B.currentTarget.classList.add("bg-blue-200","dark:bg-slate-600")):(B.dataTransfer.dropEffect="none",B.dataTransfer.effectAllowed="none")},u=B=>{B.preventDefault(),B.currentTarget.classList.remove("bg-blue-200","dark:bg-slate-600"),t.fs.isGoUpAvailable()&&B.currentTarget.classList.remove("bg-blue-200","dark:bg-slate-600")},p=()=>{N(),t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.data.dirname}})},m=()=>{N(),!t.fs.isGoUpAvailable()||t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.parentFolderPath}})},h=B=>{t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:B.path}}),t.fs.toggleHiddenBreadcrumbs(!1)},g=()=>{t.fs.showHiddenBreadcrumbs&&t.fs.toggleHiddenBreadcrumbs(!1)},v={mounted(B,b,$,E){B.clickOutsideEvent=function(x){B===x.target||B.contains(x.target)||b.value()},document.body.addEventListener("click",B.clickOutsideEvent)},beforeUnmount(B,b,$,E){document.body.removeEventListener("click",B.clickOutsideEvent)}},V=()=>{t.showTreeView=!t.showTreeView};e.watch(()=>t.showTreeView,(B,b)=>{B!==b&&r("show-tree-view",B)});const y=e.ref(null),O=()=>{t.features.includes(ne.SEARCH)&&(t.fs.searchMode=!0,e.nextTick(()=>y.value.focus()))},D=ao("",400);e.watch(D,B=>{t.emitter.emit("vf-toast-clear"),t.emitter.emit("vf-search-query",{newQuery:B})}),e.watch(()=>t.fs.searchMode,B=>{B&&e.nextTick(()=>y.value.focus())});const N=()=>{t.fs.searchMode=!1,D.value=""};t.emitter.on("vf-search-exit",()=>{N()});const S=()=>{D.value===""&&N()};return(B,b)=>(e.openBlock(),e.createElementBlock("div",mu,[e.createElementVNode("span",{title:e.unref(o)("Toggle Tree View")},[e.createVNode(e.unref(lu),{onClick:V,class:e.normalizeClass(["h-6 w-6 p-0.5 rounded cursor-pointer text-slate-700",e.unref(t).showTreeView?"bg-gray-300 dark:bg-gray-700":""])},null,8,["class"])],8,fu),e.createElementVNode("span",{title:e.unref(o)("Go up a directory")},[e.createVNode(e.unref(Cd),{onDragover:b[0]||(b[0]=$=>f($)),onDragleave:b[1]||(b[1]=$=>u($)),onDrop:b[2]||(b[2]=$=>d($)),onClick:m,class:e.normalizeClass(e.unref(t).fs.isGoUpAvailable()?"text-slate-700 hover:bg-neutral-300 dark:text-neutral-200 dark:hover:bg-gray-700 cursor-pointer":"text-gray-400 dark:text-neutral-500")},null,8,["class"])],8,pu),e.unref(t).fs.loading?(e.openBlock(),e.createElementBlock("span",{key:1,title:e.unref(o)("Cancel")},[e.createVNode(e.unref(Ld),{onClick:b[3]||(b[3]=$=>e.unref(t).emitter.emit("vf-fetch-abort"))})],8,vu)):(e.openBlock(),e.createElementBlock("span",{key:0,title:e.unref(o)("Refresh")},[e.createVNode(e.unref(Vd),{onClick:p})],8,hu)),e.withDirectives(e.createElementVNode("div",{onClick:e.withModifiers(O,["self"]),class:"group flex bg-white dark:bg-gray-700 items-center rounded p-1 ml-2 w-full overflow-hidden"},[e.createElementVNode("div",null,[e.createVNode(e.unref(zd),{onDragover:b[4]||(b[4]=$=>f($)),onDragleave:b[5]||(b[5]=$=>u($)),onDrop:b[6]||(b[6]=$=>d($,-1)),onClick:b[7]||(b[7]=$=>e.unref(t).emitter.emit("vf-fetch",{params:{q:"index",adapter:e.unref(t).fs.adapter}}))})]),e.createElementVNode("div",gu,[e.unref(t).fs.hiddenBreadcrumbs.length?e.withDirectives((e.openBlock(),e.createElementBlock("div",ku,[yu,e.createElementVNode("div",_u,[e.createElementVNode("span",{onDragenter:b[8]||(b[8]=$=>e.unref(t).fs.toggleHiddenBreadcrumbs(!0)),onClick:b[9]||(b[9]=$=>e.unref(t).fs.toggleHiddenBreadcrumbs()),class:"text-slate-700 dark:text-slate-200 hover:bg-neutral-100 dark:hover:bg-gray-800 rounded cursor-pointer"},[e.createVNode(e.unref(uu),{class:"px-1 pointer-events-none"})],32)])])),[[v,g]]):e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"breadcrumbContainer",ref:c,class:"flex leading-6 w-full overflow-hidden",onClick:e.withModifiers(O,["self"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).fs.breadcrumbs,($,E)=>(e.openBlock(),e.createElementBlock("div",{key:E},[xu,e.createElementVNode("span",{onDragover:x=>E===e.unref(t).fs.breadcrumbs.length-1||f(x),onDragleave:x=>E===e.unref(t).fs.breadcrumbs.length-1||u(x),onDrop:x=>E===e.unref(t).fs.breadcrumbs.length-1||d(x,E),class:"px-1.5 py-1 text-slate-700 dark:text-slate-200 hover:bg-neutral-100 dark:hover:bg-gray-800 rounded cursor-pointer whitespace-nowrap",title:$.basename,onClick:x=>e.unref(t).emitter.emit("vf-fetch",{params:{q:"index",adapter:e.unref(t).fs.adapter,path:$.path}})},e.toDisplayString($.name),41,wu)]))),128))],512),e.unref(t).fs.loading?(e.openBlock(),e.createBlock(e.unref(An),{key:0})):e.createCommentVNode("",!0)],512),[[e.vShow,!e.unref(t).fs.searchMode]]),e.withDirectives(e.createElementVNode("div",bu,[e.createElementVNode("div",null,[e.createVNode(e.unref(Pd))]),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:y,onKeydown:e.withKeys(N,["esc"]),onBlur:S,"onUpdate:modelValue":b[10]||(b[10]=$=>e.isRef(D)?D.value=$:null),placeholder:e.unref(o)("Search anything.."),class:"w-full pb-0 px-1 border-0 text-base ring-0 outline-0 text-gray-600 focus:ring-transparent focus:border-transparent dark:focus:ring-transparent dark:focus:border-transparent dark:text-gray-300 bg-transparent",type:"text"},null,40,Eu),[[e.vModelText,e.unref(D)]]),e.createVNode(e.unref(Xd),{onClick:N})],512),[[e.vShow,e.unref(t).fs.searchMode]]),e.withDirectives(e.createElementVNode("div",Vu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).fs.hiddenBreadcrumbs,($,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,onDragover:b[11]||(b[11]=x=>f(x)),onDragleave:b[12]||(b[12]=x=>u(x)),onDrop:x=>l(x,E),onClick:x=>h($),class:"px-2 py-0.5 hover:bg-gray-400/20 cursor-pointer items-center whitespace-nowrap"},[e.createElementVNode("div",Su,[e.createElementVNode("span",null,[e.createVNode(e.unref(It),{class:"h-5 w-5"})]),e.createTextVNode(),e.createElementVNode("span",Bu,e.toDisplayString($.name),1)])],40,Nu))),128))],512),[[e.vShow,e.unref(t).fs.showHiddenBreadcrumbs]])]))}},ir=(n,t=null)=>new Date(n*1e3).toLocaleString(t??navigator.language??"en-US"),Cu=["onClick"],Du={__name:"Toast",setup(n){const t=e.inject("ServiceContainer"),{getStore:o}=t.storage,s=e.ref(o("full-screen",!1)),r=e.ref([]),c=l=>l==="error"?"text-red-400 border-red-400 dark:text-red-300 dark:border-red-300":"text-lime-600 border-lime-600 dark:text-lime-300 dark:border-lime-1300",a=l=>{r.value.splice(l,1)},i=l=>{let d=r.value.findIndex(f=>f.id===l);d!==-1&&a(d)};return t.emitter.on("vf-toast-clear",()=>{r.value=[]}),t.emitter.on("vf-toast-push",l=>{let d=new Date().getTime().toString(36).concat(performance.now().toString(),Math.random().toString()).replace(/\./g,"");l.id=d,r.value.push(l),setTimeout(()=>{i(d)},5e3)}),(l,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([s.value.value?"fixed":"absolute","max-w-fit flex flex-col bottom-0 left-1/2 -translate-x-1/2 z-10"])},[e.createVNode(e.TransitionGroup,{name:"vf-toast-item","leave-active-class":"transition-all duration-1000","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(f,u)=>(e.openBlock(),e.createElementBlock("div",{onClick:p=>a(u),key:f,class:e.normalizeClass([c(f.type),"inline-block mx-auto my-0.5 py-0.5 px-2 min-w-max bg-gray-50 dark:bg-gray-600 border text-xs sm:text-sm rounded cursor-pointer"])},e.toDisplayString(f.label),11,Cu))),128))]),_:1})],2))}},Tu={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-5 w-5",viewBox:"0 0 20 20"},Mu=e.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 0 1 1.414 0L10 10.586l3.293-3.293a1 1 0 1 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 0-1.414","clip-rule":"evenodd"},null,-1),Au=[Mu];function Lu(n,t){return e.openBlock(),e.createElementBlock("svg",Tu,[...Au])}const Ou={render:Lu},Fu={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-5 w-5",viewBox:"0 0 20 20"},Ru=e.createElementVNode("path",{"fill-rule":"evenodd",d:"M14.707 12.707a1 1 0 0 1-1.414 0L10 9.414l-3.293 3.293a1 1 0 0 1-1.414-1.414l4-4a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1 0 1.414","clip-rule":"evenodd"},null,-1),Hu=[Ru];function zu(n,t){return e.openBlock(),e.createElementBlock("svg",Fu,[...Hu])}const Iu={render:zu},wt={__name:"SortIcon",props:{direction:String},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",null,[n.direction==="asc"?(e.openBlock(),e.createBlock(e.unref(Ou),{key:0})):e.createCommentVNode("",!0),n.direction==="desc"?(e.openBlock(),e.createBlock(e.unref(Iu),{key:1})):e.createCommentVNode("",!0)]))}},ju={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",class:"text-neutral-500",viewBox:"0 0 24 24"},Uu=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 0 0 2-2V9.414a1 1 0 0 0-.293-.707l-5.414-5.414A1 1 0 0 0 12.586 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2"},null,-1),qu=[Uu];function Pu(n,t){return e.openBlock(),e.createElementBlock("svg",ju,[...qu])}const Gu={render:Pu},Jt={__name:"ItemIcon",props:{type:{type:String,required:!0},small:{type:Boolean,default:!1}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("span",null,[n.type==="dir"?(e.openBlock(),e.createBlock(e.unref(It),{key:0,class:e.normalizeClass({"h-5 w-5":n.small,"h-10 w-10 md:h-12 md:w-12 m-auto":!n.small})},null,8,["class"])):(e.openBlock(),e.createBlock(e.unref(Gu),{key:1,class:e.normalizeClass({"h-5 w-5":n.small,"h-10 w-10 md:h-12 md:w-12 m-auto":!n.small})},null,8,["class"]))]))}},Ku={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",class:"absolute h-6 w-6 md:h-12 md:w-12 m-auto stroke-neutral-500 fill-white dark:fill-gray-700 dark:stroke-gray-600 z-10",viewBox:"0 0 24 24"},Wu=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 0 0 2-2V9.414a1 1 0 0 0-.293-.707l-5.414-5.414A1 1 0 0 0 12.586 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2"},null,-1),Yu=[Wu];function Xu(n,t){return e.openBlock(),e.createElementBlock("svg",Ku,[...Yu])}const Ju={render:Xu},Qu={class:"absolute -z-50 -top-96"},Zu={class:"text-neutral-700 dark:text-neutral-300 p-1 absolute text-center top-4 right-[-2rem] md:top-5 md:right-[-2.4rem] z-20 text-xs"},em={__name:"DragItem",props:{count:{type:Number,default:0}},setup(n){const t=n;return(o,s)=>(e.openBlock(),e.createElementBlock("div",Qu,[e.createVNode(e.unref(Ju)),e.createElementVNode("div",Zu,e.toDisplayString(t.count),1)]))}},tm={class:"flex"},nm=["title"],om={class:"ml-auto mb-2"},rm={key:0,class:"p-2 border font-normal whitespace-pre-wrap border-gray-200 dark:border-gray-700/50 dark:text-gray-200 rounded min-h-[200px] max-h-[60vh] text-xs overflow-auto"},sm={key:1},lm={__name:"Text",emits:["success"],setup(n,{emit:t}){const o=t,s=e.ref(""),r=e.ref(""),c=e.ref(null),a=e.ref(!1),i=e.ref(""),l=e.ref(!1),d=e.inject("ServiceContainer"),{t:f}=d.i18n;e.onMounted(()=>{d.requester.send({url:"",method:"get",params:{q:"preview",adapter:d.modal.data.adapter,path:d.modal.data.item.path},responseType:"text"}).then(m=>{s.value=m,o("success")})});const u=()=>{a.value=!a.value,r.value=s.value},p=()=>{i.value="",l.value=!1,d.requester.send({url:"",method:"post",params:{q:"save",adapter:d.modal.data.adapter,path:d.modal.data.item.path},body:{content:r.value},responseType:"text"}).then(m=>{i.value=f("Updated."),s.value=m,o("success"),a.value=!a.value}).catch(m=>{i.value=f(m.message),l.value=!0})};return(m,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",tm,[e.createElementVNode("div",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title",title:e.unref(d).modal.data.item.path},e.toDisplayString(e.unref(d).modal.data.item.basename),9,nm),e.createElementVNode("div",om,[a.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:p,class:"ml-1 px-2 py-1 rounded border border-transparent shadow-sm bg-blue-700/75 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-700/50 text-base font-medium text-white sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(f)("Save")),1)):e.createCommentVNode("",!0),e.unref(d).features.includes(e.unref(ne).EDIT)?(e.openBlock(),e.createElementBlock("button",{key:1,class:"ml-1 px-2 py-1 text-blue-500",onClick:h[0]||(h[0]=g=>u())},e.toDisplayString(a.value?e.unref(f)("Cancel"):e.unref(f)("Edit")),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",null,[a.value?(e.openBlock(),e.createElementBlock("div",sm,[e.withDirectives(e.createElementVNode("textarea",{ref_key:"editInput",ref:c,"onUpdate:modelValue":h[1]||(h[1]=g=>r.value=g),class:"w-full p-2 rounded dark:bg-gray-700 dark:text-gray-200 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:selection:bg-gray-500 min-h-[200px] max-h-[60vh]",name:"text",id:"",cols:"30",rows:"10"},null,512),[[e.vModelText,r.value]])])):(e.openBlock(),e.createElementBlock("pre",rm,e.toDisplayString(s.value),1)),i.value.length?(e.openBlock(),e.createBlock(De,{key:2,onHidden:h[2]||(h[2]=g=>i.value=""),error:l.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value),1)]),_:1},8,["error"])):e.createCommentVNode("",!0)])],64))}},am={class:"flex"},cm=["title"],im={class:"ml-auto mb-2"},dm={class:"w-full flex justify-center"},um=["src"],mm={__name:"Image",emits:["success"],setup(n,{emit:t}){const o=t,s=e.inject("ServiceContainer"),{t:r}=s.i18n,c=e.ref(null),a=e.ref(null),i=e.ref(!1),l=e.ref(""),d=e.ref(!1),f=()=>{i.value=!i.value,i.value?a.value=new Br(c.value,{crop(p){}}):a.value.destroy()},u=()=>{a.value.getCroppedCanvas({width:795,height:341}).toBlob(p=>{l.value="",d.value=!1;const m=new FormData;m.set("file",p),s.requester.send({url:"",method:"post",params:{q:"upload",adapter:s.modal.data.adapter,path:s.modal.data.item.path},body:m}).then(h=>{l.value=r("Updated."),c.value.src=s.requester.getPreviewUrl(s.modal.data.adapter,s.modal.data.item),f(),o("success")}).catch(h=>{l.value=r(h.message),d.value=!0})})};return e.onMounted(()=>{o("success")}),(p,m)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",am,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title",title:e.unref(s).modal.data.item.path},e.toDisplayString(e.unref(s).modal.data.item.basename),9,cm),e.createElementVNode("div",im,[i.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:u,class:"ml-1 px-2 py-1 rounded border border-transparent shadow-sm bg-blue-700/75 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-700/50 text-base font-medium text-white sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(r)("Crop")),1)):e.createCommentVNode("",!0),e.unref(s).features.includes(e.unref(ne).EDIT)?(e.openBlock(),e.createElementBlock("button",{key:1,class:"ml-1 px-2 py-1 text-blue-500",onClick:m[0]||(m[0]=h=>f())},e.toDisplayString(i.value?e.unref(r)("Cancel"):e.unref(r)("Edit")),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",dm,[e.createElementVNode("img",{ref_key:"image",ref:c,class:"max-w-[50vh] max-h-[50vh]",src:e.unref(s).requester.getPreviewUrl(e.unref(s).modal.data.adapter,e.unref(s).modal.data.item),alt:""},null,8,um)]),l.value.length?(e.openBlock(),e.createBlock(De,{key:0,onHidden:m[1]||(m[1]=h=>l.value=""),error:d.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value),1)]),_:1},8,["error"])):e.createCommentVNode("",!0)],64))}},fm={class:"flex"},pm=["title"],hm=e.createElementVNode("div",null,null,-1),vm={__name:"Default",emits:["success"],setup(n,{emit:t}){const o=e.inject("ServiceContainer"),s=t;return e.onMounted(()=>{s("success")}),(r,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",fm,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title",title:e.unref(o).modal.data.item.path},e.toDisplayString(e.unref(o).modal.data.item.basename),9,pm)]),hm],64))}},gm=["title"],km={class:"w-full aspect-video",preload:"",controls:""},ym=["src"],_m={__name:"Video",emits:["success"],setup(n,{emit:t}){const o=e.inject("ServiceContainer"),s=t,r=()=>o.requester.getPreviewUrl(o.modal.data.adapter,o.modal.data.item);return e.onMounted(()=>{s("success")}),(c,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title",title:e.unref(o).modal.data.item.path},e.toDisplayString(e.unref(o).modal.data.item.basename),9,gm),e.createElementVNode("div",null,[e.createElementVNode("video",km,[e.createElementVNode("source",{src:r(),type:"video/mp4"},null,8,ym),e.createTextVNode(" Your browser does not support the video tag. ")])])]))}},xm=["title"],wm={class:"w-full",controls:""},bm=["src"],Em={__name:"Audio",emits:["success"],setup(n,{emit:t}){const o=t,s=e.inject("ServiceContainer"),r=()=>s.requester.getPreviewUrl(s.modal.data.adapter,s.modal.data.item);return e.onMounted(()=>{o("success")}),(c,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title",title:e.unref(s).modal.data.item.path},e.toDisplayString(e.unref(s).modal.data.item.basename),9,xm),e.createElementVNode("div",null,[e.createElementVNode("audio",wm,[e.createElementVNode("source",{src:r(),type:"audio/mpeg"},null,8,bm),e.createTextVNode(" Your browser does not support the audio element. ")])])],64))}},Vm=["title"],Nm=["data"],Sm=["src"],Bm=e.createElementVNode("p",null,[e.createTextVNode(" Your browser does not support PDFs. "),e.createElementVNode("a",{href:"https://example.com/test.pdf"},"Download the PDF"),e.createTextVNode(" . ")],-1),$m=[Bm],Cm={__name:"Pdf",emits:["success"],setup(n,{emit:t}){const o=e.inject("ServiceContainer"),s=t,r=()=>o.requester.getPreviewUrl(o.modal.data.adapter,o.modal.data.item);return e.onMounted(()=>{s("success")}),(c,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title",title:e.unref(o).modal.data.item.path},e.toDisplayString(e.unref(o).modal.data.item.basename),9,Vm),e.createElementVNode("div",null,[e.createElementVNode("object",{class:"h-[60vh]",data:r(),type:"application/pdf",width:"100%",height:"100%"},[e.createElementVNode("iframe",{class:"border-0",src:r(),width:"100%",height:"100%"},$m,8,Sm)],8,Nm)])],64))}},Dm={class:"mt-3 sm:mt-0 sm:text-left w-full"},Tm={key:0},Mm={class:"text-gray-700 dark:text-gray-200 text-sm"},Am={key:0,class:"flex leading-5"},Lm=e.createElementVNode("svg",{class:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e.createElementVNode("circle",{class:"opacity-25 stroke-blue-900 dark:stroke-blue-100",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1),Om={class:"py-2 flex font-normal break-all text-gray-800 dark:text-gray-200 rounded text-xs"},Fm={class:"font-bold"},Rm={class:"font-bold pl-2"},Hm={key:0,class:"text-xs text-gray-600 dark:text-gray-400"},zm=["download","href"],dr={__name:"ModalPreview",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(!1),r=a=>(t.modal.data.item.mime_type??"").startsWith(a),c=t.features.includes(ne.PREVIEW);return c||(s.value=!0),(a,i)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:i[6]||(i[6]=l=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Close")),1),e.unref(t).features.includes(e.unref(ne).DOWNLOAD)?(e.openBlock(),e.createElementBlock("a",{key:0,target:"_blank",class:"vf-btn vf-btn-primary",download:e.unref(t).requester.getDownloadUrl(e.unref(t).modal.data.adapter,e.unref(t).modal.data.item),href:e.unref(t).requester.getDownloadUrl(e.unref(t).modal.data.adapter,e.unref(t).modal.data.item)},e.toDisplayString(e.unref(o)("Download")),9,zm)):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("div",Dm,[e.unref(c)?(e.openBlock(),e.createElementBlock("div",Tm,[r("text")?(e.openBlock(),e.createBlock(lm,{key:0,onSuccess:i[0]||(i[0]=l=>s.value=!0)})):r("image")?(e.openBlock(),e.createBlock(mm,{key:1,onSuccess:i[1]||(i[1]=l=>s.value=!0)})):r("video")?(e.openBlock(),e.createBlock(_m,{key:2,onSuccess:i[2]||(i[2]=l=>s.value=!0)})):r("audio")?(e.openBlock(),e.createBlock(Em,{key:3,onSuccess:i[3]||(i[3]=l=>s.value=!0)})):r("application/pdf")?(e.openBlock(),e.createBlock(Cm,{key:4,onSuccess:i[4]||(i[4]=l=>s.value=!0)})):(e.openBlock(),e.createBlock(vm,{key:5,onSuccess:i[5]||(i[5]=l=>s.value=!0)}))])):e.createCommentVNode("",!0),e.createElementVNode("div",Mm,[s.value===!1?(e.openBlock(),e.createElementBlock("div",Am,[Lm,e.createElementVNode("span",null,e.toDisplayString(e.unref(o)("Loading")),1)])):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",Om,[e.createElementVNode("div",null,[e.createElementVNode("span",Fm,e.toDisplayString(e.unref(o)("File Size"))+": ",1),e.createTextVNode(e.toDisplayString(e.unref(t).filesize(e.unref(t).modal.data.item.file_size)),1)]),e.createElementVNode("div",null,[e.createElementVNode("span",Rm,e.toDisplayString(e.unref(o)("Last Modified"))+": ",1),e.createTextVNode(" "+e.toDisplayString(e.unref(ir)(e.unref(t).modal.data.item.last_modified)),1)])]),e.unref(t).features.includes(e.unref(ne).DOWNLOAD)?(e.openBlock(),e.createElementBlock("div",Hm,[e.createElementVNode("span",null,e.toDisplayString(e.unref(o)(`Download doesn't work? You can try right-click "Download" button, select "Save link as...".`)),1)])):e.createCommentVNode("",!0)]),_:1}))}},Im={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",class:"h-5 w-5",viewBox:"0 0 24 24"},jm=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),Um=e.createElementVNode("path",{d:"m15 4.5-4 4L7 10l-1.5 1.5 7 7L14 17l1.5-4 4-4M9 15l-4.5 4.5M14.5 4 20 9.5"},null,-1),qm=[jm,Um];function Pm(n,t){return e.openBlock(),e.createElementBlock("svg",Im,[...qm])}const ur={render:Pm},Gm=["data-type","data-item","data-index"],Qt={__name:"Item",props:{item:{type:Object},index:{type:Number},dragImage:{type:Object}},setup(n){const t=e.inject("ServiceContainer"),o=t.dragSelect,s=n,r=m=>{m.type==="dir"?(t.emitter.emit("vf-search-exit"),t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:m.path}})):t.modal.open(dr,{adapter:t.fs.adapter,item:m})},c={mounted(m,h,g,v){g.props.draggable&&(m.addEventListener("dragstart",V=>a(V,h.value)),m.addEventListener("dragover",V=>l(V,h.value)),m.addEventListener("drop",V=>i(V,h.value)))},beforeUnmount(m,h,g,v){g.props.draggable&&(m.removeEventListener("dragstart",a),m.removeEventListener("dragover",l),m.removeEventListener("drop",i))}},a=(m,h)=>{if(m.altKey||m.ctrlKey||m.metaKey)return m.preventDefault(),!1;o.isDraggingRef.value=!0,m.dataTransfer.setDragImage(s.dragImage.$el,0,15),m.dataTransfer.effectAllowed="all",m.dataTransfer.dropEffect="copy",m.dataTransfer.setData("items",JSON.stringify(o.getSelected()))},i=(m,h)=>{m.preventDefault(),o.isDraggingRef.value=!1;let g=JSON.parse(m.dataTransfer.getData("items"));if(g.find(v=>v.storage!==t.fs.adapter)){alert("Moving items between different storages is not supported yet.");return}t.modal.open(kn,{items:{from:g,to:h}})},l=(m,h)=>{m.preventDefault(),!h||h.type!=="dir"||o.getSelection().find(g=>g===m.currentTarget)?(m.dataTransfer.dropEffect="none",m.dataTransfer.effectAllowed="none"):m.dataTransfer.dropEffect="copy"};let d=null,f=!1;const u=()=>{d&&clearTimeout(d)},p=m=>{if(!f)f=!0,setTimeout(()=>f=!1,300);else return f=!1,r(s.item),clearTimeout(d),!1;d=setTimeout(()=>{const h=new MouseEvent("contextmenu",{bubbles:!0,cancelable:!1,view:window,button:2,buttons:0,clientX:m.target.getBoundingClientRect().x,clientY:m.target.getBoundingClientRect().y});m.target.dispatchEvent(h)},500)};return(m,h)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({opacity:e.unref(o).isDraggingRef.value&&e.unref(o).getSelection().find(g=>m.$el===g)?"0.5 !important":""}),class:e.normalizeClass(["vf-item-"+e.unref(o).explorerId,"relative"]),"data-type":n.item.type,key:n.item.path,"data-item":JSON.stringify(n.item),"data-index":n.index,onDblclick:h[0]||(h[0]=g=>r(n.item)),onTouchstart:h[1]||(h[1]=g=>p(g)),onTouchend:h[2]||(h[2]=g=>u()),onContextmenu:h[3]||(h[3]=e.withModifiers(g=>e.unref(t).emitter.emit("vf-contextmenu-show",{event:g,items:e.unref(o).getSelected(),target:n.item}),["prevent"]))},[e.renderSlot(m.$slots,"default"),e.unref(t).pinnedFolders.find(g=>g.path===n.item.path)?(e.openBlock(),e.createBlock(e.unref(ur),{key:0,class:"absolute top-0 right-0 text-amber-600"})):e.createCommentVNode("",!0)],46,Gm)),[[c,n.item]])}},Km={class:"relative flex-auto flex flex-col"},Wm={key:0,class:"grid grid-cols-12 px-1 bg-neutral-50 dark:bg-gray-800 border-b border-neutral-300 dark:border-gray-700 text-xs select-none divide-x"},Ym={class:"relative"},Xm={class:"grid grid-cols-12 items-center"},Jm={class:"flex col-span-7 items-center"},Qm={class:"overflow-ellipsis overflow-hidden whitespace-nowrap"},Zm={class:"col-span-5 overflow-ellipsis overflow-hidden whitespace-nowrap"},e0={class:"grid grid-cols-12 items-center"},t0={class:"flex col-span-7 items-center"},n0={class:"overflow-ellipsis overflow-hidden whitespace-nowrap"},o0={class:"col-span-2 text-center"},r0={class:"col-span-3 overflow-ellipsis overflow-hidden whitespace-nowrap px-1 md:px-3"},s0={class:"relative"},l0=["data-src","alt"],a0={key:2,class:"absolute hidden md:block top-1/2 w-full text-center text-neutral-500"},c0={class:"break-all"},i0={__name:"Explorer",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=u=>u==null?void 0:u.substring(0,3),r=e.ref(null),c=e.ref(""),a=t.dragSelect;let i;t.emitter.on("vf-fullscreen-toggle",()=>{a.area.value.style.height=null}),t.emitter.on("vf-search-query",({newQuery:u})=>{c.value=u,u?t.emitter.emit("vf-fetch",{params:{q:"search",adapter:t.fs.adapter,path:t.fs.data.dirname,filter:u},onSuccess:p=>{p.files.length||t.emitter.emit("vf-toast-push",{label:o("No search result found.")})}}):t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.data.dirname}})});const l=e.reactive({active:!1,column:"",order:""}),d=(u=!0)=>{let p=[...t.fs.data.files],m=l.column,h=l.order==="asc"?1:-1;if(!u)return p;const g=(v,V)=>typeof v=="string"&&typeof V=="string"?v.toLowerCase().localeCompare(V.toLowerCase()):v<V?-1:v>V?1:0;return l.active&&(p=p.slice().sort((v,V)=>g(v[m],V[m])*h)),p},f=u=>{l.active&&l.column===u?(l.active=l.order==="asc",l.column=u,l.order="desc"):(l.active=!0,l.column=u,l.order="asc")};return e.onMounted(()=>{i=new Sr(a.area.value)}),e.onUpdated(()=>{i.update()}),e.onBeforeUnmount(()=>{i.destroy()}),(u,p)=>(e.openBlock(),e.createElementBlock("div",Km,[e.unref(t).view==="list"||c.value.length?(e.openBlock(),e.createElementBlock("div",Wm,[e.createElementVNode("div",{onClick:p[0]||(p[0]=m=>f("basename")),class:"col-span-7 vf-sort-button"},[e.createTextVNode(e.toDisplayString(e.unref(o)("Name"))+" ",1),e.withDirectives(e.createVNode(wt,{direction:l.order},null,8,["direction"]),[[e.vShow,l.active&&l.column==="basename"]])]),c.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:p[1]||(p[1]=m=>f("file_size")),class:"justify-center col-span-2 vf-sort-button"},[e.createTextVNode(e.toDisplayString(e.unref(o)("Size"))+" ",1),e.withDirectives(e.createVNode(wt,{direction:l.order},null,8,["direction"]),[[e.vShow,l.active&&l.column==="file_size"]])])),c.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:p[2]||(p[2]=m=>f("last_modified")),class:"justify-center col-span-3 vf-sort-button"},[e.createTextVNode(e.toDisplayString(e.unref(o)("Date"))+" ",1),e.withDirectives(e.createVNode(wt,{direction:l.order},null,8,["direction"]),[[e.vShow,l.active&&l.column==="last_modified"]])])),c.value.length?(e.openBlock(),e.createElementBlock("div",{key:2,onClick:p[3]||(p[3]=m=>f("path")),class:"justify-center col-span-5 vf-sort-button"},[e.createTextVNode(e.toDisplayString(e.unref(o)("Filepath"))+" ",1),e.withDirectives(e.createVNode(wt,{direction:l.order},null,8,["direction"]),[[e.vShow,l.active&&l.column==="path"]])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Ym,[e.createVNode(em,{ref_key:"dragImage",ref:r,count:e.unref(a).getCount()},null,8,["count"])]),e.createElementVNode("div",{ref:e.unref(a).scrollBarContainer,class:e.normalizeClass(["vf-explorer-scrollbar-container",[{"grid-view":e.unref(t).view==="grid"},{"search-active":c.value.length}]])},[e.createElementVNode("div",{ref:e.unref(a).scrollBar,class:"w-5 bg-transparent pointer-events-none"},null,512)],2),e.createElementVNode("div",{ref:e.unref(a).area,class:"h-full w-full text-xs p-1 vf-explorer-scrollbar vf-selector-area z-0 overflow-y-auto",onContextmenu:p[4]||(p[4]=e.withModifiers(m=>e.unref(t).emitter.emit("vf-contextmenu-show",{event:m,items:e.unref(a).getSelected()}),["self","prevent"]))},[c.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(d(),(m,h)=>(e.openBlock(),e.createBlock(Qt,{item:m,index:h,dragImage:r.value,class:"vf-item vf-item-list"},{default:e.withCtx(()=>[e.createElementVNode("div",Xm,[e.createElementVNode("div",Jm,[e.createVNode(Jt,{type:m.type,small:e.unref(t).compactListView},null,8,["type","small"]),e.createElementVNode("span",Qm,e.toDisplayString(m.basename),1)]),e.createElementVNode("div",Zm,e.toDisplayString(m.path),1)])]),_:2},1032,["item","index","dragImage"]))),256)):e.createCommentVNode("",!0),e.unref(t).view==="list"&&!c.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(d(),(m,h)=>(e.openBlock(),e.createBlock(Qt,{item:m,index:h,dragImage:r.value,class:"vf-item vf-item-list",draggable:"true",key:m.path},{default:e.withCtx(()=>[e.createElementVNode("div",e0,[e.createElementVNode("div",t0,[e.createVNode(Jt,{type:m.type,small:e.unref(t).compactListView},null,8,["type","small"]),e.createElementVNode("span",n0,e.toDisplayString(m.basename),1)]),e.createElementVNode("div",o0,e.toDisplayString(m.file_size?e.unref(t).filesize(m.file_size):""),1),e.createElementVNode("div",r0,e.toDisplayString(e.unref(ir)(m.last_modified)),1)])]),_:2},1032,["item","index","dragImage"]))),128)):e.createCommentVNode("",!0),e.unref(t).view==="grid"&&!c.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(d(!1),(m,h)=>(e.openBlock(),e.createBlock(Qt,{item:m,index:h,dragImage:r.value,class:"vf-item vf-item-grid",draggable:"true"},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("div",s0,[(m.mime_type??"").startsWith("image")&&e.unref(t).showThumbnails?(e.openBlock(),e.createElementBlock("img",{src:"data:image/png;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",class:"lazy h-10 md:h-12 m-auto","data-src":e.unref(t).requester.getPreviewUrl(e.unref(t).fs.adapter,m),alt:m.basename,key:m.path},null,8,l0)):(e.openBlock(),e.createBlock(Jt,{key:1,type:m.type},null,8,["type"])),!((m.mime_type??"").startsWith("image")&&e.unref(t).showThumbnails)&&m.type!=="dir"?(e.openBlock(),e.createElementBlock("div",a0,e.toDisplayString(s(m.extension)),1)):e.createCommentVNode("",!0)]),e.createElementVNode("span",c0,e.toDisplayString(e.unref(gn)(m.basename)),1)])]),_:2},1032,["item","index","dragImage"]))),256)):e.createCommentVNode("",!0)],544),e.createVNode(Du)]))}},d0=["href","download"],u0=["onClick"],m0={__name:"ContextMenu",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(null),r=e.ref([]),c=e.ref(""),a=e.reactive({active:!1,items:[],positions:{left:0,top:0}}),i=e.computed(()=>a.items.filter(u=>u.key==null||t.features.includes(u.key)));t.emitter.on("vf-context-selected",u=>{r.value=u});const l={newfolder:{key:ne.NEW_FOLDER,title:()=>o("New Folder"),action:()=>t.modal.open(nr)},selectAll:{title:()=>o("Select All"),action:()=>t.dragSelect.selectAll()},pinFolder:{title:()=>o("Pin Folder"),action:()=>{t.pinnedFolders=t.pinnedFolders.concat(r.value),t.storage.setStore("pinned-folders",t.pinnedFolders)}},unpinFolder:{title:()=>o("Unpin Folder"),action:()=>{t.pinnedFolders=t.pinnedFolders.filter(u=>!r.value.find(p=>p.path===u.path)),t.storage.setStore("pinned-folders",t.pinnedFolders)}},delete:{key:ne.DELETE,title:()=>o("Delete"),action:()=>{t.modal.open(Tn,{items:r})}},refresh:{title:()=>o("Refresh"),action:()=>{t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.data.dirname}})}},preview:{key:ne.PREVIEW,title:()=>o("Preview"),action:()=>t.modal.open(dr,{adapter:t.fs.adapter,item:r.value[0]})},open:{title:()=>o("Open"),action:()=>{t.emitter.emit("vf-search-exit"),t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:r.value[0].path}})}},openDir:{title:()=>o("Open containing folder"),action:()=>{t.emitter.emit("vf-search-exit"),t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:r.value[0].dir}})}},download:{key:ne.DOWNLOAD,link:e.computed(()=>t.requester.getDownloadUrl(t.fs.adapter,r.value[0])),title:()=>o("Download"),action:()=>{}},archive:{key:ne.ARCHIVE,title:()=>o("Archive"),action:()=>t.modal.open(cr,{items:r})},unarchive:{key:ne.UNARCHIVE,title:()=>o("Unarchive"),action:()=>t.modal.open(lr,{items:r})},rename:{key:ne.RENAME,title:()=>o("Rename"),action:()=>t.modal.open(Mn,{items:r})}},d=u=>{t.emitter.emit("vf-contextmenu-hide"),u.action()};t.emitter.on("vf-search-query",({newQuery:u})=>{c.value=u}),t.emitter.on("vf-contextmenu-show",({event:u,items:p,target:m=null})=>{if(a.items=[],c.value)if(m)a.items.push(l.openDir),t.emitter.emit("vf-context-selected",[m]);else return;else!m&&!c.value?(a.items.push(l.refresh),a.items.push(l.selectAll),a.items.push(l.newfolder),t.emitter.emit("vf-context-selected",[])):p.length>1&&p.some(h=>h.path===m.path)?(a.items.push(l.refresh),a.items.push(l.archive),a.items.push(l.delete),t.emitter.emit("vf-context-selected",p)):(m.type==="dir"?(a.items.push(l.open),t.pinnedFolders.findIndex(h=>h.path===m.path)!==-1?a.items.push(l.unpinFolder):a.items.push(l.pinFolder)):(a.items.push(l.preview),a.items.push(l.download)),a.items.push(l.rename),m.mime_type==="application/zip"?a.items.push(l.unarchive):a.items.push(l.archive),a.items.push(l.delete),t.emitter.emit("vf-context-selected",[m]));f(u)}),t.emitter.on("vf-contextmenu-hide",()=>{a.active=!1});const f=u=>{const p=t.dragSelect.area.value,m=t.root.getBoundingClientRect(),h=p.getBoundingClientRect();let g=u.clientX-m.left,v=u.clientY-m.top;a.active=!0,e.nextTick(()=>{var D;const V=(D=s.value)==null?void 0:D.getBoundingClientRect();let y=(V==null?void 0:V.height)??0,O=(V==null?void 0:V.width)??0;g=h.right-u.pageX+window.scrollX<O?g-O:g,v=h.bottom-u.pageY+window.scrollY<y?v-y:v,a.positions={left:g+"px",top:v+"px"}})};return(u,p)=>e.withDirectives((e.openBlock(),e.createElementBlock("ul",{ref_key:"contextmenu",ref:s,style:e.normalizeStyle(a.positions),class:"z-30 absolute text-xs bg-neutral-50 dark:bg-gray-800 text-gray-700 dark:text-gray-200 border border-neutral-300 dark:border-gray-600 shadow rounded-sm select-none"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,m=>(e.openBlock(),e.createElementBlock("li",{class:"cursor-pointer hover:bg-neutral-200 dark:hover:bg-gray-700",key:m.title},[m.link?(e.openBlock(),e.createElementBlock("a",{key:0,class:"block pl-2 pr-3 py-2",target:"_blank",href:m.link,download:m.link,onClick:p[0]||(p[0]=h=>e.unref(t).emitter.emit("vf-contextmenu-hide"))},[e.createElementVNode("span",null,e.toDisplayString(m.title()),1)],8,d0)):(e.openBlock(),e.createElementBlock("div",{key:1,class:"pl-2 pr-3 py-1.5",onClick:h=>d(m)},[e.createElementVNode("span",null,e.toDisplayString(m.title()),1)],8,u0))]))),128))],4)),[[e.vShow,a.active]])}},f0={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",class:"h-5 w-5",viewBox:"0 0 24 24"},p0=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"},null,-1),h0=[p0];function v0(n,t){return e.openBlock(),e.createElementBlock("svg",f0,[...h0])}const mr={render:v0},g0={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"2",class:"h-5 w-5 stroke-slate-500 cursor-pointer",viewBox:"0 0 24 24"},k0=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0"},null,-1),y0=[k0];function _0(n,t){return e.openBlock(),e.createElementBlock("svg",g0,[...y0])}const x0={render:_0},w0={class:"p-1 text-xs border-t border-neutral-300 dark:border-gray-700/50 flex justify-between select-none grow-0"},b0={class:"flex leading-5 items-center"},E0=["title"],V0={class:"z-[1] pointer-events-none"},N0=["value"],S0={class:"ml-3"},B0={key:0},$0={class:"ml-1"},C0={class:"flex leading-5 items-center justify-end"},D0=["disabled"],T0=["title"],M0={__name:"Statusbar",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,{setStore:s}=t.storage,r=t.dragSelect,c=()=>{t.emitter.emit("vf-search-exit"),t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter}}),s("adapter",t.fs.adapter)},a=e.ref("");t.emitter.on("vf-search-query",({newQuery:l})=>{a.value=l});const i=e.computed(()=>{const l=t.selectButton.multiple?r.getSelected().length>0:r.getSelected().length===1;return t.selectButton.active&&l});return(l,d)=>(e.openBlock(),e.createElementBlock("div",w0,[e.createElementVNode("div",b0,[e.createElementVNode("div",{class:"flex leading-5 items-center rounded border dark:bg-gray-700 dark:border-gray-600",title:e.unref(o)("Storage")},[e.createElementVNode("div",V0,[e.createVNode(e.unref(mr))]),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":d[0]||(d[0]=f=>e.unref(t).fs.adapter=f),onChange:c,class:"border-0 py-0.5 text-xs text-slate-500 bg-white dark:text-neutral-50 dark:bg-gray-700 rounded uppercase focus:outline-0 cursor-pointer",tabindex:"-1"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).fs.data.storages,f=>(e.openBlock(),e.createElementBlock("option",{value:f},e.toDisplayString(f),9,N0))),256))],544),[[e.vModelSelect,e.unref(t).fs.adapter]])],8,E0),e.createElementVNode("div",S0,[a.value.length?(e.openBlock(),e.createElementBlock("span",B0,e.toDisplayString(e.unref(t).fs.data.files.length)+" items found. ",1)):e.createCommentVNode("",!0),e.createElementVNode("span",$0,e.toDisplayString(e.unref(t).dragSelect.getCount()>0?e.unref(o)("%s item(s) selected.",e.unref(t).dragSelect.getCount()):""),1)])]),e.createElementVNode("div",C0,[e.unref(t).selectButton.active?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["vf-btn py-0 vf-btn-primary",{disabled:!i.value}]),disabled:!i.value,onClick:d[1]||(d[1]=f=>e.unref(t).selectButton.click(e.unref(r).getSelected(),f))},e.toDisplayString(e.unref(o)("Select")),11,D0)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:"mr-1",title:e.unref(o)("About"),onClick:d[2]||(d[2]=f=>e.unref(t).modal.open(Qo))},[e.createVNode(e.unref(x0))],8,T0)])]))}},A0={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"text-neutral-500 fill-sky-500 stroke-gray-100/50 dark:stroke-slate-700/50 dark:fill-slate-500",viewBox:"0 0 24 24"},L0=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 9.776q.168-.026.344-.026h15.812q.176 0 .344.026m-16.5 0a2.25 2.25 0 0 0-1.883 2.542l.857 6a2.25 2.25 0 0 0 2.227 1.932H19.05a2.25 2.25 0 0 0 2.227-1.932l.857-6a2.25 2.25 0 0 0-1.883-2.542m-16.5 0V6A2.25 2.25 0 0 1 6 3.75h3.879a1.5 1.5 0 0 1 1.06.44l2.122 2.12a1.5 1.5 0 0 0 1.06.44H18A2.25 2.25 0 0 1 20.25 9v.776"},null,-1),O0=[L0];function F0(n,t){return e.openBlock(),e.createElementBlock("svg",A0,[...O0])}const fr={render:F0},R0={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-5 w-5",viewBox:"0 0 24 24"},H0=e.createElementVNode("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),z0=e.createElementVNode("path",{d:"M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2m3.6 5.2a1 1 0 0 0-1.4.2L12 10.333 9.8 7.4a1 1 0 1 0-1.6 1.2l2.55 3.4-2.55 3.4a1 1 0 1 0 1.6 1.2l2.2-2.933 2.2 2.933a1 1 0 0 0 1.6-1.2L13.25 12l2.55-3.4a1 1 0 0 0-.2-1.4"},null,-1),I0=[H0,z0];function j0(n,t){return e.openBlock(),e.createElementBlock("svg",R0,[...I0])}const U0={render:j0},q0={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24"},P0=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),G0=e.createElementVNode("path",{d:"M15 12H9M12 9v6"},null,-1),K0=[P0,G0];function W0(n,t){return e.openBlock(),e.createElementBlock("svg",q0,[...K0])}const pr={render:W0},Y0={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24"},X0=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),J0=e.createElementVNode("path",{d:"M9 12h6"},null,-1),Q0=[X0,J0];function Z0(n,t){return e.openBlock(),e.createElementBlock("svg",Y0,[...Q0])}const hr={render:Z0};function vr(n,t){const o=n.findIndex(s=>s.path===t.path);o>-1?n[o]=t:n.push(t)}const ef={class:"h-5 w-5 shrink-0"},tf={key:1,class:"cursor-pointer"},gr={__name:"FolderLoaderIndicator",props:e.mergeModels({adapter:{type:String,required:!0},path:{type:String,required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const t=n,o=e.inject("ServiceContainer");o.i18n;const s=e.useModel(n,"modelValue"),r=e.ref(!1);e.watch(()=>s.value,()=>{var i;return((i=c())==null?void 0:i.folders.length)||a()});function c(){return o.treeViewData.find(i=>i.path===t.path)}const a=()=>{r.value=!0,o.requester.send({url:"",method:"get",params:{q:"subfolders",adapter:t.adapter,path:t.path}}).then(i=>{vr(o.treeViewData,{path:t.path,...i})}).catch(i=>{}).finally(()=>{r.value=!1})};return(i,l)=>{var d;return e.openBlock(),e.createElementBlock("div",ef,[r.value?(e.openBlock(),e.createBlock(e.unref(An),{key:0,class:"p-1"})):(e.openBlock(),e.createElementBlock("div",tf,[s.value&&((d=c())!=null&&d.folders.length)?(e.openBlock(),e.createBlock(e.unref(hr),{key:0,class:"text-gray-600"})):e.createCommentVNode("",!0),s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(pr),{key:1,class:"text-gray-400"}))]))])}}},nf={class:"block"},of={class:"flex hover:text-sky-700 dark:hover:text-sky-200/50 rounded"},rf=["onClick"],sf=["onClick"],lf={class:"h-5 w-5 shrink-0"},af={class:"pl-4"},cf={__name:"TreeSubfolderList",props:{adapter:{type:String,required:!0},path:{type:String,required:!0}},setup(n){const t=e.inject("ServiceContainer"),o=e.ref([]),s=n,r=e.computed(()=>{var c;return((c=t.treeViewData.find(a=>a.path===s.path))==null?void 0:c.folders)||[]});return(c,a)=>{const i=e.resolveComponent("TreeSubfolderList",!0);return e.openBlock(),e.createElementBlock("ul",nf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(l,d)=>(e.openBlock(),e.createElementBlock("li",{class:"flex flex-col space-x-0.5 py-0.5 text-sm",key:l.path},[e.createElementVNode("div",of,[e.createElementVNode("div",{class:"h-5 w-5 shrink-0",onClick:f=>o.value[l.path]=!o.value[l.path]},[e.createVNode(gr,{adapter:n.adapter,path:l.path,modelValue:o.value[l.path],"onUpdate:modelValue":f=>o.value[l.path]=f},null,8,["adapter","path","modelValue","onUpdate:modelValue"])],8,rf),e.createElementVNode("div",{class:"flex cursor-pointer",onClick:f=>e.unref(t).emitter.emit("vf-fetch",{params:{q:"index",adapter:s.adapter,path:l.path}})},[e.createElementVNode("div",lf,[e.unref(t).fs.path===l.path?(e.openBlock(),e.createBlock(e.unref(fr),{key:0})):(e.openBlock(),e.createBlock(e.unref(It),{key:1}))]),e.createElementVNode("div",{class:e.normalizeClass(["text-nowrap",{"underline decoration-blue-300 dark:decoration-gray-400":e.unref(t).fs.path===l.path}])},e.toDisplayString(l.basename),3)],8,sf)]),e.createElementVNode("div",af,[e.withDirectives(e.createVNode(i,{adapter:s.adapter,path:l.path},null,8,["adapter","path"]),[[e.vShow,o.value[l.path]]])])]))),128))])}}},df={class:"pointer-events-none pr-1"},uf={__name:"TreeStorageItem",props:{storage:{type:String,required:!0}},setup(n){const t=e.inject("ServiceContainer"),o=e.ref(!1);return(s,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{onClick:r[1]||(r[1]=c=>o.value=!o.value),class:"p-1 py-1.5 uppercase font-bold text-gray-400 dark:text-gray-500 text-xs flex justify-between bg-gray-100 dark:bg-gray-800 border-b dark:border-gray-700 cursor-pointer"},[e.createElementVNode("div",{class:e.normalizeClass(["flex flex-1 space-x-1 items-center",n.storage===e.unref(t).fs.adapter?"text-gray-700/80 dark:text-gray-300/80 text-bold":""])},[e.createElementVNode("div",{class:e.normalizeClass(["h-5 w-5 shrink-0",n.storage===e.unref(t).fs.adapter?"text-sky-500 dark:text-slate-300":""])},[e.createVNode(e.unref(mr))],2),e.createElementVNode("div",null,e.toDisplayString(n.storage),1)],2),e.createElementVNode("div",df,[e.createVNode(gr,{adapter:n.storage,path:n.storage+"://",modelValue:o.value,"onUpdate:modelValue":r[0]||(r[0]=c=>o.value=c)},null,8,["adapter","path","modelValue"])])]),e.withDirectives(e.createVNode(cf,{adapter:n.storage,path:n.storage+"://",class:"overflow-x-auto my-1"},null,8,["adapter","path"]),[[e.vShow,o.value]])],64))}},mf={class:"h-5 w-5 shrink-0"},ff={class:"cursor-pointer"},pf={__name:"FolderIndicator",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(n){const t=e.useModel(n,"modelValue");return(o,s)=>(e.openBlock(),e.createElementBlock("div",mf,[e.createElementVNode("div",ff,[t.value?(e.openBlock(),e.createBlock(e.unref(hr),{key:0,class:"text-gray-600"})):e.createCommentVNode("",!0),t.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(pr),{key:1,class:"text-gray-400"}))])]))}},hf={class:"sticky left-0 dark:border-gray-600"},vf={class:"flex items-center space-x-1"},gf={class:"text-nowrap"},kf={key:0,class:"block my-1"},yf={class:"flex pl-2 py-0.5 text-sm justify-between pr-2"},_f=["onClick"],xf=["title"],wf=["onClick"],bf={key:0},Ef={class:"p-1 text-xs text-center"},Vf={__name:"TreeView",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,{getStore:s,setStore:r}=t.storage,c=e.ref(190),a=e.ref(s("pinned-folders-opened",!0));e.watch(a,f=>r("pinned-folders-opened",f));const i=f=>{t.pinnedFolders=t.pinnedFolders.filter(u=>u.path!==f.path),t.storage.setStore("pinned-folders",t.pinnedFolders)},l=f=>{const u=f.clientX,p=f.target.parentElement,m=p.getBoundingClientRect().width;p.classList.remove("transition-[width]"),p.classList.add("transition-none");const h=v=>{c.value=m+v.clientX-u,c.value<50&&(c.value=0,t.showTreeView=!1),c.value>50&&(t.showTreeView=!0)},g=()=>{const v=p.getBoundingClientRect();c.value=v.width,p.classList.add("transition-[width]"),p.classList.remove("transition-none"),window.removeEventListener("mousemove",h),window.removeEventListener("mouseup",g)};window.addEventListener("mousemove",h),window.addEventListener("mouseup",g)},d=e.ref(null);return e.onMounted(()=>{qe(d.value,{})}),e.watch(t.fs.data,(f,u)=>{const p=f.files.filter(m=>m.type==="dir");vr(t.treeViewData,{path:t.fs.path,folders:p.map(m=>({adapter:m.storage,path:m.path,basename:m.basename}))})}),(f,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{onClick:u[0]||(u[0]=p=>e.unref(t).showTreeView=!e.unref(t).showTreeView),class:e.normalizeClass(["w-full h-full bg-gray-300/10 dark:bg-gray-700/10 z-[1]",e.unref(t).showTreeView?"backdrop-blur-sm absolute md:hidden":"hidden"])},null,2),e.createElementVNode("div",{style:e.normalizeStyle(e.unref(t).showTreeView?"min-width:100px;max-width:75%; width: "+c.value+"px":"width: 0"),class:"absolute h-full md:h-auto md:relative shadow-lg shrink-0 transition-[width] ease-in-out duration-200 z-[1] bg-gray-50 dark:bg-[#242f41]"},[e.createElementVNode("div",{ref_key:"treeViewScrollElement",ref:d,class:"h-full border-r dark:border-gray-600/50 pb-4"},[e.createElementVNode("div",hf,[e.createElementVNode("div",{onClick:u[2]||(u[2]=p=>a.value=!a.value),class:"pr-2 bg-gray-100 dark:bg-gray-800 dark:border-gray-700 border-b p-1 py-1.5 uppercase font-bold text-gray-400 dark:text-gray-400 text-xs flex items-center justify-between cursor-pointer"},[e.createElementVNode("div",vf,[e.createVNode(e.unref(ur),{class:"text-amber-600"}),e.createElementVNode("div",gf,e.toDisplayString(e.unref(o)("Pinned Folders")),1)]),e.createVNode(pf,{modelValue:a.value,"onUpdate:modelValue":u[1]||(u[1]=p=>a.value=p)},null,8,["modelValue"])]),a.value?(e.openBlock(),e.createElementBlock("ul",kf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).pinnedFolders,p=>(e.openBlock(),e.createElementBlock("li",yf,[e.createElementVNode("div",{class:"flex hover:text-sky-500 dark:hover:text-sky-200/50 rounded cursor-pointer",onClick:m=>e.unref(t).emitter.emit("vf-fetch",{params:{q:"index",adapter:p.storage,path:p.path}})},[e.unref(t).fs.path!==p.path?(e.openBlock(),e.createBlock(e.unref(It),{key:0,class:"h-5 w-5"})):e.createCommentVNode("",!0),e.unref(t).fs.path===p.path?(e.openBlock(),e.createBlock(e.unref(fr),{key:1,class:"h-5 w-5"})):e.createCommentVNode("",!0),e.createElementVNode("div",{title:p.path,class:e.normalizeClass(["text-nowrap",{"underline decoration-blue-300 dark:decoration-gray-400":e.unref(t).fs.path===p.path}])},e.toDisplayString(p.basename),11,xf)],8,_f),e.createElementVNode("div",{class:"cursor-pointer",onClick:m=>i(p)},[e.createVNode(e.unref(U0),{class:"p-0.5 text-gray-300 hover:text-gray-400 dark:text-gray-600 hover:dark:text-gray-400"})],8,wf)]))),256)),e.unref(t).pinnedFolders.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",bf,[e.createElementVNode("div",Ef,e.toDisplayString(e.unref(o)("No folders pinned")),1)]))])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).fs.data.storages,p=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(uf,{storage:p},null,8,["storage"])]))),256))],512),e.createElementVNode("div",{onMousedown:l,class:e.normalizeClass([(e.unref(t).showTreeView,""),"transition-colors ease-in-out duration-200 top-0 hover:bg-slate-600/10 dark:hover:bg-slate-300/10 w-1 h-full absolute -right-0.5 cursor-ew-resize"])},null,34)],4)],64))}},Nf={class:"relative flex overflow-hidden h-full"},Sf={__name:"VueFinder",props:{id:{type:String,default:"vf"},request:{type:[String,Object],required:!0},persist:{type:Boolean,default:!1},path:{type:String,default:""},features:{type:[Array,Boolean],default:!0},debug:{type:Boolean,default:!1},theme:{type:String,default:"system"},locale:{type:String,default:null},maxHeight:{type:String,default:"600px"},maxFileSize:{type:String,default:"10mb"},fullScreen:{type:Boolean,default:!1},showTreeView:{type:Boolean,default:!1},pinnedFolders:{type:Array,default:[]},showThumbnails:{type:Boolean,default:!0},selectButton:{type:Object,default(n){return{active:!1,multiple:!1,click:t=>{},...n}}}},emits:["select"],setup(n,{emit:t}){const o=t,r=js(n,e.inject("VueFinderOptions"));e.provide("ServiceContainer",r);const{setStore:c}=r.storage,a=e.ref(null);r.root=a;const i=r.dragSelect;Wa(r);const l=f=>{Object.assign(r.fs.data,f),i.clearSelection(),i.refreshSelection()};let d;return r.emitter.on("vf-fetch-abort",()=>{d.abort(),r.fs.loading=!1}),r.emitter.on("vf-fetch",({params:f,body:u=null,onSuccess:p=null,onError:m=null,noCloseModal:h=!1})=>{["index","search"].includes(f.q)&&(d&&d.abort(),r.fs.loading=!0),d=new AbortController;const g=d.signal;r.requester.send({url:"",method:f.m||"get",params:f,body:u,abortSignal:g}).then(v=>{r.fs.adapter=v.adapter,r.persist&&(r.fs.path=v.dirname,c("path",r.fs.path)),["index","search"].includes(f.q)&&(r.fs.loading=!1),h||r.modal.close(),l(v),p&&p(v)}).catch(v=>{console.error(v),m&&m(v)})}),e.onMounted(()=>{let f={};r.fs.path.includes("://")&&(f={adapter:r.fs.path.split("://")[0],path:r.fs.path}),r.emitter.emit("vf-fetch",{params:{q:"index",adapter:r.fs.adapter,...f}}),i.onSelect(u=>{o("select",u)})}),(f,u)=>(e.openBlock(),e.createElementBlock("div",{class:"vuefinder",ref_key:"root",ref:a,tabindex:"0"},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).theme.actualValue)},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(r).fullScreen?"fixed w-screen inset-0 z-20":"relative rounded resize-y ","overflow-hidden min-h-44 border flex flex-col bg-white dark:bg-gray-800 text-gray-700 dark:text-neutral-400 border-neutral-300 dark:border-gray-900 select-none"]),style:e.normalizeStyle(e.unref(r).fullScreen?"":"max-height: "+n.maxHeight),onMousedown:u[0]||(u[0]=p=>e.unref(r).emitter.emit("vf-contextmenu-hide")),onTouchstart:u[1]||(u[1]=p=>e.unref(r).emitter.emit("vf-contextmenu-hide"))},[e.createVNode(Qi),e.createVNode($u),e.createElementVNode("div",Nf,[e.createVNode(Vf),e.createVNode(i0)]),e.createVNode(M0)],38),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[e.unref(r).modal.visible?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(r).modal.type),{key:0})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(m0)],2)],512))}},Bf={install(n,t={}){t.i18n=t.i18n??{};let[o]=Object.keys(t.i18n);t.locale=t.locale??o??"en",n.provide("VueFinderOptions",t),n.component("VueFinder",Sf)}};module.exports=Bf;