From d46337f872747e1dd4fadf95480ff05b36c7980b Mon Sep 17 00:00:00 2001 From: Dawid Karwot Date: Mon, 9 Dec 2024 13:51:39 +0100 Subject: [PATCH] add Polish translation --- dist/locales/pl.js | 105 + dist/vuefinder.cjs | 6 +- dist/vuefinder.js | 4667 +++++++++++++------------- examples/main.js | 1 + src/components/modals/ModalAbout.vue | 1 + src/locales/pl.js | 105 + 6 files changed, 2595 insertions(+), 2290 deletions(-) create mode 100644 dist/locales/pl.js create mode 100644 src/locales/pl.js diff --git a/dist/locales/pl.js b/dist/locales/pl.js new file mode 100644 index 00000000..59d5659f --- /dev/null +++ b/dist/locales/pl.js @@ -0,0 +1,105 @@ +import uppyLocaleEn from '@uppy/locales/lib/pl_PL.js'; + +export default { + "Language": "Język", + "Create": "Utwórz", + "Close": "Zamknij", + "Cancel": "Anuluj", + "Save": "Zapisz", + "Edit": "Edytuj", + "Crop": "Przytnij", + "New Folder": "Nowy folder", + "New File": "Nowy plik", + "Rename": "Zmień nazwę", + "Delete": "Usuń", + "Upload": "Prześlij", + "Download": "Pobierz", + "Archive": "Archiwizuj", + "Unarchive": "Rozpakuj", + "Open": "Otwórz", + "Open containing folder": "Otwórz folder zawierający", + "Refresh": "Odśwież", + "Preview": "Podgląd", + "Toggle Full Screen": "Przełącz tryb pełnoekranowy", + "Change View": "Zmień widok", + "Storage": "Pamięć", + "Go up a directory": "Przejdź do katalogu wyżej", + "Search anything..": "Szukaj czegokolwiek..", + "Name": "Nazwa", + "Size": "Rozmiar", + "Date": "Data", + "Filepath": "Ścieżka pliku", + "Folder Name": "Nazwa folderu", + "File Name": "Nazwa pliku", + "Move files": "Przenieś pliki", + "Yes, Move!": "Tak, przenieś!", + "Delete files": "Usuń pliki", + "Yes, Delete!": "Tak, usuń!", + "Upload Files": "Prześlij pliki", + "No files selected!": "Nie wybrano plików!", + "Select Files": "Wybierz pliki", + "Archive the files": "Zarchiwizuj pliki", + "Unarchive the files": "Rozpakuj pliki", + "The archive will be unarchived at": "Archiwum zostanie rozpakowane w", + "Archive name. (.zip file will be created)": "Nazwa archiwum. (.zip plik zostanie utworzony)", + "Vuefinder is a file manager component for Vue 3.": "Vuefinder to komponent menedżera plików dla Vue 3.", + "Create a new folder": "Utwórz nowy folder", + "Create a new file": "Utwórz nowy plik", + "Are you sure you want to delete these files?": "Czy na pewno chcesz usunąć te pliki?", + "This action cannot be undone.": "Tej operacji nie można cofnąć.", + "Search results for": "Wyniki wyszukiwania dla", + "%s item(s) selected.": "Wybrano %s elementów.", + "%s is renamed.": "%s zostało przemianowane.", + "This is a readonly storage.": "To jest pamięć tylko do odczytu.", + "%s is created.": "%s zostało utworzone.", + "Files moved.": "Pliki zostały przeniesione.", + "Files deleted.": "Pliki zostały usunięte.", + "The file unarchived.": "Plik został rozpakowany.", + "The file(s) archived.": "Plik(i) zostały zarchiwizowane.", + "Updated.": "Zaktualizowano.", + "No search result found.": "Nie znaleziono wyników wyszukiwania.", + "Are you sure you want to move these files?": "Czy na pewno chcesz przenieść te pliki?", + "File Size": "Rozmiar pliku", + "Last Modified": "Ostatnia modyfikacja", + "Select Folders": "Wybierz foldery", + "Clear all": "Wyczyść wszystko", + "Clear only successful": "Wyczyść tylko udane", + "Drag and drop the files/folders to here or click here.": "Przeciągnij i upuść pliki/foldery tutaj lub kliknij tutaj.", + "Release to drop these files.": "Zwolnij przycisk, aby upuścić te pliki.", + "Canceled": "Anulowano", + "Done": "Gotowe", + "Network Error, Unable establish connection to the server or interrupted.": "Błąd sieci, nie można nawiązać połączenia z serwerem lub połączenie zostało przerwane.", + "Pending upload": "Oczekujące przesyłanie", + "Please select file to upload first.": "Proszę najpierw wybrać plik do przesłania.", + "About": "O programie", + "Settings": "Ustawienia", + "Shortcuts": "Skróty", + "Reset": "Resetuj", + "Escape": "Escape", + "Search": "Szukaj", + "Toggle Sidebar": "Przełącz pasek boczny", + "Open Settings": "Otwórz ustawienia", + "Reset all settings to default": "Zresetuj wszystkie ustawienia do domyślnych", + "Use Metric Units": "Użyj jednostek metrycznych", + "Saved.": "Zapisano.", + "Reset Settings": "Zresetuj ustawienia", + "Download doesn't work? You can try right-click 'Download' button, select 'Save link as...'.": "Pobieranie nie działa? Możesz spróbować kliknąć prawym przyciskiem na przycisk 'Pobierz', wybrać 'Zapisz link jako...'.", + "Theme": "Motyw", + "Dark": "Ciemny", + "Light": "Jasny", + "System": "System", + "Target Directory": "Docelowy katalog", + "Select": "Wybierz", + "Compact list view": "Widok listy w formacie kompaktowym", + "Show thumbnails": "Pokaż miniatury", + "Persist path on reload": "Zachowaj ścieżkę po przeładowaniu", + "Select All": "Zaznacz wszystko", + "Pinned Folders": "Przypięte foldery", + "No folders pinned": "Brak przypiętych folderów", + "Pin Folder": "Przypnij folder", + "Unpin Folder": "Odepnij folder", + "Project home": "Strona główna projektu", + "Follow on GitHub": "Śledź na GitHubie", + "Customize your experience with the following settings": "Dostosuj swoje doświadczenie za pomocą poniższych ustawień", + "uppy": uppyLocaleEn +} diff --git a/dist/vuefinder.cjs b/dist/vuefinder.cjs index ae3e60e4..11294abd 100644 --- a/dist/vuefinder.cjs +++ b/dist/vuefinder.cjs @@ -1,9 +1,9 @@ -"use strict";var br=Object.defineProperty;var yr=(n,t,o)=>t in n?br(n,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[t]=o;var Kt=(n,t,o)=>yr(n,typeof t!="symbol"?t+"":t,o);const e=require("vue"),Er=require("mitt"),Vr=require("dragselect"),Sr=require("@uppy/core"),Nr=require("@uppy/xhr-upload"),xr=require("vanilla-lazyload");require("cropperjs/dist/cropper.css");const Br=require("cropperjs");var ro;const Wt=(ro=document.querySelector('meta[name="csrf-token"]'))==null?void 0:ro.getAttribute("content");class Cr{constructor(t){Kt(this,"config");Kt(this,"customFetch",async(...t)=>{let[o,s]=t;this.config.fetchRequestInterceptor&&(s=this.config.fetchRequestInterceptor(s));let r=await fetch(o,s);return this.config.fetchResponseInterceptor&&(r=await this.config.fetchResponseInterceptor(r)),r});this.config=t}get config(){return this.config}transformRequestParams(t){const o=this.config,s={};Wt!=null&&Wt!==""&&(s[o.xsrfHeaderName]=Wt);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,v])=>{d.append(u,v)})):(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}this.config.fetchParams&&Object.assign(r,this.config.fetchParams);const a=await this.customFetch(c,r);if(a.ok)return await a[s]();throw await a.json()}}function $r(n){const t={baseUrl:"",headers:{},params:{},body:{},xsrfHeaderName:"X-CSRF-Token",fetchParams:{}};return typeof n=="string"?Object.assign(t,{baseUrl:n}):Object.assign(t,n),new Cr(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,v=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=>{v?(o.emit("vf-toast-push",{label:"The selected locale is not yet supported!",type:"error"}),l(v,null)):o.emit("vf-toast-push",{label:"Locale cannot be loaded!",type:"error"})})};e.watch(i,u=>{l(u)}),!r("locale")&&!s.length?l(t):a.value=r("translations");const d=(u,...v)=>v.length?d(u=u.replace("%s",v.shift()),...v):u;function f(u,...v){return a.value&&a.value.hasOwnProperty(u)?d(a.value[u],...v):d(u,...v)}return e.reactive({t:f,locale:i})}const Z={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(Z),Lr="2.7.0";function so(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 lo(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 Fe={SYSTEM:"system",LIGHT:"light",DARK:"dark"};function Fr(n,t){const o=e.ref(Fe.SYSTEM),s=e.ref(Fe.LIGHT);o.value=n.getStore("theme",t??Fe.SYSTEM);const r=window.matchMedia("(prefers-color-scheme: dark)"),c=a=>{o.value===Fe.DARK||o.value===Fe.SYSTEM&&a.matches?s.value=Fe.DARK:s.value=Fe.LIGHT};return c(r),r.addEventListener("change",c),{value:o,actualValue:s,set(a){o.value=a,a!==Fe.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}}}/*! +"use strict";var Sr=Object.defineProperty;var Nr=(n,t,o)=>t in n?Sr(n,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[t]=o;var Xt=(n,t,o)=>Nr(n,typeof t!="symbol"?t+"":t,o);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),xr=require("mitt"),Br=require("dragselect"),Cr=require("@uppy/core"),$r=require("@uppy/xhr-upload"),Dr=require("vanilla-lazyload");require("cropperjs/dist/cropper.css");const Tr=require("cropperjs");var ao;const Zt=(ao=document.querySelector('meta[name="csrf-token"]'))==null?void 0:ao.getAttribute("content");class Mr{constructor(t){Xt(this,"config");Xt(this,"customFetch",async(...t)=>{let[o,s]=t;this.config.fetchRequestInterceptor&&(s=this.config.fetchRequestInterceptor(s));let r=await fetch(o,s);return this.config.fetchResponseInterceptor&&(r=await this.config.fetchResponseInterceptor(r)),r});this.config=t}get config(){return this.config}transformRequestParams(t){const o=this.config,s={};Zt!=null&&Zt!==""&&(s[o.xsrfHeaderName]=Zt);const r=Object.assign({},o.headers,s,t.headers),l=Object.assign({},o.params,t.params),i=t.body,c=o.baseUrl+t.url,a=t.method;let d;a!=="get"&&(i instanceof FormData?(d=i,o.body!=null&&Object.entries(this.config.body).forEach(([u,v])=>{d.append(u,v)})):(d={...i},o.body!=null&&Object.assign(d,this.config.body)));const m={url:c,method:a,headers:r,params:l,body:d};if(o.transformRequest!=null){const u=o.transformRequest({url:c,method:a,headers:r,params:l,body:d});u.url!=null&&(m.url=u.url),u.method!=null&&(m.method=u.method),u.params!=null&&(m.params=u.params??{}),u.headers!=null&&(m.headers=u.headers??{}),u.body!=null&&(m.body=u.body)}return m}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},l=o.url+"?"+new URLSearchParams(o.params);if(o.method!=="get"&&o.body!=null){let c;o.body instanceof FormData?c=t.body:(c=JSON.stringify(o.body),r.headers["Content-Type"]="application/json"),r.body=c}this.config.fetchParams&&Object.assign(r,this.config.fetchParams);const i=await this.customFetch(l,r);if(i.ok)return await i[s]();throw await i.json()}}function Ar(n){const t={baseUrl:"",headers:{},params:{},body:{},xsrfHeaderName:"X-CSRF-Token",fetchParams:{}};return typeof n=="string"?Object.assign(t,{baseUrl:n}):Object.assign(t,n),new Mr(t)}function Lr(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(a,d){o[a]=d}function l(a){delete o[a]}function i(){Object.keys(o).map(a=>l(a))}return{getStore:(a,d=null)=>o.hasOwnProperty(a)?o[a]:d,setStore:r,removeStore:l,clearStore:i}}async function Or(n,t){const o=t[n];return typeof o=="function"?(await o()).default:o}function Fr(n,t,o,s){const{getStore:r,setStore:l}=n,i=e.ref({}),c=e.ref(r("locale",t)),a=(u,v=t)=>{Or(u,s).then(f=>{i.value=f,l("locale",u),c.value=u,l("translations",f),Object.values(s).length>1&&(o.emit("vf-toast-push",{label:"The language is set to "+u}),o.emit("vf-language-saved"))}).catch(f=>{v?(o.emit("vf-toast-push",{label:"The selected locale is not yet supported!",type:"error"}),a(v,null)):o.emit("vf-toast-push",{label:"Locale cannot be loaded!",type:"error"})})};e.watch(c,u=>{a(u)}),!r("locale")&&!s.length?a(t):i.value=r("translations");const d=(u,...v)=>v.length?d(u=u.replace("%s",v.shift()),...v):u;function m(u,...v){return i.value&&i.value.hasOwnProperty(u)?d(i.value[u],...v):d(u,...v)}return e.reactive({t:m,locale:c})}const J={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"},Ir=Object.values(J),Hr="2.7.0";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 co(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 Rr(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 He={SYSTEM:"system",LIGHT:"light",DARK:"dark"};function zr(n,t){const o=e.ref(He.SYSTEM),s=e.ref(He.LIGHT);o.value=n.getStore("theme",t??He.SYSTEM);const r=window.matchMedia("(prefers-color-scheme: dark)"),l=i=>{o.value===He.DARK||o.value===He.SYSTEM&&i.matches?s.value=He.DARK:s.value=He.LIGHT};return l(r),r.addEventListener("change",l),{value:o,actualValue:s,set(i){o.value=i,i!==He.SYSTEM?n.setStore("theme",i):n.removeStore("theme"),l(r)}}}function Ur(){const n=e.shallowRef(null),t=e.ref(!1),o=e.ref();return{visible:t,type:n,data:o,open:(l,i=null)=>{document.querySelector("body").style.overflow="hidden",t.value=!0,n.value=l,o.value=i},close:()=>{document.querySelector("body").style.overflow="",t.value=!1,n.value=null}}}/*! * OverlayScrollbars - * Version: 2.10.0 + * Version: 2.10.1 * * Copyright (c) Rene Haas | KingSora. * https://github.com/KingSora * * Released under the MIT license. - */const pe=(n,t)=>{const{o,i:s,u:r}=n;let c=o,a;const i=(f,u)=>{const v=c,m=f,p=u||(s?!s(v,m):v!==m);return(p||r)&&(c=m,a=v),[c,p,a]};return[t?f=>i(t(c,a),f):i,f=>[c,!!f,a]]},Hr=typeof window<"u"&&typeof HTMLElement<"u"&&!!window.document,ve=Hr?window:{},ao=Math.max,Ir=Math.min,en=Math.round,St=Math.abs,Rn=Math.sign,co=ve.cancelAnimationFrame,gn=ve.requestAnimationFrame,Nt=ve.setTimeout,tn=ve.clearTimeout,Mt=n=>typeof ve[n]<"u"?ve[n]:void 0,zr=Mt("MutationObserver"),Hn=Mt("IntersectionObserver"),xt=Mt("ResizeObserver"),bt=Mt("ScrollTimeline"),kn=n=>n===void 0,At=n=>n===null,Se=n=>typeof n=="number",ct=n=>typeof n=="string",wn=n=>typeof n=="boolean",we=n=>typeof n=="function",Ne=n=>Array.isArray(n),Bt=n=>typeof n=="object"&&!Ne(n)&&!At(n),bn=n=>{const t=!!n&&n.length,o=Se(t)&&t>-1&&t%1==0;return Ne(n)||!we(n)&&o?t>0&&Bt(n)?t-1 in n:!0:!1},Ct=n=>!!n&&n.constructor===Object,$t=n=>n instanceof HTMLElement,Lt=n=>n instanceof Element;function Y(n,t){if(bn(n))for(let o=0;ot(n[o],o,n));return n}const io=(n,t)=>n.indexOf(t)>=0,st=(n,t)=>n.concat(t),ne=(n,t,o)=>(!ct(t)&&bn(t)?Array.prototype.push.apply(n,t):n.push(t),n),Ie=n=>Array.from(n||[]),yn=n=>Ne(n)?n:!ct(n)&&bn(n)?Ie(n):[n],nn=n=>!!n&&!n.length,on=n=>Ie(new Set(n)),ge=(n,t,o)=>{Y(n,r=>r?r.apply(void 0,t||[]):!0),!o&&(n.length=0)},uo="paddingTop",mo="paddingRight",fo="paddingLeft",vo="paddingBottom",po="marginLeft",_o="marginRight",ho="marginBottom",go="overflowX",ko="overflowY",Ot="width",Ft="height",Re="visible",Ue="hidden",Je="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 Y(o,c=>{const a=n[c],i=t[c];a!==i&&(r=!1)}),r}return!1},wo=(n,t)=>Rt(n,t,["w","h"]),yt=(n,t)=>Rt(n,t,["x","y"]),qr=(n,t)=>Rt(n,t,["t","r","b","l"]),qe=()=>{},U=(n,...t)=>n.bind(0,...t),Ke=n=>{let t;const o=n?Nt:gn,s=n?tn:co;return[r=>{s(t),t=o(()=>r(),we(n)?n():n)},()=>s(t)]},rn=(n,t)=>{const{_:o,v:s,p:r,S:c}=t||{};let a,i,l,d,f=qe;const u=function(w){f(),tn(a),d=a=i=void 0,f=qe,n.apply(this,w)},v=k=>c&&i?c(i,k):k,m=()=>{f!==qe&&u(v(l)||l)},p=function(){const w=Ie(arguments),E=we(o)?o():o;if(Se(E)&&E>=0){const S=we(s)?s():s,b=Se(S)&&S>=0,x=E>0?Nt:gn,C=E>0?tn:co,B=v(w)||w,h=u.bind(0,B);let _;f(),r&&!d?(h(),d=!0,_=x(()=>d=void 0,E)):(_=x(h,E),b&&!a&&(a=Nt(m,S))),f=()=>C(_),i=l=B}else u(w)};return p.m=m,p},bo=(n,t)=>Object.prototype.hasOwnProperty.call(n,t),be=n=>n?Object.keys(n):[],W=(n,t,o,s,r,c,a)=>{const i=[t,o,s,r,c,a];return(typeof n!="object"||At(n))&&!we(n)&&(n={}),Y(i,l=>{Y(l,(d,f)=>{const u=l[f];if(n===u)return!0;const v=Ne(u);if(u&&Ct(u)){const m=n[f];let p=m;v&&!Ne(m)?p=[]:!v&&!Ct(m)&&(p={}),n[f]=W(p,u)}else n[f]=v?u.slice():u})}),n},yo=(n,t)=>Y(W({},n),(o,s,r)=>{o===void 0?delete r[s]:o&&Ct(o)&&(r[s]=yo(o))}),En=n=>!be(n).length,Eo=(n,t,o)=>ao(n,Ir(t,o)),je=n=>on((Ne(n)?n:(n||"").split(" ")).filter(t=>t)),Vn=(n,t)=>n&&n.getAttribute(t),In=(n,t)=>n&&n.hasAttribute(t),Te=(n,t,o)=>{Y(je(t),s=>{n&&n.setAttribute(s,String(o||""))})},Ee=(n,t)=>{Y(je(t),o=>n&&n.removeAttribute(o))},Ht=(n,t)=>{const o=je(Vn(n,t)),s=U(Te,n,t),r=(c,a)=>{const i=new Set(o);return Y(je(c),l=>{i[a](l)}),Ie(i).join(" ")};return{O:c=>s(r(c,"delete")),$:c=>s(r(c,"add")),C:c=>{const a=je(c);return a.reduce((i,l)=>i&&o.includes(l),a.length>0)}}},Vo=(n,t,o)=>(Ht(n,t).O(o),U(Sn,n,t,o)),Sn=(n,t,o)=>(Ht(n,t).$(o),U(Vo,n,t,o)),Dt=(n,t,o,s)=>(s?Sn:Vo)(n,t,o),Nn=(n,t,o)=>Ht(n,t).C(o),So=n=>Ht(n,"class"),No=(n,t)=>{So(n).O(t)},xn=(n,t)=>(So(n).$(t),U(No,n,t)),xo=(n,t)=>{const o=t?Lt(t)&&t:document;return o?Ie(o.querySelectorAll(n)):[]},jr=(n,t)=>{const o=t?Lt(t)&&t:document;return o&&o.querySelector(n)},sn=(n,t)=>Lt(n)&&n.matches(t),Bo=n=>sn(n,"body"),ln=n=>n?Ie(n.childNodes):[],lt=n=>n&&n.parentElement,We=(n,t)=>Lt(n)&&n.closest(t),an=n=>document.activeElement,Pr=(n,t,o)=>{const s=We(n,t),r=n&&jr(o,s),c=We(r,t)===s;return s&&r?s===n||r===n||c&&We(We(n,o),t)!==s:!1},Ze=n=>{Y(yn(n),t=>{const o=lt(t);t&&o&&o.removeChild(t)})},_e=(n,t)=>U(Ze,n&&t&&Y(yn(t),o=>{o&&n.appendChild(o)})),Ye=n=>{const t=document.createElement("div");return Te(t,"class",n),t},Co=n=>{const t=Ye();return t.innerHTML=n.trim(),Y(ln(t),o=>Ze(o))},zn=(n,t)=>n.getPropertyValue(t)||n[t]||"",$o=n=>{const t=n||0;return isFinite(t)?t:0},gt=n=>$o(parseFloat(n||"")),cn=n=>Math.round(n*1e4)/1e4,Do=n=>`${cn($o(n))}px`;function at(n,t){n&&t&&Y(t,(o,s)=>{try{const r=n.style,c=At(o)||wn(o)?"":Se(o)?Do(o):o;s.indexOf("--")===0?r.setProperty(s,c):r[s]=c}catch{}})}function Ae(n,t,o){const s=ct(t);let r=s?"":{};if(n){const c=ve.getComputedStyle(n,o)||n.style;r=s?zn(c,t):Ie(t).reduce((a,i)=>(a[i]=zn(c,i),a),r)}return r}const Un=(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=Ae(n,[c,a,i,l]);return{t:gt(d[c]),r:gt(d[a]),b:gt(d[i]),l:gt(d[l])}},Gr=(n,t)=>`translate${Bt(n)?`(${n.x},${n.y})`:`Y(${n})`}`,Kr=n=>!!(n.offsetWidth||n.offsetHeight||n.getClientRects().length),Wr={w:0,h:0},It=(n,t)=>t?{w:t[`${n}Width`],h:t[`${n}Height`]}:Wr,Yr=n=>It("inner",n||ve),Xe=U(It,"offset"),To=U(It,"client"),Tt=U(It,"scroll"),Bn=n=>{const t=parseFloat(Ae(n,Ot))||0,o=parseFloat(Ae(n,Ft))||0;return{w:t-en(t),h:o-en(o)}},Yt=n=>n.getBoundingClientRect(),Xr=n=>!!n&&Kr(n),dn=n=>!!(n&&(n[Ft]||n[Ot])),Mo=(n,t)=>{const o=dn(n);return!dn(t)&&o},qn=(n,t,o,s)=>{Y(je(t),r=>{n&&n.removeEventListener(r,o,s)})},Q=(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(ge,je(t).map(d=>{const f=i?u=>{qn(n,d,f,a),o&&o(u)}:o;return n&&n.addEventListener(d,f,l),U(qn,n,d,f,a)}))},Ao=n=>n.stopPropagation(),un=n=>n.preventDefault(),Lo=n=>Ao(n)||un(n),Ve=(n,t)=>{const{x:o,y:s}=Se(t)?{x:t,y:t}:t||{};Se(o)&&(n.scrollLeft=o),Se(s)&&(n.scrollTop=s)},he=n=>({x:n.scrollLeft,y:n.scrollTop}),Oo=()=>({D:{x:0,y:0},M:{x:0,y:0}}),Jr=(n,t)=>{const{D:o,M:s}=n,{w:r,h:c}=t,a=(u,v,m)=>{let p=Rn(u)*m,k=Rn(v)*m;if(p===k){const w=St(u),E=St(v);k=w>E?0:k,p=w{const o=(s,r)=>s===0&&s<=r;return{x:o(n.x,t.x),y:o(n.y,t.y)}},Pn=({D:n,M:t},o)=>{const s=(r,c,a)=>Eo(0,1,(r-a)/(r-c)||0);return{x:s(n.x,t.x,o.x),y:s(n.y,t.y,o.y)}},mn=n=>{n&&n.focus&&n.focus({preventScroll:!0})},Gn=(n,t)=>{Y(yn(t),n)},fn=n=>{const t=new Map,o=(c,a)=>{if(c){const i=t.get(c);Gn(l=>{i&&i[l?"delete":"clear"](l)},a)}else t.forEach(i=>{i.clear()}),t.clear()},s=(c,a)=>{if(ct(c)){const d=t.get(c)||new Set;return t.set(c,d),Gn(f=>{we(f)&&d.add(f)},a),U(o,c,a)}wn(a)&&a&&o();const i=be(c),l=[];return Y(i,d=>{const f=c[d];f&&ne(l,s(d,f))}),U(ge,l)},r=(c,a)=>{Y(Ie(t.get(c)),i=>{a&&!nn(a)?i.apply(0,a):i()})};return s(n||{}),[s,o,r]},Kn=n=>JSON.stringify(n,(t,o)=>{if(we(o))throw 0;return o}),Wn=(n,t)=>n?`${t}`.split(".").reduce((o,s)=>o&&bo(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"]}},Fo=(n,t)=>{const o={},s=st(be(t),be(n));return Y(s,r=>{const c=n[r],a=t[r];if(Bt(c)&&Bt(a))W(o[r]={},Fo(c,a)),En(o[r])&&delete o[r];else if(bo(t,r)&&a!==c){let i=!0;if(Ne(c)||Ne(a))try{Kn(c)===Kn(a)&&(i=!1)}catch{}i&&(o[r]=a)}}),o},Yn=(n,t,o)=>s=>[Wn(n,s),o||Wn(t,s)!==void 0],et="data-overlayscrollbars",Et="os-environment",kt=`${Et}-scrollbar-hidden`,Xt=`${et}-initialize`,Vt="noClipping",Xn=`${et}-body`,He=et,Qr="host",Me=`${et}-viewport`,es=go,ts=ko,ns="arrange",Ro="measuring",os="scrolling",Ho="scrollbarHidden",rs="noContent",vn=`${et}-padding`,Jn=`${et}-content`,Cn="os-size-observer",ss=`${Cn}-appear`,ls=`${Cn}-listener`,as="os-trinsic-observer",cs="os-theme-none",ke="os-scrollbar",is=`${ke}-rtl`,ds=`${ke}-horizontal`,us=`${ke}-vertical`,Io=`${ke}-track`,$n=`${ke}-handle`,ms=`${ke}-visible`,fs=`${ke}-cornerless`,Zn=`${ke}-interaction`,Qn=`${ke}-unusable`,pn=`${ke}-auto-hide`,eo=`${pn}-hidden`,to=`${ke}-wheel`,vs=`${Io}-interactive`,ps=`${$n}-interactive`;let zo;const _s=()=>zo,hs=n=>{zo=n};let Jt;const gs=()=>{const n=(b,x,C)=>{_e(document.body,b),_e(document.body,b);const F=To(b),B=Xe(b),h=Bn(x);return C&&Ze(b),{x:B.h-F.h+h.h,y:B.w-F.w+h.w}},t=b=>{let x=!1;const C=xn(b,kt);try{x=Ae(b,"scrollbar-width")==="none"||Ae(b,"display","::-webkit-scrollbar")==="none"}catch{}return C(),x},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}.${kt}{scrollbar-width:none!important}.${kt}::-webkit-scrollbar,.${kt}::-webkit-scrollbar-corner{appearance:none!important;display:none!important;width:0!important;height:0!important}`,r=Co(`
`)[0],c=r.firstChild,a=r.lastChild,i=_s();i&&(a.nonce=i);const[l,,d]=fn(),[f,u]=pe({o:n(r,c),i:yt},U(n,r,c,!0)),[v]=u(),m=t(r),p={x:v.x===0,y:v.y===0},k={elements:{host:null,padding:!m,viewport:b=>m&&Bo(b)&&b,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},w=W({},Zr),E=U(W,{},w),T=U(W,{},k),S={T:v,k:p,R:m,V:!!bt,L:U(l,"r"),U:T,P:b=>W(k,b)&&T(),N:E,q:b=>W(w,b)&&E(),B:W({},k),F:W({},w)};if(Ee(r,"style"),Ze(r),Q(ve,"resize",()=>{d("r",[])}),we(ve.matchMedia)&&!m&&(!p.x||!p.y)){const b=x=>{const C=ve.matchMedia(`(resolution: ${ve.devicePixelRatio}dppx)`);Q(C,"change",()=>{x(),b(x)},{A:!0})};b(()=>{const[x,C]=f();W(S.T,x),d("r",[C])})}return S},Be=()=>(Jt||(Jt=gs()),Jt),Uo=(n,t)=>we(t)?t.apply(0,n):t,ks=(n,t,o,s)=>{const r=kn(s)?o:s;return Uo(n,r)||t.apply(0,n)},qo=(n,t,o,s)=>{const r=kn(s)?o:s,c=Uo(n,r);return!!c&&($t(c)?c:t.apply(0,n))},ws=(n,t)=>{const{nativeScrollbarsOverlaid:o,body:s}=t||{},{k:r,R:c,U:a}=Be(),{nativeScrollbarsOverlaid:i,body:l}=a().cancel,d=o??i,f=kn(s)?l:s,u=(r.x||r.y)&&d,v=n&&(At(f)?!c:f);return!!u||!!v},Dn=new WeakMap,bs=(n,t)=>{Dn.set(n,t)},ys=n=>{Dn.delete(n)},jo=n=>Dn.get(n),Es=(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||xo)(f,n):[],u]});Y(l,d=>Y(d[0],f=>{const u=d[1],v=r.get(f)||[];if(n.contains(f)&&u){const p=Q(f,u,k=>{s?(p(),r.delete(f)):t(k)});r.set(f,ne(v,p))}else ge(v),r.delete(f)}))}};return a(),[c,a]},no=(n,t,o,s)=>{let r=!1;const{j:c,X:a,Y:i,W:l,J:d,G:f}=s||{},u=rn(()=>r&&o(!0),{_:33,v:99}),[v,m]=Es(n,u,i),p=c||[],k=a||[],w=st(p,k),E=(S,b)=>{if(!nn(b)){const x=d||qe,C=f||qe,F=[],B=[];let h=!1,_=!1;if(Y(b,y=>{const{attributeName:V,target:M,type:g,oldValue:L,addedNodes:O,removedNodes:j}=y,K=g==="attributes",G=g==="childList",oe=n===M,$=K&&V,D=$&&Vn(M,V||""),A=ct(D)?D:null,R=$&&L!==A,N=io(k,V)&&R;if(t&&(G||!oe)){const I=K&&R,H=I&&l&&sn(M,l),P=(H?!x(M,V,L,A):!K||I)&&!C(y,!!H,n,s);Y(O,X=>ne(F,X)),Y(j,X=>ne(F,X)),_=_||P}!t&&oe&&R&&!x(M,V,L,A)&&(ne(B,V),h=h||N)}),m(y=>on(F).reduce((V,M)=>(ne(V,xo(y,M)),sn(M,y)?ne(V,M):V),[])),t)return!S&&_&&o(!1),[!1];if(!nn(B)||h){const y=[on(B),h];return!S&&o.apply(0,y),y}}},T=new zr(U(E,!1));return[()=>(T.observe(n,{attributes:!0,attributeOldValue:!0,attributeFilter:w,subtree:t,childList:t,characterData:t}),r=!0,()=>{r&&(v(),T.disconnect(),r=!1)}),()=>{if(r)return u.m(),E(!0,T.takeRecords())}]},Po={},Go={},Vs=n=>{Y(n,t=>Y(t,(o,s)=>{Po[s]=t[s]}))},Ko=(n,t,o)=>be(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||Go)[s]=f}}),it=n=>Go[n],Ss="__osOptionsValidationPlugin",Ns="__osSizeObserverPlugin",xs=(n,t)=>{const{k:o}=t,[s,r]=n("showNativeOverlaidScrollbars");return[s&&o.x&&o.y,r]},Qe=n=>n.indexOf(Re)===0,Bs=(n,t)=>{const o=(r,c,a,i)=>{const l=r===Re?Ue:r.replace(`${Re}-`,""),d=Qe(r),f=Qe(a);return!c&&!i?Ue:d&&f?Re:d?c&&i?l:c?Re:Ue:c?l:f&&i?Re:Ue},s={x:o(t.x,n.x,t.y,n.y),y:o(t.y,n.y,t.x,n.x)};return{K:s,Z:{x:s.x===Je,y:s.y===Je}}},Wo="__osScrollbarsHidingPlugin",Cs="__osClickScrollPlugin",Yo=(n,t,o)=>{const{dt:s}=o||{},r=it(Ns),[c]=pe({o:!1,u:!0});return()=>{const a=[],l=Co(`
`)[0],d=l.firstChild,f=u=>{const v=u instanceof ResizeObserverEntry;let m=!1,p=!1;if(v){const[k,,w]=c(u.contentRect),E=dn(k);p=Mo(k,w),m=!p&&!E}else p=u===!0;m||t({ft:!0,dt:p})};if(xt){const u=new xt(v=>f(v.pop()));u.observe(d),ne(a,()=>{u.disconnect()})}else if(r){const[u,v]=r(d,f,s);ne(a,st([xn(l,ss),Q(l,"animationstart",u)],v))}else return qe;return U(ge,ne(a,_e(n,l)))}},$s=(n,t)=>{let o;const s=l=>l.h===0||l.isIntersecting||l.intersectionRatio>0,r=Ye(as),[c]=pe({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(Hn)o=new Hn(U(i,!1),{root:n}),o.observe(r),ne(l,()=>{o.disconnect()});else{const d=()=>{const f=Xe(r);a(f)};ne(l,Yo(r,d)()),d()}return U(ge,ne(l,_e(n,r)))},()=>o&&i(!0,o.takeRecords())]},Ds=(n,t,o,s)=>{let r,c,a,i,l,d;const f=`[${He}]`,u=`[${Me}]`,v=["id","class","style","open","wrap","cols","rows"],{vt:m,ht:p,ot:k,gt:w,bt:E,nt:T,wt:S,yt:b,St:x,Ot:C}=n,F=N=>Ae(N,"direction")==="rtl",B={$t:!1,ct:F(m)},h=Be(),_=it(Wo),[y]=pe({i:wo,o:{w:0,h:0}},()=>{const N=_&&_.tt(n,t,B,h,o).ut,H=!(S&&T)&&Nn(p,He,Vt),z=!T&&b(ns),P=z&&he(w),X=P&&C(),se=x(Ro,H),ee=z&&N&&N()[0],ie=Tt(k),q=Bn(k);return ee&&ee(),Ve(w,P),X&&X(),H&&se(),{w:ie.w+q.w,h:ie.h+q.h}}),V=rn(s,{_:()=>r,v:()=>c,S(N,I){const[H]=N,[z]=I;return[st(be(H),be(z)).reduce((P,X)=>(P[X]=H[X]||z[X],P),{})]}}),M=N=>{const I=F(m);W(N,{Ct:d!==I}),W(B,{ct:I}),d=I},g=(N,I)=>{const[H,z]=N,P={xt:z};return W(B,{$t:H}),!I&&s(P),P},L=({ft:N,dt:I})=>{const z=!(N&&!I)&&h.R?V:s,P={ft:N||I,dt:I};M(P),z(P)},O=(N,I)=>{const[,H]=y(),z={Ht:H};return M(z),H&&!I&&(N?s:V)(z),z},j=(N,I,H)=>{const z={Et:I};return M(z),I&&!H&&V(z),z},[K,G]=E?$s(p,g):[],oe=!T&&Yo(p,L,{dt:!0}),[$,D]=no(p,!1,j,{X:v,j:v}),A=T&&xt&&new xt(N=>{const I=N[N.length-1].contentRect;L({ft:!0,dt:Mo(I,l)}),l=I}),R=rn(()=>{const[,N]=y();s({Ht:N})},{_:222,p:!0});return[()=>{A&&A.observe(p);const N=oe&&oe(),I=K&&K(),H=$(),z=h.L(P=>{P?V({zt:P}):R()});return()=>{A&&A.disconnect(),N&&N(),I&&I(),i&&i(),H(),z()}},({It:N,At:I,Dt:H})=>{const z={},[P]=N("update.ignoreMutation"),[X,se]=N("update.attributes"),[ee,ie]=N("update.elementEvents"),[q,de]=N("update.debounce"),me=ie||se,ae=I||H,ue=re=>we(P)&&P(re);if(me){a&&a(),i&&i();const[re,le]=no(E||k,!0,O,{j:st(v,X||[]),Y:ee,W:f,G:(J,te)=>{const{target:ce,attributeName:fe}=J;return(!te&&fe&&!T?Pr(ce,f,u):!1)||!!We(ce,`.${ke}`)||!!ue(J)}});i=re(),a=le}if(de)if(V.m(),Ne(q)){const re=q[0],le=q[1];r=Se(re)&&re,c=Se(le)&&le}else Se(q)?(r=q,c=!1):(r=!1,c=!1);if(ae){const re=D(),le=G&&G(),J=a&&a();re&&W(z,j(re[0],re[1],ae)),le&&W(z,g(le[0],ae)),J&&W(z,O(J[0],ae))}return M(z),z},B]},Ts=(n,t,o,s)=>{const r="--os-viewport-percent",c="--os-scroll-percent",a="--os-scroll-direction",{U:i}=Be(),{scrollbars:l}=i(),{slot:d}=l,{vt:f,ht:u,ot:v,Mt:m,gt:p,wt:k,nt:w}=t,{scrollbars:E}=m?{}:n,{slot:T}=E||{},S=[],b=[],x=[],C=qo([f,u,v],()=>w&&k?f:u,d,T),F=$=>{if(bt){const D=new bt({source:p,axis:$});return{kt:R=>{const N=R.Tt.animate({clear:["left"],[c]:[0,1]},{timeline:D});return()=>N.cancel()}}}},B={x:F("x"),y:F("y")},h=()=>{const{Rt:$,Vt:D}=o,A=(R,N)=>Eo(0,1,R/(R+N)||0);return{x:A(D.x,$.x),y:A(D.y,$.y)}},_=($,D,A)=>{const R=A?xn:No;Y($,N=>{R(N.Tt,D)})},y=($,D)=>{Y($,A=>{const[R,N]=D(A);at(R,N)})},V=($,D,A)=>{const R=wn(A),N=R?A:!0,I=R?!A:!0;N&&_(b,$,D),I&&_(x,$,D)},M=()=>{const $=h(),D=A=>R=>[R.Tt,{[r]:cn(A)+""}];y(b,D($.x)),y(x,D($.y))},g=()=>{if(!bt){const{Lt:$}=o,D=Pn($,he(p)),A=R=>N=>[N.Tt,{[c]:cn(R)+""}];y(b,A(D.x)),y(x,A(D.y))}},L=()=>{const{Lt:$}=o,D=jn($),A=R=>N=>[N.Tt,{[a]:R?"0":"1"}];y(b,A(D.x)),y(x,A(D.y))},O=()=>{if(w&&!k){const{Rt:$,Lt:D}=o,A=jn(D),R=Pn(D,he(p)),N=I=>{const{Tt:H}=I,z=lt(H)===v&&H,P=(X,se,ee)=>{const ie=se*X;return Do(ee?ie:-ie)};return[z,z&&{transform:Gr({x:P(R.x,$.x,A.x),y:P(R.y,$.y,A.y)})}]};y(b,N),y(x,N)}},j=$=>{const D=$?"x":"y",R=Ye(`${ke} ${$?ds:us}`),N=Ye(Io),I=Ye($n),H={Tt:R,Ut:N,Pt:I},z=B[D];return ne($?b:x,H),ne(S,[_e(R,N),_e(N,I),U(Ze,R),z&&z.kt(H),s(H,V,$)]),H},K=U(j,!0),G=U(j,!1),oe=()=>(_e(C,b[0].Tt),_e(C,x[0].Tt),U(ge,S));return K(),G(),[{Nt:M,qt:g,Bt:L,Ft:O,jt:V,Xt:{Yt:b,Wt:K,Jt:U(y,b)},Gt:{Yt:x,Wt:G,Jt:U(y,x)}},oe]},Ms=(n,t,o,s)=>(r,c,a)=>{const{ht:i,ot:l,nt:d,gt:f,Kt:u,Ot:v}=t,{Tt:m,Ut:p,Pt:k}=r,[w,E]=Ke(333),[T,S]=Ke(444),b=F=>{we(f.scrollBy)&&f.scrollBy({behavior:"smooth",left:F.x,top:F.y})},x=()=>{const F="pointerup pointercancel lostpointercapture",B=`client${a?"X":"Y"}`,h=a?Ot:Ft,_=a?"left":"top",y=a?"w":"h",V=a?"x":"y",M=(L,O)=>j=>{const{Rt:K}=o,G=Xe(p)[y]-Xe(k)[y],$=O*j/G*K[V];Ve(f,{[V]:L+$})},g=[];return Q(p,"pointerdown",L=>{const O=We(L.target,`.${$n}`)===k,j=O?k:p,K=n.scrollbars,G=K[O?"dragScroll":"clickScroll"],{button:oe,isPrimary:$,pointerType:D}=L,{pointers:A}=K;if(oe===0&&$&&G&&(A||[]).includes(D)){ge(g),S();const N=!O&&(L.shiftKey||G==="instant"),I=U(Yt,k),H=U(Yt,p),z=(te,ce)=>(te||I())[_]-(ce||H())[_],P=en(Yt(f)[h])/Xe(f)[y]||1,X=M(he(f)[V],1/P),se=L[B],ee=I(),ie=H(),q=ee[h],de=z(ee,ie)+q/2,me=se-ie[_],ae=O?0:me-de,ue=te=>{ge(J),j.releasePointerCapture(te.pointerId)},re=O||N,le=v(),J=[Q(u,F,ue),Q(u,"selectstart",te=>un(te),{H:!1}),Q(p,F,ue),re&&Q(p,"pointermove",te=>X(ae+(te[B]-se))),re&&(()=>{const te=he(f);le();const ce=he(f),fe={x:ce.x-te.x,y:ce.y-te.y};(St(fe.x)>3||St(fe.y)>3)&&(v(),Ve(f,te),b(fe),T(le))})];if(j.setPointerCapture(L.pointerId),N)X(ae);else if(!O){const te=it(Cs);if(te){const ce=te(X,ae,q,fe=>{fe?le():ne(J,le)});ne(J,ce),ne(g,U(ce,!0))}}}})};let C=!0;return U(ge,[Q(k,"pointermove pointerleave",s),Q(m,"pointerenter",()=>{c(Zn,!0)}),Q(m,"pointerleave pointercancel",()=>{c(Zn,!1)}),!d&&Q(m,"mousedown",()=>{const F=an();(In(F,Me)||In(F,He)||F===document.body)&&Nt(U(mn,l),25)}),Q(m,"wheel",F=>{const{deltaX:B,deltaY:h,deltaMode:_}=F;C&&_===0&<(m)===i&&b({x:B,y:h}),C=!1,c(to,!0),w(()=>{C=!0,c(to)}),un(F)},{H:!1,I:!0}),Q(m,"pointerdown",U(Q,u,"click",Lo,{A:!0,I:!0,H:!1}),{I:!0}),x(),E,S])},As=(n,t,o,s,r,c)=>{let a,i,l,d,f,u=qe,v=0;const m=$=>$.pointerType==="mouse",[p,k]=Ke(),[w,E]=Ke(100),[T,S]=Ke(100),[b,x]=Ke(()=>v),[C,F]=Ts(n,r,s,Ms(t,r,s,$=>m($)&&j())),{ht:B,Qt:h,wt:_}=r,{jt:y,Nt:V,qt:M,Bt:g,Ft:L}=C,O=($,D)=>{if(x(),$)y(eo);else{const A=U(y,eo,!0);v>0&&!D?b(A):A()}},j=()=>{(l?!a:!d)&&(O(!0),w(()=>{O(!1)}))},K=$=>{y(pn,$,!0),y(pn,$,!1)},G=$=>{m($)&&(a=l,l&&O(!0))},oe=[x,E,S,k,()=>u(),Q(B,"pointerover",G,{A:!0}),Q(B,"pointerenter",G),Q(B,"pointerleave",$=>{m($)&&(a=!1,l&&O(!1))}),Q(B,"pointermove",$=>{m($)&&i&&j()}),Q(h,"scroll",$=>{p(()=>{M(),j()}),c($),L()})];return[()=>U(ge,ne(oe,F())),({It:$,Dt:D,Zt:A,tn:R})=>{const{nn:N,sn:I,en:H,cn:z}=R||{},{Ct:P,dt:X}=A||{},{ct:se}=o,{k:ee}=Be(),{K:ie,rn:q}=s,[de,me]=$("showNativeOverlaidScrollbars"),[ae,ue]=$("scrollbars.theme"),[re,le]=$("scrollbars.visibility"),[J,te]=$("scrollbars.autoHide"),[ce,fe]=$("scrollbars.autoHideSuspend"),[tt]=$("scrollbars.autoHideDelay"),[dt,ut]=$("scrollbars.dragScroll"),[mt,ze]=$("scrollbars.clickScroll"),[Pe,Ut]=$("overflow"),qt=X&&!D,jt=q.x||q.y,Pt=N||I||z||P||D,ye=H||le||Ut,Gt=de&&ee.x&&ee.y,nt=(ot,Oe,ft)=>{const rt=ot.includes(Je)&&(re===Re||re==="auto"&&Oe===Je);return y(ms,rt,ft),rt};if(v=tt,qt&&(ce&&jt?(K(!1),u(),T(()=>{u=Q(h,"scroll",U(K,!0),{A:!0})})):K(!0)),me&&y(cs,Gt),ue&&(y(f),y(ae,!0),f=ae),fe&&!ce&&K(!0),te&&(i=J==="move",l=J==="leave",d=J==="never",O(d,!0)),ut&&y(ps,dt),ze&&y(vs,!!mt),ye){const ot=nt(Pe.x,ie.x,!0),Oe=nt(Pe.y,ie.y,!1);y(fs,!(ot&&Oe))}Pt&&(M(),V(),L(),z&&g(),y(Qn,!q.x,!0),y(Qn,!q.y,!1),y(is,se&&!_))},{},C]},Ls=n=>{const t=Be(),{U:o,R:s}=t,{elements:r}=o(),{padding:c,viewport:a,content:i}=r,l=$t(n),d=l?{}:n,{elements:f}=d,{padding:u,viewport:v,content:m}=f||{},p=l?n:d.target,k=Bo(p),w=p.ownerDocument,E=w.documentElement,T=()=>w.defaultView||ve,S=U(ks,[p]),b=U(qo,[p]),x=U(Ye,""),C=U(S,x,a),F=U(b,x,i),B=q=>{const de=Xe(q),me=Tt(q),ae=Ae(q,go),ue=Ae(q,ko);return me.w-de.w>0&&!Qe(ae)||me.h-de.h>0&&!Qe(ue)},h=C(v),_=h===p,y=_&&k,V=!_&&F(m),M=!_&&h===V,g=y?E:h,L=y?g:p,O=!_&&b(x,c,u),j=!M&&V,K=[j,g,O,L].map(q=>$t(q)&&!lt(q)&&q),G=q=>q&&io(K,q),oe=!G(g)&&B(g)?g:p,$=y?E:g,A={vt:p,ht:L,ot:g,ln:O,bt:j,gt:$,Qt:y?w:g,an:k?E:oe,Kt:w,wt:k,Mt:l,nt:_,un:T,yt:q=>Nn(g,Me,q),St:(q,de)=>Dt(g,Me,q,de),Ot:()=>Dt($,Me,os,!0)},{vt:R,ht:N,ln:I,ot:H,bt:z}=A,P=[()=>{Ee(N,[He,Xt]),Ee(R,Xt),k&&Ee(E,[Xt,He])}];let X=ln([z,H,I,N,R].find(q=>q&&!G(q)));const se=y?R:z||H,ee=U(ge,P);return[A,()=>{const q=T(),de=an(),me=J=>{_e(lt(J),ln(J)),Ze(J)},ae=J=>Q(J,"focusin focusout focus blur",Lo,{I:!0,H:!1}),ue="tabindex",re=Vn(H,ue),le=ae(de);return Te(N,He,_?"":Qr),Te(I,vn,""),Te(H,Me,""),Te(z,Jn,""),_||(Te(H,ue,re||"-1"),k&&Te(E,Xn,"")),_e(se,X),_e(N,I),_e(I||N,!_&&H),_e(H,z),ne(P,[le,()=>{const J=an(),te=G(H),ce=te&&J===H?R:J,fe=ae(ce);Ee(I,vn),Ee(z,Jn),Ee(H,Me),k&&Ee(E,Xn),re?Te(H,ue,re):Ee(H,ue),G(z)&&me(z),te&&me(H),G(I)&&me(I),mn(ce),fe()}]),s&&!_&&(Sn(H,Me,Ho),ne(P,U(Ee,H,Me))),mn(!_&&k&&de===R&&q.top===q?H:de),le(),X=0,ee},ee]},Os=({bt:n})=>({Zt:t,_n:o,Dt:s})=>{const{xt:r}=t||{},{$t:c}=o;n&&(r||s)&&at(n,{[Ft]:c&&"100%"})},Fs=({ht:n,ln:t,ot:o,nt:s},r)=>{const[c,a]=pe({i:qr,o:Un()},U(Un,n,"padding",""));return({It:i,Zt:l,_n:d,Dt:f})=>{let[u,v]=a(f);const{R:m}=Be(),{ft:p,Ht:k,Ct:w}=l||{},{ct:E}=d,[T,S]=i("paddingAbsolute");(p||v||(f||k))&&([u,v]=c(f));const x=!s&&(S||w||v);if(x){const C=!T||!t&&!m,F=u.r+u.l,B=u.t+u.b,h={[_o]:C&&!E?-F:0,[ho]:C?-B:0,[po]:C&&E?-F:0,top:C?-u.t:0,right:C?E?-u.r:"auto":0,left:C?E?"auto":-u.l:0,[Ot]:C&&`calc(100% + ${F}px)`},_={[uo]:C?u.t:0,[mo]:C?u.r:0,[vo]:C?u.b:0,[fo]:C?u.l:0};at(t||o,h),at(o,_),W(r,{ln:u,dn:!C,rt:t?_:W({},h,_)})}return{fn:x}}},Rs=(n,t)=>{const o=Be(),{ht:s,ln:r,ot:c,nt:a,Qt:i,gt:l,wt:d,St:f,un:u}=n,{R:v}=o,m=d&&a,p=U(ao,0),k={display:()=>!1,direction:D=>D!=="ltr",flexDirection:D=>D.endsWith("-reverse"),writingMode:D=>D!=="horizontal-tb"},w=be(k),E={i:wo,o:{w:0,h:0}},T={i:yt,o:{}},S=D=>{f(Ro,!m&&D)},b=D=>{if(!w.some(se=>{const ee=D[se];return ee&&k[se](ee)}))return{D:{x:0,y:0},M:{x:1,y:1}};S(!0);const R=he(l),N=f(rs,!0),I=Q(i,Je,se=>{const ee=he(l);se.isTrusted&&ee.x===R.x&&ee.y===R.y&&Ao(se)},{I:!0,A:!0});Ve(l,{x:0,y:0}),N();const H=he(l),z=Tt(l);Ve(l,{x:z.w,y:z.h});const P=he(l);Ve(l,{x:P.x-H.x<1&&-z.w,y:P.y-H.y<1&&-z.h});const X=he(l);return Ve(l,R),gn(()=>I()),{D:H,M:X}},x=(D,A)=>{const R=ve.devicePixelRatio%1!==0?1:0,N={w:p(D.w-A.w),h:p(D.h-A.h)};return{w:N.w>R?N.w:0,h:N.h>R?N.h:0}},[C,F]=pe(E,U(Bn,c)),[B,h]=pe(E,U(Tt,c)),[_,y]=pe(E),[V]=pe(T),[M,g]=pe(E),[L]=pe(T),[O]=pe({i:(D,A)=>Rt(D,A,w),o:{}},()=>Xr(c)?Ae(c,w):{}),[j,K]=pe({i:(D,A)=>yt(D.D,A.D)&&yt(D.M,A.M),o:Oo()}),G=it(Wo),oe=(D,A)=>`${A?es:ts}${Ur(D)}`,$=D=>{const A=N=>[Re,Ue,Je].map(I=>oe(I,N)),R=A(!0).concat(A()).join(" ");f(R),f(be(D).map(N=>oe(D[N],N==="x")).join(" "),!0)};return({It:D,Zt:A,_n:R,Dt:N},{fn:I})=>{const{ft:H,Ht:z,Ct:P,dt:X,zt:se}=A||{},ee=G&&G.tt(n,t,R,o,D),{it:ie,ut:q,_t:de}=ee||{},[me,ae]=xs(D,o),[ue,re]=D("overflow"),le=Qe(ue.x),J=Qe(ue.y),te=!0;let ce=F(N),fe=h(N),tt=y(N),dt=g(N);ae&&v&&f(Ho,!me);{Nn(s,He,Vt)&&S(!0);const[On]=q?q():[],[vt]=ce=C(N),[pt]=fe=B(N),_t=To(c),ht=m&&Yr(u()),wr={w:p(pt.w+vt.w),h:p(pt.h+vt.h)},Fn={w:p((ht?ht.w:_t.w+p(_t.w-pt.w))+vt.w),h:p((ht?ht.h:_t.h+p(_t.h-pt.h))+vt.h)};On&&On(),dt=M(Fn),tt=_(x(wr,Fn),N)}const[ut,mt]=dt,[ze,Pe]=tt,[Ut,qt]=fe,[jt,Pt]=ce,[ye,Gt]=V({x:ze.w>0,y:ze.h>0}),nt=le&&J&&(ye.x||ye.y)||le&&ye.x&&!ye.y||J&&ye.y&&!ye.x,ot=I||P||se||Pt||qt||mt||Pe||re||ae||te,Oe=Bs(ye,ue),[ft,rt]=L(Oe.K),[_r,hr]=O(N),Ln=P||X||hr||Gt||N,[gr,kr]=Ln?j(b(_r),N):K();return ot&&(rt&&$(Oe.K),de&&ie&&at(c,de(Oe,R,ie(Oe,Ut,jt)))),S(!1),Dt(s,He,Vt,nt),Dt(r,vn,Vt,nt),W(t,{K:ft,Vt:{x:ut.w,y:ut.h},Rt:{x:ze.w,y:ze.h},rn:ye,Lt:Jr(gr,ze)}),{en:rt,nn:mt,sn:Pe,cn:kr||Pe,vn:Ln}}},Hs=n=>{const[t,o,s]=Ls(n),r={ln:{t:0,r:0,b:0,l:0},dn:!1,rt:{[_o]:0,[ho]:0,[po]:0,[uo]:0,[mo]:0,[vo]:0,[fo]:0},Vt:{x:0,y:0},Rt:{x:0,y:0},K:{x:Ue,y:Ue},rn:{x:!1,y:!1},Lt:Oo()},{vt:c,gt:a,nt:i,Ot:l}=t,{R:d,k:f}=Be(),u=!d&&(f.x||f.y),v=[Os(t),Fs(t,r),Rs(t,r)];return[o,m=>{const p={},w=u&&he(a),E=w&&l();return Y(v,T=>{W(p,T(m,p)||{})}),Ve(a,w),E&&E(),!i&&Ve(c,0),p},r,t,s]},Is=(n,t,o,s,r)=>{let c=!1;const a=Yn(t,{}),[i,l,d,f,u]=Hs(n),[v,m,p]=Ds(f,d,a,b=>{S({},b)}),[k,w,,E]=As(n,t,p,d,f,r),T=b=>be(b).some(x=>!!b[x]),S=(b,x)=>{if(o())return!1;const{pn:C,Dt:F,At:B,hn:h}=b,_=C||{},y=!!F||!c,V={It:Yn(t,_,y),pn:_,Dt:y};if(h)return w(V),!1;const M=x||m(W({},V,{At:B})),g=l(W({},V,{_n:p,Zt:M}));w(W({},V,{Zt:M,tn:g}));const L=T(M),O=T(g),j=L||O||!En(_)||y;return c=!0,j&&s(b,{Zt:M,tn:g}),j};return[()=>{const{an:b,gt:x,Ot:C}=f,F=he(b),B=[v(),i(),k()],h=C();return Ve(x,F),h(),U(ge,B)},S,()=>({gn:p,bn:d}),{wn:f,yn:E},u]},xe=(n,t,o)=>{const{N:s}=Be(),r=$t(n),c=r?n:n.target,a=jo(c);if(t&&!a){let i=!1;const l=[],d={},f=_=>{const y=yo(_),V=it(Ss);return V?V(y,!0):y},u=W({},s(),f(t)),[v,m,p]=fn(),[k,w,E]=fn(o),T=(_,y)=>{E(_,y),p(_,y)},[S,b,x,C,F]=Is(n,u,()=>i,({pn:_,Dt:y},{Zt:V,tn:M})=>{const{ft:g,Ct:L,xt:O,Ht:j,Et:K,dt:G}=V,{nn:oe,sn:$,en:D,cn:A}=M;T("updated",[h,{updateHints:{sizeChanged:!!g,directionChanged:!!L,heightIntrinsicChanged:!!O,overflowEdgeChanged:!!oe,overflowAmountChanged:!!$,overflowStyleChanged:!!D,scrollCoordinatesChanged:!!A,contentMutation:!!j,hostMutation:!!K,appear:!!G},changedOptions:_||{},force:!!y}])},_=>T("scroll",[h,_])),B=_=>{ys(c),ge(l),i=!0,T("destroyed",[h,_]),m(),w()},h={options(_,y){if(_){const V=y?s():{},M=Fo(u,W(V,f(_)));En(M)||(W(u,M),b({pn:M}))}return W({},u)},on:k,off:(_,y)=>{_&&y&&w(_,y)},state(){const{gn:_,bn:y}=x(),{ct:V}=_,{Vt:M,Rt:g,K:L,rn:O,ln:j,dn:K,Lt:G}=y;return W({},{overflowEdge:M,overflowAmount:g,overflowStyle:L,hasOverflow:O,scrollCoordinates:{start:G.D,end:G.M},padding:j,paddingAbsolute:K,directionRTL:V,destroyed:i})},elements(){const{vt:_,ht:y,ln:V,ot:M,bt:g,gt:L,Qt:O}=C.wn,{Xt:j,Gt:K}=C.yn,G=$=>{const{Pt:D,Ut:A,Tt:R}=$;return{scrollbar:R,track:A,handle:D}},oe=$=>{const{Yt:D,Wt:A}=$,R=G(D[0]);return W({},R,{clone:()=>{const N=G(A());return b({hn:!0}),N}})};return W({},{target:_,host:y,padding:V||M,viewport:M,content:g||M,scrollOffsetElement:L,scrollEventElement:O,scrollbarHorizontal:oe(j),scrollbarVertical:oe(K)})},update:_=>b({Dt:_,At:!0}),destroy:U(B,!1),plugin:_=>d[be(_)[0]]};return ne(l,[F]),bs(c,h),Ko(Po,xe,[h,v,d]),ws(C.wn.wt,!r&&n.cancel)?(B(!0),h):(ne(l,S()),T("initialized",[h]),h.update(),h)}return a};xe.plugin=n=>{const t=Ne(n),o=t?n:[n],s=o.map(r=>Ko(r,xe)[0]);return Vs(o),t?s:s[0]};xe.valid=n=>{const t=n&&n.elements,o=we(t)&&t();return Ct(o)&&!!jo(o.target)};xe.env=()=>{const{T:n,k:t,R:o,V:s,B:r,F:c,U:a,P:i,N:l,q:d}=Be();return W({},{scrollbarsSize:n,scrollbarsOverlaid:t,scrollbarsHiding:o,scrollTimeline:s,staticDefaultInitialization:r,staticDefaultOptions:c,getDefaultInitialization:a,setDefaultInitialization:i,getDefaultOptions:l,setDefaultOptions:d})};xe.nonce=hs;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),v=e.ref(null),m=e.ref(null);function p(){n=new Vr({area:t.value,keyboardDrag:!1,selectedClass:"vf-explorer-selected",selectorClass:"vf-explorer-selector"}),n.subscribe("DS:start:pre",({items:x,event:C,isDragging:F})=>{if(F)n.Interaction._reset(C);else{s.value=!1;const B=t.value.offsetWidth-C.offsetX,h=t.value.offsetHeight-C.offsetY;B<15&&h<15&&n.Interaction._reset(C),C.target.classList.contains("os-scrollbar-handle")&&n.Interaction._reset(C)}}),document.addEventListener("dragleave",x=>{!x.buttons&&s.value&&(s.value=!1)})}const k=()=>e.nextTick(()=>{n.addSelection(n.getSelectables()),w()}),w=()=>{r.value=n.getSelection().map(x=>JSON.parse(x.dataset.item)),d.value(r.value)},E=()=>e.nextTick(()=>{const x=c().map(C=>C.path);l(),n.setSettings({selectables:document.getElementsByClassName("vf-item-"+o)}),n.addSelection(n.getSelectables().filter(C=>x.includes(JSON.parse(C.dataset.item).path))),w(),S()}),T=x=>{d.value=x,n.subscribe("DS:end",({items:C,event:F,isDragging:B})=>{r.value=C.map(h=>JSON.parse(h.dataset.item)),x(C.map(h=>JSON.parse(h.dataset.item)))})},S=()=>{f.value&&(t.value.getBoundingClientRect().height{if(!f.value)return;const{scrollOffsetElement:C}=f.value.elements();C.scrollTo({top:t.value.scrollTop,left:0})};return e.onMounted(()=>{xe(v.value,{scrollbars:{theme:"vf-theme-dark dark:vf-theme-light"},plugins:{OverlayScrollbars:xe}},{initialized:x=>{f.value=x},scroll:(x,C)=>{const{scrollOffsetElement:F}=x.elements();t.value.scrollTo({top:F.scrollTop,left:0})}}),p(),S(),m.value=new ResizeObserver(S),m.value.observe(t.value),t.value.addEventListener("scroll",b),n.subscribe("DS:scroll",({isDragging:x})=>x||b())}),e.onUnmounted(()=>{n&&n.stop(),m.value&&m.value.disconnect()}),e.onUpdated(()=>{n&&n.Area.reset()}),{area:t,explorerId:o,isDraggingRef:s,scrollBar:u,scrollBarContainer:v,getSelected:c,getSelection:a,selectAll:k,clearSelection:l,refreshSelection:E,getCount:i,onSelect:T}}function Us(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 v(){let T=[],S=[],b=s.value??o.value+"://";b.length===0&&(r.value=[]),b.replace(o.value+"://","").split("/").forEach(function(F){T.push(F),T.join("/")!==""&&S.push({basename:F,name:F,path:o.value+"://"+T.join("/"),type:"dir"})}),c.value=S;const[x,C]=p(S,l.value);a.value=C,r.value=x}function m(T){l.value=T,v()}function p(T,S){return T.length>S?[T.slice(-S),T.slice(0,-S)]:[T,[]]}function k(T=null){i.value=T??!i.value}function w(){return r.value&&r.value.length&&!f}const E=e.computed(()=>{var T;return((T=r.value[r.value.length-2])==null?void 0:T.path)??o.value+"://"});return e.onMounted(()=>{}),e.watch(s,v),e.onMounted(v),{adapter:o,path:s,loading:d,searchMode:f,data:u,breadcrumbs:r,breadcrumbItems:c,limitBreadcrumbItems:m,hiddenBreadcrumbs:a,showHiddenBreadcrumbs:i,toggleHiddenBreadcrumbs:k,isGoUpAvailable:w,parentFolderPath:E}}const qs=(n,t)=>{const o=Dr(n.id),s=Er(),r=o.getStore("metricUnits",!1),c=Fr(o,n.theme),a=t.i18n,i=n.locale??t.locale,l=m=>Array.isArray(m)?m:Ar,d=o.getStore("persist-path",n.persist),f=d?o.getStore("path",n.path):n.path,u=d?o.getStore("adapter"):null,v=zs();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(()=>v),requester:$r(n.request),features:l(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?lo:so,compactListView:o.getStore("compact-list-view",!0),persist:d,showThumbnails:o.getStore("show-thumbnails",n.showThumbnails),loadingIndicator:n.loadingIndicator,fs:Us(u,f)})},js={class:"vuefinder__modal-layout__container"},Ps={class:"vuefinder__modal-layout__content"},Gs={class:"vuefinder__modal-layout__footer"},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:"vuefinder__modal-layout","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"},[r[2]||(r[2]=e.createElementVNode("div",{class:"vuefinder__modal-layout__overlay"},null,-1)),e.createElementVNode("div",js,[e.createElementVNode("div",{class:"vuefinder__modal-layout__wrapper",onMousedown:r[0]||(r[0]=e.withModifiers(c=>e.unref(o).modal.close(),["self"]))},[e.createElementVNode("div",{ref_key:"modalBody",ref:t,class:"vuefinder__modal-layout__body"},[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(["vuefinder__action-message",{"vuefinder__action-message--hidden":!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 Ge=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"};function Zs(n,t){return e.openBlock(),e.createElementBlock("svg",Js,t[0]||(t[0]=[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),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)]))}const Qs={render:Zs},el={class:"vuefinder__modal-header"},tl={class:"vuefinder__modal-header__icon-container"},nl={class:"vuefinder__modal-header__title",id:"modal-title"},Le={__name:"ModalHeader",props:{title:{type:String,required:!0},icon:{type:Object,required:!0}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",el,[e.createElementVNode("div",tl,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.icon),{class:"vuefinder__modal-header__icon"}))]),e.createElementVNode("h3",nl,e.toDisplayString(n.title),1)]))}},ol={class:"vuefinder__about-modal__content"},rl={class:"vuefinder__about-modal__main"},sl={class:"vuefinder__about-modal__tabs","aria-label":"Tabs"},ll=["onClick","aria-current"],al={key:0,class:"vuefinder__about-modal__tab-content"},cl={class:"vuefinder__about-modal__description"},il={href:"https://vuefinder.ozdemir.be",class:"vuefinder__about-modal__link",target:"_blank"},dl={href:"https://github.com/n1crack/vuefinder",class:"vuefinder__about-modal__link",target:"_blank"},ul={key:1,class:"vuefinder__about-modal__tab-content"},ml={class:"vuefinder__about-modal__description"},fl={class:"vuefinder__about-modal__settings"},vl={class:"vuefinder__about-modal__setting flex"},pl={class:"vuefinder__about-modal__setting-input"},_l={class:"vuefinder__about-modal__setting-label"},hl={for:"metric_unit",class:"vuefinder__about-modal__label"},gl={class:"vuefinder__about-modal__setting flex"},kl={class:"vuefinder__about-modal__setting-input"},wl={class:"vuefinder__about-modal__setting-label"},bl={for:"large_icons",class:"vuefinder__about-modal__label"},yl={class:"vuefinder__about-modal__setting flex"},El={class:"vuefinder__about-modal__setting-input"},Vl={class:"vuefinder__about-modal__setting-label"},Sl={for:"persist_path",class:"vuefinder__about-modal__label"},Nl={class:"vuefinder__about-modal__setting flex"},xl={class:"vuefinder__about-modal__setting-input"},Bl={class:"vuefinder__about-modal__setting-label"},Cl={for:"show_thumbnails",class:"vuefinder__about-modal__label"},$l={class:"vuefinder__about-modal__setting"},Dl={class:"vuefinder__about-modal__setting-input"},Tl={for:"theme",class:"vuefinder__about-modal__label"},Ml={class:"vuefinder__about-modal__setting-label"},Al=["label"],Ll=["value"],Ol={key:0,class:"vuefinder__about-modal__setting"},Fl={class:"vuefinder__about-modal__setting-input"},Rl={for:"language",class:"vuefinder__about-modal__label"},Hl={class:"vuefinder__about-modal__setting-label"},Il=["label"],zl=["value"],Ul={key:2,class:"vuefinder__about-modal__tab-content"},ql={class:"vuefinder__about-modal__shortcuts"},jl={class:"vuefinder__about-modal__shortcut"},Pl={class:"vuefinder__about-modal__shortcut"},Gl={class:"vuefinder__about-modal__shortcut"},Kl={class:"vuefinder__about-modal__shortcut"},Wl={class:"vuefinder__about-modal__shortcut"},Yl={class:"vuefinder__about-modal__shortcut"},Xl={class:"vuefinder__about-modal__shortcut"},Jl={class:"vuefinder__about-modal__shortcut"},Zl={class:"vuefinder__about-modal__shortcut"},Ql={key:3,class:"vuefinder__about-modal__tab-content"},ea={class:"vuefinder__about-modal__description"},Xo={__name:"ModalAbout",setup(n){const t=e.inject("ServiceContainer"),{setStore:o,clearStore:s}=t.storage,{t:r}=t.i18n,c={ABOUT:"about",SETTINGS:"settings",SHORTCUTS:"shortcuts",RESET:"reset"},a=e.computed(()=>[{name:r("About"),key:c.ABOUT},{name:r("Settings"),key:c.SETTINGS},{name:r("Shortcuts"),key:c.SHORTCUTS},{name:r("Reset"),key:c.RESET}]),i=e.ref("about"),l=async()=>{s(),location.reload()},d=T=>{t.theme.set(T),t.emitter.emit("vf-theme-saved")},f=()=>{t.metricUnits=!t.metricUnits,t.filesize=t.metricUnits?lo:so,o("metricUnits",t.metricUnits),t.emitter.emit("vf-metric-units-saved")},u=()=>{t.compactListView=!t.compactListView,o("compactListView",t.compactListView),t.emitter.emit("vf-compact-view-saved")},v=()=>{t.showThumbnails=!t.showThumbnails,o("show-thumbnails",t.showThumbnails),t.emitter.emit("vf-show-thumbnails-saved")},m=()=>{t.persist=!t.persist,o("persist-path",t.persist),t.emitter.emit("vf-persist-path-saved")},{i18n:p}=e.inject("VueFinderOptions"),w=Object.fromEntries(Object.entries({ar:"Arabic (العربيّة)",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(([T])=>Object.keys(p).includes(T))),E=e.computed(()=>({system:r("System"),light:r("Light"),dark:r("Dark")}));return(T,S)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:S[7]||(S[7]=b=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(r)("Close")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",ol,[e.createVNode(Le,{icon:e.unref(Qs),title:"Vuefinder "+e.unref(t).version},null,8,["icon","title"]),e.createElementVNode("div",rl,[e.createElementVNode("div",null,[e.createElementVNode("div",null,[e.createElementVNode("nav",sl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,b=>(e.openBlock(),e.createElementBlock("button",{key:b.name,onClick:x=>i.value=b.key,class:e.normalizeClass([b.key===i.value?"vuefinder__about-modal__tab--active":"vuefinder__about-modal__tab--inactive","vuefinder__about-modal__tab"]),"aria-current":b.current?"page":void 0},e.toDisplayString(b.name),11,ll))),128))])])]),i.value===c.ABOUT?(e.openBlock(),e.createElementBlock("div",al,[e.createElementVNode("div",cl,e.toDisplayString(e.unref(r)("Vuefinder is a simple, lightweight, and fast file manager library for Vue.js applications")),1),e.createElementVNode("a",il,e.toDisplayString(e.unref(r)("Project home")),1),e.createElementVNode("a",dl,e.toDisplayString(e.unref(r)("Follow on GitHub")),1)])):e.createCommentVNode("",!0),i.value===c.SETTINGS?(e.openBlock(),e.createElementBlock("div",ul,[e.createElementVNode("div",ml,e.toDisplayString(e.unref(r)("Customize your experience with the following settings")),1),e.createElementVNode("div",fl,[e.createElementVNode("fieldset",null,[e.createElementVNode("div",vl,[e.createElementVNode("div",pl,[e.withDirectives(e.createElementVNode("input",{id:"metric_unit",name:"metric_unit",type:"checkbox","onUpdate:modelValue":S[0]||(S[0]=b=>e.unref(t).metricUnits=b),onClick:f,class:"vuefinder__about-modal__checkbox"},null,512),[[e.vModelCheckbox,e.unref(t).metricUnits]])]),e.createElementVNode("div",_l,[e.createElementVNode("label",hl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Use Metric Units"))+" ",1),e.createVNode(Ge,{class:"ms-3",on:"vf-metric-units-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])])]),e.createElementVNode("div",gl,[e.createElementVNode("div",kl,[e.withDirectives(e.createElementVNode("input",{id:"large_icons",name:"large_icons",type:"checkbox","onUpdate:modelValue":S[1]||(S[1]=b=>e.unref(t).compactListView=b),onClick:u,class:"vuefinder__about-modal__checkbox"},null,512),[[e.vModelCheckbox,e.unref(t).compactListView]])]),e.createElementVNode("div",wl,[e.createElementVNode("label",bl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Compact list view"))+" ",1),e.createVNode(Ge,{class:"ms-3",on:"vf-compact-view-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])])]),e.createElementVNode("div",yl,[e.createElementVNode("div",El,[e.withDirectives(e.createElementVNode("input",{id:"persist_path",name:"persist_path",type:"checkbox","onUpdate:modelValue":S[2]||(S[2]=b=>e.unref(t).persist=b),onClick:m,class:"vuefinder__about-modal__checkbox"},null,512),[[e.vModelCheckbox,e.unref(t).persist]])]),e.createElementVNode("div",Vl,[e.createElementVNode("label",Sl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Persist path on reload"))+" ",1),e.createVNode(Ge,{class:"ms-3",on:"vf-persist-path-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])])]),e.createElementVNode("div",Nl,[e.createElementVNode("div",xl,[e.withDirectives(e.createElementVNode("input",{id:"show_thumbnails",name:"show_thumbnails",type:"checkbox","onUpdate:modelValue":S[3]||(S[3]=b=>e.unref(t).showThumbnails=b),onClick:v,class:"vuefinder__about-modal__checkbox"},null,512),[[e.vModelCheckbox,e.unref(t).showThumbnails]])]),e.createElementVNode("div",Bl,[e.createElementVNode("label",Cl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Show thumbnails"))+" ",1),e.createVNode(Ge,{class:"ms-3",on:"vf-show-thumbnails-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])])]),e.createElementVNode("div",$l,[e.createElementVNode("div",Dl,[e.createElementVNode("label",Tl,e.toDisplayString(e.unref(r)("Theme")),1)]),e.createElementVNode("div",Ml,[e.withDirectives(e.createElementVNode("select",{id:"theme","onUpdate:modelValue":S[4]||(S[4]=b=>e.unref(t).theme.value=b),onChange:S[5]||(S[5]=b=>d(b.target.value)),class:"vuefinder__about-modal__select"},[e.createElementVNode("optgroup",{label:e.unref(r)("Theme")},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(b,x)=>(e.openBlock(),e.createElementBlock("option",{value:x},e.toDisplayString(b),9,Ll))),256))],8,Al)],544),[[e.vModelSelect,e.unref(t).theme.value]]),e.createVNode(Ge,{class:"ms-3",on:"vf-theme-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])]),e.unref(t).features.includes(e.unref(Z).LANGUAGE)&&Object.keys(e.unref(w)).length>1?(e.openBlock(),e.createElementBlock("div",Ol,[e.createElementVNode("div",Fl,[e.createElementVNode("label",Rl,e.toDisplayString(e.unref(r)("Language")),1)]),e.createElementVNode("div",Hl,[e.withDirectives(e.createElementVNode("select",{id:"language","onUpdate:modelValue":S[6]||(S[6]=b=>e.unref(t).i18n.locale=b),class:"vuefinder__about-modal__select"},[e.createElementVNode("optgroup",{label:e.unref(r)("Language")},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(w),(b,x)=>(e.openBlock(),e.createElementBlock("option",{value:x},e.toDisplayString(b),9,zl))),256))],8,Il)],512),[[e.vModelSelect,e.unref(t).i18n.locale]]),e.createVNode(Ge,{class:"ms-3",on:"vf-language-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])])):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0),i.value===c.SHORTCUTS?(e.openBlock(),e.createElementBlock("div",Ul,[e.createElementVNode("div",ql,[e.createElementVNode("div",jl,[e.createElementVNode("div",null,e.toDisplayString(e.unref(r)("Rename")),1),S[8]||(S[8]=e.createElementVNode("kbd",null,"F2",-1))]),e.createElementVNode("div",Pl,[e.createElementVNode("div",null,e.toDisplayString(e.unref(r)("Refresh")),1),S[9]||(S[9]=e.createElementVNode("kbd",null,"F5",-1))]),e.createElementVNode("div",Gl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Delete"))+" ",1),S[10]||(S[10]=e.createElementVNode("kbd",null,"Del",-1))]),e.createElementVNode("div",Kl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Escape"))+" ",1),S[11]||(S[11]=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Esc")],-1))]),e.createElementVNode("div",Wl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Select All"))+" ",1),S[12]||(S[12]=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"A")],-1))]),e.createElementVNode("div",Yl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Search"))+" ",1),S[13]||(S[13]=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"F")],-1))]),e.createElementVNode("div",Xl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Toggle Sidebar"))+" ",1),S[14]||(S[14]=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"E")],-1))]),e.createElementVNode("div",Jl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Open Settings"))+" ",1),S[15]||(S[15]=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,",")],-1))]),e.createElementVNode("div",Zl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Toggle Full Screen"))+" ",1),S[16]||(S[16]=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"Enter")],-1))])])])):e.createCommentVNode("",!0),i.value===c.RESET?(e.openBlock(),e.createElementBlock("div",Ql,[e.createElementVNode("div",ea,e.toDisplayString(e.unref(r)("Reset all settings to default")),1),e.createElementVNode("button",{onClick:l,type:"button",class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(r)("Reset Settings")),1)])):e.createCommentVNode("",!0)])])]),_:1}))}},ta=["title"],$e={__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(["vuefinder__message",n.error?"vuefinder__message--error":"vuefinder__message--success"])},[e.renderSlot(f.$slots,"default"),e.createElementVNode("div",{class:"vuefinder__message__close",onClick:l,title:e.unref(r)("Close")},u[0]||(u[0]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"vuefinder__message__icon"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)]),8,ta)],2))]))}},na={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"};function oa(n,t){return e.openBlock(),e.createElementBlock("svg",na,t[0]||(t[0]=[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)]))}const Jo={render:oa},ra={class:"vuefinder__delete-modal__content"},sa={class:"vuefinder__delete-modal__form"},la={class:"vuefinder__delete-modal__description"},aa={class:"vuefinder__delete-modal__files vf-scrollbar"},ca={class:"vuefinder__delete-modal__file"},ia={key:0,class:"vuefinder__delete-modal__icon vuefinder__delete-modal__icon--dir",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},da={key:1,class:"vuefinder__delete-modal__icon",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},ua={class:"vuefinder__delete-modal__file-name"},ma={class:"vuefinder__delete-modal__warning"},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(Le,{icon:e.unref(Jo),title:e.unref(o)("Delete files")},null,8,["icon","title"]),e.createElementVNode("div",ra,[e.createElementVNode("div",sa,[e.createElementVNode("p",la,e.toDisplayString(e.unref(o)("Are you sure you want to delete these files?")),1),e.createElementVNode("div",aa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,l=>(e.openBlock(),e.createElementBlock("p",ca,[l.type==="dir"?(e.openBlock(),e.createElementBlock("svg",ia,i[2]||(i[2]=[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)]))):(e.openBlock(),e.createElementBlock("svg",da,i[3]||(i[3]=[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)]))),e.createElementVNode("span",ua,e.toDisplayString(l.basename),1)]))),256))]),r.value.length?(e.openBlock(),e.createBlock($e,{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}))}},fa={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"};function va(n,t){return e.openBlock(),e.createElementBlock("svg",fa,t[0]||(t[0]=[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)]))}const Zo={render:va},pa={class:"vuefinder__rename-modal__content"},_a={class:"vuefinder__rename-modal__item"},ha={class:"vuefinder__rename-modal__item-info"},ga={key:0,class:"vuefinder__rename-modal__icon vuefinder__rename-modal__icon--dir",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},ka={key:1,class:"vuefinder__rename-modal__icon",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},wa={class:"vuefinder__rename-modal__item-name"},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(Le,{icon:e.unref(Zo),title:e.unref(o)("Rename")},null,8,["icon","title"]),e.createElementVNode("div",pa,[e.createElementVNode("div",_a,[e.createElementVNode("p",ha,[s.value.type==="dir"?(e.openBlock(),e.createElementBlock("svg",ga,l[3]||(l[3]=[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)]))):(e.openBlock(),e.createElementBlock("svg",ka,l[4]||(l[4]=[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)]))),e.createElementVNode("span",wa,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:"vuefinder__rename-modal__input",placeholder:"Name",type:"text"},null,544),[[e.vModelText,r.value]]),c.value.length?(e.openBlock(),e.createBlock($e,{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}))}},De={ESCAPE:"Escape",F2:"F2",F5:"F5",DELETE:"Delete",ENTER:"Enter",BACKSLASH:"Backslash",KEY_A:"KeyA",KEY_E:"KeyE",KEY_F:"KeyF"};function ba(n){const t=o=>{o.code===De.ESCAPE&&(n.modal.close(),n.root.focus()),!n.modal.visible&&(n.fs.searchMode||(o.code===De.F2&&n.features.includes(Z.RENAME)&&(n.dragSelect.getCount()!==1||n.modal.open(Mn,{items:n.dragSelect.getSelected()})),o.code===De.F5&&n.emitter.emit("vf-fetch",{params:{q:"index",adapter:n.fs.adapter,path:n.fs.data.dirname}}),o.code===De.DELETE&&(!n.dragSelect.getCount()||n.modal.open(Tn,{items:n.dragSelect.getSelected()})),o.metaKey&&o.code===De.BACKSLASH&&n.modal.open(Xo),o.metaKey&&o.code===De.KEY_F&&n.features.includes(Z.SEARCH)&&(n.fs.searchMode=!0,o.preventDefault()),o.metaKey&&o.code===De.KEY_E&&(n.showTreeView=!n.showTreeView,n.storage.setStore("show-tree-view",n.showTreeView)),o.metaKey&&o.code===De.ENTER&&(n.fullScreen=!n.fullScreen,n.root.focus()),o.metaKey&&o.code===De.KEY_A&&(n.dragSelect.selectAll(),o.preventDefault())))};e.onMounted(()=>{n.root.addEventListener("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"};function Ea(n,t){return e.openBlock(),e.createElementBlock("svg",ya,t[0]||(t[0]=[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)]))}const Qo={render:Ea},Va={class:"vuefinder__new-folder-modal__content"},Sa={class:"vuefinder__new-folder-modal__form"},Na={class:"vuefinder__new-folder-modal__description"},xa=["placeholder"],er={__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(Le,{icon:e.unref(Qo),title:e.unref(o)("New Folder")},null,8,["icon","title"]),e.createElementVNode("div",Va,[e.createElementVNode("div",Sa,[e.createElementVNode("p",Na,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:"vuefinder__new-folder-modal__input",placeholder:e.unref(o)("Folder Name"),type:"text"},null,40,xa),[[e.vModelText,s.value]]),r.value.length?(e.openBlock(),e.createBlock($e,{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}))}},Ba={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"};function Ca(n,t){return e.openBlock(),e.createElementBlock("svg",Ba,t[0]||(t[0]=[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)]))}const tr={render:Ca},$a={class:"vuefinder__new-file-modal__content"},Da={class:"vuefinder__new-file-modal__form"},Ta={class:"vuefinder__new-file-modal__description"},Ma=["placeholder"],Aa={__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(Le,{icon:e.unref(tr),title:e.unref(o)("New File")},null,8,["icon","title"]),e.createElementVNode("div",$a,[e.createElementVNode("div",Da,[e.createElementVNode("p",Ta,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:"vuefinder__new-file-modal__input",placeholder:e.unref(o)("File Name"),type:"text"},null,40,Ma),[[e.vModelText,s.value]]),r.value.length?(e.openBlock(),e.createBlock($e,{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 _n(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 La={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"};function Oa(n,t){return e.openBlock(),e.createElementBlock("svg",La,t[0]||(t[0]=[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)]))}const nr={render:Oa},Fa={class:"vuefinder__upload-modal__content"},Ra={key:0,class:"pointer-events-none"},Ha={key:1,class:"pointer-events-none"},Ia=["disabled"],za=["disabled"],Ua={class:"vuefinder__upload-modal__file-list vf-scrollbar"},qa=["textContent"],ja={class:"vuefinder__upload-modal__file-info"},Pa={class:"vuefinder__upload-modal__file-name hidden md:block"},Ga={class:"vuefinder__upload-modal__file-name md:hidden"},Ka={key:0,class:"ml-auto"},Wa=["title","disabled","onClick"],Ya={key:0,class:"py-2"},Xa=["disabled"],Ja={__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),v=e.ref([]),m=e.ref(""),p=e.ref(!1),k=e.ref(!1);let w;function E(V){return v.value.findIndex(M=>M.id===V)}function T(V,M=null){M=M??(V.webkitRelativePath||V.name),w.addFile({name:M,type:V.type,data:V,source:"Local"})}function S(V){switch(V.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 b=V=>{switch(V.status){case r.DONE:return"✓";case r.ERROR:case r.CANCELED:return"!";case r.PENDING:default:return"..."}};function x(){d.value.click()}function C(){if(!p.value){if(!v.value.filter(V=>V.status!==r.DONE).length){m.value=o("Please select file to upload first.");return}m.value="",w.retryAll(),w.upload()}}function F(){w.cancelAll({reason:"user"}),v.value.forEach(V=>{V.status!==r.DONE&&(V.status=r.CANCELED,V.statusName=o("Canceled"))}),p.value=!1}function B(V){p.value||(w.removeFile(V.id,"removed-by-user"),v.value.splice(E(V.id),1))}function h(V){if(!p.value){if(w.cancelAll({reason:"user"}),V){const M=[];v.value.forEach(g=>{g.status!==r.DONE&&M.push(g)}),v.value=[],M.forEach(g=>{T(g.originalFile,g.name)});return}v.value.splice(0)}}function _(){t.modal.close()}function y(){return t.requester.transformRequestParams({url:"",method:"post",params:{q:"upload",adapter:t.fs.adapter,path:t.fs.data.dirname}})}return e.onMounted(async()=>{w=new Sr({debug:t.debug,restrictions:{maxFileSize:Or(t.maxFileSize)},locale:s,onBeforeFileAdded(g,L){if(L[g.id]!=null){const j=E(g.id);v.value[j].status===r.PENDING&&(m.value=w.i18n("noDuplicates",{fileName:g.name})),v.value=v.value.filter(K=>K.id!==g.id)}return v.value.push({id:g.id,name:g.name,size:t.filesize(g.size),status:r.PENDING,statusName:o("Pending upload"),percent:null,originalFile:g.data}),!0}}),w.use(Nr,{endpoint:"WILL_BE_REPLACED_BEFORE_UPLOAD",limit:5,timeout:0,getResponseError(g,L){let O;try{O=JSON.parse(g).message}catch{O=o("Cannot parse server response.")}return new Error(O)}}),w.on("restriction-failed",(g,L)=>{const O=v.value[E(g.id)];B(O),m.value=L.message}),w.on("upload",()=>{const g=y();w.setMeta({...g.body});const L=w.getPlugin("XHRUpload");L.opts.method=g.method,L.opts.endpoint=g.url+"?"+new URLSearchParams(g.params),L.opts.headers=g.headers,delete g.headers["Content-Type"],p.value=!0,v.value.forEach(O=>{O.status!==r.DONE&&(O.percent=null,O.status=r.UPLOADING,O.statusName=o("Pending upload"))})}),w.on("upload-progress",(g,L)=>{const O=Math.floor(L.bytesUploaded/L.bytesTotal*100);v.value[E(g.id)].percent=`${O}%`}),w.on("upload-success",g=>{const L=v.value[E(g.id)];L.status=r.DONE,L.statusName=o("Done")}),w.on("upload-error",(g,L)=>{const O=v.value[E(g.id)];O.percent=null,O.status=r.ERROR,L.isNetworkError?O.statusName=o("Network Error, Unable establish connection to the server or interrupted."):O.statusName=L?L.message:o("Unknown Error")}),w.on("error",g=>{m.value=g.message,p.value=!1,t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.data.dirname},noCloseModal:!0})}),w.on("complete",()=>{p.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",g=>{g.preventDefault(),k.value=!0}),u.value.addEventListener("dragleave",g=>{g.preventDefault(),k.value=!1});function V(g,L){L.isFile&&L.file(O=>g(L,O)),L.isDirectory&&L.createReader().readEntries(O=>{O.forEach(j=>{V(g,j)})})}u.value.addEventListener("drop",g=>{g.preventDefault(),k.value=!1;const L=/^[/\\](.+)/;[...g.dataTransfer.items].forEach(O=>{O.kind==="file"&&V((j,K)=>{const G=L.exec(j.fullPath);T(K,G[1])},O.webkitGetAsEntry())})});const M=({target:g})=>{const L=g.files;for(const O of L)T(O);g.value=""};i.value.addEventListener("change",M),l.value.addEventListener("change",M)}),e.onBeforeUnmount(()=>{w==null||w.close({reason:"unmount"})}),(V,M)=>(e.openBlock(),e.createBlock(Ce,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"vf-btn vf-btn-primary",disabled:p.value,onClick:e.withModifiers(C,["prevent"])},e.toDisplayString(e.unref(o)("Upload")),9,Xa),p.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"vf-btn vf-btn-secondary",onClick:e.withModifiers(F,["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(_,["prevent"])},e.toDisplayString(e.unref(o)("Close")),1))]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(Le,{icon:e.unref(nr),title:e.unref(o)("Upload Files")},null,8,["icon","title"]),e.createElementVNode("div",Fa,[e.createElementVNode("div",{class:"vuefinder__upload-modal__drop-area",ref_key:"dropArea",ref:u,onClick:x},[k.value?(e.openBlock(),e.createElementBlock("div",Ra,e.toDisplayString(e.unref(o)("Release to drop these files.")),1)):(e.openBlock(),e.createElementBlock("div",Ha,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:"vuefinder__upload-modal__buttons"},[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:p.value,onClick:M[0]||(M[0]=g=>h(!1))},e.toDisplayString(e.unref(o)("Clear all")),9,Ia),e.createElementVNode("button",{type:"button",class:"vf-btn vf-btn-secondary",disabled:p.value,onClick:M[1]||(M[1]=g=>h(!0))},e.toDisplayString(e.unref(o)("Clear only successful")),9,za)],512),e.createElementVNode("div",Ua,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,g=>(e.openBlock(),e.createElementBlock("div",{class:"vuefinder__upload-modal__file-entry",key:g.id},[e.createElementVNode("span",{class:e.normalizeClass(["vuefinder__upload-modal__file-icon",S(g)])},[e.createElementVNode("span",{class:"vuefinder__upload-modal__file-icon-text",textContent:e.toDisplayString(b(g))},null,8,qa)],2),e.createElementVNode("div",ja,[e.createElementVNode("div",Pa,e.toDisplayString(e.unref(_n)(g.name,40))+" ("+e.toDisplayString(g.size)+")",1),e.createElementVNode("div",Ga,e.toDisplayString(e.unref(_n)(g.name,16))+" ("+e.toDisplayString(g.size)+")",1),e.createElementVNode("div",{class:e.normalizeClass(["vuefinder__upload-modal__file-status",S(g)])},[e.createTextVNode(e.toDisplayString(g.statusName)+" ",1),g.status===c.value.QUEUE_ENTRY_STATUS.UPLOADING?(e.openBlock(),e.createElementBlock("b",Ka,e.toDisplayString(g.percent),1)):e.createCommentVNode("",!0)],2)]),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["vuefinder__upload-modal__file-remove",p.value?"disabled":""]),title:e.unref(o)("Delete"),disabled:p.value,onClick:L=>B(g)},M[3]||(M[3]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"vuefinder__upload-modal__file-remove-icon"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)]),10,Wa)]))),128)),v.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ya,e.toDisplayString(e.unref(o)("No files selected!")),1))]),m.value.length?(e.openBlock(),e.createBlock($e,{key:0,onHidden:M[2]||(M[2]=g=>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}))}},Za={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"};function Qa(n,t){return e.openBlock(),e.createElementBlock("svg",Za,t[0]||(t[0]=[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)]))}const or={render:Qa},ec={class:"vuefinder__unarchive-modal__content"},tc={class:"vuefinder__unarchive-modal__items"},nc={class:"vuefinder__unarchive-modal__item"},oc={key:0,class:"vuefinder__unarchive-modal__icon vuefinder__unarchive-modal__icon--dir",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},rc={key:1,class:"vuefinder__unarchive-modal__icon vuefinder__unarchive-modal__icon--file",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},sc={class:"vuefinder__unarchive-modal__item-name"},lc={class:"vuefinder__unarchive-modal__info"},rr={__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(Le,{icon:e.unref(or),title:e.unref(o)("Unarchive")},null,8,["icon","title"]),e.createElementVNode("div",ec,[e.createElementVNode("div",tc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,d=>(e.openBlock(),e.createElementBlock("p",nc,[d.type==="dir"?(e.openBlock(),e.createElementBlock("svg",oc,l[2]||(l[2]=[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)]))):(e.openBlock(),e.createElementBlock("svg",rc,l[3]||(l[3]=[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)]))),e.createElementVNode("span",sc,e.toDisplayString(d.basename),1)]))),256)),e.createElementVNode("p",lc,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($e,{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}))}},ac={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"};function cc(n,t){return e.openBlock(),e.createElementBlock("svg",ac,t[0]||(t[0]=[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)]))}const sr={render:cc},ic={class:"vuefinder__archive-modal__content"},dc={class:"vuefinder__archive-modal__form"},uc={class:"vuefinder__archive-modal__files vf-scrollbar"},mc={class:"vuefinder__archive-modal__file"},fc={key:0,class:"vuefinder__archive-modal__icon vuefinder__archive-modal__icon--dir",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},vc={key:1,class:"vuefinder__archive-modal__icon",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},pc={class:"vuefinder__archive-modal__file-name"},_c=["placeholder"],lr={__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(Le,{icon:e.unref(sr),title:e.unref(o)("Archive the files")},null,8,["icon","title"]),e.createElementVNode("div",ic,[e.createElementVNode("div",dc,[e.createElementVNode("div",uc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,d=>(e.openBlock(),e.createElementBlock("p",mc,[d.type==="dir"?(e.openBlock(),e.createElementBlock("svg",fc,l[3]||(l[3]=[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)]))):(e.openBlock(),e.createElementBlock("svg",vc,l[4]||(l[4]=[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)]))),e.createElementVNode("span",pc,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:"vuefinder__archive-modal__input",placeholder:e.unref(o)("Archive name. (.zip file will be created)"),type:"text"},null,40,_c),[[e.vModelText,s.value]]),r.value.length?(e.openBlock(),e.createBlock($e,{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}))}},hc={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"};function gc(n,t){return e.openBlock(),e.createElementBlock("svg",hc,t[0]||(t[0]=[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),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)]))}const An={render:gc},kc={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"};function wc(n,t){return e.openBlock(),e.createElementBlock("svg",kc,t[0]||(t[0]=[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)]))}const bc={render:wc},yc={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"};function Ec(n,t){return e.openBlock(),e.createElementBlock("svg",yc,t[0]||(t[0]=[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)]))}const Vc={render:Ec},Sc={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"};function Nc(n,t){return e.openBlock(),e.createElementBlock("svg",Sc,t[0]||(t[0]=[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)]))}const xc={render:Nc},Bc={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"};function Cc(n,t){return e.openBlock(),e.createElementBlock("svg",Bc,t[0]||(t[0]=[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)]))}const $c={render:Cc},Dc={class:"vuefinder__toolbar"},Tc={key:0,class:"vuefinder__toolbar__actions"},Mc=["title"],Ac=["title"],Lc=["title"],Oc=["title"],Fc=["title"],Rc=["title"],Hc=["title"],Ic={key:1,class:"vuefinder__toolbar__search-results"},zc={class:"pl-2"},Uc={class:"dark:bg-gray-700 bg-gray-200 text-xs px-2 py-1 rounded"},qc={class:"vuefinder__toolbar__controls"},jc=["title"],Pc=["title"],Gc={__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",Dc,[c.value.length?(e.openBlock(),e.createElementBlock("div",Ic,[e.createElementVNode("div",zc,[e.createTextVNode(e.toDisplayString(e.unref(s)("Search results for"))+" ",1),e.createElementVNode("span",Uc,e.toDisplayString(c.value),1)]),e.unref(t).loadingIndicator==="circular"&&e.unref(t).fs.loading?(e.openBlock(),e.createBlock(e.unref(An),{key:0})):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",Tc,[e.unref(t).features.includes(e.unref(Z).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(er,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(Qo))],8,Mc)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(Z).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(Aa,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(tr))],8,Ac)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(Z).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(Zo),{class:e.normalizeClass(e.unref(r).getCount()===1?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,Lc)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(Z).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(Jo),{class:e.normalizeClass(e.unref(r).getCount()?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,Oc)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(Z).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(Ja,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(nr))],8,Fc)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(Z).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(rr,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(or),{class:e.normalizeClass(e.unref(r).getCount()?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,Rc)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(Z).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(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,Hc)):e.createCommentVNode("",!0)])),e.createElementVNode("div",qc,[e.unref(t).features.includes(e.unref(Z).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(Vc),{key:0})):(e.openBlock(),e.createBlock(e.unref(bc),{key:1}))],8,jc)):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(xc),{key:0,class:e.normalizeClass(["vf-toolbar-icon",c.value.length?"vf-toolbar-icon-disabled":""])},null,8,["class"])):e.createCommentVNode("",!0),e.unref(t).view==="list"?(e.openBlock(),e.createBlock(e.unref($c),{key:1,class:e.normalizeClass(["vf-toolbar-icon",c.value.length?"vf-toolbar-icon-disabled":""])},null,8,["class"])):e.createCommentVNode("",!0)],8,Pc)])]))}},Kc=(n,t=0,o=!1)=>{let s;return(...r)=>{o&&!s&&n(...r),clearTimeout(s),s=setTimeout(()=>{n(...r)},t)}},oo=(n,t,o)=>{const s=e.ref(n);return e.customRef((r,c)=>({get(){return r(),s.value},set:Kc(a=>{s.value=a,c()},t,o)}))},Wc={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"};function Yc(n,t){return e.openBlock(),e.createElementBlock("svg",Wc,t[0]||(t[0]=[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)]))}const Xc={render:Yc},Jc={class:"vuefinder__move-modal__content"},Zc={class:"vuefinder__move-modal__description"},Qc={class:"vuefinder__move-modal__files vf-scrollbar"},ei={class:"vuefinder__move-modal__file"},ti={key:0,class:"vuefinder__move-modal__icon vuefinder__move-modal__icon--dir",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},ni={key:1,class:"vuefinder__move-modal__icon",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},oi={class:"vuefinder__move-modal__file-name"},ri={class:"vuefinder__move-modal__target-title"},si={class:"vuefinder__move-modal__target-directory"},li={class:"vuefinder__move-modal__target-path"},ai={class:"vuefinder__move-modal__selected-items"},hn={__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",ai,e.toDisplayString(e.unref(o)("%s item(s) selected.",s.value.length)),1)]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(Le,{icon:e.unref(Xc),title:e.unref(o)("Move files")},null,8,["icon","title"]),e.createElementVNode("div",Jc,[e.createElementVNode("p",Zc,e.toDisplayString(e.unref(o)("Are you sure you want to move these files?")),1),e.createElementVNode("div",Qc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,l=>(e.openBlock(),e.createElementBlock("div",ei,[e.createElementVNode("div",null,[l.type==="dir"?(e.openBlock(),e.createElementBlock("svg",ti,i[2]||(i[2]=[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)]))):(e.openBlock(),e.createElementBlock("svg",ni,i[3]||(i[3]=[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)])))]),e.createElementVNode("div",oi,e.toDisplayString(l.path),1)]))),256))]),e.createElementVNode("h4",ri,e.toDisplayString(e.unref(o)("Target Directory")),1),e.createElementVNode("p",si,[i[4]||(i[4]=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"vuefinder__move-modal__icon vuefinder__move-modal__icon--dir",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)),e.createElementVNode("span",li,e.toDisplayString(e.unref(t).modal.data.items.to.path),1)]),r.value.length?(e.openBlock(),e.createBlock($e,{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}))}},ci={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"};function ii(n,t){return e.openBlock(),e.createElementBlock("svg",ci,t[0]||(t[0]=[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)]))}const di={render:ii},ui={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-6 w-6 p-0.5 rounded",viewBox:"0 0 20 20"};function mi(n,t){return e.openBlock(),e.createElementBlock("svg",ui,t[0]||(t[0]=[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)]))}const fi={render:mi},vi={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"};function pi(n,t){return e.openBlock(),e.createElementBlock("svg",vi,t[0]||(t[0]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"},null,-1)]))}const _i={render:pi},hi={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"};function gi(n,t){return e.openBlock(),e.createElementBlock("svg",hi,t[0]||(t[0]=[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)]))}const ki={render:gi},wi={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"};function bi(n,t){return e.openBlock(),e.createElementBlock("svg",wi,t[0]||(t[0]=[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)]))}const yi={render:bi},Ei={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"};function Vi(n,t){return e.openBlock(),e.createElementBlock("svg",Ei,t[0]||(t[0]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"},null,-1)]))}const Si={render:Vi},Ni={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"};function xi(n,t){return e.openBlock(),e.createElementBlock("svg",Ni,t[0]||(t[0]=[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)]))}const zt={render:xi},Bi={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"};function Ci(n,t){return e.openBlock(),e.createElementBlock("svg",Bi,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),e.createElementVNode("path",{d:"M9 6h11M12 12h8M15 18h5M5 6v.01M8 12v.01M11 18v.01"},null,-1)]))}const $i={render:Ci},Di={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"};function Ti(n,t){return e.openBlock(),e.createElementBlock("svg",Di,t[0]||(t[0]=[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)]))}const Mi={render:Ti},Ai={class:"vuefinder__breadcrumb__container"},Li=["title"],Oi=["title"],Fi=["title"],Ri=["title"],Hi={class:"vuefinder__breadcrumb__list"},Ii={key:0,class:"vuefinder__breadcrumb__hidden-list"},zi={class:"relative"},Ui=["onDragover","onDragleave","onDrop","title","onClick"],qi={class:"vuefinder__breadcrumb__search-mode"},ji=["placeholder"],Pi={class:"vuefinder__breadcrumb__hidden-dropdown"},Gi=["onDrop","onClick"],Ki={class:"vuefinder__breadcrumb__hidden-item-content"},Wi={class:"vuefinder__breadcrumb__hidden-item-text"},Yi={__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=oo(0,100);e.watch(a,B=>{const h=c.value.children;let _=0,y=0,V=5,M=1;t.fs.limitBreadcrumbItems(V),e.nextTick(()=>{for(let g=h.length-1;g>=0&&!(_+h[g].offsetWidth>a.value-40);g--)_+=parseInt(h[g].offsetWidth,10),y++;yV&&(y=V),t.fs.limitBreadcrumbItems(y)})});const i=()=>{a.value=c.value.offsetWidth};let l=e.ref(null);e.onMounted(()=>{l.value=new ResizeObserver(i),l.value.observe(c.value)}),e.onUnmounted(()=>{l.value.disconnect()});const d=(B,h=null)=>{B.preventDefault(),s.isDraggingRef.value=!1,v(B),h??(h=t.fs.hiddenBreadcrumbs.length-1);let _=JSON.parse(B.dataTransfer.getData("items"));if(_.find(y=>y.storage!==t.fs.adapter)){alert("Moving items between different storages is not supported yet.");return}t.modal.open(hn,{items:{from:_,to:t.fs.hiddenBreadcrumbs[h]??{path:t.fs.adapter+"://"}}})},f=(B,h=null)=>{B.preventDefault(),s.isDraggingRef.value=!1,v(B),h??(h=t.fs.breadcrumbs.length-2);let _=JSON.parse(B.dataTransfer.getData("items"));if(_.find(y=>y.storage!==t.fs.adapter)){alert("Moving items between different storages is not supported yet.");return}t.modal.open(hn,{items:{from:_,to:t.fs.breadcrumbs[h]??{path:t.fs.adapter+"://"}}})},u=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")},v=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")},m=()=>{C(),t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.data.dirname}})},p=()=>{C(),!t.fs.isGoUpAvailable()||t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.parentFolderPath}})},k=B=>{t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:B.path}}),t.fs.toggleHiddenBreadcrumbs(!1)},w=()=>{t.fs.showHiddenBreadcrumbs&&t.fs.toggleHiddenBreadcrumbs(!1)},E={mounted(B,h,_,y){B.clickOutsideEvent=function(V){B===V.target||B.contains(V.target)||h.value()},document.body.addEventListener("click",B.clickOutsideEvent)},beforeUnmount(B,h,_,y){document.body.removeEventListener("click",B.clickOutsideEvent)}},T=()=>{t.showTreeView=!t.showTreeView};e.watch(()=>t.showTreeView,(B,h)=>{B!==h&&r("show-tree-view",B)});const S=e.ref(null),b=()=>{t.features.includes(Z.SEARCH)&&(t.fs.searchMode=!0,e.nextTick(()=>S.value.focus()))},x=oo("",400);e.watch(x,B=>{t.emitter.emit("vf-toast-clear"),t.emitter.emit("vf-search-query",{newQuery:B})}),e.watch(()=>t.fs.searchMode,B=>{B&&e.nextTick(()=>S.value.focus())});const C=()=>{t.fs.searchMode=!1,x.value=""};t.emitter.on("vf-search-exit",()=>{C()});const F=()=>{x.value===""&&C()};return(B,h)=>(e.openBlock(),e.createElementBlock("div",Ai,[e.createElementVNode("span",{title:e.unref(o)("Toggle Tree View")},[e.createVNode(e.unref($i),{onClick:T,class:e.normalizeClass(["vuefinder__breadcrumb__toggle-tree",e.unref(t).showTreeView?"vuefinder__breadcrumb__toggle-tree--active":""])},null,8,["class"])],8,Li),e.createElementVNode("span",{title:e.unref(o)("Go up a directory")},[e.createVNode(e.unref(fi),{onDragover:h[0]||(h[0]=_=>u(_)),onDragleave:h[1]||(h[1]=_=>v(_)),onDrop:h[2]||(h[2]=_=>f(_)),onClick:p,class:e.normalizeClass(e.unref(t).fs.isGoUpAvailable()?"vuefinder__breadcrumb__go-up--active":"vuefinder__breadcrumb__go-up--inactive")},null,8,["class"])],8,Oi),e.unref(t).fs.loading?(e.openBlock(),e.createElementBlock("span",{key:1,title:e.unref(o)("Cancel")},[e.createVNode(e.unref(_i),{onClick:h[3]||(h[3]=_=>e.unref(t).emitter.emit("vf-fetch-abort"))})],8,Ri)):(e.openBlock(),e.createElementBlock("span",{key:0,title:e.unref(o)("Refresh")},[e.createVNode(e.unref(di),{onClick:m})],8,Fi)),e.withDirectives(e.createElementVNode("div",{onClick:e.withModifiers(b,["self"]),class:"group vuefinder__breadcrumb__search-container"},[e.createElementVNode("div",null,[e.createVNode(e.unref(ki),{onDragover:h[4]||(h[4]=_=>u(_)),onDragleave:h[5]||(h[5]=_=>v(_)),onDrop:h[6]||(h[6]=_=>f(_,-1)),onClick:h[7]||(h[7]=_=>e.unref(t).emitter.emit("vf-fetch",{params:{q:"index",adapter:e.unref(t).fs.adapter}}))})]),e.createElementVNode("div",Hi,[e.unref(t).fs.hiddenBreadcrumbs.length?e.withDirectives((e.openBlock(),e.createElementBlock("div",Ii,[h[13]||(h[13]=e.createElementVNode("div",{class:"vuefinder__breadcrumb__separator"},"/",-1)),e.createElementVNode("div",zi,[e.createElementVNode("span",{onDragenter:h[8]||(h[8]=_=>e.unref(t).fs.toggleHiddenBreadcrumbs(!0)),onClick:h[9]||(h[9]=_=>e.unref(t).fs.toggleHiddenBreadcrumbs()),class:"vuefinder__breadcrumb__hidden-toggle"},[e.createVNode(e.unref(Mi),{class:"vuefinder__breadcrumb__hidden-toggle-icon"})],32)])])),[[E,w]]):e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"breadcrumbContainer",ref:c,class:"vuefinder__breadcrumb__visible-list",onClick:e.withModifiers(b,["self"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).fs.breadcrumbs,(_,y)=>(e.openBlock(),e.createElementBlock("div",{key:y},[h[14]||(h[14]=e.createElementVNode("span",{class:"vuefinder__breadcrumb__separator"},"/",-1)),e.createElementVNode("span",{onDragover:V=>y===e.unref(t).fs.breadcrumbs.length-1||u(V),onDragleave:V=>y===e.unref(t).fs.breadcrumbs.length-1||v(V),onDrop:V=>y===e.unref(t).fs.breadcrumbs.length-1||f(V,y),class:"vuefinder__breadcrumb__item",title:_.basename,onClick:V=>e.unref(t).emitter.emit("vf-fetch",{params:{q:"index",adapter:e.unref(t).fs.adapter,path:_.path}})},e.toDisplayString(_.name),41,Ui)]))),128))],512),e.unref(t).loadingIndicator==="circular"&&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",qi,[e.createElementVNode("div",null,[e.createVNode(e.unref(yi))]),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:S,onKeydown:e.withKeys(C,["esc"]),onBlur:F,"onUpdate:modelValue":h[10]||(h[10]=_=>e.isRef(x)?x.value=_:null),placeholder:e.unref(o)("Search anything.."),class:"vuefinder__breadcrumb__search-input",type:"text"},null,40,ji),[[e.vModelText,e.unref(x)]]),e.createVNode(e.unref(Si),{onClick:C})],512),[[e.vShow,e.unref(t).fs.searchMode]]),e.withDirectives(e.createElementVNode("div",Pi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).fs.hiddenBreadcrumbs,(_,y)=>(e.openBlock(),e.createElementBlock("div",{key:y,onDragover:h[11]||(h[11]=V=>u(V)),onDragleave:h[12]||(h[12]=V=>v(V)),onDrop:V=>d(V,y),onClick:V=>k(_),class:"vuefinder__breadcrumb__hidden-item"},[e.createElementVNode("div",Ki,[e.createElementVNode("span",null,[e.createVNode(e.unref(zt),{class:"vuefinder__breadcrumb__hidden-item-icon"})]),h[15]||(h[15]=e.createTextVNode()),e.createElementVNode("span",Wi,e.toDisplayString(_.name),1)])],40,Gi))),128))],512),[[e.vShow,e.unref(t).fs.showHiddenBreadcrumbs]])]))}},ar=(n,t=null)=>new Date(n*1e3).toLocaleString(t??navigator.language??"en-US"),Xi=["onClick"],Ji={__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(["vuefinder__toast",s.value.value?"vuefinder__toast--fixed":"vuefinder__toast--absolute"])},[e.createVNode(e.TransitionGroup,{name:"vuefinder__toast-item","enter-active-class":"vuefinder__toast-item--enter-active","leave-active-class":"vuefinder__toast-item--leave-active","leave-to-class":"vuefinder__toast-item--leave-to"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(f,u)=>(e.openBlock(),e.createElementBlock("div",{key:u,onClick:v=>a(u),class:e.normalizeClass(["vuefinder__toast__message",c(f.type)])},e.toDisplayString(f.label),11,Xi))),128))]),_:1})],2))}},Zi={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-5 w-5",viewBox:"0 0 20 20"};function Qi(n,t){return e.openBlock(),e.createElementBlock("svg",Zi,t[0]||(t[0]=[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)]))}const ed={render:Qi},td={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-5 w-5",viewBox:"0 0 20 20"};function nd(n,t){return e.openBlock(),e.createElementBlock("svg",td,t[0]||(t[0]=[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)]))}const od={render:nd},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(ed),{key:0})):e.createCommentVNode("",!0),n.direction==="desc"?(e.openBlock(),e.createBlock(e.unref(od),{key:1})):e.createCommentVNode("",!0)]))}},rd={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",class:"text-neutral-500",viewBox:"0 0 24 24"};function sd(n,t){return e.openBlock(),e.createElementBlock("svg",rd,t[0]||(t[0]=[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)]))}const ld={render:sd},ad={class:"vuefinder__item-icon"},Zt={__name:"ItemIcon",props:{type:{type:String,required:!0},small:{type:Boolean,default:!1}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("span",ad,[n.type==="dir"?(e.openBlock(),e.createBlock(e.unref(zt),{key:0,class:e.normalizeClass(n.small?"vuefinder__item-icon--small":"vuefinder__item-icon--large")},null,8,["class"])):(e.openBlock(),e.createBlock(e.unref(ld),{key:1,class:e.normalizeClass(n.small?"vuefinder__item-icon--small":"vuefinder__item-icon--large")},null,8,["class"]))]))}},cd={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"};function id(n,t){return e.openBlock(),e.createElementBlock("svg",cd,t[0]||(t[0]=[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)]))}const dd={render:id},ud={class:"vuefinder__drag-item__container"},md={class:"vuefinder__drag-item__count"},fd={__name:"DragItem",props:{count:{type:Number,default:0}},setup(n){const t=n;return(o,s)=>(e.openBlock(),e.createElementBlock("div",ud,[e.createVNode(e.unref(dd)),e.createElementVNode("div",md,e.toDisplayString(t.count),1)]))}},vd={class:"vuefinder__text-preview"},pd={class:"vuefinder__text-preview__header"},_d=["title"],hd={class:"vuefinder__text-preview__actions"},gd={key:0,class:"vuefinder__text-preview__content"},kd={key:1},wd={__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},v=()=>{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,p)=>(e.openBlock(),e.createElementBlock("div",vd,[e.createElementVNode("div",pd,[e.createElementVNode("div",{class:"vuefinder__text-preview__title",id:"modal-title",title:e.unref(d).modal.data.item.path},e.toDisplayString(e.unref(d).modal.data.item.basename),9,_d),e.createElementVNode("div",hd,[a.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:v,class:"vuefinder__text-preview__save-button"},e.toDisplayString(e.unref(f)("Save")),1)):e.createCommentVNode("",!0),e.unref(d).features.includes(e.unref(Z).EDIT)?(e.openBlock(),e.createElementBlock("button",{key:1,class:"vuefinder__text-preview__edit-button",onClick:p[0]||(p[0]=k=>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",kd,[e.withDirectives(e.createElementVNode("textarea",{ref_key:"editInput",ref:c,"onUpdate:modelValue":p[1]||(p[1]=k=>r.value=k),class:"vuefinder__text-preview__textarea",name:"text",cols:"30",rows:"10"},null,512),[[e.vModelText,r.value]])])):(e.openBlock(),e.createElementBlock("pre",gd,e.toDisplayString(s.value),1)),i.value.length?(e.openBlock(),e.createBlock($e,{key:2,onHidden:p[2]||(p[2]=k=>i.value=""),error:l.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value),1)]),_:1},8,["error"])):e.createCommentVNode("",!0)])]))}},bd={class:"vuefinder__image-preview"},yd={class:"vuefinder__image-preview__header"},Ed=["title"],Vd={class:"vuefinder__image-preview__actions"},Sd={class:"vuefinder__image-preview__image-container"},Nd=["src"],xd={__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(v){}}):a.value.destroy()},u=()=>{a.value.getCroppedCanvas({width:795,height:341}).toBlob(v=>{l.value="",d.value=!1;const m=new FormData;m.set("file",v),s.requester.send({url:"",method:"post",params:{q:"upload",adapter:s.modal.data.adapter,path:s.modal.data.item.path},body:m}).then(p=>{l.value=r("Updated."),c.value.src=s.requester.getPreviewUrl(s.modal.data.adapter,s.modal.data.item),f(),o("success")}).catch(p=>{l.value=r(p.message),d.value=!0})})};return e.onMounted(()=>{o("success")}),(v,m)=>(e.openBlock(),e.createElementBlock("div",bd,[e.createElementVNode("div",yd,[e.createElementVNode("h3",{class:"vuefinder__image-preview__title",id:"modal-title",title:e.unref(s).modal.data.item.path},e.toDisplayString(e.unref(s).modal.data.item.basename),9,Ed),e.createElementVNode("div",Vd,[i.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:u,class:"vuefinder__image-preview__crop-button"},e.toDisplayString(e.unref(r)("Crop")),1)):e.createCommentVNode("",!0),e.unref(s).features.includes(e.unref(Z).EDIT)?(e.openBlock(),e.createElementBlock("button",{key:1,class:"vuefinder__image-preview__edit-button",onClick:m[0]||(m[0]=p=>f())},e.toDisplayString(i.value?e.unref(r)("Cancel"):e.unref(r)("Edit")),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Sd,[e.createElementVNode("img",{ref_key:"image",ref:c,class:"vuefinder__image-preview__image",src:e.unref(s).requester.getPreviewUrl(e.unref(s).modal.data.adapter,e.unref(s).modal.data.item),alt:""},null,8,Nd)]),l.value.length?(e.openBlock(),e.createBlock($e,{key:0,onHidden:m[1]||(m[1]=p=>l.value=""),error:d.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value),1)]),_:1},8,["error"])):e.createCommentVNode("",!0)]))}},Bd={class:"vuefinder__default-preview"},Cd={class:"vuefinder__default-preview__header"},$d=["title"],Dd={__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("div",Bd,[e.createElementVNode("div",Cd,[e.createElementVNode("h3",{class:"vuefinder__default-preview__title",id:"modal-title",title:e.unref(o).modal.data.item.path},e.toDisplayString(e.unref(o).modal.data.item.basename),9,$d)]),c[0]||(c[0]=e.createElementVNode("div",null,null,-1))]))}},Td={class:"vuefinder__video-preview"},Md=["title"],Ad={class:"vuefinder__video-preview__video",preload:"",controls:""},Ld=["src"],Od={__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",Td,[e.createElementVNode("h3",{class:"vuefinder__video-preview__title",id:"modal-title",title:e.unref(o).modal.data.item.path},e.toDisplayString(e.unref(o).modal.data.item.basename),9,Md),e.createElementVNode("div",null,[e.createElementVNode("video",Ad,[e.createElementVNode("source",{src:r(),type:"video/mp4"},null,8,Ld),a[0]||(a[0]=e.createTextVNode(" Your browser does not support the video tag. "))])])]))}},Fd={class:"vuefinder__audio-preview"},Rd=["title"],Hd={class:"vuefinder__audio-preview__audio",controls:""},Id=["src"],zd={__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("div",Fd,[e.createElementVNode("h3",{class:"vuefinder__audio-preview__title",id:"modal-title",title:e.unref(s).modal.data.item.path},e.toDisplayString(e.unref(s).modal.data.item.basename),9,Rd),e.createElementVNode("div",null,[e.createElementVNode("audio",Hd,[e.createElementVNode("source",{src:r(),type:"audio/mpeg"},null,8,Id),a[0]||(a[0]=e.createTextVNode(" Your browser does not support the audio element. "))])])]))}},Ud={class:"vuefinder__pdf-preview"},qd=["title"],jd=["data"],Pd=["src"],Gd={__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("div",Ud,[e.createElementVNode("h3",{class:"vuefinder__pdf-preview__title",id:"modal-title",title:e.unref(o).modal.data.item.path},e.toDisplayString(e.unref(o).modal.data.item.basename),9,qd),e.createElementVNode("div",null,[e.createElementVNode("object",{class:"vuefinder__pdf-preview__object",data:r(),type:"application/pdf",width:"100%",height:"100%"},[e.createElementVNode("iframe",{class:"vuefinder__pdf-preview__iframe",src:r(),width:"100%",height:"100%"}," Your browser does not support PDFs ",8,Pd)],8,jd)])]))}},Kd={class:"vuefinder__preview-modal__content"},Wd={key:0},Yd={class:"vuefinder__preview-modal__loading"},Xd={key:0,class:"vuefinder__preview-modal__loading-indicator"},Jd={class:"vuefinder__preview-modal__details"},Zd={class:"font-bold"},Qd={class:"font-bold pl-2"},eu={key:0,class:"vuefinder__preview-modal__note"},tu=["download","href"],cr={__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(Z.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(Z).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,tu)):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("div",Kd,[e.unref(c)?(e.openBlock(),e.createElementBlock("div",Wd,[r("text")?(e.openBlock(),e.createBlock(wd,{key:0,onSuccess:i[0]||(i[0]=l=>s.value=!0)})):r("image")?(e.openBlock(),e.createBlock(xd,{key:1,onSuccess:i[1]||(i[1]=l=>s.value=!0)})):r("video")?(e.openBlock(),e.createBlock(Od,{key:2,onSuccess:i[2]||(i[2]=l=>s.value=!0)})):r("audio")?(e.openBlock(),e.createBlock(zd,{key:3,onSuccess:i[3]||(i[3]=l=>s.value=!0)})):r("application/pdf")?(e.openBlock(),e.createBlock(Gd,{key:4,onSuccess:i[4]||(i[4]=l=>s.value=!0)})):(e.openBlock(),e.createBlock(Dd,{key:5,onSuccess:i[5]||(i[5]=l=>s.value=!0)}))])):e.createCommentVNode("",!0),e.createElementVNode("div",Yd,[s.value===!1?(e.openBlock(),e.createElementBlock("div",Xd,[i[7]||(i[7]=e.createElementVNode("svg",{class:"vuefinder__preview-modal__spinner",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e.createElementVNode("circle",{class:"vuefinder__preview-modal__spinner-circle",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e.createElementVNode("path",{class:"vuefinder__preview-modal__spinner-path",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)),e.createElementVNode("span",null,e.toDisplayString(e.unref(o)("Loading")),1)])):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",Jd,[e.createElementVNode("div",null,[e.createElementVNode("span",Zd,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",Qd,e.toDisplayString(e.unref(o)("Last Modified"))+": ",1),e.createTextVNode(" "+e.toDisplayString(e.unref(ar)(e.unref(t).modal.data.item.last_modified)),1)])]),e.unref(t).features.includes(e.unref(Z).DOWNLOAD)?(e.openBlock(),e.createElementBlock("div",eu,[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}))}},nu={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"};function ou(n,t){return e.openBlock(),e.createElementBlock("svg",nu,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),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)]))}const ir={render:ou},ru=["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(cr,{adapter:t.fs.adapter,item:m})},c={mounted(m,p,k,w){k.props.draggable&&(m.addEventListener("dragstart",E=>a(E,p.value)),m.addEventListener("dragover",E=>l(E,p.value)),m.addEventListener("drop",E=>i(E,p.value)))},beforeUnmount(m,p,k,w){k.props.draggable&&(m.removeEventListener("dragstart",a),m.removeEventListener("dragover",l),m.removeEventListener("drop",i))}},a=(m,p)=>{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,p)=>{m.preventDefault(),o.isDraggingRef.value=!1;let k=JSON.parse(m.dataTransfer.getData("items"));if(k.find(w=>w.storage!==t.fs.adapter)){alert("Moving items between different storages is not supported yet.");return}t.modal.open(hn,{items:{from:k,to:p}})},l=(m,p)=>{m.preventDefault(),!p||p.type!=="dir"||o.getSelection().find(k=>k===m.currentTarget)?(m.dataTransfer.dropEffect="none",m.dataTransfer.effectAllowed="none"):m.dataTransfer.dropEffect="copy"};let d=null,f=!1;const u=()=>{d&&clearTimeout(d)},v=m=>{if(!f)f=!0,setTimeout(()=>f=!1,300);else return f=!1,r(s.item),clearTimeout(d),!1;d=setTimeout(()=>{const p=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(p)},500)};return(m,p)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({opacity:e.unref(o).isDraggingRef.value&&e.unref(o).getSelection().find(k=>m.$el===k)?"0.5 !important":""}),class:e.normalizeClass(["vuefinder__item","vf-item-"+e.unref(o).explorerId]),"data-type":n.item.type,key:n.item.path,"data-item":JSON.stringify(n.item),"data-index":n.index,onDblclick:p[0]||(p[0]=k=>r(n.item)),onTouchstart:p[1]||(p[1]=k=>v(k)),onTouchend:p[2]||(p[2]=k=>u()),onContextmenu:p[3]||(p[3]=e.withModifiers(k=>e.unref(t).emitter.emit("vf-contextmenu-show",{event:k,items:e.unref(o).getSelected(),target:n.item}),["prevent"]))},[e.renderSlot(m.$slots,"default"),e.unref(t).pinnedFolders.find(k=>k.path===n.item.path)?(e.openBlock(),e.createBlock(e.unref(ir),{key:0,class:"vuefinder__item--pinned"})):e.createCommentVNode("",!0)],46,ru)),[[c,n.item]])}},su={class:"vuefinder__explorer__container"},lu={key:0,class:"vuefinder__explorer__header"},au={class:"vuefinder__explorer__drag-item"},cu={key:0,class:"vuefinder__linear-loader absolute"},iu={class:"vuefinder__explorer__item-list-content"},du={class:"vuefinder__explorer__item-list-name"},uu={class:"vuefinder__explorer__item-name"},mu={class:"vuefinder__explorer__item-path"},fu={class:"vuefinder__explorer__item-list-content"},vu={class:"vuefinder__explorer__item-list-name"},pu={class:"vuefinder__explorer__item-name"},_u={class:"vuefinder__explorer__item-size"},hu={class:"vuefinder__explorer__item-date"},gu={class:"vuefinder__explorer__item-grid-content"},ku=["data-src","alt"],wu={key:2,class:"vuefinder__explorer__item-extension"},bu={class:"vuefinder__explorer__item-title break-all"},yu={__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:v=>{v.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 v=[...t.fs.data.files],m=l.column,p=l.order==="asc"?1:-1;if(!u)return v;const k=(w,E)=>typeof w=="string"&&typeof E=="string"?w.toLowerCase().localeCompare(E.toLowerCase()):wE?1:0;return l.active&&(v=v.slice().sort((w,E)=>k(w[m],E[m])*p)),v},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 xr(a.area.value)}),e.onUpdated(()=>{i.update()}),e.onBeforeUnmount(()=>{i.destroy()}),(u,v)=>(e.openBlock(),e.createElementBlock("div",su,[e.unref(t).view==="list"||c.value.length?(e.openBlock(),e.createElementBlock("div",lu,[e.createElementVNode("div",{onClick:v[0]||(v[0]=m=>f("basename")),class:"vuefinder__explorer__sort-button vuefinder__explorer__sort-button--name 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:v[1]||(v[1]=m=>f("file_size")),class:"vuefinder__explorer__sort-button vuefinder__explorer__sort-button--size 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:v[2]||(v[2]=m=>f("last_modified")),class:"vuefinder__explorer__sort-button vuefinder__explorer__sort-button--date 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:v[3]||(v[3]=m=>f("path")),class:"vuefinder__explorer__sort-button vuefinder__explorer__sort-button--path 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",au,[e.createVNode(fd,{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 vuefinder__explorer__scrollbar-container",[{"grid-view":e.unref(t).view==="grid"},{"search-active":c.value.length}]])},[e.createElementVNode("div",{ref:e.unref(a).scrollBar,class:"vuefinder__explorer__scrollbar"},null,512)],2),e.createElementVNode("div",{ref:e.unref(a).area,class:"vuefinder__explorer__selector-area vf-explorer-scrollbar vf-selector-area min-h-32",onContextmenu:v[4]||(v[4]=e.withModifiers(m=>e.unref(t).emitter.emit("vf-contextmenu-show",{event:m,items:e.unref(a).getSelected()}),["self","prevent"]))},[e.unref(t).loadingIndicator==="linear"&&e.unref(t).fs.loading?(e.openBlock(),e.createElementBlock("div",cu)):e.createCommentVNode("",!0),c.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(d(),(m,p)=>(e.openBlock(),e.createBlock(Qt,{item:m,index:p,dragImage:r.value,class:"vf-item vf-item-list"},{default:e.withCtx(()=>[e.createElementVNode("div",iu,[e.createElementVNode("div",du,[e.createVNode(Zt,{type:m.type,small:e.unref(t).compactListView},null,8,["type","small"]),e.createElementVNode("span",uu,e.toDisplayString(m.basename),1)]),e.createElementVNode("div",mu,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:2},e.renderList(d(),(m,p)=>(e.openBlock(),e.createBlock(Qt,{item:m,index:p,dragImage:r.value,class:"vf-item vf-item-list",draggable:"true",key:m.path},{default:e.withCtx(()=>[e.createElementVNode("div",fu,[e.createElementVNode("div",vu,[e.createVNode(Zt,{type:m.type,small:e.unref(t).compactListView},null,8,["type","small"]),e.createElementVNode("span",pu,e.toDisplayString(m.basename),1)]),e.createElementVNode("div",_u,e.toDisplayString(m.file_size?e.unref(t).filesize(m.file_size):""),1),e.createElementVNode("div",hu,e.toDisplayString(e.unref(ar)(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:3},e.renderList(d(!1),(m,p)=>(e.openBlock(),e.createBlock(Qt,{item:m,index:p,dragImage:r.value,class:"vf-item vf-item-grid",draggable:"true"},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("div",gu,[(m.mime_type??"").startsWith("image")&&e.unref(t).showThumbnails?(e.openBlock(),e.createElementBlock("img",{src:"data:image/png;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",class:"vuefinder__explorer__item-thumbnail lazy","data-src":e.unref(t).requester.getPreviewUrl(e.unref(t).fs.adapter,m),alt:m.basename,key:m.path},null,8,ku)):(e.openBlock(),e.createBlock(Zt,{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",wu,e.toDisplayString(s(m.extension)),1)):e.createCommentVNode("",!0)]),e.createElementVNode("span",bu,e.toDisplayString(e.unref(_n)(m.basename)),1)])]),_:2},1032,["item","index","dragImage"]))),256)):e.createCommentVNode("",!0)],544),e.createVNode(Ji)]))}},Eu=["href","download"],Vu=["onClick"],Su={__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:Z.NEW_FOLDER,title:()=>o("New Folder"),action:()=>t.modal.open(er)},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(v=>v.path===u.path)),t.storage.setStore("pinned-folders",t.pinnedFolders)}},delete:{key:Z.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:Z.PREVIEW,title:()=>o("Preview"),action:()=>t.modal.open(cr,{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:Z.DOWNLOAD,link:e.computed(()=>t.requester.getDownloadUrl(t.fs.adapter,r.value[0])),title:()=>o("Download"),action:()=>{}},archive:{key:Z.ARCHIVE,title:()=>o("Archive"),action:()=>t.modal.open(lr,{items:r})},unarchive:{key:Z.UNARCHIVE,title:()=>o("Unarchive"),action:()=>t.modal.open(rr,{items:r})},rename:{key:Z.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:v,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",[])):v.length>1&&v.some(p=>p.path===m.path)?(a.items.push(l.refresh),a.items.push(l.archive),a.items.push(l.delete),t.emitter.emit("vf-context-selected",v)):(m.type==="dir"?(a.items.push(l.open),t.pinnedFolders.findIndex(p=>p.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 v=t.dragSelect.area.value,m=t.root.getBoundingClientRect(),p=v.getBoundingClientRect();let k=u.clientX-m.left,w=u.clientY-m.top;a.active=!0,e.nextTick(()=>{var b;const E=(b=s.value)==null?void 0:b.getBoundingClientRect();let T=(E==null?void 0:E.height)??0,S=(E==null?void 0:E.width)??0;k=p.right-u.pageX+window.scrollXe.withDirectives((e.openBlock(),e.createElementBlock("ul",{ref_key:"contextmenu",ref:s,style:e.normalizeStyle(a.positions),class:"vuefinder__context-menu"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,m=>(e.openBlock(),e.createElementBlock("li",{class:"vuefinder__context-menu__item",key:m.title},[m.link?(e.openBlock(),e.createElementBlock("a",{key:0,class:"vuefinder__context-menu__link",target:"_blank",href:m.link,download:m.link,onClick:v[0]||(v[0]=p=>e.unref(t).emitter.emit("vf-contextmenu-hide"))},[e.createElementVNode("span",null,e.toDisplayString(m.title()),1)],8,Eu)):(e.openBlock(),e.createElementBlock("div",{key:1,class:"vuefinder__context-menu__action",onClick:p=>d(m)},[e.createElementVNode("span",null,e.toDisplayString(m.title()),1)],8,Vu))]))),128))],4)),[[e.vShow,a.active]])}},Nu={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",class:"h-5 w-5",viewBox:"0 0 24 24"};function xu(n,t){return e.openBlock(),e.createElementBlock("svg",Nu,t[0]||(t[0]=[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)]))}const dr={render:xu},Bu={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"};function Cu(n,t){return e.openBlock(),e.createElementBlock("svg",Bu,t[0]||(t[0]=[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)]))}const $u={render:Cu},Du={class:"vuefinder__status-bar__wrapper"},Tu={class:"vuefinder__status-bar__storage"},Mu=["title"],Au={class:"vuefinder__status-bar__storage-icon"},Lu=["value"],Ou={class:"vuefinder__status-bar__info"},Fu={key:0},Ru={class:"vuefinder__status-bar__selected-count"},Hu={class:"vuefinder__status-bar__actions"},Iu=["disabled"],zu=["title"],Uu={__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",Du,[e.createElementVNode("div",Tu,[e.createElementVNode("div",{class:"vuefinder__status-bar__storage-container",title:e.unref(o)("Storage")},[e.createElementVNode("div",Au,[e.createVNode(e.unref(dr))]),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":d[0]||(d[0]=f=>e.unref(t).fs.adapter=f),onChange:c,class:"vuefinder__status-bar__storage-select",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,Lu))),256))],544),[[e.vModelSelect,e.unref(t).fs.adapter]])],8,Mu),e.createElementVNode("div",Ou,[a.value.length?(e.openBlock(),e.createElementBlock("span",Fu,e.toDisplayString(e.unref(t).fs.data.files.length)+" items found. ",1)):e.createCommentVNode("",!0),e.createElementVNode("span",Ru,e.toDisplayString(e.unref(t).dragSelect.getCount()>0?e.unref(o)("%s item(s) selected.",e.unref(t).dragSelect.getCount()):""),1)])]),e.createElementVNode("div",Hu,[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,Iu)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:"vuefinder__status-bar__about",title:e.unref(o)("About"),onClick:d[2]||(d[2]=f=>e.unref(t).modal.open(Xo))},[e.createVNode(e.unref($u))],8,zu)])]))}},qu={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"};function ju(n,t){return e.openBlock(),e.createElementBlock("svg",qu,t[0]||(t[0]=[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)]))}const ur={render:ju},Pu={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-5 w-5",viewBox:"0 0 24 24"};function Gu(n,t){return e.openBlock(),e.createElementBlock("svg",Pu,t[0]||(t[0]=[e.createElementVNode("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),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)]))}const Ku={render:Gu},Wu={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"};function Yu(n,t){return e.openBlock(),e.createElementBlock("svg",Wu,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),e.createElementVNode("path",{d:"M15 12H9M12 9v6"},null,-1)]))}const mr={render:Yu},Xu={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"};function Ju(n,t){return e.openBlock(),e.createElementBlock("svg",Xu,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),e.createElementVNode("path",{d:"M9 12h6"},null,-1)]))}const fr={render:Ju};function vr(n,t){const o=n.findIndex(s=>s.path===t.path);o>-1?n[o]=t:n.push(t)}const Zu={class:"vuefinder__folder-loader-indicator"},Qu={key:1,class:"vuefinder__folder-loader-indicator--icon"},pr={__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",Zu,[r.value?(e.openBlock(),e.createBlock(e.unref(An),{key:0,class:"vuefinder__folder-loader-indicator--loading"})):(e.openBlock(),e.createElementBlock("div",Qu,[s.value&&((d=c())!=null&&d.folders.length)?(e.openBlock(),e.createBlock(e.unref(fr),{key:0,class:"vuefinder__folder-loader-indicator--minus"})):e.createCommentVNode("",!0),s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(mr),{key:1,class:"vuefinder__folder-loader-indicator--plus"}))]))])}}},em={class:"vuefinder__treesubfolderlist__item-content"},tm=["onClick"],nm=["title","onClick"],om={class:"vuefinder__treesubfolderlist__item-icon"},rm={class:"vuefinder__treesubfolderlist__subfolder"},sm={__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.ref(null);e.onMounted(()=>{s.path===s.adapter+"://"&&xe(r.value,{scrollbars:{theme:"vf-theme-dark dark:vf-theme-light"}})});const c=e.computed(()=>{var a;return((a=t.treeViewData.find(i=>i.path===s.path))==null?void 0:a.folders)||[]});return(a,i)=>{const l=e.resolveComponent("TreeSubfolderList",!0);return e.openBlock(),e.createElementBlock("ul",{ref_key:"parentSubfolderList",ref:r,class:"vuefinder__treesubfolderlist__container"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(d,f)=>(e.openBlock(),e.createElementBlock("li",{key:d.path,class:"vuefinder__treesubfolderlist__item"},[e.createElementVNode("div",em,[e.createElementVNode("div",{class:"vuefinder__treesubfolderlist__item-toggle",onClick:u=>o.value[d.path]=!o.value[d.path]},[e.createVNode(pr,{adapter:n.adapter,path:d.path,modelValue:o.value[d.path],"onUpdate:modelValue":u=>o.value[d.path]=u},null,8,["adapter","path","modelValue","onUpdate:modelValue"])],8,tm),e.createElementVNode("div",{class:"vuefinder__treesubfolderlist__item-link",title:d.path,onClick:u=>e.unref(t).emitter.emit("vf-fetch",{params:{q:"index",adapter:s.adapter,path:d.path}})},[e.createElementVNode("div",om,[e.unref(t).fs.path===d.path?(e.openBlock(),e.createBlock(e.unref(ur),{key:0})):(e.openBlock(),e.createBlock(e.unref(zt),{key:1}))]),e.createElementVNode("div",{class:e.normalizeClass(["vuefinder__treesubfolderlist__item-text",{"vuefinder__treesubfolderlist__item-text--active":e.unref(t).fs.path===d.path}])},e.toDisplayString(d.basename),3)],8,nm)]),e.createElementVNode("div",rm,[e.withDirectives(e.createVNode(l,{adapter:s.adapter,path:d.path},null,8,["adapter","path"]),[[e.vShow,o.value[d.path]]])])]))),128))],512)}}},lm={__name:"TreeStorageItem",props:{storage:{type:String,required:!0}},setup(n){const t=e.inject("ServiceContainer"),{setStore:o}=t.storage,s=e.ref(!1);function r(c){c===t.fs.adapter?s.value=!s.value:(t.emitter.emit("vf-search-exit"),t.emitter.emit("vf-fetch",{params:{q:"index",adapter:c}}),o("adapter",c))}return(c,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{onClick:a[2]||(a[2]=i=>r(n.storage)),class:"vuefinder__treestorageitem__header"},[e.createElementVNode("div",{class:e.normalizeClass(["vuefinder__treestorageitem__info",n.storage===e.unref(t).fs.adapter?"vuefinder__treestorageitem__info--active":""])},[e.createElementVNode("div",{class:e.normalizeClass(["vuefinder__treestorageitem__icon",n.storage===e.unref(t).fs.adapter?"vuefinder__treestorageitem__icon--active":""])},[e.createVNode(e.unref(dr))],2),e.createElementVNode("div",null,e.toDisplayString(n.storage),1)],2),e.createElementVNode("div",{class:"vuefinder__treestorageitem__loader",onClick:a[1]||(a[1]=e.withModifiers(i=>s.value=!s.value,["stop"]))},[e.createVNode(pr,{adapter:n.storage,path:n.storage+"://",modelValue:s.value,"onUpdate:modelValue":a[0]||(a[0]=i=>s.value=i)},null,8,["adapter","path","modelValue"])])]),e.withDirectives(e.createVNode(sm,{adapter:n.storage,path:n.storage+"://",class:"vuefinder__treestorageitem__subfolder"},null,8,["adapter","path"]),[[e.vShow,s.value]])],64))}},am={class:"vuefinder__folder-indicator"},cm={class:"vuefinder__folder-indicator--icon"},im={__name:"FolderIndicator",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(n){const t=e.useModel(n,"modelValue");return(o,s)=>(e.openBlock(),e.createElementBlock("div",am,[e.createElementVNode("div",cm,[t.value?(e.openBlock(),e.createBlock(e.unref(fr),{key:0,class:"vuefinder__folder-indicator--minus"})):e.createCommentVNode("",!0),t.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(mr),{key:1,class:"vuefinder__folder-indicator--plus"}))])]))}},dm={class:"vuefinder__treeview__header"},um={class:"vuefinder__treeview__pinned-label"},mm={class:"vuefinder__treeview__pin-text text-nowrap"},fm={key:0,class:"vuefinder__treeview__pinned-list"},vm={class:"vuefinder__treeview__pinned-item"},pm=["onClick"],_m=["title"],hm=["onClick"],gm={key:0},km={class:"vuefinder__treeview__no-pinned"},wm={class:"vuefinder__treeview__storage"},bm={__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,v=f.target.parentElement,m=v.getBoundingClientRect().width;v.classList.remove("transition-[width]"),v.classList.add("transition-none");const p=w=>{c.value=m+w.clientX-u,c.value<50&&(c.value=0,t.showTreeView=!1),c.value>50&&(t.showTreeView=!0)},k=()=>{const w=v.getBoundingClientRect();c.value=w.width,v.classList.add("transition-[width]"),v.classList.remove("transition-none"),window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",k)};window.addEventListener("mousemove",p),window.addEventListener("mouseup",k)},d=e.ref(null);return e.onMounted(()=>{xe(d.value,{overflow:{x:"hidden"},scrollbars:{theme:"vf-theme-dark dark:vf-theme-light"}})}),e.watch(t.fs.data,(f,u)=>{const v=f.files.filter(m=>m.type==="dir");vr(t.treeViewData,{path:t.fs.path,folders:v.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]=v=>e.unref(t).showTreeView=!e.unref(t).showTreeView),class:e.normalizeClass(["vuefinder__treeview__overlay",e.unref(t).showTreeView?"vuefinder__treeview__backdrop":"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:"vuefinder__treeview__container"},[e.createElementVNode("div",{ref_key:"treeViewScrollElement",ref:d,class:"vuefinder__treeview__scroll"},[e.createElementVNode("div",dm,[e.createElementVNode("div",{onClick:u[2]||(u[2]=v=>a.value=!a.value),class:"vuefinder__treeview__pinned-toggle"},[e.createElementVNode("div",um,[e.createVNode(e.unref(ir),{class:"vuefinder__treeview__pin-icon"}),e.createElementVNode("div",mm,e.toDisplayString(e.unref(o)("Pinned Folders")),1)]),e.createVNode(im,{modelValue:a.value,"onUpdate:modelValue":u[1]||(u[1]=v=>a.value=v)},null,8,["modelValue"])]),a.value?(e.openBlock(),e.createElementBlock("ul",fm,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).pinnedFolders,v=>(e.openBlock(),e.createElementBlock("li",vm,[e.createElementVNode("div",{class:"vuefinder__treeview__pinned-folder",onClick:m=>e.unref(t).emitter.emit("vf-fetch",{params:{q:"index",adapter:v.storage,path:v.path}})},[e.unref(t).fs.path!==v.path?(e.openBlock(),e.createBlock(e.unref(zt),{key:0,class:"vuefinder__treeview__folder-icon"})):e.createCommentVNode("",!0),e.unref(t).fs.path===v.path?(e.openBlock(),e.createBlock(e.unref(ur),{key:1,class:"vuefinder__treeview__open-folder-icon"})):e.createCommentVNode("",!0),e.createElementVNode("div",{title:v.path,class:e.normalizeClass(["vuefinder__treeview__folder-name text-nowrap",{"vuefinder__treeview__folder-name--active":e.unref(t).fs.path===v.path}])},e.toDisplayString(v.basename),11,_m)],8,pm),e.createElementVNode("div",{class:"vuefinder__treeview__remove-favorite",onClick:m=>i(v)},[e.createVNode(e.unref(Ku),{class:"vuefinder__treeview__remove-icon"})],8,hm)]))),256)),e.unref(t).pinnedFolders.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",gm,[e.createElementVNode("div",km,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,v=>(e.openBlock(),e.createElementBlock("div",wm,[e.createVNode(lm,{storage:v},null,8,["storage"])]))),256))],512),e.createElementVNode("div",{onMousedown:l,class:e.normalizeClass([(e.unref(t).showTreeView,""),"vuefinder__treeview__resize-handle"])},null,34)],4)],64))}},ym={class:"vuefinder__main__content"},Em={__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}}},onError:{type:Function,default:null},loadingIndicator:{type:String,default:"circular"}},emits:["select","update:path"],setup(n,{emit:t}){const o=t,s=n,r=qs(s,e.inject("VueFinderOptions"));e.provide("ServiceContainer",r);const{setStore:c}=r.storage,a=e.ref(null);r.root=a;const i=r.dragSelect;ba(r);const l=u=>{Object.assign(r.fs.data,u),i.clearSelection(),i.refreshSelection()};let d;r.emitter.on("vf-fetch-abort",()=>{d.abort(),r.fs.loading=!1}),r.emitter.on("vf-fetch",({params:u,body:v=null,onSuccess:m=null,onError:p=null,noCloseModal:k=!1})=>{["index","search"].includes(u.q)&&(d&&d.abort(),r.fs.loading=!0),d=new AbortController;const w=d.signal;r.requester.send({url:"",method:u.m||"get",params:u,body:v,abortSignal:w}).then(E=>{r.fs.adapter=E.adapter,r.persist&&(r.fs.path=E.dirname,c("path",r.fs.path)),k||r.modal.close(),l(E),m&&m(E)}).catch(E=>{console.error(E),p&&p(E)}).finally(()=>{["index","search"].includes(u.q)&&(r.fs.loading=!1)})});function f(u){let v={};u&&u.includes("://")&&(v={adapter:u.split("://")[0],path:u}),r.emitter.emit("vf-fetch",{params:{q:"index",adapter:r.fs.adapter,...v},onError:s.onError??(m=>{m.message&&r.emitter.emit("vf-toast-push",{label:m.message,type:"error"})})})}return e.onMounted(()=>{f(r.fs.path),e.watch(()=>s.path,u=>{f(u)}),i.onSelect(u=>{o("select",u)}),e.watch(()=>r.fs.data.dirname,u=>{o("update:path",u)})}),(u,v)=>(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?"vuefinder__main__fixed":"vuefinder__main__relative","vuefinder__main__container"]),style:e.normalizeStyle(e.unref(r).fullScreen?"":"max-height: "+n.maxHeight),onMousedown:v[0]||(v[0]=m=>e.unref(r).emitter.emit("vf-contextmenu-hide")),onTouchstart:v[1]||(v[1]=m=>e.unref(r).emitter.emit("vf-contextmenu-hide"))},[e.createVNode(Gc),e.createVNode(Yi),e.createElementVNode("div",ym,[e.createVNode(bm),e.createVNode(yu)]),e.createVNode(Uu)],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(Su)],2)],512))}},Vm={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",Em)}};module.exports=Vm; + */const _e=(n,t)=>{const{o,i:s,u:r}=n;let l=o,i;const c=(m,u)=>{const v=l,f=m,p=u||(s?!s(v,f):v!==f);return(p||r)&&(l=f,i=v),[l,p,i]};return[t?m=>c(t(l,i),m):c,m=>[l,!!m,i]]},Pr=typeof window<"u"&&typeof HTMLElement<"u"&&!!window.document,pe=Pr?window:{},uo=Math.max,qr=Math.min,on=Math.round,Ct=Math.abs,zn=Math.sign,mo=pe.cancelAnimationFrame,bn=pe.requestAnimationFrame,$t=pe.setTimeout,rn=pe.clearTimeout,Ft=n=>typeof pe[n]<"u"?pe[n]:void 0,jr=Ft("MutationObserver"),Un=Ft("IntersectionObserver"),Dt=Ft("ResizeObserver"),St=Ft("ScrollTimeline"),yn=n=>n===void 0,It=n=>n===null,xe=n=>typeof n=="number",ct=n=>typeof n=="string",En=n=>typeof n=="boolean",be=n=>typeof n=="function",Be=n=>Array.isArray(n),Tt=n=>typeof n=="object"&&!Be(n)&&!It(n),Vn=n=>{const t=!!n&&n.length,o=xe(t)&&t>-1&&t%1==0;return Be(n)||!be(n)&&o?t>0&&Tt(n)?t-1 in n:!0:!1},Mt=n=>!!n&&n.constructor===Object,At=n=>n instanceof HTMLElement,Ht=n=>n instanceof Element;function Y(n,t){if(Vn(n))for(let o=0;ot(n[o],o,n));return n}const fo=(n,t)=>n.indexOf(t)>=0,lt=(n,t)=>n.concat(t),ne=(n,t,o)=>(!ct(t)&&Vn(t)?Array.prototype.push.apply(n,t):n.push(t),n),Ue=n=>Array.from(n||[]),Sn=n=>Be(n)?n:!ct(n)&&Vn(n)?Ue(n):[n],sn=n=>!!n&&!n.length,ln=n=>Ue(new Set(n)),ke=(n,t,o)=>{Y(n,r=>r?r.apply(void 0,t||[]):!0),!o&&(n.length=0)},vo="paddingTop",po="paddingRight",_o="paddingLeft",ho="paddingBottom",go="marginLeft",ko="marginRight",wo="marginBottom",bo="overflowX",yo="overflowY",Rt="width",zt="height",Re="visible",qe="hidden",Je="scroll",Gr=n=>{const t=String(n||"");return t?t[0].toUpperCase()+t.slice(1):""},Ut=(n,t,o,s)=>{if(n&&t){let r=!0;return Y(o,l=>{const i=n[l],c=t[l];i!==c&&(r=!1)}),r}return!1},Eo=(n,t)=>Ut(n,t,["w","h"]),Nt=(n,t)=>Ut(n,t,["x","y"]),Kr=(n,t)=>Ut(n,t,["t","r","b","l"]),je=()=>{},U=(n,...t)=>n.bind(0,...t),We=n=>{let t;const o=n?$t:bn,s=n?rn:mo;return[r=>{s(t),t=o(()=>r(),be(n)?n():n)},()=>s(t)]},an=(n,t)=>{const{_:o,p:s,v:r,S:l}=t||{};let i,c,a,d,m=je;const u=function(b){m(),rn(i),d=i=c=void 0,m=je,n.apply(this,b)},v=k=>l&&c?l(c,k):k,f=()=>{m!==je&&u(v(a)||a)},p=function(){const b=Ue(arguments),V=be(o)?o():o;if(xe(V)&&V>=0){const N=be(s)?s():s,y=xe(N)&&N>=0,x=V>0?$t:bn,$=V>0?rn:mo,C=v(b)||b,_=u.bind(0,C);let h;m(),r&&!d?(_(),d=!0,h=x(()=>d=void 0,V)):(h=x(_,V),y&&!i&&(i=$t(f,N))),m=()=>$(h),c=a=C}else u(b)};return p.m=f,p},Vo=(n,t)=>Object.prototype.hasOwnProperty.call(n,t),Ee=n=>n?Object.keys(n):[],W=(n,t,o,s,r,l,i)=>{const c=[t,o,s,r,l,i];return(typeof n!="object"||It(n))&&!be(n)&&(n={}),Y(c,a=>{Y(a,(d,m)=>{const u=a[m];if(n===u)return!0;const v=Be(u);if(u&&Mt(u)){const f=n[m];let p=f;v&&!Be(f)?p=[]:!v&&!Mt(f)&&(p={}),n[m]=W(p,u)}else n[m]=v?u.slice():u})}),n},So=(n,t)=>Y(W({},n),(o,s,r)=>{o===void 0?delete r[s]:o&&Mt(o)&&(r[s]=So(o))}),Nn=n=>!Ee(n).length,No=(n,t,o)=>uo(n,qr(t,o)),Ge=n=>ln((Be(n)?n:(n||"").split(" ")).filter(t=>t)),xn=(n,t)=>n&&n.getAttribute(t),Pn=(n,t)=>n&&n.hasAttribute(t),Ae=(n,t,o)=>{Y(Ge(t),s=>{n&&n.setAttribute(s,String(o||""))})},Se=(n,t)=>{Y(Ge(t),o=>n&&n.removeAttribute(o))},Pt=(n,t)=>{const o=Ge(xn(n,t)),s=U(Ae,n,t),r=(l,i)=>{const c=new Set(o);return Y(Ge(l),a=>{c[i](a)}),Ue(c).join(" ")};return{O:l=>s(r(l,"delete")),$:l=>s(r(l,"add")),C:l=>{const i=Ge(l);return i.reduce((c,a)=>c&&o.includes(a),i.length>0)}}},xo=(n,t,o)=>(Pt(n,t).O(o),U(Bn,n,t,o)),Bn=(n,t,o)=>(Pt(n,t).$(o),U(xo,n,t,o)),Lt=(n,t,o,s)=>(s?Bn:xo)(n,t,o),Cn=(n,t,o)=>Pt(n,t).C(o),Bo=n=>Pt(n,"class"),Co=(n,t)=>{Bo(n).O(t)},$n=(n,t)=>(Bo(n).$(t),U(Co,n,t)),$o=(n,t)=>{const o=t?Ht(t)&&t:document;return o?Ue(o.querySelectorAll(n)):[]},Wr=(n,t)=>{const o=t?Ht(t)&&t:document;return o&&o.querySelector(n)},cn=(n,t)=>Ht(n)&&n.matches(t),Do=n=>cn(n,"body"),dn=n=>n?Ue(n.childNodes):[],at=n=>n&&n.parentElement,Ye=(n,t)=>Ht(n)&&n.closest(t),un=n=>document.activeElement,Yr=(n,t,o)=>{const s=Ye(n,t),r=n&&Wr(o,s),l=Ye(r,t)===s;return s&&r?s===n||r===n||l&&Ye(Ye(n,o),t)!==s:!1},Qe=n=>{Y(Sn(n),t=>{const o=at(t);t&&o&&o.removeChild(t)})},he=(n,t)=>U(Qe,n&&t&&Y(Sn(t),o=>{o&&n.appendChild(o)})),Xe=n=>{const t=document.createElement("div");return Ae(t,"class",n),t},To=n=>{const t=Xe();return t.innerHTML=n.trim(),Y(dn(t),o=>Qe(o))},qn=(n,t)=>n.getPropertyValue(t)||n[t]||"",Mo=n=>{const t=n||0;return isFinite(t)?t:0},yt=n=>Mo(parseFloat(n||"")),mn=n=>Math.round(n*1e4)/1e4,Ao=n=>`${mn(Mo(n))}px`;function it(n,t){n&&t&&Y(t,(o,s)=>{try{const r=n.style,l=It(o)||En(o)?"":xe(o)?Ao(o):o;s.indexOf("--")===0?r.setProperty(s,l):r[s]=l}catch{}})}function Oe(n,t,o){const s=ct(t);let r=s?"":{};if(n){const l=pe.getComputedStyle(n,o)||n.style;r=s?qn(l,t):Ue(t).reduce((i,c)=>(i[c]=qn(l,c),i),r)}return r}const jn=(n,t,o)=>{const s=t?`${t}-`:"",r=o?`-${o}`:"",l=`${s}top${r}`,i=`${s}right${r}`,c=`${s}bottom${r}`,a=`${s}left${r}`,d=Oe(n,[l,i,c,a]);return{t:yt(d[l]),r:yt(d[i]),b:yt(d[c]),l:yt(d[a])}},Xr=(n,t)=>`translate${Tt(n)?`(${n.x},${n.y})`:`Y(${n})`}`,Zr=n=>!!(n.offsetWidth||n.offsetHeight||n.getClientRects().length),Jr={w:0,h:0},qt=(n,t)=>t?{w:t[`${n}Width`],h:t[`${n}Height`]}:Jr,Qr=n=>qt("inner",n||pe),Ze=U(qt,"offset"),Lo=U(qt,"client"),Ot=U(qt,"scroll"),Dn=n=>{const t=parseFloat(Oe(n,Rt))||0,o=parseFloat(Oe(n,zt))||0;return{w:t-on(t),h:o-on(o)}},Jt=n=>n.getBoundingClientRect(),es=n=>!!n&&Zr(n),fn=n=>!!(n&&(n[zt]||n[Rt])),Oo=(n,t)=>{const o=fn(n);return!fn(t)&&o},Gn=(n,t,o,s)=>{Y(Ge(t),r=>{n&&n.removeEventListener(r,o,s)})},Q=(n,t,o,s)=>{var r;const l=(r=s&&s.H)!=null?r:!0,i=s&&s.I||!1,c=s&&s.A||!1,a={passive:l,capture:i};return U(ke,Ge(t).map(d=>{const m=c?u=>{Gn(n,d,m,i),o&&o(u)}:o;return n&&n.addEventListener(d,m,a),U(Gn,n,d,m,i)}))},Fo=n=>n.stopPropagation(),vn=n=>n.preventDefault(),Io=n=>Fo(n)||vn(n),Ne=(n,t)=>{const{x:o,y:s}=xe(t)?{x:t,y:t}:t||{};xe(o)&&(n.scrollLeft=o),xe(s)&&(n.scrollTop=s)},ge=n=>({x:n.scrollLeft,y:n.scrollTop}),Ho=()=>({D:{x:0,y:0},M:{x:0,y:0}}),ts=(n,t)=>{const{D:o,M:s}=n,{w:r,h:l}=t,i=(u,v,f)=>{let p=zn(u)*f,k=zn(v)*f;if(p===k){const b=Ct(u),V=Ct(v);k=b>V?0:k,p=b{const o=(s,r)=>s===0&&s<=r;return{x:o(n.x,t.x),y:o(n.y,t.y)}},Wn=({D:n,M:t},o)=>{const s=(r,l,i)=>No(0,1,(r-i)/(r-l)||0);return{x:s(n.x,t.x,o.x),y:s(n.y,t.y,o.y)}},pn=n=>{n&&n.focus&&n.focus({preventScroll:!0})},Yn=(n,t)=>{Y(Sn(t),n)},_n=n=>{const t=new Map,o=(l,i)=>{if(l){const c=t.get(l);Yn(a=>{c&&c[a?"delete":"clear"](a)},i)}else t.forEach(c=>{c.clear()}),t.clear()},s=(l,i)=>{if(ct(l)){const d=t.get(l)||new Set;return t.set(l,d),Yn(m=>{be(m)&&d.add(m)},i),U(o,l,i)}En(i)&&i&&o();const c=Ee(l),a=[];return Y(c,d=>{const m=l[d];m&&ne(a,s(d,m))}),U(ke,a)},r=(l,i)=>{Y(Ue(t.get(l)),c=>{i&&!sn(i)?c.apply(0,i):c()})};return s(n||{}),[s,o,r]},Ro={},zo={},ns=n=>{Y(n,t=>Y(t,(o,s)=>{Ro[s]=t[s]}))},Uo=(n,t,o)=>Ee(n).map(s=>{const{static:r,instance:l}=n[s],[i,c,a]=o||[],d=o?l:r;if(d){const m=o?d(i,c,t):d(t);return(a||zo)[s]=m}}),dt=n=>zo[n],os="__osOptionsValidationPlugin",tt="data-overlayscrollbars",xt="os-environment",Et=`${xt}-scrollbar-hidden`,Qt=`${tt}-initialize`,Bt="noClipping",Xn=`${tt}-body`,ze=tt,rs="host",Le=`${tt}-viewport`,ss=bo,ls=yo,as="arrange",Po="measuring",is="scrolling",qo="scrollbarHidden",cs="noContent",hn=`${tt}-padding`,Zn=`${tt}-content`,Tn="os-size-observer",ds=`${Tn}-appear`,us=`${Tn}-listener`,ms="os-trinsic-observer",fs="os-theme-none",we="os-scrollbar",vs=`${we}-rtl`,ps=`${we}-horizontal`,_s=`${we}-vertical`,jo=`${we}-track`,Mn=`${we}-handle`,hs=`${we}-visible`,gs=`${we}-cornerless`,Jn=`${we}-interaction`,Qn=`${we}-unusable`,gn=`${we}-auto-hide`,eo=`${gn}-hidden`,to=`${we}-wheel`,ks=`${jo}-interactive`,ws=`${Mn}-interactive`,bs="__osSizeObserverPlugin",ys=(n,t)=>{const{T:o}=t,[s,r]=n("showNativeOverlaidScrollbars");return[s&&o.x&&o.y,r]},et=n=>n.indexOf(Re)===0,Es=(n,t)=>{const o=(r,l,i,c)=>{const a=r===Re?qe:r.replace(`${Re}-`,""),d=et(r),m=et(i);return!l&&!c?qe:d&&m?Re:d?l&&c?a:l?Re:qe:l?a:m&&c?Re:qe},s={x:o(t.x,n.x,t.y,n.y),y:o(t.y,n.y,t.x,n.x)};return{k:s,R:{x:s.x===Je,y:s.y===Je}}},Go="__osScrollbarsHidingPlugin",Vs="__osClickScrollPlugin",no=n=>JSON.stringify(n,(t,o)=>{if(be(o))throw 0;return o}),oo=(n,t)=>n?`${t}`.split(".").reduce((o,s)=>o&&Vo(o,s)?o[s]:void 0,n):void 0,Ss={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"]}},Ko=(n,t)=>{const o={},s=lt(Ee(t),Ee(n));return Y(s,r=>{const l=n[r],i=t[r];if(Tt(l)&&Tt(i))W(o[r]={},Ko(l,i)),Nn(o[r])&&delete o[r];else if(Vo(t,r)&&i!==l){let c=!0;if(Be(l)||Be(i))try{no(l)===no(i)&&(c=!1)}catch{}c&&(o[r]=i)}}),o},ro=(n,t,o)=>s=>[oo(n,s),o||oo(t,s)!==void 0];let Wo;const Ns=()=>Wo,xs=n=>{Wo=n};let en;const Bs=()=>{const n=(y,x,$)=>{he(document.body,y),he(document.body,y);const F=Lo(y),C=Ze(y),_=Dn(x);return $&&Qe(y),{x:C.h-F.h+_.h,y:C.w-F.w+_.w}},t=y=>{let x=!1;const $=$n(y,Et);try{x=Oe(y,"scrollbar-width")==="none"||Oe(y,"display","::-webkit-scrollbar")==="none"}catch{}return $(),x},o=`.${xt}{scroll-behavior:auto!important;position:fixed;opacity:0;visibility:hidden;overflow:scroll;height:200px;width:200px;z-index:-1}.${xt} div{width:200%;height:200%;margin:10px 0}.${Et}{scrollbar-width:none!important}.${Et}::-webkit-scrollbar,.${Et}::-webkit-scrollbar-corner{appearance:none!important;display:none!important;width:0!important;height:0!important}`,r=To(`
`)[0],l=r.firstChild,i=r.lastChild,c=Ns();c&&(i.nonce=c);const[a,,d]=_n(),[m,u]=_e({o:n(r,l),i:Nt},U(n,r,l,!0)),[v]=u(),f=t(r),p={x:v.x===0,y:v.y===0},k={elements:{host:null,padding:!f,viewport:y=>f&&Do(y)&&y,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},b=W({},Ss),V=U(W,{},b),D=U(W,{},k),N={N:v,T:p,P:f,G:!!St,K:U(a,"r"),Z:D,tt:y=>W(k,y)&&D(),nt:V,ot:y=>W(b,y)&&V(),st:W({},k),et:W({},b)};if(Se(r,"style"),Qe(r),Q(pe,"resize",()=>{d("r",[])}),be(pe.matchMedia)&&!f&&(!p.x||!p.y)){const y=x=>{const $=pe.matchMedia(`(resolution: ${pe.devicePixelRatio}dppx)`);Q($,"change",()=>{x(),y(x)},{A:!0})};y(()=>{const[x,$]=m();W(N.N,x),d("r",[$])})}return N},$e=()=>(en||(en=Bs()),en),Cs=(n,t,o)=>{let s=!1;const r=o?new WeakMap:!1,l=()=>{s=!0},i=c=>{if(r&&o){const a=o.map(d=>{const[m,u]=d||[];return[u&&m?(c||$o)(m,n):[],u]});Y(a,d=>Y(d[0],m=>{const u=d[1],v=r.get(m)||[];if(n.contains(m)&&u){const p=Q(m,u,k=>{s?(p(),r.delete(m)):t(k)});r.set(m,ne(v,p))}else ke(v),r.delete(m)}))}};return i(),[l,i]},so=(n,t,o,s)=>{let r=!1;const{ct:l,rt:i,lt:c,it:a,ut:d,_t:m}=s||{},u=an(()=>r&&o(!0),{_:33,p:99}),[v,f]=Cs(n,u,c),p=l||[],k=i||[],b=lt(p,k),V=(N,y)=>{if(!sn(y)){const x=d||je,$=m||je,F=[],C=[];let _=!1,h=!1;if(Y(y,B=>{const{attributeName:g,target:T,type:w,oldValue:A,addedNodes:L,removedNodes:P}=B,K=w==="attributes",G=w==="childList",ee=n===T,z=K&&g,E=z&&xn(T,g||""),M=ct(E)?E:null,O=z&&A!==M,S=fo(k,g)&&O;if(t&&(G||!ee)){const H=K&&O,I=H&&a&&cn(T,a),j=(I?!x(T,g,A,M):!K||H)&&!$(B,!!I,n,s);Y(L,X=>ne(F,X)),Y(P,X=>ne(F,X)),h=h||j}!t&&ee&&O&&!x(T,g,A,M)&&(ne(C,g),_=_||S)}),f(B=>ln(F).reduce((g,T)=>(ne(g,$o(B,T)),cn(T,B)?ne(g,T):g),[])),t)return!N&&h&&o(!1),[!1];if(!sn(C)||_){const B=[ln(C),_];return!N&&o.apply(0,B),B}}},D=new jr(U(V,!1));return[()=>(D.observe(n,{attributes:!0,attributeOldValue:!0,attributeFilter:b,subtree:t,childList:t,characterData:t}),r=!0,()=>{r&&(v(),D.disconnect(),r=!1)}),()=>{if(r)return u.m(),V(!0,D.takeRecords())}]},Yo=(n,t,o)=>{const{dt:s}=o||{},r=dt(bs),[l]=_e({o:!1,u:!0});return()=>{const i=[],a=To(`
`)[0],d=a.firstChild,m=u=>{const v=u instanceof ResizeObserverEntry;let f=!1,p=!1;if(v){const[k,,b]=l(u.contentRect),V=fn(k);p=Oo(k,b),f=!p&&!V}else p=u===!0;f||t({ft:!0,dt:p})};if(Dt){const u=new Dt(v=>m(v.pop()));u.observe(d),ne(i,()=>{u.disconnect()})}else if(r){const[u,v]=r(d,m,s);ne(i,lt([$n(a,ds),Q(a,"animationstart",u)],v))}else return je;return U(ke,ne(i,he(n,a)))}},$s=(n,t)=>{let o;const s=a=>a.h===0||a.isIntersecting||a.intersectionRatio>0,r=Xe(ms),[l]=_e({o:!1}),i=(a,d)=>{if(a){const m=l(s(a)),[,u]=m;return u&&!d&&t(m)&&[m]}},c=(a,d)=>i(d.pop(),a);return[()=>{const a=[];if(Un)o=new Un(U(c,!1),{root:n}),o.observe(r),ne(a,()=>{o.disconnect()});else{const d=()=>{const m=Ze(r);i(m)};ne(a,Yo(r,d)()),d()}return U(ke,ne(a,he(n,r)))},()=>o&&c(!0,o.takeRecords())]},Ds=(n,t,o,s)=>{let r,l,i,c,a,d;const m=`[${ze}]`,u=`[${Le}]`,v=["id","class","style","open","wrap","cols","rows"],{vt:f,ht:p,U:k,gt:b,bt:V,L:D,wt:N,yt:y,St:x,Ot:$}=n,F=S=>Oe(S,"direction")==="rtl",C={$t:!1,F:F(f)},_=$e(),h=dt(Go),[B]=_e({i:Eo,o:{w:0,h:0}},()=>{const S=h&&h.V(n,t,C,_,o).X,I=!(N&&D)&&Cn(p,ze,Bt),R=!D&&y(as),j=R&&ge(b),X=j&&$(),le=x(Po,I),oe=R&&S&&S()[0],ue=Ot(k),q=Dn(k);return oe&&oe(),Ne(b,j),X&&X(),I&&le(),{w:ue.w+q.w,h:ue.h+q.h}}),g=an(s,{_:()=>r,p:()=>l,S(S,H){const[I]=S,[R]=H;return[lt(Ee(I),Ee(R)).reduce((j,X)=>(j[X]=I[X]||R[X],j),{})]}}),T=S=>{const H=F(f);W(S,{Ct:d!==H}),W(C,{F:H}),d=H},w=(S,H)=>{const[I,R]=S,j={xt:R};return W(C,{$t:I}),!H&&s(j),j},A=({ft:S,dt:H})=>{const R=!(S&&!H)&&_.P?g:s,j={ft:S||H,dt:H};T(j),R(j)},L=(S,H)=>{const[,I]=B(),R={Ht:I};return T(R),I&&!H&&(S?s:g)(R),R},P=(S,H,I)=>{const R={Et:H};return T(R),H&&!I&&g(R),R},[K,G]=V?$s(p,w):[],ee=!D&&Yo(p,A,{dt:!0}),[z,E]=so(p,!1,P,{rt:v,ct:v}),M=D&&Dt&&new Dt(S=>{const H=S[S.length-1].contentRect;A({ft:!0,dt:Oo(H,a)}),a=H}),O=an(()=>{const[,S]=B();s({Ht:S})},{_:222,v:!0});return[()=>{M&&M.observe(p);const S=ee&&ee(),H=K&&K(),I=z(),R=_.K(j=>{j?g({zt:j}):O()});return()=>{M&&M.disconnect(),S&&S(),H&&H(),c&&c(),I(),R()}},({It:S,At:H,Dt:I})=>{const R={},[j]=S("update.ignoreMutation"),[X,le]=S("update.attributes"),[oe,ue]=S("update.elementEvents"),[q,ae]=S("update.debounce"),ve=ue||le,ie=H||I,ce=re=>be(j)&&j(re);if(ve){i&&i(),c&&c();const[re,se]=so(V||k,!0,L,{ct:lt(v,X||[]),lt:oe,it:m,_t:(te,Z)=>{const{target:de,attributeName:fe}=te;return(!Z&&fe&&!D?Yr(de,m,u):!1)||!!Ye(de,`.${we}`)||!!ce(te)}});c=re(),i=se}if(ae)if(g.m(),Be(q)){const re=q[0],se=q[1];r=xe(re)&&re,l=xe(se)&&se}else xe(q)?(r=q,l=!1):(r=!1,l=!1);if(ie){const re=E(),se=G&&G(),te=i&&i();re&&W(R,P(re[0],re[1],ie)),se&&W(R,w(se[0],ie)),te&&W(R,L(te[0],ie))}return T(R),R},C]},Xo=(n,t)=>be(t)?t.apply(0,n):t,Ts=(n,t,o,s)=>{const r=yn(s)?o:s;return Xo(n,r)||t.apply(0,n)},Zo=(n,t,o,s)=>{const r=yn(s)?o:s,l=Xo(n,r);return!!l&&(At(l)?l:t.apply(0,n))},Ms=(n,t)=>{const{nativeScrollbarsOverlaid:o,body:s}=t||{},{T:r,P:l,Z:i}=$e(),{nativeScrollbarsOverlaid:c,body:a}=i().cancel,d=o??c,m=yn(s)?a:s,u=(r.x||r.y)&&d,v=n&&(It(m)?!l:m);return!!u||!!v},As=(n,t,o,s)=>{const r="--os-viewport-percent",l="--os-scroll-percent",i="--os-scroll-direction",{Z:c}=$e(),{scrollbars:a}=c(),{slot:d}=a,{vt:m,ht:u,U:v,Mt:f,gt:p,wt:k,L:b}=t,{scrollbars:V}=f?{}:n,{slot:D}=V||{},N=[],y=[],x=[],$=Zo([m,u,v],()=>b&&k?m:u,d,D),F=z=>{if(St){const E=new St({source:p,axis:z});return{kt:O=>{const S=O.Tt.animate({clear:["left"],[l]:[0,1]},{timeline:E});return()=>S.cancel()}}}},C={x:F("x"),y:F("y")},_=()=>{const{Rt:z,Vt:E}=o,M=(O,S)=>No(0,1,O/(O+S)||0);return{x:M(E.x,z.x),y:M(E.y,z.y)}},h=(z,E,M)=>{const O=M?$n:Co;Y(z,S=>{O(S.Tt,E)})},B=(z,E)=>{Y(z,M=>{const[O,S]=E(M);it(O,S)})},g=(z,E,M)=>{const O=En(M),S=O?M:!0,H=O?!M:!0;S&&h(y,z,E),H&&h(x,z,E)},T=()=>{const z=_(),E=M=>O=>[O.Tt,{[r]:mn(M)+""}];B(y,E(z.x)),B(x,E(z.y))},w=()=>{if(!St){const{Lt:z}=o,E=Wn(z,ge(p)),M=O=>S=>[S.Tt,{[l]:mn(O)+""}];B(y,M(E.x)),B(x,M(E.y))}},A=()=>{const{Lt:z}=o,E=Kn(z),M=O=>S=>[S.Tt,{[i]:O?"0":"1"}];B(y,M(E.x)),B(x,M(E.y))},L=()=>{if(b&&!k){const{Rt:z,Lt:E}=o,M=Kn(E),O=Wn(E,ge(p)),S=H=>{const{Tt:I}=H,R=at(I)===v&&I,j=(X,le,oe)=>{const ue=le*X;return Ao(oe?ue:-ue)};return[R,R&&{transform:Xr({x:j(O.x,z.x,M.x),y:j(O.y,z.y,M.y)})}]};B(y,S),B(x,S)}},P=z=>{const E=z?"x":"y",O=Xe(`${we} ${z?ps:_s}`),S=Xe(jo),H=Xe(Mn),I={Tt:O,Ut:S,Pt:H},R=C[E];return ne(z?y:x,I),ne(N,[he(O,S),he(S,H),U(Qe,O),R&&R.kt(I),s(I,g,z)]),I},K=U(P,!0),G=U(P,!1),ee=()=>(he($,y[0].Tt),he($,x[0].Tt),U(ke,N));return K(),G(),[{Nt:T,qt:w,Bt:A,Ft:L,jt:g,Yt:{Wt:y,Xt:K,Jt:U(B,y)},Gt:{Wt:x,Xt:G,Jt:U(B,x)}},ee]},Ls=(n,t,o,s)=>(r,l,i)=>{const{ht:c,U:a,L:d,gt:m,Kt:u,Ot:v}=t,{Tt:f,Ut:p,Pt:k}=r,[b,V]=We(333),[D,N]=We(444),y=F=>{be(m.scrollBy)&&m.scrollBy({behavior:"smooth",left:F.x,top:F.y})},x=()=>{const F="pointerup pointercancel lostpointercapture",C=`client${i?"X":"Y"}`,_=i?Rt:zt,h=i?"left":"top",B=i?"w":"h",g=i?"x":"y",T=(A,L)=>P=>{const{Rt:K}=o,G=Ze(p)[B]-Ze(k)[B],z=L*P/G*K[g];Ne(m,{[g]:A+z})},w=[];return Q(p,"pointerdown",A=>{const L=Ye(A.target,`.${Mn}`)===k,P=L?k:p,K=n.scrollbars,G=K[L?"dragScroll":"clickScroll"],{button:ee,isPrimary:z,pointerType:E}=A,{pointers:M}=K;if(ee===0&&z&&G&&(M||[]).includes(E)){ke(w),N();const S=!L&&(A.shiftKey||G==="instant"),H=U(Jt,k),I=U(Jt,p),R=(Z,de)=>(Z||H())[h]-(de||I())[h],j=on(Jt(m)[_])/Ze(m)[B]||1,X=T(ge(m)[g],1/j),le=A[C],oe=H(),ue=I(),q=oe[_],ae=R(oe,ue)+q/2,ve=le-ue[h],ie=L?0:ve-ae,ce=Z=>{ke(te),P.releasePointerCapture(Z.pointerId)},re=L||S,se=v(),te=[Q(u,F,ce),Q(u,"selectstart",Z=>vn(Z),{H:!1}),Q(p,F,ce),re&&Q(p,"pointermove",Z=>X(ie+(Z[C]-le))),re&&(()=>{const Z=ge(m);se();const de=ge(m),fe={x:de.x-Z.x,y:de.y-Z.y};(Ct(fe.x)>3||Ct(fe.y)>3)&&(v(),Ne(m,Z),y(fe),D(se))})];if(P.setPointerCapture(A.pointerId),S)X(ie);else if(!L){const Z=dt(Vs);if(Z){const de=Z(X,ie,q,fe=>{fe?se():ne(te,se)});ne(te,de),ne(w,U(de,!0))}}}})};let $=!0;return U(ke,[Q(k,"pointermove pointerleave",s),Q(f,"pointerenter",()=>{l(Jn,!0)}),Q(f,"pointerleave pointercancel",()=>{l(Jn,!1)}),!d&&Q(f,"mousedown",()=>{const F=un();(Pn(F,Le)||Pn(F,ze)||F===document.body)&&$t(U(pn,a),25)}),Q(f,"wheel",F=>{const{deltaX:C,deltaY:_,deltaMode:h}=F;$&&h===0&&at(f)===c&&y({x:C,y:_}),$=!1,l(to,!0),b(()=>{$=!0,l(to)}),vn(F)},{H:!1,I:!0}),Q(f,"pointerdown",U(Q,u,"click",Io,{A:!0,I:!0,H:!1}),{I:!0}),x(),V,N])},Os=(n,t,o,s,r,l)=>{let i,c,a,d,m,u=je,v=0;const f=["mouse","pen"],p=E=>f.includes(E.pointerType),[k,b]=We(),[V,D]=We(100),[N,y]=We(100),[x,$]=We(()=>v),[F,C]=As(n,r,s,Ls(t,r,s,E=>p(E)&&K())),{ht:_,Qt:h,wt:B}=r,{jt:g,Nt:T,qt:w,Bt:A,Ft:L}=F,P=(E,M)=>{if($(),E)g(eo);else{const O=U(g,eo,!0);v>0&&!M?x(O):O()}},K=()=>{(a?!i:!d)&&(P(!0),V(()=>{P(!1)}))},G=E=>{g(gn,E,!0),g(gn,E,!1)},ee=E=>{p(E)&&(i=a,a&&P(!0))},z=[$,D,y,b,()=>u(),Q(_,"pointerover",ee,{A:!0}),Q(_,"pointerenter",ee),Q(_,"pointerleave",E=>{p(E)&&(i=!1,a&&P(!1))}),Q(_,"pointermove",E=>{p(E)&&c&&K()}),Q(h,"scroll",E=>{k(()=>{w(),K()}),l(E),L()})];return[()=>U(ke,ne(z,C())),({It:E,Dt:M,Zt:O,tn:S})=>{const{nn:H,sn:I,en:R,cn:j}=S||{},{Ct:X,dt:le}=O||{},{F:oe}=o,{T:ue}=$e(),{k:q,rn:ae}=s,[ve,ie]=E("showNativeOverlaidScrollbars"),[ce,re]=E("scrollbars.theme"),[se,te]=E("scrollbars.visibility"),[Z,de]=E("scrollbars.autoHide"),[fe,nt]=E("scrollbars.autoHideSuspend"),[ut]=E("scrollbars.autoHideDelay"),[mt,ft]=E("scrollbars.dragScroll"),[Pe,ot]=E("scrollbars.clickScroll"),[vt,Gt]=E("overflow"),Kt=le&&!M,Wt=ae.x||ae.y,Ve=H||I||j||X||M,Yt=R||te||Gt,pt=ve&&ue.x&&ue.y,_t=(Ie,rt,st)=>{const ht=Ie.includes(Je)&&(se===Re||se==="auto"&&rt===Je);return g(hs,ht,st),ht};if(v=ut,Kt&&(fe&&Wt?(G(!1),u(),N(()=>{u=Q(h,"scroll",U(G,!0),{A:!0})})):G(!0)),ie&&g(fs,pt),re&&(g(m),g(ce,!0),m=ce),nt&&!fe&&G(!0),de&&(c=Z==="move",a=Z==="leave",d=Z==="never",P(d,!0)),ft&&g(ws,mt),ot&&g(ks,!!Pe),Yt){const Ie=_t(vt.x,q.x,!0),rt=_t(vt.y,q.y,!1);g(gs,!(Ie&&rt))}Ve&&(w(),T(),L(),j&&A(),g(Qn,!ae.x,!0),g(Qn,!ae.y,!1),g(vs,oe&&!B))},{},F]},Fs=n=>{const t=$e(),{Z:o,P:s}=t,{elements:r}=o(),{padding:l,viewport:i,content:c}=r,a=At(n),d=a?{}:n,{elements:m}=d,{padding:u,viewport:v,content:f}=m||{},p=a?n:d.target,k=Do(p),b=p.ownerDocument,V=b.documentElement,D=()=>b.defaultView||pe,N=U(Ts,[p]),y=U(Zo,[p]),x=U(Xe,""),$=U(N,x,i),F=U(y,x,c),C=q=>{const ae=Ze(q),ve=Ot(q),ie=Oe(q,bo),ce=Oe(q,yo);return ve.w-ae.w>0&&!et(ie)||ve.h-ae.h>0&&!et(ce)},_=$(v),h=_===p,B=h&&k,g=!h&&F(f),T=!h&&_===g,w=B?V:_,A=B?w:p,L=!h&&y(x,l,u),P=!T&&g,K=[P,w,L,A].map(q=>At(q)&&!at(q)&&q),G=q=>q&&fo(K,q),ee=!G(w)&&C(w)?w:p,z=B?V:w,M={vt:p,ht:A,U:w,ln:L,bt:P,gt:z,Qt:B?b:w,an:k?V:ee,Kt:b,wt:k,Mt:a,L:h,un:D,yt:q=>Cn(w,Le,q),St:(q,ae)=>Lt(w,Le,q,ae),Ot:()=>Lt(z,Le,is,!0)},{vt:O,ht:S,ln:H,U:I,bt:R}=M,j=[()=>{Se(S,[ze,Qt]),Se(O,Qt),k&&Se(V,[Qt,ze])}];let X=dn([R,I,H,S,O].find(q=>q&&!G(q)));const le=B?O:R||I,oe=U(ke,j);return[M,()=>{const q=D(),ae=un(),ve=te=>{he(at(te),dn(te)),Qe(te)},ie=te=>Q(te,"focusin focusout focus blur",Io,{I:!0,H:!1}),ce="tabindex",re=xn(I,ce),se=ie(ae);return Ae(S,ze,h?"":rs),Ae(H,hn,""),Ae(I,Le,""),Ae(R,Zn,""),h||(Ae(I,ce,re||"-1"),k&&Ae(V,Xn,"")),he(le,X),he(S,H),he(H||S,!h&&I),he(I,R),ne(j,[se,()=>{const te=un(),Z=G(I),de=Z&&te===I?O:te,fe=ie(de);Se(H,hn),Se(R,Zn),Se(I,Le),k&&Se(V,Xn),re?Ae(I,ce,re):Se(I,ce),G(R)&&ve(R),Z&&ve(I),G(H)&&ve(H),pn(de),fe()}]),s&&!h&&(Bn(I,Le,qo),ne(j,U(Se,I,Le))),pn(!h&&k&&ae===O&&q.top===q?I:ae),se(),X=0,oe},oe]},Is=({bt:n})=>({Zt:t,_n:o,Dt:s})=>{const{xt:r}=t||{},{$t:l}=o;n&&(r||s)&&it(n,{[zt]:l&&"100%"})},Hs=({ht:n,ln:t,U:o,L:s},r)=>{const[l,i]=_e({i:Kr,o:jn()},U(jn,n,"padding",""));return({It:c,Zt:a,_n:d,Dt:m})=>{let[u,v]=i(m);const{P:f}=$e(),{ft:p,Ht:k,Ct:b}=a||{},{F:V}=d,[D,N]=c("paddingAbsolute");(p||v||(m||k))&&([u,v]=l(m));const x=!s&&(N||b||v);if(x){const $=!D||!t&&!f,F=u.r+u.l,C=u.t+u.b,_={[ko]:$&&!V?-F:0,[wo]:$?-C:0,[go]:$&&V?-F:0,top:$?-u.t:0,right:$?V?-u.r:"auto":0,left:$?V?"auto":-u.l:0,[Rt]:$&&`calc(100% + ${F}px)`},h={[vo]:$?u.t:0,[po]:$?u.r:0,[ho]:$?u.b:0,[_o]:$?u.l:0};it(t||o,_),it(o,h),W(r,{ln:u,dn:!$,j:t?h:W({},_,h)})}return{fn:x}}},Rs=(n,t)=>{const o=$e(),{ht:s,ln:r,U:l,L:i,Qt:c,gt:a,wt:d,St:m,un:u}=n,{P:v}=o,f=d&&i,p=U(uo,0),k={display:()=>!1,direction:E=>E!=="ltr",flexDirection:E=>E.endsWith("-reverse"),writingMode:E=>E!=="horizontal-tb"},b=Ee(k),V={i:Eo,o:{w:0,h:0}},D={i:Nt,o:{}},N=E=>{m(Po,!f&&E)},y=E=>{if(!b.some(le=>{const oe=E[le];return oe&&k[le](oe)}))return{D:{x:0,y:0},M:{x:1,y:1}};N(!0);const O=ge(a),S=m(cs,!0),H=Q(c,Je,le=>{const oe=ge(a);le.isTrusted&&oe.x===O.x&&oe.y===O.y&&Fo(le)},{I:!0,A:!0});Ne(a,{x:0,y:0}),S();const I=ge(a),R=Ot(a);Ne(a,{x:R.w,y:R.h});const j=ge(a);Ne(a,{x:j.x-I.x<1&&-R.w,y:j.y-I.y<1&&-R.h});const X=ge(a);return Ne(a,O),bn(()=>H()),{D:I,M:X}},x=(E,M)=>{const O=pe.devicePixelRatio%1!==0?1:0,S={w:p(E.w-M.w),h:p(E.h-M.h)};return{w:S.w>O?S.w:0,h:S.h>O?S.h:0}},[$,F]=_e(V,U(Dn,l)),[C,_]=_e(V,U(Ot,l)),[h,B]=_e(V),[g]=_e(D),[T,w]=_e(V),[A]=_e(D),[L]=_e({i:(E,M)=>Ut(E,M,b),o:{}},()=>es(l)?Oe(l,b):{}),[P,K]=_e({i:(E,M)=>Nt(E.D,M.D)&&Nt(E.M,M.M),o:Ho()}),G=dt(Go),ee=(E,M)=>`${M?ss:ls}${Gr(E)}`,z=E=>{const M=S=>[Re,qe,Je].map(H=>ee(H,S)),O=M(!0).concat(M()).join(" ");m(O),m(Ee(E).map(S=>ee(E[S],S==="x")).join(" "),!0)};return({It:E,Zt:M,_n:O,Dt:S},{fn:H})=>{const{ft:I,Ht:R,Ct:j,dt:X,zt:le}=M||{},oe=G&&G.V(n,t,O,o,E),{W:ue,X:q,J:ae}=oe||{},[ve,ie]=ys(E,o),[ce,re]=E("overflow"),se=et(ce.x),te=et(ce.y),Z=!0;let de=F(S),fe=_(S),nt=B(S),ut=w(S);ie&&v&&m(qo,!ve);{Cn(s,ze,Bt)&&N(!0);const[Hn]=q?q():[],[gt]=de=$(S),[kt]=fe=C(S),wt=Lo(l),bt=f&&Qr(u()),Vr={w:p(kt.w+gt.w),h:p(kt.h+gt.h)},Rn={w:p((bt?bt.w:wt.w+p(wt.w-kt.w))+gt.w),h:p((bt?bt.h:wt.h+p(wt.h-kt.h))+gt.h)};Hn&&Hn(),ut=T(Rn),nt=h(x(Vr,Rn),S)}const[mt,ft]=ut,[Pe,ot]=nt,[vt,Gt]=fe,[Kt,Wt]=de,[Ve,Yt]=g({x:Pe.w>0,y:Pe.h>0}),pt=se&&te&&(Ve.x||Ve.y)||se&&Ve.x&&!Ve.y||te&&Ve.y&&!Ve.x,_t=H||j||le||Wt||Gt||ft||ot||re||ie||Z,Ie=Es(Ve,ce),[rt,st]=A(Ie.k),[ht,br]=L(S),In=j||X||br||Yt||S,[yr,Er]=In?P(y(ht),S):K();return _t&&(st&&z(Ie.k),ae&&ue&&it(l,ae(Ie,O,ue(Ie,vt,Kt)))),N(!1),Lt(s,ze,Bt,pt),Lt(r,hn,Bt,pt),W(t,{k:rt,Vt:{x:mt.w,y:mt.h},Rt:{x:Pe.w,y:Pe.h},rn:Ve,Lt:ts(yr,Pe)}),{en:st,nn:ft,sn:ot,cn:Er||ot,pn:In}}},zs=n=>{const[t,o,s]=Fs(n),r={ln:{t:0,r:0,b:0,l:0},dn:!1,j:{[ko]:0,[wo]:0,[go]:0,[vo]:0,[po]:0,[ho]:0,[_o]:0},Vt:{x:0,y:0},Rt:{x:0,y:0},k:{x:qe,y:qe},rn:{x:!1,y:!1},Lt:Ho()},{vt:l,gt:i,L:c,Ot:a}=t,{P:d,T:m}=$e(),u=!d&&(m.x||m.y),v=[Is(t),Hs(t,r),Rs(t,r)];return[o,f=>{const p={},b=u&&ge(i),V=b&&a();return Y(v,D=>{W(p,D(f,p)||{})}),Ne(i,b),V&&V(),!c&&Ne(l,0),p},r,t,s]},Us=(n,t,o,s,r)=>{let l=!1;const i=ro(t,{}),[c,a,d,m,u]=zs(n),[v,f,p]=Ds(m,d,i,y=>{N({},y)}),[k,b,,V]=Os(n,t,p,d,m,r),D=y=>Ee(y).some(x=>!!y[x]),N=(y,x)=>{if(o())return!1;const{vn:$,Dt:F,At:C,hn:_}=y,h=$||{},B=!!F||!l,g={It:ro(t,h,B),vn:h,Dt:B};if(_)return b(g),!1;const T=x||f(W({},g,{At:C})),w=a(W({},g,{_n:p,Zt:T}));b(W({},g,{Zt:T,tn:w}));const A=D(T),L=D(w),P=A||L||!Nn(h)||B;return l=!0,P&&s(y,{Zt:T,tn:w}),P};return[()=>{const{an:y,gt:x,Ot:$}=m,F=ge(y),C=[v(),c(),k()],_=$();return Ne(x,F),_(),U(ke,C)},N,()=>({gn:p,bn:d}),{wn:m,yn:V},u]},An=new WeakMap,Ps=(n,t)=>{An.set(n,t)},qs=n=>{An.delete(n)},Jo=n=>An.get(n),Ce=(n,t,o)=>{const{nt:s}=$e(),r=At(n),l=r?n:n.target,i=Jo(l);if(t&&!i){let c=!1;const a=[],d={},m=h=>{const B=So(h),g=dt(os);return g?g(B,!0):B},u=W({},s(),m(t)),[v,f,p]=_n(),[k,b,V]=_n(o),D=(h,B)=>{V(h,B),p(h,B)},[N,y,x,$,F]=Us(n,u,()=>c,({vn:h,Dt:B},{Zt:g,tn:T})=>{const{ft:w,Ct:A,xt:L,Ht:P,Et:K,dt:G}=g,{nn:ee,sn:z,en:E,cn:M}=T;D("updated",[_,{updateHints:{sizeChanged:!!w,directionChanged:!!A,heightIntrinsicChanged:!!L,overflowEdgeChanged:!!ee,overflowAmountChanged:!!z,overflowStyleChanged:!!E,scrollCoordinatesChanged:!!M,contentMutation:!!P,hostMutation:!!K,appear:!!G},changedOptions:h||{},force:!!B}])},h=>D("scroll",[_,h])),C=h=>{qs(l),ke(a),c=!0,D("destroyed",[_,h]),f(),b()},_={options(h,B){if(h){const g=B?s():{},T=Ko(u,W(g,m(h)));Nn(T)||(W(u,T),y({vn:T}))}return W({},u)},on:k,off:(h,B)=>{h&&B&&b(h,B)},state(){const{gn:h,bn:B}=x(),{F:g}=h,{Vt:T,Rt:w,k:A,rn:L,ln:P,dn:K,Lt:G}=B;return W({},{overflowEdge:T,overflowAmount:w,overflowStyle:A,hasOverflow:L,scrollCoordinates:{start:G.D,end:G.M},padding:P,paddingAbsolute:K,directionRTL:g,destroyed:c})},elements(){const{vt:h,ht:B,ln:g,U:T,bt:w,gt:A,Qt:L}=$.wn,{Yt:P,Gt:K}=$.yn,G=z=>{const{Pt:E,Ut:M,Tt:O}=z;return{scrollbar:O,track:M,handle:E}},ee=z=>{const{Wt:E,Xt:M}=z,O=G(E[0]);return W({},O,{clone:()=>{const S=G(M());return y({hn:!0}),S}})};return W({},{target:h,host:B,padding:g||T,viewport:T,content:w||T,scrollOffsetElement:A,scrollEventElement:L,scrollbarHorizontal:ee(P),scrollbarVertical:ee(K)})},update:h=>y({Dt:h,At:!0}),destroy:U(C,!1),plugin:h=>d[Ee(h)[0]]};return ne(a,[F]),Ps(l,_),Uo(Ro,Ce,[_,v,d]),Ms($.wn.wt,!r&&n.cancel)?(C(!0),_):(ne(a,N()),D("initialized",[_]),_.update(),_)}return i};Ce.plugin=n=>{const t=Be(n),o=t?n:[n],s=o.map(r=>Uo(r,Ce)[0]);return ns(o),t?s:s[0]};Ce.valid=n=>{const t=n&&n.elements,o=be(t)&&t();return Mt(o)&&!!Jo(o.target)};Ce.env=()=>{const{N:n,T:t,P:o,G:s,st:r,et:l,Z:i,tt:c,nt:a,ot:d}=$e();return W({},{scrollbarsSize:n,scrollbarsOverlaid:t,scrollbarsHiding:o,scrollTimeline:s,staticDefaultInitialization:r,staticDefaultOptions:l,getDefaultInitialization:i,setDefaultInitialization:c,getDefaultOptions:a,setDefaultOptions:d})};Ce.nonce=xs;function js(){let n;const t=e.ref(null),o=Math.floor(Math.random()*2**32),s=e.ref(!1),r=e.ref([]),l=()=>r.value,i=()=>n.getSelection(),c=()=>r.value.length,a=()=>n.clearSelection(!0),d=e.ref(),m=e.ref(null),u=e.ref(null),v=e.ref(null),f=e.ref(null);function p(){n=new Br({area:t.value,keyboardDrag:!1,selectedClass:"vf-explorer-selected",selectorClass:"vf-explorer-selector"}),n.subscribe("DS:start:pre",({items:x,event:$,isDragging:F})=>{if(F)n.Interaction._reset($);else{s.value=!1;const C=t.value.offsetWidth-$.offsetX,_=t.value.offsetHeight-$.offsetY;C<15&&_<15&&n.Interaction._reset($),$.target.classList.contains("os-scrollbar-handle")&&n.Interaction._reset($)}}),document.addEventListener("dragleave",x=>{!x.buttons&&s.value&&(s.value=!1)})}const k=()=>e.nextTick(()=>{n.addSelection(n.getSelectables()),b()}),b=()=>{r.value=n.getSelection().map(x=>JSON.parse(x.dataset.item)),d.value(r.value)},V=()=>e.nextTick(()=>{const x=l().map($=>$.path);a(),n.setSettings({selectables:document.getElementsByClassName("vf-item-"+o)}),n.addSelection(n.getSelectables().filter($=>x.includes(JSON.parse($.dataset.item).path))),b(),N()}),D=x=>{d.value=x,n.subscribe("DS:end",({items:$,event:F,isDragging:C})=>{r.value=$.map(_=>JSON.parse(_.dataset.item)),x($.map(_=>JSON.parse(_.dataset.item)))})},N=()=>{m.value&&(t.value.getBoundingClientRect().height{if(!m.value)return;const{scrollOffsetElement:$}=m.value.elements();$.scrollTo({top:t.value.scrollTop,left:0})};return e.onMounted(()=>{Ce(v.value,{scrollbars:{theme:"vf-theme-dark dark:vf-theme-light"},plugins:{OverlayScrollbars:Ce}},{initialized:x=>{m.value=x},scroll:(x,$)=>{const{scrollOffsetElement:F}=x.elements();t.value.scrollTo({top:F.scrollTop,left:0})}}),p(),N(),f.value=new ResizeObserver(N),f.value.observe(t.value),t.value.addEventListener("scroll",y),n.subscribe("DS:scroll",({isDragging:x})=>x||y())}),e.onUnmounted(()=>{n&&n.stop(),f.value&&f.value.disconnect()}),e.onUpdated(()=>{n&&n.Area.reset()}),{area:t,explorerId:o,isDraggingRef:s,scrollBar:u,scrollBarContainer:v,getSelected:l,getSelection:i,selectAll:k,clearSelection:a,refreshSelection:V,getCount:c,onSelect:D}}function Gs(n,t){const o=e.ref(n),s=e.ref(t),r=e.ref([]),l=e.ref([]),i=e.ref([]),c=e.ref(!1),a=e.ref(5);let d=!1,m=!1;const u=e.reactive({adapter:o,storages:[],dirname:s,files:[]});function v(){let D=[],N=[],y=s.value??o.value+"://";y.length===0&&(r.value=[]),y.replace(o.value+"://","").split("/").forEach(function(F){D.push(F),D.join("/")!==""&&N.push({basename:F,name:F,path:o.value+"://"+D.join("/"),type:"dir"})}),l.value=N;const[x,$]=p(N,a.value);i.value=$,r.value=x}function f(D){a.value=D,v()}function p(D,N){return D.length>N?[D.slice(-N),D.slice(0,-N)]:[D,[]]}function k(D=null){c.value=D??!c.value}function b(){return r.value&&r.value.length&&!m}const V=e.computed(()=>{var D;return((D=r.value[r.value.length-2])==null?void 0:D.path)??o.value+"://"});return e.onMounted(()=>{}),e.watch(s,v),e.onMounted(v),{adapter:o,path:s,loading:d,searchMode:m,data:u,breadcrumbs:r,breadcrumbItems:l,limitBreadcrumbItems:f,hiddenBreadcrumbs:i,showHiddenBreadcrumbs:c,toggleHiddenBreadcrumbs:k,isGoUpAvailable:b,parentFolderPath:V}}const Ks=(n,t)=>{const o=Lr(n.id),s=xr(),r=o.getStore("metricUnits",!1),l=zr(o,n.theme),i=t.i18n,c=n.locale??t.locale,a=f=>Array.isArray(f)?f:Ir,d=o.getStore("persist-path",n.persist),m=d?o.getStore("path",n.path):n.path,u=d?o.getStore("adapter"):null,v=js();return e.reactive({version:Hr,root:null,debug:n.debug,emitter:s,storage:o,i18n:Fr(o,c,s,i),modal:Ur(),dragSelect:e.computed(()=>v),requester:Ar(n.request),features:a(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:l,metricUnits:r,filesize:r?co:io,compactListView:o.getStore("compact-list-view",!0),persist:d,showThumbnails:o.getStore("show-thumbnails",n.showThumbnails),loadingIndicator:n.loadingIndicator,contextMenuItems:n.contextMenuItems,fs:Gs(u,m)})},Ws={class:"vuefinder__modal-layout__container"},Ys={class:"vuefinder__modal-layout__content"},Xs={class:"vuefinder__modal-layout__footer"},De={__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:"vuefinder__modal-layout","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",onKeyup:r[1]||(r[1]=e.withKeys(l=>e.unref(o).modal.close(),["esc"])),tabindex:"0"},[r[2]||(r[2]=e.createElementVNode("div",{class:"vuefinder__modal-layout__overlay"},null,-1)),e.createElementVNode("div",Ws,[e.createElementVNode("div",{class:"vuefinder__modal-layout__wrapper",onMousedown:r[0]||(r[0]=e.withModifiers(l=>e.unref(o).modal.close(),["self"]))},[e.createElementVNode("div",{ref_key:"modalBody",ref:t,class:"vuefinder__modal-layout__body"},[e.createElementVNode("div",Ys,[e.renderSlot(s.$slots,"default")]),e.createElementVNode("div",Xs,[e.renderSlot(s.$slots,"buttons")])],512)],32)])],32))}},Zs=(n,t)=>{const o=n.__vccOpts||n;for(const[s,r]of t)o[s]=r;return o},Js={props:{on:{type:String,required:!0}},setup(n,{emit:t,slots:o}){const s=e.inject("ServiceContainer"),r=e.ref(!1),{t:l}=s.i18n;let i=null;const c=()=>{clearTimeout(i),r.value=!0,i=setTimeout(()=>{r.value=!1},2e3)};return e.onMounted(()=>{s.emitter.on(n.on,c)}),e.onUnmounted(()=>{clearTimeout(i)}),{shown:r,t:l}}},Qs={key:1};function el(n,t,o,s,r,l){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["vuefinder__action-message",{"vuefinder__action-message--hidden":!s.shown}])},[n.$slots.default?e.renderSlot(n.$slots,"default",{key:0}):(e.openBlock(),e.createElementBlock("span",Qs,e.toDisplayString(s.t("Saved.")),1))],2)}const Ke=Zs(Js,[["render",el]]),tl={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"};function nl(n,t){return e.openBlock(),e.createElementBlock("svg",tl,t[0]||(t[0]=[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),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)]))}const ol={render:nl},rl={class:"vuefinder__modal-header"},sl={class:"vuefinder__modal-header__icon-container"},ll={class:"vuefinder__modal-header__title",id:"modal-title"},Fe={__name:"ModalHeader",props:{title:{type:String,required:!0},icon:{type:Object,required:!0}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",rl,[e.createElementVNode("div",sl,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.icon),{class:"vuefinder__modal-header__icon"}))]),e.createElementVNode("h3",ll,e.toDisplayString(n.title),1)]))}},al={class:"vuefinder__about-modal__content"},il={class:"vuefinder__about-modal__main"},cl={class:"vuefinder__about-modal__tabs","aria-label":"Tabs"},dl=["onClick","aria-current"],ul={key:0,class:"vuefinder__about-modal__tab-content"},ml={class:"vuefinder__about-modal__description"},fl={href:"https://vuefinder.ozdemir.be",class:"vuefinder__about-modal__link",target:"_blank"},vl={href:"https://github.com/n1crack/vuefinder",class:"vuefinder__about-modal__link",target:"_blank"},pl={key:1,class:"vuefinder__about-modal__tab-content"},_l={class:"vuefinder__about-modal__description"},hl={class:"vuefinder__about-modal__settings"},gl={class:"vuefinder__about-modal__setting flex"},kl={class:"vuefinder__about-modal__setting-input"},wl={class:"vuefinder__about-modal__setting-label"},bl={for:"metric_unit",class:"vuefinder__about-modal__label"},yl={class:"vuefinder__about-modal__setting flex"},El={class:"vuefinder__about-modal__setting-input"},Vl={class:"vuefinder__about-modal__setting-label"},Sl={for:"large_icons",class:"vuefinder__about-modal__label"},Nl={class:"vuefinder__about-modal__setting flex"},xl={class:"vuefinder__about-modal__setting-input"},Bl={class:"vuefinder__about-modal__setting-label"},Cl={for:"persist_path",class:"vuefinder__about-modal__label"},$l={class:"vuefinder__about-modal__setting flex"},Dl={class:"vuefinder__about-modal__setting-input"},Tl={class:"vuefinder__about-modal__setting-label"},Ml={for:"show_thumbnails",class:"vuefinder__about-modal__label"},Al={class:"vuefinder__about-modal__setting"},Ll={class:"vuefinder__about-modal__setting-input"},Ol={for:"theme",class:"vuefinder__about-modal__label"},Fl={class:"vuefinder__about-modal__setting-label"},Il=["label"],Hl=["value"],Rl={key:0,class:"vuefinder__about-modal__setting"},zl={class:"vuefinder__about-modal__setting-input"},Ul={for:"language",class:"vuefinder__about-modal__label"},Pl={class:"vuefinder__about-modal__setting-label"},ql=["label"],jl=["value"],Gl={key:2,class:"vuefinder__about-modal__tab-content"},Kl={class:"vuefinder__about-modal__shortcuts"},Wl={class:"vuefinder__about-modal__shortcut"},Yl={class:"vuefinder__about-modal__shortcut"},Xl={class:"vuefinder__about-modal__shortcut"},Zl={class:"vuefinder__about-modal__shortcut"},Jl={class:"vuefinder__about-modal__shortcut"},Ql={class:"vuefinder__about-modal__shortcut"},ea={class:"vuefinder__about-modal__shortcut"},ta={class:"vuefinder__about-modal__shortcut"},na={class:"vuefinder__about-modal__shortcut"},oa={key:3,class:"vuefinder__about-modal__tab-content"},ra={class:"vuefinder__about-modal__description"},Qo={__name:"ModalAbout",setup(n){const t=e.inject("ServiceContainer"),{setStore:o,clearStore:s}=t.storage,{t:r}=t.i18n,l={ABOUT:"about",SETTINGS:"settings",SHORTCUTS:"shortcuts",RESET:"reset"},i=e.computed(()=>[{name:r("About"),key:l.ABOUT},{name:r("Settings"),key:l.SETTINGS},{name:r("Shortcuts"),key:l.SHORTCUTS},{name:r("Reset"),key:l.RESET}]),c=e.ref("about"),a=async()=>{s(),location.reload()},d=D=>{t.theme.set(D),t.emitter.emit("vf-theme-saved")},m=()=>{t.metricUnits=!t.metricUnits,t.filesize=t.metricUnits?co:io,o("metricUnits",t.metricUnits),t.emitter.emit("vf-metric-units-saved")},u=()=>{t.compactListView=!t.compactListView,o("compactListView",t.compactListView),t.emitter.emit("vf-compact-view-saved")},v=()=>{t.showThumbnails=!t.showThumbnails,o("show-thumbnails",t.showThumbnails),t.emitter.emit("vf-show-thumbnails-saved")},f=()=>{t.persist=!t.persist,o("persist-path",t.persist),t.emitter.emit("vf-persist-path-saved")},{i18n:p}=e.inject("VueFinderOptions"),b=Object.fromEntries(Object.entries({ar:"Arabic (العربيّة)",en:"English",fr:"French (Français)",de:"German (Deutsch)",fa:"Persian (فارسی)",he:"Hebrew (עִברִית)",hi:"Hindi (हिंदी)",pl:"Polish (Polski)",ru:"Russian (Pусский)",sv:"Swedish (Svenska)",tr:"Turkish (Türkçe)",zhCN:"Simplified Chinese (简体中文)",zhTW:"Traditional Chinese (繁體中文)"}).filter(([D])=>Object.keys(p).includes(D))),V=e.computed(()=>({system:r("System"),light:r("Light"),dark:r("Dark")}));return(D,N)=>(e.openBlock(),e.createBlock(De,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:N[7]||(N[7]=y=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(r)("Close")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",al,[e.createVNode(Fe,{icon:e.unref(ol),title:"Vuefinder "+e.unref(t).version},null,8,["icon","title"]),e.createElementVNode("div",il,[e.createElementVNode("div",null,[e.createElementVNode("div",null,[e.createElementVNode("nav",cl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,y=>(e.openBlock(),e.createElementBlock("button",{key:y.name,onClick:x=>c.value=y.key,class:e.normalizeClass([y.key===c.value?"vuefinder__about-modal__tab--active":"vuefinder__about-modal__tab--inactive","vuefinder__about-modal__tab"]),"aria-current":y.current?"page":void 0},e.toDisplayString(y.name),11,dl))),128))])])]),c.value===l.ABOUT?(e.openBlock(),e.createElementBlock("div",ul,[e.createElementVNode("div",ml,e.toDisplayString(e.unref(r)("Vuefinder is a simple, lightweight, and fast file manager library for Vue.js applications")),1),e.createElementVNode("a",fl,e.toDisplayString(e.unref(r)("Project home")),1),e.createElementVNode("a",vl,e.toDisplayString(e.unref(r)("Follow on GitHub")),1)])):e.createCommentVNode("",!0),c.value===l.SETTINGS?(e.openBlock(),e.createElementBlock("div",pl,[e.createElementVNode("div",_l,e.toDisplayString(e.unref(r)("Customize your experience with the following settings")),1),e.createElementVNode("div",hl,[e.createElementVNode("fieldset",null,[e.createElementVNode("div",gl,[e.createElementVNode("div",kl,[e.withDirectives(e.createElementVNode("input",{id:"metric_unit",name:"metric_unit",type:"checkbox","onUpdate:modelValue":N[0]||(N[0]=y=>e.unref(t).metricUnits=y),onClick:m,class:"vuefinder__about-modal__checkbox"},null,512),[[e.vModelCheckbox,e.unref(t).metricUnits]])]),e.createElementVNode("div",wl,[e.createElementVNode("label",bl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Use Metric Units"))+" ",1),e.createVNode(Ke,{class:"ms-3",on:"vf-metric-units-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])])]),e.createElementVNode("div",yl,[e.createElementVNode("div",El,[e.withDirectives(e.createElementVNode("input",{id:"large_icons",name:"large_icons",type:"checkbox","onUpdate:modelValue":N[1]||(N[1]=y=>e.unref(t).compactListView=y),onClick:u,class:"vuefinder__about-modal__checkbox"},null,512),[[e.vModelCheckbox,e.unref(t).compactListView]])]),e.createElementVNode("div",Vl,[e.createElementVNode("label",Sl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Compact list view"))+" ",1),e.createVNode(Ke,{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",xl,[e.withDirectives(e.createElementVNode("input",{id:"persist_path",name:"persist_path",type:"checkbox","onUpdate:modelValue":N[2]||(N[2]=y=>e.unref(t).persist=y),onClick:f,class:"vuefinder__about-modal__checkbox"},null,512),[[e.vModelCheckbox,e.unref(t).persist]])]),e.createElementVNode("div",Bl,[e.createElementVNode("label",Cl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Persist path on reload"))+" ",1),e.createVNode(Ke,{class:"ms-3",on:"vf-persist-path-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])])]),e.createElementVNode("div",$l,[e.createElementVNode("div",Dl,[e.withDirectives(e.createElementVNode("input",{id:"show_thumbnails",name:"show_thumbnails",type:"checkbox","onUpdate:modelValue":N[3]||(N[3]=y=>e.unref(t).showThumbnails=y),onClick:v,class:"vuefinder__about-modal__checkbox"},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(Ke,{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]=y=>e.unref(t).theme.value=y),onChange:N[5]||(N[5]=y=>d(y.target.value)),class:"vuefinder__about-modal__select"},[e.createElementVNode("optgroup",{label:e.unref(r)("Theme")},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(y,x)=>(e.openBlock(),e.createElementBlock("option",{value:x},e.toDisplayString(y),9,Hl))),256))],8,Il)],544),[[e.vModelSelect,e.unref(t).theme.value]]),e.createVNode(Ke,{class:"ms-3",on:"vf-theme-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])]),e.unref(t).features.includes(e.unref(J).LANGUAGE)&&Object.keys(e.unref(b)).length>1?(e.openBlock(),e.createElementBlock("div",Rl,[e.createElementVNode("div",zl,[e.createElementVNode("label",Ul,e.toDisplayString(e.unref(r)("Language")),1)]),e.createElementVNode("div",Pl,[e.withDirectives(e.createElementVNode("select",{id:"language","onUpdate:modelValue":N[6]||(N[6]=y=>e.unref(t).i18n.locale=y),class:"vuefinder__about-modal__select"},[e.createElementVNode("optgroup",{label:e.unref(r)("Language")},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(b),(y,x)=>(e.openBlock(),e.createElementBlock("option",{value:x},e.toDisplayString(y),9,jl))),256))],8,ql)],512),[[e.vModelSelect,e.unref(t).i18n.locale]]),e.createVNode(Ke,{class:"ms-3",on:"vf-language-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Saved.")),1)]),_:1})])])):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0),c.value===l.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),N[8]||(N[8]=e.createElementVNode("kbd",null,"F2",-1))]),e.createElementVNode("div",Yl,[e.createElementVNode("div",null,e.toDisplayString(e.unref(r)("Refresh")),1),N[9]||(N[9]=e.createElementVNode("kbd",null,"F5",-1))]),e.createElementVNode("div",Xl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Delete"))+" ",1),N[10]||(N[10]=e.createElementVNode("kbd",null,"Del",-1))]),e.createElementVNode("div",Zl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Escape"))+" ",1),N[11]||(N[11]=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Esc")],-1))]),e.createElementVNode("div",Jl,[e.createTextVNode(e.toDisplayString(e.unref(r)("Select All"))+" ",1),N[12]||(N[12]=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"A")],-1))]),e.createElementVNode("div",Ql,[e.createTextVNode(e.toDisplayString(e.unref(r)("Search"))+" ",1),N[13]||(N[13]=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"F")],-1))]),e.createElementVNode("div",ea,[e.createTextVNode(e.toDisplayString(e.unref(r)("Toggle Sidebar"))+" ",1),N[14]||(N[14]=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"E")],-1))]),e.createElementVNode("div",ta,[e.createTextVNode(e.toDisplayString(e.unref(r)("Open Settings"))+" ",1),N[15]||(N[15]=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,",")],-1))]),e.createElementVNode("div",na,[e.createTextVNode(e.toDisplayString(e.unref(r)("Toggle Full Screen"))+" ",1),N[16]||(N[16]=e.createElementVNode("div",null,[e.createElementVNode("kbd",null,"Ctrl"),e.createTextVNode(" + "),e.createElementVNode("kbd",null,"Enter")],-1))])])])):e.createCommentVNode("",!0),c.value===l.RESET?(e.openBlock(),e.createElementBlock("div",oa,[e.createElementVNode("div",ra,e.toDisplayString(e.unref(r)("Reset all settings to default")),1),e.createElementVNode("button",{onClick:a,type:"button",class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(r)("Reset Settings")),1)])):e.createCommentVNode("",!0)])])]),_:1}))}},sa=["title"],Te={__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,l=e.ref(!1),i=e.ref(null),c=e.ref((d=i.value)==null?void 0:d.strMessage);e.watch(c,()=>l.value=!1);const a=()=>{o("hidden"),l.value=!0};return(m,u)=>(e.openBlock(),e.createElementBlock("div",null,[l.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"strMessage",ref:i,class:e.normalizeClass(["vuefinder__message",n.error?"vuefinder__message--error":"vuefinder__message--success"])},[e.renderSlot(m.$slots,"default"),e.createElementVNode("div",{class:"vuefinder__message__close",onClick:a,title:e.unref(r)("Close")},u[0]||(u[0]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"vuefinder__message__icon"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)]),8,sa)],2))]))}},la={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"};function aa(n,t){return e.openBlock(),e.createElementBlock("svg",la,t[0]||(t[0]=[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)]))}const er={render:aa},ia={class:"vuefinder__delete-modal__content"},ca={class:"vuefinder__delete-modal__form"},da={class:"vuefinder__delete-modal__description"},ua={class:"vuefinder__delete-modal__files vf-scrollbar"},ma={class:"vuefinder__delete-modal__file"},fa={key:0,class:"vuefinder__delete-modal__icon vuefinder__delete-modal__icon--dir",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},va={key:1,class:"vuefinder__delete-modal__icon",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},pa={class:"vuefinder__delete-modal__file-name"},_a={class:"vuefinder__delete-modal__warning"},Ln={__name:"ModalDelete",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(t.modal.data.items),r=e.ref(""),l=()=>{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:i,type:c})=>({path:i,type:c}))},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:o("Files deleted.")})},onError:i=>{r.value=o(i.message)}})};return(i,c)=>(e.openBlock(),e.createBlock(De,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:l,class:"vf-btn vf-btn-danger"},e.toDisplayString(e.unref(o)("Yes, Delete!")),1),e.createElementVNode("button",{type:"button",onClick:c[1]||(c[1]=a=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1),e.createElementVNode("div",_a,e.toDisplayString(e.unref(o)("This action cannot be undone.")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(Fe,{icon:e.unref(er),title:e.unref(o)("Delete files")},null,8,["icon","title"]),e.createElementVNode("div",ia,[e.createElementVNode("div",ca,[e.createElementVNode("p",da,e.toDisplayString(e.unref(o)("Are you sure you want to delete these files?")),1),e.createElementVNode("div",ua,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,a=>(e.openBlock(),e.createElementBlock("p",ma,[a.type==="dir"?(e.openBlock(),e.createElementBlock("svg",fa,c[2]||(c[2]=[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)]))):(e.openBlock(),e.createElementBlock("svg",va,c[3]||(c[3]=[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)]))),e.createElementVNode("span",pa,e.toDisplayString(a.basename),1)]))),256))]),r.value.length?(e.openBlock(),e.createBlock(Te,{key:0,onHidden:c[0]||(c[0]=a=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},ha={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"};function ga(n,t){return e.openBlock(),e.createElementBlock("svg",ha,t[0]||(t[0]=[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)]))}const tr={render:ga},ka={class:"vuefinder__rename-modal__content"},wa={class:"vuefinder__rename-modal__item"},ba={class:"vuefinder__rename-modal__item-info"},ya={key:0,class:"vuefinder__rename-modal__icon vuefinder__rename-modal__icon--dir",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Ea={key:1,class:"vuefinder__rename-modal__icon",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Va={class:"vuefinder__rename-modal__item-name"},On={__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),l=e.ref(""),i=()=>{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:c=>{l.value=o(c.message)}})};return(c,a)=>(e.openBlock(),e.createBlock(De,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:i,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Rename")),1),e.createElementVNode("button",{type:"button",onClick:a[2]||(a[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(Fe,{icon:e.unref(tr),title:e.unref(o)("Rename")},null,8,["icon","title"]),e.createElementVNode("div",ka,[e.createElementVNode("div",wa,[e.createElementVNode("p",ba,[s.value.type==="dir"?(e.openBlock(),e.createElementBlock("svg",ya,a[3]||(a[3]=[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)]))):(e.openBlock(),e.createElementBlock("svg",Ea,a[4]||(a[4]=[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)]))),e.createElementVNode("span",Va,e.toDisplayString(s.value.basename),1)]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=d=>r.value=d),onKeyup:e.withKeys(i,["enter"]),class:"vuefinder__rename-modal__input",placeholder:"Name",type:"text"},null,544),[[e.vModelText,r.value]]),l.value.length?(e.openBlock(),e.createBlock(Te,{key:0,onHidden:a[1]||(a[1]=d=>l.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},Me={ESCAPE:"Escape",F2:"F2",F5:"F5",DELETE:"Delete",ENTER:"Enter",BACKSLASH:"Backslash",KEY_A:"KeyA",KEY_E:"KeyE",KEY_F:"KeyF"};function Sa(n){const t=o=>{o.code===Me.ESCAPE&&(n.modal.close(),n.root.focus()),!n.modal.visible&&(n.fs.searchMode||(o.code===Me.F2&&n.features.includes(J.RENAME)&&(n.dragSelect.getCount()!==1||n.modal.open(On,{items:n.dragSelect.getSelected()})),o.code===Me.F5&&n.emitter.emit("vf-fetch",{params:{q:"index",adapter:n.fs.adapter,path:n.fs.data.dirname}}),o.code===Me.DELETE&&(!n.dragSelect.getCount()||n.modal.open(Ln,{items:n.dragSelect.getSelected()})),o.metaKey&&o.code===Me.BACKSLASH&&n.modal.open(Qo),o.metaKey&&o.code===Me.KEY_F&&n.features.includes(J.SEARCH)&&(n.fs.searchMode=!0,o.preventDefault()),o.metaKey&&o.code===Me.KEY_E&&(n.showTreeView=!n.showTreeView,n.storage.setStore("show-tree-view",n.showTreeView)),o.metaKey&&o.code===Me.ENTER&&(n.fullScreen=!n.fullScreen,n.root.focus()),o.metaKey&&o.code===Me.KEY_A&&(n.dragSelect.selectAll(),o.preventDefault())))};e.onMounted(()=>{n.root.addEventListener("keydown",t)})}const Na={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"};function xa(n,t){return e.openBlock(),e.createElementBlock("svg",Na,t[0]||(t[0]=[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)]))}const nr={render:xa},Ba={class:"vuefinder__new-folder-modal__content"},Ca={class:"vuefinder__new-folder-modal__form"},$a={class:"vuefinder__new-folder-modal__description"},Da=["placeholder"],or={__name:"ModalNewFolder",setup(n){const t=e.inject("ServiceContainer");t.storage;const{t:o}=t.i18n,s=e.ref(""),r=e.ref(""),l=()=>{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:i=>{r.value=o(i.message)}})};return(i,c)=>(e.openBlock(),e.createBlock(De,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:l,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Create")),1),e.createElementVNode("button",{type:"button",onClick:c[2]||(c[2]=a=>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(Fe,{icon:e.unref(nr),title:e.unref(o)("New Folder")},null,8,["icon","title"]),e.createElementVNode("div",Ba,[e.createElementVNode("div",Ca,[e.createElementVNode("p",$a,e.toDisplayString(e.unref(o)("Create a new folder")),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":c[0]||(c[0]=a=>s.value=a),onKeyup:e.withKeys(l,["enter"]),class:"vuefinder__new-folder-modal__input",placeholder:e.unref(o)("Folder Name"),type:"text"},null,40,Da),[[e.vModelText,s.value]]),r.value.length?(e.openBlock(),e.createBlock(Te,{key:0,onHidden:c[1]||(c[1]=a=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},Ta={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"};function Ma(n,t){return e.openBlock(),e.createElementBlock("svg",Ta,t[0]||(t[0]=[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)]))}const rr={render:Ma},Aa={class:"vuefinder__new-file-modal__content"},La={class:"vuefinder__new-file-modal__form"},Oa={class:"vuefinder__new-file-modal__description"},Fa=["placeholder"],Ia={__name:"ModalNewFile",setup(n){const t=e.inject("ServiceContainer");t.storage;const{t:o}=t.i18n,s=e.ref(""),r=e.ref(""),l=()=>{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:i=>{r.value=o(i.message)}})};return(i,c)=>(e.openBlock(),e.createBlock(De,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:l,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Create")),1),e.createElementVNode("button",{type:"button",onClick:c[2]||(c[2]=a=>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(Fe,{icon:e.unref(rr),title:e.unref(o)("New File")},null,8,["icon","title"]),e.createElementVNode("div",Aa,[e.createElementVNode("div",La,[e.createElementVNode("p",Oa,e.toDisplayString(e.unref(o)("Create a new file")),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":c[0]||(c[0]=a=>s.value=a),onKeyup:e.withKeys(l,["enter"]),class:"vuefinder__new-file-modal__input",placeholder:e.unref(o)("File Name"),type:"text"},null,40,Fa),[[e.vModelText,s.value]]),r.value.length?(e.openBlock(),e.createBlock(Te,{key:0,onHidden:c[1]||(c[1]=a=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}};function kn(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 Ha={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"};function Ra(n,t){return e.openBlock(),e.createElementBlock("svg",Ha,t[0]||(t[0]=[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)]))}const sr={render:Ra},za={class:"vuefinder__upload-modal__content"},Ua={key:0,class:"pointer-events-none"},Pa={key:1,class:"pointer-events-none"},qa=["disabled"],ja=["disabled"],Ga={class:"vuefinder__upload-modal__file-list vf-scrollbar"},Ka=["textContent"],Wa={class:"vuefinder__upload-modal__file-info"},Ya={class:"vuefinder__upload-modal__file-name hidden md:block"},Xa={class:"vuefinder__upload-modal__file-name md:hidden"},Za={key:0,class:"ml-auto"},Ja=["title","disabled","onClick"],Qa={key:0,class:"py-2"},ei=["disabled"],ti={__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},l=e.ref({QUEUE_ENTRY_STATUS:r}),i=e.ref(null),c=e.ref(null),a=e.ref(null),d=e.ref(null),m=e.ref(null),u=e.ref(null),v=e.ref([]),f=e.ref(""),p=e.ref(!1),k=e.ref(!1);let b;function V(g){return v.value.findIndex(T=>T.id===g)}function D(g,T=null){T=T??(g.webkitRelativePath||g.name),b.addFile({name:T,type:g.type,data:g,source:"Local"})}function N(g){switch(g.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 y=g=>{switch(g.status){case r.DONE:return"✓";case r.ERROR:case r.CANCELED:return"!";case r.PENDING:default:return"..."}};function x(){d.value.click()}function $(){if(!p.value){if(!v.value.filter(g=>g.status!==r.DONE).length){f.value=o("Please select file to upload first.");return}f.value="",b.retryAll(),b.upload()}}function F(){b.cancelAll({reason:"user"}),v.value.forEach(g=>{g.status!==r.DONE&&(g.status=r.CANCELED,g.statusName=o("Canceled"))}),p.value=!1}function C(g){p.value||(b.removeFile(g.id,"removed-by-user"),v.value.splice(V(g.id),1))}function _(g){if(!p.value){if(b.cancelAll({reason:"user"}),g){const T=[];v.value.forEach(w=>{w.status!==r.DONE&&T.push(w)}),v.value=[],T.forEach(w=>{D(w.originalFile,w.name)});return}v.value.splice(0)}}function h(){t.modal.close()}function B(){return t.requester.transformRequestParams({url:"",method:"post",params:{q:"upload",adapter:t.fs.adapter,path:t.fs.data.dirname}})}return e.onMounted(async()=>{b=new Cr({debug:t.debug,restrictions:{maxFileSize:Rr(t.maxFileSize)},locale:s,onBeforeFileAdded(w,A){if(A[w.id]!=null){const P=V(w.id);v.value[P].status===r.PENDING&&(f.value=b.i18n("noDuplicates",{fileName:w.name})),v.value=v.value.filter(K=>K.id!==w.id)}return v.value.push({id:w.id,name:w.name,size:t.filesize(w.size),status:r.PENDING,statusName:o("Pending upload"),percent:null,originalFile:w.data}),!0}}),b.use($r,{endpoint:"WILL_BE_REPLACED_BEFORE_UPLOAD",limit:5,timeout:0,getResponseError(w,A){let L;try{L=JSON.parse(w).message}catch{L=o("Cannot parse server response.")}return new Error(L)}}),b.on("restriction-failed",(w,A)=>{const L=v.value[V(w.id)];C(L),f.value=A.message}),b.on("upload",()=>{const w=B();b.setMeta({...w.body});const A=b.getPlugin("XHRUpload");A.opts.method=w.method,A.opts.endpoint=w.url+"?"+new URLSearchParams(w.params),A.opts.headers=w.headers,delete w.headers["Content-Type"],p.value=!0,v.value.forEach(L=>{L.status!==r.DONE&&(L.percent=null,L.status=r.UPLOADING,L.statusName=o("Pending upload"))})}),b.on("upload-progress",(w,A)=>{const L=Math.floor(A.bytesUploaded/A.bytesTotal*100);v.value[V(w.id)].percent=`${L}%`}),b.on("upload-success",w=>{const A=v.value[V(w.id)];A.status=r.DONE,A.statusName=o("Done")}),b.on("upload-error",(w,A)=>{const L=v.value[V(w.id)];L.percent=null,L.status=r.ERROR,A.isNetworkError?L.statusName=o("Network Error, Unable establish connection to the server or interrupted."):L.statusName=A?A.message:o("Unknown Error")}),b.on("error",w=>{f.value=w.message,p.value=!1,t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.data.dirname},noCloseModal:!0})}),b.on("complete",()=>{p.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",()=>{c.value.click()}),m.value.addEventListener("click",()=>{a.value.click()}),u.value.addEventListener("dragover",w=>{w.preventDefault(),k.value=!0}),u.value.addEventListener("dragleave",w=>{w.preventDefault(),k.value=!1});function g(w,A){A.isFile&&A.file(L=>w(A,L)),A.isDirectory&&A.createReader().readEntries(L=>{L.forEach(P=>{g(w,P)})})}u.value.addEventListener("drop",w=>{w.preventDefault(),k.value=!1;const A=/^[/\\](.+)/;[...w.dataTransfer.items].forEach(L=>{L.kind==="file"&&g((P,K)=>{const G=A.exec(P.fullPath);D(K,G[1])},L.webkitGetAsEntry())})});const T=({target:w})=>{const A=w.files;for(const L of A)D(L);w.value=""};c.value.addEventListener("change",T),a.value.addEventListener("change",T)}),e.onBeforeUnmount(()=>{b==null||b.close({reason:"unmount"})}),(g,T)=>(e.openBlock(),e.createBlock(De,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"vf-btn vf-btn-primary",disabled:p.value,onClick:e.withModifiers($,["prevent"])},e.toDisplayString(e.unref(o)("Upload")),9,ei),p.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"vf-btn vf-btn-secondary",onClick:e.withModifiers(F,["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(h,["prevent"])},e.toDisplayString(e.unref(o)("Close")),1))]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(Fe,{icon:e.unref(sr),title:e.unref(o)("Upload Files")},null,8,["icon","title"]),e.createElementVNode("div",za,[e.createElementVNode("div",{class:"vuefinder__upload-modal__drop-area",ref_key:"dropArea",ref:u,onClick:x},[k.value?(e.openBlock(),e.createElementBlock("div",Ua,e.toDisplayString(e.unref(o)("Release to drop these files.")),1)):(e.openBlock(),e.createElementBlock("div",Pa,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:i,class:"vuefinder__upload-modal__buttons"},[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:m,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:p.value,onClick:T[0]||(T[0]=w=>_(!1))},e.toDisplayString(e.unref(o)("Clear all")),9,qa),e.createElementVNode("button",{type:"button",class:"vf-btn vf-btn-secondary",disabled:p.value,onClick:T[1]||(T[1]=w=>_(!0))},e.toDisplayString(e.unref(o)("Clear only successful")),9,ja)],512),e.createElementVNode("div",Ga,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,w=>(e.openBlock(),e.createElementBlock("div",{class:"vuefinder__upload-modal__file-entry",key:w.id},[e.createElementVNode("span",{class:e.normalizeClass(["vuefinder__upload-modal__file-icon",N(w)])},[e.createElementVNode("span",{class:"vuefinder__upload-modal__file-icon-text",textContent:e.toDisplayString(y(w))},null,8,Ka)],2),e.createElementVNode("div",Wa,[e.createElementVNode("div",Ya,e.toDisplayString(e.unref(kn)(w.name,40))+" ("+e.toDisplayString(w.size)+")",1),e.createElementVNode("div",Xa,e.toDisplayString(e.unref(kn)(w.name,16))+" ("+e.toDisplayString(w.size)+")",1),e.createElementVNode("div",{class:e.normalizeClass(["vuefinder__upload-modal__file-status",N(w)])},[e.createTextVNode(e.toDisplayString(w.statusName)+" ",1),w.status===l.value.QUEUE_ENTRY_STATUS.UPLOADING?(e.openBlock(),e.createElementBlock("b",Za,e.toDisplayString(w.percent),1)):e.createCommentVNode("",!0)],2)]),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["vuefinder__upload-modal__file-remove",p.value?"disabled":""]),title:e.unref(o)("Delete"),disabled:p.value,onClick:A=>C(w)},T[3]||(T[3]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"vuefinder__upload-modal__file-remove-icon"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)]),10,Ja)]))),128)),v.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Qa,e.toDisplayString(e.unref(o)("No files selected!")),1))]),f.value.length?(e.openBlock(),e.createBlock(Te,{key:0,onHidden:T[2]||(T[2]=w=>f.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.value),1)]),_:1})):e.createCommentVNode("",!0)])]),e.createElementVNode("input",{ref_key:"internalFileInput",ref:c,type:"file",multiple:"",class:"hidden"},null,512),e.createElementVNode("input",{ref_key:"internalFolderInput",ref:a,type:"file",multiple:"",webkitdirectory:"",class:"hidden"},null,512)]),_:1}))}},ni={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"};function oi(n,t){return e.openBlock(),e.createElementBlock("svg",ni,t[0]||(t[0]=[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)]))}const lr={render:oi},ri={class:"vuefinder__unarchive-modal__content"},si={class:"vuefinder__unarchive-modal__items"},li={class:"vuefinder__unarchive-modal__item"},ai={key:0,class:"vuefinder__unarchive-modal__icon vuefinder__unarchive-modal__icon--dir",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},ii={key:1,class:"vuefinder__unarchive-modal__icon vuefinder__unarchive-modal__icon--file",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},ci={class:"vuefinder__unarchive-modal__item-name"},di={class:"vuefinder__unarchive-modal__info"},ar={__name:"ModalUnarchive",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(t.modal.data.items[0]),r=e.ref(""),l=e.ref([]),i=()=>{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:c=>{r.value=o(c.message)}})};return(c,a)=>(e.openBlock(),e.createBlock(De,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:i,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Unarchive")),1),e.createElementVNode("button",{type:"button",onClick:a[1]||(a[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(Fe,{icon:e.unref(lr),title:e.unref(o)("Unarchive")},null,8,["icon","title"]),e.createElementVNode("div",ri,[e.createElementVNode("div",si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,d=>(e.openBlock(),e.createElementBlock("p",li,[d.type==="dir"?(e.openBlock(),e.createElementBlock("svg",ai,a[2]||(a[2]=[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)]))):(e.openBlock(),e.createElementBlock("svg",ii,a[3]||(a[3]=[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)]))),e.createElementVNode("span",ci,e.toDisplayString(d.basename),1)]))),256)),e.createElementVNode("p",di,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(Te,{key:0,onHidden:a[0]||(a[0]=d=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},ui={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"};function mi(n,t){return e.openBlock(),e.createElementBlock("svg",ui,t[0]||(t[0]=[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)]))}const ir={render:mi},fi={class:"vuefinder__archive-modal__content"},vi={class:"vuefinder__archive-modal__form"},pi={class:"vuefinder__archive-modal__files vf-scrollbar"},_i={class:"vuefinder__archive-modal__file"},hi={key:0,class:"vuefinder__archive-modal__icon vuefinder__archive-modal__icon--dir",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},gi={key:1,class:"vuefinder__archive-modal__icon",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},ki={class:"vuefinder__archive-modal__file-name"},wi=["placeholder"],cr={__name:"ModalArchive",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(""),r=e.ref(""),l=e.ref(t.modal.data.items),i=()=>{l.value.length&&t.emitter.emit("vf-fetch",{params:{q:"archive",m:"post",adapter:t.fs.adapter,path:t.fs.data.dirname},body:{items:l.value.map(({path:c,type:a})=>({path:c,type:a})),name:s.value},onSuccess:()=>{t.emitter.emit("vf-toast-push",{label:o("The file(s) archived.")})},onError:c=>{r.value=o(c.message)}})};return(c,a)=>(e.openBlock(),e.createBlock(De,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:i,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Archive")),1),e.createElementVNode("button",{type:"button",onClick:a[2]||(a[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(Fe,{icon:e.unref(ir),title:e.unref(o)("Archive the files")},null,8,["icon","title"]),e.createElementVNode("div",fi,[e.createElementVNode("div",vi,[e.createElementVNode("div",pi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,d=>(e.openBlock(),e.createElementBlock("p",_i,[d.type==="dir"?(e.openBlock(),e.createElementBlock("svg",hi,a[3]||(a[3]=[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)]))):(e.openBlock(),e.createElementBlock("svg",gi,a[4]||(a[4]=[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)]))),e.createElementVNode("span",ki,e.toDisplayString(d.basename),1)]))),256))]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=d=>s.value=d),onKeyup:e.withKeys(i,["enter"]),class:"vuefinder__archive-modal__input",placeholder:e.unref(o)("Archive name. (.zip file will be created)"),type:"text"},null,40,wi),[[e.vModelText,s.value]]),r.value.length?(e.openBlock(),e.createBlock(Te,{key:0,onHidden:a[1]||(a[1]=d=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}},bi={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"};function yi(n,t){return e.openBlock(),e.createElementBlock("svg",bi,t[0]||(t[0]=[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),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)]))}const Fn={render:yi},Ei={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"};function Vi(n,t){return e.openBlock(),e.createElementBlock("svg",Ei,t[0]||(t[0]=[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)]))}const Si={render:Vi},Ni={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"};function xi(n,t){return e.openBlock(),e.createElementBlock("svg",Ni,t[0]||(t[0]=[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)]))}const Bi={render:xi},Ci={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"};function $i(n,t){return e.openBlock(),e.createElementBlock("svg",Ci,t[0]||(t[0]=[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)]))}const Di={render:$i},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"};function Mi(n,t){return e.openBlock(),e.createElementBlock("svg",Ti,t[0]||(t[0]=[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)]))}const Ai={render:Mi},Li={class:"vuefinder__toolbar"},Oi={key:0,class:"vuefinder__toolbar__actions"},Fi=["title"],Ii=["title"],Hi=["title"],Ri=["title"],zi=["title"],Ui=["title"],Pi=["title"],qi={key:1,class:"vuefinder__toolbar__search-results"},ji={class:"pl-2"},Gi={class:"dark:bg-gray-700 bg-gray-200 text-xs px-2 py-1 rounded"},Ki={class:"vuefinder__toolbar__controls"},Wi=["title"],Yi=["title"],Xi={__name:"Toolbar",setup(n){const t=e.inject("ServiceContainer"),{setStore:o}=t.storage,{t:s}=t.i18n,r=t.dragSelect,l=e.ref("");t.emitter.on("vf-search-query",({newQuery:a})=>{l.value=a});const i=()=>{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 c=()=>{t.view=t.view==="list"?"grid":"list",r.refreshSelection(),o("viewport",t.view)};return(a,d)=>(e.openBlock(),e.createElementBlock("div",Li,[l.value.length?(e.openBlock(),e.createElementBlock("div",qi,[e.createElementVNode("div",ji,[e.createTextVNode(e.toDisplayString(e.unref(s)("Search results for"))+" ",1),e.createElementVNode("span",Gi,e.toDisplayString(l.value),1)]),e.unref(t).loadingIndicator==="circular"&&e.unref(t).fs.loading?(e.openBlock(),e.createBlock(e.unref(Fn),{key:0})):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",Oi,[e.unref(t).features.includes(e.unref(J).NEW_FOLDER)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mx-1.5",title:e.unref(s)("New Folder"),onClick:d[0]||(d[0]=m=>e.unref(t).modal.open(or,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(nr))],8,Fi)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(J).NEW_FILE)?(e.openBlock(),e.createElementBlock("div",{key:1,class:"mx-1.5",title:e.unref(s)("New File"),onClick:d[1]||(d[1]=m=>e.unref(t).modal.open(Ia,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(rr))],8,Ii)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(J).RENAME)?(e.openBlock(),e.createElementBlock("div",{key:2,class:"mx-1.5",title:e.unref(s)("Rename"),onClick:d[2]||(d[2]=m=>e.unref(r).getCount()!==1||e.unref(t).modal.open(On,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(tr),{class:e.normalizeClass(e.unref(r).getCount()===1?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,Hi)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(J).DELETE)?(e.openBlock(),e.createElementBlock("div",{key:3,class:"mx-1.5",title:e.unref(s)("Delete"),onClick:d[3]||(d[3]=m=>!e.unref(r).getCount()||e.unref(t).modal.open(Ln,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(er),{class:e.normalizeClass(e.unref(r).getCount()?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,Ri)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(J).UPLOAD)?(e.openBlock(),e.createElementBlock("div",{key:4,class:"mx-1.5",title:e.unref(s)("Upload"),onClick:d[4]||(d[4]=m=>e.unref(t).modal.open(ti,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(sr))],8,zi)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(J).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]=m=>!e.unref(r).getCount()||e.unref(t).modal.open(ar,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(lr),{class:e.normalizeClass(e.unref(r).getCount()?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,Ui)):e.createCommentVNode("",!0),e.unref(t).features.includes(e.unref(J).ARCHIVE)?(e.openBlock(),e.createElementBlock("div",{key:6,class:"mx-1.5",title:e.unref(s)("Archive"),onClick:d[6]||(d[6]=m=>!e.unref(r).getCount()||e.unref(t).modal.open(cr,{items:e.unref(r).getSelected()}))},[e.createVNode(e.unref(ir),{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",Ki,[e.unref(t).features.includes(e.unref(J).FULL_SCREEN)?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:i,class:"mx-1.5",title:e.unref(s)("Toggle Full Screen")},[e.unref(t).fullScreen?(e.openBlock(),e.createBlock(e.unref(Bi),{key:0})):(e.openBlock(),e.createBlock(e.unref(Si),{key:1}))],8,Wi)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"mx-1.5",title:e.unref(s)("Change View"),onClick:d[7]||(d[7]=m=>l.value.length||c())},[e.unref(t).view==="grid"?(e.openBlock(),e.createBlock(e.unref(Di),{key:0,class:e.normalizeClass(["vf-toolbar-icon",l.value.length?"vf-toolbar-icon-disabled":""])},null,8,["class"])):e.createCommentVNode("",!0),e.unref(t).view==="list"?(e.openBlock(),e.createBlock(e.unref(Ai),{key:1,class:e.normalizeClass(["vf-toolbar-icon",l.value.length?"vf-toolbar-icon-disabled":""])},null,8,["class"])):e.createCommentVNode("",!0)],8,Yi)])]))}},Zi=(n,t=0,o=!1)=>{let s;return(...r)=>{o&&!s&&n(...r),clearTimeout(s),s=setTimeout(()=>{n(...r)},t)}},lo=(n,t,o)=>{const s=e.ref(n);return e.customRef((r,l)=>({get(){return r(),s.value},set:Zi(i=>{s.value=i,l()},t,o)}))},Ji={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"};function Qi(n,t){return e.openBlock(),e.createElementBlock("svg",Ji,t[0]||(t[0]=[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)]))}const ec={render:Qi},tc={class:"vuefinder__move-modal__content"},nc={class:"vuefinder__move-modal__description"},oc={class:"vuefinder__move-modal__files vf-scrollbar"},rc={class:"vuefinder__move-modal__file"},sc={key:0,class:"vuefinder__move-modal__icon vuefinder__move-modal__icon--dir",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},lc={key:1,class:"vuefinder__move-modal__icon",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},ac={class:"vuefinder__move-modal__file-name"},ic={class:"vuefinder__move-modal__target-title"},cc={class:"vuefinder__move-modal__target-directory"},dc={class:"vuefinder__move-modal__target-path"},uc={class:"vuefinder__move-modal__selected-items"},wn={__name:"ModalMove",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(t.modal.data.items.from),r=e.ref(""),l=()=>{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:i,type:c})=>({path:i,type:c})),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:i=>{r.value=o(i.message)}})};return(i,c)=>(e.openBlock(),e.createBlock(De,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:l,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Yes, Move!")),1),e.createElementVNode("button",{type:"button",onClick:c[1]||(c[1]=a=>e.unref(t).modal.close()),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1),e.createElementVNode("div",uc,e.toDisplayString(e.unref(o)("%s item(s) selected.",s.value.length)),1)]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(Fe,{icon:e.unref(ec),title:e.unref(o)("Move files")},null,8,["icon","title"]),e.createElementVNode("div",tc,[e.createElementVNode("p",nc,e.toDisplayString(e.unref(o)("Are you sure you want to move these files?")),1),e.createElementVNode("div",oc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,a=>(e.openBlock(),e.createElementBlock("div",rc,[e.createElementVNode("div",null,[a.type==="dir"?(e.openBlock(),e.createElementBlock("svg",sc,c[2]||(c[2]=[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)]))):(e.openBlock(),e.createElementBlock("svg",lc,c[3]||(c[3]=[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)])))]),e.createElementVNode("div",ac,e.toDisplayString(a.path),1)]))),256))]),e.createElementVNode("h4",ic,e.toDisplayString(e.unref(o)("Target Directory")),1),e.createElementVNode("p",cc,[c[4]||(c[4]=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"vuefinder__move-modal__icon vuefinder__move-modal__icon--dir",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)),e.createElementVNode("span",dc,e.toDisplayString(e.unref(t).modal.data.items.to.path),1)]),r.value.length?(e.openBlock(),e.createBlock(Te,{key:0,onHidden:c[0]||(c[0]=a=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])]),_:1}))}},mc={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"};function fc(n,t){return e.openBlock(),e.createElementBlock("svg",mc,t[0]||(t[0]=[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)]))}const vc={render:fc},pc={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-6 w-6 p-0.5 rounded",viewBox:"0 0 20 20"};function _c(n,t){return e.openBlock(),e.createElementBlock("svg",pc,t[0]||(t[0]=[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)]))}const hc={render:_c},gc={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"};function kc(n,t){return e.openBlock(),e.createElementBlock("svg",gc,t[0]||(t[0]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"},null,-1)]))}const wc={render:kc},bc={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"};function yc(n,t){return e.openBlock(),e.createElementBlock("svg",bc,t[0]||(t[0]=[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)]))}const Ec={render:yc},Vc={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"};function Sc(n,t){return e.openBlock(),e.createElementBlock("svg",Vc,t[0]||(t[0]=[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)]))}const Nc={render:Sc},xc={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"};function Bc(n,t){return e.openBlock(),e.createElementBlock("svg",xc,t[0]||(t[0]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"},null,-1)]))}const Cc={render:Bc},$c={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"};function Dc(n,t){return e.openBlock(),e.createElementBlock("svg",$c,t[0]||(t[0]=[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)]))}const jt={render:Dc},Tc={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"};function Mc(n,t){return e.openBlock(),e.createElementBlock("svg",Tc,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),e.createElementVNode("path",{d:"M9 6h11M12 12h8M15 18h5M5 6v.01M8 12v.01M11 18v.01"},null,-1)]))}const Ac={render:Mc},Lc={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"};function Oc(n,t){return e.openBlock(),e.createElementBlock("svg",Lc,t[0]||(t[0]=[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)]))}const Fc={render:Oc},Ic={class:"vuefinder__breadcrumb__container"},Hc=["title"],Rc=["title"],zc=["title"],Uc=["title"],Pc={class:"vuefinder__breadcrumb__list"},qc={key:0,class:"vuefinder__breadcrumb__hidden-list"},jc={class:"relative"},Gc=["onDragover","onDragleave","onDrop","title","onClick"],Kc={class:"vuefinder__breadcrumb__search-mode"},Wc=["placeholder"],Yc={class:"vuefinder__breadcrumb__hidden-dropdown"},Xc=["onDrop","onClick"],Zc={class:"vuefinder__breadcrumb__hidden-item-content"},Jc={class:"vuefinder__breadcrumb__hidden-item-text"},Qc={__name:"Breadcrumb",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=t.dragSelect,{setStore:r}=t.storage,l=e.ref(null),i=lo(0,100);e.watch(i,C=>{const _=l.value.children;let h=0,B=0,g=5,T=1;t.fs.limitBreadcrumbItems(g),e.nextTick(()=>{for(let w=_.length-1;w>=0&&!(h+_[w].offsetWidth>i.value-40);w--)h+=parseInt(_[w].offsetWidth,10),B++;Bg&&(B=g),t.fs.limitBreadcrumbItems(B)})});const c=()=>{i.value=l.value.offsetWidth};let a=e.ref(null);e.onMounted(()=>{a.value=new ResizeObserver(c),a.value.observe(l.value)}),e.onUnmounted(()=>{a.value.disconnect()});const d=(C,_=null)=>{C.preventDefault(),s.isDraggingRef.value=!1,v(C),_??(_=t.fs.hiddenBreadcrumbs.length-1);let h=JSON.parse(C.dataTransfer.getData("items"));if(h.find(B=>B.storage!==t.fs.adapter)){alert("Moving items between different storages is not supported yet.");return}t.modal.open(wn,{items:{from:h,to:t.fs.hiddenBreadcrumbs[_]??{path:t.fs.adapter+"://"}}})},m=(C,_=null)=>{C.preventDefault(),s.isDraggingRef.value=!1,v(C),_??(_=t.fs.breadcrumbs.length-2);let h=JSON.parse(C.dataTransfer.getData("items"));if(h.find(B=>B.storage!==t.fs.adapter)){alert("Moving items between different storages is not supported yet.");return}t.modal.open(wn,{items:{from:h,to:t.fs.breadcrumbs[_]??{path:t.fs.adapter+"://"}}})},u=C=>{C.preventDefault(),t.fs.isGoUpAvailable()?(C.dataTransfer.dropEffect="copy",C.currentTarget.classList.add("bg-blue-200","dark:bg-slate-600")):(C.dataTransfer.dropEffect="none",C.dataTransfer.effectAllowed="none")},v=C=>{C.preventDefault(),C.currentTarget.classList.remove("bg-blue-200","dark:bg-slate-600"),t.fs.isGoUpAvailable()&&C.currentTarget.classList.remove("bg-blue-200","dark:bg-slate-600")},f=()=>{$(),t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.data.dirname}})},p=()=>{$(),!t.fs.isGoUpAvailable()||t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:t.fs.parentFolderPath}})},k=C=>{t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:C.path}}),t.fs.toggleHiddenBreadcrumbs(!1)},b=()=>{t.fs.showHiddenBreadcrumbs&&t.fs.toggleHiddenBreadcrumbs(!1)},V={mounted(C,_,h,B){C.clickOutsideEvent=function(g){C===g.target||C.contains(g.target)||_.value()},document.body.addEventListener("click",C.clickOutsideEvent)},beforeUnmount(C,_,h,B){document.body.removeEventListener("click",C.clickOutsideEvent)}},D=()=>{t.showTreeView=!t.showTreeView};e.watch(()=>t.showTreeView,(C,_)=>{C!==_&&r("show-tree-view",C)});const N=e.ref(null),y=()=>{t.features.includes(J.SEARCH)&&(t.fs.searchMode=!0,e.nextTick(()=>N.value.focus()))},x=lo("",400);e.watch(x,C=>{t.emitter.emit("vf-toast-clear"),t.emitter.emit("vf-search-query",{newQuery:C})}),e.watch(()=>t.fs.searchMode,C=>{C&&e.nextTick(()=>N.value.focus())});const $=()=>{t.fs.searchMode=!1,x.value=""};t.emitter.on("vf-search-exit",()=>{$()});const F=()=>{x.value===""&&$()};return(C,_)=>(e.openBlock(),e.createElementBlock("div",Ic,[e.createElementVNode("span",{title:e.unref(o)("Toggle Tree View")},[e.createVNode(e.unref(Ac),{onClick:D,class:e.normalizeClass(["vuefinder__breadcrumb__toggle-tree",e.unref(t).showTreeView?"vuefinder__breadcrumb__toggle-tree--active":""])},null,8,["class"])],8,Hc),e.createElementVNode("span",{title:e.unref(o)("Go up a directory")},[e.createVNode(e.unref(hc),{onDragover:_[0]||(_[0]=h=>u(h)),onDragleave:_[1]||(_[1]=h=>v(h)),onDrop:_[2]||(_[2]=h=>m(h)),onClick:p,class:e.normalizeClass(e.unref(t).fs.isGoUpAvailable()?"vuefinder__breadcrumb__go-up--active":"vuefinder__breadcrumb__go-up--inactive")},null,8,["class"])],8,Rc),e.unref(t).fs.loading?(e.openBlock(),e.createElementBlock("span",{key:1,title:e.unref(o)("Cancel")},[e.createVNode(e.unref(wc),{onClick:_[3]||(_[3]=h=>e.unref(t).emitter.emit("vf-fetch-abort"))})],8,Uc)):(e.openBlock(),e.createElementBlock("span",{key:0,title:e.unref(o)("Refresh")},[e.createVNode(e.unref(vc),{onClick:f})],8,zc)),e.withDirectives(e.createElementVNode("div",{onClick:e.withModifiers(y,["self"]),class:"group vuefinder__breadcrumb__search-container"},[e.createElementVNode("div",null,[e.createVNode(e.unref(Ec),{onDragover:_[4]||(_[4]=h=>u(h)),onDragleave:_[5]||(_[5]=h=>v(h)),onDrop:_[6]||(_[6]=h=>m(h,-1)),onClick:_[7]||(_[7]=h=>e.unref(t).emitter.emit("vf-fetch",{params:{q:"index",adapter:e.unref(t).fs.adapter}}))})]),e.createElementVNode("div",Pc,[e.unref(t).fs.hiddenBreadcrumbs.length?e.withDirectives((e.openBlock(),e.createElementBlock("div",qc,[_[13]||(_[13]=e.createElementVNode("div",{class:"vuefinder__breadcrumb__separator"},"/",-1)),e.createElementVNode("div",jc,[e.createElementVNode("span",{onDragenter:_[8]||(_[8]=h=>e.unref(t).fs.toggleHiddenBreadcrumbs(!0)),onClick:_[9]||(_[9]=h=>e.unref(t).fs.toggleHiddenBreadcrumbs()),class:"vuefinder__breadcrumb__hidden-toggle"},[e.createVNode(e.unref(Fc),{class:"vuefinder__breadcrumb__hidden-toggle-icon"})],32)])])),[[V,b]]):e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"breadcrumbContainer",ref:l,class:"vuefinder__breadcrumb__visible-list",onClick:e.withModifiers(y,["self"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).fs.breadcrumbs,(h,B)=>(e.openBlock(),e.createElementBlock("div",{key:B},[_[14]||(_[14]=e.createElementVNode("span",{class:"vuefinder__breadcrumb__separator"},"/",-1)),e.createElementVNode("span",{onDragover:g=>B===e.unref(t).fs.breadcrumbs.length-1||u(g),onDragleave:g=>B===e.unref(t).fs.breadcrumbs.length-1||v(g),onDrop:g=>B===e.unref(t).fs.breadcrumbs.length-1||m(g,B),class:"vuefinder__breadcrumb__item",title:h.basename,onClick:g=>e.unref(t).emitter.emit("vf-fetch",{params:{q:"index",adapter:e.unref(t).fs.adapter,path:h.path}})},e.toDisplayString(h.name),41,Gc)]))),128))],512),e.unref(t).loadingIndicator==="circular"&&e.unref(t).fs.loading?(e.openBlock(),e.createBlock(e.unref(Fn),{key:0})):e.createCommentVNode("",!0)],512),[[e.vShow,!e.unref(t).fs.searchMode]]),e.withDirectives(e.createElementVNode("div",Kc,[e.createElementVNode("div",null,[e.createVNode(e.unref(Nc))]),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:N,onKeydown:e.withKeys($,["esc"]),onBlur:F,"onUpdate:modelValue":_[10]||(_[10]=h=>e.isRef(x)?x.value=h:null),placeholder:e.unref(o)("Search anything.."),class:"vuefinder__breadcrumb__search-input",type:"text"},null,40,Wc),[[e.vModelText,e.unref(x)]]),e.createVNode(e.unref(Cc),{onClick:$})],512),[[e.vShow,e.unref(t).fs.searchMode]]),e.withDirectives(e.createElementVNode("div",Yc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).fs.hiddenBreadcrumbs,(h,B)=>(e.openBlock(),e.createElementBlock("div",{key:B,onDragover:_[11]||(_[11]=g=>u(g)),onDragleave:_[12]||(_[12]=g=>v(g)),onDrop:g=>d(g,B),onClick:g=>k(h),class:"vuefinder__breadcrumb__hidden-item"},[e.createElementVNode("div",Zc,[e.createElementVNode("span",null,[e.createVNode(e.unref(jt),{class:"vuefinder__breadcrumb__hidden-item-icon"})]),_[15]||(_[15]=e.createTextVNode()),e.createElementVNode("span",Jc,e.toDisplayString(h.name),1)])],40,Xc))),128))],512),[[e.vShow,e.unref(t).fs.showHiddenBreadcrumbs]])]))}},dr=(n,t=null)=>new Date(n*1e3).toLocaleString(t??navigator.language??"en-US"),ed=["onClick"],td={__name:"Toast",setup(n){const t=e.inject("ServiceContainer"),{getStore:o}=t.storage,s=e.ref(o("full-screen",!1)),r=e.ref([]),l=a=>a==="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",i=a=>{r.value.splice(a,1)},c=a=>{let d=r.value.findIndex(m=>m.id===a);d!==-1&&i(d)};return t.emitter.on("vf-toast-clear",()=>{r.value=[]}),t.emitter.on("vf-toast-push",a=>{let d=new Date().getTime().toString(36).concat(performance.now().toString(),Math.random().toString()).replace(/\./g,"");a.id=d,r.value.push(a),setTimeout(()=>{c(d)},5e3)}),(a,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["vuefinder__toast",s.value.value?"vuefinder__toast--fixed":"vuefinder__toast--absolute"])},[e.createVNode(e.TransitionGroup,{name:"vuefinder__toast-item","enter-active-class":"vuefinder__toast-item--enter-active","leave-active-class":"vuefinder__toast-item--leave-active","leave-to-class":"vuefinder__toast-item--leave-to"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(m,u)=>(e.openBlock(),e.createElementBlock("div",{key:u,onClick:v=>i(u),class:e.normalizeClass(["vuefinder__toast__message",l(m.type)])},e.toDisplayString(m.label),11,ed))),128))]),_:1})],2))}},nd={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-5 w-5",viewBox:"0 0 20 20"};function od(n,t){return e.openBlock(),e.createElementBlock("svg",nd,t[0]||(t[0]=[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)]))}const rd={render:od},sd={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-5 w-5",viewBox:"0 0 20 20"};function ld(n,t){return e.openBlock(),e.createElementBlock("svg",sd,t[0]||(t[0]=[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)]))}const ad={render:ld},Vt={__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(rd),{key:0})):e.createCommentVNode("",!0),n.direction==="desc"?(e.openBlock(),e.createBlock(e.unref(ad),{key:1})):e.createCommentVNode("",!0)]))}},id={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",class:"text-neutral-500",viewBox:"0 0 24 24"};function cd(n,t){return e.openBlock(),e.createElementBlock("svg",id,t[0]||(t[0]=[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)]))}const dd={render:cd},ud={class:"vuefinder__item-icon"},tn={__name:"ItemIcon",props:{type:{type:String,required:!0},small:{type:Boolean,default:!1}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("span",ud,[n.type==="dir"?(e.openBlock(),e.createBlock(e.unref(jt),{key:0,class:e.normalizeClass(n.small?"vuefinder__item-icon--small":"vuefinder__item-icon--large")},null,8,["class"])):(e.openBlock(),e.createBlock(e.unref(dd),{key:1,class:e.normalizeClass(n.small?"vuefinder__item-icon--small":"vuefinder__item-icon--large")},null,8,["class"]))]))}},md={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"};function fd(n,t){return e.openBlock(),e.createElementBlock("svg",md,t[0]||(t[0]=[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)]))}const vd={render:fd},pd={class:"vuefinder__drag-item__container"},_d={class:"vuefinder__drag-item__count"},hd={__name:"DragItem",props:{count:{type:Number,default:0}},setup(n){const t=n;return(o,s)=>(e.openBlock(),e.createElementBlock("div",pd,[e.createVNode(e.unref(vd)),e.createElementVNode("div",_d,e.toDisplayString(t.count),1)]))}},gd={class:"vuefinder__text-preview"},kd={class:"vuefinder__text-preview__header"},wd=["title"],bd={class:"vuefinder__text-preview__actions"},yd={key:0,class:"vuefinder__text-preview__content"},Ed={key:1},Vd={__name:"Text",emits:["success"],setup(n,{emit:t}){const o=t,s=e.ref(""),r=e.ref(""),l=e.ref(null),i=e.ref(!1),c=e.ref(""),a=e.ref(!1),d=e.inject("ServiceContainer"),{t:m}=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(f=>{s.value=f,o("success")})});const u=()=>{i.value=!i.value,r.value=s.value},v=()=>{c.value="",a.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(f=>{c.value=m("Updated."),s.value=f,o("success"),i.value=!i.value}).catch(f=>{c.value=m(f.message),a.value=!0})};return(f,p)=>(e.openBlock(),e.createElementBlock("div",gd,[e.createElementVNode("div",kd,[e.createElementVNode("div",{class:"vuefinder__text-preview__title",id:"modal-title",title:e.unref(d).modal.data.item.path},e.toDisplayString(e.unref(d).modal.data.item.basename),9,wd),e.createElementVNode("div",bd,[i.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:v,class:"vuefinder__text-preview__save-button"},e.toDisplayString(e.unref(m)("Save")),1)):e.createCommentVNode("",!0),e.unref(d).features.includes(e.unref(J).EDIT)?(e.openBlock(),e.createElementBlock("button",{key:1,class:"vuefinder__text-preview__edit-button",onClick:p[0]||(p[0]=k=>u())},e.toDisplayString(i.value?e.unref(m)("Cancel"):e.unref(m)("Edit")),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",null,[i.value?(e.openBlock(),e.createElementBlock("div",Ed,[e.withDirectives(e.createElementVNode("textarea",{ref_key:"editInput",ref:l,"onUpdate:modelValue":p[1]||(p[1]=k=>r.value=k),class:"vuefinder__text-preview__textarea",name:"text",cols:"30",rows:"10"},null,512),[[e.vModelText,r.value]])])):(e.openBlock(),e.createElementBlock("pre",yd,e.toDisplayString(s.value),1)),c.value.length?(e.openBlock(),e.createBlock(Te,{key:2,onHidden:p[2]||(p[2]=k=>c.value=""),error:a.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value),1)]),_:1},8,["error"])):e.createCommentVNode("",!0)])]))}},Sd={class:"vuefinder__image-preview"},Nd={class:"vuefinder__image-preview__header"},xd=["title"],Bd={class:"vuefinder__image-preview__actions"},Cd={class:"vuefinder__image-preview__image-container"},$d=["src"],Dd={__name:"Image",emits:["success"],setup(n,{emit:t}){const o=t,s=e.inject("ServiceContainer"),{t:r}=s.i18n,l=e.ref(null),i=e.ref(null),c=e.ref(!1),a=e.ref(""),d=e.ref(!1),m=()=>{c.value=!c.value,c.value?i.value=new Tr(l.value,{crop(v){}}):i.value.destroy()},u=()=>{i.value.getCroppedCanvas({width:795,height:341}).toBlob(v=>{a.value="",d.value=!1;const f=new FormData;f.set("file",v),s.requester.send({url:"",method:"post",params:{q:"upload",adapter:s.modal.data.adapter,path:s.modal.data.item.path},body:f}).then(p=>{a.value=r("Updated."),l.value.src=s.requester.getPreviewUrl(s.modal.data.adapter,s.modal.data.item),m(),o("success")}).catch(p=>{a.value=r(p.message),d.value=!0})})};return e.onMounted(()=>{o("success")}),(v,f)=>(e.openBlock(),e.createElementBlock("div",Sd,[e.createElementVNode("div",Nd,[e.createElementVNode("h3",{class:"vuefinder__image-preview__title",id:"modal-title",title:e.unref(s).modal.data.item.path},e.toDisplayString(e.unref(s).modal.data.item.basename),9,xd),e.createElementVNode("div",Bd,[c.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:u,class:"vuefinder__image-preview__crop-button"},e.toDisplayString(e.unref(r)("Crop")),1)):e.createCommentVNode("",!0),e.unref(s).features.includes(e.unref(J).EDIT)?(e.openBlock(),e.createElementBlock("button",{key:1,class:"vuefinder__image-preview__edit-button",onClick:f[0]||(f[0]=p=>m())},e.toDisplayString(c.value?e.unref(r)("Cancel"):e.unref(r)("Edit")),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Cd,[e.createElementVNode("img",{ref_key:"image",ref:l,class:"vuefinder__image-preview__image",src:e.unref(s).requester.getPreviewUrl(e.unref(s).modal.data.adapter,e.unref(s).modal.data.item),alt:""},null,8,$d)]),a.value.length?(e.openBlock(),e.createBlock(Te,{key:0,onHidden:f[1]||(f[1]=p=>a.value=""),error:d.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value),1)]),_:1},8,["error"])):e.createCommentVNode("",!0)]))}},Td={class:"vuefinder__default-preview"},Md={class:"vuefinder__default-preview__header"},Ad=["title"],Ld={__name:"Default",emits:["success"],setup(n,{emit:t}){const o=e.inject("ServiceContainer"),s=t;return e.onMounted(()=>{s("success")}),(r,l)=>(e.openBlock(),e.createElementBlock("div",Td,[e.createElementVNode("div",Md,[e.createElementVNode("h3",{class:"vuefinder__default-preview__title",id:"modal-title",title:e.unref(o).modal.data.item.path},e.toDisplayString(e.unref(o).modal.data.item.basename),9,Ad)]),l[0]||(l[0]=e.createElementVNode("div",null,null,-1))]))}},Od={class:"vuefinder__video-preview"},Fd=["title"],Id={class:"vuefinder__video-preview__video",preload:"",controls:""},Hd=["src"],Rd={__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")}),(l,i)=>(e.openBlock(),e.createElementBlock("div",Od,[e.createElementVNode("h3",{class:"vuefinder__video-preview__title",id:"modal-title",title:e.unref(o).modal.data.item.path},e.toDisplayString(e.unref(o).modal.data.item.basename),9,Fd),e.createElementVNode("div",null,[e.createElementVNode("video",Id,[e.createElementVNode("source",{src:r(),type:"video/mp4"},null,8,Hd),i[0]||(i[0]=e.createTextVNode(" Your browser does not support the video tag. "))])])]))}},zd={class:"vuefinder__audio-preview"},Ud=["title"],Pd={class:"vuefinder__audio-preview__audio",controls:""},qd=["src"],jd={__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")}),(l,i)=>(e.openBlock(),e.createElementBlock("div",zd,[e.createElementVNode("h3",{class:"vuefinder__audio-preview__title",id:"modal-title",title:e.unref(s).modal.data.item.path},e.toDisplayString(e.unref(s).modal.data.item.basename),9,Ud),e.createElementVNode("div",null,[e.createElementVNode("audio",Pd,[e.createElementVNode("source",{src:r(),type:"audio/mpeg"},null,8,qd),i[0]||(i[0]=e.createTextVNode(" Your browser does not support the audio element. "))])])]))}},Gd={class:"vuefinder__pdf-preview"},Kd=["title"],Wd=["data"],Yd=["src"],Xd={__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")}),(l,i)=>(e.openBlock(),e.createElementBlock("div",Gd,[e.createElementVNode("h3",{class:"vuefinder__pdf-preview__title",id:"modal-title",title:e.unref(o).modal.data.item.path},e.toDisplayString(e.unref(o).modal.data.item.basename),9,Kd),e.createElementVNode("div",null,[e.createElementVNode("object",{class:"vuefinder__pdf-preview__object",data:r(),type:"application/pdf",width:"100%",height:"100%"},[e.createElementVNode("iframe",{class:"vuefinder__pdf-preview__iframe",src:r(),width:"100%",height:"100%"}," Your browser does not support PDFs ",8,Yd)],8,Wd)])]))}},Zd={class:"vuefinder__preview-modal__content"},Jd={key:0},Qd={class:"vuefinder__preview-modal__loading"},eu={key:0,class:"vuefinder__preview-modal__loading-indicator"},tu={class:"vuefinder__preview-modal__details"},nu={class:"font-bold"},ou={class:"font-bold pl-2"},ru={key:0,class:"vuefinder__preview-modal__note"},su=["download","href"],ur={__name:"ModalPreview",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,s=e.ref(!1),r=i=>(t.modal.data.item.mime_type??"").startsWith(i),l=t.features.includes(J.PREVIEW);return l||(s.value=!0),(i,c)=>(e.openBlock(),e.createBlock(De,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:c[6]||(c[6]=a=>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(J).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,su)):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("div",Zd,[e.unref(l)?(e.openBlock(),e.createElementBlock("div",Jd,[r("text")?(e.openBlock(),e.createBlock(Vd,{key:0,onSuccess:c[0]||(c[0]=a=>s.value=!0)})):r("image")?(e.openBlock(),e.createBlock(Dd,{key:1,onSuccess:c[1]||(c[1]=a=>s.value=!0)})):r("video")?(e.openBlock(),e.createBlock(Rd,{key:2,onSuccess:c[2]||(c[2]=a=>s.value=!0)})):r("audio")?(e.openBlock(),e.createBlock(jd,{key:3,onSuccess:c[3]||(c[3]=a=>s.value=!0)})):r("application/pdf")?(e.openBlock(),e.createBlock(Xd,{key:4,onSuccess:c[4]||(c[4]=a=>s.value=!0)})):(e.openBlock(),e.createBlock(Ld,{key:5,onSuccess:c[5]||(c[5]=a=>s.value=!0)}))])):e.createCommentVNode("",!0),e.createElementVNode("div",Qd,[s.value===!1?(e.openBlock(),e.createElementBlock("div",eu,[c[7]||(c[7]=e.createElementVNode("svg",{class:"vuefinder__preview-modal__spinner",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e.createElementVNode("circle",{class:"vuefinder__preview-modal__spinner-circle",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e.createElementVNode("path",{class:"vuefinder__preview-modal__spinner-path",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)),e.createElementVNode("span",null,e.toDisplayString(e.unref(o)("Loading")),1)])):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",tu,[e.createElementVNode("div",null,[e.createElementVNode("span",nu,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",ou,e.toDisplayString(e.unref(o)("Last Modified"))+": ",1),e.createTextVNode(" "+e.toDisplayString(e.unref(dr)(e.unref(t).modal.data.item.last_modified)),1)])]),e.unref(t).features.includes(e.unref(J).DOWNLOAD)?(e.openBlock(),e.createElementBlock("div",ru,[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}))}},lu={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"};function au(n,t){return e.openBlock(),e.createElementBlock("svg",lu,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),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)]))}const mr={render:au},iu=["data-type","data-item","data-index"],nn={__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=f=>{f.type==="dir"?(t.emitter.emit("vf-search-exit"),t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter,path:f.path}})):t.modal.open(ur,{adapter:t.fs.adapter,item:f})},l={mounted(f,p,k,b){k.props.draggable&&(f.addEventListener("dragstart",V=>i(V,p.value)),f.addEventListener("dragover",V=>a(V,p.value)),f.addEventListener("drop",V=>c(V,p.value)))},beforeUnmount(f,p,k,b){k.props.draggable&&(f.removeEventListener("dragstart",i),f.removeEventListener("dragover",a),f.removeEventListener("drop",c))}},i=(f,p)=>{if(f.altKey||f.ctrlKey||f.metaKey)return f.preventDefault(),!1;o.isDraggingRef.value=!0,f.dataTransfer.setDragImage(s.dragImage.$el,0,15),f.dataTransfer.effectAllowed="all",f.dataTransfer.dropEffect="copy",f.dataTransfer.setData("items",JSON.stringify(o.getSelected()))},c=(f,p)=>{f.preventDefault(),o.isDraggingRef.value=!1;let k=JSON.parse(f.dataTransfer.getData("items"));if(k.find(b=>b.storage!==t.fs.adapter)){alert("Moving items between different storages is not supported yet.");return}t.modal.open(wn,{items:{from:k,to:p}})},a=(f,p)=>{f.preventDefault(),!p||p.type!=="dir"||o.getSelection().find(k=>k===f.currentTarget)?(f.dataTransfer.dropEffect="none",f.dataTransfer.effectAllowed="none"):f.dataTransfer.dropEffect="copy"};let d=null,m=!1;const u=()=>{d&&clearTimeout(d)},v=f=>{if(!m)m=!0,setTimeout(()=>m=!1,300);else return m=!1,r(s.item),clearTimeout(d),!1;d=setTimeout(()=>{const p=new MouseEvent("contextmenu",{bubbles:!0,cancelable:!1,view:window,button:2,buttons:0,clientX:f.target.getBoundingClientRect().x,clientY:f.target.getBoundingClientRect().y});f.target.dispatchEvent(p)},500)};return(f,p)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({opacity:e.unref(o).isDraggingRef.value&&e.unref(o).getSelection().find(k=>f.$el===k)?"0.5 !important":""}),class:e.normalizeClass(["vuefinder__item","vf-item-"+e.unref(o).explorerId]),"data-type":n.item.type,key:n.item.path,"data-item":JSON.stringify(n.item),"data-index":n.index,onDblclick:p[0]||(p[0]=k=>r(n.item)),onTouchstart:p[1]||(p[1]=k=>v(k)),onTouchend:p[2]||(p[2]=k=>u()),onContextmenu:p[3]||(p[3]=e.withModifiers(k=>e.unref(t).emitter.emit("vf-contextmenu-show",{event:k,items:e.unref(o).getSelected(),target:n.item}),["prevent"]))},[e.renderSlot(f.$slots,"default"),e.unref(t).pinnedFolders.find(k=>k.path===n.item.path)?(e.openBlock(),e.createBlock(e.unref(mr),{key:0,class:"vuefinder__item--pinned"})):e.createCommentVNode("",!0)],46,iu)),[[l,n.item]])}},cu={class:"vuefinder__explorer__container"},du={key:0,class:"vuefinder__explorer__header"},uu={class:"vuefinder__explorer__drag-item"},mu={key:0,class:"vuefinder__linear-loader absolute"},fu={class:"vuefinder__explorer__item-list-content"},vu={class:"vuefinder__explorer__item-list-name"},pu={class:"vuefinder__explorer__item-name"},_u={class:"vuefinder__explorer__item-path"},hu={class:"vuefinder__explorer__item-list-content"},gu={class:"vuefinder__explorer__item-list-name"},ku={class:"vuefinder__explorer__item-name"},wu={class:"vuefinder__explorer__item-size"},bu={class:"vuefinder__explorer__item-date"},yu={class:"vuefinder__explorer__item-grid-content"},Eu=["data-src","alt"],Vu={key:2,class:"vuefinder__explorer__item-extension"},Su={class:"vuefinder__explorer__item-title break-all"},Nu={__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),l=e.ref(""),i=t.dragSelect;let c;t.emitter.on("vf-fullscreen-toggle",()=>{i.area.value.style.height=null}),t.emitter.on("vf-search-query",({newQuery:u})=>{l.value=u,u?t.emitter.emit("vf-fetch",{params:{q:"search",adapter:t.fs.adapter,path:t.fs.data.dirname,filter:u},onSuccess:v=>{v.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 a=e.reactive({active:!1,column:"",order:""}),d=(u=!0)=>{let v=[...t.fs.data.files],f=a.column,p=a.order==="asc"?1:-1;if(!u)return v;const k=(b,V)=>typeof b=="string"&&typeof V=="string"?b.toLowerCase().localeCompare(V.toLowerCase()):bV?1:0;return a.active&&(v=v.slice().sort((b,V)=>k(b[f],V[f])*p)),v},m=u=>{a.active&&a.column===u?(a.active=a.order==="asc",a.column=u,a.order="desc"):(a.active=!0,a.column=u,a.order="asc")};return e.onMounted(()=>{c=new Dr(i.area.value)}),e.onUpdated(()=>{c.update()}),e.onBeforeUnmount(()=>{c.destroy()}),(u,v)=>(e.openBlock(),e.createElementBlock("div",cu,[e.unref(t).view==="list"||l.value.length?(e.openBlock(),e.createElementBlock("div",du,[e.createElementVNode("div",{onClick:v[0]||(v[0]=f=>m("basename")),class:"vuefinder__explorer__sort-button vuefinder__explorer__sort-button--name vf-sort-button"},[e.createTextVNode(e.toDisplayString(e.unref(o)("Name"))+" ",1),e.withDirectives(e.createVNode(Vt,{direction:a.order},null,8,["direction"]),[[e.vShow,a.active&&a.column==="basename"]])]),l.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:v[1]||(v[1]=f=>m("file_size")),class:"vuefinder__explorer__sort-button vuefinder__explorer__sort-button--size vf-sort-button"},[e.createTextVNode(e.toDisplayString(e.unref(o)("Size"))+" ",1),e.withDirectives(e.createVNode(Vt,{direction:a.order},null,8,["direction"]),[[e.vShow,a.active&&a.column==="file_size"]])])),l.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:v[2]||(v[2]=f=>m("last_modified")),class:"vuefinder__explorer__sort-button vuefinder__explorer__sort-button--date vf-sort-button"},[e.createTextVNode(e.toDisplayString(e.unref(o)("Date"))+" ",1),e.withDirectives(e.createVNode(Vt,{direction:a.order},null,8,["direction"]),[[e.vShow,a.active&&a.column==="last_modified"]])])),l.value.length?(e.openBlock(),e.createElementBlock("div",{key:2,onClick:v[3]||(v[3]=f=>m("path")),class:"vuefinder__explorer__sort-button vuefinder__explorer__sort-button--path vf-sort-button"},[e.createTextVNode(e.toDisplayString(e.unref(o)("Filepath"))+" ",1),e.withDirectives(e.createVNode(Vt,{direction:a.order},null,8,["direction"]),[[e.vShow,a.active&&a.column==="path"]])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",uu,[e.createVNode(hd,{ref_key:"dragImage",ref:r,count:e.unref(i).getCount()},null,8,["count"])]),e.createElementVNode("div",{ref:e.unref(i).scrollBarContainer,class:e.normalizeClass(["vf-explorer-scrollbar-container vuefinder__explorer__scrollbar-container",[{"grid-view":e.unref(t).view==="grid"},{"search-active":l.value.length}]])},[e.createElementVNode("div",{ref:e.unref(i).scrollBar,class:"vuefinder__explorer__scrollbar"},null,512)],2),e.createElementVNode("div",{ref:e.unref(i).area,class:"vuefinder__explorer__selector-area vf-explorer-scrollbar vf-selector-area min-h-32",onContextmenu:v[4]||(v[4]=e.withModifiers(f=>e.unref(t).emitter.emit("vf-contextmenu-show",{event:f,items:e.unref(i).getSelected()}),["self","prevent"]))},[e.unref(t).loadingIndicator==="linear"&&e.unref(t).fs.loading?(e.openBlock(),e.createElementBlock("div",mu)):e.createCommentVNode("",!0),l.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(d(),(f,p)=>(e.openBlock(),e.createBlock(nn,{item:f,index:p,dragImage:r.value,class:"vf-item vf-item-list"},{default:e.withCtx(()=>[e.createElementVNode("div",fu,[e.createElementVNode("div",vu,[e.createVNode(tn,{type:f.type,small:e.unref(t).compactListView},null,8,["type","small"]),e.createElementVNode("span",pu,e.toDisplayString(f.basename),1)]),e.createElementVNode("div",_u,e.toDisplayString(f.path),1)])]),_:2},1032,["item","index","dragImage"]))),256)):e.createCommentVNode("",!0),e.unref(t).view==="list"&&!l.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(d(),(f,p)=>(e.openBlock(),e.createBlock(nn,{item:f,index:p,dragImage:r.value,class:"vf-item vf-item-list",draggable:"true",key:f.path},{default:e.withCtx(()=>[e.createElementVNode("div",hu,[e.createElementVNode("div",gu,[e.createVNode(tn,{type:f.type,small:e.unref(t).compactListView},null,8,["type","small"]),e.createElementVNode("span",ku,e.toDisplayString(f.basename),1)]),e.createElementVNode("div",wu,e.toDisplayString(f.file_size?e.unref(t).filesize(f.file_size):""),1),e.createElementVNode("div",bu,e.toDisplayString(e.unref(dr)(f.last_modified)),1)])]),_:2},1032,["item","index","dragImage"]))),128)):e.createCommentVNode("",!0),e.unref(t).view==="grid"&&!l.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(d(!1),(f,p)=>(e.openBlock(),e.createBlock(nn,{item:f,index:p,dragImage:r.value,class:"vf-item vf-item-grid",draggable:"true"},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("div",yu,[(f.mime_type??"").startsWith("image")&&e.unref(t).showThumbnails?(e.openBlock(),e.createElementBlock("img",{src:"data:image/png;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",class:"vuefinder__explorer__item-thumbnail lazy","data-src":e.unref(t).requester.getPreviewUrl(e.unref(t).fs.adapter,f),alt:f.basename,key:f.path},null,8,Eu)):(e.openBlock(),e.createBlock(tn,{key:1,type:f.type},null,8,["type"])),!((f.mime_type??"").startsWith("image")&&e.unref(t).showThumbnails)&&f.type!=="dir"?(e.openBlock(),e.createElementBlock("div",Vu,e.toDisplayString(s(f.extension)),1)):e.createCommentVNode("",!0)]),e.createElementVNode("span",Su,e.toDisplayString(e.unref(kn)(f.basename)),1)])]),_:2},1032,["item","index","dragImage"]))),256)):e.createCommentVNode("",!0)],544),e.createVNode(td)]))}},xu=["href","download"],Bu=["onClick"],Cu={__name:"ContextMenu",setup(n){const t=e.inject("ServiceContainer"),o=e.ref(null),s=e.ref([]),r=e.ref(""),l=e.reactive({active:!1,items:[],positions:{left:0,top:0}});t.emitter.on("vf-context-selected",d=>{s.value=d});const i=d=>d.link(t,s),c=d=>{t.emitter.emit("vf-contextmenu-hide"),d.action(t,s)};t.emitter.on("vf-search-query",({newQuery:d})=>{r.value=d}),t.emitter.on("vf-contextmenu-show",({event:d,items:m,target:u=null})=>{if(l.items=t.contextMenuItems.filter(v=>v.show(t,{searchQuery:r.value,items:m,target:u})),r.value)if(u)t.emitter.emit("vf-context-selected",[u]);else return;else!u&&!r.value?t.emitter.emit("vf-context-selected",[]):m.length>1&&m.some(v=>v.path===u.path)?t.emitter.emit("vf-context-selected",m):t.emitter.emit("vf-context-selected",[u]);a(d)}),t.emitter.on("vf-contextmenu-hide",()=>{l.active=!1});const a=d=>{const m=t.dragSelect.area.value,u=t.root.getBoundingClientRect(),v=m.getBoundingClientRect();let f=d.clientX-u.left,p=d.clientY-u.top;l.active=!0,e.nextTick(()=>{var D;const k=(D=o.value)==null?void 0:D.getBoundingClientRect();let b=(k==null?void 0:k.height)??0,V=(k==null?void 0:k.width)??0;f=v.right-d.pageX+window.scrollXe.withDirectives((e.openBlock(),e.createElementBlock("ul",{ref_key:"contextmenu",ref:o,style:e.normalizeStyle(l.positions),class:"vuefinder__context-menu"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.items,u=>(e.openBlock(),e.createElementBlock("li",{class:"vuefinder__context-menu__item",key:u.title},[u.link?(e.openBlock(),e.createElementBlock("a",{key:0,class:"vuefinder__context-menu__link",target:"_blank",href:i(u),download:i(u),onClick:m[0]||(m[0]=v=>e.unref(t).emitter.emit("vf-contextmenu-hide"))},[e.createElementVNode("span",null,e.toDisplayString(u.title(e.unref(t).i18n)),1)],8,xu)):(e.openBlock(),e.createElementBlock("div",{key:1,class:"vuefinder__context-menu__action",onClick:v=>c(u)},[e.createElementVNode("span",null,e.toDisplayString(u.title(e.unref(t).i18n)),1)],8,Bu))]))),128))],4)),[[e.vShow,l.active]])}},$u={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",class:"h-5 w-5",viewBox:"0 0 24 24"};function Du(n,t){return e.openBlock(),e.createElementBlock("svg",$u,t[0]||(t[0]=[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)]))}const fr={render:Du},Tu={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"};function Mu(n,t){return e.openBlock(),e.createElementBlock("svg",Tu,t[0]||(t[0]=[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)]))}const Au={render:Mu},Lu={class:"vuefinder__status-bar__wrapper"},Ou={class:"vuefinder__status-bar__storage"},Fu=["title"],Iu={class:"vuefinder__status-bar__storage-icon"},Hu=["value"],Ru={class:"vuefinder__status-bar__info"},zu={key:0},Uu={class:"vuefinder__status-bar__selected-count"},Pu={class:"vuefinder__status-bar__actions"},qu=["disabled"],ju=["title"],Gu={__name:"Statusbar",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,{setStore:s}=t.storage,r=t.dragSelect,l=()=>{t.emitter.emit("vf-search-exit"),t.emitter.emit("vf-fetch",{params:{q:"index",adapter:t.fs.adapter}}),s("adapter",t.fs.adapter)},i=e.ref("");t.emitter.on("vf-search-query",({newQuery:a})=>{i.value=a});const c=e.computed(()=>{const a=t.selectButton.multiple?r.getSelected().length>0:r.getSelected().length===1;return t.selectButton.active&&a});return(a,d)=>(e.openBlock(),e.createElementBlock("div",Lu,[e.createElementVNode("div",Ou,[e.createElementVNode("div",{class:"vuefinder__status-bar__storage-container",title:e.unref(o)("Storage")},[e.createElementVNode("div",Iu,[e.createVNode(e.unref(fr))]),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":d[0]||(d[0]=m=>e.unref(t).fs.adapter=m),onChange:l,class:"vuefinder__status-bar__storage-select",tabindex:"-1"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).fs.data.storages,m=>(e.openBlock(),e.createElementBlock("option",{value:m},e.toDisplayString(m),9,Hu))),256))],544),[[e.vModelSelect,e.unref(t).fs.adapter]])],8,Fu),e.createElementVNode("div",Ru,[i.value.length?(e.openBlock(),e.createElementBlock("span",zu,e.toDisplayString(e.unref(t).fs.data.files.length)+" items found. ",1)):e.createCommentVNode("",!0),e.createElementVNode("span",Uu,e.toDisplayString(e.unref(t).dragSelect.getCount()>0?e.unref(o)("%s item(s) selected.",e.unref(t).dragSelect.getCount()):""),1)])]),e.createElementVNode("div",Pu,[e.unref(t).selectButton.active?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["vf-btn py-0 vf-btn-primary",{disabled:!c.value}]),disabled:!c.value,onClick:d[1]||(d[1]=m=>e.unref(t).selectButton.click(e.unref(r).getSelected(),m))},e.toDisplayString(e.unref(o)("Select")),11,qu)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:"vuefinder__status-bar__about",title:e.unref(o)("About"),onClick:d[2]||(d[2]=m=>e.unref(t).modal.open(Qo))},[e.createVNode(e.unref(Au))],8,ju)])]))}},Ku={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"};function Wu(n,t){return e.openBlock(),e.createElementBlock("svg",Ku,t[0]||(t[0]=[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)]))}const vr={render:Wu},Yu={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-5 w-5",viewBox:"0 0 24 24"};function Xu(n,t){return e.openBlock(),e.createElementBlock("svg",Yu,t[0]||(t[0]=[e.createElementVNode("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),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)]))}const Zu={render:Xu},Ju={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"};function Qu(n,t){return e.openBlock(),e.createElementBlock("svg",Ju,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),e.createElementVNode("path",{d:"M15 12H9M12 9v6"},null,-1)]))}const pr={render:Qu},em={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"};function tm(n,t){return e.openBlock(),e.createElementBlock("svg",em,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),e.createElementVNode("path",{d:"M9 12h6"},null,-1)]))}const _r={render:tm};function hr(n,t){const o=n.findIndex(s=>s.path===t.path);o>-1?n[o]=t:n.push(t)}const nm={class:"vuefinder__folder-loader-indicator"},om={key:1,class:"vuefinder__folder-loader-indicator--icon"},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 c;return((c=l())==null?void 0:c.folders.length)||i()});function l(){return o.treeViewData.find(c=>c.path===t.path)}const i=()=>{r.value=!0,o.requester.send({url:"",method:"get",params:{q:"subfolders",adapter:t.adapter,path:t.path}}).then(c=>{hr(o.treeViewData,{path:t.path,...c})}).catch(c=>{}).finally(()=>{r.value=!1})};return(c,a)=>{var d;return e.openBlock(),e.createElementBlock("div",nm,[r.value?(e.openBlock(),e.createBlock(e.unref(Fn),{key:0,class:"vuefinder__folder-loader-indicator--loading"})):(e.openBlock(),e.createElementBlock("div",om,[s.value&&((d=l())!=null&&d.folders.length)?(e.openBlock(),e.createBlock(e.unref(_r),{key:0,class:"vuefinder__folder-loader-indicator--minus"})):e.createCommentVNode("",!0),s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(pr),{key:1,class:"vuefinder__folder-loader-indicator--plus"}))]))])}}},rm={class:"vuefinder__treesubfolderlist__item-content"},sm=["onClick"],lm=["title","onClick"],am={class:"vuefinder__treesubfolderlist__item-icon"},im={class:"vuefinder__treesubfolderlist__subfolder"},cm={__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.ref(null);e.onMounted(()=>{s.path===s.adapter+"://"&&Ce(r.value,{scrollbars:{theme:"vf-theme-dark dark:vf-theme-light"}})});const l=e.computed(()=>{var i;return((i=t.treeViewData.find(c=>c.path===s.path))==null?void 0:i.folders)||[]});return(i,c)=>{const a=e.resolveComponent("TreeSubfolderList",!0);return e.openBlock(),e.createElementBlock("ul",{ref_key:"parentSubfolderList",ref:r,class:"vuefinder__treesubfolderlist__container"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(d,m)=>(e.openBlock(),e.createElementBlock("li",{key:d.path,class:"vuefinder__treesubfolderlist__item"},[e.createElementVNode("div",rm,[e.createElementVNode("div",{class:"vuefinder__treesubfolderlist__item-toggle",onClick:u=>o.value[d.path]=!o.value[d.path]},[e.createVNode(gr,{adapter:n.adapter,path:d.path,modelValue:o.value[d.path],"onUpdate:modelValue":u=>o.value[d.path]=u},null,8,["adapter","path","modelValue","onUpdate:modelValue"])],8,sm),e.createElementVNode("div",{class:"vuefinder__treesubfolderlist__item-link",title:d.path,onClick:u=>e.unref(t).emitter.emit("vf-fetch",{params:{q:"index",adapter:s.adapter,path:d.path}})},[e.createElementVNode("div",am,[e.unref(t).fs.path===d.path?(e.openBlock(),e.createBlock(e.unref(vr),{key:0})):(e.openBlock(),e.createBlock(e.unref(jt),{key:1}))]),e.createElementVNode("div",{class:e.normalizeClass(["vuefinder__treesubfolderlist__item-text",{"vuefinder__treesubfolderlist__item-text--active":e.unref(t).fs.path===d.path}])},e.toDisplayString(d.basename),3)],8,lm)]),e.createElementVNode("div",im,[e.withDirectives(e.createVNode(a,{adapter:s.adapter,path:d.path},null,8,["adapter","path"]),[[e.vShow,o.value[d.path]]])])]))),128))],512)}}},dm={__name:"TreeStorageItem",props:{storage:{type:String,required:!0}},setup(n){const t=e.inject("ServiceContainer"),{setStore:o}=t.storage,s=e.ref(!1);function r(l){l===t.fs.adapter?s.value=!s.value:(t.emitter.emit("vf-search-exit"),t.emitter.emit("vf-fetch",{params:{q:"index",adapter:l}}),o("adapter",l))}return(l,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{onClick:i[2]||(i[2]=c=>r(n.storage)),class:"vuefinder__treestorageitem__header"},[e.createElementVNode("div",{class:e.normalizeClass(["vuefinder__treestorageitem__info",n.storage===e.unref(t).fs.adapter?"vuefinder__treestorageitem__info--active":""])},[e.createElementVNode("div",{class:e.normalizeClass(["vuefinder__treestorageitem__icon",n.storage===e.unref(t).fs.adapter?"vuefinder__treestorageitem__icon--active":""])},[e.createVNode(e.unref(fr))],2),e.createElementVNode("div",null,e.toDisplayString(n.storage),1)],2),e.createElementVNode("div",{class:"vuefinder__treestorageitem__loader",onClick:i[1]||(i[1]=e.withModifiers(c=>s.value=!s.value,["stop"]))},[e.createVNode(gr,{adapter:n.storage,path:n.storage+"://",modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=c=>s.value=c)},null,8,["adapter","path","modelValue"])])]),e.withDirectives(e.createVNode(cm,{adapter:n.storage,path:n.storage+"://",class:"vuefinder__treestorageitem__subfolder"},null,8,["adapter","path"]),[[e.vShow,s.value]])],64))}},um={class:"vuefinder__folder-indicator"},mm={class:"vuefinder__folder-indicator--icon"},fm={__name:"FolderIndicator",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(n){const t=e.useModel(n,"modelValue");return(o,s)=>(e.openBlock(),e.createElementBlock("div",um,[e.createElementVNode("div",mm,[t.value?(e.openBlock(),e.createBlock(e.unref(_r),{key:0,class:"vuefinder__folder-indicator--minus"})):e.createCommentVNode("",!0),t.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(pr),{key:1,class:"vuefinder__folder-indicator--plus"}))])]))}},vm={class:"vuefinder__treeview__header"},pm={class:"vuefinder__treeview__pinned-label"},_m={class:"vuefinder__treeview__pin-text text-nowrap"},hm={key:0,class:"vuefinder__treeview__pinned-list"},gm={class:"vuefinder__treeview__pinned-item"},km=["onClick"],wm=["title"],bm=["onClick"],ym={key:0},Em={class:"vuefinder__treeview__no-pinned"},Vm={class:"vuefinder__treeview__storage"},Sm={__name:"TreeView",setup(n){const t=e.inject("ServiceContainer"),{t:o}=t.i18n,{getStore:s,setStore:r}=t.storage,l=e.ref(190),i=e.ref(s("pinned-folders-opened",!0));e.watch(i,m=>r("pinned-folders-opened",m));const c=m=>{t.pinnedFolders=t.pinnedFolders.filter(u=>u.path!==m.path),t.storage.setStore("pinned-folders",t.pinnedFolders)},a=m=>{const u=m.clientX,v=m.target.parentElement,f=v.getBoundingClientRect().width;v.classList.remove("transition-[width]"),v.classList.add("transition-none");const p=b=>{l.value=f+b.clientX-u,l.value<50&&(l.value=0,t.showTreeView=!1),l.value>50&&(t.showTreeView=!0)},k=()=>{const b=v.getBoundingClientRect();l.value=b.width,v.classList.add("transition-[width]"),v.classList.remove("transition-none"),window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",k)};window.addEventListener("mousemove",p),window.addEventListener("mouseup",k)},d=e.ref(null);return e.onMounted(()=>{Ce(d.value,{overflow:{x:"hidden"},scrollbars:{theme:"vf-theme-dark dark:vf-theme-light"}})}),e.watch(t.fs.data,(m,u)=>{const v=m.files.filter(f=>f.type==="dir");hr(t.treeViewData,{path:t.fs.path,folders:v.map(f=>({adapter:f.storage,path:f.path,basename:f.basename}))})}),(m,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{onClick:u[0]||(u[0]=v=>e.unref(t).showTreeView=!e.unref(t).showTreeView),class:e.normalizeClass(["vuefinder__treeview__overlay",e.unref(t).showTreeView?"vuefinder__treeview__backdrop":"hidden"])},null,2),e.createElementVNode("div",{style:e.normalizeStyle(e.unref(t).showTreeView?"min-width:100px;max-width:75%; width: "+l.value+"px":"width: 0"),class:"vuefinder__treeview__container"},[e.createElementVNode("div",{ref_key:"treeViewScrollElement",ref:d,class:"vuefinder__treeview__scroll"},[e.createElementVNode("div",vm,[e.createElementVNode("div",{onClick:u[2]||(u[2]=v=>i.value=!i.value),class:"vuefinder__treeview__pinned-toggle"},[e.createElementVNode("div",pm,[e.createVNode(e.unref(mr),{class:"vuefinder__treeview__pin-icon"}),e.createElementVNode("div",_m,e.toDisplayString(e.unref(o)("Pinned Folders")),1)]),e.createVNode(fm,{modelValue:i.value,"onUpdate:modelValue":u[1]||(u[1]=v=>i.value=v)},null,8,["modelValue"])]),i.value?(e.openBlock(),e.createElementBlock("ul",hm,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).pinnedFolders,v=>(e.openBlock(),e.createElementBlock("li",gm,[e.createElementVNode("div",{class:"vuefinder__treeview__pinned-folder",onClick:f=>e.unref(t).emitter.emit("vf-fetch",{params:{q:"index",adapter:v.storage,path:v.path}})},[e.unref(t).fs.path!==v.path?(e.openBlock(),e.createBlock(e.unref(jt),{key:0,class:"vuefinder__treeview__folder-icon"})):e.createCommentVNode("",!0),e.unref(t).fs.path===v.path?(e.openBlock(),e.createBlock(e.unref(vr),{key:1,class:"vuefinder__treeview__open-folder-icon"})):e.createCommentVNode("",!0),e.createElementVNode("div",{title:v.path,class:e.normalizeClass(["vuefinder__treeview__folder-name text-nowrap",{"vuefinder__treeview__folder-name--active":e.unref(t).fs.path===v.path}])},e.toDisplayString(v.basename),11,wm)],8,km),e.createElementVNode("div",{class:"vuefinder__treeview__remove-favorite",onClick:f=>c(v)},[e.createVNode(e.unref(Zu),{class:"vuefinder__treeview__remove-icon"})],8,bm)]))),256)),e.unref(t).pinnedFolders.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",ym,[e.createElementVNode("div",Em,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,v=>(e.openBlock(),e.createElementBlock("div",Vm,[e.createVNode(dm,{storage:v},null,8,["storage"])]))),256))],512),e.createElementVNode("div",{onMousedown:a,class:e.normalizeClass([(e.unref(t).showTreeView,""),"vuefinder__treeview__resize-handle"])},null,34)],4)],64))}};class kr{constructor(t,o,s,r){this.title=t,this.action=o,this.link=s,this.options=Object.assign({needsSearchQuery:!1,target:"one"},r)}show(t,o){var r,l;const s=i=>i.items.length>1&&i.items.some(c=>{var a;return c.path===((a=i.target)==null?void 0:a.path)})?"many":i.target?"one":null;return!(this.options.needsSearchQuery!==!!o.searchQuery||this.options.target!==void 0&&this.options.target!==s(o)||this.options.targetType!==void 0&&this.options.targetType!==((r=o.target)==null?void 0:r.type)||this.options.mimeType!==void 0&&this.options.mimeType!==((l=o.target)==null?void 0:l.mime_type)||this.options.feature!==void 0&&!t.features.includes(this.options.feature)||this.options.show!==void 0&&!this.options.show(t,o))}}function ye(n,t){return n.map(o=>new kr(o.title,o.action,o.link,{...t,feature:o.key}))}const me={newfolder:{key:J.NEW_FOLDER,title:({t:n})=>n("New Folder"),action:n=>n.modal.open(or)},selectAll:{title:({t:n})=>n("Select All"),action:n=>n.dragSelect.selectAll()},pinFolder:{title:({t:n})=>n("Pin Folder"),action:(n,t)=>{n.pinnedFolders=n.pinnedFolders.concat(t.value),n.storage.setStore("pinned-folders",n.pinnedFolders)}},unpinFolder:{title:({t:n})=>n("Unpin Folder"),action:(n,t)=>{n.pinnedFolders=n.pinnedFolders.filter(o=>!t.value.find(s=>s.path===o.path)),n.storage.setStore("pinned-folders",n.pinnedFolders)}},delete:{key:J.DELETE,title:({t:n})=>n("Delete"),action:(n,t)=>{n.modal.open(Ln,{items:t})}},refresh:{title:({t:n})=>n("Refresh"),action:n=>{n.emitter.emit("vf-fetch",{params:{q:"index",adapter:n.fs.adapter,path:n.fs.data.dirname}})}},preview:{key:J.PREVIEW,title:({t:n})=>n("Preview"),action:(n,t)=>n.modal.open(ur,{adapter:n.fs.adapter,item:t.value[0]})},open:{title:({t:n})=>n("Open"),action:(n,t)=>{n.emitter.emit("vf-search-exit"),n.emitter.emit("vf-fetch",{params:{q:"index",adapter:n.fs.adapter,path:t.value[0].path}})}},openDir:{title:({t:n})=>n("Open containing folder"),action:(n,t)=>{n.emitter.emit("vf-search-exit"),n.emitter.emit("vf-fetch",{params:{q:"index",adapter:n.fs.adapter,path:t.value[0].dir}})}},download:{key:J.DOWNLOAD,link:(n,t)=>n.requester.getDownloadUrl(n.fs.adapter,t.value[0]),title:({t:n})=>n("Download"),action:()=>{}},archive:{key:J.ARCHIVE,title:({t:n})=>n("Archive"),action:(n,t)=>n.modal.open(cr,{items:t})},unarchive:{key:J.UNARCHIVE,title:({t:n})=>n("Unarchive"),action:(n,t)=>n.modal.open(ar,{items:t})},rename:{key:J.RENAME,title:({t:n})=>n("Rename"),action:(n,t)=>n.modal.open(On,{items:t})}},wr=[...ye([me.openDir],{needsSearchQuery:!0}),...ye([me.refresh,me.selectAll,me.newfolder],{target:null}),...ye([me.refresh,me.archive,me.delete],{target:"many"}),...ye([me.open],{targetType:"dir"}),...ye([me.unpinFolder],{targetType:"dir",show:(n,t)=>n.pinnedFolders.findIndex(o=>{var s;return o.path===((s=t.target)==null?void 0:s.path)})!==-1}),...ye([me.pinFolder],{targetType:"dir",show:(n,t)=>n.pinnedFolders.findIndex(o=>{var s;return o.path===((s=t.target)==null?void 0:s.path)})===-1}),...ye([me.preview,me.download],{show:(n,t)=>{var o;return((o=t.target)==null?void 0:o.type)!=="dir"}}),...ye([me.rename],{numItems:"one"}),...ye([me.unarchive],{mimeType:"application/zip"}),...ye([me.archive],{show:(n,t)=>{var o;return((o=t.target)==null?void 0:o.mime_type)!=="application/zip"}}),...ye([me.delete],{})],Nm={class:"vuefinder__main__content"},xm={__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}}},onError:{type:Function,default:null},loadingIndicator:{type:String,default:"circular"},contextMenuItems:{type:Array,default:()=>wr}},emits:["select","update:path"],setup(n,{emit:t}){const o=t,s=n,r=Ks(s,e.inject("VueFinderOptions"));e.provide("ServiceContainer",r);const{setStore:l}=r.storage,i=e.ref(null);r.root=i;const c=r.dragSelect;Sa(r);const a=u=>{Object.assign(r.fs.data,u),c.clearSelection(),c.refreshSelection()};let d;r.emitter.on("vf-fetch-abort",()=>{d.abort(),r.fs.loading=!1}),r.emitter.on("vf-fetch",({params:u,body:v=null,onSuccess:f=null,onError:p=null,noCloseModal:k=!1})=>{["index","search"].includes(u.q)&&(d&&d.abort(),r.fs.loading=!0),d=new AbortController;const b=d.signal;r.requester.send({url:"",method:u.m||"get",params:u,body:v,abortSignal:b}).then(V=>{r.fs.adapter=V.adapter,r.persist&&(r.fs.path=V.dirname,l("path",r.fs.path)),k||r.modal.close(),a(V),f&&f(V)}).catch(V=>{console.error(V),p&&p(V)}).finally(()=>{["index","search"].includes(u.q)&&(r.fs.loading=!1)})});function m(u){let v={};u&&u.includes("://")&&(v={adapter:u.split("://")[0],path:u}),r.emitter.emit("vf-fetch",{params:{q:"index",adapter:r.fs.adapter,...v},onError:s.onError??(f=>{f.message&&r.emitter.emit("vf-toast-push",{label:f.message,type:"error"})})})}return e.onMounted(()=>{m(r.fs.path),e.watch(()=>s.path,u=>{m(u)}),c.onSelect(u=>{o("select",u)}),e.watch(()=>r.fs.data.dirname,u=>{o("update:path",u)})}),(u,v)=>(e.openBlock(),e.createElementBlock("div",{class:"vuefinder",ref_key:"root",ref:i,tabindex:"0"},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).theme.actualValue)},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(r).fullScreen?"vuefinder__main__fixed":"vuefinder__main__relative","vuefinder__main__container"]),style:e.normalizeStyle(e.unref(r).fullScreen?"":"max-height: "+n.maxHeight),onMousedown:v[0]||(v[0]=f=>e.unref(r).emitter.emit("vf-contextmenu-hide")),onTouchstart:v[1]||(v[1]=f=>e.unref(r).emitter.emit("vf-contextmenu-hide"))},[e.createVNode(Xi),e.createVNode(Qc),e.createElementVNode("div",Nm,[e.createVNode(Sm),e.createVNode(Nu)]),e.createVNode(Gu)],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(Cu)],2)],512))}},Bm={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",xm)}};exports.SimpleContextMenuItem=kr;exports.contextMenuItems=wr;exports.default=Bm; diff --git a/dist/vuefinder.js b/dist/vuefinder.js index f665b29c..ea3ccc5d 100644 --- a/dist/vuefinder.js +++ b/dist/vuefinder.js @@ -1,22 +1,22 @@ -var er = Object.defineProperty; -var tr = (t, e, n) => e in t ? er(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n; -var yn = (t, e, n) => tr(t, typeof e != "symbol" ? e + "" : e, n); -import { reactive as yt, watch as Me, ref as D, shallowRef as nr, onMounted as Se, onUnmounted as Gn, onUpdated as Ls, nextTick as ct, computed as rt, inject as re, openBlock as _, createElementBlock as g, withKeys as kt, unref as o, createElementVNode as l, withModifiers as Ze, renderSlot as Tt, normalizeClass as le, toDisplayString as b, createBlock as W, resolveDynamicComponent as Fs, withCtx as Q, createVNode as P, Fragment as ge, renderList as xe, createCommentVNode as q, withDirectives as ue, vModelCheckbox as Pt, createTextVNode as J, vModelSelect as An, vModelText as xt, onBeforeUnmount as Rs, customRef as sr, vShow as Ue, isRef as or, TransitionGroup as rr, normalizeStyle as rn, mergeModels as lr, useModel as Hs, resolveComponent as ar, provide as ir, Transition as cr } from "vue"; -import dr from "mitt"; -import ur from "dragselect"; -import vr from "@uppy/core"; -import _r from "@uppy/xhr-upload"; -import fr from "vanilla-lazyload"; +var nr = Object.defineProperty; +var sr = (t, e, n) => e in t ? nr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n; +var Sn = (t, e, n) => sr(t, typeof e != "symbol" ? e + "" : e, n); +import { reactive as kt, watch as De, ref as A, shallowRef as or, onMounted as Ce, onUnmounted as Yn, onUpdated as Hs, nextTick as dt, computed as gt, inject as re, openBlock as _, createElementBlock as g, withKeys as xt, unref as o, createElementVNode as l, withModifiers as et, renderSlot as At, normalizeClass as le, toDisplayString as b, createBlock as W, resolveDynamicComponent as Rs, withCtx as J, createVNode as q, Fragment as be, renderList as ke, createCommentVNode as B, withDirectives as ue, vModelCheckbox as Wt, createTextVNode as Z, vModelSelect as Dn, vModelText as St, onBeforeUnmount as Bs, customRef as rr, vShow as qe, isRef as lr, TransitionGroup as ar, normalizeStyle as dn, mergeModels as ir, useModel as Us, resolveComponent as cr, provide as dr, Transition as ur } from "vue"; +import vr from "mitt"; +import _r from "dragselect"; +import fr from "@uppy/core"; +import mr from "@uppy/xhr-upload"; +import pr from "vanilla-lazyload"; import "cropperjs/dist/cropper.css"; -import mr from "cropperjs"; -var Os; -const kn = (Os = document.querySelector('meta[name="csrf-token"]')) == null ? void 0 : Os.getAttribute("content"); -class pr { +import hr from "cropperjs"; +var Is; +const $n = (Is = document.querySelector('meta[name="csrf-token"]')) == null ? void 0 : Is.getAttribute("content"); +class gr { /** @param {RequestConfig} config */ constructor(e) { /** @type {RequestConfig} */ - yn(this, "config"); - yn(this, "customFetch", async (...e) => { + Sn(this, "config"); + Sn(this, "customFetch", async (...e) => { let [n, r] = e; this.config.fetchRequestInterceptor && (r = this.config.fetchRequestInterceptor(r)); let s = await fetch(n, r); @@ -40,30 +40,30 @@ class pr { */ transformRequestParams(e) { const n = this.config, r = {}; - kn != null && kn !== "" && (r[n.xsrfHeaderName] = kn); - const s = Object.assign({}, n.headers, r, e.headers), c = Object.assign({}, n.params, e.params), i = e.body, d = n.baseUrl + e.url, a = e.method; + $n != null && $n !== "" && (r[n.xsrfHeaderName] = $n); + const s = Object.assign({}, n.headers, r, e.headers), a = Object.assign({}, n.params, e.params), c = e.body, d = n.baseUrl + e.url, i = e.method; let u; - a !== "get" && (i instanceof FormData ? (u = i, n.body != null && Object.entries(this.config.body).forEach(([v, p]) => { + i !== "get" && (c instanceof FormData ? (u = c, n.body != null && Object.entries(this.config.body).forEach(([v, p]) => { u.append(v, p); - })) : (u = { ...i }, n.body != null && Object.assign(u, this.config.body))); - const m = { + })) : (u = { ...c }, n.body != null && Object.assign(u, this.config.body))); + const f = { url: d, - method: a, + method: i, headers: s, - params: c, + params: a, body: u }; if (n.transformRequest != null) { const v = n.transformRequest({ url: d, - method: a, + method: i, headers: s, - params: c, + params: a, body: u }); - v.url != null && (m.url = v.url), v.method != null && (m.method = v.method), v.params != null && (m.params = v.params ?? {}), v.headers != null && (m.headers = v.headers ?? {}), v.body != null && (m.body = v.body); + v.url != null && (f.url = v.url), v.method != null && (f.method = v.method), v.params != null && (f.params = v.params ?? {}), v.headers != null && (f.headers = v.headers ?? {}), v.body != null && (f.body = v.body); } - return m; + return f; } /** * Get download url @@ -119,19 +119,19 @@ class pr { method: e.method, headers: n.headers, signal: e.abortSignal - }, c = n.url + "?" + new URLSearchParams(n.params); + }, a = n.url + "?" + new URLSearchParams(n.params); if (n.method !== "get" && n.body != null) { let d; n.body instanceof FormData ? d = e.body : (d = JSON.stringify(n.body), s.headers["Content-Type"] = "application/json"), s.body = d; } this.config.fetchParams && Object.assign(s, this.config.fetchParams); - const i = await this.customFetch(c, s); - if (i.ok) - return await i[r](); - throw await i.json(); + const c = await this.customFetch(a, s); + if (c.ok) + return await c[r](); + throw await c.json(); } } -function hr(t) { +function br(t) { const e = { baseUrl: "", headers: {}, @@ -140,46 +140,46 @@ function hr(t) { xsrfHeaderName: "X-CSRF-Token", fetchParams: {} }; - return typeof t == "string" ? Object.assign(e, { baseUrl: t }) : Object.assign(e, t), new pr(e); + return typeof t == "string" ? Object.assign(e, { baseUrl: t }) : Object.assign(e, t), new gr(e); } -function gr(t) { +function wr(t) { let e = localStorage.getItem(t + "_storage"); - const n = yt(JSON.parse(e ?? "{}")); - Me(n, r); + const n = kt(JSON.parse(e ?? "{}")); + De(n, r); function r() { Object.keys(n).length ? localStorage.setItem(t + "_storage", JSON.stringify(n)) : localStorage.removeItem(t + "_storage"); } - function s(a, u) { - n[a] = u; + function s(i, u) { + n[i] = u; } - function c(a) { - delete n[a]; + function a(i) { + delete n[i]; } - function i() { - Object.keys(n).map((a) => c(a)); + function c() { + Object.keys(n).map((i) => a(i)); } - return { getStore: (a, u = null) => n.hasOwnProperty(a) ? n[a] : u, setStore: s, removeStore: c, clearStore: i }; + return { getStore: (i, u = null) => n.hasOwnProperty(i) ? n[i] : u, setStore: s, removeStore: a, clearStore: c }; } -async function br(t, e) { +async function yr(t, e) { const n = e[t]; return typeof n == "function" ? (await n()).default : n; } -function wr(t, e, n, r) { - const { getStore: s, setStore: c } = t, i = D({}), d = D(s("locale", e)), a = (v, p = e) => { - br(v, r).then((f) => { - i.value = f, c("locale", v), d.value = v, c("translations", f), Object.values(r).length > 1 && (n.emit("vf-toast-push", { label: "The language is set to " + v }), n.emit("vf-language-saved")); - }).catch((f) => { - p ? (n.emit("vf-toast-push", { label: "The selected locale is not yet supported!", type: "error" }), a(p, null)) : n.emit("vf-toast-push", { label: "Locale cannot be loaded!", type: "error" }); +function kr(t, e, n, r) { + const { getStore: s, setStore: a } = t, c = A({}), d = A(s("locale", e)), i = (v, p = e) => { + yr(v, r).then((m) => { + c.value = m, a("locale", v), d.value = v, a("translations", m), Object.values(r).length > 1 && (n.emit("vf-toast-push", { label: "The language is set to " + v }), n.emit("vf-language-saved")); + }).catch((m) => { + p ? (n.emit("vf-toast-push", { label: "The selected locale is not yet supported!", type: "error" }), i(p, null)) : n.emit("vf-toast-push", { label: "Locale cannot be loaded!", type: "error" }); }); }; - Me(d, (v) => { - a(v); - }), !s("locale") && !r.length ? a(e) : i.value = s("translations"); + De(d, (v) => { + i(v); + }), !s("locale") && !r.length ? i(e) : c.value = s("translations"); const u = (v, ...p) => p.length ? u(v = v.replace("%s", p.shift()), ...p) : v; - function m(v, ...p) { - return i.value && i.value.hasOwnProperty(v) ? u(i.value[v], ...p) : u(v, ...p); + function f(v, ...p) { + return c.value && c.value.hasOwnProperty(v) ? u(c.value[v], ...p) : u(v, ...p); } - return yt({ t: m, locale: d }); + return kt({ t: f, locale: d }); } const de = { EDIT: "edit", @@ -195,29 +195,29 @@ const de = { FULL_SCREEN: "fullscreen", DOWNLOAD: "download", LANGUAGE: "language" -}, yr = Object.values(de), kr = "2.7.0"; -function Bs(t, e, n, r, s) { +}, xr = Object.values(de), Sr = "2.7.0"; +function Ns(t, e, n, r, s) { return (e = Math, n = e.log, r = 1024, s = n(t) / n(r) | 0, t / e.pow(r, s)).toFixed(0) + " " + (s ? "KMGTPEZY"[--s] + "iB" : "B"); } -function Is(t, e, n, r, s) { +function Ps(t, e, n, r, s) { return (e = Math, n = e.log, r = 1e3, s = n(t) / n(r) | 0, t / e.pow(r, s)).toFixed(0) + " " + (s ? "KMGTPEZY"[--s] + "B" : "B"); } -function xr(t) { +function $r(t) { const e = { k: 1, m: 2, g: 3, t: 4 }, r = /(\d+(?:\.\d+)?)\s?(k|m|g|t)?b?/i.exec(t); return r[1] * Math.pow(1024, e[r[2].toLowerCase()]); } -const nt = { +const ot = { SYSTEM: "system", LIGHT: "light", DARK: "dark" }; -function Sr(t, e) { - const n = D(nt.SYSTEM), r = D(nt.LIGHT); - n.value = t.getStore("theme", e ?? nt.SYSTEM); - const s = window.matchMedia("(prefers-color-scheme: dark)"), c = (i) => { - n.value === nt.DARK || n.value === nt.SYSTEM && i.matches ? r.value = nt.DARK : r.value = nt.LIGHT; +function Cr(t, e) { + const n = A(ot.SYSTEM), r = A(ot.LIGHT); + n.value = t.getStore("theme", e ?? ot.SYSTEM); + const s = window.matchMedia("(prefers-color-scheme: dark)"), a = (c) => { + n.value === ot.DARK || n.value === ot.SYSTEM && c.matches ? r.value = ot.DARK : r.value = ot.LIGHT; }; - return c(s), s.addEventListener("change", c), { + return a(s), s.addEventListener("change", a), { /** * @type {import('vue').Ref} */ @@ -229,219 +229,219 @@ function Sr(t, e) { /** * @param {Theme} value */ - set(i) { - n.value = i, i !== nt.SYSTEM ? t.setStore("theme", i) : t.removeStore("theme"), c(s); + set(c) { + n.value = c, c !== ot.SYSTEM ? t.setStore("theme", c) : t.removeStore("theme"), a(s); } }; } -function $r() { - const t = nr(null), e = D(!1), n = D(); - return { visible: e, type: t, data: n, open: (c, i = null) => { - document.querySelector("body").style.overflow = "hidden", e.value = !0, t.value = c, n.value = i; +function Er() { + const t = or(null), e = A(!1), n = A(); + return { visible: e, type: t, data: n, open: (a, c = null) => { + document.querySelector("body").style.overflow = "hidden", e.value = !0, t.value = a, n.value = c; }, close: () => { document.querySelector("body").style.overflow = "", e.value = !1, t.value = null; } }; } /*! * OverlayScrollbars - * Version: 2.10.0 + * Version: 2.10.1 * * Copyright (c) Rene Haas | KingSora. * https://github.com/KingSora * * Released under the MIT license. */ -const Ve = (t, e) => { +const Le = (t, e) => { const { o: n, i: r, u: s } = t; - let c = n, i; - const d = (m, v) => { - const p = c, f = m, h = v || (r ? !r(p, f) : p !== f); - return (h || s) && (c = f, i = p), [c, h, i]; + let a = n, c; + const d = (f, v) => { + const p = a, m = f, h = v || (r ? !r(p, m) : p !== m); + return (h || s) && (a = m, c = p), [a, h, c]; }; - return [e ? (m) => d(e(c, i), m) : d, (m) => [c, !!m, i]]; -}, Cr = typeof window < "u" && typeof HTMLElement < "u" && !!window.document, De = Cr ? window : {}, Ns = Math.max, Er = Math.min, Tn = Math.round, Jt = Math.abs, _s = Math.sign, Us = De.cancelAnimationFrame, Kn = De.requestAnimationFrame, Zt = De.setTimeout, Mn = De.clearTimeout, ln = (t) => typeof De[t] < "u" ? De[t] : void 0, Ar = ln("MutationObserver"), fs = ln("IntersectionObserver"), Qt = ln("ResizeObserver"), Kt = ln("ScrollTimeline"), Wn = (t) => t === void 0, an = (t) => t === null, Pe = (t) => typeof t == "number", Ot = (t) => typeof t == "string", Yn = (t) => typeof t == "boolean", He = (t) => typeof t == "function", ze = (t) => Array.isArray(t), en = (t) => typeof t == "object" && !ze(t) && !an(t), Xn = (t) => { - const e = !!t && t.length, n = Pe(e) && e > -1 && e % 1 == 0; - return ze(t) || !He(t) && n ? e > 0 && en(t) ? e - 1 in t : !0 : !1; -}, tn = (t) => !!t && t.constructor === Object, nn = (t) => t instanceof HTMLElement, cn = (t) => t instanceof Element; + return [e ? (f) => d(e(a, c), f) : d, (f) => [a, !!f, c]]; +}, Tr = typeof window < "u" && typeof HTMLElement < "u" && !!window.document, Ve = Tr ? window : {}, qs = Math.max, Mr = Math.min, Vn = Math.round, tn = Math.abs, ps = Math.sign, zs = Ve.cancelAnimationFrame, Xn = Ve.requestAnimationFrame, nn = Ve.setTimeout, Ln = Ve.clearTimeout, un = (t) => typeof Ve[t] < "u" ? Ve[t] : void 0, Ar = un("MutationObserver"), hs = un("IntersectionObserver"), sn = un("ResizeObserver"), Zt = un("ScrollTimeline"), Zn = (t) => t === void 0, vn = (t) => t === null, je = (t) => typeof t == "number", Ot = (t) => typeof t == "string", Jn = (t) => typeof t == "boolean", Re = (t) => typeof t == "function", Ge = (t) => Array.isArray(t), on = (t) => typeof t == "object" && !Ge(t) && !vn(t), Qn = (t) => { + const e = !!t && t.length, n = je(e) && e > -1 && e % 1 == 0; + return Ge(t) || !Re(t) && n ? e > 0 && on(t) ? e - 1 in t : !0 : !1; +}, rn = (t) => !!t && t.constructor === Object, ln = (t) => t instanceof HTMLElement, _n = (t) => t instanceof Element; function ae(t, e) { - if (Xn(t)) + if (Qn(t)) for (let n = 0; n < t.length && e(t[n], n, t) !== !1; n++) ; else t && ae(Object.keys(t), (n) => e(t[n], n, t)); return t; } -const qs = (t, e) => t.indexOf(e) >= 0, Mt = (t, e) => t.concat(e), me = (t, e, n) => (!Ot(e) && Xn(e) ? Array.prototype.push.apply(t, e) : t.push(e), t), lt = (t) => Array.from(t || []), Jn = (t) => ze(t) ? t : !Ot(t) && Xn(t) ? lt(t) : [t], Dn = (t) => !!t && !t.length, Vn = (t) => lt(new Set(t)), Fe = (t, e, n) => { +const js = (t, e) => t.indexOf(e) >= 0, Dt = (t, e) => t.concat(e), me = (t, e, n) => (!Ot(e) && Qn(e) ? Array.prototype.push.apply(t, e) : t.push(e), t), at = (t) => Array.from(t || []), es = (t) => Ge(t) ? t : !Ot(t) && Qn(t) ? at(t) : [t], On = (t) => !!t && !t.length, Fn = (t) => at(new Set(t)), Ie = (t, e, n) => { ae(t, (s) => s ? s.apply(void 0, e || []) : !0), !n && (t.length = 0); -}, Ps = "paddingTop", zs = "paddingRight", js = "paddingLeft", Gs = "paddingBottom", Ks = "marginLeft", Ws = "marginRight", Ys = "marginBottom", Xs = "overflowX", Js = "overflowY", dn = "width", un = "height", st = "visible", it = "hidden", gt = "scroll", Tr = (t) => { +}, Gs = "paddingTop", Ws = "paddingRight", Ks = "paddingLeft", Ys = "paddingBottom", Xs = "marginLeft", Zs = "marginRight", Js = "marginBottom", Qs = "overflowX", eo = "overflowY", fn = "width", mn = "height", rt = "visible", ct = "hidden", bt = "scroll", Dr = (t) => { const e = String(t || ""); return e ? e[0].toUpperCase() + e.slice(1) : ""; -}, vn = (t, e, n, r) => { +}, pn = (t, e, n, r) => { if (t && e) { let s = !0; - return ae(n, (c) => { - const i = t[c], d = e[c]; - i !== d && (s = !1); + return ae(n, (a) => { + const c = t[a], d = e[a]; + c !== d && (s = !1); }), s; } return !1; -}, Zs = (t, e) => vn(t, e, ["w", "h"]), Wt = (t, e) => vn(t, e, ["x", "y"]), Mr = (t, e) => vn(t, e, ["t", "r", "b", "l"]), dt = () => { +}, to = (t, e) => pn(t, e, ["w", "h"]), Jt = (t, e) => pn(t, e, ["x", "y"]), Vr = (t, e) => pn(t, e, ["t", "r", "b", "l"]), ut = () => { }, X = (t, ...e) => t.bind(0, ...e), ft = (t) => { let e; - const n = t ? Zt : Kn, r = t ? Mn : Us; + const n = t ? nn : Xn, r = t ? Ln : zs; return [(s) => { - r(e), e = n(() => s(), He(t) ? t() : t); + r(e), e = n(() => s(), Re(t) ? t() : t); }, () => r(e)]; -}, On = (t, e) => { - const { _: n, v: r, p: s, S: c } = e || {}; - let i, d, a, u, m = dt; - const v = function(S) { - m(), Mn(i), u = i = d = void 0, m = dt, t.apply(this, S); - }, p = (x) => c && d ? c(d, x) : x, f = () => { - m !== dt && v(p(a) || a); +}, In = (t, e) => { + const { _: n, p: r, v: s, S: a } = e || {}; + let c, d, i, u, f = ut; + const v = function($) { + f(), Ln(c), u = c = d = void 0, f = ut, t.apply(this, $); + }, p = (x) => a && d ? a(d, x) : x, m = () => { + f !== ut && v(p(i) || i); }, h = function() { - const S = lt(arguments), E = He(n) ? n() : n; - if (Pe(E) && E >= 0) { - const T = He(r) ? r() : r, $ = Pe(T) && T >= 0, V = E > 0 ? Zt : Kn, L = E > 0 ? Mn : Us, O = p(S) || S, y = v.bind(0, O); - let w; - m(), s && !u ? (y(), u = !0, w = V(() => u = void 0, E)) : (w = V(y, E), $ && !i && (i = Zt(f, T))), m = () => L(w), d = a = O; + const $ = at(arguments), T = Re(n) ? n() : n; + if (je(T) && T >= 0) { + const D = Re(r) ? r() : r, C = je(D) && D >= 0, V = T > 0 ? nn : Xn, F = T > 0 ? Ln : zs, O = p($) || $, w = v.bind(0, O); + let y; + f(), s && !u ? (w(), u = !0, y = V(() => u = void 0, T)) : (y = V(w, T), C && !c && (c = nn(m, D))), f = () => F(y), d = i = O; } else - v(S); + v($); }; - return h.m = f, h; -}, Qs = (t, e) => Object.prototype.hasOwnProperty.call(t, e), Be = (t) => t ? Object.keys(t) : [], oe = (t, e, n, r, s, c, i) => { - const d = [e, n, r, s, c, i]; - return (typeof t != "object" || an(t)) && !He(t) && (t = {}), ae(d, (a) => { - ae(a, (u, m) => { - const v = a[m]; + return h.m = m, h; +}, no = (t, e) => Object.prototype.hasOwnProperty.call(t, e), Ue = (t) => t ? Object.keys(t) : [], oe = (t, e, n, r, s, a, c) => { + const d = [e, n, r, s, a, c]; + return (typeof t != "object" || vn(t)) && !Re(t) && (t = {}), ae(d, (i) => { + ae(i, (u, f) => { + const v = i[f]; if (t === v) return !0; - const p = ze(v); - if (v && tn(v)) { - const f = t[m]; - let h = f; - p && !ze(f) ? h = [] : !p && !tn(f) && (h = {}), t[m] = oe(h, v); + const p = Ge(v); + if (v && rn(v)) { + const m = t[f]; + let h = m; + p && !Ge(m) ? h = [] : !p && !rn(m) && (h = {}), t[f] = oe(h, v); } else - t[m] = p ? v.slice() : v; + t[f] = p ? v.slice() : v; }); }), t; -}, eo = (t, e) => ae(oe({}, t), (n, r, s) => { - n === void 0 ? delete s[r] : n && tn(n) && (s[r] = eo(n)); -}), Zn = (t) => !Be(t).length, to = (t, e, n) => Ns(t, Er(e, n)), ut = (t) => Vn((ze(t) ? t : (t || "").split(" ")).filter((e) => e)), Qn = (t, e) => t && t.getAttribute(e), ms = (t, e) => t && t.hasAttribute(e), Xe = (t, e, n) => { - ae(ut(e), (r) => { +}, so = (t, e) => ae(oe({}, t), (n, r, s) => { + n === void 0 ? delete s[r] : n && rn(n) && (s[r] = so(n)); +}), ts = (t) => !Ue(t).length, oo = (t, e, n) => qs(t, Mr(e, n)), vt = (t) => Fn((Ge(t) ? t : (t || "").split(" ")).filter((e) => e)), ns = (t, e) => t && t.getAttribute(e), gs = (t, e) => t && t.hasAttribute(e), Je = (t, e, n) => { + ae(vt(e), (r) => { t && t.setAttribute(r, String(n || "")); }); -}, Ne = (t, e) => { - ae(ut(e), (n) => t && t.removeAttribute(n)); -}, _n = (t, e) => { - const n = ut(Qn(t, e)), r = X(Xe, t, e), s = (c, i) => { +}, Pe = (t, e) => { + ae(vt(e), (n) => t && t.removeAttribute(n)); +}, hn = (t, e) => { + const n = vt(ns(t, e)), r = X(Je, t, e), s = (a, c) => { const d = new Set(n); - return ae(ut(c), (a) => { - d[i](a); - }), lt(d).join(" "); + return ae(vt(a), (i) => { + d[c](i); + }), at(d).join(" "); }; return { - O: (c) => r(s(c, "delete")), - $: (c) => r(s(c, "add")), - C: (c) => { - const i = ut(c); - return i.reduce((d, a) => d && n.includes(a), i.length > 0); + O: (a) => r(s(a, "delete")), + $: (a) => r(s(a, "add")), + C: (a) => { + const c = vt(a); + return c.reduce((d, i) => d && n.includes(i), c.length > 0); } }; -}, no = (t, e, n) => (_n(t, e).O(n), X(es, t, e, n)), es = (t, e, n) => (_n(t, e).$(n), X(no, t, e, n)), sn = (t, e, n, r) => (r ? es : no)(t, e, n), ts = (t, e, n) => _n(t, e).C(n), so = (t) => _n(t, "class"), oo = (t, e) => { - so(t).O(e); -}, ns = (t, e) => (so(t).$(e), X(oo, t, e)), ro = (t, e) => { - const n = e ? cn(e) && e : document; - return n ? lt(n.querySelectorAll(t)) : []; -}, Dr = (t, e) => { - const n = e ? cn(e) && e : document; +}, ro = (t, e, n) => (hn(t, e).O(n), X(ss, t, e, n)), ss = (t, e, n) => (hn(t, e).$(n), X(ro, t, e, n)), an = (t, e, n, r) => (r ? ss : ro)(t, e, n), os = (t, e, n) => hn(t, e).C(n), lo = (t) => hn(t, "class"), ao = (t, e) => { + lo(t).O(e); +}, rs = (t, e) => (lo(t).$(e), X(ao, t, e)), io = (t, e) => { + const n = e ? _n(e) && e : document; + return n ? at(n.querySelectorAll(t)) : []; +}, Lr = (t, e) => { + const n = e ? _n(e) && e : document; return n && n.querySelector(t); -}, Ln = (t, e) => cn(t) && t.matches(e), lo = (t) => Ln(t, "body"), Fn = (t) => t ? lt(t.childNodes) : [], Dt = (t) => t && t.parentElement, mt = (t, e) => cn(t) && t.closest(e), Rn = (t) => document.activeElement, Vr = (t, e, n) => { - const r = mt(t, e), s = t && Dr(n, r), c = mt(s, e) === r; - return r && s ? r === t || s === t || c && mt(mt(t, n), e) !== r : !1; -}, bt = (t) => { - ae(Jn(t), (e) => { - const n = Dt(e); +}, Hn = (t, e) => _n(t) && t.matches(e), co = (t) => Hn(t, "body"), Rn = (t) => t ? at(t.childNodes) : [], Vt = (t) => t && t.parentElement, mt = (t, e) => _n(t) && t.closest(e), Bn = (t) => document.activeElement, Or = (t, e, n) => { + const r = mt(t, e), s = t && Lr(n, r), a = mt(s, e) === r; + return r && s ? r === t || s === t || a && mt(mt(t, n), e) !== r : !1; +}, wt = (t) => { + ae(es(t), (e) => { + const n = Vt(e); e && n && n.removeChild(e); }); -}, Oe = (t, e) => X(bt, t && e && ae(Jn(e), (n) => { +}, Oe = (t, e) => X(wt, t && e && ae(es(e), (n) => { n && t.appendChild(n); })), pt = (t) => { const e = document.createElement("div"); - return Xe(e, "class", t), e; -}, ao = (t) => { + return Je(e, "class", t), e; +}, uo = (t) => { const e = pt(); - return e.innerHTML = t.trim(), ae(Fn(e), (n) => bt(n)); -}, ps = (t, e) => t.getPropertyValue(e) || t[e] || "", io = (t) => { + return e.innerHTML = t.trim(), ae(Rn(e), (n) => wt(n)); +}, bs = (t, e) => t.getPropertyValue(e) || t[e] || "", vo = (t) => { const e = t || 0; return isFinite(e) ? e : 0; -}, zt = (t) => io(parseFloat(t || "")), Hn = (t) => Math.round(t * 1e4) / 1e4, co = (t) => `${Hn(io(t))}px`; -function Vt(t, e) { +}, Kt = (t) => vo(parseFloat(t || "")), Un = (t) => Math.round(t * 1e4) / 1e4, _o = (t) => `${Un(vo(t))}px`; +function Lt(t, e) { t && e && ae(e, (n, r) => { try { - const s = t.style, c = an(n) || Yn(n) ? "" : Pe(n) ? co(n) : n; - r.indexOf("--") === 0 ? s.setProperty(r, c) : s[r] = c; + const s = t.style, a = vn(n) || Jn(n) ? "" : je(n) ? _o(n) : n; + r.indexOf("--") === 0 ? s.setProperty(r, a) : s[r] = a; } catch { } }); } -function Qe(t, e, n) { +function tt(t, e, n) { const r = Ot(e); let s = r ? "" : {}; if (t) { - const c = De.getComputedStyle(t, n) || t.style; - s = r ? ps(c, e) : lt(e).reduce((i, d) => (i[d] = ps(c, d), i), s); + const a = Ve.getComputedStyle(t, n) || t.style; + s = r ? bs(a, e) : at(e).reduce((c, d) => (c[d] = bs(a, d), c), s); } return s; } -const hs = (t, e, n) => { - const r = e ? `${e}-` : "", s = n ? `-${n}` : "", c = `${r}top${s}`, i = `${r}right${s}`, d = `${r}bottom${s}`, a = `${r}left${s}`, u = Qe(t, [c, i, d, a]); +const ws = (t, e, n) => { + const r = e ? `${e}-` : "", s = n ? `-${n}` : "", a = `${r}top${s}`, c = `${r}right${s}`, d = `${r}bottom${s}`, i = `${r}left${s}`, u = tt(t, [a, c, d, i]); return { - t: zt(u[c]), - r: zt(u[i]), - b: zt(u[d]), - l: zt(u[a]) + t: Kt(u[a]), + r: Kt(u[c]), + b: Kt(u[d]), + l: Kt(u[i]) }; -}, Or = (t, e) => `translate${en(t) ? `(${t.x},${t.y})` : `Y(${t})`}`, Lr = (t) => !!(t.offsetWidth || t.offsetHeight || t.getClientRects().length), Fr = { +}, Fr = (t, e) => `translate${on(t) ? `(${t.x},${t.y})` : `Y(${t})`}`, Ir = (t) => !!(t.offsetWidth || t.offsetHeight || t.getClientRects().length), Hr = { w: 0, h: 0 -}, fn = (t, e) => e ? { +}, gn = (t, e) => e ? { w: e[`${t}Width`], h: e[`${t}Height`] -} : Fr, Rr = (t) => fn("inner", t || De), ht = X(fn, "offset"), uo = X(fn, "client"), on = X(fn, "scroll"), ss = (t) => { - const e = parseFloat(Qe(t, dn)) || 0, n = parseFloat(Qe(t, un)) || 0; +} : Hr, Rr = (t) => gn("inner", t || Ve), ht = X(gn, "offset"), fo = X(gn, "client"), cn = X(gn, "scroll"), ls = (t) => { + const e = parseFloat(tt(t, fn)) || 0, n = parseFloat(tt(t, mn)) || 0; return { - w: e - Tn(e), - h: n - Tn(n) + w: e - Vn(e), + h: n - Vn(n) }; -}, xn = (t) => t.getBoundingClientRect(), Hr = (t) => !!t && Lr(t), Bn = (t) => !!(t && (t[un] || t[dn])), vo = (t, e) => { - const n = Bn(t); - return !Bn(e) && n; -}, gs = (t, e, n, r) => { - ae(ut(e), (s) => { +}, Cn = (t) => t.getBoundingClientRect(), Br = (t) => !!t && Ir(t), Nn = (t) => !!(t && (t[mn] || t[fn])), mo = (t, e) => { + const n = Nn(t); + return !Nn(e) && n; +}, ys = (t, e, n, r) => { + ae(vt(e), (s) => { t && t.removeEventListener(s, n, r); }); }, ve = (t, e, n, r) => { var s; - const c = (s = r && r.H) != null ? s : !0, i = r && r.I || !1, d = r && r.A || !1, a = { - passive: c, - capture: i + const a = (s = r && r.H) != null ? s : !0, c = r && r.I || !1, d = r && r.A || !1, i = { + passive: a, + capture: c }; - return X(Fe, ut(e).map((u) => { - const m = d ? (v) => { - gs(t, u, m, i), n && n(v); + return X(Ie, vt(e).map((u) => { + const f = d ? (v) => { + ys(t, u, f, c), n && n(v); } : n; - return t && t.addEventListener(u, m, a), X(gs, t, u, m, i); + return t && t.addEventListener(u, f, i), X(ys, t, u, f, c); })); -}, _o = (t) => t.stopPropagation(), In = (t) => t.preventDefault(), fo = (t) => _o(t) || In(t), qe = (t, e) => { - const { x: n, y: r } = Pe(e) ? { +}, po = (t) => t.stopPropagation(), Pn = (t) => t.preventDefault(), ho = (t) => po(t) || Pn(t), ze = (t, e) => { + const { x: n, y: r } = je(e) ? { x: e, y: e } : e || {}; - Pe(n) && (t.scrollLeft = n), Pe(r) && (t.scrollTop = r); -}, Le = (t) => ({ + je(n) && (t.scrollLeft = n), je(r) && (t.scrollTop = r); +}, Fe = (t) => ({ x: t.scrollLeft, y: t.scrollTop -}), mo = () => ({ +}), go = () => ({ D: { x: 0, y: 0 @@ -450,78 +450,106 @@ const hs = (t, e, n) => { x: 0, y: 0 } -}), Br = (t, e) => { - const { D: n, M: r } = t, { w: s, h: c } = e, i = (v, p, f) => { - let h = _s(v) * f, x = _s(p) * f; +}), Ur = (t, e) => { + const { D: n, M: r } = t, { w: s, h: a } = e, c = (v, p, m) => { + let h = ps(v) * m, x = ps(p) * m; if (h === x) { - const S = Jt(v), E = Jt(p); - x = S > E ? 0 : x, h = S < E ? 0 : h; + const $ = tn(v), T = tn(p); + x = $ > T ? 0 : x, h = $ < T ? 0 : h; } return h = h === x ? 0 : h, [h + 0, x + 0]; - }, [d, a] = i(n.x, r.x, s), [u, m] = i(n.y, r.y, c); + }, [d, i] = c(n.x, r.x, s), [u, f] = c(n.y, r.y, a); return { D: { x: d, y: u }, M: { - x: a, - y: m + x: i, + y: f } }; -}, bs = ({ D: t, M: e }) => { +}, ks = ({ D: t, M: e }) => { const n = (r, s) => r === 0 && r <= s; return { x: n(t.x, e.x), y: n(t.y, e.y) }; -}, ws = ({ D: t, M: e }, n) => { - const r = (s, c, i) => to(0, 1, (s - i) / (s - c) || 0); +}, xs = ({ D: t, M: e }, n) => { + const r = (s, a, c) => oo(0, 1, (s - c) / (s - a) || 0); return { x: r(t.x, e.x, n.x), y: r(t.y, e.y, n.y) }; -}, Nn = (t) => { +}, qn = (t) => { t && t.focus && t.focus({ preventScroll: !0 }); -}, ys = (t, e) => { - ae(Jn(e), t); -}, Un = (t) => { - const e = /* @__PURE__ */ new Map(), n = (c, i) => { - if (c) { - const d = e.get(c); - ys((a) => { - d && d[a ? "delete" : "clear"](a); - }, i); +}, Ss = (t, e) => { + ae(es(e), t); +}, zn = (t) => { + const e = /* @__PURE__ */ new Map(), n = (a, c) => { + if (a) { + const d = e.get(a); + Ss((i) => { + d && d[i ? "delete" : "clear"](i); + }, c); } else e.forEach((d) => { d.clear(); }), e.clear(); - }, r = (c, i) => { - if (Ot(c)) { - const u = e.get(c) || /* @__PURE__ */ new Set(); - return e.set(c, u), ys((m) => { - He(m) && u.add(m); - }, i), X(n, c, i); + }, r = (a, c) => { + if (Ot(a)) { + const u = e.get(a) || /* @__PURE__ */ new Set(); + return e.set(a, u), Ss((f) => { + Re(f) && u.add(f); + }, c), X(n, a, c); } - Yn(i) && i && n(); - const d = Be(c), a = []; + Jn(c) && c && n(); + const d = Ue(a), i = []; return ae(d, (u) => { - const m = c[u]; - m && me(a, r(u, m)); - }), X(Fe, a); - }, s = (c, i) => { - ae(lt(e.get(c)), (d) => { - i && !Dn(i) ? d.apply(0, i) : d(); + const f = a[u]; + f && me(i, r(u, f)); + }), X(Ie, i); + }, s = (a, c) => { + ae(at(e.get(a)), (d) => { + c && !On(c) ? d.apply(0, c) : d(); }); }; return r(t || {}), [r, n, s]; -}, ks = (t) => JSON.stringify(t, (e, n) => { - if (He(n)) +}, bo = {}, wo = {}, Nr = (t) => { + ae(t, (e) => ae(e, (n, r) => { + bo[r] = e[r]; + })); +}, yo = (t, e, n) => Ue(t).map((r) => { + const { static: s, instance: a } = t[r], [c, d, i] = n || [], u = n ? a : s; + if (u) { + const f = n ? u(c, d, e) : u(e); + return (i || wo)[r] = f; + } +}), Ft = (t) => wo[t], Pr = "__osOptionsValidationPlugin", $t = "data-overlayscrollbars", Qt = "os-environment", Yt = `${Qt}-scrollbar-hidden`, En = `${$t}-initialize`, en = "noClipping", $s = `${$t}-body`, lt = $t, qr = "host", Qe = `${$t}-viewport`, zr = Qs, jr = eo, Gr = "arrange", ko = "measuring", Wr = "scrolling", xo = "scrollbarHidden", Kr = "noContent", jn = `${$t}-padding`, Cs = `${$t}-content`, as = "os-size-observer", Yr = `${as}-appear`, Xr = `${as}-listener`, Zr = "os-trinsic-observer", Jr = "os-theme-none", He = "os-scrollbar", Qr = `${He}-rtl`, el = `${He}-horizontal`, tl = `${He}-vertical`, So = `${He}-track`, is = `${He}-handle`, nl = `${He}-visible`, sl = `${He}-cornerless`, Es = `${He}-interaction`, Ts = `${He}-unusable`, Gn = `${He}-auto-hide`, Ms = `${Gn}-hidden`, As = `${He}-wheel`, ol = `${So}-interactive`, rl = `${is}-interactive`, ll = "__osSizeObserverPlugin", al = (t, e) => { + const { T: n } = e, [r, s] = t("showNativeOverlaidScrollbars"); + return [r && n.x && n.y, s]; +}, yt = (t) => t.indexOf(rt) === 0, il = (t, e) => { + const n = (s, a, c, d) => { + const i = s === rt ? ct : s.replace(`${rt}-`, ""), u = yt(s), f = yt(c); + return !a && !d ? ct : u && f ? rt : u ? a && d ? i : a ? rt : ct : a ? i : f && d ? rt : ct; + }, r = { + x: n(e.x, t.x, e.y, t.y), + y: n(e.y, t.y, e.x, t.x) + }; + return { + k: r, + R: { + x: r.x === bt, + y: r.y === bt + } + }; +}, $o = "__osScrollbarsHidingPlugin", cl = "__osClickScrollPlugin", Ds = (t) => JSON.stringify(t, (e, n) => { + if (Re(n)) throw 0; return n; -}), xs = (t, e) => t ? `${e}`.split(".").reduce((n, r) => n && Qs(n, r) ? n[r] : void 0, t) : void 0, Ir = { +}), Vs = (t, e) => t ? `${e}`.split(".").reduce((n, r) => n && no(n, r) ? n[r] : void 0, t) : void 0, dl = { paddingAbsolute: !1, showNativeOverlaidScrollbars: !1, update: { @@ -544,57 +572,57 @@ const hs = (t, e, n) => { clickScroll: !1, pointers: ["mouse", "touch", "pen"] } -}, po = (t, e) => { - const n = {}, r = Mt(Be(e), Be(t)); +}, Co = (t, e) => { + const n = {}, r = Dt(Ue(e), Ue(t)); return ae(r, (s) => { - const c = t[s], i = e[s]; - if (en(c) && en(i)) - oe(n[s] = {}, po(c, i)), Zn(n[s]) && delete n[s]; - else if (Qs(e, s) && i !== c) { + const a = t[s], c = e[s]; + if (on(a) && on(c)) + oe(n[s] = {}, Co(a, c)), ts(n[s]) && delete n[s]; + else if (no(e, s) && c !== a) { let d = !0; - if (ze(c) || ze(i)) + if (Ge(a) || Ge(c)) try { - ks(c) === ks(i) && (d = !1); + Ds(a) === Ds(c) && (d = !1); } catch { } - d && (n[s] = i); + d && (n[s] = c); } }), n; -}, Ss = (t, e, n) => (r) => [xs(t, r), n || xs(e, r) !== void 0], St = "data-overlayscrollbars", Yt = "os-environment", jt = `${Yt}-scrollbar-hidden`, Sn = `${St}-initialize`, Xt = "noClipping", $s = `${St}-body`, ot = St, Nr = "host", Je = `${St}-viewport`, Ur = Xs, qr = Js, Pr = "arrange", ho = "measuring", zr = "scrolling", go = "scrollbarHidden", jr = "noContent", qn = `${St}-padding`, Cs = `${St}-content`, os = "os-size-observer", Gr = `${os}-appear`, Kr = `${os}-listener`, Wr = "os-trinsic-observer", Yr = "os-theme-none", Re = "os-scrollbar", Xr = `${Re}-rtl`, Jr = `${Re}-horizontal`, Zr = `${Re}-vertical`, bo = `${Re}-track`, rs = `${Re}-handle`, Qr = `${Re}-visible`, el = `${Re}-cornerless`, Es = `${Re}-interaction`, As = `${Re}-unusable`, Pn = `${Re}-auto-hide`, Ts = `${Pn}-hidden`, Ms = `${Re}-wheel`, tl = `${bo}-interactive`, nl = `${rs}-interactive`; -let wo; -const sl = () => wo, ol = (t) => { - wo = t; +}, Ls = (t, e, n) => (r) => [Vs(t, r), n || Vs(e, r) !== void 0]; +let Eo; +const ul = () => Eo, vl = (t) => { + Eo = t; }; -let $n; -const rl = () => { - const t = ($, V, L) => { - Oe(document.body, $), Oe(document.body, $); - const z = uo($), O = ht($), y = ss(V); - return L && bt($), { - x: O.h - z.h + y.h, - y: O.w - z.w + y.w +let Tn; +const _l = () => { + const t = (C, V, F) => { + Oe(document.body, C), Oe(document.body, C); + const z = fo(C), O = ht(C), w = ls(V); + return F && wt(C), { + x: O.h - z.h + w.h, + y: O.w - z.w + w.w }; - }, e = ($) => { + }, e = (C) => { let V = !1; - const L = ns($, jt); + const F = rs(C, Yt); try { - V = Qe($, "scrollbar-width") === "none" || Qe($, "display", "::-webkit-scrollbar") === "none"; + V = tt(C, "scrollbar-width") === "none" || tt(C, "display", "::-webkit-scrollbar") === "none"; } catch { } - return L(), V; - }, n = `.${Yt}{scroll-behavior:auto!important;position:fixed;opacity:0;visibility:hidden;overflow:scroll;height:200px;width:200px;z-index:-1}.${Yt} div{width:200%;height:200%;margin:10px 0}.${jt}{scrollbar-width:none!important}.${jt}::-webkit-scrollbar,.${jt}::-webkit-scrollbar-corner{appearance:none!important;display:none!important;width:0!important;height:0!important}`, s = ao(`
`)[0], c = s.firstChild, i = s.lastChild, d = sl(); - d && (i.nonce = d); - const [a, , u] = Un(), [m, v] = Ve({ - o: t(s, c), - i: Wt - }, X(t, s, c, !0)), [p] = v(), f = e(s), h = { + return F(), V; + }, n = `.${Qt}{scroll-behavior:auto!important;position:fixed;opacity:0;visibility:hidden;overflow:scroll;height:200px;width:200px;z-index:-1}.${Qt} div{width:200%;height:200%;margin:10px 0}.${Yt}{scrollbar-width:none!important}.${Yt}::-webkit-scrollbar,.${Yt}::-webkit-scrollbar-corner{appearance:none!important;display:none!important;width:0!important;height:0!important}`, s = uo(`
`)[0], a = s.firstChild, c = s.lastChild, d = ul(); + d && (c.nonce = d); + const [i, , u] = zn(), [f, v] = Le({ + o: t(s, a), + i: Jt + }, X(t, s, a, !0)), [p] = v(), m = e(s), h = { x: p.x === 0, y: p.y === 0 }, x = { elements: { host: null, - padding: !f, - viewport: ($) => f && lo($) && $, + padding: !m, + viewport: (C) => m && co(C) && C, content: !1 }, scrollbars: { @@ -604,319 +632,287 @@ const rl = () => { nativeScrollbarsOverlaid: !1, body: null } - }, S = oe({}, Ir), E = X(oe, {}, S), H = X(oe, {}, x), T = { - T: p, - k: h, - R: f, - V: !!Kt, - L: X(a, "r"), - U: H, - P: ($) => oe(x, $) && H(), - N: E, - q: ($) => oe(S, $) && E(), - B: oe({}, x), - F: oe({}, S) + }, $ = oe({}, dl), T = X(oe, {}, $), I = X(oe, {}, x), D = { + N: p, + T: h, + P: m, + G: !!Zt, + K: X(i, "r"), + Z: I, + tt: (C) => oe(x, C) && I(), + nt: T, + ot: (C) => oe($, C) && T(), + st: oe({}, x), + et: oe({}, $) }; - if (Ne(s, "style"), bt(s), ve(De, "resize", () => { + if (Pe(s, "style"), wt(s), ve(Ve, "resize", () => { u("r", []); - }), He(De.matchMedia) && !f && (!h.x || !h.y)) { - const $ = (V) => { - const L = De.matchMedia(`(resolution: ${De.devicePixelRatio}dppx)`); - ve(L, "change", () => { - V(), $(V); + }), Re(Ve.matchMedia) && !m && (!h.x || !h.y)) { + const C = (V) => { + const F = Ve.matchMedia(`(resolution: ${Ve.devicePixelRatio}dppx)`); + ve(F, "change", () => { + V(), C(V); }, { A: !0 }); }; - $(() => { - const [V, L] = m(); - oe(T.T, V), u("r", [L]); + C(() => { + const [V, F] = f(); + oe(D.N, V), u("r", [F]); }); } - return T; -}, Ge = () => ($n || ($n = rl()), $n), yo = (t, e) => He(e) ? e.apply(0, t) : e, ll = (t, e, n, r) => { - const s = Wn(r) ? n : r; - return yo(t, s) || e.apply(0, t); -}, ko = (t, e, n, r) => { - const s = Wn(r) ? n : r, c = yo(t, s); - return !!c && (nn(c) ? c : e.apply(0, t)); -}, al = (t, e) => { - const { nativeScrollbarsOverlaid: n, body: r } = e || {}, { k: s, R: c, U: i } = Ge(), { nativeScrollbarsOverlaid: d, body: a } = i().cancel, u = n ?? d, m = Wn(r) ? a : r, v = (s.x || s.y) && u, p = t && (an(m) ? !c : m); - return !!v || !!p; -}, ls = /* @__PURE__ */ new WeakMap(), il = (t, e) => { - ls.set(t, e); -}, cl = (t) => { - ls.delete(t); -}, xo = (t) => ls.get(t), dl = (t, e, n) => { + return D; +}, Ke = () => (Tn || (Tn = _l()), Tn), fl = (t, e, n) => { let r = !1; - const s = n ? /* @__PURE__ */ new WeakMap() : !1, c = () => { + const s = n ? /* @__PURE__ */ new WeakMap() : !1, a = () => { r = !0; - }, i = (d) => { + }, c = (d) => { if (s && n) { - const a = n.map((u) => { - const [m, v] = u || []; - return [v && m ? (d || ro)(m, t) : [], v]; + const i = n.map((u) => { + const [f, v] = u || []; + return [v && f ? (d || io)(f, t) : [], v]; }); - ae(a, (u) => ae(u[0], (m) => { - const v = u[1], p = s.get(m) || []; - if (t.contains(m) && v) { - const h = ve(m, v, (x) => { - r ? (h(), s.delete(m)) : e(x); + ae(i, (u) => ae(u[0], (f) => { + const v = u[1], p = s.get(f) || []; + if (t.contains(f) && v) { + const h = ve(f, v, (x) => { + r ? (h(), s.delete(f)) : e(x); }); - s.set(m, me(p, h)); + s.set(f, me(p, h)); } else - Fe(p), s.delete(m); + Ie(p), s.delete(f); })); } }; - return i(), [c, i]; -}, Ds = (t, e, n, r) => { + return c(), [a, c]; +}, Os = (t, e, n, r) => { let s = !1; - const { j: c, X: i, Y: d, W: a, J: u, G: m } = r || {}, v = On(() => s && n(!0), { + const { ct: a, rt: c, lt: d, it: i, ut: u, _t: f } = r || {}, v = In(() => s && n(!0), { _: 33, - v: 99 - }), [p, f] = dl(t, v, d), h = c || [], x = i || [], S = Mt(h, x), E = (T, $) => { - if (!Dn($)) { - const V = u || dt, L = m || dt, z = [], O = []; - let y = !1, w = !1; - if (ae($, (C) => { - const { attributeName: A, target: B, type: k, oldValue: N, addedNodes: U, removedNodes: ee } = C, se = k === "attributes", ne = k === "childList", pe = t === B, F = se && A, R = F && Qn(B, A || ""), I = Ot(R) ? R : null, j = F && N !== I, M = qs(x, A) && j; - if (e && (ne || !pe)) { - const K = se && j, G = K && a && Ln(B, a), te = (G ? !V(B, A, N, I) : !se || K) && !L(C, !!G, t, r); - ae(U, (ie) => me(z, ie)), ae(ee, (ie) => me(z, ie)), w = w || te; + p: 99 + }), [p, m] = fl(t, v, d), h = a || [], x = c || [], $ = Dt(h, x), T = (D, C) => { + if (!On(C)) { + const V = u || ut, F = f || ut, z = [], O = []; + let w = !1, y = !1; + if (ae(C, (L) => { + const { attributeName: k, target: H, type: S, oldValue: U, addedNodes: N, removedNodes: Q } = L, se = S === "attributes", ne = S === "childList", _e = t === H, Y = se && k, E = Y && ns(H, k || ""), R = Ot(E) ? E : null, P = Y && U !== R, M = js(x, k) && P; + if (e && (ne || !_e)) { + const G = se && P, j = G && i && Hn(H, i), te = (j ? !V(H, k, U, R) : !se || G) && !F(L, !!j, t, r); + ae(N, (ie) => me(z, ie)), ae(Q, (ie) => me(z, ie)), y = y || te; } - !e && pe && j && !V(B, A, N, I) && (me(O, A), y = y || M); - }), f((C) => Vn(z).reduce((A, B) => (me(A, ro(C, B)), Ln(B, C) ? me(A, B) : A), [])), e) - return !T && w && n(!1), [!1]; - if (!Dn(O) || y) { - const C = [Vn(O), y]; - return !T && n.apply(0, C), C; + !e && _e && P && !V(H, k, U, R) && (me(O, k), w = w || M); + }), m((L) => Fn(z).reduce((k, H) => (me(k, io(L, H)), Hn(H, L) ? me(k, H) : k), [])), e) + return !D && y && n(!1), [!1]; + if (!On(O) || w) { + const L = [Fn(O), w]; + return !D && n.apply(0, L), L; } } - }, H = new Ar(X(E, !1)); - return [() => (H.observe(t, { + }, I = new Ar(X(T, !1)); + return [() => (I.observe(t, { attributes: !0, attributeOldValue: !0, - attributeFilter: S, + attributeFilter: $, subtree: e, childList: e, characterData: e }), s = !0, () => { - s && (p(), H.disconnect(), s = !1); + s && (p(), I.disconnect(), s = !1); }), () => { if (s) - return v.m(), E(!0, H.takeRecords()); + return v.m(), T(!0, I.takeRecords()); }]; -}, So = {}, $o = {}, ul = (t) => { - ae(t, (e) => ae(e, (n, r) => { - So[r] = e[r]; - })); -}, Co = (t, e, n) => Be(t).map((r) => { - const { static: s, instance: c } = t[r], [i, d, a] = n || [], u = n ? c : s; - if (u) { - const m = n ? u(i, d, e) : u(e); - return (a || $o)[r] = m; - } -}), Lt = (t) => $o[t], vl = "__osOptionsValidationPlugin", _l = "__osSizeObserverPlugin", fl = (t, e) => { - const { k: n } = e, [r, s] = t("showNativeOverlaidScrollbars"); - return [r && n.x && n.y, s]; -}, wt = (t) => t.indexOf(st) === 0, ml = (t, e) => { - const n = (s, c, i, d) => { - const a = s === st ? it : s.replace(`${st}-`, ""), u = wt(s), m = wt(i); - return !c && !d ? it : u && m ? st : u ? c && d ? a : c ? st : it : c ? a : m && d ? st : it; - }, r = { - x: n(e.x, t.x, e.y, t.y), - y: n(e.y, t.y, e.x, t.x) - }; - return { - K: r, - Z: { - x: r.x === gt, - y: r.y === gt - } - }; -}, Eo = "__osScrollbarsHidingPlugin", pl = "__osClickScrollPlugin", Ao = (t, e, n) => { - const { dt: r } = n || {}, s = Lt(_l), [c] = Ve({ +}, To = (t, e, n) => { + const { dt: r } = n || {}, s = Ft(ll), [a] = Le({ o: !1, u: !0 }); return () => { - const i = [], a = ao(`
`)[0], u = a.firstChild, m = (v) => { + const c = [], i = uo(`
`)[0], u = i.firstChild, f = (v) => { const p = v instanceof ResizeObserverEntry; - let f = !1, h = !1; + let m = !1, h = !1; if (p) { - const [x, , S] = c(v.contentRect), E = Bn(x); - h = vo(x, S), f = !h && !E; + const [x, , $] = a(v.contentRect), T = Nn(x); + h = mo(x, $), m = !h && !T; } else h = v === !0; - f || e({ + m || e({ ft: !0, dt: h }); }; - if (Qt) { - const v = new Qt((p) => m(p.pop())); - v.observe(u), me(i, () => { + if (sn) { + const v = new sn((p) => f(p.pop())); + v.observe(u), me(c, () => { v.disconnect(); }); } else if (s) { - const [v, p] = s(u, m, r); - me(i, Mt([ns(a, Gr), ve(a, "animationstart", v)], p)); + const [v, p] = s(u, f, r); + me(c, Dt([rs(i, Yr), ve(i, "animationstart", v)], p)); } else - return dt; - return X(Fe, me(i, Oe(t, a))); + return ut; + return X(Ie, me(c, Oe(t, i))); }; -}, hl = (t, e) => { +}, ml = (t, e) => { let n; - const r = (a) => a.h === 0 || a.isIntersecting || a.intersectionRatio > 0, s = pt(Wr), [c] = Ve({ + const r = (i) => i.h === 0 || i.isIntersecting || i.intersectionRatio > 0, s = pt(Zr), [a] = Le({ o: !1 - }), i = (a, u) => { - if (a) { - const m = c(r(a)), [, v] = m; - return v && !u && e(m) && [m]; + }), c = (i, u) => { + if (i) { + const f = a(r(i)), [, v] = f; + return v && !u && e(f) && [f]; } - }, d = (a, u) => i(u.pop(), a); + }, d = (i, u) => c(u.pop(), i); return [() => { - const a = []; - if (fs) - n = new fs(X(d, !1), { + const i = []; + if (hs) + n = new hs(X(d, !1), { root: t - }), n.observe(s), me(a, () => { + }), n.observe(s), me(i, () => { n.disconnect(); }); else { const u = () => { - const m = ht(s); - i(m); + const f = ht(s); + c(f); }; - me(a, Ao(s, u)()), u(); + me(i, To(s, u)()), u(); } - return X(Fe, me(a, Oe(t, s))); + return X(Ie, me(i, Oe(t, s))); }, () => n && d(!0, n.takeRecords())]; -}, gl = (t, e, n, r) => { - let s, c, i, d, a, u; - const m = `[${ot}]`, v = `[${Je}]`, p = ["id", "class", "style", "open", "wrap", "cols", "rows"], { vt: f, ht: h, ot: x, gt: S, bt: E, nt: H, wt: T, yt: $, St: V, Ot: L } = t, z = (M) => Qe(M, "direction") === "rtl", O = { +}, pl = (t, e, n, r) => { + let s, a, c, d, i, u; + const f = `[${lt}]`, v = `[${Qe}]`, p = ["id", "class", "style", "open", "wrap", "cols", "rows"], { vt: m, ht: h, U: x, gt: $, bt: T, L: I, wt: D, yt: C, St: V, Ot: F } = t, z = (M) => tt(M, "direction") === "rtl", O = { $t: !1, - ct: z(f) - }, y = Ge(), w = Lt(Eo), [C] = Ve({ - i: Zs, + F: z(m) + }, w = Ke(), y = Ft($o), [L] = Le({ + i: to, o: { w: 0, h: 0 } }, () => { - const M = w && w.tt(t, e, O, y, n).ut, G = !(T && H) && ts(h, ot, Xt), Y = !H && $(Pr), te = Y && Le(S), ie = te && L(), be = V(ho, G), _e = Y && M && M()[0], $e = on(x), Z = ss(x); - return _e && _e(), qe(S, te), ie && ie(), G && be(), { - w: $e.w + Z.w, - h: $e.h + Z.h + const M = y && y.V(t, e, O, w, n).X, j = !(D && I) && os(h, lt, en), K = !I && C(Gr), te = K && Fe($), ie = te && F(), we = V(ko, j), pe = K && M && M()[0], Ee = cn(x), ee = ls(x); + return pe && pe(), ze($, te), ie && ie(), j && we(), { + w: Ee.w + ee.w, + h: Ee.h + ee.h }; - }), A = On(r, { + }), k = In(r, { _: () => s, - v: () => c, - S(M, K) { - const [G] = M, [Y] = K; - return [Mt(Be(G), Be(Y)).reduce((te, ie) => (te[ie] = G[ie] || Y[ie], te), {})]; + p: () => a, + S(M, G) { + const [j] = M, [K] = G; + return [Dt(Ue(j), Ue(K)).reduce((te, ie) => (te[ie] = j[ie] || K[ie], te), {})]; } - }), B = (M) => { - const K = z(f); + }), H = (M) => { + const G = z(m); oe(M, { - Ct: u !== K + Ct: u !== G }), oe(O, { - ct: K - }), u = K; - }, k = (M, K) => { - const [G, Y] = M, te = { - xt: Y + F: G + }), u = G; + }, S = (M, G) => { + const [j, K] = M, te = { + xt: K }; return oe(O, { - $t: G - }), !K && r(te), te; - }, N = ({ ft: M, dt: K }) => { - const Y = !(M && !K) && y.R ? A : r, te = { - ft: M || K, - dt: K + $t: j + }), !G && r(te), te; + }, U = ({ ft: M, dt: G }) => { + const K = !(M && !G) && w.P ? k : r, te = { + ft: M || G, + dt: G }; - B(te), Y(te); - }, U = (M, K) => { - const [, G] = C(), Y = { - Ht: G + H(te), K(te); + }, N = (M, G) => { + const [, j] = L(), K = { + Ht: j }; - return B(Y), G && !K && (M ? r : A)(Y), Y; - }, ee = (M, K, G) => { - const Y = { - Et: K + return H(K), j && !G && (M ? r : k)(K), K; + }, Q = (M, G, j) => { + const K = { + Et: G }; - return B(Y), K && !G && A(Y), Y; - }, [se, ne] = E ? hl(h, k) : [], pe = !H && Ao(h, N, { + return H(K), G && !j && k(K), K; + }, [se, ne] = T ? ml(h, S) : [], _e = !I && To(h, U, { dt: !0 - }), [F, R] = Ds(h, !1, ee, { - X: p, - j: p - }), I = H && Qt && new Qt((M) => { - const K = M[M.length - 1].contentRect; - N({ + }), [Y, E] = Os(h, !1, Q, { + rt: p, + ct: p + }), R = I && sn && new sn((M) => { + const G = M[M.length - 1].contentRect; + U({ ft: !0, - dt: vo(K, a) - }), a = K; - }), j = On(() => { - const [, M] = C(); + dt: mo(G, i) + }), i = G; + }), P = In(() => { + const [, M] = L(); r({ Ht: M }); }, { _: 222, - p: !0 + v: !0 }); return [() => { - I && I.observe(h); - const M = pe && pe(), K = se && se(), G = F(), Y = y.L((te) => { - te ? A({ + R && R.observe(h); + const M = _e && _e(), G = se && se(), j = Y(), K = w.K((te) => { + te ? k({ zt: te - }) : j(); + }) : P(); }); return () => { - I && I.disconnect(), M && M(), K && K(), d && d(), G(), Y(); + R && R.disconnect(), M && M(), G && G(), d && d(), j(), K(); }; - }, ({ It: M, At: K, Dt: G }) => { - const Y = {}, [te] = M("update.ignoreMutation"), [ie, be] = M("update.attributes"), [_e, $e] = M("update.elementEvents"), [Z, Ce] = M("update.debounce"), Ae = $e || be, ye = K || G, Ee = (he) => He(te) && te(he); + }, ({ It: M, At: G, Dt: j }) => { + const K = {}, [te] = M("update.ignoreMutation"), [ie, we] = M("update.attributes"), [pe, Ee] = M("update.elementEvents"), [ee, ye] = M("update.debounce"), Ae = Ee || we, xe = G || j, Se = (he) => Re(te) && te(he); if (Ae) { - i && i(), d && d(); - const [he, we] = Ds(E || x, !0, U, { - j: Mt(p, ie || []), - Y: _e, - W: m, - G: (ce, fe) => { - const { target: ke, attributeName: Te } = ce; - return (!fe && Te && !H ? Vr(ke, m, v) : !1) || !!mt(ke, `.${Re}`) || !!Ee(ce); + c && c(), d && d(); + const [he, ge] = Os(T || x, !0, N, { + ct: Dt(p, ie || []), + lt: pe, + it: f, + _t: (fe, ce) => { + const { target: $e, attributeName: Me } = fe; + return (!ce && Me && !I ? Or($e, f, v) : !1) || !!mt($e, `.${He}`) || !!Se(fe); } }); - d = he(), i = we; + d = he(), c = ge; } - if (Ce) - if (A.m(), ze(Z)) { - const he = Z[0], we = Z[1]; - s = Pe(he) && he, c = Pe(we) && we; - } else Pe(Z) ? (s = Z, c = !1) : (s = !1, c = !1); - if (ye) { - const he = R(), we = ne && ne(), ce = i && i(); - he && oe(Y, ee(he[0], he[1], ye)), we && oe(Y, k(we[0], ye)), ce && oe(Y, U(ce[0], ye)); + if (ye) + if (k.m(), Ge(ee)) { + const he = ee[0], ge = ee[1]; + s = je(he) && he, a = je(ge) && ge; + } else je(ee) ? (s = ee, a = !1) : (s = !1, a = !1); + if (xe) { + const he = E(), ge = ne && ne(), fe = c && c(); + he && oe(K, Q(he[0], he[1], xe)), ge && oe(K, S(ge[0], xe)), fe && oe(K, N(fe[0], xe)); } - return B(Y), Y; + return H(K), K; }, O]; +}, Mo = (t, e) => Re(e) ? e.apply(0, t) : e, hl = (t, e, n, r) => { + const s = Zn(r) ? n : r; + return Mo(t, s) || e.apply(0, t); +}, Ao = (t, e, n, r) => { + const s = Zn(r) ? n : r, a = Mo(t, s); + return !!a && (ln(a) ? a : e.apply(0, t)); +}, gl = (t, e) => { + const { nativeScrollbarsOverlaid: n, body: r } = e || {}, { T: s, P: a, Z: c } = Ke(), { nativeScrollbarsOverlaid: d, body: i } = c().cancel, u = n ?? d, f = Zn(r) ? i : r, v = (s.x || s.y) && u, p = t && (vn(f) ? !a : f); + return !!v || !!p; }, bl = (t, e, n, r) => { - const s = "--os-viewport-percent", c = "--os-scroll-percent", i = "--os-scroll-direction", { U: d } = Ge(), { scrollbars: a } = d(), { slot: u } = a, { vt: m, ht: v, ot: p, Mt: f, gt: h, wt: x, nt: S } = e, { scrollbars: E } = f ? {} : t, { slot: H } = E || {}, T = [], $ = [], V = [], L = ko([m, v, p], () => S && x ? m : v, u, H), z = (F) => { - if (Kt) { - const R = new Kt({ + const s = "--os-viewport-percent", a = "--os-scroll-percent", c = "--os-scroll-direction", { Z: d } = Ke(), { scrollbars: i } = d(), { slot: u } = i, { vt: f, ht: v, U: p, Mt: m, gt: h, wt: x, L: $ } = e, { scrollbars: T } = m ? {} : t, { slot: I } = T || {}, D = [], C = [], V = [], F = Ao([f, v, p], () => $ && x ? f : v, u, I), z = (Y) => { + if (Zt) { + const E = new Zt({ source: h, - axis: F + axis: Y }); return { - kt: (j) => { - const M = j.Tt.animate({ + kt: (P) => { + const M = P.Tt.animate({ clear: ["left"], - [c]: [0, 1] + [a]: [0, 1] }, { - timeline: R + timeline: E }); return () => M.cancel(); } @@ -925,269 +921,269 @@ const rl = () => { }, O = { x: z("x"), y: z("y") - }, y = () => { - const { Rt: F, Vt: R } = n, I = (j, M) => to(0, 1, j / (j + M) || 0); + }, w = () => { + const { Rt: Y, Vt: E } = n, R = (P, M) => oo(0, 1, P / (P + M) || 0); return { - x: I(R.x, F.x), - y: I(R.y, F.y) + x: R(E.x, Y.x), + y: R(E.y, Y.y) }; - }, w = (F, R, I) => { - const j = I ? ns : oo; - ae(F, (M) => { - j(M.Tt, R); + }, y = (Y, E, R) => { + const P = R ? rs : ao; + ae(Y, (M) => { + P(M.Tt, E); }); - }, C = (F, R) => { - ae(F, (I) => { - const [j, M] = R(I); - Vt(j, M); + }, L = (Y, E) => { + ae(Y, (R) => { + const [P, M] = E(R); + Lt(P, M); }); - }, A = (F, R, I) => { - const j = Yn(I), M = j ? I : !0, K = j ? !I : !0; - M && w($, F, R), K && w(V, F, R); - }, B = () => { - const F = y(), R = (I) => (j) => [j.Tt, { - [s]: Hn(I) + "" + }, k = (Y, E, R) => { + const P = Jn(R), M = P ? R : !0, G = P ? !R : !0; + M && y(C, Y, E), G && y(V, Y, E); + }, H = () => { + const Y = w(), E = (R) => (P) => [P.Tt, { + [s]: Un(R) + "" }]; - C($, R(F.x)), C(V, R(F.y)); - }, k = () => { - if (!Kt) { - const { Lt: F } = n, R = ws(F, Le(h)), I = (j) => (M) => [M.Tt, { - [c]: Hn(j) + "" + L(C, E(Y.x)), L(V, E(Y.y)); + }, S = () => { + if (!Zt) { + const { Lt: Y } = n, E = xs(Y, Fe(h)), R = (P) => (M) => [M.Tt, { + [a]: Un(P) + "" }]; - C($, I(R.x)), C(V, I(R.y)); + L(C, R(E.x)), L(V, R(E.y)); } - }, N = () => { - const { Lt: F } = n, R = bs(F), I = (j) => (M) => [M.Tt, { - [i]: j ? "0" : "1" - }]; - C($, I(R.x)), C(V, I(R.y)); }, U = () => { - if (S && !x) { - const { Rt: F, Lt: R } = n, I = bs(R), j = ws(R, Le(h)), M = (K) => { - const { Tt: G } = K, Y = Dt(G) === p && G, te = (ie, be, _e) => { - const $e = be * ie; - return co(_e ? $e : -$e); + const { Lt: Y } = n, E = ks(Y), R = (P) => (M) => [M.Tt, { + [c]: P ? "0" : "1" + }]; + L(C, R(E.x)), L(V, R(E.y)); + }, N = () => { + if ($ && !x) { + const { Rt: Y, Lt: E } = n, R = ks(E), P = xs(E, Fe(h)), M = (G) => { + const { Tt: j } = G, K = Vt(j) === p && j, te = (ie, we, pe) => { + const Ee = we * ie; + return _o(pe ? Ee : -Ee); }; - return [Y, Y && { - transform: Or({ - x: te(j.x, F.x, I.x), - y: te(j.y, F.y, I.y) + return [K, K && { + transform: Fr({ + x: te(P.x, Y.x, R.x), + y: te(P.y, Y.y, R.y) }) }]; }; - C($, M), C(V, M); + L(C, M), L(V, M); } - }, ee = (F) => { - const R = F ? "x" : "y", j = pt(`${Re} ${F ? Jr : Zr}`), M = pt(bo), K = pt(rs), G = { - Tt: j, + }, Q = (Y) => { + const E = Y ? "x" : "y", P = pt(`${He} ${Y ? el : tl}`), M = pt(So), G = pt(is), j = { + Tt: P, Ut: M, - Pt: K - }, Y = O[R]; - return me(F ? $ : V, G), me(T, [Oe(j, M), Oe(M, K), X(bt, j), Y && Y.kt(G), r(G, A, F)]), G; - }, se = X(ee, !0), ne = X(ee, !1), pe = () => (Oe(L, $[0].Tt), Oe(L, V[0].Tt), X(Fe, T)); + Pt: G + }, K = O[E]; + return me(Y ? C : V, j), me(D, [Oe(P, M), Oe(M, G), X(wt, P), K && K.kt(j), r(j, k, Y)]), j; + }, se = X(Q, !0), ne = X(Q, !1), _e = () => (Oe(F, C[0].Tt), Oe(F, V[0].Tt), X(Ie, D)); return se(), ne(), [{ - Nt: B, - qt: k, - Bt: N, - Ft: U, - jt: A, - Xt: { - Yt: $, - Wt: se, - Jt: X(C, $) + Nt: H, + qt: S, + Bt: U, + Ft: N, + jt: k, + Yt: { + Wt: C, + Xt: se, + Jt: X(L, C) }, Gt: { - Yt: V, - Wt: ne, - Jt: X(C, V) + Wt: V, + Xt: ne, + Jt: X(L, V) } - }, pe]; -}, wl = (t, e, n, r) => (s, c, i) => { - const { ht: d, ot: a, nt: u, gt: m, Kt: v, Ot: p } = e, { Tt: f, Ut: h, Pt: x } = s, [S, E] = ft(333), [H, T] = ft(444), $ = (z) => { - He(m.scrollBy) && m.scrollBy({ + }, _e]; +}, wl = (t, e, n, r) => (s, a, c) => { + const { ht: d, U: i, L: u, gt: f, Kt: v, Ot: p } = e, { Tt: m, Ut: h, Pt: x } = s, [$, T] = ft(333), [I, D] = ft(444), C = (z) => { + Re(f.scrollBy) && f.scrollBy({ behavior: "smooth", left: z.x, top: z.y }); }, V = () => { - const z = "pointerup pointercancel lostpointercapture", O = `client${i ? "X" : "Y"}`, y = i ? dn : un, w = i ? "left" : "top", C = i ? "w" : "h", A = i ? "x" : "y", B = (N, U) => (ee) => { - const { Rt: se } = n, ne = ht(h)[C] - ht(x)[C], F = U * ee / ne * se[A]; - qe(m, { - [A]: N + F + const z = "pointerup pointercancel lostpointercapture", O = `client${c ? "X" : "Y"}`, w = c ? fn : mn, y = c ? "left" : "top", L = c ? "w" : "h", k = c ? "x" : "y", H = (U, N) => (Q) => { + const { Rt: se } = n, ne = ht(h)[L] - ht(x)[L], Y = N * Q / ne * se[k]; + ze(f, { + [k]: U + Y }); - }, k = []; - return ve(h, "pointerdown", (N) => { - const U = mt(N.target, `.${rs}`) === x, ee = U ? x : h, se = t.scrollbars, ne = se[U ? "dragScroll" : "clickScroll"], { button: pe, isPrimary: F, pointerType: R } = N, { pointers: I } = se; - if (pe === 0 && F && ne && (I || []).includes(R)) { - Fe(k), T(); - const M = !U && (N.shiftKey || ne === "instant"), K = X(xn, x), G = X(xn, h), Y = (fe, ke) => (fe || K())[w] - (ke || G())[w], te = Tn(xn(m)[y]) / ht(m)[C] || 1, ie = B(Le(m)[A], 1 / te), be = N[O], _e = K(), $e = G(), Z = _e[y], Ce = Y(_e, $e) + Z / 2, Ae = be - $e[w], ye = U ? 0 : Ae - Ce, Ee = (fe) => { - Fe(ce), ee.releasePointerCapture(fe.pointerId); - }, he = U || M, we = p(), ce = [ve(v, z, Ee), ve(v, "selectstart", (fe) => In(fe), { + }, S = []; + return ve(h, "pointerdown", (U) => { + const N = mt(U.target, `.${is}`) === x, Q = N ? x : h, se = t.scrollbars, ne = se[N ? "dragScroll" : "clickScroll"], { button: _e, isPrimary: Y, pointerType: E } = U, { pointers: R } = se; + if (_e === 0 && Y && ne && (R || []).includes(E)) { + Ie(S), D(); + const M = !N && (U.shiftKey || ne === "instant"), G = X(Cn, x), j = X(Cn, h), K = (ce, $e) => (ce || G())[y] - ($e || j())[y], te = Vn(Cn(f)[w]) / ht(f)[L] || 1, ie = H(Fe(f)[k], 1 / te), we = U[O], pe = G(), Ee = j(), ee = pe[w], ye = K(pe, Ee) + ee / 2, Ae = we - Ee[y], xe = N ? 0 : Ae - ye, Se = (ce) => { + Ie(fe), Q.releasePointerCapture(ce.pointerId); + }, he = N || M, ge = p(), fe = [ve(v, z, Se), ve(v, "selectstart", (ce) => Pn(ce), { H: !1 - }), ve(h, z, Ee), he && ve(h, "pointermove", (fe) => ie(ye + (fe[O] - be))), he && (() => { - const fe = Le(m); - we(); - const ke = Le(m), Te = { - x: ke.x - fe.x, - y: ke.y - fe.y + }), ve(h, z, Se), he && ve(h, "pointermove", (ce) => ie(xe + (ce[O] - we))), he && (() => { + const ce = Fe(f); + ge(); + const $e = Fe(f), Me = { + x: $e.x - ce.x, + y: $e.y - ce.y }; - (Jt(Te.x) > 3 || Jt(Te.y) > 3) && (p(), qe(m, fe), $(Te), H(we)); + (tn(Me.x) > 3 || tn(Me.y) > 3) && (p(), ze(f, ce), C(Me), I(ge)); })]; - if (ee.setPointerCapture(N.pointerId), M) - ie(ye); - else if (!U) { - const fe = Lt(pl); - if (fe) { - const ke = fe(ie, ye, Z, (Te) => { - Te ? we() : me(ce, we); + if (Q.setPointerCapture(U.pointerId), M) + ie(xe); + else if (!N) { + const ce = Ft(cl); + if (ce) { + const $e = ce(ie, xe, ee, (Me) => { + Me ? ge() : me(fe, ge); }); - me(ce, ke), me(k, X(ke, !0)); + me(fe, $e), me(S, X($e, !0)); } } } }); }; - let L = !0; - return X(Fe, [ve(x, "pointermove pointerleave", r), ve(f, "pointerenter", () => { - c(Es, !0); - }), ve(f, "pointerleave pointercancel", () => { - c(Es, !1); - }), !u && ve(f, "mousedown", () => { - const z = Rn(); - (ms(z, Je) || ms(z, ot) || z === document.body) && Zt(X(Nn, a), 25); - }), ve(f, "wheel", (z) => { - const { deltaX: O, deltaY: y, deltaMode: w } = z; - L && w === 0 && Dt(f) === d && $({ + let F = !0; + return X(Ie, [ve(x, "pointermove pointerleave", r), ve(m, "pointerenter", () => { + a(Es, !0); + }), ve(m, "pointerleave pointercancel", () => { + a(Es, !1); + }), !u && ve(m, "mousedown", () => { + const z = Bn(); + (gs(z, Qe) || gs(z, lt) || z === document.body) && nn(X(qn, i), 25); + }), ve(m, "wheel", (z) => { + const { deltaX: O, deltaY: w, deltaMode: y } = z; + F && y === 0 && Vt(m) === d && C({ x: O, - y - }), L = !1, c(Ms, !0), S(() => { - L = !0, c(Ms); - }), In(z); + y: w + }), F = !1, a(As, !0), $(() => { + F = !0, a(As); + }), Pn(z); }, { H: !1, I: !0 - }), ve(f, "pointerdown", X(ve, v, "click", fo, { + }), ve(m, "pointerdown", X(ve, v, "click", ho, { A: !0, I: !0, H: !1 }), { I: !0 - }), V(), E, T]); -}, yl = (t, e, n, r, s, c) => { - let i, d, a, u, m, v = dt, p = 0; - const f = (F) => F.pointerType === "mouse", [h, x] = ft(), [S, E] = ft(100), [H, T] = ft(100), [$, V] = ft(() => p), [L, z] = bl(t, s, r, wl(e, s, r, (F) => f(F) && ee())), { ht: O, Qt: y, wt: w } = s, { jt: C, Nt: A, qt: B, Bt: k, Ft: N } = L, U = (F, R) => { - if (V(), F) - C(Ts); + }), V(), T, D]); +}, yl = (t, e, n, r, s, a) => { + let c, d, i, u, f, v = ut, p = 0; + const m = ["mouse", "pen"], h = (E) => m.includes(E.pointerType), [x, $] = ft(), [T, I] = ft(100), [D, C] = ft(100), [V, F] = ft(() => p), [z, O] = bl(t, s, r, wl(e, s, r, (E) => h(E) && se())), { ht: w, Qt: y, wt: L } = s, { jt: k, Nt: H, qt: S, Bt: U, Ft: N } = z, Q = (E, R) => { + if (F(), E) + k(Ms); else { - const I = X(C, Ts, !0); - p > 0 && !R ? $(I) : I(); + const P = X(k, Ms, !0); + p > 0 && !R ? V(P) : P(); } - }, ee = () => { - (a ? !i : !u) && (U(!0), S(() => { - U(!1); + }, se = () => { + (i ? !c : !u) && (Q(!0), T(() => { + Q(!1); })); - }, se = (F) => { - C(Pn, F, !0), C(Pn, F, !1); - }, ne = (F) => { - f(F) && (i = a, a && U(!0)); - }, pe = [V, E, T, x, () => v(), ve(O, "pointerover", ne, { + }, ne = (E) => { + k(Gn, E, !0), k(Gn, E, !1); + }, _e = (E) => { + h(E) && (c = i, i && Q(!0)); + }, Y = [F, I, C, $, () => v(), ve(w, "pointerover", _e, { A: !0 - }), ve(O, "pointerenter", ne), ve(O, "pointerleave", (F) => { - f(F) && (i = !1, a && U(!1)); - }), ve(O, "pointermove", (F) => { - f(F) && d && ee(); - }), ve(y, "scroll", (F) => { - h(() => { - B(), ee(); - }), c(F), N(); + }), ve(w, "pointerenter", _e), ve(w, "pointerleave", (E) => { + h(E) && (c = !1, i && Q(!1)); + }), ve(w, "pointermove", (E) => { + h(E) && d && se(); + }), ve(y, "scroll", (E) => { + x(() => { + S(), se(); + }), a(E), N(); })]; - return [() => X(Fe, me(pe, z())), ({ It: F, Dt: R, Zt: I, tn: j }) => { - const { nn: M, sn: K, en: G, cn: Y } = j || {}, { Ct: te, dt: ie } = I || {}, { ct: be } = n, { k: _e } = Ge(), { K: $e, rn: Z } = r, [Ce, Ae] = F("showNativeOverlaidScrollbars"), [ye, Ee] = F("scrollbars.theme"), [he, we] = F("scrollbars.visibility"), [ce, fe] = F("scrollbars.autoHide"), [ke, Te] = F("scrollbars.autoHideSuspend"), [$t] = F("scrollbars.autoHideDelay"), [Ft, Rt] = F("scrollbars.dragScroll"), [Ht, at] = F("scrollbars.clickScroll"), [vt, pn] = F("overflow"), hn = ie && !R, gn = Z.x || Z.y, bn = M || K || Y || te || R, Ie = G || we || pn, wn = Ce && _e.x && _e.y, Ct = (Et, tt, Bt) => { - const At = Et.includes(gt) && (he === st || he === "auto" && tt === gt); - return C(Qr, At, Bt), At; + return [() => X(Ie, me(Y, O())), ({ It: E, Dt: R, Zt: P, tn: M }) => { + const { nn: G, sn: j, en: K, cn: te } = M || {}, { Ct: ie, dt: we } = P || {}, { F: pe } = n, { T: Ee } = Ke(), { k: ee, rn: ye } = r, [Ae, xe] = E("showNativeOverlaidScrollbars"), [Se, he] = E("scrollbars.theme"), [ge, fe] = E("scrollbars.visibility"), [ce, $e] = E("scrollbars.autoHide"), [Me, Ct] = E("scrollbars.autoHideSuspend"), [It] = E("scrollbars.autoHideDelay"), [Ht, Rt] = E("scrollbars.dragScroll"), [it, Et] = E("scrollbars.clickScroll"), [Bt, wn] = E("overflow"), yn = we && !R, kn = ye.x || ye.y, Ne = G || j || te || ie || R, xn = K || fe || wn, Ut = Ae && Ee.x && Ee.y, Nt = (st, Tt, Mt) => { + const Pt = st.includes(bt) && (ge === rt || ge === "auto" && Tt === bt); + return k(nl, Pt, Mt), Pt; }; - if (p = $t, hn && (ke && gn ? (se(!1), v(), H(() => { - v = ve(y, "scroll", X(se, !0), { + if (p = It, yn && (Me && kn ? (ne(!1), v(), D(() => { + v = ve(y, "scroll", X(ne, !0), { A: !0 }); - })) : se(!0)), Ae && C(Yr, wn), Ee && (C(m), C(ye, !0), m = ye), Te && !ke && se(!0), fe && (d = ce === "move", a = ce === "leave", u = ce === "never", U(u, !0)), Rt && C(nl, Ft), at && C(tl, !!Ht), Ie) { - const Et = Ct(vt.x, $e.x, !0), tt = Ct(vt.y, $e.y, !1); - C(el, !(Et && tt)); + })) : ne(!0)), xe && k(Jr, Ut), he && (k(f), k(Se, !0), f = Se), Ct && !Me && ne(!0), $e && (d = ce === "move", i = ce === "leave", u = ce === "never", Q(u, !0)), Rt && k(rl, Ht), Et && k(ol, !!it), xn) { + const st = Nt(Bt.x, ee.x, !0), Tt = Nt(Bt.y, ee.y, !1); + k(sl, !(st && Tt)); } - bn && (B(), A(), N(), Y && k(), C(As, !Z.x, !0), C(As, !Z.y, !1), C(Xr, be && !w)); - }, {}, L]; + Ne && (S(), H(), N(), te && U(), k(Ts, !ye.x, !0), k(Ts, !ye.y, !1), k(Qr, pe && !L)); + }, {}, z]; }, kl = (t) => { - const e = Ge(), { U: n, R: r } = e, { elements: s } = n(), { padding: c, viewport: i, content: d } = s, a = nn(t), u = a ? {} : t, { elements: m } = u, { padding: v, viewport: p, content: f } = m || {}, h = a ? t : u.target, x = lo(h), S = h.ownerDocument, E = S.documentElement, H = () => S.defaultView || De, T = X(ll, [h]), $ = X(ko, [h]), V = X(pt, ""), L = X(T, V, i), z = X($, V, d), O = (Z) => { - const Ce = ht(Z), Ae = on(Z), ye = Qe(Z, Xs), Ee = Qe(Z, Js); - return Ae.w - Ce.w > 0 && !wt(ye) || Ae.h - Ce.h > 0 && !wt(Ee); - }, y = L(p), w = y === h, C = w && x, A = !w && z(f), B = !w && y === A, k = C ? E : y, N = C ? k : h, U = !w && $(V, c, v), ee = !B && A, se = [ee, k, U, N].map((Z) => nn(Z) && !Dt(Z) && Z), ne = (Z) => Z && qs(se, Z), pe = !ne(k) && O(k) ? k : h, F = C ? E : k, I = { + const e = Ke(), { Z: n, P: r } = e, { elements: s } = n(), { padding: a, viewport: c, content: d } = s, i = ln(t), u = i ? {} : t, { elements: f } = u, { padding: v, viewport: p, content: m } = f || {}, h = i ? t : u.target, x = co(h), $ = h.ownerDocument, T = $.documentElement, I = () => $.defaultView || Ve, D = X(hl, [h]), C = X(Ao, [h]), V = X(pt, ""), F = X(D, V, c), z = X(C, V, d), O = (ee) => { + const ye = ht(ee), Ae = cn(ee), xe = tt(ee, Qs), Se = tt(ee, eo); + return Ae.w - ye.w > 0 && !yt(xe) || Ae.h - ye.h > 0 && !yt(Se); + }, w = F(p), y = w === h, L = y && x, k = !y && z(m), H = !y && w === k, S = L ? T : w, U = L ? S : h, N = !y && C(V, a, v), Q = !H && k, se = [Q, S, N, U].map((ee) => ln(ee) && !Vt(ee) && ee), ne = (ee) => ee && js(se, ee), _e = !ne(S) && O(S) ? S : h, Y = L ? T : S, R = { vt: h, - ht: N, - ot: k, - ln: U, - bt: ee, - gt: F, - Qt: C ? S : k, - an: x ? E : pe, - Kt: S, + ht: U, + U: S, + ln: N, + bt: Q, + gt: Y, + Qt: L ? $ : S, + an: x ? T : _e, + Kt: $, wt: x, - Mt: a, - nt: w, - un: H, - yt: (Z) => ts(k, Je, Z), - St: (Z, Ce) => sn(k, Je, Z, Ce), - Ot: () => sn(F, Je, zr, !0) - }, { vt: j, ht: M, ln: K, ot: G, bt: Y } = I, te = [() => { - Ne(M, [ot, Sn]), Ne(j, Sn), x && Ne(E, [Sn, ot]); + Mt: i, + L: y, + un: I, + yt: (ee) => os(S, Qe, ee), + St: (ee, ye) => an(S, Qe, ee, ye), + Ot: () => an(Y, Qe, Wr, !0) + }, { vt: P, ht: M, ln: G, U: j, bt: K } = R, te = [() => { + Pe(M, [lt, En]), Pe(P, En), x && Pe(T, [En, lt]); }]; - let ie = Fn([Y, G, K, M, j].find((Z) => Z && !ne(Z))); - const be = C ? j : Y || G, _e = X(Fe, te); - return [I, () => { - const Z = H(), Ce = Rn(), Ae = (ce) => { - Oe(Dt(ce), Fn(ce)), bt(ce); - }, ye = (ce) => ve(ce, "focusin focusout focus blur", fo, { + let ie = Rn([K, j, G, M, P].find((ee) => ee && !ne(ee))); + const we = L ? P : K || j, pe = X(Ie, te); + return [R, () => { + const ee = I(), ye = Bn(), Ae = (fe) => { + Oe(Vt(fe), Rn(fe)), wt(fe); + }, xe = (fe) => ve(fe, "focusin focusout focus blur", ho, { I: !0, H: !1 - }), Ee = "tabindex", he = Qn(G, Ee), we = ye(Ce); - return Xe(M, ot, w ? "" : Nr), Xe(K, qn, ""), Xe(G, Je, ""), Xe(Y, Cs, ""), w || (Xe(G, Ee, he || "-1"), x && Xe(E, $s, "")), Oe(be, ie), Oe(M, K), Oe(K || M, !w && G), Oe(G, Y), me(te, [we, () => { - const ce = Rn(), fe = ne(G), ke = fe && ce === G ? j : ce, Te = ye(ke); - Ne(K, qn), Ne(Y, Cs), Ne(G, Je), x && Ne(E, $s), he ? Xe(G, Ee, he) : Ne(G, Ee), ne(Y) && Ae(Y), fe && Ae(G), ne(K) && Ae(K), Nn(ke), Te(); - }]), r && !w && (es(G, Je, go), me(te, X(Ne, G, Je))), Nn(!w && x && Ce === j && Z.top === Z ? G : Ce), we(), ie = 0, _e; - }, _e]; + }), Se = "tabindex", he = ns(j, Se), ge = xe(ye); + return Je(M, lt, y ? "" : qr), Je(G, jn, ""), Je(j, Qe, ""), Je(K, Cs, ""), y || (Je(j, Se, he || "-1"), x && Je(T, $s, "")), Oe(we, ie), Oe(M, G), Oe(G || M, !y && j), Oe(j, K), me(te, [ge, () => { + const fe = Bn(), ce = ne(j), $e = ce && fe === j ? P : fe, Me = xe($e); + Pe(G, jn), Pe(K, Cs), Pe(j, Qe), x && Pe(T, $s), he ? Je(j, Se, he) : Pe(j, Se), ne(K) && Ae(K), ce && Ae(j), ne(G) && Ae(G), qn($e), Me(); + }]), r && !y && (ss(j, Qe, xo), me(te, X(Pe, j, Qe))), qn(!y && x && ye === P && ee.top === ee ? j : ye), ge(), ie = 0, pe; + }, pe]; }, xl = ({ bt: t }) => ({ Zt: e, _n: n, Dt: r }) => { - const { xt: s } = e || {}, { $t: c } = n; - t && (s || r) && Vt(t, { - [un]: c && "100%" + const { xt: s } = e || {}, { $t: a } = n; + t && (s || r) && Lt(t, { + [mn]: a && "100%" }); -}, Sl = ({ ht: t, ln: e, ot: n, nt: r }, s) => { - const [c, i] = Ve({ - i: Mr, - o: hs() - }, X(hs, t, "padding", "")); - return ({ It: d, Zt: a, _n: u, Dt: m }) => { - let [v, p] = i(m); - const { R: f } = Ge(), { ft: h, Ht: x, Ct: S } = a || {}, { ct: E } = u, [H, T] = d("paddingAbsolute"); - (h || p || (m || x)) && ([v, p] = c(m)); - const V = !r && (T || S || p); +}, Sl = ({ ht: t, ln: e, U: n, L: r }, s) => { + const [a, c] = Le({ + i: Vr, + o: ws() + }, X(ws, t, "padding", "")); + return ({ It: d, Zt: i, _n: u, Dt: f }) => { + let [v, p] = c(f); + const { P: m } = Ke(), { ft: h, Ht: x, Ct: $ } = i || {}, { F: T } = u, [I, D] = d("paddingAbsolute"); + (h || p || (f || x)) && ([v, p] = a(f)); + const V = !r && (D || $ || p); if (V) { - const L = !H || !e && !f, z = v.r + v.l, O = v.t + v.b, y = { - [Ws]: L && !E ? -z : 0, - [Ys]: L ? -O : 0, - [Ks]: L && E ? -z : 0, - top: L ? -v.t : 0, - right: L ? E ? -v.r : "auto" : 0, - left: L ? E ? "auto" : -v.l : 0, - [dn]: L && `calc(100% + ${z}px)` - }, w = { - [Ps]: L ? v.t : 0, - [zs]: L ? v.r : 0, - [Gs]: L ? v.b : 0, - [js]: L ? v.l : 0 + const F = !I || !e && !m, z = v.r + v.l, O = v.t + v.b, w = { + [Zs]: F && !T ? -z : 0, + [Js]: F ? -O : 0, + [Xs]: F && T ? -z : 0, + top: F ? -v.t : 0, + right: F ? T ? -v.r : "auto" : 0, + left: F ? T ? "auto" : -v.l : 0, + [fn]: F && `calc(100% + ${z}px)` + }, y = { + [Gs]: F ? v.t : 0, + [Ws]: F ? v.r : 0, + [Ys]: F ? v.b : 0, + [Ks]: F ? v.l : 0 }; - Vt(e || n, y), Vt(n, w), oe(s, { + Lt(e || n, w), Lt(n, y), oe(s, { ln: v, - dn: !L, - rt: e ? w : oe({}, y, w) + dn: !F, + j: e ? y : oe({}, w, y) }); } return { @@ -1195,26 +1191,26 @@ const rl = () => { }; }; }, $l = (t, e) => { - const n = Ge(), { ht: r, ln: s, ot: c, nt: i, Qt: d, gt: a, wt: u, St: m, un: v } = t, { R: p } = n, f = u && i, h = X(Ns, 0), x = { + const n = Ke(), { ht: r, ln: s, U: a, L: c, Qt: d, gt: i, wt: u, St: f, un: v } = t, { P: p } = n, m = u && c, h = X(qs, 0), x = { display: () => !1, - direction: (R) => R !== "ltr", - flexDirection: (R) => R.endsWith("-reverse"), - writingMode: (R) => R !== "horizontal-tb" - }, S = Be(x), E = { - i: Zs, + direction: (E) => E !== "ltr", + flexDirection: (E) => E.endsWith("-reverse"), + writingMode: (E) => E !== "horizontal-tb" + }, $ = Ue(x), T = { + i: to, o: { w: 0, h: 0 } - }, H = { - i: Wt, + }, I = { + i: Jt, o: {} - }, T = (R) => { - m(ho, !f && R); - }, $ = (R) => { - if (!S.some((be) => { - const _e = R[be]; - return _e && x[be](_e); + }, D = (E) => { + f(ko, !m && E); + }, C = (E) => { + if (!$.some((we) => { + const pe = E[we]; + return pe && x[we](pe); })) return { D: { @@ -1226,89 +1222,89 @@ const rl = () => { y: 1 } }; - T(!0); - const j = Le(a), M = m(jr, !0), K = ve(d, gt, (be) => { - const _e = Le(a); - be.isTrusted && _e.x === j.x && _e.y === j.y && _o(be); + D(!0); + const P = Fe(i), M = f(Kr, !0), G = ve(d, bt, (we) => { + const pe = Fe(i); + we.isTrusted && pe.x === P.x && pe.y === P.y && po(we); }, { I: !0, A: !0 }); - qe(a, { + ze(i, { x: 0, y: 0 }), M(); - const G = Le(a), Y = on(a); - qe(a, { - x: Y.w, - y: Y.h + const j = Fe(i), K = cn(i); + ze(i, { + x: K.w, + y: K.h }); - const te = Le(a); - qe(a, { - x: te.x - G.x < 1 && -Y.w, - y: te.y - G.y < 1 && -Y.h + const te = Fe(i); + ze(i, { + x: te.x - j.x < 1 && -K.w, + y: te.y - j.y < 1 && -K.h }); - const ie = Le(a); - return qe(a, j), Kn(() => K()), { - D: G, + const ie = Fe(i); + return ze(i, P), Xn(() => G()), { + D: j, M: ie }; - }, V = (R, I) => { - const j = De.devicePixelRatio % 1 !== 0 ? 1 : 0, M = { - w: h(R.w - I.w), - h: h(R.h - I.h) + }, V = (E, R) => { + const P = Ve.devicePixelRatio % 1 !== 0 ? 1 : 0, M = { + w: h(E.w - R.w), + h: h(E.h - R.h) }; return { - w: M.w > j ? M.w : 0, - h: M.h > j ? M.h : 0 + w: M.w > P ? M.w : 0, + h: M.h > P ? M.h : 0 }; - }, [L, z] = Ve(E, X(ss, c)), [O, y] = Ve(E, X(on, c)), [w, C] = Ve(E), [A] = Ve(H), [B, k] = Ve(E), [N] = Ve(H), [U] = Ve({ - i: (R, I) => vn(R, I, S), + }, [F, z] = Le(T, X(ls, a)), [O, w] = Le(T, X(cn, a)), [y, L] = Le(T), [k] = Le(I), [H, S] = Le(T), [U] = Le(I), [N] = Le({ + i: (E, R) => pn(E, R, $), o: {} - }, () => Hr(c) ? Qe(c, S) : {}), [ee, se] = Ve({ - i: (R, I) => Wt(R.D, I.D) && Wt(R.M, I.M), - o: mo() - }), ne = Lt(Eo), pe = (R, I) => `${I ? Ur : qr}${Tr(R)}`, F = (R) => { - const I = (M) => [st, it, gt].map((K) => pe(K, M)), j = I(!0).concat(I()).join(" "); - m(j), m(Be(R).map((M) => pe(R[M], M === "x")).join(" "), !0); + }, () => Br(a) ? tt(a, $) : {}), [Q, se] = Le({ + i: (E, R) => Jt(E.D, R.D) && Jt(E.M, R.M), + o: go() + }), ne = Ft($o), _e = (E, R) => `${R ? zr : jr}${Dr(E)}`, Y = (E) => { + const R = (M) => [rt, ct, bt].map((G) => _e(G, M)), P = R(!0).concat(R()).join(" "); + f(P), f(Ue(E).map((M) => _e(E[M], M === "x")).join(" "), !0); }; - return ({ It: R, Zt: I, _n: j, Dt: M }, { fn: K }) => { - const { ft: G, Ht: Y, Ct: te, dt: ie, zt: be } = I || {}, _e = ne && ne.tt(t, e, j, n, R), { it: $e, ut: Z, _t: Ce } = _e || {}, [Ae, ye] = fl(R, n), [Ee, he] = R("overflow"), we = wt(Ee.x), ce = wt(Ee.y), fe = !0; - let ke = z(M), Te = y(M), $t = C(M), Ft = k(M); - ye && p && m(go, !Ae); + return ({ It: E, Zt: R, _n: P, Dt: M }, { fn: G }) => { + const { ft: j, Ht: K, Ct: te, dt: ie, zt: we } = R || {}, pe = ne && ne.V(t, e, P, n, E), { W: Ee, X: ee, J: ye } = pe || {}, [Ae, xe] = al(E, n), [Se, he] = E("overflow"), ge = yt(Se.x), fe = yt(Se.y), ce = !0; + let $e = z(M), Me = w(M), Ct = L(M), It = S(M); + xe && p && f(xo, !Ae); { - ts(r, ot, Xt) && T(!0); - const [us] = Z ? Z() : [], [It] = ke = L(M), [Nt] = Te = O(M), Ut = uo(c), qt = f && Rr(v()), Qo = { - w: h(Nt.w + It.w), - h: h(Nt.h + It.h) - }, vs = { - w: h((qt ? qt.w : Ut.w + h(Ut.w - Nt.w)) + It.w), - h: h((qt ? qt.h : Ut.h + h(Ut.h - Nt.h)) + It.h) + os(r, lt, en) && D(!0); + const [fs] = ee ? ee() : [], [qt] = $e = F(M), [zt] = Me = O(M), jt = fo(a), Gt = m && Rr(v()), tr = { + w: h(zt.w + qt.w), + h: h(zt.h + qt.h) + }, ms = { + w: h((Gt ? Gt.w : jt.w + h(jt.w - zt.w)) + qt.w), + h: h((Gt ? Gt.h : jt.h + h(jt.h - zt.h)) + qt.h) }; - us && us(), Ft = B(vs), $t = w(V(Qo, vs), M); + fs && fs(), It = H(ms), Ct = y(V(tr, ms), M); } - const [Rt, Ht] = Ft, [at, vt] = $t, [pn, hn] = Te, [gn, bn] = ke, [Ie, wn] = A({ - x: at.w > 0, - y: at.h > 0 - }), Ct = we && ce && (Ie.x || Ie.y) || we && Ie.x && !Ie.y || ce && Ie.y && !Ie.x, Et = K || te || be || bn || hn || Ht || vt || he || ye || fe, tt = ml(Ie, Ee), [Bt, At] = N(tt.K), [Yo, Xo] = U(M), ds = te || ie || Xo || wn || M, [Jo, Zo] = ds ? ee($(Yo), M) : se(); - return Et && (At && F(tt.K), Ce && $e && Vt(c, Ce(tt, j, $e(tt, pn, gn)))), T(!1), sn(r, ot, Xt, Ct), sn(s, qn, Xt, Ct), oe(e, { - K: Bt, + const [Ht, Rt] = It, [it, Et] = Ct, [Bt, wn] = Me, [yn, kn] = $e, [Ne, xn] = k({ + x: it.w > 0, + y: it.h > 0 + }), Ut = ge && fe && (Ne.x || Ne.y) || ge && Ne.x && !Ne.y || fe && Ne.y && !Ne.x, Nt = G || te || we || kn || wn || Rt || Et || he || xe || ce, st = il(Ne, Se), [Tt, Mt] = U(st.k), [Pt, Jo] = N(M), _s = te || ie || Jo || xn || M, [Qo, er] = _s ? Q(C(Pt), M) : se(); + return Nt && (Mt && Y(st.k), ye && Ee && Lt(a, ye(st, P, Ee(st, Bt, yn)))), D(!1), an(r, lt, en, Ut), an(s, jn, en, Ut), oe(e, { + k: Tt, Vt: { - x: Rt.w, - y: Rt.h + x: Ht.w, + y: Ht.h }, Rt: { - x: at.w, - y: at.h + x: it.w, + y: it.h }, - rn: Ie, - Lt: Br(Jo, at) + rn: Ne, + Lt: Ur(Qo, it) }), { - en: At, - nn: Ht, - sn: vt, - cn: Zo || vt, - vn: ds + en: Mt, + nn: Rt, + sn: Et, + cn: er || Et, + pn: _s }; }; }, Cl = (t) => { @@ -1320,14 +1316,14 @@ const rl = () => { l: 0 }, dn: !1, - rt: { + j: { + [Zs]: 0, + [Js]: 0, + [Xs]: 0, + [Gs]: 0, [Ws]: 0, [Ys]: 0, - [Ks]: 0, - [Ps]: 0, - [zs]: 0, - [Gs]: 0, - [js]: 0 + [Ks]: 0 }, Vt: { x: 0, @@ -1337,265 +1333,269 @@ const rl = () => { x: 0, y: 0 }, - K: { - x: it, - y: it + k: { + x: ct, + y: ct }, rn: { x: !1, y: !1 }, - Lt: mo() - }, { vt: c, gt: i, nt: d, Ot: a } = e, { R: u, k: m } = Ge(), v = !u && (m.x || m.y), p = [xl(e), Sl(e, s), $l(e, s)]; - return [n, (f) => { - const h = {}, S = v && Le(i), E = S && a(); - return ae(p, (H) => { - oe(h, H(f, h) || {}); - }), qe(i, S), E && E(), !d && qe(c, 0), h; + Lt: go() + }, { vt: a, gt: c, L: d, Ot: i } = e, { P: u, T: f } = Ke(), v = !u && (f.x || f.y), p = [xl(e), Sl(e, s), $l(e, s)]; + return [n, (m) => { + const h = {}, $ = v && Fe(c), T = $ && i(); + return ae(p, (I) => { + oe(h, I(m, h) || {}); + }), ze(c, $), T && T(), !d && ze(a, 0), h; }, s, e, r]; }, El = (t, e, n, r, s) => { - let c = !1; - const i = Ss(e, {}), [d, a, u, m, v] = Cl(t), [p, f, h] = gl(m, u, i, ($) => { - T({}, $); - }), [x, S, , E] = yl(t, e, h, u, m, s), H = ($) => Be($).some((V) => !!$[V]), T = ($, V) => { + let a = !1; + const c = Ls(e, {}), [d, i, u, f, v] = Cl(t), [p, m, h] = pl(f, u, c, (C) => { + D({}, C); + }), [x, $, , T] = yl(t, e, h, u, f, s), I = (C) => Ue(C).some((V) => !!C[V]), D = (C, V) => { if (n()) return !1; - const { pn: L, Dt: z, At: O, hn: y } = $, w = L || {}, C = !!z || !c, A = { - It: Ss(e, w, C), - pn: w, - Dt: C + const { vn: F, Dt: z, At: O, hn: w } = C, y = F || {}, L = !!z || !a, k = { + It: Ls(e, y, L), + vn: y, + Dt: L }; - if (y) - return S(A), !1; - const B = V || f(oe({}, A, { + if (w) + return $(k), !1; + const H = V || m(oe({}, k, { At: O - })), k = a(oe({}, A, { + })), S = i(oe({}, k, { _n: h, - Zt: B + Zt: H })); - S(oe({}, A, { - Zt: B, - tn: k + $(oe({}, k, { + Zt: H, + tn: S })); - const N = H(B), U = H(k), ee = N || U || !Zn(w) || C; - return c = !0, ee && r($, { - Zt: B, - tn: k - }), ee; + const U = I(H), N = I(S), Q = U || N || !ts(y) || L; + return a = !0, Q && r(C, { + Zt: H, + tn: S + }), Q; }; return [() => { - const { an: $, gt: V, Ot: L } = m, z = Le($), O = [p(), d(), x()], y = L(); - return qe(V, z), y(), X(Fe, O); - }, T, () => ({ + const { an: C, gt: V, Ot: F } = f, z = Fe(C), O = [p(), d(), x()], w = F(); + return ze(V, z), w(), X(Ie, O); + }, D, () => ({ gn: h, bn: u }), { - wn: m, - yn: E + wn: f, + yn: T }, v]; -}, je = (t, e, n) => { - const { N: r } = Ge(), s = nn(t), c = s ? t : t.target, i = xo(c); - if (e && !i) { +}, cs = /* @__PURE__ */ new WeakMap(), Tl = (t, e) => { + cs.set(t, e); +}, Ml = (t) => { + cs.delete(t); +}, Do = (t) => cs.get(t), We = (t, e, n) => { + const { nt: r } = Ke(), s = ln(t), a = s ? t : t.target, c = Do(a); + if (e && !c) { let d = !1; - const a = [], u = {}, m = (w) => { - const C = eo(w), A = Lt(vl); - return A ? A(C, !0) : C; - }, v = oe({}, r(), m(e)), [p, f, h] = Un(), [x, S, E] = Un(n), H = (w, C) => { - E(w, C), h(w, C); - }, [T, $, V, L, z] = El(t, v, () => d, ({ pn: w, Dt: C }, { Zt: A, tn: B }) => { - const { ft: k, Ct: N, xt: U, Ht: ee, Et: se, dt: ne } = A, { nn: pe, sn: F, en: R, cn: I } = B; - H("updated", [y, { + const i = [], u = {}, f = (y) => { + const L = so(y), k = Ft(Pr); + return k ? k(L, !0) : L; + }, v = oe({}, r(), f(e)), [p, m, h] = zn(), [x, $, T] = zn(n), I = (y, L) => { + T(y, L), h(y, L); + }, [D, C, V, F, z] = El(t, v, () => d, ({ vn: y, Dt: L }, { Zt: k, tn: H }) => { + const { ft: S, Ct: U, xt: N, Ht: Q, Et: se, dt: ne } = k, { nn: _e, sn: Y, en: E, cn: R } = H; + I("updated", [w, { updateHints: { - sizeChanged: !!k, - directionChanged: !!N, - heightIntrinsicChanged: !!U, - overflowEdgeChanged: !!pe, - overflowAmountChanged: !!F, - overflowStyleChanged: !!R, - scrollCoordinatesChanged: !!I, - contentMutation: !!ee, + sizeChanged: !!S, + directionChanged: !!U, + heightIntrinsicChanged: !!N, + overflowEdgeChanged: !!_e, + overflowAmountChanged: !!Y, + overflowStyleChanged: !!E, + scrollCoordinatesChanged: !!R, + contentMutation: !!Q, hostMutation: !!se, appear: !!ne }, - changedOptions: w || {}, - force: !!C + changedOptions: y || {}, + force: !!L }]); - }, (w) => H("scroll", [y, w])), O = (w) => { - cl(c), Fe(a), d = !0, H("destroyed", [y, w]), f(), S(); - }, y = { - options(w, C) { - if (w) { - const A = C ? r() : {}, B = po(v, oe(A, m(w))); - Zn(B) || (oe(v, B), $({ - pn: B + }, (y) => I("scroll", [w, y])), O = (y) => { + Ml(a), Ie(i), d = !0, I("destroyed", [w, y]), m(), $(); + }, w = { + options(y, L) { + if (y) { + const k = L ? r() : {}, H = Co(v, oe(k, f(y))); + ts(H) || (oe(v, H), C({ + vn: H })); } return oe({}, v); }, on: x, - off: (w, C) => { - w && C && S(w, C); + off: (y, L) => { + y && L && $(y, L); }, state() { - const { gn: w, bn: C } = V(), { ct: A } = w, { Vt: B, Rt: k, K: N, rn: U, ln: ee, dn: se, Lt: ne } = C; + const { gn: y, bn: L } = V(), { F: k } = y, { Vt: H, Rt: S, k: U, rn: N, ln: Q, dn: se, Lt: ne } = L; return oe({}, { - overflowEdge: B, - overflowAmount: k, - overflowStyle: N, - hasOverflow: U, + overflowEdge: H, + overflowAmount: S, + overflowStyle: U, + hasOverflow: N, scrollCoordinates: { start: ne.D, end: ne.M }, - padding: ee, + padding: Q, paddingAbsolute: se, - directionRTL: A, + directionRTL: k, destroyed: d }); }, elements() { - const { vt: w, ht: C, ln: A, ot: B, bt: k, gt: N, Qt: U } = L.wn, { Xt: ee, Gt: se } = L.yn, ne = (F) => { - const { Pt: R, Ut: I, Tt: j } = F; + const { vt: y, ht: L, ln: k, U: H, bt: S, gt: U, Qt: N } = F.wn, { Yt: Q, Gt: se } = F.yn, ne = (Y) => { + const { Pt: E, Ut: R, Tt: P } = Y; return { - scrollbar: j, - track: I, - handle: R + scrollbar: P, + track: R, + handle: E }; - }, pe = (F) => { - const { Yt: R, Wt: I } = F, j = ne(R[0]); - return oe({}, j, { + }, _e = (Y) => { + const { Wt: E, Xt: R } = Y, P = ne(E[0]); + return oe({}, P, { clone: () => { - const M = ne(I()); - return $({ + const M = ne(R()); + return C({ hn: !0 }), M; } }); }; return oe({}, { - target: w, - host: C, - padding: A || B, - viewport: B, - content: k || B, - scrollOffsetElement: N, - scrollEventElement: U, - scrollbarHorizontal: pe(ee), - scrollbarVertical: pe(se) + target: y, + host: L, + padding: k || H, + viewport: H, + content: S || H, + scrollOffsetElement: U, + scrollEventElement: N, + scrollbarHorizontal: _e(Q), + scrollbarVertical: _e(se) }); }, - update: (w) => $({ - Dt: w, + update: (y) => C({ + Dt: y, At: !0 }), destroy: X(O, !1), - plugin: (w) => u[Be(w)[0]] + plugin: (y) => u[Ue(y)[0]] }; - return me(a, [z]), il(c, y), Co(So, je, [y, p, u]), al(L.wn.wt, !s && t.cancel) ? (O(!0), y) : (me(a, T()), H("initialized", [y]), y.update(), y); + return me(i, [z]), Tl(a, w), yo(bo, We, [w, p, u]), gl(F.wn.wt, !s && t.cancel) ? (O(!0), w) : (me(i, D()), I("initialized", [w]), w.update(), w); } - return i; + return c; }; -je.plugin = (t) => { - const e = ze(t), n = e ? t : [t], r = n.map((s) => Co(s, je)[0]); - return ul(n), e ? r : r[0]; +We.plugin = (t) => { + const e = Ge(t), n = e ? t : [t], r = n.map((s) => yo(s, We)[0]); + return Nr(n), e ? r : r[0]; }; -je.valid = (t) => { - const e = t && t.elements, n = He(e) && e(); - return tn(n) && !!xo(n.target); +We.valid = (t) => { + const e = t && t.elements, n = Re(e) && e(); + return rn(n) && !!Do(n.target); }; -je.env = () => { - const { T: t, k: e, R: n, V: r, B: s, F: c, U: i, P: d, N: a, q: u } = Ge(); +We.env = () => { + const { N: t, T: e, P: n, G: r, st: s, et: a, Z: c, tt: d, nt: i, ot: u } = Ke(); return oe({}, { scrollbarsSize: t, scrollbarsOverlaid: e, scrollbarsHiding: n, scrollTimeline: r, staticDefaultInitialization: s, - staticDefaultOptions: c, - getDefaultInitialization: i, + staticDefaultOptions: a, + getDefaultInitialization: c, setDefaultInitialization: d, - getDefaultOptions: a, + getDefaultOptions: i, setDefaultOptions: u }); }; -je.nonce = ol; +We.nonce = vl; function Al() { let t; - const e = D(null), n = Math.floor(Math.random() * 2 ** 32), r = D(!1), s = D([]), c = () => s.value, i = () => t.getSelection(), d = () => s.value.length, a = () => t.clearSelection(!0), u = D(), m = D(null), v = D(null), p = D(null), f = D(null); + const e = A(null), n = Math.floor(Math.random() * 2 ** 32), r = A(!1), s = A([]), a = () => s.value, c = () => t.getSelection(), d = () => s.value.length, i = () => t.clearSelection(!0), u = A(), f = A(null), v = A(null), p = A(null), m = A(null); function h() { - t = new ur({ + t = new _r({ area: e.value, keyboardDrag: !1, selectedClass: "vf-explorer-selected", selectorClass: "vf-explorer-selector" - }), t.subscribe("DS:start:pre", ({ items: V, event: L, isDragging: z }) => { + }), t.subscribe("DS:start:pre", ({ items: V, event: F, isDragging: z }) => { if (z) - t.Interaction._reset(L); + t.Interaction._reset(F); else { r.value = !1; - const O = e.value.offsetWidth - L.offsetX, y = e.value.offsetHeight - L.offsetY; - O < 15 && y < 15 && t.Interaction._reset(L), L.target.classList.contains("os-scrollbar-handle") && t.Interaction._reset(L); + const O = e.value.offsetWidth - F.offsetX, w = e.value.offsetHeight - F.offsetY; + O < 15 && w < 15 && t.Interaction._reset(F), F.target.classList.contains("os-scrollbar-handle") && t.Interaction._reset(F); } }), document.addEventListener("dragleave", (V) => { !V.buttons && r.value && (r.value = !1); }); } - const x = () => ct(() => { + const x = () => dt(() => { t.addSelection( t.getSelectables() - ), S(); - }), S = () => { + ), $(); + }), $ = () => { s.value = t.getSelection().map((V) => JSON.parse(V.dataset.item)), u.value(s.value); - }, E = () => ct(() => { - const V = c().map((L) => L.path); - a(), t.setSettings({ + }, T = () => dt(() => { + const V = a().map((F) => F.path); + i(), t.setSettings({ selectables: document.getElementsByClassName("vf-item-" + n) }), t.addSelection( - t.getSelectables().filter((L) => V.includes(JSON.parse(L.dataset.item).path)) - ), S(), T(); - }), H = (V) => { - u.value = V, t.subscribe("DS:end", ({ items: L, event: z, isDragging: O }) => { - s.value = L.map((y) => JSON.parse(y.dataset.item)), V(L.map((y) => JSON.parse(y.dataset.item))); + t.getSelectables().filter((F) => V.includes(JSON.parse(F.dataset.item).path)) + ), $(), D(); + }), I = (V) => { + u.value = V, t.subscribe("DS:end", ({ items: F, event: z, isDragging: O }) => { + s.value = F.map((w) => JSON.parse(w.dataset.item)), V(F.map((w) => JSON.parse(w.dataset.item))); }); - }, T = () => { - m.value && (e.value.getBoundingClientRect().height < e.value.scrollHeight ? (v.value.style.height = e.value.scrollHeight + "px", v.value.style.display = "block") : (v.value.style.height = "100%", v.value.style.display = "none")); - }, $ = (V) => { - if (!m.value) + }, D = () => { + f.value && (e.value.getBoundingClientRect().height < e.value.scrollHeight ? (v.value.style.height = e.value.scrollHeight + "px", v.value.style.display = "block") : (v.value.style.height = "100%", v.value.style.display = "none")); + }, C = (V) => { + if (!f.value) return; - const { scrollOffsetElement: L } = m.value.elements(); - L.scrollTo( + const { scrollOffsetElement: F } = f.value.elements(); + F.scrollTo( { top: e.value.scrollTop, left: 0 } ); }; - return Se(() => { - je(p.value, { + return Ce(() => { + We(p.value, { scrollbars: { theme: "vf-theme-dark dark:vf-theme-light" }, plugins: { - OverlayScrollbars: je + OverlayScrollbars: We // ScrollbarsHidingPlugin, // SizeObserverPlugin, // ClickScrollPlugin } }, { initialized: (V) => { - m.value = V; + f.value = V; }, - scroll: (V, L) => { + scroll: (V, F) => { const { scrollOffsetElement: z } = V.elements(); e.value.scrollTo({ top: z.scrollTop, left: 0 }); } - }), h(), T(), f.value = new ResizeObserver(T), f.value.observe(e.value), e.value.addEventListener("scroll", $), t.subscribe("DS:scroll", ({ isDragging: V }) => V || $()); - }), Gn(() => { - t && t.stop(), f.value && f.value.disconnect(); - }), Ls(() => { + }), h(), D(), m.value = new ResizeObserver(D), m.value.observe(e.value), e.value.addEventListener("scroll", C), t.subscribe("DS:scroll", ({ isDragging: V }) => V || C()); + }), Yn(() => { + t && t.stop(), m.value && m.value.disconnect(); + }), Hs(() => { t && t.Area.reset(); }), { area: e, @@ -1603,78 +1603,78 @@ function Al() { isDraggingRef: r, scrollBar: v, scrollBarContainer: p, - getSelected: c, - getSelection: i, + getSelected: a, + getSelection: c, selectAll: x, - clearSelection: a, - refreshSelection: E, + clearSelection: i, + refreshSelection: T, getCount: d, - onSelect: H + onSelect: I }; } -function Tl(t, e) { - const n = D(t), r = D(e), s = D([]), c = D([]), i = D([]), d = D(!1), a = D(5); - let u = !1, m = !1; - const v = yt({ +function Dl(t, e) { + const n = A(t), r = A(e), s = A([]), a = A([]), c = A([]), d = A(!1), i = A(5); + let u = !1, f = !1; + const v = kt({ adapter: n, storages: [], dirname: r, files: [] }); function p() { - let H = [], T = [], $ = r.value ?? n.value + "://"; - $.length === 0 && (s.value = []), $.replace(n.value + "://", "").split("/").forEach(function(z) { - H.push(z), H.join("/") !== "" && T.push({ + let I = [], D = [], C = r.value ?? n.value + "://"; + C.length === 0 && (s.value = []), C.replace(n.value + "://", "").split("/").forEach(function(z) { + I.push(z), I.join("/") !== "" && D.push({ basename: z, name: z, - path: n.value + "://" + H.join("/"), + path: n.value + "://" + I.join("/"), type: "dir" }); - }), c.value = T; - const [V, L] = h(T, a.value); - i.value = L, s.value = V; + }), a.value = D; + const [V, F] = h(D, i.value); + c.value = F, s.value = V; } - function f(H) { - a.value = H, p(); + function m(I) { + i.value = I, p(); } - function h(H, T) { - return H.length > T ? [H.slice(-T), H.slice(0, -T)] : [H, []]; + function h(I, D) { + return I.length > D ? [I.slice(-D), I.slice(0, -D)] : [I, []]; } - function x(H = null) { - d.value = H ?? !d.value; + function x(I = null) { + d.value = I ?? !d.value; } - function S() { - return s.value && s.value.length && !m; + function $() { + return s.value && s.value.length && !f; } - const E = rt(() => { - var H; - return ((H = s.value[s.value.length - 2]) == null ? void 0 : H.path) ?? n.value + "://"; + const T = gt(() => { + var I; + return ((I = s.value[s.value.length - 2]) == null ? void 0 : I.path) ?? n.value + "://"; }); - return Se(() => { - }), Me(r, p), Se(p), { + return Ce(() => { + }), De(r, p), Ce(p), { adapter: n, path: r, loading: u, - searchMode: m, + searchMode: f, data: v, breadcrumbs: s, - breadcrumbItems: c, - limitBreadcrumbItems: f, - hiddenBreadcrumbs: i, + breadcrumbItems: a, + limitBreadcrumbItems: m, + hiddenBreadcrumbs: c, showHiddenBreadcrumbs: d, toggleHiddenBreadcrumbs: x, - isGoUpAvailable: S, - parentFolderPath: E + isGoUpAvailable: $, + parentFolderPath: T }; } -const Ml = (t, e) => { - const n = gr(t.id), r = dr(), s = n.getStore("metricUnits", !1), c = Sr(n, t.theme), i = e.i18n, d = t.locale ?? e.locale, a = (f) => Array.isArray(f) ? f : yr, u = n.getStore("persist-path", t.persist), m = u ? n.getStore("path", t.path) : t.path, v = u ? n.getStore("adapter") : null, p = Al(); - return yt({ +const Vl = (t, e) => { + const n = wr(t.id), r = vr(), s = n.getStore("metricUnits", !1), a = Cr(n, t.theme), c = e.i18n, d = t.locale ?? e.locale, i = (m) => Array.isArray(m) ? m : xr, u = n.getStore("persist-path", t.persist), f = u ? n.getStore("path", t.path) : t.path, v = u ? n.getStore("adapter") : null, p = Al(); + return kt({ /** * Core properties * */ // app version - version: kr, + version: Sr, // root element root: null, // app id @@ -1684,15 +1684,15 @@ const Ml = (t, e) => { // storage storage: n, // localization object - i18n: wr(n, d, r, i), + i18n: kr(n, d, r, c), // modal state - modal: $r(), + modal: Er(), // dragSelect object, it is responsible for selecting items - dragSelect: rt(() => p), + dragSelect: gt(() => p), // http object - requester: hr(t.request), + requester: br(t.request), // active features - features: a(t.features), + features: i(t.features), // view state view: n.getStore("viewport", "grid"), // fullscreen state @@ -1711,11 +1711,11 @@ const Ml = (t, e) => { * Settings * */ // theme state - theme: c, + theme: a, // unit state - for example: GB or GiB metricUnits: s, // human readable file sizes - filesize: s ? Is : Bs, + filesize: s ? Ps : Ns, // show large icons in list view compactListView: n.getStore("compact-list-view", !0), // persist state @@ -1724,16 +1724,18 @@ const Ml = (t, e) => { showThumbnails: n.getStore("show-thumbnails", t.showThumbnails), // type of progress indicator loadingIndicator: t.loadingIndicator, + // possible items of the context menu + contextMenuItems: t.contextMenuItems, // file system - fs: Tl(v, m) + fs: Dl(v, f) }); -}, Dl = { class: "vuefinder__modal-layout__container" }, Vl = { class: "vuefinder__modal-layout__content" }, Ol = { class: "vuefinder__modal-layout__footer" }, Ke = { +}, Ll = { class: "vuefinder__modal-layout__container" }, Ol = { class: "vuefinder__modal-layout__content" }, Fl = { class: "vuefinder__modal-layout__footer" }, Ye = { __name: "ModalLayout", setup(t) { - const e = D(null), n = re("ServiceContainer"); - return Se(() => { + const e = A(null), n = re("ServiceContainer"); + return Ce(() => { const r = document.querySelector(".v-f-modal input"); - r && r.focus(), ct(() => { + r && r.focus(), dt(() => { if (document.querySelector(".v-f-modal input") && window.innerWidth < 768) { const s = e.value.getBoundingClientRect().bottom + 16; window.scrollTo({ @@ -1748,66 +1750,66 @@ const Ml = (t, e) => { "aria-labelledby": "modal-title", role: "dialog", "aria-modal": "true", - onKeyup: s[1] || (s[1] = kt((c) => o(n).modal.close(), ["esc"])), + onKeyup: s[1] || (s[1] = xt((a) => o(n).modal.close(), ["esc"])), tabindex: "0" }, [ s[2] || (s[2] = l("div", { class: "vuefinder__modal-layout__overlay" }, null, -1)), - l("div", Dl, [ + l("div", Ll, [ l("div", { class: "vuefinder__modal-layout__wrapper", - onMousedown: s[0] || (s[0] = Ze((c) => o(n).modal.close(), ["self"])) + onMousedown: s[0] || (s[0] = et((a) => o(n).modal.close(), ["self"])) }, [ l("div", { ref_key: "modalBody", ref: e, class: "vuefinder__modal-layout__body" }, [ - l("div", Vl, [ - Tt(r.$slots, "default") - ]), l("div", Ol, [ - Tt(r.$slots, "buttons") + At(r.$slots, "default") + ]), + l("div", Fl, [ + At(r.$slots, "buttons") ]) ], 512) ], 32) ]) ], 32)); } -}, Ll = (t, e) => { +}, Il = (t, e) => { const n = t.__vccOpts || t; for (const [r, s] of e) n[r] = s; return n; -}, Fl = { +}, Hl = { props: { on: { type: String, required: !0 } }, setup(t, { emit: e, slots: n }) { - const r = re("ServiceContainer"), s = D(!1), { t: c } = r.i18n; - let i = null; + const r = re("ServiceContainer"), s = A(!1), { t: a } = r.i18n; + let c = null; const d = () => { - clearTimeout(i), s.value = !0, i = setTimeout(() => { + clearTimeout(c), s.value = !0, c = setTimeout(() => { s.value = !1; }, 2e3); }; - return Se(() => { + return Ce(() => { r.emitter.on(t.on, d); - }), Gn(() => { - clearTimeout(i); + }), Yn(() => { + clearTimeout(c); }), { shown: s, - t: c + t: a }; } }, Rl = { key: 1 }; -function Hl(t, e, n, r, s, c) { +function Bl(t, e, n, r, s, a) { return _(), g("div", { class: le(["vuefinder__action-message", { "vuefinder__action-message--hidden": !r.shown }]) }, [ - t.$slots.default ? Tt(t.$slots, "default", { key: 0 }) : (_(), g("span", Rl, b(r.t("Saved.")), 1)) + t.$slots.default ? At(t.$slots, "default", { key: 0 }) : (_(), g("span", Rl, b(r.t("Saved.")), 1)) ], 2); } -const _t = /* @__PURE__ */ Ll(Fl, [["render", Hl]]), Bl = { +const _t = /* @__PURE__ */ Il(Hl, [["render", Bl]]), Ul = { xmlns: "http://www.w3.org/2000/svg", fill: "none", stroke: "currentColor", @@ -1815,8 +1817,8 @@ const _t = /* @__PURE__ */ Ll(Fl, [["render", Hl]]), Bl = { class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100", viewBox: "0 0 24 24" }; -function Il(t, e) { - return _(), g("svg", Bl, e[0] || (e[0] = [ +function Nl(t, e) { + return _(), g("svg", Ul, e[0] || (e[0] = [ l("path", { "stroke-linecap": "round", "stroke-linejoin": "round", @@ -1829,10 +1831,10 @@ function Il(t, e) { }, null, -1) ])); } -const Nl = { render: Il }, Ul = { class: "vuefinder__modal-header" }, ql = { class: "vuefinder__modal-header__icon-container" }, Pl = { +const Pl = { render: Nl }, ql = { class: "vuefinder__modal-header" }, zl = { class: "vuefinder__modal-header__icon-container" }, jl = { class: "vuefinder__modal-header__title", id: "modal-title" -}, et = { +}, nt = { __name: "ModalHeader", props: { title: { @@ -1845,83 +1847,83 @@ const Nl = { render: Il }, Ul = { class: "vuefinder__modal-header" }, ql = { cla } }, setup(t) { - return (e, n) => (_(), g("div", Ul, [ - l("div", ql, [ - (_(), W(Fs(t.icon), { class: "vuefinder__modal-header__icon" })) + return (e, n) => (_(), g("div", ql, [ + l("div", zl, [ + (_(), W(Rs(t.icon), { class: "vuefinder__modal-header__icon" })) ]), - l("h3", Pl, b(t.title), 1) + l("h3", jl, b(t.title), 1) ])); } -}, zl = { class: "vuefinder__about-modal__content" }, jl = { class: "vuefinder__about-modal__main" }, Gl = { +}, Gl = { class: "vuefinder__about-modal__content" }, Wl = { class: "vuefinder__about-modal__main" }, Kl = { class: "vuefinder__about-modal__tabs", "aria-label": "Tabs" -}, Kl = ["onClick", "aria-current"], Wl = { +}, Yl = ["onClick", "aria-current"], Xl = { key: 0, class: "vuefinder__about-modal__tab-content" -}, Yl = { class: "vuefinder__about-modal__description" }, Xl = { +}, Zl = { class: "vuefinder__about-modal__description" }, Jl = { href: "https://vuefinder.ozdemir.be", class: "vuefinder__about-modal__link", target: "_blank" -}, Jl = { +}, Ql = { href: "https://github.com/n1crack/vuefinder", class: "vuefinder__about-modal__link", target: "_blank" -}, Zl = { +}, ea = { key: 1, class: "vuefinder__about-modal__tab-content" -}, Ql = { class: "vuefinder__about-modal__description" }, ea = { class: "vuefinder__about-modal__settings" }, ta = { class: "vuefinder__about-modal__setting flex" }, na = { class: "vuefinder__about-modal__setting-input" }, sa = { class: "vuefinder__about-modal__setting-label" }, oa = { +}, ta = { class: "vuefinder__about-modal__description" }, na = { class: "vuefinder__about-modal__settings" }, sa = { class: "vuefinder__about-modal__setting flex" }, oa = { class: "vuefinder__about-modal__setting-input" }, ra = { class: "vuefinder__about-modal__setting-label" }, la = { for: "metric_unit", class: "vuefinder__about-modal__label" -}, ra = { class: "vuefinder__about-modal__setting flex" }, la = { class: "vuefinder__about-modal__setting-input" }, aa = { class: "vuefinder__about-modal__setting-label" }, ia = { +}, aa = { class: "vuefinder__about-modal__setting flex" }, ia = { class: "vuefinder__about-modal__setting-input" }, ca = { class: "vuefinder__about-modal__setting-label" }, da = { for: "large_icons", class: "vuefinder__about-modal__label" -}, ca = { class: "vuefinder__about-modal__setting flex" }, da = { class: "vuefinder__about-modal__setting-input" }, ua = { class: "vuefinder__about-modal__setting-label" }, va = { +}, ua = { class: "vuefinder__about-modal__setting flex" }, va = { class: "vuefinder__about-modal__setting-input" }, _a = { class: "vuefinder__about-modal__setting-label" }, fa = { for: "persist_path", class: "vuefinder__about-modal__label" -}, _a = { class: "vuefinder__about-modal__setting flex" }, fa = { class: "vuefinder__about-modal__setting-input" }, ma = { class: "vuefinder__about-modal__setting-label" }, pa = { +}, ma = { class: "vuefinder__about-modal__setting flex" }, pa = { class: "vuefinder__about-modal__setting-input" }, ha = { class: "vuefinder__about-modal__setting-label" }, ga = { for: "show_thumbnails", class: "vuefinder__about-modal__label" -}, ha = { class: "vuefinder__about-modal__setting" }, ga = { class: "vuefinder__about-modal__setting-input" }, ba = { +}, ba = { class: "vuefinder__about-modal__setting" }, wa = { class: "vuefinder__about-modal__setting-input" }, ya = { for: "theme", class: "vuefinder__about-modal__label" -}, wa = { class: "vuefinder__about-modal__setting-label" }, ya = ["label"], ka = ["value"], xa = { +}, ka = { class: "vuefinder__about-modal__setting-label" }, xa = ["label"], Sa = ["value"], $a = { key: 0, class: "vuefinder__about-modal__setting" -}, Sa = { class: "vuefinder__about-modal__setting-input" }, $a = { +}, Ca = { class: "vuefinder__about-modal__setting-input" }, Ea = { for: "language", class: "vuefinder__about-modal__label" -}, Ca = { class: "vuefinder__about-modal__setting-label" }, Ea = ["label"], Aa = ["value"], Ta = { +}, Ta = { class: "vuefinder__about-modal__setting-label" }, Ma = ["label"], Aa = ["value"], Da = { key: 2, class: "vuefinder__about-modal__tab-content" -}, Ma = { class: "vuefinder__about-modal__shortcuts" }, Da = { class: "vuefinder__about-modal__shortcut" }, Va = { class: "vuefinder__about-modal__shortcut" }, Oa = { class: "vuefinder__about-modal__shortcut" }, La = { class: "vuefinder__about-modal__shortcut" }, Fa = { class: "vuefinder__about-modal__shortcut" }, Ra = { class: "vuefinder__about-modal__shortcut" }, Ha = { class: "vuefinder__about-modal__shortcut" }, Ba = { class: "vuefinder__about-modal__shortcut" }, Ia = { class: "vuefinder__about-modal__shortcut" }, Na = { +}, Va = { class: "vuefinder__about-modal__shortcuts" }, La = { class: "vuefinder__about-modal__shortcut" }, Oa = { class: "vuefinder__about-modal__shortcut" }, Fa = { class: "vuefinder__about-modal__shortcut" }, Ia = { class: "vuefinder__about-modal__shortcut" }, Ha = { class: "vuefinder__about-modal__shortcut" }, Ra = { class: "vuefinder__about-modal__shortcut" }, Ba = { class: "vuefinder__about-modal__shortcut" }, Ua = { class: "vuefinder__about-modal__shortcut" }, Na = { class: "vuefinder__about-modal__shortcut" }, Pa = { key: 3, class: "vuefinder__about-modal__tab-content" -}, Ua = { class: "vuefinder__about-modal__description" }, To = { +}, qa = { class: "vuefinder__about-modal__description" }, Vo = { __name: "ModalAbout", setup(t) { - const e = re("ServiceContainer"), { setStore: n, clearStore: r } = e.storage, { t: s } = e.i18n, c = { + const e = re("ServiceContainer"), { setStore: n, clearStore: r } = e.storage, { t: s } = e.i18n, a = { ABOUT: "about", SETTINGS: "settings", SHORTCUTS: "shortcuts", RESET: "reset" - }, i = rt(() => [ - { name: s("About"), key: c.ABOUT }, - { name: s("Settings"), key: c.SETTINGS }, - { name: s("Shortcuts"), key: c.SHORTCUTS }, - { name: s("Reset"), key: c.RESET } - ]), d = D("about"), a = async () => { + }, c = gt(() => [ + { name: s("About"), key: a.ABOUT }, + { name: s("Settings"), key: a.SETTINGS }, + { name: s("Shortcuts"), key: a.SHORTCUTS }, + { name: s("Reset"), key: a.RESET } + ]), d = A("about"), i = async () => { r(), location.reload(); - }, u = (H) => { - e.theme.set(H), e.emitter.emit("vf-theme-saved"); - }, m = () => { - e.metricUnits = !e.metricUnits, e.filesize = e.metricUnits ? Is : Bs, n("metricUnits", e.metricUnits), e.emitter.emit("vf-metric-units-saved"); + }, u = (I) => { + e.theme.set(I), e.emitter.emit("vf-theme-saved"); + }, f = () => { + e.metricUnits = !e.metricUnits, e.filesize = e.metricUnits ? Ps : Ns, n("metricUnits", e.metricUnits), e.emitter.emit("vf-metric-units-saved"); }, v = () => { e.compactListView = !e.compactListView, n("compactListView", e.compactListView), e.emitter.emit("vf-compact-view-saved"); }, p = () => { e.showThumbnails = !e.showThumbnails, n("show-thumbnails", e.showThumbnails), e.emitter.emit("vf-show-thumbnails-saved"); - }, f = () => { + }, m = () => { e.persist = !e.persist, n("persist-path", e.persist), e.emitter.emit("vf-persist-path-saved"); - }, { i18n: h } = re("VueFinderOptions"), S = Object.fromEntries( + }, { i18n: h } = re("VueFinderOptions"), $ = Object.fromEntries( Object.entries({ ar: "Arabic (العربيّة)", en: "English", @@ -1930,304 +1932,305 @@ const Nl = { render: Il }, Ul = { class: "vuefinder__modal-header" }, ql = { cla fa: "Persian (فارسی)", he: "Hebrew (עִברִית)", hi: "Hindi (हिंदी)", + pl: "Polish (Polski)", ru: "Russian (Pусский)", sv: "Swedish (Svenska)", tr: "Turkish (Türkçe)", zhCN: "Simplified Chinese (简体中文)", zhTW: "Traditional Chinese (繁體中文)" - }).filter(([H]) => Object.keys(h).includes(H)) - ), E = rt(() => ({ + }).filter(([I]) => Object.keys(h).includes(I)) + ), T = gt(() => ({ system: s("System"), light: s("Light"), dark: s("Dark") })); - return (H, T) => (_(), W(Ke, null, { - buttons: Q(() => [ + return (I, D) => (_(), W(Ye, null, { + buttons: J(() => [ l("button", { type: "button", - onClick: T[7] || (T[7] = ($) => o(e).modal.close()), + onClick: D[7] || (D[7] = (C) => o(e).modal.close()), class: "vf-btn vf-btn-secondary" }, b(o(s)("Close")), 1) ]), - default: Q(() => [ - l("div", zl, [ - P(et, { - icon: o(Nl), + default: J(() => [ + l("div", Gl, [ + q(nt, { + icon: o(Pl), title: "Vuefinder " + o(e).version }, null, 8, ["icon", "title"]), - l("div", jl, [ + l("div", Wl, [ l("div", null, [ l("div", null, [ - l("nav", Gl, [ - (_(!0), g(ge, null, xe(i.value, ($) => (_(), g("button", { - key: $.name, - onClick: (V) => d.value = $.key, - class: le([$.key === d.value ? "vuefinder__about-modal__tab--active" : "vuefinder__about-modal__tab--inactive", "vuefinder__about-modal__tab"]), - "aria-current": $.current ? "page" : void 0 - }, b($.name), 11, Kl))), 128)) + l("nav", Kl, [ + (_(!0), g(be, null, ke(c.value, (C) => (_(), g("button", { + key: C.name, + onClick: (V) => d.value = C.key, + class: le([C.key === d.value ? "vuefinder__about-modal__tab--active" : "vuefinder__about-modal__tab--inactive", "vuefinder__about-modal__tab"]), + "aria-current": C.current ? "page" : void 0 + }, b(C.name), 11, Yl))), 128)) ]) ]) ]), - d.value === c.ABOUT ? (_(), g("div", Wl, [ - l("div", Yl, b(o(s)("Vuefinder is a simple, lightweight, and fast file manager library for Vue.js applications")), 1), - l("a", Xl, b(o(s)("Project home")), 1), - l("a", Jl, b(o(s)("Follow on GitHub")), 1) - ])) : q("", !0), - d.value === c.SETTINGS ? (_(), g("div", Zl, [ - l("div", Ql, b(o(s)("Customize your experience with the following settings")), 1), - l("div", ea, [ + d.value === a.ABOUT ? (_(), g("div", Xl, [ + l("div", Zl, b(o(s)("Vuefinder is a simple, lightweight, and fast file manager library for Vue.js applications")), 1), + l("a", Jl, b(o(s)("Project home")), 1), + l("a", Ql, b(o(s)("Follow on GitHub")), 1) + ])) : B("", !0), + d.value === a.SETTINGS ? (_(), g("div", ea, [ + l("div", ta, b(o(s)("Customize your experience with the following settings")), 1), + l("div", na, [ l("fieldset", null, [ - l("div", ta, [ - l("div", na, [ + l("div", sa, [ + l("div", oa, [ ue(l("input", { id: "metric_unit", name: "metric_unit", type: "checkbox", - "onUpdate:modelValue": T[0] || (T[0] = ($) => o(e).metricUnits = $), - onClick: m, + "onUpdate:modelValue": D[0] || (D[0] = (C) => o(e).metricUnits = C), + onClick: f, class: "vuefinder__about-modal__checkbox" }, null, 512), [ - [Pt, o(e).metricUnits] + [Wt, o(e).metricUnits] ]) ]), - l("div", sa, [ - l("label", oa, [ - J(b(o(s)("Use Metric Units")) + " ", 1), - P(_t, { + l("div", ra, [ + l("label", la, [ + Z(b(o(s)("Use Metric Units")) + " ", 1), + q(_t, { class: "ms-3", on: "vf-metric-units-saved" }, { - default: Q(() => [ - J(b(o(s)("Saved.")), 1) + default: J(() => [ + Z(b(o(s)("Saved.")), 1) ]), _: 1 }) ]) ]) ]), - l("div", ra, [ - l("div", la, [ + l("div", aa, [ + l("div", ia, [ ue(l("input", { id: "large_icons", name: "large_icons", type: "checkbox", - "onUpdate:modelValue": T[1] || (T[1] = ($) => o(e).compactListView = $), + "onUpdate:modelValue": D[1] || (D[1] = (C) => o(e).compactListView = C), onClick: v, class: "vuefinder__about-modal__checkbox" }, null, 512), [ - [Pt, o(e).compactListView] + [Wt, o(e).compactListView] ]) ]), - l("div", aa, [ - l("label", ia, [ - J(b(o(s)("Compact list view")) + " ", 1), - P(_t, { + l("div", ca, [ + l("label", da, [ + Z(b(o(s)("Compact list view")) + " ", 1), + q(_t, { class: "ms-3", on: "vf-compact-view-saved" }, { - default: Q(() => [ - J(b(o(s)("Saved.")), 1) + default: J(() => [ + Z(b(o(s)("Saved.")), 1) ]), _: 1 }) ]) ]) ]), - l("div", ca, [ - l("div", da, [ + l("div", ua, [ + l("div", va, [ ue(l("input", { id: "persist_path", name: "persist_path", type: "checkbox", - "onUpdate:modelValue": T[2] || (T[2] = ($) => o(e).persist = $), - onClick: f, + "onUpdate:modelValue": D[2] || (D[2] = (C) => o(e).persist = C), + onClick: m, class: "vuefinder__about-modal__checkbox" }, null, 512), [ - [Pt, o(e).persist] + [Wt, o(e).persist] ]) ]), - l("div", ua, [ - l("label", va, [ - J(b(o(s)("Persist path on reload")) + " ", 1), - P(_t, { + l("div", _a, [ + l("label", fa, [ + Z(b(o(s)("Persist path on reload")) + " ", 1), + q(_t, { class: "ms-3", on: "vf-persist-path-saved" }, { - default: Q(() => [ - J(b(o(s)("Saved.")), 1) + default: J(() => [ + Z(b(o(s)("Saved.")), 1) ]), _: 1 }) ]) ]) ]), - l("div", _a, [ - l("div", fa, [ + l("div", ma, [ + l("div", pa, [ ue(l("input", { id: "show_thumbnails", name: "show_thumbnails", type: "checkbox", - "onUpdate:modelValue": T[3] || (T[3] = ($) => o(e).showThumbnails = $), + "onUpdate:modelValue": D[3] || (D[3] = (C) => o(e).showThumbnails = C), onClick: p, class: "vuefinder__about-modal__checkbox" }, null, 512), [ - [Pt, o(e).showThumbnails] + [Wt, o(e).showThumbnails] ]) ]), - l("div", ma, [ - l("label", pa, [ - J(b(o(s)("Show thumbnails")) + " ", 1), - P(_t, { + l("div", ha, [ + l("label", ga, [ + Z(b(o(s)("Show thumbnails")) + " ", 1), + q(_t, { class: "ms-3", on: "vf-show-thumbnails-saved" }, { - default: Q(() => [ - J(b(o(s)("Saved.")), 1) + default: J(() => [ + Z(b(o(s)("Saved.")), 1) ]), _: 1 }) ]) ]) ]), - l("div", ha, [ - l("div", ga, [ - l("label", ba, b(o(s)("Theme")), 1) - ]), + l("div", ba, [ l("div", wa, [ + l("label", ya, b(o(s)("Theme")), 1) + ]), + l("div", ka, [ ue(l("select", { id: "theme", - "onUpdate:modelValue": T[4] || (T[4] = ($) => o(e).theme.value = $), - onChange: T[5] || (T[5] = ($) => u($.target.value)), + "onUpdate:modelValue": D[4] || (D[4] = (C) => o(e).theme.value = C), + onChange: D[5] || (D[5] = (C) => u(C.target.value)), class: "vuefinder__about-modal__select" }, [ l("optgroup", { label: o(s)("Theme") }, [ - (_(!0), g(ge, null, xe(E.value, ($, V) => (_(), g("option", { value: V }, b($), 9, ka))), 256)) - ], 8, ya) + (_(!0), g(be, null, ke(T.value, (C, V) => (_(), g("option", { value: V }, b(C), 9, Sa))), 256)) + ], 8, xa) ], 544), [ - [An, o(e).theme.value] + [Dn, o(e).theme.value] ]), - P(_t, { + q(_t, { class: "ms-3", on: "vf-theme-saved" }, { - default: Q(() => [ - J(b(o(s)("Saved.")), 1) + default: J(() => [ + Z(b(o(s)("Saved.")), 1) ]), _: 1 }) ]) ]), - o(e).features.includes(o(de).LANGUAGE) && Object.keys(o(S)).length > 1 ? (_(), g("div", xa, [ - l("div", Sa, [ - l("label", $a, b(o(s)("Language")), 1) - ]), + o(e).features.includes(o(de).LANGUAGE) && Object.keys(o($)).length > 1 ? (_(), g("div", $a, [ l("div", Ca, [ + l("label", Ea, b(o(s)("Language")), 1) + ]), + l("div", Ta, [ ue(l("select", { id: "language", - "onUpdate:modelValue": T[6] || (T[6] = ($) => o(e).i18n.locale = $), + "onUpdate:modelValue": D[6] || (D[6] = (C) => o(e).i18n.locale = C), class: "vuefinder__about-modal__select" }, [ l("optgroup", { label: o(s)("Language") }, [ - (_(!0), g(ge, null, xe(o(S), ($, V) => (_(), g("option", { value: V }, b($), 9, Aa))), 256)) - ], 8, Ea) + (_(!0), g(be, null, ke(o($), (C, V) => (_(), g("option", { value: V }, b(C), 9, Aa))), 256)) + ], 8, Ma) ], 512), [ - [An, o(e).i18n.locale] + [Dn, o(e).i18n.locale] ]), - P(_t, { + q(_t, { class: "ms-3", on: "vf-language-saved" }, { - default: Q(() => [ - J(b(o(s)("Saved.")), 1) + default: J(() => [ + Z(b(o(s)("Saved.")), 1) ]), _: 1 }) ]) - ])) : q("", !0) + ])) : B("", !0) ]) ]) - ])) : q("", !0), - d.value === c.SHORTCUTS ? (_(), g("div", Ta, [ - l("div", Ma, [ - l("div", Da, [ + ])) : B("", !0), + d.value === a.SHORTCUTS ? (_(), g("div", Da, [ + l("div", Va, [ + l("div", La, [ l("div", null, b(o(s)("Rename")), 1), - T[8] || (T[8] = l("kbd", null, "F2", -1)) + D[8] || (D[8] = l("kbd", null, "F2", -1)) ]), - l("div", Va, [ + l("div", Oa, [ l("div", null, b(o(s)("Refresh")), 1), - T[9] || (T[9] = l("kbd", null, "F5", -1)) + D[9] || (D[9] = l("kbd", null, "F5", -1)) ]), - l("div", Oa, [ - J(b(o(s)("Delete")) + " ", 1), - T[10] || (T[10] = l("kbd", null, "Del", -1)) + l("div", Fa, [ + Z(b(o(s)("Delete")) + " ", 1), + D[10] || (D[10] = l("kbd", null, "Del", -1)) ]), - l("div", La, [ - J(b(o(s)("Escape")) + " ", 1), - T[11] || (T[11] = l("div", null, [ + l("div", Ia, [ + Z(b(o(s)("Escape")) + " ", 1), + D[11] || (D[11] = l("div", null, [ l("kbd", null, "Esc") ], -1)) ]), - l("div", Fa, [ - J(b(o(s)("Select All")) + " ", 1), - T[12] || (T[12] = l("div", null, [ + l("div", Ha, [ + Z(b(o(s)("Select All")) + " ", 1), + D[12] || (D[12] = l("div", null, [ l("kbd", null, "Ctrl"), - J(" + "), + Z(" + "), l("kbd", null, "A") ], -1)) ]), l("div", Ra, [ - J(b(o(s)("Search")) + " ", 1), - T[13] || (T[13] = l("div", null, [ + Z(b(o(s)("Search")) + " ", 1), + D[13] || (D[13] = l("div", null, [ l("kbd", null, "Ctrl"), - J(" + "), + Z(" + "), l("kbd", null, "F") ], -1)) ]), - l("div", Ha, [ - J(b(o(s)("Toggle Sidebar")) + " ", 1), - T[14] || (T[14] = l("div", null, [ + l("div", Ba, [ + Z(b(o(s)("Toggle Sidebar")) + " ", 1), + D[14] || (D[14] = l("div", null, [ l("kbd", null, "Ctrl"), - J(" + "), + Z(" + "), l("kbd", null, "E") ], -1)) ]), - l("div", Ba, [ - J(b(o(s)("Open Settings")) + " ", 1), - T[15] || (T[15] = l("div", null, [ + l("div", Ua, [ + Z(b(o(s)("Open Settings")) + " ", 1), + D[15] || (D[15] = l("div", null, [ l("kbd", null, "Ctrl"), - J(" + "), + Z(" + "), l("kbd", null, ",") ], -1)) ]), - l("div", Ia, [ - J(b(o(s)("Toggle Full Screen")) + " ", 1), - T[16] || (T[16] = l("div", null, [ + l("div", Na, [ + Z(b(o(s)("Toggle Full Screen")) + " ", 1), + D[16] || (D[16] = l("div", null, [ l("kbd", null, "Ctrl"), - J(" + "), + Z(" + "), l("kbd", null, "Enter") ], -1)) ]) ]) - ])) : q("", !0), - d.value === c.RESET ? (_(), g("div", Na, [ - l("div", Ua, b(o(s)("Reset all settings to default")), 1), + ])) : B("", !0), + d.value === a.RESET ? (_(), g("div", Pa, [ + l("div", qa, b(o(s)("Reset all settings to default")), 1), l("button", { - onClick: a, + onClick: i, type: "button", class: "vf-btn vf-btn-secondary" }, b(o(s)("Reset Settings")), 1) - ])) : q("", !0) + ])) : B("", !0) ]) ]) ]), _: 1 })); } -}, qa = ["title"], We = { +}, za = ["title"], Xe = { __name: "Message", props: { error: { @@ -2238,22 +2241,22 @@ const Nl = { render: Il }, Ul = { class: "vuefinder__modal-header" }, ql = { cla emits: ["hidden"], setup(t, { emit: e }) { var u; - const n = e, r = re("ServiceContainer"), { t: s } = r.i18n, c = D(!1), i = D(null), d = D((u = i.value) == null ? void 0 : u.strMessage); - Me(d, () => c.value = !1); - const a = () => { - n("hidden"), c.value = !0; + const n = e, r = re("ServiceContainer"), { t: s } = r.i18n, a = A(!1), c = A(null), d = A((u = c.value) == null ? void 0 : u.strMessage); + De(d, () => a.value = !1); + const i = () => { + n("hidden"), a.value = !0; }; - return (m, v) => (_(), g("div", null, [ - c.value ? q("", !0) : (_(), g("div", { + return (f, v) => (_(), g("div", null, [ + a.value ? B("", !0) : (_(), g("div", { key: 0, ref_key: "strMessage", - ref: i, + ref: c, class: le(["vuefinder__message", t.error ? "vuefinder__message--error" : "vuefinder__message--success"]) }, [ - Tt(m.$slots, "default"), + At(f.$slots, "default"), l("div", { class: "vuefinder__message__close", - onClick: a, + onClick: i, title: o(s)("Close") }, v[0] || (v[0] = [ l("svg", { @@ -2270,23 +2273,23 @@ const Nl = { render: Il }, Ul = { class: "vuefinder__modal-header" }, ql = { cla d: "M6 18L18 6M6 6l12 12" }) ], -1) - ]), 8, qa) + ]), 8, za) ], 2)) ])); } -}, Pa = { +}, ja = { 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" }; -function za(t, e) { - return _(), g("svg", Pa, e[0] || (e[0] = [ +function Ga(t, e) { + return _(), g("svg", ja, e[0] || (e[0] = [ l("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) ])); } -const Mo = { render: za }, ja = { class: "vuefinder__delete-modal__content" }, Ga = { class: "vuefinder__delete-modal__form" }, Ka = { class: "vuefinder__delete-modal__description" }, Wa = { class: "vuefinder__delete-modal__files vf-scrollbar" }, Ya = { class: "vuefinder__delete-modal__file" }, Xa = { +const Lo = { render: Ga }, Wa = { class: "vuefinder__delete-modal__content" }, Ka = { class: "vuefinder__delete-modal__form" }, Ya = { class: "vuefinder__delete-modal__description" }, Xa = { class: "vuefinder__delete-modal__files vf-scrollbar" }, Za = { class: "vuefinder__delete-modal__file" }, Ja = { key: 0, class: "vuefinder__delete-modal__icon vuefinder__delete-modal__icon--dir", xmlns: "http://www.w3.org/2000/svg", @@ -2294,7 +2297,7 @@ const Mo = { render: za }, ja = { class: "vuefinder__delete-modal__content" }, G viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, Ja = { +}, Qa = { key: 1, class: "vuefinder__delete-modal__icon", xmlns: "http://www.w3.org/2000/svg", @@ -2302,10 +2305,10 @@ const Mo = { render: za }, ja = { class: "vuefinder__delete-modal__content" }, G viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, Za = { class: "vuefinder__delete-modal__file-name" }, Qa = { class: "vuefinder__delete-modal__warning" }, as = { +}, ei = { class: "vuefinder__delete-modal__file-name" }, ti = { class: "vuefinder__delete-modal__warning" }, ds = { __name: "ModalDelete", setup(t) { - const e = re("ServiceContainer"), { t: n } = e.i18n, r = D(e.modal.data.items), s = D(""), c = () => { + const e = re("ServiceContainer"), { t: n } = e.i18n, r = A(e.modal.data.items), s = A(""), a = () => { r.value.length && e.emitter.emit("vf-fetch", { params: { q: "delete", @@ -2314,67 +2317,67 @@ const Mo = { render: za }, ja = { class: "vuefinder__delete-modal__content" }, G path: e.fs.data.dirname }, body: { - items: r.value.map(({ path: i, type: d }) => ({ path: i, type: d })) + items: r.value.map(({ path: c, type: d }) => ({ path: c, type: d })) }, onSuccess: () => { e.emitter.emit("vf-toast-push", { label: n("Files deleted.") }); }, - onError: (i) => { - s.value = n(i.message); + onError: (c) => { + s.value = n(c.message); } }); }; - return (i, d) => (_(), W(Ke, null, { - buttons: Q(() => [ + return (c, d) => (_(), W(Ye, null, { + buttons: J(() => [ l("button", { type: "button", - onClick: c, + onClick: a, class: "vf-btn vf-btn-danger" }, b(o(n)("Yes, Delete!")), 1), l("button", { type: "button", - onClick: d[1] || (d[1] = (a) => o(e).modal.close()), + onClick: d[1] || (d[1] = (i) => o(e).modal.close()), class: "vf-btn vf-btn-secondary" }, b(o(n)("Cancel")), 1), - l("div", Qa, b(o(n)("This action cannot be undone.")), 1) + l("div", ti, b(o(n)("This action cannot be undone.")), 1) ]), - default: Q(() => [ + default: J(() => [ l("div", null, [ - P(et, { - icon: o(Mo), + q(nt, { + icon: o(Lo), title: o(n)("Delete files") }, null, 8, ["icon", "title"]), - l("div", ja, [ - l("div", Ga, [ - l("p", Ka, b(o(n)("Are you sure you want to delete these files?")), 1), - l("div", Wa, [ - (_(!0), g(ge, null, xe(r.value, (a) => (_(), g("p", Ya, [ - a.type === "dir" ? (_(), g("svg", Xa, d[2] || (d[2] = [ + l("div", Wa, [ + l("div", Ka, [ + l("p", Ya, b(o(n)("Are you sure you want to delete these files?")), 1), + l("div", Xa, [ + (_(!0), g(be, null, ke(r.value, (i) => (_(), g("p", Za, [ + i.type === "dir" ? (_(), g("svg", Ja, d[2] || (d[2] = [ l("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) - ]))) : (_(), g("svg", Ja, d[3] || (d[3] = [ + ]))) : (_(), g("svg", Qa, d[3] || (d[3] = [ l("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) ]))), - l("span", Za, b(a.basename), 1) + l("span", ei, b(i.basename), 1) ]))), 256)) ]), - s.value.length ? (_(), W(We, { + s.value.length ? (_(), W(Xe, { key: 0, - onHidden: d[0] || (d[0] = (a) => s.value = ""), + onHidden: d[0] || (d[0] = (i) => s.value = ""), error: "" }, { - default: Q(() => [ - J(b(s.value), 1) + default: J(() => [ + Z(b(s.value), 1) ]), _: 1 - })) : q("", !0) + })) : B("", !0) ]) ]) ]) @@ -2382,19 +2385,19 @@ const Mo = { render: za }, ja = { class: "vuefinder__delete-modal__content" }, G _: 1 })); } -}, ei = { +}, ni = { 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" }; -function ti(t, e) { - return _(), g("svg", ei, e[0] || (e[0] = [ +function si(t, e) { + return _(), g("svg", ni, e[0] || (e[0] = [ l("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) ])); } -const Do = { render: ti }, ni = { class: "vuefinder__rename-modal__content" }, si = { class: "vuefinder__rename-modal__item" }, oi = { class: "vuefinder__rename-modal__item-info" }, ri = { +const Oo = { render: si }, oi = { class: "vuefinder__rename-modal__content" }, ri = { class: "vuefinder__rename-modal__item" }, li = { class: "vuefinder__rename-modal__item-info" }, ai = { key: 0, class: "vuefinder__rename-modal__icon vuefinder__rename-modal__icon--dir", xmlns: "http://www.w3.org/2000/svg", @@ -2402,7 +2405,7 @@ const Do = { render: ti }, ni = { class: "vuefinder__rename-modal__content" }, s viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, li = { +}, ii = { key: 1, class: "vuefinder__rename-modal__icon", xmlns: "http://www.w3.org/2000/svg", @@ -2410,10 +2413,10 @@ const Do = { render: ti }, ni = { class: "vuefinder__rename-modal__content" }, s viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, ai = { class: "vuefinder__rename-modal__item-name" }, is = { +}, ci = { class: "vuefinder__rename-modal__item-name" }, us = { __name: "ModalRename", setup(t) { - const e = re("ServiceContainer"), { t: n } = e.i18n, r = D(e.modal.data.items[0]), s = D(e.modal.data.items[0].basename), c = D(""), i = () => { + const e = re("ServiceContainer"), { t: n } = e.i18n, r = A(e.modal.data.items[0]), s = A(e.modal.data.items[0].basename), a = A(""), c = () => { s.value != "" && e.emitter.emit("vf-fetch", { params: { q: "rename", @@ -2429,66 +2432,66 @@ const Do = { render: ti }, ni = { class: "vuefinder__rename-modal__content" }, s e.emitter.emit("vf-toast-push", { label: n("%s is renamed.", s.value) }); }, onError: (d) => { - c.value = n(d.message); + a.value = n(d.message); } }); }; - return (d, a) => (_(), W(Ke, null, { - buttons: Q(() => [ + return (d, i) => (_(), W(Ye, null, { + buttons: J(() => [ l("button", { type: "button", - onClick: i, + onClick: c, class: "vf-btn vf-btn-primary" }, b(o(n)("Rename")), 1), l("button", { type: "button", - onClick: a[2] || (a[2] = (u) => o(e).modal.close()), + onClick: i[2] || (i[2] = (u) => o(e).modal.close()), class: "vf-btn vf-btn-secondary" }, b(o(n)("Cancel")), 1) ]), - default: Q(() => [ + default: J(() => [ l("div", null, [ - P(et, { - icon: o(Do), + q(nt, { + icon: o(Oo), title: o(n)("Rename") }, null, 8, ["icon", "title"]), - l("div", ni, [ - l("div", si, [ - l("p", oi, [ - r.value.type === "dir" ? (_(), g("svg", ri, a[3] || (a[3] = [ + l("div", oi, [ + l("div", ri, [ + l("p", li, [ + r.value.type === "dir" ? (_(), g("svg", ai, i[3] || (i[3] = [ l("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) - ]))) : (_(), g("svg", li, a[4] || (a[4] = [ + ]))) : (_(), g("svg", ii, i[4] || (i[4] = [ l("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) ]))), - l("span", ai, b(r.value.basename), 1) + l("span", ci, b(r.value.basename), 1) ]), ue(l("input", { - "onUpdate:modelValue": a[0] || (a[0] = (u) => s.value = u), - onKeyup: kt(i, ["enter"]), + "onUpdate:modelValue": i[0] || (i[0] = (u) => s.value = u), + onKeyup: xt(c, ["enter"]), class: "vuefinder__rename-modal__input", placeholder: "Name", type: "text" }, null, 544), [ - [xt, s.value] + [St, s.value] ]), - c.value.length ? (_(), W(We, { + a.value.length ? (_(), W(Xe, { key: 0, - onHidden: a[1] || (a[1] = (u) => c.value = ""), + onHidden: i[1] || (i[1] = (u) => a.value = ""), error: "" }, { - default: Q(() => [ - J(b(c.value), 1) + default: J(() => [ + Z(b(a.value), 1) ]), _: 1 - })) : q("", !0) + })) : B("", !0) ]) ]) ]) @@ -2496,7 +2499,7 @@ const Do = { render: ti }, ni = { class: "vuefinder__rename-modal__content" }, s _: 1 })); } -}, Ye = { +}, Ze = { ESCAPE: "Escape", F2: "F2", F5: "F5", @@ -2507,32 +2510,32 @@ const Do = { render: ti }, ni = { class: "vuefinder__rename-modal__content" }, s KEY_E: "KeyE", KEY_F: "KeyF" }; -function ii(t) { +function di(t) { const e = (n) => { - n.code === Ye.ESCAPE && (t.modal.close(), t.root.focus()), !t.modal.visible && (t.fs.searchMode || (n.code === Ye.F2 && t.features.includes(de.RENAME) && (t.dragSelect.getCount() !== 1 || t.modal.open(is, { items: t.dragSelect.getSelected() })), n.code === Ye.F5 && t.emitter.emit("vf-fetch", { params: { q: "index", adapter: t.fs.adapter, path: t.fs.data.dirname } }), n.code === Ye.DELETE && (!t.dragSelect.getCount() || t.modal.open(as, { items: t.dragSelect.getSelected() })), n.metaKey && n.code === Ye.BACKSLASH && t.modal.open(To), n.metaKey && n.code === Ye.KEY_F && t.features.includes(de.SEARCH) && (t.fs.searchMode = !0, n.preventDefault()), n.metaKey && n.code === Ye.KEY_E && (t.showTreeView = !t.showTreeView, t.storage.setStore("show-tree-view", t.showTreeView)), n.metaKey && n.code === Ye.ENTER && (t.fullScreen = !t.fullScreen, t.root.focus()), n.metaKey && n.code === Ye.KEY_A && (t.dragSelect.selectAll(), n.preventDefault()))); + n.code === Ze.ESCAPE && (t.modal.close(), t.root.focus()), !t.modal.visible && (t.fs.searchMode || (n.code === Ze.F2 && t.features.includes(de.RENAME) && (t.dragSelect.getCount() !== 1 || t.modal.open(us, { items: t.dragSelect.getSelected() })), n.code === Ze.F5 && t.emitter.emit("vf-fetch", { params: { q: "index", adapter: t.fs.adapter, path: t.fs.data.dirname } }), n.code === Ze.DELETE && (!t.dragSelect.getCount() || t.modal.open(ds, { items: t.dragSelect.getSelected() })), n.metaKey && n.code === Ze.BACKSLASH && t.modal.open(Vo), n.metaKey && n.code === Ze.KEY_F && t.features.includes(de.SEARCH) && (t.fs.searchMode = !0, n.preventDefault()), n.metaKey && n.code === Ze.KEY_E && (t.showTreeView = !t.showTreeView, t.storage.setStore("show-tree-view", t.showTreeView)), n.metaKey && n.code === Ze.ENTER && (t.fullScreen = !t.fullScreen, t.root.focus()), n.metaKey && n.code === Ze.KEY_A && (t.dragSelect.selectAll(), n.preventDefault()))); }; - Se(() => { + Ce(() => { t.root.addEventListener("keydown", e); }); } -const ci = { +const ui = { 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" }; -function di(t, e) { - return _(), g("svg", ci, e[0] || (e[0] = [ +function vi(t, e) { + return _(), g("svg", ui, e[0] || (e[0] = [ l("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) ])); } -const Vo = { render: di }, ui = { class: "vuefinder__new-folder-modal__content" }, vi = { class: "vuefinder__new-folder-modal__form" }, _i = { class: "vuefinder__new-folder-modal__description" }, fi = ["placeholder"], Oo = { +const Fo = { render: vi }, _i = { class: "vuefinder__new-folder-modal__content" }, fi = { class: "vuefinder__new-folder-modal__form" }, mi = { class: "vuefinder__new-folder-modal__description" }, pi = ["placeholder"], Io = { __name: "ModalNewFolder", setup(t) { const e = re("ServiceContainer"); e.storage; - const { t: n } = e.i18n, r = D(""), s = D(""), c = () => { + const { t: n } = e.i18n, r = A(""), s = A(""), a = () => { r.value !== "" && e.emitter.emit("vf-fetch", { params: { q: "newfolder", @@ -2546,52 +2549,52 @@ const Vo = { render: di }, ui = { class: "vuefinder__new-folder-modal__content" onSuccess: () => { e.emitter.emit("vf-toast-push", { label: n("%s is created.", r.value) }); }, - onError: (i) => { - s.value = n(i.message); + onError: (c) => { + s.value = n(c.message); } }); }; - return (i, d) => (_(), W(Ke, null, { - buttons: Q(() => [ + return (c, d) => (_(), W(Ye, null, { + buttons: J(() => [ l("button", { type: "button", - onClick: c, + onClick: a, class: "vf-btn vf-btn-primary" }, b(o(n)("Create")), 1), l("button", { type: "button", - onClick: d[2] || (d[2] = (a) => o(e).modal.close()), + onClick: d[2] || (d[2] = (i) => o(e).modal.close()), class: "vf-btn vf-btn-secondary" }, b(o(n)("Cancel")), 1) ]), - default: Q(() => [ + default: J(() => [ l("div", null, [ - P(et, { - icon: o(Vo), + q(nt, { + icon: o(Fo), title: o(n)("New Folder") }, null, 8, ["icon", "title"]), - l("div", ui, [ - l("div", vi, [ - l("p", _i, b(o(n)("Create a new folder")), 1), + l("div", _i, [ + l("div", fi, [ + l("p", mi, b(o(n)("Create a new folder")), 1), ue(l("input", { - "onUpdate:modelValue": d[0] || (d[0] = (a) => r.value = a), - onKeyup: kt(c, ["enter"]), + "onUpdate:modelValue": d[0] || (d[0] = (i) => r.value = i), + onKeyup: xt(a, ["enter"]), class: "vuefinder__new-folder-modal__input", placeholder: o(n)("Folder Name"), type: "text" - }, null, 40, fi), [ - [xt, r.value] + }, null, 40, pi), [ + [St, r.value] ]), - s.value.length ? (_(), W(We, { + s.value.length ? (_(), W(Xe, { key: 0, - onHidden: d[1] || (d[1] = (a) => s.value = ""), + onHidden: d[1] || (d[1] = (i) => s.value = ""), error: "" }, { - default: Q(() => [ - J(b(s.value), 1) + default: J(() => [ + Z(b(s.value), 1) ]), _: 1 - })) : q("", !0) + })) : B("", !0) ]) ]) ]) @@ -2599,24 +2602,24 @@ const Vo = { render: di }, ui = { class: "vuefinder__new-folder-modal__content" _: 1 })); } -}, mi = { +}, hi = { 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" }; -function pi(t, e) { - return _(), g("svg", mi, e[0] || (e[0] = [ +function gi(t, e) { + return _(), g("svg", hi, e[0] || (e[0] = [ l("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) ])); } -const Lo = { render: pi }, hi = { class: "vuefinder__new-file-modal__content" }, gi = { class: "vuefinder__new-file-modal__form" }, bi = { class: "vuefinder__new-file-modal__description" }, wi = ["placeholder"], yi = { +const Ho = { render: gi }, bi = { class: "vuefinder__new-file-modal__content" }, wi = { class: "vuefinder__new-file-modal__form" }, yi = { class: "vuefinder__new-file-modal__description" }, ki = ["placeholder"], xi = { __name: "ModalNewFile", setup(t) { const e = re("ServiceContainer"); e.storage; - const { t: n } = e.i18n, r = D(""), s = D(""), c = () => { + const { t: n } = e.i18n, r = A(""), s = A(""), a = () => { r.value !== "" && e.emitter.emit("vf-fetch", { params: { q: "newfile", @@ -2630,52 +2633,52 @@ const Lo = { render: pi }, hi = { class: "vuefinder__new-file-modal__content" }, onSuccess: () => { e.emitter.emit("vf-toast-push", { label: n("%s is created.", r.value) }); }, - onError: (i) => { - s.value = n(i.message); + onError: (c) => { + s.value = n(c.message); } }); }; - return (i, d) => (_(), W(Ke, null, { - buttons: Q(() => [ + return (c, d) => (_(), W(Ye, null, { + buttons: J(() => [ l("button", { type: "button", - onClick: c, + onClick: a, class: "vf-btn vf-btn-primary" }, b(o(n)("Create")), 1), l("button", { type: "button", - onClick: d[2] || (d[2] = (a) => o(e).modal.close()), + onClick: d[2] || (d[2] = (i) => o(e).modal.close()), class: "vf-btn vf-btn-secondary" }, b(o(n)("Cancel")), 1) ]), - default: Q(() => [ + default: J(() => [ l("div", null, [ - P(et, { - icon: o(Lo), + q(nt, { + icon: o(Ho), title: o(n)("New File") }, null, 8, ["icon", "title"]), - l("div", hi, [ - l("div", gi, [ - l("p", bi, b(o(n)("Create a new file")), 1), + l("div", bi, [ + l("div", wi, [ + l("p", yi, b(o(n)("Create a new file")), 1), ue(l("input", { - "onUpdate:modelValue": d[0] || (d[0] = (a) => r.value = a), - onKeyup: kt(c, ["enter"]), + "onUpdate:modelValue": d[0] || (d[0] = (i) => r.value = i), + onKeyup: xt(a, ["enter"]), class: "vuefinder__new-file-modal__input", placeholder: o(n)("File Name"), type: "text" - }, null, 40, wi), [ - [xt, r.value] + }, null, 40, ki), [ + [St, r.value] ]), - s.value.length ? (_(), W(We, { + s.value.length ? (_(), W(Xe, { key: 0, - onHidden: d[1] || (d[1] = (a) => s.value = ""), + onHidden: d[1] || (d[1] = (i) => s.value = ""), error: "" }, { - default: Q(() => [ - J(b(s.value), 1) + default: J(() => [ + Z(b(s.value), 1) ]), _: 1 - })) : q("", !0) + })) : B("", !0) ]) ]) ]) @@ -2684,35 +2687,35 @@ const Lo = { render: pi }, hi = { class: "vuefinder__new-file-modal__content" }, })); } }; -function zn(t, e = 14) { +function Wn(t, e = 14) { let n = `((?=([\\w\\W]{0,${e}}))([\\w\\W]{${e + 1},})([\\w\\W]{8,}))`; return t.replace(new RegExp(n), "$2..$4"); } -const ki = { +const 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 vf-toolbar-icon", viewBox: "0 0 24 24" }; -function xi(t, e) { - return _(), g("svg", ki, e[0] || (e[0] = [ +function $i(t, e) { + return _(), g("svg", Si, e[0] || (e[0] = [ l("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) ])); } -const Fo = { render: xi }, Si = { class: "vuefinder__upload-modal__content" }, $i = { +const Ro = { render: $i }, Ci = { class: "vuefinder__upload-modal__content" }, Ei = { key: 0, class: "pointer-events-none" -}, Ci = { +}, Ti = { key: 1, class: "pointer-events-none" -}, Ei = ["disabled"], Ai = ["disabled"], Ti = { class: "vuefinder__upload-modal__file-list vf-scrollbar" }, Mi = ["textContent"], Di = { class: "vuefinder__upload-modal__file-info" }, Vi = { class: "vuefinder__upload-modal__file-name hidden md:block" }, Oi = { class: "vuefinder__upload-modal__file-name md:hidden" }, Li = { +}, Mi = ["disabled"], Ai = ["disabled"], Di = { class: "vuefinder__upload-modal__file-list vf-scrollbar" }, Vi = ["textContent"], Li = { class: "vuefinder__upload-modal__file-info" }, Oi = { class: "vuefinder__upload-modal__file-name hidden md:block" }, Fi = { class: "vuefinder__upload-modal__file-name md:hidden" }, Ii = { key: 0, class: "ml-auto" -}, Fi = ["title", "disabled", "onClick"], Ri = { +}, Hi = ["title", "disabled", "onClick"], Ri = { key: 0, class: "py-2" -}, Hi = ["disabled"], Bi = { +}, Bi = ["disabled"], Ui = { __name: "ModalUpload", setup(t) { const e = re("ServiceContainer"), { t: n } = e.i18n, r = n("uppy"), s = { @@ -2721,21 +2724,21 @@ const Fo = { render: xi }, Si = { class: "vuefinder__upload-modal__content" }, $ UPLOADING: 2, ERROR: 3, DONE: 10 - }, c = D({ QUEUE_ENTRY_STATUS: s }), i = D(null), d = D(null), a = D(null), u = D(null), m = D(null), v = D(null), p = D([]), f = D(""), h = D(!1), x = D(!1); - let S; - function E(A) { - return p.value.findIndex((B) => B.id === A); + }, a = A({ QUEUE_ENTRY_STATUS: s }), c = A(null), d = A(null), i = A(null), u = A(null), f = A(null), v = A(null), p = A([]), m = A(""), h = A(!1), x = A(!1); + let $; + function T(k) { + return p.value.findIndex((H) => H.id === k); } - function H(A, B = null) { - B = B ?? (A.webkitRelativePath || A.name), S.addFile({ - name: B, - type: A.type, - data: A, + function I(k, H = null) { + H = H ?? (k.webkitRelativePath || k.name), $.addFile({ + name: H, + type: k.type, + data: k, source: "Local" }); } - function T(A) { - switch (A.status) { + function D(k) { + switch (k.status) { case s.DONE: return "text-green-600"; case s.ERROR: @@ -2747,8 +2750,8 @@ const Fo = { render: xi }, Si = { class: "vuefinder__upload-modal__content" }, $ return ""; } } - const $ = (A) => { - switch (A.status) { + const C = (k) => { + switch (k.status) { case s.DONE: return "✓"; case s.ERROR: @@ -2762,186 +2765,186 @@ const Fo = { render: xi }, Si = { class: "vuefinder__upload-modal__content" }, $ function V() { u.value.click(); } - function L() { + function F() { if (!h.value) { - if (!p.value.filter((A) => A.status !== s.DONE).length) { - f.value = n("Please select file to upload first."); + if (!p.value.filter((k) => k.status !== s.DONE).length) { + m.value = n("Please select file to upload first."); return; } - f.value = "", S.retryAll(), S.upload(); + m.value = "", $.retryAll(), $.upload(); } } function z() { - S.cancelAll({ reason: "user" }), p.value.forEach((A) => { - A.status !== s.DONE && (A.status = s.CANCELED, A.statusName = n("Canceled")); + $.cancelAll({ reason: "user" }), p.value.forEach((k) => { + k.status !== s.DONE && (k.status = s.CANCELED, k.statusName = n("Canceled")); }), h.value = !1; } - function O(A) { - h.value || (S.removeFile(A.id, "removed-by-user"), p.value.splice(E(A.id), 1)); + function O(k) { + h.value || ($.removeFile(k.id, "removed-by-user"), p.value.splice(T(k.id), 1)); } - function y(A) { + function w(k) { if (!h.value) { - if (S.cancelAll({ reason: "user" }), A) { - const B = []; - p.value.forEach((k) => { - k.status !== s.DONE && B.push(k); - }), p.value = [], B.forEach((k) => { - H(k.originalFile, k.name); + if ($.cancelAll({ reason: "user" }), k) { + const H = []; + p.value.forEach((S) => { + S.status !== s.DONE && H.push(S); + }), p.value = [], H.forEach((S) => { + I(S.originalFile, S.name); }); return; } p.value.splice(0); } } - function w() { + function y() { e.modal.close(); } - function C() { + function L() { return e.requester.transformRequestParams({ url: "", method: "post", params: { q: "upload", adapter: e.fs.adapter, path: e.fs.data.dirname } }); } - return Se(async () => { - S = new vr({ + return Ce(async () => { + $ = new fr({ debug: e.debug, restrictions: { - maxFileSize: xr(e.maxFileSize) + maxFileSize: $r(e.maxFileSize) //maxNumberOfFiles //allowedFileTypes }, locale: r, - onBeforeFileAdded(k, N) { - if (N[k.id] != null) { - const ee = E(k.id); - p.value[ee].status === s.PENDING && (f.value = S.i18n("noDuplicates", { fileName: k.name })), p.value = p.value.filter((se) => se.id !== k.id); + onBeforeFileAdded(S, U) { + if (U[S.id] != null) { + const Q = T(S.id); + p.value[Q].status === s.PENDING && (m.value = $.i18n("noDuplicates", { fileName: S.name })), p.value = p.value.filter((se) => se.id !== S.id); } return p.value.push({ - id: k.id, - name: k.name, - size: e.filesize(k.size), + id: S.id, + name: S.name, + size: e.filesize(S.size), status: s.PENDING, statusName: n("Pending upload"), percent: null, - originalFile: k.data + originalFile: S.data }), !0; } - }), S.use(_r, { + }), $.use(mr, { endpoint: "WILL_BE_REPLACED_BEFORE_UPLOAD", limit: 5, timeout: 0, - getResponseError(k, N) { - let U; + getResponseError(S, U) { + let N; try { - U = JSON.parse(k).message; + N = JSON.parse(S).message; } catch { - U = n("Cannot parse server response."); + N = n("Cannot parse server response."); } - return new Error(U); + return new Error(N); } - }), S.on("restriction-failed", (k, N) => { - const U = p.value[E(k.id)]; - O(U), f.value = N.message; - }), S.on("upload", () => { - const k = C(); - S.setMeta({ ...k.body }); - const N = S.getPlugin("XHRUpload"); - N.opts.method = k.method, N.opts.endpoint = k.url + "?" + new URLSearchParams(k.params), N.opts.headers = k.headers, delete k.headers["Content-Type"], h.value = !0, p.value.forEach((U) => { - U.status !== s.DONE && (U.percent = null, U.status = s.UPLOADING, U.statusName = n("Pending upload")); + }), $.on("restriction-failed", (S, U) => { + const N = p.value[T(S.id)]; + O(N), m.value = U.message; + }), $.on("upload", () => { + const S = L(); + $.setMeta({ ...S.body }); + const U = $.getPlugin("XHRUpload"); + U.opts.method = S.method, U.opts.endpoint = S.url + "?" + new URLSearchParams(S.params), U.opts.headers = S.headers, delete S.headers["Content-Type"], h.value = !0, p.value.forEach((N) => { + N.status !== s.DONE && (N.percent = null, N.status = s.UPLOADING, N.statusName = n("Pending upload")); }); - }), S.on("upload-progress", (k, N) => { - const U = Math.floor(N.bytesUploaded / N.bytesTotal * 100); - p.value[E(k.id)].percent = `${U}%`; - }), S.on("upload-success", (k) => { - const N = p.value[E(k.id)]; - N.status = s.DONE, N.statusName = n("Done"); - }), S.on("upload-error", (k, N) => { - const U = p.value[E(k.id)]; - U.percent = null, U.status = s.ERROR, N.isNetworkError ? U.statusName = n("Network Error, Unable establish connection to the server or interrupted.") : U.statusName = N ? N.message : n("Unknown Error"); - }), S.on("error", (k) => { - f.value = k.message, h.value = !1, e.emitter.emit("vf-fetch", { + }), $.on("upload-progress", (S, U) => { + const N = Math.floor(U.bytesUploaded / U.bytesTotal * 100); + p.value[T(S.id)].percent = `${N}%`; + }), $.on("upload-success", (S) => { + const U = p.value[T(S.id)]; + U.status = s.DONE, U.statusName = n("Done"); + }), $.on("upload-error", (S, U) => { + const N = p.value[T(S.id)]; + N.percent = null, N.status = s.ERROR, U.isNetworkError ? N.statusName = n("Network Error, Unable establish connection to the server or interrupted.") : N.statusName = U ? U.message : n("Unknown Error"); + }), $.on("error", (S) => { + m.value = S.message, h.value = !1, e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.fs.adapter, path: e.fs.data.dirname }, noCloseModal: !0 }); - }), S.on("complete", () => { + }), $.on("complete", () => { h.value = !1, e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.fs.adapter, path: e.fs.data.dirname }, noCloseModal: !0 }); }), u.value.addEventListener("click", () => { d.value.click(); - }), m.value.addEventListener("click", () => { - a.value.click(); - }), v.value.addEventListener("dragover", (k) => { - k.preventDefault(), x.value = !0; - }), v.value.addEventListener("dragleave", (k) => { - k.preventDefault(), x.value = !1; + }), f.value.addEventListener("click", () => { + i.value.click(); + }), v.value.addEventListener("dragover", (S) => { + S.preventDefault(), x.value = !0; + }), v.value.addEventListener("dragleave", (S) => { + S.preventDefault(), x.value = !1; }); - function A(k, N) { - N.isFile && N.file((U) => k(N, U)), N.isDirectory && N.createReader().readEntries((U) => { - U.forEach((ee) => { - A(k, ee); + function k(S, U) { + U.isFile && U.file((N) => S(U, N)), U.isDirectory && U.createReader().readEntries((N) => { + N.forEach((Q) => { + k(S, Q); }); }); } - v.value.addEventListener("drop", (k) => { - k.preventDefault(), x.value = !1; - const N = /^[/\\](.+)/; - [...k.dataTransfer.items].forEach((U) => { - U.kind === "file" && A((ee, se) => { - const ne = N.exec(ee.fullPath); - H(se, ne[1]); - }, U.webkitGetAsEntry()); + v.value.addEventListener("drop", (S) => { + S.preventDefault(), x.value = !1; + const U = /^[/\\](.+)/; + [...S.dataTransfer.items].forEach((N) => { + N.kind === "file" && k((Q, se) => { + const ne = U.exec(Q.fullPath); + I(se, ne[1]); + }, N.webkitGetAsEntry()); }); }); - const B = ({ target: k }) => { - const N = k.files; - for (const U of N) - H(U); - k.value = ""; + const H = ({ target: S }) => { + const U = S.files; + for (const N of U) + I(N); + S.value = ""; }; - d.value.addEventListener("change", B), a.value.addEventListener("change", B); - }), Rs(() => { - S == null || S.close({ reason: "unmount" }); - }), (A, B) => (_(), W(Ke, null, { - buttons: Q(() => [ + d.value.addEventListener("change", H), i.value.addEventListener("change", H); + }), Bs(() => { + $ == null || $.close({ reason: "unmount" }); + }), (k, H) => (_(), W(Ye, null, { + buttons: J(() => [ l("button", { type: "button", class: "vf-btn vf-btn-primary", disabled: h.value, - onClick: Ze(L, ["prevent"]) - }, b(o(n)("Upload")), 9, Hi), + onClick: et(F, ["prevent"]) + }, b(o(n)("Upload")), 9, Bi), h.value ? (_(), g("button", { key: 0, type: "button", class: "vf-btn vf-btn-secondary", - onClick: Ze(z, ["prevent"]) + onClick: et(z, ["prevent"]) }, b(o(n)("Cancel")), 1)) : (_(), g("button", { key: 1, type: "button", class: "vf-btn vf-btn-secondary", - onClick: Ze(w, ["prevent"]) + onClick: et(y, ["prevent"]) }, b(o(n)("Close")), 1)) ]), - default: Q(() => [ + default: J(() => [ l("div", null, [ - P(et, { - icon: o(Fo), + q(nt, { + icon: o(Ro), title: o(n)("Upload Files") }, null, 8, ["icon", "title"]), - l("div", Si, [ + l("div", Ci, [ l("div", { class: "vuefinder__upload-modal__drop-area", ref_key: "dropArea", ref: v, onClick: V }, [ - x.value ? (_(), g("div", $i, b(o(n)("Release to drop these files.")), 1)) : (_(), g("div", Ci, b(o(n)("Drag and drop the files/folders to here or click here.")), 1)) + x.value ? (_(), g("div", Ei, b(o(n)("Release to drop these files.")), 1)) : (_(), g("div", Ti, b(o(n)("Drag and drop the files/folders to here or click here.")), 1)) ], 512), l("div", { ref_key: "container", - ref: i, + ref: c, class: "vuefinder__upload-modal__buttons" }, [ l("button", { @@ -2952,7 +2955,7 @@ const Fo = { render: xi }, Si = { class: "vuefinder__upload-modal__content" }, $ }, b(o(n)("Select Files")), 513), l("button", { ref_key: "pickFolders", - ref: m, + ref: f, type: "button", class: "vf-btn vf-btn-secondary" }, b(o(n)("Select Folders")), 513), @@ -2960,36 +2963,36 @@ const Fo = { render: xi }, Si = { class: "vuefinder__upload-modal__content" }, $ type: "button", class: "vf-btn vf-btn-secondary", disabled: h.value, - onClick: B[0] || (B[0] = (k) => y(!1)) - }, b(o(n)("Clear all")), 9, Ei), + onClick: H[0] || (H[0] = (S) => w(!1)) + }, b(o(n)("Clear all")), 9, Mi), l("button", { type: "button", class: "vf-btn vf-btn-secondary", disabled: h.value, - onClick: B[1] || (B[1] = (k) => y(!0)) + onClick: H[1] || (H[1] = (S) => w(!0)) }, b(o(n)("Clear only successful")), 9, Ai) ], 512), - l("div", Ti, [ - (_(!0), g(ge, null, xe(p.value, (k) => (_(), g("div", { + l("div", Di, [ + (_(!0), g(be, null, ke(p.value, (S) => (_(), g("div", { class: "vuefinder__upload-modal__file-entry", - key: k.id + key: S.id }, [ l("span", { - class: le(["vuefinder__upload-modal__file-icon", T(k)]) + class: le(["vuefinder__upload-modal__file-icon", D(S)]) }, [ l("span", { class: "vuefinder__upload-modal__file-icon-text", - textContent: b($(k)) - }, null, 8, Mi) + textContent: b(C(S)) + }, null, 8, Vi) ], 2), - l("div", Di, [ - l("div", Vi, b(o(zn)(k.name, 40)) + " (" + b(k.size) + ")", 1), - l("div", Oi, b(o(zn)(k.name, 16)) + " (" + b(k.size) + ")", 1), + l("div", Li, [ + l("div", Oi, b(o(Wn)(S.name, 40)) + " (" + b(S.size) + ")", 1), + l("div", Fi, b(o(Wn)(S.name, 16)) + " (" + b(S.size) + ")", 1), l("div", { - class: le(["vuefinder__upload-modal__file-status", T(k)]) + class: le(["vuefinder__upload-modal__file-status", D(S)]) }, [ - J(b(k.statusName) + " ", 1), - k.status === c.value.QUEUE_ENTRY_STATUS.UPLOADING ? (_(), g("b", Li, b(k.percent), 1)) : q("", !0) + Z(b(S.statusName) + " ", 1), + S.status === a.value.QUEUE_ENTRY_STATUS.UPLOADING ? (_(), g("b", Ii, b(S.percent), 1)) : B("", !0) ], 2) ]), l("button", { @@ -2997,8 +3000,8 @@ const Fo = { render: xi }, Si = { class: "vuefinder__upload-modal__content" }, $ class: le(["vuefinder__upload-modal__file-remove", h.value ? "disabled" : ""]), title: o(n)("Delete"), disabled: h.value, - onClick: (N) => O(k) - }, B[3] || (B[3] = [ + onClick: (U) => O(S) + }, H[3] || (H[3] = [ l("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", @@ -3013,20 +3016,20 @@ const Fo = { render: xi }, Si = { class: "vuefinder__upload-modal__content" }, $ d: "M6 18L18 6M6 6l12 12" }) ], -1) - ]), 10, Fi) + ]), 10, Hi) ]))), 128)), - p.value.length ? q("", !0) : (_(), g("div", Ri, b(o(n)("No files selected!")), 1)) + p.value.length ? B("", !0) : (_(), g("div", Ri, b(o(n)("No files selected!")), 1)) ]), - f.value.length ? (_(), W(We, { + m.value.length ? (_(), W(Xe, { key: 0, - onHidden: B[2] || (B[2] = (k) => f.value = ""), + onHidden: H[2] || (H[2] = (S) => m.value = ""), error: "" }, { - default: Q(() => [ - J(b(f.value), 1) + default: J(() => [ + Z(b(m.value), 1) ]), _: 1 - })) : q("", !0) + })) : B("", !0) ]) ]), l("input", { @@ -3038,7 +3041,7 @@ const Fo = { render: xi }, Si = { class: "vuefinder__upload-modal__content" }, $ }, null, 512), l("input", { ref_key: "internalFolderInput", - ref: a, + ref: i, type: "file", multiple: "", webkitdirectory: "", @@ -3048,19 +3051,19 @@ const Fo = { render: xi }, Si = { class: "vuefinder__upload-modal__content" }, $ _: 1 })); } -}, Ii = { +}, Ni = { 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" }; -function Ni(t, e) { - return _(), g("svg", Ii, e[0] || (e[0] = [ +function Pi(t, e) { + return _(), g("svg", Ni, e[0] || (e[0] = [ l("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) ])); } -const Ro = { render: Ni }, Ui = { class: "vuefinder__unarchive-modal__content" }, qi = { class: "vuefinder__unarchive-modal__items" }, Pi = { class: "vuefinder__unarchive-modal__item" }, zi = { +const Bo = { render: Pi }, qi = { class: "vuefinder__unarchive-modal__content" }, zi = { class: "vuefinder__unarchive-modal__items" }, ji = { class: "vuefinder__unarchive-modal__item" }, Gi = { key: 0, class: "vuefinder__unarchive-modal__icon vuefinder__unarchive-modal__icon--dir", xmlns: "http://www.w3.org/2000/svg", @@ -3068,7 +3071,7 @@ const Ro = { render: Ni }, Ui = { class: "vuefinder__unarchive-modal__content" } viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, ji = { +}, Wi = { key: 1, class: "vuefinder__unarchive-modal__icon vuefinder__unarchive-modal__icon--file", xmlns: "http://www.w3.org/2000/svg", @@ -3076,10 +3079,10 @@ const Ro = { render: Ni }, Ui = { class: "vuefinder__unarchive-modal__content" } viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, Gi = { class: "vuefinder__unarchive-modal__item-name" }, Ki = { class: "vuefinder__unarchive-modal__info" }, Ho = { +}, Ki = { class: "vuefinder__unarchive-modal__item-name" }, Yi = { class: "vuefinder__unarchive-modal__info" }, Uo = { __name: "ModalUnarchive", setup(t) { - const e = re("ServiceContainer"), { t: n } = e.i18n, r = D(e.modal.data.items[0]), s = D(""), c = D([]), i = () => { + const e = re("ServiceContainer"), { t: n } = e.i18n, r = A(e.modal.data.items[0]), s = A(""), a = A([]), c = () => { e.emitter.emit("vf-fetch", { params: { q: "unarchive", @@ -3098,54 +3101,54 @@ const Ro = { render: Ni }, Ui = { class: "vuefinder__unarchive-modal__content" } } }); }; - return (d, a) => (_(), W(Ke, null, { - buttons: Q(() => [ + return (d, i) => (_(), W(Ye, null, { + buttons: J(() => [ l("button", { type: "button", - onClick: i, + onClick: c, class: "vf-btn vf-btn-primary" }, b(o(n)("Unarchive")), 1), l("button", { type: "button", - onClick: a[1] || (a[1] = (u) => o(e).modal.close()), + onClick: i[1] || (i[1] = (u) => o(e).modal.close()), class: "vf-btn vf-btn-secondary" }, b(o(n)("Cancel")), 1) ]), - default: Q(() => [ + default: J(() => [ l("div", null, [ - P(et, { - icon: o(Ro), + q(nt, { + icon: o(Bo), title: o(n)("Unarchive") }, null, 8, ["icon", "title"]), - l("div", Ui, [ - l("div", qi, [ - (_(!0), g(ge, null, xe(c.value, (u) => (_(), g("p", Pi, [ - u.type === "dir" ? (_(), g("svg", zi, a[2] || (a[2] = [ + l("div", qi, [ + l("div", zi, [ + (_(!0), g(be, null, ke(a.value, (u) => (_(), g("p", ji, [ + u.type === "dir" ? (_(), g("svg", Gi, i[2] || (i[2] = [ l("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) - ]))) : (_(), g("svg", ji, a[3] || (a[3] = [ + ]))) : (_(), g("svg", Wi, i[3] || (i[3] = [ l("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) ]))), - l("span", Gi, b(u.basename), 1) + l("span", Ki, b(u.basename), 1) ]))), 256)), - l("p", Ki, b(o(n)("The archive will be unarchived at")) + " (" + b(o(e).fs.data.dirname) + ")", 1), - s.value.length ? (_(), W(We, { + l("p", Yi, b(o(n)("The archive will be unarchived at")) + " (" + b(o(e).fs.data.dirname) + ")", 1), + s.value.length ? (_(), W(Xe, { key: 0, - onHidden: a[0] || (a[0] = (u) => s.value = ""), + onHidden: i[0] || (i[0] = (u) => s.value = ""), error: "" }, { - default: Q(() => [ - J(b(s.value), 1) + default: J(() => [ + Z(b(s.value), 1) ]), _: 1 - })) : q("", !0) + })) : B("", !0) ]) ]) ]) @@ -3153,19 +3156,19 @@ const Ro = { render: Ni }, Ui = { class: "vuefinder__unarchive-modal__content" } _: 1 })); } -}, Wi = { +}, Xi = { 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" }; -function Yi(t, e) { - return _(), g("svg", Wi, e[0] || (e[0] = [ +function Zi(t, e) { + return _(), g("svg", Xi, e[0] || (e[0] = [ l("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) ])); } -const Bo = { render: Yi }, Xi = { class: "vuefinder__archive-modal__content" }, Ji = { class: "vuefinder__archive-modal__form" }, Zi = { class: "vuefinder__archive-modal__files vf-scrollbar" }, Qi = { class: "vuefinder__archive-modal__file" }, ec = { +const No = { render: Zi }, Ji = { class: "vuefinder__archive-modal__content" }, Qi = { class: "vuefinder__archive-modal__form" }, ec = { class: "vuefinder__archive-modal__files vf-scrollbar" }, tc = { class: "vuefinder__archive-modal__file" }, nc = { key: 0, class: "vuefinder__archive-modal__icon vuefinder__archive-modal__icon--dir", xmlns: "http://www.w3.org/2000/svg", @@ -3173,7 +3176,7 @@ const Bo = { render: Yi }, Xi = { class: "vuefinder__archive-modal__content" }, viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, tc = { +}, sc = { key: 1, class: "vuefinder__archive-modal__icon", xmlns: "http://www.w3.org/2000/svg", @@ -3181,11 +3184,11 @@ const Bo = { render: Yi }, Xi = { class: "vuefinder__archive-modal__content" }, viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, nc = { class: "vuefinder__archive-modal__file-name" }, sc = ["placeholder"], Io = { +}, oc = { class: "vuefinder__archive-modal__file-name" }, rc = ["placeholder"], Po = { __name: "ModalArchive", setup(t) { - const e = re("ServiceContainer"), { t: n } = e.i18n, r = D(""), s = D(""), c = D(e.modal.data.items), i = () => { - c.value.length && e.emitter.emit("vf-fetch", { + const e = re("ServiceContainer"), { t: n } = e.i18n, r = A(""), s = A(""), a = A(e.modal.data.items), c = () => { + a.value.length && e.emitter.emit("vf-fetch", { params: { q: "archive", m: "post", @@ -3193,7 +3196,7 @@ const Bo = { render: Yi }, Xi = { class: "vuefinder__archive-modal__content" }, path: e.fs.data.dirname }, body: { - items: c.value.map(({ path: d, type: a }) => ({ path: d, type: a })), + items: a.value.map(({ path: d, type: i }) => ({ path: d, type: i })), name: r.value }, onSuccess: () => { @@ -3204,64 +3207,64 @@ const Bo = { render: Yi }, Xi = { class: "vuefinder__archive-modal__content" }, } }); }; - return (d, a) => (_(), W(Ke, null, { - buttons: Q(() => [ + return (d, i) => (_(), W(Ye, null, { + buttons: J(() => [ l("button", { type: "button", - onClick: i, + onClick: c, class: "vf-btn vf-btn-primary" }, b(o(n)("Archive")), 1), l("button", { type: "button", - onClick: a[2] || (a[2] = (u) => o(e).modal.close()), + onClick: i[2] || (i[2] = (u) => o(e).modal.close()), class: "vf-btn vf-btn-secondary" }, b(o(n)("Cancel")), 1) ]), - default: Q(() => [ + default: J(() => [ l("div", null, [ - P(et, { - icon: o(Bo), + q(nt, { + icon: o(No), title: o(n)("Archive the files") }, null, 8, ["icon", "title"]), - l("div", Xi, [ - l("div", Ji, [ - l("div", Zi, [ - (_(!0), g(ge, null, xe(c.value, (u) => (_(), g("p", Qi, [ - u.type === "dir" ? (_(), g("svg", ec, a[3] || (a[3] = [ + l("div", Ji, [ + l("div", Qi, [ + l("div", ec, [ + (_(!0), g(be, null, ke(a.value, (u) => (_(), g("p", tc, [ + u.type === "dir" ? (_(), g("svg", nc, i[3] || (i[3] = [ l("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) - ]))) : (_(), g("svg", tc, a[4] || (a[4] = [ + ]))) : (_(), g("svg", sc, i[4] || (i[4] = [ l("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) ]))), - l("span", nc, b(u.basename), 1) + l("span", oc, b(u.basename), 1) ]))), 256)) ]), ue(l("input", { - "onUpdate:modelValue": a[0] || (a[0] = (u) => r.value = u), - onKeyup: kt(i, ["enter"]), + "onUpdate:modelValue": i[0] || (i[0] = (u) => r.value = u), + onKeyup: xt(c, ["enter"]), class: "vuefinder__archive-modal__input", placeholder: o(n)("Archive name. (.zip file will be created)"), type: "text" - }, null, 40, sc), [ - [xt, r.value] + }, null, 40, rc), [ + [St, r.value] ]), - s.value.length ? (_(), W(We, { + s.value.length ? (_(), W(Xe, { key: 0, - onHidden: a[1] || (a[1] = (u) => s.value = ""), + onHidden: i[1] || (i[1] = (u) => s.value = ""), error: "" }, { - default: Q(() => [ - J(b(s.value), 1) + default: J(() => [ + Z(b(s.value), 1) ]), _: 1 - })) : q("", !0) + })) : B("", !0) ]) ]) ]) @@ -3269,14 +3272,14 @@ const Bo = { render: Yi }, Xi = { class: "vuefinder__archive-modal__content" }, _: 1 })); } -}, oc = { +}, lc = { 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" }; -function rc(t, e) { - return _(), g("svg", oc, e[0] || (e[0] = [ +function ac(t, e) { + return _(), g("svg", lc, e[0] || (e[0] = [ l("circle", { cx: "12", cy: "12", @@ -3292,197 +3295,197 @@ function rc(t, e) { }, null, -1) ])); } -const cs = { render: rc }, lc = { +const vs = { render: ac }, ic = { 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" }; -function ac(t, e) { - return _(), g("svg", lc, e[0] || (e[0] = [ +function cc(t, e) { + return _(), g("svg", ic, e[0] || (e[0] = [ l("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) ])); } -const ic = { render: ac }, cc = { +const dc = { render: cc }, uc = { 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" }; -function dc(t, e) { - return _(), g("svg", cc, e[0] || (e[0] = [ +function vc(t, e) { + return _(), g("svg", uc, e[0] || (e[0] = [ l("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) ])); } -const uc = { render: dc }, vc = { +const _c = { render: vc }, fc = { 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" }; -function _c(t, e) { - return _(), g("svg", vc, e[0] || (e[0] = [ +function mc(t, e) { + return _(), g("svg", fc, e[0] || (e[0] = [ l("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) ])); } -const fc = { render: _c }, mc = { +const pc = { render: mc }, hc = { 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" }; -function pc(t, e) { - return _(), g("svg", mc, e[0] || (e[0] = [ +function gc(t, e) { + return _(), g("svg", hc, e[0] || (e[0] = [ l("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) ])); } -const hc = { render: pc }, gc = { class: "vuefinder__toolbar" }, bc = { +const bc = { render: gc }, wc = { class: "vuefinder__toolbar" }, yc = { key: 0, class: "vuefinder__toolbar__actions" -}, wc = ["title"], yc = ["title"], kc = ["title"], xc = ["title"], Sc = ["title"], $c = ["title"], Cc = ["title"], Ec = { +}, kc = ["title"], xc = ["title"], Sc = ["title"], $c = ["title"], Cc = ["title"], Ec = ["title"], Tc = ["title"], Mc = { key: 1, class: "vuefinder__toolbar__search-results" -}, Ac = { class: "pl-2" }, Tc = { class: "dark:bg-gray-700 bg-gray-200 text-xs px-2 py-1 rounded" }, Mc = { class: "vuefinder__toolbar__controls" }, Dc = ["title"], Vc = ["title"], Oc = { +}, Ac = { class: "pl-2" }, Dc = { class: "dark:bg-gray-700 bg-gray-200 text-xs px-2 py-1 rounded" }, Vc = { class: "vuefinder__toolbar__controls" }, Lc = ["title"], Oc = ["title"], Fc = { __name: "Toolbar", setup(t) { - const e = re("ServiceContainer"), { setStore: n } = e.storage, { t: r } = e.i18n, s = e.dragSelect, c = D(""); - e.emitter.on("vf-search-query", ({ newQuery: a }) => { - c.value = a; + const e = re("ServiceContainer"), { setStore: n } = e.storage, { t: r } = e.i18n, s = e.dragSelect, a = A(""); + e.emitter.on("vf-search-query", ({ newQuery: i }) => { + a.value = i; }); - const i = () => { + const c = () => { e.fullScreen = !e.fullScreen; }; - Me(() => e.fullScreen, () => { + De(() => e.fullScreen, () => { e.fullScreen ? document.querySelector("body").style.overflow = "hidden" : document.querySelector("body").style.overflow = "", n("full-screen", e.fullScreen), e.emitter.emit("vf-fullscreen-toggle"); }); const d = () => { e.view = e.view === "list" ? "grid" : "list", s.refreshSelection(), n("viewport", e.view); }; - return (a, u) => (_(), g("div", gc, [ - c.value.length ? (_(), g("div", Ec, [ + return (i, u) => (_(), g("div", wc, [ + a.value.length ? (_(), g("div", Mc, [ l("div", Ac, [ - J(b(o(r)("Search results for")) + " ", 1), - l("span", Tc, b(c.value), 1) + Z(b(o(r)("Search results for")) + " ", 1), + l("span", Dc, b(a.value), 1) ]), - o(e).loadingIndicator === "circular" && o(e).fs.loading ? (_(), W(o(cs), { key: 0 })) : q("", !0) - ])) : (_(), g("div", bc, [ + o(e).loadingIndicator === "circular" && o(e).fs.loading ? (_(), W(o(vs), { key: 0 })) : B("", !0) + ])) : (_(), g("div", yc, [ o(e).features.includes(o(de).NEW_FOLDER) ? (_(), g("div", { key: 0, class: "mx-1.5", title: o(r)("New Folder"), - onClick: u[0] || (u[0] = (m) => o(e).modal.open(Oo, { items: o(s).getSelected() })) + onClick: u[0] || (u[0] = (f) => o(e).modal.open(Io, { items: o(s).getSelected() })) }, [ - P(o(Vo)) - ], 8, wc)) : q("", !0), + q(o(Fo)) + ], 8, kc)) : B("", !0), o(e).features.includes(o(de).NEW_FILE) ? (_(), g("div", { key: 1, class: "mx-1.5", title: o(r)("New File"), - onClick: u[1] || (u[1] = (m) => o(e).modal.open(yi, { items: o(s).getSelected() })) + onClick: u[1] || (u[1] = (f) => o(e).modal.open(xi, { items: o(s).getSelected() })) }, [ - P(o(Lo)) - ], 8, yc)) : q("", !0), + q(o(Ho)) + ], 8, xc)) : B("", !0), o(e).features.includes(o(de).RENAME) ? (_(), g("div", { key: 2, class: "mx-1.5", title: o(r)("Rename"), - onClick: u[2] || (u[2] = (m) => o(s).getCount() !== 1 || o(e).modal.open(is, { items: o(s).getSelected() })) + onClick: u[2] || (u[2] = (f) => o(s).getCount() !== 1 || o(e).modal.open(us, { items: o(s).getSelected() })) }, [ - P(o(Do), { + q(o(Oo), { class: le(o(s).getCount() === 1 ? "vf-toolbar-icon" : "vf-toolbar-icon-disabled") }, null, 8, ["class"]) - ], 8, kc)) : q("", !0), + ], 8, Sc)) : B("", !0), o(e).features.includes(o(de).DELETE) ? (_(), g("div", { key: 3, class: "mx-1.5", title: o(r)("Delete"), - onClick: u[3] || (u[3] = (m) => !o(s).getCount() || o(e).modal.open(as, { items: o(s).getSelected() })) + onClick: u[3] || (u[3] = (f) => !o(s).getCount() || o(e).modal.open(ds, { items: o(s).getSelected() })) }, [ - P(o(Mo), { + q(o(Lo), { class: le(o(s).getCount() ? "vf-toolbar-icon" : "vf-toolbar-icon-disabled") }, null, 8, ["class"]) - ], 8, xc)) : q("", !0), + ], 8, $c)) : B("", !0), o(e).features.includes(o(de).UPLOAD) ? (_(), g("div", { key: 4, class: "mx-1.5", title: o(r)("Upload"), - onClick: u[4] || (u[4] = (m) => o(e).modal.open(Bi, { items: o(s).getSelected() })) + onClick: u[4] || (u[4] = (f) => o(e).modal.open(Ui, { items: o(s).getSelected() })) }, [ - P(o(Fo)) - ], 8, Sc)) : q("", !0), + q(o(Ro)) + ], 8, Cc)) : B("", !0), o(e).features.includes(o(de).UNARCHIVE) && o(s).getCount() === 1 && o(s).getSelected()[0].mime_type === "application/zip" ? (_(), g("div", { key: 5, class: "mx-1.5", title: o(r)("Unarchive"), - onClick: u[5] || (u[5] = (m) => !o(s).getCount() || o(e).modal.open(Ho, { items: o(s).getSelected() })) + onClick: u[5] || (u[5] = (f) => !o(s).getCount() || o(e).modal.open(Uo, { items: o(s).getSelected() })) }, [ - P(o(Ro), { + q(o(Bo), { class: le(o(s).getCount() ? "vf-toolbar-icon" : "vf-toolbar-icon-disabled") }, null, 8, ["class"]) - ], 8, $c)) : q("", !0), + ], 8, Ec)) : B("", !0), o(e).features.includes(o(de).ARCHIVE) ? (_(), g("div", { key: 6, class: "mx-1.5", title: o(r)("Archive"), - onClick: u[6] || (u[6] = (m) => !o(s).getCount() || o(e).modal.open(Io, { items: o(s).getSelected() })) + onClick: u[6] || (u[6] = (f) => !o(s).getCount() || o(e).modal.open(Po, { items: o(s).getSelected() })) }, [ - P(o(Bo), { + q(o(No), { class: le(o(s).getCount() ? "vf-toolbar-icon" : "vf-toolbar-icon-disabled") }, null, 8, ["class"]) - ], 8, Cc)) : q("", !0) + ], 8, Tc)) : B("", !0) ])), - l("div", Mc, [ + l("div", Vc, [ o(e).features.includes(o(de).FULL_SCREEN) ? (_(), g("div", { key: 0, - onClick: i, + onClick: c, class: "mx-1.5", title: o(r)("Toggle Full Screen") }, [ - o(e).fullScreen ? (_(), W(o(uc), { key: 0 })) : (_(), W(o(ic), { key: 1 })) - ], 8, Dc)) : q("", !0), + o(e).fullScreen ? (_(), W(o(_c), { key: 0 })) : (_(), W(o(dc), { key: 1 })) + ], 8, Lc)) : B("", !0), l("div", { class: "mx-1.5", title: o(r)("Change View"), - onClick: u[7] || (u[7] = (m) => c.value.length || d()) + onClick: u[7] || (u[7] = (f) => a.value.length || d()) }, [ - o(e).view === "grid" ? (_(), W(o(fc), { + o(e).view === "grid" ? (_(), W(o(pc), { key: 0, - class: le(["vf-toolbar-icon", c.value.length ? "vf-toolbar-icon-disabled" : ""]) - }, null, 8, ["class"])) : q("", !0), - o(e).view === "list" ? (_(), W(o(hc), { + class: le(["vf-toolbar-icon", a.value.length ? "vf-toolbar-icon-disabled" : ""]) + }, null, 8, ["class"])) : B("", !0), + o(e).view === "list" ? (_(), W(o(bc), { key: 1, - class: le(["vf-toolbar-icon", c.value.length ? "vf-toolbar-icon-disabled" : ""]) - }, null, 8, ["class"])) : q("", !0) - ], 8, Vc) + class: le(["vf-toolbar-icon", a.value.length ? "vf-toolbar-icon-disabled" : ""]) + }, null, 8, ["class"])) : B("", !0) + ], 8, Oc) ]) ])); } -}, Lc = (t, e = 0, n = !1) => { +}, Ic = (t, e = 0, n = !1) => { let r; return (...s) => { n && !r && t(...s), clearTimeout(r), r = setTimeout(() => { t(...s); }, e); }; -}, Vs = (t, e, n) => { - const r = D(t); - return sr((s, c) => ({ +}, Fs = (t, e, n) => { + const r = A(t); + return rr((s, a) => ({ get() { return s(), r.value; }, - set: Lc( - (i) => { - r.value = i, c(); + set: Ic( + (c) => { + r.value = c, a(); }, e, n ) })); -}, Fc = { +}, Hc = { xmlns: "http://www.w3.org/2000/svg", fill: "none", stroke: "currentColor", @@ -3492,7 +3495,7 @@ const hc = { render: pc }, gc = { class: "vuefinder__toolbar" }, bc = { viewBox: "0 0 24 24" }; function Rc(t, e) { - return _(), g("svg", Fc, e[0] || (e[0] = [ + return _(), g("svg", Hc, e[0] || (e[0] = [ l("path", { "stroke-linecap": "round", "stroke-linejoin": "round", @@ -3500,7 +3503,7 @@ function Rc(t, e) { }, null, -1) ])); } -const Hc = { render: Rc }, Bc = { class: "vuefinder__move-modal__content" }, Ic = { class: "vuefinder__move-modal__description" }, Nc = { class: "vuefinder__move-modal__files vf-scrollbar" }, Uc = { class: "vuefinder__move-modal__file" }, qc = { +const Bc = { render: Rc }, Uc = { class: "vuefinder__move-modal__content" }, Nc = { class: "vuefinder__move-modal__description" }, Pc = { class: "vuefinder__move-modal__files vf-scrollbar" }, qc = { class: "vuefinder__move-modal__file" }, zc = { key: 0, class: "vuefinder__move-modal__icon vuefinder__move-modal__icon--dir", xmlns: "http://www.w3.org/2000/svg", @@ -3508,7 +3511,7 @@ const Hc = { render: Rc }, Bc = { class: "vuefinder__move-modal__content" }, Ic viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, Pc = { +}, jc = { key: 1, class: "vuefinder__move-modal__icon", xmlns: "http://www.w3.org/2000/svg", @@ -3516,10 +3519,10 @@ const Hc = { render: Rc }, Bc = { class: "vuefinder__move-modal__content" }, Ic viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, zc = { class: "vuefinder__move-modal__file-name" }, jc = { class: "vuefinder__move-modal__target-title" }, Gc = { class: "vuefinder__move-modal__target-directory" }, Kc = { class: "vuefinder__move-modal__target-path" }, Wc = { class: "vuefinder__move-modal__selected-items" }, jn = { +}, Gc = { class: "vuefinder__move-modal__file-name" }, Wc = { class: "vuefinder__move-modal__target-title" }, Kc = { class: "vuefinder__move-modal__target-directory" }, Yc = { class: "vuefinder__move-modal__target-path" }, Xc = { class: "vuefinder__move-modal__selected-items" }, Kn = { __name: "ModalMove", setup(t) { - const e = re("ServiceContainer"), { t: n } = e.i18n, r = D(e.modal.data.items.from), s = D(""), c = () => { + const e = re("ServiceContainer"), { t: n } = e.i18n, r = A(e.modal.data.items.from), s = A(""), a = () => { r.value.length && e.emitter.emit("vf-fetch", { params: { q: "move", @@ -3528,49 +3531,49 @@ const Hc = { render: Rc }, Bc = { class: "vuefinder__move-modal__content" }, Ic path: e.fs.data.dirname }, body: { - items: r.value.map(({ path: i, type: d }) => ({ path: i, type: d })), + items: r.value.map(({ path: c, type: d }) => ({ path: c, type: d })), item: e.modal.data.items.to.path }, onSuccess: () => { e.emitter.emit("vf-toast-push", { label: n("Files moved.", e.modal.data.items.to.name) }); }, - onError: (i) => { - s.value = n(i.message); + onError: (c) => { + s.value = n(c.message); } }); }; - return (i, d) => (_(), W(Ke, null, { - buttons: Q(() => [ + return (c, d) => (_(), W(Ye, null, { + buttons: J(() => [ l("button", { type: "button", - onClick: c, + onClick: a, class: "vf-btn vf-btn-primary" }, b(o(n)("Yes, Move!")), 1), l("button", { type: "button", - onClick: d[1] || (d[1] = (a) => o(e).modal.close()), + onClick: d[1] || (d[1] = (i) => o(e).modal.close()), class: "vf-btn vf-btn-secondary" }, b(o(n)("Cancel")), 1), - l("div", Wc, b(o(n)("%s item(s) selected.", r.value.length)), 1) + l("div", Xc, b(o(n)("%s item(s) selected.", r.value.length)), 1) ]), - default: Q(() => [ + default: J(() => [ l("div", null, [ - P(et, { - icon: o(Hc), + q(nt, { + icon: o(Bc), title: o(n)("Move files") }, null, 8, ["icon", "title"]), - l("div", Bc, [ - l("p", Ic, b(o(n)("Are you sure you want to move these files?")), 1), - l("div", Nc, [ - (_(!0), g(ge, null, xe(r.value, (a) => (_(), g("div", Uc, [ + l("div", Uc, [ + l("p", Nc, b(o(n)("Are you sure you want to move these files?")), 1), + l("div", Pc, [ + (_(!0), g(be, null, ke(r.value, (i) => (_(), g("div", qc, [ l("div", null, [ - a.type === "dir" ? (_(), g("svg", qc, d[2] || (d[2] = [ + i.type === "dir" ? (_(), g("svg", zc, d[2] || (d[2] = [ l("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) - ]))) : (_(), g("svg", Pc, d[3] || (d[3] = [ + ]))) : (_(), g("svg", jc, d[3] || (d[3] = [ l("path", { "stroke-linecap": "round", "stroke-linejoin": "round", @@ -3578,11 +3581,11 @@ const Hc = { render: Rc }, Bc = { class: "vuefinder__move-modal__content" }, Ic }, null, -1) ]))) ]), - l("div", zc, b(a.path), 1) + l("div", Gc, b(i.path), 1) ]))), 256)) ]), - l("h4", jc, b(o(n)("Target Directory")), 1), - l("p", Gc, [ + l("h4", Wc, b(o(n)("Target Directory")), 1), + l("p", Kc, [ d[4] || (d[4] = l("svg", { xmlns: "http://www.w3.org/2000/svg", class: "vuefinder__move-modal__icon vuefinder__move-modal__icon--dir", @@ -3597,43 +3600,43 @@ const Hc = { render: Rc }, Bc = { class: "vuefinder__move-modal__content" }, Ic 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)), - l("span", Kc, b(o(e).modal.data.items.to.path), 1) + l("span", Yc, b(o(e).modal.data.items.to.path), 1) ]), - s.value.length ? (_(), W(We, { + s.value.length ? (_(), W(Xe, { key: 0, - onHidden: d[0] || (d[0] = (a) => s.value = ""), + onHidden: d[0] || (d[0] = (i) => s.value = ""), error: "" }, { - default: Q(() => [ - J(b(s.value), 1) + default: J(() => [ + Z(b(s.value), 1) ]), _: 1 - })) : q("", !0) + })) : B("", !0) ]) ]) ]), _: 1 })); } -}, Yc = { +}, Zc = { 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" }; -function Xc(t, e) { - return _(), g("svg", Yc, e[0] || (e[0] = [ +function Jc(t, e) { + return _(), g("svg", Zc, e[0] || (e[0] = [ l("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) ])); } -const Jc = { render: Xc }, Zc = { +const Qc = { render: Jc }, ed = { xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", class: "h-6 w-6 p-0.5 rounded", viewBox: "0 0 20 20" }; -function Qc(t, e) { - return _(), g("svg", Zc, e[0] || (e[0] = [ +function td(t, e) { + return _(), g("svg", ed, e[0] || (e[0] = [ l("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", @@ -3642,7 +3645,7 @@ function Qc(t, e) { }, null, -1) ])); } -const ed = { render: Qc }, td = { +const nd = { render: td }, sd = { xmlns: "http://www.w3.org/2000/svg", fill: "none", stroke: "currentColor", @@ -3650,8 +3653,8 @@ const ed = { render: Qc }, td = { 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" }; -function nd(t, e) { - return _(), g("svg", td, e[0] || (e[0] = [ +function od(t, e) { + return _(), g("svg", sd, e[0] || (e[0] = [ l("path", { "stroke-linecap": "round", "stroke-linejoin": "round", @@ -3659,32 +3662,32 @@ function nd(t, e) { }, null, -1) ])); } -const sd = { render: nd }, od = { +const rd = { render: od }, ld = { 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" }; -function rd(t, e) { - return _(), g("svg", od, e[0] || (e[0] = [ +function ad(t, e) { + return _(), g("svg", ld, e[0] || (e[0] = [ l("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) ])); } -const ld = { render: rd }, ad = { +const id = { render: ad }, cd = { 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" }; -function id(t, e) { - return _(), g("svg", ad, e[0] || (e[0] = [ +function dd(t, e) { + return _(), g("svg", cd, e[0] || (e[0] = [ l("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) ])); } -const cd = { render: id }, dd = { +const ud = { render: dd }, vd = { xmlns: "http://www.w3.org/2000/svg", fill: "none", stroke: "currentColor", @@ -3692,8 +3695,8 @@ const cd = { render: id }, dd = { class: "w-6 h-6 cursor-pointer", viewBox: "0 0 24 24" }; -function ud(t, e) { - return _(), g("svg", dd, e[0] || (e[0] = [ +function _d(t, e) { + return _(), g("svg", vd, e[0] || (e[0] = [ l("path", { "stroke-linecap": "round", "stroke-linejoin": "round", @@ -3701,15 +3704,15 @@ function ud(t, e) { }, null, -1) ])); } -const vd = { render: ud }, _d = { +const fd = { render: _d }, md = { 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" }; -function fd(t, e) { - return _(), g("svg", _d, e[0] || (e[0] = [ +function pd(t, e) { + return _(), g("svg", md, e[0] || (e[0] = [ l("path", { "stroke-linecap": "round", "stroke-linejoin": "round", @@ -3717,7 +3720,7 @@ function fd(t, e) { }, null, -1) ])); } -const mn = { render: fd }, md = { +const bn = { render: pd }, hd = { xmlns: "http://www.w3.org/2000/svg", fill: "none", stroke: "currentColor", @@ -3727,8 +3730,8 @@ const mn = { render: fd }, md = { class: "h-6 w-6 p-1 rounded text-slate-700 dark:text-neutral-300 cursor-pointer", viewBox: "0 0 24 24" }; -function pd(t, e) { - return _(), g("svg", md, e[0] || (e[0] = [ +function gd(t, e) { + return _(), g("svg", hd, e[0] || (e[0] = [ l("path", { stroke: "none", d: "M0 0h24v24H0z" @@ -3736,75 +3739,75 @@ function pd(t, e) { l("path", { d: "M9 6h11M12 12h8M15 18h5M5 6v.01M8 12v.01M11 18v.01" }, null, -1) ])); } -const hd = { render: pd }, gd = { +const bd = { render: gd }, wd = { 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" }; -function bd(t, e) { - return _(), g("svg", gd, e[0] || (e[0] = [ +function yd(t, e) { + return _(), g("svg", wd, e[0] || (e[0] = [ l("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) ])); } -const wd = { render: bd }, yd = { class: "vuefinder__breadcrumb__container" }, kd = ["title"], xd = ["title"], Sd = ["title"], $d = ["title"], Cd = { class: "vuefinder__breadcrumb__list" }, Ed = { +const kd = { render: yd }, xd = { class: "vuefinder__breadcrumb__container" }, Sd = ["title"], $d = ["title"], Cd = ["title"], Ed = ["title"], Td = { class: "vuefinder__breadcrumb__list" }, Md = { key: 0, class: "vuefinder__breadcrumb__hidden-list" -}, Ad = { class: "relative" }, Td = ["onDragover", "onDragleave", "onDrop", "title", "onClick"], Md = { class: "vuefinder__breadcrumb__search-mode" }, Dd = ["placeholder"], Vd = { class: "vuefinder__breadcrumb__hidden-dropdown" }, Od = ["onDrop", "onClick"], Ld = { class: "vuefinder__breadcrumb__hidden-item-content" }, Fd = { class: "vuefinder__breadcrumb__hidden-item-text" }, Rd = { +}, Ad = { class: "relative" }, Dd = ["onDragover", "onDragleave", "onDrop", "title", "onClick"], Vd = { class: "vuefinder__breadcrumb__search-mode" }, Ld = ["placeholder"], Od = { class: "vuefinder__breadcrumb__hidden-dropdown" }, Fd = ["onDrop", "onClick"], Id = { class: "vuefinder__breadcrumb__hidden-item-content" }, Hd = { class: "vuefinder__breadcrumb__hidden-item-text" }, Rd = { __name: "Breadcrumb", setup(t) { - const e = re("ServiceContainer"), { t: n } = e.i18n, r = e.dragSelect, { setStore: s } = e.storage, c = D(null), i = Vs(0, 100); - Me(i, (O) => { - const y = c.value.children; - let w = 0, C = 0, A = 5, B = 1; - e.fs.limitBreadcrumbItems(A), ct(() => { - for (let k = y.length - 1; k >= 0 && !(w + y[k].offsetWidth > i.value - 40); k--) - w += parseInt(y[k].offsetWidth, 10), C++; - C < B && (C = B), C > A && (C = A), e.fs.limitBreadcrumbItems(C); + const e = re("ServiceContainer"), { t: n } = e.i18n, r = e.dragSelect, { setStore: s } = e.storage, a = A(null), c = Fs(0, 100); + De(c, (O) => { + const w = a.value.children; + let y = 0, L = 0, k = 5, H = 1; + e.fs.limitBreadcrumbItems(k), dt(() => { + for (let S = w.length - 1; S >= 0 && !(y + w[S].offsetWidth > c.value - 40); S--) + y += parseInt(w[S].offsetWidth, 10), L++; + L < H && (L = H), L > k && (L = k), e.fs.limitBreadcrumbItems(L); }); }); const d = () => { - i.value = c.value.offsetWidth; + c.value = a.value.offsetWidth; }; - let a = D(null); - Se(() => { - a.value = new ResizeObserver(d), a.value.observe(c.value); - }), Gn(() => { - a.value.disconnect(); + let i = A(null); + Ce(() => { + i.value = new ResizeObserver(d), i.value.observe(a.value); + }), Yn(() => { + i.value.disconnect(); }); - const u = (O, y = null) => { - O.preventDefault(), r.isDraggingRef.value = !1, p(O), y ?? (y = e.fs.hiddenBreadcrumbs.length - 1); - let w = JSON.parse(O.dataTransfer.getData("items")); - if (w.find((C) => C.storage !== e.fs.adapter)) { + const u = (O, w = null) => { + O.preventDefault(), r.isDraggingRef.value = !1, p(O), w ?? (w = e.fs.hiddenBreadcrumbs.length - 1); + let y = JSON.parse(O.dataTransfer.getData("items")); + if (y.find((L) => L.storage !== e.fs.adapter)) { alert("Moving items between different storages is not supported yet."); return; } - e.modal.open(jn, { + e.modal.open(Kn, { items: { - from: w, - to: e.fs.hiddenBreadcrumbs[y] ?? { path: e.fs.adapter + "://" } + from: y, + to: e.fs.hiddenBreadcrumbs[w] ?? { path: e.fs.adapter + "://" } } }); - }, m = (O, y = null) => { - O.preventDefault(), r.isDraggingRef.value = !1, p(O), y ?? (y = e.fs.breadcrumbs.length - 2); - let w = JSON.parse(O.dataTransfer.getData("items")); - if (w.find((C) => C.storage !== e.fs.adapter)) { + }, f = (O, w = null) => { + O.preventDefault(), r.isDraggingRef.value = !1, p(O), w ?? (w = e.fs.breadcrumbs.length - 2); + let y = JSON.parse(O.dataTransfer.getData("items")); + if (y.find((L) => L.storage !== e.fs.adapter)) { alert("Moving items between different storages is not supported yet."); return; } - e.modal.open(jn, { + e.modal.open(Kn, { items: { - from: w, - to: e.fs.breadcrumbs[y] ?? { path: e.fs.adapter + "://" } + from: y, + to: e.fs.breadcrumbs[w] ?? { path: e.fs.adapter + "://" } } }); }, v = (O) => { O.preventDefault(), e.fs.isGoUpAvailable() ? (O.dataTransfer.dropEffect = "copy", O.currentTarget.classList.add("bg-blue-200", "dark:bg-slate-600")) : (O.dataTransfer.dropEffect = "none", O.dataTransfer.effectAllowed = "none"); }, p = (O) => { O.preventDefault(), O.currentTarget.classList.remove("bg-blue-200", "dark:bg-slate-600"), e.fs.isGoUpAvailable() && O.currentTarget.classList.remove("bg-blue-200", "dark:bg-slate-600"); - }, f = () => { - L(), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.fs.adapter, path: e.fs.data.dirname } }); + }, m = () => { + F(), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.fs.adapter, path: e.fs.data.dirname } }); }, h = () => { - L(), !e.fs.isGoUpAvailable() || e.emitter.emit("vf-fetch", { + F(), !e.fs.isGoUpAvailable() || e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.fs.adapter, @@ -3813,209 +3816,209 @@ const wd = { render: bd }, yd = { class: "vuefinder__breadcrumb__container" }, k }); }, x = (O) => { e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.fs.adapter, path: O.path } }), e.fs.toggleHiddenBreadcrumbs(!1); - }, S = () => { + }, $ = () => { e.fs.showHiddenBreadcrumbs && e.fs.toggleHiddenBreadcrumbs(!1); - }, E = { - mounted(O, y, w, C) { - O.clickOutsideEvent = function(A) { - O === A.target || O.contains(A.target) || y.value(); + }, T = { + mounted(O, w, y, L) { + O.clickOutsideEvent = function(k) { + O === k.target || O.contains(k.target) || w.value(); }, document.body.addEventListener("click", O.clickOutsideEvent); }, - beforeUnmount(O, y, w, C) { + beforeUnmount(O, w, y, L) { document.body.removeEventListener("click", O.clickOutsideEvent); } - }, H = () => { + }, I = () => { e.showTreeView = !e.showTreeView; }; - Me(() => e.showTreeView, (O, y) => { - O !== y && s("show-tree-view", O); + De(() => e.showTreeView, (O, w) => { + O !== w && s("show-tree-view", O); }); - const T = D(null), $ = () => { - e.features.includes(de.SEARCH) && (e.fs.searchMode = !0, ct(() => T.value.focus())); - }, V = Vs("", 400); - Me(V, (O) => { + const D = A(null), C = () => { + e.features.includes(de.SEARCH) && (e.fs.searchMode = !0, dt(() => D.value.focus())); + }, V = Fs("", 400); + De(V, (O) => { e.emitter.emit("vf-toast-clear"), e.emitter.emit("vf-search-query", { newQuery: O }); - }), Me(() => e.fs.searchMode, (O) => { - O && ct(() => T.value.focus()); + }), De(() => e.fs.searchMode, (O) => { + O && dt(() => D.value.focus()); }); - const L = () => { + const F = () => { e.fs.searchMode = !1, V.value = ""; }; e.emitter.on("vf-search-exit", () => { - L(); + F(); }); const z = () => { - V.value === "" && L(); + V.value === "" && F(); }; - return (O, y) => (_(), g("div", yd, [ + return (O, w) => (_(), g("div", xd, [ l("span", { title: o(n)("Toggle Tree View") }, [ - P(o(hd), { - onClick: H, + q(o(bd), { + onClick: I, class: le(["vuefinder__breadcrumb__toggle-tree", o(e).showTreeView ? "vuefinder__breadcrumb__toggle-tree--active" : ""]) }, null, 8, ["class"]) - ], 8, kd), + ], 8, Sd), l("span", { title: o(n)("Go up a directory") }, [ - P(o(ed), { - onDragover: y[0] || (y[0] = (w) => v(w)), - onDragleave: y[1] || (y[1] = (w) => p(w)), - onDrop: y[2] || (y[2] = (w) => m(w)), + q(o(nd), { + onDragover: w[0] || (w[0] = (y) => v(y)), + onDragleave: w[1] || (w[1] = (y) => p(y)), + onDrop: w[2] || (w[2] = (y) => f(y)), onClick: h, class: le(o(e).fs.isGoUpAvailable() ? "vuefinder__breadcrumb__go-up--active" : "vuefinder__breadcrumb__go-up--inactive") }, null, 8, ["class"]) - ], 8, xd), + ], 8, $d), o(e).fs.loading ? (_(), g("span", { key: 1, title: o(n)("Cancel") }, [ - P(o(sd), { - onClick: y[3] || (y[3] = (w) => o(e).emitter.emit("vf-fetch-abort")) + q(o(rd), { + onClick: w[3] || (w[3] = (y) => o(e).emitter.emit("vf-fetch-abort")) }) - ], 8, $d)) : (_(), g("span", { + ], 8, Ed)) : (_(), g("span", { key: 0, title: o(n)("Refresh") }, [ - P(o(Jc), { onClick: f }) - ], 8, Sd)), + q(o(Qc), { onClick: m }) + ], 8, Cd)), ue(l("div", { - onClick: Ze($, ["self"]), + onClick: et(C, ["self"]), class: "group vuefinder__breadcrumb__search-container" }, [ l("div", null, [ - P(o(ld), { - onDragover: y[4] || (y[4] = (w) => v(w)), - onDragleave: y[5] || (y[5] = (w) => p(w)), - onDrop: y[6] || (y[6] = (w) => m(w, -1)), - onClick: y[7] || (y[7] = (w) => o(e).emitter.emit("vf-fetch", { params: { q: "index", adapter: o(e).fs.adapter } })) + q(o(id), { + onDragover: w[4] || (w[4] = (y) => v(y)), + onDragleave: w[5] || (w[5] = (y) => p(y)), + onDrop: w[6] || (w[6] = (y) => f(y, -1)), + onClick: w[7] || (w[7] = (y) => o(e).emitter.emit("vf-fetch", { params: { q: "index", adapter: o(e).fs.adapter } })) }) ]), - l("div", Cd, [ - o(e).fs.hiddenBreadcrumbs.length ? ue((_(), g("div", Ed, [ - y[13] || (y[13] = l("div", { class: "vuefinder__breadcrumb__separator" }, "/", -1)), + l("div", Td, [ + o(e).fs.hiddenBreadcrumbs.length ? ue((_(), g("div", Md, [ + w[13] || (w[13] = l("div", { class: "vuefinder__breadcrumb__separator" }, "/", -1)), l("div", Ad, [ l("span", { - onDragenter: y[8] || (y[8] = (w) => o(e).fs.toggleHiddenBreadcrumbs(!0)), - onClick: y[9] || (y[9] = (w) => o(e).fs.toggleHiddenBreadcrumbs()), + onDragenter: w[8] || (w[8] = (y) => o(e).fs.toggleHiddenBreadcrumbs(!0)), + onClick: w[9] || (w[9] = (y) => o(e).fs.toggleHiddenBreadcrumbs()), class: "vuefinder__breadcrumb__hidden-toggle" }, [ - P(o(wd), { class: "vuefinder__breadcrumb__hidden-toggle-icon" }) + q(o(kd), { class: "vuefinder__breadcrumb__hidden-toggle-icon" }) ], 32) ]) ])), [ - [E, S] - ]) : q("", !0) + [T, $] + ]) : B("", !0) ]), l("div", { ref_key: "breadcrumbContainer", - ref: c, + ref: a, class: "vuefinder__breadcrumb__visible-list", - onClick: Ze($, ["self"]) + onClick: et(C, ["self"]) }, [ - (_(!0), g(ge, null, xe(o(e).fs.breadcrumbs, (w, C) => (_(), g("div", { key: C }, [ - y[14] || (y[14] = l("span", { class: "vuefinder__breadcrumb__separator" }, "/", -1)), + (_(!0), g(be, null, ke(o(e).fs.breadcrumbs, (y, L) => (_(), g("div", { key: L }, [ + w[14] || (w[14] = l("span", { class: "vuefinder__breadcrumb__separator" }, "/", -1)), l("span", { - onDragover: (A) => C === o(e).fs.breadcrumbs.length - 1 || v(A), - onDragleave: (A) => C === o(e).fs.breadcrumbs.length - 1 || p(A), - onDrop: (A) => C === o(e).fs.breadcrumbs.length - 1 || m(A, C), + onDragover: (k) => L === o(e).fs.breadcrumbs.length - 1 || v(k), + onDragleave: (k) => L === o(e).fs.breadcrumbs.length - 1 || p(k), + onDrop: (k) => L === o(e).fs.breadcrumbs.length - 1 || f(k, L), class: "vuefinder__breadcrumb__item", - title: w.basename, - onClick: (A) => o(e).emitter.emit("vf-fetch", { params: { q: "index", adapter: o(e).fs.adapter, path: w.path } }) - }, b(w.name), 41, Td) + title: y.basename, + onClick: (k) => o(e).emitter.emit("vf-fetch", { params: { q: "index", adapter: o(e).fs.adapter, path: y.path } }) + }, b(y.name), 41, Dd) ]))), 128)) ], 512), - o(e).loadingIndicator === "circular" && o(e).fs.loading ? (_(), W(o(cs), { key: 0 })) : q("", !0) + o(e).loadingIndicator === "circular" && o(e).fs.loading ? (_(), W(o(vs), { key: 0 })) : B("", !0) ], 512), [ - [Ue, !o(e).fs.searchMode] + [qe, !o(e).fs.searchMode] ]), - ue(l("div", Md, [ + ue(l("div", Vd, [ l("div", null, [ - P(o(cd)) + q(o(ud)) ]), ue(l("input", { ref_key: "searchInput", - ref: T, - onKeydown: kt(L, ["esc"]), + ref: D, + onKeydown: xt(F, ["esc"]), onBlur: z, - "onUpdate:modelValue": y[10] || (y[10] = (w) => or(V) ? V.value = w : null), + "onUpdate:modelValue": w[10] || (w[10] = (y) => lr(V) ? V.value = y : null), placeholder: o(n)("Search anything.."), class: "vuefinder__breadcrumb__search-input", type: "text" - }, null, 40, Dd), [ - [xt, o(V)] + }, null, 40, Ld), [ + [St, o(V)] ]), - P(o(vd), { onClick: L }) + q(o(fd), { onClick: F }) ], 512), [ - [Ue, o(e).fs.searchMode] + [qe, o(e).fs.searchMode] ]), - ue(l("div", Vd, [ - (_(!0), g(ge, null, xe(o(e).fs.hiddenBreadcrumbs, (w, C) => (_(), g("div", { - key: C, - onDragover: y[11] || (y[11] = (A) => v(A)), - onDragleave: y[12] || (y[12] = (A) => p(A)), - onDrop: (A) => u(A, C), - onClick: (A) => x(w), + ue(l("div", Od, [ + (_(!0), g(be, null, ke(o(e).fs.hiddenBreadcrumbs, (y, L) => (_(), g("div", { + key: L, + onDragover: w[11] || (w[11] = (k) => v(k)), + onDragleave: w[12] || (w[12] = (k) => p(k)), + onDrop: (k) => u(k, L), + onClick: (k) => x(y), class: "vuefinder__breadcrumb__hidden-item" }, [ - l("div", Ld, [ + l("div", Id, [ l("span", null, [ - P(o(mn), { class: "vuefinder__breadcrumb__hidden-item-icon" }) + q(o(bn), { class: "vuefinder__breadcrumb__hidden-item-icon" }) ]), - y[15] || (y[15] = J()), - l("span", Fd, b(w.name), 1) + w[15] || (w[15] = Z()), + l("span", Hd, b(y.name), 1) ]) - ], 40, Od))), 128)) + ], 40, Fd))), 128)) ], 512), [ - [Ue, o(e).fs.showHiddenBreadcrumbs] + [qe, o(e).fs.showHiddenBreadcrumbs] ]) ])); } -}, No = (t, e = null) => new Date(t * 1e3).toLocaleString(e ?? navigator.language ?? "en-US"), Hd = ["onClick"], Bd = { +}, qo = (t, e = null) => new Date(t * 1e3).toLocaleString(e ?? navigator.language ?? "en-US"), Bd = ["onClick"], Ud = { __name: "Toast", setup(t) { - const e = re("ServiceContainer"), { getStore: n } = e.storage, r = D(n("full-screen", !1)), s = D([]), c = (a) => a === "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", i = (a) => { - s.value.splice(a, 1); - }, d = (a) => { - let u = s.value.findIndex((m) => m.id === a); - u !== -1 && i(u); + const e = re("ServiceContainer"), { getStore: n } = e.storage, r = A(n("full-screen", !1)), s = A([]), a = (i) => i === "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", c = (i) => { + s.value.splice(i, 1); + }, d = (i) => { + let u = s.value.findIndex((f) => f.id === i); + u !== -1 && c(u); }; return e.emitter.on("vf-toast-clear", () => { s.value = []; - }), e.emitter.on("vf-toast-push", (a) => { + }), e.emitter.on("vf-toast-push", (i) => { let u = (/* @__PURE__ */ new Date()).getTime().toString(36).concat(performance.now().toString(), Math.random().toString()).replace(/\./g, ""); - a.id = u, s.value.push(a), setTimeout(() => { + i.id = u, s.value.push(i), setTimeout(() => { d(u); }, 5e3); - }), (a, u) => (_(), g("div", { + }), (i, u) => (_(), g("div", { class: le(["vuefinder__toast", r.value.value ? "vuefinder__toast--fixed" : "vuefinder__toast--absolute"]) }, [ - P(rr, { + q(ar, { name: "vuefinder__toast-item", "enter-active-class": "vuefinder__toast-item--enter-active", "leave-active-class": "vuefinder__toast-item--leave-active", "leave-to-class": "vuefinder__toast-item--leave-to" }, { - default: Q(() => [ - (_(!0), g(ge, null, xe(s.value, (m, v) => (_(), g("div", { + default: J(() => [ + (_(!0), g(be, null, ke(s.value, (f, v) => (_(), g("div", { key: v, - onClick: (p) => i(v), - class: le(["vuefinder__toast__message", c(m.type)]) - }, b(m.label), 11, Hd))), 128)) + onClick: (p) => c(v), + class: le(["vuefinder__toast__message", a(f.type)]) + }, b(f.label), 11, Bd))), 128)) ]), _: 1 }) ], 2)); } -}, Id = { +}, Nd = { xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", class: "h-5 w-5", viewBox: "0 0 20 20" }; -function Nd(t, e) { - return _(), g("svg", Id, e[0] || (e[0] = [ +function Pd(t, e) { + return _(), g("svg", Nd, e[0] || (e[0] = [ l("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", @@ -4023,14 +4026,14 @@ function Nd(t, e) { }, null, -1) ])); } -const Ud = { render: Nd }, qd = { +const qd = { render: Pd }, zd = { xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", class: "h-5 w-5", viewBox: "0 0 20 20" }; -function Pd(t, e) { - return _(), g("svg", qd, e[0] || (e[0] = [ +function jd(t, e) { + return _(), g("svg", zd, e[0] || (e[0] = [ l("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", @@ -4038,24 +4041,24 @@ function Pd(t, e) { }, null, -1) ])); } -const zd = { render: Pd }, Gt = { +const Gd = { render: jd }, Xt = { __name: "SortIcon", props: { direction: String }, setup(t) { return (e, n) => (_(), g("div", null, [ - t.direction === "asc" ? (_(), W(o(Ud), { key: 0 })) : q("", !0), - t.direction === "desc" ? (_(), W(o(zd), { key: 1 })) : q("", !0) + t.direction === "asc" ? (_(), W(o(qd), { key: 0 })) : B("", !0), + t.direction === "desc" ? (_(), W(o(Gd), { key: 1 })) : B("", !0) ])); } -}, jd = { +}, Wd = { xmlns: "http://www.w3.org/2000/svg", fill: "none", stroke: "currentColor", class: "text-neutral-500", viewBox: "0 0 24 24" }; -function Gd(t, e) { - return _(), g("svg", jd, e[0] || (e[0] = [ +function Kd(t, e) { + return _(), g("svg", Wd, e[0] || (e[0] = [ l("path", { "stroke-linecap": "round", "stroke-linejoin": "round", @@ -4063,7 +4066,7 @@ function Gd(t, e) { }, null, -1) ])); } -const Kd = { render: Gd }, Wd = { class: "vuefinder__item-icon" }, Cn = { +const Yd = { render: Kd }, Xd = { class: "vuefinder__item-icon" }, Mn = { __name: "ItemIcon", props: { type: { @@ -4076,25 +4079,25 @@ const Kd = { render: Gd }, Wd = { class: "vuefinder__item-icon" }, Cn = { } }, setup(t) { - return (e, n) => (_(), g("span", Wd, [ - t.type === "dir" ? (_(), W(o(mn), { + return (e, n) => (_(), g("span", Xd, [ + t.type === "dir" ? (_(), W(o(bn), { key: 0, class: le(t.small ? "vuefinder__item-icon--small" : "vuefinder__item-icon--large") - }, null, 8, ["class"])) : (_(), W(o(Kd), { + }, null, 8, ["class"])) : (_(), W(o(Yd), { key: 1, class: le(t.small ? "vuefinder__item-icon--small" : "vuefinder__item-icon--large") }, null, 8, ["class"])) ])); } -}, Yd = { +}, Zd = { 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" }; -function Xd(t, e) { - return _(), g("svg", Yd, e[0] || (e[0] = [ +function Jd(t, e) { + return _(), g("svg", Zd, e[0] || (e[0] = [ l("path", { "stroke-linecap": "round", "stroke-linejoin": "round", @@ -4102,7 +4105,7 @@ function Xd(t, e) { }, null, -1) ])); } -const Jd = { render: Xd }, Zd = { class: "vuefinder__drag-item__container" }, Qd = { class: "vuefinder__drag-item__count" }, eu = { +const Qd = { render: Jd }, eu = { class: "vuefinder__drag-item__container" }, tu = { class: "vuefinder__drag-item__count" }, nu = { __name: "DragItem", props: { count: { @@ -4112,33 +4115,33 @@ const Jd = { render: Xd }, Zd = { class: "vuefinder__drag-item__container" }, Qd }, setup(t) { const e = t; - return (n, r) => (_(), g("div", Zd, [ - P(o(Jd)), - l("div", Qd, b(e.count), 1) + return (n, r) => (_(), g("div", eu, [ + q(o(Qd)), + l("div", tu, b(e.count), 1) ])); } -}, tu = { class: "vuefinder__text-preview" }, nu = { class: "vuefinder__text-preview__header" }, su = ["title"], ou = { class: "vuefinder__text-preview__actions" }, ru = { +}, su = { class: "vuefinder__text-preview" }, ou = { class: "vuefinder__text-preview__header" }, ru = ["title"], lu = { class: "vuefinder__text-preview__actions" }, au = { key: 0, class: "vuefinder__text-preview__content" -}, lu = { key: 1 }, au = { +}, iu = { key: 1 }, cu = { __name: "Text", emits: ["success"], setup(t, { emit: e }) { - const n = e, r = D(""), s = D(""), c = D(null), i = D(!1), d = D(""), a = D(!1), u = re("ServiceContainer"), { t: m } = u.i18n; - Se(() => { + const n = e, r = A(""), s = A(""), a = A(null), c = A(!1), d = A(""), i = A(!1), u = re("ServiceContainer"), { t: f } = u.i18n; + Ce(() => { u.requester.send({ url: "", method: "get", params: { q: "preview", adapter: u.modal.data.adapter, path: u.modal.data.item.path }, responseType: "text" - }).then((f) => { - r.value = f, n("success"); + }).then((m) => { + r.value = m, n("success"); }); }); const v = () => { - i.value = !i.value, s.value = r.value; + c.value = !c.value, s.value = r.value; }, p = () => { - d.value = "", a.value = !1, u.requester.send({ + d.value = "", i.value = !1, u.requester.send({ url: "", method: "post", params: { @@ -4150,77 +4153,77 @@ const Jd = { render: Xd }, Zd = { class: "vuefinder__drag-item__container" }, Qd content: s.value }, responseType: "text" - }).then((f) => { - d.value = m("Updated."), r.value = f, n("success"), i.value = !i.value; - }).catch((f) => { - d.value = m(f.message), a.value = !0; + }).then((m) => { + d.value = f("Updated."), r.value = m, n("success"), c.value = !c.value; + }).catch((m) => { + d.value = f(m.message), i.value = !0; }); }; - return (f, h) => (_(), g("div", tu, [ - l("div", nu, [ + return (m, h) => (_(), g("div", su, [ + l("div", ou, [ l("div", { class: "vuefinder__text-preview__title", id: "modal-title", title: o(u).modal.data.item.path - }, b(o(u).modal.data.item.basename), 9, su), - l("div", ou, [ - i.value ? (_(), g("button", { + }, b(o(u).modal.data.item.basename), 9, ru), + l("div", lu, [ + c.value ? (_(), g("button", { key: 0, onClick: p, class: "vuefinder__text-preview__save-button" - }, b(o(m)("Save")), 1)) : q("", !0), + }, b(o(f)("Save")), 1)) : B("", !0), o(u).features.includes(o(de).EDIT) ? (_(), g("button", { key: 1, class: "vuefinder__text-preview__edit-button", onClick: h[0] || (h[0] = (x) => v()) - }, b(i.value ? o(m)("Cancel") : o(m)("Edit")), 1)) : q("", !0) + }, b(c.value ? o(f)("Cancel") : o(f)("Edit")), 1)) : B("", !0) ]) ]), l("div", null, [ - i.value ? (_(), g("div", lu, [ + c.value ? (_(), g("div", iu, [ ue(l("textarea", { ref_key: "editInput", - ref: c, + ref: a, "onUpdate:modelValue": h[1] || (h[1] = (x) => s.value = x), class: "vuefinder__text-preview__textarea", name: "text", cols: "30", rows: "10" }, null, 512), [ - [xt, s.value] + [St, s.value] ]) - ])) : (_(), g("pre", ru, b(r.value), 1)), - d.value.length ? (_(), W(We, { + ])) : (_(), g("pre", au, b(r.value), 1)), + d.value.length ? (_(), W(Xe, { key: 2, onHidden: h[2] || (h[2] = (x) => d.value = ""), - error: a.value + error: i.value }, { - default: Q(() => [ - J(b(d.value), 1) + default: J(() => [ + Z(b(d.value), 1) ]), _: 1 - }, 8, ["error"])) : q("", !0) + }, 8, ["error"])) : B("", !0) ]) ])); } -}, iu = { class: "vuefinder__image-preview" }, cu = { class: "vuefinder__image-preview__header" }, du = ["title"], uu = { class: "vuefinder__image-preview__actions" }, vu = { class: "vuefinder__image-preview__image-container" }, _u = ["src"], fu = { +}, du = { class: "vuefinder__image-preview" }, uu = { class: "vuefinder__image-preview__header" }, vu = ["title"], _u = { class: "vuefinder__image-preview__actions" }, fu = { class: "vuefinder__image-preview__image-container" }, mu = ["src"], pu = { __name: "Image", emits: ["success"], setup(t, { emit: e }) { - const n = e, r = re("ServiceContainer"), { t: s } = r.i18n, c = D(null), i = D(null), d = D(!1), a = D(""), u = D(!1), m = () => { - d.value = !d.value, d.value ? i.value = new mr(c.value, { + const n = e, r = re("ServiceContainer"), { t: s } = r.i18n, a = A(null), c = A(null), d = A(!1), i = A(""), u = A(!1), f = () => { + d.value = !d.value, d.value ? c.value = new hr(a.value, { crop(p) { } - }) : i.value.destroy(); + }) : c.value.destroy(); }, v = () => { - i.value.getCroppedCanvas({ + c.value.getCroppedCanvas({ width: 795, height: 341 }).toBlob( (p) => { - a.value = "", u.value = !1; - const f = new FormData(); - f.set("file", p), r.requester.send({ + i.value = "", u.value = !1; + const m = new FormData(); + m.set("file", p), r.requester.send({ url: "", method: "post", params: { @@ -4228,144 +4231,144 @@ const Jd = { render: Xd }, Zd = { class: "vuefinder__drag-item__container" }, Qd adapter: r.modal.data.adapter, path: r.modal.data.item.path }, - body: f + body: m }).then((h) => { - a.value = s("Updated."), c.value.src = r.requester.getPreviewUrl(r.modal.data.adapter, r.modal.data.item), m(), n("success"); + i.value = s("Updated."), a.value.src = r.requester.getPreviewUrl(r.modal.data.adapter, r.modal.data.item), f(), n("success"); }).catch((h) => { - a.value = s(h.message), u.value = !0; + i.value = s(h.message), u.value = !0; }); } ); }; - return Se(() => { + return Ce(() => { n("success"); - }), (p, f) => (_(), g("div", iu, [ - l("div", cu, [ + }), (p, m) => (_(), g("div", du, [ + l("div", uu, [ l("h3", { class: "vuefinder__image-preview__title", id: "modal-title", title: o(r).modal.data.item.path - }, b(o(r).modal.data.item.basename), 9, du), - l("div", uu, [ + }, b(o(r).modal.data.item.basename), 9, vu), + l("div", _u, [ d.value ? (_(), g("button", { key: 0, onClick: v, class: "vuefinder__image-preview__crop-button" - }, b(o(s)("Crop")), 1)) : q("", !0), + }, b(o(s)("Crop")), 1)) : B("", !0), o(r).features.includes(o(de).EDIT) ? (_(), g("button", { key: 1, class: "vuefinder__image-preview__edit-button", - onClick: f[0] || (f[0] = (h) => m()) - }, b(d.value ? o(s)("Cancel") : o(s)("Edit")), 1)) : q("", !0) + onClick: m[0] || (m[0] = (h) => f()) + }, b(d.value ? o(s)("Cancel") : o(s)("Edit")), 1)) : B("", !0) ]) ]), - l("div", vu, [ + l("div", fu, [ l("img", { ref_key: "image", - ref: c, + ref: a, class: "vuefinder__image-preview__image", src: o(r).requester.getPreviewUrl(o(r).modal.data.adapter, o(r).modal.data.item), alt: "" - }, null, 8, _u) + }, null, 8, mu) ]), - a.value.length ? (_(), W(We, { + i.value.length ? (_(), W(Xe, { key: 0, - onHidden: f[1] || (f[1] = (h) => a.value = ""), + onHidden: m[1] || (m[1] = (h) => i.value = ""), error: u.value }, { - default: Q(() => [ - J(b(a.value), 1) + default: J(() => [ + Z(b(i.value), 1) ]), _: 1 - }, 8, ["error"])) : q("", !0) + }, 8, ["error"])) : B("", !0) ])); } -}, mu = { class: "vuefinder__default-preview" }, pu = { class: "vuefinder__default-preview__header" }, hu = ["title"], gu = { +}, hu = { class: "vuefinder__default-preview" }, gu = { class: "vuefinder__default-preview__header" }, bu = ["title"], wu = { __name: "Default", emits: ["success"], setup(t, { emit: e }) { const n = re("ServiceContainer"), r = e; - return Se(() => { + return Ce(() => { r("success"); - }), (s, c) => (_(), g("div", mu, [ - l("div", pu, [ + }), (s, a) => (_(), g("div", hu, [ + l("div", gu, [ l("h3", { class: "vuefinder__default-preview__title", id: "modal-title", title: o(n).modal.data.item.path - }, b(o(n).modal.data.item.basename), 9, hu) + }, b(o(n).modal.data.item.basename), 9, bu) ]), - c[0] || (c[0] = l("div", null, null, -1)) + a[0] || (a[0] = l("div", null, null, -1)) ])); } -}, bu = { class: "vuefinder__video-preview" }, wu = ["title"], yu = { +}, yu = { class: "vuefinder__video-preview" }, ku = ["title"], xu = { class: "vuefinder__video-preview__video", preload: "", controls: "" -}, ku = ["src"], xu = { +}, Su = ["src"], $u = { __name: "Video", emits: ["success"], setup(t, { emit: e }) { const n = re("ServiceContainer"), r = e, s = () => n.requester.getPreviewUrl(n.modal.data.adapter, n.modal.data.item); - return Se(() => { + return Ce(() => { r("success"); - }), (c, i) => (_(), g("div", bu, [ + }), (a, c) => (_(), g("div", yu, [ l("h3", { class: "vuefinder__video-preview__title", id: "modal-title", title: o(n).modal.data.item.path - }, b(o(n).modal.data.item.basename), 9, wu), + }, b(o(n).modal.data.item.basename), 9, ku), l("div", null, [ - l("video", yu, [ + l("video", xu, [ l("source", { src: s(), type: "video/mp4" - }, null, 8, ku), - i[0] || (i[0] = J(" Your browser does not support the video tag. ")) + }, null, 8, Su), + c[0] || (c[0] = Z(" Your browser does not support the video tag. ")) ]) ]) ])); } -}, Su = { class: "vuefinder__audio-preview" }, $u = ["title"], Cu = { +}, Cu = { class: "vuefinder__audio-preview" }, Eu = ["title"], Tu = { class: "vuefinder__audio-preview__audio", controls: "" -}, Eu = ["src"], Au = { +}, Mu = ["src"], Au = { __name: "Audio", emits: ["success"], setup(t, { emit: e }) { const n = e, r = re("ServiceContainer"), s = () => r.requester.getPreviewUrl(r.modal.data.adapter, r.modal.data.item); - return Se(() => { + return Ce(() => { n("success"); - }), (c, i) => (_(), g("div", Su, [ + }), (a, c) => (_(), g("div", Cu, [ l("h3", { class: "vuefinder__audio-preview__title", id: "modal-title", title: o(r).modal.data.item.path - }, b(o(r).modal.data.item.basename), 9, $u), + }, b(o(r).modal.data.item.basename), 9, Eu), l("div", null, [ - l("audio", Cu, [ + l("audio", Tu, [ l("source", { src: s(), type: "audio/mpeg" - }, null, 8, Eu), - i[0] || (i[0] = J(" Your browser does not support the audio element. ")) + }, null, 8, Mu), + c[0] || (c[0] = Z(" Your browser does not support the audio element. ")) ]) ]) ])); } -}, Tu = { class: "vuefinder__pdf-preview" }, Mu = ["title"], Du = ["data"], Vu = ["src"], Ou = { +}, Du = { class: "vuefinder__pdf-preview" }, Vu = ["title"], Lu = ["data"], Ou = ["src"], Fu = { __name: "Pdf", emits: ["success"], setup(t, { emit: e }) { const n = re("ServiceContainer"), r = e, s = () => n.requester.getPreviewUrl(n.modal.data.adapter, n.modal.data.item); - return Se(() => { + return Ce(() => { r("success"); - }), (c, i) => (_(), g("div", Tu, [ + }), (a, c) => (_(), g("div", Du, [ l("h3", { class: "vuefinder__pdf-preview__title", id: "modal-title", title: o(n).modal.data.item.path - }, b(o(n).modal.data.item.basename), 9, Mu), + }, b(o(n).modal.data.item.basename), 9, Vu), l("div", null, [ l("object", { class: "vuefinder__pdf-preview__object", @@ -4379,26 +4382,26 @@ const Jd = { render: Xd }, Zd = { class: "vuefinder__drag-item__container" }, Qd src: s(), width: "100%", height: "100%" - }, " Your browser does not support PDFs ", 8, Vu) - ], 8, Du) + }, " Your browser does not support PDFs ", 8, Ou) + ], 8, Lu) ]) ])); } -}, Lu = { class: "vuefinder__preview-modal__content" }, Fu = { key: 0 }, Ru = { class: "vuefinder__preview-modal__loading" }, Hu = { +}, Iu = { class: "vuefinder__preview-modal__content" }, Hu = { key: 0 }, Ru = { class: "vuefinder__preview-modal__loading" }, Bu = { key: 0, class: "vuefinder__preview-modal__loading-indicator" -}, Bu = { class: "vuefinder__preview-modal__details" }, Iu = { class: "font-bold" }, Nu = { class: "font-bold pl-2" }, Uu = { +}, Uu = { class: "vuefinder__preview-modal__details" }, Nu = { class: "font-bold" }, Pu = { class: "font-bold pl-2" }, qu = { key: 0, class: "vuefinder__preview-modal__note" -}, qu = ["download", "href"], Uo = { +}, zu = ["download", "href"], zo = { __name: "ModalPreview", setup(t) { - const e = re("ServiceContainer"), { t: n } = e.i18n, r = D(!1), s = (i) => (e.modal.data.item.mime_type ?? "").startsWith(i), c = e.features.includes(de.PREVIEW); - return c || (r.value = !0), (i, d) => (_(), W(Ke, null, { - buttons: Q(() => [ + const e = re("ServiceContainer"), { t: n } = e.i18n, r = A(!1), s = (c) => (e.modal.data.item.mime_type ?? "").startsWith(c), a = e.features.includes(de.PREVIEW); + return a || (r.value = !0), (c, d) => (_(), W(Ye, null, { + buttons: J(() => [ l("button", { type: "button", - onClick: d[6] || (d[6] = (a) => o(e).modal.close()), + onClick: d[6] || (d[6] = (i) => o(e).modal.close()), class: "vf-btn vf-btn-secondary" }, b(o(n)("Close")), 1), o(e).features.includes(o(de).DOWNLOAD) ? (_(), g("a", { @@ -4407,34 +4410,34 @@ const Jd = { render: Xd }, Zd = { class: "vuefinder__drag-item__container" }, Qd class: "vf-btn vf-btn-primary", download: o(e).requester.getDownloadUrl(o(e).modal.data.adapter, o(e).modal.data.item), href: o(e).requester.getDownloadUrl(o(e).modal.data.adapter, o(e).modal.data.item) - }, b(o(n)("Download")), 9, qu)) : q("", !0) + }, b(o(n)("Download")), 9, zu)) : B("", !0) ]), - default: Q(() => [ + default: J(() => [ l("div", null, [ - l("div", Lu, [ - o(c) ? (_(), g("div", Fu, [ - s("text") ? (_(), W(au, { + l("div", Iu, [ + o(a) ? (_(), g("div", Hu, [ + s("text") ? (_(), W(cu, { key: 0, - onSuccess: d[0] || (d[0] = (a) => r.value = !0) - })) : s("image") ? (_(), W(fu, { + onSuccess: d[0] || (d[0] = (i) => r.value = !0) + })) : s("image") ? (_(), W(pu, { key: 1, - onSuccess: d[1] || (d[1] = (a) => r.value = !0) - })) : s("video") ? (_(), W(xu, { + onSuccess: d[1] || (d[1] = (i) => r.value = !0) + })) : s("video") ? (_(), W($u, { key: 2, - onSuccess: d[2] || (d[2] = (a) => r.value = !0) + onSuccess: d[2] || (d[2] = (i) => r.value = !0) })) : s("audio") ? (_(), W(Au, { key: 3, - onSuccess: d[3] || (d[3] = (a) => r.value = !0) - })) : s("application/pdf") ? (_(), W(Ou, { + onSuccess: d[3] || (d[3] = (i) => r.value = !0) + })) : s("application/pdf") ? (_(), W(Fu, { key: 4, - onSuccess: d[4] || (d[4] = (a) => r.value = !0) - })) : (_(), W(gu, { + onSuccess: d[4] || (d[4] = (i) => r.value = !0) + })) : (_(), W(wu, { key: 5, - onSuccess: d[5] || (d[5] = (a) => r.value = !0) + onSuccess: d[5] || (d[5] = (i) => r.value = !0) })) - ])) : q("", !0), + ])) : B("", !0), l("div", Ru, [ - r.value === !1 ? (_(), g("div", Hu, [ + r.value === !1 ? (_(), g("div", Bu, [ d[7] || (d[7] = l("svg", { class: "vuefinder__preview-modal__spinner", xmlns: "http://www.w3.org/2000/svg", @@ -4456,28 +4459,28 @@ const Jd = { render: Xd }, Zd = { class: "vuefinder__drag-item__container" }, Qd }) ], -1)), l("span", null, b(o(n)("Loading")), 1) - ])) : q("", !0) + ])) : B("", !0) ]) ]) ]), - l("div", Bu, [ + l("div", Uu, [ l("div", null, [ - l("span", Iu, b(o(n)("File Size")) + ": ", 1), - J(b(o(e).filesize(o(e).modal.data.item.file_size)), 1) + l("span", Nu, b(o(n)("File Size")) + ": ", 1), + Z(b(o(e).filesize(o(e).modal.data.item.file_size)), 1) ]), l("div", null, [ - l("span", Nu, b(o(n)("Last Modified")) + ": ", 1), - J(" " + b(o(No)(o(e).modal.data.item.last_modified)), 1) + l("span", Pu, b(o(n)("Last Modified")) + ": ", 1), + Z(" " + b(o(qo)(o(e).modal.data.item.last_modified)), 1) ]) ]), - o(e).features.includes(o(de).DOWNLOAD) ? (_(), g("div", Uu, [ + o(e).features.includes(o(de).DOWNLOAD) ? (_(), g("div", qu, [ l("span", null, b(o(n)(`Download doesn't work? You can try right-click "Download" button, select "Save link as...".`)), 1) - ])) : q("", !0) + ])) : B("", !0) ]), _: 1 })); } -}, Pu = { +}, ju = { xmlns: "http://www.w3.org/2000/svg", fill: "none", stroke: "currentColor", @@ -4487,8 +4490,8 @@ const Jd = { render: Xd }, Zd = { class: "vuefinder__drag-item__container" }, Qd class: "h-5 w-5", viewBox: "0 0 24 24" }; -function zu(t, e) { - return _(), g("svg", Pu, e[0] || (e[0] = [ +function Gu(t, e) { + return _(), g("svg", ju, e[0] || (e[0] = [ l("path", { stroke: "none", d: "M0 0h24v24H0z" @@ -4496,7 +4499,7 @@ function zu(t, e) { l("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) ])); } -const qo = { render: zu }, ju = ["data-type", "data-item", "data-index"], En = { +const jo = { render: Gu }, Wu = ["data-type", "data-item", "data-index"], An = { __name: "Item", props: { item: { type: Object }, @@ -4504,38 +4507,38 @@ const qo = { render: zu }, ju = ["data-type", "data-item", "data-index"], En = { dragImage: { type: Object } }, setup(t) { - const e = re("ServiceContainer"), n = e.dragSelect, r = t, s = (f) => { - f.type === "dir" ? (e.emitter.emit("vf-search-exit"), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.fs.adapter, path: f.path } })) : e.modal.open(Uo, { adapter: e.fs.adapter, item: f }); - }, c = { - mounted(f, h, x, S) { - x.props.draggable && (f.addEventListener("dragstart", (E) => i(E, h.value)), f.addEventListener("dragover", (E) => a(E, h.value)), f.addEventListener("drop", (E) => d(E, h.value))); + const e = re("ServiceContainer"), n = e.dragSelect, r = t, s = (m) => { + m.type === "dir" ? (e.emitter.emit("vf-search-exit"), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.fs.adapter, path: m.path } })) : e.modal.open(zo, { adapter: e.fs.adapter, item: m }); + }, a = { + mounted(m, h, x, $) { + x.props.draggable && (m.addEventListener("dragstart", (T) => c(T, h.value)), m.addEventListener("dragover", (T) => i(T, h.value)), m.addEventListener("drop", (T) => d(T, h.value))); }, - beforeUnmount(f, h, x, S) { - x.props.draggable && (f.removeEventListener("dragstart", i), f.removeEventListener("dragover", a), f.removeEventListener("drop", d)); + beforeUnmount(m, h, x, $) { + x.props.draggable && (m.removeEventListener("dragstart", c), m.removeEventListener("dragover", i), m.removeEventListener("drop", d)); } - }, i = (f, h) => { - if (f.altKey || f.ctrlKey || f.metaKey) - return f.preventDefault(), !1; - n.isDraggingRef.value = !0, f.dataTransfer.setDragImage(r.dragImage.$el, 0, 15), f.dataTransfer.effectAllowed = "all", f.dataTransfer.dropEffect = "copy", f.dataTransfer.setData("items", JSON.stringify(n.getSelected())); - }, d = (f, h) => { - f.preventDefault(), n.isDraggingRef.value = !1; - let x = JSON.parse(f.dataTransfer.getData("items")); - if (x.find((S) => S.storage !== e.fs.adapter)) { + }, c = (m, h) => { + if (m.altKey || m.ctrlKey || m.metaKey) + return m.preventDefault(), !1; + n.isDraggingRef.value = !0, m.dataTransfer.setDragImage(r.dragImage.$el, 0, 15), m.dataTransfer.effectAllowed = "all", m.dataTransfer.dropEffect = "copy", m.dataTransfer.setData("items", JSON.stringify(n.getSelected())); + }, d = (m, h) => { + m.preventDefault(), n.isDraggingRef.value = !1; + let x = JSON.parse(m.dataTransfer.getData("items")); + if (x.find(($) => $.storage !== e.fs.adapter)) { alert("Moving items between different storages is not supported yet."); return; } - e.modal.open(jn, { items: { from: x, to: h } }); - }, a = (f, h) => { - f.preventDefault(), !h || h.type !== "dir" || n.getSelection().find((x) => x === f.currentTarget) ? (f.dataTransfer.dropEffect = "none", f.dataTransfer.effectAllowed = "none") : f.dataTransfer.dropEffect = "copy"; + e.modal.open(Kn, { items: { from: x, to: h } }); + }, i = (m, h) => { + m.preventDefault(), !h || h.type !== "dir" || n.getSelection().find((x) => x === m.currentTarget) ? (m.dataTransfer.dropEffect = "none", m.dataTransfer.effectAllowed = "none") : m.dataTransfer.dropEffect = "copy"; }; - let u = null, m = !1; + let u = null, f = !1; const v = () => { u && clearTimeout(u); - }, p = (f) => { - if (!m) - m = !0, setTimeout(() => m = !1, 300); + }, p = (m) => { + if (!f) + f = !0, setTimeout(() => f = !1, 300); else - return m = !1, s(r.item), clearTimeout(u), !1; + return f = !1, s(r.item), clearTimeout(u), !1; u = setTimeout(() => { const h = new MouseEvent("contextmenu", { bubbles: !0, @@ -4543,14 +4546,14 @@ const qo = { render: zu }, ju = ["data-type", "data-item", "data-index"], En = { view: window, button: 2, buttons: 0, - clientX: f.target.getBoundingClientRect().x, - clientY: f.target.getBoundingClientRect().y + clientX: m.target.getBoundingClientRect().x, + clientY: m.target.getBoundingClientRect().y }); - f.target.dispatchEvent(h); + m.target.dispatchEvent(h); }, 500); }; - return (f, h) => ue((_(), g("div", { - style: rn({ opacity: o(n).isDraggingRef.value && o(n).getSelection().find((x) => f.$el === x) ? "0.5 !important" : "" }), + return (m, h) => ue((_(), g("div", { + style: dn({ opacity: o(n).isDraggingRef.value && o(n).getSelection().find((x) => m.$el === x) ? "0.5 !important" : "" }), class: le(["vuefinder__item", "vf-item-" + o(n).explorerId]), "data-type": t.item.type, key: t.item.path, @@ -4559,35 +4562,35 @@ const qo = { render: zu }, ju = ["data-type", "data-item", "data-index"], En = { onDblclick: h[0] || (h[0] = (x) => s(t.item)), onTouchstart: h[1] || (h[1] = (x) => p(x)), onTouchend: h[2] || (h[2] = (x) => v()), - onContextmenu: h[3] || (h[3] = Ze((x) => o(e).emitter.emit("vf-contextmenu-show", { event: x, items: o(n).getSelected(), target: t.item }), ["prevent"])) + onContextmenu: h[3] || (h[3] = et((x) => o(e).emitter.emit("vf-contextmenu-show", { event: x, items: o(n).getSelected(), target: t.item }), ["prevent"])) }, [ - Tt(f.$slots, "default"), - o(e).pinnedFolders.find((x) => x.path === t.item.path) ? (_(), W(o(qo), { + At(m.$slots, "default"), + o(e).pinnedFolders.find((x) => x.path === t.item.path) ? (_(), W(o(jo), { key: 0, class: "vuefinder__item--pinned" - })) : q("", !0) - ], 46, ju)), [ - [c, t.item] + })) : B("", !0) + ], 46, Wu)), [ + [a, t.item] ]); } -}, Gu = { class: "vuefinder__explorer__container" }, Ku = { +}, Ku = { class: "vuefinder__explorer__container" }, Yu = { key: 0, class: "vuefinder__explorer__header" -}, Wu = { class: "vuefinder__explorer__drag-item" }, Yu = { +}, Xu = { class: "vuefinder__explorer__drag-item" }, Zu = { key: 0, class: "vuefinder__linear-loader absolute" -}, Xu = { class: "vuefinder__explorer__item-list-content" }, Ju = { class: "vuefinder__explorer__item-list-name" }, Zu = { class: "vuefinder__explorer__item-name" }, Qu = { class: "vuefinder__explorer__item-path" }, ev = { class: "vuefinder__explorer__item-list-content" }, tv = { class: "vuefinder__explorer__item-list-name" }, nv = { class: "vuefinder__explorer__item-name" }, sv = { class: "vuefinder__explorer__item-size" }, ov = { class: "vuefinder__explorer__item-date" }, rv = { class: "vuefinder__explorer__item-grid-content" }, lv = ["data-src", "alt"], av = { +}, Ju = { class: "vuefinder__explorer__item-list-content" }, Qu = { class: "vuefinder__explorer__item-list-name" }, ev = { class: "vuefinder__explorer__item-name" }, tv = { class: "vuefinder__explorer__item-path" }, nv = { class: "vuefinder__explorer__item-list-content" }, sv = { class: "vuefinder__explorer__item-list-name" }, ov = { class: "vuefinder__explorer__item-name" }, rv = { class: "vuefinder__explorer__item-size" }, lv = { class: "vuefinder__explorer__item-date" }, av = { class: "vuefinder__explorer__item-grid-content" }, iv = ["data-src", "alt"], cv = { key: 2, class: "vuefinder__explorer__item-extension" -}, iv = { class: "vuefinder__explorer__item-title break-all" }, cv = { +}, dv = { class: "vuefinder__explorer__item-title break-all" }, uv = { __name: "Explorer", setup(t) { - const e = re("ServiceContainer"), { t: n } = e.i18n, r = (v) => v == null ? void 0 : v.substring(0, 3), s = D(null), c = D(""), i = e.dragSelect; + const e = re("ServiceContainer"), { t: n } = e.i18n, r = (v) => v == null ? void 0 : v.substring(0, 3), s = A(null), a = A(""), c = e.dragSelect; let d; e.emitter.on("vf-fullscreen-toggle", () => { - i.area.value.style.height = null; + c.area.value.style.height = null; }), e.emitter.on("vf-search-query", ({ newQuery: v }) => { - c.value = v, v ? e.emitter.emit("vf-fetch", { + a.value = v, v ? e.emitter.emit("vf-fetch", { params: { q: "search", adapter: e.fs.adapter, @@ -4599,336 +4602,254 @@ const qo = { render: zu }, ju = ["data-type", "data-item", "data-index"], En = { } }) : e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.fs.adapter, path: e.fs.data.dirname } }); }); - const a = yt({ active: !1, column: "", order: "" }), u = (v = !0) => { - let p = [...e.fs.data.files], f = a.column, h = a.order === "asc" ? 1 : -1; + const i = kt({ active: !1, column: "", order: "" }), u = (v = !0) => { + let p = [...e.fs.data.files], m = i.column, h = i.order === "asc" ? 1 : -1; if (!v) return p; - const x = (S, E) => typeof S == "string" && typeof E == "string" ? S.toLowerCase().localeCompare(E.toLowerCase()) : S < E ? -1 : S > E ? 1 : 0; - return a.active && (p = p.slice().sort((S, E) => x(S[f], E[f]) * h)), p; - }, m = (v) => { - a.active && a.column === v ? (a.active = a.order === "asc", a.column = v, a.order = "desc") : (a.active = !0, a.column = v, a.order = "asc"); + const x = ($, T) => typeof $ == "string" && typeof T == "string" ? $.toLowerCase().localeCompare(T.toLowerCase()) : $ < T ? -1 : $ > T ? 1 : 0; + return i.active && (p = p.slice().sort(($, T) => x($[m], T[m]) * h)), p; + }, f = (v) => { + i.active && i.column === v ? (i.active = i.order === "asc", i.column = v, i.order = "desc") : (i.active = !0, i.column = v, i.order = "asc"); }; - return Se(() => { - d = new fr(i.area.value); - }), Ls(() => { + return Ce(() => { + d = new pr(c.area.value); + }), Hs(() => { d.update(); - }), Rs(() => { + }), Bs(() => { d.destroy(); - }), (v, p) => (_(), g("div", Gu, [ - o(e).view === "list" || c.value.length ? (_(), g("div", Ku, [ + }), (v, p) => (_(), g("div", Ku, [ + o(e).view === "list" || a.value.length ? (_(), g("div", Yu, [ l("div", { - onClick: p[0] || (p[0] = (f) => m("basename")), + onClick: p[0] || (p[0] = (m) => f("basename")), class: "vuefinder__explorer__sort-button vuefinder__explorer__sort-button--name vf-sort-button" }, [ - J(b(o(n)("Name")) + " ", 1), - ue(P(Gt, { - direction: a.order + Z(b(o(n)("Name")) + " ", 1), + ue(q(Xt, { + direction: i.order }, null, 8, ["direction"]), [ - [Ue, a.active && a.column === "basename"] + [qe, i.active && i.column === "basename"] ]) ]), - c.value.length ? q("", !0) : (_(), g("div", { + a.value.length ? B("", !0) : (_(), g("div", { key: 0, - onClick: p[1] || (p[1] = (f) => m("file_size")), + onClick: p[1] || (p[1] = (m) => f("file_size")), class: "vuefinder__explorer__sort-button vuefinder__explorer__sort-button--size vf-sort-button" }, [ - J(b(o(n)("Size")) + " ", 1), - ue(P(Gt, { - direction: a.order + Z(b(o(n)("Size")) + " ", 1), + ue(q(Xt, { + direction: i.order }, null, 8, ["direction"]), [ - [Ue, a.active && a.column === "file_size"] + [qe, i.active && i.column === "file_size"] ]) ])), - c.value.length ? q("", !0) : (_(), g("div", { + a.value.length ? B("", !0) : (_(), g("div", { key: 1, - onClick: p[2] || (p[2] = (f) => m("last_modified")), + onClick: p[2] || (p[2] = (m) => f("last_modified")), class: "vuefinder__explorer__sort-button vuefinder__explorer__sort-button--date vf-sort-button" }, [ - J(b(o(n)("Date")) + " ", 1), - ue(P(Gt, { - direction: a.order + Z(b(o(n)("Date")) + " ", 1), + ue(q(Xt, { + direction: i.order }, null, 8, ["direction"]), [ - [Ue, a.active && a.column === "last_modified"] + [qe, i.active && i.column === "last_modified"] ]) ])), - c.value.length ? (_(), g("div", { + a.value.length ? (_(), g("div", { key: 2, - onClick: p[3] || (p[3] = (f) => m("path")), + onClick: p[3] || (p[3] = (m) => f("path")), class: "vuefinder__explorer__sort-button vuefinder__explorer__sort-button--path vf-sort-button" }, [ - J(b(o(n)("Filepath")) + " ", 1), - ue(P(Gt, { - direction: a.order + Z(b(o(n)("Filepath")) + " ", 1), + ue(q(Xt, { + direction: i.order }, null, 8, ["direction"]), [ - [Ue, a.active && a.column === "path"] + [qe, i.active && i.column === "path"] ]) - ])) : q("", !0) - ])) : q("", !0), - l("div", Wu, [ - P(eu, { + ])) : B("", !0) + ])) : B("", !0), + l("div", Xu, [ + q(nu, { ref_key: "dragImage", ref: s, - count: o(i).getCount() + count: o(c).getCount() }, null, 8, ["count"]) ]), l("div", { - ref: o(i).scrollBarContainer, - class: le(["vf-explorer-scrollbar-container vuefinder__explorer__scrollbar-container", [{ "grid-view": o(e).view === "grid" }, { "search-active": c.value.length }]]) + ref: o(c).scrollBarContainer, + class: le(["vf-explorer-scrollbar-container vuefinder__explorer__scrollbar-container", [{ "grid-view": o(e).view === "grid" }, { "search-active": a.value.length }]]) }, [ l("div", { - ref: o(i).scrollBar, + ref: o(c).scrollBar, class: "vuefinder__explorer__scrollbar" }, null, 512) ], 2), l("div", { - ref: o(i).area, + ref: o(c).area, class: "vuefinder__explorer__selector-area vf-explorer-scrollbar vf-selector-area min-h-32", - onContextmenu: p[4] || (p[4] = Ze((f) => o(e).emitter.emit("vf-contextmenu-show", { event: f, items: o(i).getSelected() }), ["self", "prevent"])) + onContextmenu: p[4] || (p[4] = et((m) => o(e).emitter.emit("vf-contextmenu-show", { event: m, items: o(c).getSelected() }), ["self", "prevent"])) }, [ - o(e).loadingIndicator === "linear" && o(e).fs.loading ? (_(), g("div", Yu)) : q("", !0), - c.value.length ? (_(!0), g(ge, { key: 1 }, xe(u(), (f, h) => (_(), W(En, { - item: f, + o(e).loadingIndicator === "linear" && o(e).fs.loading ? (_(), g("div", Zu)) : B("", !0), + a.value.length ? (_(!0), g(be, { key: 1 }, ke(u(), (m, h) => (_(), W(An, { + item: m, index: h, dragImage: s.value, class: "vf-item vf-item-list" }, { - default: Q(() => [ - l("div", Xu, [ - l("div", Ju, [ - P(Cn, { - type: f.type, + default: J(() => [ + l("div", Ju, [ + l("div", Qu, [ + q(Mn, { + type: m.type, small: o(e).compactListView }, null, 8, ["type", "small"]), - l("span", Zu, b(f.basename), 1) + l("span", ev, b(m.basename), 1) ]), - l("div", Qu, b(f.path), 1) + l("div", tv, b(m.path), 1) ]) ]), _: 2 - }, 1032, ["item", "index", "dragImage"]))), 256)) : q("", !0), - o(e).view === "list" && !c.value.length ? (_(!0), g(ge, { key: 2 }, xe(u(), (f, h) => (_(), W(En, { - item: f, + }, 1032, ["item", "index", "dragImage"]))), 256)) : B("", !0), + o(e).view === "list" && !a.value.length ? (_(!0), g(be, { key: 2 }, ke(u(), (m, h) => (_(), W(An, { + item: m, index: h, dragImage: s.value, class: "vf-item vf-item-list", draggable: "true", - key: f.path + key: m.path }, { - default: Q(() => [ - l("div", ev, [ - l("div", tv, [ - P(Cn, { - type: f.type, + default: J(() => [ + l("div", nv, [ + l("div", sv, [ + q(Mn, { + type: m.type, small: o(e).compactListView }, null, 8, ["type", "small"]), - l("span", nv, b(f.basename), 1) + l("span", ov, b(m.basename), 1) ]), - l("div", sv, b(f.file_size ? o(e).filesize(f.file_size) : ""), 1), - l("div", ov, b(o(No)(f.last_modified)), 1) + l("div", rv, b(m.file_size ? o(e).filesize(m.file_size) : ""), 1), + l("div", lv, b(o(qo)(m.last_modified)), 1) ]) ]), _: 2 - }, 1032, ["item", "index", "dragImage"]))), 128)) : q("", !0), - o(e).view === "grid" && !c.value.length ? (_(!0), g(ge, { key: 3 }, xe(u(!1), (f, h) => (_(), W(En, { - item: f, + }, 1032, ["item", "index", "dragImage"]))), 128)) : B("", !0), + o(e).view === "grid" && !a.value.length ? (_(!0), g(be, { key: 3 }, ke(u(!1), (m, h) => (_(), W(An, { + item: m, index: h, dragImage: s.value, class: "vf-item vf-item-grid", draggable: "true" }, { - default: Q(() => [ + default: J(() => [ l("div", null, [ - l("div", rv, [ - (f.mime_type ?? "").startsWith("image") && o(e).showThumbnails ? (_(), g("img", { + l("div", av, [ + (m.mime_type ?? "").startsWith("image") && o(e).showThumbnails ? (_(), g("img", { src: "data:image/png;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", class: "vuefinder__explorer__item-thumbnail lazy", - "data-src": o(e).requester.getPreviewUrl(o(e).fs.adapter, f), - alt: f.basename, - key: f.path - }, null, 8, lv)) : (_(), W(Cn, { + "data-src": o(e).requester.getPreviewUrl(o(e).fs.adapter, m), + alt: m.basename, + key: m.path + }, null, 8, iv)) : (_(), W(Mn, { key: 1, - type: f.type + type: m.type }, null, 8, ["type"])), - !((f.mime_type ?? "").startsWith("image") && o(e).showThumbnails) && f.type !== "dir" ? (_(), g("div", av, b(r(f.extension)), 1)) : q("", !0) + !((m.mime_type ?? "").startsWith("image") && o(e).showThumbnails) && m.type !== "dir" ? (_(), g("div", cv, b(r(m.extension)), 1)) : B("", !0) ]), - l("span", iv, b(o(zn)(f.basename)), 1) + l("span", dv, b(o(Wn)(m.basename)), 1) ]) ]), _: 2 - }, 1032, ["item", "index", "dragImage"]))), 256)) : q("", !0) + }, 1032, ["item", "index", "dragImage"]))), 256)) : B("", !0) ], 544), - P(Bd) + q(Ud) ])); } -}, dv = ["href", "download"], uv = ["onClick"], vv = { +}, vv = ["href", "download"], _v = ["onClick"], fv = { __name: "ContextMenu", setup(t) { - const e = re("ServiceContainer"), { t: n } = e.i18n, r = D(null), s = D([]), c = D(""), i = yt({ + const e = re("ServiceContainer"), n = A(null), r = A([]), s = A(""), a = kt({ active: !1, items: [], positions: { left: 0, top: 0 } - }), d = rt(() => i.items.filter((v) => v.key == null || e.features.includes(v.key))); - e.emitter.on("vf-context-selected", (v) => { - s.value = v; }); - const a = { - newfolder: { - key: de.NEW_FOLDER, - title: () => n("New Folder"), - action: () => e.modal.open(Oo) - }, - selectAll: { - title: () => n("Select All"), - action: () => e.dragSelect.selectAll() - }, - pinFolder: { - title: () => n("Pin Folder"), - action: () => { - e.pinnedFolders = e.pinnedFolders.concat(s.value), e.storage.setStore("pinned-folders", e.pinnedFolders); - } - }, - unpinFolder: { - title: () => n("Unpin Folder"), - action: () => { - e.pinnedFolders = e.pinnedFolders.filter((v) => !s.value.find((p) => p.path === v.path)), e.storage.setStore("pinned-folders", e.pinnedFolders); - } - }, - delete: { - key: de.DELETE, - title: () => n("Delete"), - action: () => { - e.modal.open(as, { items: s }); - } - }, - refresh: { - title: () => n("Refresh"), - action: () => { - e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.fs.adapter, path: e.fs.data.dirname } }); - } - }, - preview: { - key: de.PREVIEW, - title: () => n("Preview"), - action: () => e.modal.open(Uo, { adapter: e.fs.adapter, item: s.value[0] }) - }, - open: { - title: () => n("Open"), - action: () => { - e.emitter.emit("vf-search-exit"), e.emitter.emit("vf-fetch", { - params: { - q: "index", - adapter: e.fs.adapter, - path: s.value[0].path - } - }); - } - }, - openDir: { - title: () => n("Open containing folder"), - action: () => { - e.emitter.emit("vf-search-exit"), e.emitter.emit("vf-fetch", { - params: { - q: "index", - adapter: e.fs.adapter, - path: s.value[0].dir - } - }); - } - }, - download: { - key: de.DOWNLOAD, - link: rt(() => e.requester.getDownloadUrl(e.fs.adapter, s.value[0])), - title: () => n("Download"), - action: () => { - } - }, - archive: { - key: de.ARCHIVE, - title: () => n("Archive"), - action: () => e.modal.open(Io, { items: s }) - }, - unarchive: { - key: de.UNARCHIVE, - title: () => n("Unarchive"), - action: () => e.modal.open(Ho, { items: s }) - }, - rename: { - key: de.RENAME, - title: () => n("Rename"), - action: () => e.modal.open(is, { items: s }) - } - }, u = (v) => { - e.emitter.emit("vf-contextmenu-hide"), v.action(); + e.emitter.on("vf-context-selected", (u) => { + r.value = u; + }); + const c = (u) => u.link(e, r), d = (u) => { + e.emitter.emit("vf-contextmenu-hide"), u.action(e, r); }; - e.emitter.on("vf-search-query", ({ newQuery: v }) => { - c.value = v; - }), e.emitter.on("vf-contextmenu-show", ({ event: v, items: p, target: f = null }) => { - if (i.items = [], c.value) - if (f) - i.items.push(a.openDir), e.emitter.emit("vf-context-selected", [f]); + e.emitter.on("vf-search-query", ({ newQuery: u }) => { + s.value = u; + }), e.emitter.on("vf-contextmenu-show", ({ event: u, items: f, target: v = null }) => { + if (a.items = e.contextMenuItems.filter((p) => p.show(e, { + searchQuery: s.value, + items: f, + target: v + })), s.value) + if (v) + e.emitter.emit("vf-context-selected", [v]); else return; - else !f && !c.value ? (i.items.push(a.refresh), i.items.push(a.selectAll), i.items.push(a.newfolder), e.emitter.emit("vf-context-selected", [])) : p.length > 1 && p.some((h) => h.path === f.path) ? (i.items.push(a.refresh), i.items.push(a.archive), i.items.push(a.delete), e.emitter.emit("vf-context-selected", p)) : (f.type === "dir" ? (i.items.push(a.open), e.pinnedFolders.findIndex((h) => h.path === f.path) !== -1 ? i.items.push(a.unpinFolder) : i.items.push(a.pinFolder)) : (i.items.push(a.preview), i.items.push(a.download)), i.items.push(a.rename), f.mime_type === "application/zip" ? i.items.push(a.unarchive) : i.items.push(a.archive), i.items.push(a.delete), e.emitter.emit("vf-context-selected", [f])); - m(v); + else !v && !s.value ? e.emitter.emit("vf-context-selected", []) : f.length > 1 && f.some((p) => p.path === v.path) ? e.emitter.emit("vf-context-selected", f) : e.emitter.emit("vf-context-selected", [v]); + i(u); }), e.emitter.on("vf-contextmenu-hide", () => { - i.active = !1; + a.active = !1; }); - const m = (v) => { - const p = e.dragSelect.area.value, f = e.root.getBoundingClientRect(), h = p.getBoundingClientRect(); - let x = v.clientX - f.left, S = v.clientY - f.top; - i.active = !0, ct(() => { - var $; - const E = ($ = r.value) == null ? void 0 : $.getBoundingClientRect(); - let H = (E == null ? void 0 : E.height) ?? 0, T = (E == null ? void 0 : E.width) ?? 0; - x = h.right - v.pageX + window.scrollX < T ? x - T : x, S = h.bottom - v.pageY + window.scrollY < H ? S - H : S, i.positions = { - left: x + "px", - top: S + "px" + const i = (u) => { + const f = e.dragSelect.area.value, v = e.root.getBoundingClientRect(), p = f.getBoundingClientRect(); + let m = u.clientX - v.left, h = u.clientY - v.top; + a.active = !0, dt(() => { + var I; + const x = (I = n.value) == null ? void 0 : I.getBoundingClientRect(); + let $ = (x == null ? void 0 : x.height) ?? 0, T = (x == null ? void 0 : x.width) ?? 0; + m = p.right - u.pageX + window.scrollX < T ? m - T : m, h = p.bottom - u.pageY + window.scrollY < $ ? h - $ : h, a.positions = { + left: m + "px", + top: h + "px" }; }); }; - return (v, p) => ue((_(), g("ul", { + return (u, f) => ue((_(), g("ul", { ref_key: "contextmenu", - ref: r, - style: rn(i.positions), + ref: n, + style: dn(a.positions), class: "vuefinder__context-menu" }, [ - (_(!0), g(ge, null, xe(d.value, (f) => (_(), g("li", { + (_(!0), g(be, null, ke(a.items, (v) => (_(), g("li", { class: "vuefinder__context-menu__item", - key: f.title + key: v.title }, [ - f.link ? (_(), g("a", { + v.link ? (_(), g("a", { key: 0, class: "vuefinder__context-menu__link", target: "_blank", - href: f.link, - download: f.link, - onClick: p[0] || (p[0] = (h) => o(e).emitter.emit("vf-contextmenu-hide")) + href: c(v), + download: c(v), + onClick: f[0] || (f[0] = (p) => o(e).emitter.emit("vf-contextmenu-hide")) }, [ - l("span", null, b(f.title()), 1) - ], 8, dv)) : (_(), g("div", { + l("span", null, b(v.title(o(e).i18n)), 1) + ], 8, vv)) : (_(), g("div", { key: 1, class: "vuefinder__context-menu__action", - onClick: (h) => u(f) + onClick: (p) => d(v) }, [ - l("span", null, b(f.title()), 1) - ], 8, uv)) + l("span", null, b(v.title(o(e).i18n)), 1) + ], 8, _v)) ]))), 128)) ], 4)), [ - [Ue, i.active] + [qe, a.active] ]); } -}, _v = { +}, mv = { xmlns: "http://www.w3.org/2000/svg", fill: "none", stroke: "currentColor", class: "h-5 w-5", viewBox: "0 0 24 24" }; -function fv(t, e) { - return _(), g("svg", _v, e[0] || (e[0] = [ +function pv(t, e) { + return _(), g("svg", mv, e[0] || (e[0] = [ l("path", { "stroke-linecap": "round", "stroke-linejoin": "round", @@ -4936,7 +4857,7 @@ function fv(t, e) { }, null, -1) ])); } -const Po = { render: fv }, mv = { +const Go = { render: pv }, hv = { xmlns: "http://www.w3.org/2000/svg", fill: "none", stroke: "currentColor", @@ -4944,8 +4865,8 @@ const Po = { render: fv }, mv = { class: "h-5 w-5 stroke-slate-500 cursor-pointer", viewBox: "0 0 24 24" }; -function pv(t, e) { - return _(), g("svg", mv, e[0] || (e[0] = [ +function gv(t, e) { + return _(), g("svg", hv, e[0] || (e[0] = [ l("path", { "stroke-linecap": "round", "stroke-linejoin": "round", @@ -4953,62 +4874,62 @@ function pv(t, e) { }, null, -1) ])); } -const hv = { render: pv }, gv = { class: "vuefinder__status-bar__wrapper" }, bv = { class: "vuefinder__status-bar__storage" }, wv = ["title"], yv = { class: "vuefinder__status-bar__storage-icon" }, kv = ["value"], xv = { class: "vuefinder__status-bar__info" }, Sv = { key: 0 }, $v = { class: "vuefinder__status-bar__selected-count" }, Cv = { class: "vuefinder__status-bar__actions" }, Ev = ["disabled"], Av = ["title"], Tv = { +const bv = { render: gv }, wv = { class: "vuefinder__status-bar__wrapper" }, yv = { class: "vuefinder__status-bar__storage" }, kv = ["title"], xv = { class: "vuefinder__status-bar__storage-icon" }, Sv = ["value"], $v = { class: "vuefinder__status-bar__info" }, Cv = { key: 0 }, Ev = { class: "vuefinder__status-bar__selected-count" }, Tv = { class: "vuefinder__status-bar__actions" }, Mv = ["disabled"], Av = ["title"], Dv = { __name: "Statusbar", setup(t) { - const e = re("ServiceContainer"), { t: n } = e.i18n, { setStore: r } = e.storage, s = e.dragSelect, c = () => { + const e = re("ServiceContainer"), { t: n } = e.i18n, { setStore: r } = e.storage, s = e.dragSelect, a = () => { e.emitter.emit("vf-search-exit"), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.fs.adapter } }), r("adapter", e.fs.adapter); - }, i = D(""); - e.emitter.on("vf-search-query", ({ newQuery: a }) => { - i.value = a; + }, c = A(""); + e.emitter.on("vf-search-query", ({ newQuery: i }) => { + c.value = i; }); - const d = rt(() => { - const a = e.selectButton.multiple ? s.getSelected().length > 0 : s.getSelected().length === 1; - return e.selectButton.active && a; + const d = gt(() => { + const i = e.selectButton.multiple ? s.getSelected().length > 0 : s.getSelected().length === 1; + return e.selectButton.active && i; }); - return (a, u) => (_(), g("div", gv, [ - l("div", bv, [ + return (i, u) => (_(), g("div", wv, [ + l("div", yv, [ l("div", { class: "vuefinder__status-bar__storage-container", title: o(n)("Storage") }, [ - l("div", yv, [ - P(o(Po)) + l("div", xv, [ + q(o(Go)) ]), ue(l("select", { - "onUpdate:modelValue": u[0] || (u[0] = (m) => o(e).fs.adapter = m), - onChange: c, + "onUpdate:modelValue": u[0] || (u[0] = (f) => o(e).fs.adapter = f), + onChange: a, class: "vuefinder__status-bar__storage-select", tabindex: "-1" }, [ - (_(!0), g(ge, null, xe(o(e).fs.data.storages, (m) => (_(), g("option", { value: m }, b(m), 9, kv))), 256)) + (_(!0), g(be, null, ke(o(e).fs.data.storages, (f) => (_(), g("option", { value: f }, b(f), 9, Sv))), 256)) ], 544), [ - [An, o(e).fs.adapter] + [Dn, o(e).fs.adapter] ]) - ], 8, wv), - l("div", xv, [ - i.value.length ? (_(), g("span", Sv, b(o(e).fs.data.files.length) + " items found. ", 1)) : q("", !0), - l("span", $v, b(o(e).dragSelect.getCount() > 0 ? o(n)("%s item(s) selected.", o(e).dragSelect.getCount()) : ""), 1) + ], 8, kv), + l("div", $v, [ + c.value.length ? (_(), g("span", Cv, b(o(e).fs.data.files.length) + " items found. ", 1)) : B("", !0), + l("span", Ev, b(o(e).dragSelect.getCount() > 0 ? o(n)("%s item(s) selected.", o(e).dragSelect.getCount()) : ""), 1) ]) ]), - l("div", Cv, [ + l("div", Tv, [ o(e).selectButton.active ? (_(), g("button", { key: 0, class: le(["vf-btn py-0 vf-btn-primary", { disabled: !d.value }]), disabled: !d.value, - onClick: u[1] || (u[1] = (m) => o(e).selectButton.click(o(s).getSelected(), m)) - }, b(o(n)("Select")), 11, Ev)) : q("", !0), + onClick: u[1] || (u[1] = (f) => o(e).selectButton.click(o(s).getSelected(), f)) + }, b(o(n)("Select")), 11, Mv)) : B("", !0), l("span", { class: "vuefinder__status-bar__about", title: o(n)("About"), - onClick: u[2] || (u[2] = (m) => o(e).modal.open(To)) + onClick: u[2] || (u[2] = (f) => o(e).modal.open(Vo)) }, [ - P(o(hv)) + q(o(bv)) ], 8, Av) ]) ])); } -}, Mv = { +}, Vv = { xmlns: "http://www.w3.org/2000/svg", fill: "none", stroke: "currentColor", @@ -5016,8 +4937,8 @@ const hv = { render: pv }, gv = { class: "vuefinder__status-bar__wrapper" }, bv 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" }; -function Dv(t, e) { - return _(), g("svg", Mv, e[0] || (e[0] = [ +function Lv(t, e) { + return _(), g("svg", Vv, e[0] || (e[0] = [ l("path", { "stroke-linecap": "round", "stroke-linejoin": "round", @@ -5025,14 +4946,14 @@ function Dv(t, e) { }, null, -1) ])); } -const zo = { render: Dv }, Vv = { +const Wo = { render: Lv }, Ov = { xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", class: "h-5 w-5", viewBox: "0 0 24 24" }; -function Ov(t, e) { - return _(), g("svg", Vv, e[0] || (e[0] = [ +function Fv(t, e) { + return _(), g("svg", Ov, e[0] || (e[0] = [ l("path", { fill: "none", d: "M0 0h24v24H0z" @@ -5040,7 +4961,7 @@ function Ov(t, e) { l("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) ])); } -const Lv = { render: Ov }, Fv = { +const Iv = { render: Fv }, Hv = { xmlns: "http://www.w3.org/2000/svg", fill: "none", stroke: "currentColor", @@ -5050,7 +4971,7 @@ const Lv = { render: Ov }, Fv = { viewBox: "0 0 24 24" }; function Rv(t, e) { - return _(), g("svg", Fv, e[0] || (e[0] = [ + return _(), g("svg", Hv, e[0] || (e[0] = [ l("path", { stroke: "none", d: "M0 0h24v24H0z" @@ -5058,7 +4979,7 @@ function Rv(t, e) { l("path", { d: "M15 12H9M12 9v6" }, null, -1) ])); } -const jo = { render: Rv }, Hv = { +const Ko = { render: Rv }, Bv = { xmlns: "http://www.w3.org/2000/svg", fill: "none", stroke: "currentColor", @@ -5067,8 +4988,8 @@ const jo = { render: Rv }, Hv = { "stroke-width": "2", viewBox: "0 0 24 24" }; -function Bv(t, e) { - return _(), g("svg", Hv, e[0] || (e[0] = [ +function Uv(t, e) { + return _(), g("svg", Bv, e[0] || (e[0] = [ l("path", { stroke: "none", d: "M0 0h24v24H0z" @@ -5076,17 +4997,17 @@ function Bv(t, e) { l("path", { d: "M9 12h6" }, null, -1) ])); } -const Go = { render: Bv }; -function Ko(t, e) { +const Yo = { render: Uv }; +function Xo(t, e) { const n = t.findIndex((r) => r.path === e.path); n > -1 ? t[n] = e : t.push(e); } -const Iv = { class: "vuefinder__folder-loader-indicator" }, Nv = { +const Nv = { class: "vuefinder__folder-loader-indicator" }, Pv = { key: 1, class: "vuefinder__folder-loader-indicator--icon" -}, Wo = { +}, Zo = { __name: "FolderLoaderIndicator", - props: /* @__PURE__ */ lr({ + props: /* @__PURE__ */ ir({ adapter: { type: String, required: !0 @@ -5103,18 +5024,18 @@ const Iv = { class: "vuefinder__folder-loader-indicator" }, Nv = { setup(t) { const e = t, n = re("ServiceContainer"); n.i18n; - const r = Hs(t, "modelValue"), s = D(!1); - Me( + const r = Us(t, "modelValue"), s = A(!1); + De( () => r.value, () => { var d; - return ((d = c()) == null ? void 0 : d.folders.length) || i(); + return ((d = a()) == null ? void 0 : d.folders.length) || c(); } ); - function c() { + function a() { return n.treeViewData.find((d) => d.path === e.path); } - const i = () => { + const c = () => { s.value = !0, n.requester.send({ url: "", method: "get", @@ -5124,24 +5045,24 @@ const Iv = { class: "vuefinder__folder-loader-indicator" }, Nv = { path: e.path } }).then((d) => { - Ko(n.treeViewData, { path: e.path, ...d }); + Xo(n.treeViewData, { path: e.path, ...d }); }).catch((d) => { }).finally(() => { s.value = !1; }); }; - return (d, a) => { + return (d, i) => { var u; - return _(), g("div", Iv, [ - s.value ? (_(), W(o(cs), { + return _(), g("div", Nv, [ + s.value ? (_(), W(o(vs), { key: 0, class: "vuefinder__folder-loader-indicator--loading" - })) : (_(), g("div", Nv, [ - r.value && ((u = c()) != null && u.folders.length) ? (_(), W(o(Go), { + })) : (_(), g("div", Pv, [ + r.value && ((u = a()) != null && u.folders.length) ? (_(), W(o(Yo), { key: 0, class: "vuefinder__folder-loader-indicator--minus" - })) : q("", !0), - r.value ? q("", !0) : (_(), W(o(jo), { + })) : B("", !0), + r.value ? B("", !0) : (_(), W(o(Ko), { key: 1, class: "vuefinder__folder-loader-indicator--plus" })) @@ -5149,7 +5070,7 @@ const Iv = { class: "vuefinder__folder-loader-indicator" }, Nv = { ]); }; } -}, Uv = { class: "vuefinder__treesubfolderlist__item-content" }, qv = ["onClick"], Pv = ["title", "onClick"], zv = { class: "vuefinder__treesubfolderlist__item-icon" }, jv = { class: "vuefinder__treesubfolderlist__subfolder" }, Gv = { +}, qv = { class: "vuefinder__treesubfolderlist__item-content" }, zv = ["onClick"], jv = ["title", "onClick"], Gv = { class: "vuefinder__treesubfolderlist__item-icon" }, Wv = { class: "vuefinder__treesubfolderlist__subfolder" }, Kv = { __name: "TreeSubfolderList", props: { adapter: { @@ -5162,69 +5083,69 @@ const Iv = { class: "vuefinder__folder-loader-indicator" }, Nv = { } }, setup(t) { - const e = re("ServiceContainer"), n = D([]), r = t, s = D(null); - Se(() => { - r.path === r.adapter + "://" && je(s.value, { + const e = re("ServiceContainer"), n = A([]), r = t, s = A(null); + Ce(() => { + r.path === r.adapter + "://" && We(s.value, { scrollbars: { theme: "vf-theme-dark dark:vf-theme-light" } }); }); - const c = rt(() => { - var i; - return ((i = e.treeViewData.find((d) => d.path === r.path)) == null ? void 0 : i.folders) || []; + const a = gt(() => { + var c; + return ((c = e.treeViewData.find((d) => d.path === r.path)) == null ? void 0 : c.folders) || []; }); - return (i, d) => { - const a = ar("TreeSubfolderList", !0); + return (c, d) => { + const i = cr("TreeSubfolderList", !0); return _(), g("ul", { ref_key: "parentSubfolderList", ref: s, class: "vuefinder__treesubfolderlist__container" }, [ - (_(!0), g(ge, null, xe(c.value, (u, m) => (_(), g("li", { + (_(!0), g(be, null, ke(a.value, (u, f) => (_(), g("li", { key: u.path, class: "vuefinder__treesubfolderlist__item" }, [ - l("div", Uv, [ + l("div", qv, [ l("div", { class: "vuefinder__treesubfolderlist__item-toggle", onClick: (v) => n.value[u.path] = !n.value[u.path] }, [ - P(Wo, { + q(Zo, { adapter: t.adapter, path: u.path, modelValue: n.value[u.path], "onUpdate:modelValue": (v) => n.value[u.path] = v }, null, 8, ["adapter", "path", "modelValue", "onUpdate:modelValue"]) - ], 8, qv), + ], 8, zv), l("div", { class: "vuefinder__treesubfolderlist__item-link", title: u.path, onClick: (v) => o(e).emitter.emit("vf-fetch", { params: { q: "index", adapter: r.adapter, path: u.path } }) }, [ - l("div", zv, [ - o(e).fs.path === u.path ? (_(), W(o(zo), { key: 0 })) : (_(), W(o(mn), { key: 1 })) + l("div", Gv, [ + o(e).fs.path === u.path ? (_(), W(o(Wo), { key: 0 })) : (_(), W(o(bn), { key: 1 })) ]), l("div", { class: le(["vuefinder__treesubfolderlist__item-text", { "vuefinder__treesubfolderlist__item-text--active": o(e).fs.path === u.path }]) }, b(u.basename), 3) - ], 8, Pv) + ], 8, jv) ]), - l("div", jv, [ - ue(P(a, { + l("div", Wv, [ + ue(q(i, { adapter: r.adapter, path: u.path }, null, 8, ["adapter", "path"]), [ - [Ue, n.value[u.path]] + [qe, n.value[u.path]] ]) ]) ]))), 128)) ], 512); }; } -}, Kv = { +}, Yv = { __name: "TreeStorageItem", props: { storage: { @@ -5233,13 +5154,13 @@ const Iv = { class: "vuefinder__folder-loader-indicator" }, Nv = { } }, setup(t) { - const e = re("ServiceContainer"), { setStore: n } = e.storage, r = D(!1); - function s(c) { - c === e.fs.adapter ? r.value = !r.value : (e.emitter.emit("vf-search-exit"), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: c } }), n("adapter", c)); + const e = re("ServiceContainer"), { setStore: n } = e.storage, r = A(!1); + function s(a) { + a === e.fs.adapter ? r.value = !r.value : (e.emitter.emit("vf-search-exit"), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: a } }), n("adapter", a)); } - return (c, i) => (_(), g(ge, null, [ + return (a, c) => (_(), g(be, null, [ l("div", { - onClick: i[2] || (i[2] = (d) => s(t.storage)), + onClick: c[2] || (c[2] = (d) => s(t.storage)), class: "vuefinder__treestorageitem__header" }, [ l("div", { @@ -5248,32 +5169,32 @@ const Iv = { class: "vuefinder__folder-loader-indicator" }, Nv = { l("div", { class: le(["vuefinder__treestorageitem__icon", t.storage === o(e).fs.adapter ? "vuefinder__treestorageitem__icon--active" : ""]) }, [ - P(o(Po)) + q(o(Go)) ], 2), l("div", null, b(t.storage), 1) ], 2), l("div", { class: "vuefinder__treestorageitem__loader", - onClick: i[1] || (i[1] = Ze((d) => r.value = !r.value, ["stop"])) + onClick: c[1] || (c[1] = et((d) => r.value = !r.value, ["stop"])) }, [ - P(Wo, { + q(Zo, { adapter: t.storage, path: t.storage + "://", modelValue: r.value, - "onUpdate:modelValue": i[0] || (i[0] = (d) => r.value = d) + "onUpdate:modelValue": c[0] || (c[0] = (d) => r.value = d) }, null, 8, ["adapter", "path", "modelValue"]) ]) ]), - ue(P(Gv, { + ue(q(Kv, { adapter: t.storage, path: t.storage + "://", class: "vuefinder__treestorageitem__subfolder" }, null, 8, ["adapter", "path"]), [ - [Ue, r.value] + [qe, r.value] ]) ], 64)); } -}, Wv = { class: "vuefinder__folder-indicator" }, Yv = { class: "vuefinder__folder-indicator--icon" }, Xv = { +}, Xv = { class: "vuefinder__folder-indicator" }, Zv = { class: "vuefinder__folder-indicator--icon" }, Jv = { __name: "FolderIndicator", props: { modelValue: {}, @@ -5281,43 +5202,43 @@ const Iv = { class: "vuefinder__folder-loader-indicator" }, Nv = { }, emits: ["update:modelValue"], setup(t) { - const e = Hs(t, "modelValue"); - return (n, r) => (_(), g("div", Wv, [ - l("div", Yv, [ - e.value ? (_(), W(o(Go), { + const e = Us(t, "modelValue"); + return (n, r) => (_(), g("div", Xv, [ + l("div", Zv, [ + e.value ? (_(), W(o(Yo), { key: 0, class: "vuefinder__folder-indicator--minus" - })) : q("", !0), - e.value ? q("", !0) : (_(), W(o(jo), { + })) : B("", !0), + e.value ? B("", !0) : (_(), W(o(Ko), { key: 1, class: "vuefinder__folder-indicator--plus" })) ]) ])); } -}, Jv = { class: "vuefinder__treeview__header" }, Zv = { class: "vuefinder__treeview__pinned-label" }, Qv = { class: "vuefinder__treeview__pin-text text-nowrap" }, e_ = { +}, Qv = { class: "vuefinder__treeview__header" }, e_ = { class: "vuefinder__treeview__pinned-label" }, t_ = { class: "vuefinder__treeview__pin-text text-nowrap" }, n_ = { key: 0, class: "vuefinder__treeview__pinned-list" -}, t_ = { class: "vuefinder__treeview__pinned-item" }, n_ = ["onClick"], s_ = ["title"], o_ = ["onClick"], r_ = { key: 0 }, l_ = { class: "vuefinder__treeview__no-pinned" }, a_ = { class: "vuefinder__treeview__storage" }, i_ = { +}, s_ = { class: "vuefinder__treeview__pinned-item" }, o_ = ["onClick"], r_ = ["title"], l_ = ["onClick"], a_ = { key: 0 }, i_ = { class: "vuefinder__treeview__no-pinned" }, c_ = { class: "vuefinder__treeview__storage" }, d_ = { __name: "TreeView", setup(t) { - const e = re("ServiceContainer"), { t: n } = e.i18n, { getStore: r, setStore: s } = e.storage, c = D(190), i = D(r("pinned-folders-opened", !0)); - Me(i, (m) => s("pinned-folders-opened", m)); - const d = (m) => { - e.pinnedFolders = e.pinnedFolders.filter((v) => v.path !== m.path), e.storage.setStore("pinned-folders", e.pinnedFolders); - }, a = (m) => { - const v = m.clientX, p = m.target.parentElement, f = p.getBoundingClientRect().width; + const e = re("ServiceContainer"), { t: n } = e.i18n, { getStore: r, setStore: s } = e.storage, a = A(190), c = A(r("pinned-folders-opened", !0)); + De(c, (f) => s("pinned-folders-opened", f)); + const d = (f) => { + e.pinnedFolders = e.pinnedFolders.filter((v) => v.path !== f.path), e.storage.setStore("pinned-folders", e.pinnedFolders); + }, i = (f) => { + const v = f.clientX, p = f.target.parentElement, m = p.getBoundingClientRect().width; p.classList.remove("transition-[width]"), p.classList.add("transition-none"); - const h = (S) => { - c.value = f + S.clientX - v, c.value < 50 && (c.value = 0, e.showTreeView = !1), c.value > 50 && (e.showTreeView = !0); + const h = ($) => { + a.value = m + $.clientX - v, a.value < 50 && (a.value = 0, e.showTreeView = !1), a.value > 50 && (e.showTreeView = !0); }, x = () => { - const S = p.getBoundingClientRect(); - c.value = S.width, p.classList.add("transition-[width]"), p.classList.remove("transition-none"), window.removeEventListener("mousemove", h), window.removeEventListener("mouseup", x); + const $ = p.getBoundingClientRect(); + a.value = $.width, p.classList.add("transition-[width]"), p.classList.remove("transition-none"), window.removeEventListener("mousemove", h), window.removeEventListener("mouseup", x); }; window.addEventListener("mousemove", h), window.addEventListener("mouseup", x); - }, u = D(null); - return Se(() => { - je(u.value, { + }, u = A(null); + return Ce(() => { + We(u.value, { overflow: { x: "hidden" }, @@ -5325,20 +5246,20 @@ const Iv = { class: "vuefinder__folder-loader-indicator" }, Nv = { theme: "vf-theme-dark dark:vf-theme-light" } }); - }), Me(e.fs.data, (m, v) => { - const p = m.files.filter((f) => f.type === "dir"); - Ko(e.treeViewData, { path: e.fs.path, folders: p.map((f) => ({ - adapter: f.storage, - path: f.path, - basename: f.basename + }), De(e.fs.data, (f, v) => { + const p = f.files.filter((m) => m.type === "dir"); + Xo(e.treeViewData, { path: e.fs.path, folders: p.map((m) => ({ + adapter: m.storage, + path: m.path, + basename: m.basename })) }); - }), (m, v) => (_(), g(ge, null, [ + }), (f, v) => (_(), g(be, null, [ l("div", { onClick: v[0] || (v[0] = (p) => o(e).showTreeView = !o(e).showTreeView), class: le(["vuefinder__treeview__overlay", o(e).showTreeView ? "vuefinder__treeview__backdrop" : "hidden"]) }, null, 2), l("div", { - style: rn(o(e).showTreeView ? "min-width:100px;max-width:75%; width: " + c.value + "px" : "width: 0"), + style: dn(o(e).showTreeView ? "min-width:100px;max-width:75%; width: " + a.value + "px" : "width: 0"), class: "vuefinder__treeview__container" }, [ l("div", { @@ -5346,65 +5267,231 @@ const Iv = { class: "vuefinder__folder-loader-indicator" }, Nv = { ref: u, class: "vuefinder__treeview__scroll" }, [ - l("div", Jv, [ + l("div", Qv, [ l("div", { - onClick: v[2] || (v[2] = (p) => i.value = !i.value), + onClick: v[2] || (v[2] = (p) => c.value = !c.value), class: "vuefinder__treeview__pinned-toggle" }, [ - l("div", Zv, [ - P(o(qo), { class: "vuefinder__treeview__pin-icon" }), - l("div", Qv, b(o(n)("Pinned Folders")), 1) + l("div", e_, [ + q(o(jo), { class: "vuefinder__treeview__pin-icon" }), + l("div", t_, b(o(n)("Pinned Folders")), 1) ]), - P(Xv, { - modelValue: i.value, - "onUpdate:modelValue": v[1] || (v[1] = (p) => i.value = p) + q(Jv, { + modelValue: c.value, + "onUpdate:modelValue": v[1] || (v[1] = (p) => c.value = p) }, null, 8, ["modelValue"]) ]), - i.value ? (_(), g("ul", e_, [ - (_(!0), g(ge, null, xe(o(e).pinnedFolders, (p) => (_(), g("li", t_, [ + c.value ? (_(), g("ul", n_, [ + (_(!0), g(be, null, ke(o(e).pinnedFolders, (p) => (_(), g("li", s_, [ l("div", { class: "vuefinder__treeview__pinned-folder", - onClick: (f) => o(e).emitter.emit("vf-fetch", { params: { q: "index", adapter: p.storage, path: p.path } }) + onClick: (m) => o(e).emitter.emit("vf-fetch", { params: { q: "index", adapter: p.storage, path: p.path } }) }, [ - o(e).fs.path !== p.path ? (_(), W(o(mn), { + o(e).fs.path !== p.path ? (_(), W(o(bn), { key: 0, class: "vuefinder__treeview__folder-icon" - })) : q("", !0), - o(e).fs.path === p.path ? (_(), W(o(zo), { + })) : B("", !0), + o(e).fs.path === p.path ? (_(), W(o(Wo), { key: 1, class: "vuefinder__treeview__open-folder-icon" - })) : q("", !0), + })) : B("", !0), l("div", { title: p.path, class: le(["vuefinder__treeview__folder-name text-nowrap", { "vuefinder__treeview__folder-name--active": o(e).fs.path === p.path }]) - }, b(p.basename), 11, s_) - ], 8, n_), + }, b(p.basename), 11, r_) + ], 8, o_), l("div", { class: "vuefinder__treeview__remove-favorite", - onClick: (f) => d(p) + onClick: (m) => d(p) }, [ - P(o(Lv), { class: "vuefinder__treeview__remove-icon" }) - ], 8, o_) + q(o(Iv), { class: "vuefinder__treeview__remove-icon" }) + ], 8, l_) ]))), 256)), - o(e).pinnedFolders.length ? q("", !0) : (_(), g("li", r_, [ - l("div", l_, b(o(n)("No folders pinned")), 1) + o(e).pinnedFolders.length ? B("", !0) : (_(), g("li", a_, [ + l("div", i_, b(o(n)("No folders pinned")), 1) ])) - ])) : q("", !0) + ])) : B("", !0) ]), - (_(!0), g(ge, null, xe(o(e).fs.data.storages, (p) => (_(), g("div", a_, [ - P(Kv, { storage: p }, null, 8, ["storage"]) + (_(!0), g(be, null, ke(o(e).fs.data.storages, (p) => (_(), g("div", c_, [ + q(Yv, { storage: p }, null, 8, ["storage"]) ]))), 256)) ], 512), l("div", { - onMousedown: a, + onMousedown: i, class: le([(o(e).showTreeView, ""), "vuefinder__treeview__resize-handle"]) }, null, 34) ], 4) ], 64)); } -}, c_ = { class: "vuefinder__main__content" }, d_ = { +}; +class u_ { + /** + * + * @param {Item['title']} title + * @param {Item['action']} action + * @param {Item['link']} link + * @param {Partial} options + */ + constructor(e, n, r, s) { + this.title = e, this.action = n, this.link = r, this.options = Object.assign( + { + needsSearchQuery: !1, + target: "one" + }, + s + ); + } + /** + * @type {Item['show']} + */ + show(e, n) { + var s, a; + const r = (c) => c.items.length > 1 && c.items.some((d) => { + var i; + return d.path === ((i = c.target) == null ? void 0 : i.path); + }) ? "many" : c.target ? "one" : null; + return !(this.options.needsSearchQuery !== !!n.searchQuery || this.options.target !== void 0 && this.options.target !== r(n) || this.options.targetType !== void 0 && this.options.targetType !== ((s = n.target) == null ? void 0 : s.type) || this.options.mimeType !== void 0 && this.options.mimeType !== ((a = n.target) == null ? void 0 : a.mime_type) || this.options.feature !== void 0 && !e.features.includes(this.options.feature) || this.options.show !== void 0 && !this.options.show(e, n)); + } +} +function Be(t, e) { + return t.map((n) => new u_(n.title, n.action, n.link, { + ...e, + feature: n.key + })); +} +const Te = { + newfolder: { + key: de.NEW_FOLDER, + title: ({ t }) => t("New Folder"), + action: (t) => t.modal.open(Io) + }, + selectAll: { + title: ({ t }) => t("Select All"), + action: (t) => t.dragSelect.selectAll() + }, + pinFolder: { + title: ({ t }) => t("Pin Folder"), + action: (t, e) => { + t.pinnedFolders = t.pinnedFolders.concat(e.value), t.storage.setStore("pinned-folders", t.pinnedFolders); + } + }, + unpinFolder: { + title: ({ t }) => t("Unpin Folder"), + action: (t, e) => { + t.pinnedFolders = t.pinnedFolders.filter((n) => !e.value.find((r) => r.path === n.path)), t.storage.setStore("pinned-folders", t.pinnedFolders); + } + }, + delete: { + key: de.DELETE, + title: ({ t }) => t("Delete"), + action: (t, e) => { + t.modal.open(ds, { items: e }); + } + }, + refresh: { + title: ({ t }) => t("Refresh"), + action: (t) => { + t.emitter.emit("vf-fetch", { params: { q: "index", adapter: t.fs.adapter, path: t.fs.data.dirname } }); + } + }, + preview: { + key: de.PREVIEW, + title: ({ t }) => t("Preview"), + action: (t, e) => t.modal.open(zo, { adapter: t.fs.adapter, item: e.value[0] }) + }, + open: { + title: ({ t }) => t("Open"), + action: (t, e) => { + t.emitter.emit("vf-search-exit"), t.emitter.emit("vf-fetch", { + params: { + q: "index", + adapter: t.fs.adapter, + path: e.value[0].path + } + }); + } + }, + openDir: { + title: ({ t }) => t("Open containing folder"), + action: (t, e) => { + t.emitter.emit("vf-search-exit"), t.emitter.emit("vf-fetch", { + params: { + q: "index", + adapter: t.fs.adapter, + path: e.value[0].dir + } + }); + } + }, + download: { + key: de.DOWNLOAD, + link: (t, e) => t.requester.getDownloadUrl(t.fs.adapter, e.value[0]), + title: ({ t }) => t("Download"), + action: () => { + } + }, + archive: { + key: de.ARCHIVE, + title: ({ t }) => t("Archive"), + action: (t, e) => t.modal.open(Po, { items: e }) + }, + unarchive: { + key: de.UNARCHIVE, + title: ({ t }) => t("Unarchive"), + action: (t, e) => t.modal.open(Uo, { items: e }) + }, + rename: { + key: de.RENAME, + title: ({ t }) => t("Rename"), + action: (t, e) => t.modal.open(us, { items: e }) + } +}, v_ = [ + ...Be([Te.openDir], { + needsSearchQuery: !0 + }), + ...Be([Te.refresh, Te.selectAll, Te.newfolder], { + target: null + }), + ...Be([Te.refresh, Te.archive, Te.delete], { + target: "many" + }), + ...Be([Te.open], { + targetType: "dir" + }), + ...Be([Te.unpinFolder], { + targetType: "dir", + show: (t, e) => t.pinnedFolders.findIndex((n) => { + var r; + return n.path === ((r = e.target) == null ? void 0 : r.path); + }) !== -1 + }), + ...Be([Te.pinFolder], { + targetType: "dir", + show: (t, e) => t.pinnedFolders.findIndex((n) => { + var r; + return n.path === ((r = e.target) == null ? void 0 : r.path); + }) === -1 + }), + ...Be([Te.preview, Te.download], { + show: (t, e) => { + var n; + return ((n = e.target) == null ? void 0 : n.type) !== "dir"; + } + }), + ...Be([Te.rename], { numItems: "one" }), + ...Be([Te.unarchive], { + mimeType: "application/zip" + }), + ...Be([Te.archive], { + show: (t, e) => { + var n; + return ((n = e.target) == null ? void 0 : n.mime_type) !== "application/zip"; + } + }), + ...Be([Te.delete], {}) +], __ = { class: "vuefinder__main__content" }, f_ = { __name: "VueFinder", props: { id: { @@ -5482,63 +5569,67 @@ const Iv = { class: "vuefinder__folder-loader-indicator" }, Nv = { loadingIndicator: { type: String, default: "circular" + }, + contextMenuItems: { + type: Array, + default: () => v_ } }, emits: ["select", "update:path"], setup(t, { emit: e }) { - const n = e, r = t, s = Ml(r, re("VueFinderOptions")); - ir("ServiceContainer", s); - const { setStore: c } = s.storage, i = D(null); - s.root = i; + const n = e, r = t, s = Vl(r, re("VueFinderOptions")); + dr("ServiceContainer", s); + const { setStore: a } = s.storage, c = A(null); + s.root = c; const d = s.dragSelect; - ii(s); - const a = (v) => { + di(s); + const i = (v) => { Object.assign(s.fs.data, v), d.clearSelection(), d.refreshSelection(); }; let u; s.emitter.on("vf-fetch-abort", () => { u.abort(), s.fs.loading = !1; - }), s.emitter.on("vf-fetch", ({ params: v, body: p = null, onSuccess: f = null, onError: h = null, noCloseModal: x = !1 }) => { + }), s.emitter.on("vf-fetch", ({ params: v, body: p = null, onSuccess: m = null, onError: h = null, noCloseModal: x = !1 }) => { ["index", "search"].includes(v.q) && (u && u.abort(), s.fs.loading = !0), u = new AbortController(); - const S = u.signal; + const $ = u.signal; s.requester.send({ url: "", method: v.m || "get", params: v, body: p, - abortSignal: S - }).then((E) => { - s.fs.adapter = E.adapter, s.persist && (s.fs.path = E.dirname, c("path", s.fs.path)), x || s.modal.close(), a(E), f && f(E); - }).catch((E) => { - console.error(E), h && h(E); + abortSignal: $ + }).then((T) => { + s.fs.adapter = T.adapter, s.persist && (s.fs.path = T.dirname, a("path", s.fs.path)), x || s.modal.close(), i(T), m && m(T); + }).catch((T) => { + console.error(T), h && h(T); }).finally(() => { ["index", "search"].includes(v.q) && (s.fs.loading = !1); }); }); - function m(v) { + function f(v) { let p = {}; v && v.includes("://") && (p = { adapter: v.split("://")[0], path: v }), s.emitter.emit("vf-fetch", { params: { q: "index", adapter: s.fs.adapter, ...p }, - onError: r.onError ?? ((f) => { - f.message && s.emitter.emit("vf-toast-push", { label: f.message, type: "error" }); + onError: r.onError ?? ((m) => { + m.message && s.emitter.emit("vf-toast-push", { label: m.message, type: "error" }); }) }); } - return Se(() => { - m(s.fs.path), Me(() => r.path, (v) => { - m(v); + return Ce(() => { + f(s.fs.path), De(() => r.path, (v) => { + f(v); }), d.onSelect((v) => { n("select", v); - }), Me(() => s.fs.data.dirname, (v) => { + }), De(() => s.fs.data.dirname, (v) => { n("update:path", v); }); }), (v, p) => (_(), g("div", { class: "vuefinder", ref_key: "root", - ref: i, + ref: c, tabindex: "0" }, [ l("div", { @@ -5546,29 +5637,29 @@ const Iv = { class: "vuefinder__folder-loader-indicator" }, Nv = { }, [ l("div", { class: le([o(s).fullScreen ? "vuefinder__main__fixed" : "vuefinder__main__relative", "vuefinder__main__container"]), - style: rn(o(s).fullScreen ? "" : "max-height: " + t.maxHeight), - onMousedown: p[0] || (p[0] = (f) => o(s).emitter.emit("vf-contextmenu-hide")), - onTouchstart: p[1] || (p[1] = (f) => o(s).emitter.emit("vf-contextmenu-hide")) + style: dn(o(s).fullScreen ? "" : "max-height: " + t.maxHeight), + onMousedown: p[0] || (p[0] = (m) => o(s).emitter.emit("vf-contextmenu-hide")), + onTouchstart: p[1] || (p[1] = (m) => o(s).emitter.emit("vf-contextmenu-hide")) }, [ - P(Oc), - P(Rd), - l("div", c_, [ - P(i_), - P(cv) + q(Fc), + q(Rd), + l("div", __, [ + q(d_), + q(uv) ]), - P(Tv) + q(Dv) ], 38), - P(cr, { name: "fade" }, { - default: Q(() => [ - o(s).modal.visible ? (_(), W(Fs(o(s).modal.type), { key: 0 })) : q("", !0) + q(ur, { name: "fade" }, { + default: J(() => [ + o(s).modal.visible ? (_(), W(Rs(o(s).modal.type), { key: 0 })) : B("", !0) ]), _: 1 }), - P(vv) + q(fv) ], 2) ], 512)); } -}, w_ = { +}, S_ = { /** * @param {import('vue').App} app * @param options @@ -5576,9 +5667,11 @@ const Iv = { class: "vuefinder__folder-loader-indicator" }, Nv = { install(t, e = {}) { e.i18n = e.i18n ?? {}; let [n] = Object.keys(e.i18n); - e.locale = e.locale ?? n ?? "en", t.provide("VueFinderOptions", e), t.component("VueFinder", d_); + e.locale = e.locale ?? n ?? "en", t.provide("VueFinderOptions", e), t.component("VueFinder", f_); } }; export { - w_ as default + u_ as SimpleContextMenuItem, + v_ as contextMenuItems, + S_ as default }; diff --git a/examples/main.js b/examples/main.js index c6059181..fd06ae55 100644 --- a/examples/main.js +++ b/examples/main.js @@ -17,6 +17,7 @@ app.use(VueFinder, fa: async () => await import ("../src/locales/fa.js"), he: async () => await import ("../src/locales/he.js"), hi: async () => await import ("../src/locales/hi.js"), + pl: async () => await import ("../src/locales/pl.js"), ru: async () => await import ("../src/locales/ru.js"), sv: async () => await import ("../src/locales/sv.js"), tr: async () => await import ("../src/locales/tr.js"), diff --git a/src/components/modals/ModalAbout.vue b/src/components/modals/ModalAbout.vue index bc36ab98..9d9249f9 100644 --- a/src/components/modals/ModalAbout.vue +++ b/src/components/modals/ModalAbout.vue @@ -271,6 +271,7 @@ const languageList = { fa: 'Persian (فارسی)', he: 'Hebrew (עִברִית)', hi: 'Hindi (हिंदी)', + pl: 'Polish (Polski)', ru: 'Russian (Pусский)', sv: 'Swedish (Svenska)', tr: 'Turkish (Türkçe)', diff --git a/src/locales/pl.js b/src/locales/pl.js new file mode 100644 index 00000000..59d5659f --- /dev/null +++ b/src/locales/pl.js @@ -0,0 +1,105 @@ +import uppyLocaleEn from '@uppy/locales/lib/pl_PL.js'; + +export default { + "Language": "Język", + "Create": "Utwórz", + "Close": "Zamknij", + "Cancel": "Anuluj", + "Save": "Zapisz", + "Edit": "Edytuj", + "Crop": "Przytnij", + "New Folder": "Nowy folder", + "New File": "Nowy plik", + "Rename": "Zmień nazwę", + "Delete": "Usuń", + "Upload": "Prześlij", + "Download": "Pobierz", + "Archive": "Archiwizuj", + "Unarchive": "Rozpakuj", + "Open": "Otwórz", + "Open containing folder": "Otwórz folder zawierający", + "Refresh": "Odśwież", + "Preview": "Podgląd", + "Toggle Full Screen": "Przełącz tryb pełnoekranowy", + "Change View": "Zmień widok", + "Storage": "Pamięć", + "Go up a directory": "Przejdź do katalogu wyżej", + "Search anything..": "Szukaj czegokolwiek..", + "Name": "Nazwa", + "Size": "Rozmiar", + "Date": "Data", + "Filepath": "Ścieżka pliku", + "Folder Name": "Nazwa folderu", + "File Name": "Nazwa pliku", + "Move files": "Przenieś pliki", + "Yes, Move!": "Tak, przenieś!", + "Delete files": "Usuń pliki", + "Yes, Delete!": "Tak, usuń!", + "Upload Files": "Prześlij pliki", + "No files selected!": "Nie wybrano plików!", + "Select Files": "Wybierz pliki", + "Archive the files": "Zarchiwizuj pliki", + "Unarchive the files": "Rozpakuj pliki", + "The archive will be unarchived at": "Archiwum zostanie rozpakowane w", + "Archive name. (.zip file will be created)": "Nazwa archiwum. (.zip plik zostanie utworzony)", + "Vuefinder is a file manager component for Vue 3.": "Vuefinder to komponent menedżera plików dla Vue 3.", + "Create a new folder": "Utwórz nowy folder", + "Create a new file": "Utwórz nowy plik", + "Are you sure you want to delete these files?": "Czy na pewno chcesz usunąć te pliki?", + "This action cannot be undone.": "Tej operacji nie można cofnąć.", + "Search results for": "Wyniki wyszukiwania dla", + "%s item(s) selected.": "Wybrano %s elementów.", + "%s is renamed.": "%s zostało przemianowane.", + "This is a readonly storage.": "To jest pamięć tylko do odczytu.", + "%s is created.": "%s zostało utworzone.", + "Files moved.": "Pliki zostały przeniesione.", + "Files deleted.": "Pliki zostały usunięte.", + "The file unarchived.": "Plik został rozpakowany.", + "The file(s) archived.": "Plik(i) zostały zarchiwizowane.", + "Updated.": "Zaktualizowano.", + "No search result found.": "Nie znaleziono wyników wyszukiwania.", + "Are you sure you want to move these files?": "Czy na pewno chcesz przenieść te pliki?", + "File Size": "Rozmiar pliku", + "Last Modified": "Ostatnia modyfikacja", + "Select Folders": "Wybierz foldery", + "Clear all": "Wyczyść wszystko", + "Clear only successful": "Wyczyść tylko udane", + "Drag and drop the files/folders to here or click here.": "Przeciągnij i upuść pliki/foldery tutaj lub kliknij tutaj.", + "Release to drop these files.": "Zwolnij przycisk, aby upuścić te pliki.", + "Canceled": "Anulowano", + "Done": "Gotowe", + "Network Error, Unable establish connection to the server or interrupted.": "Błąd sieci, nie można nawiązać połączenia z serwerem lub połączenie zostało przerwane.", + "Pending upload": "Oczekujące przesyłanie", + "Please select file to upload first.": "Proszę najpierw wybrać plik do przesłania.", + "About": "O programie", + "Settings": "Ustawienia", + "Shortcuts": "Skróty", + "Reset": "Resetuj", + "Escape": "Escape", + "Search": "Szukaj", + "Toggle Sidebar": "Przełącz pasek boczny", + "Open Settings": "Otwórz ustawienia", + "Reset all settings to default": "Zresetuj wszystkie ustawienia do domyślnych", + "Use Metric Units": "Użyj jednostek metrycznych", + "Saved.": "Zapisano.", + "Reset Settings": "Zresetuj ustawienia", + "Download doesn't work? You can try right-click 'Download' button, select 'Save link as...'.": "Pobieranie nie działa? Możesz spróbować kliknąć prawym przyciskiem na przycisk 'Pobierz', wybrać 'Zapisz link jako...'.", + "Theme": "Motyw", + "Dark": "Ciemny", + "Light": "Jasny", + "System": "System", + "Target Directory": "Docelowy katalog", + "Select": "Wybierz", + "Compact list view": "Widok listy w formacie kompaktowym", + "Show thumbnails": "Pokaż miniatury", + "Persist path on reload": "Zachowaj ścieżkę po przeładowaniu", + "Select All": "Zaznacz wszystko", + "Pinned Folders": "Przypięte foldery", + "No folders pinned": "Brak przypiętych folderów", + "Pin Folder": "Przypnij folder", + "Unpin Folder": "Odepnij folder", + "Project home": "Strona główna projektu", + "Follow on GitHub": "Śledź na GitHubie", + "Customize your experience with the following settings": "Dostosuj swoje doświadczenie za pomocą poniższych ustawień", + "uppy": uppyLocaleEn +}